From 61cb1cc6f8a76e07ef190364ab93a51e4d444f87 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 1 Oct 2017 10:13:39 +0200 Subject: [PATCH] Update vendored dependencies This includes github.com/kurin/blazer 0.2.0, which resolves #1291 --- Gopkg.lock | 26 +- Gopkg.toml | 4 - vendor/cloud.google.com/go/README.md | 34 +- vendor/cloud.google.com/go/bigquery/copy.go | 11 +- .../cloud.google.com/go/bigquery/copy_test.go | 21 +- .../go/bigquery/create_table_test.go | 122 - .../cloud.google.com/go/bigquery/dataset.go | 26 +- .../go/bigquery/examples_test.go | 17 +- .../cloud.google.com/go/bigquery/extract.go | 34 +- .../go/bigquery/extract_test.go | 3 +- .../go/bigquery/integration_test.go | 140 +- vendor/cloud.google.com/go/bigquery/job.go | 112 +- .../cloud.google.com/go/bigquery/job_test.go | 95 + vendor/cloud.google.com/go/bigquery/load.go | 9 +- .../cloud.google.com/go/bigquery/load_test.go | 3 +- vendor/cloud.google.com/go/bigquery/query.go | 19 +- .../go/bigquery/query_test.go | 42 +- vendor/cloud.google.com/go/bigquery/schema.go | 5 - .../cloud.google.com/go/bigquery/service.go | 264 +- .../go/bigquery/service_test.go | 155 +- vendor/cloud.google.com/go/bigquery/table.go | 116 +- .../go/bigquery/utils_test.go | 20 - .../go/internal/version/version.go | 2 +- .../cloud.google.com/go/language/apiv1/doc.go | 2 +- .../go/language/apiv1/language_client.go | 35 +- .../apiv1/language_client_example_test.go | 18 + .../go/language/apiv1/mock_test.go | 71 + .../go/language/apiv1beta2/language_client.go | 22 +- .../language_client_example_test.go | 18 + .../go/language/apiv1beta2/mock_test.go | 68 + .../cloud.google.com/go/profiler/profiler.go | 148 +- .../go/profiler/profiler_test.go | 458 +- vendor/cloud.google.com/go/pubsub/pubsub.go | 6 + .../cloud.google.com/go/spanner/mutation.go | 2 +- vendor/cloud.google.com/go/spanner/session.go | 8 +- .../cloud.google.com/go/speech/apiv1/doc.go | 2 +- vendor/cloud.google.com/go/storage/bucket.go | 5 +- .../go/storage/{go110.go.pending => go110.go} | 0 vendor/cloud.google.com/go/storage/storage.go | 13 +- vendor/cloud.google.com/go/storage/writer.go | 25 +- .../go/storage/writer_test.go | 16 +- vendor/cloud.google.com/go/trace/grpc.go | 15 +- vendor/cloud.google.com/go/trace/http.go | 4 +- vendor/cloud.google.com/go/trace/trace.go | 19 +- .../cloud.google.com/go/vision/annotations.go | 689 - .../cloud.google.com/go/vision/apiv1/doc.go | 4 +- .../go/vision/apiv1/image_annotator_client.go | 6 +- vendor/cloud.google.com/go/vision/doc.go | 105 - .../go/vision/examples_test.go | 99 - vendor/cloud.google.com/go/vision/face.go | 172 - vendor/cloud.google.com/go/vision/geometry.go | 36 - vendor/cloud.google.com/go/vision/image.go | 91 - .../cloud.google.com/go/vision/image_test.go | 42 - vendor/cloud.google.com/go/vision/latlng.go | 58 - .../go/vision/testdata/README.md | 16 - .../go/vision/testdata/cat.jpg | Bin 122667 -> 0 bytes .../go/vision/testdata/eiffel-tower.jpg | Bin 6832 -> 0 bytes .../go/vision/testdata/face.jpg | Bin 68133 -> 0 bytes .../go/vision/testdata/faulkner.jpg | Bin 167040 -> 0 bytes .../go/vision/testdata/google.png | Bin 5969 -> 0 bytes .../go/vision/testdata/mountain.jpg | Bin 41852 -> 0 bytes .../go/vision/testdata/no-text.jpg | Bin 12377 -> 0 bytes vendor/cloud.google.com/go/vision/vision.go | 356 - .../Azure/azure-sdk-for-go/.travis.yml | 2 +- .../Azure/azure-sdk-for-go/CHANGELOG.md | 49 +- .../Azure/azure-sdk-for-go/Gododir/gen.go | 187 +- .../azure-sdk-for-go/arm/advisor/client.go | 8 +- .../azure-sdk-for-go/arm/advisor/models.go | 11 +- .../arm/advisor/operations.go | 55 +- .../arm/advisor/recommendations.go | 91 +- .../arm/advisor/suppressions.go | 92 +- .../azure-sdk-for-go/arm/advisor/version.go | 6 +- .../arm/analysisservices/client.go | 13 +- .../arm/analysisservices/models.go | 174 +- .../arm/analysisservices/operations.go | 166 + .../arm/analysisservices/servers.go | 481 +- .../arm/analysisservices/version.go | 6 +- .../arm/appinsights/client.go | 8 +- .../arm/appinsights/components.go | 134 +- .../arm/appinsights/models.go | 38 +- .../arm/appinsights/operations.go | 56 +- .../arm/appinsights/version.go | 6 +- .../arm/appinsights/webtests.go | 130 +- .../authorization/classicadministrators.go | 69 +- .../arm/authorization/client.go | 17 +- .../arm/authorization/models.go | 8 +- .../arm/authorization/permissions.go | 123 +- .../provideroperationsmetadata.go | 70 +- .../arm/authorization/roleassignments.go | 258 +- .../arm/authorization/roledefinitions.go | 81 +- .../arm/authorization/version.go | 6 +- .../arm/automation/account.go | 116 +- .../arm/automation/activity.go | 70 +- .../agentregistrationinformation.go | 23 +- .../arm/automation/certificate.go | 80 +- .../azure-sdk-for-go/arm/automation/client.go | 9 +- .../arm/automation/connection.go | 80 +- .../arm/automation/connectiontype.go | 77 +- .../arm/automation/credential.go | 80 +- .../arm/automation/dsccompilationjob.go | 81 +- .../arm/automation/dscconfiguration.go | 84 +- .../arm/automation/dscnode.go | 69 +- .../arm/automation/dscnodeconfiguration.go | 83 +- .../azure-sdk-for-go/arm/automation/fields.go | 15 +- .../automation/hybridrunbookworkergroup.go | 77 +- .../azure-sdk-for-go/arm/automation/job.go | 90 +- .../arm/automation/jobschedule.go | 73 +- .../arm/automation/jobstream.go | 65 +- .../azure-sdk-for-go/arm/automation/models.go | 421 +- .../azure-sdk-for-go/arm/automation/module.go | 73 +- .../arm/automation/nodereports.go | 70 +- .../arm/automation/objectdatatypes.go | 29 +- .../arm/automation/operations.go | 10 +- .../arm/automation/runbook.go | 77 +- .../arm/automation/runbookdraft.go | 52 +- .../arm/automation/schedule.go | 76 +- .../arm/automation/statistics.go | 14 +- .../arm/automation/testjobs.go | 33 +- .../arm/automation/testjobstreams.go | 72 +- .../azure-sdk-for-go/arm/automation/usages.go | 10 +- .../arm/automation/variable.go | 76 +- .../arm/automation/version.go | 6 +- .../arm/automation/webhook.go | 77 +- .../azure-sdk-for-go/arm/batch/account.go | 210 +- .../azure-sdk-for-go/arm/batch/application.go | 99 +- .../arm/batch/applicationpackage.go | 44 +- .../azure-sdk-for-go/arm/batch/client.go | 7 +- .../azure-sdk-for-go/arm/batch/location.go | 90 +- .../azure-sdk-for-go/arm/batch/models.go | 197 +- .../azure-sdk-for-go/arm/batch/operations.go | 165 + .../azure-sdk-for-go/arm/batch/version.go | 6 +- .../azure-sdk-for-go/arm/billing/client.go | 13 +- .../azure-sdk-for-go/arm/billing/invoices.go | 93 +- .../azure-sdk-for-go/arm/billing/models.go | 27 +- .../arm/billing/operations.go | 58 +- .../azure-sdk-for-go/arm/billing/periods.go | 73 +- .../azure-sdk-for-go/arm/billing/version.go | 6 +- .../Azure/azure-sdk-for-go/arm/cdn/client.go | 168 +- .../azure-sdk-for-go/arm/cdn/customdomains.go | 148 +- .../azure-sdk-for-go/arm/cdn/edgenodes.go | 62 +- .../azure-sdk-for-go/arm/cdn/endpoints.go | 300 +- .../Azure/azure-sdk-for-go/arm/cdn/models.go | 269 +- .../azure-sdk-for-go/arm/cdn/operations.go | 166 + .../Azure/azure-sdk-for-go/arm/cdn/origins.go | 96 +- .../azure-sdk-for-go/arm/cdn/profiles.go | 328 +- .../azure-sdk-for-go/arm/cdn/resourceusage.go | 170 + .../Azure/azure-sdk-for-go/arm/cdn/version.go | 6 +- .../arm/cognitiveservices/accounts.go | 281 +- .../cognitiveservices/checkskuavailability.go | 113 + .../arm/cognitiveservices/client.go | 8 +- .../arm/cognitiveservices/models.go | 99 +- .../arm/cognitiveservices/operations.go | 165 + .../arm/cognitiveservices/version.go | 6 +- .../azure-sdk-for-go/arm/commerce/client.go | 8 +- .../azure-sdk-for-go/arm/commerce/models.go | 221 +- .../azure-sdk-for-go/arm/commerce/ratecard.go | 33 +- .../arm/commerce/usageaggregates.go | 82 +- .../azure-sdk-for-go/arm/commerce/version.go | 6 +- .../arm/compute/availabilitysets.go | 55 +- .../azure-sdk-for-go/arm/compute/client.go | 10 +- .../arm/compute/containerservices.go | 579 + .../azure-sdk-for-go/arm/compute/disks.go | 818 + .../azure-sdk-for-go/arm/compute/images.go | 143 +- .../azure-sdk-for-go/arm/compute/models.go | 1663 +- .../arm/compute/resourceskus.go | 169 + .../azure-sdk-for-go/arm/compute/snapshots.go | 819 + .../azure-sdk-for-go/arm/compute/usage.go | 59 +- .../azure-sdk-for-go/arm/compute/version.go | 6 +- .../compute/virtualmachineextensionimages.go | 24 +- .../arm/compute/virtualmachineextensions.go | 58 +- .../arm/compute/virtualmachineimages.go | 52 +- .../arm/compute/virtualmachineruncommands.go | 250 + .../arm/compute/virtualmachines.go | 530 +- .../virtualmachinescalesetextensions.go | 416 + .../virtualmachinescalesetrollingupgrades.go | 271 + .../arm/compute/virtualmachinescalesets.go | 497 +- .../arm/compute/virtualmachinescalesetvms.go | 213 +- .../arm/compute/virtualmachinesizes.go | 18 +- .../arm/consumption/client.go | 15 +- .../arm/consumption/models.go | 18 +- .../arm/consumption/operations.go | 58 +- .../arm/consumption/usagedetails.go | 93 +- .../arm/consumption/version.go | 6 +- .../arm/containerinstance/client.go | 2 +- .../arm/containerinstance/containergroups.go | 32 +- .../arm/containerinstance/containerlogs.go | 10 +- .../arm/containerinstance/models.go | 24 +- .../arm/containerinstance/version.go | 6 +- .../arm/containerregistry/client.go | 8 +- .../arm/containerregistry/models.go | 352 +- .../arm/containerregistry/operations.go | 61 +- .../arm/containerregistry/registries.go | 414 +- .../arm/containerregistry/replications.go | 564 + .../arm/containerregistry/version.go | 6 +- .../arm/containerregistry/webhooks.go | 875 ++ .../arm/containerservice/client.go | 10 +- .../arm/containerservice/containerservices.go | 166 +- .../arm/containerservice/models.go | 33 +- .../arm/containerservice/version.go | 6 +- .../azure-sdk-for-go/arm/cosmos-db/client.go | 2 +- .../arm/cosmos-db/databaseaccounts.go | 2 +- .../azure-sdk-for-go/arm/cosmos-db/models.go | 38 +- .../arm/cosmos-db/operations.go | 165 + .../azure-sdk-for-go/arm/cosmos-db/version.go | 6 +- .../authorizationpolicies.go | 103 +- .../arm/customer-insights/client.go | 15 +- .../customer-insights/connectormappings.go | 94 +- .../arm/customer-insights/connectors.go | 102 +- .../arm/customer-insights/hubs.go | 138 +- .../arm/customer-insights/images.go | 29 +- .../arm/customer-insights/interactions.go | 99 +- .../arm/customer-insights/kpi.go | 104 +- .../arm/customer-insights/links.go | 94 +- .../arm/customer-insights/models.go | 466 +- .../arm/customer-insights/predictions.go | 633 + .../arm/customer-insights/profiles.go | 117 +- .../customer-insights/relationshiplinks.go | 110 +- .../arm/customer-insights/relationships.go | 107 +- .../arm/customer-insights/roleassignments.go | 99 +- .../arm/customer-insights/roles.go | 62 +- .../arm/customer-insights/version.go | 6 +- .../arm/customer-insights/views.go | 84 +- .../arm/customer-insights/widgettypes.go | 69 +- .../arm/datalake-analytics/account/client.go | 8 +- .../account/computepolicies.go | 468 + .../account/datalakestoreaccounts.go | 119 +- .../account/firewallrules.go | 105 +- .../account/{accountgroup.go => group.go} | 206 +- .../arm/datalake-analytics/account/models.go | 295 +- .../account/storageaccounts.go | 264 +- .../arm/datalake-analytics/account/version.go | 6 +- .../arm/datalake-store/account/client.go | 8 +- .../datalake-store/account/firewallrules.go | 105 +- .../account/{accountgroup.go => group.go} | 206 +- .../arm/datalake-store/account/models.go | 148 +- .../account/trustedidproviders.go | 111 +- .../arm/datalake-store/account/version.go | 6 +- .../arm/deployment/deployment.go | 63 + .../arm/devtestlabs/armtemplates.go | 68 +- .../arm/devtestlabs/artifacts.go | 80 +- .../arm/devtestlabs/artifactsources.go | 83 +- .../arm/devtestlabs/client.go | 8 +- .../azure-sdk-for-go/arm/devtestlabs/costs.go | 14 +- .../arm/devtestlabs/customimages.go | 95 +- .../azure-sdk-for-go/arm/devtestlabs/disks.go | 128 +- .../arm/devtestlabs/environments.go | 98 +- .../arm/devtestlabs/formulas.go | 86 +- .../arm/devtestlabs/galleryimages.go | 65 +- .../arm/devtestlabs/globalschedules.go | 156 +- .../azure-sdk-for-go/arm/devtestlabs/labs.go | 245 +- .../arm/devtestlabs/models.go | 242 +- .../arm/devtestlabs/notificationchannels.go | 88 +- .../arm/devtestlabs/policies.go | 83 +- .../arm/devtestlabs/policysets.go | 13 +- .../arm/devtestlabs/schedules.go | 141 +- .../arm/devtestlabs/secrets.go | 75 +- .../arm/devtestlabs/servicerunners.go | 74 +- .../azure-sdk-for-go/arm/devtestlabs/users.go | 86 +- .../arm/devtestlabs/version.go | 6 +- .../arm/devtestlabs/virtualmachines.go | 194 +- .../devtestlabs/virtualmachineschedules.go | 100 +- .../arm/devtestlabs/virtualnetworks.go | 103 +- .../Azure/azure-sdk-for-go/arm/dns/client.go | 5 +- .../Azure/azure-sdk-for-go/arm/dns/models.go | 68 +- .../azure-sdk-for-go/arm/dns/recordsets.go | 182 +- .../Azure/azure-sdk-for-go/arm/dns/version.go | 6 +- .../Azure/azure-sdk-for-go/arm/dns/zones.go | 145 +- .../azure-sdk-for-go/arm/eventgrid/client.go | 4 +- .../arm/eventgrid/eventsubscriptions.go | 30 +- .../azure-sdk-for-go/arm/eventgrid/models.go | 249 +- .../arm/eventgrid/operations.go | 4 +- .../azure-sdk-for-go/arm/eventgrid/topics.go | 18 +- .../arm/eventgrid/topictypes.go | 8 +- .../azure-sdk-for-go/arm/eventgrid/version.go | 6 +- .../azure-sdk-for-go/arm/eventhub/client.go | 8 +- .../arm/eventhub/consumergroups.go | 171 +- .../arm/eventhub/eventhubs.go | 481 +- .../azure-sdk-for-go/arm/eventhub/models.go | 416 +- .../arm/eventhub/namespaces.go | 508 +- .../arm/eventhub/operations.go | 55 +- .../azure-sdk-for-go/arm/eventhub/version.go | 6 +- .../arm/examples/check/check.go | 14 + .../arm/examples/create/create.go | 14 + .../arm/examples/dns/create.go | 16 +- .../arm/examples/dns/paging/paging.go | 16 +- .../arm/examples/helpers/helpers.go | 15 + .../arm/graphrbac/applications.go | 76 +- .../azure-sdk-for-go/arm/graphrbac/client.go | 10 +- .../azure-sdk-for-go/arm/graphrbac/domains.go | 169 + .../azure-sdk-for-go/arm/graphrbac/groups.go | 115 +- .../azure-sdk-for-go/arm/graphrbac/models.go | 208 +- .../azure-sdk-for-go/arm/graphrbac/objects.go | 59 +- .../arm/graphrbac/serviceprincipals.go | 83 +- .../azure-sdk-for-go/arm/graphrbac/users.go | 66 +- .../azure-sdk-for-go/arm/graphrbac/version.go | 6 +- .../arm/hdinsight/applications.go | 88 +- .../azure-sdk-for-go/arm/hdinsight/client.go | 9 +- .../arm/hdinsight/clusters.go | 178 +- .../arm/hdinsight/configurations.go | 32 +- .../arm/hdinsight/extension.go | 23 +- .../arm/hdinsight/location.go | 10 +- .../azure-sdk-for-go/arm/hdinsight/models.go | 79 +- .../arm/hdinsight/operations.go | 55 +- .../arm/hdinsight/scriptactions.go | 65 +- .../arm/hdinsight/scriptexecutionhistory.go | 69 +- .../azure-sdk-for-go/arm/hdinsight/version.go | 6 +- .../azure-sdk-for-go/arm/intune/android.go | 190 +- .../azure-sdk-for-go/arm/intune/client.go | 318 +- .../Azure/azure-sdk-for-go/arm/intune/ios.go | 190 +- .../azure-sdk-for-go/arm/intune/models.go | 78 +- .../azure-sdk-for-go/arm/intune/version.go | 6 +- .../azure-sdk-for-go/arm/iothub/client.go | 10 +- .../azure-sdk-for-go/arm/iothub/models.go | 266 +- .../azure-sdk-for-go/arm/iothub/operations.go | 165 + .../azure-sdk-for-go/arm/iothub/resource.go | 532 +- .../azure-sdk-for-go/arm/iothub/version.go | 6 +- .../azure-sdk-for-go/arm/keyvault/client.go | 11 +- .../azure-sdk-for-go/arm/keyvault/models.go | 183 +- .../azure-sdk-for-go/arm/keyvault/vaults.go | 411 +- .../azure-sdk-for-go/arm/keyvault/version.go | 6 +- .../azure-sdk-for-go/arm/logic/agreements.go | 75 +- .../arm/logic/certificates.go | 75 +- .../azure-sdk-for-go/arm/logic/client.go | 50 +- .../arm/logic/integrationaccounts.go | 124 +- .../Azure/azure-sdk-for-go/arm/logic/maps.go | 70 +- .../azure-sdk-for-go/arm/logic/models.go | 606 +- .../azure-sdk-for-go/arm/logic/partners.go | 75 +- .../azure-sdk-for-go/arm/logic/schemas.go | 70 +- .../azure-sdk-for-go/arm/logic/sessions.go | 75 +- .../azure-sdk-for-go/arm/logic/version.go | 6 +- .../arm/logic/workflowrunactions.go | 68 +- .../arm/logic/workflowruns.go | 66 +- .../azure-sdk-for-go/arm/logic/workflows.go | 143 +- .../arm/logic/workflowtriggerhistories.go | 78 +- .../arm/logic/workflowtriggers.go | 75 +- .../arm/logic/workflowversions.go | 71 +- .../machinelearning/commitmentplans/client.go | 17 +- .../commitmentplans/commitmentassociations.go | 81 +- .../{commitmentplansgroup.go => group.go} | 134 +- .../machinelearning/commitmentplans/models.go | 28 +- .../commitmentplans/usagehistory.go | 68 +- .../commitmentplans/version.go | 6 +- .../arm/machinelearning/webservices/client.go | 18 +- .../{webservicesgroup.go => group.go} | 201 +- .../arm/machinelearning/webservices/models.go | 247 +- .../machinelearning/webservices/version.go | 6 +- .../arm/marketplaceordering/client.go | 51 + .../marketplaceagreements.go | 179 + .../arm/marketplaceordering/models.go | 98 + .../arm/marketplaceordering/operations.go | 165 + .../arm/marketplaceordering/version.go | 28 + .../arm/mediaservices/client.go | 8 +- .../arm/mediaservices/mediaservice.go | 120 +- .../arm/mediaservices/models.go | 49 +- .../arm/mediaservices/operations.go | 96 + .../arm/mediaservices/version.go | 6 +- .../arm/mobileengagement/appcollections.go | 59 +- .../arm/mobileengagement/apps.go | 53 +- .../arm/mobileengagement/campaigns.go | 181 +- .../arm/mobileengagement/client.go | 8 +- .../arm/mobileengagement/devices.go | 151 +- .../arm/mobileengagement/exporttasks.go | 128 +- .../arm/mobileengagement/importtasks.go | 89 +- .../arm/mobileengagement/models.go | 3076 +++- .../mobileengagement/supportedplatforms.go | 11 +- .../arm/mobileengagement/version.go | 6 +- .../arm/monitor/actiongroups.go | 445 + .../arm/monitor/activitylogalerts.go | 55 +- .../arm/monitor/alertruleincidents.go | 21 +- .../arm/monitor/alertrules.go | 88 +- .../arm/monitor/autoscalesettings.go | 138 +- .../azure-sdk-for-go/arm/monitor/client.go | 7 +- .../arm/monitor/diagnosticsettings.go | 296 + .../arm/monitor/diagnosticsettingscategory.go | 166 + .../arm/monitor/logprofiles.go | 79 +- .../azure-sdk-for-go/arm/monitor/models.go | 956 +- .../arm/monitor/operations.go | 96 + .../arm/monitor/servicediagnosticsettings.go | 242 - .../azure-sdk-for-go/arm/monitor/version.go | 6 +- .../azure-sdk-for-go/arm/mysql/client.go | 2 +- .../arm/mysql/configurations.go | 2 +- .../azure-sdk-for-go/arm/mysql/databases.go | 2 +- .../arm/mysql/firewallrules.go | 2 +- .../azure-sdk-for-go/arm/mysql/logfiles.go | 2 +- .../azure-sdk-for-go/arm/mysql/models.go | 102 +- .../azure-sdk-for-go/arm/mysql/mysql_test.go | 16 +- .../azure-sdk-for-go/arm/mysql/operations.go | 2 +- .../azure-sdk-for-go/arm/mysql/servers.go | 2 +- .../azure-sdk-for-go/arm/mysql/version.go | 6 +- .../arm/network/applicationgateways.go | 452 +- .../arm/network/applicationsecuritygroups.go | 535 + .../arm/network/availableendpointservices.go | 172 + .../arm/network/bgpservicecommunities.go | 60 +- .../azure-sdk-for-go/arm/network/client.go | 23 +- .../arm/network/defaultsecurityrules.go | 241 + .../expressroutecircuitauthorizations.go | 110 +- .../network/expressroutecircuitpeerings.go | 106 +- .../arm/network/expressroutecircuits.go | 219 +- .../network/expressrouteserviceproviders.go | 62 +- .../arm/network/inboundnatrules.go | 436 + .../arm/network/interfaceipconfigurations.go | 240 + .../arm/network/interfaceloadbalancers.go | 173 + .../arm/network/interfaces.go | 293 +- .../loadbalancerbackendaddresspools.go | 241 + .../loadbalancerfrontendipconfigurations.go | 242 + .../network/loadbalancerloadbalancingrules.go | 241 + .../network/loadbalancernetworkinterfaces.go | 174 + .../arm/network/loadbalancerprobes.go | 240 + .../arm/network/loadbalancers.go | 145 +- .../arm/network/localnetworkgateways.go | 98 +- .../azure-sdk-for-go/arm/network/models.go | 1793 ++- .../arm/network/packetcaptures.go | 95 +- .../arm/network/publicipaddresses.go | 495 +- .../arm/network/routefilterrules.go | 124 +- .../arm/network/routefilters.go | 162 +- .../azure-sdk-for-go/arm/network/routes.go | 96 +- .../arm/network/routetables.go | 143 +- .../arm/network/securitygroups.go | 147 +- .../arm/network/securityrules.go | 106 +- .../azure-sdk-for-go/arm/network/subnets.go | 95 +- .../azure-sdk-for-go/arm/network/usages.go | 56 +- .../azure-sdk-for-go/arm/network/version.go | 6 +- .../virtualnetworkgatewayconnections.go | 171 +- .../arm/network/virtualnetworkgateways.go | 681 +- .../arm/network/virtualnetworkpeerings.go | 106 +- .../arm/network/virtualnetworks.go | 288 +- .../azure-sdk-for-go/arm/network/watchers.go | 450 +- .../arm/notificationhubs/client.go | 8 +- .../{notificationhubsgroup.go => group.go} | 173 +- .../arm/notificationhubs/hubs.go | 114 + .../arm/notificationhubs/models.go | 52 +- .../arm/notificationhubs/name.go | 112 + .../arm/notificationhubs/namespaces.go | 221 +- .../arm/notificationhubs/version.go | 6 +- .../arm/operationalinsights/client.go | 10 +- .../arm/operationalinsights/datasources.go | 83 +- .../arm/operationalinsights/linkedservices.go | 36 +- .../arm/operationalinsights/models.go | 254 +- .../arm/operationalinsights/savedsearches.go | 426 + .../operationalinsights/storageinsights.go | 419 + .../arm/operationalinsights/version.go | 6 +- .../arm/operationalinsights/workspaces.go | 378 +- .../arm/operationsmanagement/client.go | 53 + .../arm/operationsmanagement/models.go | 85 + .../arm/operationsmanagement/operations.go | 96 + .../arm/operationsmanagement/solutions.go | 397 + .../arm/operationsmanagement/version.go | 28 + .../azure-sdk-for-go/arm/postgresql/client.go | 2 +- .../arm/postgresql/configurations.go | 2 +- .../arm/postgresql/databases.go | 2 +- .../arm/postgresql/firewallrules.go | 2 +- .../arm/postgresql/logfiles.go | 2 +- .../azure-sdk-for-go/arm/postgresql/models.go | 102 +- .../arm/postgresql/operations.go | 2 +- .../arm/postgresql/postgresql_test.go | 16 +- .../arm/postgresql/servers.go | 36 +- .../arm/postgresql/version.go | 6 +- .../arm/powerbiembedded/client.go | 14 +- .../arm/powerbiembedded/models.go | 5 +- .../arm/powerbiembedded/version.go | 6 +- .../powerbiembedded/workspacecollections.go | 78 +- .../arm/powerbiembedded/workspaces.go | 17 +- .../recoveryservices/backupstorageconfigs.go | 172 + .../recoveryservices/backupvaultconfigs.go | 173 + .../arm/recoveryservices/client.go | 10 +- .../arm/recoveryservices/models.go | 403 +- .../arm/recoveryservices/operations.go | 72 +- .../recoveryservices/registeredidentities.go | 105 + .../arm/recoveryservices/replicationusages.go | 105 + .../arm/recoveryservices/usages.go | 105 + .../arm/recoveryservices/vaultcertificates.go | 109 + .../arm/recoveryservices/vaultextendedinfo.go | 31 +- .../arm/recoveryservices/vaults.go | 34 +- .../arm/recoveryservices/version.go | 6 +- .../recoveryservicesbackup/backupengines.go | 74 +- .../arm/recoveryservicesbackup/backupjobs.go | 63 +- .../backupoperationresults.go | 29 +- .../backupoperationstatuses.go | 27 +- .../recoveryservicesbackup/backuppolicies.go | 68 +- .../backupprotectableitems.go | 68 +- .../backupprotecteditems.go | 67 +- .../backupprotectioncontainers.go | 64 +- .../backupresourcestorageconfigs.go | 23 +- .../backupresourcevaultconfigs.go | 25 +- .../arm/recoveryservicesbackup/backups.go | 23 +- .../backupusagesummaries.go | 19 +- .../arm/recoveryservicesbackup/client.go | 10 +- .../exportjobsoperationresults.go | 24 +- .../itemlevelrecoveryconnections.go | 51 +- .../jobcancellations.go | 23 +- .../arm/recoveryservicesbackup/jobdetails.go | 18 +- .../joboperationresults.go | 19 +- .../arm/recoveryservicesbackup/jobs.go | 16 +- .../arm/recoveryservicesbackup/models.go | 4128 ++++- .../arm/recoveryservicesbackup/operations.go | 74 +- .../protecteditemoperationresults.go | 25 +- .../protecteditemoperationstatuses.go | 34 +- .../recoveryservicesbackup/protecteditems.go | 56 +- .../protectioncontaineroperationresults.go | 26 +- ...tectioncontainerrefreshoperationresults.go | 25 +- .../protectioncontainers.go | 34 +- .../protectionpolicies.go | 45 +- .../protectionpolicyoperationresults.go | 24 +- .../protectionpolicyoperationstatuses.go | 33 +- .../recoveryservicesbackup/recoverypoints.go | 84 +- .../arm/recoveryservicesbackup/restores.go | 28 +- .../recoveryservicesbackup/securitypins.go | 15 +- .../arm/recoveryservicesbackup/version.go | 6 +- .../recoveryservicessiterecovery/client.go | 2 +- .../recoveryservicessiterecovery/models.go | 8799 ++++++++++- .../operations.go | 2 +- .../recoverypoints.go | 2 +- .../replicationalertsettings.go | 4 +- .../replicationevents.go | 17 +- .../replicationfabrics.go | 84 +- .../replicationjobs.go | 2 +- .../replicationlogicalnetworks.go | 2 +- .../replicationnetworkmappings.go | 2 +- .../replicationnetworks.go | 2 +- .../replicationpolicies.go | 2 +- .../replicationprotectableitems.go | 2 +- .../replicationprotecteditems.go | 2 +- .../replicationprotectioncontainermappings.go | 2 +- .../replicationprotectioncontainers.go | 2 +- .../replicationrecoveryplans.go | 2 +- .../replicationrecoveryservicesproviders.go | 2 +- ...eplicationstorageclassificationmappings.go | 2 +- .../replicationstorageclassifications.go | 2 +- .../replicationvaulthealth.go | 103 + .../replicationvcenters.go | 2 +- .../recoveryservicessiterecovery/version.go | 6 +- .../azure-sdk-for-go/arm/redis/client.go | 5 +- .../arm/redis/firewallrule.go | 23 +- .../arm/redis/firewallrules.go | 61 +- .../arm/redis/{redisgroup.go => group.go} | 181 +- .../azure-sdk-for-go/arm/redis/models.go | 24 +- .../azure-sdk-for-go/arm/redis/operations.go | 58 +- .../arm/redis/patchschedules.go | 30 +- .../azure-sdk-for-go/arm/redis/version.go | 6 +- .../azure-sdk-for-go/arm/relay/client.go | 10 +- .../arm/relay/hybridconnections.go | 280 +- .../azure-sdk-for-go/arm/relay/models.go | 200 +- .../azure-sdk-for-go/arm/relay/namespaces.go | 324 +- .../azure-sdk-for-go/arm/relay/operations.go | 60 +- .../azure-sdk-for-go/arm/relay/version.go | 6 +- .../azure-sdk-for-go/arm/relay/wcfrelays.go | 276 +- .../resourcehealth/availabilitystatuses.go | 211 +- .../arm/resourcehealth/client.go | 8 +- .../arm/resourcehealth/models.go | 29 +- .../arm/resourcehealth/operations.go | 10 +- .../arm/resourcehealth/version.go | 6 +- .../arm/resources/features/client.go | 17 +- .../features/{featuresgroup.go => group.go} | 122 +- .../arm/resources/features/models.go | 5 +- .../arm/resources/features/version.go | 6 +- .../arm/resources/links/client.go | 15 +- .../arm/resources/links/models.go | 5 +- .../arm/resources/links/resourcelinks.go | 132 +- .../arm/resources/links/version.go | 6 +- .../arm/resources/locks/client.go | 8 +- .../arm/resources/locks/managementlocks.go | 270 +- .../arm/resources/locks/models.go | 5 +- .../arm/resources/locks/version.go | 6 +- .../appliancedefinitions.go | 76 +- .../managedapplications/appliances.go | 84 +- .../resources/managedapplications/client.go | 8 +- .../resources/managedapplications/models.go | 15 +- .../resources/managedapplications/version.go | 6 +- .../arm/resources/policy/assignments.go | 218 +- .../arm/resources/policy/client.go | 11 +- .../arm/resources/policy/definitions.go | 60 +- .../arm/resources/policy/models.go | 33 +- .../arm/resources/policy/version.go | 6 +- .../arm/resources/resources/client.go | 8 +- .../resources/deploymentoperations.go | 73 +- .../arm/resources/resources/deployments.go | 202 +- .../resources/{resourcesgroup.go => group.go} | 431 +- .../arm/resources/resources/groups.go | 249 +- .../arm/resources/resources/models.go | 40 +- .../arm/resources/resources/providers.go | 83 +- .../arm/resources/resources/tags.go | 77 +- .../arm/resources/resources/version.go | 6 +- .../arm/resources/subscriptions/client.go | 13 +- .../{subscriptionsgroup.go => group.go} | 62 +- .../arm/resources/subscriptions/models.go | 8 +- .../arm/resources/subscriptions/tenants.go | 57 +- .../arm/resources/subscriptions/version.go | 6 +- .../azure-sdk-for-go/arm/scheduler/client.go | 8 +- .../arm/scheduler/jobcollections.go | 158 +- .../azure-sdk-for-go/arm/scheduler/jobs.go | 125 +- .../azure-sdk-for-go/arm/scheduler/models.go | 71 +- .../azure-sdk-for-go/arm/scheduler/version.go | 6 +- .../azure-sdk-for-go/arm/search/adminkeys.go | 42 +- .../azure-sdk-for-go/arm/search/client.go | 8 +- .../azure-sdk-for-go/arm/search/models.go | 41 +- .../azure-sdk-for-go/arm/search/querykeys.go | 58 +- .../azure-sdk-for-go/arm/search/services.go | 146 +- .../azure-sdk-for-go/arm/search/version.go | 6 +- .../arm/servermanagement/client.go | 8 +- .../arm/servermanagement/gateway.go | 192 +- .../arm/servermanagement/models.go | 36 +- .../arm/servermanagement/node.go | 143 +- .../arm/servermanagement/powershell.go | 104 +- .../arm/servermanagement/session.go | 33 +- .../arm/servermanagement/version.go | 6 +- .../arm/service-map/client.go | 8 +- .../arm/service-map/clientgroups.go | 94 +- .../arm/service-map/machinegroups.go | 83 +- .../arm/service-map/machines.go | 363 +- .../azure-sdk-for-go/arm/service-map/maps.go | 10 +- .../arm/service-map/models.go | 1230 +- .../azure-sdk-for-go/arm/service-map/ports.go | 157 +- .../arm/service-map/processes.go | 153 +- .../arm/service-map/summaries.go | 18 +- .../arm/service-map/version.go | 6 +- .../azure-sdk-for-go/arm/servicebus/client.go | 8 +- .../arm/servicebus/eventhubs.go | 184 + .../azure-sdk-for-go/arm/servicebus/models.go | 734 +- .../arm/servicebus/namespaces.go | 502 +- .../arm/servicebus/operations.go | 55 +- .../arm/servicebus/premiummessagingregions.go | 169 + .../azure-sdk-for-go/arm/servicebus/queues.go | 453 +- .../arm/servicebus/regions.go | 179 + .../azure-sdk-for-go/arm/servicebus/rules.go | 448 + .../arm/servicebus/subscriptions.go | 165 +- .../azure-sdk-for-go/arm/servicebus/topics.go | 452 +- .../arm/servicebus/version.go | 6 +- .../arm/servicefabric/client.go | 8 +- .../arm/servicefabric/clusters.go | 142 +- .../arm/servicefabric/clusterversions.go | 409 +- .../arm/servicefabric/models.go | 84 +- .../arm/servicefabric/operations.go | 56 +- .../arm/servicefabric/version.go | 6 +- .../sql/backuplongtermretentionpolicies.go | 211 + .../arm/sql/backuplongtermretentionvaults.go | 209 + .../azure-sdk-for-go/arm/sql/capabilities.go | 15 +- .../Azure/azure-sdk-for-go/arm/sql/client.go | 10 +- .../arm/sql/databaseblobauditingpolicies.go | 183 + .../arm/sql/databaseoperations.go | 247 + .../azure-sdk-for-go/arm/sql/databases.go | 1423 +- .../sql/databasethreatdetectionpolicies.go | 184 + .../arm/sql/databaseusages.go | 109 + .../arm/sql/datamaskingpolicies.go | 182 + .../arm/sql/datamaskingrules.go | 195 + .../arm/sql/elasticpoolactivities.go | 109 + .../arm/sql/elasticpooldatabaseactivities.go | 110 + .../azure-sdk-for-go/arm/sql/elasticpools.go | 364 +- .../arm/sql/encryptionprotectors.go | 331 + .../arm/sql/failovergroups.go | 682 + .../azure-sdk-for-go/arm/sql/firewallrules.go | 43 +- .../arm/sql/geobackuppolicies.go | 257 + .../Azure/azure-sdk-for-go/arm/sql/models.go | 1688 +- .../azure-sdk-for-go/arm/sql/operations.go | 86 +- .../arm/sql/recommendedelasticpools.go | 177 +- .../arm/sql/recoverabledatabases.go | 175 + .../arm/sql/replicationlinks.go | 418 + .../arm/sql/restorabledroppeddatabases.go | 175 + .../azure-sdk-for-go/arm/sql/restorepoints.go | 109 + .../arm/sql/serverazureadadministrators.go | 363 + .../arm/sql/servercommunicationlinks.go | 339 + .../arm/sql/serverconnectionpolicies.go | 179 + .../azure-sdk-for-go/arm/sql/serverkeys.go | 416 + .../Azure/azure-sdk-for-go/arm/sql/servers.go | 565 +- .../azure-sdk-for-go/arm/sql/serverusages.go | 107 + .../arm/sql/serviceobjectives.go | 175 + .../arm/sql/servicetieradvisors.go | 178 + .../azure-sdk-for-go/arm/sql/syncagents.go | 618 + .../azure-sdk-for-go/arm/sql/syncgroups.go | 1144 ++ .../azure-sdk-for-go/arm/sql/syncmembers.go | 741 + .../transparentdataencryptionactivities.go | 113 + .../arm/sql/transparentdataencryptions.go | 184 + .../Azure/azure-sdk-for-go/arm/sql/version.go | 6 +- .../arm/sql/virtualnetworkrules.go | 426 + .../azure-sdk-for-go/arm/storage/accounts.go | 169 +- .../azure-sdk-for-go/arm/storage/client.go | 8 +- .../azure-sdk-for-go/arm/storage/models.go | 376 +- .../arm/storage/operations.go | 96 + .../azure-sdk-for-go/arm/storage/skus.go | 100 + .../azure-sdk-for-go/arm/storage/usage.go | 10 +- .../azure-sdk-for-go/arm/storage/version.go | 6 +- .../arm/storageimportexport/client.go | 23 +- .../arm/storageimportexport/jobs.go | 187 +- .../arm/storageimportexport/models.go | 42 +- .../arm/storageimportexport/version.go | 6 +- .../accesscontrolrecords.go | 40 +- .../arm/storsimple8000series/alerts.go | 19 +- .../storsimple8000series/backuppolicies.go | 53 +- .../arm/storsimple8000series/backups.go | 43 +- .../storsimple8000series/backupschedules.go | 47 +- .../storsimple8000series/bandwidthsettings.go | 39 +- .../arm/storsimple8000series/client.go | 8 +- .../storsimple8000series/cloudappliances.go | 25 +- .../arm/storsimple8000series/devices.go | 124 +- .../storsimple8000series/devicesettings.go | 83 +- .../hardwarecomponentgroups.go | 29 +- .../arm/storsimple8000series/jobs.go | 36 +- .../arm/storsimple8000series/managers.go | 48 +- .../arm/storsimple8000series/models.go | 447 +- .../arm/storsimple8000series/operations.go | 14 +- .../storageaccountcredentials.go | 42 +- .../arm/storsimple8000series/version.go | 6 +- .../storsimple8000series/volumecontainers.go | 57 +- .../arm/storsimple8000series/volumes.go | 52 +- .../arm/streamanalytics/client.go | 10 +- .../arm/streamanalytics/functions.go | 122 +- .../arm/streamanalytics/inputs.go | 101 +- .../arm/streamanalytics/models.go | 1974 ++- .../arm/streamanalytics/operations.go | 10 +- .../arm/streamanalytics/outputs.go | 101 +- .../arm/streamanalytics/streamingjobs.go | 131 +- .../arm/streamanalytics/subscriptions.go | 21 +- .../arm/streamanalytics/transformations.go | 68 +- .../arm/streamanalytics/version.go | 6 +- .../arm/trafficmanager/client.go | 8 +- .../arm/trafficmanager/endpoints.go | 63 +- .../trafficmanager/geographichierarchies.go | 96 + .../arm/trafficmanager/heatmap.go | 129 + .../arm/trafficmanager/models.go | 242 +- .../arm/trafficmanager/profiles.go | 219 +- .../arm/trafficmanager/version.go | 6 +- .../arm/visualstudio/accounts.go | 370 + .../arm/visualstudio/client.go | 54 + .../arm/visualstudio/extensions.go | 381 + .../arm/visualstudio/models.go | 143 + .../arm/visualstudio/operations.go | 93 + .../arm/visualstudio/projects.go | 413 + .../arm/visualstudio/version.go | 28 + .../Azure/azure-sdk-for-go/arm/web/apps.go | 12663 ++++++++++++++-- .../arm/web/appservicecertificateorders.go | 245 +- .../arm/web/appserviceenvironments.go | 1344 +- .../arm/web/appserviceplans.go | 514 +- .../azure-sdk-for-go/arm/web/certificates.go | 119 +- .../Azure/azure-sdk-for-go/arm/web/client.go | 230 +- .../arm/web/deletedwebapps.go | 154 +- .../Azure/azure-sdk-for-go/arm/web/domains.go | 247 +- .../Azure/azure-sdk-for-go/arm/web/models.go | 2005 ++- .../azure-sdk-for-go/arm/web/provider.go | 139 +- .../arm/web/recommendations.go | 63 +- .../arm/web/topleveldomains.go | 109 +- .../Azure/azure-sdk-for-go/arm/web/version.go | 6 +- .../datalake-store/filesystem/client.go | 8 +- .../{filesystemgroup.go => group.go} | 578 +- .../datalake-store/filesystem/models.go | 879 +- .../datalake-store/filesystem/version.go | 6 +- .../cognitiveservices/face/client.go | 48 + .../dataplane/cognitiveservices/face/group.go | 483 + .../cognitiveservices/face/listgroup.go | 608 + .../cognitiveservices/face/models.go | 360 + .../cognitiveservices/face/person.go | 711 + .../cognitiveservices/face/persongroup.go | 500 + .../cognitiveservices/face/version.go | 28 + .../cognitiveservices/textanalytics/client.go | 249 + .../cognitiveservices/textanalytics/models.go | 128 + .../textanalytics/version.go | 28 + .../dataplane/keyvault/client.go | 2960 +++- .../dataplane/keyvault/models.go | 394 +- .../dataplane/keyvault/version.go | 6 +- .../Azure/azure-sdk-for-go/glide.lock | 21 +- .../Azure/azure-sdk-for-go/glide.yaml | 2 +- .../management/affinitygroup/client.go | 14 + .../management/affinitygroup/entities.go | 14 + .../azure-sdk-for-go/management/client.go | 14 + .../azure-sdk-for-go/management/errors.go | 14 + .../management/errors_test.go | 14 + .../management/hostedservice/client.go | 14 + .../management/hostedservice/entities.go | 14 + .../Azure/azure-sdk-for-go/management/http.go | 14 + .../management/location/client.go | 14 + .../management/location/entities.go | 14 + .../management/networksecuritygroup/client.go | 14 + .../networksecuritygroup/entities.go | 14 + .../azure-sdk-for-go/management/operations.go | 14 + .../management/osimage/client.go | 14 + .../management/osimage/entities.go | 14 + .../management/publishSettings.go | 14 + .../azure-sdk-for-go/management/sql/client.go | 14 + .../management/sql/entities.go | 14 + .../management/storageservice/client.go | 14 + .../management/storageservice/entities.go | 14 + .../storageservice/entities_test.go | 14 + .../management/testutils/managementclient.go | 14 + .../Azure/azure-sdk-for-go/management/util.go | 14 + .../azure-sdk-for-go/management/version.go | 16 +- .../management/virtualmachine/client.go | 14 + .../management/virtualmachine/entities.go | 14 + .../virtualmachine/entities_test.go | 14 + .../virtualmachine/resourceextensions.go | 14 + .../virtualmachine/resourceextensions_test.go | 14 + .../management/virtualmachinedisk/client.go | 14 + .../management/virtualmachinedisk/entities.go | 14 + .../management/virtualmachineimage/client.go | 14 + .../virtualmachineimage/entities.go | 14 + .../virtualmachineimage/entities_test.go | 14 + .../management/virtualnetwork/client.go | 14 + .../management/virtualnetwork/entities.go | 14 + .../management/vmutils/configurationset.go | 14 + .../management/vmutils/datadisks.go | 14 + .../management/vmutils/deployment.go | 14 + .../management/vmutils/extensions.go | 14 + .../management/vmutils/extensions_test.go | 14 + .../management/vmutils/integration_test.go | 14 + .../management/vmutils/network.go | 14 + .../management/vmutils/rolesize.go | 14 + .../management/vmutils/rolestate.go | 14 + .../management/vmutils/vmutils.go | 14 + .../management/vmutils/vmutils_test.go | 14 + .../Azure/azure-sdk-for-go/storage/README.md | 73 + .../azure-sdk-for-go/storage/appendblob.go | 27 +- .../storage/appendblob_test.go | 19 +- .../azure-sdk-for-go/storage/authorization.go | 24 +- .../storage/authorization_test.go | 14 + .../Azure/azure-sdk-for-go/storage/blob.go | 31 +- .../azure-sdk-for-go/storage/blob_test.go | 34 + .../azure-sdk-for-go/storage/blobsasuri.go | 150 +- .../storage/blobsasuri_test.go | 85 +- .../storage/blobserviceclient.go | 31 + .../azure-sdk-for-go/storage/blockblob.go | 20 +- .../storage/blockblob_test.go | 14 + .../Azure/azure-sdk-for-go/storage/client.go | 243 +- .../azure-sdk-for-go/storage/client_test.go | 117 +- .../azure-sdk-for-go/storage/commonsasuri.go | 38 + .../azure-sdk-for-go/storage/container.go | 100 +- .../storage/container_test.go | 109 +- .../azure-sdk-for-go/storage/copyblob.go | 14 + .../azure-sdk-for-go/storage/copyblob_test.go | 14 + .../azure-sdk-for-go/storage/directory.go | 14 + .../storage/directory_test.go | 14 + .../Azure/azure-sdk-for-go/storage/entity.go | 14 + .../azure-sdk-for-go/storage/entity_test.go | 14 + .../Azure/azure-sdk-for-go/storage/file.go | 14 + .../azure-sdk-for-go/storage/file_test.go | 14 + .../storage/fileserviceclient.go | 14 + .../azure-sdk-for-go/storage/leaseblob.go | 14 + .../storage/leaseblob_test.go | 14 + .../Azure/azure-sdk-for-go/storage/message.go | 14 + .../azure-sdk-for-go/storage/message_test.go | 14 + .../Azure/azure-sdk-for-go/storage/odata.go | 14 + .../azure-sdk-for-go/storage/pageblob.go | 17 +- .../azure-sdk-for-go/storage/pageblob_test.go | 14 + .../Azure/azure-sdk-for-go/storage/queue.go | 14 + .../azure-sdk-for-go/storage/queue_test.go | 14 + .../azure-sdk-for-go/storage/queuesasuri.go | 146 + .../storage/queuesasuri_test.go | 121 + .../storage/queueserviceclient.go | 14 + .../TestPutAppendBlobAppendBlocks.yaml | 113 +- .../ContainerSuite/TestContainerExists.yaml | 160 +- .../TestListBlobsPagination.yaml | 312 +- .../TestSetPageBlobProperties.yaml | 136 + .../StorageClientSuite/Test_doRetry.yaml | 168 +- .../Azure/azure-sdk-for-go/storage/share.go | 14 + .../azure-sdk-for-go/storage/share_test.go | 14 + .../azure-sdk-for-go/storage/storagepolicy.go | 14 + .../storage/storageservice.go | 14 + .../storage/storageservice_test.go | 14 + .../Azure/azure-sdk-for-go/storage/table.go | 25 +- .../azure-sdk-for-go/storage/table_batch.go | 14 + .../storage/table_batch_test.go | 14 + .../azure-sdk-for-go/storage/table_test.go | 14 + .../storage/tableserviceclient.go | 14 + .../Azure/azure-sdk-for-go/storage/util.go | 38 +- .../azure-sdk-for-go/storage/util_1.7.go | 14 + .../azure-sdk-for-go/storage/util_1.8.go | 14 + .../azure-sdk-for-go/storage/util_test.go | 29 +- .../Azure/azure-sdk-for-go/storage/version.go | 14 + vendor/github.com/kurin/blazer/.travis.yml | 3 +- vendor/github.com/kurin/blazer/b2/b2.go | 24 +- vendor/github.com/kurin/blazer/b2/b2_test.go | 131 +- vendor/github.com/kurin/blazer/b2/backend.go | 15 +- vendor/github.com/kurin/blazer/b2/baseline.go | 6 +- vendor/github.com/kurin/blazer/b2/buffer.go | 83 +- .../kurin/blazer/b2/integration_test.go | 158 +- vendor/github.com/kurin/blazer/b2/reader.go | 13 +- vendor/github.com/kurin/blazer/b2/readerat.go | 48 + vendor/github.com/kurin/blazer/b2/writer.go | 113 +- vendor/github.com/kurin/blazer/base/base.go | 95 +- .../kurin/blazer/base/integration_test.go | 2 +- .../blazer/internal/bin/cleanup/cleanup.go | 63 + .../kurin/blazer/x/consistent/consistent.go | 363 + .../blazer/x/consistent/consistent_test.go | 186 + .../spf13/cobra/cobra/cmd/helpers.go | 23 +- .../x/crypto/acme/autocert/autocert.go | 6 +- .../x/crypto/acme/autocert/example_test.go | 1 + .../x/crypto/blake2b/blake2b_test.go | 2 +- .../x/crypto/scrypt/example_test.go | 26 + vendor/golang.org/x/crypto/scrypt/scrypt.go | 7 +- .../golang.org/x/crypto/scrypt/scrypt_test.go | 4 +- vendor/golang.org/x/crypto/ssh/buffer.go | 5 +- vendor/golang.org/x/net/README.md | 15 +- vendor/golang.org/x/net/html/atom/gen.go | 135 +- vendor/golang.org/x/net/html/atom/table.go | 1468 +- .../golang.org/x/net/html/atom/table_test.go | 42 +- vendor/golang.org/x/net/proxy/socks5.go | 3 +- vendor/golang.org/x/oauth2/internal/doc.go | 6 + vendor/golang.org/x/oauth2/internal/oauth2.go | 1 - .../x/oauth2/internal/oauth2_test.go | 1 - vendor/golang.org/x/oauth2/internal/token.go | 1 - .../x/oauth2/internal/token_test.go | 1 - .../golang.org/x/oauth2/internal/transport.go | 1 - vendor/golang.org/x/sys/README | 3 - vendor/golang.org/x/sys/README.md | 18 + .../golang.org/x/sys/unix/mmap_unix_test.go | 2 +- .../x/sys/unix/syscall_linux_ppc64x.go | 2 +- .../x/sys/unix/syscall_linux_test.go | 7 + .../x/sys/unix/zsyscall_linux_ppc64.go | 2 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 2 +- .../v1/acceleratedmobilepageurl-api.json | 160 +- .../v2beta1/adexchangebuyer2-api.json | 5452 +++---- .../v2beta1/adexchangebuyer2-gen.go | 17 +- .../v1/adexperiencereport-api.json | 350 +- .../api/admin/directory/v1/admin-api.json | 51 +- .../api/admin/directory/v1/admin-gen.go | 46 +- .../api/analytics/v3/analytics-api.json | 2 +- .../v4/analyticsreporting-api.json | 866 +- .../v1/androiddeviceprovisioning-api.json | 876 +- .../v1/androidmanagement-api.json | 10 +- .../v1/androidmanagement-gen.go | 5 +- vendor/google.golang.org/api/api-list.json | 32 +- .../api/appengine/v1/appengine-api.json | 3228 ++-- .../api/appengine/v1/appengine-gen.go | 1097 ++ .../api/appengine/v1alpha/appengine-api.json | 1392 +- .../api/appengine/v1beta/appengine-api.json | 5566 +++---- .../api/appengine/v1beta4/appengine-api.json | 2352 +-- .../api/appengine/v1beta5/appengine-api.json | 3290 ++-- .../v1/bigquerydatatransfer-api.json | 2809 ++-- .../api/classroom/v1/classroom-api.json | 4478 +++--- .../api/classroom/v1/classroom-gen.go | 2055 ++- .../api/cloudbuild/v1/cloudbuild-api.json | 1432 +- .../clouddebugger/v2/clouddebugger-api.json | 1442 +- .../v1beta1/clouderrorreporting-api.json | 548 +- .../cloudfunctions/v1/cloudfunctions-api.json | 654 +- .../v1beta2/cloudfunctions-api.json | 1226 +- .../v1beta2/cloudfunctions-gen.go | 10 +- .../api/cloudiot/v1/cloudiot-api.json | 1304 ++ .../api/cloudiot/v1/cloudiot-gen.go | 4121 +++++ .../api/cloudiot/v1beta1/cloudiot-api.json | 1251 ++ .../api/cloudiot/v1beta1/cloudiot-gen.go | 4174 +++++ .../api/cloudkms/v1/cloudkms-api.json | 1938 +-- .../v2beta2/cloudmonitoring-api.json | 2 +- .../v1/cloudresourcemanager-api.json | 2432 +-- .../v1beta1/cloudresourcemanager-api.json | 780 +- .../v2beta1/cloudresourcemanager-api.json | 1374 +- .../cloudtasks/v2beta2/cloudtasks-api.json | 1366 +- .../api/cloudtasks/v2beta2/cloudtasks-gen.go | 13 +- .../api/cloudtrace/v1/cloudtrace-api.json | 527 +- .../api/cloudtrace/v2/cloudtrace-api.json | 631 +- .../api/cloudtrace/v2/cloudtrace-gen.go | 6 +- .../api/compute/v0.alpha/compute-api.json | 161 +- .../api/compute/v0.alpha/compute-gen.go | 542 +- .../api/compute/v0.beta/compute-api.json | 195 +- .../api/compute/v0.beta/compute-gen.go | 646 +- .../api/compute/v1/compute-api.json | 26 +- .../api/compute/v1/compute-gen.go | 32 +- .../api/container/v1/container-api.json | 3051 ++-- .../api/container/v1/container-gen.go | 50 +- .../api/container/v1beta1/container-api.json | 3223 ++-- .../api/container/v1beta1/container-gen.go | 49 +- .../api/content/v2/content-api.json | 180 +- .../api/content/v2/content-gen.go | 280 +- .../api/content/v2sandbox/content-api.json | 65 +- .../api/content/v2sandbox/content-gen.go | 111 +- .../api/dataflow/v1b3/dataflow-api.json | 4834 +++--- .../api/dataflow/v1b3/dataflow-gen.go | 67 +- .../api/dataproc/v1/dataproc-api.json | 2434 +-- .../api/dataproc/v1beta2/dataproc-api.json | 3331 ++-- .../api/dataproc/v1beta2/dataproc-gen.go | 2948 ++++ .../api/datastore/v1/datastore-api.json | 1586 +- .../api/datastore/v1beta1/datastore-api.json | 490 +- .../api/datastore/v1beta3/datastore-api.json | 1314 +- .../v0.alpha/deploymentmanager-api.json | 22 +- .../v0.alpha/deploymentmanager-gen.go | 38 +- .../v2/deploymentmanager-api.json | 6 +- .../v2/deploymentmanager-gen.go | 3 +- .../v2beta/deploymentmanager-api.json | 6 +- .../v2beta/deploymentmanager-gen.go | 3 +- .../api/dlp/v2beta1/dlp-api.json | 3884 ++--- .../api/dlp/v2beta1/dlp-gen.go | 91 +- .../v1/firebasedynamiclinks-api.json | 702 +- .../v1/firebaseremoteconfig-api.json | 202 +- .../firebaserules/v1/firebaserules-api.json | 934 +- .../api/firebaserules/v1/firebaserules-gen.go | 227 + .../api/fitness/v1/fitness-api.json | 14 +- .../api/fitness/v1/fitness-gen.go | 18 +- .../api/genomics/v1/genomics-api.json | 3936 ++--- .../api/genomics/v1alpha2/genomics-api.json | 1360 +- .../api/gmail/v1/gmail-api.json | 4 +- .../api/gmail/v1/gmail-gen.go | 2 +- .../google.golang.org/api/iam/v1/iam-api.json | 1780 +-- .../google.golang.org/api/iam/v1/iam-gen.go | 47 +- .../api/kgsearch/v1/kgsearch-api.json | 208 +- .../api/language/v1/language-api.json | 1194 +- .../api/language/v1beta1/language-api.json | 1054 +- .../api/language/v1beta2/language-api.json | 1758 +-- .../api/logging/v2/logging-api.json | 3457 ++--- .../api/logging/v2/logging-gen.go | 5 +- .../api/logging/v2beta1/logging-api.json | 3221 ++-- .../api/logging/v2beta1/logging-gen.go | 5 +- .../manufacturers/v1/manufacturers-api.json | 504 +- .../google.golang.org/api/ml/v1/ml-api.json | 1686 +- vendor/google.golang.org/api/ml/v1/ml-gen.go | 7 +- .../api/monitoring/v3/monitoring-api.json | 2014 +-- .../api/oslogin/v1alpha/oslogin-api.json | 273 +- .../api/oslogin/v1alpha/oslogin-gen.go | 22 +- .../api/oslogin/v1beta/oslogin-api.json | 381 +- .../api/oslogin/v1beta/oslogin-gen.go | 22 +- .../api/partners/v2/partners-api.json | 2990 ++-- .../api/people/v1/people-api.json | 2842 ++-- .../v1/playmoviespartner-api.json | 976 +- .../v1beta1/proximitybeacon-api.json | 1302 +- .../api/pubsub/v1/pubsub-api.json | 1608 +- .../api/pubsub/v1/pubsub-gen.go | 6 +- .../api/pubsub/v1beta1a/pubsub-api.json | 778 +- .../api/pubsub/v1beta2/pubsub-api.json | 1266 +- .../v1beta1/resourceviews-api.json | 2 +- .../runtimeconfig/v1/runtimeconfig-api.json | 474 +- .../v1beta1/runtimeconfig-api.json | 2094 +-- .../api/safebrowsing/v4/safebrowsing-api.json | 1120 +- .../api/script/v1/script-api.json | 299 +- .../searchconsole/v1/searchconsole-api.json | 352 +- .../servicecontrol/v1/servicecontrol-api.json | 2195 +-- .../servicecontrol/v1/servicecontrol-gen.go | 209 +- .../v1/servicemanagement-api.json | 3762 ++--- .../v1/servicemanagement-gen.go | 112 + .../api/serviceuser/v1/serviceuser-api.json | 1770 +-- .../api/serviceuser/v1/serviceuser-gen.go | 216 +- .../api/sheets/v4/sheets-api.json | 5134 +++---- .../api/slides/v1/slides-api.json | 5042 +++--- .../api/sourcerepo/v1/sourcerepo-api.json | 486 +- .../api/spanner/v1/spanner-api.json | 3066 ++-- .../api/speech/v1/speech-api.json | 958 +- .../api/speech/v1beta1/speech-api.json | 378 +- .../v1/storagetransfer-api.json | 1048 +- .../v1/streetviewpublish-api.json | 720 +- .../v1/streetviewpublish-gen.go | 24 +- .../api/taskqueue/v1beta2/taskqueue-api.json | 2 +- .../api/testing/v1/testing-api.json | 1948 +-- .../toolresults/v1beta3/toolresults-api.json | 8 +- .../toolresults/v1beta3/toolresults-gen.go | 7 +- .../api/translate/v2/translate-api.json | 688 +- .../api/vault/v1/vault-api.json | 1830 +-- .../v1beta1/videointelligence-api.json | 1126 +- .../api/vision/v1/vision-api.json | 1462 +- .../api/youtube/v3/youtube-api.json | 18 +- .../api/youtube/v3/youtube-gen.go | 11 + .../v1/youtubereporting-api.json | 572 +- 1044 files changed, 203022 insertions(+), 97709 deletions(-) delete mode 100644 vendor/cloud.google.com/go/bigquery/create_table_test.go create mode 100644 vendor/cloud.google.com/go/bigquery/job_test.go rename vendor/cloud.google.com/go/storage/{go110.go.pending => go110.go} (100%) delete mode 100644 vendor/cloud.google.com/go/vision/annotations.go delete mode 100644 vendor/cloud.google.com/go/vision/doc.go delete mode 100644 vendor/cloud.google.com/go/vision/examples_test.go delete mode 100644 vendor/cloud.google.com/go/vision/face.go delete mode 100644 vendor/cloud.google.com/go/vision/geometry.go delete mode 100644 vendor/cloud.google.com/go/vision/image.go delete mode 100644 vendor/cloud.google.com/go/vision/image_test.go delete mode 100644 vendor/cloud.google.com/go/vision/latlng.go delete mode 100644 vendor/cloud.google.com/go/vision/testdata/README.md delete mode 100644 vendor/cloud.google.com/go/vision/testdata/cat.jpg delete mode 100644 vendor/cloud.google.com/go/vision/testdata/eiffel-tower.jpg delete mode 100644 vendor/cloud.google.com/go/vision/testdata/face.jpg delete mode 100644 vendor/cloud.google.com/go/vision/testdata/faulkner.jpg delete mode 100644 vendor/cloud.google.com/go/vision/testdata/google.png delete mode 100644 vendor/cloud.google.com/go/vision/testdata/mountain.jpg delete mode 100644 vendor/cloud.google.com/go/vision/testdata/no-text.jpg delete mode 100644 vendor/cloud.google.com/go/vision/vision.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/batch/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/resourceusage.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/checkskuavailability.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/compute/containerservices.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/compute/disks.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/compute/resourceskus.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/compute/snapshots.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineruncommands.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetextensions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetrollingupgrades.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/replications.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/webhooks.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/predictions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/computepolicies.go rename vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/{accountgroup.go => group.go} (79%) mode change 100755 => 100644 rename vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/{accountgroup.go => group.go} (82%) mode change 100755 => 100644 create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/deployment/deployment.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/domains.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/operations.go rename vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/{commitmentplansgroup.go => group.go} (86%) mode change 100755 => 100644 rename vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/{webservicesgroup.go => group.go} (85%) mode change 100755 => 100644 create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/marketplaceagreements.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/version.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/actiongroups.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettings.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettingscategory.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/operations.go delete mode 100755 vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/servicediagnosticsettings.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationsecuritygroups.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/availableendpointservices.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/defaultsecurityrules.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/inboundnatrules.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceipconfigurations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceloadbalancers.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerbackendaddresspools.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerfrontendipconfigurations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerloadbalancingrules.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancernetworkinterfaces.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerprobes.go rename vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/{notificationhubsgroup.go => group.go} (90%) mode change 100755 => 100644 create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/hubs.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/name.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/savedsearches.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/storageinsights.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/solutions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/version.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupstorageconfigs.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupvaultconfigs.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/registeredidentities.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/replicationusages.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/usages.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultcertificates.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvaulthealth.go mode change 100755 => 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrule.go mode change 100755 => 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrules.go rename vendor/github.com/Azure/azure-sdk-for-go/arm/redis/{redisgroup.go => group.go} (90%) mode change 100755 => 100644 mode change 100755 => 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/redis/operations.go rename vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/{featuresgroup.go => group.go} (82%) mode change 100755 => 100644 rename vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/{resourcesgroup.go => group.go} (70%) mode change 100755 => 100644 rename vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/{subscriptionsgroup.go => group.go} (86%) mode change 100755 => 100644 create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/eventhubs.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/premiummessagingregions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/regions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/rules.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionpolicies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionvaults.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseblobauditingpolicies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseoperations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databasethreatdetectionpolicies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseusages.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingpolicies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingrules.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpoolactivities.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpooldatabaseactivities.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/encryptionprotectors.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/failovergroups.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/geobackuppolicies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recoverabledatabases.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/replicationlinks.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorabledroppeddatabases.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorepoints.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverazureadadministrators.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servercommunicationlinks.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverconnectionpolicies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverkeys.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverusages.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serviceobjectives.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servicetieradvisors.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncagents.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncgroups.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncmembers.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptionactivities.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/sql/virtualnetworkrules.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/storage/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/storage/skus.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/geographichierarchies.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/heatmap.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/accounts.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/extensions.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/operations.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/projects.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/version.go rename vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/{filesystemgroup.go => group.go} (69%) mode change 100755 => 100644 create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/group.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/listgroup.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/person.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/persongroup.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/version.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/client.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/models.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/version.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/storage/README.md create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/storage/commonsasuri.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri_test.go create mode 100644 vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageBlobSuite/TestSetPageBlobProperties.yaml create mode 100644 vendor/github.com/kurin/blazer/b2/readerat.go create mode 100644 vendor/github.com/kurin/blazer/internal/bin/cleanup/cleanup.go create mode 100644 vendor/github.com/kurin/blazer/x/consistent/consistent.go create mode 100644 vendor/github.com/kurin/blazer/x/consistent/consistent_test.go create mode 100644 vendor/golang.org/x/crypto/scrypt/example_test.go create mode 100644 vendor/golang.org/x/oauth2/internal/doc.go delete mode 100644 vendor/golang.org/x/sys/README create mode 100644 vendor/golang.org/x/sys/README.md create mode 100644 vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json create mode 100644 vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go create mode 100644 vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-api.json create mode 100644 vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-gen.go diff --git a/Gopkg.lock b/Gopkg.lock index 809c02a49..e56b59d66 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -10,14 +10,14 @@ [[projects]] name = "cloud.google.com/go" packages = ["compute/metadata"] - revision = "5a9e19d4e1e41a734154e44a2132b358afb49a03" - version = "v0.13.0" + revision = "f6de2c509ed9d2af648c3c147207eaaf97149aed" + version = "v0.14.0" [[projects]] name = "github.com/Azure/azure-sdk-for-go" packages = ["storage"] - revision = "df4dd90d076ebbf6e87d08d3f00bfac8ff4bde1a" - version = "v10.3.1-beta" + revision = "2592daf71ab6b95dcfc7f7437ecc1afb9ddb7360" + version = "v11.0.0-beta" [[projects]] name = "github.com/Azure/go-autorest" @@ -76,8 +76,8 @@ [[projects]] name = "github.com/kurin/blazer" packages = ["b2","base","internal/b2types","internal/blog"] - revision = "1a870c3ee8b83e17d762307c6eae8f390ac3f4a0" - version = "v0.1.1" + revision = "cad56a04490fe20c43548d70a5a9af2be53ff14e" + version = "v0.2.0" [[projects]] branch = "master" @@ -149,7 +149,7 @@ branch = "master" name = "github.com/spf13/cobra" packages = [".","doc"] - revision = "b78744579491c1ceeaaa3b40205e56b0591b93a3" + revision = "e5f66de850af3302fbe378c8acded2b0fa55472c" [[projects]] name = "github.com/spf13/pflag" @@ -161,31 +161,31 @@ branch = "master" name = "golang.org/x/crypto" packages = ["curve25519","ed25519","ed25519/internal/edwards25519","pbkdf2","poly1305","scrypt","ssh","ssh/terminal"] - revision = "7d9177d70076375b9a59c8fde23d52d9c4a7ecd5" + revision = "9419663f5a44be8b34ca85f08abc5fe1be11f8a3" [[projects]] branch = "master" name = "golang.org/x/net" packages = ["context","context/ctxhttp"] - revision = "b60f3a92103dfd93dfcb900ec77c6d0643510868" + revision = "0a9397675ba34b2845f758fe3cd68828369c6517" [[projects]] branch = "master" name = "golang.org/x/oauth2" packages = [".","google","internal","jws","jwt"] - revision = "13449ad91cb26cb47661c1b080790392170385fd" + revision = "bb50c06baba3d0c76f9d125c0719093e315b5b44" [[projects]] branch = "master" name = "golang.org/x/sys" packages = ["unix","windows"] - revision = "b6e1ae21643682ce023deb8d152024597b0e9bb4" + revision = "314a259e304ff91bd6985da2a7149bbf91237993" [[projects]] branch = "master" name = "google.golang.org/api" packages = ["gensupport","googleapi","googleapi/internal/uritemplates","storage/v1"] - revision = "586095a6e4078caf0dc0b64f8545fa8679442013" + revision = "906273f42cdebd65de3a53f30dd9e23de1b55ba9" [[projects]] name = "google.golang.org/appengine" @@ -202,6 +202,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "53e4779dc4c7de2cd8b195f13c215c24da5efc5e33acf584615b5c43bfefd2db" + inputs-digest = "2dcd9dd39ea4ddc31d36a6ed04dec261ab34484e350fba08a44f8cc5366d4d3f" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 4c1f37c82..ab0f5c1bd 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -29,10 +29,6 @@ name = "github.com/elithrar/simple-scrypt" branch = "master" -[[constraint]] - name = "github.com/kurin/blazer" - version = "0.1.0" - [[constraint]] name = "github.com/minio/minio-go" version = "3.0.0" diff --git a/vendor/cloud.google.com/go/README.md b/vendor/cloud.google.com/go/README.md index 4857b1d74..4927e83f8 100644 --- a/vendor/cloud.google.com/go/README.md +++ b/vendor/cloud.google.com/go/README.md @@ -33,6 +33,32 @@ make backwards-incompatible changes. ## News +_September 28, 2017_ + +*v0.14.0* + +- bigquery BREAKING CHANGES: + - Standard SQL is the default for queries and views. + - `Table.Create` takes `TableMetadata` as a second argument, instead of + options. + - `Dataset.Create` takes `DatasetMetadata` as a second argument. + - `DatasetMetadata` field `ID` renamed to `FullID` + - `TableMetadata` field `ID` renamed to `FullID` + +- Other bigquery changes: + - The client will append a random suffix to a provided job ID if you set + `AddJobIDSuffix` to true in a job config. + - Listing jobs is supported. + - Better retry logic. + +- vision, language, speech: clients are now stable + +- monitoring: client is now beta + +- profiler: + - Rename InstanceName to Instance, ZoneName to Zone + - Auto-detect service name and version on AppEngine. + _September 8, 2017_ *v0.13.0* @@ -124,11 +150,11 @@ Google API | Status | Package [Bigtable][cloud-bigtable] | beta | [`cloud.google.com/go/bigtable`][cloud-bigtable-ref] [BigQuery][cloud-bigquery] | beta | [`cloud.google.com/go/bigquery`][cloud-bigquery-ref] [Logging][cloud-logging] | stable | [`cloud.google.com/go/logging`][cloud-logging-ref] -[Monitoring][cloud-monitoring] | alpha | [`cloud.google.com/go/monitoring/apiv3`][cloud-monitoring-ref] +[Monitoring][cloud-monitoring] | beta | [`cloud.google.com/go/monitoring/apiv3`][cloud-monitoring-ref] [Pub/Sub][cloud-pubsub] | beta | [`cloud.google.com/go/pubsub`][cloud-pubsub-ref] -[Vision][cloud-vision] | beta | [`cloud.google.com/go/vision/apiv1`][cloud-vision-ref] -[Language][cloud-language] | beta | [`cloud.google.com/go/language/apiv1`][cloud-language-ref] -[Speech][cloud-speech] | beta | [`cloud.google.com/go/speech/apiv1`][cloud-speech-ref] +[Vision][cloud-vision] | stable | [`cloud.google.com/go/vision/apiv1`][cloud-vision-ref] +[Language][cloud-language] | stable | [`cloud.google.com/go/language/apiv1`][cloud-language-ref] +[Speech][cloud-speech] | stable | [`cloud.google.com/go/speech/apiv1`][cloud-speech-ref] [Spanner][cloud-spanner] | beta | [`cloud.google.com/go/spanner`][cloud-spanner-ref] [Translation][cloud-translation] | stable | [`cloud.google.com/go/translate`][cloud-translation-ref] [Trace][cloud-trace] | alpha | [`cloud.google.com/go/trace`][cloud-trace-ref] diff --git a/vendor/cloud.google.com/go/bigquery/copy.go b/vendor/cloud.google.com/go/bigquery/copy.go index 726999f69..b0de61b7f 100644 --- a/vendor/cloud.google.com/go/bigquery/copy.go +++ b/vendor/cloud.google.com/go/bigquery/copy.go @@ -21,9 +21,12 @@ import ( // CopyConfig holds the configuration for a copy job. type CopyConfig struct { - // JobID is the ID to use for the copy job. If unset, a job ID will be automatically created. + // JobID is the ID to use for the job. If empty, a random job ID will be generated. JobID string + // If AddJobIDSuffix is true, then a random string will be appended to JobID. + AddJobIDSuffix bool + // Srcs are the tables from which data will be copied. Srcs []*Table @@ -68,7 +71,9 @@ func (c *Copier) Run(ctx context.Context) (*Job, error) { for _, t := range c.Srcs { conf.SourceTables = append(conf.SourceTables, t.tableRefProto()) } - job := &bq.Job{Configuration: &bq.JobConfiguration{Copy: conf}} - setJobRef(job, c.JobID, c.c.projectID) + job := &bq.Job{ + JobReference: createJobRef(c.JobID, c.AddJobIDSuffix, c.c.projectID), + Configuration: &bq.JobConfiguration{Copy: conf}, + } return c.c.insertJob(ctx, &insertJobConf{job: job}) } diff --git a/vendor/cloud.google.com/go/bigquery/copy_test.go b/vendor/cloud.google.com/go/bigquery/copy_test.go index 9da3dd435..3ba4192c0 100644 --- a/vendor/cloud.google.com/go/bigquery/copy_test.go +++ b/vendor/cloud.google.com/go/bigquery/copy_test.go @@ -17,16 +17,13 @@ package bigquery import ( "testing" - "cloud.google.com/go/internal/testutil" - - "github.com/google/go-cmp/cmp/cmpopts" "golang.org/x/net/context" bq "google.golang.org/api/bigquery/v2" ) func defaultCopyJob() *bq.Job { return &bq.Job{ - JobReference: &bq.JobReference{ProjectId: "client-project-id"}, + JobReference: &bq.JobReference{JobId: "RANDOM", ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Copy: &bq.JobConfigurationTableCopy{ DestinationTable: &bq.TableReference{ @@ -47,6 +44,7 @@ func defaultCopyJob() *bq.Job { } func TestCopy(t *testing.T) { + defer fixRandomJobID("RANDOM")() testCases := []struct { dst *Table srcs []*Table @@ -132,18 +130,3 @@ func TestCopy(t *testing.T) { checkJob(t, i, s.Job, tc.want) } } - -func checkJob(t *testing.T, i int, got, want *bq.Job) { - if got.JobReference == nil { - t.Errorf("#%d: empty job reference", i) - return - } - if got.JobReference.JobId == "" { - t.Errorf("#%d: empty job ID", i) - return - } - d := testutil.Diff(got, want, cmpopts.IgnoreFields(bq.JobReference{}, "JobId")) - if d != "" { - t.Errorf("#%d: (got=-, want=+) %s", i, d) - } -} diff --git a/vendor/cloud.google.com/go/bigquery/create_table_test.go b/vendor/cloud.google.com/go/bigquery/create_table_test.go deleted file mode 100644 index 8f586abf8..000000000 --- a/vendor/cloud.google.com/go/bigquery/create_table_test.go +++ /dev/null @@ -1,122 +0,0 @@ -// 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 bigquery - -import ( - "testing" - "time" - - "github.com/google/go-cmp/cmp" - - "cloud.google.com/go/internal/testutil" - - "golang.org/x/net/context" - bq "google.golang.org/api/bigquery/v2" -) - -type createTableRecorder struct { - conf *createTableConf - service -} - -func (rec *createTableRecorder) createTable(ctx context.Context, conf *createTableConf) error { - rec.conf = conf - return nil -} - -func TestCreateTableOptions(t *testing.T) { - s := &createTableRecorder{} - c := &Client{ - projectID: "p", - service: s, - } - ds := c.Dataset("d") - table := ds.Table("t") - exp := time.Now() - q := "query" - if err := table.Create(context.Background(), TableExpiration(exp), ViewQuery(q), UseStandardSQL()); err != nil { - t.Fatalf("err calling Table.Create: %v", err) - } - want := createTableConf{ - projectID: "p", - datasetID: "d", - tableID: "t", - expiration: exp, - viewQuery: q, - useStandardSQL: true, - } - equal := func(x, y createTableConf) bool { - return testutil.Equal(x, y, cmp.AllowUnexported(createTableConf{})) - } - - if !equal(*s.conf, want) { - t.Errorf("createTableConf: got:\n%v\nwant:\n%v", *s.conf, want) - } - - sc := Schema{fieldSchema("desc", "name", "STRING", false, true)} - if err := table.Create(context.Background(), TableExpiration(exp), sc); err != nil { - t.Fatalf("err calling Table.Create: %v", err) - } - want = createTableConf{ - projectID: "p", - datasetID: "d", - tableID: "t", - expiration: exp, - // No need for an elaborate schema, that is tested in schema_test.go. - schema: &bq.TableSchema{ - Fields: []*bq.TableFieldSchema{ - bqTableFieldSchema("desc", "name", "STRING", "REQUIRED"), - }, - }, - } - if !equal(*s.conf, want) { - t.Errorf("createTableConf: got:\n%v\nwant:\n%v", *s.conf, want) - } - - partitionCases := []struct { - timePartitioning TimePartitioning - expectedExpiration time.Duration - }{ - {TimePartitioning{}, time.Duration(0)}, - {TimePartitioning{time.Second}, time.Second}, - } - - for _, c := range partitionCases { - if err := table.Create(context.Background(), c.timePartitioning); err != nil { - t.Fatalf("err calling Table.Create: %v", err) - } - want = createTableConf{ - projectID: "p", - datasetID: "d", - tableID: "t", - timePartitioning: &TimePartitioning{c.expectedExpiration}, - } - if !equal(*s.conf, want) { - t.Errorf("createTableConf: got:\n%v\nwant:\n%v", *s.conf, want) - } - } -} - -func TestCreateTableOptionsLegacySQL(t *testing.T) { - c := &Client{ - projectID: "p", - service: &bigqueryService{}, - } - ds := c.Dataset("d") - table := ds.Table("t") - if err := table.Create(context.Background(), UseStandardSQL(), UseLegacySQL()); err == nil { - t.Fatal("no error using both standard and legacy SQL options") - } -} diff --git a/vendor/cloud.google.com/go/bigquery/dataset.go b/vendor/cloud.google.com/go/bigquery/dataset.go index 04e4a643e..843595ab2 100644 --- a/vendor/cloud.google.com/go/bigquery/dataset.go +++ b/vendor/cloud.google.com/go/bigquery/dataset.go @@ -30,22 +30,28 @@ type Dataset struct { c *Client } +// DatasetMetadata contains information about a BigQuery dataset. type DatasetMetadata struct { - CreationTime time.Time - LastModifiedTime time.Time // When the dataset or any of its tables were modified. - DefaultTableExpiration time.Duration // The default expiration time for new tables. - Description string // The user-friendly description of this dataset. - Name string // The user-friendly name for this dataset. - ID string + // These fields can be set when creating a dataset. + Name string // The user-friendly name for this dataset. + Description string // The user-friendly description of this dataset. Location string // The geo location of the dataset. + DefaultTableExpiration time.Duration // The default expiration time for new tables. Labels map[string]string // User-provided labels. + // These fields are read-only. + CreationTime time.Time + LastModifiedTime time.Time // When the dataset or any of its tables were modified. + FullID string // The full dataset ID in the form projectID:datasetID. + // ETag is the ETag obtained when reading metadata. Pass it to Dataset.Update to // ensure that the metadata hasn't changed since it was read. ETag string // TODO(jba): access rules } +// DatasetMetadataToUpdate is used when updating a dataset's metadata. +// Only non-nil fields will be updated. type DatasetMetadataToUpdate struct { Description optional.String // The user-friendly description of this table. Name optional.String // The user-friendly name for this dataset. @@ -89,10 +95,10 @@ func (c *Client) DatasetInProject(projectID, datasetID string) *Dataset { } } -// Create creates a dataset in the BigQuery service. An error will be returned -// if the dataset already exists. -func (d *Dataset) Create(ctx context.Context) error { - return d.c.service.insertDataset(ctx, d.DatasetID, d.ProjectID) +// Create creates a dataset in the BigQuery service. An error will be returned if the +// dataset already exists. Pass in a DatasetMetadata value to configure the dataset. +func (d *Dataset) Create(ctx context.Context, md *DatasetMetadata) error { + return d.c.service.insertDataset(ctx, d.DatasetID, d.ProjectID, md) } // Delete deletes the dataset. diff --git a/vendor/cloud.google.com/go/bigquery/examples_test.go b/vendor/cloud.google.com/go/bigquery/examples_test.go index 61186a77a..81cd76c21 100644 --- a/vendor/cloud.google.com/go/bigquery/examples_test.go +++ b/vendor/cloud.google.com/go/bigquery/examples_test.go @@ -17,6 +17,7 @@ package bigquery_test import ( "fmt" "os" + "time" "cloud.google.com/go/bigquery" "golang.org/x/net/context" @@ -233,7 +234,8 @@ func ExampleDataset_Create() { if err != nil { // TODO: Handle error. } - if err := client.Dataset("my_dataset").Create(ctx); err != nil { + ds := client.Dataset("my_dataset") + if err := ds.Create(ctx, &bigquery.DatasetMetadata{Location: "EU"}); err != nil { // TODO: Handle error. } } @@ -389,13 +391,13 @@ func ExampleTable_Create() { // TODO: Handle error. } t := client.Dataset("my_dataset").Table("new-table") - if err := t.Create(ctx); err != nil { + if err := t.Create(ctx, nil); err != nil { // TODO: Handle error. } } -// If you know your table's schema initially, pass a Schema to Create. -func ExampleTable_Create_schema() { +// Initialize a new table by passing TableMetadata to Table.Create. +func ExampleTable_Create_initialize() { ctx := context.Background() // Infer table schema from a Go type. schema, err := bigquery.InferSchema(Item{}) @@ -407,7 +409,12 @@ func ExampleTable_Create_schema() { // TODO: Handle error. } t := client.Dataset("my_dataset").Table("new-table") - if err := t.Create(ctx, schema); err != nil { + if err := t.Create(ctx, + &bigquery.TableMetadata{ + Name: "My New Table", + Schema: schema, + ExpirationTime: time.Now().Add(24 * time.Hour), + }); err != nil { // TODO: Handle error. } } diff --git a/vendor/cloud.google.com/go/bigquery/extract.go b/vendor/cloud.google.com/go/bigquery/extract.go index d4086396b..87dc96317 100644 --- a/vendor/cloud.google.com/go/bigquery/extract.go +++ b/vendor/cloud.google.com/go/bigquery/extract.go @@ -21,9 +21,12 @@ import ( // ExtractConfig holds the configuration for an extract job. type ExtractConfig struct { - // JobID is the ID to use for the extract job. If empty, a job ID will be automatically created. + // JobID is the ID to use for the job. If empty, a random job ID will be generated. JobID string + // If AddJobIDSuffix is true, then a random string will be appended to JobID. + AddJobIDSuffix bool + // Src is the table from which data will be extracted. Src *Table @@ -55,22 +58,23 @@ func (t *Table) ExtractorTo(dst *GCSReference) *Extractor { // Run initiates an extract job. func (e *Extractor) Run(ctx context.Context) (*Job, error) { - conf := &bq.JobConfigurationExtract{} - job := &bq.Job{Configuration: &bq.JobConfiguration{Extract: conf}} - - setJobRef(job, e.JobID, e.c.projectID) - - conf.DestinationUris = append([]string{}, e.Dst.uris...) - conf.Compression = string(e.Dst.Compression) - conf.DestinationFormat = string(e.Dst.DestinationFormat) - conf.FieldDelimiter = e.Dst.FieldDelimiter - - conf.SourceTable = e.Src.tableRefProto() - + var printHeader *bool if e.DisableHeader { f := false - conf.PrintHeader = &f + printHeader = &f + } + job := &bq.Job{ + JobReference: createJobRef(e.JobID, e.AddJobIDSuffix, e.c.projectID), + Configuration: &bq.JobConfiguration{ + Extract: &bq.JobConfigurationExtract{ + DestinationUris: append([]string{}, e.Dst.uris...), + Compression: string(e.Dst.Compression), + DestinationFormat: string(e.Dst.DestinationFormat), + FieldDelimiter: e.Dst.FieldDelimiter, + SourceTable: e.Src.tableRefProto(), + PrintHeader: printHeader, + }, + }, } - return e.c.insertJob(ctx, &insertJobConf{job: job}) } diff --git a/vendor/cloud.google.com/go/bigquery/extract_test.go b/vendor/cloud.google.com/go/bigquery/extract_test.go index 1719775a9..696a258d9 100644 --- a/vendor/cloud.google.com/go/bigquery/extract_test.go +++ b/vendor/cloud.google.com/go/bigquery/extract_test.go @@ -24,7 +24,7 @@ import ( func defaultExtractJob() *bq.Job { return &bq.Job{ - JobReference: &bq.JobReference{ProjectId: "client-project-id"}, + JobReference: &bq.JobReference{JobId: "RANDOM", ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Extract: &bq.JobConfigurationExtract{ SourceTable: &bq.TableReference{ @@ -39,6 +39,7 @@ func defaultExtractJob() *bq.Job { } func TestExtract(t *testing.T) { + defer fixRandomJobID("RANDOM")() s := &testService{} c := &Client{ service: s, diff --git a/vendor/cloud.google.com/go/bigquery/integration_test.go b/vendor/cloud.google.com/go/bigquery/integration_test.go index f693070c1..876eb4c03 100644 --- a/vendor/cloud.google.com/go/bigquery/integration_test.go +++ b/vendor/cloud.google.com/go/bigquery/integration_test.go @@ -49,6 +49,7 @@ var ( }}, } testTableExpiration time.Time + datasetIDs = testutil.NewUIDSpace("dataset") ) func TestMain(m *testing.M) { @@ -82,13 +83,13 @@ func initIntegrationTest() { log.Fatalf("NewClient: %v", err) } dataset = client.Dataset("bigquery_integration_test") - if err := dataset.Create(ctx); err != nil && !hasStatusCode(err, http.StatusConflict) { // AlreadyExists is 409 + if err := dataset.Create(ctx, nil); err != nil && !hasStatusCode(err, http.StatusConflict) { // AlreadyExists is 409 log.Fatalf("creating dataset: %v", err) } testTableExpiration = time.Now().Add(10 * time.Minute).Round(time.Second) } -func TestIntegration_Create(t *testing.T) { +func TestIntegration_TableCreate(t *testing.T) { // Check that creating a record field with an empty schema is an error. if client == nil { t.Skip("Integration tests skipped") @@ -97,7 +98,10 @@ func TestIntegration_Create(t *testing.T) { schema := Schema{ {Name: "rec", Type: RecordFieldType, Schema: Schema{}}, } - err := table.Create(context.Background(), schema, TableExpiration(time.Now().Add(5*time.Minute))) + err := table.Create(context.Background(), &TableMetadata{ + Schema: schema, + ExpirationTime: time.Now().Add(5 * time.Minute), + }) if err == nil { t.Fatal("want error, got nil") } @@ -106,7 +110,7 @@ func TestIntegration_Create(t *testing.T) { } } -func TestIntegration_CreateView(t *testing.T) { +func TestIntegration_TableCreateView(t *testing.T) { if client == nil { t.Skip("Integration tests skipped") } @@ -116,8 +120,12 @@ func TestIntegration_CreateView(t *testing.T) { // Test that standard SQL views work. view := dataset.Table("t_view_standardsql") - query := ViewQuery(fmt.Sprintf("SELECT APPROX_COUNT_DISTINCT(name) FROM `%s.%s.%s`", dataset.ProjectID, dataset.DatasetID, table.TableID)) - err := view.Create(context.Background(), UseStandardSQL(), query) + query := fmt.Sprintf("SELECT APPROX_COUNT_DISTINCT(name) FROM `%s.%s.%s`", + dataset.ProjectID, dataset.DatasetID, table.TableID) + err := view.Create(context.Background(), &TableMetadata{ + ViewQuery: query, + UseStandardSQL: true, + }) if err != nil { t.Fatalf("table.create: Did not expect an error, got: %v", err) } @@ -137,8 +145,8 @@ func TestIntegration_TableMetadata(t *testing.T) { t.Fatal(err) } // TODO(jba): check md more thorougly. - if got, want := md.ID, fmt.Sprintf("%s:%s.%s", dataset.ProjectID, dataset.DatasetID, table.TableID); got != want { - t.Errorf("metadata.ID: got %q, want %q", got, want) + if got, want := md.FullID, fmt.Sprintf("%s:%s.%s", dataset.ProjectID, dataset.DatasetID, table.TableID); got != want { + t.Errorf("metadata.FullID: got %q, want %q", got, want) } if got, want := md.Type, RegularTable; got != want { t.Errorf("metadata.Type: got %v, want %v", got, want) @@ -162,7 +170,11 @@ func TestIntegration_TableMetadata(t *testing.T) { } for i, c := range partitionCases { table := dataset.Table(fmt.Sprintf("t_metadata_partition_%v", i)) - err = table.Create(context.Background(), schema, c.timePartitioning, TableExpiration(time.Now().Add(5*time.Minute))) + err = table.Create(context.Background(), &TableMetadata{ + Schema: schema, + TimePartitioning: &c.timePartitioning, + ExpirationTime: time.Now().Add(5 * time.Minute), + }) if err != nil { t.Fatal(err) } @@ -180,6 +192,33 @@ func TestIntegration_TableMetadata(t *testing.T) { } } +func TestIntegration_DatasetCreate(t *testing.T) { + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + uid := strings.Replace(datasetIDs.New(), "-", "_", -1) + ds := client.Dataset(uid) + wmd := &DatasetMetadata{Name: "name", Location: "EU"} + err := ds.Create(ctx, wmd) + if err != nil { + t.Fatal(err) + } + gmd, err := ds.Metadata(ctx) + if err != nil { + t.Fatal(err) + } + if got, want := gmd.Name, wmd.Name; got != want { + t.Errorf("name: got %q, want %q", got, want) + } + if got, want := gmd.Location, wmd.Location; got != want { + t.Errorf("location: got %q, want %q", got, want) + } + if err := ds.Delete(ctx); err != nil { + t.Fatalf("deleting dataset %s: %v", ds, err) + } +} + func TestIntegration_DatasetMetadata(t *testing.T) { if client == nil { t.Skip("Integration tests skipped") @@ -189,8 +228,8 @@ func TestIntegration_DatasetMetadata(t *testing.T) { if err != nil { t.Fatal(err) } - if got, want := md.ID, fmt.Sprintf("%s:%s", dataset.ProjectID, dataset.DatasetID); got != want { - t.Errorf("ID: got %q, want %q", got, want) + if got, want := md.FullID, fmt.Sprintf("%s:%s", dataset.ProjectID, dataset.DatasetID); got != want { + t.Errorf("FullID: got %q, want %q", got, want) } jan2016 := time.Date(2016, 1, 1, 0, 0, 0, 0, time.UTC) if md.CreationTime.Before(jan2016) { @@ -213,7 +252,7 @@ func TestIntegration_DatasetDelete(t *testing.T) { } ctx := context.Background() ds := client.Dataset("delete_test") - if err := ds.Create(ctx); err != nil && !hasStatusCode(err, http.StatusConflict) { // AlreadyExists is 409 + if err := ds.Create(ctx, nil); err != nil && !hasStatusCode(err, http.StatusConflict) { // AlreadyExists is 409 t.Fatalf("creating dataset %s: %v", ds, err) } if err := ds.Delete(ctx); err != nil { @@ -276,8 +315,7 @@ func TestIntegration_DatasetUpdateDefaultExpiration(t *testing.T) { t.Fatal(err) } // Set the default expiration time. - md, err = dataset.Update(ctx, - DatasetMetadataToUpdate{DefaultTableExpiration: time.Hour}, "") + md, err = dataset.Update(ctx, DatasetMetadataToUpdate{DefaultTableExpiration: time.Hour}, "") if err != nil { t.Fatal(err) } @@ -293,8 +331,7 @@ func TestIntegration_DatasetUpdateDefaultExpiration(t *testing.T) { t.Fatalf("got %s, want 1h", md.DefaultTableExpiration) } // Setting it to 0 deletes it (which looks like a 0 duration). - md, err = dataset.Update(ctx, - DatasetMetadataToUpdate{DefaultTableExpiration: time.Duration(0)}, "") + md, err = dataset.Update(ctx, DatasetMetadataToUpdate{DefaultTableExpiration: time.Duration(0)}, "") if err != nil { t.Fatal(err) } @@ -746,15 +783,7 @@ func TestIntegration_TableUpdate(t *testing.T) { schema3[0], schema3[1], schema3[2], {Name: "rec2", Type: RecordFieldType, Schema: Schema{}}}}, } { - for { - _, err = table.Update(ctx, TableMetadataToUpdate{Schema: Schema(test.fields)}, "") - if !hasStatusCode(err, 403) { - break - } - // We've hit the rate limit for updates. Wait a bit and retry. - t.Logf("%s: retrying after getting %v", test.desc, err) - time.Sleep(4 * time.Second) - } + _, err = table.Update(ctx, TableMetadataToUpdate{Schema: Schema(test.fields)}, "") if err == nil { t.Errorf("%s: want error, got nil", test.desc) } else if !hasStatusCode(err, 400) { @@ -818,7 +847,9 @@ func TestIntegration_DML(t *testing.T) { q.UseStandardSQL = true // necessary for DML job, err := q.Run(ctx) if err != nil { - fmt.Printf("q.Run: %v\n", err) + if e, ok := err.(*googleapi.Error); ok && e.Code < 500 { + return true, err // fail on 4xx + } return false, err } if err := wait(ctx, job); err != nil { @@ -961,6 +992,7 @@ func TestIntegration_LegacyQuery(t *testing.T) { } for _, c := range testCases { q := client.Query(c.query) + q.UseLegacySQL = true it, err := q.Read(ctx) if err != nil { t.Fatal(err) @@ -1070,11 +1102,11 @@ var useLegacySqlTests = []struct { }{ {t: legacyName, std: false, legacy: true, err: false}, {t: legacyName, std: true, legacy: false, err: true}, - {t: legacyName, std: false, legacy: false, err: false}, // legacy SQL is default + {t: legacyName, std: false, legacy: false, err: true}, // standard SQL is default {t: legacyName, std: true, legacy: true, err: true}, {t: stdName, std: false, legacy: true, err: true}, {t: stdName, std: true, legacy: false, err: false}, - {t: stdName, std: false, legacy: false, err: true}, // legacy SQL is default + {t: stdName, std: false, legacy: false, err: false}, // standard SQL is default {t: stdName, std: true, legacy: true, err: true}, } @@ -1099,7 +1131,7 @@ func TestIntegration_QueryUseLegacySQL(t *testing.T) { } func TestIntegration_TableUseLegacySQL(t *testing.T) { - // Test the UseLegacySQL and UseStandardSQL options for CreateTable. + // Test UseLegacySQL and UseStandardSQL for Table.Create. if client == nil { t.Skip("Integration tests skipped") } @@ -1108,15 +1140,12 @@ func TestIntegration_TableUseLegacySQL(t *testing.T) { defer table.Delete(ctx) for i, test := range useLegacySqlTests { view := dataset.Table(fmt.Sprintf("t_view_%d", i)) - vq := ViewQuery(fmt.Sprintf("SELECT word from %s", test.t)) - opts := []CreateTableOption{vq} - if test.std { - opts = append(opts, UseStandardSQL()) + tm := &TableMetadata{ + ViewQuery: fmt.Sprintf("SELECT word from %s", test.t), + UseStandardSQL: test.std, + UseLegacySQL: test.legacy, } - if test.legacy { - opts = append(opts, UseLegacySQL()) - } - err := view.Create(ctx, opts...) + err := view.Create(ctx, tm) gotErr := err != nil if gotErr && !test.err { t.Errorf("%+v:\nunexpected error: %v", test, err) @@ -1127,11 +1156,46 @@ func TestIntegration_TableUseLegacySQL(t *testing.T) { } } +func TestIntegration_ListJobs(t *testing.T) { + // It's difficult to test the list of jobs, because we can't easily + // control what's in it. Also, there are many jobs in the test project, + // and it takes considerable time to list them all. + if client == nil { + t.Skip("Integration tests skipped") + } + ctx := context.Background() + + // About all we can do is list a few jobs. + const max = 20 + var jis []JobInfo + it := client.Jobs(ctx) + for { + ji, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + t.Fatal(err) + } + jis = append(jis, ji) + if len(jis) >= max { + break + } + } + // We expect that there is at least one job in the last few months. + if len(jis) == 0 { + t.Fatal("did not get any jobs") + } +} + // Creates a new, temporary table with a unique name and the given schema. func newTable(t *testing.T, s Schema) *Table { name := fmt.Sprintf("t%d", time.Now().UnixNano()) table := dataset.Table(name) - err := table.Create(context.Background(), s, TableExpiration(testTableExpiration)) + err := table.Create(context.Background(), &TableMetadata{ + Schema: s, + ExpirationTime: testTableExpiration, + }) if err != nil { t.Fatal(err) } diff --git a/vendor/cloud.google.com/go/bigquery/job.go b/vendor/cloud.google.com/go/bigquery/job.go index e32161a4e..dffaf45e7 100644 --- a/vendor/cloud.google.com/go/bigquery/job.go +++ b/vendor/cloud.google.com/go/bigquery/job.go @@ -16,6 +16,7 @@ package bigquery import ( "errors" + "fmt" "math/rand" "os" "sync" @@ -25,6 +26,7 @@ import ( gax "github.com/googleapis/gax-go" "golang.org/x/net/context" bq "google.golang.org/api/bigquery/v2" + "google.golang.org/api/iterator" ) // A Job represents an operation which has been submitted to BigQuery for processing. @@ -58,7 +60,8 @@ func (j *Job) ID() string { type State int const ( - Pending State = iota + StateUnspecified State = iota // used only as a default in JobIterator + Pending Running Done ) @@ -77,16 +80,17 @@ type JobStatus struct { Statistics *JobStatistics } -// setJobRef initializes job's JobReference if given a non-empty jobID. +// createJobRef creates a JobReference. // projectID must be non-empty. -func setJobRef(job *bq.Job, jobID, projectID string) { +func createJobRef(jobID string, addJobIDSuffix bool, projectID string) *bq.JobReference { if jobID == "" { - // Generate an ID on the client so that insertJob can be idempotent. - jobID = randomJobID() + jobID = randomJobIDFn() + } else if addJobIDSuffix { + jobID += "-" + randomJobIDFn() } // We don't check whether projectID is empty; the server will return an // error when it encounters the resulting JobReference. - job.JobReference = &bq.JobReference{ + return &bq.JobReference{ JobId: jobID, ProjectId: projectID, } @@ -99,8 +103,11 @@ var ( rng = rand.New(rand.NewSource(time.Now().UnixNano() ^ int64(os.Getpid()))) ) +// For testing. +var randomJobIDFn = randomJobID + func randomJobID() string { - // As of August 2017, the BigQuery service uses 27 alphanumeric characters. + // As of August 2017, the BigQuery service uses 27 alphanumeric characters for suffixes. var b [27]byte rngMu.Lock() for i := 0; i < len(b); i++ { @@ -121,20 +128,25 @@ func (s *JobStatus) Err() error { return s.err } +// Fill in the client field of Tables in the statistics. +func (s *JobStatus) setClient(c *Client) { + if s.Statistics == nil { + return + } + if qs, ok := s.Statistics.Details.(*QueryStatistics); ok { + for _, t := range qs.ReferencedTables { + t.c = c + } + } +} + // Status returns the current status of the job. It fails if the Status could not be determined. func (j *Job) Status(ctx context.Context) (*JobStatus, error) { js, err := j.c.service.jobStatus(ctx, j.projectID, j.jobID) if err != nil { return nil, err } - // Fill in the client field of Tables in the statistics. - if js.Statistics != nil { - if qs, ok := js.Statistics.Details.(*QueryStatistics); ok { - for _, t := range qs.ReferencedTables { - t.c = j.c - } - } - } + js.setClient(j.c) return js, nil } @@ -346,3 +358,73 @@ type ExplainQueryStep struct { func (*ExtractStatistics) implementsStatistics() {} func (*LoadStatistics) implementsStatistics() {} func (*QueryStatistics) implementsStatistics() {} + +// Jobs lists jobs within a project. +func (c *Client) Jobs(ctx context.Context) *JobIterator { + it := &JobIterator{ + ctx: ctx, + c: c, + ProjectID: c.projectID, + } + it.pageInfo, it.nextFunc = iterator.NewPageInfo( + it.fetch, + func() int { return len(it.items) }, + func() interface{} { b := it.items; it.items = nil; return b }) + return it +} + +// A JobInfo consists of a Job and a JobStatus. +type JobInfo struct { + Job *Job + Status *JobStatus +} + +// JobIterator iterates over jobs in a project. +type JobIterator struct { + ProjectID string // Project ID of the jobs to list. Default is the client's project. + AllUsers bool // Whether to list jobs owned by all users in the project, or just the current caller. + State State // List only jobs in the given state. Defaults to all states. + + ctx context.Context + c *Client + pageInfo *iterator.PageInfo + nextFunc func() error + items []JobInfo +} + +func (it *JobIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } + +func (it *JobIterator) Next() (JobInfo, error) { + if err := it.nextFunc(); err != nil { + return JobInfo{}, err + } + item := it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *JobIterator) fetch(pageSize int, pageToken string) (string, error) { + var st string + switch it.State { + case StateUnspecified: + st = "" + case Pending: + st = "pending" + case Running: + st = "running" + case Done: + st = "done" + default: + return "", fmt.Errorf("bigquery: invalid value for JobIterator.State: %d", it.State) + } + jobInfos, nextPageToken, err := it.c.service.listJobs(it.ctx, it.ProjectID, pageSize, pageToken, it.AllUsers, st) + if err != nil { + return "", err + } + for _, ji := range jobInfos { + ji.Job.c = it.c + ji.Status.setClient(it.c) + it.items = append(it.items, ji) + } + return nextPageToken, nil +} diff --git a/vendor/cloud.google.com/go/bigquery/job_test.go b/vendor/cloud.google.com/go/bigquery/job_test.go new file mode 100644 index 000000000..79e9a6004 --- /dev/null +++ b/vendor/cloud.google.com/go/bigquery/job_test.go @@ -0,0 +1,95 @@ +// Copyright 2017 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package bigquery + +import ( + "testing" + + "cloud.google.com/go/internal/testutil" + "golang.org/x/net/context" + bq "google.golang.org/api/bigquery/v2" +) + +func TestCreateJobRef(t *testing.T) { + defer fixRandomJobID("RANDOM")() + for _, test := range []struct { + jobID string + addJobIDSuffix bool + want string + }{ + { + jobID: "foo", + addJobIDSuffix: false, + want: "foo", + }, + { + jobID: "", + addJobIDSuffix: false, + want: "RANDOM", + }, + { + jobID: "", + addJobIDSuffix: true, // irrelevant + want: "RANDOM", + }, + { + jobID: "foo", + addJobIDSuffix: true, + want: "foo-RANDOM", + }, + } { + jr := createJobRef(test.jobID, test.addJobIDSuffix, "projectID") + got := jr.JobId + if got != test.want { + t.Errorf("%q, %t: got %q, want %q", test.jobID, test.addJobIDSuffix, got, test.want) + } + } +} + +func fixRandomJobID(s string) func() { + prev := randomJobIDFn + randomJobIDFn = func() string { return s } + return func() { randomJobIDFn = prev } +} + +func checkJob(t *testing.T, i int, got, want *bq.Job) { + if got.JobReference == nil { + t.Errorf("#%d: empty job reference", i) + return + } + if got.JobReference.JobId == "" { + t.Errorf("#%d: empty job ID", i) + return + } + d := testutil.Diff(got, want) + if d != "" { + t.Errorf("#%d: (got=-, want=+) %s", i, d) + } +} + +type testService struct { + *bq.Job + + service +} + +func (s *testService) insertJob(ctx context.Context, projectID string, conf *insertJobConf) (*Job, error) { + s.Job = conf.job + return &Job{}, nil +} + +func (s *testService) jobStatus(ctx context.Context, projectID, jobID string) (*JobStatus, error) { + return &JobStatus{State: Done}, nil +} diff --git a/vendor/cloud.google.com/go/bigquery/load.go b/vendor/cloud.google.com/go/bigquery/load.go index 50cada2f5..b5685cc7c 100644 --- a/vendor/cloud.google.com/go/bigquery/load.go +++ b/vendor/cloud.google.com/go/bigquery/load.go @@ -21,9 +21,12 @@ import ( // LoadConfig holds the configuration for a load job. type LoadConfig struct { - // JobID is the ID to use for the load job. If unset, a job ID will be automatically created. + // JobID is the ID to use for the job. If empty, a random job ID will be generated. JobID string + // If AddJobIDSuffix is true, then a random string will be appended to JobID. + AddJobIDSuffix bool + // Src is the source from which data will be loaded. Src LoadSource @@ -71,6 +74,7 @@ func (t *Table) LoaderFrom(src LoadSource) *Loader { // Run initiates a load job. func (l *Loader) Run(ctx context.Context) (*Job, error) { job := &bq.Job{ + JobReference: createJobRef(l.JobID, l.AddJobIDSuffix, l.c.projectID), Configuration: &bq.JobConfiguration{ Load: &bq.JobConfigurationLoad{ CreateDisposition: string(l.CreateDisposition), @@ -80,9 +84,6 @@ func (l *Loader) Run(ctx context.Context) (*Job, error) { } conf := &insertJobConf{job: job} l.Src.populateInsertJobConfForLoad(conf) - setJobRef(job, l.JobID, l.c.projectID) - job.Configuration.Load.DestinationTable = l.Dst.tableRefProto() - return l.c.insertJob(ctx, conf) } diff --git a/vendor/cloud.google.com/go/bigquery/load_test.go b/vendor/cloud.google.com/go/bigquery/load_test.go index 0cb09e58f..d4d254407 100644 --- a/vendor/cloud.google.com/go/bigquery/load_test.go +++ b/vendor/cloud.google.com/go/bigquery/load_test.go @@ -25,7 +25,7 @@ import ( func defaultLoadJob() *bq.Job { return &bq.Job{ - JobReference: &bq.JobReference{ProjectId: "client-project-id"}, + JobReference: &bq.JobReference{JobId: "RANDOM", ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Load: &bq.JobConfigurationLoad{ DestinationTable: &bq.TableReference{ @@ -67,6 +67,7 @@ func bqNestedFieldSchema() *bq.TableFieldSchema { } func TestLoad(t *testing.T) { + defer fixRandomJobID("RANDOM")() c := &Client{projectID: "client-project-id"} testCases := []struct { diff --git a/vendor/cloud.google.com/go/bigquery/query.go b/vendor/cloud.google.com/go/bigquery/query.go index 6459541cf..efc038aee 100644 --- a/vendor/cloud.google.com/go/bigquery/query.go +++ b/vendor/cloud.google.com/go/bigquery/query.go @@ -23,10 +23,12 @@ import ( // QueryConfig holds the configuration for a query job. type QueryConfig struct { - // JobID is the ID to use for the query job. If this field is empty, a job ID - // will be automatically created. + // JobID is the ID to use for the job. If empty, a random job ID will be generated. JobID string + // If AddJobIDSuffix is true, then a random string will be appended to JobID. + AddJobIDSuffix bool + // Dst is the table into which the results of the query will be written. // If this field is nil, a temporary table will be created. Dst *Table @@ -87,8 +89,7 @@ type QueryConfig struct { // used. MaxBytesBilled int64 - // UseStandardSQL causes the query to use standard SQL. - // The default is false (using legacy SQL). + // UseStandardSQL causes the query to use standard SQL. The default. UseStandardSQL bool // UseLegacySQL causes the query to use legacy SQL. @@ -128,12 +129,11 @@ func (c *Client) Query(q string) *Query { // Run initiates a query job. func (q *Query) Run(ctx context.Context) (*Job, error) { job := &bq.Job{ + JobReference: createJobRef(q.JobID, q.AddJobIDSuffix, q.client.projectID), Configuration: &bq.JobConfiguration{ Query: &bq.JobConfigurationQuery{}, }, } - setJobRef(job, q.JobID, q.client.projectID) - if err := q.QueryConfig.populateJobQueryConfig(job.Configuration.Query); err != nil { return nil, err } @@ -188,12 +188,11 @@ func (q *QueryConfig) populateJobQueryConfig(conf *bq.JobConfigurationQuery) err if len(q.Parameters) > 0 && q.UseLegacySQL { return errors.New("bigquery: cannot provide both Parameters (implying standard SQL) and UseLegacySQL") } - if q.UseStandardSQL || len(q.Parameters) > 0 { - conf.UseLegacySql = false - conf.ForceSendFields = append(conf.ForceSendFields, "UseLegacySql") - } if q.UseLegacySQL { conf.UseLegacySql = true + } else { + conf.UseLegacySql = false + conf.ForceSendFields = append(conf.ForceSendFields, "UseLegacySql") } if q.Dst != nil && !q.Dst.implicitTable() { conf.DestinationTable = q.Dst.tableRefProto() diff --git a/vendor/cloud.google.com/go/bigquery/query_test.go b/vendor/cloud.google.com/go/bigquery/query_test.go index b66b4a250..985b63d47 100644 --- a/vendor/cloud.google.com/go/bigquery/query_test.go +++ b/vendor/cloud.google.com/go/bigquery/query_test.go @@ -15,7 +15,6 @@ package bigquery import ( - "fmt" "testing" "cloud.google.com/go/internal/testutil" @@ -27,7 +26,7 @@ import ( func defaultQueryJob() *bq.Job { return &bq.Job{ - JobReference: &bq.JobReference{ProjectId: "client-project-id"}, + JobReference: &bq.JobReference{JobId: "RANDOM", ProjectId: "client-project-id"}, Configuration: &bq.JobConfiguration{ Query: &bq.JobConfigurationQuery{ DestinationTable: &bq.TableReference{ @@ -40,12 +39,15 @@ func defaultQueryJob() *bq.Job { ProjectId: "def-project-id", DatasetId: "def-dataset-id", }, + UseLegacySql: false, + ForceSendFields: []string{"UseLegacySql"}, }, }, } } func TestQuery(t *testing.T) { + defer fixRandomJobID("RANDOM")() c := &Client{ projectID: "client-project-id", } @@ -70,6 +72,20 @@ func TestQuery(t *testing.T) { return j }(), }, + { + dst: c.Dataset("dataset-id").Table("table-id"), + src: &QueryConfig{ + Q: "query string", + JobID: "jobID", + AddJobIDSuffix: true, + }, + want: func() *bq.Job { + j := defaultQueryJob() + j.Configuration.Query.DefaultDataset = nil + j.JobReference.JobId = "jobID-RANDOM" + return j + }(), + }, { dst: &Table{}, src: defaultQuery, @@ -246,10 +262,20 @@ func TestQuery(t *testing.T) { DefaultDatasetID: "def-dataset-id", UseStandardSQL: true, }, + want: defaultQueryJob(), + }, + { + dst: c.Dataset("dataset-id").Table("table-id"), + src: &QueryConfig{ + Q: "query string", + DefaultProjectID: "def-project-id", + DefaultDatasetID: "def-dataset-id", + UseLegacySQL: true, + }, want: func() *bq.Job { j := defaultQueryJob() - j.Configuration.Query.UseLegacySql = false - j.Configuration.Query.ForceSendFields = []string{"UseLegacySql"} + j.Configuration.Query.UseLegacySql = true + j.Configuration.Query.ForceSendFields = nil return j }(), }, @@ -290,6 +316,8 @@ func TestConfiguringQuery(t *testing.T) { ProjectId: "def-project-id", DatasetId: "def-dataset-id", }, + UseLegacySql: false, + ForceSendFields: []string{"UseLegacySql"}, }, }, JobReference: &bq.JobReference{ @@ -301,8 +329,8 @@ func TestConfiguringQuery(t *testing.T) { if _, err := query.Run(context.Background()); err != nil { t.Fatalf("err calling Query.Run: %v", err) } - if !testutil.Equal(s.Job, want) { - t.Errorf("querying: got:\n%v\nwant:\n%v", s.Job, want) + if diff := testutil.Diff(s.Job, want); diff != "" { + t.Errorf("querying: -got +want:\n%s", diff) } } @@ -324,7 +352,5 @@ func TestQueryLegacySQL(t *testing.T) { _, err = q.Run(context.Background()) if err == nil { t.Error("Parameters and UseLegacySQL: got nil, want error") - } else { - fmt.Println(err) } } diff --git a/vendor/cloud.google.com/go/bigquery/schema.go b/vendor/cloud.google.com/go/bigquery/schema.go index 0c8f46422..b8674ead8 100644 --- a/vendor/cloud.google.com/go/bigquery/schema.go +++ b/vendor/cloud.google.com/go/bigquery/schema.go @@ -77,11 +77,6 @@ func (s Schema) asTableSchema() *bq.TableSchema { return &bq.TableSchema{Fields: fields} } -// customizeCreateTable allows a Schema to be used directly as an option to CreateTable. -func (s Schema) customizeCreateTable(conf *createTableConf) { - conf.schema = s.asTableSchema() -} - func convertTableFieldSchema(tfs *bq.TableFieldSchema) *FieldSchema { fs := &FieldSchema{ Description: tfs.Description, diff --git a/vendor/cloud.google.com/go/bigquery/service.go b/vendor/cloud.google.com/go/bigquery/service.go index 0bf6bbc74..122acd84b 100644 --- a/vendor/cloud.google.com/go/bigquery/service.go +++ b/vendor/cloud.google.com/go/bigquery/service.go @@ -41,9 +41,10 @@ type service interface { getJob(ctx context.Context, projectId, jobID string) (*Job, error) jobCancel(ctx context.Context, projectId, jobID string) error jobStatus(ctx context.Context, projectId, jobID string) (*JobStatus, error) + listJobs(ctx context.Context, projectId string, maxResults int, pageToken string, all bool, state string) ([]JobInfo, string, error) // Tables - createTable(ctx context.Context, conf *createTableConf) error + createTable(ctx context.Context, projectID, datasetID, tableID string, tm *TableMetadata) error getTableMetadata(ctx context.Context, projectID, datasetID, tableID string) (*TableMetadata, error) deleteTable(ctx context.Context, projectID, datasetID, tableID string) error @@ -56,7 +57,7 @@ type service interface { insertRows(ctx context.Context, projectID, datasetID, tableID string, rows []*insertionRow, conf *insertRowsConf) error // Datasets - insertDataset(ctx context.Context, datasetID, projectID string) error + insertDataset(ctx context.Context, datasetID, projectID string, dm *DatasetMetadata) error deleteDataset(ctx context.Context, datasetID, projectID string) error getDatasetMetadata(ctx context.Context, projectID, datasetID string) (*DatasetMetadata, error) patchDataset(ctx context.Context, projectID, datasetID string, dm *DatasetMetadataToUpdate, etag string) (*DatasetMetadata, error) @@ -313,22 +314,11 @@ func (s *bigqueryService) insertRows(ctx context.Context, projectID, datasetID, } func (s *bigqueryService) getJob(ctx context.Context, projectID, jobID string) (*Job, error) { - job, err := s.getJobInternal(ctx, projectID, jobID, "configuration") + bqjob, err := s.getJobInternal(ctx, projectID, jobID, "configuration", "jobReference") if err != nil { return nil, err } - var isQuery bool - var dest *bq.TableReference - if job.Configuration.Query != nil { - isQuery = true - dest = job.Configuration.Query.DestinationTable - } - return &Job{ - projectID: projectID, - jobID: jobID, - isQuery: isQuery, - destinationTable: dest, - }, nil + return jobFromProtos(bqjob.JobReference, bqjob.Configuration), nil } func (s *bigqueryService) jobStatus(ctx context.Context, projectID, jobID string) (*JobStatus, error) { @@ -346,9 +336,10 @@ func (s *bigqueryService) jobStatus(ctx context.Context, projectID, jobID string func (s *bigqueryService) getJobInternal(ctx context.Context, projectID, jobID string, fields ...googleapi.Field) (*bq.Job, error) { var job *bq.Job - call := s.s.Jobs.Get(projectID, jobID). - Fields(fields...). - Context(ctx) + call := s.s.Jobs.Get(projectID, jobID).Context(ctx) + if len(fields) > 0 { + call = call.Fields(fields...) + } setClientHeader(call.Header()) err := runWithRetry(ctx, func() (err error) { job, err = call.Do() @@ -376,6 +367,21 @@ func (s *bigqueryService) jobCancel(ctx context.Context, projectID, jobID string }) } +func jobFromProtos(jr *bq.JobReference, config *bq.JobConfiguration) *Job { + var isQuery bool + var dest *bq.TableReference + if config.Query != nil { + isQuery = true + dest = config.Query.DestinationTable + } + return &Job{ + projectID: jr.ProjectId, + jobID: jr.JobId, + isQuery: isQuery, + destinationTable: dest, + } +} + var stateMap = map[string]State{"PENDING": Pending, "RUNNING": Running, "DONE": Done} func jobStatusFromProto(status *bq.JobStatus) (*JobStatus, error) { @@ -496,63 +502,88 @@ func (s *bigqueryService) listTables(ctx context.Context, projectID, datasetID s return tables, res.NextPageToken, nil } -type createTableConf struct { - projectID, datasetID, tableID string - expiration time.Time - viewQuery string - schema *bq.TableSchema - useStandardSQL bool - useLegacySQL bool - timePartitioning *TimePartitioning -} - // createTable creates a table in the BigQuery service. -// expiration is an optional time after which the table will be deleted and its storage reclaimed. -// If viewQuery is non-empty, the created table will be of type VIEW. +// If tm.ViewQuery is non-empty, the created table will be of type VIEW. // Note: expiration can only be set during table creation. // Note: after table creation, a view can be modified only if its table was initially created with a view. -func (s *bigqueryService) createTable(ctx context.Context, conf *createTableConf) error { - if conf.useStandardSQL && conf.useLegacySQL { - return errors.New("bigquery: cannot provide both UseStandardSQL and UseLegacySQL") +func (s *bigqueryService) createTable(ctx context.Context, projectID, datasetID, tableID string, tm *TableMetadata) error { + table, err := bqTableFromMetadata(tm) + if err != nil { + return err } - table := &bq.Table{ - // TODO(jba): retry? Is this always idempotent? - TableReference: &bq.TableReference{ - ProjectId: conf.projectID, - DatasetId: conf.datasetID, - TableId: conf.tableID, - }, + table.TableReference = &bq.TableReference{ + ProjectId: projectID, + DatasetId: datasetID, + TableId: tableID, } - if !conf.expiration.IsZero() { - table.ExpirationTime = conf.expiration.UnixNano() / 1e6 + req := s.s.Tables.Insert(projectID, datasetID, table).Context(ctx) + setClientHeader(req.Header()) + _, err = req.Do() + return err +} + +func bqTableFromMetadata(tm *TableMetadata) (*bq.Table, error) { + t := &bq.Table{} + if tm == nil { + return t, nil } - // TODO(jba): make it impossible to provide both a view query and a schema. - if conf.viewQuery != "" { - table.View = &bq.ViewDefinition{ - Query: conf.viewQuery, + if tm.Schema != nil && tm.ViewQuery != "" { + return nil, errors.New("bigquery: provide Schema or ViewQuery, not both") + } + t.FriendlyName = tm.Name + t.Description = tm.Description + if tm.Schema != nil { + t.Schema = tm.Schema.asTableSchema() + } + if tm.ViewQuery != "" { + if tm.UseStandardSQL && tm.UseLegacySQL { + return nil, errors.New("bigquery: cannot provide both UseStandardSQL and UseLegacySQL") } - if conf.useStandardSQL { - table.View.UseLegacySql = false - table.View.ForceSendFields = append(table.View.ForceSendFields, "UseLegacySql") - } - if conf.useLegacySQL { - table.View.UseLegacySql = true + t.View = &bq.ViewDefinition{Query: tm.ViewQuery} + if tm.UseLegacySQL { + t.View.UseLegacySql = true + } else { + t.View.UseLegacySql = false + t.View.ForceSendFields = append(t.View.ForceSendFields, "UseLegacySql") } + } else if tm.UseLegacySQL || tm.UseStandardSQL { + return nil, errors.New("bigquery: UseLegacy/StandardSQL requires ViewQuery") } - if conf.schema != nil { - table.Schema = conf.schema - } - if conf.timePartitioning != nil { - table.TimePartitioning = &bq.TimePartitioning{ + if tm.TimePartitioning != nil { + t.TimePartitioning = &bq.TimePartitioning{ Type: "DAY", - ExpirationMs: int64(conf.timePartitioning.Expiration.Seconds() * 1000), + ExpirationMs: int64(tm.TimePartitioning.Expiration / time.Millisecond), } } + if !tm.ExpirationTime.IsZero() { + t.ExpirationTime = tm.ExpirationTime.UnixNano() / 1e6 + } - req := s.s.Tables.Insert(conf.projectID, conf.datasetID, table).Context(ctx) - setClientHeader(req.Header()) - _, err := req.Do() - return err + if tm.FullID != "" { + return nil, errors.New("cannot set FullID on create") + } + if tm.Type != "" { + return nil, errors.New("cannot set Type on create") + } + if !tm.CreationTime.IsZero() { + return nil, errors.New("cannot set CreationTime on create") + } + if !tm.LastModifiedTime.IsZero() { + return nil, errors.New("cannot set LastModifiedTime on create") + } + if tm.NumBytes != 0 { + return nil, errors.New("cannot set NumBytes on create") + } + if tm.NumRows != 0 { + return nil, errors.New("cannot set NumRows on create") + } + if tm.StreamingBuffer != nil { + return nil, errors.New("cannot set StreamingBuffer on create") + } + if tm.ETag != "" { + return nil, errors.New("cannot set ETag on create") + } + return t, nil } func (s *bigqueryService) getTableMetadata(ctx context.Context, projectID, datasetID, tableID string) (*TableMetadata, error) { @@ -580,7 +611,7 @@ func bqTableToMetadata(t *bq.Table) *TableMetadata { Description: t.Description, Name: t.FriendlyName, Type: TableType(t.Type), - ID: t.Id, + FullID: t.Id, NumBytes: t.NumBytes, NumRows: t.NumRows, ExpirationTime: unixMillisToTime(t.ExpirationTime), @@ -592,7 +623,8 @@ func bqTableToMetadata(t *bq.Table) *TableMetadata { md.Schema = convertTableSchema(t.Schema) } if t.View != nil { - md.View = t.View.Query + md.ViewQuery = t.View.Query + md.UseLegacySQL = t.View.UseLegacySql } if t.TimePartitioning != nil { md.TimePartitioning = &TimePartitioning{ @@ -617,7 +649,7 @@ func bqDatasetToMetadata(d *bq.Dataset) *DatasetMetadata { DefaultTableExpiration: time.Duration(d.DefaultTableExpirationMs) * time.Millisecond, Description: d.Description, Name: d.FriendlyName, - ID: d.Id, + FullID: d.Id, Location: d.Location, Labels: d.Labels, ETag: d.Etag, @@ -678,39 +710,72 @@ func (s *bigqueryService) patchTable(ctx context.Context, projectID, datasetID, if etag != "" { call.Header().Set("If-Match", etag) } - table, err := call.Do() - if err != nil { + var table *bq.Table + if err := runWithRetry(ctx, func() (err error) { + table, err = call.Do() + return err + }); err != nil { return nil, err } return bqTableToMetadata(table), nil } -func (s *bigqueryService) insertDataset(ctx context.Context, datasetID, projectID string) error { +func (s *bigqueryService) insertDataset(ctx context.Context, datasetID, projectID string, dm *DatasetMetadata) error { // TODO(jba): retry? - ds := &bq.Dataset{ - DatasetReference: &bq.DatasetReference{DatasetId: datasetID}, + ds, err := bqDatasetFromMetadata(dm) + if err != nil { + return err } + ds.DatasetReference = &bq.DatasetReference{DatasetId: datasetID} req := s.s.Datasets.Insert(projectID, ds).Context(ctx) setClientHeader(req.Header()) - _, err := req.Do() + _, err = req.Do() return err } func (s *bigqueryService) patchDataset(ctx context.Context, projectID, datasetID string, dm *DatasetMetadataToUpdate, etag string) (*DatasetMetadata, error) { - ds := bqDatasetFromMetadata(dm) + ds := bqDatasetFromUpdateMetadata(dm) call := s.s.Datasets.Patch(projectID, datasetID, ds).Context(ctx) setClientHeader(call.Header()) if etag != "" { call.Header().Set("If-Match", etag) } - ds2, err := call.Do() - if err != nil { + var ds2 *bq.Dataset + if err := runWithRetry(ctx, func() (err error) { + ds2, err = call.Do() + return err + }); err != nil { return nil, err } return bqDatasetToMetadata(ds2), nil } -func bqDatasetFromMetadata(dm *DatasetMetadataToUpdate) *bq.Dataset { +func bqDatasetFromMetadata(dm *DatasetMetadata) (*bq.Dataset, error) { + ds := &bq.Dataset{} + if dm == nil { + return ds, nil + } + ds.FriendlyName = dm.Name + ds.Description = dm.Description + ds.Location = dm.Location + ds.DefaultTableExpirationMs = int64(dm.DefaultTableExpiration / time.Millisecond) + ds.Labels = dm.Labels + if !dm.CreationTime.IsZero() { + return nil, errors.New("bigquery: Dataset.CreationTime is not writable") + } + if !dm.LastModifiedTime.IsZero() { + return nil, errors.New("bigquery: Dataset.LastModifiedTime is not writable") + } + if dm.FullID != "" { + return nil, errors.New("bigquery: Dataset.FullID is not writable") + } + if dm.ETag != "" { + return nil, errors.New("bigquery: Dataset.ETag is not writable") + } + return ds, nil +} + +func bqDatasetFromUpdateMetadata(dm *DatasetMetadataToUpdate) *bq.Dataset { ds := &bq.Dataset{} forceSend := func(field string) { ds.ForceSendFields = append(ds.ForceSendFields, field) @@ -730,7 +795,7 @@ func bqDatasetFromMetadata(dm *DatasetMetadataToUpdate) *bq.Dataset { // Send a null to delete the field. ds.NullFields = append(ds.NullFields, "DefaultTableExpirationMs") } else { - ds.DefaultTableExpirationMs = int64(dur.Seconds() * 1000) + ds.DefaultTableExpirationMs = int64(dur / time.Millisecond) } } if dm.setLabels != nil || dm.deleteLabels != nil { @@ -801,13 +866,54 @@ func (s *bigqueryService) convertListedDataset(d *bq.DatasetListDatasets) *Datas } } +func (s *bigqueryService) listJobs(ctx context.Context, projectID string, maxResults int, pageToken string, all bool, state string) ([]JobInfo, string, error) { + req := s.s.Jobs.List(projectID). + Context(ctx). + PageToken(pageToken). + Projection("full"). + AllUsers(all) + if state != "" { + req.StateFilter(state) + } + setClientHeader(req.Header()) + if maxResults > 0 { + req.MaxResults(int64(maxResults)) + } + res, err := req.Do() + if err != nil { + return nil, "", err + } + var jobInfos []JobInfo + for _, j := range res.Jobs { + ji, err := s.convertListedJob(j) + if err != nil { + return nil, "", err + } + jobInfos = append(jobInfos, ji) + } + return jobInfos, res.NextPageToken, nil +} + +func (s *bigqueryService) convertListedJob(j *bq.JobListJobs) (JobInfo, error) { + st, err := jobStatusFromProto(j.Status) + if err != nil { + return JobInfo{}, err + } + st.Statistics = jobStatisticsFromProto(j.Statistics) + return JobInfo{ + Job: jobFromProtos(j.JobReference, j.Configuration), + Status: st, + }, nil +} + // runWithRetry calls the function until it returns nil or a non-retryable error, or // the context is done. // See the similar function in ../storage/invoke.go. The main difference is the // reason for retrying. func runWithRetry(ctx context.Context, call func() error) error { + // These parameters match the suggestions in https://cloud.google.com/bigquery/sla. backoff := gax.Backoff{ - Initial: 2 * time.Second, + Initial: 1 * time.Second, Max: 32 * time.Second, Multiplier: 2, } @@ -820,7 +926,7 @@ func runWithRetry(ctx context.Context, call func() error) error { }) } -// Use the criteria in https://cloud.google.com/bigquery/troubleshooting-errors. +// This is the correct definition of retryable according to the BigQuery team. func retryableError(err error) bool { e, ok := err.(*googleapi.Error) if !ok { @@ -830,5 +936,5 @@ func retryableError(err error) bool { if len(e.Errors) > 0 { reason = e.Errors[0].Reason } - return reason == "backendError" && (e.Code == 500 || e.Code == 503) + return reason == "backendError" || reason == "rateLimitExceeded" } diff --git a/vendor/cloud.google.com/go/bigquery/service_test.go b/vendor/cloud.google.com/go/bigquery/service_test.go index 79f190a31..ffb192c8c 100644 --- a/vendor/cloud.google.com/go/bigquery/service_test.go +++ b/vendor/cloud.google.com/go/bigquery/service_test.go @@ -59,15 +59,15 @@ func TestBQTableToMetadata(t *testing.T) { &TableMetadata{ Description: "desc", Name: "fname", - View: "view-query", - ID: "id", + ViewQuery: "view-query", + FullID: "id", Type: ExternalTable, ExpirationTime: aTime.Truncate(time.Millisecond), CreationTime: aTime.Truncate(time.Millisecond), LastModifiedTime: aTime.Truncate(time.Millisecond), NumBytes: 123, NumRows: 7, - TimePartitioning: &TimePartitioning{Expiration: time.Duration(7890) * time.Millisecond}, + TimePartitioning: &TimePartitioning{Expiration: 7890 * time.Millisecond}, StreamingBuffer: &StreamingBuffer{ EstimatedBytes: 11, EstimatedRows: 3, @@ -78,13 +78,156 @@ func TestBQTableToMetadata(t *testing.T) { }, } { got := bqTableToMetadata(test.in) - if !testutil.Equal(got, test.want) { - t.Errorf("%v:\ngot %+v\nwant %+v", test.in, got, test.want) + if diff := testutil.Diff(got, test.want); diff != "" { + t.Errorf("%+v:\n, -got, +want:\n%s", test.in, diff) + } + } +} + +func TestBQTableFromMetadata(t *testing.T) { + aTime := time.Date(2017, 1, 26, 0, 0, 0, 0, time.Local) + aTimeMillis := aTime.UnixNano() / 1e6 + sc := Schema{fieldSchema("desc", "name", "STRING", false, true)} + + for _, test := range []struct { + in *TableMetadata + want *bq.Table + }{ + {nil, &bq.Table{}}, + {&TableMetadata{}, &bq.Table{}}, + { + &TableMetadata{ + Name: "n", + Description: "d", + Schema: sc, + ExpirationTime: aTime, + }, + &bq.Table{ + FriendlyName: "n", + Description: "d", + Schema: &bq.TableSchema{ + Fields: []*bq.TableFieldSchema{ + bqTableFieldSchema("desc", "name", "STRING", "REQUIRED"), + }, + }, + ExpirationTime: aTimeMillis, + }, + }, + { + &TableMetadata{ViewQuery: "q"}, + &bq.Table{ + View: &bq.ViewDefinition{ + Query: "q", + UseLegacySql: false, + ForceSendFields: []string{"UseLegacySql"}, + }, + }, + }, + { + &TableMetadata{ + ViewQuery: "q", + UseLegacySQL: true, + TimePartitioning: &TimePartitioning{}, + }, + &bq.Table{ + View: &bq.ViewDefinition{ + Query: "q", + UseLegacySql: true, + }, + TimePartitioning: &bq.TimePartitioning{ + Type: "DAY", + ExpirationMs: 0, + }, + }, + }, + { + &TableMetadata{ + ViewQuery: "q", + UseStandardSQL: true, + TimePartitioning: &TimePartitioning{time.Second}, + }, + &bq.Table{ + View: &bq.ViewDefinition{ + Query: "q", + UseLegacySql: false, + ForceSendFields: []string{"UseLegacySql"}, + }, + TimePartitioning: &bq.TimePartitioning{ + Type: "DAY", + ExpirationMs: 1000, + }, + }, + }, + } { + got, err := bqTableFromMetadata(test.in) + if err != nil { + t.Fatalf("%+v: %v", test.in, err) + } + if diff := testutil.Diff(got, test.want); diff != "" { + t.Errorf("%+v:\n-got, +want:\n%s", test.in, diff) + } + } + + // Errors + for _, in := range []*TableMetadata{ + {Schema: sc, ViewQuery: "q"}, // can't have both schema and query + {UseLegacySQL: true}, // UseLegacySQL without query + {UseStandardSQL: true}, // UseStandardSQL without query + // read-only fields + {FullID: "x"}, + {Type: "x"}, + {CreationTime: aTime}, + {LastModifiedTime: aTime}, + {NumBytes: 1}, + {NumRows: 1}, + {StreamingBuffer: &StreamingBuffer{}}, + {ETag: "x"}, + } { + _, err := bqTableFromMetadata(in) + if err == nil { + t.Errorf("%+v: got nil, want error", in) } } } func TestBQDatasetFromMetadata(t *testing.T) { + for _, test := range []struct { + in *DatasetMetadata + want *bq.Dataset + }{ + {nil, &bq.Dataset{}}, + {&DatasetMetadata{Name: "name"}, &bq.Dataset{FriendlyName: "name"}}, + {&DatasetMetadata{ + Name: "name", + Description: "desc", + DefaultTableExpiration: time.Hour, + Location: "EU", + Labels: map[string]string{"x": "y"}, + }, &bq.Dataset{ + FriendlyName: "name", + Description: "desc", + DefaultTableExpirationMs: 60 * 60 * 1000, + Location: "EU", + Labels: map[string]string{"x": "y"}, + }}, + } { + got, err := bqDatasetFromMetadata(test.in) + if err != nil { + t.Fatal(err) + } + if !testutil.Equal(got, test.want) { + t.Errorf("%v:\ngot %+v\nwant %+v", test.in, got, test.want) + } + } + + // Check that non-writeable fields are unset. + _, err := bqDatasetFromMetadata(&DatasetMetadata{FullID: "x"}) + if err == nil { + t.Error("got nil, want error") + } +} + +func TestBQDatasetFromUpdateMetadata(t *testing.T) { dm := DatasetMetadataToUpdate{ Description: "desc", Name: "name", @@ -93,7 +236,7 @@ func TestBQDatasetFromMetadata(t *testing.T) { dm.SetLabel("label", "value") dm.DeleteLabel("del") - got := bqDatasetFromMetadata(&dm) + got := bqDatasetFromUpdateMetadata(&dm) want := &bq.Dataset{ Description: "desc", FriendlyName: "name", diff --git a/vendor/cloud.google.com/go/bigquery/table.go b/vendor/cloud.google.com/go/bigquery/table.go index 41aa1fe37..3a62dbb60 100644 --- a/vendor/cloud.google.com/go/bigquery/table.go +++ b/vendor/cloud.google.com/go/bigquery/table.go @@ -39,18 +39,39 @@ type Table struct { // TableMetadata contains information about a BigQuery table. type TableMetadata struct { - Description string // The user-friendly description of this table. - Name string // The user-friendly name for this table. - Schema Schema - View string + // The following fields can be set when creating a table. - ID string // An opaque ID uniquely identifying the table. - Type TableType + // The user-friendly name for the table. + Name string + + // The user-friendly description of the table. + Description string + + // The table schema. If provided on create, ViewQuery must be empty. + Schema Schema + + // The query to use for a view. If provided on create, Schema must be nil. + ViewQuery string + + // Use Legacy SQL for the view query. + // At most one of UseLegacySQL and UseStandardSQL can be true. + UseLegacySQL bool + + // Use Legacy SQL for the view query. The default. + // At most one of UseLegacySQL and UseStandardSQL can be true. + UseStandardSQL bool + + // If non-nil, the table is partitioned by time. + TimePartitioning *TimePartitioning // The time when this table expires. If not set, the table will persist // indefinitely. Expired tables will be deleted and their storage reclaimed. ExpirationTime time.Time + // All the fields below are read-only. + + FullID string // An opaque ID uniquely identifying the table. + Type TableType CreationTime time.Time LastModifiedTime time.Time @@ -62,9 +83,6 @@ type TableMetadata struct { // This does not include data that is being buffered during a streaming insert. NumRows uint64 - // The time-based partitioning settings for this table. - TimePartitioning *TimePartitioning - // Contains information regarding this table's streaming buffer, if one is // present. This field will be nil if the table is not being streamed to or if // there is no data in the streaming buffer. @@ -115,6 +133,14 @@ const ( ExternalTable TableType = "EXTERNAL" ) +// TimePartitioning describes the time-based date partitioning on a table. +// For more information see: https://cloud.google.com/bigquery/docs/creating-partitioned-tables. +type TimePartitioning struct { + // The amount of time to keep the storage for a partition. + // If the duration is empty (0), the data in the partitions do not expire. + Expiration time.Duration +} + // StreamingBuffer holds information about the streaming buffer. type StreamingBuffer struct { // A lower-bound estimate of the number of bytes currently in the streaming @@ -148,18 +174,9 @@ func (t *Table) implicitTable() bool { } // Create creates a table in the BigQuery service. -// To create a table with a schema, pass in a Schema to Create; -// Schema is a valid CreateTableOption. -func (t *Table) Create(ctx context.Context, options ...CreateTableOption) error { - conf := &createTableConf{ - projectID: t.ProjectID, - datasetID: t.DatasetID, - tableID: t.TableID, - } - for _, o := range options { - o.customizeCreateTable(conf) - } - return t.c.service.createTable(ctx, conf) +// Pass in a TableMetadata value to configure the dataset. +func (t *Table) Create(ctx context.Context, tm *TableMetadata) error { + return t.c.service.createTable(ctx, t.ProjectID, t.DatasetID, t.TableID, tm) } // Metadata fetches the metadata for the table. @@ -172,63 +189,6 @@ func (t *Table) Delete(ctx context.Context) error { return t.c.service.deleteTable(ctx, t.ProjectID, t.DatasetID, t.TableID) } -// A CreateTableOption is an optional argument to CreateTable. -type CreateTableOption interface { - customizeCreateTable(*createTableConf) -} - -type tableExpiration time.Time - -// TableExpiration returns a CreateTableOption that will cause the created table to be deleted after the expiration time. -func TableExpiration(exp time.Time) CreateTableOption { return tableExpiration(exp) } - -func (opt tableExpiration) customizeCreateTable(conf *createTableConf) { - conf.expiration = time.Time(opt) -} - -type viewQuery string - -// ViewQuery returns a CreateTableOption that causes the created table to be a virtual table defined by the supplied query. -// For more information see: https://cloud.google.com/bigquery/querying-data#views -func ViewQuery(query string) CreateTableOption { return viewQuery(query) } - -func (opt viewQuery) customizeCreateTable(conf *createTableConf) { - conf.viewQuery = string(opt) -} - -type useStandardSQL struct{} - -// UseStandardSQL returns a CreateTableOption to set the table to use standard SQL. -// The default setting is false (using legacy SQL). -func UseStandardSQL() CreateTableOption { return useStandardSQL{} } - -func (opt useStandardSQL) customizeCreateTable(conf *createTableConf) { - conf.useStandardSQL = true -} - -type useLegacySQL struct{} - -// UseLegacySQL returns a CreateTableOption to set the table to use legacy SQL. -// This is currently the default. -func UseLegacySQL() CreateTableOption { return useLegacySQL{} } - -func (opt useLegacySQL) customizeCreateTable(conf *createTableConf) { - conf.useLegacySQL = true -} - -// TimePartitioning is a CreateTableOption that can be used to set time-based -// date partitioning on a table. -// For more information see: https://cloud.google.com/bigquery/docs/creating-partitioned-tables -type TimePartitioning struct { - // (Optional) The amount of time to keep the storage for a partition. - // If the duration is empty (0), the data in the partitions do not expire. - Expiration time.Duration -} - -func (opt TimePartitioning) customizeCreateTable(conf *createTableConf) { - conf.timePartitioning = &opt -} - // Read fetches the contents of the table. func (t *Table) Read(ctx context.Context) *RowIterator { return newRowIterator(ctx, t.c.service, &readTableConf{ diff --git a/vendor/cloud.google.com/go/bigquery/utils_test.go b/vendor/cloud.google.com/go/bigquery/utils_test.go index c781f9c3f..85eece8a1 100644 --- a/vendor/cloud.google.com/go/bigquery/utils_test.go +++ b/vendor/cloud.google.com/go/bigquery/utils_test.go @@ -14,11 +14,6 @@ package bigquery -import ( - "golang.org/x/net/context" - bq "google.golang.org/api/bigquery/v2" -) - func defaultGCS() *GCSReference { return &GCSReference{ uris: []string{"uri"}, @@ -30,18 +25,3 @@ var defaultQuery = &QueryConfig{ DefaultProjectID: "def-project-id", DefaultDatasetID: "def-dataset-id", } - -type testService struct { - *bq.Job - - service -} - -func (s *testService) insertJob(ctx context.Context, projectID string, conf *insertJobConf) (*Job, error) { - s.Job = conf.job - return &Job{}, nil -} - -func (s *testService) jobStatus(ctx context.Context, projectID, jobID string) (*JobStatus, error) { - return &JobStatus{State: Done}, nil -} diff --git a/vendor/cloud.google.com/go/internal/version/version.go b/vendor/cloud.google.com/go/internal/version/version.go index 5eb06bac5..513afa460 100644 --- a/vendor/cloud.google.com/go/internal/version/version.go +++ b/vendor/cloud.google.com/go/internal/version/version.go @@ -26,7 +26,7 @@ import ( // Repo is the current version of the client libraries in this // repo. It should be a date in YYYYMMDD format. -const Repo = "20170621" +const Repo = "20170928" // Go returns the Go runtime version. The returned string // has no whitespace. diff --git a/vendor/cloud.google.com/go/language/apiv1/doc.go b/vendor/cloud.google.com/go/language/apiv1/doc.go index f28bdfae1..eaf731a4e 100644 --- a/vendor/cloud.google.com/go/language/apiv1/doc.go +++ b/vendor/cloud.google.com/go/language/apiv1/doc.go @@ -14,7 +14,7 @@ // AUTO-GENERATED CODE. DO NOT EDIT. -// Package language is an experimental, auto-generated package for the +// Package language is an auto-generated package for the // Google Cloud Natural Language API. // // Google Cloud Natural Language API provides natural language understanding diff --git a/vendor/cloud.google.com/go/language/apiv1/language_client.go b/vendor/cloud.google.com/go/language/apiv1/language_client.go index a74551a13..2af9d2085 100644 --- a/vendor/cloud.google.com/go/language/apiv1/language_client.go +++ b/vendor/cloud.google.com/go/language/apiv1/language_client.go @@ -31,10 +31,11 @@ import ( // CallOptions contains the retry settings for each method of Client. type CallOptions struct { - AnalyzeSentiment []gax.CallOption - AnalyzeEntities []gax.CallOption - AnalyzeSyntax []gax.CallOption - AnnotateText []gax.CallOption + AnalyzeSentiment []gax.CallOption + AnalyzeEntities []gax.CallOption + AnalyzeEntitySentiment []gax.CallOption + AnalyzeSyntax []gax.CallOption + AnnotateText []gax.CallOption } func defaultClientOptions() []option.ClientOption { @@ -60,10 +61,11 @@ func defaultCallOptions() *CallOptions { }, } return &CallOptions{ - AnalyzeSentiment: retry[[2]string{"default", "idempotent"}], - AnalyzeEntities: retry[[2]string{"default", "idempotent"}], - AnalyzeSyntax: retry[[2]string{"default", "idempotent"}], - AnnotateText: retry[[2]string{"default", "idempotent"}], + AnalyzeSentiment: retry[[2]string{"default", "idempotent"}], + AnalyzeEntities: retry[[2]string{"default", "idempotent"}], + AnalyzeEntitySentiment: retry[[2]string{"default", "idempotent"}], + AnalyzeSyntax: retry[[2]string{"default", "idempotent"}], + AnnotateText: retry[[2]string{"default", "idempotent"}], } } @@ -155,6 +157,23 @@ func (c *Client) AnalyzeEntities(ctx context.Context, req *languagepb.AnalyzeEnt return resp, nil } +// AnalyzeEntitySentiment finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes +// sentiment associated with each entity and its mentions. +func (c *Client) AnalyzeEntitySentiment(ctx context.Context, req *languagepb.AnalyzeEntitySentimentRequest, opts ...gax.CallOption) (*languagepb.AnalyzeEntitySentimentResponse, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.AnalyzeEntitySentiment[0:len(c.CallOptions.AnalyzeEntitySentiment):len(c.CallOptions.AnalyzeEntitySentiment)], opts...) + var resp *languagepb.AnalyzeEntitySentimentResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.AnalyzeEntitySentiment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // AnalyzeSyntax analyzes the syntax of the text and provides sentence boundaries and // tokenization along with part of speech tags, dependency trees, and other // properties. diff --git a/vendor/cloud.google.com/go/language/apiv1/language_client_example_test.go b/vendor/cloud.google.com/go/language/apiv1/language_client_example_test.go index f1fcf1476..3da8d3f08 100644 --- a/vendor/cloud.google.com/go/language/apiv1/language_client_example_test.go +++ b/vendor/cloud.google.com/go/language/apiv1/language_client_example_test.go @@ -68,6 +68,24 @@ func ExampleClient_AnalyzeEntities() { _ = resp } +func ExampleClient_AnalyzeEntitySentiment() { + ctx := context.Background() + c, err := language.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &languagepb.AnalyzeEntitySentimentRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.AnalyzeEntitySentiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleClient_AnalyzeSyntax() { ctx := context.Background() c, err := language.NewClient(ctx) diff --git a/vendor/cloud.google.com/go/language/apiv1/mock_test.go b/vendor/cloud.google.com/go/language/apiv1/mock_test.go index b139468a2..8a808ef48 100644 --- a/vendor/cloud.google.com/go/language/apiv1/mock_test.go +++ b/vendor/cloud.google.com/go/language/apiv1/mock_test.go @@ -84,6 +84,18 @@ func (s *mockLanguageServer) AnalyzeEntities(ctx context.Context, req *languagep return s.resps[0].(*languagepb.AnalyzeEntitiesResponse), nil } +func (s *mockLanguageServer) AnalyzeEntitySentiment(ctx context.Context, req *languagepb.AnalyzeEntitySentimentRequest) (*languagepb.AnalyzeEntitySentimentResponse, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*languagepb.AnalyzeEntitySentimentResponse), nil +} + func (s *mockLanguageServer) AnalyzeSyntax(ctx context.Context, req *languagepb.AnalyzeSyntaxRequest) (*languagepb.AnalyzeSyntaxResponse, error) { md, _ := metadata.FromIncomingContext(ctx) if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { @@ -255,6 +267,65 @@ func TestLanguageServiceAnalyzeEntitiesError(t *testing.T) { } _ = resp } +func TestLanguageServiceAnalyzeEntitySentiment(t *testing.T) { + var language string = "language-1613589672" + var expectedResponse = &languagepb.AnalyzeEntitySentimentResponse{ + Language: language, + } + + mockLanguage.err = nil + mockLanguage.reqs = nil + + mockLanguage.resps = append(mockLanguage.resps[:0], expectedResponse) + + var document *languagepb.Document = &languagepb.Document{} + var request = &languagepb.AnalyzeEntitySentimentRequest{ + Document: document, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.AnalyzeEntitySentiment(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockLanguage.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestLanguageServiceAnalyzeEntitySentimentError(t *testing.T) { + errCode := codes.PermissionDenied + mockLanguage.err = gstatus.Error(errCode, "test error") + + var document *languagepb.Document = &languagepb.Document{} + var request = &languagepb.AnalyzeEntitySentimentRequest{ + Document: document, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.AnalyzeEntitySentiment(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} func TestLanguageServiceAnalyzeSyntax(t *testing.T) { var language string = "language-1613589672" var expectedResponse = &languagepb.AnalyzeSyntaxResponse{ diff --git a/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go b/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go index 3b6d06ad1..ab541ffd6 100644 --- a/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go +++ b/vendor/cloud.google.com/go/language/apiv1beta2/language_client.go @@ -35,6 +35,7 @@ type CallOptions struct { AnalyzeEntities []gax.CallOption AnalyzeEntitySentiment []gax.CallOption AnalyzeSyntax []gax.CallOption + ClassifyText []gax.CallOption AnnotateText []gax.CallOption } @@ -65,6 +66,7 @@ func defaultCallOptions() *CallOptions { AnalyzeEntities: retry[[2]string{"default", "idempotent"}], AnalyzeEntitySentiment: retry[[2]string{"default", "idempotent"}], AnalyzeSyntax: retry[[2]string{"default", "idempotent"}], + ClassifyText: retry[[2]string{"default", "idempotent"}], AnnotateText: retry[[2]string{"default", "idempotent"}], } } @@ -192,8 +194,24 @@ func (c *Client) AnalyzeSyntax(ctx context.Context, req *languagepb.AnalyzeSynta return resp, nil } -// AnnotateText a convenience method that provides all syntax, sentiment, and entity -// features in one call. +// ClassifyText classifies a document into categories. +func (c *Client) ClassifyText(ctx context.Context, req *languagepb.ClassifyTextRequest, opts ...gax.CallOption) (*languagepb.ClassifyTextResponse, error) { + ctx = insertXGoog(ctx, c.xGoogHeader) + opts = append(c.CallOptions.ClassifyText[0:len(c.CallOptions.ClassifyText):len(c.CallOptions.ClassifyText)], opts...) + var resp *languagepb.ClassifyTextResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ClassifyText(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// AnnotateText a convenience method that provides all syntax, sentiment, entity, and +// classification features in one call. func (c *Client) AnnotateText(ctx context.Context, req *languagepb.AnnotateTextRequest, opts ...gax.CallOption) (*languagepb.AnnotateTextResponse, error) { ctx = insertXGoog(ctx, c.xGoogHeader) opts = append(c.CallOptions.AnnotateText[0:len(c.CallOptions.AnnotateText):len(c.CallOptions.AnnotateText)], opts...) diff --git a/vendor/cloud.google.com/go/language/apiv1beta2/language_client_example_test.go b/vendor/cloud.google.com/go/language/apiv1beta2/language_client_example_test.go index ddb44af63..348214775 100644 --- a/vendor/cloud.google.com/go/language/apiv1beta2/language_client_example_test.go +++ b/vendor/cloud.google.com/go/language/apiv1beta2/language_client_example_test.go @@ -104,6 +104,24 @@ func ExampleClient_AnalyzeSyntax() { _ = resp } +func ExampleClient_ClassifyText() { + ctx := context.Background() + c, err := language.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &languagepb.ClassifyTextRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.ClassifyText(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleClient_AnnotateText() { ctx := context.Background() c, err := language.NewClient(ctx) diff --git a/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go b/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go index d2c9a90d6..ccc09520f 100644 --- a/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go +++ b/vendor/cloud.google.com/go/language/apiv1beta2/mock_test.go @@ -108,6 +108,18 @@ func (s *mockLanguageServer) AnalyzeSyntax(ctx context.Context, req *languagepb. return s.resps[0].(*languagepb.AnalyzeSyntaxResponse), nil } +func (s *mockLanguageServer) ClassifyText(ctx context.Context, req *languagepb.ClassifyTextRequest) (*languagepb.ClassifyTextResponse, error) { + md, _ := metadata.FromIncomingContext(ctx) + if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { + return nil, fmt.Errorf("x-goog-api-client = %v, expected gl-go key", xg) + } + s.reqs = append(s.reqs, req) + if s.err != nil { + return nil, s.err + } + return s.resps[0].(*languagepb.ClassifyTextResponse), nil +} + func (s *mockLanguageServer) AnnotateText(ctx context.Context, req *languagepb.AnnotateTextRequest) (*languagepb.AnnotateTextResponse, error) { md, _ := metadata.FromIncomingContext(ctx) if xg := md["x-goog-api-client"]; len(xg) == 0 || !strings.Contains(xg[0], "gl-go/") { @@ -385,6 +397,62 @@ func TestLanguageServiceAnalyzeSyntaxError(t *testing.T) { } _ = resp } +func TestLanguageServiceClassifyText(t *testing.T) { + var expectedResponse *languagepb.ClassifyTextResponse = &languagepb.ClassifyTextResponse{} + + mockLanguage.err = nil + mockLanguage.reqs = nil + + mockLanguage.resps = append(mockLanguage.resps[:0], expectedResponse) + + var document *languagepb.Document = &languagepb.Document{} + var request = &languagepb.ClassifyTextRequest{ + Document: document, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.ClassifyText(context.Background(), request) + + if err != nil { + t.Fatal(err) + } + + if want, got := request, mockLanguage.reqs[0]; !proto.Equal(want, got) { + t.Errorf("wrong request %q, want %q", got, want) + } + + if want, got := expectedResponse, resp; !proto.Equal(want, got) { + t.Errorf("wrong response %q, want %q)", got, want) + } +} + +func TestLanguageServiceClassifyTextError(t *testing.T) { + errCode := codes.PermissionDenied + mockLanguage.err = gstatus.Error(errCode, "test error") + + var document *languagepb.Document = &languagepb.Document{} + var request = &languagepb.ClassifyTextRequest{ + Document: document, + } + + c, err := NewClient(context.Background(), clientOpt) + if err != nil { + t.Fatal(err) + } + + resp, err := c.ClassifyText(context.Background(), request) + + if st, ok := gstatus.FromError(err); !ok { + t.Errorf("got error %v, expected grpc error", err) + } else if c := st.Code(); c != errCode { + t.Errorf("got error code %q, want %q", c, errCode) + } + _ = resp +} func TestLanguageServiceAnnotateText(t *testing.T) { var language string = "language-1613589672" var expectedResponse = &languagepb.AnnotateTextResponse{ diff --git a/vendor/cloud.google.com/go/profiler/profiler.go b/vendor/cloud.google.com/go/profiler/profiler.go index a203a8a4c..c642495f3 100644 --- a/vendor/cloud.google.com/go/profiler/profiler.go +++ b/vendor/cloud.google.com/go/profiler/profiler.go @@ -36,7 +36,9 @@ package profiler import ( "bytes" "errors" + "fmt" "log" + "os" "runtime/pprof" "sync" "time" @@ -60,8 +62,7 @@ import ( var ( config Config startOnce sync.Once - // getProjectID, getInstanceName, getZone, startCPUProfile, stopCPUProfile, - // writeHeapProfile and sleep are overrideable for testing. + // The functions below are stubbed to be overrideable for testing. getProjectID = gcemd.ProjectID getInstanceName = gcemd.InstanceName getZone = gcemd.Zone @@ -69,6 +70,8 @@ var ( stopCPUProfile = pprof.StopCPUProfile writeHeapProfile = pprof.WriteHeapProfile sleep = gax.Sleep + dialGRPC = gtransport.Dial + onGCE = gcemd.OnGCE ) const ( @@ -116,20 +119,6 @@ type Config struct { // or anywhere else outside of Google Cloud Platform. ProjectID string - // InstanceName is the name of the VM instance to use instead of - // the one read from the VM metadata server. - // - // Set this if you are running the agent in your local environment - // or anywhere else outside of Google Cloud Platform. - InstanceName string - - // ZoneName is the name of the zone to use instead of - // the one read from the VM metadata server. - // - // Set this if you are running the agent in your local environment - // or anywhere else outside of Google Cloud Platform. - ZoneName string - // APIAddr is the HTTP endpoint to use to connect to the profiler // agent API. Defaults to the production environment, overridable // for testing. @@ -137,6 +126,9 @@ type Config struct { // Target is deprecated, use Service instead. Target string + + instance string + zone string } // startError represents the error occured during the @@ -168,22 +160,14 @@ func start(cfg Config, options ...option.ClientOption) error { } opts = append(opts, options...) - conn, err := gtransport.Dial(ctx, opts...) + conn, err := dialGRPC(ctx, opts...) if err != nil { debugLog("failed to dial GRPC: %v", err) return err } - d, err := initializeDeployment() - if err != nil { - debugLog("failed to initialize deployment: %v", err) - return err - } - - l := initializeProfileLabels() - - a, ctx := initializeResources(ctx, conn, d, l) - go pollProfilerService(ctx, a) + a := initializeAgent(pb.NewProfilerServiceClient(conn)) + go pollProfilerService(withXGoogHeader(ctx), a) return nil } @@ -196,7 +180,7 @@ func debugLog(format string, e ...interface{}) { // agent polls Cloud Profiler server for instructions on behalf of // a task, and collects and uploads profiles as requested. type agent struct { - client *client + client pb.ProfilerServiceClient deployment *pb.Deployment profileLabels map[string]string } @@ -254,7 +238,7 @@ func (a *agent) createProfile(ctx context.Context) *pb.Profile { gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - p, err = a.client.client.CreateProfile(ctx, &req, grpc.Trailer(&md)) + p, err = a.client.CreateProfile(ctx, &req, grpc.Trailer(&md)) return err }, gax.WithRetry(func() gax.Retryer { return &retryer{ @@ -313,107 +297,91 @@ func (a *agent) profileAndUpload(ctx context.Context, p *pb.Profile) { // Upload profile, discard profile in case of error. debugLog("start uploading profile") - if _, err := a.client.client.UpdateProfile(ctx, &req); err != nil { + if _, err := a.client.UpdateProfile(ctx, &req); err != nil { debugLog("failed to upload profile: %v", err) } } -// client is a client for interacting with Cloud Profiler API. -type client struct { - // gRPC API client. - client pb.ProfilerServiceClient - - // Metadata for google API to be sent with each request. - xGoogHeader []string -} - -// setXGoogHeader sets the name and version of the application in +// withXGoogHeader sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *client) setXGoogHeader(keyval ...string) { +func withXGoogHeader(ctx context.Context, keyval ...string) context.Context { kv := append([]string{"gl-go", version.Go(), "gccl", version.Repo}, keyval...) kv = append(kv, "gax", gax.Version, "grpc", grpc.Version) - c.xGoogHeader = []string{gax.XGoogHeader(kv...)} -} -func (c *client) insertMetadata(ctx context.Context) context.Context { md, _ := grpcmd.FromOutgoingContext(ctx) md = md.Copy() - md[xGoogAPIMetadata] = c.xGoogHeader + md[xGoogAPIMetadata] = []string{gax.XGoogHeader(kv...)} return grpcmd.NewOutgoingContext(ctx, md) } -func initializeDeployment() (*pb.Deployment, error) { - var err error - - projectID := config.ProjectID - if projectID == "" { - projectID, err = getProjectID() - if err != nil { - return nil, err - } - } - - zone := config.ZoneName - if zone == "" { - zone, err = getZone() - if err != nil { - return nil, err - } - } - - labels := map[string]string{ - zoneNameLabel: zone, +func initializeAgent(c pb.ProfilerServiceClient) *agent { + labels := map[string]string{} + if config.zone != "" { + labels[zoneNameLabel] = config.zone } if config.ServiceVersion != "" { labels[versionLabel] = config.ServiceVersion } - - return &pb.Deployment{ - ProjectId: projectID, + d := &pb.Deployment{ + ProjectId: config.ProjectID, Target: config.Target, Labels: labels, - }, nil -} - -func initializeProfileLabels() map[string]string { - instance := config.InstanceName - if instance == "" { - var err error - if instance, err = getInstanceName(); err != nil { - instance = "unknown" - debugLog("failed to get instance name: %v", err) - } } - return map[string]string{instanceLabel: instance} -} + profileLabels := map[string]string{} -func initializeResources(ctx context.Context, conn *grpc.ClientConn, d *pb.Deployment, l map[string]string) (*agent, context.Context) { - c := &client{ - client: pb.NewProfilerServiceClient(conn), + if config.instance != "" { + profileLabels[instanceLabel] = config.instance } - c.setXGoogHeader() - ctx = c.insertMetadata(ctx) return &agent{ client: c, deployment: d, - profileLabels: l, - }, ctx + profileLabels: profileLabels, + } } func initializeConfig(cfg Config) error { config = cfg - if config.Service != "" { + switch { + case config.Service != "": config.Target = config.Service + case config.Target == "": + config.Target = os.Getenv("GAE_SERVICE") } if config.Target == "" { return errors.New("service name must be specified in the configuration") } + if config.ServiceVersion == "" { + config.ServiceVersion = os.Getenv("GAE_VERSION") + } + + if onGCE() { + var err error + if config.ProjectID == "" { + if config.ProjectID, err = getProjectID(); err != nil { + return fmt.Errorf("failed to get the project ID from Compute Engine: %v", err) + } + } + + if config.zone, err = getZone(); err != nil { + return fmt.Errorf("failed to get zone from Compute Engine: %v", err) + } + + if config.instance, err = getInstanceName(); err != nil { + return fmt.Errorf("failed to get instance from Compute Engine: %v", err) + } + + } else { + if config.ProjectID == "" { + return fmt.Errorf("project ID must be specified in the configuration if running outside of GCP") + } + } + if config.APIAddr == "" { config.APIAddr = apiAddress } diff --git a/vendor/cloud.google.com/go/profiler/profiler_test.go b/vendor/cloud.google.com/go/profiler/profiler_test.go index ce0d8f81c..c18e28234 100644 --- a/vendor/cloud.google.com/go/profiler/profiler_test.go +++ b/vendor/cloud.google.com/go/profiler/profiler_test.go @@ -15,21 +15,27 @@ package profiler import ( + "bytes" + "compress/gzip" "errors" + "fmt" "io" - "runtime/pprof" + "log" + "math/rand" + "os" "strings" "testing" "time" - gcemd "cloud.google.com/go/compute/metadata" "cloud.google.com/go/internal/testutil" "cloud.google.com/go/profiler/mocks" "github.com/golang/mock/gomock" "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" + "github.com/google/pprof/profile" gax "github.com/googleapis/gax-go" "golang.org/x/net/context" + gtransport "google.golang.org/api/transport/grpc" pb "google.golang.org/genproto/googleapis/devtools/cloudprofiler/v2" edpb "google.golang.org/genproto/googleapis/rpc/errdetails" "google.golang.org/grpc/codes" @@ -38,18 +44,21 @@ import ( ) const ( - testProjectID = "test-project-ID" - testInstanceName = "test-instance-name" - testZoneName = "test-zone-name" - testTarget = "test-target" - testService = "test-service" - testServiceVersion = "test-service-version" + testProjectID = "test-project-ID" + testInstance = "test-instance" + testZone = "test-zone" + testTarget = "test-target" + testService = "test-service" + testSvcVersion = "test-service-version" + testProfileDuration = time.Second * 10 + testServerTimeout = time.Second * 15 + wantFunctionName = "profilee" ) func createTestDeployment() *pb.Deployment { labels := map[string]string{ - zoneNameLabel: testZoneName, - versionLabel: testServiceVersion, + zoneNameLabel: testZone, + versionLabel: testSvcVersion, } return &pb.Deployment{ ProjectId: testProjectID, @@ -59,11 +68,10 @@ func createTestDeployment() *pb.Deployment { } func createTestAgent(psc pb.ProfilerServiceClient) *agent { - c := &client{client: psc} return &agent{ - client: c, + client: psc, deployment: createTestDeployment(), - profileLabels: map[string]string{instanceLabel: testInstanceName}, + profileLabels: map[string]string{instanceLabel: testInstance}, } } @@ -98,11 +106,9 @@ func TestCreateProfile(t *testing.T) { } func TestProfileAndUpload(t *testing.T) { + oldStartCPUProfile, oldStopCPUProfile, oldWriteHeapProfile, oldSleep := startCPUProfile, stopCPUProfile, writeHeapProfile, sleep defer func() { - startCPUProfile = pprof.StartCPUProfile - stopCPUProfile = pprof.StopCPUProfile - writeHeapProfile = pprof.WriteHeapProfile - sleep = gax.Sleep + startCPUProfile, stopCPUProfile, writeHeapProfile, sleep = oldStartCPUProfile, oldStopCPUProfile, oldWriteHeapProfile, oldSleep }() ctx := context.Background() @@ -306,118 +312,396 @@ func TestRetry(t *testing.T) { } } -func TestInitializeResources(t *testing.T) { - d := createTestDeployment() - l := map[string]string{instanceLabel: testInstanceName} - - ctx := context.Background() - - a, ctx := initializeResources(ctx, nil, d, l) - - if xg := a.client.xGoogHeader; len(xg) == 0 { - t.Errorf("initializeResources() sets empty xGoogHeader") - } else { - if !strings.Contains(xg[0], "gl-go/") { - t.Errorf("initializeResources() sets wrong xGoogHeader, got: %v, want gl-go key", xg[0]) - } - if !strings.Contains(xg[0], "gccl/") { - t.Errorf("initializeResources() sets wrong xGoogHeader, got: %v, want gccl key", xg[0]) - } - if !strings.Contains(xg[0], "gax/") { - t.Errorf("initializeResources() sets wrong xGoogHeader, got: %v, want gax key", xg[0]) - } - if !strings.Contains(xg[0], "grpc/") { - t.Errorf("initializeResources() sets wrong xGoogHeader, got: %v, want grpc key", xg[0]) - } - } - +func TestWithXGoogHeader(t *testing.T) { + ctx := withXGoogHeader(context.Background()) md, _ := grpcmd.FromOutgoingContext(ctx) - if !testutil.Equal(md[xGoogAPIMetadata], a.client.xGoogHeader) { - t.Errorf("md[%v] = %v, want equal xGoogHeader = %v", xGoogAPIMetadata, md[xGoogAPIMetadata], a.client.xGoogHeader) + if xg := md[xGoogAPIMetadata]; len(xg) == 0 { + t.Errorf("withXGoogHeader() sets empty xGoogHeader") + } else { + if !strings.Contains(xg[0], "gl-go/") { + t.Errorf("withXGoogHeader() got: %v, want gl-go key", xg[0]) + } + if !strings.Contains(xg[0], "gccl/") { + t.Errorf("withXGoogHeader() got: %v, want gccl key", xg[0]) + } + if !strings.Contains(xg[0], "gax/") { + t.Errorf("withXGoogHeader() got: %v, want gax key", xg[0]) + } + if !strings.Contains(xg[0], "grpc/") { + t.Errorf("withXGoogHeader() got: %v, want grpc key", xg[0]) + } } } -func TestInitializeDeployment(t *testing.T) { - defer func() { - getProjectID = gcemd.ProjectID - getZone = gcemd.Zone - config = Config{} - }() - - getProjectID = func() (string, error) { - return testProjectID, nil - } - getZone = func() (string, error) { - return testZoneName, nil - } - - cfg := Config{Service: testService, ServiceVersion: testServiceVersion} - initializeConfig(cfg) - d, err := initializeDeployment() - if err != nil { - t.Errorf("initializeDeployment() got error: %v, want no error", err) - } - - if want := createTestDeployment(); !testutil.Equal(d, want) { - t.Errorf("initializeDeployment() got: %v, want %v", d, want) - } -} - -func TestInitializeConfig(t *testing.T) { +func TestInitializeAgent(t *testing.T) { oldConfig := config defer func() { config = oldConfig }() + for _, tt := range []struct { + config Config + wantDeploymentLabels map[string]string + wantProfileLabels map[string]string + }{ + { + config: Config{ServiceVersion: testSvcVersion, zone: testZone}, + wantDeploymentLabels: map[string]string{zoneNameLabel: testZone, versionLabel: testSvcVersion}, + wantProfileLabels: map[string]string{}, + }, + { + config: Config{zone: testZone}, + wantDeploymentLabels: map[string]string{zoneNameLabel: testZone}, + wantProfileLabels: map[string]string{}, + }, + { + config: Config{ServiceVersion: testSvcVersion}, + wantDeploymentLabels: map[string]string{versionLabel: testSvcVersion}, + wantProfileLabels: map[string]string{}, + }, + { + config: Config{instance: testInstance}, + wantDeploymentLabels: map[string]string{}, + wantProfileLabels: map[string]string{instanceLabel: testInstance}, + }, + } { + + config = tt.config + config.ProjectID = testProjectID + config.Target = testTarget + a := initializeAgent(nil) + + wantDeployment := &pb.Deployment{ + ProjectId: testProjectID, + Target: testTarget, + Labels: tt.wantDeploymentLabels, + } + if !testutil.Equal(a.deployment, wantDeployment) { + t.Errorf("initializeResources() got deployment: %v, want %v", a.deployment, wantDeployment) + } + + if !testutil.Equal(a.profileLabels, tt.wantProfileLabels) { + t.Errorf("initializeResources() got profile labels: %v, want %v", a.profileLabels, tt.wantProfileLabels) + } + } +} + +func TestInitializeConfig(t *testing.T) { + oldConfig, oldService, oldVersion, oldGetProjectID, oldGetInstanceName, oldGetZone, oldOnGCE := config, os.Getenv("GAE_SERVICE"), os.Getenv("GAE_VERSION"), getProjectID, getInstanceName, getZone, onGCE + defer func() { + config, getProjectID, getInstanceName, getZone, onGCE = oldConfig, oldGetProjectID, oldGetInstanceName, oldGetZone, oldOnGCE + if err := os.Setenv("GAE_SERVICE", oldService); err != nil { + t.Fatal(err) + } + if err := os.Setenv("GAE_VERSION", oldVersion); err != nil { + t.Fatal(err) + } + }() + testGAEService := "test-gae-service" + testGAEVersion := "test-gae-version" + testGCEProjectID := "test-gce-project-id" for _, tt := range []struct { config Config - wantTarget string + wantConfig Config wantErrorString string + onGAE bool + onGCE bool }{ { Config{Service: testService}, - testService, + Config{Target: testService, ProjectID: testGCEProjectID, zone: testZone, instance: testInstance}, "", + false, + true, }, { Config{Target: testTarget}, - testTarget, + Config{Target: testTarget, ProjectID: testGCEProjectID, zone: testZone, instance: testInstance}, "", + false, + true, }, { Config{}, - "", + Config{}, "service name must be specified in the configuration", + false, + true, + }, + { + Config{Service: testService}, + Config{Target: testService, ServiceVersion: testGAEVersion, ProjectID: testGCEProjectID, zone: testZone, instance: testInstance}, + "", + true, + true, + }, + { + Config{Target: testTarget}, + Config{Target: testTarget, ServiceVersion: testGAEVersion, ProjectID: testGCEProjectID, zone: testZone, instance: testInstance}, + "", + true, + true, + }, + { + Config{}, + Config{Target: testGAEService, ServiceVersion: testGAEVersion, ProjectID: testGCEProjectID, zone: testZone, instance: testInstance}, + "", + true, + true, + }, + { + Config{Service: testService, ServiceVersion: testSvcVersion}, + Config{Target: testService, ServiceVersion: testSvcVersion, ProjectID: testGCEProjectID, zone: testZone, instance: testInstance}, + "", + false, + true, + }, + { + Config{Service: testService, ServiceVersion: testSvcVersion}, + Config{Target: testService, ServiceVersion: testSvcVersion, ProjectID: testGCEProjectID, zone: testZone, instance: testInstance}, + "", + true, + true, + }, + { + Config{Service: testService, ProjectID: testProjectID}, + Config{Target: testService, ProjectID: testProjectID, zone: testZone, instance: testInstance}, + "", + false, + true, + }, + { + Config{Service: testService}, + Config{Target: testService}, + "project ID must be specified in the configuration if running outside of GCP", + false, + false, }, } { + envService, envVersion := "", "" + if tt.onGAE { + envService, envVersion = testGAEService, testGAEVersion + } + if err := os.Setenv("GAE_SERVICE", envService); err != nil { + t.Fatal(err) + } + if err := os.Setenv("GAE_VERSION", envVersion); err != nil { + t.Fatal(err) + } + if tt.onGCE { + onGCE = func() bool { return true } + getProjectID = func() (string, error) { return testGCEProjectID, nil } + getZone = func() (string, error) { return testZone, nil } + getInstanceName = func() (string, error) { return testInstance, nil } + } else { + onGCE = func() bool { return false } + getProjectID = func() (string, error) { return "", fmt.Errorf("test get project id error") } + getZone = func() (string, error) { return "", fmt.Errorf("test get zone error") } + getInstanceName = func() (string, error) { return "", fmt.Errorf("test get instance error") } + } + errorString := "" if err := initializeConfig(tt.config); err != nil { errorString = err.Error() } - if errorString != tt.wantErrorString { - t.Errorf("initializeConfig(%v) got error: %v, want %v", tt.config, errorString, tt.wantErrorString) + if !strings.Contains(errorString, tt.wantErrorString) { + t.Errorf("initializeConfig(%v) got error: %v, want contain %v", tt.config, errorString, tt.wantErrorString) } - if config.Target != tt.wantTarget { - t.Errorf("initializeConfig(%v) got target: %v, want %v", tt.config, config.Target, tt.wantTarget) + if tt.wantErrorString == "" { + tt.wantConfig.APIAddr = apiAddress + } + tt.wantConfig.Service = tt.config.Service + if config != tt.wantConfig { + t.Errorf("initializeConfig(%v) got: %v, want %v", tt.config, config, tt.wantConfig) + } + } + + for _, tt := range []struct { + wantErrorString string + getProjectIDError bool + getZoneError bool + getInstanceError bool + }{ + { + wantErrorString: "failed to get the project ID from Compute Engine:", + getProjectIDError: true, + }, + { + wantErrorString: "failed to get zone from Compute Engine:", + getZoneError: true, + }, + { + wantErrorString: "failed to get instance from Compute Engine:", + getInstanceError: true, + }, + } { + onGCE = func() bool { return true } + if tt.getProjectIDError { + getProjectID = func() (string, error) { return "", fmt.Errorf("test get project ID error") } + } else { + getProjectID = func() (string, error) { return testGCEProjectID, nil } + } + + if tt.getZoneError { + getZone = func() (string, error) { return "", fmt.Errorf("test get zone error") } + } else { + getZone = func() (string, error) { return testZone, nil } + } + + if tt.getInstanceError { + getInstanceName = func() (string, error) { return "", fmt.Errorf("test get instance error") } + } else { + getInstanceName = func() (string, error) { return testInstance, nil } + } + errorString := "" + if err := initializeConfig(Config{Service: testService}); err != nil { + errorString = err.Error() + } + + if !strings.Contains(errorString, tt.wantErrorString) { + t.Errorf("initializeConfig() got error: %v, want contain %v", errorString, tt.wantErrorString) } } } -func TestInitializeProfileLabels(t *testing.T) { +type fakeProfilerServer struct { + pb.ProfilerServiceServer + count int + gotCPUProfile []byte + gotHeapProfile []byte + done chan bool +} + +func (fs *fakeProfilerServer) CreateProfile(ctx context.Context, in *pb.CreateProfileRequest) (*pb.Profile, error) { + fs.count++ + switch fs.count { + case 1: + return &pb.Profile{Name: "testCPU", ProfileType: pb.ProfileType_CPU, Duration: ptypes.DurationProto(testProfileDuration)}, nil + case 2: + return &pb.Profile{Name: "testHeap", ProfileType: pb.ProfileType_HEAP}, nil + default: + select {} + } +} + +func (fs *fakeProfilerServer) UpdateProfile(ctx context.Context, in *pb.UpdateProfileRequest) (*pb.Profile, error) { + switch in.Profile.ProfileType { + case pb.ProfileType_CPU: + fs.gotCPUProfile = in.Profile.ProfileBytes + case pb.ProfileType_HEAP: + fs.gotHeapProfile = in.Profile.ProfileBytes + fs.done <- true + } + + return in.Profile, nil +} + +func profileeLoop(quit chan bool) { + for { + select { + case <-quit: + return + default: + profileeWork() + } + } +} + +func profileeWork() { + data := make([]byte, 1024*1024) + rand.Read(data) + + var b bytes.Buffer + gz := gzip.NewWriter(&b) + if _, err := gz.Write(data); err != nil { + log.Printf("failed to write to gzip stream", err) + return + } + if err := gz.Flush(); err != nil { + log.Printf("failed to flush to gzip stream", err) + return + } + if err := gz.Close(); err != nil { + log.Printf("failed to close gzip stream", err) + } +} + +func checkSymbolization(p *profile.Profile) error { + for _, l := range p.Location { + if len(l.Line) > 0 && l.Line[0].Function != nil && strings.Contains(l.Line[0].Function.Name, wantFunctionName) { + return nil + } + } + return fmt.Errorf("want function name %v not found in profile", wantFunctionName) +} + +func validateProfile(rawData []byte) error { + p, err := profile.ParseData(rawData) + if err != nil { + return fmt.Errorf("ParseData failed: %v", err) + } + + if len(p.Sample) == 0 { + return fmt.Errorf("profile contains zero samples: %v", p) + } + + if len(p.Location) == 0 { + return fmt.Errorf("profile contains zero locations: %v", p) + } + + if len(p.Function) == 0 { + return fmt.Errorf("profile contains zero functions: %v", p) + } + + if err := checkSymbolization(p); err != nil { + return fmt.Errorf("checkSymbolization failed: %v for %v", err, p) + } + return nil +} + +func TestAgentWithServer(t *testing.T) { + oldDialGRPC, oldConfig := dialGRPC, config defer func() { - getInstanceName = gcemd.InstanceName + dialGRPC, config = oldDialGRPC, oldConfig }() - getInstanceName = func() (string, error) { - return testInstanceName, nil + srv, err := testutil.NewServer() + if err != nil { + t.Fatalf("testutil.NewServer(): %v", err) + } + fakeServer := &fakeProfilerServer{done: make(chan bool)} + pb.RegisterProfilerServiceServer(srv.Gsrv, fakeServer) + + srv.Start() + + dialGRPC = gtransport.DialInsecure + if err := Start(Config{ + Target: testTarget, + ProjectID: testProjectID, + APIAddr: srv.Addr, + instance: testInstance, + zone: testZone, + }); err != nil { + t.Fatalf("Start(): %v", err) } - l := initializeProfileLabels() - want := map[string]string{instanceLabel: testInstanceName} - if !testutil.Equal(l, want) { - t.Errorf("initializeProfileLabels() got: %v, want %v", l, want) + quitProfilee := make(chan bool) + go profileeLoop(quitProfilee) + + select { + case <-fakeServer.done: + case <-time.After(testServerTimeout): + t.Errorf("got timeout after %v, want fake server done", testServerTimeout) + } + quitProfilee <- true + + if err := validateProfile(fakeServer.gotCPUProfile); err != nil { + t.Errorf("validateProfile(gotCPUProfile): %v", err) + } + if err := validateProfile(fakeServer.gotHeapProfile); err != nil { + t.Errorf("validateProfile(gotHeapProfile): %v", err) } } diff --git a/vendor/cloud.google.com/go/pubsub/pubsub.go b/vendor/cloud.google.com/go/pubsub/pubsub.go index b3595e1a7..137d7a1ce 100644 --- a/vendor/cloud.google.com/go/pubsub/pubsub.go +++ b/vendor/cloud.google.com/go/pubsub/pubsub.go @@ -18,10 +18,12 @@ import ( "fmt" "os" "runtime" + "time" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/grpc" + "google.golang.org/grpc/keepalive" "golang.org/x/net/context" ) @@ -66,6 +68,10 @@ func NewClient(ctx context.Context, projectID string, opts ...option.ClientOptio // TODO(grpc/grpc-go#1388) using connection pool without WithBlock // can cause RPCs to fail randomly. We can delete this after the issue is fixed. option.WithGRPCDialOption(grpc.WithBlock()), + + option.WithGRPCDialOption(grpc.WithKeepaliveParams(keepalive.ClientParameters{ + Time: 5 * time.Minute, + })), } } o = append(o, opts...) diff --git a/vendor/cloud.google.com/go/spanner/mutation.go b/vendor/cloud.google.com/go/spanner/mutation.go index 81f25746d..4eac91568 100644 --- a/vendor/cloud.google.com/go/spanner/mutation.go +++ b/vendor/cloud.google.com/go/spanner/mutation.go @@ -126,7 +126,7 @@ type Mutation struct { // op is the operation type of the mutation. // See documentation for spanner.op for more details. op op - // Table is the name of the taget table to be modified. + // Table is the name of the target table to be modified. table string // keySet is a set of primary keys that names the rows // in a delete operation. diff --git a/vendor/cloud.google.com/go/spanner/session.go b/vendor/cloud.google.com/go/spanner/session.go index cbfe82402..ccd904a54 100644 --- a/vendor/cloud.google.com/go/spanner/session.go +++ b/vendor/cloud.google.com/go/spanner/session.go @@ -948,8 +948,12 @@ func (hc *healthChecker) worker(i int) { ws := getNextForTx() if ws != nil { ctx, cancel := context.WithTimeout(context.Background(), time.Second) - defer cancel() - ws.prepareForWrite(contextWithOutgoingMetadata(ctx, hc.pool.md)) + err := ws.prepareForWrite(contextWithOutgoingMetadata(ctx, hc.pool.md)) + cancel() + if err != nil { + // TODO(dixiao): handle error properly + log.Errorf("prepareForWrite failed: %v", err) + } hc.pool.recycle(ws) hc.pool.mu.Lock() hc.pool.prepareReqs-- diff --git a/vendor/cloud.google.com/go/speech/apiv1/doc.go b/vendor/cloud.google.com/go/speech/apiv1/doc.go index b3d55ab65..ceea385f6 100644 --- a/vendor/cloud.google.com/go/speech/apiv1/doc.go +++ b/vendor/cloud.google.com/go/speech/apiv1/doc.go @@ -14,7 +14,7 @@ // AUTO-GENERATED CODE. DO NOT EDIT. -// Package speech is an experimental, auto-generated package for the +// Package speech is an auto-generated package for the // Google Cloud Speech API. // // Google Cloud Speech API. diff --git a/vendor/cloud.google.com/go/storage/bucket.go b/vendor/cloud.google.com/go/storage/bucket.go index 310d02784..07852a507 100644 --- a/vendor/cloud.google.com/go/storage/bucket.go +++ b/vendor/cloud.google.com/go/storage/bucket.go @@ -197,8 +197,10 @@ func (b *BucketHandle) newPatchCall(uattrs *BucketAttrsToUpdate) (*raw.BucketsPa } // BucketAttrs represents the metadata for a Google Cloud Storage bucket. +// Read-only fields are ignored by BucketHandle.Create. type BucketAttrs struct { // Name is the name of the bucket. + // This field is read-only. Name string // ACL is the list of access control rules on the bucket. @@ -212,6 +214,7 @@ type BucketAttrs struct { Location string // MetaGeneration is the metadata generation of the bucket. + // This field is read-only. MetaGeneration int64 // StorageClass is the default storage class of the bucket. This defines @@ -224,10 +227,10 @@ type BucketAttrs struct { StorageClass string // Created is the creation time of the bucket. + // This field is read-only. Created time.Time // VersioningEnabled reports whether this bucket has versioning enabled. - // This field is read-only. VersioningEnabled bool // Labels are the bucket's labels. diff --git a/vendor/cloud.google.com/go/storage/go110.go.pending b/vendor/cloud.google.com/go/storage/go110.go similarity index 100% rename from vendor/cloud.google.com/go/storage/go110.go.pending rename to vendor/cloud.google.com/go/storage/go110.go diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go index 82c0ddbf5..84a7ea3b0 100644 --- a/vendor/cloud.google.com/go/storage/storage.go +++ b/vendor/cloud.google.com/go/storage/storage.go @@ -110,7 +110,10 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error // // Close need not be called at program exit. func (c *Client) Close() error { + // Set fields to nil so that subsequent uses + // will panic. c.hc = nil + c.raw = nil return nil } @@ -346,11 +349,17 @@ func (o *ObjectHandle) Update(ctx context.Context, uattrs ObjectAttrsToUpdate) ( var forceSendFields, nullFields []string if uattrs.ContentType != nil { attrs.ContentType = optional.ToString(uattrs.ContentType) - forceSendFields = append(forceSendFields, "ContentType") + // For ContentType, sending the empty string is a no-op. + // Instead we send a null. + if attrs.ContentType == "" { + nullFields = append(nullFields, "ContentType") + } else { + forceSendFields = append(forceSendFields, "ContentType") + } } if uattrs.ContentLanguage != nil { attrs.ContentLanguage = optional.ToString(uattrs.ContentLanguage) - // For ContentLanguage It's an error to send the empty string. + // For ContentLanguage it's an error to send the empty string. // Instead we send a null. if attrs.ContentLanguage == "" { nullFields = append(nullFields, "ContentLanguage") diff --git a/vendor/cloud.google.com/go/storage/writer.go b/vendor/cloud.google.com/go/storage/writer.go index 109112c62..28eb74afd 100644 --- a/vendor/cloud.google.com/go/storage/writer.go +++ b/vendor/cloud.google.com/go/storage/writer.go @@ -87,7 +87,7 @@ func (w *Writer) open() error { w.opened = true if w.ChunkSize < 0 { - return errors.New("storage: Writer.ChunkSize must non-negative") + return errors.New("storage: Writer.ChunkSize must be non-negative") } mediaOpts := []googleapi.MediaOption{ googleapi.ChunkSize(w.ChunkSize), @@ -125,14 +125,21 @@ func (w *Writer) open() error { call.UserProject(w.o.userProject) } setClientHeader(call.Header()) - // We will only retry here if the initial POST, which obtains a URI for - // the resumable upload, fails with a retryable error. The upload itself - // has its own retry logic. - err = runWithRetry(w.ctx, func() error { - var err2 error - resp, err2 = call.Do() - return err2 - }) + // If the chunk size is zero, then no chunking is done on the Reader, + // which means we cannot retry: the first call will read the data, and if + // it fails, there is no way to re-read. + if w.ChunkSize == 0 { + resp, err = call.Do() + } else { + // We will only retry here if the initial POST, which obtains a URI for + // the resumable upload, fails with a retryable error. The upload itself + // has its own retry logic. + err = runWithRetry(w.ctx, func() error { + var err2 error + resp, err2 = call.Do() + return err2 + }) + } } if err != nil { w.err = err diff --git a/vendor/cloud.google.com/go/storage/writer_test.go b/vendor/cloud.google.com/go/storage/writer_test.go index 41321a333..c04b4a5b3 100644 --- a/vendor/cloud.google.com/go/storage/writer_test.go +++ b/vendor/cloud.google.com/go/storage/writer_test.go @@ -33,6 +33,7 @@ import ( type fakeTransport struct { gotReq *http.Request + gotBody []byte results []transportResult } @@ -47,6 +48,14 @@ func (t *fakeTransport) addResult(res *http.Response, err error) { func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) { t.gotReq = req + t.gotBody = nil + if req.Body != nil { + bytes, err := ioutil.ReadAll(req.Body) + if err != nil { + return nil, err + } + t.gotBody = bytes + } if len(t.results) == 0 { return nil, fmt.Errorf("error handling request") } @@ -58,6 +67,7 @@ func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) { func TestErrorOnObjectsInsertCall(t *testing.T) { t.Parallel() ctx := context.Background() + const contents = "hello world" doWrite := func(hc *http.Client) *Writer { client, err := NewClient(ctx, option.WithHTTPClient(hc)) @@ -69,7 +79,7 @@ func TestErrorOnObjectsInsertCall(t *testing.T) { // We can't check that the Write fails, since it depends on the write to the // underling fakeTransport failing which is racy. - wc.Write([]byte("hello world")) + wc.Write([]byte(contents)) return wc } @@ -94,6 +104,10 @@ func TestErrorOnObjectsInsertCall(t *testing.T) { if err := wc.Close(); err != nil { t.Errorf("got %v, want nil", err) } + got := string(ft.gotBody) + if !strings.Contains(got, contents) { + t.Errorf("got body %q, which does not contain %q", got, contents) + } } func TestEncryption(t *testing.T) { diff --git a/vendor/cloud.google.com/go/trace/grpc.go b/vendor/cloud.google.com/go/trace/grpc.go index ca7b46436..e78f4a217 100644 --- a/vendor/cloud.google.com/go/trace/grpc.go +++ b/vendor/cloud.google.com/go/trace/grpc.go @@ -29,10 +29,16 @@ const grpcMetadataKey = "grpc-trace-bin" // GRPCClientInterceptor returns a grpc.UnaryClientInterceptor that traces all outgoing requests from a gRPC client. // The calling context should already have a *trace.Span; a child span will be // created for the outgoing gRPC call. If the calling context doesn't have a span, -// the call will not be traced. +// the call will not be traced. If the client is nil, then the interceptor just +// passes through the request. // // The functionality in gRPC that this feature relies on is currently experimental. func (c *Client) GRPCClientInterceptor() grpc.UnaryClientInterceptor { + if c == nil { + return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { + return invoker(ctx, method, req, reply, cc, opts...) + } + } return grpc.UnaryClientInterceptor(c.grpcUnaryInterceptor) } @@ -75,8 +81,15 @@ func (c *Client) grpcUnaryInterceptor(ctx context.Context, method string, req, r // // span := trace.FromContext(ctx) // +// If the client is nil, then the interceptor just invokes the handler. +// // The functionality in gRPC that this feature relies on is currently experimental. func (c *Client) GRPCServerInterceptor() grpc.UnaryServerInterceptor { + if c == nil { + return func(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + return handler(ctx, req) + } + } return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { md, _ := metadata.FromIncomingContext(ctx) var traceHeader string diff --git a/vendor/cloud.google.com/go/trace/http.go b/vendor/cloud.google.com/go/trace/http.go index e06fb5781..290d13960 100644 --- a/vendor/cloud.google.com/go/trace/http.go +++ b/vendor/cloud.google.com/go/trace/http.go @@ -69,6 +69,9 @@ func (t Transport) base() http.RoundTripper { // // The span will be auto finished by the handler. func (c *Client) HTTPHandler(h http.Handler) http.Handler { + if c == nil { + return h + } return &handler{traceClient: c, handler: h} } @@ -101,5 +104,4 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set(httpHeader, spanHeader(traceID, parentSpanID, span.trace.localOptions)) } h.handler.ServeHTTP(w, r) - } diff --git a/vendor/cloud.google.com/go/trace/trace.go b/vendor/cloud.google.com/go/trace/trace.go index cecd3856a..dab494d98 100644 --- a/vendor/cloud.google.com/go/trace/trace.go +++ b/vendor/cloud.google.com/go/trace/trace.go @@ -254,7 +254,8 @@ func nextTraceID() string { return fmt.Sprintf("%016x%016x", id1, id2) } -// Client is a client for uploading traces to the Google Stackdriver Trace server. +// Client is a client for uploading traces to the Google Stackdriver Trace service. +// A nil Client will no-op for all of its methods. type Client struct { service *api.Service projectID string @@ -310,13 +311,13 @@ func (c *Client) SetSamplingPolicy(p SamplingPolicy) { } } -// SpanFromHeader returns a new trace span, based on a provided request header -// value. See https://cloud.google.com/trace/docs/faq. -// -// It returns nil iff the client is nil. +// SpanFromHeader returns a new trace span based on a provided request header +// value or nil iff the client is nil. // // The trace information and identifiers will be read from the header value. // Otherwise, a new trace ID is made and the parent span ID is zero. +// For the exact format of the header value, see +// https://cloud.google.com/trace/docs/support#how_do_i_force_a_request_to_be_traced // // The name of the new span is provided as an argument. // @@ -352,9 +353,8 @@ func (c *Client) SpanFromHeader(name string, header string) *Span { return span } -// SpanFromRequest returns a new trace span for an HTTP request. -// -// It returns nil iff the client is nil. +// SpanFromRequest returns a new trace span for an HTTP request or nil +// iff the client is nil. // // If the incoming HTTP request contains a trace context header, the trace ID, // parent span ID, and tracing options will be read from that header. @@ -390,7 +390,8 @@ func (c *Client) SpanFromRequest(r *http.Request) *Span { return span } -// NewSpan returns a new trace span with the given name. +// NewSpan returns a new trace span with the given name or nil iff the +// client is nil. // // A new trace and span ID is generated to trace the span. // Returned span need to be finished by calling Finish or FinishWait. diff --git a/vendor/cloud.google.com/go/vision/annotations.go b/vendor/cloud.google.com/go/vision/annotations.go deleted file mode 100644 index f38c0f836..000000000 --- a/vendor/cloud.google.com/go/vision/annotations.go +++ /dev/null @@ -1,689 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision - -import ( - "image" - - "golang.org/x/text/language" - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" -) - -// Annotations contains all the annotations performed by the API on a single image. -// A nil field indicates either that the corresponding feature was not requested, -// or that annotation failed for that feature. -type Annotations struct { - // Faces holds the results of face detection. - Faces []*FaceAnnotation - // Landmarks holds the results of landmark detection. - Landmarks []*EntityAnnotation - // Logos holds the results of logo detection. - Logos []*EntityAnnotation - // Labels holds the results of label detection. - Labels []*EntityAnnotation - // Texts holds the results of text detection. - Texts []*EntityAnnotation - // FullText holds the results of full text (OCR) detection. - FullText *TextAnnotation - // SafeSearch holds the results of safe-search detection. - SafeSearch *SafeSearchAnnotation - // ImageProps contains properties of the annotated image. - ImageProps *ImageProps - // Web contains web annotations for the image. - Web *WebDetection - // CropHints contains crop hints for the image. - CropHints []*CropHint - - // If non-nil, then one or more of the attempted annotations failed. - // Non-nil annotations are guaranteed to be correct, even if Error is - // non-nil. - Error error -} - -func annotationsFromProto(res *pb.AnnotateImageResponse) *Annotations { - as := &Annotations{} - for _, a := range res.FaceAnnotations { - as.Faces = append(as.Faces, faceAnnotationFromProto(a)) - } - for _, a := range res.LandmarkAnnotations { - as.Landmarks = append(as.Landmarks, entityAnnotationFromProto(a)) - } - for _, a := range res.LogoAnnotations { - as.Logos = append(as.Logos, entityAnnotationFromProto(a)) - } - for _, a := range res.LabelAnnotations { - as.Labels = append(as.Labels, entityAnnotationFromProto(a)) - } - for _, a := range res.TextAnnotations { - as.Texts = append(as.Texts, entityAnnotationFromProto(a)) - } - as.FullText = textAnnotationFromProto(res.FullTextAnnotation) - as.SafeSearch = safeSearchAnnotationFromProto(res.SafeSearchAnnotation) - as.ImageProps = imagePropertiesFromProto(res.ImagePropertiesAnnotation) - as.Web = webDetectionFromProto(res.WebDetection) - as.CropHints = cropHintsFromProto(res.CropHintsAnnotation) - if res.Error != nil { - // res.Error is a google.rpc.Status. Convert to a Go error. Use a gRPC - // error because it preserves the code as a separate field. - // TODO(jba): preserve the details field. - as.Error = grpc.Errorf(codes.Code(res.Error.Code), "%s", res.Error.Message) - } - return as -} - -// A FaceAnnotation describes the results of face detection on an image. -type FaceAnnotation struct { - // BoundingPoly is the bounding polygon around the face. The coordinates of - // the bounding box are in the original image's scale, as returned in - // ImageParams. The bounding box is computed to "frame" the face in - // accordance with human expectations. It is based on the landmarker - // results. Note that one or more x and/or y coordinates may not be - // generated in the BoundingPoly (the polygon will be unbounded) if only a - // partial face appears in the image to be annotated. - BoundingPoly []image.Point - - // FDBoundingPoly is tighter than BoundingPoly, and - // encloses only the skin part of the face. Typically, it is used to - // eliminate the face from any image analysis that detects the "amount of - // skin" visible in an image. It is not based on the landmarker results, only - // on the initial face detection, hence the fd (face detection) prefix. - FDBoundingPoly []image.Point - - // Landmarks are detected face landmarks. - Face FaceLandmarks - - // RollAngle indicates the amount of clockwise/anti-clockwise rotation of - // the face relative to the image vertical, about the axis perpendicular to - // the face. Range [-180,180]. - RollAngle float32 - - // PanAngle is the yaw angle: the leftward/rightward angle that the face is - // pointing, relative to the vertical plane perpendicular to the image. Range - // [-180,180]. - PanAngle float32 - - // TiltAngle is the pitch angle: the upwards/downwards angle that the face is - // pointing relative to the image's horizontal plane. Range [-180,180]. - TiltAngle float32 - - // DetectionConfidence is the detection confidence. The range is [0, 1]. - DetectionConfidence float32 - - // LandmarkingConfidence is the face landmarking confidence. The range is [0, 1]. - LandmarkingConfidence float32 - - // Likelihoods expresses the likelihood of various aspects of the face. - Likelihoods *FaceLikelihoods -} - -func faceAnnotationFromProto(pfa *pb.FaceAnnotation) *FaceAnnotation { - fa := &FaceAnnotation{ - BoundingPoly: boundingPolyFromProto(pfa.BoundingPoly), - FDBoundingPoly: boundingPolyFromProto(pfa.FdBoundingPoly), - RollAngle: pfa.RollAngle, - PanAngle: pfa.PanAngle, - TiltAngle: pfa.TiltAngle, - DetectionConfidence: pfa.DetectionConfidence, - LandmarkingConfidence: pfa.LandmarkingConfidence, - Likelihoods: &FaceLikelihoods{ - Joy: Likelihood(pfa.JoyLikelihood), - Sorrow: Likelihood(pfa.SorrowLikelihood), - Anger: Likelihood(pfa.AngerLikelihood), - Surprise: Likelihood(pfa.SurpriseLikelihood), - UnderExposed: Likelihood(pfa.UnderExposedLikelihood), - Blurred: Likelihood(pfa.BlurredLikelihood), - Headwear: Likelihood(pfa.HeadwearLikelihood), - }, - } - populateFaceLandmarks(pfa.Landmarks, &fa.Face) - return fa -} - -// An EntityAnnotation describes the results of a landmark, label, logo or text -// detection on an image. -type EntityAnnotation struct { - // ID is an opaque entity ID. Some IDs might be available in Knowledge Graph(KG). - // For more details on KG please see: - // https://developers.google.com/knowledge-graph/ - ID string - - // Locale is the language code for the locale in which the entity textual - // description (next field) is expressed. - Locale string - - // Description is the entity textual description, expressed in the language of Locale. - Description string - - // Score is the overall score of the result. Range [0, 1]. - Score float32 - - // Confidence is the accuracy of the entity detection in an image. - // For example, for an image containing the Eiffel Tower, this field represents - // the confidence that there is a tower in the query image. Range [0, 1]. - Confidence float32 - - // Topicality is the relevancy of the ICA (Image Content Annotation) label to the - // image. For example, the relevancy of 'tower' to an image containing - // 'Eiffel Tower' is likely higher than an image containing a distant towering - // building, though the confidence that there is a tower may be the same. - // Range [0, 1]. - Topicality float32 - - // BoundingPoly is the image region to which this entity belongs. Not filled currently - // for label detection. For text detection, BoundingPolys - // are produced for the entire text detected in an image region, followed by - // BoundingPolys for each word within the detected text. - BoundingPoly []image.Point - - // Locations contains the location information for the detected entity. - // Multiple LatLng structs can be present since one location may indicate the - // location of the scene in the query image, and another the location of the - // place where the query image was taken. Location information is usually - // present for landmarks. - Locations []LatLng - - // Properties are additional optional Property fields. - // For example a different kind of score or string that qualifies the entity. - Properties []Property -} - -func entityAnnotationFromProto(e *pb.EntityAnnotation) *EntityAnnotation { - var locs []LatLng - for _, li := range e.Locations { - locs = append(locs, latLngFromProto(li.LatLng)) - } - var props []Property - for _, p := range e.Properties { - props = append(props, propertyFromProto(p)) - } - return &EntityAnnotation{ - ID: e.Mid, - Locale: e.Locale, - Description: e.Description, - Score: e.Score, - Confidence: e.Confidence, - Topicality: e.Topicality, - BoundingPoly: boundingPolyFromProto(e.BoundingPoly), - Locations: locs, - Properties: props, - } -} - -// TextAnnotation contains a structured representation of OCR extracted text. -// The hierarchy of an OCR extracted text structure looks like: -// TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol -// Each structural component, starting from Page, may further have its own -// properties. Properties describe detected languages, breaks etc. -type TextAnnotation struct { - // List of pages detected by OCR. - Pages []*Page - // UTF-8 text detected on the pages. - Text string -} - -func textAnnotationFromProto(pta *pb.TextAnnotation) *TextAnnotation { - if pta == nil { - return nil - } - var pages []*Page - for _, p := range pta.Pages { - pages = append(pages, pageFromProto(p)) - } - return &TextAnnotation{ - Pages: pages, - Text: pta.Text, - } -} - -// A Page is a page of text detected from OCR. -type Page struct { - // Additional information detected on the page. - Properties *TextProperties - // Page width in pixels. - Width int32 - // Page height in pixels. - Height int32 - // List of blocks of text, images etc on this page. - Blocks []*Block -} - -func pageFromProto(p *pb.Page) *Page { - if p == nil { - return nil - } - var blocks []*Block - for _, b := range p.Blocks { - blocks = append(blocks, blockFromProto(b)) - } - return &Page{ - Properties: textPropertiesFromProto(p.Property), - Width: p.Width, - Height: p.Height, - Blocks: blocks, - } -} - -// A Block is a logical element on the page. -type Block struct { - // Additional information detected for the block. - Properties *TextProperties - // The bounding box for the block. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingBox []image.Point - // List of paragraphs in this block (if this blocks is of type text). - Paragraphs []*Paragraph - // Detected block type (text, image etc) for this block. - BlockType BlockType -} - -// A BlockType represents the kind of Block (text, image, etc.) -type BlockType int - -const ( - // Unknown block type. - UnknownBlock BlockType = BlockType(pb.Block_UNKNOWN) - // Regular text block. - TextBlock BlockType = BlockType(pb.Block_TEXT) - // Table block. - TableBlock BlockType = BlockType(pb.Block_TABLE) - // Image block. - PictureBlock BlockType = BlockType(pb.Block_PICTURE) - // Horizontal/vertical line box. - RulerBlock BlockType = BlockType(pb.Block_RULER) - // Barcode block. - BarcodeBlock BlockType = BlockType(pb.Block_BARCODE) -) - -func blockFromProto(p *pb.Block) *Block { - if p == nil { - return nil - } - var paras []*Paragraph - for _, pa := range p.Paragraphs { - paras = append(paras, paragraphFromProto(pa)) - } - return &Block{ - Properties: textPropertiesFromProto(p.Property), - BoundingBox: boundingPolyFromProto(p.BoundingBox), - Paragraphs: paras, - BlockType: BlockType(p.BlockType), - } -} - -// A Paragraph is a structural unit of text representing a number of words in -// certain order. -type Paragraph struct { - // Additional information detected for the paragraph. - Properties *TextProperties - // The bounding box for the paragraph. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingBox []image.Point - // List of words in this paragraph. - Words []*Word -} - -func paragraphFromProto(p *pb.Paragraph) *Paragraph { - if p == nil { - return nil - } - var words []*Word - for _, w := range p.Words { - words = append(words, wordFromProto(w)) - } - return &Paragraph{ - Properties: textPropertiesFromProto(p.Property), - BoundingBox: boundingPolyFromProto(p.BoundingBox), - Words: words, - } -} - -// A Word is a word in a text document. -type Word struct { - // Additional information detected for the word. - Properties *TextProperties - // The bounding box for the word. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingBox []image.Point - // List of symbols in the word. - // The order of the symbols follows the natural reading order. - Symbols []*Symbol -} - -func wordFromProto(p *pb.Word) *Word { - if p == nil { - return nil - } - var syms []*Symbol - for _, s := range p.Symbols { - syms = append(syms, symbolFromProto(s)) - } - return &Word{ - Properties: textPropertiesFromProto(p.Property), - BoundingBox: boundingPolyFromProto(p.BoundingBox), - Symbols: syms, - } -} - -// A Symbol is a symbol in a text document. -type Symbol struct { - // Additional information detected for the symbol. - Properties *TextProperties - // The bounding box for the symbol. - // The vertices are in the order of top-left, top-right, bottom-right, - // bottom-left. When a rotation of the bounding box is detected the rotation - // is represented as around the top-left corner as defined when the text is - // read in the 'natural' orientation. - // For example: - // * when the text is horizontal it might look like: - // 0----1 - // | | - // 3----2 - // * when it's rotated 180 degrees around the top-left corner it becomes: - // 2----3 - // | | - // 1----0 - // and the vertice order will still be (0, 1, 2, 3). - BoundingBox []image.Point - // The actual UTF-8 representation of the symbol. - Text string -} - -func symbolFromProto(p *pb.Symbol) *Symbol { - if p == nil { - return nil - } - return &Symbol{ - Properties: textPropertiesFromProto(p.Property), - BoundingBox: boundingPolyFromProto(p.BoundingBox), - Text: p.Text, - } -} - -// TextProperties contains additional information about an OCR structural component. -type TextProperties struct { - // A list of detected languages together with confidence. - DetectedLanguages []*DetectedLanguage - // Detected start or end of a text segment. - DetectedBreak *DetectedBreak -} - -// Detected language for a structural component. -type DetectedLanguage struct { - // The BCP-47 language code, such as "en-US" or "sr-Latn". - Code language.Tag - // The confidence of the detected language, in the range [0, 1]. - Confidence float32 -} - -// DetectedBreak is the detected start or end of a structural component. -type DetectedBreak struct { - // The type of break. - Type DetectedBreakType - // True if break prepends the element. - IsPrefix bool -} - -type DetectedBreakType int - -const ( - // Unknown break label type. - UnknownBreak = DetectedBreakType(pb.TextAnnotation_DetectedBreak_UNKNOWN) - // Regular space. - SpaceBreak = DetectedBreakType(pb.TextAnnotation_DetectedBreak_SPACE) - // Sure space (very wide). - SureSpaceBreak = DetectedBreakType(pb.TextAnnotation_DetectedBreak_SURE_SPACE) - // Line-wrapping break. - EOLSureSpaceBreak = DetectedBreakType(pb.TextAnnotation_DetectedBreak_EOL_SURE_SPACE) - // End-line hyphen that is not present in text; does not co-occur with SPACE, LEADER_SPACE, or LINE_BREAK. - HyphenBreak = DetectedBreakType(pb.TextAnnotation_DetectedBreak_HYPHEN) - // Line break that ends a paragraph. - LineBreak = DetectedBreakType(pb.TextAnnotation_DetectedBreak_LINE_BREAK) -) - -func textPropertiesFromProto(p *pb.TextAnnotation_TextProperty) *TextProperties { - var dls []*DetectedLanguage - for _, dl := range p.DetectedLanguages { - tag, _ := language.Parse(dl.LanguageCode) - // Ignore error. If err != nil the returned tag will not be garbage, - // but a best-effort attempt at a parse. At worst it will be - // language.Und, the documented "undefined" Tag. - dls = append(dls, &DetectedLanguage{Code: tag, Confidence: dl.Confidence}) - } - var db *DetectedBreak - if p.DetectedBreak != nil { - db = &DetectedBreak{ - Type: DetectedBreakType(p.DetectedBreak.Type), - IsPrefix: p.DetectedBreak.IsPrefix, - } - } - return &TextProperties{ - DetectedLanguages: dls, - DetectedBreak: db, - } -} - -// SafeSearchAnnotation describes the results of a SafeSearch detection on an image. -type SafeSearchAnnotation struct { - // Adult is the likelihood that the image contains adult content. - Adult Likelihood - - // Spoof is the likelihood that an obvious modification was made to the - // image's canonical version to make it appear funny or offensive. - Spoof Likelihood - - // Medical is the likelihood that this is a medical image. - Medical Likelihood - - // Violence is the likelihood that this image represents violence. - Violence Likelihood -} - -func safeSearchAnnotationFromProto(s *pb.SafeSearchAnnotation) *SafeSearchAnnotation { - if s == nil { - return nil - } - return &SafeSearchAnnotation{ - Adult: Likelihood(s.Adult), - Spoof: Likelihood(s.Spoof), - Medical: Likelihood(s.Medical), - Violence: Likelihood(s.Violence), - } -} - -// ImageProps describes properties of the image itself, like the dominant colors. -type ImageProps struct { - // DominantColors describes the dominant colors of the image. - DominantColors []*ColorInfo -} - -func imagePropertiesFromProto(ip *pb.ImageProperties) *ImageProps { - if ip == nil || ip.DominantColors == nil { - return nil - } - var cinfos []*ColorInfo - for _, ci := range ip.DominantColors.Colors { - cinfos = append(cinfos, colorInfoFromProto(ci)) - } - return &ImageProps{DominantColors: cinfos} -} - -// WebDetection contains relevant information for the image from the Internet. -type WebDetection struct { - // Deduced entities from similar images on the Internet. - WebEntities []*WebEntity - // Fully matching images from the Internet. - // They're definite neardups and most often a copy of the query image with - // merely a size change. - FullMatchingImages []*WebImage - // Partial matching images from the Internet. - // Those images are similar enough to share some key-point features. For - // example an original image will likely have partial matching for its crops. - PartialMatchingImages []*WebImage - // Web pages containing the matching images from the Internet. - PagesWithMatchingImages []*WebPage -} - -func webDetectionFromProto(p *pb.WebDetection) *WebDetection { - if p == nil { - return nil - } - var ( - wes []*WebEntity - fmis, pmis []*WebImage - wps []*WebPage - ) - for _, e := range p.WebEntities { - wes = append(wes, webEntityFromProto(e)) - } - for _, m := range p.FullMatchingImages { - fmis = append(fmis, webImageFromProto(m)) - } - for _, m := range p.PartialMatchingImages { - pmis = append(fmis, webImageFromProto(m)) - } - for _, g := range p.PagesWithMatchingImages { - wps = append(wps, webPageFromProto(g)) - } - return &WebDetection{ - WebEntities: wes, - FullMatchingImages: fmis, - PartialMatchingImages: pmis, - PagesWithMatchingImages: wps, - } -} - -// A WebEntity is an entity deduced from similar images on the Internet. -type WebEntity struct { - // Opaque entity ID. - ID string - // Overall relevancy score for the entity. - // Not normalized and not comparable across different image queries. - Score float32 - // Canonical description of the entity, in English. - Description string -} - -func webEntityFromProto(p *pb.WebDetection_WebEntity) *WebEntity { - return &WebEntity{ - ID: p.EntityId, - Score: p.Score, - Description: p.Description, - } -} - -// WebImage contains metadata for online images. -type WebImage struct { - // The result image URL. - URL string - // Overall relevancy score for the image. - // Not normalized and not comparable across different image queries. - Score float32 -} - -func webImageFromProto(p *pb.WebDetection_WebImage) *WebImage { - return &WebImage{ - URL: p.Url, - Score: p.Score, - } -} - -// A WebPage contains metadata for web pages. -type WebPage struct { - // The result web page URL. - URL string - // Overall relevancy score for the web page. - // Not normalized and not comparable across different image queries. - Score float32 -} - -func webPageFromProto(p *pb.WebDetection_WebPage) *WebPage { - return &WebPage{ - URL: p.Url, - Score: p.Score, - } -} - -// CropHint is a single crop hint that is used to generate a new crop when -// serving an image. -type CropHint struct { - // The bounding polygon for the crop region. The coordinates of the bounding - // box are in the original image's scale, as returned in `ImageParams`. - BoundingPoly []image.Point - // Confidence of this being a salient region. Range [0, 1]. - Confidence float32 - // Fraction of importance of this salient region with respect to the original - // image. - ImportanceFraction float32 -} - -func cropHintsFromProto(p *pb.CropHintsAnnotation) []*CropHint { - if p == nil { - return nil - } - var chs []*CropHint - for _, pch := range p.CropHints { - chs = append(chs, cropHintFromProto(pch)) - } - return chs -} - -func cropHintFromProto(pch *pb.CropHint) *CropHint { - return &CropHint{ - BoundingPoly: boundingPolyFromProto(pch.BoundingPoly), - Confidence: pch.Confidence, - ImportanceFraction: pch.ImportanceFraction, - } -} diff --git a/vendor/cloud.google.com/go/vision/apiv1/doc.go b/vendor/cloud.google.com/go/vision/apiv1/doc.go index e89490a98..ba3c99fb0 100644 --- a/vendor/cloud.google.com/go/vision/apiv1/doc.go +++ b/vendor/cloud.google.com/go/vision/apiv1/doc.go @@ -14,14 +14,12 @@ // AUTO-GENERATED CODE. DO NOT EDIT. -// Package vision is an experimental, auto-generated package for the +// Package vision is an auto-generated package for the // Google Cloud Vision API. // // Integrates Google Vision features, including image labeling, face, logo, // and landmark detection, optical character recognition (OCR), and detection // of explicit content, into applications. -// -// Use the client at cloud.google.com/go/vision in preference to this. package vision // import "cloud.google.com/go/vision/apiv1" import ( diff --git a/vendor/cloud.google.com/go/vision/apiv1/image_annotator_client.go b/vendor/cloud.google.com/go/vision/apiv1/image_annotator_client.go index b02e6d79d..a7aebd584 100644 --- a/vendor/cloud.google.com/go/vision/apiv1/image_annotator_client.go +++ b/vendor/cloud.google.com/go/vision/apiv1/image_annotator_client.go @@ -92,7 +92,7 @@ func NewImageAnnotatorClient(ctx context.Context, opts ...option.ClientOption) ( imageAnnotatorClient: visionpb.NewImageAnnotatorClient(conn), } - c.SetGoogleClientInfo() + c.setGoogleClientInfo() return c, nil } @@ -107,10 +107,10 @@ func (c *ImageAnnotatorClient) Close() error { return c.conn.Close() } -// SetGoogleClientInfo sets the name and version of the application in +// setGoogleClientInfo sets the name and version of the application in // the `x-goog-api-client` header passed on each request. Intended for // use by Google-written clients. -func (c *ImageAnnotatorClient) SetGoogleClientInfo(keyval ...string) { +func (c *ImageAnnotatorClient) setGoogleClientInfo(keyval ...string) { kv := append([]string{"gl-go", version.Go()}, keyval...) kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version) c.xGoogHeader = []string{gax.XGoogHeader(kv...)} diff --git a/vendor/cloud.google.com/go/vision/doc.go b/vendor/cloud.google.com/go/vision/doc.go deleted file mode 100644 index 5121a9888..000000000 --- a/vendor/cloud.google.com/go/vision/doc.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/* -NOTE: This package is deprecated. Use cloud.google.com/go/vision/apiv1 instead. - - -Package vision provides a client for the Google Cloud Vision API. - -Google Cloud Vision allows easy integration of vision detection features -into developer applications, including image labeling, face and landmark -detection, optical character recognition (OCR), and tagging of explicit -content. For more information about Cloud Vision, read the Google Cloud Vision API -Documentation at https://cloud.google.com/vision/docs. - -Note: This package is in beta. Some backwards-incompatible changes may occur. - -Creating Images - -The Cloud Vision API supports a variety of image file formats, including JPEG, -PNG8, PNG24, Animated GIF (first frame only), and RAW. See -https://cloud.google.com/vision/docs/image-best-practices#image_types for the -complete list of formats. Be aware that Cloud Vision sets upper limits on file -size as well as on the total combined size of all images in a request. Reducing -your file size can significantly improve throughput; however, be careful not to -reduce image quality in the process. See -https://cloud.google.com/vision/docs/image-best-practices#image_sizing for -current file size limits. - -Creating an Image instance does not perform an API request. - -Use NewImageFromReader to obtain an image from any io.Reader, such as an open file: - - f, err := os.Open("path/to/image.jpg") - if err != nil { ... } - defer f.Close() - img, err := vision.NewImageFromReader(f) - if err != nil { ... } - -Use NewImageFromURI to refer to an image in Google Cloud Storage or a public URL: - - img := vision.NewImageFromURI("gs://my-bucket/my-image.png") - -Annotating Images - -Client.Annotate is the most general method in the package. It can run multiple -detections on multiple images with a single API call. - -To describe the detections you want to perform on an image, create an -AnnotateRequest and specify the maximum number of results to return for each -detection of interest. The exceptions are safe search and image properties, -where a boolean is used instead. - - resultSlice, err := client.Annotate(ctx, &vision.AnnotateRequest{ - Image: img, - MaxLogos: 5, - MaxTexts: 100, - SafeSearch: true, - }) - if err != nil { ... } - -You can pass as many AnnotateRequests as desired to client.Annotate. The return -value is a slice of an Annotations. Each Annotations value may contain an Error -along with one or more successful results. The failed detections will have a nil annotation. - - result := resultSlice[0] - if result.Error != nil { ... } // some detections failed - for _, logo := range result.Logos { ... } - for _, text := range result.Texts { ... } - if result.SafeSearch != nil { ... } - -Other methods on Client run a single detection on a single image. For instance, -Client.DetectFaces will run face detection on the provided Image. These methods -return a single annotation of the appropriate type (for example, DetectFaces -returns a FaceAnnotation). The error return value incorporates both API call -errors and the detection errors stored in Annotations.Error, simplifying your -logic. - - faces, err := client.DetectFaces(ctx, 10) // maximum of 10 faces - if err != nil { ... } - -Here faces is a slice of FaceAnnotations. The Face field of each FaceAnnotation -provides easy access to the positions of facial features: - - fmt.Println(faces[0].Face.Nose.Tip) - fmt.Println(faces[0].Face.Eyes.Left.Pupil) - - -Authentication - -See examples of authorization and authentication at -https://godoc.org/cloud.google.com/go#pkg-examples. -*/ -package vision // import "cloud.google.com/go/vision" diff --git a/vendor/cloud.google.com/go/vision/examples_test.go b/vendor/cloud.google.com/go/vision/examples_test.go deleted file mode 100644 index a63d6368f..000000000 --- a/vendor/cloud.google.com/go/vision/examples_test.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision_test - -import ( - "fmt" - "os" - - "cloud.google.com/go/vision" - "golang.org/x/net/context" -) - -func ExampleNewClient() { - ctx := context.Background() - client, err := vision.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - // Use the client. - - // Close the client when finished. - if err := client.Close(); err != nil { - // TODO: handle error. - } -} - -func Example_NewImageFromReader() { - f, err := os.Open("path/to/image.jpg") - if err != nil { - // TODO: handle error. - } - img, err := vision.NewImageFromReader(f) - if err != nil { - // TODO: handle error. - } - fmt.Println(img) -} - -func Example_NewImageFromURI() { - img := vision.NewImageFromURI("gs://my-bucket/my-image.png") - fmt.Println(img) -} - -func ExampleClient_Annotate_oneImage() { - ctx := context.Background() - client, err := vision.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - annsSlice, err := client.Annotate(ctx, &vision.AnnotateRequest{ - Image: vision.NewImageFromURI("gs://my-bucket/my-image.png"), - MaxLogos: 100, - MaxTexts: 100, - SafeSearch: true, - }) - if err != nil { - // TODO: handle error. - } - anns := annsSlice[0] - if anns.Logos != nil { - fmt.Println(anns.Logos) - } - if anns.Texts != nil { - fmt.Println(anns.Texts) - } - if anns.SafeSearch != nil { - fmt.Println(anns.SafeSearch) - } - if anns.Error != nil { - fmt.Printf("at least one of the features failed: %v", anns.Error) - } -} - -func ExampleClient_DetectFaces() { - ctx := context.Background() - client, err := vision.NewClient(ctx) - if err != nil { - // TODO: handle error. - } - img := vision.NewImageFromURI("gs://my-bucket/my-image.png") - faces, err := client.DetectFaces(ctx, img, 10) - if err != nil { - // TODO: handle error. - } - fmt.Println(faces[0].Face.Nose.Tip) - fmt.Println(faces[0].Face.Eyes.Left.Pupil) -} diff --git a/vendor/cloud.google.com/go/vision/face.go b/vendor/cloud.google.com/go/vision/face.go deleted file mode 100644 index a7de3e5c6..000000000 --- a/vendor/cloud.google.com/go/vision/face.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision - -import ( - "log" - - "github.com/golang/geo/r3" - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" -) - -// FaceLandmarks contains the positions of facial features detected by the service. -// TODO(jba): write doc for all -type FaceLandmarks struct { - Eyebrows Eyebrows - Eyes Eyes - Ears Ears - Nose Nose - Mouth Mouth - Chin Chin - Forehead *r3.Vector -} - -type Eyebrows struct { - Left, Right Eyebrow -} - -type Eyebrow struct { - Top, Left, Right *r3.Vector -} - -type Eyes struct { - Left, Right Eye -} - -type Eye struct { - Left, Right, Top, Bottom, Center, Pupil *r3.Vector -} - -type Ears struct { - Left, Right *r3.Vector -} - -type Nose struct { - Left, Right, Top, Bottom, Tip *r3.Vector -} - -type Mouth struct { - Left, Center, Right, UpperLip, LowerLip *r3.Vector -} - -type Chin struct { - Left, Center, Right *r3.Vector -} - -// FaceLikelihoods expresses the likelihood of various aspects of a face. -type FaceLikelihoods struct { - // Joy is the likelihood that the face expresses joy. - Joy Likelihood - - // Sorrow is the likelihood that the face expresses sorrow. - Sorrow Likelihood - - // Anger is the likelihood that the face expresses anger. - Anger Likelihood - - // Surprise is the likelihood that the face expresses surprise. - Surprise Likelihood - - // UnderExposed is the likelihood that the face is under-exposed. - UnderExposed Likelihood - - // Blurred is the likelihood that the face is blurred. - Blurred Likelihood - - // Headwear is the likelihood that the face has headwear. - Headwear Likelihood -} - -func populateFaceLandmarks(landmarks []*pb.FaceAnnotation_Landmark, face *FaceLandmarks) { - for _, lm := range landmarks { - pos := &r3.Vector{ - X: float64(lm.Position.X), - Y: float64(lm.Position.Y), - Z: float64(lm.Position.Z), - } - switch lm.Type { - case pb.FaceAnnotation_Landmark_LEFT_OF_LEFT_EYEBROW: - face.Eyebrows.Left.Left = pos - case pb.FaceAnnotation_Landmark_RIGHT_OF_LEFT_EYEBROW: - face.Eyebrows.Left.Right = pos - case pb.FaceAnnotation_Landmark_LEFT_OF_RIGHT_EYEBROW: - face.Eyebrows.Right.Left = pos - case pb.FaceAnnotation_Landmark_RIGHT_OF_RIGHT_EYEBROW: - face.Eyebrows.Right.Right = pos - case pb.FaceAnnotation_Landmark_LEFT_EYEBROW_UPPER_MIDPOINT: - face.Eyebrows.Left.Top = pos - case pb.FaceAnnotation_Landmark_RIGHT_EYEBROW_UPPER_MIDPOINT: - face.Eyebrows.Right.Top = pos - case pb.FaceAnnotation_Landmark_MIDPOINT_BETWEEN_EYES: - face.Nose.Top = pos - case pb.FaceAnnotation_Landmark_NOSE_TIP: - face.Nose.Tip = pos - case pb.FaceAnnotation_Landmark_UPPER_LIP: - face.Mouth.UpperLip = pos - case pb.FaceAnnotation_Landmark_LOWER_LIP: - face.Mouth.LowerLip = pos - case pb.FaceAnnotation_Landmark_MOUTH_LEFT: - face.Mouth.Left = pos - case pb.FaceAnnotation_Landmark_MOUTH_RIGHT: - face.Mouth.Right = pos - case pb.FaceAnnotation_Landmark_MOUTH_CENTER: - face.Mouth.Center = pos - case pb.FaceAnnotation_Landmark_NOSE_BOTTOM_RIGHT: - face.Nose.Right = pos - case pb.FaceAnnotation_Landmark_NOSE_BOTTOM_LEFT: - face.Nose.Left = pos - case pb.FaceAnnotation_Landmark_NOSE_BOTTOM_CENTER: - face.Nose.Bottom = pos - case pb.FaceAnnotation_Landmark_LEFT_EYE: - face.Eyes.Left.Center = pos - case pb.FaceAnnotation_Landmark_RIGHT_EYE: - face.Eyes.Right.Center = pos - case pb.FaceAnnotation_Landmark_LEFT_EYE_TOP_BOUNDARY: - face.Eyes.Left.Top = pos - case pb.FaceAnnotation_Landmark_LEFT_EYE_RIGHT_CORNER: - face.Eyes.Left.Right = pos - case pb.FaceAnnotation_Landmark_LEFT_EYE_BOTTOM_BOUNDARY: - face.Eyes.Left.Bottom = pos - case pb.FaceAnnotation_Landmark_LEFT_EYE_LEFT_CORNER: - face.Eyes.Left.Left = pos - case pb.FaceAnnotation_Landmark_RIGHT_EYE_TOP_BOUNDARY: - face.Eyes.Right.Top = pos - case pb.FaceAnnotation_Landmark_RIGHT_EYE_RIGHT_CORNER: - face.Eyes.Right.Right = pos - case pb.FaceAnnotation_Landmark_RIGHT_EYE_BOTTOM_BOUNDARY: - face.Eyes.Right.Bottom = pos - case pb.FaceAnnotation_Landmark_RIGHT_EYE_LEFT_CORNER: - face.Eyes.Right.Left = pos - case pb.FaceAnnotation_Landmark_LEFT_EYE_PUPIL: - face.Eyes.Left.Pupil = pos - case pb.FaceAnnotation_Landmark_RIGHT_EYE_PUPIL: - face.Eyes.Right.Pupil = pos - case pb.FaceAnnotation_Landmark_LEFT_EAR_TRAGION: - face.Ears.Left = pos - case pb.FaceAnnotation_Landmark_RIGHT_EAR_TRAGION: - face.Ears.Right = pos - case pb.FaceAnnotation_Landmark_FOREHEAD_GLABELLA: - face.Forehead = pos - case pb.FaceAnnotation_Landmark_CHIN_GNATHION: - face.Chin.Center = pos - case pb.FaceAnnotation_Landmark_CHIN_LEFT_GONION: - face.Chin.Left = pos - case pb.FaceAnnotation_Landmark_CHIN_RIGHT_GONION: - face.Chin.Right = pos - default: - log.Printf("vision: ignoring unknown face annotation landmark %s", lm.Type) - } - } -} diff --git a/vendor/cloud.google.com/go/vision/geometry.go b/vendor/cloud.google.com/go/vision/geometry.go deleted file mode 100644 index 35f90b8ee..000000000 --- a/vendor/cloud.google.com/go/vision/geometry.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision - -import ( - "image" - - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" -) - -func pointFromProto(v *pb.Vertex) image.Point { - return image.Point{X: int(v.X), Y: int(v.Y)} -} - -func boundingPolyFromProto(b *pb.BoundingPoly) []image.Point { - if b == nil { - return nil - } - var ps []image.Point - for _, v := range b.Vertices { - ps = append(ps, pointFromProto(v)) - } - return ps -} diff --git a/vendor/cloud.google.com/go/vision/image.go b/vendor/cloud.google.com/go/vision/image.go deleted file mode 100644 index 03bf579fc..000000000 --- a/vendor/cloud.google.com/go/vision/image.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision - -import ( - "io" - "io/ioutil" - - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" -) - -// An Image represents the contents of an image to run detection algorithms on, -// along with metadata. Images may be described by their raw bytes, or by a -// reference to a a Google Cloude Storage (GCS) object. -type Image struct { - // Exactly one of content and gcsURI will be non-zero. - content []byte // raw image bytes - uri string // URI of the form "gs://BUCKET/OBJECT", or public URL - - // Rect is a rectangle on the Earth's surface represented by the - // image. It is optional. - Rect *LatLngRect - - // LanguageHints is a list of languages to use for text detection. In most - // cases, leaving this field nil yields the best results since it enables - // automatic language detection. For languages based on the Latin alphabet, - // setting LanguageHints is not needed. In rare cases, when the language of - // the text in the image is known, setting a hint will help get better - // results (although it will be a significant hindrance if the hint is - // wrong). Text detection returns an error if one or more of the specified - // languages is not one of the supported languages (See - // https://cloud.google.com/translate/v2/translate-reference#supported_languages). - LanguageHints []string -} - -// NewImageFromReader reads the bytes of an image from rc, then closes rc. -// -// You may optionally set Rect and LanguageHints on the returned Image before -// using it. -func NewImageFromReader(r io.ReadCloser) (*Image, error) { - bytes, err := ioutil.ReadAll(r) - if err != nil { - return nil, err - } - if err := r.Close(); err != nil { - return nil, err - } - return &Image{content: bytes}, nil -} - -// NewImageFromURI returns an image that refers to an object in Google Cloud Storage -// (when the uri is of the form "gs://BUCKET/OBJECT") or at a public URL. -// -// You may optionally set Rect and LanguageHints on the returned Image before -// using it. -func NewImageFromURI(uri string) *Image { - return &Image{uri: uri} -} - -// toProtos converts the Image to the two underlying API protos it represents, -// pb.Image and pb.ImageContext. -func (img *Image) toProtos() (*pb.Image, *pb.ImageContext) { - var pimg *pb.Image - switch { - case img.content != nil: - pimg = &pb.Image{Content: img.content} - case img.uri != "": - pimg = &pb.Image{Source: &pb.ImageSource{ImageUri: img.uri}} - } - - var pctx *pb.ImageContext - if img.Rect != nil || len(img.LanguageHints) > 0 { - pctx = &pb.ImageContext{ - LatLongRect: img.Rect.toProto(), - LanguageHints: img.LanguageHints, - } - } - return pimg, pctx -} diff --git a/vendor/cloud.google.com/go/vision/image_test.go b/vendor/cloud.google.com/go/vision/image_test.go deleted file mode 100644 index c917c7059..000000000 --- a/vendor/cloud.google.com/go/vision/image_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision - -import ( - "testing" - - "cloud.google.com/go/internal/testutil" - - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" -) - -func TestImageToProtos(t *testing.T) { - const url = "https://www.example.com/test.jpg" - langHints := []string{"en", "fr"} - img := NewImageFromURI("https://www.example.com/test.jpg") - img.LanguageHints = langHints - - goti, gotc := img.toProtos() - wanti := &pb.Image{Source: &pb.ImageSource{ImageUri: url}} - if !testutil.Equal(goti, wanti) { - t.Errorf("got %+v, want %+v", goti, wanti) - } - wantc := &pb.ImageContext{ - LanguageHints: langHints, - } - if !testutil.Equal(gotc, wantc) { - t.Errorf("got %+v, want %+v", gotc, wantc) - } -} diff --git a/vendor/cloud.google.com/go/vision/latlng.go b/vendor/cloud.google.com/go/vision/latlng.go deleted file mode 100644 index d553a3694..000000000 --- a/vendor/cloud.google.com/go/vision/latlng.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision - -import ( - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" - llpb "google.golang.org/genproto/googleapis/type/latlng" -) - -// A LatLng is a point on the Earth's surface, represented with a latitude and longitude. -type LatLng struct { - // Lat is the latitude in degrees. It must be in the range [-90.0, +90.0]. - Lat float64 - // Lng is the longitude in degrees. It must be in the range [-180.0, +180.0]. - Lng float64 -} - -func (l LatLng) toProto() *llpb.LatLng { - return &llpb.LatLng{ - Latitude: l.Lat, - Longitude: l.Lng, - } -} - -func latLngFromProto(ll *llpb.LatLng) LatLng { - return LatLng{ - Lat: ll.Latitude, - Lng: ll.Longitude, - } -} - -// A LatLngRect is a rectangular area on the Earth's surface, represented by a -// minimum and maximum latitude and longitude. -type LatLngRect struct { - Min, Max LatLng -} - -func (r *LatLngRect) toProto() *pb.LatLongRect { - if r == nil { - return nil - } - return &pb.LatLongRect{ - MinLatLng: r.Min.toProto(), - MaxLatLng: r.Max.toProto(), - } -} diff --git a/vendor/cloud.google.com/go/vision/testdata/README.md b/vendor/cloud.google.com/go/vision/testdata/README.md deleted file mode 100644 index fd3ea341d..000000000 --- a/vendor/cloud.google.com/go/vision/testdata/README.md +++ /dev/null @@ -1,16 +0,0 @@ -The following files were copied from https://github.com/GoogleCloudPlatform/cloud-vision/tree/master/data: -cat.jpg -face.jpg -faulkner.jpg -mountain.jpg -no-text.jpg - -eiffel-tower.jpg is from -https://commons.wikimedia.org/wiki/File:Tour_Eiffel_Wikimedia_Commons_(cropped).jpg. - -google.png is from the Google home page: -https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png. - - - - diff --git a/vendor/cloud.google.com/go/vision/testdata/cat.jpg b/vendor/cloud.google.com/go/vision/testdata/cat.jpg deleted file mode 100644 index 76af906f0a3433637f9f608e33b6d4accb043a3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 122667 zcmaI6bx>Px@Gc(Qic6uzoghUE0fM_j5-8eIpjdG$P@GWQy|^VLxJzk)(jvtn@WEPK zf|Q~K3jFxq`@8?$xjS>_J!kekyEA9b?7PqN?EQcDOMqwq9xg8N|J#WEw-G-qqz@M{ z2?+@i5g9otG5NziF%BL+J|O`iF(D!G|Lh?Df5-a2c<*}w)Wigz@b&R{#Szk6aQhw!NtQT zAbjwNQva{acn?8w9&$Vc2jEcS;?Z!3;VT={+7fVjMbL?t{^626UV3V@@PGJ6=CT1^ZgZb+bPvtob!uZs8Vit0A43SPUl#&yhE2Qk~l_P2+> zJeIic0V}XnY=v$xvNdsngM9xxz2@Y6DEBH+t>$_l(%vs6 zN2Mch`xJ9^^w_zdrzplrZH5I!I;T7Q;!F9u7TN5V}IgNFH z+Gkj!7U|udW7$${Pj+jG7af0rV$HMbJ{%GH2&Q}+SpRnqxCw)7-!PyXH#^d1|7qL< zhJ1ZOl#+2L{!-09N8BwrGRubs8OmhLGkf(fe6|~Us^#2AaejCZRP%kQgDrLx7F+9a zOAj`mq+zdrId~6{%DE{nW_=?c{GP)g%4QpyO_X;^KK*VGbc8hXU1bjEe3ue-W6=d~ ztJ=aQI{>78SGxCXIB>x?rm)a$8Ud{|LmMgr{cYFY(H%TMzLyo9kjat$E!85 z0C~3;`+Ee5c5C}}sOm*y_sQ^-gs?l=>%?@7Yr8LQrwpkl4BCc9Rt7qgHoA+ANGsr9 zm;i??4Rp?3x|!OSP?jIJ&vv%+w=+h}`4}y{Jkyu+1YqH`zoQ-Uit~4h*G9VhL|m1a z_QdW?oaeA=*SxYRxs>W6PAqiyfQ(VX5$MlR#knx;yu8Sx zxabnf6{%KHQ@@}X>7$6R{FNGaABv|)m;FgChxL4VG6@N!3mx2)aoO{tg~hua+q?C`cuF$T>D(F*351yBRI6;<19URnlRv6mbK*5Y zfSeSOlztW_x3s_z=WTQNF}X3bDI5qNTO)r`_HN z0~XJBiVl*4(6aHpmZv<=hUz`gZk3=|t_!o6mKXo!@o@+9I4=fr?1)PIJ2N+<+bkO4 zDK|sEiyLH5JIL}vfsaNiMwC6B6?wehKM6(+RLRzff{ZmHqT(zVEL7V*P(S>$&%PG& zFD^X}{kb2YGii0g$7ELfMewnxwdv66t;T1Ohbx_ zuIo0tQJ2@OsRGht6Y9xZzZP>b$8#yii?}zMYlkw5qMr>bXx2YBuIBWS{kZc87PA`M zefG%naa}vv_rIn!Ezca^nvGj53iW6G$js-^nAJ`7dTLazqT-^GTB?)p6*_+-{PA_e zVL_XlRoTa&f!alaz$NM0eMe+OwHBHHRsl;jT`oh5(qV}Rt^>555ANQ|MB3?V>pXE&RF+ZU zSZ1EN-KC>%PDG4t&FsRHpz11Bgt|HU8i*aOGg-TQ#biF0-K1%6NxlGpXzT^B{IfQrEuCT zzY8fpAm>>u5X)`wh-CPn=S}^40wS8PJ|22obt$pmqj(B`XtE3tZ0s#tVkrDNd>GlD zx-h*@69eb??%(hT2Jw6w*!UuGwgp7zYp6Zyz1ZJBF>`*@O;i%KV)ps1W{KDy5LFr2 zJ&0@Qpi#?i=yYl6r=_R>z6W%g*OyPcAg0fB?s)yasTte6ljYxP^7~o+tiRUJqez_J zQ_f>L9~YvlWd4w@m{DHnv4o}bwrt0FaP7@Q>WdgN;LTpvY+x#5*9EW zl>~*N6G@J$KB|nL(ct_}9`+-8xzing@*YKN87hCbp|k*X+llMXo?a@F)wBwp^hiIOs@ z>NUFyE2b~r1}eEG^d$Q^h4CQ?xi_%MmQhlRY$QjrA840Z18EAMIoJFX#Lrr4KqSfK z3c7%B;1!aH5KH<)THeq}mZ0v2B9lIRIc66!V&$4IbCdV8XeI-vvKo7+umGKNnGqNq zZ=fTYB6`z}K%{yEYrtMtv&KVpZSd_|YPJiVM%kPg9`+6$ZgOG!G&fhDlS5sjlvgyx z!yYigD_2Ghf`Bq>D15@zwu!Si;#o0Somv1}T}zCXJzSU(UeQHWS$oC5z@&jKur-b; zxlPT3bk`FXCmX#&?)Epj89*7d@-!B6qn~gZHUYU5o$nm{aMjN50RnUX`La@;lFI$# zYbbSYTloHd29HH9l@DCe+#H@{X>Qi7 zgl^5*W9V!iDYVOZA^Eiec|e3k#*8cFu_@x;JUl_?z!tGKnS+bwJ%e|9{*($w@G_g z9_yZH_d7kiL5HN~e?kPQm67k5OrJOiY}5NlF3gWzqY_0`z&ct4X3ac<@*>sa$_eux z8yJIf*A76{`aH>R#Ae=zV#OVOnN`f}0wG!8u7b{XX_OcXQTvs7HvOl6j#tIUt>+<= zGO-&epN+3O%>go98VVtD8gMG34ymYp?@Z@b)+Jf;|j6=V7273;RFcr&pIO1FYYqB@#zcgqX$ES3|2e zYuyZzOyyjQ^&13z-BfS+sAucLV0FR@=Jw%sr!y1V&g=Mp76J=Z^*^~XPpW_Gko)?* z_kvMEf{?QGN@QG-c|zJ^Wo4BlHOzfqw$i+pml9+V6RjHu!gT~4fI~;ny-WZ`7E`R< z@(ZHgjAbvt^|jDPlzpJ~M(+8!#dSm!=R<)JZ9++&7uzkBy{mOFtr}+9P#oWN$tx01 z?p7N~AN8G}LMfx9dKZ!%;l>+)08^J&0Rk_N6wsk26>|ea*JXgTlpU1p_{vfqcyjtJ zZ9(YXqNivG6vnp2q7hsgSft?MSMr3aD^;N7>F9+{O#!mBsMz<>&Vs0PWafM*+T7&L z_|M_7P|85v#Qq)8KfSkUE)@XgUM-)-1@pI2Y#t}@uhpcF<44D7EjXUn5Qk@85}#{G zl)YuG_V9!grd(Nl*V?9=7Wo)d<{v^WTSRCisjc;-7pxQYqK-V7s)O~%3!G1tA5_FO zB~FaI(aLasS!1GVT$&c%ERbH!e;W(bqWE+lFn!E2 zgbpp3p)waH+x!MNQ(?Z8=MapaO09_NJU!i_q53#6K}@-nCaH7QqcR74fquJ00xLhO zI~t5_9T9I8~S7Wc9)_H}4x5r7~Tq_UuVcvQc8h>MVpdrnUp3x*`{w7?fQ>!6o&tW?O z6XuWAR(@w~kPPB?cwT6bS}itKc~n)&&3$tl)-MakGh$=rm*UIhKw53FDEUb+soWXS zeV^tN@WCs{QwkBfd3D5fxciK|_Z$6qUKrA5UF)uAT>&M>}XlWJJO^UB5h z#5!_LrsF0t8gSIY3(k%?@fK~bIW*VPEnk6l{1MXfP)Ojc-ACz-5`2I*b|PJyx2k0A zAMmB6!Azm?PiMVJNtF}gf9M5hh^&HXTv*vQN?Ny(JYpf(jq?Y5`%G757d-!Y#;xRi z4qNf3B$@n9odWz34QBAvp^kh#S6%B0*RBn9*U-y1lOo&%$Ir;El*tZ$GIpn8`hM+; zl>f5KvIqJbn&FN`5?i;@z;!Z#q~dgL`XwA{yi}!xR4s1I&9P>}1&ETLt=0;XoF~g^3!#SIZr*zZw<(8(o1ow`Ofc!n2c#ebcdAs0)#wy5`0|n5eQLMb zls(T3JG+GjkB%JlgxmwN5AFdX_W(<3^`^oXfp#c;F`_B4bC8a;>knWLzrfgTo^=z% zQtvhN{PAl6cH~cpV7rTY0Am&+C9~P}xg!}k%Rjw!p}*WBbzHn%*2i6&^vBCYR9jZG znj<`P^s8O9v3scaUV=^4yut3s*`?cxewBU9#Fw$arF?IPWjv~|f@g+rc(aM{GS9_7 zwPNr(sKX7}R$P}P(?)*OkReEKv-%WXoH1P^_p7GiG4fM+gY~z<4Toa{y-`bd*>Xt# ztJ}X8&s*1`Pw|rP5=cUe*z{OQiWi*BVP4KoTst#Uc92>S4POP?LdpZ=j1}7jo4ril zf5xZCzoHhK6O($tic|E&k*FjYJ^nXE)A`+BGu%0J1chrMolCg==vUPg_1$whpxv`m ztwjsNtlkT@Qx-}NTUXOFpz%H6mp%sB^u%TqgJ3(^k5~yfK6M>kZUzsior%r88>zVf z5Z~El`siIbc}S`eg8JEUm{`JDGi6tgye)=`IB^hTR6)rSmTQ4IOhCkL8irkG<*5~wckDC;iD~qRvxvbh zYUSgYkLyjVw1zjft8+5uqnIpp)L|EwItbnR1sl4-(aJBZrKH~il`fNItDhAqgzhTk zDb2R!>qfJ_GucV?nkPdU7o4kD(^3yY=>;51aGtKKdBe{gpr!2RyK((K5{EaX?TkQt zLqu7t&I_gq<}#_PgOmVpy48_FTwRE|UUk_|<;#c4t!5l|#X;AzaOau%XMq;wKVsMP zC^!TPO%-6YCOKnfkA&B3ljf4XKU3zBO4*IA^`*Ji(G`mhqitG)E0(l9SB^$>jEIVR zcJ3>=fo}L~nIG{yW>hoaF|$|8@3-O;&6h_eGfUmv+oIm9_>6?-N z7NtK`b`|t3K--k8N+JtGiLHo`F?mw@K2{z$pl!%k?=U8zP`&p8k~YnQ*N~LL?paXn z8IGW<6A$+@npV0lxd%`^$?Yu>4@>=Mz?J#5x+o!cJcQ~|fv>6Rs4_2z<-;(LNE4sw zJ5O)|SS7B!p?5j3=y66%+kkg7ikABxz~k_?;rWWjM{Su%?Lh%Qzvn3q-xCw#Jip9KjaHYRBaw~8%Q30Dch%^|MNl6-#1 z+&{H0y@0tBs;JK7Y>}1nBdX`|Ye(KnpbJyhw3Z4Ev^_X{#gOZjO&C zii}r_#~C~Iy4IZEwM$k6OT7$9z+UM-xm=z z)oO_0ai85{ZVi$}ktTIdX}Pb3{PfAXxTr{CC#p3awUpgoB?t3aV{pPVCJen59$^17 zU4&c-6@}tR*2FiyDPi9?vi`RW-^3RvE^hB!;D-W{hRh=MhC{@BwBg{e7g;mkM82G~ zoRivrEl*yK#Zn>~p><9jYZVaGZ>*D(!<&ewHq4Kx74!KLYr)`~yo>>5EV}ztSz@Iz zU9RPU_w*raF8VBwzDdDnfmM#7HP=8@EG;a_c^@b;?g8^`upHzRA0J{`vFkht-edmG z?PY>`!>$*>>^Kg-5A(^V!$Vw0E)QElL{U=oIu17Ere?qEX_Flb!{Ik%)NZrIg6qK6 zFJp|$q6W`7HB%8cbILMq$eiidNl&n%1H#97TP_iY#y;)r3YC+^scM%TLa$QOz4)_O z{e{Hjt?_)u1Dq0!VB5L57Ur=xS|fjKsK`CoS)Tl5NbB!TgBhi6wFlFk1A)xii;nRi z)Dmfvkfh@j<-j2HCDC6nb#yqJ4sj704PhY#j_*Z1;C`4u#0-L&gLNnmLTc@4XqX?Q z4$zSei3g18#6a)xU9~-Ps1<(s&Xb&7RVri~hWlu$@m_ankAiPZHKkor~2WWj+RGpm+yY+xYr~y?=HI67lJIG4K zR%xCG%R~K|a7LicI|9=5kaRJtwaxg&bE)9b0+o6y z+c?Y)Hcq<53mkpV>0&A)s7ck;4EV_gc+;f(o(~IF({cBGH%7$zXsPL7lYhg<5&e?W zw9b%095RbM{h}`u_D*_S(*s1|0NDv1f&h`5L7W!XhX;OSd&0-Mq*}Ltjzg#3wP0)B5hAh)r~Fq`J%yE0+gG28%|u(xTf$zw@QEdpG-)KqwHoi$lnOe7s{oEm5EWJ}OOn|EKk_kS%x z{k=b%{7rA0a|)WhS6aL|-?~f-Orwnj_7VC0C=6+@kLD*cah8ioxGKY?N^xxJ49%vEH0-v{CNa6#W_=O3>sv-K zZaxL|uOdsrf+BNBO4=2tdFRC78gvdo=?JEaa({`TAgDb&H}?hN?rsPgw0^e#!+3?N zt-#^ssshuVPYUK7^NNE*K9rb4rA9J;YG}zs;AJo#wYuYJZD5<~YKGZknb_3Lxxqn# z`IfmeVk;ucj8TJXrpdgyEHe6jEG3$dtdz%x`sjS8KAMa`7YY&y`9$i&Ik0T`bS~dR z^MjuE-H>x^+$U@QK;*Ok{cl_06VII^*S~+0@Z$>tt%z(uWaF}V?56|DFO@Lbe?7?U z*o1RTLRAO#dkV=0j63?Cl7rSNJY{`~56KYuF;X{ib|s#gFJD~4)4F)Y4POlH_Rue> z1qB;~!Llrt>=Kjz3}`BP_TM2cIeiz+{*+djefg{7 zC%+MOVdjz+u|%{tqVJDGbkMRHU*k=wK8tO?nwWZ;Cm;t%V@AshuD|itbRR;=hNQ+M z|F_#^7akEV$wQzy4xWOpdzU6|%!bUc&w#?K%C-1`_y%b9ATHwXkTjMp|EUy%;W^{f zb(~E@2h)~FJ7?-xk))=0pMSe`CbI#?#=dn+ z7>=?k%?Z?VB^nh7(U_0HBeonr#TaR`Oq_Ih`M+`xsFP|@(zvlU@!J~$3j+P{w59ra zev*3tNs|8~MyokQ2~Q#POIfyb79|&A7^E7N+Tm;6DGH-b6V&G?Uls|3kGTL7`x72f zBDrPx~coj1#=J$YBiU7XN*n*R2 zamTI>*qCvv-kFk)X>1ytvlvDWhA5fm@-TWUMuQc7DJn^Jwcc)tXUI+rv&-#ao+k|Y z_F=4w-8?`vCQQ0wn4n?`XQH*vTP69`6NMg?T-G=1rEE6zL6~hmZb512kAgL(f-t%A z(u!4g(k)WOu0}^h4y$Nu?LodQ+Hmd#5w7MzQ>*0CGjc-Qoik>-?xet4s%19ygqOx4 z2HMF#H1#I+wSdBSGj1ptXvk(pXXYyaFS82bz#A@pw31zvdIi(WT`;z;(aGq>$QTQ#vpj8{#$SNlP&1_nPii(U89EXJDBb4tES!Qaf zDfQgZ$b75!_p*apT}`3uh#sf&Zu_krH>TlB_rKr+w*Qp_NVs%ZEfzSDcVN1Jq#>i6HHgN zUB6SgH53bg(wTixOpF9FrfHu2L^D-%FdF5HE5wr`Re6<4jf&%6pSbE9z~s%_A781c zd;C4!Ul5;0q-vgGGg)S9>~9BV4qUeR6q^=;xrLs}2KFzs@|+MS)&_QLpYYGNzh&}T z)KuN}K!?2${E9VAq2OBor=0zPaRsp9$xJ0`XfC+CZ1TY^jwyCGD2V#h#?Gw0YO%A* z9Cqj{gV(y&C^jAH+Wzrx-?oVJ;dzmac~@bB=c3-f)s&{Q$8@8th_vv=I_Ic#J3z7O z{(|4vM3)*skndF}n&xVZooUw_O!+eZ%DE?aEn%aU&bu|TJtw|VNSbyYiO-DrV^A|#>Dsp$umCim&RtIroj4stE@lZmH*{olTVzvFtgVJ8AfqCV#R!K<#XKyN&|RF(iDW4t0eG^n>qa{fq zw)r+%-K)7v8~-d$(Sesvswv#oX!aQ*c8i7K9i)ROg=*g)K6 zq-=1#Ai_L9S~4VTMF0Hpb0zSr2SG8W_NWD~LaNDHoXF6sW>7RETGis_X!C>i_7uxV z_Mj)P;+|*i=KKRA(j9JnvJT(w;`H}V?>UmqSeo?j{I2?Rik74wF@*j{pD#Fm0)ECO z)1_#C&BGBlCYVrFOG;qj1a$(xtZJ@O*Qjgq1wAi^`M;{Jd}(x?HBW}UCU{Hm$B=Z{ zA;jbBJR@2DcNWblVe9_pR>wVzj0NyTgfj7vN;spDF_J@uESj4ONUu|<3cJw+0>{cT zA@e2w!y5+m{cql|b+Ye}}u_NC{@KyyH$ zdwBB=L%shDyfCP5V&Sc6D1&f-4i6)0-m$BlnS05ErWWIFrcq#CW``QaBzE>xx)9nr zVBLNMZ5cIo?c3qX0WtZSFqhWehy(hd7!A)XWh1SN>-TdZcp?!K3r^60)Yt;w!`qW) zCvlnctjD)GicjapPI475P%|j*iQyM59vQUZC=+)(meWh)JF|qgEO8>XiKgkYznna8 zrYhdNewT4LApF#k`uD)-AV50szk{LJ{5Q6UFYLGTRi7#- zw1(MuvVvX6w0z!Z;-#@zm<2rE^pdxJ<2HH^@POs{ynZt87D?nFfT|4A$G zIcOeZ*4&~Vu%D>Eu$DjjY~!*%O_I#3v>T#;N?MYZPB!Ed+dF8fuPu*T1keOg^Ofd8 zMV_d+iOFBr#V%?P*glO?(~8>#R~q|H;1a#eS$JzRn}@%#btAO;J#PDv{lCGZ>MWx= zG2RgTdw_ivW)l!rxMkH@ewZvvpo1PFT2#=+`hJWLpHRtMm^fSz%f!LMXnswuz7aym zho$%mh1rkP?4K!(+F`5^n)=Iz9HyQA_S>ODSSUZ+;4(T9sa&l7YBtNNh4F9-G{yx; zEEz`OK1-2dJgQiCAmmliC*vjc`Hu$Mac(uJLv1yv`Q=q)`wNXnz85MxRq3jRO?zC? zzY;U8>hN1G6%C3|E^S;#Mv%NKURh*ftpkqt<4&>hohlh^H!3WU}qIo4K5Or_!)!Q{B(arg~>A_A{Y?vVud{VwL`N#Uq|i z{H~c(F@$xbsycvi?P~$ifpYRbW&Nps&dpVUG5rcpBOP|rNu=>1V{!gt0?M#5J9QIY z6^8Dvd>0o2nb$5!BhK&%#usNfa$PxDA}p!9pdwW`sXl_p!$OmQFKs0hE6 zBM`?dX4}sM8!|81?^Bf0tBaf{BmY?}Icdh=XB;H2S_~KBXO^u-3_-eb-eNmT#rph@ z3U!cLf!i`h%$#PRFI&p5>tUds75&HF)YF`yza)j2437a|+IZnIXb@bIJ(BGksNrrkhI4i2!Jbi~4 z`%dS{*S%O~e|g}!Uk>vS>wo4-UmU6;hOY!_YsAu@Og2)K{a&E2%?s56M>-~V%r0+? z^prb0Y|_f37d2xBe*7Ubsj4<8Xf1%V7$?jgGUMtp(`qV&`i^W&1mZ*2hAE zkB{4sbnC!VD%b-NIN^fbf}0>`D_@tJXj#x+wFy*0O)X|WNDJD4eq`)V?iIdp07sFE z2snsGdA2#mQknM1wh6Sjz358INUZ&P4SUmkiNlg+*-Qx2 z4VsilKhsV>lG^+I^yNE+wxrt9Iwm&HN}?e z_nk>g*Q8Q`Vf!t5J_%=?$S`fqVLJ6u7~DNcY{EBwRYMlB)Q;D%v*2)3bM3Sk$8?b9 z<-tC@!JZOkFnqR@!K}t(hDd%iXyDoPUfL>TaNN&=o@eRe`?`fClZSRP>1YQUFO6M^ z4{E)BSD9SIj(e__3yfGpqD3 z$=?kF1S)pV_1rr`yNOlncW3I{mY_nyka!-6tg&MrILYlT=XMIYjru z>f%C;A)f~Kv50r%maMyj%17gADu@eT?iQDDguaBh5lvDVy|*@y_1m}GS+O5RTlie0 zbFn7gRF8Ryw}c@d)Sg~tu1?XI@MV2a77ohpZs!;1(_kXdHa2C0_38x)AkQaT zBRN_Il=um$X%}z;%BD$04`NlB&aUg6RAz{xyJ(W?;8J|izD0bBzQWbR*FwTJ9|C-# z3)r#>PQ-4ezV3+S6YYbJ>MFygrA+dZ?DZO=FkIcIq^&Qu+0-Wjj0y(fHnrk%0fRFF zp?R1>F=8HSBtAd#cT;#0Vgb)WCG~*UgiAaLV5hwX8Xr*O{2NhDocr@iz2x>21+PNr z4~WhTSs^)o#J`O%WkZ$2HW~e0lL(1C>LNLv1XXG47M!i}yF{JwH+jkE0FzF;pF82) zr=;jsqp7D}%gD(jMU7mF-tACVi=IQ^JNMvca$cy;K}PB+zn=0UyK{Y$b<9!2HEc$P4)aK1h$3uQWVIXKw2gPRldHvPC^1Fz{>FrRf}Uq0R-Fdy zf@xH6Mu1UjVyX8l!5k3*$Xr(W|BSd0ptCXPY^e0xf_CBMPg~`4=jBth7Mby{)oE&4 zeNT2!trn>&oiJ2)erxod>&&?ha>z{KiM~nuN0E(bqfVFnSN#qS@E#M?c@5Tt z!TK9x)~A2Z9W))B#p`fKkfXJ7MEt)GVmcP@tZF{Yh_~nWs*Km_@;F53l+*IJ(e?C^ zxd=Nd64o2bm@h_&agnLSfXo;3Qf*&K)4J65bb4_Y2sAi3E9_Z#-KBfevglBj?Y5HR z9&G&M=_*~;tTK}Q%=4oCX*tHukgVKWP4k3d%YUd?`QJ?qU)Q6cTD1I($0xRWjL#)Z zfxBVgq}b&^Q=mV0F-+YwE^1F9LB#oGEs%oi>eST6;Y)9Z8fDJu-l=KAF!LjkV)~J< z!>pDAb9Fuxi%D+{Q;+Sv<>)uDmT9x@SbW2VGn-4}CW=%`iGO`ZpTqoA*#TM9=9>g2kG<3})*h!cnMJ+VJ5@rrDJ#VB5JBD0*iym9k^s=g{Djg<0fdY2IT}TRS~~*Ybvh zsNmv32}9C)(jI`;9u5zb!uFw*H*WZg%D&oZh;-q|h1(fLUSU4<$S zD&^|#oo7)*MzVOS6_L7B;7-}Ku)A@5J z+0M$Bh7|b8!&PG&Xuu*+C10ixtx*yl}W5(6c9b!KIKVgzPjVMHKM&lUKZ!oT&EBO!q5WW;8L zTq4qQ@SybYrdF~cj1s9ztQ?N;mzbZt`^5X&$5u(TdrE9}iB@0);9Ta*;Yu}kP!;7& zfn28fZ`!N>%}{?TWcW%@l%3*pPbvxAc8aa5kZ{q`P}{Wr&{~g#Iy?kcPj1?EMBo{otGh8sxY;j%d&DhNX7C#?~a3M3&XrKkkK;HP254(@R< ziy9LF3pXGS2v)Y`Q0eI8xfL|=Xx2unGl-mUP2F+kK!L5k|C%AgjBLw>rE@KWOT8XW zJv=ibVyw5y<;_Gu!XJ-IBdn~Vk~N%(T!cS~q{HnxLfyUG&X-)GPt!DCGuZ8$%G7mY5c8S??q2it<}EL|$n^ zIqaZLqV$FSEvhif5nUVAiHxk!A)wU9ESFv;gP2;ngpv1E5P#^rpy)tnKj|CT#}RL& z@q7A;(sDx#L9lfnJzrH*msa4ZQtQS_kRV#ryn{7C!lderN^6;!2tlPA@O5RZ*`e&U zXESzs!3d6UfQ)9z*83@~W|fy&Q~tmJ&p#~F$%2);V>x^-$@iR-HQRycyo}y8vp1D1 zE3mEu3R?LZ&nuSa$?pu?(0mnsmj`IENZeKxBD}k~Pj72JrFO^rJTy_@oWyx#3v}BK zv~4K(OOeUuT_4(eD*xZRLn-BDZq4MxsKDV?zB6(J`qK?)G8LlJBzYi3C)7n=} z)tj(C;|#(xop`aE$6Z&C$hKbrxM?#Y&NBoVumiC}`)ph8)ZpM@mM^eEq*0L;b-3JZ zP_2aqEZ`8p92w-`uslnIWTBMz-5Z(fY)^gS#k9@$53Ye$iU1_To-xf!UL{r>iCx|U z6xXb44pzN+X_${H)GlvAAUQNOR?0Ml3&TVAfQpatQL%mUqs7N{q@Th$14+xB;%FD# zWa%EgV$whQ4Hj%DA@UI7E>I*FgU07)|bI-(WWZnZ($idh2k_Ffpd>m}%oHj&% zCdH|!lB|$*iz-dO;J8C3(Uxodj8+i^bk4W(j<$aov*K1JPIztCgxhMKc^a1-mZ!2R zcB!$N_ssNc8!a_3M%E#ufi`Woma~nHP&JN7NF@ z4e{^9*z}HR#;dvzHRp(l4HhWq3)HgXP!L5ulZo_<-4~1sJ0xbj%?#EtA`1u&vzHKz zRax67T?^BcnvCf6v(_3O0Y*~e3)hU(GE>d)CmbVt1J8^ubP{=?VGgmxZ$ct>==4Qp zAjbW&k9=V`&`tv+&40sOz?Up@9k@H5aV45Hu~zG%m9uwuXhB>Y_+Sm2AKlXx)ngO9 zzxK&g#cN9Qv=cP>r^|v_>`RKHob+PEFYW;J&?vK1DQ( z2iLsJHPuQzyVZ`Flm@PZB!f+yQAVY~O>%XCEPtl(vR;YpGK*4wz<pxq~qupAdOE zZKh3|So!GY6@+UxS%3dx{0k%6!xvv;TN+iamM*Tn75FhkY(;|(x>&OVTHxccY?@jQ zqOaC&`EMaW;>rZ=Y7qM>?n)rKN2R||j63e|cKRN0qE=YTXg+r_5tt#`_ST6o7@=}r zo6LRE^CrqMwc#MI1OD6Bk{HJ;F!<|sh^x7!k_Gu|YX(I9v$~>`l+;6|v(0vRQ5VdL z>QLXuNJW@}_$ySZIsz@I@}y9&vfqxzWQ(R&66G7;)L#|>a^9masadD3aZ%PT3^DuK z{xCqY3!5MO1oG;?4*O6?_cGbNSh+QnKE3&DXUJ?hqkxBmIEOo2ghQJw70{`h$=d-B z9md8tI-N^yOg-Srg>FII;e8j(4>6ngsUJEKFD?u%TA1r38eQlEq|9B2#5|bhPi3UY zB7OQ_knYcXlSL{Uq6TVFy?dPmKa3kut`cPK&Y~iF2y?pb^{&1j9=jWwE+1yprgOy` z8cfwOxXqyqW@Q~!jUEC_YYMKCjd5qum5bMC-28xZ0vk&n=Z5*9S|y%0b8S(;RW2JU ziz5U2B?ct||B^}PiUos7FfG)@Y6}I2cdl$*p$Bx;s#~Z$o6kW^m)BeoUVDtUbDuMJ z2mwdMer5l?!==S8DLEZ9qQ3=Ei2b_ZowCh1G4{~qd7ky+fe`n(Hf3|+c2r!mcQw_2 z=ksbbP%Bl_N)uM8eFg9|Geu;8gX&ekh0457I~9y~6b5XtI_>RU6J+_gkm;ooZ!!|? zEuqeWwzB67(zTZ<@hJv7nTB4R*AC<`4DSYx`dLHj<5Hx3pG@!K{g_X?3z-84q)yvY zX{YdC`G~R1-EMWz5Qo2}R3a)dhiR;_RcHfNZ?n_)wR(G8y)c7$qd^yE(7KKS4aHqy zH>L26NKX9Ko1IcYF376_3Z=w*fW&TF5>qen;EKjk$es2%GI2*HU77Y8)rcEb+$359 zbG;af5=lY4Y)aD!nZe34^cD6_ATEoWP&>C@iX{ybYhmQKVNf$+mJ*yxWvC-#@g}m` zsMx6fzb{7D@fJrt8M`Lb+oMQ!DX<}`)EnreZ_G>U+@=kqq}PHJQQA<0f35M?n()bS zs%5H+Bt2+-Ef-BB4_Ix^=Tr^I)@0}64IfXYF*ZOi2v6{9IMC}ri1o$lS+UGYj5LEDf2Y*nsoat50lN_$J1D9Uh25VE7e@t9az*nq zqd}kRG72ljbYy~SQ|M4{I)^^+)tbJhidL!6C_jq!$-fcZVK0k`FH@B@s?a)@oaZni z6XuZFjruEN{o50zHR@MfDGpg$&gXi<{fw*p3Y8$dwiFcSGQZQ{iE-mGJ&a-MTm|bL z&tC4jDs)|fGKegiw-qVbXtFD0=E2c_`~Dt~tKOZbf{ngImeUqD(HdQB;0V_qp6YKs zTNCD?DXkf;>cB4>_}&pFSLqUoo89@mO>ga4sAmQF(U8V6JH-eMtT$&`ELKId(>D%E z9cwZdsi>|<%(`1J1Sp|XvD4X^xk+Sax)O@~YI$zubi*@~cVWLO23`u@KcaIe(QrEB}ibiQ8^n3jMwS0Qqm zHrz9Eqn%O?Qd?qDYNP0A-B<%EQaTr6LjZ(dPQWSG7$)d4Qnu6@bUG(u>7Q&433^IY zn-CyG##f7W`#;=c>wMQa>Zo#!w{Q=fAgw1&e=9~onl z4=~~Ph%iWuWwSuQC^##@f6KC7llVdBN_th!Y8?SxgKy;lBh@P%z{MQ%Sfd7v+=YOJa1ElkInV?62r zb~(Gez>=*$a2$m0l8Bk6R9{-FqkOji<8OYf=pOAr@W`oD-Y>G<{95YPpT_ckiqo&g zmh>XMB;fN*8Vcnu%w(1m<{-S8uCLWDgh7Mg!Lpwi$5hb3-LEY>tCnLemh!m$kzX-Q zjeeBRIRV$je#zGw_C=IooAv5mdg1mO3XZu~Aq={CKf3hnk~3IxR5c*$TAXTOJSM@N z+uRX1!oZ_VO^Kq7GUPR<%%1$3MEiQe(B>s+&zq}mv`7^pul>&c6oLO4bHxt3Nm{A~ zhe#`b^0FYErgrfH6g9*B{v?hYKhpPM{P=0+vTz`Njjbr>%_8fQtdjDlt^2&pf;d2twx zU>*+&Dt-O_Rp^g`KsH|~M5&4n4U^^{I);!bs7ogS^4Xo;jSdZTgt`co9tF9&Gj<~? zpcj6-=5u4KC4_Go)`WfKa|Z8wm`Hs;Tar9%z*qLl`j3Ln*^jD&+fbK2a0rd|h%}5$ z?raKLz@NCKt5z25g+-}^yD7rtpe-D5hTQ5rUNZ(7g&&1FVqyZB)xCLINOc9U!Y^3g zr*hOCIH;1;R>ny9ZLk9iWQv5T-^WUiHG*!Jf;Vi$^dDD8*fEkKH4U^pu^{}7dW()n zH9?2=Qq7wGhXx0KX=f@?DAMAuqF?WArb5dqMf|xW_vt_4LJ0g98PSmDL8DGK^R?oAQZT!I^U0EjpbZ z?%Ltm5pICcm7KcL^%DNpw1}Uwr|_M#9;%-2JiXqUWYVT3sy~#(fDYFTM}E&E?Y;oJ z-GBZ8{C^ysg`d0}in-v~9CaJtwT)yr@a-oD$+669}{)pnS2QC&eTD4~6O z;WK2Pdb`1I8{UStzJ0B_%Lngd3t_u10_qEu?IBttjp!GtDz`nR5=EHD(ZwUHs;lMndn z55L@ROBnPgM-cr93{F9V8|AM$TBF-(jLkqGE;3fe3=UARNG?%U6Obe0P-aeGu8p2J zi1>IgXIk!KL^7z?qx(GVd>25dG%7%b5GP6Xy>EL1(FblwvF3DaqP+sSaXv5OA7VWlgvPM ziNroAw@tNutcqmUWU0_Qz@4{H!@d_9@2_QY?vH5~RA$9o>7?hx??N}bf&7D;T?tgQ z2V;zHbA6NM=q4kpExb=Xxd2})pEB#HI<$_rR~BTYX2 zRVOw+FuWK|HBw4Yxss`hXX6XF=+x!kWsG}%b{J>M-Xamq6aDNc`|W}6zZs|XFyS%k z4XeeYve6d|>uxn?9SC+Wt%0jh;XXhiWHt(HUzh)X`C20ACGsHt=0{8lN?%n4<+mf##y4Uq}iLunZ zaiM?t@Z2yhVxH*V$ByO#SfN67Bt<1@I^OlXi#Lz3nD|K$JR#lei)G!9Tr8PH->+sy zv#^o)RT5Pg9X)tXUx`VOr944^ZexQ|h)$g}TPxl1GC2UFqC>-T%i8dKY=gX#Dkxeo z+>Bqkuxr~ma+FE+HidcB^}RlTQg?hZ^&Q{%`bc*(6Fu#Jgak?@%oZ>}s6);wT>qkZ z*vZ87E^THoDY<4I=KYLZL+_HnSV!P65@;GJpUgVS^pMkPB@Av1kA1jH8k(xmUzoF` zfAf0P!VCPTj;%AH75y5$i9nhn)p}Mt{s2ew%^l0^lLV@o^McF%64h8?2J@k=f@@dD;_9DI>>m^r^t1pb}O5T{*Z zeZASk#TGh%$U1hqCrvEBHw-KMi#^u1+VLOv!jl(thb~;5t7O08I2Qy(VkM0N=_dYJ zKH_~7a#nN%{aMoD7*rhb;oGC-zb7kU%YI2~gH0X4ZXdxd{#Jo7AyOaud}gN)J|9gZ z;e>B}zJ3rv-ag|oVju= za&6Yx@)t8|m2x-BjfE$}h1n&2Szo>RUjDN#MQWh;&g> z6WdFI!UyrjPo)jibwls?JUW}yD5N$ls%%Xy4O)bdajzV>N#TE7h>OjSXoXfAGBz)H zc*CLCJtGU4=?Gih91?a><>B|?3Xh#@$4Fpx$1u9cQbcQ<X z&q*&J2McoaCV}`>l8Fm=Tb(8aDUP*< zxFVa%@=^6Z!ugxldVDDqom}*bc6Y$=)BbYoQm>Nw#W8N#%VFES&Hm`rX3hmSq51mm zahdmJ>_BY{gLaqjqF9n;uK^tXpr|5vF)m%IDawi9^{?OX&wrr>XO@PA)7637{K0tM z1xhDZ8Uy`jyK=E=0;T+U(*k}qt|qrkFOc`%eEt^?2%*pzHzieWrfvh8%UCen{cH4X z3jHLr(atmGs=nc~1d=O(dY}&hk9%3AAeVKVU2Pz;Id*znLU-4~O2dOo^$(5Nb%~CF zVvYstV0~TE-M>!3ypw1$GQTg1czx+$D}t~n-Cy*JV#psFqt8C#VbS&XpY)t3Td2^f zfhaOhn5PybG)9DrMh=Jq@4Lbu;%Fr z=x`_0k>?x^R#Nv+uFPL8H?GpL_DP}^_Aszj)Tm>bj$fsEJ&^lDRgcsL6?WI9YJZ&S zSSwgUr!|bIDRwXUTp^mbMUExRF?r$@5UQp-o-zF1@_UUf`1>;xpDt`?DKJ89VfR8M zvL%6x|Fpc}3p4~J_f^XQ>iducpI(~P!-V8sP6LblNQhxI_Q%|0?%c$rABLRHzR(}w zt#qnlIB7fftFAHN`Gx@TsUBg))@)nAdqDKkAELq1_3N6kFn z#P|-Zj$GH4Y{IwVxCPnD9{euIPZ;!iY{op;n{uehQ8oWr*e&+nf6Mkr{Puy6i`Yu- z{Lv=mLD%f7r~9&ck2%tR9Jr*)zw^%iR(4N*xYHSz7^oO){&?l_S#j4g?~-!!J8~5Y zSBcd$N+Ups?P_yBCIE`Ue#n3`X$bg=FBXbVQn;mKrcH>I>=U~W(iPaXR3tIjKtwS%W4@bM96#Ff+ll}9$ecE;$qclOV?Wrob4&5w2f>jDT;0F$_Y zjm{2D2AkCxfL7m%l{3Lknh%{+9dOuuc-O@9yz|NV?jcqhXBSkf+z+lBn4A)8(O-C6b|>{fSOe=5C1HwtL9^m+XA?M&k3~ zFaN?7I;E19-I*D&2%A1Qn>}W!p(_bDOEhJ%rOX?*vUE|E&38*`mB85#fMuaeSC*7m zgauoc<_0sc4OB`g3#}1w4h=z~AAsP(?mpcS$UV+Wx{pCSdoB1v(SDL`NCq`)SXs^4 z=tJP(HCwxh%z2;PM}y2Od;XTn@>IE3K9FJ~gFUHr8pHzLBJTTmWb5>}3W;mM8sQCc zoIh`+Ibtt*S3|Zgvf47V#O?V>r)ue_X5>G&u+ybxhhq9%*I+K~fyseh5)z%N+(`T> za)99a&n4dbK%;rG=yl>Vr|g>;>87eTgFEOc$F)8rQ{`w8dzdVPi}G`GoE^WBvTnE%F(=9BPU>bf@b8q4_I!x!_o*ZhW&#B=7nB*${V zBuG8oI8eeP3MmV~*JTuxUjLhV9WP?wX<19Vm_MqcO8ylol=;0b&saz6ji4Y4$(`-9 zV?IBm2PTE1bf)}oDv{CMyfO!i{y7OB6L zQmrz~Zk_jHkt~zE;v^*xB1LJZdw!dnF?1KAeOI&aZN>LAT@k!B6HDPT6VETi$NLwp zB*)j{*nbu8ht6~sXnLg;NFHQ{s5)&s_BnB8l(CbFf0^E*_dk$KL?Tgl&@sSG(GIUA zQXAKJ{h@`GU0%j3jErV{g{TRCxDAP@T5i$yYOvz6cD4SmVTR!94a1PQ$p?8_=yD4h zOJ8OxvBQintqO=ARxfS~u{&!^^ z%^!!kn$UmVaALnXXQ6+wL(W=WwmqvE5-ma%uZ3RydJSz%4+L&J$b53Ec7ud#n(TJO z^N2L2cISF27#S>1sN&s;*-5p4D->0fCAmg){3aN-1GNw}`jpm4`*WTRqvfuFJ~~MA9foGa zTdhjeyV8yu?Qk$S;YEeG-aZEJ8f4G4=v(!Q+;YQ6^8B5a9iE2+Y4* zqXldZ*;jS~=-&y4pkTn);J%tN-^K-4nsHwPT4D~kBZysiDp?4YJNNSSKmqOL5>Y@& zwQl=xlYRw2u__P+fO2whhJ1R}BH;Guq^ry0(fq0cm}9v3ZdY~RD0lPpwtzs6w?4hZp110j zP>1Cq#K7ZM*RiuFQOq%oD`@@DpV!Zm2!-*7@tSOLBdE zFs9;R3@DfcmgW*8i z!r=We2UF^1rc(&$FREjIPjf+wPjwvMcUZKr#+OElu{XXS55;5Vt-4Du+1BD;l%DJ8 zdRo2VxykFPw)p%n2IE>0%a&v=*qC`-4y)nf)%hPuBO5ScEbf0KGqx0cUKeIw4%#!5 z-1DJpmsb+>KU9oyxOW}oP_C<5d97-wAZ0hTzBq+$atW^x7SIeB`71jr;(9pz zx;AwEEB{y`67#gfe*nK|jtuQqhj-&X=cJid=IrjFA^qMrbx;uSt7Wd~w9wz*DWy8| zk7n31l=Ncfe41CS3y{apUiNu=NH+IxumBUAn{_y^{SKP<<1x*2326Uzhgm;a`0B`i5MNm*!bjqva43LOSI< z01lxLW-L1;t$s49iL3@GLRSENSrq8l1LY|14OweP*NqI`d0jwG5(rX#XJt< zTP*IjRNkXV?lTvlTAF7gblVcTfXdcrwxKTK#kZAy#*;JR)YRVLR4RvL^ zYJu`BBFSoZlv}J}MJ)4Pi{=eB1p20VK$nvJjfh5F)1qNnxuLHQDno(!6B{m^J+*S_ zX&uCS2GNdL8+U*$H?ZzN{Gq-r-OdfdKs*in10U<)9S+f9t^>`pj*?|e8-lf>Ty3E% zq_K5%3J^;zw*CNg@a-lfN@%-#L<4V;+ukjY=RM)T{8nxq!<)$}$5`DBA)ckr;i1-C z+*ztD%v)H{<0s<4d$f<~YOfSmJI>QBY2-?Jv0I_t4FtdKHmh z`q@G0l3H=qU4m>nXR+Yoek&80UxQ^0_3jN;$>+}e6R%pp_cgM(7p=_FpLE6gR1Wf0 zOzhi2jqz@T$l;`$P@!}4zGr9I@gCtHvkoeBzCZQ0|*CjHFV(A!yCirq`v zt|2n&4!NK651GcV8z5*)UgWoF|ywmE6wJ(~!TY z4h*wU`L3XqM|;iuno7=4?b#*&=k?)mNgu^iXNOANgEKodZJYg$yYZh5{)_KWOAbv& zJ>)#b&@vors`I12Ug^&%o|!5DBAJhqcNr5p#Hz7=k65V1U4nn!TtG;F?QYk8ygF%M z;Ykj668d9X)2Fkt!%0e4dYq7Z{vQ32Yg`V|!qdQfm3$?D#&0?gTKuf*nk|lKJhuJ`$_D``cj<^pO6s)}EXBLum?A9+RQ53o}=)Kl)}tWTc6w*5Jm%bQS&EPSs0d zKiF-7tYBeP~?%k6D>KAJVfREiO zyCs(tiQjT}M!fnEAqew2Di1*>{;EtfY(4z5=S*?W^Ua=j=@&TLk-ympQ2Y}r~h~t z++yg!lGCRb$G=0~>0%DSk3-2$B|892@*%nHO^g3OynVWy?O4?6(9~*Y-`ngc;`OEd zk?`p=ddMc4Q0l~UJV_Ty{&p6nV_z1BzCb{5^JYikd)SB8V&(<>Cy9#%b&5QIs$jQG-$#Epr zE9jYLPN#*Bl7=v+PqL7JwmnF7Hv!CPH4yiv9h{rBd&?ay6u{S|Xz9SF;8nYSMYs1m z0PBs@g|H@eA<0}PJF0!JfX0oPxo45`2qLNMjkM@<3?bDGhbV#FS6dMPOxNtv;|G*! z_eR;kS$1r`9}UH^9`gUun(a9HF{YS%dMK3Jw)*ft#-h8;L{-retS53cOYdRcZ1y+^ zWH#7Uqwc{+G8+Q2+GV?rX7+Cla0v>A0)j#!s;Uj(e$Z&}r!AEXluH@F-=Z~lMbv1) zuH*@jKBU{=pgvVQ)WvZWW{=#G@y1ieTDo+u55M(5`@D8m&<{I)9Thq%azw^{=di0_ zBy-G0PHcNnv>s-J{(jT!ho!)CIcqGeREL^XaQ?ex4?ph}*5@-qVOL+vPjFrtwN1cq z-P>L1RWuseV~H2ej2gG_b~4(rz#ptmeN1@rKevNWT#x=xcGcWZo<9&j$I5lr7bNF| z(hqPLN;4{_SmKV)K}l}QTxe(J_uW$yobDIfw5l}c8-81#e53L{D8eG@zJ}yOPqq7N z=a&Lcneyj;9%N6}b7RaGZf@tzS>`lzY1599Uws#LZ|1A|LU@%Ae5`m|f88kGuVEQj z<~P2l7JGHw2q+m>sN%UbO=MK1jg6Y@i2N72Mr&SUR`}}-OOal1^jSHTIewU&@7+dd zwVVpgi_dr6&X|jw(~N|!|3{MC_Z`~@2MAj7#?<+#(kA{_rOqmSjLx0()TG|HYa-JhGrC))b*7`RxjZ4BZed<29q!SXNsv#ko+YC$UKoex(zm4(=Ak z$yc8Gwe*zSH1rmYOh55;{If4YTst6>qTMu_9Z;qK+Qk2nKrDVP62&JPE+cL6e;|S9 z532O5i%$ov<3Z)WzSCMXbtUmvM0?2R43khpB31V1Z4b6Jq{pxiH9%SQ@812YK@;y+ zX-<`~aMC)C2VF9*)C#t=uFm#&o>tA>Iir;gsvo*M0R3d`5Wbm)5JeU zI~uq7C8CjIUuWGYHBJ#~+7??4p;c&Kqto-N`dE$YXa9nV_7wLQP*WS+a{TC~!`*X3 z#VZ*%7Ea@3xXw4BHHBuIV6xzfAne+Lm=M=Dwq@&l)!RZiyU#;v&2}zH5aJy*p#WS^ zQ<5{#>(>)3*2nqc8cnsftlpl$HcFx^PvvR%Adxzg&DF6gjWnFR3%PUPb1a-pIi!O zMecMqtqwVcapP945Kk$;|5;v%XIw_fiO7j{yZHroNeGyN^4Vc8jwaW;LWb%>dZi|l zm+Muat)CIT#k9}phu`{WEFCH5L1cAf%pW^-2a3a-`hz4AG=%%a`bDNqZ;Z& zfxa!};8#7*hUU^kK>@*y$szMJMxu#cK$D-9!O%+8O8NspOaQ_N?(`;7c38xD5K8U) z(!SEZGQ+1ANcKVQJ}dN1aTaq3&Db*+!4aQ6x409*Bl-Q zXi;eHMNl_F9(yR%U|fy8ahg`>Ru}-OFCI4R2QM(j-LXx1zlQL$`t!@QAWzLtmz_;(WUk-BApb$a}l9V;iue3rNd+WJ&KcO4{K=Y zxCfag3CX9$N~tB!wyUOqokM&e^7>xB5B^^lN)J2l=^LR4c9y`*c=@T!KNSJlgl^wD z*ZbDDMOkp&PZ}Vc!>5};p|3*67%=n^bIb)4p}0`jbB|My%}(hugT<8fJynp=eQfir zdW<_@N*qt@T6m1dXd9iI3o4?~e(j^$rGG5YI$YvD4*}i61687N&USLASLb@p`K2bm z`xt5=sOnA47>0is)&nnvisgd6!VA9ieKob~)0=Z=g;>TeR`pJeXF4PJ*2pv+2BXv7 z+vf|M_-oKC1rh1;3rnHGIRi3QwG3vARTEht->XVc-I$ZxG2NfwZLeC`p!Bsmga-iB=ym8b3zj9-lq{f=&Axfp?G^UNa2e*Z9JXtIfcY)mBGHYYN zzKm}A)V*k3iz-^9&V$dApbz3hhc!LM|0BuF%zlBT%Dj-vsHD-VWKCWlDG~n7@|j;L z?6Nxku+)6v+@z13QFE3-I=lT3B^&#TOt2o8m|ccXpl@_3%0x^ zbt{Q+`5%czS3+mlOHLkHYk!bHq*kEVN+3^DrHUb0#E7trx^swNSqyVoxw(P$dvHRd zC$+J3xsjA-i>aLire%`Bz`4)3C#2&vc}rflvEd2vy>=0mzLr)DK=A<^#H@d{nhv@vVPm=IFo;j*jK zw-syopB;~E<{sN$qW=9650GT2CtSrk0Dehw7`7lf0A^CU;wCoR6ty%Wv`#y;dx;^; zOocLL!?mrG->g{wgRj;tG(Msu%Q6Tq7JuJ1Z5F_qTWOBvW4;YHP+&bWleXb5QW{FZ zKDz^F#Mw3VY$`n1acN?ErU?8<+2PwAgza|e^Cj-f*kz>WIZaxZ9w(Ug`Q|ya2H2Jk zbEkK~TLrPpfId5%JVXeXj9P&0X9B~PR-MFYf}BPyt!5kiu*#6u4^c-@KV_AW0t3uW zIF%ST_%~b+&})wEd)%)hsuQbJw-h@K1uE+Zx8DOLq_;r1&f1@{#dyutmoxE4euF18h+->48pv`SN64|9Iz#+`DO$gD|BnIm6W^Ym2}lj0mX;YliM*bZy)@ISLqXom3qg?`Z`$5c(! zK<#zKnC=f1{rHahdX0j*9lW>F`OdeaNz?18^=03Z_gyvQM_%G+T%RtiDtK%)c7Z{L z@h(I?^tfrKy3jo>Z)Nd&p-h}m2b#`Yt(o>x%-&TO!k<1LXU7pQ<}@{ zYcs>hY+-aN{&Jx4l~53|`Hr%+zD%Nu@32qyM==ILtQ5!Yf8Q>e2jwped(Kdk59CU} zpvL@<Q%B3(8&aQgt`66VFfAg_|=5+HK+{tTQx(qUA7Tr9&1a!Vj>d5ZERQOsK5%9%| z9sVF)a_m5@zQVoXeOf)HhR8=| zTTzb~_7Nj)v5#~XYDnpFK5mbH&4$Bc>puG{vr2D@k-Uwch#2G(CHLh}cA&TVAyo!s z%)()n^{gL-y zRF4@A_J-lw?Hot=lY1$CF@Guj@T`$_H@S|*DadK(qZ6pv%32wa3k#F71%4C*7EZ=0 zwC_pti?Dz>#Lcr}xm)cPG?asfFSRORfUEnd0ezO4*g zkyzewcDUFDUb82gCWW(7Vw!#7UP-vc$FF7+KiUX3eGpJS(joIOGL!T|I3y~m27Yv3 zBrb{A98ccxF0q{v@sVrBlDqIML6K-4J1vc)9U6PPo>R%$^+kn_aBj*l9=9SrGol>L zcZuwFsS zm@;U`ne$|HAxW3aof@eu9z&6YMiELz?_cX*kq5Tv_q^I76%{ev7=w;uR{x>M{}>B=zpum}uJipo_MEZ*GnWll z_TD^NMlTZ+%r|bLPfI>WT7{X$rR^miBO91LKGQol^V3F%Wc^$~1eC}2N!S8&x9j-! zKAY~GfxHv5V_~j8x-7$CTl2ONV^3?{pyb#B#)gM&9jT{#Wt?L7Cv0^yse74YmsTMr zS#RPp2Gv6aJ+*e{d>su$y5J`pf_hVJD|6%>Ij3?+2c1ve6Ta~APt(8J27g^ zFAmMnm;U}B8aKaso)rEQGO0Fx{BqbonmfRp(%ou_>>c=!4Y}PN#JVa2Er&iRpa0q)s^WF+oRf zty2)TZtU}oeE8TzEMT$$aS~7O9Q3xd5thp?<5CZUFgIBh%GZhm6cTEZwq^9U8FX}Y z!1-4BI5Jv2$#g4l-+h{A|d^yv~9bIA(I$+z%eYKC((zLKB2Fz?HR~u}> zMm`DKkqNPuGz0(VloMh=gd?sS0FNtP9KMbJMrW@fTPyqU+dZN%5i$BUIOIcd5J&yn zUYEG5vV+|^*GCZ!fwdHqYb^zmGQa!bGf4Xtdg%MTF5g~c#VRvwc6@^(r>u-&*u&nK zepjLhxE_)Zh}EOjt+X)-Y3L4@7rFB|iG02|5UAIQjJTn3)rBUiPLI_ADlm)8^O>0; zh>w%I!GIl3YSvfyju?BQ$UvWT3JiJ zrz0FcU-?7-?CN>$;0BZht1eI5h1IRH$(hrt)UIAbin^B*KfXbS=Z*Kc`|Ogrj4G6K zx?#SKAgFepvmsN&`qo739qM#|>}&4%u(w*JF1hxTr$M_H*NtWIT64F^@__Z3_<`)C zr9lOEmBXH}D=JHq>1PfXM?7Or5f?5mjT^~NW?-Sec-?*0w!6hU6ZH8A?maf zjCr{QqCUn$w<+JnKJrFxbxXF4-~bjl5rr&OQxB0wuYf96+-htu-I{leoUDk>@M7;9 z$@1}q;1Rzn40h@J{eT5v|xWA(eMqu(e6wsx`R_(sU+I^2$cQN zOF0fWV|@y55k`rkVrzkkpT^O_(GKEFND2X~UVe!N5jJHD$_II1{o!0kHwz!*Cfl+E zLD=X^M*(-XP%|6@P4mHl);(f?)fCjiFPj+|u}hRNQKg;Z`b#%?&7OE{3TfL_(RMNjUu#Fjdwm@YX z+XNsFYi=zk>oGU3-MM)QqU^)Z1Zm~&60q%~X)tGQ4TE4LGgXYcK|9#jWW6Cv4iz=a zJWJr$?B$LE(7uMEvX^A9^?@~#kPP@8fl!bj2T7KcLme_`Bn%9E&p+BM@ZiOwv$9}8 zZV?77z{`S|p;5J2lr@}9se#^s?pbRHz#x-8trBL2I}bWXl(6uYH;AZ2gAFO*w_8i= zQ)!oEwjXU6+1NIR(^HoR|MJgN-!bt83{oP)4FcEOpKRD7=O&i#z<`0n3w^Z!gzJC+ z8d6^<-O!>U?jB?->H+tWZE_;WFk7E#AZC@Tim}iQZLNE z|B(!(*;L8jA5K=P`l|dGO|G5@S*i|rojR>Q9#}sahf~d zH^@`PYRqGDZI}}hbIV9T)Tb9_?pLGg&vU8f_O-E_^NLkk@6PH9>WPg~Id# z@c6>swc`R;$GduBTSclfLb9?3I&dQ&+NwX^&5 zjrv}1vl8iN-&b7`mLA_@IjCb{^Nb%k84^vq=01DV)g&%)C=Xol%5Q^iju?j#*ktR~q~jyoH9 z=|w#2e;!&V(2pNOmj7=6oV_6!{_C4f(W0TV0fmyU8vex|R zz9`xR8B)(?MA2so7F^v@QpD*9?tO)GB%!(xru#uG@U?Suo$!et-|6WAypZ?2;O#?}y6*dBV>dB1;i zDIUBn%E1_UVP$k1p(DF>ehf+E+e_Rs(GgdqT~xU=s^i6akSr%DxZQC&`xmCa`sv>u zc?N0VQ_fx5ET12Cj<%EGZZuT$Pdv5pr%S#*7ugz#07jEo7G<-6!RkhT;*rkW(;CXetu+RYR`>rvJ0}tQ--}wfw`v97 zzNRDlV_VhdpnMG8>U3r)uI>A+0c`p0P-TZ~KEWLWW7&lEmgB^$a4uh6s&G530mks6 zfqpvmZ?jh~W#1FZf3GBVEDyq#dYaXn12aC1)&Kp6Hiwp5{AD%VG5hf!uBn4M0cx4q z0D+6xT+B*ImdOq3Wj0Su88mpgQzG30eR`iu`IT9f`oI9Vnc6dFA)Bq}DfJ1uoh$!u z=VdN+uihx-SO)E6MJz=jmrRk!zk}|}CP>dsU?YiXZn80n)wVHTN-l$`02ipKg+km0 zjG$8^f}5bQ!V6Wf#79FiszM);&bsCCM<&0H;y5PH#UY!u|=1kY%9ijGj2p&b^|O zdpltn3%w50k7s*mR&?>cC@A(4Dk)qyWVKl`+8S!*+f8P;ImBdf>u_1qVv> z;dN*TxC084B*834&kR2PfUzVF-3TPCY@Vq|z(?7t$M>BXPz_e}jKkZ-g#IpP^y+Ezxo;f!uk zuUF{^aT34!pXPGl1CKUac6e5b+5$Qy+oSK5nerW%t->+~5@B~>UzmB8u(bic=DwUT zQVVxEgq-iZ0F>U5gY~5In1a6@(hgR&0?`42hIN~or<3!OXZ>}^e4PX&6wjb2q-Udn z!=f!^ickz#WeBufjh(kjS~npSceDJStWMUiim%4DNYaF1Nba`Avb>dwb`$ffoEX_% z+gVan=zgr59S^m4RLQYwUP^p_DHAED`ftz6Bvu=%OBLsH?4t?DN!_sKaQOTkD_VNr zLne?f%_TCY_@@M!o{j)Z<=JtR%^&)(f3b@Tfnf;}oy2rCgSxoC;#V3hg8(VH#<_DY zq`!J7@mQSt{*}(kNfwHS_Gk`Rd~`xX7Wyi&QK6oSEaU0!r8wn{?%GE9(_z`f{Sx96 z8z^(Ve~~>-&8K)qt3NhpAeJ}mJ~DDM%Nwwzb$R8%1`n~5ub02MWigikBb{oNzp2N* zZnLa&e8M+>m+PfpB%ZW26A_;QRB>It7vi6W7~DpEx@N2_Cx*x92R-m zskFczcHl+W%O>|+*bWPE9CB@RZMd~z{r6|&axboh;V$I*!VsS@~u z)rxSJ=ym~#USa825f;?z-o;y3WB1ABMo&GVr@7l8)kWwcCSu9LuSf)WhG+}8bQ%mz z#Ys64Leh!1qr@_w{LiP$x=p$+9o?#Qd>3>6c;i>);Hg=kKYmjSjIheaCx?aI$4>*1 zlSq*$b<^&_z+lO8bb}Kx2XF+1Zg~!p&?Hzf@w0`DE>PW5a} z%JS*_O-d*P%-)tvkEde3Zm83HPjW3X?j7Cm0x`g&{MX?VzVGT!s!X5D>T(a+WpQe2 zpUWT1{*y)?XXX1)fpbQ!I@7AIQNfsbr=1TI1{0g16-D3rXG}tubTPpory@dHoZ#NJ z-|lM%iE?tqg4J=oLVVA~N6=RA*9u&_JnMbREZt zw3eu;mC|Pxlmsfn+m->1I^8?UN^Aoj(1sRywLEbF9&u?aHs5YL0Y@y`;}TOqh>pbj zaZNKBQk@X~?&PntN84>){&nNu>rPyFB0yJdsYi)99xGEhsF~*`TMj;B2EVj9_C&H( z9(9EeGO`D~rT&|@mG@(K!S-WZ(Cc1A&a;5Q>=t(hZROoov~*N!+R6Do5J|S$U(+cg zA(Pf@O{oMi3AHMgwDCn$hMRi_Kymzv5dzV#f6em^WoigkDzORJ7rw9no4u+lmT22C z9N}ahC|pgXluPa#&Nx0Qg!)7`vRgWdHQ27nF})+-kT^?|$WcwI0Q_Vwe{0AA(8#Ur z+xBotTzJAYb{}76S`j%N1|#UICL$a@rc>A16p^;>R(ptGed09->QI?g+8*#oqqb8T zV*Z@yfJdHdVer^Hw7dbe7Xfo?#auWl?iqIE+GF+ zfDy$vo8Sj5$hxJ0vTARy{eb)dGCsU=>Jafr+ODi+>8~Q)llYo z#*ObUh$YD{gUF4quZ4OW^v{wX4Q;&YnR3P(-^#tssri&kDio;RFjAqzcM?1o^$4(b zyy~`|GVO{dS9tpZx8Ogh@aM8x3+}pYd^5wc;}>^OHtThKWYz;q!Ukb zPl@BW!c0h2D>8vLmcFQ_15^io$a15`FS>Im)T~A@+EyNzagFhJ^EV<4t9BCQEF<==URys#6tbs6iWFzOxJ@D+G;Q z#3r#2YLt=B7Ig=mP&qQt3}EZ_6{XnYO)!=P1W5OmPBa~Upd7l2m9RcC5wMR02f;_a zCXvFLm)tPQpe{umU$zzcD!C%NvM$>sp9OSC&bpNS zD4Xo7>t3FJa}*7JHw^Dpg4)?aS?hk~UPy*xut>6bsfg|g}J3oE#8lFobLLg7DE@=pz=l;I%9Aqu|E z>feVcX%(eAu%br1SjF>q`Srq_f)wru2Hw7^h5IvmX*pKWSGZjJR^w3?heb;RHfN#C zO@qZ_Obh$6x!(3cl=wrgwjM9y)lfyZAqFcQzo^TCQRg@wq<-CeM|5#Xh9&oe9$&&R>N-~UjW8f4(72WRjfW&Dl=p2^?%VRMM|XP)q9@X* zYoKSma!Q{62M0m;zBaUCd7iQCy=Iw2xu>`stS?868w&=IW<3>KjW`|^mr~dO8I^k8 z&IF#SJ&|L})}soQ6XyVMy#}F330O=5WoZfL{8}K&@fwDw61`vI4c^!*9GfU4ELN2$ux7XU6ds{!}vX8k`^>v`8nZy>CC zcapA9s;dUN=F)mBTe~IdsneB4_RG-))6F&TwCpulDvkA-3paTMJI=&=KAWcMd@oaB ze=Fr0PNZ$YFxR26T+-LRH%|dbHY=VLZWI_MkX=K zo)vv8X558dmn!Yc6-s=h7MiMDg?gA(Zd$2$&OEEM0;c{|t6mjRQCX^mb){4)7Xd;? zYP0}Z_NzszC=0>{gx7?y6o6I>KDb&nip{xt)+Uum0cr76^s+^zPqVhZUuNfdd_8Z;Y#_PeqmCtNo{J@a7xB` zNw+;RuBoirfoZJxNmp~j6N_)ay)FhX=DLwSi zifJO!9@M5&S2n8dLP1fPKv|Sz<#U^vLCEidn94JSAf|0kSL#uvI7zPP!OV760m?(p zW;&n%gsRa4{$1475K(+7X};Hz=$h>&!iZ9(SAe@LweJJFnwb;T- zhI1$MTEx=W`FE#DR$c!9e#mS;tL;4dsSPNjQM~5}T-pBsrD@-n6YmR0!`>RHb5X3M z(oBN)aszwD0Po7jRK56X;YVFuZI2@WFL7xhqn~0-K>^jDz$_-;Fjg*+^+F%NV zn2>RjOhhLe$`%w`MuuENej~^Alh-m}9s=_b1=I zSU)UhXq+-V`ma-Cq=0vMvD+j24*vi}8h?hvTFGl%W6k9twbS<7aoeb- zY7{_l1ER9}_yf@*?Vf*{wCh|-M8ee$7n!S9%>jBnY-8DZXY(tghIQmW5}n7g`I~4@ z)qO+9jolv0#8b1%?d4J;&ed9}Q)oq1;01@M-{o9~Q+KE=s<(+1Zls}OB~vXpRw!Rp zS)*i1>iT*0LF$;jTAFRttcTi=wDgL32@hwu(d^}IRq*tV6<-cCVSPJA)7tQ%H>byS zPY-%88L8<|P8aFTQ^FvQ7tMT0;TR_g>UHt^cSaYg(XO~v@3bP)iqhD&7JcQ7dFk)8 zo2)NIZ&E;BBT2YkuFkg$&F(t+t(q=RsL2YICoA+!g^c*pvF~WCx~yJ~?ux^@V(I4V zD-^@lwS~gPc~)$zWk+1D0x#}HJEzV7vOOQCOB?&5t1feByE0ckY(ymcd zsjHM$_Bz)Z65bOUp}|71G}@)@MAa@;3lyrcR;aGjYO7VMq#_to2}=PO3E@?1l|*v1 zYlTJ4%9C59k#f}PB`Y`UrTr7Gd6)`-;8DykO?Mx#{=mZ3Bj{T7o7%%RHCq@u)_ zQi^d2PYM+YtX56amaR~-Zi3nsA&y!$#b(nBPS`3XkflT}QmB^{ho+L0^t8)e3Smlm zWsr`ULiG$NCWQqxX(6^&9^4@|F)p18J=gG7mGc*xym6J+K)U05Yi&F}tdC?V$&aPIC zRYtoL#p;WKl*cteYG)OmmP&Klkl=unBrcQ=av9K6DKAD!7a)+@NurV}ZNeg|G~lMw zObt&C04OY!R*Lk*Agl@J>%w@a3eKHoYSe8p65<9-52}`Sv8z3%Lxd25ol*xJ@$&xw zwe9uq!z#>v(g!0mxDniKoOE7VuZQY_Wsm_QG7d30h)YZLj6HswB6IqQ2abguYj*;1 zz~}3ae?+RZNQvs3Bs`CrT_=pl=^xwZocI_~NM;D+Vm&*jDdkr!>CrLtgbbpjz}<4>>&=*^ekQ24tS2*e^5SPYbr2Ma^Id@|sLB?Hp zw0xJ&JQ-pOSOGFS`t|<+3+j|?-WV~C>TxyZwJSlq8Hg$Ol!<8pMbk)s0uNuBu~MiF zkqKgT<8@ywgUa(2>PhUq2Z%2+O7gWX2{>I`&xm4pvYf9Oa$$O(6kKI^O-Ai?aJ?f? zzg~Lg?qx;w_bQ#WGUB#nYRw9Jh+daT(94tjJK^F;!up?wd?&^hccj;r)BGon6{_A5 z#|!G#UK;=mD|IwM94!6IUjx7JoOD?uO4wK3wGR#j<~0ut4%t;ZCzjE!A{Wr~4SFLh z!Ch$%X~0o$bmsR(558JzZFr1uvo*aCI1&QzS|5l@NX{3zverY#D=SLAcdvMFlMBl` zOFcsSP34Gqz~yXw-te z9+z^wn5?w)+r^dUqp!!)bX%?$sH0X_&$K(th3#x=;Y^NBnp>0-me(mITMtLSd5CZi=STtmgdDRW{ru)JIIG2-<~Ft`*lRwL+xTYDH?>wPvxaPTk8o zM{P=bQ;<|yoK~pSn|DcTkf~iUX)3H_ZCVzgRC^W6Wm<)>)C4CqD05Vryd^nV+Lcj? zR8U;G5JHN22Bth90a{nB)xfCRm3^Ek)2!RtE6Zv$46kEw)sJ~?D@oEUc&gG0um0qP zw|!*1?bR|DR~|<dg8rj|fr*=8!N!c5@$bo>ozn zyZCcLZs?Q1bpGGEi&;L`sJL$8BtRVi^q#BE-cpvvK;A(FG?LIvi69=w3x8C*aC6#a z%@gyC$yoQ710GTV8-^z&%y*3bt33>R{{Re9d%V=d5)Myc+9VhdvTpnfLC!M6A_p)4 zC!}(H7qF#Kr!WB{f!six=6FGJ^N%yklBpmp0nB%8#aTv*u)I=9RQLu?bT^IJbYsF z!j(igw27GO!p#2wY-S+(diVEVdDC?IZXncaj299n0S0wyft-`njPcNX zxks@-J=@aGd;b6mRZ2PLeSKHxOP|84R|x>L;Cd6-aSP;rJkVKfTvK5#FiVag6PN=$ z4ztv)B~9lZX{?Sh_e=PMpKp?TNIxac0|X9!f4Tx`x;)qrGL6jZ$o~KeY0>1Kyh4{5 z9QtwlC+w)IX%XE%#k)+II3hlhlTrO8Sr{A>{O*frGO-;008DY~>)Cog0(ej37uBjF z+M7%2Kb!{1+y4N|00HW;^e+$8xqDc^eApdx+x(G*^)DRh%(P_-8cmm$16myoaUx;D zPT~pV;shBAeU&&+t*f%NM(k(9q{eM!J<@iJHekl%)D!wG%|6ZJVKN(>azy&@7FUCG zFzgn9Lt(^EF~IE$)zi{t&1-zT?uN$iQ_!DP&EJxLO+8-!0K;$cgZ}`>9eDN1jZ%i= zB#ioYSG1cgwEqAvxAUy>sq2s$K;{nv)4xtv4_9iWe6w7=+gYptJA1sN91djj1GjRv z^tU(%47eP}QO{HM0cBC5;y|hJ%oz4%Wzg$(}udr^B&N?Az^k~RgMv~x(v^>_Uyi)X{;BtFz{dnr&X1J zuWU%)&Q3clTl=_ zeY3*e2n+z0sOz?Mli`mBZ2*zkd;LF13|bb}fubQewR7Hq4r~QlsaEQ$<*IbGTj9?t zwbqmmMWogyHK@~gy+^}<&KHuu@Wf0nu+*Rm$G*_#fUDd-L~UHsy*`0;Ft+ZzDLoSG zye{SuwN30kf#HoGd@rI}ej0Bdm+ZXP;mbo@!2V<})Ls^#$233-ldi+_j<5Jl0Qr8) z<{l;RQKn88?>$RIW7=@OJLA6sgSrMiz1KbIr#(L&Tv_eHOK`r0;_nLVCkLwVm90oT zEqS`@=BAU?Yu56b+$G$*3t3LQ_2X7^`C6C7WmR(1bv1gzqVzV^7n8KAx9sbw>Kto_ zBMwy?Q6I!y_BNEql$RCGsFvp`#;$YH%|taGkm}0)My(2|o7Q-&jkQ$XLi=8%)>Q>W zr`AN|*SlKYjc;WeiFrDDea04vT^x>0L;pPHNFO?_WOzTtfrN3S7#XFToqh|E=1y%v_c#eYQb4?NT`A#sdb8C2ZZsYQg~BHsi+q* zUKz5I^x}~4k_%{7=($u1%@v&(xC$4kU_{`vry(k}!&RpwS57LkDm6BO8i5@&+11vr za)uQopo6t8s7`7M!3Pxz=BaXkoKhT=novrhvq4{`RVpgwC7n@qg3hefrCCs_5e74E zs7PL4RkB{i;brO;(iKjz7njZNC=g1f+JrArscGjc0^-Dl+vD;u>w_(?x)p4}3kIV| zM{j){SARWgp7ODKr%Ll$hKCXQf_GiwUsZKY8q+mv2G|3zLThFi_Gd8W_VVo zl#~uDLh8h zWW<>qXPCz-mEEg$;m!oayP=Np{nm|LQ2t%AK@Dp_iTd*bPstbirVq{oK|OlLBz*8N zvAP+BuZd)d9L&e)oAJg$Xgxbx`>p=~4tRF0%i79qCooPRHll0fo~*w3Qm@4JnaG<_tnWuu`aU}LWX^h0NL6^7M-a^W_b=6CwkQ?kAJ(esS_wDOUtUjy}G;@Oza}*3f02)CA!3$Q_~z zQ0rpdrw#uAj~=~azeVb-Z_dW_J+u3PlDthT_Ych6gCLHh_!q0wuL*-6;b?~4YuS$H zr0`WOQTT&`2Lts>)d4MQ+F*k}-|CK`mdWIgm_%dK$7{5p0)5w?)-HC?dxtQ+UcE=l zmEpW|9|5gy9OK8L>*bZNkiCYZNS@Na=jpppFgCjKAz6usM=FuwDncy+YeAbpm- zbeUP68}O59fJk1hoj4dwW&)U4T0n)x9@PXWrB&(#lAlp4Y^l)Zgix76)Rn1eqmrlC z*|e?6T6UUAD|W*{^j@1x&_GdoH<_{UkatC+Pw@2e8W+3MbfJapbj=_U3oFokg4e?v zTn^A2GQNx94R2$EPtk8`{uCQzbJ2JmK)Rde4hrY$huf_$1Bbeys_7!2A_DWi57zg9 zy~_s$Ef0ZyA^sf5Bo6EIw~9PA>STytzV$sRwHiSKg1!y-nfP`HbAaxvn~nJC`7-8- z3YB*+XX0NExsDI>Co)JMH#jYD1PljU0$lVIUz9S3a&*?May5Vv8 z9NoUFYWxKCo2Ax}7LZ)k%HYJt`Fnu|*_=+9&z-QARIQMBs*!W0rK4+>ux(zxnn`sDRF_qMMQ2Hz^6itL$<$ zUXfN4sdS;JQ6;>oI6*`jxHT|@;+5PILVJ=Ns4h|}-4dwNR_Ls%%&HX%ty(3joo1vI zToqdFS1Ky?nvGOq-CN4Xz0)V6^mQ7P>T<81u{Jyn_LNoy)wvxP)Gsv2=)BIUq4K-@ zen&rCyl?x$6`DGjL#XM*EGm*0e;rEZyyMY6usv37)eu&DZ^%ta* z@#}zyxV*P){f`~aPI?bT@VYvcMtPdz2jz*!An;G8Wxb{TB;3+&*A|xK3=z-C(;O+h z9=@k_L+{D;{k;|TT#N>dvd{^cBy%L5Nts_cu>4tf{{Y0M99lo5pERDv52Ro%yC1~6 zR};8wBPLowlh7DFqm@3t2glJg;v>vS>3u$KHO*G`%I)6~!uG67v8a{ZFg|G3ZqM0)0f}52XD%o)_M~ z(@){v;ad6P9M){63_ELQC8wEiAQ|j9O5A~SOYlIa@ToQ1Xj9s1k|5MAg9D)xz$)IS zobWLowa5MYhcBp3NKbyo3>s@ab&(su%JBOF8-%I4~>b6-@yyOFv(N3r`aAFb+Oam$GL z4!^*tSonneAjdczqr109bKX0u8iu9`aG8heQ>Jt@ljUxsBSiw z6OE&<&yn&?pl|_}#0Zm!!H>38CS8`lInFqkJ>wrmZsNA%AVG+clM~PLzoO1V>7hc= z#5Zr7KR$Z&`!8W*X|=f!Tt4f_Y4uAS(+=8jeg6PpesaFAX=>V(L#49NJ4l@Tg3}n< z@%7*2f*{C|{OFxlmy}Pqj>+1s2DAePK#4tbIqlkg7G>V1J{SUh$4q>nCnGAz)UM^g z9ti`yO2)gA)o+%ReIbPk<R)TJ@Q%=|ZDOfMr<~(F)3nSLZ*)AH#pl=8o(0XNa^y!em1Jg=>04YJ-LO$MH+> z>ukBL#(FE~taNeH@=mR8doML|+?Dj-6zGMd;e7K_wuRl}>s=bmm7!?$n(+l&wR-A? z-=gd$f~woQ3cxEannT*;Vd(&=mCsiwt2t1t6~`4)x*?FAP01*j<)B}t~J~g~b&%HFS#E3+VnFx#4`XPpgo5OUh{}H5Edt^$J9$)JT=AL!5!hh+LT}kcGiD$!?oDW%Eyz{v@b>DwM_%jeOBU{%DU4* z=(@S`V=KselLr0}U%w@PKrqs0ZDnoM0ad8P!w>zEMN37p`e{$5q^k+dAp`3z zhtLY8YcN)l2&Bt|?~j}%)Us7e2r8^K%8$xzO2CH1;|nq5u5;9ShKs7=I-aMZCb~cq z^Dwi;*L3<m)#ruioWRo3u`z1Of zGZDz*e{_~q5PD~)(Fv?%jznY8P7(C#2#&o0Y)#(yyp+t;8g=bC@u#ak=dP9>t2(Y~2xcLF16pDS@ZW_m__Z{pSKLr!+# zjRtVpKe>VPSapA+*T+0tbk_1Wmp(!5yC)vzMtiHC5VbWbzNYcyAcKI}10VqgNt2W} zcC2s&jo5=CbM4Q~RJWw|65vPzC7=KcL7tFsI;<_p!7=I9Gs>q& zU12S2cQOpYJncRI0B=>dulor1U-;8al6=9j{{YyD$vki%{M5GSH1B8SBXp6NJs^Gl zODj+DxOGM~?E#Ju;!Z&6?zOHeH)+`H5J3=nPtYHJqq?78_DySP^-I9()DUEL&q))+ zub}BRvdG}Xj_w1bNnbP2?_OO=xDDOrJ@NklSzklAdxMzZNZZtPG5Qr)!>4LjovZcFEG?+lWXF}$`mZ&uUXtV3Kpuyu-A(w5NbpTJ zd{+Vn-b9?vdUS6Y{TJ0)O96b}!Y|97=79zW{EvC``!A?9lF&zGj-ge}Qwfi1hP5~V z(2NBotDBWuiH>7QUYkVGC!$t`qi%y8m(lcX8Y2rXs)40wfCcDi*us6itSe1o=Cmt{ z3LMpC$uA0ZD*ILY8wp)$XC-f0+QN#XtS#YR-GrK9OUePX+`e7-%Uf+H626s6v~s=| z{-OLv8%4r@khIT%`P6ufn}&(T@%pdXzlHZ(s596vz#bZ^YTUP+xPGhp3;1KFZJ^2j z0Ek&%(DpT4V5$`EjIBdWE~S`E9ZI6Z@g{&OwBm5K*u~J1$K-FtZ^MT(bDG>qUz|Ko zqLw)0s{WDqyTc8t!-e@9@oVtp({qS!46XcqV}5J%9mOOxUzM+{Y2~Ejs>m&ZydOt;(=0(|RKHRjx<5Fo(Gz z?nP0_4|27*lmw{WguMk#p;sY$EduL>;e+xQq0uhZK1jo;`%i}NI9}@7;|t{89KPXw z3r@Vk^XrqQ!>c4dx~l7xhukdc7TsMf)zv3gLTf3Z>f8_zowY6DZ5?u*M5hv~(kZf< z+)4yURFxW4P?&|sVY_Bn@jiSFzW?D^ltorLty3MW=fn2T)T_~Ejf(j8a zauqaFQr;67q2WRmT!=1u;DdzKY6i7A;VC%`Y%0|kDy<3hQn76YB~@xV3#zqeNt;+C zIa#a~auE+yt2I<|y7%jP37@>{{RQN4iCwB>iR3&(67v66$G-4L zJr}VxRg`-PQ&OCAIYyfXy#v`uw_6_r zs;v4s@9YoXq5^@W?us{&%+K=+TH4S~cq4#1rB$XfI?w$|11sYH06Qx*?go2*IrUcU z?1py;ft(EcAa0aS8=Mz*I7-+FEh7R76Mh!eyL(;m z<)zIsN#GDk!1D;lMfOqCHSa!E-W(M5g z2w8f+iK&K`w8RMupRWCb&G>^*_>SJ;1+F50`1|$$04w1ijGi&2xYBcHdjp#h<=X5M zJZ>TIRd!f{UZ6AC;gIa(}4f5|jbbd_;aD z8I6wf4up=r-J{sAVQAgXb8Xmiz)-z6&J`_OQG3NZym;mt54-lyMS4*ApJi+^a_`wnm zM>7Mjd@oFEv&`ZMhX%$7EhEZKLxy_~)hAA=uz(;Ml_9*CBM>HHeSK6k_SR*kBIi~v zY(Wfbq8#7^WR5`K6T+ehacw69w;Q-5OiYpsqvo}5HBE(~tpwDlTaUb+gu(0;E2}27 znw!f(83)WZfg zSEunMc@+6A1I;68*y0OJm@a}MCjg#!UTU?u1YiM@;V?&05Drf(qD4x(X?if%0&p@~ z)|2!c4*aiEQszS)1|LX~1YnQpIg`3KFC)2?HnpX}(U&?7J4Zw7*X9<+n&*5V)00jF zfdgbf1cGJQl5y-h&55s9q3f&^!7U?zWN>Hg?!ESrt5SOpoB|vS5^^J_RrB8s?E`DT z+T*)9$OArrcIv&ArjWlfzS6|-@|&y zb3k7?@xH0>DAOUO(9PQhBzyXE?JHZu*MtU{$bfx)hd))0Qhgrg->6mEty@(tXwG3F z&E+@E7GYz067?=spHU&F)W}`~@dLrks>gXj!Cvjo!q3#|jih=igI|FE02F)|@LudM zk6qG(!u@;r*QJLOh52{H78_h}y>Aa+BcqO)woY2~&K4yMEsJ-n>C-8|sU-}qSXQtu zN_kCsuHu|g7Ye+q6_rv|U>vCqN+lCqkVQpV#aXDTRSKX1asu=(a#?b$1ARrMrCmW- zu6lK)#1%bqo}=ns9>3vz8%V#x_{M>K!umFceZup+oa2|M_NL(})s;b83U{n5V0o&C z;-t#$>O<(HB~=N|NT|2RLMasBkwsVvTERjBj39DG;^Y-LM1|;xs?`-Yg>Is#@~R;U z0YkYIGTLI&o&utJKP& zY_HP_OA%RTR$6sJ&92no#YZAxOQ?y3YYAZiQWQBVbjoE*!is5*Q-rASxuF$B4MrFq z5>IA971s zCT^ppg1lC<;Z{0uzLRj-3kv>p5x!{Fy1Ro%~?Iq!+{5pZEPoz@6m#{2Ny?GiGv zs(4M}e5Zw^^2A>ijHcg5SWRtEV2(#WKB*OS#{=hYaC1oJ(FL4StBvj4yv?ztlLx|@jq-PRI`sZA=3o(h@a=Gp+c!8y$9Y;b?vmR z3D*?q&<({(ft&j{4*bK0AxB+dFtnWxrDnD5YltD_;Ka5>0}xIL02yCZ{1*HYt$O!w zrsmUv32-2gP9i`M2lYu`qJIg01nuo@sr+V=W?k+<2iqlmEtiz2Gi4TrjxithS2tc? z@D=&9MRh+U2dAE&&m?;U9X2RISt65wJnoR4r9l()Vv5a(@? zJA3*L!_`&?rhcf(t(l2wkmJD_0(kUZ2U>pWf|zXlN=5B($PcFM%o77|^$5&&L!s&) z4eqAUOLuRHk>(^ElfaMBS+TZm??CF1PCSm?xrFy|jih}LtZL}?8>$V!pZ!35fP+4T zT-5d8V98G+bFW4EC^ERA}b!$8_VYm203E_UvnB%Gf` zEu&li05bqUE)OShkPChvlt`J_N&MIwfE`sUd*W(CU6Ky)a$4aed3rdA5*97p&}(UJ zB)Ya>Ohl6AyZT_cqGB?%?LcK+<)TEtKk|bRIXNQ)^hsNXYJ0Y|!P`qb@JvYq1IwO$ zGn9AQyG)IwHe?bb1Ox1QNLW{O%#ukY<-;TAAmRe*&z6k9#7+SRtosF|nqJLH^u92r z%)^}K2N98i;4{<9KQY4dm-g;!+W?sXy+1U@NrAL=Jpt;qDc21rG=>=)1`SFJ$rGsKkRmqPJqlIh7bj*a6^AE)p>Z+ClH= zyGn4STYWHm#F)!T4lr=4!gvOh6)C%dDZaIWao{u@CiF}U^v@1I3u@dkr_ zC99lFy_g=vAC#Ce)o$8YH)wZ%U*;54<7-FO0f^!;>+9Tn^1W5Im}*3I?7n+#XiK5J zGwcHT{{Z1dtEt4v&cU#FngbF7t6m0zY8mBw=AZ{ABG&=@Ao+$W&Kk8Cj1?vVQ$7Tpcb?R zzneMd)_>fd`@#A{C{k-02LLVSGFP7)n0*zBTEBJXT5+r?LY>No{#+&0)MteP)w_!7 zttUxHX)Y?|DsX`W_bgpjz6#a2d@nhxRpnFS?Zliik)3ZDmC>bwC7Q4QPr0VmFKEzWhm-NUJKdjopP(yxL60& zi6sM(xhcg#xD^fxKwRLQMT(UIr&KG|0;gCjiC2{^Q3%$Au}Cg>T|}vQO0Fu_3X{24 zs;X~BsLE={Rq3lt3TZ3VYO3I`RtlTKl^JeUofVmGw5XJ*!PE;rxLOqopal+OL7)v#*RBJ8)xAax#cah`&LJayUOdNOOPe@;^{{RSo1Zdh(X|Bnr*9VV%pmofM{NH7<_*bGZ zdEU@K9e>AF?6sX!FfcoMe`H@Ju6q-y>frfDsAKhG3d0!G-v^4H) zip8|aIm?dG1EB7{eP&)N)Wb^})`p(01Ch^8tI})t4s|Ax<}|7YNXcWH=Fd#W^)ESd zb^)hdhMwAm#qERTba(u%&vVa3w3P8fR-*O*=D~GW)O5zu8be5@GnTc}&lA9m?08p3 z-AZZ`@d0swNdS>B5A}B=zB(!zja|e7?a;vS0vi$LEq5Jbte>jX@Ri)M8!-ffoW>74 zVDNgP#mBhQEt&9IHZ(^tIU|DZQ3xIySR z$>Xjeb;hP?KH-i(5yp^g#tVsqCxIUPEb*=}E}6QaE^h(Gk>oTJkpKx3iO;Y}yl4Kh zNis-0Vh1Ck8SV92=D1@TVo76wAQ%UDmVw;FobU`RZF<<$A(8}*#mz1Ous3;u6EGmO z4E@oJt2WxmI%*Lx($LofBywHJ5z$f9Yi*`7A`4hZ24DjO8Hkbuj(yhK+|y1Q`9!yH z#`w&0IqD27Cuz@o)PD^vZowW<497g2Oi#&c$tv1kxQsCp2#WP?dS7usy=o zt6q~r)5Es!JBgE=k_pC7ZkSqD_Y~Ulz(A`qa%AQvPd%fYDw;L9Yuh3PHjgkMwZdi_ z1d?;cAyzw0QthBW;yXP_F*7DTPpo>Zy5~z?<4L(~8f1gkU>-9w8OK>rd`3f0m`s!A zjEwSggV-+zt}?FYJO2RTvuW~}Cpia>kRTk%^jUPZCl?T8iIx+?WA*Kvslt5~nwY8y zacIbmyhL>W0Hij$PWY0)m6HC^f;#%PxMk76O9L^_In3$SdxJS6h(EGdfc$9MtZNC6{>LLQus<1f zhh6Qa)@6=>WOY1)IP1#u-UYEV+y-RE;(z7T6CX$dR$YE6`Ugz3AJXg}-}YZs{5aK{ zYDD3#B24_hb@I;-)CGX`04=L}`-Vx!-Es7upRcr?Nv~)=i%wVP&%?jOml~f9{#Lc3 zCz3&qW*6M_twZ7fM-Ue^LqWjZ`hXB}gW7&H{{X4!bM5UM zT=5&K2Mv_QVoxNP!$6)F#lQabUDNab0J(d!k-PSfviW7*z>g>nJeM37W_jvQIWnC= ztk}^6&PY7RCqB#81 zE#5<14stUja0(PFT{{T;4ffX<6GPOpLNJh|LNFUXX{Sn_@oala!{{Tat0&Oim zol1-Xp@L*)a=%N-d_r5C#JE;}%$NOI+ML^WGsRRXn5XH}w0a$;MQX^pBLxE0PuibX)FRSNA@QlMHy zRZ^ux)U8r=BBr51OsS}qR3@QSAIh@gt2re@X{&U?s>N!VN~slsrBEx?6*`JQX%(YE z%Q1ysw{il*%BNf_inV5-nbiUorqu~@swB|Vw>3G13z~v0iQy&_f>>p|B^39CUFpCk zl(&T}a)%}Yz@EUA(4N4RJT{teNosRebwpGOtAe{!Ds=)w2&%K|Eee5AtkfPB)WU(G z93utDJ*V~&bXHBWNLTvh1zPFL=uXuM#E+PcU zz>lxdHl?3_O8Vb{{28&VsNvFbjdS%{x@9p+i$@m^k(QVQb0>yww9-_L6w*&tISY zubX(H{Oof>_LsPpbOSRJ+a+u24kmYUIOi+N>l$$+6Epd7F}IP&5#4PS81%Jzl-Ti5 zZFO8aCJS=}k_Ki52L&fgEi8LWgPP)99ixB%#E(i%k)GV7&<~6PW zZfOz>#0-*pl6b*gGx2Q-jBPN|-Y0AxK#l-C3C#Ceei5%CqZ%9tcSFF>%acDOHRw6S zRHl5S2x*vUjs|+?m1@THI$O7C6Szc42bmm#_n-R) z3z*^wc>JN!{4>H0I6!NQq=N8A^twzmICYLA5Q6G~EZhVg*fJZpF|r2)M@1{q8-VSO z{*9zI43CHj8TD`{9RO7ICK6s+PnctpXM!8ojzGfIdjMl8gVS+t0G#GSWSsZRs?O7* zO!M0q>N|jVG0c>HGOX)520Y*Z*dd}bIi7Rfb?5$;G?!+hqz+-Tl5>nl@T*r&1Q6Di zfZ>M0$EG*{cUYAnuP%btjscvG4&gDl_ZZ5lNE(Iydcm0>W<4{^kbX-40Ee{l>U9na zXO{_vPaOzx9hP0YL(7;rGZB&o=AH&*V?OIe*6*eq+zMwE93z;)IhYv}$R%l~jiUB| z=sY)=iNjp1a9dw&V4=C&$X-F>9a74iq%K6@%ShbDBvS7TB-K0d|erVuUa7=`M865+oL)76W4kVK9?k~%9o zeyCq9beaA~_*1NDWKQfE6B+*iKV^m~7PuCYKcA}gbUg;8WCKPH;ns7Ght*_T)Xvk_ zlh_WY*?L%lyu5J+MfIZXzY4?Iiry?(I6jF`=V? z1TQc79!>cI;{+>AsF2ntHk$H5!RWVgcexx4{+y>D9$2R#>0CiySouxKtJesk6}XmK8^?Ee6X z8rQ@wBZctYQ%`f9FuS-dEtLz<)X|9w{+D4K%JnwZK!tl6^It2!(g<13uq*01zMMT5 zk-N2tT1x5Wyy&u0>qV$(rM-%!YmBpQ7dC)asxdAVX(hCRhtUa?)V(cKimsv(jR35@ zE>R6t_Q6)EYP1|uoUB;Pb-K500PjE$ziHVUg4EL(B~7esHpa;ITNLb!aJ6)+5Lcw7 zp~&HKciSr-5K}2G2i1E!od-NB6*MxruaOVd&M8GP0V|HjSXvdjO0s=7Ea<~rl2Ml> z5~B=kQuP$kJS1xG3bjD3y;Z0doR%rn3Ib(7lD0-1!imXjDTPHiuTdbU)Jbw$vC=Bj z6-KKJD9|c}RH&`JR;m&rTCUrLNGrC*QLQv3)d{UZRY~JExK)W(?iEL>h{IS@5?E8E zRTu)8#1M=HIx)`*tx&EwDzySyFsf=vP}MF>Vp^Kgl*HyHqZ(7#tAzF}>{cS6RO+=} zdaGC|3XckvV6VAUtklA@LT1&>YGDfTD(*xImj%rTu=J{-R6MKo8mUy}5)CcESE$8c zlmsfUkFgnEhS=aN3sIH1Y*tnU;>lGnX<=yEgcp=>pggs4l-DvsW#t^AV{oohk3V@y zQL0w$?Fm?Qsliq}x2qYNJ5asT(bxP9kc;l+9 z>sA7I^H19!b)8x6E;1y_?MAuj{UjnrE_Ik}x!;rnE6M8C0m08`o%}}tcMH;8T$i-4 z_9Ne-^Yofn!p?T|>+H4UJVv1K&Ovkzd*|u(S(>#Y<=e}IlHz?J4v`bpdQTAOg{~yY z4`_2+(qkjEj$vWk2SD=73<(X#tgVhb;c1^RkrM;}4^DdGW7ZWL`w;jn$m$QLZ+}Ir zsZ%ZlncO^~fP*<7l)#RdAvV^=AW7X4TbTg*@$>Gjq^$iafj(3DNiOpa4?sFdo}p<_ z(lRp>KBx7M@VyqC$v>2Aa07^kH=k+2&QMnYZb3W8r)6*bq>d*dJpyu#d1{&{2bm&Zfe;DDxDYu# z6?*nz@aBI(aLxhS$&cqn=(P+7GPeMH*Wj{`JH(~$JWdn86M2dMdlN!IWfTmW_kdhmMj z^iE%=uRCK);I-Qu1;=xoS_8WP4`YcPk~In>WDUjgNZZH!h%*K=$XD;{7neSKjwTCp zfJOn&PF0E&*jNeZJj0P4H$mLcdCW?!SM>S6H(JH6Suh> ze7l}iYP5sSz&y=6i0Pd1#sR=8DAd}@hj2L*-PD35!J;^E;D&;6z=E8hjayr&=D2xD zbAcm}&`wP9al|Yd+gjte2jJ`k$=oFF1Gh*rud?l-yXVXxv4$H=N&NL3`0}t%mzhet zwU(DO679e_;AO2m5ID#EG6O?H zoZ?A|fCzJ=&hPkwU6tqP*wLgK;z$BWrsL*z-^}Mhf=5R45rrCsQC15YNH}g_Qy3-N zf2q#I5iyJM=&S1*=aLU+T8On14Q$|GC@B1Sl&(Vt@UGp&&xkmcBSDbj4u(V>w%zeJVc&J zCxHXH^wf3QbqNjroDw*ne{Zi&>kikA{XbC+O-Oo zoJ#zE;vE(AY5?Yu8>B>VW7&UZ^=}R_^vxpC1*AaXemwki{{Tz%Ym({>Eq9otBbTht9e?DK}$D95vsNk;&>wocx!s@HhHG zyM4n=W|n~9To}VX-fYDC75h8z1I)OyIjrz=SV%--FTE9QPX@ea^L{{S++ zpQ}<0VLprVua7lN^+*SdExCc0UWdg8tgSsS@Z7zimaBdW(mo^F-erD_@b`yU)--Jj zy^9~0bw9(x$-?t@w4F~83-%_z;HErqK1<^sG5kF_$8_gr_!gse-FdsJlD+4NJR0_9 z3@-(LWai9;(a&1fo|N3wr?Erp6fL+~$4uyo)RlKNTdMV0>sYM=QydT`!VXnxfh4O> zYD?OM!U|i8VqHaQEzVZ->bX>2RNB?bo{`h(It|YY-)WUF7s|97ju+8%TZQI%m~`BI zs4Ba(@UJ(7TNee^So(NJ^^I1x0Fs zRf=sFC#KM0K~SisRMk_bsx_4=s`XH)*DB#5uT5jsP~>fTvRahJm07P&X<5)Wl!}SY zNve^NDoH?8?o|lJ6yQ~AZcl1vU@FBjs{pK0Q&ch)YQbA7tze)kIajI`r-fRoaH%W_ zyAqmJifdU(TB8uPTByZTgs5|Zp408RQU%&04EuVrLywDj9-sPABEnBAwBQ zJu*NXE5Z&vHxKN!*y+;#1o4vFe9t$k}P1~@(Ydny-X5JXHzPCa9~BdHSD;yG#Q?cE{t!1H-w z+>lKEym9lCYNTWhFdB>;Hb{@@9cDP)A!Sx+-0=WY25KG)fIe2VM;PRu3iraZ05|}id2W2sj-AxjzG$fDxByFoojDKk!$6Nn8%G=>u($ZG83LUx&`viXyE6jMmbpC7_!?g zssJWnHL>}LCji8Q{Y3D$ZR*G&v&oSY)9kRTXlWNxMlsY+)oxl`k1!FF^8@=Y9Yb(9 z1PI6(=hvZIS~1%@z|Rhzp19}ix%!1;R)yhfw{r^hrm9QHJxGJuRiqk0z&@V+We>tF z$qPD+dyfoiZjwZ{3=BlCxcCppoKt@z0QU#`FMwzlV8?D(tEGNsN86Po{Yy@ucLYKq zVjN)c{uji20r-IFEPI9w0&-8M%a!(RG*xp$feLNFw%sX>nD;*EcLBfC^H(Y9P9j`? z%C|>O1ER+DLav=*!q*l^sZszBWYDB5{{XW~sbsG(AbV0O%{CH&_Jpk+sA?1&DfY^( zW-W(hP`RcR%2>s@Y%JTCt&6%Ii!QC2+8Y_=Qo5$JYuK4fscfnTgz?2qv|M`vzb{=@ z-Cf?UU!}hno>@WNFn>k)t415DN$$1}vHlfkfRN~4akXSL1>nC7>;q|xbYDVfSlfZl z3p-NKTTmGpTJ)(aO<-C32gdwK_;3vQSI4|v_)bj2SL_P(8t&gkiK+NikLW&&PJEaj z&#w{q4fN*+3&Cm@rG&5EUNrnP1Q>61`JeF@z&i_wYaz)gyQPh#Y&PH(YMa-eZDnSa;-$4-lH`$eh*t<)rM)7dO?^O=@`cWbdRsY8Ap~Uw zYtiU+xL-)nYVf{Wqd$f8e-72*ad~-R)qBf+0(fGtr<^OntAg^+Ur?s>(2+@4V!^(q z6RDs~VN+CM2L&>rO{+*oN&t)~1w1P6R%$BFP6b-3u?o#pg}gvOQiy~p0;(lSZA7GC z8%ncGs*P4@s>Nc!2r8m!QBh5Xrr@TTT=1caC|#hM;FWHy7O4tV8nfQrN7je62fTqN+CRRhybJ6)RUQA&{}6urDb>qfKk-G}coBL|t~O z%y->itlTP}3oE0P)+VDu9q)vLNqSqYJ9A0xm6Ylrt4^-?O3GeJ^>r_~9hNtSs6_iE z>NkAt2*hVM|sDxU9J2cg*x=^;{;_~WlW=(BLoh8QeSpR$bt-Z`JkZV zAF_+5jk)w!A}T51$7uR7_wcMe7|&@97T0tq4@9(r*ws_J02p)Gfo50r70U(!st z)Ew-A!TT!a_y>4t}lw0OXk0I$T3! zoB(pX(|-~xRVIzCC+{xuxzHM0(c6aM>ka{DYA&U4sLs79t!n; zf&BjfKew-&j-LBb4jg z_8rhf&IU$$bTN^^Dx?xC>eavimXJC5ddFkcc~)E1u1S`PTjF3q0DfF#zcNW84|TrE zSrXZ4-7ef*KS@NILlcGYNP9GJ|wG~*n1%GMq;^%jX1w45N2TAPMx5m9a=TyJlSBoyRR5Gu-U{Y`jQCdRh=(Pox9pQHH1#!FeX2B74;S|&U|@!US#7Lg%YIUbhwKF7$5daYb(l*KDr)ktcB#{j=039*G zCMIK%-W58PBOrN*{Ko)#j-5ix)GwUoIjtm;Aom#)9f-;GQB@kXHMX;J2yufD&@e}~ zPCjWDnvgLZ5Dqdk#{~UhQ_!p))&~*^8717n%;&GoRBh2FLvjf_Of-o-V~Lpy8#Lat zPS(RPTuw2@JM^Eg_gceI-NgRIc*`w3yQzrG893@s?6&MKWzA;|0~|^D{{Ur`gZ1w8 zJCFnwyH4O^KSkteSMtUOtnjq#^+tjLJus&cV`ogPTUT)COn;U7WAN9;jeRE5bD`MJ zf9>;MnJw-|@BSB{(Y!|bPX(v9RhLMw*_1#r**sACFPDBEekBUKTH_EP$>gu9)4309 zw1e!iHFpfCm1(xevb9Fg1cNz@obl+GRnupbs+Pe4P3=k~D-~V>sN*?6Rk?DeO1)Xj zICAD}L`!j*C96qVJtGS8LZf z$>QA$=&LnjQ30-wqZMa_3_IhgHB~}T{6rOR>2=q=&@ZAgzEy8@L0*qc)*>>p@11AU z?s`_FA#1YqdM}Vzc#=A;T7E0XE0*}!zfRIB%N06BT47#GvkpYkl+MN*+w>MC_r$V&A}NKL2`mawrTp=bTw+l{)S+v#rdW#x*t*KMO^TpX-qfr=MUF^yrImZbhsm^8+Tw!m^I=y7v z8CaF<;-qxtXxrAxzh2HuPpa1$)x9pvHNK^J9eSI$5zw!oRHRzplJh#PsDk0o)l`hF zd0Seb5YltX)T>tqe zVB?X2gY;Qfl^PscaC>!H#Ik9ET<^^xuHz6R1L}`Wzuf?w?f(G!a8K1|TxtcCTKw%B zff0fZB*$|>UJZFa z8l=18JUy}^0sjEC`*XtfO`}9fAD5rde|7M0!;K}hpGu5*Spy&O{sr_O5Nf~fu5I+D zIqd%cb1i%65Z5xEK{9_V_g@X=@pb&ab2C zaw*Oox2YHl^AF+%rFE#myDh5Lk@=gRPc0rp)20{itG~njGe*;DY4=69XLVY(uX`Ku z8rMeFmoy2i!c5e`aN7V6DEw{WYjG!_oDWI#>=)jD7x*4O2Qo=5{_pnjyYgPE^Zx*e zycI^B7gVQi&D6w@8UtJ;$vq?vvmFOqN)K5Igq ztx_apzE0D`pF=PqY-qj~4RHX1XK?MFPyYa7m8|Vi)2y02t!E^XdisKTj+k2&bb16ElAYC0d2 zWWd2W$;`m)Fh)BpZBE^khUf$kJiW}~du={w?4N(*4x3Dna$+`t{aHI_rWcd(4~iz8 zMu_tWng0OTL4bCHEo)4XKR-mVP*?Y)hZ)+_CIp!s0O(2ez(HzUU^oN0qk$1TOmatV z>&|I4oMEoq&>|qnk-&C(jtGyk^%nPF9FAH6oNa8AAdlEHv$gc zuzkOog@u9XEN)D~b*1^=1gaWkGD#<}gm<`-Im*h!J)j;8XX8b$+Wh`q2 zOoM=BeX~XJojULudQYOrqtd$RSA9tLQSp^8_sy6*q+;17S5);*Y8s6QD$KYlrCJKz z<0G=>Hy^SMk5w$WXjh`CJ+Q7)#dozO%~p^+Ejgk-S@_|l@3nD^!TlHGEe)lY5OD|h zU%z~Fr2JcYgVJGs74c<6DZKI?}BK&6)=X;Vz*qm-tU#Eu}9 zGKEPfQXW-Ws>79cgyKl3tGKH#Ri3oa5>SG;xeHvCq$i}5=M<$hIi)p)D1>b&)5V6l zOUheHmlVMjKc8f>Q!0Nx$u1~VS+{b$!n0_VdYMZAo>e;KTOm`pDx^t4HGw2KKABn; z83-N|lAfTjw*-=!N>jo#U@9d7nBtO=7@J8X6v|~IhlJW?Box*qR~DG1=xHN+RGOtg ztGp|90xNDvCC^uJS>OOS~`7B5n(r4#LHPxZdJ-w^TNi(tKaav(~p^Y+uM9ED{)R7l!H&H z!q0oMuk=+aQ_A0xqo+fv^*T)e=4YbEvSuM}>GWeA*F>7bsw?W;4o3^k-kj|#ds1%0 z+$^1G>@AVV61DYVuPt#)&%oskSA);}DJ(8<`I+vz^fU-KJrAi&n;svi*vaPvtltw` z$q#9QCQdR3?S)p>qsR4QgYLTK>RX)j^jFDOg}8R-RB17d&2j6{h{wOlW?Q^5uFmHG z56GA%IU9M1;c0lQO_|#m;P##!?$<}6!*zY3&cmt(jK@E)`L2n{Jyj>Y{Rtdi#c0K7j8x+RBcB6`69fH*v_Lt-YLBp0)`WDm>f5;_IqG`p8kzM@_+ zPUe|1c>bN;vAC>z{{YL=r^fwz;XPAr&TxL-zbIZt$MK4TZZ7N8coiL7(WA7T&0{>h zG6c?eD`M-*UO}D19WYxXqK#%@+0yI5x@?H@CoJ&E7r9`m>kj83FMePOMQPuhhM7J-JPqj9$F-F4rj2O zVQpR23;-|^NFHoV53uroDwy{Th{7ftp&xzLq=Z!<-lVY@4}<0>#k)$ z*=tziGJMV?p2GkEAD4g$=$%JV4cZ7EU+d3#CVA_Ss|u<(m%1SEWDYxt0%xA*l|bpB zZgaNCz|2UQ0t6Tl_D#9fTH24PO@-3X0Uwm|B#H92WU6*n53C-thLE&|dOGiFP7@;O8peA(M&=UG-Hs)t&M_g;%YITMjA2;Pb(gi( z91i`l%uIF6<_f^qDi=F;004sD{&VFs&;Ut{@~PR^f&c@}xokd@o@Hx$t1=i0qQ3J0pHPjy(ds{Xo5C^B=Zg+Nc52h z9o8LkSogGV%Rp?7;YBL1cbM=9Gv7H`R`nYLAi?RMaq?P>yn$LxJO#Ac;7k(mK%*y$2O+`f1CZ{kK4faBU1 z)<50@8*@FnEU!38eK_J0+z?i)?t!(`CW7IB@~H>Gj*8>nPeo4UsmP&J5>EJ_M`PC?E_~$Y);Jg4Yh#N7!R=nJPSg%S7HWj(zEg-SPM+*oA z>Tz}3&2!Q!1otJpEgMR&33VEpP(4&CruM6PambXH1j~L^YdZHDO)yus(`{R~h4bAe z;d@Oo^UAq;>6LzfrsZavl^SZpT)b9`Qj9rO4@?eFty*i-fmG?aH{u{^#mGz29aSyW z5NieLPjUfKM4%zTS92AWI}xEs(nIjo{{Vu4)KQ^CgtDzwVyy6h8AQT`OH+ax(vDJ^ zQOczkQCE3Rs#RyX2|AON`Yu^?oU|x80b#{w+`U|JR4!JLMF%T1T&V)A(sFexz@^kE zno{Z&oduGV@{P%EQ=kq>Dd{dul8uEdBVj;TX-=k))aqqTUanG1a$O>vrBr$V_17ULl~u1Os|AvZ*|1U3 zVr@D(N|RFBs@Afrm5EKN-K9t?DsM$vjD_U2D@Y}Jn@g@el`T@xJA^`criA@FMtyg- zoiJSIU<6g|Na()n{+Ij?D^~c96Xu4>+I|M#;ivjceR^T_oaUJ6hW`L_^$Pz0j=$4K z`$ig!d3b1_Z|AE0XzPl0^!Au*S~>O$<9~`jjh2FiT4C*Tpo~K4;!p1VbM*Xms_Dhj zJq&w=;q_W1u=FkG<z&eN2l|m)35@iGrKQqffL``+pj9U<+u_L-}%DIZlvl*8TI`VIT{9`0FPcur(U@& zb0EPTJHd?4bgO-3k0cida8F1)$FfeLbS6B)0C4pYk|WbFRY7Am>d>~CY?4~jv=Vvz z#7|HnN6~q2_bm@-bos|lgnn;q4rh?PHlT939p(>)Bb;tg2Uc!=%?a<^(ht6W%x(_g|#+ zZ}eeY?KRzwJqYT1%KNv1zX5GD_Jc~BT=)=R{YgBZRmJ?D_~(PgKjpsH`V+<1_W2Ls zU*NC%DnjD3X5sCY2XvlY9XkQcEpHW8Yo7ArTt*|L$4_PYS5NShY1`Gft+WP%v`;w1 zPrCf+t62xR#E6#?06h;g@?KB;GtJ-fyuJDR-?KUY0BQapyyL>y=)V!0n%$!_0tCsx z{bhOWTGh-Z0g1^Th5-5f*V6+?8#n-BVodvYm4SU-zY-iG0WR|6aEQ-WdvLzDf5R0W z7TN9%6-6-90kb=%3EBr7HzyqOsXJ6Gd1wLyx-`g>{aquZg=Vtr2vFX(#PONxgLdtmYi7zc=gB+p)`YwJ6nKznz# zT2A6bjz-am;F-@EUOu*`N~wxRaBdp_#127m0LdQemDOht$Ozm-hJQ%n2?TQkIpr80 zmr(JEZVTMvKQTL6ARdiqi1%5I)P5tk5Mj$LLOU2GGVZ-V>DU6YsB1%c1ZD^wiRd7ld*xNBQKZy%!dxO63`izPBhbO;h*-5R zn&%SlCsy zq(O|k9Y`b|v)Hdq;r&IsOQiXEFlKtsZU>a|Pol=~aqUB#TH#I7I>#XOl4s;OS#|aD zz&ALV+yogiCMHe+kD6K3kHRjd@6RSO3F**qK5N2i&2yaBI|FgSnIvXs{v)?!rzx*d zqj=Q(X?Gk0Fny1=r*-uY4|uh%YlDapk=*_N0Fb@~NyIhX_?VoS;B(G53GV@1u(-Gl zEfa$TMo#D;xPd3P%`3!2eS)u!gQssZi0T37Am9#oUem!B*`3>gf+Ww;d>y(~aQ2Fu zqk_-?+djCNo*;U{`j>;Ny`yO)$K@~t4#(HkWqf5{qVz3rumaZ*d0zWQ{8FsUmjl2P z(SCi<^#=@+eyh;a*T)~J3og7`%D+Wg{wtRb$AkVCrSR8@n*RXI;7Rq5lKi`8;t>Rw zN6lNd@o{VxJcIng$NdU#*A;JD(2uImsi^M2Uz@Cd7oO7(c_K5!&!Fw^3(?vBI?)0g z?2g1ldZKt~zT;~^4COMF??cM?t$+0kYzO}UxIU;^{-CV${{Xm8NRQ{)KlHl)00H+u zh?d~KJ!}4=EQjW*IP_MT{-SIh#Z3Dn{W}Be4Ou=W(wkb7+ItxHUp{x^-KYH1Y5q6b zJNm-Yo+y4q{B`hO`+DWzM3m3MFBckaXeS@#eG~ET#CF#pmO;Y&{i14Oll>)ib>sL| z`_IAp$f&`di_=tW1@I5UUmG`TeBBq=Exb_IH;}xZxynrnw-8fl*I5Gnq^%n!O3MO{ zr*c&mxXRhSv6WJthE$T>lcXlNBeu7Iq38_z%Wy$oF!8U4gMq^O(F+S))3-F?Yt6+< z{9E{g;Yf3gFOKR~n@L}=zYu&cA=vJ}Hh9;=<*qnhmy5SY9Xtz)2PW2J5*2qjcgI|% zxeJ1q6$Glq!XCMfT=bIUkzRtv?iZ=C)S;`uTi07QmzZ4L#x?sCHA-Wcfq0tHz@ux@ ziZ&z(1(Ze9OfTI1!nH=>!k%yj8{1-1dQ%gAUIFxb~1Ou6pKoieGdn&EgTK%vCkD6UL5e5j3dO%cow(246kImV#F`m6W5ZgO&0|2)k zpp0iZ#~AE`PI+@=a%6muJfN*l;qG@K!=MKyGv5Q~s#3+u8Y5ofSnaOb41fp(5xbfD zafj&q#xC$KT~S>6|{=AE0j0MK33gPvW1oE@MH=Q6#8-q!$T35Xs3pSsyG&d9%HrLcsd4zHV)uzGg&0Y;U?iUsBfWNX*7L>OXPvUp3YAhdJf>g3%fIPonA8 zFE^<@tRytaEC+Trhhj$VCVL+1&I(@?Iz#-xmX1Tg228d@1Kh7yUrlQROm4{saos1> znGw(<5s#1nKwtx)5znf67!-7$f;N)Txv~I1m$w+tI5MV~8+SF$aTzTz)||wSOblS< zTzgvb;Zen)I~@a>dYQq1yxzC1Q)``0nJr^T+6#8bj&dZo13W5_mg!$^4)~QFEz5S( zEn`f`+E3;JIVbxnRc_5k)OPW;yK-FP94RLdh*d4O%#Qy-qM2YUCH*^gvA>8iT4q!Ll z57ezYi~4lSgIsok1Y`l}yNsq=yi;Lhxvp??V*$~X#W70y1k}2?%&8Q5g39e<>@O1^LcaJV?0UoI0A5g;@O;fpg`;I+V=qFfN8bB zv~+R7&m{2^?6E1(+~CNbu{klH`wM?u8-q!LT-Jjh@oqz6B<(y;?6IA0;_c0M7?N^l zA2SO`f7-i=4ygoyOyeI;(6?+aA%GG9Ck>EhBObi+uxUO9Kr`#nShsU`G&o2H9)ll3 zi#4Qs25W!@wV=77@<|_*AI#avgN$^_w{vXTxgtZ0hn53rj*}hzB#f^&Q)%1)iTuv% zKhg(sa5Ao5YJ?Al(GG@}7aVRJzyyPyaHrKZzol7*g6A{<(m^gDWBOg3e9UlHu(Z^v zQE4tAkJ~$d8=g55K*>Jw!uZ`!7QM0zhXc8;>zN$&`f#xCHJXv;sOMymNi&$t^V9P2 z5!pG*H`lcv#F{|irl5EpcrediGVEY?OQZOv;TtKm;txaUbNVlhJ5+gzGmWFrM0|=n zI@hVsxcw2)7j^Btuox8nt1Tu%UQ+mi!wYy>BbNr41_3AE(mVB8_rHwSPG}+9 zT@fwg9eKl#Zi~cQ8Gtz9GM$8o90F$^sbfpSe)sV<@#8fJJxC-I_x0c;pB-E}CZng^ z%BtHfq%?^HV4Q!dxZk`ubv^_#F{Z@~Q>wn1o zPxn?Sc;dMJw|!P8!d&`E`o&Hjka+63AD!P+qxgqhfBZ*(`j7Wm0adJ0$iGLjr}%+Y z-*r75KxrBt~^ z%Iz|~iE^9s_$HY}^~wP@8?7LHn!D=vPZY}0z7eO+3%sFkSO%9u=d z*I#-31o0&*alGP8$@Ko~^RA~Yl)VGSuB7M$kLRN4li~9|zU%mtc*>Vga6i%nubgAwxbnF{TmsB24|$yxgTo=Z=%-bZF+e1uYp!ZV-Uectw|xU``BZ=wx1Pe%U$PrnP| zY_Tn?B=v}2Vep+`DeZ9by^wSLLxQR0_xkcz_EN3oJy(dMSYsiikl<$y8NrSL?zV0B7(1X62n~YR zi0XGA{@v5CJ*|bqb{0JH3?A6;(5%5{yAlj=Vwu`V+J1A!7q>OnrLo{!;e)mw1-EqSK!>S4h1F$eWLucPaBO)LeioSBB_ zq>{SAj@FO(fr%0P_T^&J-IcC>7Eq{La_SUA+C$4)&;yC+?l(gA-X8FywhgTSM6?VB zh~Q`4P@?x#a1Jub8-VIQf3o^6muN$H#9?d9{@nd_sMGW|v8^XK`GfOFyrw`gft;L> zuT_3K!IGOD5z8ekv?gVr`{e%m@+#Mht@0RRIf+=Gnp z3E+<_XEbDWsrIYZ2ATD=-xLVhEGFyj5(&;GDF7MM8% zMi-B&!&J1xjFKXK&nF-ZV3_Q^J+7W9v^oBIjV2soI>tXVbIw(JdJm}RYk#UsjEHVT z^b!om%hGq`JovMI(MDHHdAn{TP|$v-N-S50l;@@?z%m`2ad4tty)FQa0TJnB#4qf zECJUJ&Oi(3ejD)nC^S~8=5G!B!wmvB9C?eR0x$$Di=B0^ca$}xl1z{bjyT;JIp^6g z#6BmMiflP88=Zm~-JnlVAUpy+RN5me#5(-B!G~=AceKlgG3JQ!_8nK1vbJ;F-LQ7x z$jOXHSsyjm6@#U`1J5}i;J^f&^Z{@9cE#IR14~?g<VcH2CY*?1j3#MC4KBp*By zH#$tqhp#+^z2YAeRF@YpIR60rId*10H^S#^@LVBc=(>Ss>YZmL!UT~p0OWJWWvrhG zuc>L_tu8MwV;BGo^KEp%X(Ry>W7T3 z?TM=EIXR3S{QAiN6ZUMa6TeHU&|G=qa3FlAm3n}0VJa8a^^ZgZf7dhLyV*p?d z!asGUZN|_z2MrONo}_U;=xM6gE+LsbxMF024h;H0FsoM7_IZf~$Dlc$>dnmn8brqu zCPqJ=>k6ZHJIVm)4<>qjdnB7yDpd~LUhJMHpX?PXwLv`N`RbWpNO%)az&%L-{Svn^ zts7cPgpx^-Cx`>kOwUzw5^Xztj-KeMKWRH)`o}7hZb{_-06Thp){Q4ia{vy%x|1fG zoO=3YT(qzxf`6;5{{TDo?7QKTKUeO?it9vDzG3 z&~X9*6QAlPbH-pT3mqu92ahh{k=1VLwk>Y&Fd%?I+V0%s1N22;0c)e7Jq&!Xmb9w2 zb|Yjv^9%)Q+Qc*xQBtBZK}~z*q$F6&HH4~F-U_rR#HuyhoF^JctNzm}(XhfAFM_nG zJQS@|jB2`asaH!Y*0S6t3m|$YqQ{G;rV-Gmi#6;HlskTkwOu#_Y93alm!d$Ry&Y>+ zp8I^KDlApDVOzRQLee?qP`9^Q_Oy{$Sp5z7L9NEwJ(uc#32RLtXQKQU;GYwGCk)36 z^rzwf0FDErE5q~n^6M)78~)-#2QNRO>tWz$qTi#H$AsX;&I-oWR^`wNsHnu(uK)#p zdi+e)$D8K9!{Z%B0nc^$hw(RAK5X}0zA5%EpV!8`XMZm~>&8_pOIy1xcgTGz8d&49W_LaHeYs0r|zo)7_ zUZaLj3kABb!*CrOaG%GC%5H&W_G|%M%pm8xF&5VN)25>T)5Z0>c5_kudpQ+RMjRu>xo!(+TK#!bq zlS5PZvT@`hM^Fx0doHs9qnR_w0%zsQVpS{MJQ7H81d!-!fCb}#d&p@8A--d{HX=c2 zGACJ*Hq01uk>15Ws@7$CYJ&r$R0 zqVWf@njNO?rc444F){lurP1fCUIls3Ws1Qch!kq&}+A2o@pY99&!024WMhi8}`{4I;CkY9rl z=sru#>X+M(E%L~7rcZdBeUpN*bz7FXu;(59GH1UW4nAwnYGZ3pGmgCczq-=8(?gzW zG=S4HiQGC7F%h3>Se0zw@mkN#Or6`D(T`4lGkFr2igm5r;t6ii<&nnXI)Tx-i9D^w zG%_4nxR6Kx0O~z~PPzkdfJ|ki{!nHzJH|(7D!#39*G9r!w1EA%bF+Xu2N-no04j#b zqh!&!cvH#w$06F@jEVIgDWd ze(#4PZB3?HABp_XaD5O}xofJue|jS%RxeLn^#rV7JOnapvR? z?4H%g$FvyQSO$z&7U)jz=B{&^7bC;If9P%=Xd84_eqy^1E8LM zev1|Kp67;+KnME>q`_dsZvXalsgZX>*(n(LPf z6fAU-T@E3;fs-GUjwjL69*H!xg4&y0TR+pa(oFut*;v%ILU%dQF74$Fi~ztVfFSNU zl2a_Un2`P0Adni_pQ#G97AqQon}o|}A-yB7%dz!IW#h;&N#-1IA~=tncU84G-0h%w zoJpt&dyk_;Cp_oAas89hDA7Ky9*3`EDxs?I;954p5sCYduZx#BZEiu% zPf^el`UO_%<>Q|7?fW1pzMHol+llB8A9SYxNsJhXj;iY}-x=ag#9ZvQEo@Axc)F%?NejBA%xnXLl7mX|1 z-o;WED=F?Iqhm^VHKO~KZqDO{n@);#GYdNvuUTd!Ejm`q&gr-D3w!{e~04v{d@;e zrgs%kt?hQ!30OogT3?RXTf!0(2umrQpa_tn3Bn0Ua8^rFOB2;&_i%a=%1L3# zE>9&T=m2u1a23)OYT;6uuL+cj8lg=xnoK1kp-m+wqIg79D>mR|XuPc3hb?&^(^u%6 zEc!)UrdFw4pyi=S%Pxt^(4&++>N^UX9ITOrGBdU3b(7DrURt$6(<|0$w554% zMUg9`lzU}+KLYrxX@_y|{ujAz+bZMZgJ|oSB$K8XCRIfd0tPpsrYYIbwlvX51h790S389i2}w`wX=a~$6+5PSaIs?o0(QO<$o zAQDM-3668Zt5TEP2oM-?JjtFwk8#S_uWbJSh|t01+6LDQ{JIiHGud{jrqlt9WNrM# z!;t46Gkt_YG;12yRTNpY09x4~0|rKV#5kUYern~F2R@@5T6Pc#Jc&8UF_1n>X6M2# z6rEBxZ7qNsl1YP(z2#|t|a&wik}P(z;%!~kQ!tY)W_Lv z=%%#ne+~SmdH2Qu{sdN5&hqUMO^zORzRRyu1f9LsGx6A~5KnCWS z2f6(gHRbm1hDhQJAS+(#AQ>|3$CPyU^!1;0m9&yekCtJe9)O&mE@$0XuVH`;fg`Rb zx3Z^yav87#<|OWufy6-n0Oj`is^^dky6ybD#$WpNFej2D3(ae~s3YMtncWWu6420GMtCv+D@(v=YB$ax00V&|^5B6Pbe>(9 z4aZcwZDaktCouWyRD1!q@~{ZsP=Pp{29imVyxm_E2E#_@IL6(e;Iz*{jx*aU$y|7j zqn_u~F7p`>;Vc033a1Lkw5_R%u3)QBmND23FxNN;^U1?UF+G&r_=b%sU}yw_OQuV^ zZIcjw-HQ41b-k_*{Ny;i7iF^%E&ygdP*T)4ZgF>*l6PS3pH2ZiqYGKeqITLj0K&AF}{4CD1xXttRX&fJpc7QM%)Y)qJ!K_Pjus5i^Cpt~eB#KHH^D_)&g z91Yx-fgz;MC$R!2)jWq6wB1Rdzzu26Pv#@2i8DXIVQ1cWiSSr<2qfY+LF1w67?f9+ z;0?HGammKu4j>c3JYiEgh}% z0yco(Gy}EAyw2etaJ-hUroK;6+)jIwfCsRcUqkrCt%{+N2{O@-{{SoyAbKTKwQWjg zWXKQ!a2uo7wtjpg*xxX(N*g2@BoWRAW1JHi^h>za9aYf|kOM$C?sz=8yh05V8DVD?zLz4g97^_I8^2XkS~jAU{$w3MsJ(ciSPe1MWitn}_aX=cW8 z!1sy%Lf4_Kv8^T4xd&-&P6Wu1Tl=j2OU3keG8pEFZsNxRaS&jL?j$NgwY?_O?Yl!VO$}z#&V0qeu4r$=fM!I_ zVbXxgG@$SgTyZ1k@=-?Y7Y3LF;CA*W@BP=Hw|z21Y%+Hk5J@8=*bxfVrh!ex<-|#M zaf1`rkC$ayoMYB(JkvQ27$E+bRIYZlXGwRHBK;xf`Q)5tJ#2*h^hg;JfNgN`wdzQ1ED z(0F#o%_o?jLPt5^M`W8weT_#DLx}~euPYGg=hbZ2q|!Koc}%aT4WbrRZ!qiG^hb2f z!d8Ry@MIyP0BLHuRjdz&jg-}@_RwW2;HpNEQmU@%$#rWanxPoZ_S3hnd#!pmMDZ^v?`A-9E}~kmDAT-q0??Tng8#;KBs$Ja$+Y+C$i9KShUDUxQzxe-3r= z13j1MUk+>H2eSMP;XfI=lYnuIuhAY1{6P+De8Znts2EYyN@-d{FqF5Z6rxq7TB^;sYSO5w)nd{_)mkBF(qgSjo>lr` zJ5nl5%D+jfr7@LyiCKeK71lQjqXN;PNWXZb4{{&5``} zNiRD>xBjrw27Z`Idzu6uxb*k^k}WI4+|w9#JqOKO)R^4FP6++|74jIjx;;3+8>fim z4ClIShLoo~Bqoy5WJM;Km{PSe=OIwxVs01SV0laCos!g6pp%TI6eud~9f zXfvLKbnp7*dcAW{r$_+O4_tKgM%ukO{}93(Q?O z7B$&`GEYJ=fsAv=C=IIKA_b*`G6`&OWBHXz&sJ{2{(z82p&0J4uBes<(_xVE0DoXV zG<6%enOL{=Urare+*({d5p-~3ON4?ZF*Eu?xdQKr{A3)%MvH-Y19O4P2sxin2Og^) z`u1rt?voPj+n|PsoORvn94h`F(y7a~f=d`g32|}eUI_C#Oh}H4t}dD-vrl%(aU?m7 zaOHuZIBsdiF^_e>FypnoLoOhhENhq=;f4|h?@<0D-FZ!3{v6O<1D<@ulQBJTBjmHS zEm6*XVb0n!fgz_Dk1Iz&3;;b<8r2L#jGka{K7O2GX^T_TFTCymbtG^>ob%l&)ky+* zj@aLhN$JEZ1LI`RR>AKl?Ro9G7+9pwZZp8liNShrw~ zB0F^p)7S9k8@q9ra$<3SOn2?wXlZ^CX)s{49%pZuciR#N{86fTeKOsR1@0~6i6_hm z#Ci_1)i%nD%ZMY%0!&9e@(;8xb8q3cZQjzy360Ge4j3{BJ4laHl$}FC0nmKlgXNz2 zk{chEFi#SZ$BWiBh5}ERZW!#>W1NE!s#!J9!^t?vGoF#&I>O(7glj#}16p`yHwol! z5+jeyNm^Q0gX$0nE^C_750numCBVBaCOS1aQC7681~Zp5643yX35XmMj)E4|4L4|e z+yL`5NIW)qf@7G^b=Ep1P#E`a-M48t^Lxmi-2}?k(}V)YG;R*VN1N1{aWV-0n85>; zhh?nlOb!m(dVwSvboCH897>B_5D?-C1*RP%lgN%F9GMH+f8zlFw8j8|jQ;C4Q_~*V zEFw#IB*8wTuY6@=D&8x^I&C(!!J(NlNjY&7^AYBO!uhrJawUyx0L<-@eI{f`^j_Oq zwKR*qAlz`{4j>$n4V=z;$X;gjg8_^!lLW{u0~znSd0kLz%icY}d5MUQG3~;j%6Sq# zt7h)}f?Ktxp)s6}odTsGwgHpSAMZ2vTH-X@XEYvWeK<@PU}I$CuU|=3EnZ9mfB_!< z@PWk7IR^vz`=D!9!r-;iAb0Kj3)AUt4rw@ccs=8w`L8K$R8KJ+`maOb#{eDBJdN9< zr)*;#1SF|6`s^&)MDCtC4!wEfg`Znj1f9(Ua^QVBj?leUuWz}HEs|O}+zkG)+7C|a z$=z9bnoTfUotGnUSK@!y^oqtTtU!*(_`#2DyIpQmEHt;qqc zW&y*4yPl?cM-U-sS!%9k*BLS(hkrOip4H3_^GJxor*nN6I76o0hcLkbdChLQ4&`Ts ztvA;I%&M)bH*&El*Qogo1;le1T9$qsugPfx)F%;ocByt26>FaBTTq}|gUZ9bs1-A{ zn}2x=E&7R`Q?IGY$9*#^US_hdQKV|?-RYXhAaK4#Z(0|j(zR$IUFH+sYP7cn;Ps1Q zy>*57aDu4o769Z&+b?l?Q=QBgqcw53-;KKV4 zhJO!a2@7Mu9t05vuk<=?W3{4uWhNz~oOQD}PW=(q_h^jC~L64N+e5Ahd;%N$@W=U(5W`Zt9< zcensb`j&~}4ZttTT3y4bpPKrYggj#q2~pPvAD|gtRu711OG>YzYvKKs{ZgncSWneQ z!Mt&4%J}}VMhW*{ck!*iE8?Car;@!76?F4neR3H@7hG=uN|w2Ef)Il=6)=}5!9l-k zu%k+1JwBN;yoZiBN)6%8HW$=|T$NR499pImo3c>afPwCorn5 zDfG%QD=jKY79uIBTB1YBbyZ!(X&^%6GPo6ZT5AfmO;c%B=#*%4+NxD5`@*GIBTSYR za+8$_%C$wwQ;UG4ye72^f`h7c0z-ncRaYvJj$&&Pno}5}fw?U)$wf(l>1fYQAVks_0;+EpI zl_WhO>92BAiqZryt2ErIgz9BYC5F9PrBPB1Po@$}N{iOLnOHOm+_6^~(sdd#7mU?y z;IDghFub0zLn~<++Vh1?D$qx|VWN;J!3#v%^y1%pBz9Sp@7+koNG1y0@cSjOvb9TH zl?hW&ol&K&4`}8w^_5#k)gD?~QwC1oQPDb%q45sVIN<)t*EYZwm=fImGLTffcGm(~ z$%*y#T~jc7j0AVL?x;XvY)q8fD{O+`aUwr;co%f4ClEZOOQi696}?kg_;iTO#{xcC zU1?CZa4|AH7nAXpr6lc`jP&{{44OKd>KT|MNfJ(bEn2i>3BmW~d-^Qz2vOeJjsTB7 z))?dglRo%c_gZ;u9^yT4s!b0#>u^4#$Md39rK^B*j0iAH_w??s)V1b%q>vid4?<+~ z{!{g#rgah;*ctwzfyej>ANhbCf=>KxjQZoK9M5%!Uhk-p<%dp0@jde#A+pp2PyYa< z@JD`fC-zI$hTYw?<){AuwBb;%XDpEH9ovEALFw+8FD5b$Am@^(-CXTqADhZxx18o< zta0*043|}ovjYHh6V+vUj{OdrY!4#b#OZ0^JHCPYYf zC%MlP)7YxoyBgNGZfM+NBRfd`p5$}rw&n+$zt`N;@fj>GCP5%TJYZp_Is$UM@ubGd zm;^d9I+AG(${oAP)Zk zazv}Y7aEj&KG`lWh!EgDScrfls9H{D(#U}=00MYqOp<>#KSh~yeY9YamjXr`(0Tj% zM^!@d?eBPKaV3om6C`of*^i$^mtAM;Y2&rK{_&fd3#4@;Bhbf4FkniwFTAC#b6LqR zA7-$?4G6_9CO1*nWkl;(k){w@Z%I8it^c?hAPUZYQ zxUy|}+7+p`n?tJnAn*=0mpt{y872ua(o+NV%To06q^R`$ALP+cX0LO7F^Yzb%FRhEnWmdEh2?xq^$pO+wsR*>+ z6jg^Y#E=JB>5u;aRIBwT>0LiqH5f~_7slc@22LOr&un_-I_m0_0x?ht9)OV2XRZqP zw}kw1cQ@i0oEJI?Z*G!6fWCoau7?+VKn@9(pXo3Gb7EQt+EzVsaq2JXu&`};V}}Pk z_dKsTZ?Dze4|s6~3r9PD!);DjRhDdM%dy(tzvz~T>=m#8u1Oj^Zj>{Vw z8Lr(np)%NU108$%$^AZS!Rxes96)q)1Q2~dj$^6ly>-s=f8@YFF^$`a@{j(o@32{o zrVc6+c@PNV4hcL+2d_oEze>Jwb#}=zKH6Df1%hxg zM_jB%TSx>PN%u4UR_x2AX6(iWe?pYefH_u~xEP-)z?1s+K8hJ=T650mkH5(v7FftH z;yCN}UXMkk<;;i~G0VIAEP6D6cQ}cTk<@#w%`)qtk^MZF`NBh#pV){dnZ8TemlHExpcpb`PgMh^MbXqTUb-M+DE+ zZ|HsgNg#ceymngnok1%$;@%eZ?w(j+f~eJ^y11iQZeluhV5i(tRB8pOy*8Js zLiIE&d_fE6R#PkLeh1OZw&HkP{oDs>UI;I6$5r=_!!N^~yGd_k-v)R%KqN1*cyCV( zj4vDcUE9sT_1+xt_+v&pFI{g;1)X7BLVK>)#P_>@RPA0ilDt--sSK@;5o-|GUo_S= zj#trt3w?f-PP23jh4ViXX<^d~b5YhZvmJH0dl41#O>agmI9ZmOfni@()%0NCSI&Gv zpccu6wE7;;!u~UelD?f|uZOdh`GSqmWqW?!VN6M3P29d` z9Z671iCmebsKHA_3KLT0z^IkVNMRFD1WiUN2?K&OE=6Ok%@Ivq-9}RwT&9>@QtA~iDNk~e!YZn+D$PY%>BGblmh@?FTSCQJr682*if!%p6>^bu z*iQ>W+QgNoW2FwuX5P#I6~=d_MGYlccANlORjL58uXR8Z#9oryb$--B^S}9#D_YL# zLcB$*)r!i#vYA>ebgpw&u@&SiSivfVTWDUJP@u7^(^MK-HN*uP-7Vttt-n&aX-?2ip}M_OGeWls;x$$Bm=y=}?_c zxF_46=lv|I&2TLZ!+CUr`AqhM%w(RWSb`)xk(p`s%n?7LuX^3>1=Ifkub?mpIP(s% z$P8frumr z3`~$YoMXEA7OhKg4FC@PCOfaue}=Y%+O^!cG-PmaAd%3K{VU74 z7(yAD4w zb3udNB!IAg)9$wR(72^BH3dQd8;Eu>9IU^CJ^A*(^kw{xzo+O=6L`jxWv-~v{jln*h3al1T%sLc;K# zxl-Qdja|esjs@*5Bo(;aRf+gJ;Xs6 z$Q!uik(EL5Z6i#nO1(S)9N@l~Zx$h2hsJX?ihe=`ROo?+GKpRdt z?7Y8+HD_Gk(Et%m)mnD`XEK;QO!P7gaXx{5lXv0MYqq!z{M70}6WT!&!Nh#mo&2BV z&lToh?Z1zmkDT~o_&KenU$iybTG@<0pKBz*EBU@xTG(+*>|42OBYr*z|pBL{%Aw{p+zRy@7SNu=z83Fcy4e<&T} zCy@u;d775+W=WA51D>KsMeVg6KVvIw0n84HtTQcq?rYfK2GY}rz#+@TYIS080U~B` z@(WI4Y-Qgu%>+b}e<=bW^_&%xQph*YG7o-^?fm`Lg?slCFfvCxOL6Y2)T()W8e~DI zh~z|L1m`h{TQjjt5Oa)l_3wnYKQq_AQ|PbW*foF<2nT|A^%KExRhe!EMCXb0=h+2? z(Yh1nKHa~<)U~7>3=mKBfsdEE&;I~q9tj+deE=9fvXekPt_>WYx)(k+scS`!0!#n_ z@BaW@6*{eKz&nA=0z?y-nC@29w})L;3&zZ5Mowb`89dCbtp~u(Y5xG);7s5Qg;rhmvU_oC^@dlqPUpjTHRQarb)Yaqfo(u7LfhV&24~INR90phA{SN4~ z1C{h&4tSevWgg6X<@y=qRB85KKJkBp1yDqCwR|<=K;g>uBA9qpI&)b3gX3?(%#zm1 z`OV+qi`q|={TJ^G?+i8EwpW?dzYf@cq%C>!Qhpu0{5gO8Ptjz*@a^;YO8u>Q_;kT(B7l27NV`oR-r%~tJAnrYNH!Y zj&($b)Jt_lw>eOvbJTB3C3L5Z{cHCdN?9d- z^!>>My(!4aOL8C~!B(ghrz+J|z*s0AQ9@hF(iN)DTDoPj$su|T9Pq9&wYh6f5b8H! zp)?p0yuXSrOf7kiYgyXIiDGiRZlU656UwWr+?D6rNh?{(b?tO}^6snXIv*KdKJdMi z!uo!nYqhE2jn9NFs8GEdLV63V$qNqh-z(7VRqm~lwAc({S-TPk)>CgKvc7-fpA#BJ zKqQWx_*I9Gq*y@Dmta<>jMM{m;hwJ?qO%2NZV~(G#1WejlCW7>)VxH&s1rc z?-7n$-2VX3h37@{i%Aarq-DH8A_SfZRce# z>B;3$iv#K}1a1In|n z^tV-D84jmX2GAqTkYtRJ1!#DGObm~UB+ol@C#(n)pFp#gDyu?6 z9$PcU4tvHy^k1=jb>Q(*o8WJwUXz;cjV*ANlj2AwvBh@Z~vk3vYv9S6Goo#2fed^)uY zWv!<6ksaD%eWq85@E?F#X-18`Fg&0F`13u{1;z(G0quqBKN);uOGnaN#}oeMx&Hvw zNvF>FfE-6gw=N{~9aqA6zn6cL{Eu1p?3}$GIh^wREk@{nytt{7emzKzAU(umh~gm1 z`n?-~_O-#&F}Qc{5g9!vh4Eb_jt<;gxViF7{%1JydxE~F;r&63-V0_=leXy3(=fi% zo_4!wzW-FwHk4_ zwZWc(1BU7Ew2_YGd5h~3!^tEAhW0#Q^^U7(%GM42xM_*Z4cWmxz51%Alby@}IQHnb zuWYBxdWa+U_gK!%WD)7iahSrkcD1aGG|_q7$7i4Fk0~9X{eEcebQc}X*!{qHbF>lA z=aJJKDAIJ&;sBCC$o~N2+sE?cJz7%^)oc4ZT zPGHAiJwzE0zJZ~5YT2!0-!SHaWU#@^?Tn26iweHJA0fMe1b|Kqx04>KgY^P2++=~* z-20sRsndF0X5?-noECsH>C?9gwZ5tcmn8Q*nOGLO*x8@WGY6Gs-s5nd@s6OZdYT_V z(ym6>SDMU);qku%U%& zmCkK za=iTwUw2ha`k#m2Y_OA_s0D$#0A ziS=E<1fr~~8j0$w_ZwWA3P351E9Tmo3LsL^G^wLTh!h)?sHaloGPsl}Bw(gAq=dkl zp`fWHEEH0Mi3r+(sjLVGQ3}8bG=i|FK@|e0Ra~m7Rtlh1dQnVzSu02q)cP(}+EZz{ zDjHPYqN9>&JsaGS>ZNpq`o&f#8n;F1<;tBhpD9x=tI`Qfs1lM&T2~bT5h>t9N;f6S zBtQogriUDBcUx` zgd8lbQk;dfV_zcH=<>64`$<1F>UH}pl}|{t&&_I=v+#DBBrkmXSPReiTHXLY%hc3* znsJF<-6%C_RS6GbONvFwHx)EnN_TF2yv$Fqj2xYBcgey`uSZ7t_%U+*mK%&sSQ|BtbFd=PSDU`PoOz7)XC)* zt8~yyOR^>-CIRGumE$jKzv4Ed%beyC=8`xLIrcpxo)*0E{!i8Qn{8#mh4{>ed5_9} z!tP9kt|g1o(@ON)n8aNI-8m@ot!kk?`a z&mnBk@WV&`%b5;o*xFe0akbLdktF1e#Cxv4*FGDZ#@JQt2td)(ZRxK|LK3wAhNA~tB3j1EGRLff9$OM8S4ti(gvCY+2cQJx}x_x`9 z4@pZ|bus`kA20?ZBux7HD>ptXbE9#X<_{zLFE3$m<00Rhm_4|R^`41grh5{9pCn*= zT6&=^2WWO@Zv^p(#~m`O(W2sAyk~b4EoeOf=k7{fg#am%9g+@bsOCSy)YBeIhyrIa zA`B0)3RTT)=(;f=d1bO(!973{XCwpM^+B)dFww9zu5jaPUJP;^2#FowEecnk47bVz zwmI_xBO$m3O!VvXRBi|b?{iO;<7-Syn)%(9k^%JgLw}DoN|`R+SOgGoB7RfM{noep ze~RMmrySxzCo&HQ9hBU&0JV@yzbTSKLF3fIv!}eXb4&N+ksP;nV~7NC9*JuXk!4JW zHc4=P0Uz?*8UwmwdrS%Lw=8WX&!k|o2o8_y9-zz)7n!3~?X1Ak*)IeFNZ{@eBbN?) za7dhbeLq@jOSqEa@gJ7}?gYkXw2a19Jshol9h*+lW3=Ft+t8I`Q33EsoI^y*nqB=^ zjNs!us&Bt(aBGK^@b(_@!6s$Bpz^eA?wKXNR>_vn0p63`@VRVhD^tM#0Ep()w$kwK zw|ItBbdyB700)_-N#yWK^?ob-F1N2wH0jo+=`DL&)6b|mKQO*qt?2&%9G4Hw0o(w? z!$>hC;x^6)Ay&|QQ-5Gu+9!QC0$WYwxta7Z;0G(p{zvd_>-|p;UY&n`epbBFHNW(~ zOgd>-a{)MMU@_{7=%1ANMR6m~nzL)E>)+zvO>6kC*TJ$kWzW%zQcimn`X!>Xjc<##$sao`)o# zFKLDLZ3n^3rW(pL_K!yMJd%6=0D;j^AB~zdF($tA+K4YF(-;K*0P-MuuRp2(0IA^) zZk=ZOl?V0KhPAWC1|2;i+4Ni;{{Z5@lVt0E^~RD(`1>Wr#jc%6*H?8K#<8+V<-`dT z>9?0T-hqB(@vgN~S+4v0q3~G8ZM2~!-}?H!{ao@7cx({`dEIwaxxKjf+J$3QqYSo_ z4AG`tCIf#c+Z$vT9(YTyboV?pm|(~vc^tQH1G_|snO{l#FW__Gp4abJ{{TdF-n_=U zwvcfjl;ODJFeWo9G~1{xAk3I>Ji)~O01CU}Ta!a;L^xGzz9V9G_JIc`4ptQ>k&Y$1 zg!Z3!^2m1_tm< z!9Kaf0offU0?sFpWY0Z-$>W&9woEF8?gWQ62?uEgVEaKM*=k$Zu*2HcGF=X6mP1}zVwZZ^% zXCydtIP4dr@qJe^m~bXqHn_wzwjk~p5PPaW`QvWJRN6^`4KtEY4dOs)k=TyQ&G^g3 zUl@YYaKIeS8<^e5%ydZPWRtXyHtC6Q;21IvewZA`MBn_Imb`-d z>HvY2`Hw;IF=-iJNzi<3F(qNw4D5Zv-ry_Da{11k;^vsj^fsFKJ!N5dC#VWxWYX0E zR@rz8k5IGDpy_TC_n*7I|92dCS`s<~2rb zUq`*R5Wa2V+Q3TJpQn#Msp>;%Uoi0nS(Ur5YDXY`tH@u}BrdK^=I*&eN}{oKMOOH0 zeK^&#uC*CfRt33NsMb>2Emtaw+^q_UZl<8^e&7j>OGF&LZ(UkoD1l1_8x(3riKtNo zDa0X0P!&YvTax8YMB*rxlvNCoC=RA zZYbW8;;v9F$k^nK$eQIrcAZ3KqNvBFZbk=HdO;|v6q4j%S!30Pl}V0PnB^5w)dE2Y z?n*>W08=Z9iBu3=j5#UFLzQ7yJf#wiWD(CD7QFto=Du;PUOVDCqe(7^nexY^b@g3K#(-hqx0&kl3FdMjPhL=8>923a z00Z#z>Bnx%=XLc$9$w%>jE>R&086pHy){?1wQw38wxh#$WC4Q(-8lQg`X-&F)1)@i zjEOUsmp7=MC3r8xok%{X!XwL2?%w11O93ZuS$C;lQn#|E93EanS{z&&U_==vWFAKX zR#vd;uW6nN7d2~ccH+jh%zN54#0d>(#`c^Nz145SD=PHqime5~g{8m=Bylh}%Jbd@ zqFNbVVXkACTO@%F!RMX0D`QI6Npb2L;sNgxJrr$aNN3^YppX4*F@kt7J-Uz=k=MTt zXl{9JHnh3Y-JtCR;&zT>nBbM{wJZ1q+1n<4O7hipCzigZ`D+C8k_RK{_gYSa%WB_* zv|a|*7S$Qt$3&TudmYE8_E39LcHo!%nZcz zr?1r{7`GVS28 zuaM>)pq@6gU=f3f&$_)sP!5@BC9WWe6SR-b=>&Rb-C_rC1Ep3C#&Pc*=* zAh-d}Gw4KNret+7*=OnW{hp@ZRd?kQ2zKU?o$c#Q(qWF~OszwD*SPs(9Aj{A{{SD@ zVpoN<)f(U$T^o)_91tMSa~(u2XX?SFtq^8{+&tn+=1xm(~n@lvpllh~W$4rlrTDpC5 zLkWkpfWin69soO=!6Um*Uz*gf;m}(&&rotB{{XiD5k0yruSjCu>2c?1Xu-=z1au~5 zNLo5GTT^KSZUD&S^Nrrw`)3OMj*$&8Kp@X^lQ04A?6kfELwws>M^OXRNsgK0(ME{G z@jZdqA;a?-B4Rd@L`E|iJ(td?RSj{*4kPvGy)TQkjnDr8)?_vsPjKm<{{T-yyt8hJ zaXWAh+>gJ_Z_1@ys>md@!~vKC7!f$n%_im3w1^D@?=kmI6`|5Sq;f$SnMt^`X@Uul zmrpVm~3YPQyoCG#@ujyQxfBOmFH>T9*fgxhb!mw z?|^~W@V&o>?!kr4c#yy`4|hts@x zF`v5Mwegrg)W0>`Yt9{3oevce)n#~2KT1&XOHWmPmcG-~er&h#u^m>$pN|iJ=hbI? zMUT*w^+0;33(&qRVdKwV=hbi6_|P7zKhv;2oBru{`_EP5Exbw(Rc5BRBa}`SJRwxVcypeiN`%30U$uu%kt6xOeob{Y}1plTqPF-RyB zf~jI92`h_`5~(#LsFWnA1v4?OPH9zwa~5kor8$mO+Kf3#EwSm%dZgEakI1JvN(_ z2Gmw5)Kg7;j#jC;P^9&4o0e2+&g2BBE<-Cc)!RC2*l7SSDP+~@^tF7j>FX`(fC8(j z--v}$rQ8LFsA?SLbjLMP)-TtL)o$mi*wn72d3*Y+Xqv^px>%L2Pj!D#a>1)pE2EGL zokkW#$B6dzR_`guUSCzy-OwV#dp#S+WOZJzPw}+%Ul_5me69OBPX#Z zl#?qvQL){Col@X~%56)48|t;42g-6rWW*pyD^M4a~K3p6`m@r75S5G~zSLe?T)^$4UB%Q4eEdp^FCmiBO{{WKx6`@sO z5Yk;NB+E`*;W3}>h2dZLbm9L15OP?0v=ipQ=L6=wKZ7hw3=_QdFmv4Jf#{#=Yu0Gj zZfzQSj?h6c1dcl3N3a7bjp<4~)aWZEE4wD3o#H+fFnenM^JDXUu;nZkojqN96 zfjHVYktRAXFK1ZOr?~!X8fCl(wq!Ze0Dfr)?Fxf-wvt&*``k`Mc}JAbNRnrQ7B$s> zhFjAB2AC2(^Xr_gTYnV?h^Tf?T;1rp8dyg5@bw(V~8iN4mp|bj1BLK=hG|${{U-P zUeI`ec?LiEWM`toxT(Hmo$QY&1d-{`?d!osO0$ED+acUbN&O6g$D+4;bSp8n2y-qN z?XDsk9L@uqwE2gA-IS^h)HTv~ZFC7UB#tqdf)-w*ba#P}8e(J+;mCA!Ax#T|P4Zy( zFC;EF7NK{oSfFzO#k_2GLImf!NE{kb6NL zeFCFpP&uWt332LU&C*HWdcwa();f>MIs)Cm!SmqA<~pT^S`>AOq#E#dHNnIBNZt94 z=I0|Bh?ChR*R5-u-#KV@3HBTedL+?q*(IgJAefM6tjx)Xgt~U+#ta$E@zbxgbJYuK zP}VR*L5#rX)X#5{yQSO{CEu6{0LLd7lN=MzryQy_R$w%ecz`1tyPN_J;q0z|<9hIV zb;KDQfgm2emUT?cR@-PKL>L4|-a(I--CY3d#_<|!W}I> zU8G0LJ>_J0e#RI&?E{RH7~o(wdXtrX*8!!je4NMwnCc_9s^_!nX|}q4&|XXtmbV*E zzXUHm<8KjDbg(t9Yk}$k21Yms?z43-7neD}U;^MW2bZM(0A=NF>ThY0Bu3W*>PhnQ zU_hR~C3BR@rEqq*$&NA5{N@Z4%{{xb(syH+9S%^}xcGx_Yy^0mh&E-sW5gI4Ck2` zKHXIfTr>k^-3J}jYMPsb9zsKJi@dMnsaCCRgUo+Qs8)iNz$e{$jRw3Byls0oG2LUQ zvh-Rl$->9U6(3g9E~Eu@)fbu3FR-SU1#HqPyW^U90h}8#IH>2G`CqQ_D`$J)U_(TR*=0#TP2fyXoh!|6Yfu{Wj#QSsOwuK z3w5F~r*Ey1)oa>#n2x`7<&6|DrozY5EIeFCU%J$Pj7)OAPe$;CYySWuQuIZ7%}ZS` zJgi#IpQ_ELcO_nBNeSV%^lEtv*ibUn<8-Tth3s^a93#3^F*Uk4UK;d4Us2Zd!?k?p zTeKoli6{#r0QBz{DDWZq&CY08y;HEUMmUVs}3O1CWQM9JGWUd7Y z;8hsV5~a!tWkBMgrAa}#Ju?Dx3a-+dOsK6Q%U2SF6irew!O6^WOe1MbjwM#CQ;AjT zrwLY}NlkG{B{ZcNDO-_lPXX*I!xcJiR_T>N4^?WbPgSa?ppdOna;ge-C#a!yr7h)4 zT!N`n{es+5oaN4PSyci{l3wJ*r-g79Y9Mo$6$;{LOVXa?!V;bn(|`|FsXbHyIi+V! zp-Jl9CoJkuS17q#c8zB33p-Jw1Est>C;Y7?3^!T=8e&`tj=?KWcFL{?XfYW70Eyyz6?{=3 ziNFaL_M%+iCEIZv@!zkq*P0gDKvvz;Yls~`lDrR!^xuH@J3e4oOGLmRx=so5$3DKH zdfy0N7BGBC-e-4GB+txr=$WqR;04 z{{S$bvrJ{t{6LzN>TV4*%Ue;T344Ye)+f0gy;hE{=H1e&$}k<5{4s$K1fGK@E+QgV zn%6u%y`kWiy{w2Pc=Yt+)8@SAhde;~Rmo`}mhE#tq@U?={{ZEKkhGIZl|r3Hv5M@)n?JWW=SbDD7ABs+oxfIT3uReA+$cRj5;*(CXZ!7yVUY~~k`p=8&zwdcs- zdP!@C1;71xf+1-l9?WXA?r7!Bq*&RK-dy+)(|~3&4;Wrs#acUB(&;~z2##GHf3nW- z{n@7f0EJPldr2k;{M&NU+3P$HRqnLiLA6OAls&L#p@SyVJ*HGVe>SZ5bmNd(9lH5$TRiov;}`GHKGQ2i2i!z zbt*y8j6rabGoB}z$;zK&dFs}?Bt(wFcI`ZlpE1`7RqZpmt%i;dB2P)}>b*sK7S*OU zh=+3@KtRCH-BM+=fWl#o6XqD?;znRZnZ!a~{{Ycr6LBt>+5jEmXD8F3kM6ZBTR0^7 zq`*G8kWPMOT(r`JkQmYc5bfAK=c&hY3eB`M1Cr*K5H^7WyqP#1ebnBD7HJsT42Y5Q zR>Uw?<6&3sT=qbDBuq&S2*lk@}Q-8Oo=XnB8^aWFA53`YRS0!bLeB-XyB z3$}TDtlS!ZGpC+;`9i22rrTww;f@3uF%SU&aX;m1RkSWLZ~%xL3C`m_(T<^ETX?|v zp}#T&W21PFV1mB9_sKHDAD09XCOY89bnsWIW&3DSA-Q=W!0SLm>ad!5&H}Zyn4l;S`*LGD~n)@2ovSG24(mH#k>Q(+Arr>4lE)HaJ*9O6!<7tm| zbCOuP3@jNS1LoV0GmitjbyX_bM0vM$oafNWHdPyU2AC#0hWZ)n)>A5&nd72#2FdI#hbQ3X4U{jEjI)NLBIo~r_na!&QlV&krOSvN~!uL~;iiYLV|??UsJ&C2w*omZW{ zUEVsH$a_+@r&LHTUEHG+v3J2jDkchw!nMUUjd@9I-PBn%oV4YgWK^_J+ZC}++Eb01 zq~p&%$yBRt3({4#S(i+N(_<2&AtRtCM6p^&}jhHj*V z^2#+}uV>+{MhIBgA78lA!`VKI=3Xh#$eedyR`AWpa{{a4eG70f7CIlCFYI8d%xd>O zBGBNRFDF{w3f52tH9eszsi3OXlD}*2Oly^JXC3T-lynM|Z>O(~5jEGey17Lru7p&@WgsfEcEN-|PvIaErmLY28T zs;?@wG)iRzq6vd36>^zW*sW4PHOjS6tRz+lJXIwfHzhq4Hz~A5%5G6r$QV~tDotFu zcH}N7L018QsCYsgjFnndSGQ+l;c z>M5_W%bw(_PDJ-9!l7+wT6TJh#i&qHxPq!PvFe5DO;e6EgM{YG``d0u+? ztJPMaD;oCAZ5UUWt4%(~PLsmWZH$$@rRjVpq%9Xp;|teX+Q3V&vW0c#0yGg>QK;ab zb5Ug6T%h8fs=*5mh5pAY`i0&XkJT@rl<{w;X*#apw|*uU#x#Ev?Q}}|j*Y1Yv?|7F zxpK?AY=yINO=RATEcy>UR*q0qxALY|D678;;9*_UBLJ-yRF=dHD)s1t27S|Q=^l#U zX6jb1B4^~O+EaU~OQISwIG;u8E?&_9j*C9-fPzQSSY_0r*1R`@{DJ!Xlb=!~W3C4y zpSk5Btjv;JK!CgbuHffRXXPLPf?&t_T8N`Y!W=sK_2x|bdMLTlnhin6lo8C5c^L20 zpjN3-Bd3^r$J?T<1@#F30OOpDcTlLveI~<((C?;WCNrLM?7TOKd=VR}Fm4=}FhDck zm?8l&7+%`qk!#vq0fONp@_=~9QxH>Z=!iRp9W%J{IuH-)F~aENt$gc7&~6yloP07G z)`INh;v3wKdPk~@PX|;xr#no6*Ud6dp^kpb-`v_e;rfHYAV%DWeBgSjw>PgX6$Lnh z6*G;q1jzdR7LcAO_&v^H1P0V@X}gdo1*8n;kma+bcvs<(5=nH)CnR&y03EuoNa9)= z=9apf*)7K{0ls46{dwuaqkE{iu4^{5%R~l}OuMJJ9l24}4GVilS8Isg*R`%>k>z{1 zCzv_u+%G+I;ac=amhEV1bDm!<-GCzb81x6eWcw&-^Ad7ca9RoGI*y*{m-gnQx$WFq3xNQ6 zUAkWCH}`5P3L)Pf05xmFrww_il#nnBLDymuLl@gL9U3o?ye&)hnb+b-fmrIsx0v6T`S89S1o+imMwf4LSXP%IYr-Fi+6;#(GLsTb74; zeSTiZ3ry^15eL~^u^>$6A`Gf_hI7gFM9Z+*X$P4fx|Q<1dk+9KU?fth)3-%xgRvtD z&Ao_mn95BeZDjB;tX8TBgxc`dz~y8$#1%9(w7Y!adddL6p3BQ=HFCX6-Q^3HxN@Ck zQ!CS1oCV^oEBTkMv8#oJjiXdm!mII+i-l3umKT*asJcSWzG`)iWEaJA*r%Mn>acIZ z-@WB|`}eM|6cvqGQmaxC-Q7o3i*=}auTO}|++2Oy1E~6}D%a|*OZBERy*BQ3G>TU; zuqs}aV$SV6XS()Q4V88D7Dk(K!rJ(lQl?$th3B;@oUNTszbnjL){?BcQF4~jR%u&G zy2~#`dc~QsLyEmx-W3|58lp?q#*uvlEHYDQSAvX7?p_bp_!7RIN-8maZ}9H9w1xJM z2<>Ukx-^oDGn)UBA`)CO+uoYVP%00Lb;_4LY@V8pxnBn(o56A(}R(3NNbUAN|)*! zlH`}UP$}*}9EPKi2O(>0asHTe2q~vdUrpl;l+$bYz zy;P}DDy_<=R^d1rlrJG_+FeTWAMTaw8}+PV)O#k02^Th!66`LdEd~i%%I4}aE$s5W z2Ayh>%UrEnHmYQ_01B;Yi0f5Z*HzU5?<=oAeR!>E7fZ_OSKO+Q;xF%)mDOv^t2dXc z4)*P9BSv*glG44;g8X7|312$AstT`ZseCsKtMwTDKW%@#va4Q@JK1)A%B3rgiu0Qz zx9+fSuFGWh{$XnZ)9yAL;U`Y6V3Uo+$F$G1pWS&Y-F!QAmlD{J0=aE?Q_k4jTqn#U0yyV5k&yyDK8iyw zm6zrweF-!CAqD*?_-?^;5t9%xpG?8yqS3fyM8-)WxjdQ7_0By4t9M6sL4phu0O8z^ zy1sq}Mb*RH(jX1(cmy5C%gHerAaJPZtZP9eyYj)3Na7+7)kQl;vY-TRYhZwVPn+tr zHG5cyXe5&pfFuJL1mN+7dKNrAaY^j>6^Qt5J83wKHTf9q)4>N27AB)a(ynQd4`ZSu zkU+~x{)5sF=&RATbx96x*0LNS@;403?QSGa0Q)arr&OnW&w}C`drNl0@gEhR{{WAC zo_S-A0l^Sdb@Zdp-FSd9rq_aKJ--djk+w<0f#f^qlM2=4u&20Xta04RfX?c0AP%9! zf;;=HyW0wlbDNfJYk@9kE)#!E2fXbp~fW+Gb~-Rw!X>8w3Ztb78K` zNCa&>jAV8`%hlAnH5kCa7j!1ShAmRy(j$vc?mz24r zB2L}lKmbHHpa=4fUFuQV8kCD&$RWl#2i89S07QD0jZv=~n*fkZ2pf4b&(tmznpzqq zjV{~CIVJ#@o_!01F6(2j=aw0)#^-I?@=^@m~b6iFsVnLkxLaSM&uPw~C zkT~rl*VE_KC&U+IZ4DSM;zA$^k&)ZZU-U8*=Yn0t`ksUN)eG&& zJ3yG9Pc8CDGErLc5wn3Ks!a-h@0`|bkI0KG4VGXTg z`AIATkTb#jvCd=etgwb{E#$;|&+Xb0Z`uR5^d@36CoYpbNj(z*xVPF|;vjMaeEwhM zMccQu7|VHZ>OEG5&Eybd5PwhAQl|E`#2yLr4`c&s09#GMTP7VG6%$DhXPs~*Q!+F&5MR7AjVdWdxp~NYw46^h+c*6@~mABvq)NX-mvK9SEl~}GW2#=nE5X<@d=jK(S?>b zdY0ZHeSEA+cbQflaH7MHLt}8PUOjos8`Y;)=L?glsLj8qyr!*l%G%U!7mn7hxm}(f zRaknB`oyhvRNq`>P&F5!Bb%e0Q7z?ga)-HTBMVASpsVgor%^i+^qO_g3tRo}7nZZQ zg=(eh&c#YSM)79T5>o5elCNp>W)d~)D@Astz7?B$cnLQzLB>_n7Dd9;x~j7)1yTy2 z;Dot3?MZlAGN;*H!5Lpo@MgL}3*_zPdY=tmkV4PCekJ-_Nz_Bxm5btSFcE;Lct=r@ z3)bCQ?rPx7ruas`ra?GfRqTcJ{{Rx`{I8vA8fgyUbn{wA>jH_0N+z$Gk4p|}a{^Nn zny8Fixj-rCF{KzwYG_8OC<#PL2PR-86AD=<*n^8ym6nBGinPF>z~HM?R~!{ep#X;z zr#TafQ;G_q#VC|ca#1K|buzBeR4J8qi<8i@8i+MR3Nlhsy;W7^S*%rBiNH-lp@j>I z=B*$*ate=K2x>K48mm?5JCol@0HTBhIWeU`q>Zdu)k564G0jVGNKm=S6&{MCm1n(J z3!I`-+~ozy)tVlh%8HicVxp3(-yJ5kbzId|t}7)WI=#}Y>xELiL;|9$RxS#t=+_}t zVMJW2CdaJOZ`Z1@sW858r&nIxzpa z`l7V4bxVcgHA~)Cq1G#MygsX2m9Hv_H&?47?&zbrs%gHG`t_JcBEesif-9gHuecqdxG1om0=%3oEZsgr_;Rv95@*;fTy z6tJFAY58uDpIT*(j3j?i?GFfjH}xLsGaKOoB&P{ZPLD01+@d ztg8BlXGr2zK+mA|`KgS$WSHaA-EY!x0k|MWdYpDywt;{-<|K)btI)j3$s_8tgC36D zG=~$65(X#B$=l5OF1V|Pgq%$E(4&5+$00<&ONY-@}ILVp- z+S3G>I3uSgq-WpknvS7rO+PelA}6e*8YSBS0JI#;^c^B|J=TqdP~Zec;{Xx=02BKA zCD*%ac`crRjGly#x+1lOt59r2b&>(b&<-O9m_Nd)Xtobyg+_+%-?;J)&_DSfFfkA~ zPS>4Icb;SrdWjG~69z+8u8&lFF!AamsS(f5vMO5_md(AU`qaS{nA5$n`Pw>x{{Y9Y zaJ(LwZ!K>3kVteEwBWVG3E+swOs!2n#dRpW)M1B*4b3C~SuxieqaZIysai6#f85Xj z7dQU^Z7#jdMuEmZGkD;sD)V>r2@L~jagE1`4H4)kgFS-t^~{n1&hIwZ%y0z2&vLYD z>Qe76U=cmK#QK59_EoP7OE))Zdx##r$;YCx54fof-P{2fll07!>6K>A;jbQPFKECJ z9TUX+&V3ecyMEvOZE2F=XVN$m)=x!3&WSD}dK^bF6Z68##mM!|*I8F}8j-hY1mqTo zC(LI#9FDND^)CfInWXt^#E#-|9LbFKSX9~#S8jBI127LABzFGF?F~irU$T?n1Nof= zqZuSSw{GiFdAgQWH*SIq!3R0xxaph@3ahT#yauv7&2V#|j7Y)B27LsRJTIVHc%_#O zcf@YWjr^}51~`B5BaYxKs`^z;#mo(RPU9Y;GdYskksTA#d22FW(I<2cpyCb$d!WC! zcbf&nVH>0Y+o=Z~qx4$3)#GV-jWW}X&`1yME@*%O>D6Xe)>`08ph(MH3_%#cJ>%;LdU+WES)H;Z(K1c0*bO_Ji~WW8Net zd=r94yz$%*wEL0WSOw)vXFakU0c>r90~0%=%x9zmud>PI&Tw-@BN7_mOppdg<^%r# zvv9LM8%dw|i1$Cvh;?om%(%${T5-UX1&gg2?Sr(rrQSoCn2o%2$@K+LyP)PcNQmfu z{@n7nE_FwSLtH@I*F&M>pyl5&jBtYYSKM~Kn*$w(I5*87B4T5K!UB~i%Y2|1B>jbZ3DA*9fCY9pHscGy_ z3cE^k3JRK_71D(V3t8ft5gcjM3;or zs#>|NO@wsVo}?{eGfg?HO$=2iP;~?!1!+2xS)z+Vfue_Ey7nsXS=yy{H6o~1UR7$P zEedr?sZq+!a;ZG4lmNMLC?#|R7`oTVcf43suk?@R`R@trB9WwHBshn)^%xH7gW}D!xv{Yq-NA|t6sJhtAMjB zEd^xVj#bSYP;*Gi3bd3{WG7-@V(@mb9RQW?Dh2WX00Z3lhF8_?Dq}sDCt;teIw18y z@#Vax>NcdAS+@__fU|{>UZoKdaxC#Srv5$Zh&XGD&#f$o8ERExXAVQ=&M;& zam$RsmXd!j{{SP{q(4!U4j_z9(FsQ54l#ox-=OwdMs(*ex#FPAgCOrDm*S7soR zNy|y%V~&#@hh(jC;O-9HwV(`tP;TG0_=OjUc(B@Ad!n>H6 zF%s861DKJFXO!E@eet#wB`^5ho+OF-sMGuXn*(!5^!4<&LgVS`1EjB4Q_z_FCHW13(iFAT~}!oM*qf&(W!n=T(_;&PGX`|~&($(|s`mDj%suq?HPTHW=QvJd;y9L>nDkWjKN__E0Q*#$!rrcj9C~m)d0uAb z*anAUcnujR9FfEx6*k*$0msV{!aa$T>nEx1gT}t4aZ$wD z@e1y@Z~p+UXQFsD;V$kZoS~z7;ni2TeU5~^ z!(Fv$s3<12s6$ifwOpl3El;A=8xyH9RiZTPszSg1@ng2EAa&BisI6$%xm2F?v0hQO zlFZ;#IHnp&FKTjxZc++Tf>wz*lyuyy2O^c74O=UyE86&bT7ojZY$~liKU0D-m4W&b zMb$wI(%ZZd%J{y6;wT)iZ(-t*wQ%`3xA8BjlB5)^%0ritk5y%*KAV+BIX#6<3m~Z6 zfECh`p@60|qym`Ij5uj199JPFO;8+Eu>*=GD6}onD(y0;Qdek|Hl8d1kyIzODxgji zI;d6Nt<`F(^;()tCb6hMPo~wRq!CRzog{5yYeGL#0M#U@eLxi(tK{$?91D-Pc2YEZ1CFSMq#s$!~RYNJBYa$B61Y9Vvb15~PY9<05qD=Rms7m)pDg!t2GL#P^vQJaVQIrIqHL)^gGgv*KSV>OfN~SB}1Qtt*EtyRv~8T8mee)Tu9Be7x4A74o?9myB5#PldgB79H~!Un^u>x>YAq zS1Syv)oMc8BGo#rRqCUuRSRCUrLDgTToCZS#iw6_(bo&&HWzzJ`ZtF!qy^37pw z`G1vE=ZHW)}EGD*x#^vvc@ zC_;4Vu;s25l|`k+?^^ayaLz)Y2XUcSl{I z5_s>P-Huds7aoS=NZ!!;FkAqTd5``+r?*w(?kSdU69vvP2O!R5bQps<$D-1!t-72M zfZhoX$(hV6Ok-~-?vqZmkVL?A&(iSn;vS~%r_f@iHPh0KVq)EyFCIAOAILZB%r4?(^_+_VdTaCo<2X_6=I;3h= z?IYq~$=pcbh=ZOadZc)U`Xm!1gE*2-Cv*tNf$~=BTY*82Eg55hZg!TJ48-w-09uhP zJT=&iZXKkIWla`}rlTIx3wz1?iSnM|4XuHPKo~r61Lkr4)?Hi3s0eWcHz4F-k_UP2 zQ)!H=yJ)T*1A9-FI0LBc4my?Vd_`qWqh$3BjGQ<@#{k3}_gDi_6<$s^4bF7-fuENP zTw52?jv&a0#|P*@}`gR%HRq09Y#W7r0Z6SK#Y*l<}ogw{Q>)|S6j&@Nth&jm#ERHw`2Wy+R|Ng?<+>~-Or>CCBM`JePL5CY@USY92n(3-r%qh2m!(+0|>Ob zF$eP;W9Y56iD@z;3YMNrbJQMIja!m4*SDeww$#(fl^VQN;UsMVy9v3pO|A#YIe91cqHWzeJJm0q&5vHOKcLJFB*I`mFreKlF7 zSYcSzo(h6g0-%(SMADcFKq-uJYBdQfr2%rzsmfST7a?oZ1?p~BD7j|RdbdiVSbETF zki4ZbqLTEEJ};NiEN^9c zD@xd2CrEb-*IK^|gSqv#H5*Yek6FU1eJYDFjR5r|qz9r8NiL{WD#cl-U8!?cnHRyDzYt-2{h3B-kuSG%FLzB9_y+L}cYN!A; z7SR=fS*BI1N@^V0D(x1+(JGfF3iVzT)M6KozIwT#-)&K1<$bqH)UXGlwebsyh2!)+ zN@046H(i%Ea}0Ip05i%(dO!^4uuiH8U2#hb9%*aHYF0uC7*%wtIF1kMw6$h9%p_5y zL_|z3pJZufw#R3VzUr;*Vn*O4!1+kyJddK%EsPKe%*v$gjh5%qdHZ2M)hfQj&nCfLRU@my3pMKOp!T&fJ06VQ*-*Z$Sn z6C>9>XV5JAmz!n7&SE+G;Z%nr#hYc$88BozM$jWO>_>k@jY8$18eqwEIF9j={W4ET zoT`-X3t9`L7ZU(re8;M7g_(U#&>%ON$o~Ke^96~ttLB0U?ADA)9QThzo7=Y#DYef7 zgCVCxZj8qN8nS(dHzQC(2AjcZnJ2sz}AnIlBYHzorf| zB4zGIRF;SgFJ=f?=<4a5dFoo6w3+t zZf~L5eBC1-bi12}09*+tBPXfg4n{q}_ga1x@dnefu`UkcK#xH=I5Xxjd#yBKI-RiE zBsyXs#^^tmU=9F)?qU{QrPJTGi6pg>=79jTH@u1Du&DQd z(9k_WK5W4tPB_nGCGKOT^6kVmtp}0U5hV7G%UP6!?f^DgL`0uLOkvQ4^IlekuFB!E zI3`38LFN~$)9bm;4Gqpji4y>s?9mV)?gYZf)v4@e_Mb2$7$4Erdx_{X_Ez+o&T(yF zxH=@XVWbEiUBq%adL*uvZ?xj_SU@Ck8Ijs>K0$d3nm%3ucyIDE1m%@eF*^0ySf^)=)X7&2mGt{irQ>N*8( zy%Op{;Bmy3ka0L@$&Te))wJ>&TIhn;0U`n1BybK!LG6y~Ho`+gDrB?{`5b)yOKmu= z+tScu5(Z{|(S>HMrdaK6myF*SKBmp=*q;n`I=8)O;B zZmT|n+$F9Y94(*&AQ;-|kvX5(Dm7XOhVe2pGwJM}B&%wf1J|mxc4vSvsmTt=j_S)b z3TMdao{=z&0&9CAxM=9D)wbNseqqFQSynZObRTS^4@0!bg%?z^t=!vfaBw*LF0WC9 z;WABwitTc-fha95060~3=N-JDJpDnEgf&*)n%Ad*+Kx~jmggXPas`1=F|}0|RZS07 zfo#@HrsT??zK zo794|^)t7k-jE659%Fe)T5S&*snqg|iq)@D>RVzlT6=zXRb(vF?g0I)0sk)limR3J-g18j0RLc2% zcOJr@Osb7?dmOW?i%oLkQrhJ^lxgC3B5RVjDcr0>_n>o-Z$js(v2iYXfb_EDJJg!( zH>))2EY?(3Db!B`NtF?rik&y6?@Ge1s^wClPkWVG&Qpn{KB}j2e+gIDP`uu!smE2n zkBwt$?xCx%GpXxdt1DF2y;qae^|k5vyli^ue^%GMSCzfiB~ZT9$yAu~S9In^a<}yR zmFx6ZFCnJU;d^}+-E;XYb#WfkM(Djw2d_J&(uiAu>&@-5*s82isIxvQeHzOO8x4A3 za;HwJdmg0}Pb!^Ktv$-6Ql^@%LaS6M^;JraNpQEhR;W{+dhvPt;I!pZyw0H6 zSa%dxqP}9py9=Y5(lM?b3o_=UtM{d6RBGsg#dbF;=x!Bo5k9sStgAlsa;aNaf~{UZ z3n`8}lCVnpKZh?O4@KKmdX)D%RcSEYB$)M8olLaPBylU!Rkqp;0m8z( zr zZ)xRTt-%h!nfd|@BP(V zmpDCy2!XUWne{%UN?T2$I6ViLv_pQro{GK81veNt#BxBN?IZ4~Txt&m+>FT_fOzBk zBDir5-7fP1j1Mev^~!QCDBU=hwY#Cavoi$#!D;^hwU-=#dJKI8b3eMNZ*s>!X^;fT z<2|v*zq(~cHLh#{1;Nk+PDdx4_f?6tv7_ESo<{kO;(L+~OL#IlSDB_$uIE&u0KjQr zjm5z50fOGX>jI@h`lZm&DW4z`OhM~7DDA6!H<*^Z88BdwM9J<5@7SeToqcL&s4OO2 z2$r1p;E!)*VV1)H88IhuKkzUpLtcyT6U6VfB6 zIarh}J{?ML4)VC1Vj6fIF((OXwd(I0)`CMxbW1}({Kui}R!*1XFAu|r+}uc${WHn$ z^IERCif3uuMhwI^r!krNtX)c@-R1@dQUJyWUOM9nQ)8%VJD;?W2S9QrdrAwfIv#T+ z&2Rz-Uc3$!N79!y{{WMDk&)k%$&&+>dtPhX@XYyQ37_gdoXHDWQp|L;2|0t0-7p+W zn-Bp8GD>}GNNnvABM$57DHoJn;0s#>dzkJcvbYqFoRT?c>Gk=bqyZ8)uhG>%)haSa5Iv9Les5?gXzi-hSx^#%p^}j3IfKRb-lfd zQYtm2+2vtT zKwa^nzN;4gkwy6u3D#YuF zQrD<)LIRGIvdW6p3&N-eB5Rg*7QHo)%jj#_faVq*YdKe zS6;6ii+00wE zr2r;AqL&y7txAiM-Dq#dPor69Zcd{0C0n#=tF+3=wy3nIxg;LtTB3WEdahGpsn#l` zLabIQomV3jDK#9cxTZbHE-Ay(o>gkDPN-E{j$23zs8Tm3RC224EnzIN$Mx{i9Q3L8K@2H+R zYTIh22Q2o~R%tyLms~bhHRZbAdscnZ5UBE3)EAw0vo)MDPc zptGu5E%~cw8Y+d%t+LozccE>pt10O%V3lU5RoKZYk&W#*0SjVq&d0_JAT~OQ{uPvMVo1r8 zll;Qpt3U|rJ=D;#5MT&bD0!FDkPOUD2ia4pMaOB0E-@3==(lUbU55ZYu|1QGFFRaD zBd2w|ITek*){_wsIp^6?t#K#Uvbm~PY1{$z1G!mW?W6){CMWx;M@Cy#hi=5Uk@V@0 zZdH4WhZjf(-Mo)!K+;387?9sy$jeB+qP)2{GH$shpSVh^Mqedp}F{nJe^ z%1j(jUz)Y0UL2i!Ad~<9{+(kYr%^}<*@h&9Qp_RdwDXuzlwu<0P_4roS&2w&$SH@7 z?VdRgQwpUr=ffz6imV)>6Vr5HN|MKP9RKtx>6I?I0iTZ%= zg(bC|nfLc<7Fq_aFUfBEc5S))4d)-%Cl~i9JzYwfa9At-?@^X)=x5P!b#yKmQgm3? zC3&N0ugcLpT<7-Uv1`Vm;q(FMIel zZ!~yYtw$(-H2Rue`uWr&*>7EKy!3n(_f&PAcxv*{iRBn4-7sTl@ZrNCm&nppRWZIY zN>p6`o97s6^FCE>yXNCjw@dlEPgDO)4gHd4NjVVP|C5B|KHZ8p zVt$x8OlbiwCJk98Cl4CDE*DmP@&C$wv@^=FXB)@ptnOF)ywm^Q*1R=xK4Q7P_2Sq3 zC#R1$tSCc&c%=%`KkRAmkJ{CAk18#pKmTU40yS;)O7H*t(^>U!Y~H^n{J_0!_al=3 zC*>M>{;BHy{kykIBF?U5m~TCat)E?P{puNMPRMYMJ0KA>qqMOzp*uf#9$SMU+DfGj zd)_&RZPT(NQ?|w8aq9atbgCjs+b+rG|F(c7|0}qY*c#rKuXx|4e{%KTf(eCJcZJWp z&XsG7rDJ*GK+%1eKlcyQf=Y{es@3kOiSUNHh8VDW_$!$$2tj1OM`mbqTeqo-=-hMn zq>YmO>Md!<8hIx*sa2SrP>vO!|5H(J$dv8_mbZu+rUC>|ShkdMz!EFqt)#U?q zyhHjH!XaV%110}(#{0+USa*GfK8A6;Kqtyaz-I_h+>q2}VXl-{kFbMoR%P!AP@QSSX3P(SPgZ24E`OT63ctS?EFBc?`5IS$ceGgDlvBlQbLSli0e6Z4+<@3JEIl8XU;N&BbTRQRwom*L)J_a z;Y|!=HB(D_->e-vYEqi<_+-Db)9cL9cCHdu=IgsKBGF@b(Wd3Rm-#vJ`hwrS@y*MF z@X4fj<-QfCI{8Niq1J-mQCZ(BPO}rdUwAihw?z@S591ty!cJ*yG)8@(V~;`h<=i67 zBxI#ZlE9~vN>AE>FemS=ff~;Q0BwOpRq*~S8z~|MoOIapqwLgGOu6)_QyKUY7x!|+ zhgT`q0pFI|CodoQk5%j7#yqaX;0=#%bN-o&&we#8Uitltx;LU@R_=2ee`%wxO>yw- zr`4LprwWJ8Zv!548n5eL7wsd|TvN6m-XVL;H11$jpxx8sR(s3K2hO6~W_0yE<6Qd7 ze{M8=1ae(+Uj5Bqop;p<$`?=C5RIVoBPxc7NJYE~-K;;C<XYWyW?MTy@sGa$M5aj91+)MZNo*aWjeSJUOHP&)%kSDShe|PPKd10UKT9 zAFOb>{B@?^`4y|~1G~H@-pJ)CT>GDt#N1t+teh_CL#yTVS)%)^2Oa&JJN3Me6-#Mw zL+!11e1}-J-ZdA64GAoB$4`EBLZtnt3Qq7IlQx?l9iPmspFh!lo*l?&K*T&rhxcjGO)C_vbV;t_rnx>g7XHB$kew?abynxK z?+w6534*J{_x*$-9m8mJs-G#gV)N_fa5LXE?ct7$AmOjw-%jsWuOAI5*Bzasz{?;-RZ< zU;|{yudAlofQRe+2wpS}rZ#(O6idNDv&zK|G-@9P00S&6Aa>|zz~L!L1n4kTutVl6 zXNuB9qt3f!kl@(iPb%#d1yOqcQ<2^Br=^U6D0Pb4JPsH!VL5i`dG02J8AhR3t(04n0L4Tj21uke$e4(|GCzer9#J%y=h=r zG0Mhyx^rSfO8R2(w%*N2@>`3}D1)rO5AP{G%K`b9T`|^-1p<_1F<>Wi?%7F72l_TQ z5$5G>-?9;v_cADX>hn9t;KEklu(OiFHK^FHn&+;bQ>KlVuvnc=ZM6AVYbR}4EJQJJ z_2u4q7x7jcepSHke43_=M#HX*05^qd*)mImK=@CY9i5XEV_z4}Oimng9I2YZFfz$$ z8`4{@@Z8rfdrhj_Pw#n;UT$ow9`yap#oc^^NeCTN+nu@_ez8SG{*CIXyS+XyLtV=i zwna3#zWLSG8Ss6#^Z0n(tfj5?MzmXq#GZaxjGK&9={>#2gCFHv;H!4*UyAcz2JAPc zFm@Yzcfe0%ew3|4%)Z(;^JmC2Cwq48H2h|gjK6<{WdBs{;A)r||6|+k(j2*-??jjO zljGedx(^&2{Net)?AfKo!@Jg;rwPgL3sR1Ej7YlPdINh;W_P^P%wP4F2_ye{K4_Ra zI;_qk%UU)817cc`EQXdX92=R|DWpfOWU*V}lnMjQ_bu#!`P8&))a%i5A7rO1VlQ zzWus7HLkkx_tIvtMc0nEJ8%E4xMv61xVRgPXzo4kQS<%AQSaN#)#2P7a9XtEw1!MW zf~3YJ?6#sb@+w9DP+aL>zq)nT(W|0EczhBf&(~t$W_^9QH@i@=-8}eY0+wz9IS)}N zC`&abAI0e1fR^M+BP&%gAP+ky4Yl4pEt!-8+OWG!UY|<^N?x8lqaH>;7~X1S#aCf7 zb|Q%#{A6+5sBWivT1r*7v6|X#ur))jIy_BB&Ly6r>Bvle#(lEd!_I?BN1e_<4Z8B|`A-%1IC zXs7wZGil6eZOyjp)a{0Q!SnFBCdriSQ2z7!oXc0q&xsQ4 zDW@9tK3TT`*tDlsef#~zNwD%!B|-&gVy|lOY{X%g`qn5jz%(Ct*w@uN-P#d|raFN& zccacAI|A&cqQJyV7J{Tpy4Y*Sec+?#QSfN#!3=vdR(7ZER6toq+ zw*hw+2ejR_qcD<^8A&%0Ko`6@1RibQj3clx)WW((vE{HUG?eD3WV$-fItQ5c)9*7p zPKjPk5wcj9e*5sRg!ZzRHg<(@c_L~%`bKt=f3!i`&{}v_VM((fxPU$B-w%BZjs359`8_}=cz7NL*^HnbE=elEzt(Q%2K^)N7Q{H0zM}@; zSnzUL`Dn{&ZfkK4ui4HiiTkG!XuXub9+=5h^U=QjBDk(0MdyAc9z1(C4?e)2a!#VT zDwC&jjV@irNb#;({ZW>>Sr%6uT_xV5z}FRNHKPGu>==@H#!Uc>)vvmN!@x>5lGWn7@q6 z>aEysGD=_5MqQp8tl(f8$4<`@d`^CG{6TaXuX`!|v?u2{=0A<2<`-2D7-nqdI1BL6 z0#=TuvGw7wOY0hyC#63Ws$K2Wz_M2C_N4@OyiJ|DmNi1Quw;J>_k3MM`1J40F|&g| z#HdG=cdeujr(L`6?v??3KE7*_dX>uDW;bLUXCpm$S2CnY+g8g2HH^{b!a%R16VLz289K!~T)`t8HnwEtytk62g?QEeD ziWudK@#8f`c{*muT?Q+<>#w@8nSzTSfqE}6Bz4ux4HW50dC!^YNZ0bF8llYjJIUiH z62hL|f!3&bOomGuI$I!?diFx$WWjF_f4=-<|Ke))xX&x!JT<;U`eEE}?J6CaThgw~ zdh| zc+T953arGTpnWo#diYNSUHnx6frw8oSL&07>MzOnN8O=pbM#zNrJR*UGCQi-;*b$| zPIUfDv3CO=BJfL1F7t@G6EsMXbXvF$QySu4Db7iZ>;JMs&*S)vg)J_4b71z|ei(P< z>w||O@2skqbh`>A^`0o78$xEX-yFMb3uwKB>2RyxUn^Q^Q~9%fF3Dl5dFSSXupvy*2SVIK(mwvDW*F ze2sf;0J%kS{`rN{byb=EF0nD@(^cH{i`8T3hA9D-O9J?@45xO)U!sMm19u{h`)I*% zDnMqI3+0o|e*#_POs2D0m&biP&=jD)BV%>061-|2fT=L_#YV40o|k-v{l>oNoTMC4!fpcZe&H8wyj z9k;8;mRc6j4r6iVmUpm{t`x#QGcUYvbHD#FqcTIhi1%#<83 zsElvZWz+&~gnjXhbMx!J>df$le?*-hO)Q*leE)?TehV(<<>(ZRCMl|QS=PV@KwSIx zpwbUUu=IXhmrY3b9=WZT+pgC&nhU=tI@R>Tc8(9EDo`zTp=4aH41a z8!^GJI?25-UfO(C>g`z?nHJUaku&EYw3MIf`1V%PP(rMwzcBOEDV+Vl=p2|kUZwKk zezLAlfU|Zs|C_AmJBFCwUiMW<4DQ-+fiBqoflGYu&JkzkIvlf!?fAEi9TM2xYvzR5 z0DW}LTY4~gTxsE;?}ND?Qr4gsg07<70;0ig!0F^Y#zo!#NhzGsz8d3jSA2jGk&}3L z9Ch>LX8Pl!(l)XubG??E&vQ1Sk4MQ)jNuxv_Y6yuHtwE4cK7(Zcpzq#&MWUhUcg-l z&TD#m8%$nr_UXI}tw48}*6vd_d%uck zicfL~677I_gEYP|K>AGB6L>WGZd$8EivO+;h=ZCPiL(3myvO-4vL2y>{ag|ulFN@6 zo?O*3W(*@x`XIw4!zx;BN6q+i+@~G!l6S@t=BvZC9}AZ)S)GC?=3Z)K3A7D>m7`f;h>9W z%kQ3g673YKLlbR2BD_peHiUn5YRh}@Fx2DZ=U=q{7knh zDC2*9zxHe@@s~<{?P|jz^j4_uERwLYYQWvUIXhg=`Z3OZv>tB%Z~Ozy#b~GK68f>- z5p80u7d>Dl;^^~&k3+GMykH`Tdmq2dU_}L? zP8sdGV)1Iay6quh1DFAnj1Px<`&@dvoN0b?-_3Y$>fy%b=+R)xuDbBd zk9ZYRRq_M3g9|YG6^1T2W)&{>H2SGTmx)t~M5z$UPn%4VllD3wko`Z8MzC;2{@Ouq z7krdPvv)NTxGfzi50k3jHXJ{Ng^z6Sifv8jfj?)izpZLMfBJ(7KXd`tUTH z&Hr_E2y&Hlh@_OPI)|OMFSr&xKG&+<`|U!ns`j|T19P<(_d?-cpZrhi?5X+KS91=F z*ycgUSN;kLoa2$|c?wr?Wg4qe(cH`*NSja&V!rDXilR3hrJjLl2atkhTml@|>GCHZ zc-Jfo^UB9Wt@7r_`ZuwAhz5#&T^$FE%)zkj!n=XMx=C$Q=8}@wYVlodRS2Ryd>^Q+ z=N7?G7udOG5+eq>L~x-;F>LRiAVt)UP1?l%;l6Yk_Gl9d8Rj+&JOgObg?&1 z=0#Vl{5eOQ#09wqdY(UN`-o69nRwn~b9z>$d4FQltK^G+2J5cWeDlu90)6dn;E;74 zhIQ^u+LjYo@4iLDo^<1?;B{Lo4d;x)=7@~xkzoBF49fwQ&rAx~%kd6=S%eL&!$2*Z z$tVFKDx{7a5m>Xu$oziJe#NdGX35tKMxD(n~vJM-( z(QI+-*Q&w&LV>rH2IF&cJ&GJvRre%z&ZvU}8gP+Dc0u}?(xEu++0z!qNhf)h&f{>3 zUdRU!cNOsfSB~>%$OUSV2CE~!Pk=;cQglilbbK?Vg#y!qd=6S_|DnpcLCasCdM_fg zxNob1gVlm(|Zk^LL4Yg2#6=w7f^QgqVB0}XqHbAHh z1#l@Tc^Tx_DV85X=M3KvGq<&%dPg4dOkiM+0t5cmJJ_XjIz~e?X0;qGt8^aJr)pCr zlD=K&4JqVzD>YQfdWT-XJ?_E$!ZFuA2jy&o_&u1LXs_yN6P;9_Kl-}Da_=o-nB^`x z$J3!W`QcKkrN&oX!_N=@tBy1F8mtVA26?iAn{ZLDU-bG7jZ|?oP!vg~>lQAUzM9kf zP_~jNvyF5MchnZaL)YTaVEfNYxqzV0?t_xvRI{8^<&dwUKCYx#UAuxYJ`zFHcG^4saQev%B8(^g?$jQb+bNXAc2cOc)wt<&|>{bAA)ZA?E5M`n` zEDkvtTnL+d$BH+{rZ8%<*~Jpgpf1s9(5>kZYpnquC7RSy8P7U;4_AbfH1b3SDxFtKVPPSWkbbacIobd-YF3|QjXhv3ANsOn z*9GcD3Hi_Im_z8Cy#M=gs^y<+KI*5$#G2fPyzfPi9&@5FW0!XO9N!GB%@PW~{>vDu z4Ej_;t7$8KEV4n}S^o1Q1T$4G3+_7`L+f@_~WwZV^JuA(qdMjML}`tRDkq*n?R z*4GJ*oVDD&-=l0_H%E;(U?ozQsg=baVtQ@5Tb&9&W`ujNQPLDppf)!2VBWFZr2<(@2QYh zBlTJOsPInyE75o@hthBlj`z6!gV@fJc{J(D4#dc`cCeMpwPJldjj?$G9{N4ALM9`< ztUtAX*%d?-nff3+LKI0Tjq32K@qS|4p_B4O?;$lUjk7uzDi$IpK`6&F?lEX4ZNS@K z8;h{ffhYD(dblWluRCX{2!*F<)!03SwFc90z}7xR3~o>D06kU$s%~IBuRpW&%#k2} zAjea_&2bmijl>jKIIP}5ysq5vd3^_`*QG?2**u)ry-$F@oF6I<8YXssaMU!&`yiR` zDyOd0QQ6b`Ffgc}uD_&k+4B|w!pMd;L6RhJ%QeTdOt(_{V&#aN0IMJYOheZpssHz4 zyHBft-i?!|Zn93kiJBOr9)dDfgm20lo4);ZldL()5APFbK{JDPnK=@%94|gjdUPV8 z1`0lh_@%Ouz1$32IhqArI#p6{aO`iT+h^hC@Hm6q89shN|3_&USWoopJBZ4@k2j*X4VZ(plPvUF@1{ zZ|P-uVZ`AVp$Y$!GJEhpseP+8H``h!@k7dQ;s5d<)t$}X3cVg6+0X+pxYg|A^${Og zlR<&8J6y4BX}1X)7Dm^ai#W>FYRlx=ls~<5lM&S?Q!zIx9GkR?SJv_Cpq+VNBQDzx z)LB9Q>V+<^5R*J`qw0o+hob@-l8hokLRihKaqPwgw3gE{WAJoUlA>4N@lM?Q(s+2id58$6kP$dVcxwKzt6bga;1*19O%+^# zT?n7QZUZjy5%dsUCb)sQ&08SMCSiA?6fK`~A~`@-qw63nHhZMd7_ZJTJ@$8HXMhfE zp5&8(jXrR+%a`fAvKS{V)E{Jhrj)K05xs0VLQr|eAu;$Mqcxph6C9gppu?Pe=;#wU zbF%k&bH{e!)u~3`h@>xO2Zi4V-y_mT`q7rb?LYJc(h;JXng*PYT5m$$6MUi(_pZVw zitm~20;#B&$)-g?u2U9ot)q*hIgsdFI~xs={&Vh#UfN(3{$ssiZxlWQJzf`zx^6_6 zO9@AXr)|0lv1WE2$ZF~bda7^D?KT~|fpS#E6F((bF>T1z)P=IB6N9T(P`A5flih&0 zt_7Ygj14;34OYH|26aTnA;+_qjZh|FOKPBEu}JI2`zo!`Mwse?hJg;excF(>eZS1E z;}NhS@UIMpTxCM8&VI(_Kq?|&yAx=`p-5ktpncK|lUUY|fQNt*~LPNquT=WZ(gLh-W2+RJ z&O33MK7=q$aAVVrtXNRg1o$7$?S}m&A6_{Ga4gpC2Jt{@wXHlw_m1B8bFJjAz$bcHLdo#sz>iu4%m09N((dG4fIM5a?dC zuaV*YagU+eHpSkmPxVGl$<4u$_lFmaX=$zh z41w!O7vjKVQADucj;AhUb0diOhynp(Ro~g=ff8xn)uI$XXUg1upd6V0$mu!>NU4!0 zVy8u3ml(qonQW!Y@Jyc+^vaDc&XmT}Y;k7#s$QIugNV_O0S0+L**!N9w zibdjx6m#Q&xSCwgQ1y-s1SW%mBHwgQ{#tixbD+Gi%dND4^vM5tTe7&P-$=p&)M|>k z;~&jHL>!{VJ^R5F2)$hpQ*h4Q1IjKpNZ?%^(=Lr|42QUOL-SkkGE^O&1NNg4nG#~* zFLIw9F|V~R+cj0WHiF6;zL(EsJY_Lnys=r)_{o;B z0Ye2Pt@o~e`Cc;6OBfgF7N4#90p@Ls@UJgFY_)OuIQPj^BMwSzh)Afl0KWTN8Vfau znndbGhx35?-w{mC!xkTceEih%KeILWJ(3xwtKIGJRYil$^FZ!u=Dbg0%eia=z{-W# z@IR?G%zq-K%`=X-JhJetX4iIKDrBODH&&6u=p1X~d$yKBn?(oz=1sBAl+N0f)h_pG zL;Ea`jh(aU3#mNW+_m_@Vm9XB*a=n*)sn0o7Nk9Jzg~2^U}Ys|VyY!FeHy7&m3Xag zce-&*67_xB&{ey!A&(`TK7dsc%NDmYXbXOWu6)u@GXG?~&BOYjDS{Pr;nMdISA6z& zN57po@ly*T|A*GV8s`|6>x8}*x%1UHwvkI**qm zBOp)85+g{bPDAmVOFXEVh8<|w$f;i}zwUC^b5V`D9yE>**$$T6AAp}Pu#Wf{lvGAv z<%7}UD^FAVc06+nWbw(mTKe1&CoTIU`B4bojuO>cw9Yncuz>QDNchf?mE2$VBV5ewj^Cc-3JiR-M5{#lse zqi#j9w7Vd0l+h;E7THS4&EOWyE8{WgE$I75y87(2UtP}&;uC@u39*bO7RSk1Ar~{` z^om(L_~a;byg9WvB?iS0O?nimf)+R1ZNybb0 z#HES@FA(?OTXoDdnnB#~lHc8f`(bIK5bLSWz2fdi9ksCQ=RsTaOQ)fu7b!Y)=@%ri zQ$$yP0IVF{?+lnHPZ?JVB9zV zgR2LOKH^uwp;fCNSmCrj>t-u+9IUQsAM*eum*2zcx+kTt!@fj}WwN3^SBHrznyyV#$r#a|%LiI4d1$+No zm+6pvAu&&YS*`S(C(i^!H)oacqmb2F)oOBS3?tLh^Lu^pI1?LVdL|2<=@g5)R^pk0 zw};XV>Kp4Ii}rhEl{4H$HUMM}6U686N^aDZ&_sQBsJ7{(5|b%{)!;AWLVrl>l^6U# zOyLOy5uRds#7lg%9l8Vi>~l5l72Xnn*S$B7Gxrcz&@|w8rqM3 zy;Q5^Pu37sorCmg>Q}BKd#^vol2b(csoIRQ?!*p=IlA{LpHpdC?x|>bFf?04=oQeUvizWWwww5`O4`QrL@bh`XYXsS<@VtPT*-%JlQTBXb>dQ1P-4 zQuXI6_YX|I=4*6?6?G9SZ{C{s9A?V}Dysc4Q3oo3t*Bh?SRMRH|tVso`23F;1zQ<*rVMfi206U$R%Ml{|s&9I00QS6)IJhf(1Eh7CBzR-Ga zCOu7QZtd~1N*MnEiKJI%SVem7?4aY)X-3|Ph-`r@@bi$z;2sV}bQ$==;& zK}~P%Egk1HS2aGb`)KLxiqvQIIZ!2;F%wotwGWAuI*df5VbX7E@vY1+nAyfaC7OFh zO_Pv{mE82BRpNZt0eIH*e%B;R$yTU}(HId(;!pMSGf^!Sa7?~bXMCa2IwUR8hH|6`im_wV> zd-3+_cBL(Aj=}Zf`&cHs0m;N3N3tAv|8jBl_@uM2AF4t8%(aCwfG;Uue2w-g#6mC- zy3oA_LrG$i!bl%X4+yPa1QgDU`YeN#!X|K#ga7Gf(!sft zBR7ql{luBSyi`nU(XaNut*vW-TDG~NGsm^YVH193Vn4dtqs+$cTSN4NTet`l32w5; z!!L8oe&I-zW5gA(Lh(eBNhW<94*_}Y@gx0=^fS?e@=WsjlHbDJ(gYKS!J(67z`Q3D zK8{aR$O{#PV>_T3tvBj@XXvXDB!<)5(*JbqZ++yAjg#JXI({K$&E0-G+2a=-9C;jQ z!T8MzC;o!&Y+bta0}Z3e@BtKvfo@)Vo>hni?A#Fh=$4opm_fRA5#gL~Bs?QTxvgqK z2`YsSL`{SbPe?2FpimhYB}%~|kUh-yIh@JJBG_g2)UYbO)jyAAM%dPyi!>mdXw9O@ z%ebh8Jv)EkBd2@Sx(hy+R_|br9tZZMb7hsX>oAjxJvEojGf4Y&oSIK5Qxb|(9MvBv z>E&LrZ70xA?9z4HzEMl{t)FRb4U^Ct(Q_I#nmO2=Ql8xf!Sv5yx9(yZ_y9dvORAvt zNeT|yDD3Dhf^Y_W4*h;U^T@btwS#K7_3oW$!e{a(Gmi=0?Jg>CmN1dE!DsFTzGOTT zSTmb!u!~h7Oy(i2!hKmvP-VK7Tut#kIAR4(DpnXTnl_OHY3MK6j}cW}o>l$Kt>mn! z-EQQj-E*b?X=54DjQdC~pP_pz ztdB^8ym*a%Ev`L)D3m@!pp4dw?}a4Cm4Nr4OuE3xJc2LF@JDsc(k=Jr+$f#Et=aLN zOWg&K5ojP%gH`WOV`x-3#s{Ur!1pPwP^gYk%nMXJ-g1sRsm$&Q`QveZW)i;}b(Yvg zB7N7+M=h^(LD|S@R{9vTek`b9OPjIH;7IUgi(4wVWFlu&-&>zIo+-^&{*-SrP{{@wd) zOFtQ3%iNCBM9|k=WEco+K@kWojC+(huDmz zt~|2-X7B~@eZgElYS8;79%OOATk$*lWsL~#qb^nYejy2l%U&J;;yUaOY|>jzS+py5 zTCX5|vIw4SF;w2Rca+7W^W;0i;>g9>?nGwO;2C6b&SrSV22nDGNZeHJx*v zfvAN8&q1yHAfB(b&`q81tgY>W{MtbqslmWyr?u;2Y-3_k5(i7-UJLiAsS3wjzh(Ib96C9-y0I(j&uN=pb?=J zI8X$!or>Ez+je2O`~x(3BY-j(-t~k5%E7MzV2~W)avq=+0P%-~;=rqQs|%5MELZ;V zzT2y*Mm<4njnH<630Qgn&?;L?$f9S);midR+0h%SixpUCW!7yolab)mQ-u&R6d*_k z0|0@b(6U+)<_Am`aL-1g#|B(;f(mkoiNf9jMj$YoU$4&*NIW;XT>KQ!%iQ9Sx9!PU~=_gu)VJOSrd%jAYk{2aYN%srJc zc73@;>W)$BVJ@{}9C>p-*pOegc;0EItzO-Ez~QJS2cOsZ^XsYNpa0c4)oAPih2BM- z2>BQ_VuA;8i^_kP3Mey^X_Mz8X;$Q5giutl6j1rf8>&TAW?QpzdiSLpnoC<8_os8* z1eU5luT-9rF~;%_svyGrj8>Vqt7cMNp3wcnwMLIhx**MUeYr+#dzn(CiX-HFBqO3; z>7VUTYkmgi`+`)ZQlw?Quu0lHU3jk7Rujd3au=uQVbW?QgA_ZAhxoC_<%~Vyfnx0f z(-$w9hakCCqTW5eoEpsa$~{j|AH#m0WF9Tmm*^$0pe)ts!)CU|Of6@i6^u(D6+sX_ zPa&;GJEzUInQYsu8tQ*IXHHW7C@~@p<8n8D#bSvPOJv@&u}eAr^0*qzlY(TB1YLk~ z?DvOi+|;tEU?`nT$aSbPwG?A%J_+<~M$}zI7P*8`;EX&ay5a0`Q-^~iKyX2RRK91` zaNo20Prd30cFRz(gPngPuAQqRk4ngg5q6;*>#sI`Vo zLLz*GO2NZ8<;ysyo)Z_bYj#maEr2``;0Iv=zC@vB%9I5HYmq*-j7|?U6W8f+(9!Zm zzxQQ2(^YccH%bCQ33B)pu-3ldgff!y&jEWjGT;(lM?d18C}Dp8SR)T~{g2O^!W zV2MrqIOhq+F>1!~)C6U;t*&LQpry8=3iHEa=8#)w*dyigF9e<$)-7nwa)ynwO1gus z&8gWGTtJ->)wk61|G||6V?sz5U%f6)`UHlybM1Lw>wdE)9M49hriER>;^MXRY9wHJ z;_5HiYix}Qx|yi6Fq4N^R&s$KINJL6F0Rz; zy}>tpD;m8m{}h_hSaqwOL}bc)QOszT4!4eL z$Z1qw6grU`6OCg$L{8&9c=)dLSaM2SOQnA!NoWdAkh~lUMPS7lcrd+%u}xpBbps=B zyF(2-RirT{y3nHzRmFJsX5Kc+_M9?~3_-$Zm9OaMPHSnsVw?of?LET|zBBhc{E!;0 zON7gpjiSAL5R!*=@d?SELM2PJ$w@M_5Z7 zEX>A+8(LC=VIh6--6P%TSv3JK1UV=#q5Hk2uTpZVjWo3;3FA-h-ZVj2Z}sG?CW~kD z268_UjL1(AP2R$M2|8U#azDkU)7)N&XZ znmUX#bjy@irK$|T`)<@sQ0k`lsv@IZS2h8t(Ml@-Y2-Kft(A&H%iKLyt@}HmS(*G0 zA?vJDgc|5(zp;s(*z`;lB zC5)69<0StIZ^~7VAaS(Oz5kEPvgX>B7vuZA+1Q(=lC0Qaq(RX%@POV{b&W0hzuCl+ zRoz{5b3$IL9fJMA49n&^uK9Ybkh7+;b+gp@j2j`WFvP^w2!B2<=m(+;vGM}?>36#D zLSxfV(w+^_0fP}2yJJ{z5@tS3FO4S3wEkP%APPuAw=r=VUkeb{yrZmFko^FX*5|0n zp6k?+V)Ei5v2X_@e3&KAiQtTRkjtC&qiUQa-?Z~(Gi>K% zE_5TJd}G|*Q~&L)cZUU>#byqbYqzlW#{16Gg3_KY}TR}d*a8kQJgR?2FPOFLPU$+E0lE&eicn)MOd1GTR;s}^n0B+7YR z@4YU{aEP+r=qDdlB&h+s(yPFFFE%euf&;E`B`>U|Cc6oXxZuEX~tOHMDs%$tVchbp3R!oWjd zOC;P7XVyU*3TGItklker`(BW03D;?sO6Sn1I`*mnZ|YnbAAUa!Jnv4g@FGODg2BtM zGTSXkyAAz6^o$|b_L=4p3H>KSC}UGq)bIWgSom6J3%?k7)lQyWO0Z_t8U+(TaLqo5 z%a<_{Ggw_lz)QQ`E)VrscOR`}hoDW*Y$pegze#v?#F}R&ZP!5>Ez%ov3Ae;%M7sY@ z#6qQoH?if~$qh=j*uvb~T1EisJ{^yA5GQ*@` z0lY6vo$R$Meci%&w6Y%gzEb+kff34kV@pZ3YV=dbb)>HP0TuU|WwNz=$cQiSFIt#Q z{PM---AlU{Px9c_gu~T4RN;#^sTxcAH|$pX_5nsKldC2%WXV8FT(I7MAS} z-0`#`#QL6MU~oRLy$U=Xt7y>$g6n?^u>NRohQy*VrS`ycKb^XdxD_kI!Y?4XS2&Yh z#Dtz`?`eotXVCeFURP(PDAehsMGo=Hna*`Qhf*I`LV(Rf?V_2I+qay5mr>i7)m29`onJ}nxSd&7{0q{&5~M)BKoWg6GAhR6AQhNdHjJw ztAOpMk}xUsj$8*##XNJnS|`dXoo}m5&y~nyPb=a*K=#0sZnm_#a*B_FDS%C>U>2vT zRVk9VKBQ`L%58|@jVftx za$4xquLL{zRZ@3$g%PFDUh@F_gPklXrxL#3JPd`c55H-Hz0cqvUM8eTbz>@Cal#58Ljl7TilTxr6)mo;MRyek|FU)1%pFlO%9h$0P#gdypfrLfN zIJ2XT_S1bc+~204JV6(F6^|Nvvk|8P?{l5<1UGcfp@m0;9XIXr>85vA?|G@Jce3d` z)v8G#$EFUHpF*3Yr%5)M%QXj*l2zdi%U_;WTDrege5Qr@SS!Q1#E7~Hh1$w%2^q^k z`HO9U_0vY1^qJz;%h2;R_?*qc+|Dak7yn;HR~wMj!L|jV0L>vnrdb2!=;5Gb<`?!c zIHD=213ai1Zdv)HIGduiX4^AFC^0o8&~oZT0RhXtw8T9%vs#8*Q`4HR_L#~1*xE;{ zwzt)um;F6|_;D`o`?~IP-Pi57WqVM!l}g^#oAXmV+p~3m!B8k$ZqYl7#Quv{c6Lkt z<-TQ^I_lHem3mex?K!`sb0i!&>h=fT(l=A^L+lZt48-T&0PYBb6b_vHdpOr8%|~** zvEO+mZDRfn_y5Aj`k8HQ>hklr(-t=$zsG-CIrhEvq5j>UDLZSI!>G;dgioi!5Z=t_ zyTYmN9h)Dkbu)`!4{yyp<5@wn=Y=mw%?Ymc-9HWfXnynOrsAHCKbP(#_ph4SF}TAr z=$H2vGBXxem_GM)jBv2?-{vzbADR+e$oEGwhwnbj^R%0EMx;7f1`ODQ^Vc#!LXl)Qcf4c@@#iCWzM5O0DhVZ6k>C#l z*fq6!7H)VU?9WnL9zi-a6!toT4#am86{@an+Tj`uAJrjBl*_6z)kC0SW! z!5uQA{G8=t#Ia+Ocfk~=mXVI#AZxNzvN>yx&cW4^HRWAW&ZF29dm&X1xfl-jH$yKh z{G`BBxstrMV$!~Q^0uh^i0WceHl?noMBWx1WBne*S=J=o9y%bA9!DO&_K$6@I2|Xp zjjvTb=U)7q`Dx1Wf8XBanhN}MyGl3F{Q=W+ENW zbu$2N0c!RWUkKeMyrOvY_BECL*WJ1$)faW5sZ3jWoiUjFQBug@iH(L*MQHpZkW8uW zQRnn;{6S)O+XI~8@9{&)t3YMV6GOhaytT@l*xJ%6)$~dp%%@kPT~TMoA$1s2FTJn~ zNqz{?TPQ5~!hhO3jj11s|A2m}{7l@>suWfFBm51y89SEDPEXzC-tR9pCY--QwA!1k zF_PJ-=6k6J3M9`bt|lC6lTsutA27onhm;IQ_FMPspa)R$;7UZ`-+k2{Iwh&%5e`M< zQuGOf91x!zbtQ25cE)Ly9=itERH@Ry$yccK@g`#8-#} zqXLh{ltKC4bnjJp{XC-{rEP-uQXz-NJlxc)hwMJQ^+t8M{?k_1ghI9XB@>ELZ#0+T z#kZn^z2T{AW2P@*58wW$>aU&dY-DBA`R&7E!rr)ZU_K7QyH#0)52OA)YjkaZNI+pN zx(@iu&seH%-?ZQgijhXz)okf0( z!*{2%iIy9(xLuXtVb`kIXIVQl=#>o8iC^D__yyi{DaBMfIqpi&{*`#Q$LrYCZr=SL zDD_6fL@0kds`IYbFl|43Sz}@p?1$@_gfiX&)vm&xjXd|wAD*hsLJz+dN-sf!O5b-2 z=Ot<>-n<$epZ3uU4ugE}t->AMbJpF(JM=vU$#>RHW5P#@J7-elT#2@2PuGr^m)tKtU!wgPej>aOyREN+E0@RY#2Y4j2I{T7%DnjMqTmpbKNl zXTj0|6=P`5A=lRC&XE}a&unrzffPoV5Po8-^-IWA6&o=`ja(^?^B8bTolHnQ+8lgB z&*slJVC6c04>gU;n+N$cZW0uvQmKiW6x=&#awuGr;lWDsIwk@8BY3$T7*f7`F^^Dz zQEe7EmomV$h@v(-G{^N_b}%;GBOGp7pgU8~JscspNWC-+t5D2eZSQ8s$#P_D=|pqb zu7gzC)|-rLh1CpV{XG3#DCM*5s+C=?H?F6n;yM5F^*4SfyqVLs`dNvUxCKyjcWpKL z$!MnM!`+T1L3Fb?)mS#84^h6U6FzNcvBeO zu#!jexCPzxe4ftlV3a-_F8S&p-z+4aF&Hg3CZ@jH9XCOc?VGTzNoOrL{rs_SgOgml zAy3q!2Kk4(y;3wF zDd~drgQVK~DTl}WS$X{%^0Mw-nlGu$MAYrEcdy^yFTfI^48*8rYI}GSE%!|-j-@)C zhyAgZtSl%M)_XsZyGBnG6e^YTn{{@CGj^}?A8{;)1=X@rd|HP7xscf$QpmX$6Jzv* zsbZmv_s<)@F^GUte#LIQQ0*jZC;NsMQiD%YdU zBSUC%Fr0~_5n_mDS{_azZb5k|c!-CI&X77{s^q~$OYXYS+C^a_TYgds^VCj+%9a~& zaV%+<{0*tgOCzmLk6~t0qpa z750Uo_GJ6@bH#H_-0a&3d6QvnV_!soI|{PTV_DG)q$67=hmV}(ECA;y_3s2N0K-3^ zYsmStghMt)OrX)aDc{eAcF)kQjq7b)$npj9UF&C(R(qN)$Z}@mlqS;HNxbsAwyw1O zLTuwNQ+_Rm-^i&3k6V!)1!-NS8=Z+c1uF(HCz+q|d`O;Ymem1VI+ijUN+{Y(#RPYz zwU1VbW$m@|KK8j9gl~Py-?KKT3-x|LI)&KOJA-c9IAEUoBx#8J<*)Vh43h2Ahddcy zG27S7HOPinZyr3Fxl&(IN%c^jxYIydO$oC%UCL}FUTCSbd7$UrUg)*y zt6TpZM7#H1i}qA)XQT`XFhMqWP@FSN_vpky28>ltH&w+D8M|y)?>s@rCm`Lhy!x!zg&=8U0X7m71(<|!dlgxoG zuU3VALo%P@zMwbz8YcO&7*l(cM_Jf1KBWfARm;I^Bz1+Al@jlU2+a*NE+{2JL?@jY z67oFH^CT zljp6jh?_`;d4!V(p(JX{3Nm2-H?(ePccF}YsXL)Xdo#7h>vCub{6qMAnJx48Ov={v ztq~L7-?)Ui#r8zsEj=wzCU6s#ne9!BJFMb15!b1lOgTddvtg4qNMcrqcDok>9&RTo zHts0M_z^mQ1h=vV4!JzuUvD?<-uyv1TX2>SL+?4uJSsasWnY#2tL*MiM%Scpz&Gl7VdVT1(l5V{0dQf|40egpOyQotHolf%GdpP89XaW@# zV@B&3#&28aI^wZq?d-isSToNuV<6-Ut;=R)*ek;>)jb_JPtQBE?pRG4E+wh>Cmat=GLhkNqOqcv-@}_M+ST=-dXh{J z27^Qz4#b81`2nJz1&5pc>4>$_9p#Jyy~fe%T{FHVQndc|P-u)br-c+>BPQEWUJWug zuaWtJd?i9x5gjQ>xJav>N0qNIUEzZM=&DYj!U(`6Bq5tL=Lez5B}rbo2>B_YBi`u# z2<+Hs17Oz(pDQG|M(D~8E5NfQHT?4^&ZCwblL{gn0!~brJEEXfbi$cx;XtntEdgN> zdkVU(1t=(YEVgP z4-q=NZP+!H)NIlK3q0q-6B7LyKElemNle(V;GRyk0xU=RY_xZp$gWA>CPqm#6Emlx z-1JoHAAPR9YNF*C$U`d^&XeXkBdPZDf#S-%sb43fXx)4K~#kIRz6a9OdW{=&y;#)6m| z>#fxZr(ebwf9G`)ow!UM{t2HmtyK2pmqz*7QL4_bd)^W6NP7E%|GrMG??jP%kocH+ z@>O?sHmQ`))F`@DXfidkq+|+>+05d|Pr(RUjhD}6 zQ&*6K0YWL8D;_W@dfna9eVd!4Rpid^$5B>>aJuEBW}29<4zmJf%$hv>^~qkETyfH> zjCY7`!&aQWuR!eWT7=)Pwpj;sMh{;fT{F=w@@0bB*6*bo^46 zj}5)eJOZ!SM!r$AdE4!5Z~cpSIkM7w_@3lu;Ct%A>|w#Q>S#^Kh4JEs3XA_PX!5iB z-AM)2^4g#o57&m--}QSdhtreWmp78rKbel=_riN}`(8294l(+Q@YU1c)l5(L&g-HY zyC=Wtp5Wu~E}MXnU#T&dH*dU9-}hH{Xzn+oA)?M$R|aw2Vyzg| zh#ash!hK&oQArf-PhJy53;{fAli&sDIn-r;E^+OI7TD#vM%!r_#xJmCOob_d&ySfH zQUe}0qY5FUPN)nwy4^Ya~?@v=Z z-~e7@aWm~fx7<3;)HApaE`(2X#CXZoquPI<_m42-OFIlVtSKiTS}K7Eq{0>is-4^~ z4N^N%NizY`GsBz|WI?))2d7R>+ zvruJOV2V&gD;4~egp#7?$o++lR3H^1=D601VAYv;ZHGR}M5)hod$V+CYNqutGhfW1|F@HO~!+$NImI-CDNa-e2xk_8qZoK&PJalt=3OGJ0%^{-k2nm{OImH zC&zRpkyBVN{w#X-Phsv+kVY&OKAr{;e;{PP=%eV6ym%EQ0RK5T-nkDd+>Fal+<~7w zLfMrbOFgg+$sBYh9M`rZX}SB+%c z9o|uddvWcX+v$R{XDhB;w}1AnwS)_J{43l0uaG?#dbWk1BfM1~pWz)ayg?NR>^uF^ zUUjY|Nd2>Z^IHgYKfIpTozNI$c38KhUmOuUZ0*E)*<5UYzu!u`|LwoAmbN9w%X$38 z)B3M7WVV_fx9`PCxK?ijt6;w3+30qrn^pr(C9+?NK=m>1GQ6a+_pjGZd_V7yO6&FG zzREp*9Nw3Vh_|ya+zPjJCz)7zxN)9?LlE;*g#&s#b;$kEZ>R$=*N7ELg?_kco<()| zxG+XNByzg(BblfHQ5o}LQdO_JV+PK1j8gS>meikSB8naIVmue;Tuj3-#IWkRS?;=B z#Fo2Aja1t|gkJ}04cL)XIFqRnI*=@tRXl+CQgcQO&t{V>-9iV?mh#*Q@JZ^zDv<*R z8dp%92d!xj|0#SGy;2ia`1mqtpwra35~>wc2whY{kU6obu?-K!G1OzHimUJQ)zs5Z z5M!wj?Ox-mvKk`1E?Hu%24H|8YsPvo+fV>I20Rl}`XvRh=K6*&KVspk8xdLNci@r3 z?kvt#z9_%e)91Pw`S3F&*9j=7|Mtmv zG>`1;k5cthV*g0qXd}cju%6OhawqLT+@o+tF>U9EqW;u13*d65-rI~zJo$k3U3}V~ zHE{ka(^8#BTT=TK@!tUeB|(u=*KXU;_#f2Ir_fQ_m7R@?-7)ZiU?{@{UzMW!+pbEo^gku&kGmY zDaqZhw!D!v6{u=;#{};UV|2@)is7SZ;{}VA6_6=Z)1j#!N*g|T(39%b2tq+EWPr5D zjSt2l`sfC^6476#l;sloDbVpOnIYAcMf~>6gsg{~XR>^$-NgbYDFpA}RYG4{%vvNE zcF(jsf^k`>5zzoOG0-*PDC0En2$Ydx4S?ba$s;~O^9bQUGP;H;D;2j;e3Gk1_Hg)= zo45>Lg$=;*j{IkUC7xo$GkV>jq-Zn6TUuo-7_7scCImGw?Qt_E%H z`swFxlyYlUhx%FyFO#I^LPAF8Bwr5*#DRvZlAJE757Bml1P58qB`hUX0Vy~U zmP{LQ&o26ABPl*it$vYb1j?kDNp6j-ymZj$^riUhm|TowVC8d7(F=<$^F!jC7V?Im zIdjc=hdRsKPv_h-!Ocx+^W#TW*@nPnmQa#fnw7scP+uH;k?+S)6|kS=PJSZ$ueYsO z6f>$x(avKxu5Iajc4zo9qhvto7%5_xd^2(5(!=n{ufk%M*H8Ym`8DRG`0;R@nml-V zu;3Hfu4M5a9S-*{-kk%!G>tmjD*u%8wDw!>gHGEmlJ>6dBt!&?*srjj|Hc2N;R?bS ze{C5bmz=tP_Rs8~CGNNSm%Bci=)HmSIvKy?#nRO+O7dTSFx!RE2mZ+Dk9zxpX2-kQ z;8xHw=GzLd{6cj$%@x(5?+o60cX4n0ic4K!lRx}E5BPDKej%Q7iUqyeIiSN-emzH)9@e*HHqR@)%l f0!=|dGzx#;hViSS)fTq%O63v6XYl#i|4sit3MdG( diff --git a/vendor/cloud.google.com/go/vision/testdata/eiffel-tower.jpg b/vendor/cloud.google.com/go/vision/testdata/eiffel-tower.jpg deleted file mode 100644 index 9c32b85af67c4a2e24799c977adb92375b2943f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6832 zcmX{)1z1#3vrC7>F6^#^)DprHvLHxEEbNjBEU&QN=isANQb1lGzKW$ ztso#shrIQF@BMSnH#6tVy>n*f%-lQQy_&pQ1OT)&9z+V>-p`VmWfs<%JvL5a_@5_J+4|5q!KAt9w8CnJhPKqLTC zqGD3gYyU4N0g;mNkTW5W7zs&cFpO7)sF$er{na#pj<_!=hztZ!0-PR#F=hZ#$pb>QSb zM|9%AKMKQ2bZ{yEmJ`UGN>PTR*MHtVeHLpQ-PGcrkikdatf1;rFn$HN=0)*46q>im zAS;t{6s=TZThaH@EQl8^2k(c&a^VzUw49I%0%cf6+zFnej|)fW-~_|b;2#k1j{-vs z+5~J+7+Jpb3d++o#K&zFWNI!?J*c2HGqQGB*ucwU0qaIOSZ@<(|u2+OP6M-;EfB_CVP^w489`Fa~8%7>)-0 zpDz{UPUUDg4F*kGASa0PRxT?=lYlX34Ixl17feac*D&FX-4gnG`?D~2b)Mmeqo0vF^(YZWQ?$Pmv%j~D#22c!>y zzzu1`bp&ywLgLdUD4p-B4dV`L-=v?LZ(1x)Tl@B?D35x1kG;E*FmMPORQMCcT-S(3xh<1Dm1^; z9|MIORimYzugFnAEgkPLgD+}&kaaRz}*E= z2Dmf>qFsWOurxhma9kxUu3#jAWvo^Uz6tNmkn+{XMSNe;z`cX>J7r_R%Xp$sg=0NB zAMK_zfUL!PwD`UQ$~-B*7sZ(bMd_U!jhv1dyn5)fGvmC4h*0$Jlh;;plBqNfo`Q9P z6p4U0C_#3$`5hX?9BuL?Z|m~#CY{y3Gn`y6VYg*l+<#JA)7hOp61ZB)O0lN#)Fye~ z?r6pPJz3s_xrm4yLj5MRpHKR;oN4ju=(?t2PPkNd_4&%7zawZ$%ohWZDTP$tJ4eyl z7#3!MMTrGyg8>(Q#bJzyl`CqYk0Txc#@%Ej!4!;_XsF<0Suw-MSAcgTi*k|IFPf6E z=;ld>HL>mZ9fWO?!WV8Vn|vMZYrbq_?1u~K%Nc3T*mCt7%3PA!QRAU)s)FZqEF+Ky z7zlnyMJQY!XQTJuq{HK25oLw&{t~b#(YJawj1iXTW|I(_sThaCPJY)YgP=h~?~z7Q z1*AnV)H>!j89buee|s{T zvAz1M!^7=)9{s>QO}oJE@S73d9Gi1$1y!Rx3&WpY8sD`1C@r!e%S08BU+su*yW|NI zaYq^DK5X}pIq>`YrVKX~-_m5*<3&u*EC{zCFL=2Gyj-jzgf;~iMu4>7-Y7%*$&m!h z1QC}(q24rXk29puFa-mv7RCtc!ErErZyE-^R~``kHQZ<=%@8F_#bmbHCi0@8e{(TZ z8#>^gt{qICU$c5yNfmECt}rt!>cWcbozzqIWv5Bc@eZeI=GaQA7?g=MzMu5cykbIS z`nm@C;~c3e(#QLZW`i+|$=>G=;;n(d^sUEnqT%9RVnGdd9K~J_m=Cz*Ha5j9?NrTM zmgg$9o{O`lH%TCcN69i4&c`awo=qZ}{axWKVFELx1|&`A+)5!jhdqQxzy5rRy+Es3Tmi(TvZ_3u8naDHn!lsgr?wf!s`^HZQ00wfvwa`Q^lNeS=&et;b?z}u zV40}=1Q7g}*R;!VWU;0@Gr^n}i*gD#5l#qwM~sFHK`eCsV&tzwBphsWAAk55I0*!QZb({XK$)8?Zme z6zn>>;3~Z>Iq&uWY;c{0P-(%Vlt9Xl9@15>?yJRYXP0IA&<^fsjBQNp^z&y}+)+ts z52r*2SfAy6U!EVCt9P%S8sD7yT43TjC|6D14|RIH5OB!+$sbYan|Y8pZ)R~a!P2Ks zni2Bid(CqX!F3v3z}ZA7T8a5t<$*!MU6)y>-nJZ^cM)3~8=|0;4TWtP?TyGPgwHzL z>&eTE_Er-EYvqC{HhSBeV#c3C45$+^?~qwlEMq+`flp<{IZ8td=DIX1h6(7w5oSrf z)pM1wC$u*x>5BZ|;91#*WxixwRQP02f3;OfaBro_XEJt9voOExiR(;}VKuR~3yFK* z_JoV&#g*405%Q>6n`gBCL#zv4yts|c2K4QIyf%kX(=anDSed-$hI%{bvan8~z3wt} z%bcx`Ymn3XnYcwZjQ0xQp4*vwzGrrEO@ni7i+=>VliSUolBm5K3G9sc=6Ueecf7Cg zuS#ntzx1y2P8h|@WJ&oGN2voO-vwxg5bFQh&f&^L>B z+|z0&BT%27iE2>P0ae2m<9FNWFWGsHs-gKR(|Xf>l!h&Xj)1y;P|`9%`aGe3x{VV` z@~sR*Iz?b4K%&asuK=?wU;fbU|E%Ahvf9-tV*lVcX|K!H%!a5Ec$7m-&J~R+rh+OF zm;DBu9wq^n?swZBIZ6Bw`Q5H9YtYYehE&!T8)fLH5)=A~S-jaZ*1_+Op-E}oAree} zK!#ubs~0duhnj$iM6vWSwy~j?5lH>oX6`S6Mc5TtbM54#_bNv7e%h&zWC4D8A>D!Z zAMMUSW*Dm2-kg^n+3Ybf-mf!T&3gmLpr)_A*6mCl`ThXn z#PP|exP`Aq26&ROuKlbg1&Xg9@M7E=Bwg77d<0`%?ORnH!Rb?bw2z*`3v_80aI`5> z1Jxn>0+vq|EeLXx<6JDGrx~X5HSo4RgG$(6ys+)N5q=;|yj+4fS2_OOwsLojArqfk z(LGJVDm8QGChvG#{Y;|CuuRQFhAgU;E!F2w4wu+kn{iZHxHs~;{?rw~8~%q$u9+k8 z3q_CTsT0!3T7-Lf`bDbv;R4N0ur&TwwKB@8MtE(>zc;e$=)8;fzuL&SU8{DxwsNl|LB&#|5I*dTHtO+4n$-!R zMGTEHq@2M;$NM`WX*=-QTkIoN4(iB~hyAxYn%0t2M!U;T9_-GyT6b>-B6S&nU!2Y> zYu?6KG_Zd4mbvIDM?Rn1tx$>-5Za?meqiXOJ$YMaH{)HV~mRH3L zcR$k$0V+_F+VHMWmYeIxW|nxLhG|Q^{m*O^JbAOH#)%AXmW(!*#2LpbK1t=;&|G`1 z5;PO~bAhGBLEPqoKI(XT%Uo(&yV<%#TrbZ|81ex{&+BL>hB! zvrYe9_bj>U3eY$C957_3*y-2hBJ61D4Po`AxFG`{-%aMA1AYh)Cvg45(sNcU>bafx zn=wf=1}y)K6a4D8N^mEPzg{v+xSTox)66#|h&oYUe_&7RQ zm^KEQA^2I=>goQbx10oTe+Z*9$M(lO%PK!k9$h?ypflM2z&yWCw-02|MM6v+lC>yA zz3Ny3X4UQJG+t%PTWkde>p8gkUEJjov1$sc>~4r)4G|h9rJC=66nHZs#reVkS*wg% z>+IJ96WxlV!%Uj^bnboqy}I13{xM#mY0FGPhLC_8OufUSnRt`=*odRDviLKvQ2gPe z!+?7$%$(80HZw&{>b2Wiz-Vt34x_V#F*6w}*2iVvc*}5vm$ZLurx9Z{YVU1TaLc=E z>-cTzWGg{L?Fyh&O!Db5dr$RiLUszEoX&=2#e;IzA0HfSW#XMF*4~IZ3BJw-YwwDE zs-v>v<=FWN(G2R{?vwh_u4IV927G^kA2%%CavZ%7@NF8F0D6d2wu+OG zT>-Ey^W;oaQa#2}3|nQbZmpi`C5oq!a|5h(Tb@!n!oD+9*L(*0hx2QCe5RxN*rf@i zSi@Q}2Yxl_J(JuwITC4=p2Mag|yeC{+}`;JcpD3wFfExTM>Ke@Bg%bfQ6 z%l{^jHNQUhw2Hg}EQ&nxn0@i1jA|0gmSm$m-*cf`geRj^=6CcwdDZoGZ)xK&?%2-S z$=5ik9qF?Epd2n|g`l&V9I)}S=?naEVihhTp^(XFQ&DE*Cn#E}tx)e-xVG*j?mwG& z?(O;Wv6sywbc>G}O`?T8=ZZub}(^`*HV$sqpB zmnR)x+ql%8v%gH5+*6YpIC8Y8&eNl?6aQ)R2FZ_9QVzKS$ZeyYT&L#f=3bpU?qi8< zY}-7~L!`i_n~9Hr@iI_04)44&Zu%j@X1F$t^4sk0?cB+}mqz0G4nxNfNNztCBcclk ze6>-U=scV+32K0nlfjUjjVm4Pd!xsRxf;@=jGE-~K)Plp=H~hK^iQgsHkUD100{*f z`mH{NDeI}gl{W&ifk;1_ILv{7Iw^~X?hRUh_rn-cazV-vK_E(vVDt=XMx|-W9`jI= zJhBCb3U1oPy4)iD0A2>zbq}-l>lQ?CyAR;oHe&0Bd^q}Nf|GVTJV&=YOzisC1Ox;W z4Yq3V8pVi{fM1l>Y44eIPb&v5MA-*s#Q6SjG;^H4D*4m>(_-&wCb^}+DwA^7swaY( z5WIz*^O0N4NMGQIW3ti+Gi2aPmS?#6YN_y-=HY4hu$#_h-^M*z{pU0)483;LixEms z$M$B@bl**`-S7Nn@t0|=L$om2qOm{KV^!j_J{cW6N#Q^|;vcm#Xu!_tNx=Odrqo@a^ftQBNdg_^7g8FcSCs%wtD@bFZ>FD>JIzZykCF ztudeW!xDsyeBE&}@|=M4Pl4BrqSr8X)2IFdo6Ikv)vNTYH-8Usm!-(>S*b0=!zdga z#IWhhvLenIElaI1Tdt{v8~u^tnM{1G=wo_}e(-S77mliu#tJ)Ar(}a%x-m z`I(2`L3Ke>K^c5hJ6Y3;fdeLcqU&*JT6ROYt<0G-Sw6T@%43hOdy!F>_uHcYJoYDZ z_n~y7^y~Hl9=ce~tW^85K%HLyT|U*JPxw zK=s9h34mgtVKU!~v%ptx9TZnTWW4Lp8TQs#?hDt_7}s;f35G5y;n&i&Y;f0Mv1ZtO++R&$;D?k9tKu19v9 z@`NB@MXUuXL!y`D<=sn{UB)Ai!=V@JQ%$xy6BsjYfV~@v;ohb2gzE*w!-6jUp+Q84 z^2>wxgOo0xX$q5fR6u&d6#&Dc5=L4WO|880@P6;5lBA`~PA>wVlBQcYr(}Zun z-CV`@FfzvJrC+O8MP#dd%p{88a66`qAD=N-LPt9@C5feeBA?+FCOJ!cy8Fze*&VuN z-u&pdUB!91we*&3G&AT0fpfj#>Bzbrk`om03B`Tqwl&3K(KhK354!NV zm*O14DSV{rL(PLF_}|%|2PxJFk}VV@@j}y+#BbQQ zth^fBO;aH-kmttw{B@mkxy64fnSEf|$Q^&U~bpCT=qtna9nTvfN?&J6D-y_T8$3X)VdV zf{F=hSe|;NY$Ch0_#Ic37*Otk5U5L@nqzYWp-3U*`^!6`Hf?eob?@Qv8WVp!xwuD zteU(&Ee91F(5%?(y*AgZ`*jkI9#??ai(ug_-?z=$9(-;e)XQeP%`fZ;>U(y}{6%YN zVHjFjJ(__48-FgXgLhpVO-D>ufZuE?;X8u5@W~{^vkTcBN`7QQ%!2s}1Vo__UsIZ{ zdIf-#M`5~?77EHTnLi&q8`n45{vou+*<}~nsArNt8)~K+dbV&_(2O{jB2_Oz;X}_m z$V0xI6euo~AWrq@MbF*0wv>-f{m#BrNrYHiF9e3KxR)msX3#Z=o^NzgA_}h1eK~n@r3+K}m;%MEO m?~ZLx;{-v)0fo2}^1Hz3&Mm*Nh^9f~^~+}+(NPH~5~+aurk z?)&b2_y59LtW5IDOeUEmvl13B^DpZFR5>YGDF74{6hH>@19;g0JW6_4TL1vEvUC7= z00007K!t(^;6P%gkQ*Ng761i#dO>c2zv7=DaT+L?-|5hhI4cB?1bK!+ZZ=396Y@-e z+}1&_eq)Lu@n1nxOPo~P#2yGXA*EsA;4z z8w)EZ1jon5O3K2^$HC3V!VY)^0DOh}^&7y##?Aus^-qcG5E}69uXI)x7N~E3*6`)! zR|ceJ|BVwnHy;}dMEln-RxU1%e9X)a&P*oeAX6Zd8OWa5!^Dx9m5GHJARz4FXkumy zbRjhbT3R~@QlB=rQ;0W z_COaCQV)AO2WLJHLF(Vk`5^IM$;{Lc5ZK&;PfbGVF9?JZr2eZe?(XhP?(9q;uq87q zFE1}M3mY>V8zTh4=V&cK*;7ktT@P_m^4+)^N8Q9v<#Tw-B7cX4ld3R)mVSkfRt3g+>FoM#04nyt8o}vco^AOH6YFWyK$H}S=m|Hxfod> zZO$UV{5SHiQqHcXHb66%Urhe2g_w!uZ{knN&RR&^3J7!t3NZgt6GHw5{wDrH{$}}K zZ2koPOPBwHen5!9{-fc4>$qPzzkBXa^?s3jiXd~KozVYmd;-k>g8WkLH>slrbOzbE z{%TPnZnnQL|4#e|srx@6|DE^`^1pzZ4%RM0vJPfee=+`Fa{eiy4zh4@Hvt3xYDrRd z$arA-yEgx1{sWhQ^rMEg{hxjLUqj}1U;ZWOAILw2Bq0r?1q3_)()3rH^e+N3{Mi30 z^l!*N<)rLPoUK%>J^n8HH~mj}$msd2{NGuBL;v9+4zdG*)gi+R2x$!$AlSjgjuZ$6 zgTSOTt`4>iAa@5+HxoNoASo9oCp#zYU+n%>>K{&j>!l2~h73{@yZ;Mw{@u_2uX2zP z_1i@M@66D}+Twp>hQD(DWrn}V{|__#7vz^(zsZ04_|KvAj{*Gm%>S&;ka_8U9yxzc zdA|nEf6@q!Rv;IUvlZxn!}g!-f12YzVJ_?FV#WcfvN#9~{HNNGsm|>8l;-SW&irr0 zZxO#I+~2d?{~tk;9xnf9IS>Fd8w+HnWMN}uB3a7+D_-at zTo+DC3VB76gey0}ucff-Sb&8D0V`(YYMUgrKYqXN_j>JH1S>n&Hr# zn8+U=A*~1h%X$12;Njr`s1ySawJM9M`wvy~ZTc8lsrHOk2P8{>ie!Pbh=)huXu1%ld2o*BMDXSsFSjPbiZ zk2t6Ndp?%OkHLB4Fu#RD^GfSbKwM;qsX#$Ni;^mj8r=j0k+}94wFcgv7VJ!&?bVo- zSMtuBPmK}r_Mf}Xo0>~klj(iyn7&Ul6DXSjU#q_>i5!xOV&603<4}Dr|0VjrK#7vSv>>9_uerEaM<*{sHw#1b~pe z^SWTwxegIB`oXWcgrR~_;krFf*M53j2X*O_fGEm2#m2H`^$yU`uQH?gh`NT4(tG2O z#cZWpMn{Wb4%nn!B16I#L^ozn`9~7846ZHAsK@rQzk3R@r0h^zM>>p*j6V|=2qpgj z;bgh&%p9h%P=;U9Kyg^7;^u@0*Ay~+A#jD>pv{?QbvyV5kGbgLqf0=6v5x60d-G_k zPQTpBHCk>uq8+O)SS~OYkDJ>wM??gi%;7jXlx-PN&N=voXXc50C76@% zbnAQ3d59S~DufpGUhVsD9hwA*$)*|{XGBr@bzUO`eqF)Ev5KSJU9Ce!2xq~u~Cwc8vDCRO+)4+c6i7FSamwr*x@6C&AZKw@gjG1%)z=iSe z9sI;v<;#4yQ{`pA=*gGm=^8j>2s5>Tk4~5>N||8og(7IJ^A&$IKEhVd;`?yt_nLzX zYoM;XPxpnZsN)S+I+@Gp!-12C$8*Z#3bI-ju`E2iCea#b$@j&`yMnhIAY=Yxlu zPq}^u%EYsEAh5N9T{kp>xz|{F;9!iVc71wGZrWaZu%c-=D7kXcz=8y>7uA|$)Hvd1 zC-tfkj#)yRY8*|w?O7d^I;xl^-p6MtvAv{y;Tm$lp)jOrv6H9U8=?en#y|W-hC!V4 zmg$mxmbWPVXXKdV`6_(u4~v$S<@_u%4%$8kZ~2;74aOfZ_mMOi{gdoto*P&rO@p&P z_VR5Wn~ydsb`olbl&fZp3=N%^QS5-keo9jDmlPBGZxwkJKE{wQog1DHcs)*~HH$j$ zs|_BnBuTjfP5N{dh=I;7={}r0E=6notJYiiJORvv=Dl8Cw3SkdO*w6$r;vI75}k=^ zqb|8|ba`u>lu|)!`EXFHz{VS2VOx|tFVWpB_(_<+H{gm{*4fNtH?L|YQRs4*FS^U4 z)pJ+v`;{4MQmK*nu~Xu}$uN&=eJpm#Y#N{Igr11gu_xKx%;lXOrz+tG2`B3ecWQ>~ zz=h?<7Dg%XT4|aU-u}GsXld1>%ixU(Dw$G{}0ADfq(zc7Mdk=*yIP0sc+wo__t%hxI+<5UQRJ z*}X{3V4JP#(q?bKC%8=4v7rk)i)$sNA0I@uBC*rc(FvU>q74c|^^Lruk{8(b!0WAP z96o2`&U%z)@|SE;_r5qya4D3QQ~6y<)jj@PI) z@=G`SzNB*D!%wL!sLa!NjFl)(Dw8AcmfBL*JXUr3n9jBO>_d&$cbNv)K2kYkK2=e1 zo_ZzmMeL6${@~s%)`E`>vddT@it@BUXAks3mQr&gWpnf$UM3knQ{Ki(U(7PSNcer) zxs$22u~C#`2x5!s9MIAZ2DJjc7Zv5=m-s=(oVJ1~Tg6|~rkj+Anl>l#idPAY1YQ7Q zOCytpm8qA!@3ONtH|*)TLJ8mP>ZN1g+H;n>J>@UOlM*YQUKkeoNe!$P65piFH79-L z7*i5iG?+ygBtJ-*GSc6zi;B5%PTQ>Y*w@t}DghGcfUmMa8GQx|ZOeQvySnNb6-1!e zqHr#`nEjDM#h;TPPWn2pK0jm>#`%j&mP9;!iOMpnE7qbuv%2V^1>T-XL+9kZj>uSI z4N;0PS>4TT@N^;@%Zi(`5!<4YzJ%viwSQ&CKxK{KS(Nc;(Gy&ff{hvU7~aS(Au>l? zlkH@Y-k>#p)WE}aBxB3d48)lt@^;D<*go*DVlRPTA-ju7FO30)jqil)F0%8>(Y7mD zBizZZ9Yc)CmdTjBPiHNH(V|5THOap$Fd zhO|NIAlUW%Il9V&IDT#L#3AkVAa#zw+@TPtH1?n?+9}BKW3XvD&$WF%A2~8(K8l)@w80g-`iIl4(ewS>-U!NStrS^#_j2pXe0QfI zecb|sl9uEF3`?vTnTS@(-CUIy0G~S!HKs~LX%%s#8rAz&AMIr3Lno_w=Mrj`X+>9} zK+o~-Gl5q5c=lLlF97X~dm-VRZ+$B&HWn95jkAdf$ydcs-6-0uP-9XGZ$Km86p5%X z@`1VBf&*{pi)|P7Q9r3M)Tq<&)Wm(H%3G=4b5~BJDxycH4X*{}$w{g=I8+y4sJ%&j z(^|nuZjcqvOfPZcng5*H+j3zM7dSZ6ClaYho1Xt^gl8~n$IEP|EyAH3?_?DTeVIIr z5T~I`p1*i$F7Y8o~-FSS;CSjr<^p_mSa+%gHcvusoyPl@^~3u zTaX$@?1)`5i`Ra9HRyZ}f4?!5=MU1|$^r^`74q%YpsJnc=G`B6T{Yee=SzzeYDre7 zd~$kf2Y#GaldHyx^#W`6&)lhXiA;8lI1MER4TG+Cx`DU()O7^oyI~ji#G)kjOv{8L z5>4-E8rnV!>;q(o7nLLeTNP3nxl=s~JY5y&_@TWm@rdJ!q;b@FhFN0YjH3Uvpa$>n z9}s9~)lQ~+pAjc!@UeIym7@-3nB?YafSBzqN3Q5sg^RMB^+!C5i0h-0thqGwc5GU1 z*lHMp3U*F1w7S-nyac{`>)-H6#yll;G)0)0X0z3EGqUGzL6bWy$FtQsP7=NAkvHJV z&~H}g=)Dil&&RqnBoWynPonSfPl1k?B+^K&kYapDlroS|264Oqq!}`9ne)LhOD3h- z@yEcoByEKRLs+Qe-F8DfdN%=&qQ*IdBr}QdH3yVL$ zsDP6oo^MhQXl|RMAP+yi)HTjE{K+r3cA(#Ej!y3zOcpjRP}-7!<&$|)i7~$`U3Ftq zhbsCLj39EvdX7gS!7O1*qgsBMMWWu$G96oa z&Ty0Hx>6pAad47VACWz=vF&2ohouc?*?gBieyusw7)z@hRcb|QWLw52i`@eMWv=9m zAab5plA$^|oE>TK$mO>2!=utJTtU()KAa^7M)V#^%3|DffgY4j;Wtljg2FdMvW_R)sw| zjBhx+%DC+p9bIestj=|7R?pq*P!cN4EGvudG~qy;-Lx{*wW@ogSrh50Z(Nd;KQ;e! zsom=!(GH1g_1hL4;qE*Y&k=t09C8sbX|#{#X(fwcKR`pj9?67s*$_gJqsp*SZ5OM! zsyD1G9_Jcu8b>0sF%c8*RT<(LJqCq4L)w@>VA@_H{FQwt7EHc{z|KTaUib6t#7{p_yUl4%@heXO&FePNqr@c|0}kE% zN{4clP-uRDYv`mHVIwPfhD}eo^@#Gu^wq>v0oJr!GAW3wvw|*1 zIcyc374}i6ved)eN%Lc5kUrJn6iVwiOm@w{Z#Ch~503W-@a`?$4a!&86rfr6h7;kw zt@9MIgxdc}@3?8R!T4cNxq>j2$njZdyHne4QC>+`YGV)s2!kN%l#X|Th$*p?CP81P zF*H4}HD#5jj3C?SmbF}}O-FNz-{y9~6`xylhU|ZVsr=rMEwS`?k>_MCQ-e27@xs!O z*ttoo`~$6A?zh*FZ3Gs;fz7=)^w#I;^LjpoAAZDGk@M1UV74`DrkdbkSN7OCU3emU zjbJ#d*;m-&bg?ZPnjl^6L9eg2lr(*Twf!N1S@&*)y5=sdNiIQCnQ`M`Dx%08emQ@jJkg1Yk?l}+b|+IMVG{QrO__eK*Brva!>tTSfEx@eoqeHh=p z$l%*aGqfjb8bHp1C+I1h{3OZ3sVB>6jSC3xr0z~6*kOfTNG6`?bk&+vgz7dOC zQVZ7Er=`uL%SM=6obdGHg#-c!JBEUZKrs#*U9p&{Ivbj0kWkTFFdqG+mp?VnCK&@> z0zIk7{5=i<#TOXXDJ>!}yZvUGBCe=Ls6k37adlr|Y#b)f#|0gY+Za0;1Jkx3JX>D- zEYFhgi4%b-ZNx7~;eJqRLsWu!Icx3exuK;v5S=$jrRu0Pn{7HG~ zj=3=3U_0^&MU$>~m1PVhH9UQktChYs0i`|@MOL*}6HhH(X};?;E@P}5IWiHcJ-cC= zouBTgkI5__!Zs#By65&0R(vT=lZayJ;O#^T!cU&ak2%4cFwUBBy{-yw60Zq)2=UYu z_y8n_h?ADsh3V7j+EiafV9~Oi4{f@X`sHYS(6pC0{um*2TRy0^(dMgmKW95i3B}`+ z=YH3rd4Ri>6B;`yMa#=G8U)qDROdwTF*(WY6A!=#4dYORU&_Co-eWQ(a9hM=9u@F0 z#R5%C*~&@g>$rvnuD9rGRe5UH-DWMmtGLmm;=@cpO?<*kZHz;*ZrS}Zr|iV2+)gqg zPTCJU|F{VD>YCQvo%~NZ{>+$D9;&%JaXv7OP(6|&Z{hTgUrWVLjOmZbwejVDsuTfe zV8SP-&Ul>l6`YZ}_p|ZPok`mu zG;2ovdn1owQNZrpXLx=Q9*)VRL;~y4Dh*em;G9E=&~?Be-<*V|)LVd<^;w_{903_T z9I9EW(ur5{B;B{qNa1`WJ=V*q>a{6}Qc75_n+TNy>NGlX1FZcZJMbK+0H{|`zm5)| zVP8Qu+yRiyV#rYd>}xc1RE&3+WUO$cY*^&j6fEomlSloMGCwIB57a^7 zi8%|Omsn6fp-`hx9i1BxrRAJ4Z>i6F!ryg~yVLa(cM^rvV~^L7m!-V`Tn^C7W{U?|&grem@mXt{80VETfxr6LQnYk}jXt<++IZX^Is4t<&aDP@O+vA@1Ei7977dI;ljh}I zIkmrR3B6qvd!T!!?Dc!^JCJRiGgI?KBYI}PqHUE6=`0N>WR!B;_j;;}fTJ$yn(4O3n5_9)?7$i#qxRd?e@f@b8v750O=r?k2ZHj+6%1%p6 zkMsgKA-!I4*Xg{`Bi1~J>Cw7g>u9^FLOTnNmwpP5cH0D9oXPmE6}o14zlK(Ffs!+& z9O1uP8+6lWj7=E)uz?{iy5a9<8AvowK=(L9GWiO+i;e4Q8q1A)nyU2?spJ z#Di%5@GY|Kdi`upit@v$3z{B(DH$Zgc66MT^dz=wZr9{G&_0nHFF7&Hlc6k0!F1pH z&+duKDmbL-cEV`cC7#kA!t)*q`@-R>#51$bPov5doNZ}8Dtv3N58gZn=^8}E>gJzh zgf(3TzTqaNvBMtWJ0YV`W0Fs8x=J%@ZIeN1$Z|mBH#`KobQ2e^T}I4{$!15CG<=1; zw;8~JsLk>6df46Rn@sbd>)7cXPBP#R_9{^)u8F;BPV$5IK+ zm)II+0^KIE<|?I(n(ZFUPu>cc;!RuY0qJfFao%rLOO)txoPNa64Ec&&^s0HKLtZ7v ztYq9K0 zRVy3UzA#SmSg^Q2SG~=z_*GpMeoB5Hh!i=v4OSF%^JP22a3Y>Yca|nT?$~6jQtMCy zeB30KEe;uG4PY!brKy zc|JJS7jd`Fz&j^k4q8_BP@X&bL# zamX6;L{Ab^&p4SEdl{q_4@1EFwLGgLNlWHk?>6p* zmui(LIBmW}52l@S+U|sLS#nwAN4>UdAT?f=z5kkJoF@{JJ*D)HTvTY2i}(}O4-+nXJ2`))!`ca7_7m0%3Ygbfy#!x*G?DJaUM8pc+Nz| z#E}lHK0-;U(A|xUQ<+#R_La$Q!;*NIx1HE-X=rcUv=DmsqHO90zUXC7p|XlHNN%Kq z6>QN^it9yMEyP{6KPKDuXGJk%mcwL|+v1%ZHri zKgI`7FF;Wdh{@(l#<|rg%~H*0D^h<>{vs{R*3lAvwGo-;D-&W~UFWo5kY3;D?#D-_ z8hMLOvnWA4Ghky^V&=4R?L2uOE>^?+T5{Q7T&B8CN2@gh+|zXug<-_|t{$M#a8kdg zlL+un~TDi4D##_QnkcA`uR9-gAZc2VIUQF2Sk(G9a=aKz)! zJ&up0K`}5DarRTK8smzcTR?R8veG>oK-W@n;|84_ugJX`qmOnx3cz4 zLq`mb&;x&KbTGqC7lNsqO)vjY| zACm5&9c9P5;l-ya^p`a`pTgArp)Lh0&Kk}Gsr^b;8H!oMO-ZY# zL1Mg-Zt>9T%2tB6wM;x8Vr&TK2_(4kPJ0~avGS%?x~fYbYQ_)J0?6+pNQM#s^)_ko<38EUKes5%q*Q)v!m41h;9$`3;TTR=oSn0fGdYgsN#9j?Mu&%VX z7e6B|E~iWh2W~dSYcx-@rcNp*tXCSRV2QXEJ8=+L`U2QI3X6JXY#LJ9Bbl`KNlDaE z?T}PwCYD^8Xs_uC_3TJ09X|Z>$xqQ#DvFS`gtfB8>3Yfm^tE@fU!x)>hB9<|mMpYl z8ll;FJ9}V@V}-$6!_@$dO9k)F?M4ZuJweT(#9r~HBrZn;H9R(ok< zwQ{pnl%D6fMJIh1mAlpyQ0C;uwWD_y6b}qC!mBuVipOQA!$n*{(@Lz1 zb!x32*d+yJfid;Yt_yf1AK&;whxW5$&ABd;chr*Sz|8!KP%kX6{P zdbtmy%*iTQhjjAbCCMbmMo~=M^5~*rvTeE6zbh$c9Wf&+WYuQGt}NNJsH6-bk4h;! zj=T!W3%>VDC*<;CG?8=h3Pla0t~i@d&b?0$4X5{!>01gdZ!L1Vz;DW@CrO@}sZMG) z#?SHiFr~YrJLFp6O5|-Jr05(K5@u}ng{vWZeeocKhBIC)zP48K5u_?qS3GpPS@q0Y z+8$YwKlh!Dxe%)k*$--<@aprn?NVGm-Bsj->6z0s6yrAEbBZS-kl}>B!Mu+;fz=hU zYJ13MHPxN6ClLn0V5N+0j!&;#s#VM#Eqwx~cLbld$`=sQ<=Zk|oL8)(%g$m*L9!^>mB@XlHY#n+88Y`m0!0VgS^_>O% zVG)v3O*u43Hv7Hs_qoWD-@FpF+ga63$hS|0KR=7XaW1w-e=X5`{rzg~R)*yc3+14DR zmO!iOtrf%ds&0lf8PKZU>8^LMhhzwD2aVojk#{eA?`-M~UCi3O3r-&-gBBnp}7yV<3>s%`w2C_9n|;td!sisx;9R%>CqzXmQzYNjz-UrQQ% zIXr`zs$cb5j9+ih=kSI0kwvMh;Y6G<9C*)c%+{k{h#nrqD{<&%ts=XQkN&was$A%%T{8SBnV7T1H+@?}Lq|C`Th$(hxTyNJTc z+j`N*n$cXMIUIeveD|$>Gc;G@#jM1Y6?gioV{DQ7<`)3Ivap(fMnd-cVS}ssb(l&j zVeIi>Zp^Wb7Vb~R2s`cuxC!9sg}_1(F*~C%nzNz)<-N8TwB#? zyEpVlCUlyH<&xlyscOQc=KL0k%}Tn2CAuxyfhqx77kxid$iyH+(nG)?&G@6p66w#1 zfoi=QDqq#}6%il}~t#mv6Q42*i70s!^+j8!^49b1fIw7y6^=n{Q}QxNYLhF|Nq~k)74|+!M|;x(TaqAW!&As( z0`J{;{>qTzv776d+s+1i+2cvQ`Ko6Bd`TMT1r|qwSnG$8ui=>oL{aw2Kt2289tl`C zmFx+lN?z?LPlT+hqja&QhKFKMb=21{F97!_JZ8TrHrRyTu5``d)9FW?6FM?T z^|=vyDDcg^_On^C*nw;b*~EQ!#Z#TcT{flK_B!ZuW)oVx(l_b&9Dfmg-LHfH-P+V- zhDx8?DSe%JC8}F`JK<5O|2kvHcZ?c~Gsp$(5OO0C!FqvJkAt(awhY=X?(3x4*;LJ> z+S{LwzJW{R5y91s->U zq_g=fAfAAC>syuS{wOi8!!0;r6lX3TjVWJcnUd5p8=P@9z0#e%ey&SAE6^~b;_C(is==D_=4J&MHR|l>aTX@@uRTRFwpE`X(p!;-%vpGHy?0UMW zcsopVuStERo}q02c>z>?dQ81{)X2k2ZBX~dtT*9N^>~nbQx*I8T4u@IP2XjytWnrG z_9w|QnHlv!l+9?`plsyuTeBGN2*=Q88(Vbo*lI)Z)Idq1#oa)U;ZKfGsr0Di)>U`#@p!;U2E~TA0tT@q zxSqvAd`i}>pPN>^E2c(#GvxFPzneWvjX$4vuG?84YHWO)nl@#!bYj2oe>S=EiyL?> zikA+yGl;6SNYCi7+h%d-zu^S@gdcKqsPop_Td~8zP2E)lY^84u3;tY*K!CNn9(K`8!Y4ma+7*Xm@~HamYXPjjN_9ti5zTX%tS{uM zkhM$4X`S~JHCwH@{>ndy-(e(N*hr$8TJW?4Y8HF&C-n(`);fHi%mb<2;!fF zbEQi4X?O6y8-Ld-Q-Az%BZ+bR?lJp7I62GDEHr#^9#;UUw!s#@kiE5xN+t48FaH9F zl2V@B5Ei_p;WlfBV2H(2r1lHSylhX&QBRxRsntg=T74A@gzZ7SZFiqeDr@5I^pKJu zub0{b^{|6AiwD4VTp6D+rhw&T_loS~Cn`d{&!(=_36k4ha6ibf&b#}GD*O@sRU4bb zySfcWBsbVE2mHQFM3ecX=(-6m1nvZtVYHpR0KStTtg!MkD9O*w;w-dNS*1;hHo?bA z4V@|ZvfmVV=+Rf^4=6(y@$2~~+a)KgftY}GLwJt+{5AyPS<_ly5AbGNhh?4d_ee}p z$c)K%xfOSrKHuRJN48=39r>%*j%40wP@mu!=~h{cDEmyutej zA4iy7*5A(8*zG5|vHkpBeswJMOy;oPB8Jd|$j_fJFyua9t{3+~4)jo3rPeGPm|oyO z4{DJNh<8BY-glkmX?m!`hpi|htF%FBh``LEp0!r4m1VxsfP?CGCTRM5+ zr1c~<*N(-xf!m5RwAy(jKB0YZV}u=qG3o5DStyNOQ6m8)SaL>w)3!)ZdP$0btI6M0 z?Hj}gu1vLULHkxcE2OizRz->h%4QL$A~<<*r$|<^cL-b9jfzhf22?sj=U~n!hSm|-|I1(kZHeP&- z73F)5*N)ahDB`e<{wH#W{gghn#Siwi;To;YhHm>+3qmUb)C&&%kNlp-%wgF6Gw#>B z=BF0a_7V3`WapW=?SdpffiD1rCSe_Fx*w)c2`tf@>~3{fYaO&vKraV02}TtP?yqeJ z{)4KF(e~9^5%6b5MC^r#Bhi*|gx_L!JdAK6QyJSvW>4~&orOaut`}>2!^oRXFzp3e zc4}6C>@iPFRV1y%RwONOD@V2yz5niNo&iYUn`{siSHm704pqli8&sFQxbf=&!Qk03 z{$y(7L+Qt9>g$40;-v7j<#+wrLJh21up5~06!HF+hbVU*&5l`HdC^y_n=)FEFsxRz z-4v(UE;6sgX6ZKbc!wRjBtU zUHa#W`~KN=Q^;++wN6}BWo^hqd7JNz>aD>tY6`mkNxl6S!c_L7E!vaIo~)9lwcKmy z8g(E8L7m!o%_L@@(PeEMUNi^#4eX6dSj7BpIP^?*HA80NQz-~Zk`7gKXaGk)CD@u(c)OY@TUBb5g0Sx}{ z2}hw~m`ly_?;4~8^sCe=L`@}MXY?<6)G&w|U&_tL`>K12DQ(7axpZ&Vo9@>e7^>D< z?&SDVnbz&MU%FV>)m(ZNj}=cV&os45J*o)TkSsrMuLtA2nxKkcaT48S;Bov04p2;N zBS#^#7Q$c-TFV-!+8s{o4|@0hP;3ELj*wz@2dS<&kbv7cW;Bb5EZ?ngb2zQYTENT*J^8CDpJ6SZ;hn)h3DuyH4- z&teapO|4(H76myDVt{Cd1o4QZ)rs&} zkj`U!){2Y7H7~n&drrzB%Tow5R&dBFp@ej}YE21EF>1z+m{BP13m};oZlZK&Zwh3M zG5@2!O0VdWR`(R`$k*y~C#EOYW<=v64VE{;8v%6V5yM!mpuGAlJ_+dsDze*_icf-Q z-7-65p*^~qK~D&dO5|I2VU?&yv!R+|Tlf`rc2gNgLcQd3nb~A$gs$-^+3JhZYCrEd zKXhg%o@#Z*?3Q;xF%~5N(Q+G0%;SN1hQh~KA z+c0snVeU5f!e7BBM^4H#{o#-ASNIrh`Zc%-8yj_7UZsFbS}7uX>n(pRGBV}0xzGzB zKKliLW@^wa!H2q=Hy->v)^W%1jt{ecxKe;MRf5VA(z59?>04CdyDxs+77w&{Un${X5yUysMXyDtfBEpD>p3DxWSYcz8 zb)mi+pBUdv#vPBweZVUt8XQqnJd^J{8yM)1mdUl}iVsNL4|^JP@frK+uohl3&5LOt z;iy_$CBVKwdE}I5QU4sf{{pyTV7=2fM3UuD$@^M`S?GrIK?bm^pNH;w@@8;+r}) z6MJdgoxzNiszc|7i39MVlxr3%jxE{0oqlRbhcj|&Ve{_)p?8HSJE?a>8D_1^ex0rBc=}?<~t1% zYW^*&x|+_@W~7(JWHe!P^Q|V%`J+M{3=-)>~kVcFw1aMKt2dQYKUJER<&QK|-2EJxXOv z)tXYWS58cFS?o@&3;KQdU8bCw6>v`xOCuYsDB&(H@60rRiq<1`QrzN*{Zw6l0W<_} zX*#SsEf!Akp>KQB@qa8q#@5y9A%Ty^;O{e6Nyp}m2;ZBIZ+~4D)uQ@rN@nhI10JhI zpTxurk+x;Vh_9CP>q}tJvYLMCZ-d`J`cf|wwY|tZ!DqlO`pi()cTjjL=+OgTeezc8 z9ky&t?Ep?=3@6ZtX-%qN^N}WByb6Z$b#mTYyZiV*0@=l{awh9_71z^BpxH ze@gYRh%?)H{L9Q@?~f-O!>v&?6)7CDN~rP05_uMmB2(+ScML*rkW(YN=_q3qFZ=f; z-BWuKo6)rPN$h*MXhXuVbsBq6GT@(UcyzBLzfVwF0ZqHf*catKM0Cw<1|E4#YLl-T z!={iZ-$cIv{OOvxLUpDMP$Ntd9JsL^xCy?nJ2kZEdKjX9`5HNGBlJq*Ql*E27F$Th z&&(x2m1mJ}_}0TS>N5uJ!nbxboDdT6>{?geOPU@RP&iSwkv_%b{?2*u?T4&gAA$u0 zBN8~%Fw+S5BdKKbP&7B4TwT*WzwriYX0hQ!UN1U}^28;dI3~oN)QBIZTS((mONbN= z-MUO8v`>u=!cUx<)eyJyxlDONP;va{b2o$Vyy+qOA-<1k#V5KDAbdcpsS(XQ&8F}I z?JRKOa@ znr?!KmX70j2rr558$`E7j}%)UD6KI!y(|RB%prMCV(~fGq1GIy60urzGW!f-YT*eM z?PP)$9=eGZnZC?4I@OMO0Z*o5jpFea@c}ZPGn+cG^`Tom9#;Fa8JoAJg7D$jDe6_B z^z4_A!7CYs)i?n^d5cEaBEaC6fk=em?ct+fozJ@AQM%vfUH5fzp`a$st%>34OTfqo zkv#ieq!IZlZeowATT4@CCpP32^XGlT3!txI#g@MP^PWrEPQ#VNbLL`q%LjtTFCk3u zJ7M=YW_KnVl4i5op9y-l^yN>jkEwGvx(FrFOIY2%1e8r&+FS1*6PE6!HlqKm8goy8 zbQB3vrMEJ?K?Sp~voDi@Dm=Nqs7yix!5e&2ogDG~)yjg)P?Q8lb|8L}JMr7VQ*35o zP{&RDnLx+ghl|v~VKhY)r2!wosD0ynLA-Z8sj&HDc^|N+z}yop33>D+JN*}Lt6E5o zq)P{!13uhl;0B+!_}mS((^T@WtKw6riqn2I2#b*m&N*_LXteem1A z9uT({q6l^&m)>73pq}3AQz|qa!pXEnk}!^Hr(Ul%$3u%i#tJ2$&-M!}*bE(B!_}<~ zqb66MA|J@QT)R#X%GSTqeTPDO$C(%)y_uQ4776ejm5O+(6t=rl3cgyTm zYkkP@;=hPpPvvk~Ev-w@^RwZ1vYZ~Q=@xkBt^ClXBVm|jvID&NDH#%$)1f)=A?jx$^kdkid^lOfr^1R?k`u&o+oAXj zGt=|JL($$G0_>$jSt){H=-9@ea9g~(B%EY1OHCgo63r_ujkphKClC-KQeqb)yWN9+hH#%f$5JZoonfj_Ugps1Hkzv@*k&LEmr}3K|kBE z;)6HasAOIMZv!RajX&gY3ZkeJPIrW%Inyq3HVM|w#ETDPhR8aq97W90owFs}5b{~w^EzQOQ^_~ZB z#gt|TO0SoUJf<|+_@t;Vy=vn=lSaO6$Bm%q8Q7~t_xqz_Q#kO;1lgl)AHJs>%bWDZSN0z}(ra!Dl+SreB+2=)?9f8l zQS#uE(^soA#85TVMS91SYfQN*cDUG%g>`5Yd*oj$T*WGX6ivQWY0bQ?XLGb?5c`yU z6$yk6=-vAohQW-@TI|Ms6NW({U16cUDQVH_%KvWRRmkk7IHuk0k`P;P%$`w6C5d_T zeD6?CVt~W;s-ekH3^P)c@s$ld*>x3u;sQ+xZhtNZrCm16-ov%@0)v9@Tv(?u@LWu+ z^94|Bv-$3;P*gU3i~*5=H2PELl|Nc#cmnEE4gqCBz~0o3X{6u2k69(1=^^3`Iv#QG zrnihylj+gdUgeq1;Le^7^M~HVW8(6KS^DS1Yc28xVy7vlUg@kM5amK~yH2agDmq2s zQ4CF~>U_2o+%YA)6Ls+5HzjR)jCBRS&+d;X2?9)m_}kI7eN_gTw`7J}m0k-t9p-^5 zv-Dg#gT(Z)4d@2Z8@@CN%p-5rD3}JB#vdpYPjf7Gm59hyH6pt?kKqD&3BoEjOh-o& z7rw_y6&^=>qa-t|tw-rTT(@ZdKLEHuN58I@FeM&EMO=6;k|n`DQKQA#7*n%X=+t*C zBk$S|l1h->pAfWH@;xu?*zQpKFu|S_3k5Jh46``+*a(M337dn`{*=3elV(T_1 z>Wansd}<4VaIy=UFKXI2C&?m9fpv+i+G?$`qr82K)~Hh6=t!HPPKT*@)cqu++5Z5D zn2Th&8zlIwXiB&?)SLA9__Ja0n-7f&DKd&S<6<@+4IMJ^M$z@^rsRogQX>BVRgIhI zmqT0$^F&|jqHdWkUViTEZrBsTI~uQ8A>&FaQsld5jXR5rB9jzNO-N~e=6}1SLs~QG zmTn(Cn!51O{Uh@t_}G84n%dD19Z!_cF~?6!V$SAU8});&LVaTSB`Y-l0Ach`_hamr zXIOpvBTt4%aiQTey)t-!hLJ^PJ!ei;B*o(H`Jn@Hx5=sQ67o(JVccD6g6UkKWL?SXoBYQh(~t@ly=1k)mDbF zA(}C{3xiTO$wNeuBzTa!Wb_uEqia82sInZvGF&rLfjcxOu#ERJSc0)@CbpyZNR)Q! zl1+UUS=mD1lSoAxZ|IoDu&iutjbSW(ji1-1i>8Qmczlx6p~RF;wo6^<@Q?R35xQ@i z9=nfZWxZI%7dJ+hpT!zHuiuKZ>(ygJ{{XC%ZbqUOnojK9z?rGhsi?HtQu`wtck1AVrOZzt?aV`YN{;mZxc~P^);w=+I)uI|sN13Ui7gFr-X5NE*{{a0K zjC9}1^$2QO;ReV=E8r%QHZ=^Ed@#EpZ{Qa&nFnf|vnq(jHp?#HF}Z6htF zjIKnZ#f;wCqvlE~G(9L>oOrY2hr_kLNW*M)nw}o_c1Oc&?3^Vvw2zGx?UAHzvx3Vl z7MWFtDi*Sowv=rjqhrThlKtdcLe)&~5j84g$ELIk5^4+pXal{t}q_(aw(FJP8 zu?{4OCC)bE=?kOp8gG+nC0I`JWsLeI!Km@3C&1NXzem9z2!Gh zN6Na(!z|n>BF3!xJe@}^OCu{7)r*LYZb!lWpBbme19)6x?<@8ZCEg*#u{Kc6u>m?eFE%%calr^~DzR9PLn5e>JPCaaX6|TjpG!Iuv$T0ybv8$d5_n|1sA)a2 zBjrM0Vv=hQf=iJi?kJaIEYs#C(uN6$F)$a#}a%PiC8CZ}Yv zr29K1ghlXbbaXSbqBvtNv9$P!L98{H!o>&ANgOn9Scm#6rtR;JTe z^p-MR7Ir+oj?Xt&V%j#-A>=-u5knpqB;N(&Nz{!_vmVF%lI0bA32o!ozg8qkWqK^U zRTYZE$BE>BudBU}$&RYDZybj!;|P+)mN&uWez}r>qDD0lb%r_-Lv}ZazDeSUkC>gr zirR*DHI(rEU#;Wo)`}4QG?mDl%`YXuhmfbq@>$ra5@U8YYU?c{Tgr2dQ7N&_np3HM zp>u{bHR;xSNM&L_w1~&}C`?O(p^xy_qRYZ`N?40%kCN9EN6TMmTCtF%hbtvCk0bv8 zk=e9yvQVNBw?tmg(!_m@67MUrhlqaENpnNQAL+!f#n<4D5hd+@%P9N9D#okQ@R@c= zZbOY?TpBvDgXEsPBrSCYY3r>=LzkjHZ|M1m>RF}C4Nk^+UT49_XZY_benWOHNgr5< z{aUq!gfuaK!P^leOVP3~7i8Hd_DWlZJb3W?#Zk#d+;(Zg_%wL5YQMA1{{SKX0Ou4o z-zWI!e11Cq$Py9IhW#1!i#iwchINW`Xac-gg5Fan|7p#5<=mR-FkE<#w3OKSM!8CEFrrl zJSB?5WVj<5=kU?d2-`HF_IVo1$A+r5{xWtwy zMHE%$^V!#{=!`9uLoSI(Y=k%SlutF9%I^%SG}5!;hwx8MF#WlUCEggi%J=UHj}|Tp z`@`U&4-=NuN2||y?C7#gawNz@aT!r1`4;{R?)w2{eA{VhD6mRgz;EI{C(s47a5NS-{OeT(HCTftlC06VtjHr z{uP?bLLksfmXq0Oki?J&@#FrRfk#&cNa*1|JC~GqHS+V+ch5TWD zHI|C@`}XhI^2mt{O3G^!Sw)W@UaRo*FUuUiW=n=&r+o!qX?>e8xJ0lA8ez4%(WTiuFlcBprU(qF={a*)bHJbP6)0HDp+`k-i zMPj`t*pUeRm*~ALlcEi{nzP%%rne*GNSYw1WA|i#>W&!wDC-ZiOsXsI*8M;K!~jbW z009F51O^2N2L=TM0R;d60RRFK0|XKwF%Tj_QDJctAToiGFhWvdp|Qd61r#GQa?#;5 zLsNp1q9j0LvhfvjgOkEURFu-<|Jncu0RaF8KLSq@c4UZqXO2nLDZZ{2Vs!iRIqO*6jg+=?rN*!LA>u)o@N5TCZrA9URH+sjtZ4c;5i1)Epvo- zsrM{HqlTE=UO%{@)wCA&u%07GM~tXn+P5a~(+35`L?TYy)~|198&y{s22-SY$4f{z zNI9!DN}}yT!7=`7lee%G-K$y5Y1xPBzjbrcRU6G&_%IIzQLPQ_P9uWJo(n2t`E=KA z>aP6$DZIM1+Uy0~)3suDDtuNOG?XAuS0$ir>F`?nj4(1asG&BRTIbHM~_WuBJPitaeJ0A~%Z01Dh9FSI_>x2EF zH>z6fTe(+e%r5eT-4mmaTNMowwY(PKwXrJc#_rwv92F>Wq-mSs!C)jV&-t3{^lLbL zbaM&Ea_&~P?yWu`DBn-wsh)ZpqPX=~f8E!z+FCHhuJ6m-RWs_S9!DH>Nh=JN(3tJH z9S&6k#8iDqYmd21;mvmCyMN5vTg9&SewrD{ROFl9t!>^I?|AqsLw(`yOy{5?=ySF} z=D!s$as5#ode6E$F1%AWwB6AYY#*N2%$E~UhxhN*--0T)QB%&N~00SGw1zFf}4yfN|KMy8JQtD(53iDfZaq`wm zpX$>-GSuYu@KkLMsP{FscD%p`4~qIup>Z^6-5_vQS8l2Yh=fk;RJUUXjL*RqmK9>G z>_869Qg;0hkvK1->+}@5d#CL#3)!8$YSzftvsI-`{u7`3)Erb@E?kcC z)D|ruX~V^0;&~v;k~YassOI3&JCrqzlakgH&+-L@Ajcd}M%`c0G=L2{br?Wvh35^Y zxmoUGS?o9-fAXl|1&njg4WAz;jw@$^z(nn>M!%59Gd&{3qUe z-$;EKQS$p;ce0dvL74bJRb}O^qUN-)aT1JdPC2#NuGfmF=pC%nan_7Vs?bOcJ(<|1 z<7bd4fq-fBes^fi$kTUZ;G_w5^P*e<7eEVDp{mboZd6(WhXPaWne>{YTH?A)|LBM zKlqvXFTY{uOfJ;}{{W3+^>=fp`mAVK5Ar+z0NG<@vmWPuYo&kDL!ybl4goURQjnrt z=L?|DMl|AXufALQwz?&ZXcUdm*_C8_rd>(1;F#%#&S?F!4|=BKQ_T{q4^XS#lVwt* zaJmjX>fmKYhc;U04%Y=mkHxHWfCuoEU4tgoc=qUbCG>ycKJ(VC^rN3rg=%dfqKOUZ z9(SsCre$bg>4D*q_o>))WU)b`Gm?GXYs85P=|tVY=2r2%DH=O5&1XEczRyaNt6ycp z8YeW$Hj09y#aE0rLAxK@?b6p;Dh6IK2K8(DLgz_keP=(UVVDHrJG6g=v%aYGvTupO zUbR~2S%;!E-T8Y_>1*065s124(0%Ao`n_>TJil7@a6cqSveebxP>Jzf8=GmO?^WaC zuTizu_8)?ZUr07iO{-27^GE9x{X0IoWqW%|tp{C}bLNfiJ%k0h|>Pwws*K0#uCCn%d55PHk=yiKyo|`o>dFq}6Bq04r-)2&&0! zgvwyVyRzi#NY=RbV0;%$^De0OIG+6uA+ zF4J>Ci0=3*{{V`8s)^_C(Edy4{{X^$=d3IL0QU78R(CWVZ|%H;{{V*Xejk!BvcstE z2=zT)qnFXYM|w_af8eJC{{VHt{Mv0aDPvTLXx>4eg2weao1qt-VYuy0rZt@601d>H z+P3D4MWfI?hJI)@fvjlAG(gZ;_J^?M3i`zYO_k<92L*wJ^~+KJ01CqwKZsCkKx;+- z4VpSzMMl!6F?q@2ol14?;3~5lrCRK-7i%)EJfjaJ$8I32Ydt10-tq9z?E`@!T3foT z_<*egdju*~4{ni;?~tB-CV~o~IAUkT2ENl#)f~(1ibC)ElcdH9ot^Et>IUo{IQ)9w zNVcsOwX`jDEQPZ-fWm#M(_yG@S|~T8ljjK3cYnTAgm>w~HCeSbw@#`ocFwJyoJ`ac z%QNm)yJl=3;i+yfAIEmbiT2=nA=9w)bAR$twt9>Fr+7&}ao2uS)msC5j!C>#vc9&^(y@=~8 zdFgM9RixS?BJ8GH=}X^8U8u&4Ur%p%%y*5c{TqYXGS>`?c6&O3*^p&l86C?5pwqkd zew?DLH~#=DLyD(Dkh@NsLs~d#p-fqwUdZW(SDyB;%(NY+6;0HQ`|P{z z{{WRi-m=Ng#s&)2K#Q&py@ptYW+Hn|Mnu4Z5e3&>xi+22AVwQh^ks*5iAJSuP}#ie z!}CD>WS>-1GKjFzZ3-mnm=1cSX1CJmx<}lW(}xZ^bsKh-QF;dbsP#83S1d}&YK;TY zIs$dI`(~XV!{;9IJQ_FkK9F+{Y&xGZ6pT<*tFz5HZwZg2@IldRHdgjq zw5b-FtZv+u-?V$DwqBymU!;#U>!Wt9O~*lV+#1oDE2nAuF@r~{tYz56W8j(w*jH_U zbP#dqgR$9+b3m{F(Ci_%aGtc7C_ngBn(t^%FdSoQkl@{fY(_(GDxkX(VDVJDLG;cW zlO#2{o89YFvF`j*seOI6mO8UAHg`r`Az8kwZLeO*t6GbhPgfi@vB4T|?MAmXbW^l3 z@522lZnwo$scia2wNOr|I^Ec#M#$^8Mzil~j^tZ;*GZEn7js=42N}Xg#WLM$A8Va9 zot%1(x+bMPcB#{vftJ;|aZsZ4DaJV=cNGegDpcs3QP)exZ5v9bPR(hgDYOQ$lMprx zbh+-xDz15TRyo(&0o9$J^;(gcrsCL9pgN1o9l)R-##G~yH|fL9;;D+~>}l)W*r7d> z+8ORdR0r{FC_Bsw&1s-+I~J0FmXpZ`*Qj0U>`Zl9Z+LUV40*gtbw-^)>#}#~1EFLq zWjrx$-~y*m3B1`yXEmCl-}*(C&>lc9eLZ(Kp7mp-+7xVb>)i&On;6!Q6v`HMI!GcO z>~P)}NZfBm8&~N=pmC>*?tbUbe^tdFGMlV|-DVg$_Gd}{ovWj(e#ujW(?62NRnXiEVOd=K3q{`z z7c8`0Q+u`rPJwkm;4-BoD-BlIU(wm#AJSYPo&M$a7Fw_AD@b)_6Lq_#V#~ZICH8`sqA7GuZ>0G?&((dUuCM+mZ|b^1PW4Ytp)Nk&p>v!X(TOKw zb)V?cS`G%#bN*k=8BKi>dO?&XzO_Dy`&&8zD=io-0>tRW3QfV)HD_?zR<5qIB0N4R z&#h(@YrFUKbzM966z8^)wpoT%toY%@xrL5tj?U@Hbe3wGuWnlk4WBs<;__8PZG#`1JJ^W4LAt<7Gj;^&;oJ5)~9YOFAE7a7dq z?vyH3acvjVbvMACBiyxJQ~DM2e(&K;rD!!pLfg~%5n$Z_3yXV`W(5zk^e7jUB zF0K75I_C-O^Zbx_>Bu5`KdQmDgWNwf`p>6alY?*=H^;qw)uX_EYwm3x1M^>TU)lMu z+3Wj1HTyMhXXd|Ut?Xa1)&8KrW2irvAm6G#o%C$8M8>mrBO9!I_5`TIZuavTav(b7OugzpHhg#Si^t7Bu)f3x(_0}`>>im_CFPSx@G z_NrrWyWpxfYQc0h4jG8$`W35J#3wU2U6opy)ac{BQ}1TVrH8^tv14=}YNxGq4dFuy zjrswN1q-I_M(Z)#iY@}_1{}{sqXJP_tGO&N*`QNy4}Jjd-cV=|1^^?+1%G8V#YXU} zGtqeqf~QHHs?Pxc%8mpDa;UoO)@wDM3p7IkdEgWl4Qw+~14$liseL!Mi3~(sV@4v*)56KRjPC8o$pjIydd5Qth-Tz za_L&)Cozh%eIVMG?Gtl3DV-U+9j-~FW5qZ|GQaLn`2M;Iao()Ex?7$gr!e-I^4wM3 zgp;DqeJnnFPKW5LQ#ca!9sOiord!H_$biUZJBb-I~-MGyy$<@l?=qTnD?CwGIf};SS!x^CUL~3 zx;j^kW#5vJ)ORh#U4TSH6*L_O(RM{c!D)%aB1Qy+BY8vstIb28$aT7@h0uEqsJ>~$NoxU{T5TY{=)UpS_dG>{{a zD#HG3_I`=Oi9?Dis0S9fI4Yyes@Ax3g-zT?w-3ujnx~;vr{SRTMaLkodAUa9M^aNz zTzZ`s?%$0*8{6^!0FJ0*aC`6vcN7@R0K=Am?Yj_Ap*ZNFWvKSjeLqWXKdQZWUFL}y zHwAHxlD^OfRGjxH-iC~HaZrUyc)pg+;Yr$$)*W$`GI3R|J_UC*nx{R#1!vYJ){pT9 zc3uPF3f}#_5gs^vQ^^bJ_kgGzbxw$NHlAT?S*gzf2>o4xpDhrYcG9Xn{{X6Tlm_fo zpl@O<^Th^`c@)}%2LV0cp}7!pDx00#$=t>THE5k%+2x!Gb-*2s&^m(hZ z$c=}3A=p%I4g*dY@=x?5@s?m8rYid%Xv2B6K{bw|F5?_2_(4W3u_4aH#FVG<20d>Z1e4;(;UQiu7Bt zsvWgPgTFx1S+sS!M$C*1Z3{W?(RXXGPy*h1fFmMyLUkz)X~nJxw?ICNp;Kw|j3I|m z=^7;+jczISO4_ac+xD>UR(ci9&VsE<&T%+R(8y3E&jn(m#n1O9pr{&+zR+<_y4rW+ z329vgI#xkh`hu%(h&$pJ(iST1qiQyK#jUGZ&IIEd0o|mH;ZZw;Xy%$#iQ8$t)QS%D zNGhd0owoP>s!D5I?MC3xr!|s;+8QqorQ)3OVpJRtQzeqQ8m{c{;I<;{#zUwy1*|7% zI}mt1oW10GRpE~HD(TJt0BEWDE!JE1t}DGxfzL-3f(oN5xVNR%!!*|lwZEu-N~7%b z1w#DIU1RM-a7|{)bb$D#jtD9oCEmrFeWIYe)@u+q1@xe4)u=i_-a-EW<)x~#KZjWS z`%rI=fz5QDYpO}-Dawn+C8pu!^9m+9k`(RgLKMM3dM?|P?>;IUkdxMoj>EY~)p6D2 zPyj#}b%{=Cb`Eac;9#asc<~Ad)HtafhalnEBLcceH$!t=LeEBObaCRi=mAu?@zJo{ z3pFyg6>B;DrOyly=c4^*To)i=#eMMbC^XasyKq%%eQC8Np^VkUG;BNecrQVAi;8L7 zt)OkX?`PPXQl@-;icfa7%de8O~)*ayXDhR(1Ps#;$h za_jy`IwmCLijo13a;V3-og5pd7@v@xNyn3rvef1LjZ4JL(lQD1uSaD4q9b#v4zI^B2_@)gSz#VO? zvfl;S9t*JF1==prnN0rxR)@R(bY@hOgoInYsmy(?&XXu^JK?PkWS*XWkWSTNe zJI7p*glJ~ALMLK$0OsAmr;&u^KR+_DYeYdDFj-v(XI9C{{^8dk8>bZ|x7#>xMb5nu z$q^?L+MT$2Q&|G=%~3eu@Nnju;BY$tSw{|_>IT-N;^DQsRmv3l5OaRi=DJSMR%gXF zl{#)T^CS$_>P&okH&ChdchabH1*lamjw^ z&I{IQ%pJTFvd%X97A&>&fJ{o$I^@?ZXHW0{{UEfk6V0eCcrIj z*eWx~hkO>S9*-UW06C)_ort~NhGJFo;Hy*O9H)O$R|NoQkiH1ic0oPyOoDI+U|Q5z zc{zQ+{-yU#AIzHSk#)H>sM4tCv|<-@5&?yS#$TRbu`?^v1d!{;SEtA;N6MFudDgy)b!qcVjyb{p+FDT9?kcgWLjb5ymxDc zkr{;2aCpJPj-DNEg3LAD+H~X>W8A*cgmX=(FrOz;^vpPjUwW}{JE` z%k|Rj4jZx1G>&~)7#-n8R+fy1o%8bpMbb^~YZ)%X453|_4cqhchKY9!;VBf?%wj?Ou1acHBGFk*#rc;Pa1mk>HM( z4I`~1Fr8JnR&FnD{y#sEQ?*=}e)L0fi4rm?s+A6mHtb@x!E1pL-cuf4 zfsfcY&z)<6S#!Rf(dDuDTVOCd5r`4r8c~o9%^Mq#I)^BsNn?c3Dvc) zZeK8s-p{=Tw`w#j?zu`K#Ch6t(Ae{TG}mr2fzh6qRP(ZLG+aq>ILf~4AS#t8~2Cr9q{Wth`GI=a)mRa z6`ErQVVNfbvjtL=!U69FmW-B5F0N}epHc1H?KZzw=>E`;S-kq4-a`8icJHuwqvQylLRFjSg$FILd-?2gqcy zTQu{~Dn;s!!kd07jR5HeZ#&X-Xp@jd=Q3oe+1GBK{{SUHXwH_c3 z;js#?b^5Ky?ndn~hS#c~K#)d(*KqIB?9bP&bJK+j{)TuUn)t-!sFL23V>w|DzyW9%A;<+de7P0E;~Vb(~K0_dhbZ=wR_$%MT$sBY5(KGyqPkiRBoo zVvO`o7lAE{{C)mY9UGPlC5#2DiQZNiy?ayI?$a0Rqhf6#jokU@odCdh0*xxveyLs| zwL^{B;)^k9_7xQx4<$&9@o&$9Z3=jS+vlZ}+nFi|#BbAzp0sFcK1{1s8bmgy)y>x& zrt^Lhg^|&E%}JEa+=rbX-Q>cFbWmQFF)+I|90M@+3IGYfF@-o+x=T zt(MAmQ*5YRPM1auK-MJt0{TLy`p$2L9}gmWo4Vw0Ox|RvdxLqD8BP7X$U7D-!>t+# z88g~!N^1$Sx3PVEQ5QT!oNF8i_XM`>Rkt{P*_U;o4aDG&hw0s#X8 z2LS;A0RaI3000315g{=_QDJcqfsvuH!SK=H@gOij|Jncu0RaF3KOvm#QANAW7F(jP zQe*G0h(r1V0JjqNM*8R%aC0lsJrPftc?er-$9a)ISH%ASvqengF#-e_`k6V!hHI;( zycw5T29Zg-F^ZXnLObq2#^%uRi(PMY%P)E{Q(fi~!-UFG%5xfK?__hh^fSku>h2~r;0%M|AMAT;t7*>hY-_9Ef?(d0eiZzbt zsg3K}IF*bpQJ688WQT6fu($?MqU-+v)u2gaRw=1bQmQh%s|_7?okjKx{{XabGQrkH z*~dXwqTrEe?$TmqQJelWKBKqN2oNCvvjLT4()-jmE08v`J)O{k- z@W8-h7E4$T1sVSUlhQA=U#ea3#C0^aZ2T|oU1R*UKc*|`6*LeaN{4mE zd321{osJ-enyMeTZ&YtB8Y8sdNP%}1O>Q{SEs=DWV8wd~4NqiNw~}7$l_hOo@@Fex zaBUG|3^eHh#wI!%{_7IQ+?1`nZZROGJb(H-JG(FS93z&iNQ5_G_myOhVL{n{*`3jP zC+>L=d`v`ldU#Iu_oL{W9bcKE5Ii-GVpbMz_eKIcM_+PS(Pd>KRh)PP8M!KAM@Z$J zCS~o&0~qk`P%eqfGR)fx5)6DpoHrbwVfB>=001)cn}jO%fyt(tanJt%r;OPA>i9eQ z=!8E108GnEpW-VlQTjk@vqW!ZAc;)2(01{Zu-OC(b5D!i&W;$kVM>A5qAb>a$uJ%-1Wb>pcI5~juc$a%- zoH>{aeEmxd&OHbBGYJ4R1OEV(*Z%-|sEAdyQa|5iaQQ5Cf7pUFs6JBk6@v94L9_c3 z7~$Huq$R@)a#YtY9++=U7t97HSQ$Y?p}n~Fj^M`bH<@bd4Tg?+hyDeovYc5{7MtzU zk@$hkIe^+RTHAsKz(Hc?l&Y(rGl4*(4c{{Z225mCW)DysW{5xRf&p|o?$J||0IFWq{t?j@YeInXMDR&<}H zkry-mn3ZEhU8O7DXNXmmu9`4Gs}^2tL-d%2kqr*0`4HcFaxuZ4l4dV5qGJ28Q?+wL& zW&Z%o#IufOdZTVtS9j9Niqwyr{{XR}$zbl4&anqQKkOjE6`3|Kh4<;fmKe8mghrDF zj03l^=b1BQGLCExg zS~bBSa77@|%+2r$H)F$p`K_sl?F+Z&5X}n|0j@J&mUu~W5^t?W8phJu7joFyG2LVf z)xW6Z<|v7U^~iJU^AaRq(e(6}E?i9zV+BolliC?R@QBE2UX|lNNn=#gwWz znumQ4?r*U*Zs+~R{mb+vAD|KK5E7uVu-mJ?@OJH{Opj;90`Yp1!c!C?X5OAqQeStA z7H3p|WH)Q&8~~;lnp{y6Lbej6K?{lF;WehSIboyHRsR6kCp^@B9`GCZXcg6StiY4< z!j@^HOYiV|{{X~tA|Ln+dOg83Tdq?yJWEu#*sY`4=N{b_R7J*n#Wq6_Z?kC9%B8p`-Q$u^k?blc)&Ou77Jc5o6k!5!aYRQ zW1J<0hnMO>uICPY#hRs=L>qF6K;AdPDY=OJ^eAzzf{)ccbB>O07DyPrxU5t(L#J$&W7Q%ho6(7HQ2f7}49XWs@>DatXgWySbzBVBVhlS4(ZT6OSX zO7EiPGS}fBzW|%?UkG~nGwWyE>38=2hrwHOaWwh>MXQSXVn52if<%Le12r;NcTmNQ z`Ml-HF@fgC@&_p*W!>+`gffTzIDMZ1zpgMHqP@SP7`(Qbl_@u&W;_D5wFY=R4U~FV zyYUz4hn>f~98Jlq+&<<%kRMCQA$mhB3!v`UiRXu$tkJaC`Av)$WgL)-a;^L$^-Ov>-Slwqo zn#}p84IGTx_CRR{>ld?77qf|B0c~RYylP-);LilbvmxR+KqXEr#^#8}l3JObSTCUM zIY|x`-D%)cH!%r;RhQ1OL-Q_5jcZ~WYCsbz3R%^dN;jWd9r_foa_!|5`Mztzf-3gw z7}JFoRk|Nqyn3qn^lT33a#yiY0 z=p4CWoY5Vv0!7x^kMTM=9=G8HAhAPopW-|g=~-~kL=!-6%%oXyWAH^wn}TO+9$-IW zFA{=4(8sJyArXe%8SF)S{{S)dGis?^YBy?iGJC;yY76OA?NRQROf^|RY@zpET`
V=0=FlZI>ZxT*_AHY-$ZZ;A$roZFm2|@i&OC2~ z@zO7+)O_X&ZwqxrK}*El#g1FKDWwUy7}p(f0xYpD0xuVG>APK_QnPZLYcK|pJ6QB_ z-FOUSKr9%uH>kauXyz(mmhy$QsjD7uSWTd>c^(oNGY$cW?y<8b1HQMWp7OBfLw~GA zTn5Va#wsdN2P@4mZTp(gp&d1W5N#Di#lm0Me|7%=kkd5lS=UFT(?&q@nxoYiW0j3! zG=lr;QA2vD*?cdIfnYm&_9OW$&?OCZH$QMGc|lc94zkhMNMWgP*iO$}RC zJAEDf=8PQRTV##>=8FaqWs^{(aSl;>T07%r7O9USdIkuW0Iy00*XkqDMelT%(7!#e zzpjMm-H-aRn*y7hygBrRndxo&&TB(rXs3$?lZ{%`^DoY#p_!Q(U>a=)FzQj8fR<9~(fDGyT5i&|4xj5fvtl_0hxY&h5uq(jn+3PA_xWMf^N5kUs zz0!)s-lZ|r@g8UiWKlu7%ehdkwzp64n1mV+Is24>s^Mu!)CVp?q}RFl zmla%KayLcF(;qT}Az4mAM(gbt<19D@t)8;{xyBX)8oTKZNb68b#jnaBt4E&1xi193+iNz;QXX<+dR}L(iF2$6(54yA znpAMwn#$aK<10|M^!yiov)WoIJ+e8P8AXc&RKqH;=XraEp;)0ASxiK%A|+ENB4i$76Q% zflx}@HBfs;P!5Cl2CV=wqlNeNloU#Wb8Pw}Iu5o6r^txqT_a`oTBR*mt?c@jg3%i+ zF-NNCOJ5g8Z1mDOu%$~(om-}1ZnO=3O>vB0SZsT$dk8d@=4Wa5>oP4Hd-ktN^MpFp zkAo5NB=l5yssMf;bU8zq%qAX)`SWd2?CgRP}+B@mXLTeOXti4e#Zeo=< zlz%vrWh3b@NHx0WFws`2Gn9w>DvEydJu5oOT=m27u%V*{Ur>|T%WZkJd2mX1;Bs^s zae7NQdvZzFm3#hw+#6H837x$sKw;I2J)-h#wW;jEezD%mvwqO1)ddActf}ls8#?tb z?$i1bot}j1ZYp^;8o&q$b=DoLq*dtFtRCo#!7cv);XdQ+CUuKj zwq=JODKx$1uD_{d=v_9<)pJUmRylMH7wVk|Z4aU>wZk^5dT?(0KPi)cv0qU{(9zv% z`4T}<#0GH7D|MsZ9|28REb8O`07Mp-dg}(HUty@8q5(*|IfB-^)VlshRWDWEYdT4F z7OEpgB2gQ`Qo=8=SSI}uN21GwQQ3FTd^{t(Kqafz9aVPu5v3RmSJId5FhYjyU_dzD zUDbTS^d9vpl)!8nM!~PKzwVPR(7x+*e7;eEoe=|UQMtT+fq3?*rJT9iVe_Q&@7R^L z34*Vf$lmDYQWC{bTp`Dsm^*fk5WUlAh^x{#gYa}ZM@++E8pcnw1F_3t1(v(Ycb2fP zcb(&79SCfGV7R5#44fJrCR>gjRb{&89V1gUIXS74vRP$5aHUsd;|uvIEYjMt&*U*! zSUMTrVq|8cuHMkSQ+068yVt};eMEZ6h9x?sOdx!tq1vx93+`Z*?Xu+|q%=Aw^i0aD zom}VET=%oelj3PQ1$_HMMDvt=h|51jbsNB+a3!lpzzL9a1-DR*rYO$6V+QFBav(y* zf9t%m!I*c-3X5fMCPQ<~dX{kv#x&l}J)&iU-O7zZu@(rOF5**JhPg_yj+1)*iOc5u z5rap%MM4?aKB2!@`Z3GYK7cggbyX|%T; zuHMYiDeD*JXs%l=^iBYVkmD59#Ba+O4G$n2`44)P3@tbk+!}S>Uhn64%{J=$P0VLCJDh^H>@XNUdAkL) z`qEU_%fxGsyruza@w9Dy>g=5Y&YFJG2YZfZu(vYDmCAK*ER#7tPz{Ajs%EH16OR2W z=46bVc7T~JCW@=myr$5WK(Df+GsAw04=0-C2+%)qNHMJe8&h*a?}@}jKy{#H>(xHA zA2`;U$}5f~n%-V}pP+tF`-_LSlcorxV&4z;2{_zD&oGn-)kz%%6vvL~=iea8 z-#a z3i4S8QIwLsviUkDVz>sV6INaw?P8kQWMnCZCf> zz4=NF*PhX9wki0Nt?AQn== zSV@?XuihJwkJq#RVxp_gO3;`mifaoej`E?Kd|HhsMmGP%H?e;j&8jkt07oBSf0as?fGEL?qnT$q=drm>rw8DN4okNBqivF z|C#9HDz&?IDJB~!$Km_OT4>&=LWOndf?+?AYHVMi?EOkC z6CeGa=7+1!X0iJ^t48Tsd0Iuj?nM17yr$F?2&sBkMZZiOHh+^G5n2!OHoe)P#yt!? z754**(pB{ri9Q3h-{$5~Mf-WsF75PTMsNS`xrN;Gz}Qnp?!Bg8Ax(!1An?H>_( z-qEF)EaqzYnLa^Y>8Ym^UOew6N##q=i=Lp7A@Xs0h~M)vE~pez6V2b-I}R&CbUWWN%mbz?irAN2(rN#$fd2OST%lf8Zl?FX z?X#40sIZ)*#jPq4$LB5Nm`nO{&>$Qhw<_mpo);YNW+0emWqiO?${=Mw(PR2iwBa(` zv3Zo6IKW%Ga>a^@DE6$yPHE%)Qf~8v{7SeJ0{5@UiGDH+m2T9^5{rDk()rPOq|SPZZj7 zD$_bntc?3K3t~!6hidlOuORykmMI=;PxF_R^77#M#uW#x?dZ{L{nd1zow=M*e%Ece zwaROo{^Sc2dfbAPfBd&|d1sv8JL-zd#KufS4gJse^ohs;kvR4x0lrotst?xgh-vCH ze>e8|o^|Ahj|_XaJG{Btm!H;`6&$P-scg-4UYkSl(N!^|wdU#*ZH^07|q(-e(n znUQ5RJ3r%a<*PS(#+Llvq!&BSq5xd8FQ74Lh{p&grRfAab3qo}3Wh z4|~1qs#^xPIGTEitxHI}eoL&wUFG7KuXb;}Qu-l%yP*%mKDgeRbdt8m(fL;N{mY|u z`F2?Cb#BqRX%TyD1`fHALHN{Hx=*i)-q=q0j2HzzNQA0r2NL~vXdxi_qZzoy!~)Zr zd;QDKN$$_i)0ib`wzqwV>Q^pI{7DYaXT;bJg#Va)(-t*>M4PC(`Ybdf!W zy`^Pq+WV#O`;*<_izNrUs92fW-m} z$DV%xm{ydNd(fxOZ<8skR{B-!LURwJ5kn)OMgIDlTWmRgyjJgSjm>A;os%hoHkP0l zl5MRW^yuk#GP<%}{{Z0_5TV*gN-%@DZe4OrB9&#pv=!WR0+cixvm zuwLWLr5(q(`M(m8;mQMVK<+m8(+;V077o|APjghvyV;AABc2s@=<1I5&1mL)X%k|m z01kM{91P7D2MBxc^v$EWvErz*pG%yO{dkxfd7Oej-T>UF<-SB&bqP4d0_HA8&Z8=3 z>9Or-gL{`|4WU#%A&Tpt-**Ij6`kLlvd0xDl?c(n6&e6|K+h1UsQ14g?_2nd>Fnu4 zRn^d!AQ_(^YmU{PyGcaCnBe?MA~jW$_-lANowk%&xOZ^JC(9q zZf0$!pT1lC1DKCe6O2A5zTLr5eo3{r`64#AehoIwGZ-w%Kq0=)6Uq`J@$UT(SY6a! z`0i@~f!eT*oIl-;3p(oe1ELzv-dB zV}>rgLX9ylSP~y?TR$!OF7#T&rq^qlDOFEtQ0=~F6Z}>)ajDEJnyu zZOu5~`aXH_g!cUS39qb9LKlsDr6!%A*BGyn8a{mwcUpl%&0X`f43XhHLmRU`OZO`W z?`ox76;0aL72o~=EP?$)W(;FV@rnNJ%Q7>Xnj3HDeBx6%Ni*jPl4a@>L}-_~Hj9|{zI5AvmS?g)y_*)3~X%wLvpw*$eGb{OsiR9ubBB}Z(tdP&> zn4LRTano)^JQuohZ~k_!G{!N&&$yPk`d$1-%caPMXEq3R{yVjRw=&NyLpIGuQ$AY? zCRx8H)-_i9uS>`M_1%uSa%5TgGoayiU!qtY$BqzdYpUgGYzKZM88=XSJJH2i?CW^O z3?Ke~Dpz-<`HB)Bsi&)2H(UmY!gstZ9ENn$8HOA(r@i|OmVDgsYloQ}9I;10KL)sQ z*jK|kcCRO`ovn4WRt;Rb@$TXA?qZ*4&tV-zd`IL|yCh5h#d_F~R>icCFrQXZzyTU! z1Z*D9f`+uz531Z)oZs&~Z%WQ8M$pyVT}CHi8BQ05DXUm}2LY|I3+s9pVl$1M+_ zrTzDbrRxo8U8+yIC>#5ubPKY3%*NYI3LGx{#y(Bsa5^T4#kWGfrdPcLQ-#j1Ps4LW zmFI3;P5ax9BfA}YiM{{}ikeOSi<%(zzDuqMiO>8W58 z5v`R2q45)UOvQOYgTmL$VSf{W4R1VJ)91yCN{$$OsYQf|N{R-xMNOpPf6zl?F9)}g zV~Jnj0~g$j$yUgmb4OlmOFNDp4kva_p>ASuorL2gI5n_R&Zc|)NcgMpNY=ACaH+XN z+Db(43rjnB-QW$Lvz`)i-s|$g5$c%ZlO`F-{Kz*M ztz z-qP^I@rdgLi*^35(hA=&Aok@ELhGCNwiASVM3{*;PRRsTH)CR#q-g4HKA1jf8(*PU z!u$PX$Rka*kLAtuCv90$v#Ig{M?6{L`N5X&#T+3Ps$TcW1s_#1$GuM!2$LckK7Y)6 zH*1-($a~_#{WIUpki@Z6d0Va1f9KO7pm{@xo6_Iq@zP;sQ_XWBQwKXsEJ9?i3=7FbmL1a$NSuXQMYA$Pp)*>lGR|K019 zQ~{Zc$Lh~|pu-3r$)7JozTj9vE)(r&%nXdOc%?)R=aGNF275p)KiBKE7&7i&xv18wH)nTLN{ zJK?1QN7@JTz0P}ZJ~dGZ2J?CukuIiR@Y7aaXScqcmCf(gF{OzWva|u8rs-^DCMuut z_iaj)i7k6ND>x&!3l2Jx?;c?V(Hi6Grte!t`g7jQqrHm#_yU?Hr>LcG=yyZufZXp~ zJI<533m;xXr4qm=^y&jyYq>{uOmr3gHz^bt-^K3FcZjNE2SWau<-s$ma=|QH^U{NG zR@pmMW$8we?yWjj^7bBGn~xUEf0F*ZG0NP9SETS>;G?Xg>*`<-5Ayl5Yux5{a@Oe_ zaj+PtA;s5Zcs2tYB1w=0zNviI)GEH{0OeTJ9 zB=&2ZRYErGf%&sMy7F}1J9(aTNv(6&Jd9Q?k*TR_bgSB<-Zi~#(aZxeW2A0gYm|KI ze=7Slf8Jouk924;{M|3tp)PJAKCw;_Iy9dO!S|n?I^upE&z;+$jvu~`TfCBUAV)?m zNJW+iyTU&GRcrb%o&Q&O)A6w{UBIAUCM1!wG;~s=4&fqQ@*9f^+!plSv~mXPcXg-q z<#bgh<^te&)L!A zfLj`rBeNVl;`6K>YVw-hSXy?|J|}XXmJ}6`Z{r2;DE3-gp&aNY*`mVeT|10E0RxIRiVti=sCNx-X_DNs(v&T=A>n_x$$+$gO_&-1p%Vg+bE0bz!^ zmDC}fJdMQ@qbJwQ5q4(;oB%~Y7Jw6L{vW_wo94XiG*qtNOH@(Mr07L9=d!)nW#dMKHt^n^0GoE*SPAe3#L+NAYvd#f^n zZCc$xlQUo0fRa3J%zc)i?3UHw&!v-f`{qewFsx3RNQeTAh}&$o^?C9)v7PdT?eXW; zo!W=L_};NM7hl`n%Ek_B##B=moG#Hu=+DaK@cJ2~pIY{^vX}huXf11{vI|cW|LDO4 zGELRL7}m8v&o+44Ql0X15NV}g(Z``3)7yM0x)tjJ!j_AlT^=Gya(PN$>EG4S946~UUUZ>&Q-t`n}aL@jJ z?-HeQua25j%FY{J%P}Zr$p%ks=QbC3=-Ib|;WiT<+=>!CF4cr1wZVH?-!a)4UC2s6sNFO>wl4}ZqKh&5!@+(Zmg)J0ZV6c>Luah6JFYybqO!% zo#*5E4ytiQILiJ*bp14xy(PM?J$CGsXh{vMwte{6%S!o*uUq{I{O2nJ&h=_TI)h_Z z9xO9chV`Q}x45MpER9Bhad%e6qfS2-2G(V6Xzwg2uyle!(Y5kAD4*!rX ze}KPNTgu+4rOPq|eg612@yf)uF6&)Z> za<-dulQ~n}DhjiS@MZ69H2q!>&k@FB8?!HC@*3e2c?2=%5Rb1NIz%#`go+j+%Qjh8!YG5@1he=75Y>x zrIr$c%*$h7&ph1d|OdxIPqs9J_%zB$a2EjVry(Y z@gu<--+}zE)Rn%CRL21H!p7ZM`)DBrV*AUU+UTFZPUxiPRnOo313ctzSmi><)E6Bu zHWFWlUjE$cf%1Jj|4{I8qyLIpL1{wYj);)OZE26Zpm{f+7ZU#SlD0@LWyx!EphbaW zIrm&S;V|i}QyW)cSTlD7SymDbc)*Wa;*}-ZgL6kT!wYg_b&4gc z|JU{XzuzTHM+q*bf&PE)Z*q+No7G1sTCsE^v$6m8>Dm8rfB&zSgd8d3ot6l{O1$fd zN)Q>k4}SNoB|MSNy4xxcH5$n=bJW`gK5Gip@BzCtxL?tOs^lf`M3y7W(>e^X7n+=S zBKFG7ylzg05gu&_uSrZg_rasqqupikU8cJ#Az6|D-U@p~^TB;yibiJIKI6^<$LfQC zrLz&j6B(p=lU>o~Gc8h7;1YO&uGBg{>5}Pm_4jp zHkP{t)J^XjT%0?s{LU@#fM@$GV-b5{VBRa7K+sMGII!;~z*_t!rcKRZ+9oOYU@bj8 za+^{bZG4$wkfd+M9s3;nsvHO=t+ga+8SiC@WME(%Vo0Z{1v7TXt^-3BWNb6RL+suc z@XG{|SMwWbBa0JzXq9{IbDA39Wj2p83lg!OA~&Ts1c!1kHY>K% z1RdqEiT2ic8mn9vNLbD%TZ{$XSs9Ku!8$x*CUfea9tLDFbeGAjDfakU)#oPY6bE~v z56A65SP4_`KgFZKcin%naks}-27}ya8bFDN{ zd;40b3BgTk?@1#RV82I}>O(vkzkNe+GtL#{h8|NV4yM(*j!5b+ArAoE`r1LRaB9iG z#VhnYXesZme*iKqSDO1_H1Z7k8D)03sa8^L)xd@bqsS`XA}4zb%*pnMtOiygCI1m$vXXrHSRMNGXrJ#b@FmmnC@EzZ>MNzmxQ0*%jOt zppm?Sc91x+%w~p>hVZP&^DaEAK;nV$RKfDte}J65VE9e)L+d|4%}RAN;z=5;|1c^z{-Ug3=Hi`i9h?N z`eM5-&}F@jil`OQ`MS+hBwDoC{O_GIlV|H+^aDdzbh<@+^3E(BvZzIhnDF{6#2&2?#ya4Lby<9q6%pU! zJ=WKKFw|&_Q?gZQzBZd7GPhGNIPR2MpQS?mBo-{oWeluXkY6v5AE!g8`|uU3XDUjh zYmVO+mVY+ri~{n63IyK&1Ngcz7;fh|niT~~fCl{CmFmPz#_VcaA_R4pH6|5PVqUL3 zDmo=8H7tt-|5UW`Zt7Uz65#78+4@sLBr-NSzz{!rFqA!6CQnavnMSFG_n zt3%OSljm!$NAkKgE9sD$Q;H#bXta`d{&>PqAB9q9?0*1RHtPmc!pF6L0BU$fFv48mBpEI|Eg;c{XIk1#>Eabt>|&7h)0>@pO)x5y9gw0 zEMbTU!v3H)N z-P`~NZV-Udq+askCmwT)aLpDT!30_9PC-RouXTX9S~hSe6ZyX726H>PhVys#>VNOL z+YT&TC#FgaB3S+bO5mp~*EqxlW5uA$2#J_!4Jn_hV}`t7{meg3PP4|MKm2!)mKBHz zokdGi5nTYuiNNGC41-GT$)AYs7!W$u#@zl7B^Ws=zE60C(3NO8q z@U|U^z)5I^zd9PE9O5cb4FzG}aU`gU3hY9{vl$L7t7hGpWSeFD#Od|C2Jy@nMccag z9*34>KQba?G^W++J0sRWI6Q0BeohDxj|P?RE1F2VH+NJk-R|eiqrB9h)z1 zdy_?8#Bfx@N?+RfO8QHTnAS7s!z`i7)huJZZIZ!(A+H+jTyYC`1}IeTnGCalQMxYa z@CXX0KOPJ1%?BET4znX+@hMlHxMSgildG(IebtQo@`DS7u?6H_1Ni7NCD~(Y%^Rj`p*_}C&Eix^vAPt?IRuT!svSE0>KuJL&2~BAf51lo+4P$6{0nq8rTu=KL zwWvR;qn0sI4?FQl@1%3cBbx;~f#ROK3BVb=!fqbbnd}+HBl;YA-=gOSvBc zJLwCmg7!StGHM1fETBaja1~GSB>wTt@Ljs^+Sd!|#YseuC3#6xfwfuledq$HV(VI} ziaR)PVA-2fHy}oS0%dI0t$-O9at8@1I_tyRtPJ=XACfxbfIQpY9G4m5c7;>nvA~e* zPI?6*;(=|^<7F8+j&x(;X=>Dc^m&-W&WW9%Wtc~mJhN=;0#Z_Qqm9w_DDEtJ?UBmT zV^>evkDCQlNPF&9iTH8Vb8PY}X}uX*;9}R!KX7>j?;u}T9%nq7VbMfeh4oa)v#?7s zif#gZ#xAr*PSY)~pv_xe9&HCxkaG*p&PB~bfQiFi2~(yWwv%~`@2kc+xPX6`cpnYN z7MSYDlYtb}=Ps}YpAnHMNsIDaN%rcWlhjI_r?tEd@~Tk@I7)@Vd-_*Wmor3cD4^aX zF~*B+*Zgq#ptqEp z4M&%ug3~(3M6RJFZ{52zq!@gV_8z?uSh?KrYmTr6kd8$I2T}Uxmv^}naygPZcig7q zPZo%YM{yv#RvJG5n6_7)Q?#pwZm_wyuL=K6;a$|qr?mS5n^9YE>#cHq zb^-wg9jnKq(ToCFk1B;=l`F>cl_aaTs0H_}H8yH$w$am`EyN#>xmt#!+`x^IEhD%b z%}nIAvM@<=jrAi;!{iTNc$5xFySU&9z}fbRyN;699P}O_P`?xF z`HNoMJnF@^@y`&hGY47`4I0v6mmBH8nYL@b1sfpJ3*_){b0uN;-Pl(JWImN(|0=#u zD>`BMCK%B+u~u_+nm@hl)ptJ8iQ|m|2CFym{LUe;hlS$L3Ww}Fz;EsNiV(C~;{tx3 znFy8aq|^J>P&;m$q8kO)sd!B*u3|c#gR`ApqCJ%MZp7!~xI;5usd7wPBB!kk)W_7Valxr$A!wIn_PkVC>I=S@{VB&)xgp-Yiw||zjwKw?= z=VOXcfcDCElA`Q^A|?@x&Ko%JD*)UFPLq1ECEA7yCx#WKbz``2Fe&N#kfhG5Gvqyg z8-trvq##H0m=&l9?n@#=^y6s8IfB?~Ze-SZ{*a;M&4~aqEK*QJ10-}~>wLpv-=V?0 zuo`h89ckTL9+pY!)NjGM{-`_H|IwsL390HD7Xw<0_JvWYgU-uDRULD(+7jX za6L6a;&`Ib)+l3I~BsGVDr%6R2X*^%L87a>+5Mr ztbBu#Mym&~5lbquYX54w{rIG4Qd296a)db2Hh1@?uD3=wHVU?H z&l)q{hDP!apUm2vr6$IA%A=8wQN6RFPJ@#Z(1yvMrh4lmjWCd(*U|5uz2!+oMs7#y z3l5sD_%p|QwtZ_D84@(Wzk8+HmAA;7uuii#>_WC6D z$4c~AQb}w*S}s5Y6gCqU@IgEgv^yEge^KL&o&rUfyx80t*SSH*Fc7aJOl*;a&$zV=U6XnQ{#q7P;$!dYv485scj)Npf?*{E`tjOHn8w@UOS!iN7kHdNNh21 z-!j@UuiUkkNXd2`o8M)~2+Ac%$w3QCreE^`8QcCY)i&}EkCdMS=GFy>{w6YqIl_CJi>&O@TiOn>V0d*Vxp7@Egp(ORroHN*&Ln0=*^INF>wX)O^o^vpM6#B!bpI z7v<2inu-}0$0#Y>|34)K2Y``E{-2WKv%wl&+K5q6GXIZ^^1nhZa(eY)HbMr(b%<1` zJq}6a@_#b|m_Zjml97W)F1rmMHC0WT<-{toBEdlz#E~laCZ(4^s37zAC^34t3`H+! zYIe_$Iu6?6p2*}XY#I~15D#iIMM;m+;ndmbwtvMj2#K(V632yVJyomPnXl|MzZD?Pk9>G9Y-@G6Iau^?fTRD5i`uz{8$ga{u4O%Bi$iH1 zIi(wS9^l@l{{V2lTNGT%{~FB_RDzYYtuN&e1@Gi1{FW*sYVBonnRu`e1oHrLdk#`t zP&?60mB=`~?x|i0(Y^mCn1c}r8G9WWn);iUY z;yvX?jq_B`9hJ?`LbpMRblu32#3>Kx9!v3KWdGi<<@Lt&vP18Xti(bI%-Si=orx=; zfb&5y=*pT9r6_I}>Im;8BJ%X@N2X+L(eWI~WJ?7&<(g?J@hX_N99k>#m67q0ndtLB zv>`mYJG}X);uFy>q9>g2P&Srn`tn`TzG2x0gJXN%)T~bYXkJY=gL6|co zxlTbO)hPw(7-mmdAY?JJ)Lx14m4&C*!uh698~nY!=Rl8GGqOO9tZN&LHdEWQW~e`~ z8lgf1+MGvX1#at5bY@8k*&s%?1N?vNJDSw?LWtUYx0>%8fM;aXWIVU{ixH)Qp0x|k z@6miD-C!SXTFqBL(l81Bn>+Xe!sE_Z$R0%;W^dWFrQmX?z#yxTwg@I{vjiwyk&vWv zRcz$q2ulRkOI>>->bD}f!^Thml7+4}^=3T(0Gc@LiDukuhKg9qH@a8RqzjVv5ntjd z((wo^OkLm2yrF^)xe*XUP3GuNBK4yb!so}CzlENLod$U zN*g}+#Spt6$65WB@Z3h3{y6~LDFXwz4xqQr<&71S3(JDW%&*}uc&$>B^o|h{*GxaY zEe$fZ9-+Ni7#_B!*Vz;8wZNHBLdE&Jf@&b6!U4|wVJ}kKfqC9$xX+J$sa2xvR!JcH-l*EkztNt z?In}AZ1ssNUY-6-SBK>yxE}&HJQZ;pIFXyG+p`6)*u`&yak9f16Fu%7MSjcM1^?7p zZo@w6ZKOE2Oawc(M>|-zdz2N>9MMD=?}`mK(EkJcxr0hto!li#MULEO+>37rKrWM1 zkDx@yb_6Lm{VV02LJ{TBE$_17ZFZu)FCyhN?CmJ{^K8ij*UC9mI`lx(`ylt~%|H^* z0B5-ZckU4xjM^928bDM(yNX9-cnnqyVMY(vwOd5&7*F;Qy5lE@uEp3+(qK1!ZLEPYFv@AxszEMNYi)N1?6%yMxnLnahH&k*0gJZw+B~ln<`YI^JPo%c$H#a217sIMthvOA zY!;2TFU0`f7zfK^_*fK20}s^GGL)W8mPd{(Ml`2=r;giu`dxDyI85^|FkI6_I@C!D zU*z4G5rcYYWNMMOY0WY73gXQ}OZ{9Kl4vQm&-{*MGZJH$WI0|u@OD(WOpMO1kiZ>a z{4_-Y|5K0N#_TpZ__M{4kC8AHg$wkCsJ#a&*^;rvxbZ&H*^y+V=Ye9bVQ{OzVJd3P zorsLB2x6BOZmQyBCzZjI#%ayybx!E*us0B{DVzn^9mcpo1|Ns6IC{|vDQEM|;%z3P_l9PFnwhUohvhI$`XW<1dtb)tEt-T9~g2+!n6WzW{$EzZL$DBYv zRwpcO3fw=Aj21{mRB`jJG{km;aBR#)7e&T<^!J%nV%Zt(m}0YRNHP@`5{Sjek6>^W z#ItCT$m)omr*^m&A(IIvA1M|^LMm-(fFbkih%~vOGaYcEy}Zi!5~Vq7VN2G)xwVSI zs6*GOd+suM_*nd70e<~~>4Q&#h`UXKAbd(X)`{#kuFy7O)z?~k5o6?oSXzDCuTHxA zWZacGc>IjcQQ<*hrTN6BLY0myF@$ViK|OT)0?~x#v4 zqlgm`)*+PkkD#LH89YWSWpzj4Z$An9G=1d*12UrY7VW4OWLUfN0U6L#@8nnz|c76uB&>ySu=#ilBOn6ed`##zs-WP#&- z4_0v`{DVkrV&GqSU1d)WN*YoT;KKKmd37%`gJ2)jcrdmDi{DWz%ZfH6-1CUj4U8PW zJKhg*7p;IT1hqMt5$|MljzDhPHkLci{rJYN2Nb)rLljFk@y^kLJaLD38MA}odYPu8 z=)D9>3HSVgjWe;h3wITkYjo9`At364HrmVg&IHO=A}Ab7!(w-!W;GhLdA z+|WCI{{U83;Vph%{r+ZF%3En=pmc4=McN4z32uC&z0JbZTWs+kGm!IrWTEk}EW1x6 zTY|pw!0q$vg&`;_bC&#?nIy`5@j82^jrgpY+1R8T!VpW#0a-~vHXsH)ccLKs3Xrta zDa4AWN9RH)baS~4DeTR*hP2(16}bw$M5y}1@Lm^jtyK#^^s?kK{_p^cO{}&>3%nWW zBYPC(b$H>$h~rCSPw8VPo{ZCS!XdYCUR>k6w7&e2bcgU7A<=4+bfhfl8^WXDnsk5O!>TbU~qs~33Ef7m9#`un$+^g z$%Z%mAn3h@K5D<5mA?w$O5YcyaCl5S9=~DQ^b3n>J8VWWt2#05dC;)ov%Muo=>|^r zlcEr*y>Cqf+2ZpGS4UW!@caKX4_Mrg%t49rxbv~DoAC%l_Q?bph+aX@@oNXk);V-J z?oZH`;<%{HhZh3NoHt=Yi~WluknRki!q|S6yyjo^5yU2UfAG8%Q${GuD6(MNb3k5$ zbq{pBT?8TUb3frKYO-K#g!ymc}SleoAyiu(LPoAD^tOW1!b2r*2f>t#{c zKutr`C)f?9J}Q`--+_7Y2^2WbKTa-IRK(Jf8ws*67#iWWIXM8~Z`bB2$lTj4;;YIP zd_!4MhaN#POyZc+cqrZ(7g7O!lG(X%twkMh*OM|SI`;?#dhv(%hqXv92hvcSSWk{3 zlr0xG7kh~dlP2+pB+9w`7baH|!HEpnGFegrK3xQVmQw?NjYZljBJujp_0_80;0|jq zc6YTc;?tr+hlZlZ(#=*{CyJ4tBMhEx{Ij$u|1j(;JeXUq5_HCaH=w`(6Sg;R7T!q@ zTAzNsnEz)?uZt*0TlnI?HZdbq087uJMad}lNu?IJP02iDd?mJ33phWekvu?xW@3XB10* zi!(`+=u}u_Log;)+xvPn$8CXu{}>6rOU#-+!CaWa&599|T2R@>3q+;n$QVj_daYfY zr6!_2!W)ARmNj3sG!EB-kB0Y|%s{GGCmm44>qi^eYsMUblhyLi&Af%ujFp#^lS2S9`OP)QJ-XJqqBH3Jk(U9F-3OCJ)(s>Ef#><+`EyWey=2 zn3!<S` z#{S*VMX6MO{s^=GUhqf@5G+YY+34u{Xz%k@ zIgAA^C~)#(W0?5Hl(N2ga` zR7fp9->lWB@AWceje4wgMwH+46t%w2RX&I7$S;0?OF4!rAiz6NjLF0cxiX&N(4mYJ zr_KBWc4~;Q`YML3TwH~#3eZIo`K9$X_+^$#Yx=;c5R+^Fmp=JF=MmNuY;25Vh7rvG zSQLQ&OP`GXKk!L%41H3F_5aZ)$?>MPp3p{@g}#s@*6PzeG0O2hN&zyr*3_G?cuP;# z4d!SZ4Wc$=UKf+U#z|Ft-?N#>q4ZGNuv^SX(=RpgB9e8yL##@g;Zf>^tbKy>)+@S} zpOb3sNwgJsNrkbB?5nJ7?#kjUlZ4UH$4e1SOnqx3SCe|QGw+ik6a-V>CFgiGp0!?! zeoD~*vCJU&ZwUfMH-0ropLRw9ZFy(U&w5pdqeyr_()T|ohcZl*xqb!cMMw?Wa+NQ= zRS5a{ikC}C((C(Ft%`Q8L^uAgFj$$zZ98jEnXoB?zufr>oZ(OJDtmzs!i5Ks#rTCF zi(jy6a$lE2QakcdV%X!7WnzTP_pR@Ub5M3-XX1u60y&X#tMPWw{wpCROuhS!r6OFUp_rgjKlii z8YNATqc=En@B4F*Ue@i@e6tad;DgWl>M3I3af`4>>N%u|Zv+$&;%+fbfUjDFSUWYexey3zEuPu%PzQ-oNvl__)!t1BpG?knlp#2I>Ky9xnwW8Q=R%) zYOP4A{ojQDx}T^h4>bsNeYDo<+n**%;%v%n%&STGwV&OE|H95Cm7uPHVXHQPIwr}u z6EgJ=Fsm7-Boq?YoSply`RU@yFhhQ1l|=rxy-45LWD}lGVuCuYCXGVrB&(MSXWrr7 z-m9g~+0_%1r%yGH{uW5=XK~cok5orJB}NCI^!1-BO=wtcM#rp^eq+NW48wP$@_#ql z5~}vNKKP5O8;(AGMXMmn`HJ<0D_Vs1<4LB>@GS4s{1?~TKyC$Z;v>s9`&);2{ci1t zQ$GedRg7RUE_R+0nG-QZlHxN+H(_$u=LfwfY$%e=S9muiCY`{i(YA@95*YP&C~U-( zXK+&~uH zLGIa>v@vVy%&}q=PDh^8wx~xsBlga&UiQI@1xU7RwPUAjcAJKZw1kyg1X)s^Ww1Jy zsO5391_#8P?Sr0R6YWMunn#3Ggr`c|lbtftX{ivTE=X6&oXxXBC1~C(j*<^iRK^7c z$>;RF_q5z%nPjzjDMxdEl?;M3uWG*^mP$m^K6`R(U)O#b$iQusFuc4q%IRHrMr~ckZ`HoE#i!#cf4=VbF z6~^n5uVo${VVuAB&k6=VIV!9E7c@y*d|2@AKk}vZ%!tq*(%2)Z-ofrFM-wX}GxA}Z z_SCHewvA#m{~rLHKx4nT<#hOQx2{gNBkmpMqDTH(* zTDNzfj72L>N7l0DAXM4u{{ZwU^pv~+XLg)c7@&D|{5WupW7vM26o!%a7ye)`!_V}q zjj84*_c-RHU5D9^+l5}?md&<53T4|YOh;aESU}oSdA*+B@P|o2F z56jOcB^pT_!+$q7QBsa1{{7^BgU$XhVeXao!?186)+fX7lgE5GG$8pfQ&{vL3!DAh zLhI`cz&$a^06duOP0(v1JqD)_pUJF^P(|u&es_!54*{&u^;h3UM>f_xLwZ_HRg4_= zeGY@uPrsdTxD{3=D?%)#136YU@8DDsw$ z&YU;j12|wzMJ|?x53=~9ycA6acPM{H7}6JIHIGE*zGt^sa&UAoQB~oN#ij4YY8BCs z(y7CS)$_(E*$-TPsj~HmXj9Ct3qc{Yd}0<_V@9_;Wec#S79L;qmBd6#u067X@{YU8 zPXl`I=zhj9#LM6n_5gmy2>3+d#nlItCI0~Aj#uDc{`^}g1+Uwyb zT?bpqc0|!NjA^_I*cwhu3-)oYu}7H~qt`W{tQtSY2ACnZ-R@MVhdF{W(@->x3Wc~2no zQ+#Jz+I-NM{{Tz{H}`{LC6a=;8aAQ4dp#&c28iuLM|r-`!WLL>L4BNdP=HyKK}sw zh3(!2bCxS-WWa#z2A9#t4s{mlVGuj;;t!)XP(0I&+GTv4<1CWkP*RA$Mgg9>>*>53 zL-5lL^)>mzku*T68-vTi>gLty0ze+>zc|p@Cr$pdpZ;V>&99;Ey1+EKfY;>LMdWk} zLQIXRI7`;vKl>lh0Q6ozj0N2Cb4!+{4A+#!-W;SLpasx%jp&}O=m&OguXnl{K6AN(;sbrSOl)89yAWQ&M6ph7875d@U9JWxpuyd z^i@MU@1Ifh=OKlv;!J)R+> z@s&|Ja}q~*FfC9;eCxa#fBF@_SQ#eCQyT#EBxcxq{{Zs2M57)J+u}c*0RTV|@v-#7 z^DV>xh<-*J=^JK%4LBFq8fefb0g=HeB~%cq$|*; zJil+8OoSIi{SZ&#iIhh<0jILF{{Y}zUqHy!Sx$Us#6R%4YklLtSaFBf@c1{D_z%3v zPywkMG}Nwz-Wj3vf1!9jzYJkZ3-VmmN3q!Ozd&my-?;}shVGT$b+*9|H^c2?CpOfnXN5YuUQPtbm zsfoOO073~lj{7pdgbJ|3aK9HKSJm^1Z`VFk;|3q*-4Xaax++*JEK6wT8VkJ_Rnh9W zL1+Z&Q$zjpi>jT@7`hIghH@KxbYdyI=95A4%wN#Jri$id;sumU5VeV{5U{fJe2vVC zo{??hf2Vjx3HHUB`UWRJT|b*JLQWy9`Qz&4&=&9e@szZnr;aj@{Y1vjBXJ-g(+*T5 zPX#-_1nR7Jn|x-mVhV|176L25kk&9O`dA=?dhv-cw<`RjAK?J+hP^Yn(Jy!%-05rD zV{_0}_3mf8yc-sV{EQtna97qBPKqWwl-g|Ib+YAv0|+1#o8{OFCkecltwcTXqtWjq zu#(pnO5?flhz4kcJ(w?6J#xQJW(hZQ(K!Zv$k zg``1(2#7!VfJ}#LRVco9&EwYs2c|5?)sR2lcV>{hJ#1;>JoTJo1=;)#3_;xaHhxT& zBMXioFO|ehvvF3yNE#pU3 zMQp`|^Q{f?UFOu&yW4>Y)5GHc=zvAeo^eC4+jljCo4Bg$UQ~2>a(eIUQ75~8bJWfQ znz5w1*gm-3*AoPoO* zcBc_9sjVuxxN5_j<)cHN>4;g8!P(!CzE4`koyD{Z4K4GfUJW-AVMIlClC9?*-hp#& zVhck@Cl4DsyETQ4k;~LU1R2S}?*(RuZ5$G9*ElyDpj{9DqdQ3nn+oPLZ_z;@{pfRwVWdZ z4~0JsW}I(kR+zv1Ia_%CA5i(i3e-)6$K3eGfGrJF%~(Q;?Q7O;egTE6k2w3@XE_in zq;fm{`r@;7IMyqo^V#s0(+UMst6shYwz=d z!5DgY^#XQ=Q@q#C5qNgRpIrye4nE`s-RN}q;}u{~Ghk5bf3C1A&8%C(R0(Z0ZZ`vI z@eM{+x3-SaW^h3C03R6^E%4*3dH1?UFQIs|+S(0|2%d1WY$XAl=%2aZxK6_jItqL( zr#2fHD0(2$0B8aLVuyHMO}V5B{{VZzfG;SIby_oX5DWUuFIn3iU%QT zNBcR%LFAC5z@zkl(qkRu`D8M!5llhVKi&#_nr{V5$-3*wVtNvQY-^s&IsX7ykv$yB z9qGIw{A0zsyEdQu{sX-2o_%o=w8%*2c{|kMk*M}?l@sH z%YU2{+<0842>XA5hbOF#a_ujUZT9Xm&mP_{qgJ;5L6bE|2fu27HszJmDf@dVe@bnW2u$ zP$jy)Fey^KXcJ6*BL`@I;et&juX|)Gr#Atr$?=}Ar^Y#I_Tt(*BHbg| zx0A0xsPdpy+SS|s0#_$n=OMvK(y>B`x}p=_06qv4(+X+|s?)FT@qt_lQK0$A1@~da zwE`vi!!QF0BlCkqGkef{8(%{k3NV>9OU35lZzV4{6zsA+7#N3Rh>^Ffo4g^~W9C22 zq66(y?SebRiUR`5l^!rUxi~melf^_6)8;zO#q10G`j{*^{wZyW+W2bNp9YwKh=PYnaj}pzz8f3%3PQyv39+*q3zmOnZ5zOn(9TYtP zEossCct;Kj%T8+Fqa9{afd+=vfO*8ZRHfrmr?GV)W)*7I0A_ocW)0+~j z6NfXOqX)^hlmV@|#Mc|;;r{^gr-s<|Qz6$}jnG;f1AKvU1t|apl>&V4a_2q1Qo%%3 z*$0>`ttR_h0{1UO3vz#kCr2gp4uzMc$Qirg} zqw|!8NFe=WL!@(64{Tx{m}4OmoGZxyI9N(3rFy~v(8b{7P6j*Ry(4n09Qx!qZg9>D z1qxQ!BnDI$vr1BhYfJCm{{UItjBSLd_ zuw$Bw9jq3VAg4#kgLU_86=Oage>j_t*fg{RqWB&+l-b1JAOoqX`_yb;iVt6GjPKxa zcal&XtBH{+;*F1&Z$iufx^Jkd9>R%>iWDgeXV+MW4aKz$+(g(R)xuR_x{V1{7vrqj zytyyF5qF&X)>(Ij#T^eOOT^a37sR10fG(k zJKvmQeGUqQ4#R?N?*Zo$DM2XRcJVsJC5b{+@>WnVgAC;qO4POG#c7dUi)E=r+8qr@ zKLP_|MwajyWJcta1AH@O*6}=jP^$zelThU|_fym{6oP@g!lL_M_oyFzToFCX%M%vWg`@XaI8zfIuLPqCMuma31NqiiKw3&b(t%O9(r`CWyT^tPs}@ z0-`0_<-A#1ea3$Cp_S>mE+hW*Hdy+PewhMjDz~gs`xy7wUJTR9Cq6J*_h1Mgd;b7A z$?_aDCTXfw!c^1MF-}w>T@MGtfWR^{rAQxH1R5gT;xsq2v`4XrwM0s8M2$5g0! zm|Nc8T(H7eqgP%uvGHI+07$Q3lU`AsrvnYZIX~tx@*|LGh)C_abz^(S#1fmiclDOm z(@?M);pTN^dCmm76H^*N41_xyD3EqeF%=fth#|o%FOkFvM`Ce?HXWG_Myt+3+W07K zUN?o&N}|VyIE8d!!=3T(l+#YQzPMPT7TTwxbLEP9Xs0EB$m7PZpV67~@l8H5rl5dQ$> z45xcYHhZk2ZQfwB{#S-~yuJ z-y1NKtuZ2PI-;azvEQvghyy|kv>kxe8|WG|ccfv;4L7WA&cq6u{d2tGW!RVcf6Q@x zANCXD;lxN5qCO{&U)E7rgU@c`-#K0(A43dk`ch(}&RYSvjIrRMH7#6<# z4x-jR`!in)5&#EtUFPM0+6JDo`+VS~*pt!%OYi-1kQiIdsZYGnl_V0_{_nAybk0Fk zBzH~((t-;R^^~-Zmy-saL@4DcK_t;4D0+M0d^POCCosti(&6#0)_#xcB@7o>ARF(I zz`VFKm6#G(4R(hP?wg}QNc!MDO9)3sM8|>`ieGDoH3MaQIcSjRFvaH&>p$dc(TzMI zh*TscQjFU9%GhX%%L*o9-S@LCsS8yRJFOkJk!`Sq3r#N;d||P`%3Xn*Lz(~<0dXPj zejz=dh}o|2?71N91Cd9LZV>M09#MULgg$U++U0+<23JI>zXOBqKg1oG9#6b%)fOpK zbO0*2dMpudnnb5*wwhtVLXfv@Uwd!XF>;$w>0N~6aC`@f8sXyj-175~Vt8beTbF0n zCF-pPEpRNy$E4Y;LZYGD!N!XkI+&?n3YcAy^t2e_(cr+P;R+Ar5g_yk%J_gV z_cD1{`8gc&gJftelX?#KH;pbZW|l9853FO+9m1NP5T7{8l|k1P;7oLzJ4|;`PKuwC zJ;)v8?pz)>{NTam!R0snIBsmnyj}hO0DeHUS+KJis8D9;A$=!X!7(B`VP2lxOpva| zn}B>cWmwCjHij1Ii=}`)UEm(zBGO5r%<!k2@!2I6T4UP@)Id*E=v#IaJZ<>)+FfDFJuh3Jq@jVeZE1=Rkcq>b~%; zQtuT0!<=Q6YUM%p+b{al)ve|1c+F2d;iw@c+jCbcfSj#B_x=r)Qrz7zl`b{{W*j(10$r-1)?cBuU4|>v&=0xM%~%roVWG5f5OF z$Nk|9Nx>3x*E@el7!r94S`O>*{a}CrHP)f}H|GjY0s~DCzx>U7CD@!E*PK-3FNV&2 z9em-Eksb_dCj9xDpJnBz%BATy=#9lo0(8 z4{`LxDcRO(N!>kDuZIx~hSJzxo5MG3))hdYK}SbMzFe_3s8|B@3fHd|CuHgO zCmNAjuV8*$F##dqb%}gafwXLH4T4GKeUI^l!oVL)6fRMo+gj)B@ zi`CE}HfT1u{1U}4KqjU0+Q;w^x^r&1*sU6 zeg3i8lnK(g_2T#0gQnefO&_~YoR;G#C3SzCGI&2q{i1r0cn`SH00-7oanm0!*$=-? zCX(LlLq|V>7$QDJ9u_z?luGMk_;XRd)`v&*-V$$M$HTetjYR=j9R>H$;tFrrfW@7=~vMc{)VaTu*9XeQ+5dU_^xp;+)bFZsEip!%OLx!NzQa zEYr4YZw93R2)d6RFld$oq1>8azA@ERi)~K8L|as`FcQnBXs=t*`RfQ7y^%UFJrmsP zVf?>Xp}QM)C-m`!*ZZ6ST@LTTo1`gDq1XHQ$ftmCSo$e5Ns|q>SE=Xgg3=&+1^4)4 zEwUTRlLcQQ1MBL?*MRFI=ld+ZJz+dkx{E8}pBYQrPze@3GuXIsYV$8M)h9kPt|$uZ z_xLd&#Wzl#Z(1-AMreD~2k-TcM}fUo^R4sV1o{i`*!_;;`N%*=Wa9@Rtue~<>909@ zprowG=Aau*>n2*NScMdH@Z_9foI?Q&AlUWz!6J|dB%#*&zS!>sC*^-y_`q16NbSEL z?ZW~CKsv*6CGeWxw)?9&fI{;RZ&$Az^|o-p1>k@Wtz(T1hb=Z%fCsMK=S<_=5Qb|H zNLm}duYY-bXo;<~-=F(|8Db~r4RPF}A`@>2Uf!`vz)%*y#|}GTQd%jad?z31sMP`{ z>=ya)nuA8bTR-4rkReqQhIzYANv<848)2M4!$_95hd0%tkvuvzbv`i&5h$E+Pon16 zDK{xm+53HAv4R2`*m;t-oJ|61+D#VI$7dX6BMOTzRIeJdMF9<&E^mCdS zT~9Aq^$pHfFVT(77hMZO;2z`7S~?GiAINGX! z;cuVmoe2WUkAE3zM~7yg?8#6bD~%lrrFNs?#;!tiAu4^JewYK3>uRcsv3PwOIB_?4 zDNtEnz^A71UX=k5S3L>No#ku@o}!7ytZ~GPvqNBK<(|jQ1tJ2_wNv8)6%s``n?GmP zF@x0&FQ1{nQK~hRsXRP$iB!w6y8b_S%5GZ}qE1?&*!e_bP>>pe9|i_%NS%s zbeT2C;J?!4Nl&PpTefe$@Ih)?E)S16Ht3^qAM$TQ@R&f*7MIJnEk>r_9)5p}?g5eE z;Qn)9r^2Kkyg}Y4TG!rf4YZLdL#>JQ;cK-AW5!+TW#J=+lJqnzQ_*qgnJv?F^%w}- z5USHpn0uSVbyK9^`QrvCt=kaZ_3wbx74Ca{;Q(b%NBgX#26$*5-<)L)4Lq9H@rLFt zuMfZPSQ7LvpLTJPj&Z;$a2TG?CL#&yC=X#iLGO_z;JgRIpPXOFiYy+A1oqyp6ntc~ ziEiLM80>IOvC40(Fjvs|Z{Li*)Hl4piOJspod7&=Oco+F`Uj6r`_`6H`X7v#N`~O< znB}caJ~-cfdd_H_`x<1oA!_1QrXjq8gb3*A;J)I z&g}FYsPUqm!g^Bt;74r+M0g(0)+pK(1GiOuTc^Grh)5#{$Ln7?79eRuLgBBkjNDM8 zwh|=#kH@AuNi=6-pI!cPGl}Xn2n%LeSnjHC{9x032X;3+Dx2SZi=`+Kc+;yX7ySKkh1EgHHJ#nJ^_v4n*s* zuUx1fQ+#IUPaT*|e&Z}D9R}h9W7bdJO&aQZ4gQ>B6K_Z>d-K*=E+xejHLkoL?Q=>J zUbz1Nn0AQ{c7yc77zUUhfkJ#Ue5SL)55UdG`o>H_b}~Il*0#8;o)8PlyL5OoLmaAV zrm7tL@7n}xODkQc>l!eq+gq|_P;8)RxDCnCtx@LSQD;YQwmEV^WqRfKzZu;qknnD2 zA>2~MQ}%vw148hcf7T(PCNhW4FkYP)Ce?FNZY94y2mUk&!2QKWZOa($#bYwBrdbB2% zc6?z%bB_fk3uTwQ5&Vm^+opOZqMUG`eGDRdb#aQRL*EziaS60Hulv>&umZV%gKqV3 z7Af`Ddm- zPDmX9)oO~@8+gbF;tIs2nJ7AYB90VL9ZF|t>F@s7LA3pUygKvEH0FEaD}*EpgzKL| zI%es??7g@$l_J%G+e5!>73n(|nT zH;$x{v;h#BX;snTz$MZN>qpXkL!1bN0t;Rx_|4A*swke#eXYqowQ1o89z*esB8Nr^ zb!U5zJcI5hy^_4f{i9ERdUq8GPjnAL%J+;|NNFK9^Za(8#qxPtOQdVJG{Q7y(En|*5h9`Z^d6qn5Ff8KGCquQN!u03!lATN+BLnhX0<825V zfi#}IbC2^2q-_;K?SQYbEwHi-{nX)d!(( zc#whUcm3x85J}&B`(Xuk16#PHifvpk7;Bth>y9#Wk`09O{NT_EVPT;CpB~r?G1j0i zghiz8#vm~vlp|wF*o&y;#p6euMduy|PrmXMs$$47;|a5)yI0^tU6k(+n!f6vD{=H# zOn~VD1L|dXPhOlOTuc$Cez_Uej8qkf!zc}f4lvDo^uRB@(^_iN&kX^iOu;K@qgn@M zQWJ10bkn7q?@6aM%D{k~!@=3_A*#Ovb_9fdq{;JDBPe!9eVq6xfFW#(bH)VE;0tH~3lXHwMUeE#Iv$wxoH$o#uqe1bYFQyj-`o8$ zG!C4HzV&#{A@Zbeo_;cvQ6EEixNh1BMyBrC{{YM^$gPyOc6{YHwpR=SDR=jiNVOe8 z8GO9~{rJf8@L&}Pfd@h09QnkEJ79Q>Q^g{VLO5|IZGw}baH?J8fcfcJj)985!vccs z9g(=?9*!$V?{TAPnD)`{gCxQZ7F(*k18ikZyOO#r3^$g0(?dsRTBz1!fqr z_N#^^&5VOV0qhjz)k$}e=9$kgT(XfTlCj|x$FctaaUxTS#;S0L7mbhJ1cUybGm@Ww z^=9N9)_+S?hXn%{_}%T8u!G` z!*Z(tC1%$TqmcGn4^LO`0)$`#^l$N$+!Cp)!}va&S_1?v0W=!>POuVaD}kzWU{k{S zSvrdau=o}fI6=5AVZ8Q*oGe9@c>f3fxj~G&Lb3P-~hGR7O?cr4E2$RqHLu)u2Y1iL;9o@ z_Qw_4Vw_NtT^#^v2f9{Eh__rSi$Sb9cM*~bIeR_<>zp%!Ce`Q=UNx)_>ZNCra{Ln{ znI1^+GxASNko7?>zTrFM`RfrFiABe&aM|%8I?KDglNW5Hh&^ulxDrQ>YVuqE0CK_@ zfCuYqt#1m)ejwi-*&aaPFx$8d%46ntC=_R+2hM9vIw4+uoO{bD`Bj~i3KQ}vshS8?YDO3{w; zDk&oMaHQb$Gm7oHTmUm{*^z`zB@>9@428AQ^Z4%|1t1%YUK8#pr`3Pmz#DFm;FP*R zy>^+UkPOcR>%sH?hq^pAO9TkkUPd}~>^T6*@tsB-Tt zcYnS;SekHgklz?+O%AkNfH^ae$eX`7Dx;ST5TPV!_~(EGS#6l;&{`rW74$@Q`nVDv zr6QuZ%DPRWZ#SbUO*jZd3W4FhV@57rIH|y)bYvUBV)~duiZ$l*tmAof zSAuJS$$hbHEtNv-udW#+c{sx!0w^dQls4~GJY?7buX`-kU5i*3w!J^U&PGN`7npKg z&zzUI72E0O5ul6g0flp?&TSka01;dx$mRBffnVbkPhf6sQxS{va&G4M;s^17_exXU z43twnFi<5C-BI!N!FHHrkaz>I6s(?i>rN#VPF}&lIYJr@pi6@qq+PuS=Nk=cA9G=ef@oM9IxYbB>f~WYiHfb7iU(6_!vKJZWC~QV_}(0--QaA7ksZ$e01Sk+ z8pMrkFxtKQWTg+!8M$C9FdL`Qo}zo=uc@u#3$U2G44q@Bk3rs-U(PFas2w(q*%8;g z2D4W{AccyJ2daAK7xnpIH$|#{-6`2x0IN@0CYt+Wp?yy|vw(b_I{ljN3$RpGuG{%u zn(r8HDmFiljDiBIZXhZ3$CUNs8hnF84WK-x0W(5dZfq#K>X^e|3S?CH3=0H_b*wPz z(B^r`lN~r^eR1Pc^?|~UQ+K?W4=iax7hP-@*B!Otccf%D9bp^PtvrJi^)pCs>yX%P z$qUVxlaIy-ybNWg^m}0#R1=Yh?qgw~7Iv5Pn5!g8ewoX8hlxR=j1VxI;WZ;v@UIP-(8VdTdGD~9O}-=&w+43|ziA^@9M?y})rrj0=-97di) z#unf+Qd$sB0mR-r0kA17Hu4`#cV^`;gT~kwO8{FE!hmcod^nNpHX>31? zTp-m$5cU&V%?n(XF2apda}uM{FvI|I1+RuUdJl6LvJOt4Of@&2o*~+>4=Iem>0SY3 zJX<+j4HYF%*?MEc2UN!l+uHmi5E1Z#a;sH_aowDFSB!KlWYlG*iJX0E49b``LWtND;wGBO7PqdI; zFbGu#e7gS3Q1BgYx_1bZINyw1KI)LDstB(q+%e4kVJbC?*T6?WU22~&;8CXEM+1heba_QY{)KBF@ZcJ zLmepL2=93UL_>j7t){h_%dvHjM~{4^q49Da8dK1m&sQZIt#guvP83$K(M@C_;&k?| zAhqvjvPMpzk*sY^2TdNDOKi(;gL_f}(b=PPA?XBADyHE$4TQoPhybwj0bgKOq0Y@T z2dUPcmbZIH4V&3K;jmCwNS|-W$1OqXaDhh6INg@xQ4S0E#sDYfglbSg!nhAEvyK)n z8ne;p!C-oLDdQ`M*I?_1M+eK}1?+lEGExVOBA!XV_m&R#&Q}EMjBO~1LYWv)Kqeu0 z`(P5U)*CHg`FsW-?1=BqL#hWr?K&K*j2;D0nExH`z7Yfkh$@{<88$_97&{g)CqX-waLZ;t9z;uq@x~0IC^WHFp zzKzoWWJ||1##fd*^y4_;={GB(rAZM`B6tpsXpg9vhLf^m&fJQE`^=Dno4~3&q;8}0 zFotzfr8J5Pm7rbiN0_J`BNO4)0yozN1oHai!u$w{fU(eKLUYHQ1iIdGAy2#{6ov7O z0E$+QnM#OGZ?;tA60ZUd*Kg~P9afe27pT%5@Y8a*8J(+F7@b90SI3*?`|!>*I1Od- z^{l!aJ}B6aO~4}Xhyc*>RQWo?+n1LtZ@r(+1AAH>@BaXPvqm659Er%$1B?=ZqeHoz z!dt0@!Xvk*9Pzf3I}=8)N2*2a?vLad%HxVi=0~qiZcHr%f&FH>7W2G70ABZzjfK=P zBDdodVIcYI3m-b;9uyNI!(VK_=tn5yTj0w?zmpIpFI#eu$GMK3r4V`3 zIn_9N;xsay^^7UWI_Ba~@_gk`QNRfiI7hPpMKJ-O4iEuAYlG`F6L{osrnxM4%&Ft; zg?uWIfC+tw&DL)T1}(z{x0jhT9!>(4M~33;l^PJ{JYrqSuu$pd0{adynh+f$u^f52 z5fgwLM)&Q`Yfi{kZXdU<@LRsvkO1vgWi}FE8c|5fQ=OhnW-&@tw`YVZ`RfNy_z9?+ zw!rQBW9UPdV;6Oz)K{khF($<;0hyV&w*ll6gQSo!9g}QCX!GgfdCS4o+7KrCCcW{E z-$^oT-SiQAA6lEbP7DjH+HgGK>6zq*t`346w>hwNBup?fv(pNeIJjMszVvAi56iD9 zc$T86wSMplq&!@6Xiuj90M05DSla6!N8U{utk$r}%j*oS4~At}qsAKHpG+17et*^q zn?3G00&VaA0C9jd<&S-R<(ndq$44F*;@u9_Q|9D0?x|#x=D*H5D6wH3K<2qS3a2Mn z4W|d=Ix_9@ON$VNqlbCC8qztKq59!H6fM-qss?E2OHaD&i4N`3jW|ch0#u+)}bqw6XiYkDQ_MZ%fdB ze~e-~7$G}nr(UDjW3fSQ(*FRH4hh*w);TP@CUg;y#kki`ENL6BWOHz6@xY~Vn|i0o z-_}MR8y$F_f&7i+b$A87r?>IE)j>ts&(20mHN7#PIY45K82G}8>*dW2yW-@NeEKeE z0DLBJ+Mh!P2(ot!mu9bAgHOh4@pa=7(1(Y^))GJ;=?D44J>+dIIZTL|!swC60OI}T zoO9`jpzPV_&+(IhjR((j6|m&>#S>zd@?h(opCN)2TXlgqwaBL-zA@TJ+8T42%hJn` z5un!FfWQu6ZyBO#^T(!IheovH2y&i8*z#<2A|fD&gM%Fl3L+pP=!A$59WbgUKCP;$ zf{k8xzWrQp#~LCmyMg7LW0L_Ik?vseU_d0_dao1nI87F7LA@L^$?A_hWI`e$cttZ+ zTb&RA>jUQzeIC2?m)v{GQ8?-W6Wnz29_3FI1lFC8b(t7|7Esw|Z$R2WR5It4qnJx8 zKu9oY_l45B(ns*Qtw{m4PBM<=dQApIQ+(hm1E$!Gg_C@0@R671zhB zUOeZYB77J5$sH%6W{P|n%(Qq15E>`5oC+Ti$-tV>!vsc#bqunkyfVtrQRL>vlsvN} zxC723YTVokg?h0323q`Fs`?thG~h2n{g0d~PFuKuYjyLS^>Vz4liKlZ9$x(z7qy^OAkUGT?K9vwz2lMNX zE)~ZD1La@`Dxd{WxcIjb5hPGIgwvCP6UM!9_ZJgl@7FG;c-L2Xb|AC1pptw2m=Sk` z%52u9;(KPpVFtM}Tq(Wbzj>Ki=op?*yyHo1PK%m5;7?Ci1O+y6i%+%noINO;mGj{b zyg|>pY`lBD@eW)h*ZR#to;KGZ)p*u$L)nEqgX17F55^*11GiWwLYmqBusaV;zt(AT z9qq(r+3+v(n}{{z1O-Z*Wn055jb3kr56OgAhXpg1w!jfa_;<(OUYix3Y3^#uxOwxidb#loenEUyDi_+*X#%ZDCUw73l`!MtG;&QLNnJB{{UQCy||y#46lQ%-O(hWWQO_<1?+ZB z7nAm5kg{#%`2G$`#}_9sUe5Duoojesj$*N)6AB{Rb}o)TI1bTDyAHVH`_>##3tFG_ zF=-xJo8RLsZp7Bi0s8~~@#!$qul>a#UV4xBn;cW4oCCkjGnh}qkD5(tt`S9@>jG@O zQJYZCpSCd40u0evu6W3XM1j1Q*C)$U-->_fn{e{yAOyPJ2PEsd18-o#rl8IE{?G6b z4iXD(xIt?2Ki}-dwlwv{T^Zs419Ft#&JSwdGBs7$F3L0PRamf+4k1IYSh zJ`GC4Bkdo1oC{UF;S0aK0t^?NHI!3eF^A6ws$??fS=)Px(rt8FWf*U$s=lh>s4{uT zA;`equ1O|%=A!h#RftPZ)uiqL2&5Mt9B%zuC=dBA)KCx2>3M#!N4> zfpAk<!9R$~-{--#b8!tC`0r$L0`ftF0oE_hMLh$|I_<)_^+X_a^1WakC z&Oxd-lJUGCr8(XKLD;xLpo7Ta1{Ex3L>a;$hQL7w0XhzV-bismo|G;HW2v49KSF(G z#=rLAV2vv_hMFX{*W!06=sd(wZlL01kk`Qnfgl*9qyA;pYSwSJV7l7^3;s zEus-udJX>g$iP)%ha5k?a3&%pIy!!L_k@K33~WE{{{T3YhOHYN=stJtaRQmyXF?vf z;jBkWJZp}!MXf{{c4y98MzKRtYW@S`7pYerC9ef~^2KD6pnup|$b-($^@D;(tN#Eo z66w!dW>dFb9e!~)Z2DrIS?m7*82&b$frdErl>Y#E0DYI95Z%%kQEYwJ35}qe{{Uz? zuz{jMxb=9=eBOYt1?xik>#Qg;(JPLb@3uj(a)U1e>&Kj)(BjdgrSxK0M!`E=+bl>z zyjSluwQr21n8UBmK%3(p=X}mHXZyrI6@irR^kO_5_TgUiU}0C;4d3GtUMacU7ztK|3!F4UZk;hL)EOo>kw2Y&VIu01!MM8&&01Ra_I2xuGXsb4E^cS=-^o zM(fgJxESla5MEr^=n*(`TWAAwzxY@_l5L15MS3eD%ci z$SN`p1|~u!0{2Q-+}Vs99ww{n?~2m(sB9-Z#5&2@sdKL%tkCzw-$R^<77mcYAS*pT z<13Un{-!n$1|e7FKh9Nok9aTEqiLa+)%@X2mj*`ErtGo%%G5nTe>jC3N>MVni$0S5 z4gT4wt1ufi>R*dGSS{y*h34J_gQw06K5i$;s)32A}es0Su=<8 zjxox44A)Fcd>RK8P}4)H%*{I38dmup{A*sA@M?)weIKie70m$#LS~c)O@u@_&Lwy= zgS+|q$kD3bP6NfWUM6Y}m#8&8+WQ$$=1OBF_L(hTZ12| zI{ss~E0luJ*s+xF6)DuEhokY7(F9_;T{xf)x*xrn3GS2_lWI;#VY8xrf)}>0et|eP*v<|)p^PIy_#jb~2kcmP`%9NjvjIt1WYQE!-gVKk8?*m)QW4|tJ{xKAB z-fQ&5JYyNXrB>yEI8e;Kh|AD^7&5{<7} z%5dW6J@9sB!PFz417A5%kG8SrC$?;X^Ivly(8>X)28Q$wT{{dYH@*a0<*J&@|f3f95`h(I%@Of{{YN2 z8brf>GhCo(MY|5Y@c#g4NGa{h{{S&{hKN$=R0@Sh=heR%1npFIubdo-OkMEx zi2a^0r5N{PK=8LCviw_!rafh7L_zz;WJnf*SJj zzu(q5SB?vsSYk`(U(RoZ5t?Mv`^ltn52*2py}UL50C4HAZ#fAxd2mhF+s;Dp`}cqs zTf`JkYmD%Lf0Gw!I#Z+~6h_NqFqu*~rtE?*J7tn{#yeGUM7#IP0?!-kIh0RR5oVj? z0UlR9aFn+Tmv5E>(M5m8X-K&YG_Jj{{*y>l57(cJxD+oZ`u^_)!cA^|^H$q7sMksG zWe8Crel9zJJ#y-PvttF{zDO*q+sqHQ6mlSPL0DcI=o|iXMTzDA0IZzSoL{5pz5Pre z%BZt$7;9qrdQ1>mTRWIcqIfgO>ezVm!@n5;k}3%?&I*R_;JV|iPg_&0d8#54P%fx0 zY!b)NU@N`%#vW~4a9yw(>g3tL9+ItH5Hk8ExSpd+$+mCCIy6T$d9L+vyYav4oK>%_ z$7tolpU!CaX+KzLKY2%^8-=*frxZvP?_U{RSPJtqf{qfvONkKCab(~7^~W~Tg90<% z-f!x7JI#{odc}sN3BK_<>UZZ9Ajd84zHq?by5N2uaRV0meM~NA)r#d z=wNAQ7=&k7GZIFZisssPo~@Xy9&?w@2}HWYK{Db?r2~-dFLkOd`z%Aa(a5;TB7L(SZ@SC z)iA#A>(deP0P`^S*)akdqjEO^K>@!0TAlkiaR4wENkuyaPBIjm%R-uFk)zLe*x@=$ z<^HkT!mC#aW&4LOgI_NhxTGyPPx+Cfj4nsxHjSAyaYj6t4?6U5mMJKb46-NdDts5W zt}e>~!a} zeP-+^!aWmaD<(9`yH$IufFw~m$TS|8IOm^SyaHrp-b@^N+}P(A6av+*dUsezm83m# zu(v|X6Zrmdf;lv_1EO9y`^B_s747T4Q#evLr>Fj6BzHu3G$-5n&QP`F{NXgT1I_lt zgS+up!+pHqfZTj4C+!y>I@@kgzr0v591EB27%~MnvNB8+ffWtQ8V8Ge#t1#Hu5yU! kIDdJ_5EFF74WZK!Q5W@$O4oJslHa~DPDJGCbXPzB*@%Vsp#T5? diff --git a/vendor/cloud.google.com/go/vision/testdata/faulkner.jpg b/vendor/cloud.google.com/go/vision/testdata/faulkner.jpg deleted file mode 100644 index 93b8ac3ad2f9c01609fbf66d0bcf884636720749..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 167040 zcmc$_bzED^w>L~%S|}~n0xe$L-Tf4IiUgM;A!vXkNU)x^6nD2kad-C?*WfM%0)$}2 zo%Z4U?)jbf-ut}r+`rznv-hmEX02~#_NMi`wQ#$ z8dkD`m%S|(mWm2H7A_VR)?+M+2amBH+;gh;H|5{F&OOii;L*SI5AS)t2M@8H->1g+ zw|x-yzx4MY|Dt=?f64z&l~gp|z2WB;<>uqXdW3})je~`KZ^6rdFMj=-=i}vl@by2? zfB*gul;3L)EA3z~S8*O5FqGTU#>EQAZSCUB<7Mf}!^h3bgC!~Bh1t7+|HcB|zwCd&{!7LF%K2B#?%m(K zk^D;(H`D<_U7Xzi@|PCjm*n~1l>b;7{oh&sXXQVZ|Cb>EY!8!G0bASs4gBA7{_)Ut zv4weBLV(grE-oM^;NRB&X#cTOxG%Ck5CZ+Hw14q${ub^VpYLy{|7`M)pQ4i`)b5?V z*S~%LE&tQ7*JpY8wz3@-)0m1hX2l*?s zelKFlVLf{I5DyRcp78FIe_i*?fAD{){-5X>J{~UqeJ1W-AP*j4V?TNP1n0a?y@?Yrrzvy=-7BTLF>xVgy9uQ+aB!2LS_`&aPEGjIl zhmY=i{$G9jZ^C}~=<$;WIJoz@6c4ceTPD_nhmWuyKl#0Y_59HTtcOI8i0=FKolM26 z!bjtutKDB76*fNJzBAZ?(0;;M&99jF^WUid2PqK^7EL%IHol+e9hMYrah|w_{VS}G z0~T4RKd>17M@U$IjV9l)3BtBcvG1r79>r+0j1L%MJ$&+iP>TO%^6&}Hr?Amp?D8Y&IgeLcq1)dceLH;+eER;|{}|$abY5+HjrHj08&>xn*8Bgt|GzzO zKAk@J^WVb%AL;*BBfOg$x3d0!Ef`_2kFW9EOrntQ^0rE$ak~a*QBg^5Gh3Au>2~kE zr~JETFT>0We=>T1 zY0Qgd%KNyKf&q(gGbomJx5Kz+e}Q2FK1jd&7Win_d9Z1+fU>Nn{L~VZI2R; zZ_cf6C)jQoWQ~FqKB`GQrMLPo5z0WH)LS>&5!W{Q4jX#vFABZ>$c>m;N{l+;nYcR9 z)bSoA7gVMnTO`^fbu!4V@GZu4&LDdBAp0o;Wq$LErHa|Bd$$!z!-Dzx`GAnwaL)*7 z>Jte!M`|)mmqDBhYlSi>%$>^yhBgngj#I0eeA$556mm&lnA}`8ANG_yh@zUT?vR*4 zEzCPE)oPslf%WG7$3Oq$g)wt$k4k_PI2sUGk5--iKj>Z@IXGHq^e@qFY2~c7h)|eU zs|-K6C5s-RkD{uW4i`q28Vvb+wv?R-{PZL6v0Q$YH(ESX=jAcHH;BkuqQ2a# zP&7aT)nSQOLRmCMs27+%$C14ZPdqse8+L2^^ic03u!Y>_8PF3tJsIY;c$+2^S?rtw zEgCH-EGwC`qO|XS|F6=KZ`?Mun-}bcxC?k-$;1V1vSiLvju-qGzEgBL!5KTe?&Y7@ z`;ikLOKq%_bDmU0Qoy9=Jzc%CC@u5)N-Jy|hM4#Juza!yycr>Shm$pp#kNqH&>Zuiu*w+3rnEG5Kv%qIb93f`>Qa&|~XXHm> z8FbglB4lG1L7`v_awsa;EUq8K=&G!6cSx?3X_#&v-+q!k*Fa~@#`b1FN;RYOy(bH*jR@yl>kzYn7CBuLZu>LvHlL;I%EI@w;;(RwF5)VN(lO|U zA$5O@-oDnx6^v<8=xIfE@r|?AkVGzZaaJj0Wi)w7zkm=hxZU^~Egjt`S3&^`q%U0L zHVIPKH1h%z1i=t1Oa58=Zr;5@I`W_7`@O0Bo}L)Dr6^{Tc#l$~dMX%{Y79>d9C{y1 z-YrhlwbWew#)`=oR-fAy))}c;&J^mu=$p7s$wrlJBV;5hwy4}`!u_+n`E^eK6A|3d z(8`u3aSIbf1w&oLD}{(tQS*F*tByxzgmVL7QC=`Hk{}m~fX(66|(Xeaj zG5MxO0vhLjEbYFj-(h;{pKr8OS2Qo(6d5X*o6Nf5`WuUFE_^%2W$Hc9y>4?dOc*-7 z40@s;=^TOhICIl#WDdTaC974lEl}-ydF^R)25soQL}$9KxN9;-WgQGRn}-;Du0ToF z=Jm}+cp34YAXrD#m2RGUER9SHq`8!g?FlAd5En+!N274vgRO+Ba7ukT8Vf5~-M zeVtk`Dd|C_nQY%l@`GG5PqrJ+reK&&c{J$F!rX*xXL^U+Gu8RzYmo|Ks&Y$RXBr`Z zCP*MV!hEiKz0H~WMV*NGi*mx?<7R%yBn_rfTzWWdi?p*XNB8ZY!-9K486FH_TaMyj z(9|BrOnNfAr0^i+6m=Yxw(FD4U&&q_>Or7dJP32;h-wi!4`&<=~t0(;n%zl{yJ@>+q?Kq;aWXdW~lJx=d0P zByChZh&X^e*q^xNElpRL`y$9QdtSjl$HurcX;&op}+iR`7i;zX$A6?X6*zuoZ|+>O&GE zsB=DnX-U(y>k#qmn=GHrNz& z$dk*?6JLpe+o1*JD&+Spq-vZC=r|cz5N&ojx>UzIw^_rs)Yy|9LLR#Ap}Jv2R@`%1 zBaf$@PKt!~)tn6!<-fGNrh8FBm;<@?7jlYo%IPkTO=Wz+1~T3Z zNu#ra=_Eo_)>FIj{gkp>jTHFRaMTAWBm#ap1lYI}pk@`9{HKjVsX7;Yv|r@#Jnd9d zO|&rqG`-yZ17POoIEXoG1gO5xvzdI99l@F5pJEU_)665*4XGV)C&Cx5C2J6|Cet(W~U5I zrdN3z4L$IB%wctafe&zAC!WBsJ4ICMw8i#$W8?Rewx_MW)9H^H%-oiN=)Xe%`O~6k zqJ>(z+1$A2WyPa{6g7_dR;%Svz!gmV&n*3~fFuu4`hxcMT%tnvm4JSO&qPs@!mC`9 z8csT6)zfOIQAXWr3b=?I*3wd3+?db&+~FX-`h2z_@5LrSAATbsKGP)*8EE4UodyY{ zgt@6?Zv(rzWk`A&v)M_C!_=xjJ})F{!bm1t3kuDug#1tI4NWhc$1hgyw z1Y2GlA3i;6=0lDJmLUWKICgByERoF3EX0N^CEkQg6edi60J;Y;DTUivnyPjqhB9oG zFRh~#W>f+Cp#5gXaE(+`Vog4eYe0G}Q3Fi2`SFxZe1%7&%CjbbS2k>pz38iM@;P@K zt16w{SG|1R+uvBy+n(K9?ysgUYdaXrbMxRrW-Lecu%_?g0S6=qs_`A@G}wVGP({^A zKOU43iM*VqGa?+xGo2k$9Vpn|VCNpWuYYp!k0lEgW(v5w z2y5sPu=%)4_}pnN>lh{{vntfb8S5J39uFSQW-Zl3&J4YZ>&dLnUxu1H?6AyaTcmV5 zK8JM!Yw+MsZBmf!&?C$my)3bYj9k zY1=*~{4m368B?6zR0g4nkX!*fyh891azv;ZO=0puPNLNTDFrXss=G16bz-_X3PvI- zkJa>$scjNm8PHhu>b~PVV1Js`%W3Vln&Ap>k+gUK#gJxg7C1%oP7@+A}g|=)c^9F+K@N4*7n31 zfmqIUI7JU{okDzN2z+@0i<&>>2`awJ)U_lxo~nu9_Gk}y5o>TdVK^*YPhvDUJAa*+ z!Nxn*n>7i*2;0Ov4tcOhj%VTOG7jW9*d^#0E;}bC_C9%K?BTE%5h>atAkv`SGsn@V zc=j~uDu2;onM-addm+}o3T@BVTp*{!BF|Nd{~HVF7qm^EQmVdFXS5SNaH88VCeb8( z_Jvs3);ez|2xN^aG`vX0V*>XA{nbaq-JKuVtn4Z=a|5kJ7eVvS@Uf3GI zxsgx8L8Pe+ce^-ZdIm&m$Ge`Iu9ae0YK;tfmhHn~Sw*QJIHy0Mn;a_9w;ljkXnd`!y`JZ`o^7uMbRj+RVK17JNuRdIxy{ zTF%ZP*=ARdT8+vvbXu9nDVkk|4!jlLG zp{CHeUKOr1-;+1zyWf3MD^ydM8_o!G%zo;fm|k15jA3}@y4LBLHjfUAO8@L$;oI5z9sp(TS*IN}r z7!_?!rs!xR$mqs%uEd??_?PrQ$Tr~Mm$&FEdamVLsJ5}LxZ69OluU2!k`?F|G)9o7 zEV@8!Wsl5En05TwOhz?@44dZ1!MhDDxa9GiyF6SZ^yP%$48XC$f*er zj4Dq6Ek2HkxL;gJTH>n_NSkf3-Pm6JXbiHQJb@csy19Emyj-~9TRJ-^^|hBozVI^@ zU@wm^)FT0=Rn(#3n`EP4q$kM!CCTSNw3uFFmcT&xeG#UFbZQIfu83@{IZ;DsHP#FA z)k;$Ph(Gz2YSO#uCKujTJcn>%r!ybi18R;)_1HmqykpY_THa*)=3Acl#A)ABl-L4%u70Gf!=M6;OI5 zV~Q78KAVW-^8GC=3i@qwt1$8^Y8ye@}r7L`u3 ze1P7})I1w>bskhSF+?jSq{va!c{@4|rT?l?of3E4ZOaeI7d;V}2~)#FuCq4yCO4e_71uP!t#`%cHK)<|#PS z_nC~@+yN&XTa*ekLWK3RJRRB^r*W;9iY za+>Xm6xD^4q&u27>TRe03^m^RY=-njX*vV)fG&PK2`RJwgHVc*1OG>@O(ok-y*1Cb zdelJ1M6L3Z3#TZ|UCOQzB85|ALrgr;q32Z9^ru5PX3_}m8WeHFeq zl6p6u6X69*Td;thu@aR;GJ2F~az8X%e8xLqS#wc0h746hE z(N`a^t-OYqD>dmudX?N;pq>==7&T_$CV`rXj!GXf&kKA7J*p_-)+9oZkT{djXu_Dw zXh{TA$9FRO#UysQf1d8SpTQrK-=h*6+^t8OE(?7#pP|=QW_M}TxIXY$BwS5{MEi(? zW=)2tEUpC8^jmDJ9%o#@aDu@x>QlOv!i`ivY>a!dt~_ zFtZ$T*`z;pzB5dNU#M5?;0I-iZGp9O1Pc|glyJepK1jg@Qhzp<1YrTXi) z(absHnc_$i3x2J*9?ay8mfqd7Q45}97d~~~*8N4KeYc52p%66nxTg#Tcd;ekvZvW( zp9j~_*q3CNZNbeVhx1d7)5YNL&J$k2Z<_RwXLZxM=>pGSpbi98`0>w_@f;E}B$;=w z6?$aIVLp`$Wq!I$p=euIH)(!GZVJ9E)M*hq{pl%F?vAD)QIr;mL)_jBoI(+x1wEja z%QLibFLTxC3ZC9&RK>*gqIj96g+zsE<9DbY)Zua|kqYr^_rQ>fCwP1v-FN1hNFkKY zFzvQ1fd;Mz0`%+BE#gusdIQPV_fE@+^)`OuQ`9BB{iv6Bg4}=cs3t@ER8Y=7VZp%o zHpPr2zKk4W3^$nt))7x?)^v}`l-;yM=!ybKT~o%lSd5jtjk>7gix2Xw{JFhxQx;9EW z#>F{GKxoIkYDU+FHMjx;YB5sG-(pn@2O+@ib{#qx)r zm!&qNtS8_pQs!A~yKl41KBKe9Y=w;%LLPa@jq5}Wf5QFKV2)e^J zGcS`t<&H@F&$9GYCLFf2`2H?U*TBA^Ol1z)a;sm1t3vN4#?}Fo|^dC+WFv)KiVaD#*5!w(`b6G>{%I& za(H6OlSD8yhpDgIMaKNlA3wDzhxM@b29`je3F`m)dw%kBMQ-saf$wviXIJ?W=hN7vvldnh=ZdswJx z#ly?2ee7Txxy!S3=d*pH3&|nY`|KdMb?Ge)?V0UA*-y(wokCC35xBKU7CaL5udg+e z`Kcc=F}W@!O*Bl1qWBiWi|0l)Ge1)wa66R`XZp~e@~gY#LpQ8b3G5GBuH6&eY#YMH zO4tp76&YbL@%Sb_y{&{cr-MM{&z_X2SL-NKHH~h2`#cih>6Bg4>uwR(X&?R@TCKI1 zqW+&WgH6A&yz3f);H)3~Fv)?)g&B}&fH#MaX8Nz-CR)(N$u*(5;ifgJfN*FMq)4Fl zePi*NQ|$Wgx_DorexOD4{$ti1Mf$zCs&jxZf$gSQCm)Z40C5=6X4>K@d27iE}k zCvLFtE4#SnZ45QIYl-F?)-gJYDgwf=v#-1aM zSbN7l<}B07YglBf$y?0Hef2COH{v}q)WWwZ9EK)NDmQDO)il+A1>%>ITv^aG!cP|d zSgY(8!Er_45=r%a?#rD-Nj!$P*ufrCTFrw_KR~cD2iCzC^3_9!hy3s^qNotpq}na% z&^B*@fbI9CP)&va>;3HIS7^0-1Fg}pcOa`1Z_=~u%fV}V{RNj}Gy*7mw>^^q`;EoF zII8|D0GR4G;wbFZ2@)}GX0Q}IoK>VWZ}pEq@Qo7Dk`hW1>L0l(_cIcQRjX{+bt#Ey zhofq{oCZ9dsp^|{9O`$)`Q7E(M1bNWsnFF7O${TSRJkIPVWW@K5v;A;>%L;+i{<8( zQ}|nJfyVQ?%p}e=zJ{w8;7zqwQIw~{kLN-L2qW9jB^1Xv=6*mgSx-BQpq1ii$uL@V zUx_P$hErc;uXKn|U{RB{5Ni>fYTg&-T#RZwb(`Je!z3GT~=0Pk^;qBOynRm-E z&83JSC^5i9a@=REniN@cL{Y69-q9y)I-3}NYVIjcD=nkh07{_8^FVqU>}wwBt;DUX zosCGQ?3qjO@^o{qetBwNZ76Cv3VSSm54dTI;U zT&`fZoPJV4?2=_PTvY4LE{1$eargOlGA*{jp|p3etljj-bFR7z^47(OGk$+&B#6t5 zLgB9&+{hqPJN(#8LZ=s+==$aUvbegFolaf68GqPbD|w_et|;X~_*_mR(CR`jxCif-if>P{xmFcg9ssxMCM4YM`#L$Z8 zheXb7Wb1Bk1B?&2wMObbJ?sk?*H#To?_@mFwyjTdiF&AOxRy1UZywjSZW*)e;{{#C zhN}Z zUy`@&o$*-O)&Z81mnq~QrVz04iuHK;cNzZxY%{jr7^F$8dD+f^-iFOrn`oByy?q${#c{FshvQW3+dhOr zGc{54!N9|rB`9)0+v%k5<(~Wg$$A*cIHt)uLx7*wWJH#_*)UFQEo%V2oV4I|5%MGP zmF+MTYJpyL)W10M|9GA`c9zJ>ZbdQzF`8~x$N7?QV;`2f;4u4asDgIX*J<{F(XPVJ zN1Pt_RZz_1&Q7f16OB|0j7d3H6W=M9oEZ{t5te|l*-h|!NuCt4LS)N9^X=d-m5xQh z@v2)tMxat;=T5c11Q4DubSNTKHRprUI2>d5z1;Kj%9%i`hSl=HTFdAFN8Ry`t{V;^ zDuTj3E8O1AX3NafpvXjuv}E&e%cabF>bhA*<2q(mZ)KG29j@(e&H^vp#z?GDZf|^T zq>B`PjWqPj?Sf_|hpVShN$w0mV2!vL=<6$yjdn-zz#(Bn%?iE|XMs?ts)1g&_MFuQ z-w4Mxyn2D#d6GkwOtGSLt@R=m4%+H#-ES|5Dk=-GhQ#Zs6>T}^#ZZXZ`-^Rkb0tF6 zAw38`Y6jEtq>@CqA!cuS(YEa=#(3$<(G9fsbJQKWy%yJEKkWXq#+$C{`eJOIsReJ$_A8sXE30nt&RBhg7}0?7Wj zRF}|MEpt(k#gkE|O$k*1B=ecwQVi!5>s)8$DaC*Y@+gCnRAHqYequ&i6X=^U0FKBj zN=N9O)+F*Jvu11fo%JG3n`;oG)$l8ybWcQeb>6M<1(zGD2Em|LcY@4M!&Eq$Xh=|_ zPSKE2%4MQ~hXUUyHks&0*a&7owP6q|HaECT{4r)4)t)#99Gafd4c&GIFU;mOQU#?q z{^XE{4NBPikF1bds(EXC8s8kum`BdU_iu|Lrg>}Y7ckbiTlx$0Ha(o^M-2k?brh&A zWNXUK{&2(U+`>x@XNRZu=qIj4`TDbvcrc;|jiIsEe7}tJmXTD=UnzA&)wwtbDWCRC z7qN#`Y0ddC?1TZF?cBFU)UfBe6KohnNt4QSk^%Dedf~N~x0wth`70idi8fMdl(i!) zFSqSo3Xsr_v?~{SkdCf!UQr9*`_=&jt%t__oPJ2#dVLHUa^JKzDbx2%j zcHG$|k6%e7ab}hbaPCOy0UX8UK?7jf!)F@L3?5~kdXpqq6KIuaq$lXX4AFaz&Oa

2*kGV{S_o^5C?+C3=~vo9Tpt=r+9lgWMQa*FZhoQa?4u?b;{I9>=md_=PnTtLCq z21U>m#1TdfuenY(rVhhV1#Q){O)n$0a*J1rw#1?`yrLdK9n7I zNW)~JOI%*n5EX4+c{fMi>h}5j-KHh6+51ghd_-6eupjxFy2KkUKdhrh8RKWu)cJ?#696{>Y<{Tr(f z^&4xAGj`SSH`aB&?#8%Ky_mu;6ZkG|U$D&2Y;{=}rvrv+@Xa5^?jL8bjs&0z(_e5g*o{ z9tuBdC#F$7##M0&USlG@GRl7w_vi}1aoosdF+kP*D32m%fjyKyJV8s06!9BN=k3lX zNnjo20BvJHEZr-1kp#Qe60Mzm@&Q5T-r$ZK&8~^xSl@C0p`Wud1GeVQFYdo@6;+Bk zY)beF5Bs~MKnl7lfE|Hfr*7-AmEnQ??7cj|}$uX!8@eWPUn zW6TF~V)@GCyYI(%L2gtG!Taw+Wrc1%Z&8Qahw$#k&$e&h?XjSk3H7 z0Mx&+#PlwgkkB$fZIl+j`fsf0A#xM6`thyxhKitX0plF%Drx}b^TEJ^{1W}8wSlv( zkuX|_xSSaKRy{zIL3iXyB20o9g1%FZx3)EnUEaRX^qu&e`=(*T zn7^LY7Ey0~2e7+sM7bcRV|RU9W%w`D9wj}+?e7z;!#&1{VSsF9@QZpNT+df^8|McI zfP)ifvmCar%T%!T!K2s|V$EK8-ET6nBmjXcr%x)E4#AKYBo#knwq|)x%v-0fVq&AJ z%{OoO!~n7qe)%oZHhDwE3|F+C$BP96?0IRIV&+PfNF(j?O^OhbD+z*V$EfJV9VCHi za85-we)8vJJq{>qZjJZtvEpW2{7oa!;B3oZHdX>vB|qz%y$~{d85h&B>1UWeq5Mif zz!$G4naoM^SWIvcCqd;EeWgCz%^+`rh-4ErKXs359A+?gDHgvnAlm8jer+?o{HWrV zKKyMtvzbing$vWcCo}cc9d>_y52m!oX+8sjsM08}NaBJ69(_qQll@vZl9CjlsE>4O z65T%4Mh!t#acgl-K6=__t%;VNZbTzV_2@RXF=j9iY~l%bQ59*S%Iv?U`i;d|EfcO- zvVmqeSR8e<)-RrHjexow?3o1~UUIfty#Oc}ihWW1-Y|j7ph4Zd(?Cx zMa!(F1GKIwah{oww>zfCNu?Bue+BFWQSJ=AgQe%&Br@=L05vpW`k=@m~WJJo-L@UtzT{) z)R?y2-FKQ5C9$rlkS%2(W7S+*(yt$+^rsEhxYda~_QwRt&^W#ZDDMs*>;i9%M)jmI z6WXH2jqUYa&pRT1&*M9OkG_iNrs?V)j7y^t&3F{c{$>^*oPH!vGZB{5nnT-;b{li) z_jsXg>LG!X^fcma#Xq5STm9LZX7T9_qhf3&R@_qr`1%ep5~Ox9ey(o<%fH(vt2%@UFm zREok$QbV59LY1u<+}_Wj*DMkw3a53*$kG)x$c?ez&M1!5O9B|9cf9)Kt#PcBiWZ^0 z!pWCUdi{%I^`}yXN_Gq^#aSy0=LBn?y!{wXGd>;(Pzbqty{>rhgj(werQW$Oq%}v& zoekHKUCJ4&A=^<5a*JBP8%8`eaIq(m6HWGnATl)~sn8FLCCxvt zpurLSvQa^iJ!}LI=vFrHkPm?3G7xvpGPzE12nmRD1K(DYOAzQX=xHmdNi z2lQ9tM>_=!a(1ocP!?3)m~QlU1U9~XtgR%XoxgEE3%n_Q(-ELUN8}h7N!&;*?-oZJ z)M_^q`F1>?S_Q`qWw+{VHqf_!_Ugri_F>W55+T&D2NAxTt%TB)JlTR)}0!?nT6tk2G{-_ zxka?E`9GayM9wQYDyYy;=}95vfkKjADpr`20Q$JFpicMp>(0_%%JL{IHnJ_6y*N$84otv4Bt9$&D>5#Q%xUwTmL;aW8Ra z?VeO_gemASyU~qh&ERmH`cnG{GfavKkhJm_DDQfA;Qs39b1w(B!&5Wt!hnP^)k5)< zI|=MsLJX>ySlf+>?^L0*F}1j0ossrDV(Dpl;N!P_+9bU0UIzi? zmE-tDovu{O0*-M}BNcp<$JJ^(7=EsgH1Ma7;fS0dQO6)n1&YGHr*Enwys8O_T-VAe za&X?9Ek%*%4lo3&Rhct%r*ZAJKsQ0ME%j*oGFm!z>MvebI7ogC#TK82xiZQn*f(^{ zpwO0T#NH2XEwPO$@R?JN?dxXO0bE4BD$kT-gC=7E?0zwfQG2M+*+EQEne(&eLdr(X zb$u_+@MlK)1n3rXx^=J7w~Jullh!C3t-*o3M<{f4q+We^tQUU(pEEeF)`G_ zVYAd1kLu?Y2N}Ccfktd-#`O1LnLS1j7{w74N1L;vzHMGjUS;rfv4I;94vjAQBg;cJZ@?v{NtUosDhZs|Y_9eolhV*#BRqW=sL(2Qanh$%Y*n&vRj9R0?Ee)A%M z3Yk;2oSl|`2XnQ%0MnG=G4iG{qLFcsQ9L8p;Rwvr$ zq-K)Y{fH3YL8WSS#T`jy@;q&kba+ZZ|LYTd4?z4^F%2~*vkyTolLE1d{|^e*R)3}O z32nx5g(n?<7^f+|H$1ug^C-dbJ(TbPms{1UJOg<7j4I#=?|WA|{7J2KPk7SLu6%u} z&qf9Ee9hk(CV6Wk3P0`nS}FdKhADDfh0*-9-TM|0bK~Fs!{9?{@*RJhmG`1yZNf{E z#$U*SLyz?i918sW$$CPLz7d?w?v(Jx?Zm>W^@Ax6(vbc6^C@ zc0>Lqg^w|S=WXNs6{HbFH z>vt_7Q<-FZx0bMLN&HlL`F3A6$05$3fAF(0pFA97)u<1~+u-V32h7S*?&vyf8u-e* zE;lp^Nc@IL5-=h+Y@Z<8wC{uyvd(VQJU~$!T5CGszuP!$tvRh200=QIS_jGp1q9M7 zhUL1UbRR)f3*Od^g>+TIWHg$5zj$UXIawR!y$!qk{y9HgNb_2yZ=RC%B0{cT+*w+( z1U*0zgOu1WmjO8nXTcd4j9d%X%4gjMr8Wpieq-TH2oh(1z2a3M)1;GfHfE}Qd$zuq zZjrv8@Fba%2>k|4tgf8HMXtmmW@gDT_w(gqjAF#K5^cQ-@Cn{{Ft4{u`y8rxT^mR- zz9%yp$7I)A>trS9tE4BMHS5o3P0=lh^R}oxZ3q5DFhPdkm&_W2j{LWdz5-OY;$56v zKt!rOaaX>w0*K=!uhfDK$^c3jw_+rGMHqF|wIbnYJ__7#)Z5719XiH&%3K^g-mm$+ z>*s3hdD(H7^dD`FqtWbT@;f(mjUc_D}ON z1nX+LQJ&_OQ?q~Vv-$QLtAeJ|klOWtvlmBR={5ny`C{)dvy#J;(sOlIW6m_k12Cbw z!4T&%kLSJc0-MQF;^osX!SFd%KNwXbH3ky3c(9F$F zYL3?VSz=J)##x3t#=eo$*nBFyx?g!O!jiK7D)Lk77o33x5f!mb+P$rgnYQ%$ z#YvvDcli{tkrs|TbmQ1PA7LMkLiv@liP(wn7z6bp+B;|?NRjagS3Yqq2g{w+z2!2` z)x6?1N$=Vv_vK{tHh(F7{K3`PlBS^YGx}&S7nTaOpq*t>D(agyJyr`k^w46n#>`+> zGj2fW_-6aRt%@9SlD8} zv^a-hTj^bL$ec>{cWZlHyTRSSa?OoM#tgY;{tQGY&T!GGF*CBot zHIGwwXU~FnZhm}};NXu_O6*sO&7#(`8xeuq#crq!scWD3h~ehR!X%2Lk|sw2 zDp(U0VpLdO^iKl-;jnc{d4c`uCj-TcV9l_9;Tcz(vYu}>n72#IyKPXC$&4-D_*a%&Gy)dAxB<|`FeH0Oo$=!T1CMsR->M7 z%H=rZGkPfNqo&Nh?VxClgxgE)$5wRMj$bSc`%AcOKmZ?zN#0z6#iNyi&-RAd2mtwX zi8X#k45)=K1$FO!8+{1Um4SwZ*xvmeB(Vf%xi6;$A{j zUiw2ZCJCXxOG1fMa&MpD7i=8cdZDf@#*Sqy*u{|EujSn0Wv1$5(38A^9 zXYBhebmhfdp2Y9eS0>~OUZj{Fh&{~{+4Od2ny9+2vv%sgoPN<59W&BAksZ2+JK_Ge zl7_24w_o~27Ywea@{+gG7w$B{Y}lk^?=X^};{NQA;q)THDiZNbzt?d3={WKWX0eIA z=#k*UmHDf%Z=aNvkEd*Ycy4k-q?h(vl`N*&d9O(K_>c=mOAck8goC7v(_*I)KbVCf zdvLKx38oC0hmD`wwL%A`GubTHG>plOfhY6F|aSVV^C6+oGx_sra15^KeICw@rv$X*rvGg0O zF4orFLeu`&42qeXG*?um?LC~>@}^RBBN@U^Xy5m}oy_?};QmnOl0tY_?|?t6pJc(GoDRKV!foU93StM*iibz~V~- z{hN!JMFo>;pG&>Q)G{0$5#ZU^AA~g>75(-$71BDxCXEx=qUP47HdoZlC8I5Dc{?WQ zsf;~WF(o>k*@w45buF2TiYzA3XVx_(x@?V+R1DdB(o#JZ(^2a83%$T#fWDe4y0no@ zyIk^8slngs^?=QHN)bv|G5(00eXzXTz)m3_ZwT{l%RFbC*gKeY4(Y-Xozm5EscPC` zzW)&U+kS($)cXt{@Wv^dY$$=Mzp(~E+?JMysdFKEhWz~WQ_Adg{VntLx@;n4O+rSO zWGmDIhMX@uSkHm4Ctj^yqIs2U;$)2mfc;_ph64jeo%N~3dFoVtq@&SsR~jrwQ}tRI&4yDi36*8zGg9X*`3oNdLi0?@+mt;IkQ?1m90U&>ZVjd z9aIC=6}81f10B|J;&JNQ#81wJ7>)-&%>7IAeajNRJ7rJ#Y>F`8< zZOu_LIId=2b5-fjCP-f2U`bP#?=p(_JPKuW78qg`~+F> z=3pe0iii3MMa0`;p{^eRDnwN*rL1k4&k}r?xoY@kGgUnYIS%O^KxB&r{Zdzw3!c+L zOM`L@Dh!$fGNn5pT>!`LcP44HE!IE#U$M|wFyK=gOzWY zNVqq#LgBC9Sl08yol@$|CimxTei!?hilKJ zS&bb5igJmndiz9Tma?_wR)Mc~FeQUXltsdK%^{ufK%9o5vfeeF|J z5ETNUH%WoeFG!bi1(MJL1nE^F^d<;M=Yh1)LPAsOC80@^grWk1AT1zDXi}vGFI|iX zihy6&GVOi9)%enJbH8(%1V64x94qTc@d!k5vNx-qj?k`=@DiMmIOVde;B2Nw?-z_*K-a zFOqK3@00)^Q}uOT+padQGtx>)txp4-DM1@<0e>G#^?mYZMneH0jU9>2P82KrVc2KEg&+E&M;ss0J zzKS<|s`Bd&sDL=ygI;>3%BA`$w$CeSKoeZmxp$FY;M&F^!^r2axDMV5OW~sg%{n_O zdm6pBp_6b|qR-|{t@WE2R^9D8(T9E+=6XD%>X1T3T$E6t~lxP-G`l`zc_e#6Q}$zEtqU z{5IMxyuvp_qOx2Pv-R!#HdVTnp!A;KKh#7xSexs8gv9-igKRmkt;hloDrvv6P5~W75qzI^BFb7N6QX&V8>YtOCmzWOkm%XS(3^cW#pLt>CZG zar4=w4!LjZ+VJU9o;H!~Ki^C!8)0hlTlY!vnR9vyH4?ld?9RdtPumo%|C_)jyCHNB z{eBVLx=hdft1>>mem9?C>kBSbTnawwiqrg|lc7iycGAXWKQ!VN4uj$(GfU|;;*Mr@ zs{i~%*0$i}Y~_^`K7Y_R{AAb z_aR^HzOw(T<@L?MD+WoF`%T56owhX|zp)R!Li$SqwW(9VZyI%-->rdL@xwa?m$2b@m~8>v}2 z*YFrc9f>Is35ZH}SdEP&LSy8vxkT8_q^yv(zovY@Nceiv@ygS3rqAdQv~yk7XuN$Y zM*eJ&{w^>a98$PpYHj^aY&KOrSw+iNaVKrQa%`k>-alhT$mQT}UVc#v?}M{Y^lwC6 z#gN0jHRb3`o_KZn;cyV{q8iJ`g*<%KND)3S! z4K!vgZ6G^+dc#&dZ$xXkBe^SlW&T*ke8Ch^d4#rwRUZBDv>ut0Mztnq3!m2=mBDS= z_1^dCHvj7j@}}f}nNrPo@uNlFvMJ;fFHwxBuzL6g@FM&+9%89YTAy?vtp{`4^7=&7&Zxj>SOO- zRmPH1)SIfp1SfW`Z6&3MJ{OrD-98dKJ^d;B-tLjLuDwH#*uA1Z7s$`Ro|L2v!aEgc zfMTP7i4=;qF};W`Umy}kt!u=ud0vAx;+G0kw>}&dUehUZLzU>`ukHSL#@+VJEa}k? z^NSp{rS~)Bzp0Ucgg#!`u6kP*ih`Xma+ur73eq;CAt_q6y~sIds+$9MR0`8kes4en zKCCmVs|l+a*LhymuwirCG| zxtxlRJ)Q#Q4C|!15xY91`J4}=FI3=m`n0Tr=}@qhQFGk8mYZzlskW_kWx%@>zh5`R zbRUSVgG!?qlm|ks$ddeoev3+sdm)0Pkhum+=KNBp8zE105_5PRE?Weveb<8(p$ z-!Fc+DK>I%r7KpN%KY=iH~wE=;+MrzL&ul+_Y+a+z4ze?*3)(&T@FVY#X6rr5|t>9 zqn*AVeE%&30<^jub6$9i{M+^78mRuIOlU@4f!_Q5yQhSbmbS~EtD5dw;7c84LWfSK zUcX*>SMdCX-eVqa=<~nYceiHnMiPBwHpUY#TgZiA4bOi|X3SI$g>N)k2SKl}6waSMjWI{^8#u~4HTpwT5X(`3*=e6m3Hf_bsW1QYlu$6dIbG3+#zGfPxg+O? z$pJOkjU`VPb*@cE&yjbh7uUmg?5xYKi*0Q<&lO4&vVxUsEY+!BdbKMsT$V~cLvg}p z4yc3O^V9s7!B=A2NcRP4IH?!w1+Fe;MH=s)K4Gya+U5q_g|m~N_xS6-+yRf`F~s<<}Y;r)5ESIlJ;5ko=hKe z_!BS_-tgdWFU~;eGE5!_v1^A(_4#z(=6c2)?`cyA-^c)i*`h($6(1{^`=v`_2-AjJ z2xn^RaPC$Gyl{^Phbesk^5?>L|DLIw83i_=ZOV{au`~O>OkNO}0sm>Q;Z2Uo;w+a_ zyer#sj$1oXO*0;W<<;IZ*Ho5xdMG6kgC}dc9Y{Zi=_i?iY?}3XG6JFNySnH>{Ip3tQE@S=~9zky= z{qjh6afN8Oi9retJkN-yu~@tHC@&EqI3U~x7SWQ1H&`bcr|FVmE!ciEr2y6*A}9`k zy2<9`<6NZJ*N;B96e!4223x+#Lfv~x$|w)`>1-|WJLN{{mmr!*o{{~}0YR`3EV3fcqMiD8H3F1_ZK7N^ju z;hOlqdw6w~V~meTgFom}_9J13IQ1QcufZz(*txRPc2u&v{N53ri$TFPD`fZY_M0z& zFY{OR;yY3*b*%15<)<}RR8U}zxQfBycU}NFAQbBYYY@Lpb0ub9Jg8InAzl$zU`P2* zY#us^7x?+H5BC<=r<-(&T-OzNyQV&#D{Slr7dD1+Jwpnk^#t@rVK1gqqDD8J-3AAT z*DLLLLnTwRKxF$}Lkv#;d&N&J+bm%ET>o0IdS0-)@J;Z~kAv#hSpI|))>n=UfsBeg;|vE)c->c5daYIAWid@J8Jcc^PE$V&-tPu-cfeH*%bK%+vuLgP!!^v#@) za?nf;%O0)JQkBe*?YY(`^A6izCu~7f&z9u=@5%rE)a+V+I?N+3W7N$}cB3Vq7ruJv zBFEdM<}toh5h@{Jgk3f9$c7h$kaFnu9@qj^=WHvfYgQq${$?qgA;45{c}r=56z?4` zX$^0>>+Fl`u{*GeJaqp`uzJZ=?&K2YJbhr^E$ckz9!XbJOWHBr*d+6jhsj#5$@T9B zvMBxb!xUM{D1Y<3?y8qKW2AK50 z3;awUYZC=K)b=KtT15*CNB6<)aw{INi4(~K55hHh1sv4p-?p>hMnTO%x;fiJHpcEvv#NaurogIH-1U_wU461o za0tGtrO3-%Tc8a&5~t@D2{QQf>5TZiBh#{OF1}H!$9&&MG)=GqC?Ap zba=XB1)I0q*zTLOoR%G>?=Re4E6P%2iDWlOax$qB#++$R{{D3Jb$s`LcmuK`liV`? zSrFtM5t|#z6#XhlrG5L_;?(@~DCr(I@hC)Lw@cQw!7k&#L^Ks=Pt4GcaPhC_Qs7CS z9jc55Aju_0hF*Gicw5yg0)X%xK7Dsk_FSii9a%0L#S=(nkHS3Yf5Xwpmg%C&MJ8c) zJGkS9{nB|kfSq)U-H3fMFfPm6}Mf(AndI8NdId1QS} zUT*&MS=y#E&h!ORC|WvISW$cc@9McQq`6Bl_i}Sd=3C%uO#7;zcBpYJooh~Evtq#B zDx{I^H*nnPI{%Pls8!hWLFt(SC+Qx*5BZ!yN~{=;#J`vLGEG219@$MBq_fwRfubh#~7gPdoR{m~Fd{uk`bbs$%`oodq@ zMi2BrsZ}^TJNL5&6W+T7>$K_-@L3jGV?syL+s}ZEnM0le<3^V9ck6f2!Vzo9XF>zO zRAG56Xn16Blrn_-G0W6s6A`A+_|q_mhI)O276XfCV&pe#@CTW3mhZk*xOolGq-Ohf z^u69-m))Jx4)xtJ8Aqu2=IUjyfog|9tR)ThS>VqFIMAA76E|1SEBbkGgmP$60Ba%J zyH|P>k8Ee|(cl)X1Ba?c%ZWon=TJ5dHoqHOu4EZuzZ(^2=?YAXmb2@WEi}0GTjQE{ zhZOy(;m+*!{L@<0 zHG{5hNz$BEN>Y*$uidFPDH~S7wMihuum5Cb%x}u&W(#mXq=ys?^8&6Z*M_-Ax8R{} zg#h!Mwz*-qGWATaMj+BVR6ULK3lN$F(ch?)&N=*`!$>O57dE?OHQK6euvbWa<52`% z!(n%wacp0&W4anBAG)BGn*Gspn|T2ovE}0vP-$+;M@;*N>#ia)vK5HZ%qY-ael!=< zt3$x+D72ZL(>-XDR%qz&%HNtjILcK2U2^-Fo9 z2?n`VtSNmQIrwv7c)crF#|*1Cr=y?rjK@J!Nc5nX=$z&}TiUK{1D*pl;t-<><3nU# z4OV)HXp)Q1EQwODK!hBe55vQ?h1;EXbGz<=*##?u$$tlH-rD2S|2+I7MRzJ~I51`R z$a=MSM}%qfH>n~w33r6sNWX=oX$JP9)FT-|@MmuI-TF=MwINySwBXO_@R{bE+5TuD zg&Ul^UwJAZW}7xcjp8!m|1luy4UA9cgc|GTiwQ}N|GD6Z5s>1QAN)4=^?HUNjQj@p zj5a#K6>*PCQ#>Z+NS^92TPl1d{V1R%Exj6^AEo;RvzhsoC*?LA?NL6bm#eUw8Gffj zKCN$nJFWRtflJ^UB}CTfMqFxka(0S*(xH-G^uY^yH1HWuJ1qKL)Idpw3C7)hhHC&V z+27gU$xTm6CQFYW94Tb$FcyFfWdDfW$mm--pSde^Rhyq4l=4MvV5QH1w`o@4@qIAd z_@I39vryF-mtD*0OrLP*W)*L=`Zb7K@SE(Mr`VDJVdpi&y4eNLbNgWrS@BgoByE`@ z*<};~QB)cp#Z*gW(77pHXm|N8g+c;9R=c!V!CmZ|cBc2C%ark)#2Fx2E{n#p>*dwB zHXzm&o;)+sgazFJA1RH#Nk@r4HhnTg+&nENMfUKTGy+^B3i!W0&fpg128%Pp3to#E z0Y<1^keE!N;m@^Cai}!?-Ob#?7{7Mcc2zp#dD&p#?nZ-Ag~N^@WJ`D<*6pj?-&;5+GCFf}}`3suDxqf2rlBBjH zf)4|{1Zj>E&F4m0$-D>~$?Ojqvmf1eI9NjtRUEl#gM&o|aF$e-I8C8+jn&8xq4K+d z$=U^E$rG`3w}|+P4IXbdtLTBvf<|q=G<0=~=3}VeD3~ArjQieCN7$xH>xv6hhuGz5@F0i#4GiOn&8M=a5%zIDxL<71 z0{aKq_{f$*Vsp#rrm@RNwXzGh2Y!4SZ`(o(Jko&9c^B#hRgl&TYE27=B@b1$02_Sd z)8@W(sJMS-92G8?2i>fW;=@cH#>5Lbul{n~GVPMprRiny4n?d*Yd>&fsyA8m%OBL{ zg(4|~KQk~L@}t3$ZKsCJP7jvf>etuZ)NfeOc;LHv=%4F9QsKfjkcO%-tm&6w8KydcRoW3@n-n;R^eXkzg?)D3Am>~a9*j$TcR(3EbLo1~mog7pZW+&z!WkDRDAvt(4;(qK7tTIEywd?~ zqKN=wGQv~Z4082DbmSUw2602xIt}Cc4>>I#6S!QdJvEonZSoJ0&HTza|++I z#df2#*CZ)=oBEu?VfpJ!NaObZAdUZA`rpOWqyC>nJhMp&AbyEUkrQ;6g&TcK>49Ew z0ucPyZA<*$`W87A2mc3cT>Kxj@#n&~%KR)9W_>oU=z3gMg!>_me*Ua{((t^P5s&&M zR&|P-e1GH_9fFt%h+lm{?AY9Tj+<=H@L!1N%3xbytErRK^>G{pP$Kt-W{zF@nBie};3o||6a}<^y00Uai{T zc~u@-=7{+73G8NHOvQ;hS0+eLI*aHrx2@tjf7cyCglViC$)Ux}+tpR?s0BC^^Qx$@ zL3D?5=wnF?Upw_A|0Rpi20nY$hsLiU(aJ1xi3=C!(xU(|fTin#ISy$P#pdp?AAkmY zl0-BB`i~CQZtauqPjA0XCk~=jNBdZxyN?iU-|Nz|eWCYxbFH3($PlnjQSNL*NwNRo zC#dQCI4#syKMwr{5^xOl5%LlAo}O-+<(&K_>?68VY~|(y!EcNHix%H1B*f+SNZ@LM zC95~51}_Va>VjgqDVt%D;9PW|RrGD;FEau@xf7XK@0i<|G*vRl!K8Q3@Q5Dme?-6c z=YmM6{t2In+$ZZ_Liz;xQH7QHv6OkaEJ`wBeG&QkKrSeEx_be3$e5qzo5+P;zweUY zKv9%@658XYXy_~?7;w%J_zB|PYTDF7yGK=T-7L^t;&nWbm@)L-r_YyPFUU(}1Dz+0 ziXl$!pBE_EWTDvfPdRF`i%*)c9Q8TNLnuk7+-w7j-51ohVpE|TN%ystu?X6>ixOBb zOi8f)#dcJ1OzuSY)#^0|rO%gZ7?v<^!>p!EL@U=m@K`DJAj^KYx0{IFehdmIGEWF7 z;J8;exgd6>ticnzg+Npavnv^mlM+rtW3>bwIv)<81j~vzw76(~2`?HIOA5q^9jeQh z^Mb-PBDhJ$k)YivT(1-=0@#f@xA-Atw{eFe-`}6J1~2;Vvobx!9B8(Nw${E8R}l^( zQ8m%gZess1t#bKceJ|D72}Km}dNCCQQ1&vNp84o=!;aSY%waPN>5B^{O@65HpD7)q zXg1ME+nw#hh0i};Z4)t^hqQNKYF3UrEum1)b%G)lY!k;}vMs|U7Sdb0g@4XrP*Cjb z-Bb`L8l~!Lg-I8DEdHSnULUQ~y$zLHBurH$_&uI|W4Vk+g~Z!3Th4@%PSBnW?K03i#XmPs9?dL3Wz*f= zxF5Uc(hn#1v=P-?KP=U*1t0lL|RrFB+I+l$hOh*G=&($<$mi^EwBFu>lmbKp){vk+S?77n33`hU_0HowizYC0UQyt6l$pqbwSw%>B6(F8=7pjJT^Fi*y4={Ws5EMrrocU*Zora zrHy#eyT6ycCQ1rvm*UD@c{CvSEL{BjiqAHbsut2+Ft%HOW_dW~vuuW(kj+=Y)Vvnd z4MZ8i^r)TTX2xiEsI%-a4n%d9sXLiUtzT%3`B7-hO`H^B8ctZ|8Ujs5*?ZCh5nT&m zGBk%%2J#IQ~KrcA8D!slL@glL2ggm9QdB&&kP#QtFmo&7XxKm9-DkL zDB})MDlrdorY-;FJi7dC*`IbYgI}VJVi2tJlExrvmY$cniRQ z*u-Ih;(WAFSJWA=qdTlZ^r1xHEoz83lvcv(gyjZ@T8yW{p#YCLikDwZSR$8pAv+d;{&S;MxO__S}sI0j@ZXx;i zpq&@mFw#f3800gn90?$ASQe!dHI5ByxhPYW0d9A`F;}OqDI(?7?f#s;N97jBPIVFA<(H>;Z@K zw*#XpZE0TV8oYoiA&C}D0qQjw97vPR&o$d0>{60{4aM^$C>NUd+EGRrAWN#~)tHJd z0)28x=St~us2Tnj?+r+qfaVzp0Ut8ioSnP$@YSuCN~j8@4-rpmI-SJ<_1Qf*wOE~yD6`ExXZ+2&B!1DKnC}@nAak4C?(5JE#84F;|((#7~&6gZXit{kj>mUwuf*otXD$b9GkJ2kJiRhsg}bzF#^|D>X~LI z^q;O9!2T{FF@iB3>V=;dQj6Hapa~k`fd?8wNuvS)ts9ZsOQNWO^()>HpnhY?-G}gn zYFQ3Yeu!CQujjT^kQ3VsQ;9OyN8JY1Sj_8fL|f%;XqZ!O$PBbHDG?GBb_8XM8gxEp z5Br47H?XdA-&4;b;|^Td$>pz#Oap&z<^#=!<)z9-JH`3zRd|Pm#4gf|Ujin^h!zdF z?=*ObI@pbm?iRj@$$uCi1HGxSNt&olhtVnaAT)0r!8={BLiPb6IRv3Fyqv&*W5pY? z3oqfzy4Te@cxxWcr&TSwAaAR>zx}tEiy;+)mY-Be4DzMEvFl8mdl~#v)yOR?+mf{4 zlXsdssoITn^k*0g0};v$gk0JCa)`3joOxw_F`x~oY@#20cE>a@!~aqALv7b9N0K36 z?hdUY-(S$)msHVJgvpWGJ+kpEJ*@=WYEA!6^&&z4gJE&pP0qP? znh|>yS4Iculuy6#v8k$f87uKIQa&@Y-S=V2%#AstYXK|fy#fbVbE<%idGHV{X<<}* zF?VWF>b_HPvGRj`z~PAe0IeF)fiaijetyZc_ms>!vn_zy=1!zk>FC~#WMJF{3zJ#)#j2n1zJ?V zNSk-t=dZ{%s*6xN8gIK3kh6m07fu^}d!PX*mdvyJmTP`(E;>Z5SblKq6$KWd-`Otp zNsE)GsH3&e&d?Nq<6D5MPJ`;i#Le(#WrNmUYIjc=<5*Skz3xGUq~G$|a!zs8?}W<;oPAtuK+N6Rl-sXAvB8@b{jSXy4y4aN88m0;5`Sade|Y}ENSO@EZBfor9O18q ze6JPX)R=6$mOPIUY;|Clpr7hJjLy|#Hf1&M$=sz^d2{sQUV#jBiw@!=IMi8a^Iu{C z;#|}Bdx8h8Z8`_lO~AO#SNb}HMhKv?LHV3hV<4Z~fKgyBUeBsw$}dUb>h&N2P~#*p z*xxmPgwR2WC{v6wogE?l@@aVns)3^a6w7*cX9wIg*2=C9KpQ;2Z59tz>P%snT)wID zcFE-OzIx$BQhfO3CHy2t^os^flvX3Z9%z0MQF1R*#bc#IgwHTYLU2pCr0`|s7Uk}Q691>I2Myvh({Mxam3iJu;+pDQOr?N>DQOR--T3r;P zy!Ok(9X#2qA~Gv^9g;TK38<)n`%}&)RNm^0wOOvmsn15#9F0MqwX}D*B5a z6<|b3JFA0Kc!vage2&4PS0<+dKjlsgkjb53!l)34nuZb|ZV7fve!5anZa74R7W`fC z(0sK}zfMwmVwOafx>#-ABLe}A7=W-H_C~tn zL-cT(G`Q$tOs98_W!PIi$ zQrsq56qZpLT}^Dm=&Z*FYvvu8aG#>JrbUZU8V=wEK>;at){Jg~M;W`U)m;glC`tW& zssOpp4G;CN6Htj%flcmP*=+Hc<&eDRGP!=I&4apba^clmEe-RBi@RsbgBE=b)DrHt z($x1t(M76zP#yr}W1t#-%Q|~aFYZS6NW0J0V~?Wog{Sz*DohJr!iT!|@ydb?^7^Cb z2FqXCtqc=XplFe`Cus>n^c`zJUvFBKrDx(<)aH6d(iI^9SHdN-l8m5C-M z!|P@v6(06&LN?pLpoEv0!$~j?b?-I?d@Rya#XVDaDFiguZySIQuPs#e_35A(*NsMy zxU!1d>+#il``k(NwV>{H- zcfQvi0JcJ4jl|!79`pX1y*|~$;wv$&fjO$9xd@1&%vo%MflHKYR*Zns;!nA@V$DU1 zC9hOKM{`wL()1}5#ioVsfR$#<^@$Bnof*b6X`1Ctp7nH|nx?B$>_= zNQ=rF8##{suR)DMhI@u31t?i%3Y%9hvq2RoM5vdX@f_Jt}Lww&uq-plC&4a_1j{~ z=(OjHd0lzO*gLLIEM1{5CQ==r=h~z(PzzQ@%U7m|aMyV$T~PQ~ySy{LRBr$eXQ&G> zcj-p#jDf!&Sjgxs^Yi# z00yu!6s%$}IDp|Oo^2F6tNn_aVe3b_=l>HbTs$R;{*L%p15>S9n4mYwcV&lqrS{bl zAR383zdUcQ;0ufq=Jda}@WfK;p`}5KB?c_UQb~|AC=bm-q6E#j197&b*sTq=MY*DT z>qkNlJu~+(C@sP9Wx?A*r|F+|C4oViVXECXv{gp7$Eh*d2GQx@u`)Kip593zw5h

d#T zu=PG%-hmzmU~5ZkgYZ82eONX0KJVpV=SrKYF{Um|RiE|B;W@Hl54w_Dg~-i#r#i5G zEQnqZ+<}MA*sH@AKvYG%`@h5!*~K8zqVU`+s(z?1VgpkZQ0Y9Rg(VcQz5MtDFhc)5 z6T=x8TmMTiAL?#YXV50Ki`Z8AUB=8_miN#GHct0$)j8HnwEp%fdeM6W@f(xn@shn)+^6Sl(}RF!HPdrs7swJCt@TT&u;|IIS9t+7*ZqT7xYpS zw*Ia?Fg8KeP(@J3h+KxT099Lc?(BBu5Q#@fzVw&&khBV9-h$U&OPe(L@`;fOUmWX} zQ)vW*z5+MqGB)@eKBSAMA}^Zl!-}Jo?mD5U;SB`G5F>lm`zB1vCi)|6YSJDPx5$;a z;0nR4oxNtaclxI%5gqL7!fH$${=DrvmTvsWgh1F3t-j+G%pKubCHs?PZYh1IjNMU; zS|dC43RK#fr4r#@IyfxZNpu#fz)Y>oL_lj2rJLd7l&rh>72NoVB9@_Ql7wt_9UV_v#n$BuflWMP0ZS)4Q@^4I&l>| zlx*9VG?&d->a~w2+>WNcnLyNprd9Q$$cb<13nEyKwxX==%jt6Qph{n}$MZp$jbP7` zETl*$qUh|D(@}*RGj%letSUG!e%Ib6_yy*4uHFG3v=W?;{^(6)%)wNVh_$F#vwOlj z5_!jM{O4avybS}mrz?!d4o&V|d`zX*J}>sS<+j)$^@>%Uab*?@J z39s)5-0ew}-^xcQVp@7dRDY_}Kk?%Af0dh|yc2FpT~62za87Cb-85$XGEp#^#u$~2w$i@f0x4sOaJqv%FaW)`K>RCw6Lp~RzPO8ov{Z7m zTVI)GMyGzyz2AKM9Yc((2*Q)39ceWpj1D1mt~;ivoJILaTD*oF$dGgRJ@!GnvNeCU z?XO(rTUB}3Z5zO=rIkpx6B!cd#7{mqHGYS7^nf zh)ROD(>+Lu^tr)-L4^C`M8UAyb2chlTm^NKVl={x-vV7FrvMKo{S zTurV|3vdkP0)JxZ2UJ}LP(Q=NePu?JzkGpXGADZ$vqdKv=oT@8rlP&d%hzc3n4-xl zOKCX`!C>P_wc6ursACSM_#9JC5JPgG9^~*ba(Y_y+fCwp#%F86Kzwg7MH$r7&#=Bf zA0WuRd18zD1r-@=4Uer<5$-hd9kkMOt=}lV2bEi@op2&r*ixU%N=uo@h0bfrPCphI zTo634KY`7(PZtXh?>!+2C12T{twql_WU4*pN~b8aHbDF$+%xh}D9O;2PGp*0z7<}| z4QGDMRvfk8AqEGTPUW}W@t*Rn#}BnK85O(H^?qQBjKxtCv_gVjfaaeIEe?RpJU8Pt z>f^2w3`$BODpu~}Bf%CQn5FU|)rZ4$#k`7Vrb7o#BP(_{a^=g2`z+-YGmLGiYW+l& z{kSg$T;z|3;_}--K?dCE#XH^vVF=bkNpnv&-KL>&oMsXp&=_B<7(5ae*Lae*@8#tDu|!o+R9+4c3^;%$PS|1Yzqn+ZfKYq#$ll^Ua0r0`gQ=fPm4_{*w?^=M^>x&&3hrxx@o?WX10uEkN7q{qzzG`gGd`-Xy~?a zrWW{lSUhJN4Zr&Ote^O1{->((G5YJ>2Y9ofHbG5C-nbNGjckEEOz0|CH;(T|6Qw3$ zaApQVnory4Smi#&zlY56@2AIIUOeW?Yg>}P0fW^6|1#lMQC?}RA>5bummYFjdE)QJB z4>}O$xCEu8@njGB;FjQz*20QQPGFm1CtCLtWwd4z-M*Oxqa#oc{~`B zo98sQRQnz8q%LtH+B2~RQ zGtjNEn##JPVsp-_UyPBa_{LT*kR}n$9iwPHa5C464ywsjm{E07dv-vCHkJ1mG~dmp zAurhbSdK5lGdJLVUOU749BFGhR8M@-Exx!2|y_iCOG|A1Pd;BKMWafv?dhtJxB1DFUnUs^gU4SafT~Kk&{LpPa_= zLpj53H?5+FF~jraizaYYb*J!Q<9smvAuyc7JQRyK&<{Y9t#91bR8f)R4C(Y*$O~Xt zW2V2_1H*f$TP+$!xl?|yV<>$x(f?HFrJF?gki&_+WbYbu7D*s4ZCbg>@ zWl|z2eubENeBZ3f-ClU9gR44Ve^F<{G^NC1Vh7^?;Ton2G9We$wls!3cw#KoO_+S? zJ{f2DDPh1MyQ;;Nb5G4m-au#0@Q`AxdYToulAXbT!bV%8iz?H4E4`7wlb${;cify# zzvK!Jb?5&DW7d+K1+@)aX5=)?n~&dg2|XTyc9qQ?pnC4T#AybRxucTgD#%Zl#B8$`ANui^E;Q??i^-RO4~M{reGZq&*; zfnjVDlA18;E8Me-#=KIkw#X?rW0QOjuRp<9KMq<|@I%y)+V)GPyHXBF$$IVi@z*uri6z6_Z072J?*48a zdCo3dK+G0^Jx7A3=jMIL+NrPTuRyTJ6R;^e-J=P=TEU^g+CX%%1HbFok3rkj;+Sc zX6gUAaR0UPp9@Q;>}R-Rm2YgiRMNjcmBm0CgnxV^LuNiMF)br=00I01hEsvuwD zRO+Rz>RE<-yXBThAaegj>6-xmy>|Nvi~hYwKnwSr+!n_F7pA?U%M_+PI{UUQa(IJt zYkK*YvJ-8Cabra)`{ZTvzDwhZSm&P$ya(97m;Tn@z(Q+rOfg-`0*Rk{wJd z>lfD+c6J4oK6R#@w0=1DbIpDiDA%#Se}P~5qKoIG%?-nM(Zx>VPY`lmVT$F!es#Jj zUsBJov5f2vVDSaF3%ljJ34ogZf3Htq+4;fml0JV3&(?IUGWt}?@vzhID2%fL#bx<3 zSVq@qeEq-wJX#OG7zTYH*P(re^8{YSMn2Ga-(e7QSKgFhm@3U#9oLr(D9DIGOSN^&WEX-Xa8Lo-^4Q6ADpR3mv z>}?4(6--WurMB+b9&o;Vj50@jEDw2e{PpN+eW1vQ1M5Uq%Wvi1`AwKpwZ|97y(MED z{QnvJk`c{&BA{>wWG`EKRo525fTr9w95|?^x~x{T{n1GQZIs= zp`28x?6a?1;pSIeBAs@(G+kEV@vZD{S#+zLD_t_3iFefEpPQdF9dyBUxVTR+9lt+X z+Sh+Z4b5A|?n_JLkZk*-(BVU#=4XW67ZrMo&nCIduicaveINPeKNc5?nTTcl<(izO zKNnK|To}xM?Dey9+?#Q}dyA(3sgPvne;U^~-)*S(bCvyVcE6p~H<*)ag4g11^xsaA zmU%9_)~hkdv`%FMq~lA{RXpsVYnvAP=R*FrmU-8~ohd%`09D<+ZE$o1G8XbtKa6^N2N~{ zE_`JtLaw<^#$~0Z$?hUu!gPO#R{l;+JGh|#LU-=yE@Sh`m1l&4n_74N=1qKaW|Hc4*i7E$cuIzbV!4Iq4u1BP^7phXX zO4rivP3})+8d}Ij-gFkfvio=Aim7L_S$%6%CR+--lUjtY<7Gmt4N;=vYmhcc^9*^A z_rWspqX8BNHBRGLI{dY(rE%6RHOO1NxTGzlJy=JZCZj? zV>t17@a+%kg*4oG#|0<~Nl>KguR1^oiw6F)q$gVy;7hZ7uKwn`nDOi!gx3JTVKua@p(ksoJ5hOqX0U4|{HbTGb zMFS(c{{U|3D@`(<(YRF?UB#VR*ONT;Mg#Q2++0<+4f-|(L0FB>0A|ixE66s8O)#V@ zK;4_C;Chim;+g1LmFa*Z?Kvteng0N(KWroR)@QSJp!)Nb{;ZIml1kX!tQZ?v+Y7*8 zt=b__v_TS<_@cNlb=W;g)6bAV6yIAq`6wQigtNbzIQ|3^JcYWTViq9~T+w7;(_C6G z=)|~>6o6C*IJXyN+PT{YU7!hZ?#_vQEi_NjT3Z(iJY88XrP6@9YlVtQpcqhkkS|h4 z`%mghiBIY}5zwQ;A0jdNSPsb1UfuVQ9};%2QLMm4WT7cQ0?z*cTd_(a5uHy$NdYR| zoT$9`4{-kgO&)llqI*E7?N^nYpi3YTblU7gD+FKZkA@3C zEHk>0?S3QTMGEkf_5z3@@~v#HJVJ<}Kt=J6V&+1mTUF5eT)@3W3(-M=V0nHElNQ-G6l}mb(iR z4cf*%Ic;0g{B3LU?hxLslW;un2^U0Yo2ek8L`4^!OQ6LNJik2}YXqWrOoVM9+SMh| z(I$<(c`-o>F^HT}rHo)0F-<*x3^iruWYexy1%%xQQrj0e+2=muET7|6HWS|HHlPBv zxw&J#uXguSI_*G9bM90ONu2wI+mjnk>w^J)@aEWh&wSbJR%*MyxC$Y1*;!qkBuooJ)}p+ry0r&_ zg6XV9(+?9;kVF$8+ZVWufHamalt?iCp)RSrMvoE;lpySXclcr>YF!7}?3^gU%KmxG=T?>t-`pXzAt0=)r@|~&y1XmS> zej^N3o}@^8M64)>mElQv1u9F!&bluWue%sQ)UK+cEsUBG7Ra8xOGSZ{XFOnM47!J0 zcem{*tX=H;Cmb~?q?CdW78Xmu``??i?NRr!6pLNNW+2z~Lq|cNFB?i#zpsea4Jg@@5^Uq&%bN7IoWW zlP>q2tQEu|{{Uc&pwzQv>f82ccY1dfl(l1Laqd0H$|jTiA+KQxpg3K$xv3~h zD`z$&%)s7{4@iDg4T)Bt*xRFL>FEZ)x+Vna3tEq8l${(sr)GedC=WRIK=>;uv?YQv zv4TTA!GnZA5CqS~2&kMyuV_nX+}PNcL+)5mT6WXA`z}TcIwN_+;=S3j&&*cC`fBN} z+a@Z~`39p*!p9vwUtNE(1(M04z1aB{q*(kQUsH1CjRtyftVegT@Sme)FxVRFlNu7j zO3PYxJCjN&R;0Y~B1(ZOQq$Fmyz?#5rxf^n>o%yZ13K!!Rb(<-#q+V-%?0vH4-8hR zOf}SC6U6Zj(HN3QvP)Y#Mk2jMMm8pPHtqZdb;`=~y>yE>q>>A-Bp#Ugc%4!D1Fo36 z7NC_|VIZ&Ot`+kaVUMO7LUri-i^31{2SfuaPACnVTa=fCZi3f ze(i17_F>(Bud8u8+B+E0Fvu8ra&7|hQmiF#XewaEwmY(9*(?$X#GyeL7khwYsx8Y) zn|s)4emlF4>TB5jF#Y4n(#6_=JKe355uY}99aMeUZ;s5Gm9}qa(pXnqe9d^W$Wl{L zq**GrE#$;KGqKKhSr+8V!FN}9c%KYWCQLGcT#+g|WE~qas{kX0`u+}I$=@b;=q*xr zgG8cS1xZt@G=is^<+FU4ynH-2qvi-9DM5Hd)mQ*xPbBsheh5reZ<7?W1~I;`zOAp| z_hCN2ZteTBd2iW}R>{xsDX^RS$98O^xmhpKw{uv-il#SizWo0H0k=CD8$OK_3M6V7 zOKzs$r{U3;CRW`~F8rByB#uC~eSHdK!y&$Wn?vi-vr}~kixPb-PrF)=IudntXx*G$ zKCBQ|A2rq(GT-NWW^`VuxR4bWzBu4*BQN;!Y}WWToSGQxKCEp20Q~xOwY_n-&9E4F)S_mF zR^m@cR!W?q4>r@@`LaUK+N^PKE&?#Uh_oMWY3RV*x-rGk^r%)l_UgZ31TVE^x02fce&i2d9dUwm8 zc7KCauW@6$2IR+e7T?3%mHn&4$+NmwEc}OdOrL;b-Mzvc(a&~`+1 zpl^9)gJ5HJ?U1E{n$SQ~80W~o*}x)GypsMESX zW}T4LlOeuLyQ`O@3|Ti0?c&~eeht6$I-W0?%plCTX;7<{ny>K%iohG<=yG`^zYq`B+eVevCM8QmwxcyRz}|7$ZpYv zyx42ej$Dffc?csf<_B_TZiYy2=+i_buJ`A3TKMI>G-7`69&lo#WNjPmQU&#E!n>%d z%&lbKg|qTyx9r&?CA^t>UA@*fFLK$YfRatpMp;kMlVuyHFD5Br7(#h9yN7f)SD$rV z(VK3@Erc~+PW7)wmwsFOO{j82*0y*sxBNONO?q&{Fk zu^R9-uEA$Ey9rn5*)`FG;$gg4Z6k(_<%6SpEW1=~*#>tN{{S80!DfMMkl(L%>{dIg z(dOmnyMu17;ZetS^>21muiv_^OQs;scD8lq+FKj07oWkUw@16*$**4F?*>?FF7OJoAxBde<}8CMVE475JVeosR$5S)xS@#DL1Yy zl5^egYhrTq-Rwz7LovRVHPh9qMJsdyCq7I~Qr_!pzvUjSM)c>s#gxh?_>nl>qh^}N z+crD9&TO@H#Nfsj!xdwqLnCcV51K9NZewSl)Oohips1G3G+V||ZNsZX*_6&Y!s{|# znl?>3mNncFV`W$|?%w%#`;eR6+bv#KZ5!X2yCICz+OIOh9^nbuR^!&TPSsuzG{ zys`BcS62NRs9)*^kzqL~RY>e|U}st)EM-@e0?n<8q%2Czu2jr5+T-PmMZV3}`0~YD zCJQ{#WusRmxE1G@lvcHc$!y|kxsbbh#-J-(Y9hEQL-6h&hFdKri%VsXX_#x?TIkJfoZ?8#(T1HD_6ZyVLK-&WmlWrQ_W0^mH)RxrO7I$)a&bYt|S zHx|=;yNAD);@E_pYg0`^6pRFF_U6-uyV+=}ES4H7R*-D>V{^s2L{|@5vhExE_ZcRL z8+f*jzf1WR&u$J$WDOZ6{{zXjv@& z&Ar~yw;vP*n$*|<%u+T;o@^<7^tHd1^emU^Sm6uH-rX21&#MeM#QHWUomooHpgju_ zhey$;Ff)KYe|9$YyQ3U8Sc?L zjr{FlYOkAW+urJ~-g~*Cy2mcE$%5X%#)_iaY*v=}_gup03mcwlz~#SI7Ztgv^xa{g zFW&w4@7)RAKJT(@vN4U#b8Z2+ghAfq*Gl}`DI?rTfF)X_=nEpQ*K6H&@kv+seRUi3 zY= z0H$ekgCDC~^ATgc!G@l#y0)8$-E8*$FGX+GeEr(*DS0$27ZmxqF08n*-u*Cb{GjzC zUgfy;BcseLLFtq$>ctS`< zx2rny%0QucM@qn55`h(1s6;>0ctsr|21Z^KPnlbUl%gm3od-A^W)Zfq*vz)1`NVN$5RyUp-sPyDsh8t-JpK1C-qu2;|1nk88z40Hq0{Kx&}LfFEWfsvKKGKhU{diDIDeM(vGw8 zsg4fhgZ}^)OT3yA^(%FV!x5LZH5T1U7~lT@l(CMtG;Y_~w_n-0{^mA&wShIm3>YE* z04c5Ao)S`wDP0$MhH;S-XM^IWP>~)9DTq&(h>#&9bLe78H06Ju$P0!ep5wX@d+ z#Q?9CR|baGO_wnqh8SsjpczkJHbp?TFWbwT1&r*wb7xXj^3@TSJkgEDi)Nj~Tv+mbc-M;Ow`0tx#=MH{sH&?4W^K`w7wSVdZP&NMGkeP(o+1GtL zu3;slfLVQs3t2Bpk+)lJzUWO6w+7xGt@=p9ueI&H+1It_QBYWb(3&1{{{SX7eZ1tAMUG!>!c1=DA`eCyYMR!^Jzjp7D7WfE`raN(v~JGu zzqES>7Xt2%k;u4tG-p;zu)}^6y;wRW5^wv&w9M%qo`(z?7BBIi+s&WNF5xy#cw;64 zr33eI4?P(xJX#TDP^$JX6^K;2tNdHF+tK8)WABS#Q(8VxFD6>3>V3l!O=(?$?rY7R zcJTpiDDPm^8c~gABIVtc?MCvGJ(gC-e4CbhUW7FxBMf3uC1XW*8}Mj4u(U!Dg3{y~ z4nKVwB!14&yUVmVG%5a`(vGgaUv%j9Or_K}(Oq3)>%l=_B3-=8HYRH|j^!y_$cVE_ z(YR?UU7+%Bl!!-%t$&%viQdl7)jKXX}Ym49j{FuK~*Y)XkXRcPwP-1FGn znQj<}Q5?MSYzY1_<~g>7h3P-k_f(Ww1B8`WDEN(W7MTzj2aCyK`Jg%@OIY=3WMVWh z88ilsSN0L+GrcU0_mA28Ho{R^+9a}+#OjBWFy@)LCoZ_;{M^=7h zhifpD1>YAkw$-n*dT)2Nc683RlJ%2c(z)-Sc755gY<}CtubN=nyVaKIV#juGR!!R5 z-`$2je{EZJHN(}nn{MLSGS(OTQ+KinZ^^lG-O^}n5tkoNF02LqO_x?1ue?fR^JUo$ zQp9K@WdX^(5zI)_zYLKra9OA;pzCLVCqk6Y2 zTXNr#A;`AwV{*28>D<4AdG4l#zKy$CYi+@@hV*6J`>55=h3_#vqEv~VK@Og=Fq!9AjHW7 zN4s!D4ZX>i9;`X!$-8^~_8Jy?Z#InK)8CU`(ur&1$VbVK)S8uLzkM5CTRJyB?e0u; z#kadzS#jT&cunp-*RLgQ$GCI-zik_Hn{Rh8C*&9cQFDYFJ@2alxUbtr7@zm_(6rJI zb9vb6tS$%DG!E$5E=oO``&jBZec5)kHNg`Ccbc^R;g@nheA_v1CXK@?QPD5v+xdsT zcK&Vqu@%T1TIAD<*<1N)PT_-d&wX{zk^;%K_xE98Q3;sADi9MoJa}43$#0!6-57Un z4U2PS{?r*6NZ_S8h~BUuw)NdwvR4po-Ql+gpGexQa2}k{HXB`bSq3}i$x`oLn1+Vy z^=;so#V%*JTW@SK`?8%0(-mRAO zMmqU23lCCQZpKFE&5~2caSgiLaEoQWt-Z~%)su2+tj@h#cQ);BcCf{_hq-RLw*GG< z(X$75H$1i?*8u~02@QIRn{_-Go8g*zb7b93bz8*f3vD=2)9S)%q|E#?gr>poh&x6p zU%yt!y?UT|68BI$d@W?Enb8j@BWLKX8@hY6ar5<7jK1U0G2EflHuf!L%R;S}AXp3u z!IH;U%``D?aL3V|dE>^EsEf=L%`9{x{8Z{_u|=Zoas=2d#!bsQ+3xILp~+A7VOt&| z5u&Ki3XGB$i+58)#46?>Fsn#$8@}LgMgnUOZj!d9UC1!p_Lwuf+}rfSLssV7vw64a zQ~bTPX<5_Iw>;@=v|wdmybmUMVesF4G-1nmv|E-6(b$_MLIJfrzRkMWs&CW;V~>}& zcIWnNyqQ~u+WoGtWD=rWoQx_1^RysdbSB+s_|M4_K3g=fJ`0O&5tab zb}(F%rieK(j4Vy=)?F^k4otg7zpGxpv0$4OdNCEI{M$tRr_r!n;n7vMmJJ5vGW#|= z@@xIPm7$L|OFY>tUFim&zR|ELzDgByn7f^KLlsXAbpkyl}}{m*wm1j5kvp9p(3D zdqE>Sd(yp5jUHiv1xK4hx`SNEH*+c`_KaP#tQ&D35Yi&>8jhB;)~-bpb@F1BXSsD? zF4b$WCj2aLCmM#T+KUVfGkW+3P;;d)tr}B`=0}$>#`ES5?qg|G#KY0tKyK2cLySRQOf~-iC;YTxYw-)9 ze86M7JpCIFM|_{;*Z6W1)e{wGUaZFi3R=W@+|}t%4Mf$i>bu=|8bcxP$)X@joV;9} z@^1}mp$b(qz7k}p%TW;ogl~=U(%OP_8zeGTshH|cU#hs?ZU`a&03&R$Ps~>*ir4Z2 z&l?p|>E^JqO!2MP4zyv+uykRGtgx_@7qu^&!Ym8a?(%l5e=(2JHo3MhGMqcJ^X?rj zVoStW;1k8>E|Ku4YAV;YE1Hn0knsloqoah*ZcW6CdNS9}-OAarEte9Q!Z@+0t?`P(Jecmw z8d9n@CAV^8Kp_DpVklBjtHcFG3=Ck6E-LD*yIp)FrVQ{AD4(jc>-6bq0I8}rToB%F zRAo|y(mzco8vYn;vZagqo{#xz*7Y<dQLk?lgMgI2t+!9>Q-KDJeWEsGn-yP=EC656XAD# zS?8@|lPgnRCNQp6H7d~n`>}gflRD$oSqkLe({wc!hjckh+X-OKy;z2giRBhgc00j| zsH8738idfXjo9atJPgDq`E(1AQWz?OG8QQb!lO-$krnH1uBmx3DGqS-=*pKZw584u zU0m26OYyuH84#Cd!*YKsBP_%j;&!Q>jf01g|vv$IjMIw-)@YVr*c)S4a*) zq3Os1b&Cl4X1zjTY|Ntfgb2aE8FH%E3 zbHsZ>=5=Z= z@(f9tD8k1FG9ba>7bogH7dm-*w7ESMQWMXPT&95y6iy&#W2lC#-Bgl%x zToWS(%hjt$Q43HL0zjCl%Jwm{pnKm2#pgrUS^le?jn5k1XR`h;(jeI&3oYlY*=58b zfhsj)6;*gD%n&?`s$+qCUMl3mMs=v+Dj-%Qa)r!eDDoB@8h2#JSzK? z(b&?s4!9D_Y*tkx5maG1;<_*|VCbn-{{V=pvXc~;swJF7bjJ|TMWY3^*=Ir%oMOb) zzcw>Z`5o?3liY}H!(HOZ51W~@lRBy4KqC`PP8G7vUM@zbYfNQa7EK?pzIP(Tteps6 zdlZ106}=H^Y*RFr&8?kwnQP?PXmH7|qOWAQ3|J8kwj56;iNeLcqk1MbOPfafE&Ckw zx(y>Np${;^(+n;5v6taKbKVV_MHII#VR9l2Ns*P}V=wl>r?c$JoL*FbmMFpp6sao+ ziE*^XNN*)@0Mf($QHW^Tf6e8}CZ+=0eZ7#$5DgY|u+{xe{joCStVi%gvwnL7EnH0yg?zjGzW(9@f64A zQlXSof5*zkbZ4yhHa3{~E)@*U4;qIHM;ri?8>jU>=Efd`a51$*P_GinHMi&oOz&!EDd6q$3grrbe4<=Dys>fZ9;+8aP zb=s>${{R#$re3M&#_+t#{{R-xNc*rAC=8~@p1~aBw1$Nr5vNQPbR7=a;ANiph!0wJk}8NXKbRAA3Nqks|YEJQH2uWLX(82V)M?D zaJt~KJSvzVJeb^s-1iR$Fbdw11%MMmbK2Cdr0V^z3 z_>Ry)unMzOi6-KJ3eC;DUgV*YWb%iseS}Fho^dzF!y3y%(+wA_?!AxG(0hTn3|)Iq zv1JtsKg-HHENejX-^A8b`J28j%v`q&_a-UnV)bZC5YX#(`CgHh{{C$6z6)@5GFalt zX@oMrDM6jI5cVc2a6~o9tD_`8njh`StR(Xg>N+q2t`QsreyjtFk(&J~bbOU2@&1ZPBG>(IoKrx6~lMQ1!Q;d86Lw`J!)DcyOXZZ1AKwfeIlCLZXqP zscB*%A`v`PK{N@0NI=%|63X>XI}iP^rdJfs=D;YD9wY)rq>AKO0j(;BKP&J{lLJb> z(rjdrG)y!0dr7p`i8WS%cd`0tik3SpLJ`DP+45ejgXy{>{{S4CP)b$taE`Ln#gr+6 zp`CX`M(xL1rMSh~{pNzI*#II|J;-{uv0a?`1wI4JI&I;2C}*iHt|StZed#1F3|M z(%SD-VwiKk1aHzKD0{~&*kY$O_14CO#|zSpCtz%f9W}leLeE>VY-5t2NO=a~l~XLD z`=Bfy%o6debdzFdnN;P;qIvmjd8EX*ee;VOO2*k#79mDrz!;yFE}KixbbjSCf)*yq zu9R@rrj2CaO3x3ltruKt)v_HKRsrZucwPf@=FX4HjMUZ=u0@>+E|aD?#{#T)T?9z@ zR2j-5_@(A8D%Por>A}S z57$;oZ1G~r`Kb9o;fz+sN+e?!Pd_a`0@pKhEkZc37WuL4#L)&7vO9;9P_fq>&bBRk zWWjtTL1HY2bQ(RulFs`3kTZ_h8OOEZaMgMqYz-K_Ogd^boIeTCAd!HZ1c$~G^B){! z6j-H=@B=SWFx9O{Mnxft8uFV6cVkaIS)=9SE) z(2c_;1R`E;jvM_{B?zTjj%;cwNx4MwB3Q|+g{X@OPBndl2agsXmnTw6ewx@)bi!)! zfQ*U)fh4m@nFpjp-I+!I0O<(@Bg)vPz5!1<_C03ve2DcQ0Wb4awU@yk0=pgdTSHKH7v5>qeT5n6yfmjMR^iHut40m zW$9py;fXIi2)+}Y!K%g{4Dr4pa>Dp%>vakDFjxGlnz9_X9)1*(Xu4{KrAdfn@TDl3mAosRb$Yw z5&>8Na04RA? z1~&M0KzRhslDzu$Lu8=QP_?0nIAI%G=Fak&?$!wk$c^{HU1Zh?t*D#I_PmHpOcaC@ z;=c8Z5^xuA?A$C?3KyNatn<EMk zWCckXWjDQnZ=0(XC?FlMq%E26>pqtiGYr#W-Q)9wl-x{D= zxCclH`GF~N0ue#DBYu}H$Rv{ z&nPJD&9RDGbOu#MLGh(3CKXq8ZQxRsTn*?2#UM|g-Y>yY&1Pw}AZFu$Ev>$)4yT-yg!-B2A>gVw5G-KWx=n?S+qMH0@uB_^aZ9l^I2UGJkuxmrEXW2+ZL`=Zcf zuwNbWVpb12h8DZjnmDeG-s!zR>OAQ3_GO9zMpwo&HI$HoGsv?6O`C>npJ=6pwWfw?=ef2+qnCP2Bp9R6N+c{Vhy1=z0=XNT!2ngfz6iCPD;k|Mkb9}jV+my8aSa$M2XjtKMUes zsdOg}Wp1O4SN*pXRf?r+q(`P~QV$4)x^Tnn&R(x-dRcekI`1;wt>rZ;cY7s4pVLOn zH#RQR_f~u9jv)TJb?F zcITV3sFM51Xm|Q(D<)+4r;;T}(nB9biyJ)WRkx;XDaz!Y6??@kF7-H1&}d*|AdxlW zc|Ufvn#NEZ)1hczAJTdpK}ni0ubW+8FK`EzVKuDV~}|x zf}B=RXhveyL-Q;bl#}6LlM=2j*o!`oCOw=JghJ24w<|_;fy>#6wk%EIlJ|2}K1^Hn zf2%qy@@~=VU^?_*d#MehFXE#0oFrPc@@?;7iD1Uz=EC?b?z{*N;uYn(sTwEqRX9`( zXsEi96BTY1h;WL)b>0zg&J@L1JYfkyyBQn^GRd8KNGQN8i2!I4Cgm(lAV>v&R94_l zOhgJ}Jh8GvK{+J=J zGKFzG=)(}tCA~fDWUiCKejZWP?KN9u#EAJpOJ5)2FWlh7*B(a2 zVuBI=Jy;nMws4@DR~Q=^YI>^_x;au{2{pr>{g{%jyFgJtmDhqG0F*dJSSlaYGr|Xk zLRFGXU?k5x`o_aR{U8y*|#h1i-rs*l0=1-KC!tqDJ7iITu~$)vmF(&d4;7OSJLpZ!^TXq=OH|Kkvz(cin39lLBW4LIjh7Hz_JF4H$t${ZQ!gg%DwBAM9g_J#y;Ff08fM zwp(~dO^^Q3Q>Q=$uwv|lw2xO;62&1&Z;87|T~wLmuIZvjG+3&{#jN}M+a$&a(}}=@ zj3Zs|e$cGH>J|bL1I?%^grjrRA*DccYK56|^c0#WW~GZnq5H@ZrWXCUaMDoO=)xk3 z5P=CMlh!3rRT0g6B9W}310_Qb;!@Yv96?B|$3ar)-*!r;hRPOt1R*uS zKn7#EMWyfJHYPE77O*X|A)1)pD9 zm|G3xN24#o^14NHLHlj$&kL3k77XKRwILG_wg4jzSS~Dab#FkoR$Jnw;ff0N&c$vL z2NTMo2^rE{&Q~`J&Y^?dqPrV>G9Q)Mz{P~5gQy-wf^Ll18@f-)jqgJhf^!UPGtBkj zO=N|G*o@sIbVee#Wp@u%bmfae=6AGv!!db1A4Q7D z1#Rq};yN?8BLD?LzeHzW70($n{{UD1UPE8OKgG+@ms{5sR{^M{LWq)}u#9nJtXW#p zDc9Mfiq!+?#GVJC6pzxVN?23bDv6A6lhiDa&&8bRU>AoLX0BC$#;Ij8`H4!mq05CuR~aJh|Sy+$$- zhZL3|!IUNvqLQo3vEfNqqS=jLMHpMrOtTi&Wg=bt!gd*YS&3zmy*bPhRb?p_G-t%_ z28Qb(# zApm}0$|CKdA77}f4QOS2*}|lVI%8c3dF-Wu2#AhJ*`n6+$^F6#r?sMkNf zanXog8A9kz*maXeA50YuraPR`QV=UTCaA$G22f|=W0pj`5BRwAI-vn6isNV*b7NSx z=DTa>n?ka|Cv*-Vcuiyl8pOd>ClSEYn@zCUxP$aQ^^^ZxjCjx#o<=HT$u8URS~= zaz>=Q04v2~2@j~=7{lUFEU*nTF|CV-#sNcW)rC>`V+QQ)LU1n=M@M0daYareghWDC zh#4-K-Ljc$MJJ3;i5+%);Jhc|c_Z^tvO?$!AqXx^ix`q{3%!;LTd$?XBd6UM10)2> zu%tlnnEOFm1sxE*5+D+$;F?+eLsTOG56n77Xwb7*ZCkV=un$0CR0(H$F!$zofl}Ki zY<4T8XuF2%^K19NHsSGFWIcvUn@wJ=<8MS3NOLGNHlH@b@J2()q2BQP%g8Vo?>2PZ z-5CW{tF+Ay^`PPjG;i2fCuyL?V(W2ctTvMc}AzU1Y+L`HUeqqc14}z|;fT zuN3nY9Fd+5tT>Q-%Lq|CQko@>(MBdli@=GHUabwfEEz`>2}Cv&OE{i)z-^4tB%cXT zaikKFsR&ygdMuG4VM^jFNzSF50oSchLn~o@>_R6BY*$MeJBb3zvKi^3v$Nr<1Wbs^?s-AtlcJ=A{XqsxU5x;? zrPxj>Dw$mXX&fS{h_WFVuF@EkTXbbgmIkp>M>Axi!6)}CzD;ti+ue-1?hr(~`g@yNer=dzDwBHlDZ5Ssj9i z*%KwYl@oSslHdp)hs0j-FXc68&M8g|oe?h`I6$=)_nwqsH7R{kV(xX^y;is@SIwg; zuODj9s}w^EVkPB^FT`OJZJ9EfE`*FH`(RH005fpBY9SI9U#!?VWk}U-VG&l#pw5_+ zI=9jcfnY#dN~J4=tj`kY1~HB=6^hqX(-cHoUwFnMLfe{@3Yy9!2!f@h7R%rks#1@N z0y^r-QB=HfdLzhjN~=l-UO5yhCrVf%<1ogZVF-zb-Ex{TK_+nBx5{k&W5ZQx=^{Bw zo53G`I10V{;f6Np-Magx-in7Fy-DiFTl4WE$kAw zdUI@tBLfZU#nN4UY*~x7lSW_Es=GtNv@Vn?x4q$Kgy85EaXs2vm6wbM@mLp633M+F zRD?*H)dOy_gjazGNX{;)g%L@7Fs+{Oip+$_Q5%upc`E!AKu42WF9mlf@fVu4AM&3R zeo+w{=FbCIcxYgV5<2S=34D?a-w0I6)$Gl1jT$WX1Zhx-JW6389RXbkjPRl;14KNp zm@OE8)CMt>NCs%jN3+BJqQe)H`B=b*T~lE=N}5PzFvKEYsc4Z%CDvTUWiy;F7U9v$ z;mn^l8-k$!0Bu!(K#p+CtZ0)Atf`*DHybj(N(GI-Ovx~lK$Yv%O5z~bPT0E`Tx`9P zqy})PO1bE)B86)(M1~ZnqOpW%%pr8q5%Bn4oyO)Ow6?6lT`p^{ikxVQzU;RV{7bS) ztYThE8R$~tnJIu-szlCJNK~Ey)GwB700{+>5?@s1MyRsj?ee=vW1=kyAA(n%!nh3`!CyVRskl zEAYv@9ej%%&p&(_QYHo!NdkIBp1Ku8{g>UK6&*^evlWgKW0@jl=~>d$vJt$P{HY5u z_htD&k16S}!oosch8TdPsQGed0IAnkMd)FoMkqxhc#s<<8FdQEY(Op5NjL%esw%Qu zFYwG~7Lhx&B^^~5$|$pm{{SO$>KMCNw0pyItsbfw8jka^41`~^3{Ft4-sAWN;>+JA z`+f(vFYFcR!g*H|AxqF0OBU?|pgqTGk`?8hiy;6OrlCku zLn^pwIwx6ldoU?fJoR8JCC8viQ&+_S=#qetnIbbLNtg9(3&|ZQ0E}zAEhClYD&49W zh`KEVQi=AK;kYD*cOv1Z5NqJ3XwN#D7h3ltZ)8-L_uEw(M61Yt; zqefB{VkHzF{Ih4|uUb3~g9uw{RFE`?Wmr7zDBcIeB$4-Ecv09%>Vm0(TImx~))kPG zMv@yiUgCA+F%bx(+&f@Gwvt{v$`e%#6uw)C>hlR)Pofq(Mp)Zz#5EPn0^_{Rb zN#YPj^qHtE0L4H$zeRG|E(=N{iU@vwCw^M7^macHdL${d1^0sBKmv29a;pm2=Z9O; z!)1jUkTZ-9=9b$gb??mUxXQ>RflLwTqNfQEF@$A{rjR&TLq#xX5V#-tc}fg8xBG`i z-i??VZ*_j6VTAdS&ARC@PrgEM@c5Sh0EHn?TV}-M0KV0h%2s6vkE-9hS4uA}oG6xH z5*RhYNh>h(ZWv^zO(*Wk9{oZOVM>Y&qiVD0E3D0Rw{mNuvgT9JS{l^+z~?j@3~iL` zBu}MnMb$Eeeui3P-<{~ZZ~SLp!CP<9qurYy>?1nJVnB527ONo{lD0PB9<2GTtd+wh zuOkb!U=xILL2RK7#hn60^;?xnew9v)XTvU9MK&O9Jp?G|xZNNoRC9ZZ@R2jJZ3JK1 zs3c5<@&~OTq!)wr6rxEqp0Z%P72Qi8iYOl7Fcth&MH5MiZ+MbnDS5kUq~h>Gw1I`h zons2VAsr&638>c!=Co>hs{WKp)WB*cWFcC%6;?@+w(AH|kuCEoLI|tj@hONf2q}E! zSk((rWi&`#6(u-i3dZE}+OY`{9}*kmgkrMIi`N&V0Ut6L@lm9PP>Z2}ct9N{ZOR2q75lr z!hiz$cKHlIRkr7eEV`LT^^2M-i|43HUE$J?m1@Tg-f#7BqjbLd89M26n*6SRjtbGpFeSuM$u6 zf)dgpCVuzOS1T;>1`dF+b>H%_K3pTEuVtl5F~-2x--uOM7%8V;$Y}1WPeeP>Io`O2dviHcC1R0iuBN$$aGdf;-afY+SJC+3gQX^H8Yit zkfc%yB1_T)MQ0+23Y!BEl!6ysf>M=pN2;l6tfP}z)+r<)2wEx>SZ(5ptWn?~_dxg6 zMcm-m{3#G_UW=G`|Y)Y9UZj#DML%-|&gWhz}a8 zDa0;?+lZG`_=N5#Yf(0J&xpKFWdSgX;0gZ#%m{{b!=eUL!D5zXtpki{AcxAMqfwNbyO6}` z3}DU|jHx_K%@+l?omf2o0EtgDfzV_9i~j(zHvXT(Ouw1|S2gq zqB+}!5HC`#ZT|q~Orfuf6*YyTBO~s zG>yc(_R+Yf{{W1+MV5JV@fbqOS|Je51PsKolN&wde&o*|%xDj(&`GMo=(M~n3@D;w zUi8V7uc}6H=ct1z#vhmn1h+h7(TQ6YRRObHAhi17)e=mG@gK`N)e`il#iP`4#C*pQRzo}E@AN-xK#6^_Aq%WlJ z!p6=Vh%3(unJNxD99;o}qHzEZ%rN?`!GQ#D!__A=nOc}VX_!Y3KBn&QhcsUL4f;(KwDhC@DYeD0)# zeiKUa?IHmENjObDcTzM+;l4?N9A>QaSBU4XjFVo@AE%E}KpEW0BZ~RFWmpK;CROB; zKMd=TFw&`WN!)KN5$IMq@5zVM^egbY@Y=r#jB2RyOsmFV+AKw!<8TCo`y3af+6aKf z2)4w-L=p@f5_w%yD9eUZ`GVZV)LJvaA=-o0EQop`fGS-tJ251SuPsGXEp$zgUy4Qv zNIg!WUlCC+ixebobL;cSx6suiFaFiM?pe-?e$ z)B@lST!s%qw|rlj)pz1z7=T9W^eKLnkE&+QnIqO+ zU)Yv{B%p6xaIK1yOMg^ZRKj&tRNy>66rCs)fQK|kSC%;1*BM`jtxax!__BDunzOGC zZTTm{6XHZQ*IzlZ%;79Q<@aQ;t1h0ob17>@F}K$9CcC3{X6jg};nbFmshf5;b}kIa zFLDKRwU)rkyBInvA>CmL`ZK+ovx0d(Z>`(SDxECo5vb!|;Xv2-TpAzPII!3IDA9wl zhlfP}0LLk?kaR)Pei0%msdeEY;#=4kq1nsBAOb=0Gw~I#<%*}n81b?y{iDk!s9NE=S4hLQyeNNqtK8Y+d_F>vuAqEZVRQj>n3W!fzgL^9%pMWbT2c1MFy@Rvg>>SI_{ywY(*mihkx zB#&nD!bDiBJ8n}1)@Cm|`b9cVWF623mQMsvwMM2{)x%d(#8D_vZ%Fwvf$PjS5RGvX z2^fvtT_qemCc@&QrEGQL9UqjqDrkD7IX2ecOtEeoBMIS##bz9YW9G$b&)J}BY#o<02G}U)_>z; zvx_KMttpu80EAIY6gcgUkL*zld!hJ_C#ySv>HUziie3)>)S1Tw5|y)fyq8MSIW-jp zf;Z7gTG4TO2*}Unf2ax=*G5LT( zq}%eh8p9eUH7~+pFvqoeRLDP|1Ru-;U=KXOd?^bO=5h$Gr_(|a!P+yG%q*hp)m7-2 zg~ql7RpP!Vs$&O=Bp~n*izB0rXrr?x;}QY`8cA9NikBUN%Z@mLK{ox_AxeYQ0Z0Cu z&wQ%{wM}ee1rwr27ZCAMR87=mT%t`RSWzSh&L{|)R4OrnpPf?ZpB-xMz>Sr1i#+(X zE{IEvREb0_jOs>RJmcud_RQfF!;?CP;RS42S>g1WA>pM|i^`xIE~@MUB_cdfFo1R7 zDhM)zJZ*W@!i`LY2wlh7sR~q85$<6(n{fCEFJK^?&nB)B6&@+`MwIVgEh}n75}Rj{;7xLFo6n98-d#rBSX8)Di*63vou5zNMmY z7DmjDm$1`#u%s$Ke|95N&wkA7wvZXv?3nUK-qEfTV`6I($F+LcZov(RRXsI^joCV8 z^TgpX@0iV%qdPZWM!Wkd_+E1Nix2G+TG7#ZZft10bw$h}=gomrs_)62xCg|9f2i;k zAcRyRMpYsL5+Ks(>%+_jqaiSaqrxPE#6%uK=)MwXxJ!l9k7iJ-Bb1a*kN%w_W3N1wRZ5GXffvxIq_u~vcOaF`1F0o^kIwwkIRdN+i}%$i z3Nc&isgVFgAV?wMd&KdHKhqvlZ-U6tfJwp@l2V@`NlbNux;8iXI4s3MT~;Q3*5XrY^-UdZiBw;-&5%8)UnVFyc#o0l$o;p#<5l%FOCwMSzPPdC8^stp5mXbg=EdPyXF$aAON*@Z->xa0D!*Iu!~W6M+K@9&8Z)S*=AFJmiV?C z-`STf@1r9p_j_ZPG3ouNOmk>XFD0?-k;E`n7)R}&7A#UG_f!3jurix)Q6eM5O4(8X z!w?uVm@=zM}xx(!JD-!jcU zS8gygYh?HY#j5Qv1?pj9nbx+&KudtN&?>qWD=W}+O4o>l*DN(<3Gr6H0j{}Jp_Af) zPeTz!CnlM!b(=t{Okuq+Wv<%wpG;W1{9U5z7oA#V=RrXH9yOPv0ck+OV7bCmi-qEC zqrxpOLY9ag20uwhssZGz2`MUMClwW;S9TdhMc2VCpR$G!1?nJKIO>sFk&yU7rDYdQ zEF%Ey(NGtIEh);h5{t^brq`$`Y!9tgHX=&}^Ei3675uQXFFV$3p&pI@01MO9X=5lc z@TPF|7zne=;gR}G9zke>!uLZwpp=9nxF=aBKLhfhI7yJ=OOz7}S!h4|UITZs&?L%5 zGq0v4q7x+K+PZ&GMe}6viAKLzwN~pE31H^LG5S3Fp3SrJXK?aov2WGf@6`ABhDxLU zMS`>E^LGu}!w>kjokL~Zdxq+4*yH&7UHnWxvi9m{zLVz127csAq~EA@VV@vars7%1 z+5Ta>5mE?$?)#lfEp*SDJ^ujQMtN=j0B6`@f5nvo{{T?`0JA%Tr<;H6pYUP-0NY>j zWc-iy_d2${SYpdvFD7}M-_7VWZd!I>8+Wi3FPjlkyARe|PyYb1(b5clq5cg1ELh>@ z!9XyrpzEUm8U&0F=3uYCU&L(1fT}QOzN6Kg#PWHa!_lDg!!pN>?-$HkF@${2%^0 zGBPqh@gM#oa(~Q!?lM38On>e&Km3$`{#8H!04Vm?;|;2HHN`J4X$98~rXkMbDK zK5+buZsG6#vRFG<`!|#S0Kfzb%pZpde zp->gD@{k;;WB^1pA<5&C_6a1SB!eL*o!2Ce#V`K=5Psk9^Mm!sCcjKpOa0-0c)$CP zS^E9``NJ=s5AXBm7|PNs>OWuG$oV2f*Xj&@+?d2$+WDwXx4(?4DVVXJ1Q+5=pYvBU z(EeS2IH;l;jy`f0MIOZ;shzDf-{<$-X`6Lwf!1vkah^MiC4UJqZ_ zf1h9E3>-iDmh7US0{9aWS=5B&$JkPDC5;$B)>Uj_025!1p%79}`4WgjFR2+8(S0;X z?J0f?WD%BTEQ2Ho38qbzt6(T4wMzsx2~dZmwI3lrU>!!zn>{!F7JuFzdHTkFzurD4 zczXRmz<-PP^vOSWpFVrPelz6yW0?+5jQRGEMl1&E+UO)cW9J&e0vOR>H^+G&IytM@@6%Y$(DJS^LVR4e(fi{G zR}Js!v&}LjA<*;R`@lrPxgMJA;&+K-)dL;e=v^8WNQHLJ_D$Xew^Tc}7Tm90_m& zP$(*{avg(--=Y*S^^KNac3SOIoZ z%Ud9VajfuU*0b;SocmG_E`M#6&(qFu(a0owcNuR7@gK34Kfk;0mpN;z@i;xdZ#bbo z^`t-=3ZMwd7r*y_AET@J_|BQ*pU>a>a9~tzxA=k{rT3C$lj6Rg^Sit+SUe&r`S3UU zSv?+GZ_InvOu{R+IK{I+A5N)zImGS1|BC+eUtn32(Qr!U zWLa`U)#MPc;|$wDLReAK-L=Fd7~zp25&(DvFpG_%m4Y4+$$e6w{{RJEKj*CESN8k< z@%Y2{f8Iw!f8W}8^LRYR_0d1SocMoy@%vc+00Z~${bZjS_piv%U`A2*96 zRl#4sy!4f9bu&M<=imK)&zxWCzu)}xhV%NyFNu9#6pBcsAVG>6&xg7mko15D3 zYDp)XQDTq|5IG%$c$1U-4KLZZ>xPkGf4{YZ)Q^}yoNTXm9nABQ+{DGwcn0I@=)`ST zAJ?zn*BDW({8NHZD&|f-{o^MzAD;f7Pn<_<^>gcIm-)mGBuS}{`;vpMesW=Wm*%{) z<0tC=`Gd#j5rN@ujo{BGzg~y;u4JXf-!uH2arVk$eXjOOYF+8Ru*W+WTesi8lXy{o z?|;91E)S!Jk44M&uf8DY`+od?S=amLC0mL(?|E4t!|Ma*{`~9b>y;_^uD^erW@bKo zc#H{%zP_>7SpmNL2R7M-7H8h ztjRr7>S5nM_a?Is@<;f574Tovmo2-3MXE1R75SqVd-?wWC4b4mi~d|-oT!Rv4-*|< zeZWNtzXLFJD3~;SWZ*<+{S%REWvHWU*M$@|QAf?nyq zNL~x3U!0IRC~PE&9_b5IfxF?7z=n}h5mxPHIgKN)BhbUmcVk0R7sG!1?}&*fip=Mn-zvQ8@wrW}({O9vWggos7bClXB^={E=L07g;54X3uVA_PPy zIHgUDNUU!bS&E<};5{fn-b}kbplT0hVj5PG^z6d2(1ZyC39~{LQwDE9G{sf1VLD4H zp!3L4hjs|Ta(ETKTR3Bqsn9YSR3Q*H32MZp1fpV6_y{Xhs7*y81-3#D4UtoxC)K-U z31HqMK&oR5M*t8BKoJ1YYdb6^V)*n&*CV9*QA10*XUthqiMSkjzmI3B$Nf#-{wjaG zu$TJv#D3OMU%$WJZC@{^U%lbUest?nalft30iDt&ZNSF)q}SRBMOnC(C+g$xkU0?+ zVZDlrE0pglNgVr1M{Yy*Llti)jW3epU-iv?JNoPQ?T~;fe(mUa-p)7_I@%teTmJGG zqE#ch9FW>_fS|itp~0AhgDs|=v{_VlSvdJ4S9v71O{>LlJJ{{+v91BNEQG8xEJrUH zT07>>Po&mIEvMr%5=}f%XB?9pVE+JuTQ#qy@-B>Rzk=fcNhCJX4rP$}t>cpvCQ>jg zL?ud4X^wd%fTSei8yJNfxVXnL(-HHG2b#WqKYd~TW`DsP4q^R>Rx!M+?4pZ>y{}*k$B|)00jA6FEL;VjVyB&x$}>2^S(IA z3Ywkx@AbSbkrPd;E9AGj3NBtHWl#0{`O0ufn2L~ri+6jCdo0stBm%WPPM;8++e#Y|=>(;#WZZZ}%i zK3q*T7>IzRCY_^(E z!!eF1dZ3O@^b_d`JAv2fYdB|^k38?px*_q{m$K=6(^J!{7-5(tke z&>YFurF)q*kOEvfZ%yv&mmn&n!FAulUPv9omlEuXQdEz+Z$>Z?AOr#?6)+Ps)R&O2 zh^1!eMgDxsYb5J5D>QNeR6!e<@e(XQ4 zYzfTb4=ah_AT>B-(Xz`x2Ji8@YN(f~&ztc_HKW#5>10Nq`aj~?oFtt`G9tg6MFG`D zdV42$?sGNEjXQeX#b|q++v{Er69J<6(noueeL|1N^^=}w+%@lO_&%PWu%BFHYV*W9 zjOaNk7uotg%<4qo>1sg#0A8ah4#u9sdA6wUDTPxMKC+(#eFr7q%upy&L2Ih;32SsfmjkrwPLTIG`Y8sMmd#suO%yf4tVQQVStp( zRD?vx*dmK2dxA#QweAZ(euT3-Z4dhW@o}6wXYn=n!<0m(w}dK)JT<<|4Vp*+(pN+% zTf!q%FK3g)p&k@_%?X}pcAB$s<-r?c-p0-O8|b18^oiO*Qh^GTqRixnvxCf1t_jrL z#mN;kY_atoJw|N^Nk$T27FU9cSmvNSy;Cus$tDVea}uDqN%U$~dK0&5f#iZ@*2vf6 z{^o=5E@t2P{_T)(hg<}bxJ^DVjYDO+OoXUwWn@{9i4ZiC7Yys0g7j-A^E2OL`@Fa6 z=#BpXzqi-*>YR9S8i6`$Ir+zFJe+->*zYx$>0CcYw5g1Q*hTlmFT0O8Qd(-#XUBb? zp#sfVaRkiX<@E0%-be%NDOYRPKU|H3t0d#hy*{~)3YlTK9hHJ1Vc&Dq3F3V(@>kT( z)P6X^2C$SVOEGGIHU99HMBK_OE;idKtKJ4iqm_VO!Ai)#ZNI-)L3QQnvq#B+& zSMRKaiG%hl?TsAW{sEsC@gF|7e^1}uaujofqhdEU4F>msbm(+3&qT@qS+O!kB@8M^ zAmK!kWC_LMcCCU^G+PsO%eG#K{LfOC`J%GK?fENyz0UAspl?$OJ_GLWsMwh%W_)q_ ze{v_*^*??6{OOS=)LPhyGxaJ?B|2!5td7KN=4IN4CTx9C?bAD-w>bkwXWVrjA^s;J ziB~lp97ojL*BL^1li=IY*IB2YYU}=U-d8fiCy$mo+i?3ZN3jn#eG+;5=O4^G6T@FW zIn0QT#Y;VR=DVCt5=gJ7IS@@toxYErZzA==k0nX_@s{)UkKey}!~6T^FXLJD{{Y|X zi2i?%Kff6`dY0NJ$LRAp#w|QIFP%rMt~BfImJC$MKfagqjUqN4Nq?k~-?t?Jb#h=U zC2+TM{L(%-n8P7Q`pfhpTMiaaS|MMYFOXCf%vWkCgtbsKkz&su3d#|Ez& zbkHg*;%X)or-V_`vfZVMiAKoa1lwUcQcF*ixQ!|h%%t7E{&F0a)hz>p>CtYz3=^B; z^>%iysgPAWNv35`_>OOD2d;4hERd;qpXC1lT%I@j8ceD5h= z5gLEzJ~6CnW3)@Py&X&9?odZCbVjxfyQeZ?n}g0~9YVwi3k!)5r;#m1{lN>l>B+$A zSA%hFmbu?{$-*9g zTIbG7gSb_FJRDcJ$-FgXv%X(kYB;Qp%j#43=i7xMZGXSl=Z-B+sCrdLMP6{4e&THX z??2@Alr21*ew}1v&-Xn40B$P576VeUSB}1T$-4JzDel;I|u0$)})4vt` z-~<=J^8P0y#`mja{uA=Q4-Kf%#)XG^?^wiUQpq;?QayLQWJDt%<}cyu{Nm)uan~2^ z(XXaN=V4F!@t)Z&`?&uAc#{1+o6W0n5O|rZzgK`s)`Zl7)WymSe3f7mq>fiJ_B*_U zeqI?r<$cS^N|K*J`qc04+L8ilWF>+q@zcfZfbnSf)}zOX3 z7k>3w13qN%Cf)6?%OLEt!D~gd^)4P~5;Z8#g|9Gt9OOa?q}1@s&h_kphC4u!?)q~9 zubz`5F&s!TookbXV9310a$r}~+`_7Jf<36TTyh~czTlfg1f8TBi~M7ojCONE4`$1I zQ?fvYEiG^#g*fsosj?KB7SQ^)ZM-AQn`4oBFT+h3rM(SKk7gy0m%QH2^m9Y>_{9!k zbrG}`Fi1lJPi0JFAMQQjiQLmXtWABLArr;>cV5YW8i*h_?JHk^4e9}Z@6I4% z5?M753$+XGYja5(BFD?mZC4dh1gFOeXS7tG5_sW&cvDZ3Cs4)2yS_Yjk@xs!9}(Lb z!7k;ECP&$Q@N>EPO*?VhOwr$_bof5%zW)Gcw1#4u1`^_U|PSC6;*M zow+{w!lweYpWWFAUe`d*2*6=TAhONKg0ivPXQ&{V%v1p>?dfY;zOS@0VX} zZki;g@TZ8qE;7EyA@c5ZeUXOYk0N(*2+qqR4|hk%?i1^AlM+Lum%r1Tst`~~uDtJm z^DL(*o*3`@ZaT=$4H3-uOZ>Q|pJERij(>N_!#?QOw~s0ChtDnw)AoI`18MSn7(sT9i_9H*L zhPz3w7<_2cpu-0UH<<7sR-&p z{?C7l$&3BJ)74@>pS=C={$ZZwMEg3y{rT74b4Yt$9z^_C>z`zP55&d)02PD{iy=OT z)(uV8Q$HiSm_B(AP7IAfCdw}h;9X4M0s)G11SDs$NSk#?Scl50}=S zd~XJkFTUu#M5CD1(rCzdvRX@St46#+L>wsETSTo@D)#Z3PeH;YL1_Gl5;44(pI|PE zT~d;(3rs=1t*FjjD|{N(3YH+vNVZ$C9{BT&1=x6VdP3HVVsT@&5j|`n3@F4EwKomB zZr59xb+wx3B0$xRr0~=`)lInpEfFjfsVEaQRlDINJ2I6~4?8 zh1$>GUu;Obr{1IHH2!!NV46B7h&2BIA53iHRAHTHHpexFbuV)qJu%J8h*)okLY^XK zb@k&WNa7x<7yJi5lb2r0@gF}KQ16%?l%68~D~@#@A}Eia-+A?^nVb3YeG)meP;3F) z0H2rRB&%uaL?3g{?Z#MbNGH_zZKuYC5)~*2@JuxBqgAf<;h{n)iV@{r>>J)>&}J)A!6}k~ptEzkfK_@8E~=`|bqmzcmbR zWp>s^YtPr;{DUcDzu&y%-+_wy{`)U0FORg5lTp+jDqdc45SKhceIxh#gM*M855Hfn za>rvNE7Lldi{`So7FP%3dY{H1hBrUY@0{LvO-0YYTt~eAFW=AX=Fg`WSuE5s_+MYQ zll?gK`TNdSsE>zJuBUx`V-c^PpN=cRmZXUw`f578ch(5J&}5EJ;l*C&sV84!+(i6S z<9T=hefhS3A6apYBjrus1|O_H8_VCP-QUyaHgyl)eQuAYep~se`h77}K7DaNnc4Gk zdPJW-zo^ z7vj7`O?vsij9DG>>+e|1c?j1306KN|-1C-+jq}u95Z4n88S3^%_@kC&_u~oxmS>kG^}d5$RO}e zs!QO}CoGWZ6EhvJUs>~p z8fv{tSEjhx(&tDMXxEH#p~C~ikb0scDZ^MVb7KVbd!l8Fubk|>_Z)NwP0y1G?x@lZ~;KBj|%pN>AY^S($= zVIFP#^WyWcQ~CWX7M{V`;MCXr@r)>rJJPp)kB_A^;bX12>&9zZFO7b)Kh6ZJ%>G*V z;o~9ler5in=UCnXpD*?wsFKH**q_Ay)c07KD;lrX{TVc#A$K;veERo~Pdrrr0C-z< zxQ{0s;&(F2&wf08KD>~m8`BEA{cbQ_5Wmx&axL)Htj>o;ez=Mp7tx@ys>b1j z%`lG=T{Uw2L__f>5#47u>m8+AN4Ma`_6=8Q>-&v7rI80#4HXc?Lt{48WlL=Z#4&7H zBS@NZ>2GdUJAYnDOlG?tFV8=QuOZI4`DdD+q_|TtAk_20c4>s2&9F&FbNjx(vZXcc zimH#KraunwtSSsP!t2NK{Vy%WBt zURs$jV%%9B3&*$Q$wz(c(iEdXYw>c#(H8M;x!OnQze66?3G>A2XCB^!oXTYUKQLuL zS(Ho#9@2c`U=pi)oo#w&a!~noc0_}Z&X3j0H>i8( zePlw5&3+pF`edT{J$3H7$4}V5d*9#uBS+{&=5(>_z^K{(7C1*t!0;&Qpg4LOkvH))9E21qIzjr12DSDJQ(qxeEy(pTw2(UB+kj_uCuEAY1Fe@S1fK=@ovr38yXto1!i|YaGiu%ZZ zQ#oqw`bZy2`{Bvw?SIcXQcjeDf;L58Jf55iv+K~@{9!d7o`-$eK-dW(e&qMx0f`X0ARwcNbY6;= z*?PWCn>PrBv}&bhGhORmmiZDQ^G(S{Cwvne@8iRtDcIrzxtDE4cGCg$@+;wUf#m); z{{VmYymqH&{XV~9)OCefC4MPicN@QhgxVZyr~6mNas|}a@fx0ZI=lnoOZWb~U(R+8 z=k@&M+3`B~z>$MrzNRx%iT?m^i2Hprh(At^zY~BcrmCyQ&;7&}PstJuSv+&+SV@vQ zHw_QV$E+xi4Rj+#Upsv9fP^;!e2gL6H|fjS#zf;beGTAI1)%-pVQERr1_eQs? zi00mq=$Pxif0TMg_$|*cACI^XuUZ(S#Jhx9OxjJn!Q>o=EKljNihW_uPFvBg37)xi zY{S|)q%@k=qPY>_e&0#j0;t!y=>BdHjr=^`i_r!C=zBqr}b%Xo<+_XKA2wIrg7VgWXVNTKH9 zWx>r6Mc?4zn``i>iyGLqqZi01B#*1nz=H+PApBnTShZ_X&# zdtPHPy%LA3yb2}R1Ro%BT*KjsA=RH!cq{9cpf#FeYFYXUAliIQU^7v*U&@%ISGf}! z$R7uRZnbu4WL!l?AX_BEK=pu-Y?zJ7vV<9nM?}^C08qvRN;n>fbW1F4xu9ks>Zh>! zx}Qfpv`h^|qp_ez;F?}h4=E=RUMX(U5va-}1&2@xx^UWYRGdpbIG7`n44J8^s^GmT zQ^Zp}B~aGLo#m|{$gyykZslTb36@cv!f00@UbIZdeCwF+=5cB`<&ZRa*4>)%f?pH9 zT^}ERoOf5|-@n@HS;9-)BI|YHlb4jiW{!A-yp=x=ytO1xLWPe^kWpshTW>2;6_AUR zMGlLp7z1ovnIe^;FAVIc*DkVIN3bJ0l{)QicLwg*pLlQXObER$@J>f$RxUg{ft!Wh=)E) zI9FXRx&HuoFs%&RSs)S8B#vOsyi%1$=!rYBz0s2ZI%?u-LQ2~bHe7;rD2pVt;~OF^*K)b~ zbB%PKKZwb6AK$J*LIkvayM0V^i`n~k^;fld#Lb{)Cwt$E`c`T1AEEUYf2ErZc6zVl z<7NMpFDoJvTd?zJ2v<)cP&-5jA) ztt5HA;->{xN>HP@)XlbnK}KBp;J#n1{?1B5HXa*)MO2ft8vESY8ou-ue;W_3!NZnZBmx5>hK zHpsoRSeM9irSLNA#dPFjqJ>d4Flnk!AvvTQ?57?0ee0^pPKpE0KrH5yhr$!Kn-Kvy zOfbvAwC2fDs38(7T8pVQ+9A*dx?!C|x0u2LmQ3kkh#Hba4nq_wBO28e4HD!gB3x8$ zI&y9$GE?Io1f~FQqyV`p=W;B#Fsqs^!CbZCSW-rtA}5DN{4~pL z>#6LCgl~zH3zN>u4R6c3P3&Pk{{VTpJCBx(`fd83kMAGb_Oquyzwgw`}AGc(RmY30m?~yq)AFk59OiQY_q{rk)vvQwj?X7KGz2a?M;49`;LcLLR*qe6I5QO zJ;fCoNvwx}idPzoeh7&^=lYDafRO_t20#ogv2Me>hA&Wv=I5E;rq_CaDHM3zf{lOz%}kG2!E$u5f9gihs06uzMD%Yf(qT66sScd-@u$ z(Lxv)k4-0mORa0EnF*Z_+}PK3ffNEP2H^*0#A;V8S#p~P3E9ad+^eF`6~RPgBV6rg z)W}^-lSgb_L1qo!xblN|waE>fj?yqpi9p=3S|A0=v#$|psEXqfVbH5%d=${U>5OQS zEIikCJej6RJ@*BE#~Ba=!FS71_!@V`(^_;x$*S=L5m$hqfHa7-z1{P8Nem*z*$Ody zdTwN#DDfe}8A3yG9#dDA8p{lgM9l7i=aah7`93F3?4Sr z(nC?DV62w`3s((dAPpfV8T22ZY4e)|rR*n}eQTKZHW1kCSFZXU!|Ia1fBE~oI$8Ix z+q{zN=BJA9Q}DU)!bCnD-|VNvEoqQ}C&tSzt8-uPoGp7_dt3Ma0B0Ix;qgKCWr%il zc3`IFi zVUm`FFRyk5R3dF<7Sm#QCp}s?L0Cv=0|JulLA~CZlQ@XKH%OPNWS? zT$}7geiiJFW{LJjKE_WL4*WHXE+j^3C)TIU$*RTdSo+E0N9<0gCtr)XK>Z;*eeSUp zSa%_#;S>|MzzI%`kP25fEiXzSWRP6x%D{)s;XEMp0dJqo0`yTG!Ph@do_pH}4{}d? zUcrW#YB$DGbSJBIeNPeZEoWNfv~283B{gvjh1e+|T)GRLA1(wQT0oNvU z=A)UVCYHHtRV=-bD-A=1cWQE_!c-t+ow*5t$KOx_EC?|~A|_%^Bm%0{ep_wr&z~Fb z?AhNWEIMbr)Qf3W>+>^^0#SM;UmQaZDUX~mJrG9?yHaTrfT-UsdpIPT^yg9 zU3SJXUH&Qk=UBT4{{Ub=ncoqbeH-E1Ur)X-wqB_IQTuBF;vdoUpMlT%A75M*yUEW* z{bE0VHGxSytoEwkfqLFGneu-V_xk-Po^SCV*X`xh$|r$FktWSs#v@Af0RR=CJ~?*e z)4|Wj^B=p5brt*cjEx^K@wVHS>-EB^22c?ZFm`34Q)$h1azW#n&A0vMSL}bP$vTx) zu!RJWg@Vw$m^hL|jW@~pqY`c!0mLywm*4e}vkGEwsrMV?nfHQ_syKW=7ZbT-ZPldj z>%MMcK4|2pk-`#0I1&?SG1uTbh+gGncqT?d8PSq)qXHrS01E|9=84qbIKGsAa#`9s zQUwurI-D<8gEA2*7f;ANbEnBBE2(__>>#9gZvBD!=dfZC$%pN~^^%FUPt`N!H^sR`;Dx}5r@)-z zwV?e1^{_cRcPivtO&*O-&x-E^>>r)KJg2{Pqs2{bYQDzJI+rJC4FuS+;b~u7kU(n* z9MOk~g8QvTNJ96pp3s z&PH)d3AmT8pM&VNO*a%Eezu<)$QH#R)Fui}#BF?N&y*KbCJloDf=WX3n94vkHo+SP zZY1G^mB=JifShsV%)l!E=9stz!sw_FIJw!z0G@=6g)0s06sG|Ql5}C{z}j|&P*iAa z0zm*sX9_oMMt}lAw+dkHbus`es}%rtb8V3&!s)aVyDS-l5!g0wP+rfN-;9|Zjft5F zj<<3pfdI}B;J&aW6nDVp&MLx?BV}uPC2f|?ij>D>9X!pEA3=HH6Qr`8wxn&MW31Z2 zQu0ty+SSJ9D-8>Fj!}Eu#FSJ|8DN{Eo`0A3W?Se*UZBq!4nSBhqC){jpUxFVSzoPcLrcqbZ1*3(L6F zRlCVw9!5$DbEQgriZ^QMT?{$R%`sO9~7}0q9TlL~Gi6HhKnT=JyPdKg}vneYz zz45f{FWgb^x2y_YHrl?^c_E-I%3Y!rJ6!R2|_Aye9`=k?C)^+ zMvOCRM00SY&on{GzF)i!<)xn}5Yfh1DpEwbDHL3I6R0^M1T2ZUJPOK?a(h!C8;(fx zb|TvfnNDE@(R@PHM2nu-w9O8}L`z|UlCdg`<&_a#eUd!+0K)-c))rlZj#mYpxZ+L+ zdR%w02wO}BvI++F4Hg>Gn}=+4C?GfmFnm=f67mHfB={S6-Fw_dI8yGcl>|99u5S3i zPRmNyGu3y_nqaNOD`Ij%=>Gr-(0aR5(J(zvxz-4XnYU!ycu!Gm=7z!<8+kFMX-#mL zX@=cbY!G*QG-#uc7EQJQwT~2TnCRaWlq1awE-uEj7lrp5`TJnz+8?qz5wYF^1R4>4 zC)H4AOpwUv z+_n=V$Gj9kD_YdfzO{&?Oy7$bjsF0#;}ifBLQS6`$@YkZmOw*LB)AiBm~4q!#?U1m zjU490Rok>wnL8#n^4rTF$IiWe{LTPKp8x<%$Ax$g$YB=0UfLo-(p!Y}_DW#P6QXUL5Y$Or2lt{s5^L!F;)|_w>LD?Xj<~B>YK* zDF*t1;BF=R^hQ$lwaqc8)pMdb&SRk*0Rj8N*`7K()xrKxdoDggel&J0{34 z4aY^&ob~aN1Lbf~KPN1CMC3WyJavCem8u#Nn?(MXSG=MphIJ{&z&*xaZCQ$uAIqrj za!Ke9dr?0r%%=5#%G`&?>Bm0vf2p6bKTorb6fK+%l3~!dfS0#4g8oY=N#;T+`Z1u5 z6U+k~5bkK%=S#NcYet`8_2AF0^F#+;-_IB%BbojCeEl+h52ma8=5gY`ZvbbBin+S3 z<~}P?R|gOw56wCUjmFI}^1MWl8ucW0U=p4l6|5+Hw=5KoWNKhnq&*E}QTN+)`%~ob zEa@p$G>A90ACZ)sr=oT}BjUB4f|?_lW9@=`MP%YTL{wFqmaX!!b=fuJ4IdKO3@1-fbBNbA+j9Nt#0m|2etIx9+ zvKE&xh~~&&PcA@HGaz$X3mXB%8sUys&0*YqL?muBX^G*wQL!WjF86Q}qHFp}-Xo$Q}XDI*}0Ue`X*=gc~3s0bRS;yF~`uZ)yUW zlR=4%Mw1b+B6we^)tvFMc%#JzE+-1`KP4=|jLQ~$L`9dkxTcJR)Tv0_0WhLxpdyTz z=mN~!yqbY3%p6R(0vJl}Dgfd$QeQEDWAWAoV59zlA0!N7iufQ0!H?ka^z-F)`!b2d6(-3U?phypE-igVQ}B(^{%V zO+sc8`4&BK>&_;fTy(&_wN4w&txPMc+0W9=m2E`cTWC-D3EXU|~@;e@ffzb|QiL>_>)>yB?H?2u1} zUbuXFVZA4^(EEUVV9&}r_<4C|n%)9{=$&uF#z>AB{C@s3{{3&Pi|PS)iaaxQA-sYh z@e%nH=j~G%AaZhn0IlC=Cjeqf5&>X<+YtwYPmwSW%<{o0@8xxPI+?V5ByrE!Fa?-C zwvD_?cjjayB8Rt6*M51tsI>tGf+TVWI=I3U%$k8;!SX6^DZwz-#E)K9-PPdBR)>Sw z9=;drlS|Ru*n0{aJ7gZv^22|*j|HbS5Bs1`qIW-6BV(3>>^57x7%u)7BojPC?3C0m zVKZKNCVVy~iSDzk(i>jlc&Rl*lL6!jb1*?JV3}sTPAbO1ZlXMMD;>|Qf=fpQ)JQAT zb)1I)=vax42s-nVb3#MG6!C05LgYl7lf@*I`cK1}**!eMi=|>q_p8WYIEe2=Ul-^# zhYt6oX$R;P5kz|~AdZ})q@4sb@eUmD*%!oSLO>2?RblC%DE& zL^ewKl33iyz;NL`J!pK4q;8HRwQ@yRfusF|C#&|buZTLBOTJaoa?av7B z`#*;*m5{!j&rrW7$(VeA?&-H<>kbm!#;jv~N6F&@kqrL*N$w-g9FZIz;P`rfCPJRf z_#0QEv(j2W>9Shu1ctd4HV?VQh1B{d>Pn&VcY1y|9Iw?hd>MK8JkcZdljF`7j^RG2 z`(Rf!e{bK;o@D!Q^M4q~H_zvfu06)T(?9Fu2}tP=s6+1lS-gY8!2GmH9C1F~R-@+)c@lX)XAt>)&oA$F4oXOHN2u?^^+s;+Uvz`VKcjD>_t znYJx++c~dp=H``Bwv$Ep&!dSS|q-AcV{zCCK&C11%qCy!ZQx3*XZH+uq5!}53X2#w%TNX-^ zkwCX6%Moe_%bEufERK~Mpls{QB~Q77?-(gKlKQLl4k#{I#?gLRkGuI}QxTiv6%IEW zf7i^p+C3l3{)`EcdNuaI4D+A9V+1Sr>;4bhhfmiSMAo02B>4dTf2`JjhfBu)0DrHx zC=>Ai03YgpF;Sr=Y1bAk{U=UuCRt5-a1xD?>qZ&dqZbedn}l=lVV?n!039=O3HlQX z#;dJ%^Ap~(Gq8ie4YkUC)RCYdk0soCmuG!salljDKghGzunuQ`O8gVs&BEq^vZ~1; z`H=Ds2kv=DCOLU8uNhQ4Bj9{iE%CS0YVG6K7nc-RiPsxXuXV)3Bvl%&3H%4=Bhf+O z-Pfb@mV}3WsF>!^oZh?)KqwxNhth)%PLc)0AIgWdiBzIcw;Cbc%XaULjoor7}fkmeK01s z0sjDfImJ{!YJGeiT>bfuhMd9=yoOFgO#BjC`F@y!7hlgYuInHgMK)CGyy^Vj5@VTr zp1z0PK5&iR*p{nCtD9TEO#)^62igM98KO&xt!_V$-a^QI6BHjWhXHO*rZoQNnATYP z_56PMz*hNui5+UZt2(!YTFiJ_V4GX|=J^v5XK&d__KX|$rvnX=&rBz?r~T%yJR5@kf;cIa5J|onM3DpRZj7-h zN$H~d_ISlvK-><`vwH7d@y0DRyP?@d{^~MBy_9Yde6YlL4d8$pYjG(K?3kTNGcv#e z(gANUGDl1}kmCLtY47g+87pYnJ%jRR@*?CbVROs!o^N8dqQ< zV$!vI*M9+08v%Sdoysb8QoGyzM5+`-ML66-N?DSD8UUh}qHF~OWLWd%>tC6&`Fp@H&So_p&OxSHbkj%TX51mZnVKA^>CzxH3 zV_Nw``mdAKyTrvLMX8vWIwVT9atSi?p(JQv<>+3B;|8z8F*M6hBe!u1+mmG0nsu*; zBdm!ArK6UjeQn~r92+N}mHz;OpuR2=3Ivm;gX;ePS|mKLSQ?(E`PN6J5-MwhsGd>W zT3``{!Yu&w+_&}R$SO1>_BQ)uX-MDPneyd3YK|!fwWL@(4LC%E_FgRs@htxUTAh&- zOWFzGho{V zd|;mc08qYof!~d15yKCu{(tP`2P8=LXXp5E5@%$65>M6-72X$?zIiCu9~|o-ot2*e z(Kqd!<&sal-1`-{t(l?0DxE#=o_gmJ64L(wF@w!~&e+IDL`$mxIX$_(W9e!&KS#Ow zW2|?Gi1qq+-mJzoUvBSTrYv6|JDq(zXkxf3L9}S(g+GAZ`_6|=TdJ>m9cpWMA!xba zt_{Zo_;5-{LKxygF9X5~@x+h>2-Ehdc(pI%QKmjXsDbQ2&h|=q{7icq@U!&yhRd`b zw%+0|JIuAqQ6CR5l6TLgQw*k^%ropC2*&5TJ_GqaBgDfREsX#rC{i`a^VXMhbD&n` zJCIBm_6Y_nGRet%1LVVO^42whA-O9&!|IuTC{ zX0|^kypG7x4Zf|zCFEuy%f8S!u3xzwk{RPU{#DtU(t^oXIY{DfLnGgTi}DEQaL zDHRddMgIU^FPOwBLB;_%cv3tku1|-R3jY9kv5`v@9>Dy6rT+jjgnYlR^Orx)pE$s* zH+;Ax@*tI|-5ve7!9Y%wzN!A)gGi~C)9n4R^s-1W9g>Fmq33*2@dPVSP^zE=tO3J% zVgz&4Knb>ITa-fBRQXnBL|YQ3hT7e^TCjw!Y+d(-$JI5pKbMqbl8Yj5XY$aF_mCKo z5e<>#G9XVX>dpASyxQZh<&md|dyvG{j8;C(N^QhlqON;^PsIb+)gj@OKH|DhSkD54 zJ0>J>?%i-JK1Aq{0TuOrS2^JTY_-c@uNsH#IU$&z^l#op4&}5&gk0zcZq3B!4FPAv z(&bCwJz?e!S&!#ZeDq@~x9C5S5b>K&cj`aI3wYY0!CyyQ0J~ifWYKL0h#~UcyGi0w z{KqHb&eyc+s(E61mHW52!$(qnRUZ?1P(SGp_khSOcDa;zNMgrv1}RQn`a;~Kka&+6 z+vR)$6zNyL7#+GFW!1;>W#u;uld;rHa^D)wBU}&V>HX#QK}!vI_cD4e=MyqW$yJoO zemDG8f`3Q(nC@e&kn?2qGaloPzM0V+ebZH~czt5aZsL+FJ;tttLqhC)rx||avqawk z3(RT>Om8?kgu^hG+)&*Nq9z1F0VKl_7zK|L!b5?nNRxFJ1z8J0z=1b}dW3udO-1VX zp_Ix?fe0!IQ$Lf5sK-A}Xna54F@e%_K0fkSleyc3L{x*#a`yza0TH`_WKqGCMK_{~ zVemqNSg@p2L`JSE77OlSE7}P$2fH#iI~<<{aJRpp0}Fb>;ko&z!hw{=16hQPB3Xmh z-%?jixT(^-tCLXIWl)j;UhV;7%!)VE}#u8FT?1w=|h>&saM1kFi9|1?4Ta!hA zpy4Vc4=a-^QGiWh8nUp32YaQ2pacg+DAL}lCpIAfepWDq}PMh+wx3sRglq;7SJCgBilLEQ|N>v zs)Mne)^vy~(vIpP#uuJ43|tTtLDFq3YrqJs1R%=nffjz0O->Myx%ef3R8Zn&n}25n z`u(}VBigftoRpBVw>3BK6%eDB^Yf_|lt)8hQg9t@bDsh&uL=H3h|fsh!fjv=l)I6Ln49rj-z?vbD2sem__y_I>l&~K zpb~WGDvP0r#Xv|c%mePL#K)JZRq}^DF)vlrBo4SabibtC7|F_6a+5H&Z)ENbP6f`ta3{+W!8cmO zSHL?hN2RqAH-({a!CIJJP%2Bli|9QY$(Rk0u*oM@ zg2G0IrzDUO3jkKQY}w8o2@l~SpwN*wofZNVSmQ^C{Bs+~DAm0x1@IOeR;wZ=&|NB% z@A)|(^T(s_?XJk$vRmDU^J5KH){$8x_Ar>#8{;i zlT3}GI6|yacn;B4VkI0Vi8V*$i$1cmP=XMUBtcfvo}D#?5QL+nJC7X_l@lyA&4&F7 zM#j<16dOi!Itzrfv_M>bxInN(+wg}b;BcBEQy!;F42vz3vN+RB6H<{03FO^`j#SgO zFMUc}-AmaseRF{fUGOV3UIg@_F;oIN*#spT#m(${FmVQ*2&ye~1L^n?lvN$XsPotB zCQ_XfHew(u=1;36P836>B>Imh=oGaK0f2NH;%Sa?rW?GGNl)_hx-g)Mn|V1lt|x$d zXMTk`;78u#@L?!urJ*@FNm}?~n=D?1IUc2DBL#)+F4#)6)e?{dQHJ1|GzMxTx)Q!;0xWb1UN86$iss?z;Rfsz@gF?eWWszzM9!Daw%yMe88#}0$iFp_1~;R9 zlkH{O9x{1N5~pdGsD%pg&Lpum@+Q(bLCPeQCM^K0Q^ zk^qnvLJA6KVnhLHS7mB0NVs)4DpB(^BOGi(P3)MOC<+EpWXluAFOfNBb-pvVO zAkbyWc5D(9H9pNKUPLfz0f``+K`7-Pr$GR%$!q@rbw(23QzLK0KTk$I%rzSgOln_h z!~{j+LLwR`lyA+?MB`5Ly0AWNdK_d&Mf5+>gg67_yN}1I$Vbcc{{TUg-Xwj-Meils ziW~iVE4;LybO*UD_wlzk%8@rrH}Ye>haLLU`_?t{B!i*ae)z-=yPe`g{V$XG`(~5y z-`5Z&daq+quF^*)grBN_g6g3h>EE+HnESDSik4Gb;vbSeam?*IH*-eh z5S($dX%M!&!_naUiNm2HffE;jL zz;@d!WGxfaKNe)3)Q!>P!oy?BJaSE^1$r`p0aPNCc9pn%?21 zS2;98$zBB$t;gi27k=cP1a35D8gaH4X?p-+o|i>Ltdj-P%gF@vBthWG3)GR!A0r|` zl|s4C?Fduy__R=!{^-^d@rTl91tYl2WD?wf;%ru#}zm+#(14+#`O4@$YvHgf~*WD zsr1tXXqFf(K&yBPBY}LwaRgT75+7q8T&n|Wd5JL|9;Z3YOMKcVTae<6M9D>F^`p~O z#{yl_myfhZjFU0O&IB?waTBDWrf<3d4N6N$4I-P?@*D?~P2C+g2x4MP0HlF+wAvvM zOh@sAR9V2^g4!s2*p^s*2oo4LZbifkECSP9LuCOLvam^b+-?gPz)CFByRj1K!OB?! z@ZZ1!8@E|FxdfVIB9Szjt#Z~wBn%8UAx-jpoYvS?>=I;+5NQc0!2(XE=vf@fG9H78 z$)px)z{La7fsGRZf?7zM6-mTIykG;B;F-%&asx<7KR_6m7cFmZMY2?Bt|m#3soWoz0}vqRXzYARxK}9T1Hh!8)nfp#;8ze`R2qzH!qf zBb8`yFD4O^qAjqDCImHxAe;n5U_l^s?Bz_ni4t{Wpk$$uG=dslE%@R+{xW-hrzkwg zD?_Y~k|@gZKzj-#E;wz_pJ(OK++tC}dzauc1FZi5EeE`H9VZ|4#q)BHPx>=svHKVI z`OoXTu2Q85gqZtIFf6RfMLkr!W z+vC>b%tjWGJf>XlgVy-J`;`zL29t5jz6c<^_(?A^lkGj^X8?U0eek5JdWZxXQko`C z8_P*qDM*Q++bBV{d2vbKc+z@1M#4#G7(jECPK1l~Ol>jL&?b;OuVN)Zk_FCcsZA;E zMc~t@L?5A92{|t{0>vjOBWjmrz*h!kW*p8uK$1w(iCcJ410qy}DoJcf52(&wv4S;A z<(NXqTZqu*CBzh`1A`(-txHIGGq~D;5MnII0f`GEV=%8jaa08jSk}o2K*WARV}+7c zYHXm1Z`uS;JWWJiaFA)p9l}in@*}ELWbWdeGy$$_z4pDV^B*Na|@=W>;0P| zV@KTC)qi@3%Y`-UA#TS7&4UJbn>Pn^Y?ouoX6WsIQM1w9EKU(l+g6uqQuI#8YtaL` zQ>`HJEo0UdC9M0X*2TWOUVLE?Y<6(ULR#*eazu4>gV8rjZ*_&1BtsCjwqh{_#0*Cj zT%&*_9Fo#Pcof2?a%q9AGwXVqq==PNw5H46p{cpTA#9hW5$NGvfc9pPR^Up!Z6K^k zryS@eT2yI~$gsWNIkl#ziVhM6pEqpbV%FGmK$1xitEWv2tc1aovm~Sis{yHrhm1%A zE|XElsFEO^WQ|^_KzJ=yzedfVBs&P+)$%OEA%!9(DYKu*_c4a4Av};NAs0ZNMd^@m zPv|q|$8j)OQv`)lQ50037$>4Lp+vD5YyhbhB3M~VjY>i^Njvh1gu$tk5IYfOK}VM< zcBM8pfzp1$TAIF(x)af^I&EYVp=)uLC$a&}I)4E#Q8p|{789VJi<+2NGzg2c+<+ae z{2p^*xGqPz{U^WPGFbS1=R8}V!{F}}e@Dst^uu3SFbQ_@{`icAjyCWSv*)}3qP2HZ zHSsf%DgdQY%bMek?~Ir5Ll}V*J6XzwuiqIg7vp)oKymx$2j}F}Ka(7ELzbN}&#t{^ zCklE>rcP=#Q-uRXt3(Q4f^SF?n<*+!Xadv#0GOqiDs3SqBH<~ti4(TDnFvRsB1J-M z4GPq;qDYn6dz5@L+}!DDZadfq&;YX&TS$x}oSBv%QVJYRa;^bq(5Otj3zm7DQ&X`X z#aC^l@i8>5Ou-_wC&N*EMWeWcIx4M%6J(wNiDFnvP88QChc-oI@1bQXE!T4q*&bZk zRD_vmNOl0)^cEPZtP|$~`G{zVR7;T@Bq5^Rvl0AIAmPm=oI%uiwV2jIX)OX$B_bmE z%upf=G@a}S4M>uYyA*2h< z)ijCuf;h{-RA|bEM8p!F2+brWQ9NX#hJr5mP6|U( z2s{G$iaS?$vAx$ul6U4}CVRn5Y*2)W5@O4}5^l6AhEa!?(GV)&zGs%il5)d_w9lTy zL^ecJgb00Jb#<)Ko}E;|PRhFoow*~Zr%u7(gbBoeBw?d(JV+4YsHN@b!q^NedPhSu zxu56(ZP=EUEeL{>MwkKA90(yC67?+=DnhPLvZOh63Umf@62fFgPJw2rlBd-fsv{` z;ekL3XaNM!k&BomJBugawS!x`Nr)lIU@TTlSmYO#4WOeK0vI3!9vUX96dY{Wq0)RWQ_ENkZD$;}5{KMBtOA%=s>tC6q%mAo7r$mJ(~0 z_jgV~^)pc(SXD+_C%cB2+q1cw-I5cuzcSG8Zi~i{_FZhB2MN8q%}9q&NylMuOgvNs zL;_0KYLHp=t;JZvHmyVvFGzY#^Q=Jxt^$+*b?o**kPy-a#7ahzguE>fsFN{t@x3a8 z)49h~gfLB&eqb*V(UvTXT4qL}8u{9z38^D|m#89!qoatef(k^*A1BFROe*AJ_)R{| zgcB@pOk~w*xEk&mmCC9Wu_ObOkAv*Zc$rd3AK?=I& zB*uwhbmZ0(i zML3NDM}d_vFe}J?6HWp^*l>* z!A^y9Fd=s|PQ++b`1OnFAYjd-GA_uxn1VSPMeQM7$-|Mn3P~jeJ%X(+S;0Wn#qB9= zET^dAaBn12;XOzQRU1U_Bg5tdsy794E=LM8QjX{HRrMV(hepsk9n?%(1z6^CMGyi# zjdLhEP<+Nli%$Zx*GRqQH2Uq z5E{7_sR{XqSkQe8zAMGqmQI-^MHZhSM z#-{+&3?nu0csZL1vlF9OlnY#6QNgA3lQR@tQdgk^L2#6-+#%e@pshd`^C-KHt3Lv=Izd`FPTK;|pa$ z^3UY!_{Rn2N3>7a{j!D9hwt-&PSVfVW3I6PVh%I)RN^O>%ctbPp~QU{o=tI+%MF>+ zFSfF~a4;pNuP;(P9GqOfx%t79p+2js8tyMRF(2eW`mlcSlB=Ni?&SU6PXQY!Qbnj(z%97=P!6iw#hsQfZGfUoMi~Zsb9Og2DAgT1purqJOJK!!ps#|+lEJ3 zKrF$kVA9U)i6sUO;w7vsgi9fI5NPyB;&vU#!juh!9dAaw8lc?mk(eR^(Rf9-5u!{c zBkhRrLB%E`#u3$y_bcUXr;??l0%d6NZa5>Eoq|2Wv|?6`0aHrplP3_ch=NdvSqe)| zAQ@;;vS3X|A`@04kRJm-D@#B`&a!wbS)z&yBBBjOuJK1@<|luIl(#lSxjayZdJ0D+ z;x!k&kwf52Xp(d;{)R?gfa?YVVu?o1Tp7zQNVTmxP6QDQU`Dts=@A||Mem$|(IaY5 z_#)m|icVK_C+?qA1J(1AS`<{|au>CD6qp&2ziLo4VF^hwI*gVdDqWcdNorn|Nk||> zXyxy>Q{fceY_XH)GO<6Q?UV!3K@i^V(Nx)to?F27#*-TmdLjm|C?@noIAJ<=X@+A~ z&YYx#B@nXFSeK$(Zj|m?DjprqN#xa#l>$60rLvq9%G3$OSRjNA_E=6KH0fqILScES z9v1>yq^l_cWtD;tJ}_8GdQAgpz*%QfMC|Fnl@wf?)FB z8zrJlK_#PBGqkgEus}e285Gm(UHJwqK!GU(zzEn=$t~j^f*h01dL?kN83Zr z{{RMlP)4VxkF&Ha+RX$G#EK9@FtNdbHnP@8D?llo2~=faNTy4BOA%+5=Hn2cN)(P< zpqtj1Bna(6G7ZrdQZOipoHgQ92+*fI)%rILZKO!sFHVo5QjD#OW715!>V~O72~d!h z%2=5W(L|+;LJ3L@-;6D=LT+O~FeV8{$m9?u#=uUbAp%JV6BZF;*+s4)THhk{N>H=F zdTn`gU{g{iRf$LtpuWZ_ERZVz5F{s?7za~0@?;E^p&*Wu3|J82JjXkU(VK7~99q)y zMrlKXhY)TKXmrkV!O%careP5>OC~GOW3cqastXzvQ>BFKqjg5kk^xJxsECr)@#2A<$MXOc2|P^%)AuGy2~lWfIXkSxuKQ9c+>%#V@N zNKnJHGN@7mh(J+2^Kf^0T~_VMP}LtHAU4sd9z-!>FK3!h-&R3X1`r8M4;+$jryObw z@q}g2T4ebyr16V*1(hMLY^K5|Z%`1+VFPkW1|74jSZzQi0xUjWVH-{4N~WPGu-#WI z#WQMf$PjE82`uhc43RJlBFG(wCromLp~N;8+CI^QM0P-|#Gw}&*9Is{q?jj$wq$c5 zE9fzTB!B@mZZ?jar$(O5dfU8m5nkd#R+>)K-HZqV3WSIjn#7+F2sJT+1+(C3rddaZ z<57vqqe{?kj)0)uf~c+^~rR017PaCs#%6?>7{c;<0%T zkQ~s#l64~0$}8P#i)JL-DFi@yB8G2 zjEaxz z2Smav1Sf10L=V)2Lu2aTN|3N36wn7UM@dwjL`ldBw=qhBJOUSBi@cE%N|2RQ6p4pp zNsR!i?C{Z%hPRNL6TDioirkZXpd%=M2nk1LRXm%k8qlW@*wec5`YQXs{{&oh*u;z0#y_! zH3ycAi`bc#sA= zluJxlRs>1h$*`+^@csq>DGo+F$R{Nso|lxOvH%eMnE6;@Z)i#c1q~!EJ-RV)gR&_x zG}xp7D6B71EsS=A0MMwdImiIS6T)-+7hQ~`gm~zRX)vi307#(S&~hySpn_HkFmNqH zcDXKG4M}q-QBnw!3DsF?vPjoy0OK>YHU|}PH21JbVaOzuJxR)H&T8E&IEBk9$c^{U zW&yJRQFx;hAeV!QZI~pOX{6J$l6!wIyot~qtSW9&S$u+UW?Lb&=}MT|T%KGhM>7c) z=PXL3&c!(-aqN+KEQ!)@mYpDP5)dQ64RTjpMocFvSg5~~Zv`n3h{_cSDB6)HQXzmO z@i@|mBv9II8cQ2QXo#oQwRGq2i%d1IPVJ^&u-16#7q)FKtu_=PNm_!OT?1^uSs-tivBMMPfExB81(7Cb< zBwoKc7L1kNrnsBP8}T_5=ws?9^gZ%G?)Z|!TUqEFY^7}Yr%k+$zlQz z_kt!v#yCU-1F<(faht&^d?3lb@uKa&oFF@9!zSaY{rJI_xmbvBhr%rUnlpk&1Ow7Y zvQ;ugQ-_fwozpzn4LIjVIMTIf%ItwAaABvM9)R^QFv+q65Ge1H44cf86>HfstI^y- z!U;xTHeQ`#?+qIjSezbs|X!Hg$N>9hQfh`Qruq(dG@8uaBn20 zWHd0KJp`1vbm~L>1 zJPLNxA$s;0DQM&o9El33uvmyVl00z-mB|R)tty?G5{%RvI0-%p%~;E0T?)7~OEwM> zsM{cM20*RJNxSossl~`4F$LMX0TLKE#KS8_{upUzV{BYvlQeV{K1>nJlBHPM$wg1U z6)&-B(Vv;sap(5Ee7}Syl3lyQ7E@2Cvwi~dng_j^TAVDOso1Bec z`p-5_e*XZhr}ls547@Rc(Ccq8^%$&7O;z+DKI`$3_)o}F{DbcyjM$IC4oN=I?BCaU zAn2!{Q})RdOGjHW{{Yti0DifDw0%eU&L7kL;4XaqaT}NtdJc$XR8K6_XMh6Z_Mi6S z2b0Ca=e&o(*UnOQQN>i`blE>ToMzYi#2}Vo@s7ts^z_HqDqO_AkM_;4O;xr%OG~fH zU;&~8h|0D#B=|rcKrC_BAi~m13%$;G1f&8Gmyx-DQJ30^q_u<1oau#dhL*xl5QkTMDN}xS{JBq_Wc#sr?iauc$_>OTZs=#Sr0sw#( z=O0*}$~QFk4>!SCyk6bP);qkqn^NBuxea#4rLWBvh{ zk0FYJigPNhGmoFivaxb;M;q%jtxfgPHr&Zl-w0*+qA^$HG+!SdtI@6RN>V{Z=J>D72SZKM{@mbbDHFRWA>M3T777_WcRs=Rb#3C1tgEKkYb zIXKvL%#Ym&ZoeFR$a}3|aW#IakE3~Z^SYm?Z?^t-&y8UafhU=4&KctEcMP!jdZTgv zChlN{ig!Mc_;=KwwZPanUwr?1sy|9xT_Pz$xRNV8=5zk_eDl@A$u{x7<^!;Og}2)@ zKX^`}&loQMtj(W>{-WBv`9Tn6!+XR=1B%fPul5!Yej^@>lSG+=Re0>lF?nuQ32y-i ztXPPQspZ0;O14^I*1!)FJf3cYH_04p$j52j>9#*HFYUBuR_`Oh2nfHt;1f+5EhRy-pxN6chH3a;3;kK2hZ&0GE+7h8C{T^0gnE znpVuu0hM7;x{1qNktmHazC}Y>lP57BlGy=xpa+g-fSs!-jkB0G!Xa!pKS5lDE!zhVkp!jgl zQE_Sni=7cpjrBcQ=%gt0Y6(RdKAivcUTH&zTB%Vc*>`JBQjL$(&N%8Cwh%f_JOt(ZDRlU*c z6Q;Nq4Q~qdwFu1f7g)tAl}S))VKKaE*4-=_2Cm{@ILg*U81wyaaX^x#&hrwLW7+2h z_ODF)p}fhpS)%&<+jiVqo^ zA~#k>7W8RUgKhjQ_{%0mGSuhSub)^IF>;8H@J}&bne> zKPu9IFTme^)P^rgH>XXDb`UCSdw(HJmv0zS+t3I*IeG{~1 zthyO!q(Ycno2a;!qmsqBXO@Hha~Vc|n2SmhGo2*zQ7NZ|eZa|FSc)D=prU4+X6ci# zQvW%RFpOXXa95TYqKk`i9?nBCE;z-1^iqlbVxxzzQYl=Urxi{ja(fptjm^?Hi6u3F zL%E%l!dmZ;uPmux1%p|LPC`KlOg`V&^66Ckd+w*y0x040s=A`{i~ z1xQITvXaZ5o{u7=WPFw@U;W~?7M-*sVC2%(_xY-1i$4exlV}}2QS`7)Rtb68U6@LN zYMQdDj)*1Tv<>VuV4`*rU5mTNzBy~IpAHQ1Fzc7&38kM@+y6vjdr7-mX}BA5P1tfI61yIa(6f``iha7{6?h_n3Mq;>h<9vQU_{Xg4iMX z)Cq;B%b!|s56FUuXBB)-uY$URf~7;6Bflo@iQX~u&)XXX9;zJPT^Dk}CicRKI`RbW zqQk<-zUz(=U!>$NKfb0EF}Jv%c!meQRj#=>7t!Qi|I?pzvwW~1Nd7WHb1my{dV|wt z?=5&!od)^yL#Fe1|9jCDLoY-zFP8y98n;uD&{hLgum(K2(uJz0D@5BAP6OskJ{Eyh&cJIzPa<+z+;-ZA%~c7dTK9k%CG-i3)g<0na1o2uIyC=F00X-zAh zdflL4+sB`U(A>DUF*;cV))FxVJa)*{wc}{oT<2%dXNrM^bpB+~gDMN@h-$Y}|I9c} z*6|AQ0WcaFFO%d``&$N?EoGfCDW%*d!wisfuRN0_IyeTXB-fJ&?Cd(^;j65g9gHz^ zzGa*+H-G)@dyOAO%DFyB8abDeLnhuO-Fw(GLF#Joa~~~R6n_;RSZ9$bqmJk_=@#gB zg>spB$H`&r4-I22zFJ7zWA%Zys6wl^VRoOO8odFb)=Xi?zF><`;xyy;nbDv1dm$cW z>KgXtrDNk+F{FC++S)W!!>{;-xmHYIZ((ykUKfs-@>*dYDG&a})e?fLekRvn5W2#t z!|37*#2!%$7O39Ef9sG=+b01&!m35PiGa$LtpEg0V#bl-+O^8n+&eZBEHW+d@^GnA zyrNgT-h^j?lOi!E)|a6I+_#(WXKYi6%HW_V2kBXt z=-ZUI3zC#L15}>V*$|kC%slTnjBE??E_u6rj!!~T=RSxg)d%TVP(ggQc zD@ro#%HNhwJMPI7vO5FY$qLCQ+(%*JCB##-lNpPFnOpw=Ojoue{{XRh7fYzG-K{=< z6)H50s)gTqjJHl7@-snl)68I#fc6Z_45lh=q4eUaSh?R;#rC2!DnH5@PC)h=v=g-N z3gPrDljsdl}@8C*?S(;oGchZ0kkiu(!Z7kJ-VLEHvQ zB&bv2#yYEWXZ3@_-qgyArFAlT^J6?{EqPK zGgUolO!QzhkYrN=@%77_UJ6VU#*C}sRGqEL4~X2`k`y1~(MT)B*I;YVVu=1XXHDc} z8rjpk)lr0Qa2aKOv3|TGt$FtX{R{wHBT_e*OvB2GG!iCmf^gf%6@8HulRh;55V?bu z7`KgT#5gyXxH0n7N0^b{OY4d8CO;jbAS=*FpROxEFa+Wwwn<{V3bvk_K;0f(DyJ`}d+(G1XeYnZ5!Fv*ATdWImf+yus2`H`RD^ z$>Pyl8@8N;7BO z?7xQ!-o8bTJw9{i)vk$oJv-BFzPBE3vVxjuvs~gRs_#NJJdM3MNgld-l=7|e<|Z(3 zC9mu{wzzG-S;2h>1AE1MPSg;o3iV)HdD#AN#Eb=>?6X^ z2&S)ELuyT5=amd%Ej3DD*&52+Xr)#0SAm5uts^+?2udu}HD03-Jn{e%f+RyzBtO~@ zf;K^y(ji~x&&znF^&9s=IGtyZ^>7cpN_nB8_>3Q*B$)Qc6k0U6)*yio$*1cu%%UfF z%knVL7Iz!zmSQjuuQimAXq-p4AM^Yzp%ujJ;w;VijoRsPpk z)>PEh*wzOd3tbVYGAK}@2V3~)VLDVt$UdUxktFx=1`kK8;$s`qE%4-KG&fShWRV>z zGAaWj(KKsHv+Dl>(K_TsG1K?#ijGKlXa5c_F5WLcw{fvb`79g`4h<0axmua*P@nt- z3QE`_h%uSdSE2@Ishvq{u};EZFkJ+<_!C2jA;Q46A^Q480{=GU&3^vA59V^k38a%v zq$I)pTGV=+iPTWNmUbQ!bt4SEe38^Apx2Agtg|?aGT;|VNsxXOisvD34@3dvXirxEFClGtCwnv1-jax zd-vyB%yt0=D6n6Nf0iuSW&$JQyDI%uFjFMI&4a(aZn1vBiKZgKg%)2t*6eFVWw*FH zR<1vO+fIoreKA$D)Auyb%l7Dw9d|_Xu8acbaWGike%*1%_QH>FN-dYG?R5{Wj_krU zTk{{n^QeCS?9)$idcl^#iN5d$++Q+IX6Lr($QpH<6>>5(#M!WNwdrZ*IoW=Xd$n@9 z1JMcmqg@xjZGLy(hmzZLfJS&OllQG)ndc8E>P?0Uhn3+7VoG zwc=FtJOt#5bYO}k)b#y2XBAEsWq^ngPRg3uu=Y&$2o*Ixm$gJOi&|77cel%#rYW!b zRx?rbe3e)LuqdY7ahk>nBn+fZIxn;tN%@7^e=|C$W796R*8eWEPP(xLbsdK5<>E(< zzuU5tD~EPr@zb>3hQ{&$eZg;a?}m<*;c2K0do|o zN_F8U5eUfSqZbAAEq|&69cvH7m&N#NUCxo<J5Qkx9y$HP(08lIz;t$`tfuJy3nx<<$C<-~)=9}IaNGGfg~ zG*=hhyEg$d=&IkH7TZ!a+lD(F?$V79KJD2HYCNR5P!mv4Sh=R@9sAV#jLleKIZg_1 zHy!kOp!?#_b%4z}8l{+{TvRJ3dy>=LpX)B5kstn+caH!`4M61D3Bgl@>}YjExzrew zCRzEPlZMR6$KwA1baZO&Q^Qnw28i^L(hq!aznVF|uyFBom(yzfE@Ngy1K>Y5lsYAe zGsL$__0Ih6*=RN7Il_*STOU!Wi(i0?Rb-;7cN1_I|~nFaGye86$x`Zt0YoQfz(ZcvJxd8EdCuD!%{uZ;pAZ?>uMdL#f^=5BxV32*ygkzhfi z!cgNh?86cs4FyOWu867hhs;@EoWOkIi-q$!;riO3$ti4cRsF0AAEcE`q;4px!hoOF z3WSw}0C6~IbYXI790=i&&ioRj7H$fYj3HUWee6>aBCUHFJ5mt!o|X}*HiycO=qt`| zuh**qu}ooBl>0M6K8$NIuQwN3XS8$Z@n?&n!Q$uIqRB7QiaCbU#z(kqomRt5f1n84 z!EuZZw0?hu!$MwPJI>v#JaGD>P{VWiz>~9Y{Y2)^-5L1ykJ}|-(yHrfHT(}Cv{iY| zWOw=HS^BPw*m;n}TZzl=-+_0R*GZQC++s#9E1x#qaa-?8#)qBS9Qi3M&ev>Q?6n4j% z4OwEm!id`^d1ruO{!>=KxWnODCAz3a0?oMhj%)2hmdX|_K_jb!7n1{uJWW|Jh6Kkx zuP9^_3wKuFC$Y{?%CvV-(#Mae2^G`m3w-=g0kf^b;T&|PAYsF9?J3aRR1N?f z{0-q2Alj2U^(-3Wy8qA(P6~=*)1%>%`3X|>r$FpXGwD#KyDAF1F^a-okQqYV?U?%u z31pb1`2dWJ%(M%lsHXQ7k@vnMTRUMj214KqF~fzWr4I?|E} z)Mi~v%t=+IWe;&O4sv=XVKymRRAj!U#;N%4lW`34B`18F!7{`31kzUC=}>jkB$)yq zjYaB$ZtR{8N1Kt42pDmKDs}-sN=Mmcpj4EVp3qZySQU^++i#S#B1QVdO_2GI(5f%U zBprZWJN7vhi9D@isPwH*B-J1?Y!WJRV7x(wI7Q=0-K^8kI6+-yJt_F~sW5flV$%J} zDa&X=p_f$#juWi4A#!zWWgZn*H*@qw6m6pIoD)l>3Ug<8a(+?_QsTaBUC1MX0SUW3_pBK;Tdrsh70N6~bkr`GLJ*2`n*Y=? zI?c_$u|mrpQL0JUxxc5+SfU=MUJIe+c~8z-WUhpXx|b0>x(+g@irOf7{i11~cD)nE z){NqS43{}(b=S{)?=!#E_9jV?*$_!qFkB@*Nk)055SDd3EDUa`i`$a8y!nMZ>bghuc&hVTb`T)^c4Yl8;rC#LP3eWMKQ@0AC`rfK z2m7J3Xw8SZ(E+z)`r9frB-6lS8r; zL3G{w&RlOjVoJ11c|O_+7zp^OkH%-JX?_CShcEK`@X?HujmnUeg{5}pyV)(~u(EG( zNTR+IU?V8iGbfjPRhTEsq-owAD{`E86KtupV}_;RMA8q)WML&(CrFmKZm5VDvY!tF zhAF8_s2^&aO4CwQv(XCHx^xuq$@an>wwU`9yH_?wi9UXqu*I=F-o zY5o%OZdc7Xa?rDaryww!8H6TNQb{wvCs)?BfpxkiK}R9i*t&RG=5PN4sI#+<#ncck;G+{d}vGw z!k^385b8#JciLJvyS8)3V213X3hQVb>hLnkFQ4RNNbW%CGl4TXHLOHED7X;a{wE50 zBJU=Odr+gqW`WB;JQdR?t>`;_AS8`%w|X(5h1R9a)r=*aJ{$+P3jO1!PiZmFAVV;j z2qZR?F$go4vi%Ba^vrg{^^DQ( zqu)2>ycAYMl%!~pej}FBHkAg0pTG&LEdf>*X&Z4O72Rckp)&TnSQ7DF0PCRxj~&I6 z7(HL_IDNMJ?t@9ap?YP>u*2waBkXIJ>w5{bW8W@%p||3uWn$+Fwo-47evG0C&nd2( zJX5Tyw;pV{Bi??Sz17@O&K)`HzVF}itKp#UAUgQ zT61x7s}7cR34IMi+lX;0yO4C_vUc19MJWtm`1d5PN?g9iq3<%`Jm?M~%#N{sN(6mz zR8lv!GFXlLF$b+A87H`iGg1*S-`DtjqMi>!KxvO8ikje<@8Ev5N5>-ZPAX_&KFiO=-+PdVj8UWm43czi5aqqu4u;flg_QMhpCF0 zPO`GiyBYCW~PSQr$A`8 zs~4(gqmsIq!8fxhs+`l*0?19LL8DXO3C*mTcoR2qLXB6o-+IGxOw9Xvgi~jN$lOu8 zRG$d}2uGMXg6<=d)J2t@YrDDZm6uVOJzcfXc|wF%x|51^1jSTeZRw-Z6kW~gPO_vr zUTe9sSv8n(zy``CV|vnVV&?awPY3Mz>+z0dp{%-);eGlay^&5>c3lbGp>=SwlfYCS zRW-`$!)v;xS@v#Up4DC}g!U({`+y_-&SdRG~t25JoKb;3b<<6Une-wn zIpVJ^y4gG*h^6kFmy0}@T8CT4cbjLDIwQW z8REhgF~XA2A1)PA5o;?c=Jw%Ky`_iMv+fX`SzM+ziDQCimNC)MD=ypcS~IBiSjE~P ztW<4NM;U=gV&7CYThdNS{V7m50R-Wx%g<{)FiF zP%u-_SZgzfp-4a#k;9W>*}*KCHsOX`hn&8J5OUh5(3WPes3)CCVfk4CNkY%$#S>;y zl-%pJ^qaWqMtPJJg=V*17!4d*u*OdeF(w`zO`ErgbP}1+IsWWo#qXmWZf=qd1w#+{ z=HW2cvMcH(xP1zVeW-!cS`w_AgvAK2QCu>=trkDJXRZ@{AxGu^;{`8piQw5YYFWa2 z1dM_N48lafbd|z#WX^LbB$>slq=cL*6o;PXK;FmRRJY2lnvDZE-x;)|aPMCA>ef#Ln#Pj#eM}W7&ja&Xi)S;w$b~uRM=23N!V`b3WCoR*T_{J+f6bsR zf;v|cjDQtw4z$D`_?U>sa|0@M@q3I&Io0uMnbP zwHc|qzo;WrirXRTs|56Juxf$7r;)h*S!l z0WSddMYf3FDH0AP*E2XL6VV*EQFXu%aGAw(k82+wt-;`Tvm7>pu32^=Z0%)_45%b> z!4`0pC_Pe`2ppPBCwKr!Yal6^cpSKZOexhWP%L9|h)$vIH9~C+nu7G4dMx!-Rn-VR zCo@qLD0Qj(#G>eOpiH8bKnRi%dj%n|Qx`Zki)tcMku-{y&7?13U{pOLMu1a_0;r~Yeu3#LV z=%U`BF~Q2>rqoqKgtzZBBFrYyE22DB70F_GrzZ)U?xI zxopbhZ-j@qXJ|yyGnGX@@?9_D~Qtih#GcR3)snV!tdAMEf9 zjiN}qqDHN(Fb1c}(h9|a1?uM5?vl!D5=#hI+I$w*N==`XM_wsK75#AH2=(93q2fDC zKich-ez_ux9e5$&ne{Wq1Vd#*ic)R*ze;KaPSVn#_M>;znh3!@lX<@s&`p*H(vHo>FTMhVjP^fO`Pc;~d!M44T@~)h0M~7QP2JWLB z_9&|gG(@C#Tn`9g2ZE4f4kg}|t|>)#ywuP0XxJ0gYJPRMDs=V#(2vL2OEm1-2VD0( zZ`f(!U#H*r^!Bc9t1ji=-xPtSnm4z$4xVPP#j4b4I-bLkJV0pu-o(U^<@_;_q8(6APY$=*huGvy)Ko&WP ztcQ5iNPz>aI@PJPa&7?F>1$<6rV?%6t7y}SED9LRsRsc zwGM|Hq)c>JqMrByAEL>*9<}3f#rI@^FugBxz^@Ie;Xc6EQ=v1;c(zrPBER|+09cd+ z&7_44TR$ft)vJsXsz^c6mhte5hq|zcLRPA?Vonx-O7~H5BvG#A6r^xb`dvk>aMDVc zhgZnC@(O^rG|Y>1vo^-zHLtI_Z2}J}+QAy3F_8RSLX4ou1`XwpCm6xKGzn$a*i7w* zvRb3~hV()vRTlF+Q`8=uO74FT0He0H?4qUVJqMP&mB@|g+o|LN7T6z48Y3Z#QPopI zhUxF{paLH?LD?_@{qMyk;ojDb&xfP{5IlU%IMqlCpiwZ7cr#uAr{9X*h^3{g&uz8(p(zK0=N?erK;p2EE z{}~_Ldqq?SFeU0+C2b-#(*<2QRIGJyKT()+`Gn|of0{mambCu#)x|~W z>ubHB8_xhn8KRSAX=?7?=L#)9rf+Wk0Wv49u1szJx-D)con!u5{T`cGkNdw5ELwOCnF@o09qKGfqp&NG78SkSM4J7E^O12A!5o!)|#1?SrEk)JTDJ5tZ>O?=! z91u+^^&_xToYto@?$E%A>U%Qd=yPz>R;gy)rZB?K!BhqYv>fE>TFIcIBacU=;CK$8 zWvoF3&xa7u5!M(qX~N(l8MlKr!HJTibp08z>t5y4^nVY3$1ggJ+j$4LHa zK_(#oQCalsvL-00L32GBhn9?ei;WCovB2@(#wXK`@L2+_EDn~r{O|Pk98j4-q|M9v zNB{+g+aROAGg3Fr1gg(;de{&}L#|H1qg%Us4`rGlV~pP}ZDHq)*qOh3POL38&f)D6A`qx-rX9R^;8d%3A0iJc78 z^HVrgV+TT3iWBjpjlvIo31%&M7cE*1sXMJc(scCJRfH$i4Bz*!e)=@KC)urfMI`Wteu& z(U)ke^MRbPqQ56Ww+3VA4kThUA(UV87rC79Y)_5t+N)%T9F|MkPIAkLgg*1HKo zrd}K`Qm?MA7_)A_=f)&KzO|?WxrUox2QjyTh!t9l!R_2-3aQr*ygoJci)ABjV}}W> z6DdJwVHGXs95$@WZ-TjKd6+S7*3$);0Y`Si1;Wxbhw9UsaYI3QpipommgOr%O4SO@gri!XGJD3ezM=QH$ zQ;aqz#M@DB`0wrW)GAt^0_?5YA=U7I8Fwml-5jiua);NbZU z;xU zgdS+DwQJAUxyp((m66hr(UG{gN+94)vi&Y2FdB&^G$PlC{oKUcaFY?9MYsizS~(Wf z5={lfsX_)c(vn#^Tn~JRpY?P`Nl`^nhgSp*f@r{aC?|DXbcPI58OoQFNibqUZ!p`B zwfllv{qa|(R1*Pi{a_jJKz&ALbE3pL1I0IUv9lj7HmMZU9RZB5CDTW_XkLw+gq>aF z#b0@uN)Ek>E^Yqnc#_)pbl6cElgU%&EP{Mfv&-T%KVPcbmIYn@xJ�wYWQackJ>>s_5v# zon^wG*4M&MNALW&?7I91pv!9&)<425x5%9P*7ORo%Uk_XUNbujE7J=m{uCEgB65Se zQN2saHS_nKf;wlJa0fttf`)Ohdd~cX&^P(W(_H=XoA5!4WVzO5;_+WXGAT_VR%fcd z_d7$_DsqL|ZEtR*PJ)gdI%Y@$a(GbTkLrESCxXbMi3lQ13TT}r?zsnfjVAXIvfQHN zIUC?sg-JVkI%2na$V^4~x+2WEm6K>l80NCm@y^>{f7lpb#ajD8?-E*fWwAc-46$I7 z^ZfR%9ZFy%!9VP5!aXtb^f>5Vpl)HN-kSQ!vx|FY9syKxk8fik9CD@~t1pt>v>u4O zzH`TqqltxKrK2EKo&LVZfQtSLH&z+d_X79lK0bZ_myi;(^&2@fdB#kApih?MrXZ*j4th>5%~YQG5^)Tkr-F% zHy}~xFiX&XTmMIcTBZ6sJ#z@_e^2=z)>}V%e9;e{hWwYq|KF-kIi8kWeDeQZ{XYl5 zLJ~fZFRD=gZ`08*Jc$JEf3^OnTlN3V`Ty-F`0wd}|LDPO{?GC1L}A}bE(#FoHeWJ! z5Pe2GL#qEhfV5LFANrG}+yhBppkesV{jMwT1S^kbC_wZ-eJ0;kS%7lg>lf!j2|_-M z*9ugtyEwd-&6AX3OTHf3 z{GGoP^RM?%USV0!{o^F>(0Uq&Q<;n(^e2~6eFWP6Srl#-T?@HZ6^O&uULFj%*sZv8 zigOSDm`M5p+=T=a#>SZ_Jas4SqekAS{1vzOdJ7TYI60~4%zSWuPvJYD=>tt78DV#n zIXPRWrWCOf{8Q9<3F~)Amktsd%d2@S=Z8+|2&*)pwEt>%0{wXme)j&c#?(_jxyJ`+ ze?%?KVXC@Ng%2mXLMU5ke`SqZEdRDV(SOp5W>0w|^!18YBdw>{^rKJQ>a6Z()YVq? zHBWUR`Li_t0CQ6x!vX?n`Aobo)RqnjxNsi5GLyxLxRPuf{=JLf7nfbP%?V`KbFS+7 zC=K*MroqhP3%PIT?-vv)r)@0T@j|E`+MBXB8>wWwFa=pL;q6~ws6O9Hfawf zuFbc^u^g{xi*?ByiYeT(X$V(6-7V5=-O$sC*Sp^uCK$jyRc$UsU3oPw|fVgjv2`_Y$_D=`7uqgtf1n=G2$7<>n+kn=3QhsE9Fn} zhn{nC9c6^~(!*p2{O;x4frSKJ>X7fN+gQx3#9DeguR#c`a&5J5gCH5VTYur9BL-X@ zs*EbCJ<0Zbje2#k8L-EPQR?}o;#BS+7=@efMhSrGzIsXuf5l}&cDA6QU`;uYQ~9ZEQ90pPaqhh2O-^uzSd zsdDzCiFM4mPDgc*paFVbWRqq-R1bMM-kV!5C7DKMAA~&C0&+M7_fAh4EJtwba=)9Q zdCmLPp1VWwOS5y-JBMeRg!^1nt_EI@XGvDujUO^bF|e|S{NdrW_{+n1(dKRaAdOFz z@jkJykZguY9noX^?)3^3L-k{xmfWIsSv$z71iu>CA9uOjPoOgxpxN`puj_?TYs#;; zwodr~*PNB~3vk$`I@LSopo?cqEV-_)5%q7&{zl5>G5q{F80M(8X-N-q{L3#iU|E(F ze)7pD^zHrItxlSJ^0@9FAUc3e=^tR-!4!(X8q8F6=!$@w%~G%Uk6-=+zbcC1?%_x&KJQ%0E#y$%UBHZ4EUn%>FGOCPQ@6@m=MLin^x zAFWZjy*?(lGU2k#R1=?dnxK^ORsX4;u6d)zHhje%nPa?XKGej&?P^pr)P+*u)?roH z>V26Id(PInUO%C|Zjf;T`4I<>N&Is>utyP2-;@7Bj&E$ij4tCrYu??@2KhH;q07Vo zHQxk_bx{ib;ude^5S~fD^WGsR^a~6Fxzv#F7vNBvGu_&Y$K;nXV@VGqO0`2c$00M2 z-h4~4izf#gR(B6YA2FY|+64EVf=l68>P(CVy^7!R(&}N4{81>p{k7Kcu6hs7N6ymj ze!-bmU_i-sRLx30m#NS8EfS)(TC~Er*?m0R0XRkVj4!rd(e(-*)-qo4&WxBVNqK;fNprHs5~h)6W(Q7QUv?51VBQf+b0k}1s8!T z>RWrlLX!%r4uw&ARvjU$N4F;j2#^p6RDeF-`?M>x%X>j~zLGZtvK)P|7i=4(LUulM zH=aNEB;t7aSd$;KbMuLx`Z95v>2U7w&fj4Enrp)~CDw?U{(k`Se}HY4V>^0N)`s9e ziuG)luGM3QL;SbBsDA)h_1G;+t)&0X@;?AA!}oJ9-G6{-p@F9=e;+?3bF37aIwCqA znUeYkP<~NC+_(C?TEgLpF2bbYA3$C5SJEc%I`3*1S1HT(OEP90rM*w`;C zjq4YTU#?&Bn^T%xrGLFU&9uu1YHXP1B)x*&EUhnSLbMpFznOjp4c%r>+MiW^7Ff7v zX7nc(JJjz(Z68ciMD~^>*9-MIZUyTASjJGcLb>A}JW-Ax%)F{O3pNIUZ}(hHU48`) zPoWQ0?p+%dIm%*v57__wZPp?M8Z&KH-w{5|5 z$UGp`^}s)XIaQHIuEJKIvBK}`hhKs{$)$Gs#Hz)f(*}J~e>r!@K7Z^D)}NtKB#iD@ zuBWY5n2cU&KbR`PvV>Bdt=c2wlkr4a;KH0>#eh436LD`K*#z4$Z>@-BMJ(5!H=-Lw z{bQ!%4QvsZ;HCk-e!=hVQMrD+mm&WElJ*1J;cbjTd)Vhg*3ACglNQLf#ZT}5R^B~S z$PTpo3;Xsqjg?XMVnAKb(^+huk> zta;06p$R4m|FyE+$;111;iuAb{9W=xer>V87n!g2*XaFst1h!D?W+4Kn)Y_xCn*)b z*F4$46m@$g8uG?E~FR(CtV zjZS-@>z7XAot#`8e0~!;a93Q9>*o#^EoklYW26qe zJ`n|SzpOq2?N#e+G}~m506w2H%`9mI*dGbm57BE01YGWq(XvdlQ&CV5UIVTieC`5tN#PTLPP_19lO$eG{0Bvcazj2 zt}7p~&ud5$A|e#Sv$>RPYbHC+31$3=``&|}=8+R6T1&FZa`ea$Pg!|Zok_Db*?)M` z)VLgw(8f|3z`b)Yr;Lb#Pu>|&?Dyx>A8?$`MLvng%IiEY0%gkXCj}6bvfD z@-K((X3ZbA_}H)yRNm64ir$z6jve`!dblb|)hvhpFpf`z)sv@B2);PCnr5rrnXsKD zP=3;|vpPh7fV6XaaussqeU6Om=O&T84+2c_p z6#L%92t}*5_)~^o_wnIh(r=NF0-Y%;!t=-Eus3sv9|#9Y{GxfJt%0fJo5-4M_ajG1 z&)x9>;pChc>s$-X*3kg(S<$Tp`V)%_0#6rS&X z`qqBTF()+rw%;e1Cmq+Cn$w$wiSUX1BgSWDcMUqZpctD&ClYY!vLm6K!{ga-ViNSdQU$h4SEIu?{AC*9b5FyDBX+R841GRKF-T zk{iB+&wgEC_!JgRzJq>IjV900F}JO(_KveAk^IIkzXu!f1BblA0t}S{EVE%lLe*&gSV^BV zk~3kJ=?fOFSGz$%!)@I4njc(CT?@wV-KeZ%S#H3*&7A2wpac4s^?FHGCcV8=Jy#FcG87nabuJ2ad1*$v;VB_C(w!>Sjm zecT1p{ifG#>N~FEdj&4*z2{tWpJI7;eEH3`xbE2MQ|vUVRj+13|O#F|Vv5mYO%}idWw+mJEEiq{_pu{|&j7{(5j)Qtg=EkE9y6KiKHi#o8I6xctCHHBTa$04t)w;0e%bY>4>*4!H z7-1$=X3G06Y}2uT#q9Z)ytT}oNj@=)v5OAudw1KT89yvx@s@0SSv<9aB8-ojejgNU zE+?(ahTZmE?XOGhwDthxjl6O(?2VK;B=Yl+rH$FECQV58`dD6Tusd&hSj4luo;`=y z@^i-0TFY>W$QDLU+<6^Xb^}=5xr>OpWlAKk8E$<(0cq7FX$$I!B{-y^40^ z0xO8b;>bzyw%z)=U(4YMV+C&mFF6kU7;NN4&n!4cEWcJZdh+_9eytfh*#Tz63FikWYpAx}wJ;LG$ERWlL1n05mCRTizx$w2_9gdLX8xwbu zL4@AR_D3ab*^yb z50>el1;Wj@J{u3as1wL_hi@-Dg|l0xewQiivDxe(doJIJx^4V6!DU7jgD#|z7-f>- z$$1U$B?$(Sep&FjJp_9_Y$h*Le~EkqEEdERI{~W0@8Etz_IS&t%;&?;FXkQNe?NmR zM6?d-x% zeZ&srBOe+sRtOtgwx!!M+xMItoifhLm%OmdoDk9=!|1XjzdwxV0uYw}?3e#Ze^L4yTC?4Ylp{9zz7D)RUJE$UuNovD@lT32AUH zFdSb&bmRcb8L{QN?D00^$TPARkaFC&Eq31WM>g6E8yo@jIvD)(WSk- zEZ#&MoJ zP-wFEextT7$7A_i6Oe~er(jMuT%PytJwkes&U_9;5(nAuWi22X!zb)Ob~B5&AO*1A zBb>l}fObXYqt- zxocUqkTTNg80hjHFogxPXA!4t6D|aZ@kqP%MMx7zk zZHfJ4EuuT9wm>?MvhkUxCC*q^Gb7GPyRy>LW_Ts8TyAE+5S(lcU@AWXcRc#D%=?Gb zvr_aSO-btI`FKd_fa5h$^?IBUtI0PO#GN<(AkWnDR}IhV6J$UuJ~0NcgmrzVoMXfO zuh-Nra(&wdve1FeehfDm@yT?ay92Dv)bQ8IG~03Hu8`*=x?~^rOz4qwTf8*BZ1 zLXJlh?0qG;HpXCI)ZRB<{07FYmYZfe+IeLl8pa!I(!^Um@sK?}4Rmq`r;xtgOb%W* z^2ZtdJ(T`;sq!>9N=`qk`IKP8^25LG=#7j*EBk1*6VsU>O~?nIb_ks@7l|fm{LM}> zf6`8u)uTeXfRhw;gdJTeOkiY#kt{573~kcg*JfKga7qpllNirn5^bY+tOi+ypHt3$ zSo|Fs22qB~UyvdLrQ({qCN(Uwc;svxZzKcdo_|-=xyS{jB$SuFNsxG5T8ndVc+QNL zv67vT3{4+n%=K*c7j3}y`k}^5%uYAaKT^Wzbc}ZoCFZ=_?1{%@KVHBvPrQx$U|~MX zy?uZ%a!a%Mx;`x2EuAOprg@ug7)JT^E>H1jFl`cKM@72Zu0#G1T|W)aehi(JCfH%e zXBZcbOKa{w!1jYS7~#S>)?btSLY$lu9tpwvjUUP&3~czYvynY6rd+6xKe%}3EgU<0 zZa+&8EgSxpIZSwtjh($S-PqV5gvrk(cs#ha+hBGW*gTJ64{nTu37EsyP-43EWKtB+ z{t?FgN0Rd7*W?|!xhKn$2w?z~=U07<`#$8G3>Z5O@+G3j?$|>Q!pZj#WueIo-}s)4 zFA^AmatDNiKXRd)1DPl9 z;bDhv9z+q3thC{te^159c7Gf2*}T0nb+h(B^7rAF)wh;sv#ztlmWc=WvEnfe=^OPpC#VreytldVP3`+K{!#~$CH^mDgMTTr^6}g3ux|6|Y_Y6rxl_|KKNLFK`b89eOa z6{rvRv;j4D%c_SHX!pt9FKxQFtjVYCuk9>w^pTo{O&xAO++AQ8HaZzj8SBXdXLjJ( z#fant@0N&EjMM5MOby9!U%0rik{F+Sii2=1A5z*O?a=uB7uMd|MBZ2#aNF); zem8i@p9$N`eiKFgw82b!V8`9Nut2LJ;|8!=C}qe*XY3%Q3_5Pp`{A=6U)+ z3H)904C(hB((TRrg9~tt5wyt9WxOGcrKEp0klW@H8+yNQD@GZ~eJ5O%<9hhpkG3Bj zzSdW~ct|pfu{{Wd{dB2up z_wv{BPWT%fGb9vCHa_ft<;ZFM+=Qs_`X#s@e1hhGaO02zABomK^nnYa;d>Lq8~c-A zTN=AF&$vg@@0a6k{P+wZjM`v;{>#uKBuR~zel}Q+xgYeq&EO@^ggdhKSj)5i0T7*g zD7gl+5+SE;2a?Py150N+93Myz7lAH3`n7GZyLg(0NCPyDX34}P%>m7rxho76sTE7X zf2iN+C-lK`aB&JR+Q1+_+|n3p?h0giT{y_Vy4V=R!hWA}@I1T&2MbK)uMCOrBb_^I z8v`Q)#GviFUPv7B0zeXGF8($~adWB7H%?`?@*O44-0Zcze~IupBQ0$VY|b!Pa{9=n za5v!p0E7et#ExC`V1bk$X+1X2A%TO{oCXU20IOJj%;^FjFBG-)`#P!Q%>)JK#sbR$ zxjF?oU`XFAaUDF2xSs&t$nd|U6^ysfEId7fc?La%(|9hO_J3#g%L1W2!TRO?q-LQ~ zA(5ufE5&RytFZV>kFy?mdb&656O{Z}g14=gZv5xV@tHJWTw@lEgwtVm4*vkS3e2g7!oo(mxbc`54 zcGI6$7P{U@czJ1v8I0|ZFB}Oz?h@X%x3~R~zS^~IAe#J@TRkM8e1Xk|FXf{w2vrZ< zP!7OhoxbA?y;t3f$xs%imM4jAhyMUUNf)v%Sms{Z5Nm`vA_SN{J7{pXSa(P%ud~X1 z?A;Pk`-}?MAJXwMbvD;exl-XJ0;<=9Z9xzeI_*ZVh9&U;C>O9$Qk-? z`XSDi9kQWMEl#!qUu40|6Xv%a`i=zt%bPy#@)x8(V+nJXrK~vKVc9oNgb%q-HoYt| z+qT5Ko_qvH8+~Iv^n8N-d~2PMka4(v94*sqw+(FgkMZl0?oYNIT|h~#UO_N>4uo+J zECk#6El%yYKep%8(*&6R0JY>{Wb#6v$J7dSgBP#J{ri{q?7;EZ6z#7MPFvz`HZ+0j z)Bd;K9VeeYqqN>PA44|K&%1u-I{yHrx4C1azgZ>Zb!Ys>rni&s-4aYqpVack+*x#o z?dN569}GJ!g_6bugX5M%eo^pAe4fEOhaqG0u-P1!+b+p?E_8b%Gk+QH;1UK|4sR!@ zVTSGWE}-(<0U-U}ocHcA&&f0+0mt(qJ3nQ-gEjjBjI309ijvLL1oTWFOjI%VI;$+SJzdXW3%Accq#29z^_P z7lgC1yQ^Pije!KRUgd`%TQ*zp@+^ZHW76pUQWpsPTbxOC->9AYxG~QyUReX<)7wK4 zt4%NG3l;Vl@3G#Q{a-@gW!zxXv#`W8# zJ{dwx`nDR`4g2<7dG#vg>A!NoJdolS?$=|zzVb{=M+C7*_8U)ECnkR@&_4Uf>ido3 zJ8SN9EeuJ}?~ovUT28=mvVP(C>=1vLUfG&KKi1Dp!=70kWDU!-B{aJpl=9sBuKmMKz3HjUddp!7Yk z!n(06SB;Hrj|VOe67=|0e~ZiL%!pcl^R#;an2ECDy_FrzZe;H|CqqeZ$w!z=neLN&>h7amF8(VsaivjkMr{Q!*+4XB=9X*$; zR8!a=o*{kSLW zj!Dj+mkR#E(9g(wB)bEw#$>x7Z+%1|Rfv)8s@p9S$o#l=LQU2}FTD5J}3j*8c!g;QhdzkmB)iZ-vl!wZbO)%rTH=Lm%aR2bMXJ#t=RD z376ytf2r}kL%#>z>At=M`p3cT`94R;o9_Df5i#$<<9+2mt~C0Y4C;Q7TlT zRMf;OQ7}tC^?&~WdcXB@<;#~B{{Raw=u4L`{{X{WzoPvyE9n0K_}iBs{a^n8h_C)D zmoNVS#NYnzU;hA-zyAQ$A6?7>fBdc*z2`Ld&+-F@#CXzCw1VaX2pEADQ|UUycL<)y ziD~};z!ua{)AXihTXLf;MWzkI5#lDt{{RL38zL)&*y9*~`_=`N{{Z5nkNp8mF)iGu zECZ$l0CNW6XbD!-!c-S9CYkDC`$`w=GjV>tmVGn?V6#(V7_Nz8azzMGF>wO0CGX5Z zq3-}LJ`G13m70XogkI-007T6YOeW=zTtb8^4j^N99o1)9n`2jTmVTmQCjS8XkI_Mh zyno|-z%?Gy&qR0hse(|CL=rgrw!_6@$783?y zEJC%6(0kMt^QhGbIv+CQW>HImyk;|I<4z9Hej-|p*GOC$fUw+Lm)Z{u$5{gM$1FL5 zDBND%c9bniE!tv#W@j0Jgb35pab^H0u{veI#N5V@{9pe7Fa%cAsL%d3GYrj>Fgf!P z`Wg;dG7Ap86cvE$GGg$AR3%(o!9+V*!oioaEVy$Vo7_e?g@z^YHMr%NJOKR4&=n6i z41Cic(g_*VM5jz z;wW4OqPc*pSy`wd-Z_;-x=kRceTHFct|Dd?{6fKrV-h6HCF><+YETx%(9!$N5fE?M zUAci(34;r%f>lH@%n7McBD`3sO=U~#0cAxI#^c0;6L6y#lrGQaRwmXeu#opF{rVK-CS9Y$%kkST0j;i z#bOhJF3CZ>0Jt-}tCSMqPtrpGDS$S`r7O1r zYHN?8gt1&gnCO*v4{aHlS8%YkSeH470jRas*SZW?HrQO-rz2r zO0T0VsO?CtY+;Ys)Xt$I8$a=JsI@T6vn^VU2r+*^flg;|L1~tb0V##$0anU}nCXlP z_``Dws!Bf5jBTBnHtH=^RADJpl$nR!D{_DY>P|vYmeTyqYotUYLo5FP01Jv~SM3$J z_LwAu)EXxD1&SlNXrROZOmi78QCet08`@0NmZ5UyNk}&o1yF832>$@sM0J7zmV}j| zuyHCetYekRB~a}AKnmtopj$G^N?lAqig=?e%$Rp@8Olq7K~CyJwl6!oFJi7 z7t$@}86aVXi0(;Pvg|`>L&H!;D~2S7Vbd`eGkT?hX@VMc2(}r_^@ynGl&y^9=Tin_ zyaiieCB3m4zoORT!7pWwksK680&IlhB|Naf6QWayWd-Ny)I7S=$2FF~MlG zM)MpOs0FS)jfqe>L9p*L0qX{L6a%%h9*t^du68rVy0SBTIDu{3V|uV zphZ_IrAnjeQNEC}R9$$PLqP;$>jyAv9QB6e2Lu>yE@IxGQc5gKi0?DH@2mVrU^eaa^)MFGCOk+`)I4#H>ego7~V%LIl4Vzonl-;u2oCt^@$U zEgotNO3jdN7I=`0HSG!q`i|*p_tdv2I7u>f|{3zL1e=pL4jG8W>K5O z46&J#>6U#3HHmS&31@R~l_`Xz0IQEt>wsBhpen_&%*cx|3ps!o{G!bS5px7%>14`x z0GQGfzF?haQJ7$Z5~~w84aVaT!~iN7GYVw-TV^^XkRqZACPZ*er3@0HxoVQD6_V{? zbxM&!VLH-?@@0AuHK~=TVn6tz z8iO{AP~gO))>>)|AT7Cc=jfSz3-oEY8X2&{608&jB|gGM6imW?dq2nd;{ph%YGwJw@siHU>sdi^XR(G9_F3{eaQ4jE_YV9L8kByhQIS(AeC0fq=(7;c%Q zSY_;yuGpR?MZxYOcZGKjK@Ei3KoZ3$OF;v(09lrjF{tcZbe~L>s8)uoA#)u?b1B5` zg&#r0w&!?2w*4)FCTlPfh=m}x6PYvUjS8JO3JaTy6Nr^f!kEP%SJQ(Rn1U-}H!~L~ zQGtI=p%RF*nO+Eu!7AY#rl6uOB@ivSlQCPkuUNo{Hco*U$p~0fYM0Es+;WM;0nDQ- zX?boE7M2oRwo#as3f?+lm;wzYbc=9HxFDtkaV-`yl#5%27?xO^2ADB!;6J8!)WRznxxQldvvQS1NnM+ZN$0rbP1cO>Q zg^@*DfUp&81!7e$BB50Zsg1+I5V8d>R973b+_yyj)|7VPOAMkuRbLWl#1#|e=GdWkFq0L{y&edTBw zVOJM~c3sLBVj5=C7HlILOPoTik!Fc(rbgl1NUO%8r5GVmI5jdZIK*9Y+Ams^Md+9LvbrI}bGn48?;Zf!tMpj#|z zP$Rj@%N$H$LlBn_rFe>BlF@Zhrl5x4<;Eina}ci((3_4%=(bTV?0@fWZ)2U~w|C$f1Vi=4E1`sN6*{ zX74vyMV^GRpJ;Nm4a+E)*9Q|iULd&}YI>*kcMReeHXJ493YWyvF5=#5I3X5`s6kT+ zqCOFAQKm?OQk5)G$uDo1?#M0H7qoP@D*#74Os%2?+*nR*w(b#J%Bh0lU}jpa+!t0G zi&YvbIxq=F;b1qLoGzhz4^K!O^l-(oig8d#=nsype#%XfPe(l&2p&a)-w>5_jBhl zDy;g$4jA@=2##23`upZ(v&Yh`jCHP)F^-%U87LON@>nUj0-VevEXyh(#CSW7j__s7 z;;ykTk_Z+AvM%gbo_~;Fi!JDax2}*1xwUZ;qB7C}MzAiaZk3d@oC$gi!Y#Wc^%9)J zDHd40@5(Po&Gh?u~v@1p}V^N+k zG8<#@91lpSy+bN2ET1l1AXp0ZkAPpDrrUjphDLLL>``0j{{SEqp9x?* z!e#9$UFHpTW2{0o!Kg7|GYAo)DuEEa*@6aTlv;W~TvnmcaSN7AR`CU8z#}I*nu%r4 z5{0l^AYXXED?CmWgO$xlI8^{;=_pEMmtd}$LfFhvEuQk%68S=?d6xBlW~%EJ(&}z{ z(ZO=LFrp`UZ5>~|K#Jcl&-oJ=;w=}<8!uMn&y!zlOU2{QKgdaMGvg{-S!u72^X35+ z@8{YmJ}a0P^w4?cVj9s@c)onhfc3=DW;uw;@JnISXW9TcXY(wr;VNzP^VEm~x7wna zt9bL~HAO)=$J!Nv^A^B%g0($<@zRlKg2ltD0^H&WrVp|V+D&S7<2%zH%@X2bI7YwO z&{eWE+fb`f=!~slsNV8p!I?wqrRthfBQtLf>L_yv+Ti^32G`{gTY71e`Vq3HNi!5Y*(0aG~F$A(HZ#Hr3 z2JP3Mta|P^({TY$>;U%{9* zh%6x>O9^8-$wHZ96ocXfj6^mu_m$vE7V1#7@%!`f310Yv!6=hjVNgpIbt#Od_c4n> zqcM(fEV_sxF>Q-w7%VpisEea8oz9f3U0T2qVz7qd1(6OM8&Y z=6RHW5A=XR4c^cQ2QchKw$VbSf4}xM_eEuS+ZEd=wV%XAJk&K_B3oT0OFSdYaT|eA z>)9{XVjUd+03s1-zVUQSpa`7Q5H7|gD#&UToMuyk{eRdsH89*=A~UX*ODN$on3FX{ zV~s~swhBkw*sw)ayu=2gl7d(|CE^UZdIU{TIED*@(hL|XlElgt!xCZOj1$w(h>Kzk zvx#7lebK_QiIXh$mzN4-h~;ns?mFIi=SUWgW0fd_7?kERhPZy+>QY&q^ zuslb}W`Kaf0=}qp+_N1CQn2dcC^CTJQ8yS`#caEket>~fX0dRbMKk9)A zv_)(c19u926eZlNfI&eLP??NS1V{*lUPd(h$4i~fvyQP^ZdB*e3AZpbhQypsAg7cP z{$&H-HHT2;Y9g&D=2#kP9V!y9Sm4GrEQHHtf^7^Qu+H(!7icLC3~e;S5do4*DK}(e zDa`_N08=2Zd1qRbQo&29X@tZcn1Ej^pHJuV7i+{V702ENtd4Fx^UTZvs)%qNP( zvyJ_xeZydM=b!U25zwFC#tDKj10})3-ej8NAMC%ZW+xSxH^6ZLWOIY_ z7*45}A4e?Ap|~WXSrj<>2oB`}hw0FmD30b9-exLS(WcOp13BpnL5h@0V&cdE%n|m- zo{<8V)>Hv^(hzN993BNi>sf0<6?*0rv``nRc-~^58iA(kJOoy?#6pfEZ)96mN4#!$ zR$vZ%ao4;m24vo9Um+C3m>^-c*m7m*GJ_npG0;kQ?<^8gM@cb)T`AOCwV}8dZ3b-4 zKi||FkpYQ?<}#Iq{C<(Syp0u`@)%3Z@7cfec3u zmSR~~-UygLeM&F_(X$?T@hj0>b%j9|Biafo1XTw9k&5QG0UgB1aTdvH#HqF`3dG93 zA!W``loV>^%T6KGW(FX~q@jA29@&UooUt5@R1^6w>{Q=`KrP zw5Is<>yI@69P<$-RiawQv_YzWFc>$(*B^OabTHkfjr#uparR`ul1M%S6KG*+67sQ+%@|@aYN5OvypX~R@Pf@rl3)J zaeZE%bcouoE+Yw-o_R#GQk3*2F*1&7Q!ZRrVqx{}P+dYHxP>{D(-h)1u;-NI)G}fy z+vy8119?H<+uFx6E)*45oJ&C{#oPQz5yqaKR#_1~!8!p7NziA1kH4Q2K%xHs z0J9u;5B348s##8CJVqiKK79Frs8AWWqWbT+up=tvg-T$Es#YaT(qAZa#jQh3z~LOD zW};_t+Otn&YYj_r^v2oO2vE2ImMkC4PN1*8YyFmBshFbcpZVtO;+c0`1_q+H9(nqR zwDpKv)`-QLh$+qfq9c+D6J~#LGY1&&7#^Fx{&~b^h+}^DUT@+u9Dx20nTqV+Pfu@L z!sm8S0iV=ZEw&?*FtC{Ko^! z_GNc*94VKqTvW~99)BZ@JN@h1{z95)Z(f@HMmE!a-`~7UV19i60A>n|N*SF_^fqa6M?>CSnKi;8dCFl#6^j=SfL>zifkcmDb7#-cZIoa4{5pysjXpJ?Vh z^HR43_F;ouk38{pdupHELt4Y2?XQ@HP!0|DyYe?8&SJVs5rJ}< zj>}T?m=Psyvbr*(Fm3t_ax_Zvg|L|JTDhzx$^=sEMz{F>M~jJl`2PTW{6-;Hd-RH+ zT66i9Gf&zaPIHe;{w7)_96hyr`}KhIpOeq>S*i?s^{H=zo_pV(@o-kP(!JrGFF&8u z0IcxFsLJo=0dwd+q%|i005K4o#HzMj`RDF62YT(&S!b}l{3oOh9pxBz(|<8!o+0-_ z-(LRN^A;~mYjT0S?js{TWsRSBZcFW`BTu|1M{0_;A~r;H`%Eiws01E7^NCCjzI^kD z4zC|*%jWlhDQnL=%W?HDtJe_;pp3M-$?4V$vF(rcQ?V-}W(;ld_KI1fQzq!=&Gh+% ziL+eS^UqinT{qvU%t}q~{=EBDV8&U6RKvHVET3DrLoGkA@10>lZD{oJzG1e@!7Q~> zn(Vsm*UOal7=Q?Fi;Uc6hEp_BwhTs9KwSp!8cC8^OYDQ2mf~DtTr{{kLEx2f0jil~ zyKE5JP-;&+{>D&m@vqb!*`~4I?ba&T-=Dam+hSLpJh(QO3?UtF)?TLCTkD@b^Qu=y z4uYxv{{Wxs2I0uR2fm0FC*nRB3Ul?dRq- zT+|8%VImrDF%lD)w!jv{${YgfT+S{lYGRbjNs`!Bmxn&WUz zi~ND0`b!5d9(~|M^USya+RfzDMPU%hg`sTXP}W`jVHos$$Lb%rq+2@l{{WJtR0Gmj z7L$CNl`SUu!EcEMt*c3OHj=l3w5g6gmq*d0(Za<8*S-ba$25U>w8FE$i_U#gm zGl)+G+BxT#rbdq``P{BT{PX@sg_PzLEOb>sMtKgi`-Ium^SRn0I{EVum3N;!{+Yv? z_LgvP*n982bmAeg>)-vaE(KA_IPF$@@vriV4E5xxXEb;s8B4#WQTQW;u-K>ogt?U5eqw5&5HhYN3{)1%5XB^NTIc8%z{zu{ei-M> zOj11GSc?_qnaIug=V^qQS>OKveEiN$;;+v=rMMV;=@UTIz7~Bv@rea7;-HN8xk9!v za4mG;=N^6H{wt(OmB~FJlzVG#{NA-LOK?_!^KzBY@e>e5UOe@Ts+f>52n_d)OAd1e z^Kqn&P_@3=lw?kl!bRL+8B#AWf9!Zt%9g5Whm|%w$k6D6kDfX}4Wq`V7REWYPx-J{fFkP6om!dMnGDN+R(+#i!9)6;= zWMt3LdJ+U#hgJ0!Di#3@FO(#3ck6z6Lny{_{iaHTVRh!epLu{c$A3OQ6DO{n@^$gzTqtKN`u_S& z1Apu<@?JMh;~Dckqj_iFuRQDX2d%^Q{ml3pj2bc2^!;AGW6|xeJHse({D~tS&i??C zt{OP`<|^(Q1LYbsOV)SOSK$KaVydO1GcfC^Qoz(!RMO$7s5}#(W-tQ#dD3E5d8tt8 z->+}Hru^4V-+rIKL4d>6iVGYarOxj)DNjmz$_c0U9dFE3=;i`+MyqDoe9QrZ1MTS) zZFdAS+RuLo5;p@MLrl#Wb#GBw=`D0jU?eMQCCnDVh>+a4GU&LNpo3;Uj)qYMH#fM9 zT6)Wch0E&+aMp$5?Z34`SZ4nKXPNuNunMXo`bx*{4YhGGR2#)$F5AK9{D{X>1Qy@4 zB}bJh%fZZOG)EobzXSIv>F1siQw@zl188FS^NC%e$4BS>_k>C6H`n>+Fn4+B8%x|F z;npDcYtKd?Er$I~)&BsK5V+TWKJef-PrlFcJd8X2t~P>TQln!EG;X&n+qPK)g_oID zHkhL861GB({{WDdI)AVbRrBYhQhmLlg{wP>Bk5|w86&JY8EaIL#{{SL1 z#K>Tgn1m-cHqKU8OwJmcYq9gB%y?F&1og*!L{pCPt z<^{QV=a(3RWgfG03;BrGk8EGWSiCN(ch_3+~RBP0}E?#Tuxa4brEo`*LR

{X%pe~?H%k;h23Dd`@g zGJr1=)M+^98)M{-;r9{{V4X8%Q7} zAGc5WD&g%Zo~YxPn5kP~vL4_DwcN3Fb>|b zr1Y(M=4H@(f7rs8&+amjPQB~OiZ1#f817g*KZs;-rVjbd#|`b<-^^pXskR1fCWt)F zum!i~?o|g*GXjMUkBj!WlhS=WxlP)W{>m57{{VdZaer`nY=B+Mt?$ww@;LiJz;`AG z4K>=P4XAB%9O4ap@g5r@U&f%WHoNAzKVH(Leg66DamtoD9DMV>CSU+sYwaq#$3F70 zY_ZB+>HR>=hNOk;`Qk& z{m;FJ>sagS)#Us4g5FhLW2g37Y2Utl{{WJ;4m|$=diR&)8+&W-9FD>T!bqu@$H|N( zEoGMVmxgdk7;Hm|fmJbAF5?)$sjS1QUM1B_&5^4u16J2jvHPdY0Ewc5eDBWORB-Yw zYPaUSW!pLB@A|ILTB^4=-x#dgyXn#~)%AZhry+aCIu z+RMA+zdiAfc!c*IA{!ZWkWCz6uCd%)=g;{ox5t~`Xd-;y+g=e>_c!ksL#{mY?KJWW z^oG0C^mAW7IO0?NIKBB%om1f}mK*8s1x<+7Kc6u%aPr~tP-|4X@nRZ7@qToG?Xvw7 z)6yhNACog0%Rn9Q{$M37is!po$F_Klry=~GuARMRB4LTb1-QxI$F{uiqvYf76;n_u zQ7M57XmWzqvk|KiDkX*@BQUlPNNV#k{{Zo(CB%%&=`?B}YAY@fnl`$MA>4V)QKK2> zUVpOV=o`j;lR4^d?o9IU-3#)#_mpc@{&~;l4L6(`#ed&51X!xmoL9RV;{&#;1-En0 zIp!e&uJXe@WBT}%(B$*aZeezK2i*Qf8EcN6JobQWHRiqL#T1wDr|Lf&EqBk_8*X=b z*9CdsQy?;CiC&Cvye$0V@#diFczo9D_u&%rRDKGA(+9U%Yx(6^${?+%YN4o!K`}9n@~n#{BGk_`@Hk`z-{x+CB~=T6y^IL$eCHV3KzP! z%l3{#lh(iH{v)E8HmiM~8Bj9y@6Wa?xfr|3^n@cOeO;k08{7hhabD3_6$Mlv3Tf-+ zB`(8t+o|UGiCPwk@yswB*T)~YFr1!i)>)x+W>$J>ozwpS8I^T!yPs=}Gr7#cb0}gX zwSmGKh<(Tfss?D$L@7?D4X}Nbtw<UK&93hP@> zDDi<^G8TEN$E+AzMloYnZ;a}_dI^NW*yEv(m*N&tYTh@;Zjmrz<9z4&_>2IQJEY5N z&Ubn9zUFKxt$)deOj+lh_ck!}_Jj|)5Dq1I<{;SPv!0jp`i7LY^S?FtmQlhL?=JP* zkIcHzbnpD_6gl3t>5pvXh^5g5!Rh?{Up?W@2$l#aRJKn49{zO#uFcn+k3M{Mf z^Q=fy1LwpkOjbSEw$Yp(mFxEWY8<^Dx%*dl^DnW@eY)P@1?U?0ipX=W{?LL&;Zr#s zG5Ef({EqEcJ^S>GEyDbN*tHEe0SBtI-&vfGY-``&@$3!dSob`yD~X}I>)In@4}@U- zz>8zBM&*ks9V#oA9fWNr^kKFKX`B?eU6>5`w9+u9+DgH^2eHHff_U2|V8_B#5@ z#V{H3e}8zrDzAT^=gc9lZ_ht)5{#WKBf*VjiO;G%nK8$`d{WV2qiV~Ej9RzL$TLr07fu1 z+lcqRDenm6RCGJz=clw81=Ux!>)u<1<51D$H{k~UPMdaKT1@KPZ zyZ-=^${f1?0Gj#Sr9`K$f6q58FMa1|*F2tIui7`M)&hdv!#YQjZF6J^iP}LPfX%4IvL?QHOc1?3OxS+WkSuwA~iH-Jo4osaz0c1gi&yI zUr*8g>_m5IN2i~enz~cXdrM)%?HorvUU!zoj=EQPHRV4tsNbQvZyd0E;%^<1!LLvG zFGj`c57|2stuq**o65~WeR!Gmc|AQLWqE|F$+#W#$J@p!WaZ2ycYEKAB>>g?M*~mX zzX#q>Cj&Dq!*NkK38%sXg^%73Whe*6CAq=5Ld6aJy?XuNEphscXf=b+KGMiNYp&t6 z-XLMn2ljIP@6)7sXAWMmYmsz!l){DCyYJ`6T;a?Y8U<*IA!AT#ZZKFk66I9y1{VPe zFp3Fb9FS&KX4fjBa3F0|#ox>W42FJq?3;*|#C|FwyHFmIqijT;vFGMJA%WlP%Zykx zTy@{(8*ttBUeJAQMdq0C`{>sh--=J46s-lSMBHKD87pA7=F5f zrDoYZBcp%opOYT*Mh8cq5|zLz^OfI~?JI=~l>R^8Xz<#(T+D@FIM<$cf~$Og#siB_ zPCn3rwrVXO#4Mtpq$=AGWpNnlz!p{j)IOL%$@GoOub>=EQsI_SF4V9YJDEyxf8<@+ zIQWh@ZBrE+1^RRTA26cO&%d5gHFD*TL$@-<`?^N1zmY#aXRZVuZY2WZKw`fi_NCDI z(1JI|K6(3$+mvypa|Z}wn)QUGwv6|DL8f3~j~!sWK`IHs69nSMA z@HjeeGP6Bz&n_?Id_~l*EtUb2=GaP>@tr_p*jqj(vG%PVed1Fw+kP<<7{4dKW*(6KHp5a1wPOl5kC<~W2Z z0^r1TUrL0kCZ=X$eGRXeoKK#A*qM-jUV6$q1TWuzjLp*~@Em8Fh{+u1e-jy4FEg;! z-?dk6asL1&m5se%GY2?@cCS+w*e7|x6^J^lxAh1Ck-te%wQ1ry1gGSLL2X1B3#VT? z#Asu?Qij7P_s?i3ZmsJSrN*F}Cz}3TLMg7d{PkzdN*AcFX<;@E$~5Lyz{ft`y4)lf z9ar8Z)2-$G%jiuGtJkr)?({&@4BN{vAO0FxjFwdUZAZt?tz zWwnoJ)|0QI`1FMAjk2XgiEzOli9s$G09g>lt0iASmtd<9&(LOQi4|fb2x0*maqGkR zfpfRZJRY8EP|HqU?>r-|j{a+x@OyQZG6!#e)k}RL=o@-h-f@iI_7BGO^AJ_BF<`KB z_~|H`3_;xWO378OkDhguF^lJy=LD-WeLvZ-E%TTGPqPM=dqGPSpih_+W5fqgNPy{Z z4Y1E892}N&DM8ND&d@C4-*1@4jo!Qe0K0}vVxuW~9(nzgb^ib%@^`;nN|w!A_kyyk z{CGiTH|OpR;G*R+z(xAXa9L+nsZx~*Z90SsmVB-+@#`zw zGYGi9NntsE9utHp^Q5XVaW0`635{EK1fN0lsK)pu24I+pf-%e#GZoAd*;GD-{{WO` z7=dw*Bulx@2(E=|?GV~~@%sDA4K*m(dW-K;$ruv7FTZ}BI?dxZpKmoBGYqjgydLm_ z$1CT&Rp8e|oq0Hv-~az-WsGf%v2SCLG4`Tl$qZxP#=eBczNA7(S(+I;SwmXX7~5E* zC`lQ6B*rdDL}e=yEt2=o=ljp^&-<@)o%_Ddxz7DOugBx1;qb7c_0|JJO}wghr-58p zP%Onn%vzt|alQj5b35Zy+`zlb8E-#X3HiAjy{Q2eAv`X9epY~Jvz2BesWab_Aphd}>!TY**aFB5R=pE7A0Ct~0 zUhrJk)<0#iE{2nMJ*-_+di~WGxMq@;&gZbJI(|l<+O#f4?TaOX=$!W8nRAon=GnN* z?kBk0eq^}ya*?txOF=}394|leDLJK?-YvCMU#q*%;luZ6ahG}-yh;>29xjmN)w_Pz z&M+_K&z!f|>mTrP%Cf{(4_{=JPP#!^t;Rx<-V5@4fNSn0STKizs`k$x3$l5odD*u+ zj4Jau6z#tYm2>^n?KLZ#Z_}SHH_?li({oOKsEY^BXhOxr_e$=5@O0{``*V?}AUwsE zD=_)P3q7-n_K7d0YR6OTf838hAUx$gj6dk<)9TnQJaOszFu5{EN9tN%@`w5s$B~XB zF7fzECVu?t@GH%FSsDGkLWGP)v)C1Jcw^~)KmJl(g`J6^`k(8uRWC7bl*O(mFskei z?m;EnEtv^iBsJa$k<|gPiN*;{SVK`pa%G@Kpp(K!G3q&EQnUCIGrsrdp5FJYT3?>{ z_s?`^_}qO@i>Vv&_(?Goesx$w&Cp)q@AX${=c)gGCZ9bowcs8xHT+yGa&=}lb!~0q z@cY_#w|e&n!;i|uPiU5UiWcu%t*H4M4QNA+^8Gsunco6m>i?pCQ*QjoxCi}p_`TPw z=7~csl60-0{|X#&^&fG#?8or&zV^owRBbiqoV(dwYhC|xraac$3I$>hz6+-xRw~E~ zr`@vt0zC{!xu&%7oz%Tc2%of6D>**D`lJ5Qd{p-9Lp6^B%)8!HSrOU!hMa)GSXzR< zz%A0#F~|uOcrQ#u&j<&S^mJhR91rBdCo&T_fSQsV=kykLOL_G>8}n_q9(Q0REEC#> zhi}w}eIv#EkoE-B^_sU?8ypLw-%opLka$^5DO)=Eoxo{Hypy-=lk04%(b8$l1K@g;k1|?`4?~Aa9HWD zE@k!m$7h8VzB}_KX7heTmHNKPsS&P^$QNh6#Ru?mg&T+8j+wkHY)(6saQVvv!H&oQ zjf@D@%Sz5_jEqpvv&k25PRyIAR=>$Yd)(Wg)n#Fwo0>`IpU|Ih-W|9f2oz#&hIIPt zZ=Fa`-5rp*eYq%BM*Kg3AEl7vS?7<4V9(2IM>j+P&_40y<)<1AJ-?_UjEGNxmiBJN z5AzbY19);y&p6)psH3;_>BnD`+P4k!8InrFje#y7++{sJp zep>flW>-zbUSA41NqpY^pacc318yhM+t1( z`(0Q~-AvAY8Q;&ia{cM{?`)$#K_3%eCY|~|EjEvL{M2Q?rm@?}RqSPG-!gpfwO_(@ zMB$J655*=;>N%ZlO0E{|zYO`uK6Bf3fXZCTDUD6Z>cju@03!as1rP!{G6VyF0kVL{)5rPL1Cf86`$r-9mB)jm6cCN=*#u0a7k%>yIs4z2ZzV5 zH->-L(dYjUz}InZS7z02ms3%3U;myV+wef@hz-g(q#QLx`46zjsd%L3eDLSNp_kzS zsLp@rmYwxP>5px0rw*^&C;p#DqaBod&0i&MoFke&|0`}Ro$#ee-GnP^Q>-ct zFB;;A{i^fX)+v=*X^K)171Q;I10QG5dSh;Y;q1t0Cizwzd8kkKVCCq27_ z)6KH2>kmw1bQ5$xf}*eh9!HnQjUQg>B~PN1E1>#OTN}CXT#v*V_k+&UVM;Qk4^zAT z<_-u_UW^6}2PPcFZCzKJC|jhByrkx_-T2(jiByQz#Nn?}K#sxj1FaX>QM2CMpT^sH z*P{-O%q?ufKfitVy~C{k0Pn&rVOgRlh2P7b3IBxh%|jVwiJEmA=o?NJ^5ZBI|s;B%|kdQ@V@~yOeXSWc59P|D8?erMXY;AgCFrilj5oIXQ~;eq5t!U(+9yQ%)bD<8!44Y^aV4XA2no7G=1S9g<=tHt;v9A5~5 zm$sM6G1sDjKOb{5YtkPygV&>%;{zRMnNPMKoP zH}}jPk;eIf2HDA?f%gmRO0HF9XuSJ$nklyilwn4%XzJ=B9?_FPoMk%%HBG6gH+mV* zpA&v>HHw3vDfRkW7v&Wb!garziFa-8hPiJE<-dIKFMZ(qhsw{>#Wv@N*9~|Au%AACIm(zN{yT6hi|j?MEGR8@4XB} zsx?#>G@MR|hRT!awUL4fxqaCqhmC?giaUblSJ|Cb| zK){f{hu8VG3eN0xK4c_jJ-hlnA$j4(-ge@p50b0z-ikl;3Of5|Lcp+Muspi|ebJ!^ z?zUEf%6Qtw!?a!XrNivU9TgRS7FRS5rI=U#oEoj)72@AUt-rZM`+^9g#(e3Ik$V53 zVX59{P5xYQ-t!m(>4+Zb2f&|yGwRy>Hkr4Vf0@bL{b{$=1yfs}*#EH5nVami2FbRO zO?G{mdy8ZP z|3wSO+j#{BZKw1)Zp%oQpV5CH8D}plcko$$9t}V0gpJ-wl}KcDR-<(}7@W=uO8KGf zYkj@YDcG)_g_Ni{(<8f)+_-dk5bEJ*7Qa3g*$RZ7?&h)Z&o`Qa&4; z%dU>lGs1kD2^Yn)x>UC{8NBk8m*6-~Nc|%Zg0$Sn#nm_OhmS<0jZtwbH3 zzJA1=?o{M8V3E!}fC?b#>}YwY^4D|XcRv1I^&I<6aLMXQ-B;2OeYI{)u>Z zjDFzn9ewY$XZvAkev!IS*L3U2Ri5h-u{rh|qlCG0gWo?4AP3V%wm#e+7+jC=xXTRi z*ND!I5k3FmjH5S8Ms_ab>2#2k8$?2W^ylc-blIsd`+}#I_oJmg^<93SD01S<^71Qz zs0cfWxz5Xm4sk{kjnCIVOIV55T1 zjOsgQ7q-5fTk8$8y*EaS;WtJZ&X)Bvqz*2>fT_PO-M+?g6RIbe_(f#>M*LWfP z)yuc@wV^X~v|0_EC9-&Nrh@gemb;;H%&t3V=5o}bDpq1#P-k`-zBsUH=LK&_vZveL zW-@s6%Q=_idd&0s#w!^=g#p0TTj@G2RTLHB+q|-Z<&#y&|W)4x+u~kmkwXb?_p@m zeOvt8eY&OQ@5#Yy)3m4CcLgj{G+umOg-o7~G9auvuj0gl$X66rooVTH$xIuMyPvAg z{MDBia`M|d_gDa(vIKTWPGKAFalXIj-S?pPanIumi4H6}8cv1$tYD$S3_Xh$BN6#Z zmI1E~8)Zun#_OJ(fnU`ZjT%6*PSs5Bt#@CRUWqWAiYf2|nZ%By^kUx=zYpi-#~z9u zjOl*=7fAO#kV;f2&A)-jwgRhimzdIl0c^ zG}qCIuR0+rYMkK9hUz2nAJ)F$EdJfv4Sg>5z!9Nl)DXRtnlV}SlguI-rcTz89Ab45MXifrWfi`|lt(tgHCmmruFwfrH^f=UV9Gk5D)!)^~ z)#%PL@4{7fOUSe3#~Jx+M*mLO@c-Sv_wVh_b-U#p1IDRe?B8ETBDc&<3dG)>g+*E9 z)Rl!R%X$yOT^WjYcl!m(;Qd1;+Lz0-%z^p7<0c+qk{_CfdSzRodwl!9x0au_X?xyR zB>{f_$gYo;yCFSrvD-1ucX+omx^d>oR^RnJ#x(5J8C>qmz4ux8 zQ6jw;S*fYw#UIOjHGg8F&2Q|)uV8x&?V8x5VDZ!!GqF!s{{8Yl(y?yrjefg+X+ULk zN9O2IK79vh`uc6@rFYxsTg(832Xc%Q8zx}%UWJBf-6m(SihkJm?TwX4F-(+xL!~S1 z+8ZzE8N;a28>JD`yLwMCdoFr$|CGCxPK_r>n}C%LK3oOs3i0<$-H*O7NLXIU@1JMP zgZK8=BP4S87%z0~yuYvQWtxQ^<|lz)`j(ZIwV|%zx7w~WMvnSbohuEy{r%pq`pBJm z#eduQ?%1slKmG%plRoc|co;v^seV+B$r{bcO_Ldz=xE?8b5Ho)i z!|SJ(8XK<0tH1j<#KxKo#v3 zPrdkUu(@TCweToMO~W*Y{}3ND-(sJ1DzQ#Y-%drKwE2Q$YL4P5)|JUlF?_Ei>Gt}@ zATaR4r-jEF>?iA(T=DNfoiy>HolKY3LCp)r=}PiCDD?Iqqy}SzvBzWU;E%Ilimxmz zZ)Cko@kRgKo#dIN$mHQUrlhDb<_Ftfo|r%Ps0sdC`{`pBj-s2s!zq!OZi7g!vfkX> zx|($pu*>b}wR=C!69T$7YEgG#)wVWsTZrxM{NCPp&Y(q3-wpU$oP)E0P*#tmby-?V z0pNm*HD)aok`xr_k&_1oriCtO>pBmd=jAbx2UL8@)9Yq;zvyOqesxq42*kT#nxvG- z^%pj|0oak$iPj5a^;==Fo0o?8c7BB)d?6I6(BgZcFUqGkrDzt`>shr~qS4_a&ms=l z+nyt!HQoUvXk`7!{L(n6+a~rth1)@3)$`1`X)Z-$?{5cuxJ)0%MzMROBpx8Qk%%M@ zZz;*GfXy)Xp2f4v4Cg-|50KXIrj7C9`_2nGhAbmR13|eAOH4!S;k%#j_IEUMTBCn8J+OQc=QlDmbLrhm5W65;^u&piYD&Pv(NRPH z(kZEh?P+#(QcHP5b+5AdyT&W}zhMGN@zSj>r>-ln=o}sPW%Ya@#U=sNSDPH*R86^_=;Ipww`zccs}$ z$nb4$OFl)<(Y9*(EzuiE)M$)_6FxaJ0esIO{#|e|GTXxlo}pWoM~!+ni@4m+;4z+p z9?x2ux%EU!Yb+5NMuC@gGiV-bAo5qv-gj5WeAjV*MrD*F7YkQEetWZ3=`*t)S=zQx z{_onx*8a91eai2*h>JR&wb)(B#-k(I05MM=rAzc1A()p4nj#PC2B>f24|xCJ_sfYT z-GP?1%Ug^KONkPvj^?`e0U0$gv;5s!_wZi_{0VoW{bj}NPeQb-7O8(NUA;2U^uI}+ zcMJ_qNn701Xne^1j-B}RVMkH7Sr`DYKU z4UM7KIi!6X=V!x1U{jq6sQ^~A5jX?y-Yvj2lAfNycYEZb!HVo`Gu`}|PUA!-g>_s` zKX>3y*6JmXv(_ z`BF@d%jnn_ncM4uMMFQo-k>W_*$YGZUfABD6A9^+;v9pS^iBApy;Fpx_{SKU6^ALM zjgmkXF6mndjj{I@Yau~NHV-rlgX6bfpXy!hsWAWL4k`?z^VnwsndJ?l$=)1Vsj0&n zUq3ThkDm6zS|2Hr>To*TLtq!Iu25sY=$plOCm=*vSD4d9HVD#ASw)xJIq612?wG&K z1A`oyz;Phlj2(p{d<#60kkp}NdqdE2%!>5a;rqy`^Koj zlBI|HR!FDRQSo`FVVR-hgXNh&2jQaEOAk9e|9;s1_rv_s*pK~1`lYPuT?5C3B=fva z9Cd@{0wC8)-}cEGJ%_D^qjkCZO!vU<$MT=p&J!D>U!H#Ww`UgpM|>~;XY}js(FbR) zpRpT7DO|tx^=Ocdp^eLLmw&wdeb^D{@nP-P)|aCnAmz=VzR3RorIE+=zIwb}`STH8 z=pkj*B`;0Um2@jdxCzq6pHvWf?pY7ll-9`W`G{8oI=>n4U_j6)uoL;?P?z-HJgSe0r#SPoP;Q;j}GW3f^DyIX3fI zCyg8w=#w%ZF$pb4tWBel4YBg_rZ9x|j+jP{{Su#r%?a67&a;w|qmMUuT*~s)NqXio zoY(3AoCkaF-j3{9Zm?GOkEq0J$8lN!+f`Y<4gKGzZo@WA^6J-SSBXLsTC=rWevm?j zeeDbpJS*+^8S}>C)RGrZc%~~b;AVsIBdNeLEv*|N1h{1&*Q;uK$A0B%Hb=a~=EbDk zei>Fm+iQQ>u@b#_*{EV!aGy4GQW1Ctv2zyxNLO=42q*HRFJ+c~hUu~R{eG67MwMrV z+tj?z)Uw+-wbKD0E1NVDb+s%uU{F@&xX^BdK(7eKD+B&`epGjOfLb#|aEu8SE;T^k z?T=AD4F>!amDjKaB48_+J62BC7M%5p1-hClY+A0>yn}AETtzyE01N}nXoq?i0E25B z-FB4`0JL>D5}la`%8|xuBuhQ0+%_S|(X~;24IrGFfwIWh$mchem`CR$X-k2&V!>4D zsUir_H}|4lH3s5)?0z%Dy6h6D?QWuVaA|IKkbv=D^o$+I4Q;{c^^~p-Dq1A_%LL?9m3O9A!d*f z5xNSdIm6NerG6?#x!OAl;mg)JXYkp8cy8g%MRN;-W_P(XR30BORHX(`;Cf!xnFp^S z<8CkG#ER?IE}7w#jfI#Ij5s7_Pl{G{g|i(DdQ^@G1Sb1h$ZW^2@+#pYZY^H+=Ha}cj< zvdm-0X)GW21)(4kT*;LIc)CsM{XR7fEwrE{Cm+QZgseE_fpKMQOP)@eNPch7s$d`V zg2U<9;xz8nYnwS0RlXB_;sgdSPOp7u99S7>MJYst|7G9ShFReG9{G40L3z-XC@0$@ zSE~*y@PlfymZfIkzNHe9<&t%iz%_sUczAeTsK7;(DBrPrPBF<6y)LCjKdZ}?2Du!d zV*t2+|5mX^3((r|GEaXOU^{8wIkO}u6N-VG!0z!F0C<{U2DCUMZMRIIEmIjEESe_7 zp$d?t471r3%UVGVgqDHE%CTgN7F9WKpp_gc*r@d!C;0c9m*nahNXRw5K0pEeY{X>4 z6J|?=%EY6ev-T1tAeuG3KbW?(*xhy1?4!lH7L??g$E4(|xcS=>jyQpqJmp~Wt=T@I z#bZWJ0>v3q*0rIF-`#N*Z@YM|ur&GP&w@gBvEu;77v&{Q9d9~X$f~DR3t^e^I+zdm zo5FSsEkp9fQ7g=raCaRpd~d#rw{4$UYk_O2RJJ z=x9)`wlqbOqBqjW@s+@UY?H=b8$~*CvxvetAzN06k~8z&f*)aiBt`% zeQYf`HIKLf&NErlwKu2T9IPGaO)a?_uRb7)cMnynQAw(lF6(VGwk)o>W`cbiudK*MPOQyqNtHX%pK*?h8Q_RQ1S$gDGgNCDP!J&S7<=JrfFaiK-Z zJS@R^Nj|E!b~+@2-ogdikvW4RC-}d9=XdRN6FUn2IqF+A#k&aA1t|k?oGjEssE}_K z0FNQ>5PPdXPpT|yJKF?q`HRNC6`@})EYFLBnAqeCH|45}Tj$9-{{|;X<=C<0P0R~W zNBi~zIcg)IQbU-i&pT1-@7&5m!D7nUe3GomCT)DB`bThPm~)vsUP7*-lAhJeL(%01 z5U`LYem_c^5uB6`pXqfHT}n5&)=(sl=pkzEF481_zkC-*c`J-0 zfr2eFU73&;(Z#CTD)TY8fUA}fj7{eq_MzYrQZ}CO*;@{fBjndNMaYPWhGG?rlgTQn zJW0I}#OtbOB!|;x+M^DYzGaK7VkUTlERgZk$dMISKXcZ%?*+wt{8G+qLPZQuU|vj( z)Z241J6C5CUhc$VO#oLlxP~w$wyINj6)7zmKnZi1h!9diPr)4Saa(jLdI$+=X0U~# zLlX!F3&e$;z;h` zE38#IL&j2Ev^~N7k+m#a)@5wTgwqx|AU62R#mr$!#bXuHcpfdV^k zTl45;n9gN?6A12cw1D$m%e;G=R!sNlck=^Zo+t{M+4DH?-g=9oT7`cskCRj>e`an% zDWlZsaa)}%YKwlCdsK1DHDw`hf48wgzkftbNL9qlvH5`+msyA$pa{9D0e+l;*c-#K zc!hzW6v*u9R>&-o3y0MQCF?R9-lzLa;~L#w`^>|l#=m6&396&&R|{8@hwoOwdd&Hz=M(z-(0xUyM!g+C$a$4ZOTJ3(gn}Q zIj^CNe5_S2nwx%D73wf+-0$2CinWGb?0GxxVB;u9nM$n)@Y_zupG=Vi%?KDL0l1`@ zB|qk5x?xP>$(F{LHZ4EM?W$y4EsSrBlVU73#RS=F8{-RajSz%l;*`olZ=tQ>g(^VN%wgv!KYlq zPsn;4Kw~;|`#BB7pOOTU4T_SRbJ*^^WG-hZ3IX6@ghe4(n1u-!&ivhz?1piUlHy={ zcS|qn-`6-U$dTl-9YNUhFLV2-;eWnX@c;gFQj?LS)O*X5~hNls-~HIR?%;Lmp4|&?TIEOkhhi27U%iGnut{p ziN2Y9yOkzt>iuz%!Q1$`1Nj1$QIYWQy`7TuP=Ba)a0m-R$e)8}VEtWF&%#f++WTAj zK8bQhz<&GRJ5CDC$)R7qOo(vmAy^w5n=)~p%*qXuRZVU=HQCnw>i=40LYl-9^ z?B906n>E`bOmw?~f6+484(tOww=^yDdx?)iL9u_Nxxy77Lg8ntxEqRmWjrDZ1|98BSTlO;z8}VOY!9I zaf+pyTZT$*F`&#Bq`wT=j53A1pf zFw3&L5M)W-hw504o%iKEKK)+cau7`P_(^bDj08>7y<8fta2hn8hn+&478jdkrMSqs z7&)s(Y|R~Ye{m}_O7R5ooRGI(Ki{D8+oQ=BK%yZ85f~_&7D@JKp-EH^VO53EJ4OdstxJZ9Red2xstO>&Plxih7jS?b+>5Ot^*zX>tLpUZ4n zlinZ4jvs|smuHg?XCHVCsCH)m`K{{vMdjhQOP6j20Mrt5H3Rfk1Gc{GXuThJ$e_VQ zA6G)dHSf_);VCIlG;FngQ#UBlj7bC+sc1a_v@{^#y}@^qQcI$CBsC)JZSvbd$l6*D zz>y*(ea0r1KaUTK?xi|)WQwYm-NX4wnrEs^V%jmklIcnpd<%I?hu%g>TEa|Blriik zDnYvkZ*gU?5yR#x$uToPx}r7Jqs`%IAoQEb9zw(uW6mqj5%{0Cd6AV90li@gAOf&L z%r`kc7Dz2^M&K}vRmeGs4Tlz3aI&-4T5P~sup7=Oc>M-gfP{Kq|0*mxIayvRKX#Q_ zYXLb&2XlMhOlc!enZQ22TbD`F9tQKyRwhZMom03uW)@s{4uvZvmtt697Cbc<83)b$ zvVf;f7tja?zD)jGcl=d^b1E>a)1s%;@#x^6@{Z+n6O9~M1|O;>$3v0~AYBvB*Ahe{ z@!^+1F|rOEp!d51p8!3&p8TlLREoUgNNPSd9kqs#bP=Gq{Z15-|ITf2c-8N*l;GN_ z^LD`cnFt@Y^4wzWGs+}8_WUKe`a%b6ZkIw~c&h>i9ehJL8|I<)dUB5Ts!frU3j2}H zWoP?^YEfK(ABcsy+|S`z<+{{$$F>&%3!u;;Xm)xIgV0l@qE;g2OCrIpb-i~2p_HN7 zXIE)ES1hc8pJ}35g_{JC5?8!fQ_1GbKfMSopULz}RWZPXG|&Fvf|DwW7oc%pp0}W& zH#G^4%@9!M>otL4Z<1do*`^RUFz=6%#-WnV<6hPSj2N#pqAMObffoR8eQB^6) zL5T9Cv})e8r_@T7vqE<_v_yOh#q8Zl$N%c`&BI1xE?w!=QF}IlYvqWq{Q)0HeR?E0 zz_%CqfvmQ93#AxB5z4w!Eh}1TSEZBsYYPmX3r_$V5#@k}2e6PeF7zjO_w%({^zOv;lWuv)*U z2Xd^Qh*VfFvt*}JvK%;cid&>^HkSk+=wJ4>9&_h15_?E)vNQc<@*Sr;kL^b$AC%^GxhDDKd*vD-|64BobmJ_<<4P-xKPq z?PnHv`Ef*DGm_E9L6+2zDV8x2M6o{M9y3^ii#mBGVP#T`@kfIX(-;0G1aTT;os85{ z_nZO(ZL+4!EVINQ($c$rW!iO*;~=mE1W!3-wYA}G)3_E9Wl?8~+yhjS?vehg?kY;! z*HGR0{Zu?q6yfxzuTtR6j_@_(rUlJ4z+lp_Fubj@X?aDP1l(pDsc{y`o=G?0ep{is z3gRmlu$*ji#~2V%REX9X;1@)eAt2qakBGYnw%3a$JHdiW+|s*oOT6s_)r_%M`3drs z)R1ScH(dS$C`F70W(YkxQS+;b;<|MU%=kBht|GAl9um48er>!PF!w(?pf9de{9!c zniLzR=~=qUn+0pmd$_x$(3gxQM|f#KYL43a_&%57)%t18v#;xPpNAFr;1x`YR+3u+ z&mpvKQ-s0JT73`(1OmFo0XbdE4WLlnu~iI>riGQF3Nir9$Ir`d^Z|%g>?%F zvAPRGIEKPEYddJwD&-)BN!fD7#OX(D3s|Ni^;>4tg1Ajxivm^Q?6JZ$;9~$$=^9*= zG(S$cOoX$FtBza=m_^UinXzk*5ReG`78IPR(|sf*a?b<}-0ggi+*T66q_?Ie!;igf zP9Ukk_j7Wzv{ga4O*K5Xc(AQHFk9_z?OS|x7m)6>H*l@if$fk9uj=q&*l5w zS5F6b3`law$SsBWZO7()syvOPm1tmY+DRqMc88aM0f=lBGR!u~iXNk;-kk(V-~Y4w zH-2N|q0Y%A0U3^w2VK{E-qo5}aiBxgbc)sh*A_={P0mQ@Z_HWQR9n%Fk7IJax!saO zn#*Fv+&>jRoENBR57Br)fH#!etN6C_?Ranj{tXiN=p=RLVSqca zoSQ8l6(228!T~Mb4OmR|UL-sjv6CHCKrazT(nIg~gjoaLR*OOfE`2i9&bRa330MrJ}EiNKp^-UHg{_R9%77d~?G6;Hc|J554JxGOZX(fBQH8=-x&0oZa z*JuR`)Q_<6MG90=1P~7 zQXaFWq%QpB9?qlz)?+a$d1}eZT132Hb-Q44Lr8%&ckCs4dwV`;iKSBCd#Wdmyb0E% zEWCQ{ED8-#?y1=W3`V{*1UvUn$U7t8jHMm z2lG(8vX%mXok>?-ax0iaeR_P7oNR>Agk#gpCv@5iYO)_pTNpS&ZIOk32++MqGVYGHMXn}y=S9iNRRTkLAkYM<`Z&2lB(Ur# zr0FxJ%>2aJ64YxJX(I))@ukaaboTA{{a-!Y-o{o2Pi#9)$<=Be`S_yu`|b_*A$ zlaGvRBJN38W92z&vZC`%SP{&RgocQ)?(TGUwNMoF43+#*l}qT4Gm!MRTq@eJeWq%1 z@#M1#aqo?14)=wmP0UF!w9WRI@V4Uc3V#;bjo(xh1^>KirC466qQUn*a2TkrR8K1E|iK5?;5{O}r4iFkW81ij_Ts=`hp~Q3v`GXFARH@;N zqE1_7|8-b6;|f*}Z{5xugx^>;^)x?oYjBeHl1a%6yrxr###!j3{f$_pEFa6U(i8@w zl2HB3x`20W;^BhX$CLBU=esmSN-S*J3kjPU41(l63k`wOcUOK3BGXiJ?B zaGAY{(C$STo$!0Zgy`sC>)tYvsC?%}3=JBhWmZn_%cylxWSE9Wq1Rif{`{tQG{wW8 zvW$1m=;F~fZc(%Id`gxBj%v7yrzOYMLpd6sY40El`9vjsMZHc^5Q}mWlpV-s+SJE= zXDyJInG6JNqu97m!`=*^Ohkj~6vF8-xQ4|iY|HW@Yt4&7O6h%KyD6*as3KEw!Z(Ft z4w%cT(h^D@VG>&7Nr`++{ExumBQjQO98 z4~i6p@&v<51ro#o=!R<3MjFCD>~e`}yOV6eO3gBRR6wc*ZfEnlG=laJ4IbaCB@ES0{eYT6fYT_T>yT1G4uW>g= zRB44LI(e8zp%+i_4973hNxVRiCPF>(vVkOw*=@rZw)1*2448fwNQ82H>tzKc% zq5#ux8?EKc9h_vDj9(O^Ak>?u-7i4Q`KDrBILp+i`DP7KDC`duvN?N_X;cBV(a|kw z_4jkN9+QoDEvZTPdY2w=t7Hh9)CaxyHv0@B8T zF=WaEgdoa~m;!AgC(S?7G+b)Z&mj2ab=|0$NT2|j^CE9~6X_=oHUx-0)73@rJuMBR zDjV<6d0mWIC@t%+%vYDva_SHygE(A|#Zw0%;v1noV@qTYH(=K_1ua^3xvYZj$Z53K z*BlkjH&%}@qy)i+XhWhx!c8B=&6bGP0=g_+uP!hn$Gn?WQ7bQMyg8H|YtdO=KP%D% zH+g_B1eJIM1Dv#)VdeIVR4tGR_eBC)9QI4@n^=?(uP2%Vi-yOLi&wRe6M4jWB0w1- z)+Vh;h=7%cEREGIytMkw{>BAv_;Yl zlplT*H0XgA3I@^P4bmYbZAT7;K8S;=Ql%0Lo-F6o^xenxO3YrxTNvP5Jh<{TWV>0x zQz&@+hzb0VHhk|cTJ8c>>FXxvT!&ZuN)$0QAHz^qA`I8`)U};Uk|J^=R@-u-0&e_u zm6%C_=!{S+wJMXP__S1F#1=2v>y3K|R78CX(Zy7gx)4NV2@6D~EGQRNZHv$>AJ?v# z1)zP&z#8*i%iGdbUsy$Pw>&voI?sy<^obP=Az+nPW;sxR%wFh?&FLH}?x)F;_-BBu zs&Bppf9gV;5>|}i4bA!U<&0LJai}(TRWovOvoTWNk#hTOe znvSdz4}H1l>RqkD&+v7CDrQ@FAkNQj_uIG3Tz@Ld5xCFadT_p2R^#k1V7i2)8NR zU%4p56F2#oVRf7)-q+BoBM?1p(z!g!BY=DDiQ{R;R!Yr1{zX{1(VWKobpFOwJR2$P z+C>yVRs2CGN4F~+qm?GzvV_r4(6%DhIfAheU|*xM@OcGiB_(AX1$;}rCrBodA}>&6 z*Y7IBBl>y+Jlr6m;TjFRvOFeH1hmnrBG3y6~ExeCP~r92MnJdhGNb}_?@Ba6-jT=>?T3P|C`28^C5#Fds*bU+3W zs*UA=uq>eTJ?vdU8Sp}hjdYEDqLEP<@V3defS|N&C541xG`6wCVjU}C`$Pz{1hVIr zM+4Pt<^ber6h1Zb7R)FL%1+_oGd&Y$p43_Rkw$5X51Ql&yK5or@+k`InJtqwi2$e| zYIdJ&Kb`O&H?9>*PEqiX^cEx4s9z7cz2XAp4MSy!hSmv)AwQ6C)GiH9(F{fG{qTo(EX36TgHH z(VbjTagj3z_Er^UnNuJV8TtS|7;UnR`(0C?H9rI-$_u)ra%n!#zMYDTQN|t!7qWxz zxdVU>0KS$M1+Z-h6zNXqRZ7h#+TD@@m4mkU$i94jkZ5xw^H$avM~Au~Mzhum3sP;gDudnkBA_W6-#yh)Kx_4|OClB$a z?3(h2KMO3?povOn%kqsU>AdExewBg)EqvZ{j$JACKkMcMf>}Xqh<16x$pPDjDxou( zWcD(kNaGBWj}xVjx?}yfYqA%751hGn}Efxg`ty12I#f-b(_ZJbdIA6NH*h z8x=jgLT|#-iNLzs{mN&_c&UsEKyoEeC(lZ)oGR9wHJw39R}n`iXCYbjUT>t7Qsu@< zXw+M^HX+?4pJ{n$bu1~SpA^gVXX!Ct3)Jb#SN@7yNdS;JfEs+_ozvs}wJH=f>u0Vp}IbL$aJ8 zT4uo4w8$a8dESNb-r$04)ixLCfqc*S(HeZ!Z1IXmNEBAA!Rc)moC1^>ry2o#bm6W^ zQ2;0wgdbYv(3{-n(Ljh2;1jhkegiVoi!?KDxsps%mIOt7GugnjTR&W@If|0%?(keP zsx&cL3dnT8marm=G~K<$vApZ+`H_Kj>CCnfZaEN(2aW}yla{(Z54Vw3SAI4B4v*5P zputUPe)iV-5JrIpObW(jB+_&aT4oZEOb08*CdV#kXes%sArCYy1!_mqX*tXuk_WEh z+YlxXr*566qIIfKWR1HyTCg^C52k;-8wn~Xg)$6)U=9~FO^#$=Hp5bB3~zo8Dvqp? z<+xv{8BvlCKW=nVv-rM5uT;KVTRw~dRTbYi&s5%!Iu!YHbb(WnIyqGeC}Qpu2H;tL z#xB#w_^gM?e(yc2EJ4)UuT6~5X7oI@vAmFvyT+n^UhPTkK4Y{i3+2Hq4cHw z%lO?_-bJjV*t}rpls#1zQPwK!7iC+R$63|m4$_eiwzRrwt?J7Lao(D>)5%RQoC(i? z!Ma!a>uO>2%|?Wk8~oN5x9O0Q`65(UXRd%74#@I!`Ekn)#U-msQDPw%UDD>DUd2|) zt(aC2fQn5d+)-5HNWBZnhpakDE^*o7)HeD~YAY6XBH*NKf#BC}7}ipzy%V%Mvxdh3 z5ite3FP{N2h>RgErp#uBa;puo`GB6nfO|Dz>AiG@9>jyAN@EkyO1yzUM0DMtv?ILV zC};z~Jkk$bkraXHfHxTeFjfSQa2b~>W62sX!W1_FSlhcT`V0+R^7XB~zk6eWosD1z!7T#3hP-;Mw} zBKfHHZ1c^<3qMbY0IIO*-$36kV~FX94^9yCV3SJ$RDsY86RwY4M2vT##1wyjODY?rP-s$1 zeMDR4W6V%`6^8|a*r37M8x84D!SdksX+f6Mlcfh|SJ_rMivgfV-%j#!B16ufw^a3+ zx9kZQW8prtZy<_LYCn2!r@fOG2V0c)1iKTk@Usdng5>slxaZpAe>Kd{SGWQ(Utfu= zrM&e(#Xd7Kg~>KfSr-ZYf>_9ULRqpZ7Y_Cs14SVy5S@*c`@-A z0AJq#TM>%+8c*LM7E0JT{>_LEWktGU0&%t zq7jE$8_h6#&$gw(j`g7Og%Gr`xcSb{}@ z+r@zPkl8d}m$P4fK6Zih+$fXp8jt%~er94Wg?vh0K}wTSDkM{h7d}Eci$F!L*08HDX6U)Y@SZcD(oF7 zx?x(N$~^Pku`KPR2CBN-91&%12eE{1&wWw7 zvh8?)^mFmkXnekwiJbv_%D67Ya*;a%dI9Ar!fMKyQsJ+yz@>jCsKHBMIuoH}Sx^0< z32mNJc%2G43!MdhO73nu~>mw=FB8LbRkdR-f5P*_ zb6wB-dB0xw-P{0Fc*=B0X70n74)R0YiM6&RXA7Z4~3_*o;Hf!MSLw*XKGg0 zNv4givy5QN&ve5kP@{vne2~3{IMKF=eF+icw1jB~5k3jsT~O{FqJ%uKk)a8QVsM6D zEFy}WVZ*0G5HG-+;n5_luW;`m3xY4%DHC~AgD-!G$P0cJ$fIsk5j8TD(p2aw)GN}P zzL6uB-dNJ=RBD?9+Mg*xjFiK=dEX=k`a?7e+Qcg{?!Qn1@ii>Q<~Zv6e~(tOq4%dO zFxdH*L$&!!^9*PsNx~qx+8|0dk%X=*GMz@0 z|9-f0-&60cK+q@^Nog*Q5Artus2yh2b0|_9%YPfu{F22+MVyFnP*_zFH%}h>DGAJ1 z@<~Xa+V6}&d03K2-c-HOVtr%q=r)K+%G7uEgHW@+dcNv;7+RZ~VXI%{@x`t43LQz< zg4~`6cDcPhb|B+34ez4&Z|>cdvE+rt{Xcglo0OtAPdaA(Gw36#T^K3>yQkX@?-2)%dG9*T$dMi22l zgezh^x<>h#Qq()$mSz*@P)oP zxJjSC4T(`At!LYO#6Eir1S^ltwpcl$bZ|l-NbuorV`M*Fm;6J;#i!+=A+3@tRzu9# zl1D`n8S5)=Y2V2DZ9w$hHhcE%3$XAqR|}Wq)mf%a(ou1F=e9aGZc=dZ2*1D z#KDVw_;i2Jn?W_&)Eocr!!9o!)fDeEZK<5VCe${<7ZrT`uEubbfeWuq6hjB9RzQ{T zO3aEuY0OzmbwFf`4~8=qnW9GUY&+Q?sBzzl*2JjIZ@ zb*aFmG(;@dIibA&5;7mn!Zz*&QwYJ96!n5z3SKC5!~xVM|X2jt1uFEPpk^9eNg8yEQUsOQs)s_H43FZ z4?48T_+!*m8pig-9O~8J4UcMzK6r)w34VK3poM3W@XVHjfj02BpZgxEx$y$s(w3n6 zbJU09Iajcl0i843M+rq^%&dFJOAH!Z8ES(JHD-<1>C}i)x9H(aV+7Fm-E-#3nkcm3 zw8B8bOQt{Lgk%bg+dpE8TM+Pw|DX^P|IC4;@n8mM#g^ZVws}x6+4Ri64xg2_w7)pO zn6uWWQS75?3*9=Z`tutATtaP)0btsOPi{mk;KHC(7-Jh?L6W{>KUkv3P5Uw+B7YQ0 zJ7^1KgyD-WcLm4yFqk19i9B3c9StWYuC?*W zJ0Ca(2g?_Bxp$D;$TEoP1VmNzc+{}TR9Q?j#?h)b9=8x@#$J8jun5wy7$yj;-|itp zO#m{Th}LWtuA@?LYsitmbsqbe z+U(t-b`dspm;g+ca)$z>aBzSAHiMrL87KDtUViJ=;^lPpDL~bH8yhe+8$#TKOab-v zV`N%rpqXeHz{nyfldBvob2AL{c_1CYkBv~+tAk#VRk`<)-$_pp zoW{=@H1~Z^;1y)hO!nu?2a}2&jpM4=JzB|Mh3E|M1q8}jIVNEePI>e;zPH&t?>_C| zOa+>$mGCSaaxp{ms(X3y*tAvdJ^Jf>)F@t{A5p!FtfpcB84C_xbrD#2QLGj0!NFaH zL9a`xysTT%X%m7y8V#|juC#9jB5~gACZykW4`@}5y3pgH0>QP{ zr72%eqxPiZx_+87$bJ!%`dRc2roBZ;dKmA-OG5BCC0iRxI93$k@1_Fa#zdmX0rA|f zaqTS(8Hh{uf{|RoU~LcU#eD6&bvrNjs8hE)zX4`Y6QIY|PNxw@@}CVFHr`O$z&Pz~nB7qGtAjL{i@n2Ig-R?e7{aOx#ucRncTMsnGsU|vxaG?XHD}sH;c;WI zw7KzAqc)2@-4~S#(V8!li*dTxB_!1h>|RZ3#|OCJp@^GV{%2D^%)*xW5a6nGH^LM< z{p!OWm;3|Gr`0G|m8)Y)CRYZX_|j$43FEWs?&Xt7jB>H-gL;$09Z=aXRYaPO|1Ra> zW)aXDh%P5yw}IRVST*} z40ceZTOYT4QEOfld?m-0x_>gsG_ks3ZTXS8Htl8PsmZ|HO`HJ6 zfdd_JBkn!~ii{sG}|q@pA%oAuEL`mQ_e7MMzBx_DHaekZpwC#fpI& zpc`TXj4kw;MG0D|=Yh_OpuGqi-{Fw&%fIhUIzr2djHeFZ-B3HZPPSyaMw2bGzOTKm z`h6ip^(&Xia*7h6!Lb)Mt3a_XLToSz6aFQf(Cx}-o{#eug?o%eIyppg=lL>)St;^M z85~T8YFb%(@|DfifB{eU14u5?jv2}1D#kHF19Y^9d2u544JNs*q{n(`h{Z!}EY*(#f;Xr8rEeu5OzEt-Bd z1Z&7p(%y_Cw_r4^cTFX63!aQefSbkpp2txL@E&+$xe0h|$oru> z?T99SGpH|k+}Ms^OFNd;sic_(I)FANV8~g9Fm8-s-Yp{CYF^?j*d{yA1V@u`TLYTX zY?)3O1*WQH{*)&*dJIFl)=-V&{&w$s%@H0rK=Jlw-}B7cNJW@~HT}hCFDpR^YK}~d z--o29r$_)>9xSm2|i&fouH@b_(}^Yus^WP@v&XDwK$&rKs%)C`37%-ZNJbQ*Fc& z#~r2~r`(LaMO-!ANm0h(x|tG({2Eqw;`t95w&@%;eNn>C+V^qawJh0LlGWWPxpwe2 zd`=R47`&6$$81}Y`3kk%6?QDv)DsGN#uViOEl5IRY~BXeY$-S}|C_r8br5U}hY?XIHS zud^EW*!IG35Xt#Bg5CkmbZY#av{~pPc395{DTmk)$@09hjQW90caBlo(XPfU26Ls^5^<9e8GI%$j55T z#QlL!;$I&6_D+=Lu#rB0j;ol5w^9+s#I2eNd7qu>Oftx|^yXV^P5n`UM!!`|M&m32WU zEmwX)z|y8qIALrPm9B#hQ=TLldyt#Mhr$15x|cCABE>l=?=6nG zSuaImE9}Fr){))sg`bm?XmcvIJm|2J{IfYw$GFVfbLsU!16Xqd2oDATq3wrg3`*Tn%Msy>H1(6=jJ|YycR*hYhRj%-pdXaksnR3Njc~KRi;!w3|BQ?^+)#M;Wns{$ z|Kq_R&lK;@)Hfc%5ITriWn;8gk)@GmaVopFwHmgWK&v89GlD-Pp#FjfP0hPCocaEe zqw_1qT#svr;$zICSbF*|S1x*YD=;Hk~fAq(c%7jp90Y+x2%G*0M5>kA5jg zfJ71_(CfTiZ;9TnNcXGrWi@)=g6eHatp1$n`73@*?%_N_W3npMms6BXTlT-iniMe< z(1rs$N4yXMf(4Urx9(bUjsOdPtkV-;4<&REynX*>28YwU(Ie{R(izG5 zF&73cXaARkS*+BKqIf%K$#mI;btH@m%ylHxSeV0w1Kem8tYce!&{*c;!opbUPD{RX zOW||Y0gbyiyzQ=N=D7JCx5h@7S2GIF-LrY9y6f~P{HN#ZjJH~&Wu%vFIuR=Jq&92U z$g{_a^{qe(;_CiV)Arw=1B`ZFpL{mCTDFdj&Jk-c?SIz}^la(hXgX?rzwuGbOOQ1o zVNrB2?WnHXBB;R}=7&c!K*-lvq|DT1C_qOU*qSRjtD*< z?ZD0vVhAdT7yWj=yXqzO{7fL_^YS_f_lWoO%jg>` zU*9r1)p-Bz=1%f)pj!VtbUEZGN{|*vVZfHKcWes)2j2{H4fo#RBWM(O>d6zPSmfqP zUb*nR9BHP>*u_VdBA#^%^b^d}1`p|Q=qLAiVPPOxa(7e-mwwN6197Xu0goX}yM!X8 z5qckV(m`=-?b`imun|PEy(gI)%2sWpkS{FL|ENk?(est$-aI$Oy+IzldEo3*YVCeU z7C&8=;u!H(#6BEjxLR<9TiyMnJUfB+jD7LVxn+-+UrOE@qwmsDJ3x1T9eH&zWXEm7 zvsVu{^j!RFVLmyoFZJYxZAw0G1Zy8gc3d#l`T45hb){Sxr54S~SFR=$kDVGSHd3B` zBr)&rd!MU13QNhJJ`%8p6+c=-G)HkmAKCRr@s|#kBr}n4!ui|=fSdYu&krVu<&017 zghgMLFTaB6EJHaPZcKpH=%qVMgP%l+RNXOYTuo@50jd(M{~McSua{5Q?xSX&;vl5@ zE9?w!dR&W{g2XkOQ^^TE?3ja07}Z=lEj;7#uwya+x}ogjF5Zxp|I+TUYCnW&@wvGvYHFBHHnY8+pS#=-p zCnAfkb@~f@2wdq!GWZzv*U*H+Y zdAT3{`NC^ss%qfl-1`EMX;($=)yE^SZJ!%?8DZ{>J-JNiQI9iV8W~&;I7PlRS$2~Z zm{wCZ7;Y+AbYV|Cev)}NAw^9~&|k?dW9o7Bw-KFiQ9R!!mm7QZk0nr#Ys)^H(agM= z5zOPQt8y&m!g&2#c<${+*XF(&Cw&ihKh~c5D|NcZy2E|tkr1{;7y{bFIZfWAbeKOF zzUZ!Q1D9b^0ij27Fe|}9^Fwl+fpYlH*Yoo@r$!#H2UV@OrCpfGjY^n0?P`W~%F#^i(D&z%mFLa_WUJYW#q-e;i`2zbVxDw6^PIYnWW>3${OYLn**1KS*X+ zvKZZGM{%`53iXlh9nmHhYZU_i!)q$-2V5DhfY=gzAvtMO4VeV`Jb`Ur9=z{(A}w`1 zprL~#ITFsEbP&I^e?~L@q{Gae%!y$hbaf2)D8oD6q~QSbiut_A^{|PnZ@^<$6I8CF z+)breD7S}}#^(D+e$4ilR2pLfOQ&@nDWR2X0ryh=T-#$*Hdk(70Y!);UuuCUCq#8f zYn`8_VWW)+Pm|qOPP%mPLsPsY|8b;=|5PFZC>7w6We}11xm|HdbadL9@#-+ha7vtA)zNc*t&iyvdTx~d> zAX=A@O`O`hw!%)o{AV3wd1CLt#SdTa0JT;pO#b-a`f9njWo7kb5!$@g^v2hL(-}D!gTjFxHe$dLFOVB;h1E(VDhYNDOyv3q275UR+2pWKW6v}(a{t9sLb zf3Z(#z(0$S0ZSv`y0+q;on!x1X%iddsA()33k2@u-wSmcMfBdc|8oDy><9N-Qm4_6 z;uVMSU|90O96{V-zdo%~<+KWEzBc&Djs7?i5=Se}ouu8)Eo!PehA8-@ritrIff2Gz zB5mAA>Kg?jk$Xq0$uSdf*H96e#CwQGoW|O};!%%GO3q_XeK-Er{PP|-`*GDvE!zY3 z%$ZE1*@hrDn^T=dN&_Gl7@LsPKm^_x(>(Hrs8(b({XRy=;-HQPlCewO7RVf8J)alBAU6h7brr^KbfKz&mVHj!2XdVN8-v;7{dT*e3hVFYjcn17RnPu7q}Z|t z#A&u2>ZwZ9-C8nLutiR9-j=45+fg_l3>NQNvW`t^A4r!)^Q)Ox`Gz)3P&a3k+l?|) zht+akTmCxg6K?Z()z?Ku3^gqqc0n2tG--2%R~R29M`VY%2IPFzyzI}akt$0Yrxqp& zU?TGP*r$DJubg_uM}G;UA~8Av)g3SsbnrvXL*k8iI7;J$Ckn;0XUJbzqCwJ#ZfYQNKRTJSX* zE8kvh-fF)^EY8l5>p&7|^H>V^Ut4(Jw1Igfi$}ntMF$!CvQP2ATJD_z9<)1F#)kzj zA@!?pfi(J1?KWKitTV4kCW2FqklsW(R~M)w6tgzBC3QlHzRKABxt{(iS?-<>wN5>m z!kJxaR+F)S@p$*}fT$}Dz?|WGzuHl8LfjYWVI4_(evM02o7?Sxg7*Lqy$If%!#Vg4 zP&2r%l0IIZcu0DC$(#uYOa;3TCJ=+#ST*^h?2pn;+&V_DY8*(OCD~Mu%wO^+M2Q53 zm!{dmLoV{G2lQUi(&cfn-H>rmXE0P+C=||W>GgcBgiR?mZStPtrb&(r+`eGX9R5t$ z{-lU@TDdL(kDjcVR^y@j$K%M#M$3cjjcg~{04+~Cf;A0NuK z+5h&5ru9X{c7X=1*M_e;69EOJHkl3AtxcMZ1qQm^(|w>EM!donX$zEdL&OF9?nZ&R zo2oZgUO>&RJ2Xc9=-Q7zSt|>CMc|7>>@3H+BsE9%Mt|mW*f!2FX&U+#Q zox5$A63Zh830dX@Hk5>d>?vM5wqPGKR++T6>E37oUXW8vhe*P}G_ByNe0igFxJ&T2 zN!P|2Xp5VoBJ0@I-U%erDr?M7U?J|JIitv<9<+JpQ7!2!y#B#bq|6aLRM3uF{C?^@ z?XWO}h+^{CHj;QZ=l}XIJy-dD@`7hYp+AIrWuz>OCX&`|bUO(1I@C6Ec}?M0wH>tg z{-K*iop#5LZFnju#tB%$AXm@)Bi{zpHYC?9?cQ;+QG;Z=xAkPof0a+4p4~C^PO$G~ z*-Ufa^J6Ff_Ks(mdf|7>_6w(X51)(}x}xEC?c>MHt2&{(KV12DD~IHQL|BfJY{skcNhLSn!D(-4@&C18?40F8B}RRK;wlfc_LdJ&JpC#ha~He z^_oqkk3smG^GKkZ&?0xW?nu7%_RJuwjTbqEyH5B*Yyw`O9HIyd(f`N8(&k0IW z>uf?Mbsm6gsY~_Nq6Va|ki$|A|DAxLL#3t4+WiBhaDUt;iy4?|_wlfE_}p~80Ls2t z*vwuC6C{^4!e0?jL4CknGSrO8KWn3`+wZDDcZu9*TUUQXdqRpstK#_>bbQ2Q^a#6Yf zV6!%N`@G+r#zhL;6vY+-614M?)DQ9Y~y( zr(Btu@j$7Ym>5tM|FFh>gnci{RJ)7Tc>1*JRNG2v?Tl}(KA1m75u#VkhSQ>8p4qr= zH%8M$r`A4~0Iil5&A^FpnK#Jj+Mft{XE0D(J?H$c?EwW@oFGlq|D-RZTe6n4o>4y2jl8xT&;ZV!H#?|%2< zUDn#)FHV+&*8Oym8{VX^*QbmX#V>@VB7NR$NvKgjYj^Y{P+CpaNU`fr)p1JUtoX!`R{1*v6d5u*M4R~ z{jWpoo>LI(jrvH6S_L5}(jA)sak=X6sR!X6^uGTiRy$=9>{*0ke&`s`dQxR$An{K+ zi1bf(b$4|wd@jhqP7xi(OSn@JgGlgs{)G{2kPpgr{>)#c4Mx5b`}vPFhm>3F*VFf* zj;y0G&vttGGhR|ZZR5W@lKSIl%}$CiyGC`lC0GS?ttyE7RRLXdQSO7>gQM5=0CGMn z@d<|4`@uuQhY3|KUQ{um*KLcd5tuzsRo1 zXJU5Y4jgUVl0*woIw8u6)UPwX5*JVp2NM26F~uT|Dfe5xZo z=+zd{VW66Ux+V=k;7!BX$?Fucti7X{;!lo!8hI(Zz?dKMoPiyFTe=U2h;2xp1Cl8C zw3&yvDxIsM+(>VL*H_MBXUUYj0#?+(di^;I+P=Qc5PR*X`>VOW67&N4<-RkgJH&W~ zX%b}wLRJ`2Qwx<@ai#j<3KE7G`N~09w<8$nME9H z)VLrDx#r!E0p{&93{7a3b#>!}m|@3cB{Ih=Z+b@ixJWLZJDg3rvVfm7BGc}YBxlI^ z_)jh9a#bg=wk*YTFdfkGHqV>Wl2XCS5`95B-M8x582{h}`o^f*S_Zh*Ym-!TRr7=I%8dKLgO)y%d)x0&Hi6dX;u zp`#8QjXoNI9ZM{!*xi2+8rj9KWzs0Y_Y{ba1-IZIQqQd1--c|UhPzdxVw4x+EDoph5Vcz=EUtSiCqDt7X}{Qu0}l+?ikEx!FZ zdf%UPu_Ef{xs!i|0i3Kiyld!3XaBu~a7<9Q%+em_I47)_Iwex9&89L!>dGAfmC!8k zy;ri&s{>J;zq$FTh%T5-ia7bIlKW{5R@RC|*VS4i`xh)a_|JmW49TOZDn zmT0sncNwtaDWc-o(3ol2AVT#%w+FneI#L4$3bcRC;!$phDz+i(h%Q6-(Q~9I+Z8F- z>I(pPN|7MO`NzVRI*2gX9*-m$$T6+@3HdvSaN+I28C6IhESFfohQCnfCzQLkM;M-` zum=wp*R!+SOyrnjH4}HmSrS77cxJj;M465(vSRS;Ziq<%vAS$AqQ;#!ExGp`;t^4o zo$Bgg6Iie%oePspRYJ1mIxlDU7F3$p7z2}0T)E|`0GIU;W0PR5HC8J;uyr>;=(shJ z*~fB!u^BI?Jw6XVLuEswJ3C4cJ(VwGn|Y~l$C?R1?LCI3@{)2>Np$&g2_+I^w1GgV z78^Vw*MiS*1XUpyBYnMLgNcm_CxU3&>+zfiaK|07-Vf3i2_K>wZ342KS)Vem1f!zL zvd8f;RWJ~nVX7zpJ>o68^j6b#yLeAjNPh)p)45H zm8+Sx>l_Qs1%zf)gL$(>Kmo?RRJFuwc-M`Vd2kX1w=KDZ{{RsJX&ua(Njdo7&`}

Hx4ja2;)Se^ZA#LaH70yxJk9Pqd`o1%A1ScPAhEAMLZ~ zZ%aa6I5`^?_MJ)u1@GS;hdg=VEO|+exyCpQ@DSXGST@OTA zJ_Y~`8sav2=Q&F>{YpI&3lfoL&%#v`F^T$O_h1q(3{}FI4CRxv`g^RLoA4F4``VkM z>i!h_q@$`Xd#F6m&4EzSg%)nwv9Xe8iqd)GzotogD*i zON;KFG>972m9HIp+Ag_#S_<8?_p8OS`{HtrqwvV`$(zFOeb4wlQ5y5zyLzy+(M-ID zB*bVsp+VOLX1Qv=dfuSm0Wpiy-Fia3Qn_+#7dG5k^T?M?J8bfRB{KA!mi5fM}0H^fX^UQ_2pF*4PJK%NFv(SqsKxmheeX4`X&e)K36iG7ZYQ? z9$l_yGwQ^wK}JFoI>s>&Qm;r1NOKX%$BLgjTH{0P+(0|I1lueff9u3tu+gTc?qu%x zOmJH8PE}u(kp996*G$eNnluNcdIwtV42g+u6LDvgxfpnE;a8TwpfQ2qFxb&hEYoe8 zL%Cz&_wzXa(v*vk@}1dDL+h^;YIWpcB9=i%Rd3#uN3s*B1oj4yLcI-5cxiuU(F90J z(9s)hwH}#JCUqv42Mkhgse@5=`F%C7c{NGMwQ=GD3Z4r*kxS#FVwjZq{xuu@C*58X?t*SD za_oCGIeU}Evtu^A0na1yDvyR%YzX_PbR-PwNkecRMg&pD4W@8(Q1FOLO(_e_Mta_? zE5#C#)+EOgCKMH*M4ROX9ITrU=dtX!8barR%d$Ym)_Np_F6x2~-=FCNp zrV7S;CrokZTv*4P@8r!e1TTon{#Kc>;@0no<|~d>_mdb#LgQY;ADP@I>Li2-ly#N) z0nZGuV470}pj>-abq-Of<*lqqyH13Q=J?W5H-0Z6AMVtwHKBxE!T<#QWPeNFpzuqT{2BQEif@P**q{*cGTp@02g`x(M&Q5 zMbymx6n(PURJ#U6QWeTw7%qyqFmL|c#H7Ck1psG@mVA9L#jcfZAXm)@EH&;aEz^Fh zTXJQ|)kP&AJR4^J{cd0zsI6!Z{rVaa8Y(Xv`0M(=^`^?@q6=ATZh!Cl`ZS87!K&v&kLotHL}hOUnzWAS6wHkbSpvxFfynx#vt+5}q~kD-6v zzfgbvOT6OHBiRyo9jGmd*5rsLm8fV6CFH3Vd*SX4YEMapcvkYd_p2LVxCO3W4 z4RpH0*rb0cF#ve`eIEDc?;{;2&-QdFYUg>d^H(fdgL0&`K+~lvD1Ndb^L`vVlnh2D zQ45n21m)dAI>W{^{}JjG70@$J4{%}U_4irE!uO~|7}QU)?_Pbz`MO1&fZDKYOfH6z zT~%i;+2KI3uY)Y0kh2}xnB~Vv>Y+jqI=8oMcaxAaysyk^%GWa?`y!pK(2|-3J>wG{ zQKD@G{<$qxkA2Z^ftds5r81tyfdXzA0j%;HTF{r^k9ZTRUJ$1fABU1sDZi)5YJ_Gl z_2zy}ng7UWaqkgTyV)5x#%?Z&*IMg$i*Rpe1dElMMa0`AYDN<7xJH<((4RSIE?d#E zZUwxnpS;{k3NY7(OdvZE+jd;l<(@*{AX1c&95BdW?sa#QQv4_J!|1WEdO#a!_S-?V zVhFf8Z!}^63#qOkG0|e0a!~(iTRRC4Rcef9h!t&Iswc1!r7|(_%&vk-(=#vfcyC1G z7I5^^fUtaAl}l#`5^%2rp+>9D-ONK&NEwWm>Vi^ZDCa}Z=-Tn4Gev!8)Y47n5Vc47 zSYexLXR4GrP|&~j-J}(w7m3@Z=FG3#N+r}c_Yb@rcGf@gw=%`xQ!@+94)sz#9y)W4 zUH)vag#~JCh;1~*Vm*1eN444eiz|8n?+$+Dg{Fg4<@1%kx!ca6z%8!Wb4}_=Gu3qH zDzB8F*s59TUr^B>@0w=NHRE_AAagwT&;Srt5lUb>SnIS;y-Y~aH);M z1;jhMI=Y%lQ>F<_KHZ@^>&ezcg_UlbVZrbAO)OCStI}6@=063W<`$Y>y3t<~{xfrD zc24`@wgdZfi^U1pJ8rLft2urR6#_%lre3)+iP@9kO(deIG%|lM@+&E_V4e)PM`U4p zkZP)$q&sCssM>bG(-}XX%xS!i6qtBXQ6FxL!Gea0d;@Jeuqcy}Q&vguTJ7`q z@`j2>e0uTV-V0hO;2+Gc+25T=Rs{0U3t~kuSjnA~$c) z)2#YY%P&}PmKoJO##Pmx4yC)A-_(W1C6Gj!8CPTZ`nZItSLOl=UtYTP7NaL16ijXm z2w-nhtGSNzZ>$*N`de&?9_q@9CmGT2n6DKOn|%df^NmnrilFH^qQ$n3Wx`&(RyI%1 zO`xJi6+$WJDm~1OFCp?Da-z zl!mz3Gl))B=rjClF_jAR2^0n;T8fSEt@7|?s{+}z2mI$p2sYPZ0Vx8;)NCAqn@q}A zL3119x%Sn?G?A%^4|WC{;g3^B>4&C4H5ysYHdKz1Lp`EDC=^v@0(AvKdf@FKp6^(8 z^7~0`T(|FLJ`qfGLwWiz6hYS{yv?hWwlhh*?)zb=QqafL;vgjQNrtx?_A2-8w|<~OU6d~1zG8GD=CSV zx#iu&?{(*s`=TSxjYPr!?EjXNVix1_fv5~l{VLj zmiSJ)z3M+`Id#L8@^17eWIAbmq0xYP!7X-gc2AxBwRRLgISRQa?&DWWC~{szw<756 zxEFibgLO%u$Ax@bRn+WfD1IH=aie>6>KxcMy-M$lgGsCR-#bFS-@ToG)FS4f@b{lE zr_%OBA2iIWgV?fK-G5_5;DA8H;Ho1FBEPEgZWz$pi zyLAwhkHRE|<<2zujjh8jXN^(H3-BJhnq%P62F3xl|Gj?(on-VNGx+yTiLes4Qpz$m z6b-pD^&Oc%4Xa+b&js)78@{B=J)f&~pu$bn$f0#3+%^Jf(TDlG+NA3b(}5x!3Tt(a zi!y_Edg#960a%J@KW;Q>GXX}7d;@OJDptw~_zu(p#sjRGheaP(YtQX#geB;U_}HCU z`Rz_hw+=zA+2BVq1DZW2?f%#igg$cx?ckf(r1KXSG1d-puwf|ZJT`aGO@w_l6hBM? z_0O5#i_0TietVk8j#In~Q$5oYvQSg7WTgHAmYBoV4|Y4Hlcf!&Yii%@6%J+sESL+J zW==CZx;WS9TP=z3N<7$0?YI0!PvFl;YHlMa4zyoU>L4buFqAsoe2o4<65C6#L7>Va zQw0g-Sk4beL@J?|WhGMP|6#UNZ9bTe6A4WWgyaX2g>vH5=IBY(2X(``%m?mQm_$J(SPd3(HCIkNCvS{3H<2VbX`Ex2H^3lutsu6~*R&%s5oeJJXzZ}#4tuEoiX6-zf4n)JMS|xqDE+gVaVK9nB6G!S z`MAE3QJo0d7CW&|_dZ5aPy-1pI#d5GNiU`83-8bOAsJgzK=>_^7tL-rdKV3Ym z_wtK4@Y2wsKPNT+bBL&2&?qXLn4Q>Bm9SiwNZ1Tc)uGNcsTu<)?T9Ki(tM;7&MJ^- zGkXugV?U7Pp|&U&c0)<<_C}t= zs^*qdTy441hV{HWDyiZ3oR32a#p{!w<6ZcJ32LqyL4ylF0!O~0>r0>k4{ zk9Rqjel@0iYTLNhg5ZPxKJX%0_7^AR$=)L1N9rjY^X>`d55|W*>zeAm(l?-Tm_M^b zzAqQ(E9Ztl-6s&2m$l!#x>lhvd6E3z&$**7?^omaKVVBv{4*rL=>X3nmWYmukA2`D zbz4W-BhdQe3FAx^!-9yZM+)Q6egV1IzbDRA$xR%o9q_m0_{kIeWf5wKt6A5i^g(6e zwcacoWjUS&xYCL(pBz{bTvRP{D~p-sxOalMu)Frkkp^4S)OC;R1;-}zNPirYpQ6{J zKNA%S4p64ikYAe12yHPJv(1&jc(rJmwiZOQuKSZQ7_Q~+MS-@q92*RS@hJ~BTbv@1 zxh;zt8<;RI*leU&Uv^(0PoQcw%Zh(@n+mMHnI98S`(=4?7+t4Mv4$^1efrQD!6|aP zqr4)5%is<7_|=wz_r1bMkh7Bgq^II>l(EZ(vuG1)nOaDvGbjQz@)Y92V^hhMwO8J)&AcZ!DBJOu5&H; ztuR&tC6M*oA$2y(v@E~^bv_2mR|DaXjy4Eo7#p>!W4QWTv?Yj0m{WtqzPlxKq<=^N ziUR|J2^~BdB3R9I7sBoa*U3$3gFt~CBemnAhN7Rb1MSJP5_E?@u}Ck{KhP-;=fi#QpK{$Vca4?bgQD&X@)fz z(c}rT8tuKg(YUYb_fBYh$+qG132|~XqnG%UPy zJ|Fb$a;8I@qSX5)Dxh`C1rfE)u0-AFUmwMp2IWKiPc-91ha~B%XVX7h1%C;Svvd}7 zSfv|A&uuw`#n^v$J87WtdSc+je|gwr)Xs^&8Vb2BD-x4mZs~u8O|}axcf9}gKcL-) z8)D?~kND)_FZqP5OOQ9>iHuJ3hpuaL|Ne14x$D;%UR5m0uI;bzBLmfvKz7}u{{gRa zZ~+WA)n|WwxN8(Ak*CN&RhpUIBJ85!+rYxo^lnp!z*W!^X$9Ma1&3QNN zZ~tZ>bWG}b#sM=ROmF{Kue3#(O;4$DAEW`-Yn_!K>zA+z5-% z8P#Oo3z$%SnXbRQwn>{Caz<*TdYzn=(hN=0w9o%`W@jYW0@t*Oi}hxEL6N3Se!$jK z0->Yfxv$5;BeUxCE&B-^+Tr?ELvAU`$hMqGO~Gzw(j%1KRl`-SJQRCs>;75tO#K=0 zwfZkUt73B$Xd`IT3WiLQ!D;ljh71(5ACO;IFwJ&S{)p)sw;@R9j+DoS8epqZ-BB}R zmb?SCk1yX)ad)_|7_nFeRUKwp#yoH~93>yzafKDw?HWeMpu<^GeTAgXrYfWuKfh%_ z3cZSw$`rN6-E&(@riq;1bH_>e#v&qBVZw6(OE!`v@GAs*F{V-e2=0IS22fsEy^OtS z%N0klO;9GmFNaWB^Q~E~LN6c#_C*>D49Q$H-bx$W3qy)G!F=>feYf$d+ex3*WHH+> zBbPn3jmC9^7?8KN4yI8=uG3cm#ZabrYn%Cbb)KTq#oG6i;J>Qt1HBXMz-OMw`FVkS z)F?f>DA*i~VZIxDxUD!;5{2J;k&-)kZW?)Fa(j{K0xJSfCZ4SF?I}xo>a! z*D|;)3k~nn352}H``AUr;N_q^i0~pjRObqQC@J3N4OM@fqTDc;anE6}$3MwYu)NQN zT79()L^cC3o5b9z^vG;>d2!Bmdw}4U-BSFX6Qx!+wq&Ft7@Yyk!5*`}UcdhF<|*xH z{C_Y0&H0l!TZ3$H`8s#U09C-(CyFT^bM1ynDF8gORAyx1;#(yW@^#H`DsG zvqdLBK|?$BVZl{@VJK%v)APr0@6>V_|LXeOHJBF^+ju2rdFN8(*|g)U$M^jY*w=f4 zWXT8j9W#9KI+X*QCr$mndT4h>#*Nxv@Q?re5BOU*^>}~dZN*7fZ)mNRf1oMY3$vG>f1<8U};Hd!Gu8b-3|oMRn( zOGS>oWmS~Q9(`0uRtr&9rIJv5e}4C$a6caR`+DEkb-kWXtG{z8g`7;No2$C8Zi0^C zHUMkL9}xa@_R?auE*mdXBPf+cd9C9C@cvji4`n$C}yn3IOL2!Z0z= z11)0L)q#qnT`i~5nL>vCjJZ2#-f+o$%#8%M2>U6U01PE+r&cqmd$dF&f71%QsWXri zq9%dz4>BcC^C$&Lz}J)er2+IVz@cTM9FO$dNA-y0UksHj}2~q(L*kOCWFs z&|y!u^+NL*?2CL{PaBGdO6JpxMovz2l-&e|$u|8a>FWFy(7wC)WWIxgEQ$%7Y>ZWe zp#%jha&gr<1W{ncjd)Y-wlaru<$jGc-e>tOby4GDd-1nD#PUKzNs?C|?xABnXq9O$ zUQZRrmWw`m+3enM3edPSv4usDAillun&)0z9fSn>cM14>x3aC9-RX-N0CMGlPK$ z-&@p`UXbX#qs4WXO^broE(T2xV2E_6Gzryi#WX=AcgscD5Ev377kCBwFhZKAQslgF zCl+W=OToDl*{(J8iPU8ImyZBl*_N^9S)3Jc6;0ZUKq{3$oA^ShU7-)6hPWL%>Fo$*LakkUTPQ zmi5<&7~-!&s6FN~+YS1b|o2##?Oq zN;6QoMlXz97>d94kaG#=y0COrQrip_&DS}9>0_8X*uHNdnCu`?FKS;=xktm4pIvSg z{R578FMIn;u>9*9N*l6ak-jUg=htj&vLc#l@sO;gWbx$redZk%5}c5B<+`|`U%loe zcG*|#*e!3Vg1Z3@wZy&eFNJ9{q{ON=WT)muJ_PZeCeDgb(BqeGF|WnJU@xRRtq)m^ zLJ*?1;iOiqp`A2H9p;l#oV3SbZXF|=6|`i=Dc?Iu;!>0=ti+gA_U6BABrMXaS`-of z;0p@j&zA6-Nvjdjm@wt}K`-Ud|K?bf2&Qxz>cJ-z(Qg4?G=M6Ca8CANmoZDt%8z$m z!eee4rrk`Up*00Ud@D{Q!Bbkol_N5u0g)I@tRA1q?dJm6+$OcsA0xWly)1N8Mk>Si z4YfFpUR`5zeO%i}clt$3UM&lqWc1it5R5u_EiID9H- zE}2QS*h@%p=&D$N-k=ZIW(Bww~l@73YuDf z+%KlpSamCgpFbC@hgClHaH*)Eds7GuGZ<*a<=z)=?8+H#NMkY@o>B+b$Y#`f^;i;ITDlI9V&@)U?~e z?_tZnGic!4W!=A+-bRFjaQa}!pE8w{>Bx=?TRR6a9DV-58emL$pS0aK9;D0iI^!=$ z5EF5vGh4ZoTGiRNvZC}V5dpX?+&8PZAFwfX=2KV}ME`%le;*K}HK5~JKd@JTcH1`+)O6~KOPCmYGLskqN3`7P>4NB*K+in9BVb>E=zubr=z`p6 zB#kM7l_qf~{b*p=oU-Fj3jISTW-4cvkseN zM7RWy-z1bJGlSq#2`GyIpFLT8tIdZTD(L=>I`@4xjci7lE*0XpxOs*NR607&hwj2L zIAN8%x7ckdQhT2kq+a{$x}^^dkWSQxjZ31<|T z?RM#Kaiu1jn0jzx%zl8EQq^rL*`WZqz-X^BB!P#faJk9nQT-s(oXElh`fMsj(aN}> zm|2BCaOKG3E1(iLmutr?L4)~4xncmH3l#$oq69GkL0Kz$%F;vgRyigl$V)^j0->Ls z=fdm6tpz3aoshO&b@JM@&$19Zl!AsH*suxd@%Tm|)5jzSvdso=mo9u42qZ%}O%s*V z2TY|6&E{|8Sh&XUX<8ekJW*~&_F#R5@#&6@$tA5KFvsi|6ryn!B;P*h$!=E8n15%uhU&GxE-m zP}*E@?66MS4T+=Rp9%Y!8As3Rj)VxfP|d@5J?e_eG?EjyrMFZ67u?m|LT&4)kn%4g?p2zLkAKmIfR-O}GAgoI{9SDw=O zR+jM65(&;(si7f23%@4H2QKX>U}mFIGf%73K>gOXJWNeO{_5OKdUru!;^2MMb6}6O zx6b(U1oAa+8HA*^7RlWk@&5TqQKG*{@XO(Li~e6Lurl z74j`Zyf{=iKYYB#cZiX0k8T^*apI=GjvX>w$n28t{#2NUMGRuzSP~pU4WPx-v~PSZ ze6L?375d5diGi4U*&m4Xk!;zCe^3y2_LyEv&LojmR$`AsHwz@_#DTY; z^0?%FKQ;*=?!Ico$HR)lH=I-ObREL@+KPeF`%5H3-M@d%p9;%zNe0%kkN_155_#7Z zhPs02Rbc2(LqFN2uIyZ_o{#gmnem>O;;xJ$R>G~>5!byr{2Y55m$a#_idth)m9Drk zEAX1l#l7&%R<4X5Mr;~!6L~v4&0LOCxR1+G7%Y?x12P)D6g3mqCeb;@Y^{yYQIO#u z^~!5Bf}iqHH{Uw}7T0|FP~-d>&rY1OFqo2UPn-1;XTf1oCnE-naQUoJ(?ybRc9l3i z@MJ3EKrx@6J(Pp!`hAKIUnA(6t+P1|A zY|`)-tx&Gq=*yft0|9<){gO$Xb!O@aPB*_%Y9;4isOiHPS%qb+tB-iAs0+f;#5_Qx zOb@D!n)YH?O^6jDzN$6`8V^z~C38F25itJXcZ@dVdZ%@b>e}Gc595?5>`7oJ zGus;_OsSDSM?L!<1;cD-w@+NO@=uM9IuneK|MfY@NQWzY#R!~#2*FrnTkM!YFOj~B zfJ{ZE>-8xrA!XbQK_aipy|k&q+SeUpUS%T>%W`H@GXCR!eR#+J;?1we*MPpGyt@IK zx})E*9r(ppjGN#6N-f7VQvLP2{9niU1UAxtpZYo^Br+%z{P+5gQZ3oUwhil;B93dV zBLcL#K8fi%JApHmb$0m8lD1&KZ`Fst0IsJ~KX=XNew5#IuXmd-{L>$oX`q4Kq}k-R zGRu#TAVY^hUfD1%6nq^|s&C|M8e0Jp zS+Ye>I(T7m0qU>{xgRZ32$wBW40n?T-R>7({0R-3&<|Dut`<=6LASaIJggq(08BAP^qsTx?&fk>{tP5n9UqQKe}LMD5=n`H2ZJ^Bi2BQ zg#wQC;8YShq()+#)*P)8i!n^On%Un7VdiH7cNwdktc5tvpt8KmF0_Y8TdFJ4*{*QSMRVtAp%8#o9O(|;+4fN%SAEm2U3+ki*Hw(j1>y}ZU`4c5uUSa%cy%1n zWKkY7Z$_>^J#C&}`ui67{@_&x<{S4`FO+Rb4sfb0nzp{_Y%-UaW+@fd=Y~9B9aomP z_6TJvXSE&@1qn4oe|pVgMfSuzM`Ehi>*To75J>9AFH#6KYB>pA| zXuj9zWOC`|6SXeu*-HLLr-ZevQr`kAua;Q0CYR={KTx+^!MmS6c8kUW9Qog)1qSuC zdSM0V;{^Y2sUO|Hb+MrnpXoofcoc32W|tue2f0+%XZ-X(y%)<~*%Cx=A7T-BeDP(U z>P-5O2D(j=Ho}e!`x}znnZS^kKL@_P-$x`mWu(t9z2En*le$2b{pd<+TFSzW3IVij6o+X&* zc~=XORbGjuO*KCWRCya^9x^6L)yQnar&CKwwW555`71S0PP~)x1bM0=kG+VQnJFWE z(dL{Y_LHr^sbWH`YI&}&TFJRZo=*F z5I>{T>354BnHJwTqx0V)o>#Oc>POfPISO3Vxbncyp(*NeM-5kvr81{#((zhR@b-4Ttnf>Y$vNq3RFAx}=oRjO_ zaB)6TSDA{b*VlTgP!W3rU)`9FYubn%HUNIX$U;*K0G?XQl-PI76@4^&U|{2`BC2W9 zO}kIbFe92Y3@JCHKWKa1CLu@9mAPkpO)=e3CLxGVmmes( zxOSnU=XI>&h41x$POuOLX9Vmpi33mNlAB)V?;1^=@AT85p3e=b&ypwF14xR9qbLTj zDm3uH&jnZ;cI|^D6E{4)Hqc|#@P2F$le+jO>v@jov z)Lm7l(ALcT`?xLdr9GcwXOqrToWy!Q)>Lgw{KNwMRe#wVQ7S_zuQU-xWgePU>38&h zbUkT->d(VE`T;ozObQG8jVQa=2ybYU5GpyG1U3r_&ml4WH z;rH%VW$9wYA-D#n(jSCeR?B55$k^c6A%;V$E&*C#47D_xD?_FqO3u|ps0>|srkWUj zy_}Kz0TJZzNLUZvS5176gY$I|;J$1#Li>g%UL~ zhgj&-BNY>$>?glDd2g4|QLU$cRQ0q0% zg$W@K_2=ahz1d%ZLeTx&%E}W>aTwz-jDGQed1HH(vr^4NiDNoc9#Z0<)=Mb|9(Fl$ zQvau#-hJ{s!of3qN6|;!ocdwpp|PxEoAdw%IV}PcF|sua&E^s-b|z!^6kOR&1m~?A z6QvvgjQqLU3f|k{o9*_=>9zN#Q;|c(3uX?}!c;2~3mafNkgftUqURGr*-9_DT^30Q z%1rP>12FvR6$_93;x2v%kGLzBjZPKhz2h|U*>9SMR_dYD{JW!qIsrTARlKq{&%z)W z1wDiX$vU~2_EBi_T?i;DBcMi3nqOKV$M{O4>X|4k4&BU)6;&Xi_21~j z15Uh(8LsF#BiQ>(X#hJCm7A zlP;dC-2i%rRJhyyXsX7mv*WQH>^eraeH%yd2z+*)HMrS@V=_^m1eU--7qa{1nRj9r z69Ey!lMS%S<0wvxpJ$Fva20n&)`J6%{~J}Q>QQ|;;=lE0uuti6(3dA7*Z&EX$_UHH zvw8%;W9NkKx>Mp_k9PbII2BbH&eHkk-mHGS9+GZ@;AFozYSMvL3+Jxw_h6~{k$=zu z%Z?z+Xb>ma)CJpnaqq5~@Bj_>KWiRKTi7zl#iu^_z*3CWaZ zy;YF>@JXh>fGQ(&b39kpGK89ZF?Jpel4OMgn3&Z&R;$AUZ$eg!F4}1pVe|yxfJmNi z8j|U_wBktnYt{BzR#Mh>VT9wC%o72I$qMR=3k1`zD%16l z*(Jm~zY9Xs>+tmVxwoRjYEtCq$N1(@|;BBTBkqUNo9InOro>1o-@P_FA~eBKim{9!!6+6t0n z8nMR6y{M$m>5Tx~$QEZ(sl}vK{X!ONA{a=*Bb%{FpL2?95Fx+@?=^Y2DN&3t8T`&B zpC+Dm<*up6%r1jVNGaxk=5$9P;OTkoeX`m)a)$NmNingyM56Q_w-csbHB}-gS*X&U^SnIro-zU-ki=qSdQmnD!E7+U zq`({))tq)p9n%UxoIyZTXxA@=)zQ|ISZc{OK^8+49FT&_;QV0kIy$*P+c0X^uxfjV z8>M_(;0`l%$IQS$wjF-SGtlb;Brt*cYEs#Y@7RadVC%Rm{!936;BB-$<&Dw$<+$IO z8o#Qou7j!{>~8L}%{=%T7}PY!+rm;8E`*09$Z9*tP9|5FmW!guzocGQyk06R`d9sD zMJL|t{OLR*-14%M59H)0_6L%xV9aMbzzl*>WZR^lK~E zk!ROdRk#YA385}e`cIjISyQ2LvqX$bl8yX$_OsV&x#aZq)p0zT>m{mEmR-2!^Vs>H4()o zqa~3Ik29BsDy#F+KN#z|xr5d*KawzyLMEg61tw-nLsG=VFqso}C)AVu`CQR zt}cwm7b^n488MY)WnR`)3H^4&b(>-L)nMho2;Ut`)$6wLb1t$z#dJE#60Iv!NYJ1b zuJmG|VAc5>z71tAh-+O~X^Q0j`wClAev2JKptQ7T4;^x?jYUz?7hmJX@y0nIwnGWrsa0KVZFq0NmVt`uFzEJ-gp z0J11E+#?VL-LJ8A$2^eEPDxQME~gGs^M8;9I$egVE1o|sf+@=HBn1ety7rT#NIr@4 z8)z_6G*lof2xt&0db1P|C*tZYAR;F80NnSEm`G)fR`;S$aPp??E7+}zTyIkel+L7u zEQoC>@2Y4T&hS2upg^apeCnIHssB|@lj(P)5T2m|kK!){0VVG$?jm5L;5R{ndEpX#5E7G?`4EGE| z2VX9ltQ~ztD!J!vuN5SLZQE~|?g!@BOs00L&i*(GM&V>0uuM`zz8e>>%m|*QFduF5 zzKSgsy=y}focXBy?DW&yqhs-|g1_|iJHGu7`0_kqT&icVFY4Lj8y}WsH#XotF%jBd zjP}lq3N@IreTBWF)()r5LAWGqY)DGg6%E#UK`2|~;`woQuQvR-Bh&=vWtNswbRmzo zFy$5mnj6h2E^M-|yl6uy)p>nWT27hOFhfs@o#M4iKW}X-!k_qX>3;xWX}N0WA_?Rw z_r^;hjD~(?PXEdpK5jHXzSDI%Kk4ui6y@#i2YDR_mJ7=$QMkgd<&O7=_C4B7`8=fL z2l7k^82Te~frS-I<_>PIBLBZDCxf$Q2PA znS3Ca*!jV>*flOczg;8Er~K6)>{Ltpt?u1VtJXT*68cElPs|W=50zLc7C5aqn&I9A zCg7{90&G|scFYj!fH(L)DbIK9G9*aXlZwO>eS0MMKdEz>@F>2*9!|P=ffz5nAZQ6u z#0E@Ofnvy0qE#bA&b!$BV2xP%0JV5yB!VPXN-e$n6`b!&7!XG2Necc+e29MQhzM%MoTgL{C} zxu*k>hq!-m6!@0@%j1U$W46mdn3g-f)3N_$>1Yt%^G%(*Lt;u2U!lIq5Wbn25~ju)Vl349LY}#gwJ{Cf3EOORRqMuuYtA(G;*Y)9Osig) zK<^PZU0jJq;)Uw`58mBPZ#EWHR}k^3y(B7ocJ03W=?415>@}~MDp6acLNbdjvrp?> za#G(F$HY2W&98U>-f085q7BJ1BwQY|)L!9qlqCl)#0Y!kp~3SysoQT5aA5UJ;0GGe zZ$d?n(weLq%@9NtV*1Wwq3b>pQWftoc{?;S<3nz55Z9Z*QQo#oMz)DQ*&S#>F@vJ> z(w8f@L#R-lud4ZPl%Rr{P>IrGrjEQ2d8c`>nV2YPcFU&_&cV_l4;W4fL#J=jo@_Gq z`V);zuX-)(I&{GUU074Twt`b!r?qjx<7Ob5=h&u%?X&_qsQo{|plE`uXs&IGA^^KS z1~4tr+j=42|J^0++4bell<=e8=!DOP`#X^HW+$;A2Pnvig6>!}rkgTsuIM;p2L>dx z+6Z~{wjZ&o6ZnFSmJ+k)L>u!o)#Ka=>^}>b zLi5%?pV5`|7rJO!R-O|D6Br{0~qm=a>0=vk0qyqwdBJpfG)R+rMNEYIFLEEp(rF{!^onc+)4)y>s{%s%bMbsyyhtgx%nH*04xEdgB$T zH(mZ&-*=i0x*#Gm@U5!po$$H%))f0)3rhS>j(M|4`lF_=Vc$n~M0c5e7WZradzU;( z>2kPswe=NdGxBs4xLzR^^;_Z6yDaC^*3=!k^d2+LLenM{>5}{|9828Xl%31l~G03Wa3`ey%!V{kw$Lq5d`$ zE<4{>Qqnr;gp7(9HynHlQiy!7UZTo$38D`vbQUR^?>2a$0my}9Zo>gNXU6--;tzXx zRENo>=Z2Sj5D&yr_VtFLo2M;3l^lhG0uq?E`=x`e3OOubA8DC;w^ zRtQWaKYO8|+bNv8Oqt&s$qDJ~B5$Ab!3poNfXWvZgw z9H{KqqpxV76`EsYq~_E@q=)fWhkv*-|A>PKp@CHEYosxldsQi%uWT%OSFW*nN={*^ z_o_@&b=bKCiY7?VK*MXq`sGRiQE+M-y015rlkpZIOhGt^4|wjz(^##!&zki~-DM`P ztcQo|<#Ne;21XzkLUJ#YUVz)~8-P|nl~T`uN`fhQ7?kR!yzJJMbh|rQLbB(_F1+u5 z`JUCgS7}@n!bm61fHa}?UGkZ<^;y}S+DY2ddILiln{rn)DSrek`QQ40(_+=^3AsPT zMVG;?l)%|Tp;eX4bkXNK$xJaZwY20BnP9?{Z4On+gR>&!+ZdyooAYr{ z>%#2!wVLB?z1Isv>bc*C&R>r|{prc4+<%+D%fJ7-a!7Gwh!ivHJnB|nX$8Do`-c`u zI3a!3sH|}0xE-b?Xn$)NW4NLpK&pxp10PWd2C@!~#HH%oxoQY0V{1rkc_Dq!Gv{O| z<|$jBGR1{|%cES7Lq9cfo=R}02*I%BK$or~icw`vXk*pU0PBK*ihl70Jh#?2_B4A! zL$2IH@dlgk1$XXzc0LIcVnD50dYrEo@7V^IQJ!+(BBg_vtg!Nd^kE+vnMZ76dLmEO z4enb@i{HO?vPYDcR@ka#OvkoQTjZ92y>17xW&;awMXEJb&Sy=a&QeM);&Z^_`|84wFqO_wZhxKu%J7@z4HD3#o?ZP3$nH`nl~rr}@THPi*Q3GzHP zOuB~$APYn61WhmI;96=B7#rRsD$e+ti-rcQ`|z-geM;#%YwR47ZuZ?2>T)h%NL_bL zxDffmY~GM~iqDp{f3ij}k!2kl)C-u)CgoP0nY@sk-Y1W0D%vC1$f@33tuJy}mx{3t z&zSHrtY~&IF0ySb+vIU0dvPYJQf5IyPE1r&#mmbz_Z~Q}VI@&a16lux3|hKz{?nJ_mce{C+gq-fWqF;Gn0A(N5qd27SVvfqbIi(wG4Fby)))+QoUbJdxk6L zkb08)%-DIbZaG1VQ=juM{QI&9tI~@jwd1JFC^6x{^1H{c^FV4wY)&$PxCr_7Rm_=n z1zVdOM)t@uiAR?BuvcTN>Fpe>1c6+DUD3q1R16tNzhWt8+p729AYL)SN-Ja~dHp+n zlpW9Y{mqY?H`H$WR+{`%X8-r6;7f`48`f@v(UF%kdPIV*{YKTHkpXP0{Iu=a&9bjL zN5}BSaQMN$zXwM{N`uFLjt%tVGHsM#cDbdK#5U}bv4yNnijbk%py+*@4aNo7*^=k{ zmR?({>2N(x?rV}l&TUGTS6wP%oH7D54qABAZ^9lw#=Ijb*C{scI=>Btyd9Gt<(^&p z-Ke^}&)v~WcJ}=m)i@^V$$OEM1gc=S38@L411$NI;daK^q&vnA=AHv4-DPM?4yS>1 z$Yh_Xqb2;ro!oNA0xa*O312$!CxtU*^k0g}T_?x{R`LWLxn z)E##D+=9HrWK7YO14Z2#)G@o~lWRlvrIHmIhN}Ab2bHm!NnR%Xx@Epb)HEvdlcLg@qs?B4*OMi;01XfuQhg zKb7tER4Ro_M#57GsUqw_;SoT}_g&-ZqhXnug)hzeh{mcp!<@2KGjJ9XgwZ$Mms8~Y z@~gfP0oS_|>0n3^m66e6U6jtO`QmsvjgI(;cTBogL1-q`m^+S4Wtq!efk0IkCP4OA zP1A4L*)Cp}J14DBS<}So^&io+>$euJK?&F8Es6k7M}|_4}PSyj}}1nyV~z_=R_ zYmoR-cjKP5-}kNK{habIX$etXI~+&;H*Oe=k5tX)IH{DY?tYa?d->~G$g7Z_-~Ppv z0YIC)K5G2zB|dl&X`1tZ)iz?~=_>`$BxXU)b8mK5EgCW}y0voT7k6*B>p=kg$Bl;{ zd$;3Ke+Bc<(6u)kO~d_J^D$9RIyPdUh9kXT^)J ze^LqQ82ZJ5`15Y*TtFT5Wv={DCkT4#)^lB~qp}S3fDpBolplagi8IOKTo&U79{eT; zDsZNPXMF+392XA+Zn&teK(t=pY)v|fiyfX@HjEu@dcHM8F@80v0&}Jba&qs4#15Lb z_g&-SvAb<%xhlg2a-w(j(<|GcS~}x_H^Xr@_sKH-G`le%$*Ui0BBYVW>N!MT`Bd8( zErA~=Q*iGZIJBBAgwpz6ii02qe$FR4_=O)Yy-ol#4LuJ9@32;xwg(GhiOg1 zmKZOpqkx?icOC(}1VV+I5n>{nb0x*viCWOO92wr`ACeqFPYx4$5uoie_oa;&0^&jq zO4vq{-M`%7J1XexsRUujt4vPm*XG%5?W?};F9)rh`p8yl+Ja@gzxakoeVw~4VQ|sC8U@cXsYkzmW;F zPNwqqd;8g!GK*o%bBpQo#guNh#dTvb*y`t_A@F=|qHT<#qy?hzLc}`VH0=}mw1*i( z3LVISH-xHl*JT<1BsF;Iz~lU?p#YBqAJZs6yqN_t{x1F%OC^O-jI#;HfTmVONdzO$ zFn%-HbWy_)Ej_^`YpagU$0z zCw$3IH-tW(40rz|)RetThY(ZgaeDubV^+;7tFWPtltIVeFE%zRlG7FMW;pscI8ix? zH{wj&9ngPUM~d{R@URXU2QO%m&1_8<@4>~?;gV>K{=gk{N?i2Mf6TC)3XaBxl_Dv# z*Mp}X`H!FMa=loymsw1B%5Hji{uSzxQ+wt0IH`qacZpA*yprrNR`7beXyPJ9s9q09IA7`>A{3>)_(ur7# zURt~UvAciQvo5k}^R3jb4f1FCz;U_AkakfVe9f&q)_^H1^s&WNxXf#lz}|8D%{<;X z4V3G=;Bzz>BJK-%i(y7Ma5@<;)Pnp5>sqC*5HHPnpP+_JsN{3;ye%oUiM6%qOlc~3DJN%*KD93&r985^-4O6 z8QRcu7cE>0L)h&ZjjDcN--T}GoWBG2%OtL~clZ5eCoh*|KmY9BZ=V9fXR76S%6r*%8@drmoNh%?F(v?$ z_%g#{kS&IH64IVhfEV65;!>Z3`$>s*FRhPm3v1@ruJt4uoJH6V1wU zUq#&7(^0z7Ma~@5b{eTQ6P0oVASWLcqVM$M)6$fYKr8e1c4sovG>D5>8!K@)ry5M) zw@qO~AU^eUz{LpSUD%MkF+p4;CX3}ucf(j7&O;=!t3vDCbbrk?z&M~i+}1XNE&>_v zrYQ!*Q3{2$GQgmub2R<`0W182DE{nZu>Ng^1a>FSXWOCz<0q?65t#UeZ?@$m7I#0L zdfsn{=(Zzl-F#}}M*L41uX9Qs6CBJE3vaW(IQaBAGIB4n>}A!z>iDrOGwO|q)SXZ_ z{=J*~1|RRH9zSy~lYb_BZ}ZD`)UJHx6U~YrVXutTveezyy=$ur{>|YyTy_BED2KhL zZ#)xxC*(04z*LOldA2lQ{2ml_oQ3#oWdQ0kLgfAMtpx!KPCAB(#z{@p*pH~KH0 zoFV7qSG||GzqcGHogdl{x|3r)7I~)})H~*)EH^>wTtrt0nfVq&di7-o98a`XR?#RH z2i)?Qc8OCTYzR@EO%Xln?P~thd6h$~^FsS=VNZgqqv%3oJM>YAz~(Y8udl~>s+DGpomel$oTfV~Lafbe zANMg)hJGcbEz`FC^)7P4qTP9hhKY)@aLW15Jjt$A>{`-gAH7N!VoYI<>NZgw;XFc& zS^rZoUU&p*MlZjglvE0lGoX9muUxb+fOKO7uk(D+F~K*&#+7ZALMIxWK2RtxZ+$(w z1Kx(*N=q{KO!-+WAW=uPJh$_}(1?nLgsO0}$XX{}l2wx|p(lN@g&2ZGx1hq6q7~OY z3_C(!nz=6CkCMHu!IM60X*gA_#wpmwR)QVmC{mJnj%5cY$^ymIcv#r(1aSmci1h{^kS<=A@ic=fGIBuaKwA9y(Z?d_oqkEpYu zS@pSIc2Sq}48_Nj9e8N6<{?yWzIX~ri-gX)c~+8TYOgB;!ni7yY%P z>lKG26msDr+HVHL-M+~~Gc1hE7=ogcjo(EmVC!XMsI3g}dYiEi=7F~zCeN{s+Eovp z#JoH4rvqQlz|?9*Jlc3b<5ypG&E-feFJ($(|xYK4VTb z>+7qg(ZrmS?@ekwJN-ZiUmvS@**X^&N9K^%^muq-Ej(`dcu;Ck@%5+Kf45UlY>_Tb zW6!+z;yETW^N&rx>}~x$)@~E|Yk2-O?HQcap~+76@h)#S+}*(IMnvpEODspGFlp21 z{phC~Hb+AlRrY;zpPqPke(C_$A-_!io#p*T+BgSNQZ|weG~; z^yBkwvi}28Uu`DaCt8c7?7HYT!(dM}pNuyKyb=)+=z^#p?hL{?U#&m0R)_qikn0T@I-`YMgG}2Jd zsWe!Ume`;(#g$ymqe4~wn;0HdGQg#t?t1GFrEMI>d-!xOeUYvA-3$uWV_0Z$$?Ty* zYgz{<#~UgkQ`x4W!8i>TXujeV)SGy}hOviEWq_sOg{n&2nqlKaZ+8h_S(7zuhzbLK zR+%1_Af;<-|K1Sbbn*oG6iMX@7}N~qKzbrZe##MXck`A?r%yarW4=>7p1ifZL3sRT zx4u1%&0Gw0`>7r7F6hD#iBq<+?4x=jNw#HBw|&~ zOH0&EI|W53N0rj0S1jKW?bj>Q+khnpD14i)oa+P)%mpqnyg98;`uXoQ@R9B`NVUJ{ z zW^%o{@*pYX4RX^v!7)1TtnNycc^7Iy?7h*eMvf~E2zutpXK&3tm4VG9_FJW5&^R!g z04v@qFx!x$%|@%sO2xJaTQe@OO_$Ab)nGTgK2m;Jt38!M&*L=rY70BzRh!iOxx~w* z{#@Xr7nG9O$XQj{e9Jv>{vOT;)hY0pIRP zE8I;s9i0usHgkO|Lrj4dskK@G_ECoO6;?sf5MmlsKaHZxoC0keB~K)*N| z7Dfmkk$v|GG`H^;MPlVb-M7WUZ2w0uer$YPm*bS!5+7c6Joyv?w)$d`?BfqsYatwZ22Ss*FTO4eplG9T29z$>G1gM-?6~k%*b?z9Yqrb{#^c5TW%y=19?S~5` z^C?orIULB2z*5-#^kqiw3rzCZ)l`eq?o^9DEu2~-50$*%+4ttXf4EKmBhel`b{kd# zuDMgwZ^RXP2c!JV^jfd)y~dVzg~jxsHT&W{*y8j#dui{`5`>NVdX!O>1QLtjxhu+a zG?riw;eAg|P|*klU7(VsJ+Ek0nwf@@sb6%f*CCEai92h`v193fxT*;#VQK&v5(`D3 z(;`qW@d`~6l=;M%5JI53riAK?Ffe@L{WC(+P+lt1%1I)_5rl1e0dZ@a?Jzx=G3lKU zLc!QCnJCJpMU4kiHegaf3POYD_Z5i;yi5+r0;RO1+tW4BgDIN@vG~Tv%C>)vp64pd zOV5AfAnMuA-siO?K!*=e*~Gm7Y~HPPBBJeMR^lnDOm!MJ<7pvbAipVPjTo}4YMn;V zYF=CPK7@IFlCTEIDCuDNHuZ~@zx!XFtC;F~MFsBwM6IpxQ++6bJGQ&sb>4T>ry!PI zY2b%QvSQv;&&lYwI3_bIZt0ApZJ`AA3%T%GJ$e)H=G=<9@3vhI`ULFtk3 zmyA!dJqjV!{~Z0Dqh>vaog*LgdJ(vVQH7@p?=AKcXd@D0#$k$ePk(TAoW;ag=D`aC@qNyJGXI*k#@7vaRZ9$b=UACvzr0RnCZOT{heCP-{;Bw#tDU`( zUx0t`QS{S}XA=IObe7zL_n)=@6Ees#XwaTJ)?1NF4gM3wL-Op7m+~)<+cm_!accbb z_gDY=LBhe!f3dID-F1$&A`(u0OzpmLDozP5{^t8$NaX&F!QX=tdD<(0?5By&Mi~)20Z+6nV zAt4)13JFB03Z5@qb1H_L3b$Ye_7UL*0}Y)|!VQ=AMTmzUtX|B{x%47|P=G8H4`2-F z1Q?5G#w`GJbO81MbR4U?w!30qm;rhN+0T+AG$dhE6cxdEaWRkqjDkZ&eK3F^1OODY z3>vz8zdZ8xSOO9mLXT#1wNBQbPj}N89{>OZ0O#y4 z?@@k5)h6!{D#W7GJn!9u7Cg8-LNV6 diff --git a/vendor/cloud.google.com/go/vision/testdata/google.png b/vendor/cloud.google.com/go/vision/testdata/google.png deleted file mode 100644 index 333bda93710d1668ca6452a507ab8a12c343996e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5969 zcmV-X7p~}uP)eg5P{r~U(eijF2cCFhh?Nm(edZ%&MpJThhWwz@(-0^$F-{*_JUn17I z+3sLg+Vzi4cU5<18X6k!Or(1@AIzP~dE5=|vR(hr;A@RPeY$rIobJ5VAOhZFsY=FDobldUo%edYS z-0Z5CAd&&@`U|H!!Tu~^(9ke{cxrXD#Te7D^Bbq~eDJU;q98;in{3x#fcy&6(9i_Z z8pvH)`Jf<)pv8(e@v1*<}nQo4NV||3_dS;Y`KOWd1z>iS!e>8dF{|{-1XK-lxbHX z*~&CDG&F&5CpbrfJl3I%$}}`IG=U)ZA=4x$l9gXzfQE*KCJ^+x$Y?!4I1JFx(9i_J z^TC}|0zq#K12i-=G=ZQamfC5Xas4NB)unZyp$Vkg#omp@Q~}~EYV<)GpNp z=qP5*dBv=CcYzzfEoF^D$+jwmtTlvJ{2l);{{OC`ZGOF+H7$H!B0m3W*1oN;y<=N% z`@C%{+V39hOZ|51id121U#cShTor#F6stVg+xCq3x*v&kvH05K@qH`-z%VlI1Si61 z+jfIqxYMDd{I7F{@<9m?Lv(kGuldZ>E6ab|>IBl?dCZ=rtTjulMI~6Xy&#Grh(dOW?^`#xBDGk&PGT_t7M9%gZ$(3A2v`4`)7=9T zYWl2ll<$v=K&p(rtJrCrAPC`35Jb5BW?s3DPdT80@~!s_)u@Ca4> zT*w-aM6%axYl|R~1&Ct8UhIF>{_9^@Hxl_!xv-kfFZfhbqWUbBrqOFgu*-4%=aOHI4p z5lrK+DBB&pz^%3T#j9T8N%KZ2XQo+%5c!LY$X&dNn_Trm{$#MP&1Mk-H#m2^Csi48 z!wUzNnn@y%VtV2Paa4I;?OwCC6}fdLqri6k&k;kr&HtzU&?s^1oPup^$1l8D3qP-D zn`cFm>*!6LEshx5adS6o;pYj$`f^mc4j6F9~f=g&@96ZM~ z09NMKT>OG#TipCwgZYjNaYM(o1c}UTu;pSBcY_Vsm+uq;>F+d;E@aL1P2X!d>)g=@ zx2>W^*`wUTUnRnPDwD0@35F?N~#yWvyyEh%rMgWpa;zABK5E2%|jsHZ^ zwpQa6CA3D)snCr`MINi#CyQLfwg!$MYsKqh;^tq8SMgr`4dg_&ZClwsl}Vs;(a@gU z4W18sebE34?T7gDN_gI2j&jlo1Ol*P)?68KzildT>tXTzHy5~ht=Mn>QR3!f*gLZO zcJ0jL_8YE*yOby(yJ@Tw$VfxE*UjwMt7u!V${#n3r^N;Qm-RWLu21Y*d*X+S+?*rM zx6g*yAg`3CP9+JTL=|K&AqZO|eY5wboDaO_yfiJenlimpO$@Zd>(u* zx>t?ASe`VzS8+^-?2QoQ@wnJepM7o0l<~vuWgJZ)Dx<%r zxonu5)>}fH?Q-+jCy>gp2|h5mT#HIjLX zR|osXeX?4meSUnM`1(%^Qg~gGNUo!a9lf;VFtG|I15iDB@pT{)Ohrrzfj}Zqu#JuM zyhwi|R6VZt{_W5Ozq^(jOd{ zHfOvkS29Twat&R5wK;&xFf~!V~501JT6oBHum~Xb!i+cxq|A*k6CWTx#AV?hRLZB%xE&?fJ%}0sX{Q?#OsHzmXbukk0vPoJTnZsS6 zo{GT~0{sjs7J7ZcS``Rl_zg{$VSa}x06KGt8|g7t2Z$<&M~Q_@0gxo6MnCm)5`Lao zqJ1`Mr8IXc2Z+71wb=xM{23+ZhJ-tgyE2`-kRqUW3lF@}-k+4XM^r)2Jo|H5>j4|# z)5IgpE?MRc>0|dMUdTZlb(jL6%uD(VNT$}5bdd<9Bv0Y(fujynfNJmV2N6HRQ1zE= zpE}i-r-%vge`E?^=Y!juO(11%ev^Foh8B-%Hb+w9RC11H5O5(W8&{dlo&A3;9H| z38a{{zD-MLPCjOo==E^%Ue^fX7-*C<5U~_(;||zXAd;!A#JEIJ&UQ@fZ$ZQ8dkMOM z9dNM<)AJ%O(pMD|$h;7F5cIrUM680$VG4mf4DoaP+pbUljZ=w{@%<|8J~8ICi3EZh z{~k*66eZPq6%|xU;3X50oPCXWFkRB$dHnGAJ$Jq75{bqOSPKE_LrPsAgSqQG2^Ld+ z$*N6%O1AZJB7xjclmA#uym31e6UcO89%OOIDT&`?3IPpDGYJGXmxR*&GrNAzF_6fJ!=uzJ;AZWO?X!wfz6L8zi?U&K0IJI zN4)s=)ZDl~rrfv?e=&tXeubz(xv%Evc`@y1?ax+x1pd$FMj*y3lsp8E5+&X-9iF>{ z{uYvw6{51DJ?YRezohHP)tJ10M(fP_^}kKrgy;W%0x=(={Nf2L-4M{z5F!_Y+`~hZ z8&{=cH&9*1#u0Ndy)|An4lydWnL?nAqnQLk@zed^NW-?Ci|Cm0crn}YdF(UgPiibQ z9wA@QBGdN%NYuF;#cBX&YZ8Gdz5$_ZB{uH$)euM@rTW1DwFJ^e?9g3RQ^M_`J zAh3b0T%wbw@P43$zzgd)8JSBc7X^w@wf2dVCeeFh=vFV+v3LSSeR(ZBLD>}}ZImpYwRK5e^2 zaT)gx%ICo6-Nk_{zxfd2K75HOLT&saN^*wA(%H+Z zZ7czRdQp(tZ^=h7r*iVJ65#aYgNa?Z>%(;6Qf0{0w(i;|&F0m+9Zal#yd_%rm3)5W zS448uqkN9d%Xd4Z_UTWR7oZ5h6aX5NrYli%<|!eF!!L2`doW*)|0Y}*d_a)MddY6q zWf=0qV#Lg@b$f9)ctj$4dU~`5ENZu6Ict7NQ8V4Y5;xEv>N~Kvy+S0Ba}-Uy`zqz< z<8#(?KjZn}PGTPGRt58Q+fi|BHh~~%4lx%|^z~9PYkh@~$Zsw%a9Fw>J|8>`@?kMx zMt;+WKnRi!WH~kp&`Ur}RJ~bD9~J4`VBs+J9*G&diyE;qgcYHPLL&YAXy(H}DWdo4 zHN&W+PouV3pcEf*74NK=+WDbA{w3wQL+r>TL34q(j*lV{c~gjyfc>~Jn_RA)K}mGc zEgI!3AXr6iMQS{aDv*R<<*~ygFegd)lim>VtPLj(H)Wrk&vN|7qsqr�U0N z3m6JPKp0sW8@)7ef#2ByzNjH_8IB}mH>f&eAXG;q!hPy}p-9g4)~36>eW@M_@Y*0J zu()+zMC5S+-TB@6)yQVYsmCP7Eu0(m(S@+;dYRA#Wi`_Spy`oEjm1TS`wRsw9sEbOIWFBIc zOd}Gyb8#`kUPSRe7fBA8nmI}&FiV0!hA^gqg#-vodh*@Mwh^D8=m5uFB0s#G;JZlb zhac7*EK7i?GLFx##DnX_Mm%Ytb{3JxEyL+Z&?6&RD5xo?Io|6H%v%{m%Qfs1Q6*s^ zFuSWd4o4O4_&=!KOj66KoEM6j37#A^>vkl=q;2MG>xXjF)UDpp$O<<#Wa5%z9hN{r z8e-D_U6K>(R#HYs2vWFQ@>;L7^P4^_H*a_IN9Yl^dIEu=RmnEiNtAD2M{^yM1e)g% z#ZpKrbTpFg9+<#gZ%qWln+Bo1fcn#Rg0pjZZyJnzU>}Dg38EEy{>G2OVgT*j2w!bC z=%tVb;aGJU3yJa!;|N(BxSg|1FCXp6fNop3ONr=ZgCu!uq5805bb`n;Y?Yiu_m&`% zO9e5Ecoc;pGDK^Fq&7&t|5ki1MgVdlJRiI$m(=$*amQPP2jFN4cuXh2*C%hVly#ybtNS?fMsTH@Ft<4uUv_k~-QFBv8|nMP556&n<;Q8KqwAJD3CEs8Y-t zFNA#0=P)sVg$1PR-0^?XD#U@!VY@zUqY{oXuysqqaBa*v#pjXDPmolh>KDjkDLzjK zVb>RNUEfK=wbA&7Cb+ow9Fn#DogIfn(k5>^!90T1TdXVN1{*U@a1x6UkOvcdLX@ro zH-CntS6FWj_=LnfnSVLv&nWPCX<-5(~Bk~r}GnDnnkOjxmCE1_UNRbW&ERdtdG1bBJogx&BkK}AF@d6+j45~k4; z3Cg9m>%G>jhy&_Flzv&0Q8Ng65z4Aj+s>7;=9Q`&r9?hrFA*Iq!g$L_i39J4r~{M! z6#_G1Y}fx*R1dGeR2uzbm;i-9kf>KeAcQuH0=FKHnm7>Q6m!Nj7AK$tgz(FD{9Cvi zlp`jMZSW!CPH;|c!Fq+8Q@#nQ#I0^bB#lNK#jNSn%;HcE=sm=Z-`!|Lva^A%2l|j^ zcacNSQPVp^UKsy@u_X{KzO5gulXBEiMj(XBU^#1Kkdqr_2t3JC7piN#XX4C_5o#h= zVmrY-Fo1!iT%v}*#&*01ITB}1a3Vp?8Y_^e5a-4mawLVU_0(tsvhn|z?2nnFg`AaD z?eb2_kMy?XkRuUCoTo7QaRB>!ouGHXSrd;~fa(3-qC6$pWPC zf=ni&SE|U3)8JT#2%|qUX)>Z^#gT@Fh6WVO1Oi#bYN4T_p@Ad!Xas^hA8S2mXlNk6 z20^2$_l76y7@HTZp`kIOYv8@y_2**pAj+sJ%J}FACu&AcU>X`4$p<=eIjSqJw|Uo_ z*na>C(PmF4fc7N8iGB?Y4U}c!4Kv!LL3~YQKhvq0h-?V?kDoFP4UOaiz8yrp&}PU2 zSc8CNMJ6A-K%C3_&rCx@Be}@U-*^~Rc!;LXMyB;cqzDH*qR4T>tgh-FOhZE>*~qy5 zjZ&=+Av&@#-A=}F&vty5wFWdabkzkVRmnkTFJd?pqKc7vw&2T)F(l~dmgt)qz-MBu z0SyfeNYTUkdWakTQQPqs+pg~*azI4G9dCKK#yc#34r?uFXlQ@{;x?^9jszkz){4;3 z(8^P9XEwaA&)pjjXRQwn4IPOfm(fH5d5K`s-Ad5V z(7@OZIEkq}wgh)7bH3Bi(1_nKh&#b`Q9HCljS90XHuj;Rp#g_6?gUq(G~37|L!J-% z;95qQ@ITg|p`ih9Q`lk(BDsb;{^KJJX3ylkEl{7@u74XuXE0`F8X6iJZ=Ym`(reoF zkLFIL1OBMo^^W4M|9-9KXfh4`?D(XA;=ve6Q(J;~8p=P+xz{JAJ&dz?1 zo|BuCjhlsyo$cQsc)+bB#3Z*#NpG{!P}8vee}3J30a26Uo8g-g;BkWRsqqM?@oxG- z?0}p^c>j5U{`-Z8Pe2GrNqUQn9JrwI4hSEQfB+wmA5Z|eItch4L`Y3^_r914@jU|@ z5>8JV@vxL4QZCi{9$M%GmRrKsEBqE29X$gh6Av#RKUhFgN?Jztq1@vqYU&!AS`b4c zV-r)eXXbYH4lf;@oL#)%`1ro{^AC6*5g8R76AMdCOV7y6`jDMdTmnawmX%jjHhe}l zHZ`}jw)OV)4-5_se;q+hPEF6u&dsCOFzXvXH-Bwy?;IWfKKXO{7k764PcJ+W!GEa* zy#JSC{};We0ln}6w-A#2(+dy(E$~Y~O-OWKjQFmK0f~+0Jx=j3QX18iqWYd&ToO<$ zt*zGt86CIe8qd)`)&8T||2xIP|9@%rzZCo5dZ9rS1bBe+2&h3ypq)sN(HCP@JLsp0 zlWiYX$WP%K+rcwtKEhjnfWy8&VN zLt=vOJd)B1!IFhsb2gk0h;CX3NS=3E{|xa&6{Kd-j*9kM6DtOG+7vjW7ueJlx{%OPj-5lwBY=PAOFB!?Lbg&rOtmd z+alxXXAI$|lZC0^I~(FD$!gld(6>BW(j^Y1F6hY2j53{a7a3qo(k1SM33U%8D3N#F z5qU3&P7WT5m#Xt|mFm)~)Yyi^SrQh{_sBL^E~vY`v{QP<>2*zUYjcJ}l>J@xEiXpR zVUF`VE*^raq>&62WGLJ4sQuE63Nc7;D3_#R{bMpvOby6rl+|XpO8|Qv7bxVzs;uT^ zch}#Ud{{MAna}p4BS{_NNf|@c*E!F4_&%+-5t*eiD}g0SYO6F&tAie&{uck-@UZ6a z$R|S2ee>7IbsnBKeDw4$)tavfRA@!`9V)qBDyE|Z)M*4zE!1mZ-^pqId9^P#<}OLg zQ}JNWr^V7VYuB~;r4_C@wb>=ln3v42mq!*^{L?h=+}o0vx**F$nZ8JSJ^YC-UD)dv zhW$NMN$gK}{S7D({f++jJS^l=h>G+EG_GrXiC=I7imC3Z*FMWyPB13x9=Tpe49LRb zbXyyzgkE$texemz1@=xWxT+?hOv8fRY&~ zR#PTtn&zG2OL+X+BMLEl(@|{5Rj~6HV?0*o;Pgvl;kRa!Z?x~ft9&kuBhM;#jJD!G2DFwX;4^{PX z88O=nK@~VSXXWNwCMSHjB>HhH+X_OEEQq2}D~y50=)=5`RGy*UL^aceVVi}kj{|h$ zUZ!0rh><%r;NN6}fISiTf&RxyH6rLV_eQ(jYwih2aM63Ct~;aRS&3rI z!+JZ3AWH&U zF)EgbpT+>%8K5A2r0@YvHD-Zo}_3EN`)o4W<2_C3qx+thJ3uvc_RMm>1&nM{i2ZpQEl>(w30dR4(LEn2)DmYTS^{;{a7e-G0>jv6UAwcd8fNefN@n z{UZ0moy-NbJXTii_9oSA(So5rw}}N3_i^ua_BQlV6&Jn64$`pWgZGv&&|@F~lLb zNio}`lil@omQ;wtn8}bO>e9d3Iklt7v`eZxpTsYpb9my5iomM)(Ojr&90C=y3yTUKH!@{XzMy?^oP_Nv_@uxQBi8nD&I{26XAS7&6OyZM18e_wwUk z)e==2L;d*zy5Ju(A$Js>VMp~^umw?Xayu3Ku82xIrW4vbVk#{*sGCT>iH-R-1=Hfb z230RQVR1654XI1i8{KWwOErowG}Q!ep9YJ2JP;T6uSvr36`#zO^;yNnd-;=zbIhEHbaVppstIPiADC;G+&Tvv=qS$5vy^PN%e*f0<@&^g7 z`v!DNCR&Ij>e8)b!OUt|$4xkLDWfMJh2@!&pJvQ>_FRRqN>tZ%_XjIr@ua$tIqCHq zkeZaA-u^C)W6v__$MWCz27I?_7717)k}lr_8=ug1+xqB`>rXxjmw4;SjW_&#X~$Id z(p6yk*R!%m6OBv{igTjAok^@IMF$JGtWb13EZ=6Mp2*b=lBNyU?zHdYD(2AnsZfHH zUg}Hhp{1;g3tWjh#toco_M1%Vx|L*k*f820cM%)y56f*Q~? zW8~~L?=t^rDEeCXaiLaibA;rrS9Xmu_I9!$dli75Pms3 z|1jpc^64~ABoh1jxcAjrY~AwU#vfj3v+mP808CD{cbjEa6A#PvJNM7>Eu{|csI1E$ z;#vAVtG%>y<95k;o$Je|VH#`yo5{qOx;Xmzw?&Hhm+kklhwB!7rv-Zjgo9%3do@*y zjNMC%9P!O2tH0c`ca>vfv_ZjWA-=K}yz9dUrZ=KW>P~)1dkXMzL z!mC^Ed2h5=ZZ9tWaG`PYf850K(UC(P^sDs`LTKpD{vrMsebezHy}N#;7ro;yzWMyv z{h5^7xrM8uH)o|L+HfHn1ql)3Nl#F+xIAp9wuAL35skKpRbX8kOS$hm*fsx!QR#TF zQOUhiVENY?U0&55{%^gR`(~vq4-)miaynkr9H%PH(;nvhy$n6P0qvsot_Y{K#cENX z>%~U5N)KuS5!ii2?n`BCMj7lyYX>%|iX`fqMMr*+Pgjc-Ce9bV>YM0M}h{JPH2w(?xpW;Ibl zI}WuSMt5ig6}qIT**U!yE`eE#(>F$DlZ{k&2S`06P%yf9r7nCSefXDtuiVBI3F&Lx z3N*$jp|vr_(cvdS@`kR4Wm1z%JH%7>F9byBNf%m8e&}ZKTt^>yO9HbN!kY*h z)MFvJuYMe6@ixmZ#VD&TrU%8fR>{y;naJ%|isF8!+BNFGpk1Ald#?`;evz>`TWQBP z(GVGg5`zd}fAyGgeZAMWChwUX>DIZGT4-@Z$t2VHvm8^?s=QRV7fLBwjo}a8f7D5^ zb0Tz;eyx?-|=X`x1b@iDN8g$K?n0(;#F)NuFkOY-ktzT z<1|VW$8krx)-STl1$Hz!6W*D|X@%pv9k`3s zmRh`%mv{O*<}DF4rFP)Qmk%P$*;jIAW_Wci;K%%|SviX-q46~LO<#3NarMNns~M`K zzhf_O_iaMZ^ga0N%qBk!{Uny%1;ozw#Dg2R`!9*?kS%6cpTj7v}BY&A~Xw z{e^!6U$rgV!!zfU3eBv4G?U=47UbSbe1yE9^u5*bm=@0VrtSsR;e${*2ZD!WGH)JL zeGPFcNVowuBvtcH)nKfX%eQ$B*3_FL-B54A(sPw%KHv0DB^H+LZc1M9TG|?(;M5lFIvJKftWFr@#EE(J}2&VnAxY z?Cih}hSe&+f0N>r^D)7rQZ7TQMETcM^8BN!#bAo9Q#4htJDIa|Jt>Nkcg2Iff1kn8 z?%9AyshW~Yq~#rG%HTM>l)arcIQlq zMTU8k8&E(;b!_UFn0b(w{6{9lI=QT5cT&F8XQT=Zz3(YgntBI+&XW}GR{_oG@biy3 z3s<>(Q<8PCd_io-+cDl09|yJ;VYKA8x8lRLUM!UTw2^*%_-#kV2vgFs74I~1h-AGk zYm-RuEP6Jfri0bLWILZc@oyjf9Sg;xT4@B$%Ne~!(P0iH`Kzf7&)*kJe}NJPchqtN zs@1uy`c<%y+b=hhwU%^yE5~OmeCS!no9?6$jo+zUEHH6((@jBZMlFC*+<#msdt zC^xk5$we5;uXv*_`P}^#q)fbnUBM?a=O)4Z56iYn$Ktcv7Y{tw^eKD29*fRcY`TVuY9yGEUH+=Nu^2@ygE`J zr*TKo&Ji#7e9oV)s`j&6znxL09ikM5jDyE9M*Xl5*SXIPq7F<+OO;E0q*)`1*1OjA zUQN0R(YXN?4OrD*sO$!mMO~BO>MSN+=S=D&Cztkr>EB9-CGhyc$XLr{)`lz@C9(IN z>P3~G!5bA^{`M3wR!f%7yjB3O?Uqw3e3e`fHs0tm-ceqXeMRhn<7wE-N`$4JLM{g@5gyP$` zwPh6yeHj*RR907oCpw1x1w@wyMNUmg{^cvr&ZMzmP`85SXeQKSU6gs#ON*geVbwGA<(P zW@`N{RS=tH86-X0EBAaQM(Vlly+@tt4Ds+6`;OTQKVu&|Xt`rn@m(veqm`J@?8uOp zeyn)RUEk1+J?SBzTU44A&j#2VUR^U!C}%Abgu$8P1fAqR1)zR8Tt;}Xed&q3HKu9rXaAoAlW;_ z<_;%~VGoKn-I%*EAtAFYH=xk~%nj)EnCib34jncm0r@O-(hMavXrY~Uci8T?a4EOj z3l)+PRt=YP-U+m}+4IC_DO!rSYC&58W9P5A6Md8L9GK!G+#9JeCEc`MD}hff4M(>l zl6wNv^jLm253(|7#((*#d01dR`ECgcK!Kpoie|i4>dHx-Cx?IIPM<5|*6*h)0tD~F zMp--r`PPC4YwDb#ek=WQB|GLnVxZsy!~?j10+PBoQkjIT1VBy6g~(19+hm6lrfN*X zbW&J~`Nuu0Tfq}vDZ^0CdiC4uc}0eaiv{L?Tre&MeQJLkv$Uynn>e+L9~7+34)(|G zlRU*Le4)6?d1Sr{32J7L{&h6q|2OuJo5`bhswj~+w~&W)&dYo##B<(L{WuBcjN_4S z?HR={8Gh5Sc&AwHV?Pgc-9MrlI*gTjXWe-iDT&*=_tf6li7UC6B8;0LRf{|Rqo<|m zzMC^spfirOe6WZwtv|&A(pMcLQuEyCf|xL=qE2ad`lF@&LH1Sh#A#bm!1V@1 z{}X3}X=$X2wqkAi97K2Ynm4JxhD(Dn?C%4;&k6k$AMG7W)%>G-$M`VTuxoZF^slH( z!4e&W4oQ|9&rE|&M*mY=p5!OK8%67UyVj6E#~V=UqjkLtdZ6w-$=i*;itpY)E3n^y zENeqfDqRLM0@B@w_q|<^_e~aee#N^^25O@usi=3~29r;^y$Y1YWDAErc!X;*vHmsgtIhLPR$M z#|r(l*F`!@G^)`!ZDmx^o7mk#k+<%}CVUjE7*gXC?1W zJ5pr>dDa*md=e#(9IE8SzUbd?;ZEDOdb{Q(fgwrQCoWn2K`}p2(tVy_XwmL!cA)XM zB$j%^{?Ug}s#mk77ycFlZ?RQ%dhJV2`etCT3ER1b5kd^Gcneg@w0|5nO6_CCDhtuX)NpPq(jIrZIhlMCx*gK zyrnk0G@G?+=$e|0_-}nUQ;t7mRt?u>j>lJXziZ~V-a~I9xSq$Z{ao?drzzSH^?KQl zE4ypMt2!nzw~e@m@yoi@P6(aCv$`#yFVscj=dClvw(@j_XDS5wf(&j+7)eHul7dY2 z8{*BouoYyV9~$r~d6h}nlq17xjN0KPe0TK3n`}p`*>e<6tu$4kKs9NgOT4SK5z8KJ zHzi!d^T5)jdDi-6gOoLWGfme@ zQOAORW)EhDE&HhxN{xn)cq7MO*j1i9*oXe6X3Xy11 z5Wg(QXTXnSkY7YW;zDmnZ|&Wf*QiBTxZsi^CDVv}g}r}~Pa7wgrcThQR?oWQ-7NFb zf*~%l;!-hxa)`eBj`^2wQS(xdh|x17t-nU0M}@Bnaufg1{uDSwOE(=DlMaS&Xk87> z6)<)XmEkUWvZU`mN!gj%n%t%z0cE0osvBgqg=*qOtBMQ$sv~lVw!&s+Rm%~k9?Wy6 zXs87SehGe9SG&9J{=TXpnn~%(JLHOCdN%#*?~zAB-kYA5v3bfgMhK@mk0WirLb5D3 zUIDGvk_$PCz!yh{SMMe3uE=((uO}ZX%HmvjyEuOI4q2y?6(}EGWc<7=$t>tb& zD@yx^Q|Amfpw=7ELU&Q;1s~9rYX8>HZML`nF2} z`5S)8u@FdCwt|i`mxjAPOLaL{t`M+e!N_tk+qUAj(i1h}q40d|_^Df{6n~J?a`hM$ z;|(a>{|5Axu;9AyE&I8Mz~n^t#>JoR3u^is5TvNq`t;TjU-X-#uu1csw$lt751-s< zYRhGfd;4Iz+YIj$wp`|Z^`2^dyxGnsHY+E$tRGj%;=uP@1WnHTrsf5AW@ z``b4lPNi_5Z|K%|1DY^29nV2*nEPh?lIA!iG0Hs|K$nv2VI4W;x>qa>(1aXUQtt;-A!uHG!Dh z#)+uV^6F{*N`xJ%LSj5ic?~<6Pdf^vmm+qX7xxx!K=^gMD0iEwlPVp^;wE$XUB4d} zLPgPAt`pb9foj;=Myy5e=N+JZU)1gyQg(#T7n}`VPl&(6vmH~Vd^RhP~MI`K%@sJ3J%@_;YefD}_Ycq+IoFTg@KPnOHUXlR<1-;&-QyqLpw&zYPxYE#7oRDH}nyr<<;V89toa_lmH6n&Ww zz#wGLqz!1Pm)71peKmWs5=sBH%&*dC@=X%8b0!sAk<2Jj=ZSvI2FzqDch;F=j?sj% z&bM5Wr4DO%ObG`Jf z3d<4hVPW=}VDW(O+_Y(T<(L5I2G=<&o!qk)y`IkJe~+n616C&1p|vGb`^ao|gYGHe z?>IJ$?A&8l=Bs&zti`!u1}iVkx)5wqQV07wJL%(^XRZMu^RGF^zIj=4c7CQkThGuM z5kDqX%uoNwotkDYRx!|&HqAn{2duMsC)VoDcLB&FptJNC&w`|GYNg%Myc-bQ*(w98 z1jRiA>XxWeMJDWzMC8Jl_@L{D_59!Zk@hJae?>wfXcx`!iAh26@6$HrBKI@Pj`}dP zr+NPF{;u3@ep)pfch&o!70Nmc%PN>!J-^0wg`|A_5Q2BvEm3lnue5>m8@>M0_VzlV zwTc}%@uS~8Y9il=(%|TN9Cn9lW9WBvU3kv-q~c4bBX3uxny8PTo!b0jmMppN9|;e7 zw#2WaOL127y%mxDX!E`7G9xu%I>Q5pZridi8e`*c$OZV|CyA zpm8anu7}ZaH#A|3-uIf}{k(n{d)~cIU3V#g4H}AkRr97(g!xZ_VMC7Ni(cW;^ptm_ zL##yhmv@c^ldu=Y)0eE6g%)HLr8YFpV4_hlYW~&cE6JvVUq3ZWDf+lyQx0*FOzZ_d zTGipgyskg8zP@YW(>ZlAxA)80y_l}zuA6+=o?hn1%psDQRza2Ck~q1oG2L4w!`Gtd zOSQP6Wjr>ysY|JM z*$K^MS)n0D0;z&>7tu9qW}Nkqj_af8%mh!#fOwDl{&Z+Rm;$UMbFPOW>^okaZiFKX z3v%TeZ`1UnLmaGYs0eot^Ec+r2?|*k-$k9<%amE-(d282d6J4cwVUv$9wTRe4D3ib zc?fcyw&7e$7B6Lw_!8gn(?gDEYvL1p9yRP)TzE;3vh2uu*MErO@(_49;M4VBGMMS| z<)ngqaK1=mYtzIZ*+zM1A<^PdxscI^c!Z(e!(VI?r^7C^al5Kh9n|H4a@fr(*9u(P za}}o-$Yh;U*=NzYk^{Qbs;|GuawmgMj&0#+gT+7gDAUZLDjaDPRwQ&ph2&`yN8$~r z&HR{ZF63Ivw;kvq0=Aa-7EQ9gbf1Z$53gV|-RH(q-b^oxd@vylen~@F(%xnRH9BNw z7P{>Y+M4(5pRVJcjml^2w~(Q6T2Tpaq)JV zr+D^o-+*fLL_Vh1*VOH*M(_XrSNjnIJhEGGg(tXO^?&H6{Zv|rvmS4J=T4NsXFlme zK=gBTMEG^8wXiRrF!Cdnx3#+U|2;F-f%gL9ynn6CNgwWUnT}iTTkLb`POn-UHm;^$ zdk&q=j$hM_t7l+DX?NbK=Gj4E8+I+)+J4<1-K>Rzhi2b4FH2w(PUGM^-gD+orcCPf zA*V0t>J{h85)}G+UMK^l#H)bWIn-Ac1BHe*xDz7#!zw?kmXr?^Iu6rm*$J$3lv(Jy zAE-L@byOSktOnRye7VeDM1bX=UI_kXeJmdc?7-D^D&2szT*s~%G~GKy(34SARV&Lb zPg264%-)qNxY(%i{kIb8EZSO@!@+U}KbJX=34hO@h^vA}w9pmam7&f#InvG|A=*BZ z_}-_TOE0r~mLB4)boTH^xYD01nd@lU0HuAPh~oXdZhb-Ad>zraQGis6xqRe*p&7{3 z`FR%E9%o_kH3#EVyZ$DEJ}&EpM|VO1)xHd7g={5|;3xr+6^pdUjeWCehKai7dn=z6 zTGZe={K&8kCw2qke%BLnDmoXkEob^Yn1Fo?y>b;VS9YDLZMA}ZKd5-88K<*)@h*wh zNq>wk(mqxFJOVP@OGtRfg5y29`WZc#j`fmz!D5vv0!~`Fh9ur z%1l2`ymt4Ao<^Rzmzr_5MVZ-}knX8wnkIx<{z?ghC9SJ9haLnA;+Qe41qnhM-8wG4 zgBY~1I&t%{{&$QC!6qRi>G!=CiGrzh?Ixzb6Z1 z#HHSV1kUPCSG!RPcGw@P;~fucoCETUWMb|N5!GyXwGQOX$U;5Dm4E1}1+0WA3i%QA zvoSZcCk>dZ<$aAb!HgX2bF?%iQ%JfqCy%HMZ@*6z=l|T;yK}1OhZAVU8Lt7&PhGpS zobBsdm)uy#eqq<=N3(HA*XPP;m*37a(l0rZF_e|4Q6z!j=YzGcAiSYc_DJNIM4y%T z>?Pyc%AL_#zjxYA4XM4(yf8b)bcofXqjEyZxSow*sjZODda=mo)R)?;05ddB{;{dG z+>!pYILswuGE1mg$F}F*M-L_TObnQPxW+ z--XaR8S02c2BZw;L_GaINCE;ebElzOsphE$tQaOk9QAI^ zyC`x`>>U&*u4+;IofzEC&DI>rB=k@zq!Prf|MrVsx68M9P^)K2smMYGtf&4@jUe11 z=FiX4lJY?3uE~Sd_Qs5os6+4u#P=8Tor`ZF6x+i$5ZXYkIN4OinAePoA@@9Mxti=GwTQTKK;{#Aw-@ zeSN-R@57PuWfgYZJwMvt#nOP=KWaPpZH=m_Irw9t-jr!EJi!ZE+$iFsAlA?`&~#Kg z>buqrSu_ zv2U}zLA|k2a}0sgUv|CA?77=c!eQHah!Gt~itb`Yy*l{As;4(2{IUzSgsIPz|7yp_ zV}G2U`J%d{aQM5rX3yF7p=1*C^+X# zDPzCq7587;&M&~_j}kU+TO2)9N^r9c6Dw(vn0%r>h^?Q-e{qzF%41_*A$2%$G)c)@qn|1&q?`6SN3lB+?hr z3}8*)-+;D^#=EiBKu_e}b4rmFgrept(Zjb7YA<=#T(bigk|>=fwU8p)LUwkc4~QWr zAlni}YHU%ca-c-9(0- zU;#glwE%WV()FDmqy#Bz&&icesel?Kwl+5Upz9}*(?-&Ze`5aX4W?_&D{H~dBuLhJ z{osjzI`)Uh71F0yKj~&NtNXd>b2C&EMw%%}_-B>ExDz=;3jxc+`FKxW4Ps5|jtsvn zvnKT^vUFhW&yA6P?=Ey+7kEu#oR@7`;3M$&_gV11(D-HQvEnccdmTO)?OT!#DGpg$ zs8>2j849>~?DM6i@jJJ_g=#W>7kr)DjBYg{4$qQGEK96iAN68fjlz(GWB4~?2iauw zNBYL!&$RYo|9%;h$qD2te*HaUeMBMHY`_Ns_IxfL@6h&e3c;GKi$X7>mV|3K5|d2ul-tVp|>8a*rHGDat5)~FQKhe8RIK? zsg5Xe%0b5RR+Mc2J$UaTHP!$z3c&xe3f<0UA4gW8gCx`@UpY9Sf4I4%h_Pks%ho6( zk*&suHoxV~f4YuZxQ@PUYHx;N=o$QeD)00yvQc_hU~fP@w`8*ed5TF$xUOzJpqgZ; zt)nTGgs(HcjzIA5jcnglV;W)--~`bcy};WdQV>=GdYH9b1yh%_Ym~Y_Yuzs;;Fh{W z!h-1gFV8>PUrU9kO(64_2;AY$nZDF)5DV4%@E~0hsZx_DS^;X^ZJJ-a)$>_3PUg~$ zcL%DSP2|Ewm*^h|_=p&P=& zxrDy^F}1;tY$mv>$O-+K%OyuA@oz@ugY7>YBWt^)p-$?cWRyq|TSZ`5Pg zwS8U!PKJ%+z4hlK0To|1*dY-((O#t!fvpgn=zriE=iVqH@X&7V;m^e$Y~*aeC|*;& z<7(?A&sA21i*UJrKt{wNx9)@nqna2b?h|Pii({HehjwM4{!wDCbP~p$X4`~GXXL}d zK2rG6>bsa9%kg8}i6d|i-_?|qd{;g9MzHy&pTKR)F;?s6)g>d@Cf{eswawhzip>fm z>15XpLMw?uY+uOAD*fK7Op6c=B8r`}J`)Eb2ZVJ0wxrW~zT zQ5(y9h@i5$ojYgrr@ntZ9p(9A?JciJtNXF;5mBCNZWQ(}*7f2FE`6I%QRPMOzsm5L zZ(rhiu4!OunW7XF7x3O`pFR`^z-*mO)0-pfwvcQ>Zux}%dUIow{W~HD9621nJSfVk>kzw2k-nw zbH|6=rF8jJ;>J?nSj~d!JaBYwGs#9g8Q%`@$%}uzkS$zjmRQzhh$C-6lz!g2Z5EwM%BUKVd-4w9-(?paYe^X^ z+mhZZ@RVEUUaU|$)6+jWaJEOPzf^>;7Yw#hc0-;cWz}aso&9{b_$3X1O{RLP9)(ll zp4YQ#PVRzQ^s^4WHGjLrhk-IBa!<$xYwQ?FB|hRcho$8#3@8XInw{SEfBS$FTM!AA zNl=g|uG9+M5wgXrA0A#9yMxo~otcE60uL(`WlB?|YS=L~q>P8tzqi;yMnHf5Co##G zpd>r3R`$@fdCnoE52+Vb8~7DlUbsr=V)Y^<7Z7dr*zYOsav!T>opRI9-zO@OZD%`! z03tsaPlsouN&KOd(3{%79;+}zFZZ;_WO?2lZe_jAK%G-%x0XaXx5P7@6@8Lx5%EyV zrXhhfID!I(UN|W-$%VZ>CF0Gfm7obVtk*Rz^Q6uwh7ZtK3Rw-@H&5mva(Vrju_?y{ zVU^xey!wF5Rro2<{o?g{;t>;Cesk%`7HS&!0(2j4qxQvt!#tS`Z282mv|%a&x?j9* zFCUzqE8vy>;e4{CS`Efv6amdow{)f^f|Eld;SLC|m=QzOsWoS^@!0x1G;S5rlNF1c zPl)c*+<>|vbfH}MQM6!lWw2%OBV?|Nr9KfoJ}VO8@*L?_yfGI?g8|Q#;Xzg(!#vHC zh55}*`NQ*|c*-;fg49Ha1?a0nVR~}vh{8V=5CfPgHJdZ7%PXkc`Gi+Y1{gB6;9TU? zQvCpm`Dl_(W=c+Bjz77rI>|_Ft`F{URt1if*ybBLD3BS>By+MrWgzJ_91!RC_c_z~ z{_Z^Q1}<)?R#sDTN9C(=k%@?Nf<5&Xbmw(9Qt&h`8_RMmp{-9WoaUhlA&Z58efHrF z6$Z}ISNtv2PpTkl+D*wY5h$0SCS56KnmZ~kCN=<-Q6UYDEb}a8MH;mfXY^YQh@dmn zXzB5J5_8man&J%sdE$+VoK+`0IPg<4t7%FxabeWvssgs)LIaQbd%_|D`d|hFPqR3h z#71E}rP~OR5-cTGRKH-@HE{fEIh9fPXC_d*E@ZcZ# zXV!KXRpcTt!fUi@BQJO%7%6RV3j!Fnh8Jy0tkIN4%V932)-Rr111bJU7Z(ZJLH?mR zM#7MxuYt2STja`vwz;qm!p!_FF|hF}XqXB_gwV*gY+mapFrOR3xZ)1r1bks6-0(!~ghxFwTA?kAW)*2Eq)ZpyC@&10XaO3PO$m)6`~&jgPt?HpQ@ffbabdT? zq!qqb&eYC}k9{Z2jMl*MU`x{a$2?jv6Pg1;ztT#h_MmdG?mEM$&VV+I*4dJD1dt=6 zG!lR+#n8TR1sX zz$Tqq_B3Emjatt2P2ynv%22n8CTL{ws!CHjS(+O!`Yk!N0O0A0NM}nSjpl8wrcyx& zk$htReSSehGIfY4IkjzgqsWMX+DJVkn) z+RR0}@tbG4ahQwfMA5d&)3b++?A{@#*=b{oC zdHKO=gBnfYz$k9TtEyjB0f2Dv2qyNw;;(qdUktQ<5%>kL=Z$$oHla{zK*jL5$e0iM zbO^!6!t#+Zz7w!qc8D~p#Vp!QlI)X7c2iz&{|iIkslD#D(v0FYn-8TK6=ajJ$riKF z8W}g;-Za2ZYB1Wskq^SWU~i(Bqd%pXQh>t%yK_RR4e@lqYW-qr3>B(SVL*tN35}vz zI{0yk{SHp{6`}BXwcb7uKwNWhLCBgdaFVLR7Zs+vW{Z!!>NfW`Cj(*$h{`NCz^J6# z(nevfXo6}}Sd3yl6V&V-v=OSQ$ zk346RCtIpDnv!`Sm}G#gBme?}i3rmFV~8e$riNCN`vd&uKn3&9PGOq8h=milATaVf zCvpH0><|%oYVmP3O($}-0b6k}5x`#mcvW9b8)gZB%9^I-KR^Yt1^`1%y8ldDBQlcA z11?^7ij2eq*qR7n>zCkafmepUS76I3ilLd%MhGz0K1usLDzSIzjZP7bm*r>0C(pCc8UR70?*Ukir4Qi z=$7sMi%GLclW>6-$lml?I)(rs-9(nS(bLA9q88dVa_}!e@zl{Gg471El+-LY zdcv4U{%xrEI9wh#Ch zPRb$?fY{Xg=laD3P5+Vwz)%ZN+j#vC)Nbccz&)xHo^$blcu@WYzz&>9Jm@F*(9FM~ z9}80Otfg9GO%Ff|6Vp^QjlP2;e~zV3!zS4#1<;$XY=P{FF$oe;IOk z8VKV^E;3UfnGsefBLsoirGtn;ZIgNAVSSo#eE7l%0t`4*7-`fFuur|W13yqVFb7o$ z=9tB1MnZxB`j7x3HV3>2(DSY`&1DeS6Od2ZoU}qrQw`7v6K@pe^a!vmus|a;>_uS! zLQ->XsZcH?17ZgQM3@N>9JEok35^_uFjI1BHl!^AKg|ue)eXS({yEAP2wt;7VF+FL zKa81#HUbsY#5dy@PZe4)O{7zcS4t;2^cCX2;%`B3fDACRjrnurRo4_AAc}%Mk*1m~ z5Px^}fs`6kN)5q$8V9^aR0u@-OSG6C0FXFXA7r8l&IWF!gNwfo*a0WnB4a%Nzy%G75Dujus)1vh0ySDN=?lY_Y6&;MHsdB4gDGra zF+(@_008FtKPBuyEy)jnnDY@oP?)Fz&sWhbA>rdppCvziD4`)x!+XIQZ;)d-O%&A( zQAdn{C5a*i7!bmmHBdSxHHNa6QQOL9ulWardH$qOE1Bd~f zlN(gd8JE}xrqt5G|6ukStXYPq4Ok6uo+c45I5NsM52D74#_to;9gufNy@#xS>O&=y zrO_DDM!*+z2WVvoqcHJ?!*GBzUZc%@!M+zjxUvDoQ2Lr0{wEX?PYqlsLW+yxTiSW5gT2)O|MCJ3;2r7e@@sppZM71`J-V{#QY6XtSOj(qV3F7g)K&LHppi?wD1vO;TbUQjHc=nwf zsa4Sk;*8KwKQyfhmo&}uB5eoHpH4AvYePSMZH69JE>t|8#P>~25-$|i+SDfsKMC9E za+aBRA#|4BrzN$}&zn&9%C!n_ zNFU$t;B^0tTP{z>>4aVv*_Y!L<_OUVxx+>EHN^q8al(-k z0(}&UHC7v%S?=r&>9N&0S)INEw?dlP|J){@5&}k#wDmag&mi8B(EalDa)h?BRkG6A z%tVL|v6x}mDY7FZfA0`MY1};d9!eV3I^~~E6#H9C|17-b0|TYl%Po+=5mmW!PBBPeFI)+ zt@6)m_)pSNU>PWZ@`JLM*=<>GQDL{?_$dkGsPJeqH%52>C__hbQsM-`n{4S}PAQ%2 zQ%J;{_Y_e`LPjYgDGDK$mlQOBQ4)a=#A%Ynp#%_0ff`NQCuhITjJxG>!yn&)V&dY; z6^$B`eqIYNIiE`O@Qfg4M+%m$mQQj8lbyuvb^ejgK(yev&b{|@CQm140xe-0Hn@A3ZU;E*TJ^W67!U*~n6*LmfuhFeo6E7!A8zfXj<0U5Gu zH8B*@ypJA9MgW{T^GeN_bt^M%CUvysq50Y{)`JoCCBCGf=9+P<>w&RQfye5!$K09m z7S*oK&|+RSc{IIt<=?Z#Z#Q)rBt*)a_;_l^WtS!sYPT+OK4-b0pOxO>2}Z_A8PIwh zmc-eN%(-wlrPXnTlwA&^DTUwEgI}zGV`WXtBfe&e6v;N7jwgQA%Yvgo`C?#Mq7&*@ z89lw0>_K7JCpNH@zLuL0J%gwk3lV^}78+nF!(Y%=luaQs*c|_WU@G7_BV~9wp5k($ z7)}@oGX9T7kp*Wc1RRh;#eBIXrN(JC{-Tj3i+E64F;+Aw4HsvCn7pz(@f0{z9(AVY z#i3Zb3X`|1%v?ToD>G_wF)z;Nz|ESSHKLMeM=iRmcfdkn$BT{Om zm1Z3%B1t?gJS9yy6DA3*hA#7IGH4zN{v=6fq!eTB80Aopb_h*KCJljX>edYI!K>`N zcIu|yoj}#s%X8))VnDxE3(--O^@`08w_Cr-Ylcy(^HV0`>6CV5X#K~pY(tpn1_k9f zTd0XEqvNx(yjQ2Dn{s^uO+VLK&Rppmnb%ieABS4S_4h3`&99lb{6w{6@4(uSm5l7F zd63>SNJ|COfA4VPq&&SohHOhE!30rv$0vp5_{_8+BQ9%^qD{JsF4bNFBb&bdNaSpb z+Y4oNxhpA(3#9fg>7&z0b*TDeR4S*xY-z(w)fxM3am~0-PXf*uO>7_n2_|JTn%=rJ z5C!A$Em4MxVPJ3lhIOsZP7fgE!1hjNc!)-e48p?=p8!EOYBcUS)VS8hpZ{Xocz>;K zT2pkt8Vv{Tk`Zhg;r${a4pn+D2n2u!DQz$rbrs%dA*EZG0pw-gKVh||pR|Bi_Lk-8 zYqhG^@7?^cvcPt}xOG%KBraPAy32CC*0Z4O0tZ}NAv+H*t;Tt)EdQX`_?53aCxieL7*o^vTq2ueB_NdoAIWy1du#S zu}Peb@kQ2Ru;Jy%b**oLm*6WYnC@#Rwc??ND5-9?G&w<`sbYH(BF_h42{#-O1LI8Y z=&O z=^d#~Qy^T9dme2;KUz`;n|@*weoN0Twza-J7=za?tmR=ZmzEfAhe^pQ zYZ+{=pgU0MLuZVzGEjmdB4@W-e@-r79rZovNpMSAw%uj&|krN3b|c{(UT7LEg`z($7{_3_sP7TwF zquHWQe5Y@Qz?uui;cuO6(zB_{Qk&d-K$C~A3?N)-LNBmfm7JCUJK+D}?&gLligx@)OHDO)* z7F@R-(1|7?HF=kCk-b~>=%w*lPeDbR_0nu|QVZN_HqZ}-p;BZ9%a?`Uk7YTZgTlsy za(E;Ui8Vt;ib~aoYcG;ArR4QAzaM-%5j>$Eq({$TM8e(#E*XL9|0K zK1<n7b^ zWBEO8cGYtxOV<`6=UVmj;iH~=2^f^{YcfVas(9SSra{DcU0tp~9D{sifB4T-({~yq z3;f0k#cD2Cu+aybBbC%~mEG7NTrOG3kfn*fsU;(uKnP=PHfDQw)x_*VoQc7l;T({f zrZpB{{$Q1<2>`1D>=0MEnpQqu!et0_hXw1xpx+#J!x;IYBqOw6lPk_tcSutXbSHm2 zuyir((Wpv4C!hcdE$q3=^0tXj+45;D@4`uWtgAeHnRQ4}BtLaE054LFH~qVCw%a+yBs8#bXO`#q0pyXEHdSjh#~ikiY?ly;UH@xBe&c^eh6teS{RHF#p)AG7Mz zT%)YVg?#kl#1Ha=BtZj-8hkPKEdBGFValnGQCrb;#wJ~rGgWn|Ol3-yLNZw_ObxMd zcq%A0Z%R4Mln{=}PjrSRT0%B-q-1Q(eDvG$OC8o=0>Yv(@`Na?q)A4(&@zzt;qTzs z9aWEfuP#4Fb$(bZ5;w?Bfr+*+g#2<<@L}iYhG50ZSk9OBV>PSarpTZ%96qro<7|BZ$7on)Ox8?RQx7TK;K^ z>WmId%ac+Hv#RTVFd5?=np}I zVGG-};Ap%M40COvrRYPcLH@eI<;q$TeLI;Il_{$|2X4e(3=>ti@cR!BW)Z=0zxE=; zX|}x!-FutZxw@vwyFHfaZ>FX!8WS3t);YeSQ#4TcTgNPQc%VKf-iSPMB#z*NLl76^*A-Y z=)9)BuFmpr64T*!^*;orKA@zJLBb^ogV{HfG!%t0M+82Tj$#oh<-FL%Xa)YB*Q=$N z*z1;-5`i-gOdAsq>@BpgP1{^U$cMNn?yKF*gvfhIXSP$~j2AW#p!e8mIR825lO`w4 zlUxJ@d+lJvg`U~Hh}l%$WW`ukmpNmg%%FBbehp3&5o=P5GCmnLoHM)ojbp9NoRBey zWgd}Mg%qTWF8r+sbv_c29$R_xtlteQOg8(9Ej>G^=nQfj(vgk*8w;!bTbiJ9HE*!U zPbH8Rvhirr1w(HwXyId+sKD~`g^<&LXWHmRG}^ zvl@k@jeNM`O~Yf?pRo~25{XLmHM;v~o4O29JO{m~zEZ}Q@!$ly07x017GfGEN)o{L zjf<}fxmAp-^FXJp?WI46F;~wN>laTaepHskSnFLxzj#0LmC|oFt{j`m-JW^o=dh8t z%KE&LWg#WeyBx)m)w7mj<&FoTeyr)|BqiTMd9-15>k%buh~m_vw396(!M99xqN-$8 zJFx5GC7k2k$wM+Vpm1e^2V>apo(gY)d>?L3>LX(~ZQLt-bd#tx6(6AlA((~hyz0?f zo@<%4BOSS!&~4LjEr#U0aSrOW)S;f>99nW!4~aI~nf|)-xH&{xlim__-Bid*U(I#- z&UpMmRoaz`N6wEI+Frv%b#*cf47}G3-=T*UVo|$o{g)zH6>8wx-$@EHUgsbr2{^5{ z!4UO}#`TPp)8`RuqQd-$3yb1;FEHll1*k7iaNath7&`R%Q5-=nZ}u0o9(Ts-LV%18 zcD=(LvXs;%*zKoodEv(SM>jcnKO6L08%e~COO2Xta!}GGV>T-tMb!yUN z#{RL;yzwA0IpbpTf$I9*wOd5AL_)0%@~&Bsr$EJB6p!lR+N_v)kH|EXNV;JTRP)}& zp{%r1vYX#Cdz_Bd3+hDg;o6l&Bg638zle^Eh9zu}&1^Cm)en%{+|W7HuUt&W>(#QK z&1f16;Dp&m4AP)w&Q?+$x(1uM$7*#yyank@D=z^59{*JMJ&1n%E^gjY?+L#t7oNY_ zGyuV8dFNS4vaZ5N(AbSmR3osvM%cnF)G!duM^0F2vwFCO4!5d@&WdU9j25%>xU|*^ zum=VYg!sOEG<)V=p%cP~we54MycwdmjEIcG?yWtf1zQN3XHAIe43yN$f}_D7>gz<} zs@#jb>dYUcL36DM9FTvdG`JOB@COf9;jwjd4|zv9ljzUd20^y8F!Z6DO`H^B(^BP! zkm(wUV@&lIK8htA^$Nu}-92D^^)q*?b&o8mXy)GEM?wTz>eWP;G~@5tIuDeO>5ty; znHfSD>YS!{)c5vw>t_TfJR%4mjKmx0jMB_=OogAct4}q|&jflu>a*%Qx>u zy;hBBx&Y2E+~kwpyg602LIkBD_~2^a_X+JzsS=OV@pzOx04Ne7WqYV|N?EXRpeP(Q zbEyIfE>GKOfmm~@QT~d;Eei+k+qy`~oV zGcB%`fO6p=6%XAT55&=@{|A>b6FI0H2W=h{k3SweG6uQG4okll2SvxpnA}1o2pZo6 zK-4UWJyR_u{3ct;YXfHZN!qngq9#nTEz2rgS`FM;Fh{~ls`a6y3>fsAL@xXu0f*x% z4?vW0aM=|8>NwralUSH=h!hs;d77MZ;+w=Rvs#h~uqO}jLLzgdVxjWCKLcG+K@M?A zEElA#z-6_@ikuhIuF@!c=8njQ&bjnl(rR&c>BoSJ>#Lb6SjPXPPWJG?6A_LcaT1Bs6 zCpt81yy|ZJfftSqJ4am>>U~<8snKev0mnck_-Il-Smi8Zh5A8iEp1AExv_jDE@}=?G?_06)v3w=_2`CZnH zXj4=GVe2UWzkpU2_)RrBJ;R>+IUR^nCfLxeVgbpmHB>RdSc+pbP6L(Qx>g`3trJtj`PEiy2e$wi{P3R{KAT{)w{Uo>uOi5-qk%2m*}T`syrS^1oT<8G%*~? z60SjRyocb~M_Ox|gg4k51lA}|EQ6*NY}$;CyDjWsuJ*SGJzbX7^Wq_03pJ68aq_Rm z8aG%r7p$02$438Szc>xXc6I&XjgibgM(2T@i?`oib%sInBVL-3+u=<>bW z;OVj>(*UgK1xEp#eCZJ+Wo#it^jgkeXp{!V=G(!OwVx7Dm^K-r)T$+_EG6AhkT|?l z9-f;pY}jG2ZBkqP$f?+@B$k7FZNP9EuAO#Y7Fec^4}-=%1hx7>KI3uDj9{ffrbr%icE*PXm zu3`V>(+p2$$i8;G1r-xeRE1tBSz6bHu`%7>4vIZAl?U!wy|6v5X(jbwmzH5VNl@=Shc)tKp3hzPxn>trcq(rZ~)4+`KQ$r9l2?ZS2G0)(+jZ>SVC z=G?T4T##{r34GtWNwXkbECyH%n?_Kl(Au6S?D%UU^J#=WbxjL`IENARITQ9$Y@A73 zb{kMwEniZDY3q+=uDuQc^@baEk;fofYkD!-3nuC4Eku&E0zz?(#XNSt(laPy;2iV- ztF244zSy=}%xpFc(R(D3))7{JN@I;mDR`O&`dae=3y#O>iZn8R78LF?pv)=$E&R=( z&wB(Bay1@SyIF$>yy>W{Pv}p3_x-7?DRiT-O#6#J&WNed45T<(gXu_PDXGodFa{fp zVnImsyy=(bcl~KCWli@v>$l)VQ*Srp zxk+SYa@oxoiEWXhuQ)G#+?2J2TG|tC*hvlg(uml0an$& zR0_ZcBz9gw;kgz4bg}~IuV_8=hi?XyG%K^yGdrp_LAfCy@K+If#(kifAlHw604@Se z9WV+4;eZ5!q{3f3{6A{&OGb&ToVQhxk5)$+JQ;~soH35z<0Q?o+9sB#l*BSxU=v$dEl@{K`OO--x z!hK!DVvSJDpEbwJhqWTT_sW%7x#Ga_t*gosC#tJhb0iM_sAN>+9h|i&$e17~$|7R* zoYiCtOfxpxFPe49loR(hqiDD&&0IXH&oZ?_%SCjPB&~wlhB4l*zHI|J&^%ha< zS$QO`e>@5XDbD+9mL*&P8J8-!cgKRLCEJK&mMwkG=UmoTp~d{(0mu-ToY&#sn3Ek! zF<9?#ut_>jsUMXoa)DWy}onxrzU|~e@VJltTf|eKvq`WOrms`WM>pG zs%w~XD#Tewm*p<6{WQQ(p;cq8l0SfjX{<-UGxu@+Su;pN+`=gl{aO34jVXmNErAp6 zL%1V-nx|$U}!{k8M|3R&S*quRWbWw_Cm9Q!W@gAxU$tvKv>h zokr@H^qXq$1{pmRmE5E|IvTUvWiEYJ_2MjbT-rv^Y0e($_XGQxQrJhd_}1rky1zx#hEFlkFA!1NLRchazD2^eN)OPNiWGL0VMsNS(;6Ef@~M8 zqE$CXTc}y4AFFgZ^Hy5T_rU=G`=bnT7fn4$GGsI^8V_&(Sv+ctcE1 zx;ysFPc@rHlmDx!_fLl_fc8(9CpiL0uE61ZEhGBCft95R)bZ2>lC;8Ju@|u{$W!7_ zAtd#?MAyf4mZ|}UC|9+#ItD@W1vqVChpuxFYi^;S$bwdww`+VBy;)#6)18uuoeC#x(~Q%DFa%Gt!p5d!i|A?hvA3ijW~SO;m?9!8#9GY;G@-JR@D z{!q?+Y4jZAO}xbqd_;T$@DU;9>LIGTt@fWkV$GW1qID-;<{OC!^*1A%;zz!Tr~g^ry9=>zyqxmtYFK%F*8I5&O9% ziCaK)G!av9O78w#pK^p=2&!~O-*56AcZOo*ZV^Kw>v+WI)G$H7;R5_T^m4*&MBYK zv7LjYEAE#i?U}QjMxBF}aCm^#_=P)d@Fu^?X>Hjqtf}@L5h91rTFvdQWT!3*lG~Wo?2b}yVnoEdt<567<6JT zUr@lsRPMBv^697|7jy)mhw#oy4QLgbamb<*vSh|umPcoA>Pmnu0M6*3VzNx^fRsmR zw!zxegL~j*nQPY$nzUY!v^fhBJxHD$MwKV8-Cm!+Z%cFm5=a&uG1M6=N5WtH%RkVdZy2So{m-y1y@ow5gOHnm@+{68 z>_e*1a;4J%m<+9KO5C-7Bqr8tDS~h&B|Nuj+L%CdSr$n(0YVV0c^HSF%U?j2G{4@S z0Q=F~Z%>XI^cxs`L^r^wgZrw96$5y6-o7K(mn2zq4)^_Y&=*lpq(%xaC7HTFRRntA z-?&Z&%Kz9HIMW~D?Z?k72%lZWzUrn@oR$TwOq>wIuYH?T$N8;+=J{!=pWc@nx#nk~ z11;oP-liM=#R1nFNt@J{)98(AnCv(^$dSj(W>7rvpp^! zK}+34-8QI~e)%%@iQJnVfMjqgZ>*wPE85Ehp-C0|NP>s+%-UWJ5RY5^I_r)eu4@0f zoyGYQC*fg7XO&HlJi7Ps8_Nawk8DUA(Iq`n2m|8-aGI&$-LGqiawDv{xid2ZHg{xX1nQTw)u$rffim-w^Atrt5l{ zl_SU)6^2EHwLb9b(M=v}td!FvNRR&=Hvrp+-Qz^L-gYm8!EY%2z|g}?3`r)X)T^U> zT#|ITrIG6*HVCp1RROM+pleHf`F6quTVdR1p*z86M0SRUWFPsK_d%zgYwmgB#PD*h z@GMB%)SB=P;-T|`Inc=Kqje5aBGN>jgXSs<%5{GSRIGerlbMk({rcZz+B+c9Vpy3| z-))$=Sw#Sq>^H97a<`Y3MXVE&1+5cZ12SMz1osL?b~&yeX@PocK)U&k_B}ZMK*`AD z#7|d37Xwior*Fd=AH07{AE?aWr-Zoz^>=l*{Wc^!Y!sKZ49*Qvyr7s-PKX8D1;ttZ z(=`au5{4#t%8$p$pJ7nUW|@%UKI?DOO6555EQI!>S|4+h_Ss77&2y0aPM!aYuQfGt zqAb~dz8WZ*TOGfv{-Wi#Co~nO)cyV(o#buWA8$ULo!K~1@tF9h-t*xF>^e+io%(8^ zfs$TfvYr9F8=mc>W~yHrDskH=StZJ~$QDML%A?Xyhg>Yzb$2%csvcUU4pNt|$6G>c zlYi+|l^#*I=VzwNu)B;$0NQDxzB1>iI*5SUo5#%a={#+oQCZl7Jd{&CTugQR4aqhJozm^LN;%qj1C&#%9r)5-k=&DS5=w!qVn4sx6s#% z>=pVq0Sf9*p%N z%S3t{KZRU=4(ez&dA{6~rZASVTCoHJ{y&}EzMeHvCR~f*HXYBFEAEUw zdAx8m%u47fX+L5`TQx8w9j$|r8!oup-wCVdAVlItUs;j*pVe3JSGQY8cY|^8aNqkj~U=7r#Vna-=5iZl58U8QjLx|izdgO;G@+L`4@WP z2BFZgr%*4p)4`Ug`Z#zo9i>0GyY}()%<$16BGq>%7*qRk(h298;#oQ<$~t8dlnb0n z6i4Th_vfH*=OBt}{LkSPcb$q_t-&Fm@|JTD?*P1bPuaAgZkluZWCmYWhVtc11w=}} zCt%qFh4aw2Y$z@E-B!DVQBgLxgQ&6`M;=>@QbJNDx9nIcS2nXWgVkL5vFGBKKp9^2DH}}LF5nJ3podoSMo%!yJXeO3eT3s<17Q% zr2xk(%K)n^;oS-C>}L;)3Nzplylv~i!Tz+6N{G;HC|MvAzwDc|=K>6Cw)x3;mPNA> zU}GyuMvQJC;zMu?*ck*SQ#6^~GZ|fp!*Ayekan<4JisyQCk)BME@?^;>%eiAN-qxm(w6`9M0E=-4T)EmNxyVbk5zvorhZIh`acQ!S1J@Q z%vJPb1(sr_T~8w0<|)zb0Y(Eoo|u0c=H?HaxugL#xdxKOKZga;|_O zvT6iziL%mr!YWazvoSq1R%o8O#V>zGD>tcCSQs*-!g>yRl?u4a=WPWN+qdwVmCbCp z&xwiO0IRHtnW3}x9K&Yi?OjR^dfpQaU7vzc$#sU!9@S?%=b*NxvX>E*rC{L4$n;|3X4Y%y^pRMB{bA;3lArw% zvi^0 zygL%H8snR7Pddc{Z>r<7>EJX}Wa^ipiH+@QH;h$20xTX=8UY)g(_Bp`6Vhizf|UKO`&HLvSAXqV*M90bG%)l-t^!k_k>bI@I7 zJK|dQw#0_>%v*^f?L_PnnsFLEu$>J#2VIr$Iga~==AN?+&eBfx7Dd1E;-yvx5oOyi zxghOd^jR;@v{Z!7e7mALu2w-MhQl{ZR@%(Fx#3194vsg2=S$+YgLNvb{#p6h8pi)J zUq;xK#66632;yobxoz?u5O5*U+Mdvnw6fR-pscmJQ8q{X0u;w!;uBH=0c1?3 ztWTe0pE-WUw|rS>$tfxzIgff`Rk&lAp(?;Y9YYcZOkfb>_tJ_F4}tBQUjH~X#D|~< z?<#XY5lQoW(En|DU?VBSN#Ca}(=Rwh>oa=3Twe)gT-g6Y3)|>h);3WCMdd&e1~KK~ z*B$D_Vbn#WR61H7J+zMwN)MoHB3hdkY;T0WS#b%(QEO`5e;pxuRq{!$V?aindh9xP ze{g)Xx@^|yQak^6`qc1pAm%l?Y@5oMUew%*{_L((0B3aZvRn5O2-T_pQm_H!!NAmB z#&D|N^O4#1?ET3UqG~f0;u-f5Qnl(uDY%3VA#T=fFrN9XEX**joB?7Wn`rAj^sma? z+Y?Bg;vPO_XhdUP{xo1!Htk#}PET6U6 zs662~8A=sL7NAY~MB8U8jD_ESlG{JQ@Y!LVa`Ji=s>zDDi^X}~5`w@2e6DI$ zapSLL%Xld1@j#%T^6>Zgg^lu5>$fPsbCAlXNA2^TFoSxpGoJ>^=T3wupY3$SVOIR; z8QBA{EGfExFxOf*+G^h(45YyPG&&i#Jb?|K^+A);jR3N{xH<$r<}l!4jIX}^38^uI zQX2AlkF~(9L;(F_vVVc{^C)j{a@HHZ`G~qHj7Y=rWk#S+P=1o+ijK2Lky@iAVEt|T zAkY4x68z5SE)xen)Lp=NPa^7LH3LEe)gwM z9S5gQZ)=)N2-y}um+JdXN8W`T^mh6FrcSRNPZIShyEy}8!md5`LFMW$kP@aEjZ{_f z9*4qxPOgJ3qrq!6c9v*#0J+>%sLklaDSl$r#7#xH6;Q@VGE#D^sX-dAj{4-}4~4r! zbOQ4Hyjq zDbd>snMWV2yo|=eUOiu!M@b#;YK8e7B?imWE{t>9AF)gtEHG8(9R-Ev_&r}p@H?ER z+nK9AZIu@CIs_v4k9rT;Y*CA;?==l?z2<&#uv9bUK2tJX+|;D1=W;y*E|NwKe1Ky& zI8H93kjwChHsX#-tLWHr{Xzp}ySYv^gWUWuStmnh=g71<)d{yqhdpWAaCfsB`%@ad z*%mljr8@6mOHilw=r5b?r#jFY?X09aHf%Hpi#BZ4&*uH8ot(S5#V1Lw^VKpm!@Z!t zAz)U)YNflj?CJ@Rwa|i#As*`((gWQNP&ay@jyctV2jE`_JWfLK%2PB1XONhJIPrvh zR+jyy_bj-%-qYXw!%K!x$(O60^||2DtzZVnC&7gGcbcQtmbLV5-RrTq7;4yAE0=Wr z%xz4zVhC=l^XDKI<+qV+$ z-ko@bjHh3ml@d|1%8Xi(%*82}%D?$0ZJDZ!86zU^5v0um*k3`af0ZYTrT9Uy&woKI zJ(Gz!-P!ApVxJlL9^|1)blms!;eDm5m_77@T;Uy~`d6k_t`*|gaX)P$DxbUtqR1$Ax&C?hEApG_fHFtz!tgS2{||IQC|w3m|;<+>&LZ`)|I7eT3y_O z?3a>K8}Rb^+;P>JXTEEjrv2ni%TH%Y$78&6lff4NS=JQ#4Dpl*KVI+5eLzrBUZOiw z^y8^^_EBP9LrHVY{CDH-m(CZA*}n({deW6c`ek;Ug#v+sKeHQ@{Ht;{(Xnc33Wa&vZ8K+YAlSkTgphSYd&jcv-A8-H2YL++HsW2N2RCLI#v z8(3{Vx9<|(VVV=-KSZVDp8D=(6?hv?BVHJiIV<~SnJ{OIC@L1!dwI3OX{1JML%1V z#FuRdpMy%IBv(-9py?6xK;Uu)1sJ~8Uu%2wc)svm2S#3^Tgu8(cs4@(95j#1f`NOt3M|pRlX%zmt~%?$vnZf}$^Go$f(LkeNsVDBtMRN)I9HAa@%?!ZRy0PGu*;X(wWYL%Bwj$ZWYNzL~3qG#+lm$ zztQ1znM*SD6u!cpB-L>EURvGD%!(K;Q1=jp3-G zFsGGnyBx-g`Api~+@Um_Cb0GSS1php=S|jDZXSkwXI`LSj8!ox_X2oow!f1iQcLHxNGi(38ef!?;y(?#s`I+1&KPx{GHY%WL1z;PbXv|uF z+IkaBYw;9Kz?I~@TkGLji)Rd8yBR%HMnbU36TjbF*0#tAi9b;;5;MA^-!wikMyM&5 zaVL&w8Sbse?_x{8p|8HwG2fNjTnLl!@U3|0B^1T=sxFXOP7I+Jd{M1q$lvPO;=WOR z3*AQ}=I<;YmY&n{;_q5`Lto&5Ry9LWpdac^Z6n~(&2r7aSnENYaqatSJuC(75pkeC zd6o)srto-heGkh{n=R zRqtVGQ{2>7>a9R)uQNomL;ST5I$%t@Ktj?VJJTJXZl>d_`<=NWZDVzAIb3Et%9w;M z)TEJbpATDaOwAp!3wnZFpAtd%_P4n*b;qe?$3Y8^2!8)+H@U0*xK8A_rLASJi`zX= zlfKZng-N{Z9p~Rz}k`nmo!7RRZDEXcG*D@vj zB_r0C&N|t)yY^k;0lK3eaUoTtYWI~J6%W*UnBhYM*Fi$9=KsqbQ&@l7li4@g51`1r z9&YolEcWnfQXZRi-H+5~Bf|os?C%M>pYKK@(6RAtb{Cc&471*cZ0s@ICodYsc%%ap z0_+)be5Wt}laRy1d{2bzx5e&qkMs1@@6MDDFaBy}MnYk>_F`d|l>7hCJwoJjchy-@M}S(C%dzbJNa)Jf=F` z++1Cpt8cbFzBrWrvUm9?IkUx|Ll22*3z_x#Ha`c9f6DL@!Q# zw?On$hLe1cJ!y{$;duUnjbCcYpY;M4d6`~%QfI~%86$;vHq2kdc+_!JrR??mRc68( zUvoEt5igLcZI88f>ATvQf)($V{uyvve;~HPHtZGXc{fFMuBhND9T!v~`Sr-;QM@d- zYL5!*_?cq4Mye(8{;(J1KvD0S z=VFNqa7ah-54syQLG+HQ-r8qP>5fX0+$vAlkOZ57q^-hq)%@bWbhoG8ezC^7-27!} zC{gXF->H?G`Q$=lOJlEXa`gl5pT8Ncet0M@u6(-i%04Rn(70X159TjY%svexa`MCtIsC}+0)Xex+m8q6DDvP21 zQ?+`Tjh2tk;md+gZ}dg)CH!@W=EYijX8s9EkKDC}YB!CCa>4vOKeV7Y zE9E_D%VOWSFR0N~Zu0javnp@uJ&}oy9Q64r>%lUjt56)%A^q`yudRx(jrUWQo`Tn; z>AMA7HM$n&5Tp=gdK@A8RTV&k*DO(~E(=VxKaupniPKf$+Gf$w((rymW2uFIHaeV*v8lE_9o_Us1x_^pZZt)PU86W4HqnDS~RO$blE!a52o|e7V9FM z_NfsL&u`M;cH~)I{?c`a}F2I4}<*KxuBy?cEBXz3d7bqTR8=c$eGrig$#WW=rDgk_}03xU07!r=*(+JQX* zB*vR2X&-k~6vo8szMttyMhEK`%pC{7_2pW1OH;sS-z}%*FDLwD%+&qbV>j;QnT z0e{fV&e%;AE|kJ^rSOm{ZNc8=Z;7;k&YdW}WPkn9l%4FcUxj9AwX_{z3`sQUR{UK2 zGEHR5pYw40tvypMW0W2DYn$Cm3U79dfcUUf^G5%!m-t`dOX0Nwo_fQs#0`o3woeVM zb!ch&m~@Lgj@e3S#=mZ=9xBUZ4u2&^jpk8Oh%~p6cGe8>hu_@ok$RF>@6;!5Etj~W zT~oDMU>+K;{;ota^US|oNV6L^aze$Ts7+*;p))bghQDYDlvBKK>>4ULQhS^oTHpns zzX4eYvDSDf&v6PPv#s^px7^Y~5x-}(EpRV(zr*Ed4E5iE@bxvvy_ZzoQvYDn zK8B}yFvb+V3R8(>r8`_Wo+>yV0}RrFxp!rtggQ~hhAGl_kIm2tFOSy8k)aNgYPQ+f4g7RLK@7=gUxq&yV|4d?$qwiw->_hH=*e*1Sc^0 z>E2$Pna`a1KzwC=%HHAM7h5H6Ib^Y92{GP|yJg{fC;qk0y(W|0-Y8!N>mG%K!;D23 zkooFPY+NCGV*K%kG2@h}+Z(>hIeM3y8H_r4F6>0TmovIyt1kdulv;f#E|VLRTspY% z3Pe|}Ln(AG__Qk=ret~XQmd_t%f3SVE%BV=vimo6^qqwao*(UOJVUA9!`FQAQh z$(JE>-7L`jwUS<;Tj5IQ*R9PudJUT8$TJwt@+alo`=F%iJBM;?Sl}{}EW>}=8IDzv zyWAvvaXPB zxe2N4DMW#I;?+4;m8Lp!puen+yB4{f22(xIe?0hB#7HySFS-t7s}xzaOLzIHF{?4E zJI;VSuD1g6Yf)}u`OJztIzp}`kC|(rLeDo@uI3BOGg;})_h)6Ko7eFzx5Vnvr1 zqJg;*{^mN=qWL>O%!f&b|6D`Ysqh2-o40pqsn<4Ck4esU!H+_O7HohqoJJO-b>e*V zZc(37bcF&5i<&IfobsXrI9dS*d<-lbpe3SJ4oZx6x#Jn8yFQU zzsPuY>n9LKho;U#@GlYWrMuBxXr_OM0aF_NGtbgzc8ePwopjS5JaZPTzsJGtZLec~ zb2qw&%C;jBTY8+)eHt>c)6houguC)0>dhug<}DZyc_$I&aGFchKqJIIv&Iwd!MEEu+k=6#uBd)-o&qJ7%8AvEqg88g5+ z{VnnxG=FopG`Z&$?HT_JEd_Kie0Irbr^@`d{o6C;#iWaq?~GaqdF^vpBW zABThpQkzPN0a*@>HJJ`|O^rr1MeM#;e?4;;`GBb|Xybk= z%X`WR*0XXWP=G=Ux{Ca7Fu6_Iuhe@<>fqU<=QT;>e-myCH;;$AMzixc z&ZH+c+*zFT=O9F7_=7Ow4_v)*{tLq{yVpyqalp`pyhK_1E5uL4%Vgx6g8F4LdqLeH*o9 zlfSfg6H^0UPR2;xHa{dQ^)UrWX5P;K$ZaXJZo9ql2QWgu*>Mg!yi^Ztj;C*Ep zQ=7CQJHy?Rc6W~zOV_dOvRS>@LP8}Jl>;Wc8sesR9tKxkYsm_I<#kessB}> zH%_%i9FN>unSbTxYbv0=#F4Hg41V3QgbkA4qya7>+G~F(IS=?)W>g6ux(R-9Tv`l~ zMN{rTIhf8tUcvv{N^*<5|KC;`7-{2kqk?m{4R?~da)9I+F;?YRJHfoQ$fa)$UV4h> zvT?-x;(rh?f9Yo2DbE-3pY3kO%S7t^sV{VYeu)lP4+*)&R&j53YI+OjBL9rm=rhUO z=nhYLHTqFndZ*KXICEaV-G%*6vGsImIR=8C6e7V(B&rX3XH9u>a$}zlrCcE?T z$HH-%75X0rZ~KBhyX$DrYt2KL8sUZ&bf6~&ZEpa~rhsTi`=R7C`d?b5&#VOc-VL8Yxg4aSg-G??)H9Q2G})G6`G%_{E?HB%g*9Bx@ucQW3p zNx3p28N=UjsyM|<1}f%#ch5nMlchkJB4x^cH;<}&l%Tp{4-8Qu1e6>xD^(oI-!=Vq zuj~Swt$6fOsXCSQfC0cboLh5C;&TCO_NSgvZEp&;=p9xW!_43Ec7_Nt8c*?_nh4q- zkG(YNXl`>@>oKFi5jn9b*jw4oKal5MG(IhNB%39rP>oQ%e-}x3Blk+ zH{Pq$$NKhT!6w1Y2_0m%SU+yc*98Y}PU;rlP{dZzgN`A|u+W=EyYf2qyTY+Z$?M0i zCzmD_kl9|h%>#_(!2(Ad{j_%eI+t_bf6;W9d zvG-M6J}=ez^Z#5Z+dDEU3C)kg!F#Cz)))kl}M^Ga|@;ZQA(82Fi5k?xB> z6azv`e}1gVxU5hPHMiwo1b6Rv&zgHX;VkIq&=<%>m zn_kZB`ED@}t?RsoW=C17x>~`{R2>-@;;l|%)U9nVAnN4c66Ek}Xd?E*JUKmXJ<{&n z##(_24S})_)_;iDyl*=}FTgECqgEMRv{^dub{b6qh!_*O=YKT{$ry6lywU`O(V4!% zh!57i=ri%t2!-hC*Ab>%&0}Lf2(rO{vWg4u!E7o}aqI}nZ9@>-S^ATLB$4HsDef?Hu1*PsFSKqOuiqgwNxru|~)LRBMTiE4ZhaZ-OEU+7Vw`QJwhQv^-C`_TO zUd88@)F*#_s|bETB2~Dis7*@;amZfdOfCz-r?%1TJVrZf><*ME#S|c_X2o$GV`pWK zuPYo~M<8?MH{e`Vk1Sq~`{A!K%kTw?-V5hKCXI%R15br)e&0}y9iT14b*V>>h9NVl z*_3texNwPja#A=mMJ)zDS&vC18A(Yr*(njx*`M9K**^)a#S5sy_)a~JZW>)%gUg1V zH@4#p(eYn?R3#7H{N+1a5hmrxOmyw(1hhs@JJ2iu;wxdZZyo3Lzd&mTzfk%`_V+{` zpUi<1_|D~?y?v{(?ae{b1qAU=Z`cJNZZPJbw7TNS7CKLJF9VQ9O~f2n)#JVJ!akLQ zfslrXADA{%P-;C0npx@DjH1wFC_XnVGohup)C7&WiaqO-(F7a&dbFP1`nu2?J))} zH|BkKKLD$jwNx3TLB@+OI-69vU=PTVdhRedS6L& z6)^KC?@2jc0#6Cw{R_F;{0LF4d=SR~2)8PK<1a)f=81O7Z~l+{e0ROSq9sv`os(^3-V)e87TQ4LMfVyx(fBXm=+HnN=uN9HIIubkYf9)fZ6cH| zGYVTdy%z!&=O8a^kRE%W3-ln^6%wZF1p5bQZNjOGjMf<_s2q8Y|1PkJBLP<=y_kYt zI|lBdYiL8l%pHYjE`JEAoLsY0=h4fJo6RFl$~&MqD9x>Xc1Jk(FXTG@1=BK=4Y81l zQU(gkO_wuTM0lp|Nd<4v13{K$WCB+7U+gLxwA<)DPCR9@L7w zSg42lsF{~~gbA{cvoFRF>}em|R|r1}hF_B!!0DJHjNtIt1Qe;X4<26;P0623$Hr}6 zoUcA2{L^IrX*|Dv>W%{iF|f&E^w-Wktpyrd{`Q;M)d`U*THWXxuunuorhqhIOfo_ zLw4w;DjmN6vX4ac{r4CV6ir&(9mGF68B^i^X+Mde{&QnbLJQ4UPX+S9VO%CT1$fWC z*)xVErCj>lRf(o=89xNJSwnF&4Rl`zDvHs(y+PMXxD$5S@ziT{pC9%0Ux>rjApNA# z⋘fonic@i+g{g1n4R6&CJ%6?iXeXo<>I$z}zRD&0})LX=)q(m62jBwCz0pj3SSR zn3b7kj`KP4%K#d|!9v|ZSAn7Cn)b3!quH1&UQRRH5Zan*u4JdEm60xC~A zn`CJ_>%(UT89GLI3Tti~fpi(MJZVa2`L6tQbdeDF6hC^k2D--tbLsrLQLqBtUR4I5 z$yLrpHf;%7vvKeYdk92}I9C8`Z+`d-L8@S$>jiR>*UUr!O`a%`jlY)t`ZQX7j zMS$zpMK`&BT=b$E+zuGuRsod@>3E0#1VojlJGX?X<|nrBs+a$D-R3{9m+rCzDX%#j zqucKpFtn9{It<~5zW)Imj+%b{GU}}seXC6+t?vMdoQvQjcNj_C&cllg(nAgH!Zk-1#}AHI zF70%jn^_*6>S6rpZVfNCx{~$TCGSALk$RJ*j@*1D{`I6}xesLt1guZ#N-n$k@a!q}ooDIP< z)2z^aY!o*1V#U8~jId`JrnPPW^>MKa!;N0^1{1A^A6s2@t24!Y{>9j3{-fHDdSgDi zuH`}AnVGaUiR#Ksu5&#)@k9A8$dqhp5StgmG=SCoIZN3t2Ga4V9E3vw8QXfHxiqxB zp-*7JVZynfM%i*P7lgbrGLsJD_a1y--i!9U)zFd8?PDr5fmVRw%exWCM83CRI{1F@ z*SqSHu&N}(BvOC>`2?hIjnmGp#X0U6#Pt8>y4~hCMc`~G(q%|0*Q`2xd>vi#7*U<^ zH2}lqttD`wV8u~rtnz)O8M#|M`*)0efK`fK+YUTq<R7Gcy zbm$`mOA(249L4PMjLu!-usJB-O!0%XL86BZv*g1wB=$dS&BTuzPiOeZ*hoLISuX0$ z-^jR%jaM_ZyRt!g9WwV~eH>!o+A0pokkAO4*knsGg;_smeen@;MzE1~R->D$%>P1U zCE$~{_Uh_BwW!@HeUMCR3-*ci8$3Qu#oed_WrdY~A=afxy+8RU@7c)c47V7aySL!q zBe3QuLT#hmqG|JW;+UEYce;c<{PtW_dc&@0^oOadkLU8LK49>94lzd5p}clCK?zS) zu79Uxn;q#8p+dU;1f}8rnBuEN#iT&&9c*5xG9{}Au0(AkG;`F#oQ`^2FL#*m6!ja~ z!>^NnXw5chUg?ffd8K5iO?eicP<;NE(_{}PMa&}Oqjjj<8>60KE6eGgO}3VISPWcg zDRV}FN~olUFOecwTYc>`Bhq7xKR@9f^J1|IA)oJolGCW6D6~VGV$$&vcXAXCRlC{;mp7&@A$@d49$b(((s6ZUPH;z1kTPX= zl|xfn??{o{^H%X3$REt)izqUtmwos7YVd8})D88i*B1{W-VVdEsmT>x6m}v!i{K#A z)g4bj{u=Wy@BFRatP`4e+dHY(?rW%<*llr1*tzZdMxphEk!XVNcfhFvEx^rjZJTQA_s(~W>E2$O|yr0=(OD{z)R1W}3oBxAows%68 zX|ABQ0-$PVd^~O|;nJ@1A#`slCiYOma8mKF_Ri-C8%7VwsuTD2{0A5x& zh;FD>nFjD!FLOI| z=i)MY|Lk~RE6I_Y6NPo8BHtO*5Bi3|u?6Sz%Kd#bgVH-=KX)mFVjbSU5$-D))y(glG$m+x3qlfs4)g0H%y24ra$ro_{40>%QUS%Pf z(wO1eyZp@Hy-&;x$It;2;dO!gp{1#yjfb1|UtKc|#W%n9yq)7N;BTE7^R^r`{q*_K zp*B7P!=*!!=#tP;nuv~9-E+Rk_n;r)ms#+$k)LY%4FirDG#%>O!l5a`ZfvPdlLgV* zc3gO9;fEdKi|X`CTG=~05!%3$^WQX554CyBVNxb7bJjmBPxeI5kNE9)vt!(({F5-Z z_>=T2JB;=tHY_$bo^T%Qf) z@G|TXdKGTLhTK4p0XsSB|0|>d%UeHT(qx?)u+rp+3ndYJpUpFejI z^}ei#KDAu-m-fyI-v|0_XnRXFHVff_IJ$&6s*2#Ct{OGs1vx@}xL%h{h%L+3LiTC~ zPhNQ>&|;|}aSpjmvzcqGPgt3B{~dXcS5M}Fh=W1z9eoy_$2pL_sGU-Ce@d)zf-7&> zbCZ#oVQaSs>8oeUGqz4SoA-F`r+kFQhclCJ)Kqx1s8dX8rVK%Wsfu@!xxw4h{fVbj zTUZj_3w_#NcG!lX21&;O7RP~_n0-J+HKpx0TN8Wm%#;~u4(}AuoP^&9_tZTJhB%-N z1nW`yWAzRF6=ES01!c5m&hDQvV*zyYLIBH1peJx40LnOi9Q=V}=sN+l|G5Z2vqM&H zw9DweBNRM6aTm9LYBh-t(ENfw1ytQPA{ft3DHVjc{u}Zk|3bDmu;}Flt1$s^ytVcV zu$BEQ$I#LY;^j0G?lRb-gmJeZFyyp(n%t;rnB`x{%}*Z$>w{fif6VR-IG*M8NnHMJ zeh7Z}`yYun2bjD;S~YsPdgeKESuRn#lc#Ak^a3?e-2AOuzz~_ADcy9?AtvIT4Kha} zrmnQtwHnuu^806h#+j7YFP;U7AMXl)gAt5rR#t#>QUtff>}W++XBZ4dq1QM(z`I(O zlpkG#6lNx*<*R#1tb*o1uL?V3W9&SddStxwq0S5X_LBYl=ZgbE?UE;lFDz~0xDWIx zj#;Jc-|o~#llrfSB=VFL%89s)<$Urd;Dlyu2Rs5PF5Sv3OT+!qq=)?-Eakpo5SQlmrV^Wp<@N?s<$jkgWyo&3O3e(bIpAJ;<&bB_00!gUv$ zdOL2OP(8~1s?zMj96MONV&`Mw1sfg}Yh9N|3UetLBLihNml-XnEJmXNtLsndXva=f z=x#lZEI5Ncl7HnB=23KNv}%|fiH90O6iTSI6RC7<6b!(6J175ow9yc1GI6GJ)6~|% zv_n#EY-=h{-JJSn9+nIH=*SsoL()lCXSKN@_3f~Xh30I$?P+w`9{}zvedjl2YoJ8M z?}L4=h0{i}9iI`EtX3zv+@>e%$zJ1GWj}vX-MSs6$dfZNFkjXe&t6V<@OCECdM6g0 z%T_1f*JsT$fedS4x7*S96BDIGS>;96Tg&?ub%#4rIliiy*Ptkuu34?7;GcV)kP!e%H#X1DeF-Rz2Fw5-f1 z?-q+3l;@`s>aieWBxTBb9{mZllxJ6nDMwG9@dY_zPoZN6PG>LgKfXR;sgam$iPszV z_Q$YNac1Q2q^Z3u59dVfiZ8oCiVLiqK&K$^ZQV}zC5lzNqMZ>1nz9{cYVyo0f6%ll z@rGUWdL?E3*;{cQk;_=)8nSZqovejnO9x!ng=nx~u!7oAzg1=G_Gkr2J;eTs)?ZD) z_+e4xFt$I$>-kw;#Z==?#`*dYk~GhxPK)k)bL^3Vm%&UuvURG^qX#Y&c(!a75h{eV zy7ZtjS+Q<<=wx42ROOYP&tfkmwP91k9#?M9obn8Ez;%QLtTL|T1DE#XUG3Abb2{|X ztD&+Z78Txv@w(4pM&AhDUX>)r3#bx%!jpSDcChA|GyAV0V#7Q@A*d8VGpz zg6XoQhF3`2a#)2vQ9{gmEL4MdxM(xWeDtTTq2wd!Of}Y1CVyhsCE|)PH>f3H9JOO` zB}c`gW7T5E1SiJ{v9%w)-u%2Rx(a#YT=GE+WL2oXfrN=lFOc(M?-o@o8R)PdV6i&; zRq{SWEBaUbs~RtsU#Y5vp~@io-G|MngZ`C&UNwNpqs!C#{8!Q$MK}*Ns(nVjI%N~h z?NQI?KKW&C;DY5yV}FB;{DMq*W-Gz|*;&|99-rmN_P{^Y17lvQVhS-!m5L=cF1~C1 zzV>1elvcvLa<~vx&2CSXlasT8Yv)$h$6@UK(I2UAd8*&S7eqZG)_AD8?L*W?Cm}ro zT~&3jXtQ`suQC3|LpIKNZHUMg#IGzgXdcZ;g&JLojaPL)^ZjGY(e-@7XBqRY`rNCBL}*RHcD_LG$PAP`#$bh9LF4F6GSlZdR4O zoo4`svi#Qi+c-V|Oh+(!%A=j4U*~6CA|U0G9&1F!I2THsCzAe5VGlRvCnEz-NN&ns znZ0H1NVV(ES-U^mh2gJTU6mz}E_^}x)jkWfM8&?my>;SZ<=7E(z3%(&qOutTy6iDI zy$_My-Ar+W=!ZpPwC7{b`?Qhz{Kfwa7uVPjq1r0*mgb#YY0OLuD|HBa_id+b*foCV z9JJ+qu|R-$!hj?n#fL8N7b1?HwZt4ae?B=j6`y{17e{Ns^(V&7DTfPAc}AIG94S8W zs$oW(obJ2~qV?7BK9=98ryeD-24E~fn5bS*=H5*r_Cm?%~*d~@I0;%>^XLq=9#l5Y?TxD0zrG;fgI;z^{F zwe?i&{7c0-y%ZU4_bcy`APC=yBkL0B7t500pcrAG(F%U&V$cD{TSuqmO=?t6%W1sg znzD3r%=o^Yf82mbzse8Z29`yU%Gj=a;UO)H62+8H?hPv4L~DB$!#mIXPzyIjgo7ht zHw^L?fc*@lT9zv4wGt};HL|F4TquI#<7nqftMVLIn@r@Ux%XEe-*ygL-nB(^!9WHy z%$PV+P(RRFWHMawzPP70Ng``S#UV$=`{jNxIg%60ybFPrP|HIDZ^R0n^x&)o5g)L7yU<+{Tn?1T=h}A!op7TH-?C#;fM8pynBrj350zBVvj%y{|EaSlnjxQ2D2Wv>lXe7AB>Pm_P0ovD<{>^QQu>ZN`i>}d!R zW^j|!-O~7qbTY)k%tWLWa^$)(;akaj+eF~74Jj$u(%Py%)r`)}c8#V6E3>Y<$CCTs zL~;u(u>$^&)^!rXLf@_8$6mV#OZ^{xX+71ZsG^>e&w6L(#zm=owh=ltAji)o z0QJ8&CiRND+rTE3h-^HWV8t9|8aq1UIqAOJN;_Y~2f*0HgPPBWe)gjjNDe`LZ zLG{^g-$9MiA1EO^@~}Gtiuz+g{u#x4E&Iap6+v^iS9;>O3%Xhadu|oOu+5yvfYSfK!t;_RHe5mBDjf<1IWrmOxwM@16spFl+c}X4E;PRr- zOXC+DPEQ#QwC6`mSt1yh`7KMSd|4<+ zQ9Efc9m&tsMsn!>*Y*pe&Ud*nknAbwjn4>%ip`D_2dTENVxtxzjKUawPgCMuG>>#Q z!8->v?P;|R18KAAoh+x~OUx6LS_wD;C&h{`$Sr}M4L~0_*B}Vyt&M{RGRE^h0@(PZ z?rYAUm}+J!qhoKlVDO0jtveqjT$897Ma^AjNf%p7?FxdL>;U#1z!q zL07b4737&TH;@IlH<28#Kx%=5*x}S-+3vUKlvJGXJ}MeR4M=Gw}v(r+_FcKLCtX7?_RLaVI6(NwCmgHtXRCg>#cgu?3381wPU5+CAi zP>zAL1TB!!cW66SLeT9IUAlZ>QC^Pq&w6r8G?GzdSnWi+&p}7t82=$fdv+3xCn(?^ zNjPo)G7Z+fapU-~o}tO@6wCtMy|Coz)lG%=)AGekLxJ+3ZR_rfPkH@f)E4n-Kr7e1F)05B?~Iza(aTRxH?e@MPv z9~Qb<1M205!W8ajqCdvXs#BCb z2V87yEF3&sJiPxFK9CTIk57P)hetq6KtM?J4|qTlQeq;K|Mvem`Oo}6tACRS9}oXO zjsG3~4gkpUF#v!8EDUx4COHNcImX`+z!Lxf0~_nV>;8Y>VqxRpVd4WZ00jT!N@M^G zOzeNa!o|VD#`>p(fr$mc#v#Y0U=zcmR58S7xAmqHj|5V4sAiPWa6(!JC3emT)Mn4^ zqRRi-GhzTR|A%`37B&VZ4geSLpOBXvfQgBLje-52%Ktqd1CtyJ`=4tS97=XWsz_V! z3~|-JYXBmwe}2fZ$N|p)^F57ua0l!t%=o^ur^YoUY0eGkD%K=;Q;&*(5;Gf#^B~wHjQFjbeAbnboW8+9(CjKV_Yni_G@^ zs~~qO{__}ZUinlADR??N)wZ5Vtip|oUevViLu!xG%Yl{Id~aLXleF* z&C+5Yzo+PhgW(yd?~nZR)i%Z`56NF?@ifxxBY$*WQ3Y&h*eeBbe>QgG32j(<>Q3$A zc72sh>w`Oz5))FGT}Z4qCW5zp$RU}uh9+w)$1G~*#H!?c^+l>vrB}=L&

G8s=CH z0q3Bq4_MuT+ULqCEW#3L|u<6PSo2MyZYcUhF{6 zA?83A1t6w)ig#o$u;8z>B%q((<=vZQ_*|=(V0qSPd!aEk673>b7{I78v!_n(y!Z@Y z)~L0ca1Tl8?yySOJnz(#aK6iNSoo5r80s|Z;w6kM&h88wVO(--Rr0$|tcdn!iK(xm zZJwg#vU+O|@**B<(IM~H9dKo45~`h`mcGzOXfULK66&-cbh!;jUQC9AL~G}VzS3Z@ ze{a5yEQx*QRR<=RL@&VGuT%1x65R&w(^i% zU#IC-Pk8Cl&sr-*XvHb>O>LRMMOPr%{eayth z2iV05bnxs5f6izUE0vko1w(+sP&eF-BInu+lS;~#_C0EkP)#t%koLpRIYqQc7_eJx z*7am>uy$SVJpXvX)BB0=Drns*%>KZoZ&z7ywg)JBU44Wv$bbYpX<~NmEw9GCZDLhUE%I+2VU9BK&-tpY%j7F; z-ax23VHQt5%5l1Mj>~A2m3!kg$adUr7|(4qaEgajSS$U)Lq=uRu!adX zybB55?DoU!?>uE(Ie1E`FOFC#cd0`4+i@6o{fee$laicI00vl%ay@tdBKfDnckUYa z(d|T=eLbUUf5|o4B;*iJZ0j$8oLsz6_~y=!Hmcw%9==#TK(%EZh3Aw`LDEBB={aOP z(BR;^^p$An*SvKcS-{f8arhE*uY|x%>dflMN>;zyA<^?pLG_amI?x8w05Q_pNG8|n zC$Nl-Gh{H(cTkP>t}---}P@2-nzuT z7?VXLNYA7@Sx=V6L}d8ZHP7pY6o#nVU!g!yMopt{dB!IYQpD5eaKDwY;ai2BJoO4h zT@0C#kCgX}hy642I<70yk zoXFzbg(%~gKywTUr z&3&DG9LJ<@)!ap6g-}SH?ttqKsGFwm)mhAj#~aWaN{U#Bwz=*FuQmSOEP)Y+--EzQ z%L!Ax4E@{Mp^fY6FjR8Zl(~gFD#h~(WlgNbB`7NixO-CxJTD}vAv-(W=aSn%ypRlR zZwz-1R1?a_xfW~hW_lQtL`g`trXzKK1V+@y^qJCDzbQ)!O<3UIGBlS#1J}2lkqwZ9 zuNiI#x5kihEhY6Tl3K<*3@){fXx*~H+QT|A{@+-Jb$HstQlGvfW8eFWE^zH&xvUJJ zqJyrXuaorF0T+z8!sf8a~r+k6S z_9%;oatbO~AUYDR4|=-ugHA%30&p0O`3-39M_UZtZng2T0c!JV|5B)e zYq|jv_SZUj%t|kF7ztEv834@jc52%_%lDI!?&__Oj%Fso~K549mG; zaxfAt`h@4V5#LnrejuRr1$V}AsMnCsngkdK*=5q#9Z|JQ^c-3&aZj?`(0sy}w9dB7 zd561dDs)BH{lK&Pc_&q9yg}MXCp~LrR75mY_jfdQ7akdZmUYb(mffcbnX6t+v+7$O z&OnWd8hzPZ1_G8mYw=+zksdc>mu}n`>zQM))C04A0q(;RMC%&$QbCmQ(t7C_kkm({ zSvOlBj!V?04VtxMb@M4|sCBuG81$>KoY1^#Pl$ItDL$}zs?zJM3YziRCaIm++8u*s zr?(J_epXT$^vr+1#`5`7)cwFh*WwNzH~8?o^wNliRpu79qh!5nHiDOF6|5h|CheFd zCurf#ld}!cZy{&X0UHaWPE^=u*330X9a+uz38}X!18NsY$%8Qb2sVZ_+OfY*WNGXJld7d4PUu?{UY(^h`dUi66%;WtL8w+W~Yf~F&&NtdHZ#K0m;DaJ1D+30%? z*JyRxrz48tKj|-U9a+$kHNCp!D8@4ZV14Hcfez0%^c`K%hsiP$3EqVQ1&)WVFn&I@ zcPN9X$ZqVPzH3|$N@tn=#9%1ZU3yV1lCYTdH3zS8qFKL2o&4MKo1e7$w9Q-!aSyTu z?s!%?j=+31*MHSXHKM<-T0+9L-b3s}Q0(epMnvNy2ll5jze(}oOx+}*>ooZ{L2T)} z2vTOSkFoH8*N?eO2`nnVUzA_-TWhKbb-RQU96azEHMQI25-fd?Dz~xkxqW5hMz8Mw z<%>T*{oYH`IFCZ486r*ccHVK@z1C^k&S~J|xwxlmI~QhsNg+OY)r~E$IN&Fy=@lOT zeOHR8MKbEmI#Z_sl6bqH#DsbHni{$#0}mJaeU;p}Vu4!b<#c#&C7K#;^m`~f(C08L zWkjl02d9dgJiBE4yb}cWW=^^-#yYD@$$;$$wp#ie=hEvR;!vY^EaC~8Q(Vtn(q2EY zc2!vxEVRV5+ZdrM>MGBf&fTQ_$nYv}Exv0iGCQ4?Jt-wwbMZjRj~H{_O}#N{Zry`LfWxe-sf7qlkbt~;G&L|!aUuN%}!=>ZG z)}GX?+M1L?auCZ;(W`4-T6!5_Q6;A|82%UjtD2E{MxH6Z?7XV;zX1HcbH~+s=oX%Q z;axcUA0p@PQoo-}Tww_p{{?IiKWUH{&x7DY2qf85>9rt_e6ALa$_k?mV?{tI9_c;f z5c|xgAKVODyr#$zBj4odxv2DctMqJ#PK}k;@r6E+^gt0gVpo&?ZNBC4 z1yuY})vC9aP<1|?H&bTgN_5ql?AV|Fhp}`(iF{iqPUc|e(k`y(GLt|a2I3Ps8#SEt z6q#YluCDb6C*c!RAvi66ai>dAbwkhA}2na@2kzH+gN3uq)}IY)bWw$E_V0XgL)0`lm6s3VJIL)8X^`%G z8?+oXG23PGi2htaznam9tUN7jxk{o**m>&K%{^{Dt&qLCe;hNHla({zzMb;&>dDVTUia!qZidD3bz~rmn8y z|2<6n?3n=^U|xyZR&#yfmZ|)cVf5x*5Z)u(FlDdu;00UFD$adlH2dR^QqqkuTYOi` zR?CMJmrKaXl!#N;!bubrt&g(kY?1m9lVM-&mKn)V)-->1QYKAOWt#Kg#Lw6wFXr4J zNmPTc=Cs@^L*Fx=ch)p>jDf@eemS`84pOEkJoX?lU z-26b#(D#di#_(B3Q)@$Tp&9GQrd)Z#jS9=J{Jsi1lJr->7xo32erm}th#4@<&%#YL z5c>66(^bxsYA4yeX4WG~qgy*KPu8ln=FCTXwLPqTEM=LiXRBBqk)LhQC;=;rCZdNTagxKfZELT|%fZ(2x!j&)ujjEAc#!vqYvcoUULSu$)&Ym+I4^78J zVlRmKJW$6JKcjZ^HOSs)AwT>DOw#(arn?G6_3ZT2tpvPFoJ4QrWP?8?X{xsK!C>ue z{35ThceC~OdQ5^pJ_)E3JQ;u(-a4i_cbT#9qdg!B+`L84-xQalC$(r6mgO)?L?_8` zYj{p;e`5EN>vH&}p!BLyz9?0quDo9ywu zSWXxQC(f~SKN|HKErw%owkVDY`IvZ5EWqR-ed_H+)DDXfMgWW!1!-#mw$iY&}rSTbO;ltCX*&7F7h$?Tb%>F2`!puEm7@W=M&h$MhN07QLItyNip7Ip>G6$JEYfBTY+GnuIQ9U?puo{ zQp@K}T8gL~$X|e5+`n%E)pl%>*{179A=%5js>%)Hly~-3K7FK!J%S9QkG{UguJ6Tv zw_Y`WC$LXnOH?+yMmhH<_7ks^3_pGKX*Wc*imt$1{8EQ#QsG2%bGEiHv%qqR$|6;C&HBh=jfa<0rL7Vi4G z8nES^J-YKRp!8Ec$JfO|p&mLDCmSvuftDraT{)U6$3j@BKu~OL7YfX!wO}no@5#ma z2C-^1t=9<$l8sd^8C7v^3CiYsA$62U5@_NUHDZ&O`iZ21s%}A2qpCR`3;$>Ar=hQ*ICPoNr`(|I!sPMp zmE_LI{QSxm*&!og1O=7C;JO4ws;%E;P8Im2mhlzT3WzJh+TdROVl&$_mqx_-YVEqS}Q zKRre7>5@x~HzG~EEfa@E*sis+YsX71u=`U&Q7s0RjRhr8-HsWnnH3xYE)4-Lbr&1Z zGM;RPd98`J&Z5*@E!I7qwj-dIaGJm3?($lD)^?2Xm7 z(&sd;u__OZ=*o8!i=%`uRsuVr_#Z5*cS7uoMn88SOb$`pt2PE0(kp{_HU&00cL`GI z3dH5Azc~@07e;#GRe|4qegw?nE*l}`3~i>x>*_1^3O4GkItNjbdhQ=Qw_y0Iang$` zv^?Cf6_$7&661r7yaI}}Nlrl=Cohu1ts38@^ImJ>UVkH5dfAP3Wr7Zd0*J8$KLVSt zoq5CkO6FeRSE}AQC8LocG{-!jFTmKcJe${5BY`0#Qz;{RIi5|mPS~NKqV1hHJyd6! zJ|N;R;Gk+;o&wLhnW?Y%hcF?!;F*3;Q45%JVl_NI@b_(B(W7&K4s8~Pa+(x;W5U_tF z^r^Ydq3ZgFS)Ast@xNRKWdPwVQq+bAl1i`*^3RuQ=eA*qWtVnn|Cw_ z5UN#n*+ShR>q+~3SgQXD?or)4J=@MTL+zBpL&hGWV4Ug%<|R`%c$PhM4*esD`LZ`YZf#kD4Ht#O%0687$CTVnQ5NFmPd^oFd^QVBc$fgc zQ>>2<3B4&^ASTjYT3|w~SM8=$p6q|881Zn-cUr#N4a@J$jj3K&?sEdQto$B<`PCdR zI<467$V_TU1DSW-h>cvTt7LRsOBXJuP-+v(7oFi|A>_K8v8~hbU%lP*ywD|*j>)}K ziVqZP2GdNA>THe*g=8w7l}25|u?YFZXrIFn`1Q;2w`Ly(IoKFe~&4PO0gH!xxLD^Me6 zPU(FyGJKPKXBel4*rdYf14D_HPD7fGbW9^sid}u|5YYc zHC4@Lf5!0Uh&opeS>)(`kgTd)qKcMkO3(F@(6qv|0NIX7bq#H?9-`FTJbP%av0kqv zn~!IHO(6Bjj(ny73ptm5hzrm?vv-vd*il)#Lb`FUMpwN7FWS4P);oJFk>H8_Mw4rn z>)uHCt%akyh5W@R@30h=;=?b|I-4@E@f@CRXOev^6MrDquDlW(5)85<@NGlVCt4*| zp`|!vuE~_QKp%QF!rtbEj~?sVZ8AN&zCD=7G5?eS>>Nya$dCI{XVKfhB*8K}Wxi=+v@aozZi6^*(*z;BG zAIOh`3?SjxKsSF_&55cEO?LnnpUgU@()^@`z%FTYYu?)uQSPeBY?`@r4?+84LN+&! zG6v1T^Ad{1ARd*1DiGh=TS{cBrC?ze`@78y9^e31kPwPwAT$y;98%=6YQ9LZ5xXy-mu3`Wc$Zg4P8tX7!OS!&yfH zJdq`-Xxek@_wlm1kipZ~ovk!*vEci_%($V(U=7%j|A!O6rgTADYUOQgjM8;R7@>v7 z`jUJ{i(BPQVhOzgef{EEy|A@8^uiULo0D$5rPf!WtrqesLEib@PolD}=z)+_=6q-- z-FYr7WXI)JhN3P?cL5zimlbRID=ERrrmzb8JH>|?s4oJx71YGA!=+ijmuAEd=eqPS`?}z9?}1Y^&&T@c z7WylNcY3i^IH6H&WR*aO8A9pPT9gpOZ*5z%O41@4?f%`ntw%R5B8oVkbx?*hs5mA_ z^YZg{kwBd2sU5s^sD3iH+R0q?O`fEcIdLY*?tW;5UEPSH;y#JaMDS?!N9pzNq;~R_ z0as~tiRr^9QQu)dr3ERJCySNr^iOSU1$zYPUrfmS_WKKHpZ~M+D%gV4`Crc=;2#q- zLDOaB!)(jlb0TH1tapF?ilZy&!QO*VU^KlyEcw)l?t$#!i7)@qQt-p1U+j8ktY-8< zjyK!RHqZ~HyEV5A=|qu^_i%ruSv52?y~^zhGueTcS@kku1k0b(7i5Y~ovX z&h*|o7(B*W$e+zu{i85^V3f&qq7xM8{3RA!FY*_}M24K4{ku<@fAyZTKbsl+9+I&% zgEwL=H+O5Q?LU#r_$>mYB|l;ZDe9=2Sam2zzL8R|o2ZPtVN?Si>5TjJRGD-0J>myN z7VpM7xx!s|5n6Jd3w}u&DEc)iHYLlqc69!84?@Rn#NsA$c?%NqcBb3Q`Jtp&V$H!4%L z{CP3`Q4-q@mpm{{UiG&vFs^iAm}e( z$LL~8x;dBb%c1W{KAy$|o4q95?*g%0iI>4Ah(<8<-+?h1cZNMwR?(IYYBHxOP5ia((+Zy+qTWKb#AE z%0>=VIdMq4IqO#&gddc)RCftSgRFa3AKsT#30@drT@h zPtq0B``x|#rNJtnG<_6E25Y{OoP$m=-=x5=Y$nPeJITr8n=#=DJY4Pfu>5<{PR_bY zSti>zauX2Zg3-tZh~NH+JIYlw8;jn2>#!>s8T?dSe@V zS{;ej{V-_4-|*+=zKCyp^-ckUCN1`n9dh8()&=g^ef^`}HCFKZ+WYv*j6_=bc|l!R z&SpdvD;ayh>r7V&Z-7DNzNSs(_kUSUlxU?Gp0W78qC)a0Dye{+aLU*yZqe77u-t@2 zDl_`RjiT*ZWZ1f8y90XiCDB$_7=5mgTFvgazY&(MUd4>+vSW&b_ zh41YfErMjot38rY)ULQ0pRMW6Aq~T;?+jr@Nh_tr6%MlcyEJ+My5?{3E#gY^gx}A7 z1Ih_Q6=;IMe8EDBrb^Gnzs@{KZ1a>7E!zD(BF(yMQ{S}>AJ9l0!*TYnspj{@;f-jr z+LlGVw;Ma8*&_1J&-6aDI~W?B6TzvimqZk*d(jtJ=>R39)gy3j7ogh&DP?(YlLf8ZdIq(HpbnWVZ-D!4!389dzC-#kyk zUGXA(9_C^Kk)mbaevG4u_C_!r>`+~+CW%fC<-@gaQMFXm0`Paz$E1DqaHTd6aFMcm zM1#*saTw^?CZQNXRo&nO0)5G(onZ3Ta(sdJk7UGM{lM#f$=S&j;##hNc`sqMg$Lt6usxW?;~RZva-_Y`Kx($ub-|vPna?BVhNO1jPSl zNeuo3q9Xs~oJ)L{r;^Oad}%7-s4HLICH*J5Uxa5zQ zsNBx12yjQ-Xx<7P>rJ4HlNT&ESMGd7h0- zJ``px#Kd$-@iLAQifGmD$X$2bKXC*pMA!#r$unmgi1Nrq^97Z+R)4KpHwhDQquZDZ zY1|>s4BGgd&j;K2F32ATIhKe>-*-0!Kn{S z@fP?baN2qD4B*}jW|y{8jPb3h<;-}x-Xz95kBPY@YGGx3Mb_=TIgT4Tt(3J`Agp33 zO*3LCLCC*4cHoRi{9x2k)rBDW!kY0hg=)M_yUo#=?vySu&T$LoS_r3M_@OW&rCOaY zr-4oS(GMo7uqNP6I9$-!`*S3Ju?&8S-0tXP%8aX|~c8<;id3Ho)K#Cz3E(L=ye zPkXlCFiFkrerJID_#*Ef3ngMY1_pl_Zx$!ylBa_4cK)PB=*Nr9*RkNv=W{cg!@(Q} z%!BdhCUS;CTurNm7z_m1B;RlIkAHM%0G6A6`Z2w(A`CjMlUbu`m?f22G_)V`TiHZt zEUsX^QM`5S0IbFNq99Y6xxJUrPMEb@RIxz?q&t&=6$spZJwrAOIIB|}N!mYS^GcC#lM-VG^>%LFBL9s7%P1Vgj&K7!9Tk;VY zK&ZlBpAES-MvqDYR*nhLQ~Xvp6PKLMmC|v& zB;p!&F~_|6fmoaxkO&@p88-v$YyWM%U`*~Uf z$CPu_e*uZr@^gq#VzyU#a!{^ktsW(Y!e}zRJ&-5Y)68ac~)ds8ujXgwf}zK$gc z9C>F~~R9 zg2EOU31KJ=V9bPFWrI-E)f}ZqZB7-V@ihZ;K>XSiy!uE;o~ndz^BhU1WH?^{QXKX@ zFvcSzPWWzr;(%TPFILUkIslOp^`@NwKl61L~ahuPp}}ud>|o*joHH{&k<_#J3v^Y@O)Q|9ZJ=bTKX~Z_UrO z=x5KMzOCrsiA>5xUcJ6$F>;ft3vQ~Ms3EAgZ!g)WZ?**Z#;E>Yi9%2weT4i5OVDia zd9RzhOBwGNtk7eyO~)d&a!hybT}D_KDgiOEQY`daQ+ERMsXvPMqI1O`SEDQ~P77$b z4D%Dq%?Dtv@E|)9p2cW&#QY2$s;#aH_G`XL_|?$*TQI?e1j`H4bBS3SeDK7P5me0Tv?1-t?nuf`a>KaIVw^JGTt+M4Cw=xWR3*u5&kT&Rn;&9k=gQP&Q7{Oe zQ87nJ`_;|YC&VTN$L@$@(_vSxWM%>mfk@0pH_M?Tb?y!iPv(~|uuLuZb?@;9;h37~ zJ1+A}< ziZz_?`o%-X_#h^22z8RTEigDu{mCsSN>CX8yL|i|Uo&l2Uk7<{cO5oND0NK}jAKKz z<`O1F&i`H>(wE#?BX&IRhJU~Ol9zkzw|^R}EdYCi_=Ei@Wi#F})81!1?p*a-O^uZo z&J!N1tS`()^@4xN54#rqT5*-MLsd8MVPVoeRY} zas=qeHQB^9;dZAhOmbM~+-!7eu*e!239Z!O5-Wlmkzapk^vcveNJp;F`TC{R?nG?# zMp{lUI+?b1PSIjOhkGv&ScYm z-{m=~L;Md1hMi`db|ns4bEqIAD!mVq$yCL};~c102rIiKhR2MI@5JrBIu70Hd_2QS zc;gjrn9^wx{EYW&irs+2uZ(7%EWY@hX6gDM#L#wv28Xx=r&$uuwODjx&V)CX=ohWO z0CuGwW$yc5$vNOgoVc7hcCkLRhwkbT4Wd#&+95?){yCCE7ypwR)|1vDRq>ToSe{oB zj&pVumN(qa@x^zm&VdrvOUkfFMq(X)uFN$fpyA<9LI8=!(%i?OYxm^NZq}>5b4cFa Jr?$VV{|7i+_m}_x diff --git a/vendor/cloud.google.com/go/vision/vision.go b/vendor/cloud.google.com/go/vision/vision.go deleted file mode 100644 index 6aaabed83..000000000 --- a/vendor/cloud.google.com/go/vision/vision.go +++ /dev/null @@ -1,356 +0,0 @@ -// Copyright 2016 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package vision - -import ( - "image/color" - "math" - - "cloud.google.com/go/internal/version" - vkit "cloud.google.com/go/vision/apiv1" - "golang.org/x/net/context" - "google.golang.org/api/option" - pb "google.golang.org/genproto/googleapis/cloud/vision/v1" - cpb "google.golang.org/genproto/googleapis/type/color" -) - -// Scope is the OAuth2 scope required by the Google Cloud Vision API. -const Scope = "https://www.googleapis.com/auth/cloud-platform" - -// Client is a Google Cloud Vision API client. -type Client struct { - client *vkit.ImageAnnotatorClient -} - -// NewClient creates a new vision client. -// -// Deprecated: Use NewImageAnnotatorClient from cloud.google.com/go/vision/apiv1 instead. -func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { - c, err := vkit.NewImageAnnotatorClient(ctx, opts...) - if err != nil { - return nil, err - } - c.SetGoogleClientInfo("gccl", version.Repo) - return &Client{client: c}, nil -} - -// Close closes the client. -func (c *Client) Close() error { - return c.client.Close() -} - -// Annotate annotates multiple images, each with a potentially different set -// of features. -func (c *Client) Annotate(ctx context.Context, requests ...*AnnotateRequest) ([]*Annotations, error) { - var reqs []*pb.AnnotateImageRequest - for _, r := range requests { - reqs = append(reqs, r.toProto()) - } - res, err := c.client.BatchAnnotateImages(ctx, &pb.BatchAnnotateImagesRequest{Requests: reqs}) - if err != nil { - return nil, err - } - var results []*Annotations - for _, res := range res.Responses { - results = append(results, annotationsFromProto(res)) - } - return results, nil -} - -// An AnnotateRequest specifies an image to annotate and the features to look for in that image. -type AnnotateRequest struct { - // Image is the image to annotate. - Image *Image - // MaxFaces is the maximum number of faces to detect in the image. - // Specifying a number greater than zero enables face detection. - MaxFaces int - // MaxLandmarks is the maximum number of landmarks to detect in the image. - // Specifying a number greater than zero enables landmark detection. - MaxLandmarks int - // MaxLogos is the maximum number of logos to detect in the image. - // Specifying a number greater than zero enables logo detection. - MaxLogos int - // MaxLabels is the maximum number of labels to detect in the image. - // Specifying a number greater than zero enables labels detection. - MaxLabels int - // MaxTexts is the maximum number of separate pieces of text to detect in the - // image. Specifying a number greater than zero enables text detection. - MaxTexts int - // DocumentText specifies whether a dense text document OCR should be run - // on the image. When true, takes precedence over MaxTexts. - DocumentText bool - // SafeSearch specifies whether a safe-search detection should be run on the image. - SafeSearch bool - // ImageProps specifies whether image properties should be obtained for the image. - ImageProps bool - // Web specifies whether web annotations should be obtained for the image. - Web bool - // CropHints specifies whether crop hints should be computed for the image. - CropHints *CropHintsParams -} - -func (ar *AnnotateRequest) toProto() *pb.AnnotateImageRequest { - img, ictx := ar.Image.toProtos() - var features []*pb.Feature - add := func(typ pb.Feature_Type, max int) { - var mr int32 - if max > math.MaxInt32 { - mr = math.MaxInt32 - } else { - mr = int32(max) - } - features = append(features, &pb.Feature{Type: typ, MaxResults: mr}) - } - if ar.MaxFaces > 0 { - add(pb.Feature_FACE_DETECTION, ar.MaxFaces) - } - if ar.MaxLandmarks > 0 { - add(pb.Feature_LANDMARK_DETECTION, ar.MaxLandmarks) - } - if ar.MaxLogos > 0 { - add(pb.Feature_LOGO_DETECTION, ar.MaxLogos) - } - if ar.MaxLabels > 0 { - add(pb.Feature_LABEL_DETECTION, ar.MaxLabels) - } - if ar.MaxTexts > 0 { - add(pb.Feature_TEXT_DETECTION, ar.MaxTexts) - } - if ar.DocumentText { - add(pb.Feature_DOCUMENT_TEXT_DETECTION, 0) - } - if ar.SafeSearch { - add(pb.Feature_SAFE_SEARCH_DETECTION, 0) - } - if ar.ImageProps { - add(pb.Feature_IMAGE_PROPERTIES, 0) - } - if ar.Web { - add(pb.Feature_WEB_DETECTION, 0) - } - if ar.CropHints != nil { - add(pb.Feature_CROP_HINTS, 0) - if ictx == nil { - ictx = &pb.ImageContext{} - } - ictx.CropHintsParams = &pb.CropHintsParams{ - AspectRatios: ar.CropHints.AspectRatios, - } - } - return &pb.AnnotateImageRequest{ - Image: img, - Features: features, - ImageContext: ictx, - } -} - -// CropHintsParams are parameters for a request for crop hints. -type CropHintsParams struct { - // Aspect ratios for desired crop hints, representing the ratio of the - // width to the height of the image. For example, if the desired aspect - // ratio is 4:3, the corresponding float value should be 1.33333. If not - // specified, the best possible crop is returned. The number of provided - // aspect ratios is limited to a maximum of 16; any aspect ratios provided - // after the 16th are ignored. - AspectRatios []float32 -} - -// Called for a single image and a single feature. -func (c *Client) annotateOne(ctx context.Context, req *AnnotateRequest) (*Annotations, error) { - annsSlice, err := c.Annotate(ctx, req) - if err != nil { - return nil, err - } - anns := annsSlice[0] - // When there is only one image and one feature, the Annotations.Error field is - // unambiguously about that one detection, so we "promote" it to the error return value. - return anns, anns.Error -} - -// TODO(jba): add examples for all single-feature functions (below). - -// DetectFaces performs face detection on the image. -// At most maxResults results are returned. -func (c *Client) DetectFaces(ctx context.Context, img *Image, maxResults int) ([]*FaceAnnotation, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, MaxFaces: maxResults}) - if err != nil { - return nil, err - } - return anns.Faces, nil -} - -// DetectLandmarks performs landmark detection on the image. -// At most maxResults results are returned. -func (c *Client) DetectLandmarks(ctx context.Context, img *Image, maxResults int) ([]*EntityAnnotation, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, MaxLandmarks: maxResults}) - if err != nil { - return nil, err - } - return anns.Landmarks, nil -} - -// DetectLogos performs logo detection on the image. -// At most maxResults results are returned. -func (c *Client) DetectLogos(ctx context.Context, img *Image, maxResults int) ([]*EntityAnnotation, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, MaxLogos: maxResults}) - if err != nil { - return nil, err - } - return anns.Logos, nil -} - -// DetectLabels performs label detection on the image. -// At most maxResults results are returned. -func (c *Client) DetectLabels(ctx context.Context, img *Image, maxResults int) ([]*EntityAnnotation, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, MaxLabels: maxResults}) - if err != nil { - return nil, err - } - return anns.Labels, nil -} - -// DetectTexts performs text detection on the image. -// At most maxResults results are returned. -func (c *Client) DetectTexts(ctx context.Context, img *Image, maxResults int) ([]*EntityAnnotation, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, MaxTexts: maxResults}) - if err != nil { - return nil, err - } - return anns.Texts, nil -} - -// DetectDocumentText performs full text (OCR) detection on the image. -func (c *Client) DetectDocumentText(ctx context.Context, img *Image) (*TextAnnotation, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, DocumentText: true}) - if err != nil { - return nil, err - } - return anns.FullText, nil -} - -// DetectSafeSearch performs safe-search detection on the image. -func (c *Client) DetectSafeSearch(ctx context.Context, img *Image) (*SafeSearchAnnotation, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, SafeSearch: true}) - if err != nil { - return nil, err - } - return anns.SafeSearch, nil -} - -// DetectImageProps computes properties of the image. -func (c *Client) DetectImageProps(ctx context.Context, img *Image) (*ImageProps, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, ImageProps: true}) - if err != nil { - return nil, err - } - return anns.ImageProps, nil -} - -// DetectWeb computes a web annotation on the image. -func (c *Client) DetectWeb(ctx context.Context, img *Image) (*WebDetection, error) { - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, Web: true}) - if err != nil { - return nil, err - } - return anns.Web, nil -} - -// CropHints computes crop hints for the image. -func (c *Client) CropHints(ctx context.Context, img *Image, params *CropHintsParams) ([]*CropHint, error) { - // A nil AnnotateRequest.CropHints means do not perform CropHints. But - // here the user is explicitly asking for CropHints, so treat nil as - // an empty CropHintsParams. - if params == nil { - params = &CropHintsParams{} - } - anns, err := c.annotateOne(ctx, &AnnotateRequest{Image: img, CropHints: params}) - if err != nil { - return nil, err - } - return anns.CropHints, nil -} - -// A Likelihood is an approximate representation of a probability. -type Likelihood int - -const ( - // LikelihoodUnknown means the likelihood is unknown. - LikelihoodUnknown = Likelihood(pb.Likelihood_UNKNOWN) - - // VeryUnlikely means the image is very unlikely to belong to the feature specified. - VeryUnlikely = Likelihood(pb.Likelihood_VERY_UNLIKELY) - - // Unlikely means the image is unlikely to belong to the feature specified. - Unlikely = Likelihood(pb.Likelihood_UNLIKELY) - - // Possible means the image possibly belongs to the feature specified. - Possible = Likelihood(pb.Likelihood_POSSIBLE) - - // Likely means the image is likely to belong to the feature specified. - Likely = Likelihood(pb.Likelihood_LIKELY) - - // VeryLikely means the image is very likely to belong to the feature specified. - VeryLikely = Likelihood(pb.Likelihood_VERY_LIKELY) -) - -// A Property is an arbitrary name-value pair. -type Property struct { - Name string - Value string -} - -func propertyFromProto(p *pb.Property) Property { - return Property{Name: p.Name, Value: p.Value} -} - -// ColorInfo consists of RGB channels, score and fraction of -// image the color occupies in the image. -type ColorInfo struct { - // RGB components of the color. - Color color.NRGBA64 - - // Score is the image-specific score for this color, in the range [0, 1]. - Score float32 - - // PixelFraction is the fraction of pixels the color occupies in the image, - // in the range [0, 1]. - PixelFraction float32 -} - -func colorInfoFromProto(ci *pb.ColorInfo) *ColorInfo { - return &ColorInfo{ - Color: colorFromProto(ci.Color), - Score: ci.Score, - PixelFraction: ci.PixelFraction, - } -} - -// Should this go into protobuf/ptypes? The color proto is in google/types, so -// not specific to this API. -func colorFromProto(c *cpb.Color) color.NRGBA64 { - // Convert a color component from [0.0, 1.0] to a uint16. - cvt := func(f float32) uint16 { return uint16(f*math.MaxUint16 + 0.5) } - - var alpha float32 = 1 - if c.Alpha != nil { - alpha = c.Alpha.Value - } - return color.NRGBA64{ - R: cvt(c.Red), - G: cvt(c.Green), - B: cvt(c.Blue), - A: cvt(alpha), - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml b/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml index 5ba4ffd32..33ec1e653 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml +++ b/vendor/github.com/Azure/azure-sdk-for-go/.travis.yml @@ -1,7 +1,6 @@ sudo: false language: go - go: - 1.8 - 1.9 @@ -16,6 +15,7 @@ install: script: - bash rungas.sh + - grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee /dev/stderr | test -z "$(< /dev/stdin)" - test -z "$(gofmt -s -l $(find ./arm/* -type d -print) | tee /dev/stderr)" - test -z "$(gofmt -s -l -w management | tee /dev/stderr)" - test -z "$(gofmt -s -l -w storage | tee /dev/stderr)" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md index 7f03f2cf5..f0753307c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md +++ b/vendor/github.com/Azure/azure-sdk-for-go/CHANGELOG.md @@ -1,5 +1,52 @@ # CHANGELOG +## `v11.0.0-beta` + +### ARM + +| api | version | note | +|:------------------------------------|:-------------------|:------------------------------------| +| arm/analysisservices | 2017-08-01-beta | update | +| arm/batch | 2017-05-01 | update | +| arm/cdn | 2017-04-02 | update | +| arm/cognitiveservices | 2017-04-18 | update | +| arm/compute | multiple | update | +| arm/containerregistry | 2017-10-01 | update | +| arm/customerinsights | 2017-04-26 | update | +| arm/eventgrid | 2017-09-15-preview | update | +| arm/eventhub | 2017-04-01 | update | +| arm/graphrbac | 1.6 | update | +| arm/iothub | 2017-07-01 | update | +| arm/keyvault | 2016-10-01 | update | +| arm/marketplaceordering | 2015-06-01 | new | +| arm/opertionalinsights | multiple | update | +| arm/operationsmanagement | 2015-11-01-preview | new | +| arm/recoveryservices | multiple | update | +| arm/recoveryservicesbackup | multiple | update | +| arm/redis | 2017-02-01 | update | +| arm/relay | 2017-04-01 | update | +| arm/resourcehealth | 017-07-01 | update | +| arm/resources/resources | 2017-05-10 | update | +| arm/servicebus | 2017-04-01 | update | +| arm/storage | 2017-06-01 | update | +| arm/streamanalytics | 2016-03-01 | update | +| arm/trafficmanager | 2017-09-01-preview | update | +| arm/visualstudio | 2014-04-01-preview | update | + +### Data plane + +| dataplane/cognitiveservices/face | 1.0 | new | +| dataplane/cognitiveservices/textanalytics | v2.0 | new | + +### Storage + +- Support for queue SAS. +- Refactored GetSASURI blob operation to be more complete. +- Added a SAS client for some operations (`container.Exists()`, and `container.ListBlobs()`) + +- [Azure REST API specs](https://github.com/Azure/azure-rest-api-specs) commit: 0c2a12b50d8598f68d6715b507f7dd53e163407e +- [AutoRest Go Generator](https://github.com/Azure/autorest.go) commit: 678110f012c7cde6528a1e61d125bdc7ea636b7f + ## `v10.3.1-beta` - Added Apache notice file. @@ -54,8 +101,6 @@ ## `v10.1.0-beta` ### ARM -| api | version | note | -|:------------------------------------|:-------------------|:------------------------------------| | arm/recoveryservicessiterecovery | 2016-08-10 | new | | arm/managedapplications | 2016-09-01-preview | new | | arm/storsimple8000series | 2017-06-01 | new | diff --git a/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go b/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go index afeff13cb..bd92b5b01 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/Gododir/gen.go @@ -1,5 +1,19 @@ package main +// Copyright 2017 Microsoft Corporation +// +// 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. + // To run this package... // go run gen.go -- --sdk 3.14.16 @@ -11,6 +25,8 @@ import ( "os/exec" "path/filepath" "strings" + "sync" + "time" do "gopkg.in/godo.v2" ) @@ -35,13 +51,21 @@ type mapping struct { Services []service } +type failList []string + +type failLocker struct { + sync.Mutex + failList +} + var ( + start time.Time gopath = os.Getenv("GOPATH") sdkVersion string autorestDir string swaggersDir string testGen bool - deps do.S + deps do.P services = []*service{} servicesMapping = []mapping{ { @@ -51,24 +75,36 @@ var ( {Name: "advisor"}, {Name: "analysisservices"}, // { - // Autorest Bug - // Name: "apimanagement", + // Autorest Bug, duplicate files + // Name: "apimanagement", // }, {Name: "appinsights"}, {Name: "authorization"}, {Name: "automation"}, + // { + // Name: "commerce", + // Input: "azsadmin/resource-manager/commerce", + // Output: "azsadmin/commerce", + // }, + // { + // Name: "fabric", + // Input: "azsadmin/resource-manager/fabric", + // Output: "azsadmin/fabric", + // }, + // { + // Name: "infrastructureinsights", + // Input: "azsadmin/resource-manager/InfrastructureInsights", + // Output: "azsadmin/infrastructureinsights", + // }, {Name: "batch"}, {Name: "billing"}, {Name: "cdn"}, - // { - // bug in AutoRest (duplicated files) - // Name: "cognitiveservices", - // }, + {Name: "cognitiveservices"}, {Name: "commerce"}, {Name: "compute"}, { Name: "containerservice", - Input: "compute", + Input: "compute/resource-manager", Tag: "package-container-service-2017-01", }, {Name: "consumption"}, @@ -78,12 +114,12 @@ var ( {Name: "customer-insights"}, { Name: "account", - Input: "datalake-analytics", + Input: "datalake-analytics/resource-manager", Output: "datalake-analytics/account", }, { Name: "account", - Input: "datalake-store", + Input: "datalake-store/resource-manager", Output: "datalake-store/account", }, {Name: "devtestlabs"}, @@ -97,73 +133,75 @@ var ( {Name: "logic"}, { Name: "commitmentplans", - Input: "machinelearning", - Output: "machinelearning/commitmentPlans", + Input: "machinelearning/resource-manager", + Output: "machinelearning/commitmentplans", Tag: "package-commitmentPlans-2016-05-preview", }, { Name: "webservices", - Input: "machinelearning", + Input: "machinelearning/resource-manager", Output: "machinelearning/webservices", Tag: "package-webservices-2017-01", }, + {Name: "marketplaceordering"}, {Name: "mediaservices"}, {Name: "mobileengagement"}, {Name: "monitor"}, {Name: "mysql"}, {Name: "network"}, {Name: "notificationhubs"}, - // { - // bug in the Go generator https://github.com/Azure/autorest/issues/2219 - // Name: "operationalinsights", - // }, + {Name: "operationalinsights"}, + {Name: "operationsmanagement"}, {Name: "postgresql"}, {Name: "powerbiembedded"}, {Name: "recoveryservices"}, {Name: "recoveryservicesbackup"}, {Name: "recoveryservicessiterecovery"}, - {Name: "redis"}, + { + Name: "redis", + Tag: "package-2016-04", + }, {Name: "relay"}, {Name: "resourcehealth"}, { Name: "features", - Input: "resources", + Input: "resources/resource-manager", Output: "resources/features", Tag: "package-features-2015-12", }, { Name: "links", - Input: "resources", + Input: "resources/resource-manager", Output: "resources/links", Tag: "package-links-2016-09", }, { Name: "locks", - Input: "resources", + Input: "resources/resource-manager", Output: "resources/locks", Tag: "package-locks-2016-09", }, { Name: "managedapplications", - Input: "resources", + Input: "resources/resource-manager", Output: "resources/managedapplications", Tag: "package-managedapplications-2016-09", }, { Name: "policy", - Input: "resources", + Input: "resources/resource-manager", Output: "resources/policy", Tag: "package-policy-2016-12", }, { Name: "resources", - Input: "resources", + Input: "resources/resource-manager", Output: "resources/resources", Tag: "package-resources-2017-05", }, { Name: "subscriptions", - Input: "resources", + Input: "resources/resource-manager", Output: "resources/subscriptions", Tag: "package-subscriptions-2016-06", }, @@ -180,7 +218,8 @@ var ( {Name: "streamanalytics"}, // { // error in the modeler - // Name: "timeseriesinsights", + // https://github.com/Azure/autorest/issues/2579 + // Name: "timeseriesinsights", // }, {Name: "trafficmanager"}, {Name: "visualstudio"}, @@ -191,8 +230,16 @@ var ( PlaneOutput: "dataplane", PlaneInput: "data-plane", Services: []service{ + {Name: "keyvault"}, { - Name: "keyvault", + Name: "face", + Input: "cognitiveservices/data-plane/Face", + Output: "cognitiveservices/face", + }, + { + Name: "textanalytics", + Input: "cognitiveservices/data-plane/TextAnalytics", + Output: "cognitiveservices/textanalytics", }, }, }, @@ -201,7 +248,7 @@ var ( Services: []service{ { Name: "filesystem", - Input: "datalake-store", + Input: "datalake-store/data-plane", Output: "datalake-store/filesystem", }, }, @@ -210,15 +257,15 @@ var ( PlaneOutput: "arm", PlaneInput: "data-plane", Services: []service{ - { - Name: "graphrbac", - }, + {Name: "graphrbac"}, }, }, } + fails = failLocker{} ) -func main() { +func init() { + start = time.Now() for _, swaggerGroup := range servicesMapping { swg := swaggerGroup for _, service := range swg.Services { @@ -226,6 +273,9 @@ func main() { initAndAddService(&s, swg.PlaneInput, swg.PlaneOutput) } } +} + +func main() { do.Godo(tasks) } @@ -233,7 +283,13 @@ func initAndAddService(service *service, planeInput, planeOutput string) { if service.Input == "" { service.Input = service.Name } - service.Input = filepath.Join(service.Input, planeInput, "readme.md") + path := []string{service.Input} + if service.Input == service.Name { + path = append(path, planeInput) + } + path = append(path, "readme.md") + service.Input = filepath.Join(path...) + if service.Output == "" { service.Output = service.Name } @@ -247,7 +303,7 @@ func initAndAddService(service *service, planeInput, planeOutput string) { } func tasks(p *do.Project) { - p.Task("default", do.S{"setvars", "generate:all", "management"}, nil) + p.Task("default", do.S{"setvars", "generate:all", "management", "report"}, nil) p.Task("setvars", nil, setVars) p.Use("generate", generateTasks) p.Use("gofmt", formatTasks) @@ -256,6 +312,7 @@ func tasks(p *do.Project) { p.Use("govet", vetTasks) p.Task("management", do.S{"setvars"}, managementVersion) p.Task("addVersion", nil, addVersion) + p.Task("report", nil, report) } func setVars(c *do.Context) { @@ -294,7 +351,7 @@ func generate(service *service) { commandArgs := []string{ fullInput, codegen, - "--license-header=MICROSOFT_APACHE", + "--license-header=MICROSOFT_APACHE_NO_VERSION", fmt.Sprintf("--namespace=%s", service.Name), fmt.Sprintf("--output-folder=%s", service.Output), fmt.Sprintf("--package-version=%s", sdkVersion), @@ -318,8 +375,8 @@ func generate(service *service) { fmt.Println(commandArgs) - if _, err := runner(autorest); err != nil { - panic(fmt.Errorf("Autorest error: %s", err)) + if _, stderr, err := runner(autorest); err != nil { + fails.Add(fmt.Sprintf("%s: autorest error: %s: %s", service.Fullname, err, stderr)) } format(service) @@ -335,9 +392,9 @@ func formatTasks(p *do.Project) { func format(service *service) { fmt.Printf("Formatting %s...\n\n", service.Fullname) gofmt := exec.Command("gofmt", "-w", service.Output) - _, err := runner(gofmt) + _, stderr, err := runner(gofmt) if err != nil { - panic(fmt.Errorf("gofmt error: %s", err)) + fails.Add(fmt.Sprintf("%s: gofmt error:%s: %s", service.Fullname, err, stderr)) } } @@ -348,9 +405,9 @@ func buildTasks(p *do.Project) { func build(service *service) { fmt.Printf("Building %s...\n\n", service.Fullname) gobuild := exec.Command("go", "build", service.Namespace) - _, err := runner(gobuild) + _, stderr, err := runner(gobuild) if err != nil { - panic(fmt.Errorf("go build error: %s", err)) + fails.Add(fmt.Sprintf("%s: build error: %s: %s", service.Fullname, err, stderr)) } } @@ -361,9 +418,9 @@ func lintTasks(p *do.Project) { func lint(service *service) { fmt.Printf("Linting %s...\n\n", service.Fullname) golint := exec.Command(filepath.Join(gopath, "bin", "golint"), service.Namespace) - _, err := runner(golint) + _, stderr, err := runner(golint) if err != nil { - panic(fmt.Errorf("golint error: %s", err)) + fails.Add(fmt.Sprintf("%s: golint error: %s: %s", service.Fullname, err, stderr)) } } @@ -374,15 +431,15 @@ func vetTasks(p *do.Project) { func vet(service *service) { fmt.Printf("Vetting %s...\n\n", service.Fullname) govet := exec.Command("go", "vet", service.Namespace) - _, err := runner(govet) + _, stderr, err := runner(govet) if err != nil { - panic(fmt.Errorf("go vet error: %s", err)) + fails.Add(fmt.Sprintf("%s: go vet error: %s: %s", service.Fullname, err, stderr)) } } func addVersion(c *do.Context) { gitStatus := exec.Command("git", "status", "-s") - out, err := runner(gitStatus) + out, _, err := runner(gitStatus) if err != nil { panic(fmt.Errorf("Git error: %s", err)) } @@ -391,7 +448,7 @@ func addVersion(c *do.Context) { for _, f := range files { if strings.HasPrefix(f, " M ") && strings.HasSuffix(f, "version.go") { gitAdd := exec.Command("git", "add", f[3:]) - _, err := runner(gitAdd) + _, _, err := runner(gitAdd) if err != nil { panic(fmt.Errorf("Git error: %s", err)) } @@ -406,10 +463,24 @@ func managementVersion(c *do.Context) { func version(packageName string) { versionFile := filepath.Join(packageName, "version.go") os.Remove(versionFile) - template := `// +build go1.7 - + template := `// +build go1.7 + package %s +// Copyright 2017 Microsoft Corporation +// +// 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. + var ( sdkVersion = "%s" ) @@ -428,7 +499,7 @@ func addTasks(fn func(*service), p *do.Project) { p.Task("all", deps, nil) } -func runner(cmd *exec.Cmd) (string, error) { +func runner(cmd *exec.Cmd) (string, string, error) { var stdout, stderr bytes.Buffer cmd.Stdout, cmd.Stderr = &stdout, &stderr err := cmd.Run() @@ -438,5 +509,19 @@ func runner(cmd *exec.Cmd) (string, error) { if stderr.Len() > 0 { fmt.Println(stderr.String()) } - return stdout.String(), err + return stdout.String(), stderr.String(), err +} + +func (fl *failLocker) Add(fail string) { + fl.Lock() + defer fl.Unlock() + fl.failList = append(fl.failList, fail) +} + +func report(c *do.Context) { + fmt.Printf("Script ran for %s\n", time.Since(start)) + for _, f := range fails.failList { + fmt.Println(f) + fmt.Println("==========") + } } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/client.go index eccfe2c63..8f48db366 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/client.go @@ -1,5 +1,4 @@ -// Package advisor implements the Azure ARM Advisor service API version -// 2017-04-19. +// Package advisor implements the Azure ARM Advisor service API version 2017-04-19. // // REST APIs for Azure Advisor package advisor @@ -18,9 +17,8 @@ package advisor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/models.go index 9b861c068..2fb71f19e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/models.go @@ -14,15 +14,14 @@ package advisor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) @@ -152,8 +151,8 @@ type ShortDescription struct { Solution *string `json:"solution,omitempty"` } -// SuppressionContract is the details of the snoozed or dismissed rule; for -// example, the duration, name, and GUID associated with the rule. +// SuppressionContract is the details of the snoozed or dismissed rule; for example, the duration, name, and GUID +// associated with the rule. type SuppressionContract struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/operations.go index 611dafec8..148467dac 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/operations.go @@ -14,9 +14,8 @@ package advisor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// OperationsClient is the rEST APIs for Azure Advisor +// OperationsClient is the REST APIs for Azure Advisor type OperationsClient struct { ManagementClient } @@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -120,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationEntityListRe return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationEntity, <-chan error) { + resultChan := make(chan OperationEntity) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/recommendations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/recommendations.go index beaa8e74c..5eaa2cbae 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/recommendations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/recommendations.go @@ -14,37 +14,33 @@ package advisor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// RecommendationsClient is the rEST APIs for Azure Advisor +// RecommendationsClient is the REST APIs for Azure Advisor type RecommendationsClient struct { ManagementClient } -// NewRecommendationsClient creates an instance of the RecommendationsClient -// client. +// NewRecommendationsClient creates an instance of the RecommendationsClient client. func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the -// RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Generate initiates the recommendation generation or computation process for -// a subscription. This operation is asynchronous. The generated -// recommendations are stored in a cache in the Advisor service. +// Generate initiates the recommendation generation or computation process for a subscription. This operation is +// asynchronous. The generated recommendations are stored in a cache in the Advisor service. func (client RecommendationsClient) Generate() (result autorest.Response, err error) { req, err := client.GeneratePreparer() if err != nil { @@ -106,9 +102,8 @@ func (client RecommendationsClient) GenerateResponder(resp *http.Response) (resu // Get obtains details of a cached recommendation. // -// resourceURI is the fully qualified Azure Resource Manager identifier of the -// resource to which the recommendation applies. recommendationID is the -// recommendation ID. +// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation +// applies. recommendationID is the recommendation ID. func (client RecommendationsClient) Get(resourceURI string, recommendationID string) (result ResourceRecommendationBase, err error) { req, err := client.GetPreparer(resourceURI, recommendationID) if err != nil { @@ -170,13 +165,12 @@ func (client RecommendationsClient) GetResponder(resp *http.Response) (result Re return } -// GetGenerateStatus retrieves the status of the recommendation computation or -// generation process. Invoke this API after calling the generation -// recommendation. The URI of this API is returned in the Location field of the -// response header. +// GetGenerateStatus retrieves the status of the recommendation computation or generation process. Invoke this API +// after calling the generation recommendation. The URI of this API is returned in the Location field of the response +// header. // -// operationID is the operation ID, which can be found from the Location field -// in the generate recommendation response header. +// operationID is the operation ID, which can be found from the Location field in the generate recommendation response +// header. func (client RecommendationsClient) GetGenerateStatus(operationID uuid.UUID) (result autorest.Response, err error) { req, err := client.GetGenerateStatusPreparer(operationID) if err != nil { @@ -237,13 +231,11 @@ func (client RecommendationsClient) GetGenerateStatusResponder(resp *http.Respon return } -// List obtains cached recommendations for a subscription. The recommendations -// are generated or computed by invoking generateRecommendations. +// List obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking +// generateRecommendations. // -// filter is the filter to apply to the recommendations. top is the number of -// recommendations per page if a paged version of this API is being used. -// skipToken is the page-continuation token to use with a paged version of this -// API. +// filter is the filter to apply to the recommendations. top is the number of recommendations per page if a paged +// version of this API is being used. skipToken is the page-continuation token to use with a paged version of this API. func (client RecommendationsClient) List(filter string, top *int32, skipToken string) (result ResourceRecommendationBaseListResult, err error) { req, err := client.ListPreparer(filter, top, skipToken) if err != nil { @@ -336,3 +328,48 @@ func (client RecommendationsClient) ListNextResults(lastResults ResourceRecommen return } + +// ListComplete gets all elements from the list without paging. +func (client RecommendationsClient) ListComplete(filter string, top *int32, skipToken string, cancel <-chan struct{}) (<-chan ResourceRecommendationBase, <-chan error) { + resultChan := make(chan ResourceRecommendationBase) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter, top, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/suppressions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/suppressions.go index ec0c6c494..f3770948b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/suppressions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/suppressions.go @@ -14,9 +14,8 @@ package advisor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// SuppressionsClient is the rEST APIs for Azure Advisor +// SuppressionsClient is the REST APIs for Azure Advisor type SuppressionsClient struct { ManagementClient } @@ -34,20 +33,17 @@ func NewSuppressionsClient(subscriptionID string) SuppressionsClient { return NewSuppressionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSuppressionsClientWithBaseURI creates an instance of the -// SuppressionsClient client. +// NewSuppressionsClientWithBaseURI creates an instance of the SuppressionsClient client. func NewSuppressionsClientWithBaseURI(baseURI string, subscriptionID string) SuppressionsClient { return SuppressionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create enables the snoozed or dismissed attribute of a recommendation. The -// snoozed or dismissed attribute is referred to as a suppression. Use this API -// to create or update the snoozed or dismissed status of a recommendation. +// Create enables the snoozed or dismissed attribute of a recommendation. The snoozed or dismissed attribute is +// referred to as a suppression. Use this API to create or update the snoozed or dismissed status of a recommendation. // -// resourceURI is the fully qualified Azure Resource Manager identifier of the -// resource to which the recommendation applies. recommendationID is the -// recommendation ID. name is the name of the suppression. suppressionContract -// is the snoozed or dismissed attribute; for example, the snooze duration. +// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation +// applies. recommendationID is the recommendation ID. name is the name of the suppression. suppressionContract is the +// snoozed or dismissed attribute; for example, the snooze duration. func (client SuppressionsClient) Create(resourceURI string, recommendationID string, name string, suppressionContract SuppressionContract) (result SuppressionContract, err error) { req, err := client.CreatePreparer(resourceURI, recommendationID, name, suppressionContract) if err != nil { @@ -112,13 +108,11 @@ func (client SuppressionsClient) CreateResponder(resp *http.Response) (result Su return } -// Delete enables the activation of a snoozed or dismissed recommendation. The -// snoozed or dismissed attribute of a recommendation is referred to as a -// suppression. +// Delete enables the activation of a snoozed or dismissed recommendation. The snoozed or dismissed attribute of a +// recommendation is referred to as a suppression. // -// resourceURI is the fully qualified Azure Resource Manager identifier of the -// resource to which the recommendation applies. recommendationID is the -// recommendation ID. name is the name of the suppression. +// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation +// applies. recommendationID is the recommendation ID. name is the name of the suppression. func (client SuppressionsClient) Delete(resourceURI string, recommendationID string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceURI, recommendationID, name) if err != nil { @@ -182,9 +176,8 @@ func (client SuppressionsClient) DeleteResponder(resp *http.Response) (result au // Get obtains the details of a suppression. // -// resourceURI is the fully qualified Azure Resource Manager identifier of the -// resource to which the recommendation applies. recommendationID is the -// recommendation ID. name is the name of the suppression. +// resourceURI is the fully qualified Azure Resource Manager identifier of the resource to which the recommendation +// applies. recommendationID is the recommendation ID. name is the name of the suppression. func (client SuppressionsClient) Get(resourceURI string, recommendationID string, name string) (result SuppressionContract, err error) { req, err := client.GetPreparer(resourceURI, recommendationID, name) if err != nil { @@ -247,13 +240,11 @@ func (client SuppressionsClient) GetResponder(resp *http.Response) (result Suppr return } -// List retrieves the list of snoozed or dismissed suppressions for a -// subscription. The snoozed or dismissed attribute of a recommendation is -// referred to as a suppression. +// List retrieves the list of snoozed or dismissed suppressions for a subscription. The snoozed or dismissed attribute +// of a recommendation is referred to as a suppression. // -// top is the number of suppressions per page if a paged version of this API is -// being used. skipToken is the page-continuation token to use with a paged -// version of this API. +// top is the number of suppressions per page if a paged version of this API is being used. skipToken is the +// page-continuation token to use with a paged version of this API. func (client SuppressionsClient) List(top *int32, skipToken string) (result SuppressionContractListResult, err error) { req, err := client.ListPreparer(top, skipToken) if err != nil { @@ -343,3 +334,48 @@ func (client SuppressionsClient) ListNextResults(lastResults SuppressionContract return } + +// ListComplete gets all elements from the list without paging. +func (client SuppressionsClient) ListComplete(top *int32, skipToken string, cancel <-chan struct{}) (<-chan SuppressionContract, <-chan error) { + resultChan := make(chan SuppressionContract) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(top, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go index 678f32810..a56a4f736 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/advisor/version.go @@ -14,15 +14,15 @@ package advisor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-advisor/2017-04-19" + return "Azure-SDK-For-Go/v11.0.0-beta arm-advisor/2017-04-19" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/client.go index 22fc2bd29..75e61bd27 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/client.go @@ -1,9 +1,7 @@ -// Package analysisservices implements the Azure ARM Analysisservices service -// API version 2016-05-16. +// Package analysisservices implements the Azure ARM Analysisservices service API version 2017-08-01-beta. // -// The Azure Analysis Services Web API provides a RESTful set of web services -// that enables users to create, retrieve, update, and delete Analysis Services -// servers +// The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, +// update, and delete Analysis Services servers package analysisservices // Copyright (c) Microsoft and contributors. All rights reserved. @@ -20,9 +18,8 @@ package analysisservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/models.go index 96fb36496..f9641ed39 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/models.go @@ -14,12 +14,23 @@ package analysisservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/to" + "net/http" +) + +// ConnectionMode enumerates the values for connection mode. +type ConnectionMode string + +const ( + // All specifies the all state for connection mode. + All ConnectionMode = "All" + // ReadOnly specifies the read only state for connection mode. + ReadOnly ConnectionMode = "ReadOnly" ) // ProvisioningState enumerates the values for provisioning state. @@ -52,26 +63,6 @@ const ( Updating ProvisioningState = "Updating" ) -// SkuName enumerates the values for sku name. -type SkuName string - -const ( - // B1 specifies the b1 state for sku name. - B1 SkuName = "B1" - // B2 specifies the b2 state for sku name. - B2 SkuName = "B2" - // D1 specifies the d1 state for sku name. - D1 SkuName = "D1" - // S0 specifies the s0 state for sku name. - S0 SkuName = "S0" - // S1 specifies the s1 state for sku name. - S1 SkuName = "S1" - // S2 specifies the s2 state for sku name. - S2 SkuName = "S2" - // S4 specifies the s4 state for sku name. - S4 SkuName = "S4" -) - // SkuTier enumerates the values for sku tier. type SkuTier string @@ -114,11 +105,88 @@ const ( StateUpdating State = "Updating" ) -// BackupConfiguration is an object that represents backup configurations -type BackupConfiguration struct { - StorageAccount *string `json:"storageAccount,omitempty"` - BlobContainer *string `json:"blobContainer,omitempty"` - AccessKey *string `json:"accessKey,omitempty"` +// Status enumerates the values for status. +type Status string + +const ( + // Live specifies the live state for status. + Live Status = "Live" +) + +// ErrorResponse is describes the format of Error response. +type ErrorResponse struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// GatewayDetails is the gateway details. +type GatewayDetails struct { + GatewayResourceID *string `json:"gatewayResourceId,omitempty"` + GatewayObjectID *string `json:"gatewayObjectId,omitempty"` + DmtsClusterURI *string `json:"dmtsClusterUri,omitempty"` +} + +// GatewayError is detail of gateway errors. +type GatewayError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// GatewayListStatusError is status of gateway is error. +type GatewayListStatusError struct { + Error *GatewayError `json:"error,omitempty"` +} + +// GatewayListStatusLive is status of gateway is live. +type GatewayListStatusLive struct { + autorest.Response `json:"-"` + Status Status `json:"status,omitempty"` +} + +// IPv4FirewallRule is the detail of firewall rule. +type IPv4FirewallRule struct { + FirewallRuleName *string `json:"firewallRuleName,omitempty"` + RangeStart *string `json:"rangeStart,omitempty"` + RangeEnd *string `json:"rangeEnd,omitempty"` +} + +// IPv4FirewallSettings is an array of firewall rules. +type IPv4FirewallSettings struct { + FirewallRules *[]IPv4FirewallRule `json:"firewallRules,omitempty"` + EnablePowerBIService *string `json:"enablePowerBIService,omitempty"` +} + +// Operation is a Consumption REST API operation. +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay is the object that represents the operation. +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` +} + +// OperationListResult is result of listing consumption operations. It contains a list of operations and a URL link to +// get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) } // Resource is represents an instance of an Analysis Services resource. @@ -131,11 +199,11 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ResourceSku is represents the SKU name and Azure pricing tier for Analysis -// Services resource. +// ResourceSku is represents the SKU name and Azure pricing tier for Analysis Services resource. type ResourceSku struct { - Name SkuName `json:"name,omitempty"` - Tier SkuTier `json:"tier,omitempty"` + Name *string `json:"name,omitempty"` + Tier SkuTier `json:"tier,omitempty"` + Capacity *int32 `json:"capacity,omitempty"` } // Server is represents an instance of an Analysis Services resource. @@ -150,25 +218,30 @@ type Server struct { *ServerProperties `json:"properties,omitempty"` } -// ServerAdministrators is an array of administrator user identities +// ServerAdministrators is an array of administrator user identities. type ServerAdministrators struct { Members *[]string `json:"members,omitempty"` } -// ServerMutableProperties is an object that represents a set of mutable -// Analysis Services resource properties. +// ServerMutableProperties is an object that represents a set of mutable Analysis Services resource properties. type ServerMutableProperties struct { - AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"` - BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` + AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"` + BackupBlobContainerURI *string `json:"backupBlobContainerUri,omitempty"` + GatewayDetails *GatewayDetails `json:"gatewayDetails,omitempty"` + IPV4FirewallSettings *IPv4FirewallSettings `json:"ipV4FirewallSettings,omitempty"` + QuerypoolConnectionMode ConnectionMode `json:"querypoolConnectionMode,omitempty"` } // ServerProperties is properties of Analysis Services resource. type ServerProperties struct { - AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"` - BackupConfiguration *BackupConfiguration `json:"backupConfiguration,omitempty"` - State State `json:"state,omitempty"` - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - ServerFullName *string `json:"serverFullName,omitempty"` + AsAdministrators *ServerAdministrators `json:"asAdministrators,omitempty"` + BackupBlobContainerURI *string `json:"backupBlobContainerUri,omitempty"` + GatewayDetails *GatewayDetails `json:"gatewayDetails,omitempty"` + IPV4FirewallSettings *IPv4FirewallSettings `json:"ipV4FirewallSettings,omitempty"` + QuerypoolConnectionMode ConnectionMode `json:"querypoolConnectionMode,omitempty"` + State State `json:"state,omitempty"` + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + ServerFullName *string `json:"serverFullName,omitempty"` } // Servers is an array of Analysis Services resources. @@ -183,3 +256,20 @@ type ServerUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` *ServerMutableProperties `json:"properties,omitempty"` } + +// SkuDetailsForExistingResource is an object that represents SKU details for existing resources. +type SkuDetailsForExistingResource struct { + Sku *ResourceSku `json:"sku,omitempty"` +} + +// SkuEnumerationForExistingResourceResult is an object that represents enumerating SKUs for existing resources. +type SkuEnumerationForExistingResourceResult struct { + autorest.Response `json:"-"` + Value *[]SkuDetailsForExistingResource `json:"value,omitempty"` +} + +// SkuEnumerationForNewResourceResult is an object that represents enumerating SKUs for new resources. +type SkuEnumerationForNewResourceResult struct { + autorest.Response `json:"-"` + Value *[]ResourceSku `json:"value,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/operations.go new file mode 100644 index 000000000..8eefcbb1d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/operations.go @@ -0,0 +1,166 @@ +package analysisservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the the Azure Analysis Services Web API provides a RESTful set of web services that enables +// users to create, retrieve, update, and delete Analysis Services servers +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available consumption REST API operations. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-08-01-beta" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.AnalysisServices/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.OperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/servers.go index 70e0e448b..fc8e06c5b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/servers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/servers.go @@ -14,9 +14,8 @@ package analysisservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,9 +24,8 @@ import ( "net/http" ) -// ServersClient is the the Azure Analysis Services Web API provides a RESTful -// set of web services that enables users to create, retrieve, update, and -// delete Analysis Services servers +// ServersClient is the the Azure Analysis Services Web API provides a RESTful set of web services that enables users +// to create, retrieve, update, and delete Analysis Services servers type ServersClient struct { ManagementClient } @@ -42,17 +40,14 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create provisions the specified Analysis Services server based on the -// configuration specified in the request. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Create provisions the specified Analysis Services server based on the configuration specified in the request. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the Azure Resource group of which a given -// Analysis Services server is part. This name must be at least 1 character in -// length, and no more than 90. serverName is the name of the Analysis Services -// server. It must be a minimum of 3 characters, and a maximum of 63. -// serverParameters is contains the information used to provision the Analysis -// Services server. +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services +// server. It must be a minimum of 3 characters, and a maximum of 63. serverParameters is contains the information used +// to provision the Analysis Services server. func (client ServersClient) Create(resourceGroupName string, serverName string, serverParameters Server, cancel <-chan struct{}) (<-chan Server, <-chan error) { resultChan := make(chan Server, 1) errChan := make(chan error, 1) @@ -75,8 +70,10 @@ func (client ServersClient) Create(resourceGroupName string, serverName string, var err error var result Server defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -109,7 +106,7 @@ func (client ServersClient) CreatePreparer(resourceGroupName string, serverName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -145,14 +142,12 @@ func (client ServersClient) CreateResponder(resp *http.Response) (result Server, return } -// Delete deletes the specified Analysis Services server. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified Analysis Services server. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the Azure Resource group of which a given -// Analysis Services server is part. This name must be at least 1 character in -// length, and no more than 90. serverName is the name of the Analysis Services +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services // server. It must be at least 3 characters in length, and no more than 63. func (client ServersClient) Delete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) @@ -176,8 +171,10 @@ func (client ServersClient) Delete(resourceGroupName string, serverName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -210,7 +207,7 @@ func (client ServersClient) DeletePreparer(resourceGroupName string, serverName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -243,11 +240,88 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores return } +// DissociateGateway dissociates a Unified Gateway associated with the server. +// +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services +// server. It must be at least 3 characters in length, and no more than 63. +func (client ServersClient) DissociateGateway(resourceGroupName string, serverName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: serverName, + Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "DissociateGateway") + } + + req, err := client.DissociateGatewayPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", nil, "Failure preparing request") + return + } + + resp, err := client.DissociateGatewaySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", resp, "Failure sending request") + return + } + + result, err = client.DissociateGatewayResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "DissociateGateway", resp, "Failure responding to request") + } + + return +} + +// DissociateGatewayPreparer prepares the DissociateGateway request. +func (client ServersClient) DissociateGatewayPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-beta" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/dissociateGateway", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DissociateGatewaySender sends the DissociateGateway request. The method will close the +// http.Response Body if it receives an error. +func (client ServersClient) DissociateGatewaySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DissociateGatewayResponder handles the response to the DissociateGateway request. The method always +// closes the http.Response Body. +func (client ServersClient) DissociateGatewayResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + // GetDetails gets details about the specified Analysis Services server. // -// resourceGroupName is the name of the Azure Resource group of which a given -// Analysis Services server is part. This name must be at least 1 character in -// length, and no more than 90. serverName is the name of the Analysis Services +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services // server. It must be a minimum of 3 characters, and a maximum of 63. func (client ServersClient) GetDetails(resourceGroupName string, serverName string) (result Server, err error) { if err := validation.Validate([]validation.Validation{ @@ -291,7 +365,7 @@ func (client ServersClient) GetDetailsPreparer(resourceGroupName string, serverN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,7 +426,7 @@ func (client ServersClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -384,12 +458,10 @@ func (client ServersClient) ListResponder(resp *http.Response) (result Servers, return } -// ListByResourceGroup gets all the Analysis Services servers for the given -// resource group. +// ListByResourceGroup gets all the Analysis Services servers for the given resource group. // -// resourceGroupName is the name of the Azure Resource group of which a given -// Analysis Services server is part. This name must be at least 1 character in -// length, and no more than 90. +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. func (client ServersClient) ListByResourceGroup(resourceGroupName string) (result Servers, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -427,7 +499,7 @@ func (client ServersClient) ListByResourceGroupPreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -459,14 +531,231 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r return } -// Resume resumes operation of the specified Analysis Services server instance. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ListGatewayStatus return the gateway status of the specified Analysis Services server instance. +// +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services +// server. +func (client ServersClient) ListGatewayStatus(resourceGroupName string, serverName string) (result GatewayListStatusLive, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: serverName, + Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "ListGatewayStatus") + } + + req, err := client.ListGatewayStatusPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", nil, "Failure preparing request") + return + } + + resp, err := client.ListGatewayStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", resp, "Failure sending request") + return + } + + result, err = client.ListGatewayStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListGatewayStatus", resp, "Failure responding to request") + } + + return +} + +// ListGatewayStatusPreparer prepares the ListGatewayStatus request. +func (client ServersClient) ListGatewayStatusPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-beta" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/listGatewayStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListGatewayStatusSender sends the ListGatewayStatus request. The method will close the +// http.Response Body if it receives an error. +func (client ServersClient) ListGatewayStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListGatewayStatusResponder handles the response to the ListGatewayStatus request. The method always +// closes the http.Response Body. +func (client ServersClient) ListGatewayStatusResponder(resp *http.Response) (result GatewayListStatusLive, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSkusForExisting lists eligible SKUs for an Analysis Services resource. +// +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services +// server. It must be at least 3 characters in length, and no more than 63. +func (client ServersClient) ListSkusForExisting(resourceGroupName string, serverName string) (result SkuEnumerationForExistingResourceResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: serverName, + Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil}, + {Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "ListSkusForExisting") + } + + req, err := client.ListSkusForExistingPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", nil, "Failure preparing request") + return + } + + resp, err := client.ListSkusForExistingSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", resp, "Failure sending request") + return + } + + result, err = client.ListSkusForExistingResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForExisting", resp, "Failure responding to request") + } + + return +} + +// ListSkusForExistingPreparer prepares the ListSkusForExisting request. +func (client ServersClient) ListSkusForExistingPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-beta" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSkusForExistingSender sends the ListSkusForExisting request. The method will close the +// http.Response Body if it receives an error. +func (client ServersClient) ListSkusForExistingSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSkusForExistingResponder handles the response to the ListSkusForExisting request. The method always +// closes the http.Response Body. +func (client ServersClient) ListSkusForExistingResponder(resp *http.Response) (result SkuEnumerationForExistingResourceResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSkusForNew lists eligible SKUs for Analysis Services resource provider. +func (client ServersClient) ListSkusForNew() (result SkuEnumerationForNewResourceResult, err error) { + req, err := client.ListSkusForNewPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", nil, "Failure preparing request") + return + } + + resp, err := client.ListSkusForNewSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", resp, "Failure sending request") + return + } + + result, err = client.ListSkusForNewResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "ListSkusForNew", resp, "Failure responding to request") + } + + return +} + +// ListSkusForNewPreparer prepares the ListSkusForNew request. +func (client ServersClient) ListSkusForNewPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-08-01-beta" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSkusForNewSender sends the ListSkusForNew request. The method will close the +// http.Response Body if it receives an error. +func (client ServersClient) ListSkusForNewSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSkusForNewResponder handles the response to the ListSkusForNew request. The method always +// closes the http.Response Body. +func (client ServersClient) ListSkusForNewResponder(resp *http.Response) (result SkuEnumerationForNewResourceResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Resume resumes operation of the specified Analysis Services server instance. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the Azure Resource group of which a given -// Analysis Services server is part. This name must be at least 1 character in -// length, and no more than 90. serverName is the name of the Analysis Services +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services // server. It must be at least 3 characters in length, and no more than 63. func (client ServersClient) Resume(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) @@ -490,8 +779,10 @@ func (client ServersClient) Resume(resourceGroupName string, serverName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -524,7 +815,7 @@ func (client ServersClient) ResumePreparer(resourceGroupName string, serverName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -557,14 +848,12 @@ func (client ServersClient) ResumeResponder(resp *http.Response) (result autores return } -// Suspend supends operation of the specified Analysis Services server -// instance. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Suspend supends operation of the specified Analysis Services server instance. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the Azure Resource group of which a given -// Analysis Services server is part. This name must be at least 1 character in -// length, and no more than 90. serverName is the name of the Analysis Services +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services // server. It must be at least 3 characters in length, and no more than 63. func (client ServersClient) Suspend(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) @@ -588,8 +877,10 @@ func (client ServersClient) Suspend(resourceGroupName string, serverName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -622,7 +913,7 @@ func (client ServersClient) SuspendPreparer(resourceGroupName string, serverName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -655,15 +946,17 @@ func (client ServersClient) SuspendResponder(resp *http.Response) (result autore return } -// Update updates the current state of the specified Analysis Services server. +// Update updates the current state of the specified Analysis Services server. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the Azure Resource group of which a given -// Analysis Services server is part. This name must be at least 1 character in -// length, and no more than 90. serverName is the name of the Analysis Services -// server. It must be at least 3 characters in length, and no more than 63. -// serverUpdateParameters is request object that contains the updated -// information for the server. -func (client ServersClient) Update(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters) (result Server, err error) { +// resourceGroupName is the name of the Azure Resource group of which a given Analysis Services server is part. This +// name must be at least 1 character in length, and no more than 90. serverName is the name of the Analysis Services +// server. It must be at least 3 characters in length, and no more than 63. serverUpdateParameters is request object +// that contains the updated information for the server. +func (client ServersClient) Update(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters, cancel <-chan struct{}) (<-chan Server, <-chan error) { + resultChan := make(chan Server, 1) + errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -673,39 +966,53 @@ func (client ServersClient) Update(resourceGroupName string, serverName string, Constraints: []validation.Constraint{{Target: "serverName", Name: validation.MaxLength, Rule: 63, Chain: nil}, {Target: "serverName", Name: validation.MinLength, Rule: 3, Chain: nil}, {Target: "serverName", Name: validation.Pattern, Rule: `^[a-z][a-z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "Update") + errChan <- validation.NewErrorWithValidationError(err, "analysisservices.ServersClient", "Update") + close(errChan) + close(resultChan) + return resultChan, errChan } - req, err := client.UpdatePreparer(resourceGroupName, serverName, serverUpdateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", nil, "Failure preparing request") - return - } + go func() { + var err error + var result Server + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, serverName, serverUpdateParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", nil, "Failure preparing request") + return + } - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure sending request") - return - } + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure sending request") + return + } - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure responding to request") - } - - return + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "analysisservices.ServersClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan } // UpdatePreparer prepares the Update request. -func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters) (*http.Request, error) { +func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName string, serverUpdateParameters ServerUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-05-16" + const APIVersion = "2017-08-01-beta" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -717,13 +1024,15 @@ func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", pathParameters), autorest.WithJSON(serverUpdateParameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client ServersClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } // UpdateResponder handles the response to the Update request. The method always @@ -732,7 +1041,7 @@ func (client ServersClient) UpdateResponder(resp *http.Response) (result Server, err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go index 5f9852db9..51aea6e5c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/analysisservices/version.go @@ -14,15 +14,15 @@ package analysisservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-analysisservices/2017-08-01-beta" + return "Azure-SDK-For-Go/v11.0.0-beta arm-analysisservices/2017-08-01-beta" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/client.go index e00640451..57277c329 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/client.go @@ -1,5 +1,4 @@ -// Package appinsights implements the Azure ARM Appinsights service API version -// . +// Package appinsights implements the Azure ARM Appinsights service API version 2015-05-01. // // Composite Swagger for Application Insights Management Client package appinsights @@ -18,9 +17,8 @@ package appinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/components.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/components.go index 45c5c8282..20fbda276 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/components.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/components.go @@ -14,9 +14,8 @@ package appinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// ComponentsClient is the composite Swagger for Application Insights -// Management Client +// ComponentsClient is the composite Swagger for Application Insights Management Client type ComponentsClient struct { ManagementClient } @@ -36,20 +34,16 @@ func NewComponentsClient(subscriptionID string) ComponentsClient { return NewComponentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient -// client. +// NewComponentsClientWithBaseURI creates an instance of the ComponentsClient client. func NewComponentsClientWithBaseURI(baseURI string, subscriptionID string) ComponentsClient { return ComponentsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates (or updates) an Application Insights component. Note: -// You cannot specify a different value for InstrumentationKey nor AppId in the -// Put operation. +// CreateOrUpdate creates (or updates) an Application Insights component. Note: You cannot specify a different value +// for InstrumentationKey nor AppId in the Put operation. // -// resourceGroupName is the name of the resource group. resourceName is the -// name of the Application Insights component resource. insightProperties is -// properties that need to be specified to create an Application Insights -// component. +// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component +// resource. insightProperties is properties that need to be specified to create an Application Insights component. func (client ComponentsClient) CreateOrUpdate(resourceGroupName string, resourceName string, insightProperties ApplicationInsightsComponent) (result ApplicationInsightsComponent, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: insightProperties, @@ -122,8 +116,8 @@ func (client ComponentsClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete deletes an Application Insights component. // -// resourceGroupName is the name of the resource group. resourceName is the -// name of the Application Insights component resource. +// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component +// resource. func (client ComponentsClient) Delete(resourceGroupName string, resourceName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, resourceName) if err != nil { @@ -187,8 +181,8 @@ func (client ComponentsClient) DeleteResponder(resp *http.Response) (result auto // Get returns an Application Insights component. // -// resourceGroupName is the name of the resource group. resourceName is the -// name of the Application Insights component resource. +// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component +// resource. func (client ComponentsClient) Get(resourceGroupName string, resourceName string) (result ApplicationInsightsComponent, err error) { req, err := client.GetPreparer(resourceGroupName, resourceName) if err != nil { @@ -251,8 +245,7 @@ func (client ComponentsClient) GetResponder(resp *http.Response) (result Applica return } -// List gets a list of all Application Insights components within a -// subscription. +// List gets a list of all Application Insights components within a subscription. func (client ComponentsClient) List() (result ApplicationInsightsComponentListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -337,8 +330,52 @@ func (client ComponentsClient) ListNextResults(lastResults ApplicationInsightsCo return } -// ListByResourceGroup gets a list of Application Insights components within a -// resource group. +// ListComplete gets all elements from the list without paging. +func (client ComponentsClient) ListComplete(cancel <-chan struct{}) (<-chan ApplicationInsightsComponent, <-chan error) { + resultChan := make(chan ApplicationInsightsComponent) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup gets a list of Application Insights components within a resource group. // // resourceGroupName is the name of the resource group. func (client ComponentsClient) ListByResourceGroup(resourceGroupName string) (result ApplicationInsightsComponentListResult, err error) { @@ -426,12 +463,55 @@ func (client ComponentsClient) ListByResourceGroupNextResults(lastResults Applic return } -// UpdateTags updates an existing component's tags. To update other fields use -// the CreateOrUpdate method. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ComponentsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ApplicationInsightsComponent, <-chan error) { + resultChan := make(chan ApplicationInsightsComponent) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// UpdateTags updates an existing component's tags. To update other fields use the CreateOrUpdate method. // -// resourceGroupName is the name of the resource group. resourceName is the -// name of the Application Insights component resource. componentTags is -// updated tag information to set into the component instance. +// resourceGroupName is the name of the resource group. resourceName is the name of the Application Insights component +// resource. componentTags is updated tag information to set into the component instance. func (client ComponentsClient) UpdateTags(resourceGroupName string, resourceName string, componentTags TagsResource) (result ApplicationInsightsComponent, err error) { req, err := client.UpdateTagsPreparer(resourceGroupName, resourceName, componentTags) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/models.go index 0cf0bb0ad..6adccd0f3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/models.go @@ -14,9 +14,8 @@ package appinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -61,8 +60,7 @@ const ( Ping WebTestKind = "ping" ) -// ApplicationInsightsComponent is an Application Insights component -// definition. +// ApplicationInsightsComponent is an Application Insights component definition. type ApplicationInsightsComponent struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -74,8 +72,7 @@ type ApplicationInsightsComponent struct { *ApplicationInsightsComponentProperties `json:"properties,omitempty"` } -// ApplicationInsightsComponentListResult is describes the list of Application -// Insights Resources. +// ApplicationInsightsComponentListResult is describes the list of Application Insights Resources. type ApplicationInsightsComponentListResult struct { autorest.Response `json:"-"` Value *[]ApplicationInsightsComponent `json:"value,omitempty"` @@ -94,8 +91,7 @@ func (client ApplicationInsightsComponentListResult) ApplicationInsightsComponen autorest.WithBaseURL(to.String(client.NextLink))) } -// ApplicationInsightsComponentProperties is properties that define an -// Application Insights component resource. +// ApplicationInsightsComponentProperties is properties that define an Application Insights component resource. type ApplicationInsightsComponentProperties struct { ApplicationID *string `json:"ApplicationId,omitempty"` AppID *string `json:"AppId,omitempty"` @@ -111,14 +107,14 @@ type ApplicationInsightsComponentProperties struct { SamplingPercentage *float64 `json:"SamplingPercentage,omitempty"` } -// ErrorResponse is error reponse indicates Insights service is not able to -// process the incoming request. The reason is provided in the error message. +// ErrorResponse is error reponse indicates Insights service is not able to process the incoming request. The reason is +// provided in the error message. type ErrorResponse struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } -// Operation is cDN REST API operation +// Operation is CDN REST API operation type Operation struct { Name *string `json:"name,omitempty"` Display *OperationDisplay `json:"display,omitempty"` @@ -131,8 +127,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of the request to list CDN operations. It -// contains a list of operations and a URL link to get the next set of results. +// OperationListResult is result of the request to list CDN operations. It contains a list of operations and a URL link +// to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -160,8 +156,8 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// TagsResource is a container holding only the Tags for a resource, allowing -// the user to update the tags on a WebTest instance. +// TagsResource is a container holding only the Tags for a resource, allowing the user to update the tags on a WebTest +// instance. type TagsResource struct { Tags *map[string]*string `json:"tags,omitempty"` } @@ -178,14 +174,13 @@ type WebTest struct { *WebTestProperties `json:"properties,omitempty"` } -// WebTestGeolocation is geo-physical location to run a web test from. You must -// specify one or more locations for the test to run from. +// WebTestGeolocation is geo-physical location to run a web test from. You must specify one or more locations for the +// test to run from. type WebTestGeolocation struct { Location *string `json:"Id,omitempty"` } -// WebTestListResult is a list of 0 or more Application Insights web test -// definitions. +// WebTestListResult is a list of 0 or more Application Insights web test definitions. type WebTestListResult struct { autorest.Response `json:"-"` Value *[]WebTest `json:"value,omitempty"` @@ -219,8 +214,7 @@ type WebTestProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// WebTestPropertiesConfiguration is an XML configuration specification for a -// WebTest. +// WebTestPropertiesConfiguration is an XML configuration specification for a WebTest. type WebTestPropertiesConfiguration struct { WebTest *string `json:"WebTest,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/operations.go index 37e9fd47c..0c431b949 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/operations.go @@ -14,9 +14,8 @@ package appinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// OperationsClient is the composite Swagger for Application Insights -// Management Client +// OperationsClient is the composite Swagger for Application Insights Management Client type OperationsClient struct { ManagementClient } @@ -35,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -121,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go index 432984f9d..c9fee01ba 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/version.go @@ -14,15 +14,15 @@ package appinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-appinsights/2015-05-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-appinsights/2015-05-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/webtests.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/webtests.go index 509dfe804..77a0dafd4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/webtests.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/appinsights/webtests.go @@ -14,9 +14,8 @@ package appinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// WebTestsClient is the composite Swagger for Application Insights Management -// Client +// WebTestsClient is the composite Swagger for Application Insights Management Client type WebTestsClient struct { ManagementClient } @@ -36,19 +34,16 @@ func NewWebTestsClient(subscriptionID string) WebTestsClient { return NewWebTestsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWebTestsClientWithBaseURI creates an instance of the WebTestsClient -// client. +// NewWebTestsClientWithBaseURI creates an instance of the WebTestsClient client. func NewWebTestsClientWithBaseURI(baseURI string, subscriptionID string) WebTestsClient { return WebTestsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates an Application Insights web test -// definition. +// CreateOrUpdate creates or updates an Application Insights web test definition. // -// resourceGroupName is the name of the resource group. webTestName is the name -// of the Application Insights webtest resource. webTestDefinition is -// properties that need to be specified to create or update an Application -// Insights web test definition. +// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest +// resource. webTestDefinition is properties that need to be specified to create or update an Application Insights web +// test definition. func (client WebTestsClient) CreateOrUpdate(resourceGroupName string, webTestName string, webTestDefinition WebTest) (result WebTest, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: webTestDefinition, @@ -125,8 +120,8 @@ func (client WebTestsClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete deletes an Application Insights web test. // -// resourceGroupName is the name of the resource group. webTestName is the name -// of the Application Insights webtest resource. +// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest +// resource. func (client WebTestsClient) Delete(resourceGroupName string, webTestName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, webTestName) if err != nil { @@ -190,8 +185,8 @@ func (client WebTestsClient) DeleteResponder(resp *http.Response) (result autore // Get get a specific Application Insights web test definition. // -// resourceGroupName is the name of the resource group. webTestName is the name -// of the Application Insights webtest resource. +// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest +// resource. func (client WebTestsClient) Get(resourceGroupName string, webTestName string) (result WebTest, err error) { req, err := client.GetPreparer(resourceGroupName, webTestName) if err != nil { @@ -254,8 +249,7 @@ func (client WebTestsClient) GetResponder(resp *http.Response) (result WebTest, return } -// List get all Application Insights web test alerts definitioned within a -// subscription. +// List get all Application Insights web test alerts definitioned within a subscription. func (client WebTestsClient) List() (result WebTestListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -340,8 +334,52 @@ func (client WebTestsClient) ListNextResults(lastResults WebTestListResult) (res return } -// ListByResourceGroup get all Application Insights web tests defined within a -// specified resource group. +// ListComplete gets all elements from the list without paging. +func (client WebTestsClient) ListComplete(cancel <-chan struct{}) (<-chan WebTest, <-chan error) { + resultChan := make(chan WebTest) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup get all Application Insights web tests defined within a specified resource group. // // resourceGroupName is the name of the resource group. func (client WebTestsClient) ListByResourceGroup(resourceGroupName string) (result WebTestListResult, err error) { @@ -429,11 +467,55 @@ func (client WebTestsClient) ListByResourceGroupNextResults(lastResults WebTestL return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client WebTestsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan WebTest, <-chan error) { + resultChan := make(chan WebTest) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // UpdateTags creates or updates an Application Insights web test definition. // -// resourceGroupName is the name of the resource group. webTestName is the name -// of the Application Insights webtest resource. webTestTags is updated tag -// information to set into the web test instance. +// resourceGroupName is the name of the resource group. webTestName is the name of the Application Insights webtest +// resource. webTestTags is updated tag information to set into the web test instance. func (client WebTestsClient) UpdateTags(resourceGroupName string, webTestName string, webTestTags TagsResource) (result WebTest, err error) { req, err := client.UpdateTagsPreparer(resourceGroupName, webTestName, webTestTags) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/classicadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/classicadministrators.go index 50824a38a..34a4dd694 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/classicadministrators.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/classicadministrators.go @@ -14,9 +14,8 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,25 @@ import ( "net/http" ) -// ClassicAdministratorsClient is the role based access control provides you a -// way to apply granular level policy administration down to individual -// resources or resource groups. These operations enable you to manage role -// definitions and role assignments. A role definition describes the set of -// actions that can be performed on resources. A role assignment grants access -// to Azure Active Directory users. +// ClassicAdministratorsClient is the role based access control provides you a way to apply granular level policy +// administration down to individual resources or resource groups. These operations enable you to manage role +// definitions and role assignments. A role definition describes the set of actions that can be performed on resources. +// A role assignment grants access to Azure Active Directory users. type ClassicAdministratorsClient struct { ManagementClient } -// NewClassicAdministratorsClient creates an instance of the -// ClassicAdministratorsClient client. +// NewClassicAdministratorsClient creates an instance of the ClassicAdministratorsClient client. func NewClassicAdministratorsClient(subscriptionID string) ClassicAdministratorsClient { return NewClassicAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClassicAdministratorsClientWithBaseURI creates an instance of the -// ClassicAdministratorsClient client. +// NewClassicAdministratorsClientWithBaseURI creates an instance of the ClassicAdministratorsClient client. func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ClassicAdministratorsClient { return ClassicAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List gets service administrator, account administrator, and -// co-administrators for the subscription. +// List gets service administrator, account administrator, and co-administrators for the subscription. func (client ClassicAdministratorsClient) List() (result ClassicAdministratorListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -131,3 +125,48 @@ func (client ClassicAdministratorsClient) ListNextResults(lastResults ClassicAdm return } + +// ListComplete gets all elements from the list without paging. +func (client ClassicAdministratorsClient) ListComplete(cancel <-chan struct{}) (<-chan ClassicAdministrator, <-chan error) { + resultChan := make(chan ClassicAdministrator) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/client.go index 5330315d2..79e308c09 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/client.go @@ -1,11 +1,9 @@ -// Package authorization implements the Azure ARM Authorization service API -// version 2015-07-01. +// Package authorization implements the Azure ARM Authorization service API version 2015-07-01. // -// Role based access control provides you a way to apply granular level policy -// administration down to individual resources or resource groups. These -// operations enable you to manage role definitions and role assignments. A -// role definition describes the set of actions that can be performed on -// resources. A role assignment grants access to Azure Active Directory users. +// Role based access control provides you a way to apply granular level policy administration down to individual +// resources or resource groups. These operations enable you to manage role definitions and role assignments. A role +// definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure +// Active Directory users. package authorization // Copyright (c) Microsoft and contributors. All rights reserved. @@ -22,9 +20,8 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/models.go index b615a2c3e..bf6ea05f0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/models.go @@ -14,9 +14,8 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -32,8 +31,7 @@ type ClassicAdministrator struct { Properties *ClassicAdministratorProperties `json:"properties,omitempty"` } -// ClassicAdministratorListResult is classicAdministrator list result -// information. +// ClassicAdministratorListResult is classicAdministrator list result information. type ClassicAdministratorListResult struct { autorest.Response `json:"-"` Value *[]ClassicAdministrator `json:"value,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/permissions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/permissions.go index 36abbb9c2..4080bc871 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/permissions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/permissions.go @@ -14,9 +14,8 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,12 +23,10 @@ import ( "net/http" ) -// PermissionsClient is the role based access control provides you a way to -// apply granular level policy administration down to individual resources or -// resource groups. These operations enable you to manage role definitions and -// role assignments. A role definition describes the set of actions that can be -// performed on resources. A role assignment grants access to Azure Active -// Directory users. +// PermissionsClient is the role based access control provides you a way to apply granular level policy administration +// down to individual resources or resource groups. These operations enable you to manage role definitions and role +// assignments. A role definition describes the set of actions that can be performed on resources. A role assignment +// grants access to Azure Active Directory users. type PermissionsClient struct { ManagementClient } @@ -39,19 +36,17 @@ func NewPermissionsClient(subscriptionID string) PermissionsClient { return NewPermissionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient -// client. +// NewPermissionsClientWithBaseURI creates an instance of the PermissionsClient client. func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) PermissionsClient { return PermissionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListForResource gets all permissions the caller has for a resource. // -// resourceGroupName is the name of the resource group containing the resource. -// The name is case insensitive. resourceProviderNamespace is the namespace of -// the resource provider. parentResourcePath is the parent resource identity. -// resourceType is the resource type of the resource. resourceName is the name -// of the resource to get the permissions for. +// resourceGroupName is the name of the resource group containing the resource. The name is case insensitive. +// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource +// identity. resourceType is the resource type of the resource. resourceName is the name of the resource to get the +// permissions for. func (client PermissionsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResult, err error) { req, err := client.ListForResourcePreparer(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) if err != nil { @@ -141,11 +136,54 @@ func (client PermissionsClient) ListForResourceNextResults(lastResults Permissio return } -// ListForResourceGroup gets all permissions the caller has for a resource -// group. +// ListForResourceComplete gets all elements from the list without paging. +func (client PermissionsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, cancel <-chan struct{}) (<-chan Permission, <-chan error) { + resultChan := make(chan Permission) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListForResourceGroup gets all permissions the caller has for a resource group. // -// resourceGroupName is the name of the resource group to get the permissions -// for. The name is case insensitive. +// resourceGroupName is the name of the resource group to get the permissions for. The name is case insensitive. func (client PermissionsClient) ListForResourceGroup(resourceGroupName string) (result PermissionGetResult, err error) { req, err := client.ListForResourceGroupPreparer(resourceGroupName) if err != nil { @@ -230,3 +268,48 @@ func (client PermissionsClient) ListForResourceGroupNextResults(lastResults Perm return } + +// ListForResourceGroupComplete gets all elements from the list without paging. +func (client PermissionsClient) ListForResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Permission, <-chan error) { + resultChan := make(chan Permission) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/provideroperationsmetadata.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/provideroperationsmetadata.go index 5208637b5..9a8b85b3a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/provideroperationsmetadata.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/provideroperationsmetadata.go @@ -14,9 +14,8 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,28 @@ import ( "net/http" ) -// ProviderOperationsMetadataClient is the role based access control provides -// you a way to apply granular level policy administration down to individual -// resources or resource groups. These operations enable you to manage role -// definitions and role assignments. A role definition describes the set of -// actions that can be performed on resources. A role assignment grants access -// to Azure Active Directory users. +// ProviderOperationsMetadataClient is the role based access control provides you a way to apply granular level policy +// administration down to individual resources or resource groups. These operations enable you to manage role +// definitions and role assignments. A role definition describes the set of actions that can be performed on resources. +// A role assignment grants access to Azure Active Directory users. type ProviderOperationsMetadataClient struct { ManagementClient } -// NewProviderOperationsMetadataClient creates an instance of the -// ProviderOperationsMetadataClient client. +// NewProviderOperationsMetadataClient creates an instance of the ProviderOperationsMetadataClient client. func NewProviderOperationsMetadataClient(subscriptionID string) ProviderOperationsMetadataClient { return NewProviderOperationsMetadataClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the -// ProviderOperationsMetadataClient client. +// NewProviderOperationsMetadataClientWithBaseURI creates an instance of the ProviderOperationsMetadataClient client. func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscriptionID string) ProviderOperationsMetadataClient { return ProviderOperationsMetadataClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets provider operations metadata for the specified resource provider. // -// resourceProviderNamespace is the namespace of the resource provider. expand -// is specifies whether to expand the values. +// resourceProviderNamespace is the namespace of the resource provider. expand is specifies whether to expand the +// values. func (client ProviderOperationsMetadataClient) Get(resourceProviderNamespace string, expand string) (result ProviderOperationsMetadata, err error) { req, err := client.GetPreparer(resourceProviderNamespace, expand) if err != nil { @@ -198,3 +193,48 @@ func (client ProviderOperationsMetadataClient) ListNextResults(lastResults Provi return } + +// ListComplete gets all elements from the list without paging. +func (client ProviderOperationsMetadataClient) ListComplete(expand string, cancel <-chan struct{}) (<-chan ProviderOperationsMetadata, <-chan error) { + resultChan := make(chan ProviderOperationsMetadata) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(expand) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roleassignments.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roleassignments.go index 6f02c9550..6306b0e53 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roleassignments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roleassignments.go @@ -14,9 +14,8 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,39 +23,32 @@ import ( "net/http" ) -// RoleAssignmentsClient is the role based access control provides you a way to -// apply granular level policy administration down to individual resources or -// resource groups. These operations enable you to manage role definitions and -// role assignments. A role definition describes the set of actions that can be -// performed on resources. A role assignment grants access to Azure Active -// Directory users. +// RoleAssignmentsClient is the role based access control provides you a way to apply granular level policy +// administration down to individual resources or resource groups. These operations enable you to manage role +// definitions and role assignments. A role definition describes the set of actions that can be performed on resources. +// A role assignment grants access to Azure Active Directory users. type RoleAssignmentsClient struct { ManagementClient } -// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient -// client. +// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient client. func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the -// RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates a role assignment. // -// scope is the scope of the role assignment to create. The scope can be any -// REST resource instance. For example, use '/subscriptions/{subscription-id}/' -// for a subscription, -// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for -// a resource group, and +// scope is the scope of the role assignment to create. The scope can be any REST resource instance. For example, use +// '/subscriptions/{subscription-id}/' for a subscription, +// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and // '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' -// for a resource. roleAssignmentName is the name of the role assignment to -// create. It can be any valid GUID. parameters is parameters for the role -// assignment. +// for a resource. roleAssignmentName is the name of the role assignment to create. It can be any valid GUID. +// parameters is parameters for the role assignment. func (client RoleAssignmentsClient) Create(scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) { req, err := client.CreatePreparer(scope, roleAssignmentName, parameters) if err != nil { @@ -122,8 +114,7 @@ func (client RoleAssignmentsClient) CreateResponder(resp *http.Response) (result // CreateByID creates a role assignment by ID. // -// roleAssignmentID is the ID of the role assignment to create. parameters is -// parameters for the role assignment. +// roleAssignmentID is the ID of the role assignment to create. parameters is parameters for the role assignment. func (client RoleAssignmentsClient) CreateByID(roleAssignmentID string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) { req, err := client.CreateByIDPreparer(roleAssignmentID, parameters) if err != nil { @@ -188,8 +179,8 @@ func (client RoleAssignmentsClient) CreateByIDResponder(resp *http.Response) (re // Delete deletes a role assignment. // -// scope is the scope of the role assignment to delete. roleAssignmentName is -// the name of the role assignment to delete. +// scope is the scope of the role assignment to delete. roleAssignmentName is the name of the role assignment to +// delete. func (client RoleAssignmentsClient) Delete(scope string, roleAssignmentName string) (result RoleAssignment, err error) { req, err := client.DeletePreparer(scope, roleAssignmentName) if err != nil { @@ -316,8 +307,7 @@ func (client RoleAssignmentsClient) DeleteByIDResponder(resp *http.Response) (re // Get get the specified role assignment. // -// scope is the scope of the role assignment. roleAssignmentName is the name of -// the role assignment to get. +// scope is the scope of the role assignment. roleAssignmentName is the name of the role assignment to get. func (client RoleAssignmentsClient) Get(scope string, roleAssignmentName string) (result RoleAssignment, err error) { req, err := client.GetPreparer(scope, roleAssignmentName) if err != nil { @@ -444,10 +434,9 @@ func (client RoleAssignmentsClient) GetByIDResponder(resp *http.Response) (resul // List gets all role assignments for the subscription. // -// filter is the filter to apply on the operation. Use $filter=atScope() to -// return all role assignments at or above the scope. Use $filter=principalId -// eq {id} to return all role assignments at, above or below the scope for the -// specified principal. +// filter is the filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the +// scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified +// principal. func (client RoleAssignmentsClient) List(filter string) (result RoleAssignmentListResult, err error) { req, err := client.ListPreparer(filter) if err != nil { @@ -535,16 +524,58 @@ func (client RoleAssignmentsClient) ListNextResults(lastResults RoleAssignmentLi return } +// ListComplete gets all elements from the list without paging. +func (client RoleAssignmentsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) { + resultChan := make(chan RoleAssignment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListForResource gets role assignments for a resource. // -// resourceGroupName is the name of the resource group. -// resourceProviderNamespace is the namespace of the resource provider. -// parentResourcePath is the parent resource identity. resourceType is the -// resource type of the resource. resourceName is the name of the resource to -// get role assignments for. filter is the filter to apply on the operation. -// Use $filter=atScope() to return all role assignments at or above the scope. -// Use $filter=principalId eq {id} to return all role assignments at, above or -// below the scope for the specified principal. +// resourceGroupName is the name of the resource group. resourceProviderNamespace is the namespace of the resource +// provider. parentResourcePath is the parent resource identity. resourceType is the resource type of the resource. +// resourceName is the name of the resource to get role assignments for. filter is the filter to apply on the +// operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq +// {id} to return all role assignments at, above or below the scope for the specified principal. func (client RoleAssignmentsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResult, err error) { req, err := client.ListForResourcePreparer(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) if err != nil { @@ -637,12 +668,56 @@ func (client RoleAssignmentsClient) ListForResourceNextResults(lastResults RoleA return } +// ListForResourceComplete gets all elements from the list without paging. +func (client RoleAssignmentsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) { + resultChan := make(chan RoleAssignment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListForResourceGroup gets role assignments for a resource group. // -// resourceGroupName is the name of the resource group. filter is the filter to -// apply on the operation. Use $filter=atScope() to return all role assignments -// at or above the scope. Use $filter=principalId eq {id} to return all role -// assignments at, above or below the scope for the specified principal. +// resourceGroupName is the name of the resource group. filter is the filter to apply on the operation. Use +// $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return +// all role assignments at, above or below the scope for the specified principal. func (client RoleAssignmentsClient) ListForResourceGroup(resourceGroupName string, filter string) (result RoleAssignmentListResult, err error) { req, err := client.ListForResourceGroupPreparer(resourceGroupName, filter) if err != nil { @@ -731,12 +806,56 @@ func (client RoleAssignmentsClient) ListForResourceGroupNextResults(lastResults return } +// ListForResourceGroupComplete gets all elements from the list without paging. +func (client RoleAssignmentsClient) ListForResourceGroupComplete(resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) { + resultChan := make(chan RoleAssignment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResourceGroup(resourceGroupName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListForScope gets role assignments for a scope. // -// scope is the scope of the role assignments. filter is the filter to apply on -// the operation. Use $filter=atScope() to return all role assignments at or -// above the scope. Use $filter=principalId eq {id} to return all role -// assignments at, above or below the scope for the specified principal. +// scope is the scope of the role assignments. filter is the filter to apply on the operation. Use $filter=atScope() to +// return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments +// at, above or below the scope for the specified principal. func (client RoleAssignmentsClient) ListForScope(scope string, filter string) (result RoleAssignmentListResult, err error) { req, err := client.ListForScopePreparer(scope, filter) if err != nil { @@ -823,3 +942,48 @@ func (client RoleAssignmentsClient) ListForScopeNextResults(lastResults RoleAssi return } + +// ListForScopeComplete gets all elements from the list without paging. +func (client RoleAssignmentsClient) ListForScopeComplete(scope string, filter string, cancel <-chan struct{}) (<-chan RoleAssignment, <-chan error) { + resultChan := make(chan RoleAssignment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForScope(scope, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForScopeNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roledefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roledefinitions.go index cdd9efc22..2e48fdbe6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roledefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/roledefinitions.go @@ -14,9 +14,8 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,28 @@ import ( "net/http" ) -// RoleDefinitionsClient is the role based access control provides you a way to -// apply granular level policy administration down to individual resources or -// resource groups. These operations enable you to manage role definitions and -// role assignments. A role definition describes the set of actions that can be -// performed on resources. A role assignment grants access to Azure Active -// Directory users. +// RoleDefinitionsClient is the role based access control provides you a way to apply granular level policy +// administration down to individual resources or resource groups. These operations enable you to manage role +// definitions and role assignments. A role definition describes the set of actions that can be performed on resources. +// A role assignment grants access to Azure Active Directory users. type RoleDefinitionsClient struct { ManagementClient } -// NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient -// client. +// NewRoleDefinitionsClient creates an instance of the RoleDefinitionsClient client. func NewRoleDefinitionsClient(subscriptionID string) RoleDefinitionsClient { return NewRoleDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleDefinitionsClientWithBaseURI creates an instance of the -// RoleDefinitionsClient client. +// NewRoleDefinitionsClientWithBaseURI creates an instance of the RoleDefinitionsClient client. func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) RoleDefinitionsClient { return RoleDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a role definition. // -// scope is the scope of the role definition. roleDefinitionID is the ID of the -// role definition. roleDefinition is the values for the role definition. +// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition. roleDefinition is the +// values for the role definition. func (client RoleDefinitionsClient) CreateOrUpdate(scope string, roleDefinitionID string, roleDefinition RoleDefinition) (result RoleDefinition, err error) { req, err := client.CreateOrUpdatePreparer(scope, roleDefinitionID, roleDefinition) if err != nil { @@ -115,8 +110,7 @@ func (client RoleDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) // Delete deletes a role definition. // -// scope is the scope of the role definition. roleDefinitionID is the ID of the -// role definition to delete. +// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition to delete. func (client RoleDefinitionsClient) Delete(scope string, roleDefinitionID string) (result RoleDefinition, err error) { req, err := client.DeletePreparer(scope, roleDefinitionID) if err != nil { @@ -180,8 +174,7 @@ func (client RoleDefinitionsClient) DeleteResponder(resp *http.Response) (result // Get get role definition by name (GUID). // -// scope is the scope of the role definition. roleDefinitionID is the ID of the -// role definition. +// scope is the scope of the role definition. roleDefinitionID is the ID of the role definition. func (client RoleDefinitionsClient) Get(scope string, roleDefinitionID string) (result RoleDefinition, err error) { req, err := client.GetPreparer(scope, roleDefinitionID) if err != nil { @@ -308,9 +301,8 @@ func (client RoleDefinitionsClient) GetByIDResponder(resp *http.Response) (resul // List get all role definitions that are applicable at scope and above. // -// scope is the scope of the role definition. filter is the filter to apply on -// the operation. Use atScopeAndBelow filter to search below the given scope as -// well. +// scope is the scope of the role definition. filter is the filter to apply on the operation. Use atScopeAndBelow +// filter to search below the given scope as well. func (client RoleDefinitionsClient) List(scope string, filter string) (result RoleDefinitionListResult, err error) { req, err := client.ListPreparer(scope, filter) if err != nil { @@ -397,3 +389,48 @@ func (client RoleDefinitionsClient) ListNextResults(lastResults RoleDefinitionLi return } + +// ListComplete gets all elements from the list without paging. +func (client RoleDefinitionsClient) ListComplete(scope string, filter string, cancel <-chan struct{}) (<-chan RoleDefinition, <-chan error) { + resultChan := make(chan RoleDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(scope, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go index 63783b42f..e41d47609 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/authorization/version.go @@ -14,15 +14,15 @@ package authorization // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-authorization/2015-07-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-authorization/2015-07-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/account.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/account.go index e651973d5..9441db5b4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/account.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/account.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// AccountClient is the composite Swagger json for Azure Automation Client +// AccountClient is the automation Client type AccountClient struct { ManagementClient } @@ -42,9 +41,8 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC // CreateOrUpdate create or update automation account. // -// resourceGroupName is the resource group name. automationAccountName is -// parameters supplied to the create or update automation account. parameters -// is parameters supplied to the create or update automation account. +// resourceGroupName is the resource group name. automationAccountName is parameters supplied to the create or update +// automation account. parameters is parameters supplied to the create or update automation account. func (client AccountClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, parameters AccountCreateOrUpdateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -117,8 +115,7 @@ func (client AccountClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete an automation account. // -// resourceGroupName is the resource group name. automationAccountName is -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is automation account name. func (client AccountClient) Delete(resourceGroupName string, automationAccountName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -188,8 +185,7 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores // Get get information about an Automation Account. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client AccountClient) Get(resourceGroupName string, automationAccountName string) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -343,8 +339,52 @@ func (client AccountClient) ListNextResults(lastResults AccountListResult) (resu return } -// ListByResourceGroup retrieve a list of accounts within a given resource -// group. +// ListComplete gets all elements from the list without paging. +func (client AccountClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error) { + resultChan := make(chan Account) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup retrieve a list of accounts within a given resource group. // // resourceGroupName is the resource group name. func (client AccountClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) { @@ -438,11 +478,55 @@ func (client AccountClient) ListByResourceGroupNextResults(lastResults AccountLi return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AccountClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error) { + resultChan := make(chan Account) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update an automation account. // -// resourceGroupName is the resource group name. automationAccountName is -// automation account name. parameters is parameters supplied to the update -// automation account. +// resourceGroupName is the resource group name. automationAccountName is automation account name. parameters is +// parameters supplied to the update automation account. func (client AccountClient) Update(resourceGroupName string, automationAccountName string, parameters AccountUpdateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/activity.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/activity.go index a103e5544..4e865773d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/activity.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/activity.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// ActivityClient is the composite Swagger json for Azure Automation Client +// ActivityClient is the automation Client type ActivityClient struct { ManagementClient } @@ -35,18 +34,15 @@ func NewActivityClient(subscriptionID string) ActivityClient { return NewActivityClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityClientWithBaseURI creates an instance of the ActivityClient -// client. +// NewActivityClientWithBaseURI creates an instance of the ActivityClient client. func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) ActivityClient { return ActivityClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get retrieve the activity in the module identified by module name and -// activity name. +// Get retrieve the activity in the module identified by module name and activity name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the name of module. activityName is -// the name of activity. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the name of module. activityName is the name of activity. func (client ActivityClient) Get(resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result Activity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -117,11 +113,10 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity, return } -// ListByModule retrieve a list of activities in the module identified by -// module name. +// ListByModule retrieve a list of activities in the module identified by module name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the name of module. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the name of module. func (client ActivityClient) ListByModule(resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -214,3 +209,48 @@ func (client ActivityClient) ListByModuleNextResults(lastResults ActivityListRes return } + +// ListByModuleComplete gets all elements from the list without paging. +func (client ActivityClient) ListByModuleComplete(resourceGroupName string, automationAccountName string, moduleName string, cancel <-chan struct{}) (<-chan Activity, <-chan error) { + resultChan := make(chan Activity) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByModule(resourceGroupName, automationAccountName, moduleName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByModuleNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/agentregistrationinformation.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/agentregistrationinformation.go index 02d16325c..996d67d7b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/agentregistrationinformation.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/agentregistrationinformation.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,28 +24,25 @@ import ( "net/http" ) -// AgentRegistrationInformationClient is the composite Swagger json for Azure -// Automation Client +// AgentRegistrationInformationClient is the automation Client type AgentRegistrationInformationClient struct { ManagementClient } -// NewAgentRegistrationInformationClient creates an instance of the -// AgentRegistrationInformationClient client. +// NewAgentRegistrationInformationClient creates an instance of the AgentRegistrationInformationClient client. func NewAgentRegistrationInformationClient(subscriptionID string) AgentRegistrationInformationClient { return NewAgentRegistrationInformationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgentRegistrationInformationClientWithBaseURI creates an instance of the -// AgentRegistrationInformationClient client. +// NewAgentRegistrationInformationClientWithBaseURI creates an instance of the AgentRegistrationInformationClient +// client. func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscriptionID string) AgentRegistrationInformationClient { return AgentRegistrationInformationClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the automation agent registration information. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client AgentRegistrationInformationClient) Get(resourceGroupName string, automationAccountName string) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -117,9 +113,8 @@ func (client AgentRegistrationInformationClient) GetResponder(resp *http.Respons // RegenerateKey regenerate a primary or secondary agent registration key // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. parameters is the name of the agent registration -// key to be regenerated +// resourceGroupName is the resource group name. automationAccountName is the automation account name. parameters is +// the name of the agent registration key to be regenerated func (client AgentRegistrationInformationClient) RegenerateKey(resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/certificate.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/certificate.go index 368c73d49..db2055ad6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/certificate.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/certificate.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// CertificateClient is the composite Swagger json for Azure Automation Client +// CertificateClient is the automation Client type CertificateClient struct { ManagementClient } @@ -35,18 +34,16 @@ func NewCertificateClient(subscriptionID string) CertificateClient { return NewCertificateClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificateClientWithBaseURI creates an instance of the CertificateClient -// client. +// NewCertificateClientWithBaseURI creates an instance of the CertificateClient client. func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) CertificateClient { return CertificateClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a certificate. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. certificateName is the parameters supplied to the -// create or update certificate operation. parameters is the parameters -// supplied to the create or update certificate operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName +// is the parameters supplied to the create or update certificate operation. parameters is the parameters supplied to +// the create or update certificate operation. func (client CertificateClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -124,8 +121,8 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re // Delete delete the certificate. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. certificateName is the name of certificate. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName +// is the name of certificate. func (client CertificateClient) Delete(resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -196,8 +193,8 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the certificate identified by certificate name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. certificateName is the name of certificate. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName +// is the name of certificate. func (client CertificateClient) Get(resourceGroupName string, automationAccountName string, certificateName string) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -269,8 +266,7 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif // ListByAutomationAccount retrieve a list of certificates. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client CertificateClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result CertificateListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -363,12 +359,56 @@ func (client CertificateClient) ListByAutomationAccountNextResults(lastResults C return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client CertificateClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Certificate, <-chan error) { + resultChan := make(chan Certificate) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update a certificate. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. certificateName is the parameters supplied to the -// update certificate operation. parameters is the parameters supplied to the -// update certificate operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. certificateName +// is the parameters supplied to the update certificate operation. parameters is the parameters supplied to the update +// certificate operation. func (client CertificateClient) Update(resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/client.go index 4d2bf5c16..4628235a2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/client.go @@ -1,6 +1,6 @@ -// Package automation implements the Azure ARM Automation service API version . +// Package automation implements the Azure ARM Automation service API version 2015-10-31. // -// Composite Swagger json for Azure Automation Client +// Automation Client package automation // Copyright (c) Microsoft and contributors. All rights reserved. @@ -17,9 +17,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connection.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connection.go index 7d3300e5d..8b97ce82a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connection.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connection.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// ConnectionClient is the composite Swagger json for Azure Automation Client +// ConnectionClient is the automation Client type ConnectionClient struct { ManagementClient } @@ -35,18 +34,16 @@ func NewConnectionClient(subscriptionID string) ConnectionClient { return NewConnectionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient -// client. +// NewConnectionClientWithBaseURI creates an instance of the ConnectionClient client. func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) ConnectionClient { return ConnectionClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a connection. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. connectionName is the parameters supplied to the -// create or update connection operation. parameters is the parameters supplied -// to the create or update connection operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName +// is the parameters supplied to the create or update connection operation. parameters is the parameters supplied to +// the create or update connection operation. func (client ConnectionClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -124,8 +121,8 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the connection. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. connectionName is the name of connection. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName +// is the name of connection. func (client ConnectionClient) Delete(resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -197,8 +194,8 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn // Get retrieve the connection identified by connection name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. connectionName is the name of connection. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName +// is the name of connection. func (client ConnectionClient) Get(resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -270,8 +267,7 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect // ListByAutomationAccount retrieve a list of connections. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client ConnectionClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ConnectionListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -364,12 +360,56 @@ func (client ConnectionClient) ListByAutomationAccountNextResults(lastResults Co return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client ConnectionClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Connection, <-chan error) { + resultChan := make(chan Connection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update a connection. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. connectionName is the parameters supplied to the -// update a connection operation. parameters is the parameters supplied to the -// update a connection operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. connectionName +// is the parameters supplied to the update a connection operation. parameters is the parameters supplied to the update +// a connection operation. func (client ConnectionClient) Update(resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connectiontype.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connectiontype.go index 5e2effaf2..94e88e98b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connectiontype.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/connectiontype.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,30 +24,26 @@ import ( "net/http" ) -// ConnectionTypeClient is the composite Swagger json for Azure Automation -// Client +// ConnectionTypeClient is the automation Client type ConnectionTypeClient struct { ManagementClient } -// NewConnectionTypeClient creates an instance of the ConnectionTypeClient -// client. +// NewConnectionTypeClient creates an instance of the ConnectionTypeClient client. func NewConnectionTypeClient(subscriptionID string) ConnectionTypeClient { return NewConnectionTypeClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectionTypeClientWithBaseURI creates an instance of the -// ConnectionTypeClient client. +// NewConnectionTypeClientWithBaseURI creates an instance of the ConnectionTypeClient client. func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) ConnectionTypeClient { return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a connectiontype. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. connectionTypeName is the parameters supplied to -// the create or update connectiontype operation. parameters is the parameters -// supplied to the create or update connectiontype operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the parameters supplied to the create or update connectiontype operation. parameters is the +// parameters supplied to the create or update connectiontype operation. func (client ConnectionTypeClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -126,8 +121,8 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete the connectiontype. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. connectionTypeName is the name of connectiontype. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the name of connectiontype. func (client ConnectionTypeClient) Delete(resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -198,8 +193,8 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result // Get retrieve the connectiontype identified by connectiontype name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. connectionTypeName is the name of connectiontype. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// connectionTypeName is the name of connectiontype. func (client ConnectionTypeClient) Get(resourceGroupName string, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -271,8 +266,7 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con // ListByAutomationAccount retrieve a list of connectiontypes. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client ConnectionTypeClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ConnectionTypeListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -364,3 +358,48 @@ func (client ConnectionTypeClient) ListByAutomationAccountNextResults(lastResult return } + +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client ConnectionTypeClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan ConnectionType, <-chan error) { + resultChan := make(chan ConnectionType) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/credential.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/credential.go index 5834f6ac0..60acf2320 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/credential.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/credential.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// CredentialClient is the composite Swagger json for Azure Automation Client +// CredentialClient is the automation Client type CredentialClient struct { ManagementClient } @@ -35,18 +34,16 @@ func NewCredentialClient(subscriptionID string) CredentialClient { return NewCredentialClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCredentialClientWithBaseURI creates an instance of the CredentialClient -// client. +// NewCredentialClientWithBaseURI creates an instance of the CredentialClient client. func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) CredentialClient { return CredentialClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a credential. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. credentialName is the parameters supplied to the -// create or update credential operation. parameters is the parameters supplied -// to the create or update credential operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName +// is the parameters supplied to the create or update credential operation. parameters is the parameters supplied to +// the create or update credential operation. func (client CredentialClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -126,8 +123,8 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete delete the credential. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. credentialName is the name of credential. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName +// is the name of credential. func (client CredentialClient) Delete(resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -198,8 +195,8 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto // Get retrieve the credential identified by credential name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. credentialName is the name of credential. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName +// is the name of credential. func (client CredentialClient) Get(resourceGroupName string, automationAccountName string, credentialName string) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -271,8 +268,7 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent // ListByAutomationAccount retrieve a list of credentials. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client CredentialClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result CredentialListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -365,12 +361,56 @@ func (client CredentialClient) ListByAutomationAccountNextResults(lastResults Cr return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client CredentialClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Credential, <-chan error) { + resultChan := make(chan Credential) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update a credential. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. credentialName is the parameters supplied to the -// Update credential operation. parameters is the parameters supplied to the -// Update credential operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. credentialName +// is the parameters supplied to the Update credential operation. parameters is the parameters supplied to the Update +// credential operation. func (client CredentialClient) Update(resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dsccompilationjob.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dsccompilationjob.go index 15fe2346d..67bd24f73 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dsccompilationjob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dsccompilationjob.go @@ -14,42 +14,36 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// DscCompilationJobClient is the composite Swagger json for Azure Automation -// Client +// DscCompilationJobClient is the automation Client type DscCompilationJobClient struct { ManagementClient } -// NewDscCompilationJobClient creates an instance of the -// DscCompilationJobClient client. +// NewDscCompilationJobClient creates an instance of the DscCompilationJobClient client. func NewDscCompilationJobClient(subscriptionID string) DscCompilationJobClient { return NewDscCompilationJobClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscCompilationJobClientWithBaseURI creates an instance of the -// DscCompilationJobClient client. +// NewDscCompilationJobClientWithBaseURI creates an instance of the DscCompilationJobClient client. func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string) DscCompilationJobClient { return DscCompilationJobClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates the Dsc compilation job of the configuration. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. compilationJobID is the the DSC configuration Id. -// parameters is the parameters supplied to the create compilation job -// operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. compilationJobID +// is the the DSC configuration Id. parameters is the parameters supplied to the create compilation job operation. func (client DscCompilationJobClient) Create(resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -126,9 +120,8 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu // Get retrieve the Dsc configuration compilation job identified by job id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. compilationJobID is the Dsc configuration -// compilation job id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. compilationJobID +// is the Dsc configuration compilation job id. func (client DscCompilationJobClient) Get(resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -200,9 +193,8 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result // GetStream retrieve the job stream identified by job stream id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. jobStreamID is the job stream -// id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. jobStreamID is the job stream id. func (client DscCompilationJobClient) GetStream(resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -275,8 +267,8 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of dsc compilation jobs. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the +// filter to apply on the operation. func (client DscCompilationJobClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -371,3 +363,48 @@ func (client DscCompilationJobClient) ListByAutomationAccountNextResults(lastRes return } + +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client DscCompilationJobClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscCompilationJob, <-chan error) { + resultChan := make(chan DscCompilationJob) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscconfiguration.go index 88a8fd845..c3af83ba2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscconfiguration.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,30 +24,26 @@ import ( "net/http" ) -// DscConfigurationClient is the composite Swagger json for Azure Automation -// Client +// DscConfigurationClient is the automation Client type DscConfigurationClient struct { ManagementClient } -// NewDscConfigurationClient creates an instance of the DscConfigurationClient -// client. +// NewDscConfigurationClient creates an instance of the DscConfigurationClient client. func NewDscConfigurationClient(subscriptionID string) DscConfigurationClient { return NewDscConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscConfigurationClientWithBaseURI creates an instance of the -// DscConfigurationClient client. +// NewDscConfigurationClientWithBaseURI creates an instance of the DscConfigurationClient client. func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscConfigurationClient { return DscConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create the configuration identified by configuration name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. configurationName is the create or update -// parameters for configuration. parameters is the create or update parameters -// for configuration. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the create or update parameters for configuration. parameters is the create or update +// parameters for configuration. func (client DscConfigurationClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -131,8 +126,8 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response // Delete delete the dsc configuration identified by configuration name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. configurationName is the configuration name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. func (client DscConfigurationClient) Delete(resourceGroupName string, automationAccountName string, configurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -203,8 +198,8 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul // Get retrieve the configuration identified by configuration name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. configurationName is the configuration name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. func (client DscConfigurationClient) Get(resourceGroupName string, automationAccountName string, configurationName string) (result DscConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -274,11 +269,10 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D return } -// GetContent retrieve the configuration script identified by configuration -// name. +// GetContent retrieve the configuration script identified by configuration name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. configurationName is the configuration name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// configurationName is the configuration name. func (client DscConfigurationClient) GetContent(resourceGroupName string, automationAccountName string, configurationName string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -349,8 +343,7 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r // ListByAutomationAccount retrieve a list of configurations. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client DscConfigurationClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result DscConfigurationListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -442,3 +435,48 @@ func (client DscConfigurationClient) ListByAutomationAccountNextResults(lastResu return } + +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client DscConfigurationClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan DscConfiguration, <-chan error) { + resultChan := make(chan DscConfiguration) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnode.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnode.go index fbeb848b1..36aca87a9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnode.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnode.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// DscNodeClient is the composite Swagger json for Azure Automation Client +// DscNodeClient is the automation Client type DscNodeClient struct { ManagementClient } @@ -42,8 +41,8 @@ func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeC // Delete delete the dsc node identified by node id. // -// resourceGroupName is the resource group name. automationAccountName is -// automation account name. nodeID is the node id. +// resourceGroupName is the resource group name. automationAccountName is automation account name. nodeID is the node +// id. func (client DscNodeClient) Delete(resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -115,8 +114,8 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode // Get retrieve the dsc node identified by node id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeID is the node id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the +// node id. func (client DscNodeClient) Get(resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -188,8 +187,8 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e // ListByAutomationAccount retrieve a list of dsc nodes. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the +// filter to apply on the operation. func (client DscNodeClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -285,11 +284,55 @@ func (client DscNodeClient) ListByAutomationAccountNextResults(lastResults DscNo return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client DscNodeClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscNode, <-chan error) { + resultChan := make(chan DscNode) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update the dsc node. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeID is parameters supplied to the update dsc -// node. parameters is parameters supplied to the update dsc node. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is +// parameters supplied to the update dsc node. parameters is parameters supplied to the update dsc node. func (client DscNodeClient) Update(resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnodeconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnodeconfiguration.go index 32c31ea07..02449cd41 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnodeconfiguration.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/dscnodeconfiguration.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,26 @@ import ( "net/http" ) -// DscNodeConfigurationClient is the composite Swagger json for Azure -// Automation Client +// DscNodeConfigurationClient is the automation Client type DscNodeConfigurationClient struct { ManagementClient } -// NewDscNodeConfigurationClient creates an instance of the -// DscNodeConfigurationClient client. +// NewDscNodeConfigurationClient creates an instance of the DscNodeConfigurationClient client. func NewDscNodeConfigurationClient(subscriptionID string) DscNodeConfigurationClient { return NewDscNodeConfigurationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDscNodeConfigurationClientWithBaseURI creates an instance of the -// DscNodeConfigurationClient client. +// NewDscNodeConfigurationClientWithBaseURI creates an instance of the DscNodeConfigurationClient client. func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID string) DscNodeConfigurationClient { return DscNodeConfigurationClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create the node configuration identified by node -// configuration name. +// CreateOrUpdate create the node configuration identified by node configuration name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeConfigurationName is the create or update -// parameters for configuration. parameters is the create or update parameters -// for configuration. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the create or update parameters for configuration. parameters is the create or update +// parameters for configuration. func (client DscNodeConfigurationClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -132,9 +126,8 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp // Delete delete the Dsc node configurations by node configuration. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeConfigurationName is the Dsc node configuration -// name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the Dsc node configuration name. func (client DscNodeConfigurationClient) Delete(resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -205,9 +198,8 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r // Get retrieve the Dsc node configurations by node configuration. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeConfigurationName is the Dsc node configuration -// name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// nodeConfigurationName is the Dsc node configuration name. func (client DscNodeConfigurationClient) Get(resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -279,8 +271,8 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu // ListByAutomationAccount retrieve a list of dsc node configurations. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the +// filter to apply on the operation. func (client DscNodeConfigurationClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -375,3 +367,48 @@ func (client DscNodeConfigurationClient) ListByAutomationAccountNextResults(last return } + +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan DscNodeConfiguration, <-chan error) { + resultChan := make(chan DscNodeConfiguration) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/fields.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/fields.go index ef597c0fb..a8ac3c060 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/fields.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/fields.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// FieldsClient is the composite Swagger json for Azure Automation Client +// FieldsClient is the automation Client type FieldsClient struct { ManagementClient } @@ -40,12 +39,10 @@ func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsCli return FieldsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// ListByType retrieve a list of fields of a given type identified by module -// name. +// ListByType retrieve a list of fields of a given type identified by module name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the name of module. typeName is the -// name of type. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the name of module. typeName is the name of type. func (client FieldsClient) ListByType(resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/hybridrunbookworkergroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/hybridrunbookworkergroup.go index b36eb3b68..b3701a1ed 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/hybridrunbookworkergroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/hybridrunbookworkergroup.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,29 +24,25 @@ import ( "net/http" ) -// HybridRunbookWorkerGroupClient is the composite Swagger json for Azure -// Automation Client +// HybridRunbookWorkerGroupClient is the automation Client type HybridRunbookWorkerGroupClient struct { ManagementClient } -// NewHybridRunbookWorkerGroupClient creates an instance of the -// HybridRunbookWorkerGroupClient client. +// NewHybridRunbookWorkerGroupClient creates an instance of the HybridRunbookWorkerGroupClient client. func NewHybridRunbookWorkerGroupClient(subscriptionID string) HybridRunbookWorkerGroupClient { return NewHybridRunbookWorkerGroupClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the -// HybridRunbookWorkerGroupClient client. +// NewHybridRunbookWorkerGroupClientWithBaseURI creates an instance of the HybridRunbookWorkerGroupClient client. func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID string) HybridRunbookWorkerGroupClient { return HybridRunbookWorkerGroupClient{NewWithBaseURI(baseURI, subscriptionID)} } // Delete delete a hybrid runbook worker group. // -// resourceGroupName is the resource group name. automationAccountName is -// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook -// worker group name +// resourceGroupName is the resource group name. automationAccountName is automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name func (client HybridRunbookWorkerGroupClient) Delete(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -118,9 +113,8 @@ func (client HybridRunbookWorkerGroupClient) DeleteResponder(resp *http.Response // Get retrieve a hybrid runbook worker group. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook -// worker group name +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name func (client HybridRunbookWorkerGroupClient) Get(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -192,8 +186,7 @@ func (client HybridRunbookWorkerGroupClient) GetResponder(resp *http.Response) ( // ListByAutomationAccount retrieve a list of hybrid runbook worker groups. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result HybridRunbookWorkerGroupsListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -286,11 +279,55 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountNextResults( return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan HybridRunbookWorkerGroup, <-chan error) { + resultChan := make(chan HybridRunbookWorkerGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update a hybrid runbook worker group. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. hybridRunbookWorkerGroupName is the hybrid runbook -// worker group name parameters is the hybrid runbook worker group +// resourceGroupName is the resource group name. automationAccountName is the automation account name. +// hybridRunbookWorkerGroupName is the hybrid runbook worker group name parameters is the hybrid runbook worker group func (client HybridRunbookWorkerGroupClient) Update(resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/job.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/job.go index d1257ab97..b99b38396 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/job.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/job.go @@ -14,19 +14,18 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// JobClient is the composite Swagger json for Azure Automation Client +// JobClient is the automation Client type JobClient struct { ManagementClient } @@ -43,9 +42,8 @@ func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient { // Create create a job of the runbook. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. parameters is the parameters -// supplied to the create job operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. parameters is the parameters supplied to the create job operation. func (client JobClient) Create(resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (result Job, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -122,8 +120,8 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er // Get retrieve the job identified by job id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. func (client JobClient) Get(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result Job, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -195,8 +193,8 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error // GetOutput retrieve the job output identified by job id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. func (client JobClient) GetOutput(resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -265,11 +263,10 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result ReadClos return } -// GetRunbookContent retrieve the runbook content of the job identified by job -// id. +// GetRunbookContent retrieve the runbook content of the job identified by job id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. func (client JobClient) GetRunbookContent(resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -340,8 +337,8 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result // ListByAutomationAccount retrieve a list of jobs. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the +// filter to apply on the operation. func (client JobClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result JobListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -437,10 +434,55 @@ func (client JobClient) ListByAutomationAccountNextResults(lastResults JobListRe return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client JobClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan Job, <-chan error) { + resultChan := make(chan Job) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Resume resume the job identified by jobId. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. func (client JobClient) Resume(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -511,8 +553,8 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re // Stop stop the job identified by jobId. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. func (client JobClient) Stop(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -583,8 +625,8 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp // Suspend suspend the job identified by jobId. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. func (client JobClient) Suspend(resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobschedule.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobschedule.go index a10ec7dba..519223f97 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobschedule.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobschedule.go @@ -14,19 +14,18 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// JobScheduleClient is the composite Swagger json for Azure Automation Client +// JobScheduleClient is the automation Client type JobScheduleClient struct { ManagementClient } @@ -36,17 +35,15 @@ func NewJobScheduleClient(subscriptionID string) JobScheduleClient { return NewJobScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient -// client. +// NewJobScheduleClientWithBaseURI creates an instance of the JobScheduleClient client. func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobScheduleClient { return JobScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a job schedule. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobScheduleID is the job schedule name. parameters -// is the parameters supplied to the create job schedule operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is +// the job schedule name. parameters is the parameters supplied to the create job schedule operation. func (client JobScheduleClient) Create(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -125,8 +122,8 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job // Delete delete the job schedule identified by job schedule name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobScheduleID is the job schedule name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is +// the job schedule name. func (client JobScheduleClient) Delete(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -197,8 +194,8 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut // Get retrieve the job schedule identified by job schedule name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobScheduleID is the job schedule name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobScheduleID is +// the job schedule name. func (client JobScheduleClient) Get(resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -270,8 +267,7 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch // ListByAutomationAccount retrieve a list of job schedules. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client JobScheduleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result JobScheduleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -363,3 +359,48 @@ func (client JobScheduleClient) ListByAutomationAccountNextResults(lastResults J return } + +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client JobScheduleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan JobSchedule, <-chan error) { + resultChan := make(chan JobSchedule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobstream.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobstream.go index 95b497598..641c7558d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobstream.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/jobstream.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// JobStreamClient is the composite Swagger json for Azure Automation Client +// JobStreamClient is the automation Client type JobStreamClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewJobStreamClient(subscriptionID string) JobStreamClient { return NewJobStreamClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient -// client. +// NewJobStreamClientWithBaseURI creates an instance of the JobStreamClient client. func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStreamClient { return JobStreamClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the job stream identified by job stream id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job id. jobStreamID is the job stream -// id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// id. jobStreamID is the job stream id. func (client JobStreamClient) Get(resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -118,9 +115,8 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea // ListByJob retrieve a list of jobs streams identified by job id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. jobID is the job Id. filter is the filter to apply -// on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. jobID is the job +// Id. filter is the filter to apply on the operation. func (client JobStreamClient) ListByJob(resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -216,3 +212,48 @@ func (client JobStreamClient) ListByJobNextResults(lastResults JobStreamListResu return } + +// ListByJobComplete gets all elements from the list without paging. +func (client JobStreamClient) ListByJobComplete(resourceGroupName string, automationAccountName string, jobID string, filter string, cancel <-chan struct{}) (<-chan JobStream, <-chan error) { + resultChan := make(chan JobStream) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByJob(resourceGroupName, automationAccountName, jobID, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByJobNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/models.go index 9bba30646..ed9cbb998 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/models.go @@ -14,15 +14,14 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "io" "net/http" ) @@ -39,8 +38,7 @@ const ( Unavailable AccountState = "Unavailable" ) -// AgentRegistrationKeyName enumerates the values for agent registration key -// name. +// AgentRegistrationKeyName enumerates the values for agent registration key name. type AgentRegistrationKeyName string const ( @@ -54,20 +52,17 @@ const ( type ContentSourceType string const ( - // EmbeddedContent specifies the embedded content state for content source - // type. + // EmbeddedContent specifies the embedded content state for content source type. EmbeddedContent ContentSourceType = "embeddedContent" // URI specifies the uri state for content source type. URI ContentSourceType = "uri" ) -// DscConfigurationProvisioningState enumerates the values for dsc -// configuration provisioning state. +// DscConfigurationProvisioningState enumerates the values for dsc configuration provisioning state. type DscConfigurationProvisioningState string const ( - // Succeeded specifies the succeeded state for dsc configuration - // provisioning state. + // Succeeded specifies the succeeded state for dsc configuration provisioning state. Succeeded DscConfigurationProvisioningState = "Succeeded" ) @@ -75,14 +70,11 @@ const ( type DscConfigurationState string const ( - // DscConfigurationStateEdit specifies the dsc configuration state edit - // state for dsc configuration state. + // DscConfigurationStateEdit specifies the dsc configuration state edit state for dsc configuration state. DscConfigurationStateEdit DscConfigurationState = "Edit" - // DscConfigurationStateNew specifies the dsc configuration state new state - // for dsc configuration state. + // DscConfigurationStateNew specifies the dsc configuration state new state for dsc configuration state. DscConfigurationStateNew DscConfigurationState = "New" - // DscConfigurationStatePublished specifies the dsc configuration state - // published state for dsc configuration state. + // DscConfigurationStatePublished specifies the dsc configuration state published state for dsc configuration state. DscConfigurationStatePublished DscConfigurationState = "Published" ) @@ -104,8 +96,7 @@ const ( Continue HTTPStatusCode = "Continue" // Created specifies the created state for http status code. Created HTTPStatusCode = "Created" - // ExpectationFailed specifies the expectation failed state for http status - // code. + // ExpectationFailed specifies the expectation failed state for http status code. ExpectationFailed HTTPStatusCode = "ExpectationFailed" // Forbidden specifies the forbidden state for http status code. Forbidden HTTPStatusCode = "Forbidden" @@ -115,29 +106,23 @@ const ( GatewayTimeout HTTPStatusCode = "GatewayTimeout" // Gone specifies the gone state for http status code. Gone HTTPStatusCode = "Gone" - // HTTPVersionNotSupported specifies the http version not supported state - // for http status code. + // HTTPVersionNotSupported specifies the http version not supported state for http status code. HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" - // InternalServerError specifies the internal server error state for http - // status code. + // InternalServerError specifies the internal server error state for http status code. InternalServerError HTTPStatusCode = "InternalServerError" // LengthRequired specifies the length required state for http status code. LengthRequired HTTPStatusCode = "LengthRequired" - // MethodNotAllowed specifies the method not allowed state for http status - // code. + // MethodNotAllowed specifies the method not allowed state for http status code. MethodNotAllowed HTTPStatusCode = "MethodNotAllowed" // Moved specifies the moved state for http status code. Moved HTTPStatusCode = "Moved" - // MovedPermanently specifies the moved permanently state for http status - // code. + // MovedPermanently specifies the moved permanently state for http status code. MovedPermanently HTTPStatusCode = "MovedPermanently" - // MultipleChoices specifies the multiple choices state for http status - // code. + // MultipleChoices specifies the multiple choices state for http status code. MultipleChoices HTTPStatusCode = "MultipleChoices" // NoContent specifies the no content state for http status code. NoContent HTTPStatusCode = "NoContent" - // NonAuthoritativeInformation specifies the non authoritative information - // state for http status code. + // NonAuthoritativeInformation specifies the non authoritative information state for http status code. NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" // NotAcceptable specifies the not acceptable state for http status code. NotAcceptable HTTPStatusCode = "NotAcceptable" @@ -151,55 +136,43 @@ const ( OK HTTPStatusCode = "OK" // PartialContent specifies the partial content state for http status code. PartialContent HTTPStatusCode = "PartialContent" - // PaymentRequired specifies the payment required state for http status - // code. + // PaymentRequired specifies the payment required state for http status code. PaymentRequired HTTPStatusCode = "PaymentRequired" - // PreconditionFailed specifies the precondition failed state for http - // status code. + // PreconditionFailed specifies the precondition failed state for http status code. PreconditionFailed HTTPStatusCode = "PreconditionFailed" - // ProxyAuthenticationRequired specifies the proxy authentication required - // state for http status code. + // ProxyAuthenticationRequired specifies the proxy authentication required state for http status code. ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" // Redirect specifies the redirect state for http status code. Redirect HTTPStatusCode = "Redirect" - // RedirectKeepVerb specifies the redirect keep verb state for http status - // code. + // RedirectKeepVerb specifies the redirect keep verb state for http status code. RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" // RedirectMethod specifies the redirect method state for http status code. RedirectMethod HTTPStatusCode = "RedirectMethod" - // RequestedRangeNotSatisfiable specifies the requested range not - // satisfiable state for http status code. + // RequestedRangeNotSatisfiable specifies the requested range not satisfiable state for http status code. RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" - // RequestEntityTooLarge specifies the request entity too large state for - // http status code. + // RequestEntityTooLarge specifies the request entity too large state for http status code. RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" // RequestTimeout specifies the request timeout state for http status code. RequestTimeout HTTPStatusCode = "RequestTimeout" - // RequestURITooLong specifies the request uri too long state for http - // status code. + // RequestURITooLong specifies the request uri too long state for http status code. RequestURITooLong HTTPStatusCode = "RequestUriTooLong" // ResetContent specifies the reset content state for http status code. ResetContent HTTPStatusCode = "ResetContent" // SeeOther specifies the see other state for http status code. SeeOther HTTPStatusCode = "SeeOther" - // ServiceUnavailable specifies the service unavailable state for http - // status code. + // ServiceUnavailable specifies the service unavailable state for http status code. ServiceUnavailable HTTPStatusCode = "ServiceUnavailable" - // SwitchingProtocols specifies the switching protocols state for http - // status code. + // SwitchingProtocols specifies the switching protocols state for http status code. SwitchingProtocols HTTPStatusCode = "SwitchingProtocols" - // TemporaryRedirect specifies the temporary redirect state for http status - // code. + // TemporaryRedirect specifies the temporary redirect state for http status code. TemporaryRedirect HTTPStatusCode = "TemporaryRedirect" // Unauthorized specifies the unauthorized state for http status code. Unauthorized HTTPStatusCode = "Unauthorized" - // UnsupportedMediaType specifies the unsupported media type state for http - // status code. + // UnsupportedMediaType specifies the unsupported media type state for http status code. UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" // Unused specifies the unused state for http status code. Unused HTTPStatusCode = "Unused" - // UpgradeRequired specifies the upgrade required state for http status - // code. + // UpgradeRequired specifies the upgrade required state for http status code. UpgradeRequired HTTPStatusCode = "UpgradeRequired" // UseProxy specifies the use proxy state for http status code. UseProxy HTTPStatusCode = "UseProxy" @@ -209,39 +182,31 @@ const ( type JobStatus string const ( - // JobStatusActivating specifies the job status activating state for job - // status. + // JobStatusActivating specifies the job status activating state for job status. JobStatusActivating JobStatus = "Activating" // JobStatusBlocked specifies the job status blocked state for job status. JobStatusBlocked JobStatus = "Blocked" - // JobStatusCompleted specifies the job status completed state for job - // status. + // JobStatusCompleted specifies the job status completed state for job status. JobStatusCompleted JobStatus = "Completed" - // JobStatusDisconnected specifies the job status disconnected state for - // job status. + // JobStatusDisconnected specifies the job status disconnected state for job status. JobStatusDisconnected JobStatus = "Disconnected" // JobStatusFailed specifies the job status failed state for job status. JobStatusFailed JobStatus = "Failed" // JobStatusNew specifies the job status new state for job status. JobStatusNew JobStatus = "New" - // JobStatusRemoving specifies the job status removing state for job - // status. + // JobStatusRemoving specifies the job status removing state for job status. JobStatusRemoving JobStatus = "Removing" - // JobStatusResuming specifies the job status resuming state for job - // status. + // JobStatusResuming specifies the job status resuming state for job status. JobStatusResuming JobStatus = "Resuming" // JobStatusRunning specifies the job status running state for job status. JobStatusRunning JobStatus = "Running" // JobStatusStopped specifies the job status stopped state for job status. JobStatusStopped JobStatus = "Stopped" - // JobStatusStopping specifies the job status stopping state for job - // status. + // JobStatusStopping specifies the job status stopping state for job status. JobStatusStopping JobStatus = "Stopping" - // JobStatusSuspended specifies the job status suspended state for job - // status. + // JobStatusSuspended specifies the job status suspended state for job status. JobStatusSuspended JobStatus = "Suspended" - // JobStatusSuspending specifies the job status suspending state for job - // status. + // JobStatusSuspending specifies the job status suspending state for job status. JobStatusSuspending JobStatus = "Suspending" ) @@ -269,72 +234,60 @@ const ( type ModuleProvisioningState string const ( - // ModuleProvisioningStateActivitiesStored specifies the module - // provisioning state activities stored state for module provisioning - // state. + // ModuleProvisioningStateActivitiesStored specifies the module provisioning state activities stored state for module + // provisioning state. ModuleProvisioningStateActivitiesStored ModuleProvisioningState = "ActivitiesStored" - // ModuleProvisioningStateCancelled specifies the module provisioning state - // cancelled state for module provisioning state. + // ModuleProvisioningStateCancelled specifies the module provisioning state cancelled state for module provisioning + // state. ModuleProvisioningStateCancelled ModuleProvisioningState = "Cancelled" - // ModuleProvisioningStateConnectionTypeImported specifies the module - // provisioning state connection type imported state for module - // provisioning state. + // ModuleProvisioningStateConnectionTypeImported specifies the module provisioning state connection type imported state + // for module provisioning state. ModuleProvisioningStateConnectionTypeImported ModuleProvisioningState = "ConnectionTypeImported" - // ModuleProvisioningStateContentDownloaded specifies the module - // provisioning state content downloaded state for module provisioning - // state. + // ModuleProvisioningStateContentDownloaded specifies the module provisioning state content downloaded state for module + // provisioning state. ModuleProvisioningStateContentDownloaded ModuleProvisioningState = "ContentDownloaded" - // ModuleProvisioningStateContentRetrieved specifies the module - // provisioning state content retrieved state for module provisioning - // state. + // ModuleProvisioningStateContentRetrieved specifies the module provisioning state content retrieved state for module + // provisioning state. ModuleProvisioningStateContentRetrieved ModuleProvisioningState = "ContentRetrieved" - // ModuleProvisioningStateContentStored specifies the module provisioning - // state content stored state for module provisioning state. + // ModuleProvisioningStateContentStored specifies the module provisioning state content stored state for module + // provisioning state. ModuleProvisioningStateContentStored ModuleProvisioningState = "ContentStored" - // ModuleProvisioningStateContentValidated specifies the module - // provisioning state content validated state for module provisioning - // state. + // ModuleProvisioningStateContentValidated specifies the module provisioning state content validated state for module + // provisioning state. ModuleProvisioningStateContentValidated ModuleProvisioningState = "ContentValidated" - // ModuleProvisioningStateCreated specifies the module provisioning state - // created state for module provisioning state. + // ModuleProvisioningStateCreated specifies the module provisioning state created state for module provisioning state. ModuleProvisioningStateCreated ModuleProvisioningState = "Created" - // ModuleProvisioningStateCreating specifies the module provisioning state - // creating state for module provisioning state. - ModuleProvisioningStateCreating ModuleProvisioningState = "Creating" - // ModuleProvisioningStateFailed specifies the module provisioning state - // failed state for module provisioning state. - ModuleProvisioningStateFailed ModuleProvisioningState = "Failed" - // ModuleProvisioningStateModuleDataStored specifies the module - // provisioning state module data stored state for module provisioning + // ModuleProvisioningStateCreating specifies the module provisioning state creating state for module provisioning // state. + ModuleProvisioningStateCreating ModuleProvisioningState = "Creating" + // ModuleProvisioningStateFailed specifies the module provisioning state failed state for module provisioning state. + ModuleProvisioningStateFailed ModuleProvisioningState = "Failed" + // ModuleProvisioningStateModuleDataStored specifies the module provisioning state module data stored state for module + // provisioning state. ModuleProvisioningStateModuleDataStored ModuleProvisioningState = "ModuleDataStored" - // ModuleProvisioningStateModuleImportRunbookComplete specifies the module - // provisioning state module import runbook complete state for module - // provisioning state. + // ModuleProvisioningStateModuleImportRunbookComplete specifies the module provisioning state module import runbook + // complete state for module provisioning state. ModuleProvisioningStateModuleImportRunbookComplete ModuleProvisioningState = "ModuleImportRunbookComplete" - // ModuleProvisioningStateRunningImportModuleRunbook specifies the module - // provisioning state running import module runbook state for module - // provisioning state. + // ModuleProvisioningStateRunningImportModuleRunbook specifies the module provisioning state running import module + // runbook state for module provisioning state. ModuleProvisioningStateRunningImportModuleRunbook ModuleProvisioningState = "RunningImportModuleRunbook" - // ModuleProvisioningStateStartingImportModuleRunbook specifies the module - // provisioning state starting import module runbook state for module - // provisioning state. + // ModuleProvisioningStateStartingImportModuleRunbook specifies the module provisioning state starting import module + // runbook state for module provisioning state. ModuleProvisioningStateStartingImportModuleRunbook ModuleProvisioningState = "StartingImportModuleRunbook" - // ModuleProvisioningStateSucceeded specifies the module provisioning state - // succeeded state for module provisioning state. + // ModuleProvisioningStateSucceeded specifies the module provisioning state succeeded state for module provisioning + // state. ModuleProvisioningStateSucceeded ModuleProvisioningState = "Succeeded" - // ModuleProvisioningStateUpdating specifies the module provisioning state - // updating state for module provisioning state. + // ModuleProvisioningStateUpdating specifies the module provisioning state updating state for module provisioning + // state. ModuleProvisioningStateUpdating ModuleProvisioningState = "Updating" ) -// RunbookProvisioningState enumerates the values for runbook provisioning -// state. +// RunbookProvisioningState enumerates the values for runbook provisioning state. type RunbookProvisioningState string const ( - // RunbookProvisioningStateSucceeded specifies the runbook provisioning - // state succeeded state for runbook provisioning state. + // RunbookProvisioningStateSucceeded specifies the runbook provisioning state succeeded state for runbook provisioning + // state. RunbookProvisioningStateSucceeded RunbookProvisioningState = "Succeeded" ) @@ -342,13 +295,11 @@ const ( type RunbookState string const ( - // RunbookStateEdit specifies the runbook state edit state for runbook - // state. + // RunbookStateEdit specifies the runbook state edit state for runbook state. RunbookStateEdit RunbookState = "Edit" // RunbookStateNew specifies the runbook state new state for runbook state. RunbookStateNew RunbookState = "New" - // RunbookStatePublished specifies the runbook state published state for - // runbook state. + // RunbookStatePublished specifies the runbook state published state for runbook state. RunbookStatePublished RunbookState = "Published" ) @@ -358,16 +309,13 @@ type RunbookTypeEnum string const ( // Graph specifies the graph state for runbook type enum. Graph RunbookTypeEnum = "Graph" - // GraphPowerShell specifies the graph power shell state for runbook type - // enum. + // GraphPowerShell specifies the graph power shell state for runbook type enum. GraphPowerShell RunbookTypeEnum = "GraphPowerShell" - // GraphPowerShellWorkflow specifies the graph power shell workflow state - // for runbook type enum. + // GraphPowerShellWorkflow specifies the graph power shell workflow state for runbook type enum. GraphPowerShellWorkflow RunbookTypeEnum = "GraphPowerShellWorkflow" // PowerShell specifies the power shell state for runbook type enum. PowerShell RunbookTypeEnum = "PowerShell" - // PowerShellWorkflow specifies the power shell workflow state for runbook - // type enum. + // PowerShellWorkflow specifies the power shell workflow state for runbook type enum. PowerShellWorkflow RunbookTypeEnum = "PowerShellWorkflow" // Script specifies the script state for runbook type enum. Script RunbookTypeEnum = "Script" @@ -431,8 +379,7 @@ type Account struct { Etag *string `json:"etag,omitempty"` } -// AccountCreateOrUpdateParameters is the parameters supplied to the create or -// update automation account operation. +// AccountCreateOrUpdateParameters is the parameters supplied to the create or update automation account operation. type AccountCreateOrUpdateParameters struct { *AccountCreateOrUpdateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -440,8 +387,7 @@ type AccountCreateOrUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// AccountCreateOrUpdateProperties is the parameters supplied to the create or -// update account properties. +// AccountCreateOrUpdateProperties is the parameters supplied to the create or update account properties. type AccountCreateOrUpdateProperties struct { Sku *Sku `json:"sku,omitempty"` } @@ -475,8 +421,7 @@ type AccountProperties struct { Description *string `json:"description,omitempty"` } -// AccountUpdateParameters is the parameters supplied to the update automation -// account operation. +// AccountUpdateParameters is the parameters supplied to the update automation account operation. type AccountUpdateParameters struct { *AccountUpdateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -484,8 +429,7 @@ type AccountUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// AccountUpdateProperties is the parameters supplied to the update account -// properties. +// AccountUpdateProperties is the parameters supplied to the update account properties. type AccountUpdateProperties struct { Sku *Sku `json:"sku,omitempty"` } @@ -558,8 +502,7 @@ type AdvancedSchedule struct { MonthlyOccurrences *[]AdvancedScheduleMonthlyOccurrence `json:"monthlyOccurrences,omitempty"` } -// AdvancedScheduleMonthlyOccurrence is the properties of the create advanced -// schedule monthly occurrence. +// AdvancedScheduleMonthlyOccurrence is the properties of the create advanced schedule monthly occurrence. type AdvancedScheduleMonthlyOccurrence struct { Occurrence *int32 `json:"occurrence,omitempty"` Day ScheduleDay `json:"day,omitempty"` @@ -580,8 +523,7 @@ type AgentRegistrationKeys struct { Secondary *string `json:"secondary,omitempty"` } -// AgentRegistrationRegenerateKeyParameter is the parameters supplied to the -// regenerate keys operation. +// AgentRegistrationRegenerateKeyParameter is the parameters supplied to the regenerate keys operation. type AgentRegistrationRegenerateKeyParameter struct { KeyName AgentRegistrationKeyName `json:"keyName,omitempty"` Name *string `json:"name,omitempty"` @@ -597,15 +539,14 @@ type Certificate struct { *CertificateProperties `json:"properties,omitempty"` } -// CertificateCreateOrUpdateParameters is the parameters supplied to the create -// or update or replace certificate operation. +// CertificateCreateOrUpdateParameters is the parameters supplied to the create or update or replace certificate +// operation. type CertificateCreateOrUpdateParameters struct { Name *string `json:"name,omitempty"` *CertificateCreateOrUpdateProperties `json:"properties,omitempty"` } -// CertificateCreateOrUpdateProperties is the properties of the create -// certificate operation. +// CertificateCreateOrUpdateProperties is the properties of the create certificate operation. type CertificateCreateOrUpdateProperties struct { Base64Value *string `json:"base64Value,omitempty"` Description *string `json:"description,omitempty"` @@ -613,8 +554,7 @@ type CertificateCreateOrUpdateProperties struct { IsExportable *bool `json:"isExportable,omitempty"` } -// CertificateListResult is the response model for the list certificate -// operation. +// CertificateListResult is the response model for the list certificate operation. type CertificateListResult struct { autorest.Response `json:"-"` Value *[]Certificate `json:"value,omitempty"` @@ -643,15 +583,13 @@ type CertificateProperties struct { Description *string `json:"description,omitempty"` } -// CertificateUpdateParameters is the parameters supplied to the update -// certificate operation. +// CertificateUpdateParameters is the parameters supplied to the update certificate operation. type CertificateUpdateParameters struct { Name *string `json:"name,omitempty"` *CertificateUpdateProperties `json:"properties,omitempty"` } -// CertificateUpdateProperties is the properties of the update certificate -// operation +// CertificateUpdateProperties is the properties of the update certificate operation type CertificateUpdateProperties struct { Description *string `json:"description,omitempty"` } @@ -664,23 +602,20 @@ type Connection struct { *ConnectionProperties `json:"properties,omitempty"` } -// ConnectionCreateOrUpdateParameters is the parameters supplied to the create -// or update connection operation. +// ConnectionCreateOrUpdateParameters is the parameters supplied to the create or update connection operation. type ConnectionCreateOrUpdateParameters struct { Name *string `json:"name,omitempty"` *ConnectionCreateOrUpdateProperties `json:"properties,omitempty"` } -// ConnectionCreateOrUpdateProperties is the properties of the create -// connection properties +// ConnectionCreateOrUpdateProperties is the properties of the create connection properties type ConnectionCreateOrUpdateProperties struct { Description *string `json:"description,omitempty"` ConnectionType *ConnectionTypeAssociationProperty `json:"connectionType,omitempty"` FieldDefinitionValues *map[string]*string `json:"fieldDefinitionValues,omitempty"` } -// ConnectionListResult is the response model for the list connection -// operation. +// ConnectionListResult is the response model for the list connection operation. type ConnectionListResult struct { autorest.Response `json:"-"` Value *[]Connection `json:"value,omitempty"` @@ -716,28 +651,24 @@ type ConnectionType struct { *ConnectionTypeProperties `json:"properties,omitempty"` } -// ConnectionTypeAssociationProperty is the connection type property associated -// with the entity. +// ConnectionTypeAssociationProperty is the connection type property associated with the entity. type ConnectionTypeAssociationProperty struct { Name *string `json:"name,omitempty"` } -// ConnectionTypeCreateOrUpdateParameters is the parameters supplied to the -// create or update connection type operation. +// ConnectionTypeCreateOrUpdateParameters is the parameters supplied to the create or update connection type operation. type ConnectionTypeCreateOrUpdateParameters struct { Name *string `json:"name,omitempty"` *ConnectionTypeCreateOrUpdateProperties `json:"properties,omitempty"` } -// ConnectionTypeCreateOrUpdateProperties is the properties of the create -// connection type. +// ConnectionTypeCreateOrUpdateProperties is the properties of the create connection type. type ConnectionTypeCreateOrUpdateProperties struct { IsGlobal *bool `json:"isGlobal,omitempty"` FieldDefinitions *map[string]*FieldDefinition `json:"fieldDefinitions,omitempty"` } -// ConnectionTypeListResult is the response model for the list connection type -// operation. +// ConnectionTypeListResult is the response model for the list connection type operation. type ConnectionTypeListResult struct { autorest.Response `json:"-"` Value *[]ConnectionType `json:"value,omitempty"` @@ -765,15 +696,13 @@ type ConnectionTypeProperties struct { Description *string `json:"description,omitempty"` } -// ConnectionUpdateParameters is the parameters supplied to the update -// connection operation. +// ConnectionUpdateParameters is the parameters supplied to the update connection operation. type ConnectionUpdateParameters struct { Name *string `json:"name,omitempty"` *ConnectionUpdateProperties `json:"properties,omitempty"` } -// ConnectionUpdateProperties is the properties of the update connection -// operation. +// ConnectionUpdateProperties is the properties of the update connection operation. type ConnectionUpdateProperties struct { Description *string `json:"description,omitempty"` FieldDefinitionValues *map[string]*string `json:"fieldDefinitionValues,omitempty"` @@ -808,23 +737,20 @@ type Credential struct { *CredentialProperties `json:"properties,omitempty"` } -// CredentialCreateOrUpdateParameters is the parameters supplied to the create -// or update credential operation. +// CredentialCreateOrUpdateParameters is the parameters supplied to the create or update credential operation. type CredentialCreateOrUpdateParameters struct { Name *string `json:"name,omitempty"` *CredentialCreateOrUpdateProperties `json:"properties,omitempty"` } -// CredentialCreateOrUpdateProperties is the properties of the create -// cerdential operation. +// CredentialCreateOrUpdateProperties is the properties of the create cerdential operation. type CredentialCreateOrUpdateProperties struct { UserName *string `json:"userName,omitempty"` Password *string `json:"password,omitempty"` Description *string `json:"description,omitempty"` } -// CredentialListResult is the response model for the list credential -// operation. +// CredentialListResult is the response model for the list credential operation. type CredentialListResult struct { autorest.Response `json:"-"` Value *[]Credential `json:"value,omitempty"` @@ -851,8 +777,7 @@ type CredentialProperties struct { Description *string `json:"description,omitempty"` } -// CredentialUpdateParameters is the parameters supplied to the Update -// credential operation. +// CredentialUpdateParameters is the parameters supplied to the Update credential operation. type CredentialUpdateParameters struct { Name *string `json:"name,omitempty"` *CredentialUpdateProperties `json:"properties,omitempty"` @@ -872,8 +797,7 @@ type DscCompilationJob struct { *DscCompilationJobProperties `json:"properties,omitempty"` } -// DscCompilationJobCreateParameters is the parameters supplied to the create -// compilation job operation. +// DscCompilationJobCreateParameters is the parameters supplied to the create compilation job operation. type DscCompilationJobCreateParameters struct { *DscCompilationJobCreateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -881,15 +805,13 @@ type DscCompilationJobCreateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// DscCompilationJobCreateProperties is the parameters supplied to the create -// compilation job operation. +// DscCompilationJobCreateProperties is the parameters supplied to the create compilation job operation. type DscCompilationJobCreateProperties struct { Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"` Parameters *map[string]*string `json:"parameters,omitempty"` } -// DscCompilationJobListResult is the response model for the list job -// operation. +// DscCompilationJobListResult is the response model for the list job operation. type DscCompilationJobListResult struct { autorest.Response `json:"-"` Value *[]DscCompilationJob `json:"value,omitempty"` @@ -936,14 +858,12 @@ type DscConfiguration struct { Etag *string `json:"etag,omitempty"` } -// DscConfigurationAssociationProperty is the Dsc configuration property -// associated with the entity. +// DscConfigurationAssociationProperty is the Dsc configuration property associated with the entity. type DscConfigurationAssociationProperty struct { Name *string `json:"name,omitempty"` } -// DscConfigurationCreateOrUpdateParameters is the parameters supplied to the -// create or update configuration operation. +// DscConfigurationCreateOrUpdateParameters is the parameters supplied to the create or update configuration operation. type DscConfigurationCreateOrUpdateParameters struct { *DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -951,8 +871,7 @@ type DscConfigurationCreateOrUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// DscConfigurationCreateOrUpdateProperties is the properties to create or -// update configuration. +// DscConfigurationCreateOrUpdateProperties is the properties to create or update configuration. type DscConfigurationCreateOrUpdateProperties struct { LogVerbose *bool `json:"logVerbose,omitempty"` LogProgress *bool `json:"logProgress,omitempty"` @@ -961,8 +880,7 @@ type DscConfigurationCreateOrUpdateProperties struct { Description *string `json:"description,omitempty"` } -// DscConfigurationListResult is the response model for the list configuration -// operation. +// DscConfigurationListResult is the response model for the list configuration operation. type DscConfigurationListResult struct { autorest.Response `json:"-"` Value *[]DscConfiguration `json:"value,omitempty"` @@ -1041,22 +959,20 @@ type DscNodeConfiguration struct { ID *string `json:"id,omitempty"` } -// DscNodeConfigurationAssociationProperty is the dsc nodeconfiguration -// property associated with the entity. +// DscNodeConfigurationAssociationProperty is the dsc nodeconfiguration property associated with the entity. type DscNodeConfigurationAssociationProperty struct { Name *string `json:"name,omitempty"` } -// DscNodeConfigurationCreateOrUpdateParameters is the parameters supplied to -// the create or update node configuration operation. +// DscNodeConfigurationCreateOrUpdateParameters is the parameters supplied to the create or update node configuration +// operation. type DscNodeConfigurationCreateOrUpdateParameters struct { Source *ContentSource `json:"source,omitempty"` Name *string `json:"name,omitempty"` Configuration *DscConfigurationAssociationProperty `json:"configuration,omitempty"` } -// DscNodeConfigurationListResult is the response model for the list job -// operation. +// DscNodeConfigurationListResult is the response model for the list job operation. type DscNodeConfigurationListResult struct { autorest.Response `json:"-"` Value *[]DscNodeConfiguration `json:"value,omitempty"` @@ -1118,8 +1034,7 @@ type DscNodeReport struct { RawErrors *string `json:"rawErrors,omitempty"` } -// DscNodeReportListResult is the response model for the list dsc nodes -// operation. +// DscNodeReportListResult is the response model for the list dsc nodes operation. type DscNodeReportListResult struct { autorest.Response `json:"-"` Value *[]DscNodeReport `json:"value,omitempty"` @@ -1138,8 +1053,7 @@ func (client DscNodeReportListResult) DscNodeReportListResultPreparer() (*http.R autorest.WithBaseURL(to.String(client.NextLink))) } -// DscNodeUpdateParameters is the parameters supplied to the update dsc node -// operation. +// DscNodeUpdateParameters is the parameters supplied to the update dsc node operation. type DscNodeUpdateParameters struct { NodeID *string `json:"nodeId,omitempty"` NodeConfiguration *DscNodeConfigurationAssociationProperty `json:"nodeConfiguration,omitempty"` @@ -1203,8 +1117,7 @@ type HybridRunbookWorkerGroup struct { Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"` } -// HybridRunbookWorkerGroupsListResult is the response model for the list -// hybrid runbook worker groups. +// HybridRunbookWorkerGroupsListResult is the response model for the list hybrid runbook worker groups. type HybridRunbookWorkerGroupsListResult struct { autorest.Response `json:"-"` Value *[]HybridRunbookWorkerGroup `json:"value,omitempty"` @@ -1223,8 +1136,7 @@ func (client HybridRunbookWorkerGroupsListResult) HybridRunbookWorkerGroupsListR autorest.WithBaseURL(to.String(client.NextLink))) } -// HybridRunbookWorkerGroupUpdateParameters is parameters supplied to the -// update operation. +// HybridRunbookWorkerGroupUpdateParameters is parameters supplied to the update operation. type HybridRunbookWorkerGroupUpdateParameters struct { Credential *RunAsCredentialAssociationProperty `json:"credential,omitempty"` } @@ -1294,14 +1206,12 @@ type JobSchedule struct { *JobScheduleProperties `json:"properties,omitempty"` } -// JobScheduleCreateParameters is the parameters supplied to the create job -// schedule operation. +// JobScheduleCreateParameters is the parameters supplied to the create job schedule operation. type JobScheduleCreateParameters struct { *JobScheduleCreateProperties `json:"properties,omitempty"` } -// JobScheduleCreateProperties is the parameters supplied to the create job -// schedule operation. +// JobScheduleCreateProperties is the parameters supplied to the create job schedule operation. type JobScheduleCreateProperties struct { Schedule *ScheduleAssociationProperty `json:"schedule,omitempty"` Runbook *RunbookAssociationProperty `json:"runbook,omitempty"` @@ -1309,8 +1219,7 @@ type JobScheduleCreateProperties struct { Parameters *map[string]*string `json:"parameters,omitempty"` } -// JobScheduleListResult is the response model for the list job schedule -// operation. +// JobScheduleListResult is the response model for the list job schedule operation. type JobScheduleListResult struct { autorest.Response `json:"-"` Value *[]JobSchedule `json:"value,omitempty"` @@ -1386,8 +1295,7 @@ type Module struct { Etag *string `json:"etag,omitempty"` } -// ModuleCreateOrUpdateParameters is the parameters supplied to the create or -// update module operation. +// ModuleCreateOrUpdateParameters is the parameters supplied to the create or update module operation. type ModuleCreateOrUpdateParameters struct { *ModuleCreateOrUpdateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -1395,8 +1303,7 @@ type ModuleCreateOrUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ModuleCreateOrUpdateProperties is the parameters supplied to the create or -// update module properties. +// ModuleCreateOrUpdateProperties is the parameters supplied to the create or update module properties. type ModuleCreateOrUpdateProperties struct { ContentLink *ContentLink `json:"contentLink,omitempty"` } @@ -1440,8 +1347,7 @@ type ModuleProperties struct { Description *string `json:"description,omitempty"` } -// ModuleUpdateParameters is the parameters supplied to the update module -// operation. +// ModuleUpdateParameters is the parameters supplied to the update module operation. type ModuleUpdateParameters struct { *ModuleUpdateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -1467,8 +1373,7 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is the response model for the list of Automation -// operations +// OperationListResult is the response model for the list of Automation operations type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -1489,8 +1394,7 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// RunAsCredentialAssociationProperty is definition of runas credential to use -// for hybrid worker. +// RunAsCredentialAssociationProperty is definition of runas credential to use for hybrid worker. type RunAsCredentialAssociationProperty struct { Name *string `json:"name,omitempty"` } @@ -1507,14 +1411,27 @@ type Runbook struct { Etag *string `json:"etag,omitempty"` } -// RunbookAssociationProperty is the runbook property associated with the -// entity. +// RunbookAssociationProperty is the runbook property associated with the entity. type RunbookAssociationProperty struct { Name *string `json:"name,omitempty"` } -// RunbookCreateOrUpdateParameters is the parameters supplied to the create or -// update runbook operation. +// RunbookCreateOrUpdateDraftParameters is the parameters supplied to the create or update runbook operation. +type RunbookCreateOrUpdateDraftParameters struct { + RunbookContent *string `json:"runbookContent,omitempty"` +} + +// RunbookCreateOrUpdateDraftProperties is the parameters supplied to the create or update dratft runbook properties. +type RunbookCreateOrUpdateDraftProperties struct { + LogVerbose *bool `json:"logVerbose,omitempty"` + LogProgress *bool `json:"logProgress,omitempty"` + RunbookType RunbookTypeEnum `json:"runbookType,omitempty"` + Draft *RunbookDraft `json:"draft,omitempty"` + Description *string `json:"description,omitempty"` + LogActivityTrace *int32 `json:"logActivityTrace,omitempty"` +} + +// RunbookCreateOrUpdateParameters is the parameters supplied to the create or update runbook operation. type RunbookCreateOrUpdateParameters struct { *RunbookCreateOrUpdateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -1522,8 +1439,7 @@ type RunbookCreateOrUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// RunbookCreateOrUpdateProperties is the parameters supplied to the create or -// update runbook properties. +// RunbookCreateOrUpdateProperties is the parameters supplied to the create or update runbook properties. type RunbookCreateOrUpdateProperties struct { LogVerbose *bool `json:"logVerbose,omitempty"` LogProgress *bool `json:"logProgress,omitempty"` @@ -1545,8 +1461,7 @@ type RunbookDraft struct { OutputTypes *[]string `json:"outputTypes,omitempty"` } -// RunbookDraftUndoEditResult is the response model for the undoedit runbook -// operation. +// RunbookDraftUndoEditResult is the response model for the undoedit runbook operation. type RunbookDraftUndoEditResult struct { autorest.Response `json:"-"` StatusCode HTTPStatusCode `json:"statusCode,omitempty"` @@ -1599,8 +1514,7 @@ type RunbookProperties struct { Description *string `json:"description,omitempty"` } -// RunbookUpdateParameters is the parameters supplied to the update runbook -// operation. +// RunbookUpdateParameters is the parameters supplied to the update runbook operation. type RunbookUpdateParameters struct { *RunbookUpdateProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -1608,8 +1522,7 @@ type RunbookUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// RunbookUpdateProperties is the parameters supplied to the update runbook -// properties. +// RunbookUpdateProperties is the parameters supplied to the update runbook properties. type RunbookUpdateProperties struct { Description *string `json:"description,omitempty"` LogVerbose *bool `json:"logVerbose,omitempty"` @@ -1625,21 +1538,18 @@ type Schedule struct { *ScheduleProperties `json:"properties,omitempty"` } -// ScheduleAssociationProperty is the schedule property associated with the -// entity. +// ScheduleAssociationProperty is the schedule property associated with the entity. type ScheduleAssociationProperty struct { Name *string `json:"name,omitempty"` } -// ScheduleCreateOrUpdateParameters is the parameters supplied to the create or -// update schedule operation. +// ScheduleCreateOrUpdateParameters is the parameters supplied to the create or update schedule operation. type ScheduleCreateOrUpdateParameters struct { Name *string `json:"name,omitempty"` *ScheduleCreateOrUpdateProperties `json:"properties,omitempty"` } -// ScheduleCreateOrUpdateProperties is the parameters supplied to the create or -// update schedule operation. +// ScheduleCreateOrUpdateProperties is the parameters supplied to the create or update schedule operation. type ScheduleCreateOrUpdateProperties struct { Description *string `json:"description,omitempty"` StartTime *date.Time `json:"startTime,omitempty"` @@ -1687,15 +1597,13 @@ type ScheduleProperties struct { Description *string `json:"description,omitempty"` } -// ScheduleUpdateParameters is the parameters supplied to the update schedule -// operation. +// ScheduleUpdateParameters is the parameters supplied to the update schedule operation. type ScheduleUpdateParameters struct { Name *string `json:"name,omitempty"` *ScheduleUpdateProperties `json:"properties,omitempty"` } -// ScheduleUpdateProperties is the parameters supplied to the update schedule -// operation. +// ScheduleUpdateProperties is the parameters supplied to the update schedule operation. type ScheduleUpdateProperties struct { Description *string `json:"description,omitempty"` IsEnabled *bool `json:"isEnabled,omitempty"` @@ -1717,8 +1625,7 @@ type Statistics struct { ID *string `json:"id,omitempty"` } -// StatisticsListResult is the response model for the list statistics -// operation. +// StatisticsListResult is the response model for the list statistics operation. type StatisticsListResult struct { autorest.Response `json:"-"` Value *[]Statistics `json:"value,omitempty"` @@ -1730,6 +1637,11 @@ type String struct { Value *string `json:"value,omitempty"` } +// SubResource is the Sub Resource definition. +type SubResource struct { + ID *string `json:"id,omitempty"` +} + // TestJob is definition of the test job. type TestJob struct { autorest.Response `json:"-"` @@ -1745,8 +1657,7 @@ type TestJob struct { Parameters *map[string]*string `json:"parameters,omitempty"` } -// TestJobCreateParameters is the parameters supplied to the create test job -// operation. +// TestJobCreateParameters is the parameters supplied to the create test job operation. type TestJobCreateParameters struct { RunbookName *string `json:"runbookName,omitempty"` Parameters *map[string]*string `json:"parameters,omitempty"` @@ -1795,15 +1706,13 @@ type Variable struct { *VariableProperties `json:"properties,omitempty"` } -// VariableCreateOrUpdateParameters is the parameters supplied to the create or -// update variable operation. +// VariableCreateOrUpdateParameters is the parameters supplied to the create or update variable operation. type VariableCreateOrUpdateParameters struct { Name *string `json:"name,omitempty"` *VariableCreateOrUpdateProperties `json:"properties,omitempty"` } -// VariableCreateOrUpdateProperties is the properties of the create variable -// operation. +// VariableCreateOrUpdateProperties is the properties of the create variable operation. type VariableCreateOrUpdateProperties struct { Value *string `json:"value,omitempty"` Description *string `json:"description,omitempty"` @@ -1838,8 +1747,7 @@ type VariableProperties struct { Description *string `json:"description,omitempty"` } -// VariableUpdateParameters is the parameters supplied to the update variable -// operation. +// VariableUpdateParameters is the parameters supplied to the update variable operation. type VariableUpdateParameters struct { Name *string `json:"name,omitempty"` *VariableUpdateProperties `json:"properties,omitempty"` @@ -1859,15 +1767,13 @@ type Webhook struct { *WebhookProperties `json:"properties,omitempty"` } -// WebhookCreateOrUpdateParameters is the parameters supplied to the create or -// update webhook operation. +// WebhookCreateOrUpdateParameters is the parameters supplied to the create or update webhook operation. type WebhookCreateOrUpdateParameters struct { Name *string `json:"name,omitempty"` *WebhookCreateOrUpdateProperties `json:"properties,omitempty"` } -// WebhookCreateOrUpdateProperties is the properties of the create webhook -// operation. +// WebhookCreateOrUpdateProperties is the properties of the create webhook operation. type WebhookCreateOrUpdateProperties struct { IsEnabled *bool `json:"isEnabled,omitempty"` URI *string `json:"uri,omitempty"` @@ -1910,8 +1816,7 @@ type WebhookProperties struct { Description *string `json:"description,omitempty"` } -// WebhookUpdateParameters is the parameters supplied to the update webhook -// operation. +// WebhookUpdateParameters is the parameters supplied to the update webhook operation. type WebhookUpdateParameters struct { Name *string `json:"name,omitempty"` *WebhookUpdateProperties `json:"properties,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/module.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/module.go index 225b0a495..138c94c4a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/module.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/module.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// ModuleClient is the composite Swagger json for Azure Automation Client +// ModuleClient is the automation Client type ModuleClient struct { ManagementClient } @@ -42,9 +41,8 @@ func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleCli // CreateOrUpdate create or Update the module identified by module name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the name of module. parameters is the -// create or update parameters for module. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the name of module. parameters is the create or update parameters for module. func (client ModuleClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -127,8 +125,8 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the module by name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the module name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the module name. func (client ModuleClient) Delete(resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -199,8 +197,8 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest // Get retrieve the module identified by module name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the module name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the module name. func (client ModuleClient) Get(resourceGroupName string, automationAccountName string, moduleName string) (result Module, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -272,8 +270,7 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err // ListByAutomationAccount retrieve a list of modules. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client ModuleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ModuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -366,11 +363,55 @@ func (client ModuleClient) ListByAutomationAccountNextResults(lastResults Module return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client ModuleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Module, <-chan error) { + resultChan := make(chan Module) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update the module identified by module name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the name of module. parameters is the -// update parameters for module. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the name of module. parameters is the update parameters for module. func (client ModuleClient) Update(resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/nodereports.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/nodereports.go index ad9f6acb3..bafb26dc9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/nodereports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/nodereports.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// NodeReportsClient is the composite Swagger json for Azure Automation Client +// NodeReportsClient is the automation Client type NodeReportsClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewNodeReportsClient(subscriptionID string) NodeReportsClient { return NewNodeReportsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient -// client. +// NewNodeReportsClientWithBaseURI creates an instance of the NodeReportsClient client. func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) NodeReportsClient { return NodeReportsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve the Dsc node report data by node id and report id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeID is the Dsc node id. reportID is the report -// id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the +// Dsc node id. reportID is the report id. func (client NodeReportsClient) Get(resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -118,9 +115,8 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod // GetContent retrieve the Dsc node reports by node id and report id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeID is the Dsc node id. reportID is the report -// id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the +// Dsc node id. reportID is the report id. func (client NodeReportsClient) GetContent(resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -192,9 +188,8 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result // ListByNode retrieve the Dsc node report list by node id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. nodeID is the parameters supplied to the list -// operation. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. nodeID is the +// parameters supplied to the list operation. filter is the filter to apply on the operation. func (client NodeReportsClient) ListByNode(resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -290,3 +285,48 @@ func (client NodeReportsClient) ListByNodeNextResults(lastResults DscNodeReportL return } + +// ListByNodeComplete gets all elements from the list without paging. +func (client NodeReportsClient) ListByNodeComplete(resourceGroupName string, automationAccountName string, nodeID string, filter string, cancel <-chan struct{}) (<-chan DscNodeReport, <-chan error) { + resultChan := make(chan DscNodeReport) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByNode(resourceGroupName, automationAccountName, nodeID, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByNodeNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/objectdatatypes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/objectdatatypes.go index 0a0952fb2..f5aed0ba9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/objectdatatypes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/objectdatatypes.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,30 +24,25 @@ import ( "net/http" ) -// ObjectDataTypesClient is the composite Swagger json for Azure Automation -// Client +// ObjectDataTypesClient is the automation Client type ObjectDataTypesClient struct { ManagementClient } -// NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient -// client. +// NewObjectDataTypesClient creates an instance of the ObjectDataTypesClient client. func NewObjectDataTypesClient(subscriptionID string) ObjectDataTypesClient { return NewObjectDataTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewObjectDataTypesClientWithBaseURI creates an instance of the -// ObjectDataTypesClient client. +// NewObjectDataTypesClientWithBaseURI creates an instance of the ObjectDataTypesClient client. func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string) ObjectDataTypesClient { return ObjectDataTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// ListFieldsByModuleAndType retrieve a list of fields of a given type -// identified by module name. +// ListFieldsByModuleAndType retrieve a list of fields of a given type identified by module name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. moduleName is the name of module. typeName is the -// name of type. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. moduleName is +// the name of module. typeName is the name of type. func (client ObjectDataTypesClient) ListFieldsByModuleAndType(resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -119,11 +113,10 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt return } -// ListFieldsByType retrieve a list of fields of a given type across all -// accessible modules. +// ListFieldsByType retrieve a list of fields of a given type across all accessible modules. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. typeName is the name of type. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. typeName is the +// name of type. func (client ObjectDataTypesClient) ListFieldsByType(resourceGroupName string, automationAccountName string, typeName string) (result TypeFieldListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/operations.go index a70339b7a..4537d2d88 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/operations.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// OperationsClient is the composite Swagger json for Azure Automation Client +// OperationsClient is the automation Client type OperationsClient struct { ManagementClient } @@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbook.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbook.go index 52a522bea..19e55f848 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbook.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbook.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// RunbookClient is the composite Swagger json for Azure Automation Client +// RunbookClient is the automation Client type RunbookClient struct { ManagementClient } @@ -42,9 +41,8 @@ func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookC // CreateOrUpdate create the runbook identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. parameters is the -// create or update parameters for runbook. Provide either content link for a +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. parameters is the create or update parameters for runbook. Provide either content link for a // published runbook or draft, not both. func (client RunbookClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ @@ -135,8 +133,8 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the runbook by name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client RunbookClient) Delete(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -207,8 +205,8 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores // Get retrieve the runbook identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client RunbookClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -280,8 +278,8 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e // GetContent retrieve the content of runbook identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client RunbookClient) GetContent(resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -352,8 +350,7 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Rea // ListByAutomationAccount retrieve a list of runbooks. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client RunbookClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result RunbookListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -446,11 +443,55 @@ func (client RunbookClient) ListByAutomationAccountNextResults(lastResults Runbo return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client RunbookClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Runbook, <-chan error) { + resultChan := make(chan Runbook) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update the runbook identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. parameters is the -// update parameters for runbook. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. parameters is the update parameters for runbook. func (client RunbookClient) Update(resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbookdraft.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbookdraft.go index d3679ee43..5235164b5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbookdraft.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/runbookdraft.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -26,7 +25,7 @@ import ( "net/http" ) -// RunbookDraftClient is the composite Swagger json for Azure Automation Client +// RunbookDraftClient is the automation Client type RunbookDraftClient struct { ManagementClient } @@ -36,21 +35,18 @@ func NewRunbookDraftClient(subscriptionID string) RunbookDraftClient { return NewRunbookDraftClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRunbookDraftClientWithBaseURI creates an instance of the -// RunbookDraftClient client. +// NewRunbookDraftClientWithBaseURI creates an instance of the RunbookDraftClient client. func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) RunbookDraftClient { return RunbookDraftClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate updates the runbook draft with runbookStream as its content. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// CreateOrUpdate updates the runbook draft with runbookStream as its content. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. runbookContent is -// the runbook draft content. runbookContent will be closed upon successful -// return. Callers should ensure closure when receiving an error. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. runbookContent is the runbook draft content. runbookContent will be closed upon successful return. +// Callers should ensure closure when receiving an error. func (client RunbookDraftClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, runbookName string, runbookContent io.ReadCloser, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -67,8 +63,10 @@ func (client RunbookDraftClient) CreateOrUpdate(resourceGroupName string, automa var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -138,8 +136,8 @@ func (client RunbookDraftClient) CreateOrUpdateResponder(resp *http.Response) (r // Get retrieve the runbook draft identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client RunbookDraftClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraft, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -211,8 +209,8 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo // GetContent retrieve the content of runbook draft identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client RunbookDraftClient) GetContent(resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -281,13 +279,11 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul return } -// Publish publish runbook draft. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Publish publish runbook draft. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the parameters supplied to the -// publish runbook operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the parameters supplied to the publish runbook operation. func (client RunbookDraftClient) Publish(resourceGroupName string, automationAccountName string, runbookName string, cancel <-chan struct{}) (<-chan Runbook, <-chan error) { resultChan := make(chan Runbook, 1) errChan := make(chan error, 1) @@ -304,8 +300,10 @@ func (client RunbookDraftClient) Publish(resourceGroupName string, automationAcc var err error var result Runbook defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -375,8 +373,8 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result R // UndoEdit retrieve the runbook identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client RunbookDraftClient) UndoEdit(resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/schedule.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/schedule.go index 9a98147d6..a0b8a29f7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/schedule.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/schedule.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// ScheduleClient is the composite Swagger json for Azure Automation Client +// ScheduleClient is the automation Client type ScheduleClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewScheduleClient(subscriptionID string) ScheduleClient { return NewScheduleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient -// client. +// NewScheduleClientWithBaseURI creates an instance of the ScheduleClient client. func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) ScheduleClient { return ScheduleClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a schedule. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. scheduleName is the schedule name. parameters is -// the parameters supplied to the create or update schedule operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is +// the schedule name. parameters is the parameters supplied to the create or update schedule operation. func (client ScheduleClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -123,8 +120,8 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the schedule identified by schedule name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. scheduleName is the schedule name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is +// the schedule name. func (client ScheduleClient) Delete(resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -195,8 +192,8 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the schedule identified by schedule name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. scheduleName is the schedule name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is +// the schedule name. func (client ScheduleClient) Get(resourceGroupName string, automationAccountName string, scheduleName string) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -268,8 +265,7 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule, // ListByAutomationAccount retrieve a list of schedules. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client ScheduleClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result ScheduleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -362,11 +358,55 @@ func (client ScheduleClient) ListByAutomationAccountNextResults(lastResults Sche return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client ScheduleClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) { + resultChan := make(chan Schedule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update the schedule identified by schedule name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. scheduleName is the schedule name. parameters is -// the parameters supplied to the update schedule operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. scheduleName is +// the schedule name. parameters is the parameters supplied to the update schedule operation. func (client ScheduleClient) Update(resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/statistics.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/statistics.go index 74d027ebe..2176811ad 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/statistics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/statistics.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// StatisticsClient is the composite Swagger json for Azure Automation Client +// StatisticsClient is the automation Client type StatisticsClient struct { ManagementClient } @@ -35,16 +34,15 @@ func NewStatisticsClient(subscriptionID string) StatisticsClient { return NewStatisticsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient -// client. +// NewStatisticsClientWithBaseURI creates an instance of the StatisticsClient client. func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) StatisticsClient { return StatisticsClient{NewWithBaseURI(baseURI, subscriptionID)} } // ListByAutomationAccount retrieve the statistics for the account. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the +// filter to apply on the operation. func (client StatisticsClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result StatisticsListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobs.go index 55a39599a..e22e3d026 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobs.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// TestJobsClient is the composite Swagger json for Azure Automation Client +// TestJobsClient is the automation Client type TestJobsClient struct { ManagementClient } @@ -35,18 +34,16 @@ func NewTestJobsClient(subscriptionID string) TestJobsClient { return NewTestJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobsClientWithBaseURI creates an instance of the TestJobsClient -// client. +// NewTestJobsClientWithBaseURI creates an instance of the TestJobsClient client. func NewTestJobsClientWithBaseURI(baseURI string, subscriptionID string) TestJobsClient { return TestJobsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create a test job of the runbook. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the parameters supplied to the -// create test job operation. parameters is the parameters supplied to the -// create test job operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the parameters supplied to the create test job operation. parameters is the parameters supplied to the create test +// job operation. func (client TestJobsClient) Create(resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -122,8 +119,8 @@ func (client TestJobsClient) CreateResponder(resp *http.Response) (result TestJo // Get retrieve the test job for the specified runbook. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client TestJobsClient) Get(resourceGroupName string, automationAccountName string, runbookName string) (result TestJob, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -195,8 +192,8 @@ func (client TestJobsClient) GetResponder(resp *http.Response) (result TestJob, // Resume resume the test job. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client TestJobsClient) Resume(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -267,8 +264,8 @@ func (client TestJobsClient) ResumeResponder(resp *http.Response) (result autore // Stop stop the test job. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client TestJobsClient) Stop(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -339,8 +336,8 @@ func (client TestJobsClient) StopResponder(resp *http.Response) (result autorest // Suspend suspend the test job. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. func (client TestJobsClient) Suspend(resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobstreams.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobstreams.go index f5f608457..c557bd075 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobstreams.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/testjobstreams.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,29 +24,25 @@ import ( "net/http" ) -// TestJobStreamsClient is the composite Swagger json for Azure Automation -// Client +// TestJobStreamsClient is the automation Client type TestJobStreamsClient struct { ManagementClient } -// NewTestJobStreamsClient creates an instance of the TestJobStreamsClient -// client. +// NewTestJobStreamsClient creates an instance of the TestJobStreamsClient client. func NewTestJobStreamsClient(subscriptionID string) TestJobStreamsClient { return NewTestJobStreamsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTestJobStreamsClientWithBaseURI creates an instance of the -// TestJobStreamsClient client. +// NewTestJobStreamsClientWithBaseURI creates an instance of the TestJobStreamsClient client. func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) TestJobStreamsClient { return TestJobStreamsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieve a test job streams identified by runbook name and stream id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. jobStreamID is the -// job stream id. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. jobStreamID is the job stream id. func (client TestJobStreamsClient) Get(resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -118,12 +113,10 @@ func (client TestJobStreamsClient) GetResponder(resp *http.Response) (result Job return } -// ListByTestJob retrieve a list of test job streams identified by runbook -// name. +// ListByTestJob retrieve a list of test job streams identified by runbook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. runbookName is the runbook name. filter is the -// filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. runbookName is +// the runbook name. filter is the filter to apply on the operation. func (client TestJobStreamsClient) ListByTestJob(resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -219,3 +212,48 @@ func (client TestJobStreamsClient) ListByTestJobNextResults(lastResults JobStrea return } + +// ListByTestJobComplete gets all elements from the list without paging. +func (client TestJobStreamsClient) ListByTestJobComplete(resourceGroupName string, automationAccountName string, runbookName string, filter string, cancel <-chan struct{}) (<-chan JobStream, <-chan error) { + resultChan := make(chan JobStream) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByTestJob(resourceGroupName, automationAccountName, runbookName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByTestJobNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/usages.go index 63057beba..874520248 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/usages.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// UsagesClient is the composite Swagger json for Azure Automation Client +// UsagesClient is the automation Client type UsagesClient struct { ManagementClient } @@ -42,8 +41,7 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli // ListByAutomationAccount retrieve the usage for the account id. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client UsagesClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result UsageListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/variable.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/variable.go index 22da1431d..d6cffd3f4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/variable.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/variable.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// VariableClient is the composite Swagger json for Azure Automation Client +// VariableClient is the automation Client type VariableClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewVariableClient(subscriptionID string) VariableClient { return NewVariableClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVariableClientWithBaseURI creates an instance of the VariableClient -// client. +// NewVariableClientWithBaseURI creates an instance of the VariableClient client. func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) VariableClient { return VariableClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a variable. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. variableName is the variable name. parameters is -// the parameters supplied to the create or update variable operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is +// the variable name. parameters is the parameters supplied to the create or update variable operation. func (client VariableClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -122,8 +119,8 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete the variable. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. variableName is the name of variable. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is +// the name of variable. func (client VariableClient) Delete(resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -194,8 +191,8 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore // Get retrieve the variable identified by variable name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. variableName is the name of variable. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is +// the name of variable. func (client VariableClient) Get(resourceGroupName string, automationAccountName string, variableName string) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -267,8 +264,7 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable, // ListByAutomationAccount retrieve a list of variables. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client VariableClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string) (result VariableListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -361,11 +357,55 @@ func (client VariableClient) ListByAutomationAccountNextResults(lastResults Vari return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client VariableClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, cancel <-chan struct{}) (<-chan Variable, <-chan error) { + resultChan := make(chan Variable) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update a variable. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. variableName is the variable name. parameters is -// the parameters supplied to the update variable operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. variableName is +// the variable name. parameters is the parameters supplied to the update variable operation. func (client VariableClient) Update(resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go index 7429960ae..f95f64497 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/version.go @@ -14,15 +14,15 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-automation/2015-10-31" + return "Azure-SDK-For-Go/v11.0.0-beta arm-automation/2015-10-31" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/webhook.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/webhook.go index 8b172c072..432c682bb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/webhook.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/automation/webhook.go @@ -14,9 +14,8 @@ package automation // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// WebhookClient is the composite Swagger json for Azure Automation Client +// WebhookClient is the automation Client type WebhookClient struct { ManagementClient } @@ -42,9 +41,8 @@ func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookC // CreateOrUpdate create the webhook identified by webhook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. webhookName is the webhook name. parameters is the -// create or update parameters for webhook. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is +// the webhook name. parameters is the create or update parameters for webhook. func (client WebhookClient) CreateOrUpdate(resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -121,8 +119,8 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete the webhook by name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. webhookName is the webhook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is +// the webhook name. func (client WebhookClient) Delete(resourceGroupName string, automationAccountName string, webhookName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -193,8 +191,7 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores // GenerateURI generates a Uri for use in creating a webhook. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. func (client WebhookClient) GenerateURI(resourceGroupName string, automationAccountName string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -265,8 +262,8 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St // Get retrieve the webhook identified by webhook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. webhookName is the webhook name. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is +// the webhook name. func (client WebhookClient) Get(resourceGroupName string, automationAccountName string, webhookName string) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -338,8 +335,8 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e // ListByAutomationAccount retrieve a list of webhooks. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. filter is the +// filter to apply on the operation. func (client WebhookClient) ListByAutomationAccount(resourceGroupName string, automationAccountName string, filter string) (result WebhookListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -435,11 +432,55 @@ func (client WebhookClient) ListByAutomationAccountNextResults(lastResults Webho return } +// ListByAutomationAccountComplete gets all elements from the list without paging. +func (client WebhookClient) ListByAutomationAccountComplete(resourceGroupName string, automationAccountName string, filter string, cancel <-chan struct{}) (<-chan Webhook, <-chan error) { + resultChan := make(chan Webhook) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAutomationAccount(resourceGroupName, automationAccountName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAutomationAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update update the webhook identified by webhook name. // -// resourceGroupName is the resource group name. automationAccountName is the -// automation account name. webhookName is the webhook name. parameters is the -// update parameters for webhook. +// resourceGroupName is the resource group name. automationAccountName is the automation account name. webhookName is +// the webhook name. parameters is the update parameters for webhook. func (client WebhookClient) Update(resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/account.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/account.go index 9b8ad8a48..a2ff8f00e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/account.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/account.go @@ -14,9 +14,8 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -40,20 +39,16 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC return AccountClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates a new Batch account with the specified parameters. Existing -// accounts cannot be updated with this API and should instead be updated with -// the Update Batch Account API. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Create creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API +// and should instead be updated with the Update Batch Account API. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group that contains the new -// Batch account. accountName is a name for the Batch account which must be -// unique within the region. Batch account names must be between 3 and 24 -// characters in length and must use only numbers and lowercase letters. This -// name is used as part of the DNS name that is used to access the Batch -// service in the region in which the account is created. For example: -// http://accountname.region.batch.azure.com/. parameters is additional -// parameters for account creation. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is a name for the +// Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in +// length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to +// access the Batch service in the region in which the account is created. For example: +// http://accountname.region.batch.azure.com/. parameters is additional parameters for account creation. func (client AccountClient) Create(resourceGroupName string, accountName string, parameters AccountCreateParameters, cancel <-chan struct{}) (<-chan Account, <-chan error) { resultChan := make(chan Account, 1) errChan := make(chan error, 1) @@ -66,12 +61,12 @@ func (client AccountClient) Create(resourceGroupName string, accountName string, {Target: "accountName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountBaseProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountBaseProperties.AutoStorage", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountBaseProperties.AutoStorage.StorageAccountID", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.AccountBaseProperties.KeyVaultReference", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountBaseProperties.KeyVaultReference.ID", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.AccountBaseProperties.KeyVaultReference.URL", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AccountCreateProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountCreateProperties.AutoStorage", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountCreateProperties.AutoStorage.StorageAccountID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.AccountCreateProperties.KeyVaultReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.AccountCreateProperties.KeyVaultReference.ID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AccountCreateProperties.KeyVaultReference.URL", Name: validation.Null, Rule: true, Chain: nil}, }}, }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "batch.AccountClient", "Create") @@ -84,8 +79,10 @@ func (client AccountClient) Create(resourceGroupName string, accountName string, var err error var result Account defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -118,7 +115,7 @@ func (client AccountClient) CreatePreparer(resourceGroupName string, accountName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -154,13 +151,11 @@ func (client AccountClient) CreateResponder(resp *http.Response) (result Account return } -// Delete deletes the specified Batch account. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified Batch account. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the Batch -// account to be deleted. accountName is the name of the account to be deleted. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. func (client AccountClient) Delete(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -181,8 +176,10 @@ func (client AccountClient) Delete(resourceGroupName string, accountName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -215,7 +212,7 @@ func (client AccountClient) DeletePreparer(resourceGroupName string, accountName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -242,7 +239,7 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -250,8 +247,8 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores // Get gets information about the specified Batch account. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the account. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. func (client AccountClient) Get(resourceGroupName string, accountName string) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -292,7 +289,7 @@ func (client AccountClient) GetPreparer(resourceGroupName string, accountName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -324,14 +321,12 @@ func (client AccountClient) GetResponder(resp *http.Response) (result Account, e return } -// GetKeys this operation applies only to Batch accounts created with a -// poolAllocationMode of 'BatchService'. If the Batch account was created with -// a poolAllocationMode of 'UserSubscription', clients cannot use access to -// keys to authenticate, and must use Azure Active Directory instead. In this -// case, getting the keys will fail. +// GetKeys this operation applies only to Batch accounts created with a poolAllocationMode of 'BatchService'. If the +// Batch account was created with a poolAllocationMode of 'UserSubscription', clients cannot use access to keys to +// authenticate, and must use Azure Active Directory instead. In this case, getting the keys will fail. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the account. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. func (client AccountClient) GetKeys(resourceGroupName string, accountName string) (result AccountKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -372,7 +367,7 @@ func (client AccountClient) GetKeysPreparer(resourceGroupName string, accountNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -404,8 +399,7 @@ func (client AccountClient) GetKeysResponder(resp *http.Response) (result Accoun return } -// List gets information about the Batch accounts associated with the -// subscription. +// List gets information about the Batch accounts associated with the subscription. func (client AccountClient) List() (result AccountListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -434,7 +428,7 @@ func (client AccountClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -490,11 +484,54 @@ func (client AccountClient) ListNextResults(lastResults AccountListResult) (resu return } -// ListByResourceGroup gets information about the Batch accounts associated -// within the specified resource group. +// ListComplete gets all elements from the list without paging. +func (client AccountClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error) { + resultChan := make(chan Account) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup gets information about the Batch accounts associated with the specified resource group. // -// resourceGroupName is the name of the resource group whose Batch accounts to -// list. +// resourceGroupName is the name of the resource group that contains the Batch account. func (client AccountClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -530,7 +567,7 @@ func (client AccountClient) ListByResourceGroupPreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -586,11 +623,55 @@ func (client AccountClient) ListByResourceGroupNextResults(lastResults AccountLi return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AccountClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error) { + resultChan := make(chan Account) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // RegenerateKey regenerates the specified account key for the Batch account. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the account. parameters is the type of -// key to regenerate. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. parameters is the type of key to regenerate. func (client AccountClient) RegenerateKey(resourceGroupName string, accountName string, parameters AccountRegenerateKeyParameters) (result AccountKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -631,7 +712,7 @@ func (client AccountClient) RegenerateKeyPreparer(resourceGroupName string, acco "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -665,11 +746,11 @@ func (client AccountClient) RegenerateKeyResponder(resp *http.Response) (result return } -// SynchronizeAutoStorageKeys synchronizes access keys for the auto storage -// account configured for the specified Batch account. +// SynchronizeAutoStorageKeys synchronizes access keys for the auto-storage account configured for the specified Batch +// account. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. func (client AccountClient) SynchronizeAutoStorageKeys(resourceGroupName string, accountName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -710,7 +791,7 @@ func (client AccountClient) SynchronizeAutoStorageKeysPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -743,9 +824,8 @@ func (client AccountClient) SynchronizeAutoStorageKeysResponder(resp *http.Respo // Update updates the properties of an existing Batch account. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the account. parameters is additional -// parameters for account update. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. parameters is additional parameters for account update. func (client AccountClient) Update(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -786,7 +866,7 @@ func (client AccountClient) UpdatePreparer(resourceGroupName string, accountName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/application.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/application.go index 1701b2912..832710fa4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/application.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/application.go @@ -14,9 +14,8 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// ApplicationClient is the client for the Application methods of the Batch -// service. +// ApplicationClient is the client for the Application methods of the Batch service. type ApplicationClient struct { ManagementClient } @@ -36,18 +34,16 @@ func NewApplicationClient(subscriptionID string) ApplicationClient { return NewApplicationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient -// client. +// NewApplicationClientWithBaseURI creates an instance of the ApplicationClient client. func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) ApplicationClient { return ApplicationClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create adds an application to the specified Batch account. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. parameters is the parameters for the request. -func (client ApplicationClient) Create(resourceGroupName string, accountName string, applicationID string, parameters *AddApplicationParameters) (result Application, err error) { +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. parameters is the parameters for the request. +func (client ApplicationClient) Create(resourceGroupName string, accountName string, applicationID string, parameters *ApplicationCreateParameters) (result Application, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, @@ -80,7 +76,7 @@ func (client ApplicationClient) Create(resourceGroupName string, accountName str } // CreatePreparer prepares the Create request. -func (client ApplicationClient) CreatePreparer(resourceGroupName string, accountName string, applicationID string, parameters *AddApplicationParameters) (*http.Request, error) { +func (client ApplicationClient) CreatePreparer(resourceGroupName string, accountName string, applicationID string, parameters *ApplicationCreateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "applicationId": autorest.Encode("path", applicationID), @@ -88,7 +84,7 @@ func (client ApplicationClient) CreatePreparer(resourceGroupName string, account "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -127,9 +123,8 @@ func (client ApplicationClient) CreateResponder(resp *http.Response) (result App // Delete deletes an application. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. func (client ApplicationClient) Delete(resourceGroupName string, accountName string, applicationID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -171,7 +166,7 @@ func (client ApplicationClient) DeletePreparer(resourceGroupName string, account "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -204,9 +199,8 @@ func (client ApplicationClient) DeleteResponder(resp *http.Response) (result aut // Get gets information about the specified application. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. func (client ApplicationClient) Get(resourceGroupName string, accountName string, applicationID string) (result Application, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -248,7 +242,7 @@ func (client ApplicationClient) GetPreparer(resourceGroupName string, accountNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -282,9 +276,8 @@ func (client ApplicationClient) GetResponder(resp *http.Response) (result Applic // List lists all of the applications in the specified account. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. maxresults is the -// maximum number of items to return in the response. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. maxresults is the maximum number of items to return in the response. func (client ApplicationClient) List(resourceGroupName string, accountName string, maxresults *int32) (result ListApplicationsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -325,7 +318,7 @@ func (client ApplicationClient) ListPreparer(resourceGroupName string, accountNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -384,12 +377,56 @@ func (client ApplicationClient) ListNextResults(lastResults ListApplicationsResu return } +// ListComplete gets all elements from the list without paging. +func (client ApplicationClient) ListComplete(resourceGroupName string, accountName string, maxresults *int32, cancel <-chan struct{}) (<-chan Application, <-chan error) { + resultChan := make(chan Application) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, accountName, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates settings for the specified application. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. parameters is the parameters for the request. -func (client ApplicationClient) Update(resourceGroupName string, accountName string, applicationID string, parameters UpdateApplicationParameters) (result autorest.Response, err error) { +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. parameters is the parameters for the request. +func (client ApplicationClient) Update(resourceGroupName string, accountName string, applicationID string, parameters ApplicationUpdateParameters) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}, @@ -422,7 +459,7 @@ func (client ApplicationClient) Update(resourceGroupName string, accountName str } // UpdatePreparer prepares the Update request. -func (client ApplicationClient) UpdatePreparer(resourceGroupName string, accountName string, applicationID string, parameters UpdateApplicationParameters) (*http.Request, error) { +func (client ApplicationClient) UpdatePreparer(resourceGroupName string, accountName string, applicationID string, parameters ApplicationUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "applicationId": autorest.Encode("path", applicationID), @@ -430,7 +467,7 @@ func (client ApplicationClient) UpdatePreparer(resourceGroupName string, account "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/applicationpackage.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/applicationpackage.go index 0fe441880..69b6ee4a2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/applicationpackage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/applicationpackage.go @@ -14,9 +14,8 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,30 +24,26 @@ import ( "net/http" ) -// ApplicationPackageClient is the client for the ApplicationPackage methods of -// the Batch service. +// ApplicationPackageClient is the client for the ApplicationPackage methods of the Batch service. type ApplicationPackageClient struct { ManagementClient } -// NewApplicationPackageClient creates an instance of the -// ApplicationPackageClient client. +// NewApplicationPackageClient creates an instance of the ApplicationPackageClient client. func NewApplicationPackageClient(subscriptionID string) ApplicationPackageClient { return NewApplicationPackageClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationPackageClientWithBaseURI creates an instance of the -// ApplicationPackageClient client. +// NewApplicationPackageClientWithBaseURI creates an instance of the ApplicationPackageClient client. func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID string) ApplicationPackageClient { return ApplicationPackageClient{NewWithBaseURI(baseURI, subscriptionID)} } // Activate activates the specified application package. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. version is the version of the application to -// activate. parameters is the parameters for the request. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. version is the version of the application to activate. +// parameters is the parameters for the request. func (client ApplicationPackageClient) Activate(resourceGroupName string, accountName string, applicationID string, version string, parameters ActivateApplicationPackageParameters) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -93,7 +88,7 @@ func (client ApplicationPackageClient) ActivatePreparer(resourceGroupName string "version": autorest.Encode("path", version), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -128,9 +123,8 @@ func (client ApplicationPackageClient) ActivateResponder(resp *http.Response) (r // Create creates an application package record. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. version is the version of the application. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. version is the version of the application. func (client ApplicationPackageClient) Create(resourceGroupName string, accountName string, applicationID string, version string) (result ApplicationPackage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -173,7 +167,7 @@ func (client ApplicationPackageClient) CreatePreparer(resourceGroupName string, "version": autorest.Encode("path", version), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -207,9 +201,8 @@ func (client ApplicationPackageClient) CreateResponder(resp *http.Response) (res // Delete deletes an application package record and its associated binary file. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. version is the version of the application to delete. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. version is the version of the application to delete. func (client ApplicationPackageClient) Delete(resourceGroupName string, accountName string, applicationID string, version string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -252,7 +245,7 @@ func (client ApplicationPackageClient) DeletePreparer(resourceGroupName string, "version": autorest.Encode("path", version), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -285,9 +278,8 @@ func (client ApplicationPackageClient) DeleteResponder(resp *http.Response) (res // Get gets information about the specified application package. // -// resourceGroupName is the name of the resource group that contains the Batch -// account. accountName is the name of the Batch account. applicationID is the -// ID of the application. version is the version of the application. +// resourceGroupName is the name of the resource group that contains the Batch account. accountName is the name of the +// Batch account. applicationID is the ID of the application. version is the version of the application. func (client ApplicationPackageClient) Get(resourceGroupName string, accountName string, applicationID string, version string) (result ApplicationPackage, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -330,7 +322,7 @@ func (client ApplicationPackageClient) GetPreparer(resourceGroupName string, acc "version": autorest.Encode("path", version), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/client.go index e5e5c9d8e..2051127c3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/client.go @@ -1,4 +1,4 @@ -// Package batch implements the Azure ARM Batch service API version 2017-01-01. +// Package batch implements the Azure ARM Batch service API version 2017-05-01. // // package batch @@ -17,9 +17,8 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/location.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/location.go index 7ee2e0c72..2951b91e6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/location.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/location.go @@ -14,13 +14,13 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) @@ -34,16 +34,88 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient -// client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client. func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } -// GetQuotas gets the Batch service quotas for the specified subscription at -// the given location. +// CheckNameAvailability checks whether the Batch account name is available in the specified region. // -// locationName is the desired region for the quotas. +// locationName is the desired region for the name check. parameters is properties needed to check the availability of +// a name. +func (client LocationClient) CheckNameAvailability(locationName string, parameters CheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "batch.LocationClient", "CheckNameAvailability") + } + + req, err := client.CheckNameAvailabilityPreparer(locationName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "batch.LocationClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "batch.LocationClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "batch.LocationClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client LocationClient) CheckNameAvailabilityPreparer(locationName string, parameters CheckNameAvailabilityParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "locationName": autorest.Encode("path", locationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client LocationClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client LocationClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetQuotas gets the Batch service quotas for the specified subscription at the given location. +// +// locationName is the region for which to retrieve Batch service quotas. func (client LocationClient) GetQuotas(locationName string) (result LocationQuota, err error) { req, err := client.GetQuotasPreparer(locationName) if err != nil { @@ -73,7 +145,7 @@ func (client LocationClient) GetQuotasPreparer(locationName string) (*http.Reque "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-05-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/models.go index 8573f5005..ba85dd4e2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/models.go @@ -14,9 +14,8 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,6 +34,16 @@ const ( Secondary AccountKeyType = "Secondary" ) +// NameAvailabilityReason enumerates the values for name availability reason. +type NameAvailabilityReason string + +const ( + // AlreadyExists specifies the already exists state for name availability reason. + AlreadyExists NameAvailabilityReason = "AlreadyExists" + // Invalid specifies the invalid state for name availability reason. + Invalid NameAvailabilityReason = "Invalid" +) + // PackageState enumerates the values for package state. type PackageState string @@ -53,8 +62,7 @@ type PoolAllocationMode string const ( // BatchService specifies the batch service state for pool allocation mode. BatchService PoolAllocationMode = "BatchService" - // UserSubscription specifies the user subscription state for pool - // allocation mode. + // UserSubscription specifies the user subscription state for pool allocation mode. UserSubscription PoolAllocationMode = "UserSubscription" ) @@ -62,18 +70,18 @@ const ( type ProvisioningState string const ( - // Cancelled specifies the cancelled state for provisioning state. - Cancelled ProvisioningState = "Cancelled" - // Creating specifies the creating state for provisioning state. - Creating ProvisioningState = "Creating" - // Deleting specifies the deleting state for provisioning state. - Deleting ProvisioningState = "Deleting" - // Failed specifies the failed state for provisioning state. - Failed ProvisioningState = "Failed" - // Invalid specifies the invalid state for provisioning state. - Invalid ProvisioningState = "Invalid" - // Succeeded specifies the succeeded state for provisioning state. - Succeeded ProvisioningState = "Succeeded" + // ProvisioningStateCancelled specifies the provisioning state cancelled state for provisioning state. + ProvisioningStateCancelled ProvisioningState = "Cancelled" + // ProvisioningStateCreating specifies the provisioning state creating state for provisioning state. + ProvisioningStateCreating ProvisioningState = "Creating" + // ProvisioningStateDeleting specifies the provisioning state deleting state for provisioning state. + ProvisioningStateDeleting ProvisioningState = "Deleting" + // ProvisioningStateFailed specifies the provisioning state failed state for provisioning state. + ProvisioningStateFailed ProvisioningState = "Failed" + // ProvisioningStateInvalid specifies the provisioning state invalid state for provisioning state. + ProvisioningStateInvalid ProvisioningState = "Invalid" + // ProvisioningStateSucceeded specifies the provisioning state succeeded state for provisioning state. + ProvisioningStateSucceeded ProvisioningState = "Succeeded" ) // Account is contains information about an Azure Batch account. @@ -87,23 +95,24 @@ type Account struct { *AccountProperties `json:"properties,omitempty"` } -// AccountBaseProperties is the properties of a Batch account. -type AccountBaseProperties struct { +// AccountCreateParameters is parameters supplied to the Create operation. +type AccountCreateParameters struct { + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *AccountCreateProperties `json:"properties,omitempty"` +} + +// AccountCreateProperties is the properties of a Batch account. +type AccountCreateProperties struct { AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"` PoolAllocationMode PoolAllocationMode `json:"poolAllocationMode,omitempty"` KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"` } -// AccountCreateParameters is parameters supplied to the Create operation. -type AccountCreateParameters struct { - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *AccountBaseProperties `json:"properties,omitempty"` -} - // AccountKeys is a set of Azure Batch account keys. type AccountKeys struct { autorest.Response `json:"-"` + AccountName *string `json:"accountName,omitempty"` Primary *string `json:"primary,omitempty"` Secondary *string `json:"secondary,omitempty"` } @@ -134,41 +143,33 @@ type AccountProperties struct { PoolAllocationMode PoolAllocationMode `json:"poolAllocationMode,omitempty"` KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"` AutoStorage *AutoStorageProperties `json:"autoStorage,omitempty"` - CoreQuota *int32 `json:"coreQuota,omitempty"` + DedicatedCoreQuota *int32 `json:"dedicatedCoreQuota,omitempty"` + LowPriorityCoreQuota *int32 `json:"lowPriorityCoreQuota,omitempty"` PoolQuota *int32 `json:"poolQuota,omitempty"` ActiveJobAndJobScheduleQuota *int32 `json:"activeJobAndJobScheduleQuota,omitempty"` } -// AccountRegenerateKeyParameters is parameters supplied to the RegenerateKey -// operation. +// AccountRegenerateKeyParameters is parameters supplied to the RegenerateKey operation. type AccountRegenerateKeyParameters struct { KeyName AccountKeyType `json:"keyName,omitempty"` } -// AccountUpdateBaseProperties is the properties for a Batch account update. -type AccountUpdateBaseProperties struct { +// AccountUpdateParameters is parameters for updating an Azure Batch account. +type AccountUpdateParameters struct { + Tags *map[string]*string `json:"tags,omitempty"` + *AccountUpdateProperties `json:"properties,omitempty"` +} + +// AccountUpdateProperties is the properties of a Batch account. +type AccountUpdateProperties struct { AutoStorage *AutoStorageBaseProperties `json:"autoStorage,omitempty"` } -// AccountUpdateParameters is parameters supplied to the Update operation. -type AccountUpdateParameters struct { - Tags *map[string]*string `json:"tags,omitempty"` - *AccountUpdateBaseProperties `json:"properties,omitempty"` -} - -// ActivateApplicationPackageParameters is parameters for an -// ApplicationOperations.ActivateApplicationPackage request. +// ActivateApplicationPackageParameters is parameters for an activating an application package. type ActivateApplicationPackageParameters struct { Format *string `json:"format,omitempty"` } -// AddApplicationParameters is parameters for an -// ApplicationOperations.AddApplication request. -type AddApplicationParameters struct { - AllowUpdates *bool `json:"allowUpdates,omitempty"` - DisplayName *string `json:"displayName,omitempty"` -} - // Application is contains information about an application in a Batch account. type Application struct { autorest.Response `json:"-"` @@ -179,8 +180,13 @@ type Application struct { DefaultVersion *string `json:"defaultVersion,omitempty"` } -// ApplicationPackage is an application package which represents a particular -// version of an application. +// ApplicationCreateParameters is parameters for adding an Application. +type ApplicationCreateParameters struct { + AllowUpdates *bool `json:"allowUpdates,omitempty"` + DisplayName *string `json:"displayName,omitempty"` +} + +// ApplicationPackage is an application package which represents a particular version of an application. type ApplicationPackage struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -192,35 +198,58 @@ type ApplicationPackage struct { LastActivationTime *date.Time `json:"lastActivationTime,omitempty"` } -// AutoStorageBaseProperties is the properties related to auto storage account. +// ApplicationUpdateParameters is parameters for an update application request. +type ApplicationUpdateParameters struct { + AllowUpdates *bool `json:"allowUpdates,omitempty"` + DefaultVersion *string `json:"defaultVersion,omitempty"` + DisplayName *string `json:"displayName,omitempty"` +} + +// AutoStorageBaseProperties is the properties related to the auto-storage account. type AutoStorageBaseProperties struct { StorageAccountID *string `json:"storageAccountId,omitempty"` } -// AutoStorageProperties is contains information about the auto storage account -// associated with a Batch account. +// AutoStorageProperties is contains information about the auto-storage account associated with a Batch account. type AutoStorageProperties struct { StorageAccountID *string `json:"storageAccountId,omitempty"` LastKeySync *date.Time `json:"lastKeySync,omitempty"` } -// CloudError is an error response from the Batch service. -type CloudError struct { - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` - Target *string `json:"target,omitempty"` - Details *[]CloudError `json:"details,omitempty"` +// CheckNameAvailabilityParameters is parameters for a check name availability request. +type CheckNameAvailabilityParameters struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` } -// KeyVaultReference is identifies the Azure key vault associated with a Batch -// account. +// CheckNameAvailabilityResult is the CheckNameAvailability operation response. +type CheckNameAvailabilityResult struct { + autorest.Response `json:"-"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason NameAvailabilityReason `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// CloudError is an error response from the Batch service. +type CloudError struct { + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody is an error response from the Batch service. +type CloudErrorBody struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` + Details *[]CloudErrorBody `json:"details,omitempty"` +} + +// KeyVaultReference is identifies the Azure key vault associated with a Batch account. type KeyVaultReference struct { ID *string `json:"id,omitempty"` URL *string `json:"url,omitempty"` } -// ListApplicationsResult is response to an -// ApplicationOperations.ListApplications request. +// ListApplicationsResult is the result of performing list applications. type ListApplicationsResult struct { autorest.Response `json:"-"` Value *[]Application `json:"value,omitempty"` @@ -239,13 +268,47 @@ func (client ListApplicationsResult) ListApplicationsResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// LocationQuota is quotas associated with a Batch region for a particular -// subscription. +// LocationQuota is quotas associated with a Batch region for a particular subscription. type LocationQuota struct { autorest.Response `json:"-"` AccountQuota *int32 `json:"accountQuota,omitempty"` } +// Operation is +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` + Origin *string `json:"origin,omitempty"` + Properties *map[string]interface{} `json:"properties,omitempty"` +} + +// OperationDisplay is +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Operation *string `json:"operation,omitempty"` + Resource *string `json:"resource,omitempty"` + Description *string `json:"description,omitempty"` +} + +// OperationListResult is +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // Resource is a definition of an Azure resource. type Resource struct { ID *string `json:"id,omitempty"` @@ -254,11 +317,3 @@ type Resource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` } - -// UpdateApplicationParameters is parameters for an -// ApplicationOperations.UpdateApplication request. -type UpdateApplicationParameters struct { - AllowUpdates *bool `json:"allowUpdates,omitempty"` - DefaultVersion *string `json:"defaultVersion,omitempty"` - DisplayName *string `json:"displayName,omitempty"` -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/operations.go new file mode 100644 index 000000000..b8b1fdd27 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/operations.go @@ -0,0 +1,165 @@ +package batch + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the client for the Operations methods of the Batch service. +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists available operations for the Microsoft.Batch provider +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "batch.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "batch.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "batch.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-05-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Batch/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.OperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "batch.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "batch.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "batch.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go index b67c0d54c..82d68b35e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/batch/version.go @@ -14,15 +14,15 @@ package batch // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-batch/2017-05-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-batch/2017-05-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/client.go index 9b65a1cac..f861852cf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/client.go @@ -1,9 +1,7 @@ -// Package billing implements the Azure ARM Billing service API version -// 2017-04-24-preview. +// Package billing implements the Azure ARM Billing service API version 2017-04-24-preview. // -// Billing client provides access to billing resources for Azure Web-Direct -// subscriptions. Other subscription types which were not purchased directly -// through the Azure web portal are not supported through this preview API. +// Billing client provides access to billing resources for Azure Web-Direct subscriptions. Other subscription types +// which were not purchased directly through the Azure web portal are not supported through this preview API. package billing // Copyright (c) Microsoft and contributors. All rights reserved. @@ -20,9 +18,8 @@ package billing // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/invoices.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/invoices.go index 25c6fa2d7..5d9cf9a20 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/invoices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/invoices.go @@ -14,9 +14,8 @@ package billing // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// InvoicesClient is the billing client provides access to billing resources -// for Azure Web-Direct subscriptions. Other subscription types which were not -// purchased directly through the Azure web portal are not supported through -// this preview API. +// InvoicesClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other +// subscription types which were not purchased directly through the Azure web portal are not supported through this +// preview API. type InvoicesClient struct { ManagementClient } @@ -38,14 +36,13 @@ func NewInvoicesClient(subscriptionID string) InvoicesClient { return NewInvoicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient -// client. +// NewInvoicesClientWithBaseURI creates an instance of the InvoicesClient client. func NewInvoicesClientWithBaseURI(baseURI string, subscriptionID string) InvoicesClient { return InvoicesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get gets a named invoice resource. When getting a single invoice, the -// downloadUrl property is expanded automatically. +// Get gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded +// automatically. // // invoiceName is the name of an invoice resource. func (client InvoicesClient) Get(invoiceName string) (result Invoice, err error) { @@ -109,8 +106,8 @@ func (client InvoicesClient) GetResponder(resp *http.Response) (result Invoice, return } -// GetLatest gets the most recent invoice. When getting a single invoice, the -// downloadUrl property is expanded automatically. +// GetLatest gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded +// automatically. func (client InvoicesClient) GetLatest() (result Invoice, err error) { req, err := client.GetLatestPreparer() if err != nil { @@ -171,22 +168,17 @@ func (client InvoicesClient) GetLatestResponder(resp *http.Response) (result Inv return } -// List lists the available invoices for a subscription in reverse -// chronological order beginning with the most recent invoice. In preview, -// invoices are available via this API only for invoice periods which end -// December 1, 2016 or later. +// List lists the available invoices for a subscription in reverse chronological order beginning with the most recent +// invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or +// later. // -// expand is may be used to expand the downloadUrl property within a list of -// invoices. This enables download links to be generated for multiple invoices -// at once. By default, downloadURLs are not included when listing invoices. -// filter is may be used to filter invoices by invoicePeriodEndDate. The filter -// supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently -// support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a -// previous operation returned a partial result. If a previous response -// contains a nextLink element, the value of the nextLink element will include -// a skiptoken parameter that specifies a starting point to use for subsequent -// calls. top is may be used to limit the number of results to the most recent -// N invoices. +// expand is may be used to expand the downloadUrl property within a list of invoices. This enables download links to +// be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices. filter +// is may be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and +// 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a previous +// operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink +// element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top is may +// be used to limit the number of results to the most recent N invoices. func (client InvoicesClient) List(expand string, filter string, skiptoken string, top *int32) (result InvoicesListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -291,3 +283,48 @@ func (client InvoicesClient) ListNextResults(lastResults InvoicesListResult) (re return } + +// ListComplete gets all elements from the list without paging. +func (client InvoicesClient) ListComplete(expand string, filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan Invoice, <-chan error) { + resultChan := make(chan Invoice) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(expand, filter, skiptoken, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/models.go index 03c32d20c..43c914b6a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/models.go @@ -14,9 +14,8 @@ package billing // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// DownloadURL is a secure URL that can be used to download a PDF invoice until -// the URL expires. +// DownloadURL is a secure URL that can be used to download a PDF invoice until the URL expires. type DownloadURL struct { ExpiryTime *date.Time `json:"expiryTime,omitempty"` URL *string `json:"url,omitempty"` @@ -39,14 +37,13 @@ type ErrorDetails struct { Target *string `json:"target,omitempty"` } -// ErrorResponse is error response indicates that the service is not able to -// process the incoming request. The reason is provided in the error message. +// ErrorResponse is error response indicates that the service is not able to process the incoming request. The reason +// is provided in the error message. type ErrorResponse struct { Error *ErrorDetails `json:"error,omitempty"` } -// Invoice is an invoice resource can be used download a PDF version of an -// invoice. +// Invoice is an invoice resource can be used download a PDF version of an invoice. type Invoice struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -63,8 +60,8 @@ type InvoiceProperties struct { BillingPeriodIds *[]string `json:"billingPeriodIds,omitempty"` } -// InvoicesListResult is result of listing invoices. It contains a list of -// available invoices in reverse chronological order. +// InvoicesListResult is result of listing invoices. It contains a list of available invoices in reverse chronological +// order. type InvoicesListResult struct { autorest.Response `json:"-"` Value *[]Invoice `json:"value,omitempty"` @@ -96,8 +93,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result listing billing operations. It contains a list -// of operations and a URL link to get the next set of results. +// OperationListResult is result listing billing operations. It contains a list of operations and a URL link to get the +// next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -132,8 +129,8 @@ type PeriodProperties struct { InvoiceIds *[]string `json:"invoiceIds,omitempty"` } -// PeriodsListResult is result of listing billing periods. It contains a list -// of available billing periods in reverse chronological order. +// PeriodsListResult is result of listing billing periods. It contains a list of available billing periods in reverse +// chronological order. type PeriodsListResult struct { autorest.Response `json:"-"` Value *[]Period `json:"value,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/operations.go index 32baa3a54..7478c831b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/operations.go @@ -14,9 +14,8 @@ package billing // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,9 +23,8 @@ import ( "net/http" ) -// OperationsClient is the billing client provides access to billing resources -// for Azure Web-Direct subscriptions. Other subscription types which were not -// purchased directly through the Azure web portal are not supported through +// OperationsClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. +// Other subscription types which were not purchased directly through the Azure web portal are not supported through // this preview API. type OperationsClient struct { ManagementClient @@ -37,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -123,3 +120,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/periods.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/periods.go index 3178c9828..0d292fc4a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/periods.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/periods.go @@ -14,9 +14,8 @@ package billing // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// PeriodsClient is the billing client provides access to billing resources for -// Azure Web-Direct subscriptions. Other subscription types which were not -// purchased directly through the Azure web portal are not supported through -// this preview API. +// PeriodsClient is the billing client provides access to billing resources for Azure Web-Direct subscriptions. Other +// subscription types which were not purchased directly through the Azure web portal are not supported through this +// preview API. type PeriodsClient struct { ManagementClient } @@ -107,17 +105,13 @@ func (client PeriodsClient) GetResponder(resp *http.Response) (result Period, er return } -// List lists the available billing periods for a subscription in reverse -// chronological order. +// List lists the available billing periods for a subscription in reverse chronological order. // -// filter is may be used to filter billing periods by billingPeriodEndDate. The -// filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not -// currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used -// if a previous operation returned a partial result. If a previous response -// contains a nextLink element, the value of the nextLink element will include -// a skiptoken parameter that specifies a starting point to use for subsequent -// calls. top is may be used to limit the number of results to the most recent -// N billing periods. +// filter is may be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', +// 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a +// previous operation returned a partial result. If a previous response contains a nextLink element, the value of the +// nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top +// is may be used to limit the number of results to the most recent N billing periods. func (client PeriodsClient) List(filter string, skiptoken string, top *int32) (result PeriodsListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -219,3 +213,48 @@ func (client PeriodsClient) ListNextResults(lastResults PeriodsListResult) (resu return } + +// ListComplete gets all elements from the list without paging. +func (client PeriodsClient) ListComplete(filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan Period, <-chan error) { + resultChan := make(chan Period) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter, skiptoken, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go index d07688eb6..0418e6c44 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/billing/version.go @@ -14,15 +14,15 @@ package billing // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-billing/2017-04-24-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-billing/2017-04-24-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go index bd5ca9d8b..695d08375 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/client.go @@ -1,8 +1,7 @@ -// Package cdn implements the Azure ARM Cdn service API version 2016-10-02. +// Package cdn implements the Azure ARM Cdn service API version 2017-04-02. // -// Use these APIs to manage Azure CDN resources through the Azure Resource -// Manager. You must make sure that requests made to these resources are -// secure. +// Use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make sure that requests +// made to these resources are secure. package cdn // Copyright (c) Microsoft and contributors. All rights reserved. @@ -19,9 +18,8 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -56,8 +54,8 @@ func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { } } -// CheckNameAvailability check the availability of a resource name. This is -// needed for resources where name is globally unique, such as a CDN endpoint. +// CheckNameAvailability check the availability of a resource name. This is needed for resources where name is globally +// unique, such as a CDN endpoint. // // checkNameAvailabilityInput is input to check. func (client ManagementClient) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { @@ -91,7 +89,7 @@ func (client ManagementClient) CheckNameAvailability(checkNameAvailabilityInput // CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. func (client ManagementClient) CheckNameAvailabilityPreparer(checkNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,139 +123,69 @@ func (client ManagementClient) CheckNameAvailabilityResponder(resp *http.Respons return } -// ListOperations lists all of the available CDN REST API operations. -func (client ManagementClient) ListOperations() (result OperationListResult, err error) { - req, err := client.ListOperationsPreparer() +// ValidateProbe check if the probe path is a valid path and the file can be accessed. Probe path is the path to a file +// hosted on the origin server to help accelerate the delivery of dynamic content via the CDN endpoint. This path is +// relative to the origin path specified in the endpoint configuration. +// +// validateProbeInput is input to check. +func (client ManagementClient) ValidateProbe(validateProbeInput ValidateProbeInput) (result ValidateProbeOutput, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: validateProbeInput, + Constraints: []validation.Constraint{{Target: "validateProbeInput.ProbeURL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ManagementClient", "ValidateProbe") + } + + req, err := client.ValidateProbePreparer(validateProbeInput) if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ValidateProbe", nil, "Failure preparing request") return } - resp, err := client.ListOperationsSender(req) + resp, err := client.ValidateProbeSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ValidateProbe", resp, "Failure sending request") return } - result, err = client.ListOperationsResponder(resp) + result, err = client.ValidateProbeResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ValidateProbe", resp, "Failure responding to request") } return } -// ListOperationsPreparer prepares the ListOperations request. -func (client ManagementClient) ListOperationsPreparer() (*http.Request, error) { - const APIVersion = "2016-10-02" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPath("/providers/Microsoft.Cdn/operations"), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListOperationsSender sends the ListOperations request. The method will close the -// http.Response Body if it receives an error. -func (client ManagementClient) ListOperationsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListOperationsResponder handles the response to the ListOperations request. The method always -// closes the http.Response Body. -func (client ManagementClient) ListOperationsResponder(resp *http.Response) (result OperationListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListOperationsNextResults retrieves the next set of results, if any. -func (client ManagementClient) ListOperationsNextResults(lastResults OperationListResult) (result OperationListResult, err error) { - req, err := lastResults.OperationListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListOperationsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure sending next results request") - } - - result, err = client.ListOperationsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListOperations", resp, "Failure responding to next results request") - } - - return -} - -// ListResourceUsage check the quota and actual usage of the CDN profiles under -// the given subscription. -func (client ManagementClient) ListResourceUsage() (result ResourceUsageListResult, err error) { - req, err := client.ListResourceUsagePreparer() - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", nil, "Failure preparing request") - return - } - - resp, err := client.ListResourceUsageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure sending request") - return - } - - result, err = client.ListResourceUsageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure responding to request") - } - - return -} - -// ListResourceUsagePreparer prepares the ListResourceUsage request. -func (client ManagementClient) ListResourceUsagePreparer() (*http.Request, error) { +// ValidateProbePreparer prepares the ValidateProbe request. +func (client ManagementClient) ValidateProbePreparer(validateProbeInput ValidateProbeInput) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( + autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe", pathParameters), + autorest.WithJSON(validateProbeInput), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// ListResourceUsageSender sends the ListResourceUsage request. The method will close the +// ValidateProbeSender sends the ValidateProbe request. The method will close the // http.Response Body if it receives an error. -func (client ManagementClient) ListResourceUsageSender(req *http.Request) (*http.Response, error) { +func (client ManagementClient) ValidateProbeSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListResourceUsageResponder handles the response to the ListResourceUsage request. The method always +// ValidateProbeResponder handles the response to the ValidateProbe request. The method always // closes the http.Response Body. -func (client ManagementClient) ListResourceUsageResponder(resp *http.Response) (result ResourceUsageListResult, err error) { +func (client ManagementClient) ValidateProbeResponder(resp *http.Response) (result ValidateProbeOutput, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -267,27 +195,3 @@ func (client ManagementClient) ListResourceUsageResponder(resp *http.Response) ( result.Response = autorest.Response{Response: resp} return } - -// ListResourceUsageNextResults retrieves the next set of results, if any. -func (client ManagementClient) ListResourceUsageNextResults(lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) { - req, err := lastResults.ResourceUsageListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListResourceUsageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure sending next results request") - } - - result, err = client.ListResourceUsageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "cdn.ManagementClient", "ListResourceUsage", resp, "Failure responding to next results request") - } - - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go index 688927217..5eef2abaf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/customdomains.go @@ -14,9 +14,8 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,36 +24,30 @@ import ( "net/http" ) -// CustomDomainsClient is the use these APIs to manage Azure CDN resources -// through the Azure Resource Manager. You must make sure that requests made to -// these resources are secure. +// CustomDomainsClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must +// make sure that requests made to these resources are secure. type CustomDomainsClient struct { ManagementClient } -// NewCustomDomainsClient creates an instance of the CustomDomainsClient -// client. +// NewCustomDomainsClient creates an instance of the CustomDomainsClient client. func NewCustomDomainsClient(subscriptionID string) CustomDomainsClient { return NewCustomDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomDomainsClientWithBaseURI creates an instance of the -// CustomDomainsClient client. +// NewCustomDomainsClientWithBaseURI creates an instance of the CustomDomainsClient client. func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) CustomDomainsClient { return CustomDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates a new custom domain within an endpoint. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Create creates a new custom domain within an endpoint. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. customDomainName is name of the custom domain -// within an endpoint. customDomainProperties is properties required to create -// a new custom domain. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. customDomainName is name of the custom domain within an endpoint. customDomainProperties is +// properties required to create a new custom domain. func (client CustomDomainsClient) Create(resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters, cancel <-chan struct{}) (<-chan CustomDomain, <-chan error) { resultChan := make(chan CustomDomain, 1) errChan := make(chan error, 1) @@ -76,8 +69,10 @@ func (client CustomDomainsClient) Create(resourceGroupName string, profileName s var err error var result CustomDomain defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -112,7 +107,7 @@ func (client CustomDomainsClient) CreatePreparer(resourceGroupName string, profi "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -148,16 +143,13 @@ func (client CustomDomainsClient) CreateResponder(resp *http.Response) (result C return } -// Delete deletes an existing custom domain within an endpoint. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes an existing custom domain within an endpoint. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. customDomainName is name of the custom domain -// within an endpoint. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. customDomainName is name of the custom domain within an endpoint. func (client CustomDomainsClient) Delete(resourceGroupName string, profileName string, endpointName string, customDomainName string, cancel <-chan struct{}) (<-chan CustomDomain, <-chan error) { resultChan := make(chan CustomDomain, 1) errChan := make(chan error, 1) @@ -176,8 +168,10 @@ func (client CustomDomainsClient) Delete(resourceGroupName string, profileName s var err error var result CustomDomain defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -212,7 +206,7 @@ func (client CustomDomainsClient) DeletePreparer(resourceGroupName string, profi "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -248,11 +242,9 @@ func (client CustomDomainsClient) DeleteResponder(resp *http.Response) (result C // DisableCustomHTTPS disable https delivery of the custom domain. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. customDomainName is name of the custom domain -// within an endpoint. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. customDomainName is name of the custom domain within an endpoint. func (client CustomDomainsClient) DisableCustomHTTPS(resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -293,7 +285,7 @@ func (client CustomDomainsClient) DisableCustomHTTPSPreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -318,7 +310,7 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -327,11 +319,9 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons // EnableCustomHTTPS enable https delivery of the custom domain. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. customDomainName is name of the custom domain -// within an endpoint. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. customDomainName is name of the custom domain within an endpoint. func (client CustomDomainsClient) EnableCustomHTTPS(resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -372,7 +362,7 @@ func (client CustomDomainsClient) EnableCustomHTTPSPreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -397,7 +387,7 @@ func (client CustomDomainsClient) EnableCustomHTTPSResponder(resp *http.Response err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -406,11 +396,9 @@ func (client CustomDomainsClient) EnableCustomHTTPSResponder(resp *http.Response // Get gets an exisitng custom domain within an endpoint. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. customDomainName is name of the custom domain -// within an endpoint. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. customDomainName is name of the custom domain within an endpoint. func (client CustomDomainsClient) Get(resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -451,7 +439,7 @@ func (client CustomDomainsClient) GetPreparer(resourceGroupName string, profileN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -485,10 +473,9 @@ func (client CustomDomainsClient) GetResponder(resp *http.Response) (result Cust // ListByEndpoint lists all of the existing custom domains within an endpoint. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. func (client CustomDomainsClient) ListByEndpoint(resourceGroupName string, profileName string, endpointName string) (result CustomDomainListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -528,7 +515,7 @@ func (client CustomDomainsClient) ListByEndpointPreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -583,3 +570,48 @@ func (client CustomDomainsClient) ListByEndpointNextResults(lastResults CustomDo return } + +// ListByEndpointComplete gets all elements from the list without paging. +func (client CustomDomainsClient) ListByEndpointComplete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan CustomDomain, <-chan error) { + resultChan := make(chan CustomDomain) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByEndpoint(resourceGroupName, profileName, endpointName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByEndpointNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/edgenodes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/edgenodes.go index a68b5c189..731084150 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/edgenodes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/edgenodes.go @@ -14,9 +14,8 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,9 +23,8 @@ import ( "net/http" ) -// EdgeNodesClient is the use these APIs to manage Azure CDN resources through -// the Azure Resource Manager. You must make sure that requests made to these -// resources are secure. +// EdgeNodesClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must +// make sure that requests made to these resources are secure. type EdgeNodesClient struct { ManagementClient } @@ -36,13 +34,12 @@ func NewEdgeNodesClient(subscriptionID string) EdgeNodesClient { return NewEdgeNodesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient -// client. +// NewEdgeNodesClientWithBaseURI creates an instance of the EdgeNodesClient client. func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string) EdgeNodesClient { return EdgeNodesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all the edge nodes of a CDN service. +// List edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. func (client EdgeNodesClient) List() (result EdgenodeResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -67,7 +64,7 @@ func (client EdgeNodesClient) List() (result EdgenodeResult, err error) { // ListPreparer prepares the List request. func (client EdgeNodesClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -122,3 +119,48 @@ func (client EdgeNodesClient) ListNextResults(lastResults EdgenodeResult) (resul return } + +// ListComplete gets all elements from the list without paging. +func (client EdgeNodesClient) ListComplete(cancel <-chan struct{}) (<-chan EdgeNode, <-chan error) { + resultChan := make(chan EdgeNode) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go index dcc411e05..f53025c60 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/endpoints.go @@ -14,9 +14,8 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,9 +24,8 @@ import ( "net/http" ) -// EndpointsClient is the use these APIs to manage Azure CDN resources through -// the Azure Resource Manager. You must make sure that requests made to these -// resources are secure. +// EndpointsClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must +// make sure that requests made to these resources are secure. type EndpointsClient struct { ManagementClient } @@ -37,22 +35,18 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient -// client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates a new CDN endpoint with the specified endpoint name under the -// specified subscription, resource group and profile. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Create creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group +// and profile. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. +// The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. endpoint is endpoint properties +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. endpoint is endpoint properties func (client EndpointsClient) Create(resourceGroupName string, profileName string, endpointName string, endpoint Endpoint, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) { resultChan := make(chan Endpoint, 1) errChan := make(chan error, 1) @@ -74,8 +68,10 @@ func (client EndpointsClient) Create(resourceGroupName string, profileName strin var err error var result Endpoint defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -109,7 +105,7 @@ func (client EndpointsClient) CreatePreparer(resourceGroupName string, profileNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -145,16 +141,13 @@ func (client EndpointsClient) CreateResponder(resp *http.Response) (result Endpo return } -// Delete deletes an existing CDN endpoint with the specified endpoint name -// under the specified subscription, resource group and profile. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Delete deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource +// group and profile. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. func (client EndpointsClient) Delete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -173,8 +166,10 @@ func (client EndpointsClient) Delete(resourceGroupName string, profileName strin var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -208,7 +203,7 @@ func (client EndpointsClient) DeletePreparer(resourceGroupName string, profileNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -241,13 +236,12 @@ func (client EndpointsClient) DeleteResponder(resp *http.Response) (result autor return } -// Get gets an existing CDN endpoint with the specified endpoint name under the -// specified subscription, resource group and profile. +// Get gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group +// and profile. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. func (client EndpointsClient) Get(resourceGroupName string, profileName string, endpointName string) (result Endpoint, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -287,7 +281,7 @@ func (client EndpointsClient) GetPreparer(resourceGroupName string, profileName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -321,9 +315,8 @@ func (client EndpointsClient) GetResponder(resp *http.Response) (result Endpoint // ListByProfile lists existing CDN endpoints. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. func (client EndpointsClient) ListByProfile(resourceGroupName string, profileName string) (result EndpointListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -362,7 +355,7 @@ func (client EndpointsClient) ListByProfilePreparer(resourceGroupName string, pr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -418,13 +411,56 @@ func (client EndpointsClient) ListByProfileNextResults(lastResults EndpointListR return } -// ListResourceUsage checks the quota and usage of geo filters and custom -// domains under the given endpoint. +// ListByProfileComplete gets all elements from the list without paging. +func (client EndpointsClient) ListByProfileComplete(resourceGroupName string, profileName string, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) { + resultChan := make(chan Endpoint) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByProfile(resourceGroupName, profileName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByProfileNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListResourceUsage checks the quota and usage of geo filters and custom domains under the given endpoint. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. func (client EndpointsClient) ListResourceUsage(resourceGroupName string, profileName string, endpointName string) (result ResourceUsageListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -464,7 +500,7 @@ func (client EndpointsClient) ListResourceUsagePreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -520,17 +556,59 @@ func (client EndpointsClient) ListResourceUsageNextResults(lastResults ResourceU return } -// LoadContent pre-loads a content to CDN. Available for Verizon Profiles. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ListResourceUsageComplete gets all elements from the list without paging. +func (client EndpointsClient) ListResourceUsageComplete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan ResourceUsage, <-chan error) { + resultChan := make(chan ResourceUsage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListResourceUsage(resourceGroupName, profileName, endpointName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListResourceUsageNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// LoadContent pre-loads a content to CDN. Available for Verizon Profiles. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. contentFilePaths is the path to the content to be -// loaded. Path should be a full URL, e.g. ‘/pictires/city.png' which loads a -// single file +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. contentFilePaths is the path to the content to be loaded. Path should be a full URL, e.g. +// ‘/pictires/city.png' which loads a single file func (client EndpointsClient) LoadContent(resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -551,8 +629,10 @@ func (client EndpointsClient) LoadContent(resourceGroupName string, profileName var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -586,7 +666,7 @@ func (client EndpointsClient) LoadContentPreparer(resourceGroupName string, prof "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -621,18 +701,14 @@ func (client EndpointsClient) LoadContentResponder(resp *http.Response) (result return } -// PurgeContent removes a content from CDN. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// PurgeContent removes a content from CDN. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. contentFilePaths is the path to the content to be -// purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a -// single file, or a directory with a wildcard, e.g. '/pictures/*' which -// removes all folders and files in the directory. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. contentFilePaths is the path to the content to be purged. Path can be a full URL, e.g. +// '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes +// all folders and files in the directory. func (client EndpointsClient) PurgeContent(resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -653,8 +729,10 @@ func (client EndpointsClient) PurgeContent(resourceGroupName string, profileName var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -688,7 +766,7 @@ func (client EndpointsClient) PurgeContentPreparer(resourceGroupName string, pro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -723,15 +801,13 @@ func (client EndpointsClient) PurgeContentResponder(resp *http.Response) (result return } -// Start starts an existing CDN endpoint that is on a stopped state. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Start starts an existing CDN endpoint that is on a stopped state. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. func (client EndpointsClient) Start(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) { resultChan := make(chan Endpoint, 1) errChan := make(chan error, 1) @@ -750,8 +826,10 @@ func (client EndpointsClient) Start(resourceGroupName string, profileName string var err error var result Endpoint defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -785,7 +863,7 @@ func (client EndpointsClient) StartPreparer(resourceGroupName string, profileNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -819,15 +897,12 @@ func (client EndpointsClient) StartResponder(resp *http.Response) (result Endpoi return } -// Stop stops an existing running CDN endpoint. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Stop stops an existing running CDN endpoint. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. func (client EndpointsClient) Stop(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) { resultChan := make(chan Endpoint, 1) errChan := make(chan error, 1) @@ -846,8 +921,10 @@ func (client EndpointsClient) Stop(resourceGroupName string, profileName string, var err error var result Endpoint defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -881,7 +958,7 @@ func (client EndpointsClient) StopPreparer(resourceGroupName string, profileName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -915,19 +992,15 @@ func (client EndpointsClient) StopResponder(resp *http.Response) (result Endpoin return } -// Update updates an existing CDN endpoint with the specified endpoint name -// under the specified subscription, resource group and profile. Only tags and -// Origin HostHeader can be updated after creating an endpoint. To update -// origins, use the Update Origin operation. To update custom domains, use the -// Update Custom Domain operation. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Update updates an existing CDN endpoint with the specified endpoint name under the specified subscription, resource +// group and profile. Only tags and Origin HostHeader can be updated after creating an endpoint. To update origins, use +// the Update Origin operation. To update custom domains, use the Update Custom Domain operation. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. endpointUpdateProperties is endpoint update -// properties +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. endpointUpdateProperties is endpoint update properties func (client EndpointsClient) Update(resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters, cancel <-chan struct{}) (<-chan Endpoint, <-chan error) { resultChan := make(chan Endpoint, 1) errChan := make(chan error, 1) @@ -946,8 +1019,10 @@ func (client EndpointsClient) Update(resourceGroupName string, profileName strin var err error var result Endpoint defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -981,7 +1056,7 @@ func (client EndpointsClient) UpdatePreparer(resourceGroupName string, profileNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1017,14 +1092,11 @@ func (client EndpointsClient) UpdateResponder(resp *http.Response) (result Endpo return } -// ValidateCustomDomain validates the custom domain mapping to ensure it maps -// to the correct CDN endpoint in DNS. +// ValidateCustomDomain validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. customDomainProperties is custom domain to be -// validated. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. customDomainProperties is custom domain to be validated. func (client EndpointsClient) ValidateCustomDomain(resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput) (result ValidateCustomDomainOutput, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1066,7 +1138,7 @@ func (client EndpointsClient) ValidateCustomDomainPreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go index f291f8c52..fa0665246 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/models.go @@ -14,9 +14,8 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// CustomDomainResourceState enumerates the values for custom domain resource -// state. +// CustomDomainResourceState enumerates the values for custom domain resource state. type CustomDomainResourceState string const ( @@ -37,47 +35,68 @@ const ( Deleting CustomDomainResourceState = "Deleting" ) -// CustomHTTPSProvisioningState enumerates the values for custom https -// provisioning state. +// CustomHTTPSProvisioningState enumerates the values for custom https provisioning state. type CustomHTTPSProvisioningState string const ( - // Disabled specifies the disabled state for custom https provisioning - // state. + // Disabled specifies the disabled state for custom https provisioning state. Disabled CustomHTTPSProvisioningState = "Disabled" - // Disabling specifies the disabling state for custom https provisioning - // state. + // Disabling specifies the disabling state for custom https provisioning state. Disabling CustomHTTPSProvisioningState = "Disabling" // Enabled specifies the enabled state for custom https provisioning state. Enabled CustomHTTPSProvisioningState = "Enabled" - // Enabling specifies the enabling state for custom https provisioning - // state. + // Enabling specifies the enabling state for custom https provisioning state. Enabling CustomHTTPSProvisioningState = "Enabling" // Failed specifies the failed state for custom https provisioning state. Failed CustomHTTPSProvisioningState = "Failed" ) +// CustomHTTPSProvisioningSubstate enumerates the values for custom https provisioning substate. +type CustomHTTPSProvisioningSubstate string + +const ( + // CertificateDeleted specifies the certificate deleted state for custom https provisioning substate. + CertificateDeleted CustomHTTPSProvisioningSubstate = "CertificateDeleted" + // CertificateDeployed specifies the certificate deployed state for custom https provisioning substate. + CertificateDeployed CustomHTTPSProvisioningSubstate = "CertificateDeployed" + // DeletingCertificate specifies the deleting certificate state for custom https provisioning substate. + DeletingCertificate CustomHTTPSProvisioningSubstate = "DeletingCertificate" + // DeployingCertificate specifies the deploying certificate state for custom https provisioning substate. + DeployingCertificate CustomHTTPSProvisioningSubstate = "DeployingCertificate" + // DomainControlValidationRequestApproved specifies the domain control validation request approved state for custom + // https provisioning substate. + DomainControlValidationRequestApproved CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestApproved" + // DomainControlValidationRequestRejected specifies the domain control validation request rejected state for custom + // https provisioning substate. + DomainControlValidationRequestRejected CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestRejected" + // DomainControlValidationRequestTimedOut specifies the domain control validation request timed out state for custom + // https provisioning substate. + DomainControlValidationRequestTimedOut CustomHTTPSProvisioningSubstate = "DomainControlValidationRequestTimedOut" + // IssuingCertificate specifies the issuing certificate state for custom https provisioning substate. + IssuingCertificate CustomHTTPSProvisioningSubstate = "IssuingCertificate" + // PendingDomainControlValidationREquestApproval specifies the pending domain control validation r equest approval + // state for custom https provisioning substate. + PendingDomainControlValidationREquestApproval CustomHTTPSProvisioningSubstate = "PendingDomainControlValidationREquestApproval" + // SubmittingDomainControlValidationRequest specifies the submitting domain control validation request state for custom + // https provisioning substate. + SubmittingDomainControlValidationRequest CustomHTTPSProvisioningSubstate = "SubmittingDomainControlValidationRequest" +) + // EndpointResourceState enumerates the values for endpoint resource state. type EndpointResourceState string const ( - // EndpointResourceStateCreating specifies the endpoint resource state - // creating state for endpoint resource state. + // EndpointResourceStateCreating specifies the endpoint resource state creating state for endpoint resource state. EndpointResourceStateCreating EndpointResourceState = "Creating" - // EndpointResourceStateDeleting specifies the endpoint resource state - // deleting state for endpoint resource state. + // EndpointResourceStateDeleting specifies the endpoint resource state deleting state for endpoint resource state. EndpointResourceStateDeleting EndpointResourceState = "Deleting" - // EndpointResourceStateRunning specifies the endpoint resource state - // running state for endpoint resource state. + // EndpointResourceStateRunning specifies the endpoint resource state running state for endpoint resource state. EndpointResourceStateRunning EndpointResourceState = "Running" - // EndpointResourceStateStarting specifies the endpoint resource state - // starting state for endpoint resource state. + // EndpointResourceStateStarting specifies the endpoint resource state starting state for endpoint resource state. EndpointResourceStateStarting EndpointResourceState = "Starting" - // EndpointResourceStateStopped specifies the endpoint resource state - // stopped state for endpoint resource state. + // EndpointResourceStateStopped specifies the endpoint resource state stopped state for endpoint resource state. EndpointResourceStateStopped EndpointResourceState = "Stopped" - // EndpointResourceStateStopping specifies the endpoint resource state - // stopping state for endpoint resource state. + // EndpointResourceStateStopping specifies the endpoint resource state stopping state for endpoint resource state. EndpointResourceStateStopping EndpointResourceState = "Stopping" ) @@ -91,18 +110,31 @@ const ( Block GeoFilterActions = "Block" ) +// OptimizationType enumerates the values for optimization type. +type OptimizationType string + +const ( + // DynamicSiteAcceleration specifies the dynamic site acceleration state for optimization type. + DynamicSiteAcceleration OptimizationType = "DynamicSiteAcceleration" + // GeneralMediaStreaming specifies the general media streaming state for optimization type. + GeneralMediaStreaming OptimizationType = "GeneralMediaStreaming" + // GeneralWebDelivery specifies the general web delivery state for optimization type. + GeneralWebDelivery OptimizationType = "GeneralWebDelivery" + // LargeFileDownload specifies the large file download state for optimization type. + LargeFileDownload OptimizationType = "LargeFileDownload" + // VideoOnDemandMediaStreaming specifies the video on demand media streaming state for optimization type. + VideoOnDemandMediaStreaming OptimizationType = "VideoOnDemandMediaStreaming" +) + // OriginResourceState enumerates the values for origin resource state. type OriginResourceState string const ( - // OriginResourceStateActive specifies the origin resource state active - // state for origin resource state. + // OriginResourceStateActive specifies the origin resource state active state for origin resource state. OriginResourceStateActive OriginResourceState = "Active" - // OriginResourceStateCreating specifies the origin resource state creating - // state for origin resource state. + // OriginResourceStateCreating specifies the origin resource state creating state for origin resource state. OriginResourceStateCreating OriginResourceState = "Creating" - // OriginResourceStateDeleting specifies the origin resource state deleting - // state for origin resource state. + // OriginResourceStateDeleting specifies the origin resource state deleting state for origin resource state. OriginResourceStateDeleting OriginResourceState = "Deleting" ) @@ -110,35 +142,27 @@ const ( type ProfileResourceState string const ( - // ProfileResourceStateActive specifies the profile resource state active - // state for profile resource state. + // ProfileResourceStateActive specifies the profile resource state active state for profile resource state. ProfileResourceStateActive ProfileResourceState = "Active" - // ProfileResourceStateCreating specifies the profile resource state - // creating state for profile resource state. + // ProfileResourceStateCreating specifies the profile resource state creating state for profile resource state. ProfileResourceStateCreating ProfileResourceState = "Creating" - // ProfileResourceStateDeleting specifies the profile resource state - // deleting state for profile resource state. + // ProfileResourceStateDeleting specifies the profile resource state deleting state for profile resource state. ProfileResourceStateDeleting ProfileResourceState = "Deleting" - // ProfileResourceStateDisabled specifies the profile resource state - // disabled state for profile resource state. + // ProfileResourceStateDisabled specifies the profile resource state disabled state for profile resource state. ProfileResourceStateDisabled ProfileResourceState = "Disabled" ) -// QueryStringCachingBehavior enumerates the values for query string caching -// behavior. +// QueryStringCachingBehavior enumerates the values for query string caching behavior. type QueryStringCachingBehavior string const ( - // BypassCaching specifies the bypass caching state for query string - // caching behavior. + // BypassCaching specifies the bypass caching state for query string caching behavior. BypassCaching QueryStringCachingBehavior = "BypassCaching" - // IgnoreQueryString specifies the ignore query string state for query - // string caching behavior. + // IgnoreQueryString specifies the ignore query string state for query string caching behavior. IgnoreQueryString QueryStringCachingBehavior = "IgnoreQueryString" // NotSet specifies the not set state for query string caching behavior. NotSet QueryStringCachingBehavior = "NotSet" - // UseQueryString specifies the use query string state for query string - // caching behavior. + // UseQueryString specifies the use query string state for query string caching behavior. UseQueryString QueryStringCachingBehavior = "UseQueryString" ) @@ -146,8 +170,7 @@ const ( type ResourceType string const ( - // MicrosoftCdnProfilesEndpoints specifies the microsoft cdn profiles - // endpoints state for resource type. + // MicrosoftCdnProfilesEndpoints specifies the microsoft cdn profiles endpoints state for resource type. MicrosoftCdnProfilesEndpoints ResourceType = "Microsoft.Cdn/Profiles/Endpoints" ) @@ -181,14 +204,14 @@ type CheckNameAvailabilityOutput struct { Message *string `json:"message,omitempty"` } -// CidrIPAddress is cIDR Ip address +// CidrIPAddress is CIDR Ip address type CidrIPAddress struct { BaseIPAddress *string `json:"baseIpAddress,omitempty"` PrefixLength *int32 `json:"prefixLength,omitempty"` } -// CustomDomain is customer provided domain for branding purposes, e.g. -// www.consoto.com. +// CustomDomain is friendly domain name mapping to the endpoint hostname that the customer provides for branding +// purposes, e.g. www.consoto.com. type CustomDomain struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -199,9 +222,8 @@ type CustomDomain struct { *CustomDomainProperties `json:"properties,omitempty"` } -// CustomDomainListResult is result of the request to list custom domains. It -// contains a list of custom domain objects and a URL link to get the next set -// of results. +// CustomDomainListResult is result of the request to list custom domains. It contains a list of custom domain objects +// and a URL link to get the next set of results. type CustomDomainListResult struct { autorest.Response `json:"-"` Value *[]CustomDomain `json:"value,omitempty"` @@ -220,43 +242,40 @@ func (client CustomDomainListResult) CustomDomainListResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// CustomDomainParameters is the customDomain JSON object required for custom -// domain creation or update. +// CustomDomainParameters is the customDomain JSON object required for custom domain creation or update. type CustomDomainParameters struct { *CustomDomainPropertiesParameters `json:"properties,omitempty"` } -// CustomDomainProperties is the JSON object that contains the properties of -// the custom domain to create. +// CustomDomainProperties is the JSON object that contains the properties of the custom domain to create. type CustomDomainProperties struct { - HostName *string `json:"hostName,omitempty"` - ResourceState CustomDomainResourceState `json:"resourceState,omitempty"` - CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"` - ValidationData *string `json:"validationData,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + HostName *string `json:"hostName,omitempty"` + ResourceState CustomDomainResourceState `json:"resourceState,omitempty"` + CustomHTTPSProvisioningState CustomHTTPSProvisioningState `json:"customHttpsProvisioningState,omitempty"` + CustomHTTPSProvisioningSubstate CustomHTTPSProvisioningSubstate `json:"customHttpsProvisioningSubstate,omitempty"` + ValidationData *string `json:"validationData,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// CustomDomainPropertiesParameters is the JSON object that contains the -// properties of the custom domain to create. +// CustomDomainPropertiesParameters is the JSON object that contains the properties of the custom domain to create. type CustomDomainPropertiesParameters struct { HostName *string `json:"hostName,omitempty"` } -// DeepCreatedOrigin is origin to be added when creating a CDN endpoint. +// DeepCreatedOrigin is the main origin of CDN content which is added when creating a CDN endpoint. type DeepCreatedOrigin struct { Name *string `json:"name,omitempty"` *DeepCreatedOriginProperties `json:"properties,omitempty"` } -// DeepCreatedOriginProperties is properties of origin Properties of the origin -// created on the CDN endpoint. +// DeepCreatedOriginProperties is properties of the origin created on the CDN endpoint. type DeepCreatedOriginProperties struct { HostName *string `json:"hostName,omitempty"` HTTPPort *int32 `json:"httpPort,omitempty"` HTTPSPort *int32 `json:"httpsPort,omitempty"` } -// EdgeNode is edge node of CDN service. +// EdgeNode is edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. type EdgeNode struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -266,14 +285,13 @@ type EdgeNode struct { *EdgeNodeProperties `json:"properties,omitempty"` } -// EdgeNodeProperties is the JSON object that contains the properties required -// to create an edgenode. +// EdgeNodeProperties is the JSON object that contains the properties required to create an edgenode. type EdgeNodeProperties struct { IPAddressGroups *[]IPAddressGroup `json:"ipAddressGroups,omitempty"` } -// EdgenodeResult is result of the request to list CDN edgenodes. It contains a -// list of ip address group and a URL link to get the next set of results. +// EdgenodeResult is result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link +// to get the next set of results. type EdgenodeResult struct { autorest.Response `json:"-"` Value *[]EdgeNode `json:"value,omitempty"` @@ -292,10 +310,8 @@ func (client EdgenodeResult) EdgenodeResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// Endpoint is cDN endpoint is the entity within a CDN profile containing -// configuration information such as origin, protocol, content caching and -// delivery behavior. The CDN endpoint uses the URL format -// .azureedge.net. +// Endpoint is CDN endpoint is the entity within a CDN profile containing configuration information such as origin, +// protocol, content caching and delivery behavior. The CDN endpoint uses the URL format .azureedge.net. type Endpoint struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -306,8 +322,8 @@ type Endpoint struct { *EndpointProperties `json:"properties,omitempty"` } -// EndpointListResult is result of the request to list endpoints. It contains a -// list of endpoint objects and a URL link to get the the next set of results. +// EndpointListResult is result of the request to list endpoints. It contains a list of endpoint objects and a URL link +// to get the the next set of results. type EndpointListResult struct { autorest.Response `json:"-"` Value *[]Endpoint `json:"value,omitempty"` @@ -326,8 +342,7 @@ func (client EndpointListResult) EndpointListResultPreparer() (*http.Request, er autorest.WithBaseURL(to.String(client.NextLink))) } -// EndpointProperties is the JSON object that contains the properties required -// to create an endpoint. +// EndpointProperties is the JSON object that contains the properties required to create an endpoint. type EndpointProperties struct { OriginHostHeader *string `json:"originHostHeader,omitempty"` OriginPath *string `json:"originPath,omitempty"` @@ -336,7 +351,8 @@ type EndpointProperties struct { IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"` IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"` QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` - OptimizationType *string `json:"optimizationType,omitempty"` + OptimizationType OptimizationType `json:"optimizationType,omitempty"` + ProbePath *string `json:"probePath,omitempty"` GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"` HostName *string `json:"hostName,omitempty"` Origins *[]DeepCreatedOrigin `json:"origins,omitempty"` @@ -344,9 +360,7 @@ type EndpointProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// EndpointPropertiesUpdateParameters is result of the request to list -// endpoints. It contains a list of endpoints and a URL link to get the next -// set of results. +// EndpointPropertiesUpdateParameters is the JSON object containing endpoint update parameters. type EndpointPropertiesUpdateParameters struct { OriginHostHeader *string `json:"originHostHeader,omitempty"` OriginPath *string `json:"originPath,omitempty"` @@ -355,31 +369,32 @@ type EndpointPropertiesUpdateParameters struct { IsHTTPAllowed *bool `json:"isHttpAllowed,omitempty"` IsHTTPSAllowed *bool `json:"isHttpsAllowed,omitempty"` QueryStringCachingBehavior QueryStringCachingBehavior `json:"queryStringCachingBehavior,omitempty"` - OptimizationType *string `json:"optimizationType,omitempty"` + OptimizationType OptimizationType `json:"optimizationType,omitempty"` + ProbePath *string `json:"probePath,omitempty"` GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"` } -// EndpointUpdateParameters is properties required to create a new endpoint. +// EndpointUpdateParameters is properties required to create or update an endpoint. type EndpointUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` *EndpointPropertiesUpdateParameters `json:"properties,omitempty"` } -// ErrorResponse is error reponse indicates CDN service is not able to process -// the incoming request. The reason is provided in the error message. +// ErrorResponse is error reponse indicates CDN service is not able to process the incoming request. The reason is +// provided in the error message. type ErrorResponse struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } -// GeoFilter is rules defining user geo access within a CDN endpoint. +// GeoFilter is rules defining user's geo access within a CDN endpoint. type GeoFilter struct { RelativePath *string `json:"relativePath,omitempty"` Action GeoFilterActions `json:"action,omitempty"` CountryCodes *[]string `json:"countryCodes,omitempty"` } -// IPAddressGroup is cDN Ip address group +// IPAddressGroup is CDN Ip address group type IPAddressGroup struct { DeliveryRegion *string `json:"deliveryRegion,omitempty"` Ipv4Addresses *[]CidrIPAddress `json:"ipv4Addresses,omitempty"` @@ -391,7 +406,7 @@ type LoadParameters struct { ContentPaths *[]string `json:"contentPaths,omitempty"` } -// Operation is cDN REST API operation +// Operation is CDN REST API operation type Operation struct { Name *string `json:"name,omitempty"` Display *OperationDisplay `json:"display,omitempty"` @@ -404,17 +419,17 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of the request to list CDN operations. It -// contains a list of operations and a URL link to get the next set of results. -type OperationListResult struct { +// OperationsListResult is result of the request to list CDN operations. It contains a list of operations and a URL +// link to get the next set of results. +type OperationsListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` } -// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// OperationsListResultPreparer prepares a request to retrieve the next set of results. It returns // nil if no more results exist. -func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { +func (client OperationsListResult) OperationsListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } @@ -424,9 +439,8 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// Origin is cDN origin is the source of the content being delivered via CDN. -// When the edge nodes represented by an endpoint do not have the requested -// content cached, they attempt to fetch it from one or more of the configured +// Origin is CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an +// endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured // origins. type Origin struct { autorest.Response `json:"-"` @@ -438,8 +452,8 @@ type Origin struct { *OriginProperties `json:"properties,omitempty"` } -// OriginListResult is result of the request to list origins. It contains a -// list of origin objects and a URL link to get the next set of results. +// OriginListResult is result of the request to list origins. It contains a list of origin objects and a URL link to +// get the next set of results. type OriginListResult struct { autorest.Response `json:"-"` Value *[]Origin `json:"value,omitempty"` @@ -458,8 +472,7 @@ func (client OriginListResult) OriginListResultPreparer() (*http.Request, error) autorest.WithBaseURL(to.String(client.NextLink))) } -// OriginProperties is the JSON object that contains the properties of the -// origin to create. +// OriginProperties is the JSON object that contains the properties of the origin. type OriginProperties struct { HostName *string `json:"hostName,omitempty"` HTTPPort *int32 `json:"httpPort,omitempty"` @@ -468,24 +481,20 @@ type OriginProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// OriginPropertiesParameters is the JSON object that contains the properties -// of the origin to create. +// OriginPropertiesParameters is the JSON object that contains the properties of the origin. type OriginPropertiesParameters struct { HostName *string `json:"hostName,omitempty"` HTTPPort *int32 `json:"httpPort,omitempty"` HTTPSPort *int32 `json:"httpsPort,omitempty"` } -// OriginUpdateParameters is origin properties needed for origin creation or -// update. +// OriginUpdateParameters is origin properties needed for origin creation or update. type OriginUpdateParameters struct { *OriginPropertiesParameters `json:"properties,omitempty"` } -// Profile is cDN profile represents the top level resource and the entry point -// into the CDN API. This allows users to set up a logical grouping of -// endpoints in addition to creating shared configuration settings and -// selecting pricing tiers and providers. +// Profile is CDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider and +// pricing tier. type Profile struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -497,8 +506,8 @@ type Profile struct { *ProfileProperties `json:"properties,omitempty"` } -// ProfileListResult is result of the request to list profiles. It contains a -// list of profile objects and a URL link to get the the next set of results. +// ProfileListResult is result of the request to list profiles. It contains a list of profile objects and a URL link to +// get the the next set of results. type ProfileListResult struct { autorest.Response `json:"-"` Value *[]Profile `json:"value,omitempty"` @@ -517,8 +526,7 @@ func (client ProfileListResult) ProfileListResultPreparer() (*http.Request, erro autorest.WithBaseURL(to.String(client.NextLink))) } -// ProfileProperties is the JSON object that contains the properties required -// to create a profile. +// ProfileProperties is the JSON object that contains the properties required to create a profile. type ProfileProperties struct { ResourceState ProfileResourceState `json:"resourceState,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` @@ -570,20 +578,24 @@ func (client ResourceUsageListResult) ResourceUsageListResultPreparer() (*http.R autorest.WithBaseURL(to.String(client.NextLink))) } -// Sku is the pricing tier (defines a CDN provider, feature list and rate) of -// the CDN profile. +// Sku is the pricing tier (defines a CDN provider, feature list and rate) of the CDN profile. type Sku struct { Name SkuName `json:"name,omitempty"` } -// SsoURI is sSO URI required to login to the supplemental portal. +// SsoURI is the URI required to login to the supplemental portal from the Azure portal. type SsoURI struct { autorest.Response `json:"-"` SsoURIValue *string `json:"ssoUriValue,omitempty"` } -// ValidateCustomDomainInput is input of the custom domain to be validated for -// DNS mapping. +// SupportedOptimizationTypesListResult is the result of the GetSupportedOptimizationTypes API +type SupportedOptimizationTypesListResult struct { + autorest.Response `json:"-"` + SupportedOptimizationTypes *[]OptimizationType `json:"supportedOptimizationTypes,omitempty"` +} + +// ValidateCustomDomainInput is input of the custom domain to be validated for DNS mapping. type ValidateCustomDomainInput struct { HostName *string `json:"hostName,omitempty"` } @@ -595,3 +607,16 @@ type ValidateCustomDomainOutput struct { Reason *string `json:"reason,omitempty"` Message *string `json:"message,omitempty"` } + +// ValidateProbeInput is input of the validate probe API. +type ValidateProbeInput struct { + ProbeURL *string `json:"probeURL,omitempty"` +} + +// ValidateProbeOutput is output of the validate probe API. +type ValidateProbeOutput struct { + autorest.Response `json:"-"` + IsValid *bool `json:"isValid,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go new file mode 100644 index 000000000..3f67f31ff --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/operations.go @@ -0,0 +1,166 @@ +package cdn + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must +// make sure that requests made to these resources are secure. +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available CDN REST API operations. +func (client OperationsClient) List() (result OperationsListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-04-02" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Cdn/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationsListResult) (result OperationsListResult, err error) { + req, err := lastResults.OperationsListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go index f9fa1ff5c..5e2c16511 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/origins.go @@ -14,9 +14,8 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,9 +24,8 @@ import ( "net/http" ) -// OriginsClient is the use these APIs to manage Azure CDN resources through -// the Azure Resource Manager. You must make sure that requests made to these -// resources are secure. +// OriginsClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make +// sure that requests made to these resources are secure. type OriginsClient struct { ManagementClient } @@ -44,11 +42,9 @@ func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsC // Get gets an existing origin within an endpoint. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. originName is name of the origin which is unique -// within the endpoint. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. originName is name of the origin which is unique within the endpoint. func (client OriginsClient) Get(resourceGroupName string, profileName string, endpointName string, originName string) (result Origin, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -89,7 +85,7 @@ func (client OriginsClient) GetPreparer(resourceGroupName string, profileName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -123,10 +119,9 @@ func (client OriginsClient) GetResponder(resp *http.Response) (result Origin, er // ListByEndpoint lists all of the existing origins within an endpoint. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. func (client OriginsClient) ListByEndpoint(resourceGroupName string, profileName string, endpointName string) (result OriginListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -166,7 +161,7 @@ func (client OriginsClient) ListByEndpointPreparer(resourceGroupName string, pro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -222,16 +217,59 @@ func (client OriginsClient) ListByEndpointNextResults(lastResults OriginListResu return } -// Update updates an existing origin within an endpoint. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// ListByEndpointComplete gets all elements from the list without paging. +func (client OriginsClient) ListByEndpointComplete(resourceGroupName string, profileName string, endpointName string, cancel <-chan struct{}) (<-chan Origin, <-chan error) { + resultChan := make(chan Origin) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByEndpoint(resourceGroupName, profileName, endpointName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByEndpointNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates an existing origin within an endpoint. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. endpointName is name of the endpoint under the profile -// which is unique globally. originName is name of the origin which is unique -// within the endpoint. originUpdateProperties is origin properties +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. endpointName is name of the endpoint under the profile which is +// unique globally. originName is name of the origin which is unique within the endpoint. originUpdateProperties is +// origin properties func (client OriginsClient) Update(resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties OriginUpdateParameters, cancel <-chan struct{}) (<-chan Origin, <-chan error) { resultChan := make(chan Origin, 1) errChan := make(chan error, 1) @@ -250,8 +288,10 @@ func (client OriginsClient) Update(resourceGroupName string, profileName string, var err error var result Origin defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -286,7 +326,7 @@ func (client OriginsClient) UpdatePreparer(resourceGroupName string, profileName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go index c166a1b73..9c8929759 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/profiles.go @@ -14,9 +14,8 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,9 +24,8 @@ import ( "net/http" ) -// ProfilesClient is the use these APIs to manage Azure CDN resources through -// the Azure Resource Manager. You must make sure that requests made to these -// resources are secure. +// ProfilesClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must make +// sure that requests made to these resources are secure. type ProfilesClient struct { ManagementClient } @@ -37,21 +35,17 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient -// client. +// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient { return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates a new CDN profile with a profile name under the specified -// subscription and resource group. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Create creates a new CDN profile with a profile name under the specified subscription and resource group. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. profile is profile properties needed to create a new -// profile. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. profile is profile properties needed to create a new profile. func (client ProfilesClient) Create(resourceGroupName string, profileName string, profile Profile, cancel <-chan struct{}) (<-chan Profile, <-chan error) { resultChan := make(chan Profile, 1) errChan := make(chan error, 1) @@ -72,8 +66,10 @@ func (client ProfilesClient) Create(resourceGroupName string, profileName string var err error var result Profile defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -106,7 +102,7 @@ func (client ProfilesClient) CreatePreparer(resourceGroupName string, profileNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -142,16 +138,13 @@ func (client ProfilesClient) CreateResponder(resp *http.Response) (result Profil return } -// Delete deletes an existing CDN profile with the specified parameters. -// Deleting a profile will result in the deletion of all of the sub-resources -// including endpoints, origins and custom domains. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes an existing CDN profile with the specified parameters. Deleting a profile will result in the deletion +// of all of the sub-resources including endpoints, origins and custom domains. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. func (client ProfilesClient) Delete(resourceGroupName string, profileName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -170,8 +163,10 @@ func (client ProfilesClient) Delete(resourceGroupName string, profileName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -204,7 +199,7 @@ func (client ProfilesClient) DeletePreparer(resourceGroupName string, profileNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,16 +232,13 @@ func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autore return } -// GenerateSsoURI generates a dynamic SSO URI used to sign in to the CDN -// supplemental portal. Supplemnetal portal is used to configure advanced -// feature capabilities that are not yet available in the Azure portal, such as -// core reports in a standard profile; rules engine, advanced HTTP reports, and -// real-time stats and alerts in a premium profile. The SSO URI changes -// approximately every 10 minutes. +// GenerateSsoURI generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemnetal portal is +// used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports +// in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The +// SSO URI changes approximately every 10 minutes. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. func (client ProfilesClient) GenerateSsoURI(resourceGroupName string, profileName string) (result SsoURI, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -285,7 +277,7 @@ func (client ProfilesClient) GenerateSsoURIPreparer(resourceGroupName string, pr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -317,12 +309,10 @@ func (client ProfilesClient) GenerateSsoURIResponder(resp *http.Response) (resul return } -// Get gets a CDN profile with the specified profile name under the specified -// subscription and resource group. +// Get gets a CDN profile with the specified profile name under the specified subscription and resource group. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. func (client ProfilesClient) Get(resourceGroupName string, profileName string) (result Profile, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -361,7 +351,7 @@ func (client ProfilesClient) GetPreparer(resourceGroupName string, profileName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -422,7 +412,7 @@ func (client ProfilesClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -478,10 +468,54 @@ func (client ProfilesClient) ListNextResults(lastResults ProfileListResult) (res return } +// ListComplete gets all elements from the list without paging. +func (client ProfilesClient) ListComplete(cancel <-chan struct{}) (<-chan Profile, <-chan error) { + resultChan := make(chan Profile) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup lists all of the CDN profiles within a resource group. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. +// resourceGroupName is name of the Resource group within the Azure subscription. func (client ProfilesClient) ListByResourceGroup(resourceGroupName string) (result ProfileListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -519,7 +553,7 @@ func (client ProfilesClient) ListByResourceGroupPreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -575,12 +609,55 @@ func (client ProfilesClient) ListByResourceGroupNextResults(lastResults ProfileL return } -// ListResourceUsage checks the quota and actual usage of endpoints under the -// given CDN profile. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ProfilesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Profile, <-chan error) { + resultChan := make(chan Profile) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListResourceUsage checks the quota and actual usage of endpoints under the given CDN profile. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. func (client ProfilesClient) ListResourceUsage(resourceGroupName string, profileName string) (result ResourceUsageListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -619,7 +696,7 @@ func (client ProfilesClient) ListResourceUsagePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -675,16 +752,133 @@ func (client ProfilesClient) ListResourceUsageNextResults(lastResults ResourceUs return } -// Update updates an existing CDN profile with the specified profile name under -// the specified subscription and resource group. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ListResourceUsageComplete gets all elements from the list without paging. +func (client ProfilesClient) ListResourceUsageComplete(resourceGroupName string, profileName string, cancel <-chan struct{}) (<-chan ResourceUsage, <-chan error) { + resultChan := make(chan ResourceUsage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListResourceUsage(resourceGroupName, profileName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListResourceUsageNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListSupportedOptimizationTypes gets the supported optimization types for the current profile. A user can create an +// endpoint with an optimization type from the listed values. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. profileName is name of the CDN profile which is unique within -// the resource group. profileUpdateParameters is profile properties needed to -// update an existing profile. +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. +func (client ProfilesClient) ListSupportedOptimizationTypes(resourceGroupName string, profileName string) (result SupportedOptimizationTypesListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes") + } + + req, err := client.ListSupportedOptimizationTypesPreparer(resourceGroupName, profileName) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes", nil, "Failure preparing request") + return + } + + resp, err := client.ListSupportedOptimizationTypesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes", resp, "Failure sending request") + return + } + + result, err = client.ListSupportedOptimizationTypesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ProfilesClient", "ListSupportedOptimizationTypes", resp, "Failure responding to request") + } + + return +} + +// ListSupportedOptimizationTypesPreparer prepares the ListSupportedOptimizationTypes request. +func (client ProfilesClient) ListSupportedOptimizationTypesPreparer(resourceGroupName string, profileName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-02" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/getSupportedOptimizationTypes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSupportedOptimizationTypesSender sends the ListSupportedOptimizationTypes request. The method will close the +// http.Response Body if it receives an error. +func (client ProfilesClient) ListSupportedOptimizationTypesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSupportedOptimizationTypesResponder handles the response to the ListSupportedOptimizationTypes request. The method always +// closes the http.Response Body. +func (client ProfilesClient) ListSupportedOptimizationTypesResponder(resp *http.Response) (result SupportedOptimizationTypesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates an existing CDN profile with the specified profile name under the specified subscription and resource +// group. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is name of the Resource group within the Azure subscription. profileName is name of the CDN +// profile which is unique within the resource group. profileUpdateParameters is profile properties needed to update an +// existing profile. func (client ProfilesClient) Update(resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters, cancel <-chan struct{}) (<-chan Profile, <-chan error) { resultChan := make(chan Profile, 1) errChan := make(chan error, 1) @@ -703,8 +897,10 @@ func (client ProfilesClient) Update(resourceGroupName string, profileName string var err error var result Profile defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -737,7 +933,7 @@ func (client ProfilesClient) UpdatePreparer(resourceGroupName string, profileNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-10-02" + const APIVersion = "2017-04-02" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/resourceusage.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/resourceusage.go new file mode 100644 index 000000000..0a2868ea3 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/resourceusage.go @@ -0,0 +1,170 @@ +package cdn + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ResourceUsageClient is the use these APIs to manage Azure CDN resources through the Azure Resource Manager. You must +// make sure that requests made to these resources are secure. +type ResourceUsageClient struct { + ManagementClient +} + +// NewResourceUsageClient creates an instance of the ResourceUsageClient client. +func NewResourceUsageClient(subscriptionID string) ResourceUsageClient { + return NewResourceUsageClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceUsageClientWithBaseURI creates an instance of the ResourceUsageClient client. +func NewResourceUsageClientWithBaseURI(baseURI string, subscriptionID string) ResourceUsageClient { + return ResourceUsageClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List check the quota and actual usage of the CDN profiles under the given subscription. +func (client ResourceUsageClient) List() (result ResourceUsageListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ResourceUsageClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-02" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkResourceUsage", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceUsageClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ResourceUsageClient) ListResponder(resp *http.Response) (result ResourceUsageListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client ResourceUsageClient) ListNextResults(lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) { + req, err := lastResults.ResourceUsageListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client ResourceUsageClient) ListComplete(cancel <-chan struct{}) (<-chan ResourceUsage, <-chan error) { + resultChan := make(chan ResourceUsage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go index 68d77a1c2..dd6377c93 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cdn/version.go @@ -14,15 +14,15 @@ package cdn // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-cdn/2016-10-02" + return "Azure-SDK-For-Go/v11.0.0-beta arm-cdn/2017-04-02" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/accounts.go index 76cb1d4f9..b518029fa 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/accounts.go @@ -14,9 +14,8 @@ package cognitiveservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,27 +34,21 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient -// client. +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create create Cognitive Services Account. Accounts is a resource group wide -// resource type. It holds the keys for developer to access intelligent APIs. -// It's also the resource type for billing. +// Create create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for +// developer to access intelligent APIs. It's also the resource type for billing. // -// resourceGroupName is the name of the resource group within the user's -// subscription. accountName is the name of the cognitive services account -// within the specified resource group. Cognitive Services account names must -// be between 3 and 24 characters in length and use numbers and lower-case -// letters only. parameters is the parameters to provide for the created -// account. +// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of +// Cognitive Services account. parameters is the parameters to provide for the created account. func (client AccountsClient) Create(resourceGroupName string, accountName string, parameters AccountCreateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}, @@ -93,7 +86,7 @@ func (client AccountsClient) CreatePreparer(resourceGroupName string, accountNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -129,16 +122,13 @@ func (client AccountsClient) CreateResponder(resp *http.Response) (result Accoun // Delete deletes a Cognitive Services account from the resource group. // -// resourceGroupName is the name of the resource group within the user's -// subscription. accountName is the name of the cognitive services account -// within the specified resource group. Cognitive Services account names must -// be between 3 and 24 characters in length and use numbers and lower-case -// letters only. +// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of +// Cognitive Services account. func (client AccountsClient) Delete(resourceGroupName string, accountName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "Delete") } @@ -172,7 +162,7 @@ func (client AccountsClient) DeletePreparer(resourceGroupName string, accountNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -203,19 +193,15 @@ func (client AccountsClient) DeleteResponder(resp *http.Response) (result autore return } -// GetProperties returns a Cognitive Services account specified by the -// parameters. +// GetProperties returns a Cognitive Services account specified by the parameters. // -// resourceGroupName is the name of the resource group within the user's -// subscription. accountName is the name of the cognitive services account -// within the specified resource group. Cognitive Services account names must -// be between 3 and 24 characters in length and use numbers and lower-case -// letters only. +// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of +// Cognitive Services account. func (client AccountsClient) GetProperties(resourceGroupName string, accountName string) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "GetProperties") } @@ -249,7 +235,7 @@ func (client AccountsClient) GetPropertiesPreparer(resourceGroupName string, acc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,8 +267,7 @@ func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result return } -// List returns all the resources of a particular type belonging to a -// subscription. +// List returns all the resources of a particular type belonging to a subscription. func (client AccountsClient) List() (result AccountListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -311,7 +296,7 @@ func (client AccountsClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -343,11 +328,78 @@ func (client AccountsClient) ListResponder(resp *http.Response) (result AccountL return } -// ListByResourceGroup returns all the resources of a particular type belonging -// to a resource group +// ListNextResults retrieves the next set of results, if any. +func (client AccountsClient) ListNextResults(lastResults AccountListResult) (result AccountListResult, err error) { + req, err := lastResults.AccountListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client AccountsClient) ListComplete(cancel <-chan struct{}) (<-chan Account, <-chan error) { + resultChan := make(chan Account) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup returns all the resources of a particular type belonging to a resource group // -// resourceGroupName is the name of the resource group within the user's -// subscription. +// resourceGroupName is the name of the resource group within the user's subscription. func (client AccountsClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { @@ -377,7 +429,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -409,19 +461,84 @@ func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) ( return } -// ListKeys lists the account keys for the specified Cognitive Services -// account. +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client AccountsClient) ListByResourceGroupNextResults(lastResults AccountListResult) (result AccountListResult, err error) { + req, err := lastResults.AccountListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "ListByResourceGroup", resp, "Failure sending next results request") + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "ListByResourceGroup", resp, "Failure responding to next results request") + } + + return +} + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AccountsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Account, <-chan error) { + resultChan := make(chan Account) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeys lists the account keys for the specified Cognitive Services account. // -// resourceGroupName is the name of the resource group within the user's -// subscription. accountName is the name of the cognitive services account -// within the specified resource group. Congitive Services account names must -// be between 3 and 24 characters in length and use numbers and lower-case -// letters only. +// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of +// Cognitive Services account. func (client AccountsClient) ListKeys(resourceGroupName string, accountName string) (result AccountKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "ListKeys") } @@ -455,7 +572,7 @@ func (client AccountsClient) ListKeysPreparer(resourceGroupName string, accountN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -489,16 +606,13 @@ func (client AccountsClient) ListKeysResponder(resp *http.Response) (result Acco // ListSkus list available SKUs for the requested Cognitive Services account // -// resourceGroupName is the name of the resource group within the user's -// subscription. accountName is the name of the cognitive services account -// within the specified resource group. Cognitive Services account names must -// be between 3 and 24 characters in length and use numbers and lower-case -// letters only. +// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of +// Cognitive Services account. func (client AccountsClient) ListSkus(resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "ListSkus") } @@ -532,7 +646,7 @@ func (client AccountsClient) ListSkusPreparer(resourceGroupName string, accountN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -564,24 +678,20 @@ func (client AccountsClient) ListSkusResponder(resp *http.Response) (result Acco return } -// RegenerateKey regenerates the specified account key for the specified -// Cognitive Services account. +// RegenerateKey regenerates the specified account key for the specified Cognitive Services account. // -// resourceGroupName is the name of the resource group within the user's -// subscription. accountName is the name of the cognitive services account -// within the specified resource group. Cognitive Services account names must -// be between 3 and 24 characters in length and use numbers and lower-case -// letters only. body is regenerate key parameters. -func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName string, body RegenerateKeyParameters) (result AccountKeys, err error) { +// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of +// Cognitive Services account. parameters is regenerate key parameters. +func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName string, parameters RegenerateKeyParameters) (result AccountKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "RegenerateKey") } - req, err := client.RegenerateKeyPreparer(resourceGroupName, accountName, body) + req, err := client.RegenerateKeyPreparer(resourceGroupName, accountName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "RegenerateKey", nil, "Failure preparing request") return @@ -603,14 +713,14 @@ func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName } // RegenerateKeyPreparer prepares the RegenerateKey request. -func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, accountName string, body RegenerateKeyParameters) (*http.Request, error) { +func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, accountName string, parameters RegenerateKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -620,7 +730,7 @@ func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, acc autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/regenerateKey", pathParameters), - autorest.WithJSON(body), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -646,21 +756,18 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result // Update updates a Cognitive Services account // -// resourceGroupName is the name of the resource group within the user's -// subscription. accountName is the name of the cognitive services account -// within the specified resource group. Cognitive Services account names must -// be between 3 and 24 characters in length and use numbers and lower-case -// letters only. body is the parameters to provide for the created account. -func (client AccountsClient) Update(resourceGroupName string, accountName string, body AccountUpdateParameters) (result Account, err error) { +// resourceGroupName is the name of the resource group within the user's subscription. accountName is the name of +// Cognitive Services account. parameters is the parameters to provide for the created account. +func (client AccountsClient) Update(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, - Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "accountName", Name: validation.MinLength, Rule: 3, Chain: nil}, + Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil}, {Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "cognitiveservices.AccountsClient", "Update") } - req, err := client.UpdatePreparer(resourceGroupName, accountName, body) + req, err := client.UpdatePreparer(resourceGroupName, accountName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "Update", nil, "Failure preparing request") return @@ -682,14 +789,14 @@ func (client AccountsClient) Update(resourceGroupName string, accountName string } // UpdatePreparer prepares the Update request. -func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountName string, body AccountUpdateParameters) (*http.Request, error) { +func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "accountName": autorest.Encode("path", accountName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-01-preview" + const APIVersion = "2017-04-18" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -699,7 +806,7 @@ func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountNam autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}", pathParameters), - autorest.WithJSON(body), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/checkskuavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/checkskuavailability.go new file mode 100644 index 000000000..3be83d969 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/checkskuavailability.go @@ -0,0 +1,113 @@ +package cognitiveservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// CheckSkuAvailabilityClient is the cognitive Services Management Client +type CheckSkuAvailabilityClient struct { + ManagementClient +} + +// NewCheckSkuAvailabilityClient creates an instance of the CheckSkuAvailabilityClient client. +func NewCheckSkuAvailabilityClient(subscriptionID string) CheckSkuAvailabilityClient { + return NewCheckSkuAvailabilityClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewCheckSkuAvailabilityClientWithBaseURI creates an instance of the CheckSkuAvailabilityClient client. +func NewCheckSkuAvailabilityClientWithBaseURI(baseURI string, subscriptionID string) CheckSkuAvailabilityClient { + return CheckSkuAvailabilityClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List check available SKUs. +// +// location is resource location. parameters is check SKU Availablity POST body. +func (client CheckSkuAvailabilityClient) List(location string, parameters CheckSkuAvailabilityParameter) (result CheckSkuAvailabilityResultList, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Skus", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List") + } + + req, err := client.ListPreparer(location, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cognitiveservices.CheckSkuAvailabilityClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client CheckSkuAvailabilityClient) ListPreparer(location string, parameters CheckSkuAvailabilityParameter) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-18" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client CheckSkuAvailabilityClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client CheckSkuAvailabilityClient) ListResponder(resp *http.Response) (result CheckSkuAvailabilityResultList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/client.go index ba9db9424..fc51c8b2f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/client.go @@ -1,5 +1,4 @@ -// Package cognitiveservices implements the Azure ARM Cognitiveservices service -// API version 2016-02-01-preview. +// Package cognitiveservices implements the Azure ARM Cognitiveservices service API version 2017-04-18. // // Cognitive Services Management Client package cognitiveservices @@ -18,9 +17,8 @@ package cognitiveservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/models.go index e4ba9e691..b42642591 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/models.go @@ -14,12 +14,13 @@ package cognitiveservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/to" + "net/http" ) // KeyName enumerates the values for key name. @@ -50,6 +51,8 @@ const ( ComputerVision Kind = "ComputerVision" // ContentModerator specifies the content moderator state for kind. ContentModerator Kind = "ContentModerator" + // CustomSpeech specifies the custom speech state for kind. + CustomSpeech Kind = "CustomSpeech" // Emotion specifies the emotion state for kind. Emotion Kind = "Emotion" // Face specifies the face state for kind. @@ -126,8 +129,8 @@ const ( Standard SkuTier = "Standard" ) -// Account is cognitive Services Account is an Azure resource representing the -// provisioned account, its type, location and SKU. +// Account is cognitive Services Account is an Azure resource representing the provisioned account, its type, location +// and SKU. type Account struct { autorest.Response `json:"-"` Etag *string `json:"etag,omitempty"` @@ -150,8 +153,7 @@ type AccountCreateParameters struct { Properties *map[string]interface{} `json:"properties,omitempty"` } -// AccountEnumerateSkusResult is the list of cognitive services accounts -// operation response. +// AccountEnumerateSkusResult is the list of cognitive services accounts operation response. type AccountEnumerateSkusResult struct { autorest.Response `json:"-"` Value *[]ResourceAndSku `json:"value,omitempty"` @@ -164,17 +166,30 @@ type AccountKeys struct { Key2 *string `json:"key2,omitempty"` } -// AccountListResult is the list of cognitive services accounts operation -// response. +// AccountListResult is the list of cognitive services accounts operation response. type AccountListResult struct { autorest.Response `json:"-"` + NextLink *string `json:"nextLink,omitempty"` Value *[]Account `json:"value,omitempty"` } -// AccountProperties is +// AccountListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client AccountListResult) AccountListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// AccountProperties is properties of Cognitive Services account. type AccountProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` Endpoint *string `json:"endpoint,omitempty"` + InternalID *string `json:"internalId,omitempty"` } // AccountUpdateParameters is the parameters to provide for the account. @@ -183,23 +198,81 @@ type AccountUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// Error is +// CheckSkuAvailabilityParameter is check SKU availability parameter. +type CheckSkuAvailabilityParameter struct { + Skus *[]SkuName `json:"skus,omitempty"` + Kind Kind `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` +} + +// CheckSkuAvailabilityResult is check SKU availability result. +type CheckSkuAvailabilityResult struct { + Kind Kind `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + SkuName SkuName `json:"skuName,omitempty"` + SkuAvailable *bool `json:"skuAvailable,omitempty"` + Reason *string `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` +} + +// CheckSkuAvailabilityResultList is check SKU availability result list. +type CheckSkuAvailabilityResultList struct { + autorest.Response `json:"-"` + Value *[]CheckSkuAvailabilityResult `json:"value,omitempty"` +} + +// Error is cognitive Services error object. type Error struct { Error *ErrorBody `json:"error,omitempty"` } -// ErrorBody is +// ErrorBody is cognitive Services error body. type ErrorBody struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } +// OperationDisplayInfo is the operation supported by Cognitive Services. +type OperationDisplayInfo struct { + Description *string `json:"description,omitempty"` + Operation *string `json:"operation,omitempty"` + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` +} + +// OperationEntity is the operation supported by Cognitive Services. +type OperationEntity struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplayInfo `json:"display,omitempty"` + Origin *string `json:"origin,omitempty"` + Properties *map[string]interface{} `json:"properties,omitempty"` +} + +// OperationEntityListResult is the list of cognitive services accounts operation response. +type OperationEntityListResult struct { + autorest.Response `json:"-"` + NextLink *string `json:"nextLink,omitempty"` + Value *[]OperationEntity `json:"value,omitempty"` +} + +// OperationEntityListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationEntityListResult) OperationEntityListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // RegenerateKeyParameters is regenerate key parameters. type RegenerateKeyParameters struct { KeyName KeyName `json:"keyName,omitempty"` } -// ResourceAndSku is +// ResourceAndSku is cognitive Services resource type and SKU. type ResourceAndSku struct { ResourceType *string `json:"resourceType,omitempty"` Sku *Sku `json:"sku,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/operations.go new file mode 100644 index 000000000..758d2c061 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/operations.go @@ -0,0 +1,165 @@ +package cognitiveservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the cognitive Services Management Client +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all the available Cognitive Services account operations. +func (client OperationsClient) List() (result OperationEntityListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-04-18" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.CognitiveServices/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationEntityListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationEntityListResult) (result OperationEntityListResult, err error) { + req, err := lastResults.OperationEntityListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationEntity, <-chan error) { + resultChan := make(chan OperationEntity) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/version.go index 2b04b63f7..258a75512 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cognitiveservices/version.go @@ -14,15 +14,15 @@ package cognitiveservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-cognitiveservices/2016-02-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-cognitiveservices/2017-04-18" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/client.go index 289d50cfe..e5ffe869c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/client.go @@ -1,5 +1,4 @@ -// Package commerce implements the Azure ARM Commerce service API version -// 2015-06-01-preview. +// Package commerce implements the Azure ARM Commerce service API version 2015-06-01-preview. // // package commerce @@ -18,9 +17,8 @@ package commerce // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/models.go index 1497c45d8..f59ff9aa2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/models.go @@ -14,15 +14,16 @@ package commerce // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "github.com/shopspring/decimal" "net/http" ) @@ -37,6 +38,18 @@ const ( Hourly AggregationGranularity = "Hourly" ) +// Name enumerates the values for name. +type Name string + +const ( + // NameMonetaryCommitment specifies the name monetary commitment state for name. + NameMonetaryCommitment Name = "Monetary Commitment" + // NameMonetaryCredit specifies the name monetary credit state for name. + NameMonetaryCredit Name = "Monetary Credit" + // NameRecurringCharge specifies the name recurring charge state for name. + NameRecurringCharge Name = "Recurring Charge" +) + // ErrorResponse is describes the format of Error response. type ErrorResponse struct { Code *string `json:"code,omitempty"` @@ -62,28 +75,126 @@ type MeterInfo struct { IncludedQuantity *float64 `json:"IncludedQuantity,omitempty"` } -// MonetaryCommitment is indicates that a monetary commitment is required for -// this offer +// MonetaryCommitment is indicates that a monetary commitment is required for this offer type MonetaryCommitment struct { EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` + Name Name `json:"Name,omitempty"` TieredDiscount *map[string]*decimal.Decimal `json:"TieredDiscount,omitempty"` ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"` } +// MarshalJSON is the custom marshaler for MonetaryCommitment. +func (mc MonetaryCommitment) MarshalJSON() ([]byte, error) { + mc.Name = NameMonetaryCommitment + type Alias MonetaryCommitment + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mc), + }) +} + +// AsMonetaryCredit is the OfferTermInfo implementation for MonetaryCommitment. +func (mc MonetaryCommitment) AsMonetaryCredit() (*MonetaryCredit, bool) { + return nil, false +} + +// AsMonetaryCommitment is the OfferTermInfo implementation for MonetaryCommitment. +func (mc MonetaryCommitment) AsMonetaryCommitment() (*MonetaryCommitment, bool) { + return &mc, true +} + +// AsRecurringCharge is the OfferTermInfo implementation for MonetaryCommitment. +func (mc MonetaryCommitment) AsRecurringCharge() (*RecurringCharge, bool) { + return nil, false +} + // MonetaryCredit is indicates that this is a monetary credit offer. type MonetaryCredit struct { EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` + Name Name `json:"Name,omitempty"` Credit *decimal.Decimal `json:"Credit,omitempty"` ExcludedMeterIds *[]uuid.UUID `json:"ExcludedMeterIds,omitempty"` } -// OfferTermInfo is describes the offer term. -type OfferTermInfo struct { - EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` +// MarshalJSON is the custom marshaler for MonetaryCredit. +func (mc MonetaryCredit) MarshalJSON() ([]byte, error) { + mc.Name = NameMonetaryCredit + type Alias MonetaryCredit + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mc), + }) } -// RateCardQueryParameters is parameters that are used in the odata $filter -// query parameter for providing RateCard information. +// AsMonetaryCredit is the OfferTermInfo implementation for MonetaryCredit. +func (mc MonetaryCredit) AsMonetaryCredit() (*MonetaryCredit, bool) { + return &mc, true +} + +// AsMonetaryCommitment is the OfferTermInfo implementation for MonetaryCredit. +func (mc MonetaryCredit) AsMonetaryCommitment() (*MonetaryCommitment, bool) { + return nil, false +} + +// AsRecurringCharge is the OfferTermInfo implementation for MonetaryCredit. +func (mc MonetaryCredit) AsRecurringCharge() (*RecurringCharge, bool) { + return nil, false +} + +// OfferTermInfo is describes the offer term. +type OfferTermInfo interface { + AsMonetaryCredit() (*MonetaryCredit, bool) + AsMonetaryCommitment() (*MonetaryCommitment, bool) + AsRecurringCharge() (*RecurringCharge, bool) +} + +func unmarshalOfferTermInfo(body []byte) (OfferTermInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["Name"] { + case string(NameMonetaryCredit): + var mc MonetaryCredit + err := json.Unmarshal(body, &mc) + return mc, err + case string(NameMonetaryCommitment): + var mc MonetaryCommitment + err := json.Unmarshal(body, &mc) + return mc, err + case string(NameRecurringCharge): + var rc RecurringCharge + err := json.Unmarshal(body, &rc) + return rc, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalOfferTermInfoArray(body []byte) ([]OfferTermInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + otiArray := make([]OfferTermInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + oti, err := unmarshalOfferTermInfo(*rawMessage) + if err != nil { + return nil, err + } + otiArray[index] = oti + } + return otiArray, nil +} + +// RateCardQueryParameters is parameters that are used in the odata $filter query parameter for providing RateCard +// information. type RateCardQueryParameters struct { OfferDurableID *string `json:"OfferDurableId,omitempty"` Currency *string `json:"Currency,omitempty"` @@ -94,9 +205,36 @@ type RateCardQueryParameters struct { // RecurringCharge is indicates a recurring charge is present for this offer. type RecurringCharge struct { EffectiveDate *date.Time `json:"EffectiveDate,omitempty"` + Name Name `json:"Name,omitempty"` RecurringCharge *int32 `json:"RecurringCharge,omitempty"` } +// MarshalJSON is the custom marshaler for RecurringCharge. +func (rc RecurringCharge) MarshalJSON() ([]byte, error) { + rc.Name = NameRecurringCharge + type Alias RecurringCharge + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rc), + }) +} + +// AsMonetaryCredit is the OfferTermInfo implementation for RecurringCharge. +func (rc RecurringCharge) AsMonetaryCredit() (*MonetaryCredit, bool) { + return nil, false +} + +// AsMonetaryCommitment is the OfferTermInfo implementation for RecurringCharge. +func (rc RecurringCharge) AsMonetaryCommitment() (*MonetaryCommitment, bool) { + return nil, false +} + +// AsRecurringCharge is the OfferTermInfo implementation for RecurringCharge. +func (rc RecurringCharge) AsRecurringCharge() (*RecurringCharge, bool) { + return &rc, true +} + // ResourceRateCardInfo is price and Metadata information for resources type ResourceRateCardInfo struct { autorest.Response `json:"-"` @@ -107,6 +245,67 @@ type ResourceRateCardInfo struct { Meters *[]MeterInfo `json:"Meters,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for ResourceRateCardInfo struct. +func (rrci *ResourceRateCardInfo) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["Currency"] + if v != nil { + var currency string + err = json.Unmarshal(*m["Currency"], ¤cy) + if err != nil { + return err + } + rrci.Currency = ¤cy + } + + v = m["Locale"] + if v != nil { + var locale string + err = json.Unmarshal(*m["Locale"], &locale) + if err != nil { + return err + } + rrci.Locale = &locale + } + + v = m["IsTaxIncluded"] + if v != nil { + var isTaxIncluded bool + err = json.Unmarshal(*m["IsTaxIncluded"], &isTaxIncluded) + if err != nil { + return err + } + rrci.IsTaxIncluded = &isTaxIncluded + } + + v = m["OfferTerms"] + if v != nil { + offerTerms, err := unmarshalOfferTermInfoArray(*m["OfferTerms"]) + if err != nil { + return err + } + rrci.OfferTerms = &offerTerms + } + + v = m["Meters"] + if v != nil { + var meters []MeterInfo + err = json.Unmarshal(*m["Meters"], &meters) + if err != nil { + return err + } + rrci.Meters = &meters + } + + return nil +} + // UsageAggregation is describes the usageAggregation. type UsageAggregation struct { ID *string `json:"id,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/ratecard.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/ratecard.go index 2550c64ef..9696562d0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/ratecard.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/ratecard.go @@ -14,9 +14,8 @@ package commerce // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// RateCardClient is the client for the RateCard methods of the Commerce -// service. +// RateCardClient is the client for the RateCard methods of the Commerce service. type RateCardClient struct { ManagementClient } @@ -35,26 +33,21 @@ func NewRateCardClient(subscriptionID string) RateCardClient { return NewRateCardClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRateCardClientWithBaseURI creates an instance of the RateCardClient -// client. +// NewRateCardClientWithBaseURI creates an instance of the RateCardClient client. func NewRateCardClientWithBaseURI(baseURI string, subscriptionID string) RateCardClient { return RateCardClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get enables you to query for the resource/meter metadata and related prices -// used in a given subscription by Offer ID, Currency, Locale and Region. The -// metadata associated with the billing meters, including but not limited to -// service names, types, resources, units of measure, and regions, is subject -// to change at any time and without notice. If you intend to use this billing -// data in an automated fashion, please use the billing meter GUID to uniquely -// identify each billable item. If the billing meter GUID is scheduled to -// change due to a new billing model, you will be notified in advance of the -// change. +// Get enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer +// ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to +// service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. +// If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely +// identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will +// be notified in advance of the change. // -// filter is the filter to apply on the operation. It ONLY supports the 'eq' -// and 'and' logical operators at this time. All the 4 query parameters -// 'OfferDurableId', 'Currency', 'Locale', 'Region' are required to be a part -// of the $filter. +// filter is the filter to apply on the operation. It ONLY supports the 'eq' and 'and' logical operators at this time. +// All the 4 query parameters 'OfferDurableId', 'Currency', 'Locale', 'Region' are required to be a part of the +// $filter. func (client RateCardClient) Get(filter string) (result ResourceRateCardInfo, err error) { req, err := client.GetPreparer(filter) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/usageaggregates.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/usageaggregates.go index 4fe228405..d2e15184d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/usageaggregates.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/usageaggregates.go @@ -14,9 +14,8 @@ package commerce // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,40 +24,32 @@ import ( "net/http" ) -// UsageAggregatesClient is the client for the UsageAggregates methods of the -// Commerce service. +// UsageAggregatesClient is the client for the UsageAggregates methods of the Commerce service. type UsageAggregatesClient struct { ManagementClient } -// NewUsageAggregatesClient creates an instance of the UsageAggregatesClient -// client. +// NewUsageAggregatesClient creates an instance of the UsageAggregatesClient client. func NewUsageAggregatesClient(subscriptionID string) UsageAggregatesClient { return NewUsageAggregatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageAggregatesClientWithBaseURI creates an instance of the -// UsageAggregatesClient client. +// NewUsageAggregatesClientWithBaseURI creates an instance of the UsageAggregatesClient client. func NewUsageAggregatesClientWithBaseURI(baseURI string, subscriptionID string) UsageAggregatesClient { return UsageAggregatesClient{NewWithBaseURI(baseURI, subscriptionID)} } // List query aggregated Azure subscription consumption data for a date range. // -// reportedStartTime is the start of the time range to retrieve data for. -// reportedEndTime is the end of the time range to retrieve data for. -// showDetails is `True` returns usage data in instance-level detail, `false` -// causes server-side aggregation with fewer details. For example, if you have -// 3 website instances, by default you will get 3 line items for website -// consumption. If you specify showDetails = false, the data will be aggregated -// as a single line item for website consumption within the time period (for -// the given subscriptionId, meterId, usageStartTime and usageEndTime). -// aggregationGranularity is `Daily` (default) returns the data in daily -// granularity, `Hourly` returns the data in hourly granularity. -// continuationToken is used when a continuation token string is provided in -// the response body of the previous call, enabling paging through a large -// result set. If not present, the data is retrieved from the beginning of the -// day/hour (based on the granularity) passed in. +// reportedStartTime is the start of the time range to retrieve data for. reportedEndTime is the end of the time range +// to retrieve data for. showDetails is `True` returns usage data in instance-level detail, `false` causes server-side +// aggregation with fewer details. For example, if you have 3 website instances, by default you will get 3 line items +// for website consumption. If you specify showDetails = false, the data will be aggregated as a single line item for +// website consumption within the time period (for the given subscriptionId, meterId, usageStartTime and usageEndTime). +// aggregationGranularity is `Daily` (default) returns the data in daily granularity, `Hourly` returns the data in +// hourly granularity. continuationToken is used when a continuation token string is provided in the response body of +// the previous call, enabling paging through a large result set. If not present, the data is retrieved from the +// beginning of the day/hour (based on the granularity) passed in. func (client UsageAggregatesClient) List(reportedStartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity AggregationGranularity, continuationToken string) (result UsageAggregationListResult, err error) { req, err := client.ListPreparer(reportedStartTime, reportedEndTime, showDetails, aggregationGranularity, continuationToken) if err != nil { @@ -153,3 +144,48 @@ func (client UsageAggregatesClient) ListNextResults(lastResults UsageAggregation return } + +// ListComplete gets all elements from the list without paging. +func (client UsageAggregatesClient) ListComplete(reportedStartTime date.Time, reportedEndTime date.Time, showDetails *bool, aggregationGranularity AggregationGranularity, continuationToken string, cancel <-chan struct{}) (<-chan UsageAggregation, <-chan error) { + resultChan := make(chan UsageAggregation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(reportedStartTime, reportedEndTime, showDetails, aggregationGranularity, continuationToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go index 5a5172f5c..068fbd78a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/commerce/version.go @@ -14,15 +14,15 @@ package commerce // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-commerce/2015-06-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-commerce/2015-06-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go index 738c2c61e..bf1a8fc34 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/availabilitysets.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,27 @@ import ( "net/http" ) -// AvailabilitySetsClient is the the Compute Management Client. +// AvailabilitySetsClient is the compute Client type AvailabilitySetsClient struct { ManagementClient } -// NewAvailabilitySetsClient creates an instance of the AvailabilitySetsClient -// client. +// NewAvailabilitySetsClient creates an instance of the AvailabilitySetsClient client. func NewAvailabilitySetsClient(subscriptionID string) AvailabilitySetsClient { return NewAvailabilitySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAvailabilitySetsClientWithBaseURI creates an instance of the -// AvailabilitySetsClient client. +// NewAvailabilitySetsClientWithBaseURI creates an instance of the AvailabilitySetsClient client. func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string) AvailabilitySetsClient { return AvailabilitySetsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update an availability set. // -// resourceGroupName is the name of the resource group. name is the name of the -// availability set. parameters is parameters supplied to the Create -// Availability Set operation. -func (client AvailabilitySetsClient) CreateOrUpdate(resourceGroupName string, name string, parameters AvailabilitySet) (result AvailabilitySet, err error) { - req, err := client.CreateOrUpdatePreparer(resourceGroupName, name, parameters) +// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set. +// parameters is parameters supplied to the Create Availability Set operation. +func (client AvailabilitySetsClient) CreateOrUpdate(resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (result AvailabilitySet, err error) { + req, err := client.CreateOrUpdatePreparer(resourceGroupName, availabilitySetName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -69,14 +65,14 @@ func (client AvailabilitySetsClient) CreateOrUpdate(resourceGroupName string, na } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client AvailabilitySetsClient) CreateOrUpdatePreparer(resourceGroupName string, name string, parameters AvailabilitySet) (*http.Request, error) { +func (client AvailabilitySetsClient) CreateOrUpdatePreparer(resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "availabilitySetName": autorest.Encode("path", availabilitySetName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -85,7 +81,7 @@ func (client AvailabilitySetsClient) CreateOrUpdatePreparer(resourceGroupName st autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -112,8 +108,7 @@ func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response // Delete delete an availability set. // -// resourceGroupName is the name of the resource group. availabilitySetName is -// the name of the availability set. +// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set. func (client AvailabilitySetsClient) Delete(resourceGroupName string, availabilitySetName string) (result OperationStatusResponse, err error) { req, err := client.DeletePreparer(resourceGroupName, availabilitySetName) if err != nil { @@ -144,7 +139,7 @@ func (client AvailabilitySetsClient) DeletePreparer(resourceGroupName string, av "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -178,8 +173,7 @@ func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (resul // Get retrieves information about an availability set. // -// resourceGroupName is the name of the resource group. availabilitySetName is -// the name of the availability set. +// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set. func (client AvailabilitySetsClient) Get(resourceGroupName string, availabilitySetName string) (result AvailabilitySet, err error) { req, err := client.GetPreparer(resourceGroupName, availabilitySetName) if err != nil { @@ -210,7 +204,7 @@ func (client AvailabilitySetsClient) GetPreparer(resourceGroupName string, avail "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,7 +268,7 @@ func (client AvailabilitySetsClient) ListPreparer(resourceGroupName string) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -306,11 +300,10 @@ func (client AvailabilitySetsClient) ListResponder(resp *http.Response) (result return } -// ListAvailableSizes lists all available virtual machine sizes that can be -// used to create a new virtual machine in an existing availability set. +// ListAvailableSizes lists all available virtual machine sizes that can be used to create a new virtual machine in an +// existing availability set. // -// resourceGroupName is the name of the resource group. availabilitySetName is -// the name of the availability set. +// resourceGroupName is the name of the resource group. availabilitySetName is the name of the availability set. func (client AvailabilitySetsClient) ListAvailableSizes(resourceGroupName string, availabilitySetName string) (result VirtualMachineSizeListResult, err error) { req, err := client.ListAvailableSizesPreparer(resourceGroupName, availabilitySetName) if err != nil { @@ -341,7 +334,7 @@ func (client AvailabilitySetsClient) ListAvailableSizesPreparer(resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/client.go index c60452b9d..98b1c0dad 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/client.go @@ -1,7 +1,6 @@ -// Package compute implements the Azure ARM Compute service API version -// 2016-04-30-preview. +// Package compute implements the Azure ARM Compute service API version . // -// The Compute Management Client. +// Compute Client package compute // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/containerservices.go new file mode 100644 index 000000000..98c1706ee --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/containerservices.go @@ -0,0 +1,579 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ContainerServicesClient is the compute Client +type ContainerServicesClient struct { + ManagementClient +} + +// NewContainerServicesClient creates an instance of the ContainerServicesClient client. +func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { + return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. +func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { + return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and +// agents. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. containerServiceName is the name of the container service in +// the specified subscription and resource group. parameters is parameters supplied to the Create or Update a Container +// Service operation. +func (client ContainerServicesClient) CreateOrUpdate(resourceGroupName string, containerServiceName string, parameters ContainerService, cancel <-chan struct{}) (<-chan ContainerService, <-chan error) { + resultChan := make(chan ContainerService, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ContainerServiceProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.CustomProfile.Orchestrator", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.ClientID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ContainerServiceProperties.ServicePrincipalProfile.Secret", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "parameters.ContainerServiceProperties.MasterProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.MasterProfile.DNSPrefix", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.ContainerServiceProperties.AgentPoolProfiles", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ContainerServiceProperties.WindowsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]+([._]?[a-zA-Z0-9]+)*$`, Chain: nil}}}, + {Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminPassword", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.WindowsProfile.AdminPassword", Name: validation.Pattern, Rule: `^(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%\^&\*\(\)])[a-zA-Z\d!@#$%\^&\*\(\)]{12,123}$`, Chain: nil}}}, + }}, + {Target: "parameters.ContainerServiceProperties.LinuxProfile", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.AdminUsername", Name: validation.Pattern, Rule: `^[a-z][a-z0-9_-]*$`, Chain: nil}}}, + {Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.LinuxProfile.SSH.PublicKeys", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "parameters.ContainerServiceProperties.DiagnosticsProfile", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ContainerServiceProperties.DiagnosticsProfile.VMDiagnostics.Enabled", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "compute.ContainerServicesClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result ContainerService + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, containerServiceName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ContainerServicesClient) CreateOrUpdatePreparer(resourceGroupName string, containerServiceName string, parameters ContainerService, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-01-31" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Response) (result ContainerService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified container service in the specified subscription and resource group. The operation does +// not delete other resources created as part of creating a container service, including storage accounts, VMs, and +// availability sets. All the other resources created with the container service are part of the same resource group +// and can be deleted individually. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. containerServiceName is the name of the container service in +// the specified subscription and resource group. +func (client ContainerServicesClient) Delete(resourceGroupName string, containerServiceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, containerServiceName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client ContainerServicesClient) DeletePreparer(resourceGroupName string, containerServiceName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-01-31" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the properties of the specified container service in the specified subscription and resource group. The +// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters +// and agents. +// +// resourceGroupName is the name of the resource group. containerServiceName is the name of the container service in +// the specified subscription and resource group. +func (client ContainerServicesClient) Get(resourceGroupName string, containerServiceName string) (result ContainerService, err error) { + req, err := client.GetPreparer(resourceGroupName, containerServiceName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ContainerServicesClient) GetPreparer(resourceGroupName string, containerServiceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "containerServiceName": autorest.Encode("path", containerServiceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-01-31" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices/{containerServiceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) GetResponder(resp *http.Response) (result ContainerService, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of container services in the specified subscription. The operation returns properties of each +// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. +func (client ContainerServicesClient) List() (result ContainerServiceListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ContainerServicesClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-01-31" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/containerServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListResponder(resp *http.Response) (result ContainerServiceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client ContainerServicesClient) ListNextResults(lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) { + req, err := lastResults.ContainerServiceListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client ContainerServicesClient) ListComplete(cancel <-chan struct{}) (<-chan ContainerService, <-chan error) { + resultChan := make(chan ContainerService) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup gets a list of container services in the specified subscription and resource group. The +// operation returns properties of each container service including state, orchestrator, number of masters and agents, +// and FQDNs of masters and agents. +// +// resourceGroupName is the name of the resource group. +func (client ContainerServicesClient) ListByResourceGroup(resourceGroupName string) (result ContainerServiceListResult, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ContainerServicesClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-01-31" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/containerServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ContainerServicesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Response) (result ContainerServiceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client ContainerServicesClient) ListByResourceGroupNextResults(lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) { + req, err := lastResults.ContainerServiceListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure sending next results request") + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "ListByResourceGroup", resp, "Failure responding to next results request") + } + + return +} + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ContainerServicesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ContainerService, <-chan error) { + resultChan := make(chan ContainerService) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/disks.go new file mode 100644 index 000000000..47e9e4029 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/disks.go @@ -0,0 +1,818 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// DisksClient is the compute Client +type DisksClient struct { + ManagementClient +} + +// NewDisksClient creates an instance of the DisksClient client. +func NewDisksClient(subscriptionID string) DisksClient { + return NewDisksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDisksClientWithBaseURI creates an instance of the DisksClient client. +func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClient { + return DisksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a disk. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. diskName is the name of the disk within the given subscription +// and resource group. disk is disk object supplied in the body of the Put disk operation. +func (client DisksClient) CreateOrUpdate(resourceGroupName string, diskName string, disk Disk, cancel <-chan struct{}) (<-chan Disk, <-chan error) { + resultChan := make(chan Disk, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: disk, + Constraints: []validation.Constraint{{Target: "disk.DiskProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "disk.DiskProperties.EncryptionSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "disk.DiskProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "disk.DiskProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "compute.DisksClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result Disk + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, diskName, disk, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DisksClient) CreateOrUpdatePreparer(resourceGroupName string, diskName string, disk Disk, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters), + autorest.WithJSON(disk), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result Disk, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a disk. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. diskName is the name of the disk within the given subscription +// and resource group. +func (client DisksClient) Delete(resourceGroupName string, diskName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, diskName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client DisksClient) DeletePreparer(resourceGroupName string, diskName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DisksClient) DeleteResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets information about a disk. +// +// resourceGroupName is the name of the resource group. diskName is the name of the disk within the given subscription +// and resource group. +func (client DisksClient) Get(resourceGroupName string, diskName string) (result Disk, err error) { + req, err := client.GetPreparer(resourceGroupName, diskName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DisksClient) GetPreparer(resourceGroupName string, diskName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GrantAccess grants access to a disk. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. diskName is the name of the disk within the given subscription +// and resource group. grantAccessData is access data object supplied in the body of the get disk access operation. +func (client DisksClient) GrantAccess(resourceGroupName string, diskName string, grantAccessData GrantAccessData, cancel <-chan struct{}) (<-chan AccessURI, <-chan error) { + resultChan := make(chan AccessURI, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: grantAccessData, + Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "compute.DisksClient", "GrantAccess") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result AccessURI + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.GrantAccessPreparer(resourceGroupName, diskName, grantAccessData, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", nil, "Failure preparing request") + return + } + + resp, err := client.GrantAccessSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", resp, "Failure sending request") + return + } + + result, err = client.GrantAccessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "GrantAccess", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// GrantAccessPreparer prepares the GrantAccess request. +func (client DisksClient) GrantAccessPreparer(resourceGroupName string, diskName string, grantAccessData GrantAccessData, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess", pathParameters), + autorest.WithJSON(grantAccessData), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// GrantAccessSender sends the GrantAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) GrantAccessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// GrantAccessResponder handles the response to the GrantAccess request. The method always +// closes the http.Response Body. +func (client DisksClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the disks under a subscription. +func (client DisksClient) List() (result DiskList, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DisksClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DisksClient) ListResponder(resp *http.Response) (result DiskList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client DisksClient) ListNextResults(lastResults DiskList) (result DiskList, err error) { + req, err := lastResults.DiskListPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DisksClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client DisksClient) ListComplete(cancel <-chan struct{}) (<-chan Disk, <-chan error) { + resultChan := make(chan Disk) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup lists all the disks under a resource group. +// +// resourceGroupName is the name of the resource group. +func (client DisksClient) ListByResourceGroup(resourceGroupName string) (result DiskList, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DisksClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client DisksClient) ListByResourceGroupResponder(resp *http.Response) (result DiskList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client DisksClient) ListByResourceGroupNextResults(lastResults DiskList) (result DiskList, err error) { + req, err := lastResults.DiskListPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure sending next results request") + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "ListByResourceGroup", resp, "Failure responding to next results request") + } + + return +} + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client DisksClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Disk, <-chan error) { + resultChan := make(chan Disk) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// RevokeAccess revokes access to a disk. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. diskName is the name of the disk within the given subscription +// and resource group. +func (client DisksClient) RevokeAccess(resourceGroupName string, diskName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.RevokeAccessPreparer(resourceGroupName, diskName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure preparing request") + return + } + + resp, err := client.RevokeAccessSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", resp, "Failure sending request") + return + } + + result, err = client.RevokeAccessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// RevokeAccessPreparer prepares the RevokeAccess request. +func (client DisksClient) RevokeAccessPreparer(resourceGroupName string, diskName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// RevokeAccessSender sends the RevokeAccess request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) RevokeAccessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// RevokeAccessResponder handles the response to the RevokeAccess request. The method always +// closes the http.Response Body. +func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates (patches) a disk. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. diskName is the name of the disk within the given subscription +// and resource group. disk is disk object supplied in the body of the Patch disk operation. +func (client DisksClient) Update(resourceGroupName string, diskName string, disk DiskUpdate, cancel <-chan struct{}) (<-chan Disk, <-chan error) { + resultChan := make(chan Disk, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result Disk + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, diskName, disk, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client DisksClient) UpdatePreparer(resourceGroupName string, diskName string, disk DiskUpdate, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "diskName": autorest.Encode("path", diskName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}", pathParameters), + autorest.WithJSON(disk), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client DisksClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DisksClient) UpdateResponder(resp *http.Response) (result Disk, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go index 64f14dd08..bbde2bc7f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/images.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// ImagesClient is the the Compute Management Client. +// ImagesClient is the compute Client type ImagesClient struct { ManagementClient } @@ -40,14 +39,11 @@ func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesCli return ImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or update an image. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate create or update an image. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. imageName is the name -// of the image. parameters is parameters supplied to the Create Image -// operation. +// resourceGroupName is the name of the resource group. imageName is the name of the image. parameters is parameters +// supplied to the Create Image operation. func (client ImagesClient) CreateOrUpdate(resourceGroupName string, imageName string, parameters Image, cancel <-chan struct{}) (<-chan Image, <-chan error) { resultChan := make(chan Image, 1) errChan := make(chan error, 1) @@ -67,8 +63,10 @@ func (client ImagesClient) CreateOrUpdate(resourceGroupName string, imageName st var err error var result Image defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -101,7 +99,7 @@ func (client ImagesClient) CreateOrUpdatePreparer(resourceGroupName string, imag "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -137,12 +135,10 @@ func (client ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete deletes an Image. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// Delete deletes an Image. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. imageName is the name -// of the image. +// resourceGroupName is the name of the resource group. imageName is the name of the image. func (client ImagesClient) Delete(resourceGroupName string, imageName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -150,8 +146,10 @@ func (client ImagesClient) Delete(resourceGroupName string, imageName string, ca var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -184,7 +182,7 @@ func (client ImagesClient) DeletePreparer(resourceGroupName string, imageName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -220,8 +218,8 @@ func (client ImagesClient) DeleteResponder(resp *http.Response) (result Operatio // Get gets an image. // -// resourceGroupName is the name of the resource group. imageName is the name -// of the image. expand is the expand expression to apply on the operation. +// resourceGroupName is the name of the resource group. imageName is the name of the image. expand is the expand +// expression to apply on the operation. func (client ImagesClient) Get(resourceGroupName string, imageName string, expand string) (result Image, err error) { req, err := client.GetPreparer(resourceGroupName, imageName, expand) if err != nil { @@ -252,7 +250,7 @@ func (client ImagesClient) GetPreparer(resourceGroupName string, imageName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -287,9 +285,8 @@ func (client ImagesClient) GetResponder(resp *http.Response) (result Image, err return } -// List gets the list of Images in the subscription. Use nextLink property in -// the response to get the next page of Images. Do this till nextLink is not -// null to fetch all the Images. +// List gets the list of Images in the subscription. Use nextLink property in the response to get the next page of +// Images. Do this till nextLink is not null to fetch all the Images. func (client ImagesClient) List() (result ImageListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -318,7 +315,7 @@ func (client ImagesClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -374,6 +371,51 @@ func (client ImagesClient) ListNextResults(lastResults ImageListResult) (result return } +// ListComplete gets all elements from the list without paging. +func (client ImagesClient) ListComplete(cancel <-chan struct{}) (<-chan Image, <-chan error) { + resultChan := make(chan Image) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup gets the list of images under a resource group. // // resourceGroupName is the name of the resource group. @@ -406,7 +448,7 @@ func (client ImagesClient) ListByResourceGroupPreparer(resourceGroupName string) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -461,3 +503,48 @@ func (client ImagesClient) ListByResourceGroupNextResults(lastResults ImageListR return } + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ImagesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Image, <-chan error) { + resultChan := make(chan Image) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go index a9524daef..bae95ca25 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/models.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,37 +24,176 @@ import ( "net/http" ) +// AccessLevel enumerates the values for access level. +type AccessLevel string + +const ( + // None specifies the none state for access level. + None AccessLevel = "None" + // Read specifies the read state for access level. + Read AccessLevel = "Read" +) + // CachingTypes enumerates the values for caching types. type CachingTypes string const ( - // None specifies the none state for caching types. - None CachingTypes = "None" - // ReadOnly specifies the read only state for caching types. - ReadOnly CachingTypes = "ReadOnly" - // ReadWrite specifies the read write state for caching types. - ReadWrite CachingTypes = "ReadWrite" + // CachingTypesNone specifies the caching types none state for caching types. + CachingTypesNone CachingTypes = "None" + // CachingTypesReadOnly specifies the caching types read only state for caching types. + CachingTypesReadOnly CachingTypes = "ReadOnly" + // CachingTypesReadWrite specifies the caching types read write state for caching types. + CachingTypesReadWrite CachingTypes = "ReadWrite" ) // ComponentNames enumerates the values for component names. type ComponentNames string const ( - // MicrosoftWindowsShellSetup specifies the microsoft windows shell setup - // state for component names. + // MicrosoftWindowsShellSetup specifies the microsoft windows shell setup state for component names. MicrosoftWindowsShellSetup ComponentNames = "Microsoft-Windows-Shell-Setup" ) +// ContainerServiceOrchestratorTypes enumerates the values for container service orchestrator types. +type ContainerServiceOrchestratorTypes string + +const ( + // Custom specifies the custom state for container service orchestrator types. + Custom ContainerServiceOrchestratorTypes = "Custom" + // DCOS specifies the dcos state for container service orchestrator types. + DCOS ContainerServiceOrchestratorTypes = "DCOS" + // Kubernetes specifies the kubernetes state for container service orchestrator types. + Kubernetes ContainerServiceOrchestratorTypes = "Kubernetes" + // Swarm specifies the swarm state for container service orchestrator types. + Swarm ContainerServiceOrchestratorTypes = "Swarm" +) + +// ContainerServiceVMSizeTypes enumerates the values for container service vm size types. +type ContainerServiceVMSizeTypes string + +const ( + // StandardA0 specifies the standard a0 state for container service vm size types. + StandardA0 ContainerServiceVMSizeTypes = "Standard_A0" + // StandardA1 specifies the standard a1 state for container service vm size types. + StandardA1 ContainerServiceVMSizeTypes = "Standard_A1" + // StandardA10 specifies the standard a10 state for container service vm size types. + StandardA10 ContainerServiceVMSizeTypes = "Standard_A10" + // StandardA11 specifies the standard a11 state for container service vm size types. + StandardA11 ContainerServiceVMSizeTypes = "Standard_A11" + // StandardA2 specifies the standard a2 state for container service vm size types. + StandardA2 ContainerServiceVMSizeTypes = "Standard_A2" + // StandardA3 specifies the standard a3 state for container service vm size types. + StandardA3 ContainerServiceVMSizeTypes = "Standard_A3" + // StandardA4 specifies the standard a4 state for container service vm size types. + StandardA4 ContainerServiceVMSizeTypes = "Standard_A4" + // StandardA5 specifies the standard a5 state for container service vm size types. + StandardA5 ContainerServiceVMSizeTypes = "Standard_A5" + // StandardA6 specifies the standard a6 state for container service vm size types. + StandardA6 ContainerServiceVMSizeTypes = "Standard_A6" + // StandardA7 specifies the standard a7 state for container service vm size types. + StandardA7 ContainerServiceVMSizeTypes = "Standard_A7" + // StandardA8 specifies the standard a8 state for container service vm size types. + StandardA8 ContainerServiceVMSizeTypes = "Standard_A8" + // StandardA9 specifies the standard a9 state for container service vm size types. + StandardA9 ContainerServiceVMSizeTypes = "Standard_A9" + // StandardD1 specifies the standard d1 state for container service vm size types. + StandardD1 ContainerServiceVMSizeTypes = "Standard_D1" + // StandardD11 specifies the standard d11 state for container service vm size types. + StandardD11 ContainerServiceVMSizeTypes = "Standard_D11" + // StandardD11V2 specifies the standard d11v2 state for container service vm size types. + StandardD11V2 ContainerServiceVMSizeTypes = "Standard_D11_v2" + // StandardD12 specifies the standard d12 state for container service vm size types. + StandardD12 ContainerServiceVMSizeTypes = "Standard_D12" + // StandardD12V2 specifies the standard d12v2 state for container service vm size types. + StandardD12V2 ContainerServiceVMSizeTypes = "Standard_D12_v2" + // StandardD13 specifies the standard d13 state for container service vm size types. + StandardD13 ContainerServiceVMSizeTypes = "Standard_D13" + // StandardD13V2 specifies the standard d13v2 state for container service vm size types. + StandardD13V2 ContainerServiceVMSizeTypes = "Standard_D13_v2" + // StandardD14 specifies the standard d14 state for container service vm size types. + StandardD14 ContainerServiceVMSizeTypes = "Standard_D14" + // StandardD14V2 specifies the standard d14v2 state for container service vm size types. + StandardD14V2 ContainerServiceVMSizeTypes = "Standard_D14_v2" + // StandardD1V2 specifies the standard d1v2 state for container service vm size types. + StandardD1V2 ContainerServiceVMSizeTypes = "Standard_D1_v2" + // StandardD2 specifies the standard d2 state for container service vm size types. + StandardD2 ContainerServiceVMSizeTypes = "Standard_D2" + // StandardD2V2 specifies the standard d2v2 state for container service vm size types. + StandardD2V2 ContainerServiceVMSizeTypes = "Standard_D2_v2" + // StandardD3 specifies the standard d3 state for container service vm size types. + StandardD3 ContainerServiceVMSizeTypes = "Standard_D3" + // StandardD3V2 specifies the standard d3v2 state for container service vm size types. + StandardD3V2 ContainerServiceVMSizeTypes = "Standard_D3_v2" + // StandardD4 specifies the standard d4 state for container service vm size types. + StandardD4 ContainerServiceVMSizeTypes = "Standard_D4" + // StandardD4V2 specifies the standard d4v2 state for container service vm size types. + StandardD4V2 ContainerServiceVMSizeTypes = "Standard_D4_v2" + // StandardD5V2 specifies the standard d5v2 state for container service vm size types. + StandardD5V2 ContainerServiceVMSizeTypes = "Standard_D5_v2" + // StandardDS1 specifies the standard ds1 state for container service vm size types. + StandardDS1 ContainerServiceVMSizeTypes = "Standard_DS1" + // StandardDS11 specifies the standard ds11 state for container service vm size types. + StandardDS11 ContainerServiceVMSizeTypes = "Standard_DS11" + // StandardDS12 specifies the standard ds12 state for container service vm size types. + StandardDS12 ContainerServiceVMSizeTypes = "Standard_DS12" + // StandardDS13 specifies the standard ds13 state for container service vm size types. + StandardDS13 ContainerServiceVMSizeTypes = "Standard_DS13" + // StandardDS14 specifies the standard ds14 state for container service vm size types. + StandardDS14 ContainerServiceVMSizeTypes = "Standard_DS14" + // StandardDS2 specifies the standard ds2 state for container service vm size types. + StandardDS2 ContainerServiceVMSizeTypes = "Standard_DS2" + // StandardDS3 specifies the standard ds3 state for container service vm size types. + StandardDS3 ContainerServiceVMSizeTypes = "Standard_DS3" + // StandardDS4 specifies the standard ds4 state for container service vm size types. + StandardDS4 ContainerServiceVMSizeTypes = "Standard_DS4" + // StandardG1 specifies the standard g1 state for container service vm size types. + StandardG1 ContainerServiceVMSizeTypes = "Standard_G1" + // StandardG2 specifies the standard g2 state for container service vm size types. + StandardG2 ContainerServiceVMSizeTypes = "Standard_G2" + // StandardG3 specifies the standard g3 state for container service vm size types. + StandardG3 ContainerServiceVMSizeTypes = "Standard_G3" + // StandardG4 specifies the standard g4 state for container service vm size types. + StandardG4 ContainerServiceVMSizeTypes = "Standard_G4" + // StandardG5 specifies the standard g5 state for container service vm size types. + StandardG5 ContainerServiceVMSizeTypes = "Standard_G5" + // StandardGS1 specifies the standard gs1 state for container service vm size types. + StandardGS1 ContainerServiceVMSizeTypes = "Standard_GS1" + // StandardGS2 specifies the standard gs2 state for container service vm size types. + StandardGS2 ContainerServiceVMSizeTypes = "Standard_GS2" + // StandardGS3 specifies the standard gs3 state for container service vm size types. + StandardGS3 ContainerServiceVMSizeTypes = "Standard_GS3" + // StandardGS4 specifies the standard gs4 state for container service vm size types. + StandardGS4 ContainerServiceVMSizeTypes = "Standard_GS4" + // StandardGS5 specifies the standard gs5 state for container service vm size types. + StandardGS5 ContainerServiceVMSizeTypes = "Standard_GS5" +) + +// DiskCreateOption enumerates the values for disk create option. +type DiskCreateOption string + +const ( + // Attach specifies the attach state for disk create option. + Attach DiskCreateOption = "Attach" + // Copy specifies the copy state for disk create option. + Copy DiskCreateOption = "Copy" + // Empty specifies the empty state for disk create option. + Empty DiskCreateOption = "Empty" + // FromImage specifies the from image state for disk create option. + FromImage DiskCreateOption = "FromImage" + // Import specifies the import state for disk create option. + Import DiskCreateOption = "Import" +) + // DiskCreateOptionTypes enumerates the values for disk create option types. type DiskCreateOptionTypes string const ( - // Attach specifies the attach state for disk create option types. - Attach DiskCreateOptionTypes = "attach" - // Empty specifies the empty state for disk create option types. - Empty DiskCreateOptionTypes = "empty" - // FromImage specifies the from image state for disk create option types. - FromImage DiskCreateOptionTypes = "fromImage" + // DiskCreateOptionTypesAttach specifies the disk create option types attach state for disk create option types. + DiskCreateOptionTypesAttach DiskCreateOptionTypes = "Attach" + // DiskCreateOptionTypesEmpty specifies the disk create option types empty state for disk create option types. + DiskCreateOptionTypesEmpty DiskCreateOptionTypes = "Empty" + // DiskCreateOptionTypesFromImage specifies the disk create option types from image state for disk create option types. + DiskCreateOptionTypesFromImage DiskCreateOptionTypes = "FromImage" ) // InstanceViewTypes enumerates the values for instance view types. @@ -66,16 +204,41 @@ const ( InstanceView InstanceViewTypes = "instanceView" ) -// OperatingSystemStateTypes enumerates the values for operating system state -// types. +// IPVersion enumerates the values for ip version. +type IPVersion string + +const ( + // IPv4 specifies the i pv 4 state for ip version. + IPv4 IPVersion = "IPv4" + // IPv6 specifies the i pv 6 state for ip version. + IPv6 IPVersion = "IPv6" +) + +// MaintenanceOperationResultCodeTypes enumerates the values for maintenance operation result code types. +type MaintenanceOperationResultCodeTypes string + +const ( + // MaintenanceOperationResultCodeTypesMaintenanceAborted specifies the maintenance operation result code types + // maintenance aborted state for maintenance operation result code types. + MaintenanceOperationResultCodeTypesMaintenanceAborted MaintenanceOperationResultCodeTypes = "MaintenanceAborted" + // MaintenanceOperationResultCodeTypesMaintenanceCompleted specifies the maintenance operation result code types + // maintenance completed state for maintenance operation result code types. + MaintenanceOperationResultCodeTypesMaintenanceCompleted MaintenanceOperationResultCodeTypes = "MaintenanceCompleted" + // MaintenanceOperationResultCodeTypesNone specifies the maintenance operation result code types none state for + // maintenance operation result code types. + MaintenanceOperationResultCodeTypesNone MaintenanceOperationResultCodeTypes = "None" + // MaintenanceOperationResultCodeTypesRetryLater specifies the maintenance operation result code types retry later + // state for maintenance operation result code types. + MaintenanceOperationResultCodeTypesRetryLater MaintenanceOperationResultCodeTypes = "RetryLater" +) + +// OperatingSystemStateTypes enumerates the values for operating system state types. type OperatingSystemStateTypes string const ( - // Generalized specifies the generalized state for operating system state - // types. + // Generalized specifies the generalized state for operating system state types. Generalized OperatingSystemStateTypes = "Generalized" - // Specialized specifies the specialized state for operating system state - // types. + // Specialized specifies the specialized state for operating system state types. Specialized OperatingSystemStateTypes = "Specialized" ) @@ -94,7 +257,7 @@ type PassNames string const ( // OobeSystem specifies the oobe system state for pass names. - OobeSystem PassNames = "oobeSystem" + OobeSystem PassNames = "OobeSystem" ) // ProtocolTypes enumerates the values for protocol types. @@ -111,19 +274,75 @@ const ( type ResourceIdentityType string const ( - // SystemAssigned specifies the system assigned state for resource identity - // type. + // SystemAssigned specifies the system assigned state for resource identity type. SystemAssigned ResourceIdentityType = "SystemAssigned" ) +// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type. +type ResourceSkuCapacityScaleType string + +const ( + // ResourceSkuCapacityScaleTypeAutomatic specifies the resource sku capacity scale type automatic state for resource + // sku capacity scale type. + ResourceSkuCapacityScaleTypeAutomatic ResourceSkuCapacityScaleType = "Automatic" + // ResourceSkuCapacityScaleTypeManual specifies the resource sku capacity scale type manual state for resource sku + // capacity scale type. + ResourceSkuCapacityScaleTypeManual ResourceSkuCapacityScaleType = "Manual" + // ResourceSkuCapacityScaleTypeNone specifies the resource sku capacity scale type none state for resource sku capacity + // scale type. + ResourceSkuCapacityScaleTypeNone ResourceSkuCapacityScaleType = "None" +) + +// ResourceSkuRestrictionsReasonCode enumerates the values for resource sku restrictions reason code. +type ResourceSkuRestrictionsReasonCode string + +const ( + // NotAvailableForSubscription specifies the not available for subscription state for resource sku restrictions reason + // code. + NotAvailableForSubscription ResourceSkuRestrictionsReasonCode = "NotAvailableForSubscription" + // QuotaID specifies the quota id state for resource sku restrictions reason code. + QuotaID ResourceSkuRestrictionsReasonCode = "QuotaId" +) + +// ResourceSkuRestrictionsType enumerates the values for resource sku restrictions type. +type ResourceSkuRestrictionsType string + +const ( + // Location specifies the location state for resource sku restrictions type. + Location ResourceSkuRestrictionsType = "Location" +) + +// RollingUpgradeActionType enumerates the values for rolling upgrade action type. +type RollingUpgradeActionType string + +const ( + // Cancel specifies the cancel state for rolling upgrade action type. + Cancel RollingUpgradeActionType = "Cancel" + // Start specifies the start state for rolling upgrade action type. + Start RollingUpgradeActionType = "Start" +) + +// RollingUpgradeStatusCode enumerates the values for rolling upgrade status code. +type RollingUpgradeStatusCode string + +const ( + // Cancelled specifies the cancelled state for rolling upgrade status code. + Cancelled RollingUpgradeStatusCode = "Cancelled" + // Completed specifies the completed state for rolling upgrade status code. + Completed RollingUpgradeStatusCode = "Completed" + // Faulted specifies the faulted state for rolling upgrade status code. + Faulted RollingUpgradeStatusCode = "Faulted" + // RollingForward specifies the rolling forward state for rolling upgrade status code. + RollingForward RollingUpgradeStatusCode = "RollingForward" +) + // SettingNames enumerates the values for setting names. type SettingNames string const ( // AutoLogon specifies the auto logon state for setting names. AutoLogon SettingNames = "AutoLogon" - // FirstLogonCommands specifies the first logon commands state for setting - // names. + // FirstLogonCommands specifies the first logon commands state for setting names. FirstLogonCommands SettingNames = "FirstLogonCommands" ) @@ -157,218 +376,338 @@ const ( Automatic UpgradeMode = "Automatic" // Manual specifies the manual state for upgrade mode. Manual UpgradeMode = "Manual" + // Rolling specifies the rolling state for upgrade mode. + Rolling UpgradeMode = "Rolling" ) -// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine -// scale set sku scale type. +// VirtualMachineScaleSetSkuScaleType enumerates the values for virtual machine scale set sku scale type. type VirtualMachineScaleSetSkuScaleType string const ( - // VirtualMachineScaleSetSkuScaleTypeAutomatic specifies the virtual - // machine scale set sku scale type automatic state for virtual machine - // scale set sku scale type. + // VirtualMachineScaleSetSkuScaleTypeAutomatic specifies the virtual machine scale set sku scale type automatic state + // for virtual machine scale set sku scale type. VirtualMachineScaleSetSkuScaleTypeAutomatic VirtualMachineScaleSetSkuScaleType = "Automatic" - // VirtualMachineScaleSetSkuScaleTypeNone specifies the virtual machine - // scale set sku scale type none state for virtual machine scale set sku - // scale type. + // VirtualMachineScaleSetSkuScaleTypeNone specifies the virtual machine scale set sku scale type none state for virtual + // machine scale set sku scale type. VirtualMachineScaleSetSkuScaleTypeNone VirtualMachineScaleSetSkuScaleType = "None" ) -// VirtualMachineSizeTypes enumerates the values for virtual machine size -// types. +// VirtualMachineSizeTypes enumerates the values for virtual machine size types. type VirtualMachineSizeTypes string const ( - // BasicA0 specifies the basic a0 state for virtual machine size types. - BasicA0 VirtualMachineSizeTypes = "Basic_A0" - // BasicA1 specifies the basic a1 state for virtual machine size types. - BasicA1 VirtualMachineSizeTypes = "Basic_A1" - // BasicA2 specifies the basic a2 state for virtual machine size types. - BasicA2 VirtualMachineSizeTypes = "Basic_A2" - // BasicA3 specifies the basic a3 state for virtual machine size types. - BasicA3 VirtualMachineSizeTypes = "Basic_A3" - // BasicA4 specifies the basic a4 state for virtual machine size types. - BasicA4 VirtualMachineSizeTypes = "Basic_A4" - // StandardA0 specifies the standard a0 state for virtual machine size + // VirtualMachineSizeTypesBasicA0 specifies the virtual machine size types basic a0 state for virtual machine size // types. - StandardA0 VirtualMachineSizeTypes = "Standard_A0" - // StandardA1 specifies the standard a1 state for virtual machine size + VirtualMachineSizeTypesBasicA0 VirtualMachineSizeTypes = "Basic_A0" + // VirtualMachineSizeTypesBasicA1 specifies the virtual machine size types basic a1 state for virtual machine size // types. - StandardA1 VirtualMachineSizeTypes = "Standard_A1" - // StandardA10 specifies the standard a10 state for virtual machine size + VirtualMachineSizeTypesBasicA1 VirtualMachineSizeTypes = "Basic_A1" + // VirtualMachineSizeTypesBasicA2 specifies the virtual machine size types basic a2 state for virtual machine size // types. - StandardA10 VirtualMachineSizeTypes = "Standard_A10" - // StandardA11 specifies the standard a11 state for virtual machine size + VirtualMachineSizeTypesBasicA2 VirtualMachineSizeTypes = "Basic_A2" + // VirtualMachineSizeTypesBasicA3 specifies the virtual machine size types basic a3 state for virtual machine size // types. - StandardA11 VirtualMachineSizeTypes = "Standard_A11" - // StandardA2 specifies the standard a2 state for virtual machine size + VirtualMachineSizeTypesBasicA3 VirtualMachineSizeTypes = "Basic_A3" + // VirtualMachineSizeTypesBasicA4 specifies the virtual machine size types basic a4 state for virtual machine size // types. - StandardA2 VirtualMachineSizeTypes = "Standard_A2" - // StandardA3 specifies the standard a3 state for virtual machine size - // types. - StandardA3 VirtualMachineSizeTypes = "Standard_A3" - // StandardA4 specifies the standard a4 state for virtual machine size - // types. - StandardA4 VirtualMachineSizeTypes = "Standard_A4" - // StandardA5 specifies the standard a5 state for virtual machine size - // types. - StandardA5 VirtualMachineSizeTypes = "Standard_A5" - // StandardA6 specifies the standard a6 state for virtual machine size - // types. - StandardA6 VirtualMachineSizeTypes = "Standard_A6" - // StandardA7 specifies the standard a7 state for virtual machine size - // types. - StandardA7 VirtualMachineSizeTypes = "Standard_A7" - // StandardA8 specifies the standard a8 state for virtual machine size - // types. - StandardA8 VirtualMachineSizeTypes = "Standard_A8" - // StandardA9 specifies the standard a9 state for virtual machine size - // types. - StandardA9 VirtualMachineSizeTypes = "Standard_A9" - // StandardD1 specifies the standard d1 state for virtual machine size - // types. - StandardD1 VirtualMachineSizeTypes = "Standard_D1" - // StandardD11 specifies the standard d11 state for virtual machine size - // types. - StandardD11 VirtualMachineSizeTypes = "Standard_D11" - // StandardD11V2 specifies the standard d11v2 state for virtual machine + VirtualMachineSizeTypesBasicA4 VirtualMachineSizeTypes = "Basic_A4" + // VirtualMachineSizeTypesStandardA0 specifies the virtual machine size types standard a0 state for virtual machine // size types. - StandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2" - // StandardD12 specifies the standard d12 state for virtual machine size - // types. - StandardD12 VirtualMachineSizeTypes = "Standard_D12" - // StandardD12V2 specifies the standard d12v2 state for virtual machine + VirtualMachineSizeTypesStandardA0 VirtualMachineSizeTypes = "Standard_A0" + // VirtualMachineSizeTypesStandardA1 specifies the virtual machine size types standard a1 state for virtual machine // size types. - StandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2" - // StandardD13 specifies the standard d13 state for virtual machine size - // types. - StandardD13 VirtualMachineSizeTypes = "Standard_D13" - // StandardD13V2 specifies the standard d13v2 state for virtual machine + VirtualMachineSizeTypesStandardA1 VirtualMachineSizeTypes = "Standard_A1" + // VirtualMachineSizeTypesStandardA10 specifies the virtual machine size types standard a10 state for virtual machine // size types. - StandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2" - // StandardD14 specifies the standard d14 state for virtual machine size - // types. - StandardD14 VirtualMachineSizeTypes = "Standard_D14" - // StandardD14V2 specifies the standard d14v2 state for virtual machine + VirtualMachineSizeTypesStandardA10 VirtualMachineSizeTypes = "Standard_A10" + // VirtualMachineSizeTypesStandardA11 specifies the virtual machine size types standard a11 state for virtual machine // size types. - StandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2" - // StandardD15V2 specifies the standard d15v2 state for virtual machine + VirtualMachineSizeTypesStandardA11 VirtualMachineSizeTypes = "Standard_A11" + // VirtualMachineSizeTypesStandardA1V2 specifies the virtual machine size types standard a1v2 state for virtual machine // size types. - StandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2" - // StandardD1V2 specifies the standard d1v2 state for virtual machine size - // types. - StandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2" - // StandardD2 specifies the standard d2 state for virtual machine size - // types. - StandardD2 VirtualMachineSizeTypes = "Standard_D2" - // StandardD2V2 specifies the standard d2v2 state for virtual machine size - // types. - StandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2" - // StandardD3 specifies the standard d3 state for virtual machine size - // types. - StandardD3 VirtualMachineSizeTypes = "Standard_D3" - // StandardD3V2 specifies the standard d3v2 state for virtual machine size - // types. - StandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2" - // StandardD4 specifies the standard d4 state for virtual machine size - // types. - StandardD4 VirtualMachineSizeTypes = "Standard_D4" - // StandardD4V2 specifies the standard d4v2 state for virtual machine size - // types. - StandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2" - // StandardD5V2 specifies the standard d5v2 state for virtual machine size - // types. - StandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2" - // StandardDS1 specifies the standard ds1 state for virtual machine size - // types. - StandardDS1 VirtualMachineSizeTypes = "Standard_DS1" - // StandardDS11 specifies the standard ds11 state for virtual machine size - // types. - StandardDS11 VirtualMachineSizeTypes = "Standard_DS11" - // StandardDS11V2 specifies the standard ds11v2 state for virtual machine + VirtualMachineSizeTypesStandardA1V2 VirtualMachineSizeTypes = "Standard_A1_v2" + // VirtualMachineSizeTypesStandardA2 specifies the virtual machine size types standard a2 state for virtual machine // size types. - StandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2" - // StandardDS12 specifies the standard ds12 state for virtual machine size - // types. - StandardDS12 VirtualMachineSizeTypes = "Standard_DS12" - // StandardDS12V2 specifies the standard ds12v2 state for virtual machine + VirtualMachineSizeTypesStandardA2 VirtualMachineSizeTypes = "Standard_A2" + // VirtualMachineSizeTypesStandardA2mV2 specifies the virtual machine size types standard a2mv2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardA2mV2 VirtualMachineSizeTypes = "Standard_A2m_v2" + // VirtualMachineSizeTypesStandardA2V2 specifies the virtual machine size types standard a2v2 state for virtual machine // size types. - StandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2" - // StandardDS13 specifies the standard ds13 state for virtual machine size - // types. - StandardDS13 VirtualMachineSizeTypes = "Standard_DS13" - // StandardDS13V2 specifies the standard ds13v2 state for virtual machine + VirtualMachineSizeTypesStandardA2V2 VirtualMachineSizeTypes = "Standard_A2_v2" + // VirtualMachineSizeTypesStandardA3 specifies the virtual machine size types standard a3 state for virtual machine // size types. - StandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2" - // StandardDS14 specifies the standard ds14 state for virtual machine size - // types. - StandardDS14 VirtualMachineSizeTypes = "Standard_DS14" - // StandardDS14V2 specifies the standard ds14v2 state for virtual machine + VirtualMachineSizeTypesStandardA3 VirtualMachineSizeTypes = "Standard_A3" + // VirtualMachineSizeTypesStandardA4 specifies the virtual machine size types standard a4 state for virtual machine // size types. - StandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2" - // StandardDS15V2 specifies the standard ds15v2 state for virtual machine + VirtualMachineSizeTypesStandardA4 VirtualMachineSizeTypes = "Standard_A4" + // VirtualMachineSizeTypesStandardA4mV2 specifies the virtual machine size types standard a4mv2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardA4mV2 VirtualMachineSizeTypes = "Standard_A4m_v2" + // VirtualMachineSizeTypesStandardA4V2 specifies the virtual machine size types standard a4v2 state for virtual machine // size types. - StandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2" - // StandardDS1V2 specifies the standard ds1v2 state for virtual machine + VirtualMachineSizeTypesStandardA4V2 VirtualMachineSizeTypes = "Standard_A4_v2" + // VirtualMachineSizeTypesStandardA5 specifies the virtual machine size types standard a5 state for virtual machine // size types. - StandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2" - // StandardDS2 specifies the standard ds2 state for virtual machine size - // types. - StandardDS2 VirtualMachineSizeTypes = "Standard_DS2" - // StandardDS2V2 specifies the standard ds2v2 state for virtual machine + VirtualMachineSizeTypesStandardA5 VirtualMachineSizeTypes = "Standard_A5" + // VirtualMachineSizeTypesStandardA6 specifies the virtual machine size types standard a6 state for virtual machine // size types. - StandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2" - // StandardDS3 specifies the standard ds3 state for virtual machine size - // types. - StandardDS3 VirtualMachineSizeTypes = "Standard_DS3" - // StandardDS3V2 specifies the standard ds3v2 state for virtual machine + VirtualMachineSizeTypesStandardA6 VirtualMachineSizeTypes = "Standard_A6" + // VirtualMachineSizeTypesStandardA7 specifies the virtual machine size types standard a7 state for virtual machine // size types. - StandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2" - // StandardDS4 specifies the standard ds4 state for virtual machine size - // types. - StandardDS4 VirtualMachineSizeTypes = "Standard_DS4" - // StandardDS4V2 specifies the standard ds4v2 state for virtual machine + VirtualMachineSizeTypesStandardA7 VirtualMachineSizeTypes = "Standard_A7" + // VirtualMachineSizeTypesStandardA8 specifies the virtual machine size types standard a8 state for virtual machine // size types. - StandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2" - // StandardDS5V2 specifies the standard ds5v2 state for virtual machine + VirtualMachineSizeTypesStandardA8 VirtualMachineSizeTypes = "Standard_A8" + // VirtualMachineSizeTypesStandardA8mV2 specifies the virtual machine size types standard a8mv2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardA8mV2 VirtualMachineSizeTypes = "Standard_A8m_v2" + // VirtualMachineSizeTypesStandardA8V2 specifies the virtual machine size types standard a8v2 state for virtual machine // size types. - StandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2" - // StandardG1 specifies the standard g1 state for virtual machine size - // types. - StandardG1 VirtualMachineSizeTypes = "Standard_G1" - // StandardG2 specifies the standard g2 state for virtual machine size - // types. - StandardG2 VirtualMachineSizeTypes = "Standard_G2" - // StandardG3 specifies the standard g3 state for virtual machine size - // types. - StandardG3 VirtualMachineSizeTypes = "Standard_G3" - // StandardG4 specifies the standard g4 state for virtual machine size - // types. - StandardG4 VirtualMachineSizeTypes = "Standard_G4" - // StandardG5 specifies the standard g5 state for virtual machine size - // types. - StandardG5 VirtualMachineSizeTypes = "Standard_G5" - // StandardGS1 specifies the standard gs1 state for virtual machine size - // types. - StandardGS1 VirtualMachineSizeTypes = "Standard_GS1" - // StandardGS2 specifies the standard gs2 state for virtual machine size - // types. - StandardGS2 VirtualMachineSizeTypes = "Standard_GS2" - // StandardGS3 specifies the standard gs3 state for virtual machine size - // types. - StandardGS3 VirtualMachineSizeTypes = "Standard_GS3" - // StandardGS4 specifies the standard gs4 state for virtual machine size - // types. - StandardGS4 VirtualMachineSizeTypes = "Standard_GS4" - // StandardGS5 specifies the standard gs5 state for virtual machine size - // types. - StandardGS5 VirtualMachineSizeTypes = "Standard_GS5" + VirtualMachineSizeTypesStandardA8V2 VirtualMachineSizeTypes = "Standard_A8_v2" + // VirtualMachineSizeTypesStandardA9 specifies the virtual machine size types standard a9 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardA9 VirtualMachineSizeTypes = "Standard_A9" + // VirtualMachineSizeTypesStandardD1 specifies the virtual machine size types standard d1 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD1 VirtualMachineSizeTypes = "Standard_D1" + // VirtualMachineSizeTypesStandardD11 specifies the virtual machine size types standard d11 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD11 VirtualMachineSizeTypes = "Standard_D11" + // VirtualMachineSizeTypesStandardD11V2 specifies the virtual machine size types standard d11v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardD11V2 VirtualMachineSizeTypes = "Standard_D11_v2" + // VirtualMachineSizeTypesStandardD12 specifies the virtual machine size types standard d12 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD12 VirtualMachineSizeTypes = "Standard_D12" + // VirtualMachineSizeTypesStandardD12V2 specifies the virtual machine size types standard d12v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardD12V2 VirtualMachineSizeTypes = "Standard_D12_v2" + // VirtualMachineSizeTypesStandardD13 specifies the virtual machine size types standard d13 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD13 VirtualMachineSizeTypes = "Standard_D13" + // VirtualMachineSizeTypesStandardD13V2 specifies the virtual machine size types standard d13v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardD13V2 VirtualMachineSizeTypes = "Standard_D13_v2" + // VirtualMachineSizeTypesStandardD14 specifies the virtual machine size types standard d14 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD14 VirtualMachineSizeTypes = "Standard_D14" + // VirtualMachineSizeTypesStandardD14V2 specifies the virtual machine size types standard d14v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardD14V2 VirtualMachineSizeTypes = "Standard_D14_v2" + // VirtualMachineSizeTypesStandardD15V2 specifies the virtual machine size types standard d15v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardD15V2 VirtualMachineSizeTypes = "Standard_D15_v2" + // VirtualMachineSizeTypesStandardD1V2 specifies the virtual machine size types standard d1v2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD1V2 VirtualMachineSizeTypes = "Standard_D1_v2" + // VirtualMachineSizeTypesStandardD2 specifies the virtual machine size types standard d2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD2 VirtualMachineSizeTypes = "Standard_D2" + // VirtualMachineSizeTypesStandardD2V2 specifies the virtual machine size types standard d2v2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD2V2 VirtualMachineSizeTypes = "Standard_D2_v2" + // VirtualMachineSizeTypesStandardD3 specifies the virtual machine size types standard d3 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD3 VirtualMachineSizeTypes = "Standard_D3" + // VirtualMachineSizeTypesStandardD3V2 specifies the virtual machine size types standard d3v2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD3V2 VirtualMachineSizeTypes = "Standard_D3_v2" + // VirtualMachineSizeTypesStandardD4 specifies the virtual machine size types standard d4 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD4 VirtualMachineSizeTypes = "Standard_D4" + // VirtualMachineSizeTypesStandardD4V2 specifies the virtual machine size types standard d4v2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD4V2 VirtualMachineSizeTypes = "Standard_D4_v2" + // VirtualMachineSizeTypesStandardD5V2 specifies the virtual machine size types standard d5v2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardD5V2 VirtualMachineSizeTypes = "Standard_D5_v2" + // VirtualMachineSizeTypesStandardDS1 specifies the virtual machine size types standard ds1 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS1 VirtualMachineSizeTypes = "Standard_DS1" + // VirtualMachineSizeTypesStandardDS11 specifies the virtual machine size types standard ds11 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS11 VirtualMachineSizeTypes = "Standard_DS11" + // VirtualMachineSizeTypesStandardDS11V2 specifies the virtual machine size types standard ds11v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS11V2 VirtualMachineSizeTypes = "Standard_DS11_v2" + // VirtualMachineSizeTypesStandardDS12 specifies the virtual machine size types standard ds12 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS12 VirtualMachineSizeTypes = "Standard_DS12" + // VirtualMachineSizeTypesStandardDS12V2 specifies the virtual machine size types standard ds12v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS12V2 VirtualMachineSizeTypes = "Standard_DS12_v2" + // VirtualMachineSizeTypesStandardDS13 specifies the virtual machine size types standard ds13 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS13 VirtualMachineSizeTypes = "Standard_DS13" + // VirtualMachineSizeTypesStandardDS13V2 specifies the virtual machine size types standard ds13v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS13V2 VirtualMachineSizeTypes = "Standard_DS13_v2" + // VirtualMachineSizeTypesStandardDS14 specifies the virtual machine size types standard ds14 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS14 VirtualMachineSizeTypes = "Standard_DS14" + // VirtualMachineSizeTypesStandardDS14V2 specifies the virtual machine size types standard ds14v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS14V2 VirtualMachineSizeTypes = "Standard_DS14_v2" + // VirtualMachineSizeTypesStandardDS15V2 specifies the virtual machine size types standard ds15v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS15V2 VirtualMachineSizeTypes = "Standard_DS15_v2" + // VirtualMachineSizeTypesStandardDS1V2 specifies the virtual machine size types standard ds1v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS1V2 VirtualMachineSizeTypes = "Standard_DS1_v2" + // VirtualMachineSizeTypesStandardDS2 specifies the virtual machine size types standard ds2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS2 VirtualMachineSizeTypes = "Standard_DS2" + // VirtualMachineSizeTypesStandardDS2V2 specifies the virtual machine size types standard ds2v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS2V2 VirtualMachineSizeTypes = "Standard_DS2_v2" + // VirtualMachineSizeTypesStandardDS3 specifies the virtual machine size types standard ds3 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS3 VirtualMachineSizeTypes = "Standard_DS3" + // VirtualMachineSizeTypesStandardDS3V2 specifies the virtual machine size types standard ds3v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS3V2 VirtualMachineSizeTypes = "Standard_DS3_v2" + // VirtualMachineSizeTypesStandardDS4 specifies the virtual machine size types standard ds4 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardDS4 VirtualMachineSizeTypes = "Standard_DS4" + // VirtualMachineSizeTypesStandardDS4V2 specifies the virtual machine size types standard ds4v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS4V2 VirtualMachineSizeTypes = "Standard_DS4_v2" + // VirtualMachineSizeTypesStandardDS5V2 specifies the virtual machine size types standard ds5v2 state for virtual + // machine size types. + VirtualMachineSizeTypesStandardDS5V2 VirtualMachineSizeTypes = "Standard_DS5_v2" + // VirtualMachineSizeTypesStandardF1 specifies the virtual machine size types standard f1 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF1 VirtualMachineSizeTypes = "Standard_F1" + // VirtualMachineSizeTypesStandardF16 specifies the virtual machine size types standard f16 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF16 VirtualMachineSizeTypes = "Standard_F16" + // VirtualMachineSizeTypesStandardF16s specifies the virtual machine size types standard f16s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF16s VirtualMachineSizeTypes = "Standard_F16s" + // VirtualMachineSizeTypesStandardF1s specifies the virtual machine size types standard f1s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF1s VirtualMachineSizeTypes = "Standard_F1s" + // VirtualMachineSizeTypesStandardF2 specifies the virtual machine size types standard f2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF2 VirtualMachineSizeTypes = "Standard_F2" + // VirtualMachineSizeTypesStandardF2s specifies the virtual machine size types standard f2s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF2s VirtualMachineSizeTypes = "Standard_F2s" + // VirtualMachineSizeTypesStandardF4 specifies the virtual machine size types standard f4 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF4 VirtualMachineSizeTypes = "Standard_F4" + // VirtualMachineSizeTypesStandardF4s specifies the virtual machine size types standard f4s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF4s VirtualMachineSizeTypes = "Standard_F4s" + // VirtualMachineSizeTypesStandardF8 specifies the virtual machine size types standard f8 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF8 VirtualMachineSizeTypes = "Standard_F8" + // VirtualMachineSizeTypesStandardF8s specifies the virtual machine size types standard f8s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardF8s VirtualMachineSizeTypes = "Standard_F8s" + // VirtualMachineSizeTypesStandardG1 specifies the virtual machine size types standard g1 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardG1 VirtualMachineSizeTypes = "Standard_G1" + // VirtualMachineSizeTypesStandardG2 specifies the virtual machine size types standard g2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardG2 VirtualMachineSizeTypes = "Standard_G2" + // VirtualMachineSizeTypesStandardG3 specifies the virtual machine size types standard g3 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardG3 VirtualMachineSizeTypes = "Standard_G3" + // VirtualMachineSizeTypesStandardG4 specifies the virtual machine size types standard g4 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardG4 VirtualMachineSizeTypes = "Standard_G4" + // VirtualMachineSizeTypesStandardG5 specifies the virtual machine size types standard g5 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardG5 VirtualMachineSizeTypes = "Standard_G5" + // VirtualMachineSizeTypesStandardGS1 specifies the virtual machine size types standard gs1 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardGS1 VirtualMachineSizeTypes = "Standard_GS1" + // VirtualMachineSizeTypesStandardGS2 specifies the virtual machine size types standard gs2 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardGS2 VirtualMachineSizeTypes = "Standard_GS2" + // VirtualMachineSizeTypesStandardGS3 specifies the virtual machine size types standard gs3 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardGS3 VirtualMachineSizeTypes = "Standard_GS3" + // VirtualMachineSizeTypesStandardGS4 specifies the virtual machine size types standard gs4 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardGS4 VirtualMachineSizeTypes = "Standard_GS4" + // VirtualMachineSizeTypesStandardGS5 specifies the virtual machine size types standard gs5 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardGS5 VirtualMachineSizeTypes = "Standard_GS5" + // VirtualMachineSizeTypesStandardH16 specifies the virtual machine size types standard h16 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardH16 VirtualMachineSizeTypes = "Standard_H16" + // VirtualMachineSizeTypesStandardH16m specifies the virtual machine size types standard h16m state for virtual machine + // size types. + VirtualMachineSizeTypesStandardH16m VirtualMachineSizeTypes = "Standard_H16m" + // VirtualMachineSizeTypesStandardH16mr specifies the virtual machine size types standard h16mr state for virtual + // machine size types. + VirtualMachineSizeTypesStandardH16mr VirtualMachineSizeTypes = "Standard_H16mr" + // VirtualMachineSizeTypesStandardH16r specifies the virtual machine size types standard h16r state for virtual machine + // size types. + VirtualMachineSizeTypesStandardH16r VirtualMachineSizeTypes = "Standard_H16r" + // VirtualMachineSizeTypesStandardH8 specifies the virtual machine size types standard h8 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardH8 VirtualMachineSizeTypes = "Standard_H8" + // VirtualMachineSizeTypesStandardH8m specifies the virtual machine size types standard h8m state for virtual machine + // size types. + VirtualMachineSizeTypesStandardH8m VirtualMachineSizeTypes = "Standard_H8m" + // VirtualMachineSizeTypesStandardL16s specifies the virtual machine size types standard l16s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardL16s VirtualMachineSizeTypes = "Standard_L16s" + // VirtualMachineSizeTypesStandardL32s specifies the virtual machine size types standard l32s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardL32s VirtualMachineSizeTypes = "Standard_L32s" + // VirtualMachineSizeTypesStandardL4s specifies the virtual machine size types standard l4s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardL4s VirtualMachineSizeTypes = "Standard_L4s" + // VirtualMachineSizeTypesStandardL8s specifies the virtual machine size types standard l8s state for virtual machine + // size types. + VirtualMachineSizeTypesStandardL8s VirtualMachineSizeTypes = "Standard_L8s" + // VirtualMachineSizeTypesStandardNC12 specifies the virtual machine size types standard nc12 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardNC12 VirtualMachineSizeTypes = "Standard_NC12" + // VirtualMachineSizeTypesStandardNC24 specifies the virtual machine size types standard nc24 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardNC24 VirtualMachineSizeTypes = "Standard_NC24" + // VirtualMachineSizeTypesStandardNC24r specifies the virtual machine size types standard nc24r state for virtual + // machine size types. + VirtualMachineSizeTypesStandardNC24r VirtualMachineSizeTypes = "Standard_NC24r" + // VirtualMachineSizeTypesStandardNC6 specifies the virtual machine size types standard nc6 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardNC6 VirtualMachineSizeTypes = "Standard_NC6" + // VirtualMachineSizeTypesStandardNV12 specifies the virtual machine size types standard nv12 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardNV12 VirtualMachineSizeTypes = "Standard_NV12" + // VirtualMachineSizeTypesStandardNV24 specifies the virtual machine size types standard nv24 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardNV24 VirtualMachineSizeTypes = "Standard_NV24" + // VirtualMachineSizeTypesStandardNV6 specifies the virtual machine size types standard nv6 state for virtual machine + // size types. + VirtualMachineSizeTypesStandardNV6 VirtualMachineSizeTypes = "Standard_NV6" ) -// AdditionalUnattendContent is additional XML formatted information that can -// be included in the Unattend.xml file, which is used by Windows Setup. -// Contents are defined by setting name, component name, and the pass in which -// the content is a applied. +// AccessURI is a disk access SAS uri. +type AccessURI struct { + autorest.Response `json:"-"` + *AccessURIOutput `json:"properties,omitempty"` +} + +// AccessURIOutput is azure properties, including output. +type AccessURIOutput struct { + *AccessURIRaw `json:"output,omitempty"` +} + +// AccessURIRaw is this object gets 'bubbled up' through flattening. +type AccessURIRaw struct { + AccessSAS *string `json:"accessSAS,omitempty"` +} + +// AdditionalUnattendContent is specifies additional XML formatted information that can be included in the Unattend.xml +// file, which is used by Windows Setup. Contents are defined by setting name, component name, and the pass in which +// the content is applied. type AdditionalUnattendContent struct { PassName PassNames `json:"passName,omitempty"` ComponentName ComponentNames `json:"componentName,omitempty"` @@ -397,7 +736,14 @@ type APIErrorBase struct { Message *string `json:"message,omitempty"` } -// AvailabilitySet is create or update availability set parameters. +// AvailabilitySet is specifies information about the availability set that the virtual machine should be assigned to. +// Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. +// For more information about availability sets, see [Manage the availability of virtual +// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). +//

For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in +// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) +//

Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to +// an availability set. type AvailabilitySet struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -421,22 +767,141 @@ type AvailabilitySetProperties struct { PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"` VirtualMachines *[]SubResource `json:"virtualMachines,omitempty"` Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` - Managed *bool `json:"managed,omitempty"` } -// BootDiagnostics is describes Boot Diagnostics. +// BootDiagnostics is boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to +// diagnose VM status.

For Linux Virtual Machines, you can easily view the output of your console log. +//

For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the +// hypervisor. type BootDiagnostics struct { Enabled *bool `json:"enabled,omitempty"` StorageURI *string `json:"storageUri,omitempty"` } -// BootDiagnosticsInstanceView is the instance view of a virtual machine boot -// diagnostics. +// BootDiagnosticsInstanceView is the instance view of a virtual machine boot diagnostics. type BootDiagnosticsInstanceView struct { ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"` SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"` } +// ContainerService is container service. +type ContainerService struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ContainerServiceProperties `json:"properties,omitempty"` +} + +// ContainerServiceAgentPoolProfile is profile for the container service agent pool. +type ContainerServiceAgentPoolProfile struct { + Name *string `json:"name,omitempty"` + Count *int32 `json:"count,omitempty"` + VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"` + DNSPrefix *string `json:"dnsPrefix,omitempty"` + Fqdn *string `json:"fqdn,omitempty"` +} + +// ContainerServiceCustomProfile is properties to configure a custom container service cluster. +type ContainerServiceCustomProfile struct { + Orchestrator *string `json:"orchestrator,omitempty"` +} + +// ContainerServiceDiagnosticsProfile is +type ContainerServiceDiagnosticsProfile struct { + VMDiagnostics *ContainerServiceVMDiagnostics `json:"vmDiagnostics,omitempty"` +} + +// ContainerServiceLinuxProfile is profile for Linux VMs in the container service cluster. +type ContainerServiceLinuxProfile struct { + AdminUsername *string `json:"adminUsername,omitempty"` + SSH *ContainerServiceSSHConfiguration `json:"ssh,omitempty"` +} + +// ContainerServiceListResult is the response from the List Container Services operation. +type ContainerServiceListResult struct { + autorest.Response `json:"-"` + Value *[]ContainerService `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ContainerServiceListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ContainerServiceListResult) ContainerServiceListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ContainerServiceMasterProfile is profile for the container service master. +type ContainerServiceMasterProfile struct { + Count *int32 `json:"count,omitempty"` + DNSPrefix *string `json:"dnsPrefix,omitempty"` + Fqdn *string `json:"fqdn,omitempty"` +} + +// ContainerServiceOrchestratorProfile is profile for the container service orchestrator. +type ContainerServiceOrchestratorProfile struct { + OrchestratorType ContainerServiceOrchestratorTypes `json:"orchestratorType,omitempty"` +} + +// ContainerServiceProperties is properties of the container service. +type ContainerServiceProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` + OrchestratorProfile *ContainerServiceOrchestratorProfile `json:"orchestratorProfile,omitempty"` + CustomProfile *ContainerServiceCustomProfile `json:"customProfile,omitempty"` + ServicePrincipalProfile *ContainerServiceServicePrincipalProfile `json:"servicePrincipalProfile,omitempty"` + MasterProfile *ContainerServiceMasterProfile `json:"masterProfile,omitempty"` + AgentPoolProfiles *[]ContainerServiceAgentPoolProfile `json:"agentPoolProfiles,omitempty"` + WindowsProfile *ContainerServiceWindowsProfile `json:"windowsProfile,omitempty"` + LinuxProfile *ContainerServiceLinuxProfile `json:"linuxProfile,omitempty"` + DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"` +} + +// ContainerServiceServicePrincipalProfile is information about a service principal identity for the cluster to use for +// manipulating Azure APIs. +type ContainerServiceServicePrincipalProfile struct { + ClientID *string `json:"clientId,omitempty"` + Secret *string `json:"secret,omitempty"` +} + +// ContainerServiceSSHConfiguration is SSH configuration for Linux-based VMs running on Azure. +type ContainerServiceSSHConfiguration struct { + PublicKeys *[]ContainerServiceSSHPublicKey `json:"publicKeys,omitempty"` +} + +// ContainerServiceSSHPublicKey is contains information about SSH certificate public key data. +type ContainerServiceSSHPublicKey struct { + KeyData *string `json:"keyData,omitempty"` +} + +// ContainerServiceVMDiagnostics is profile for diagnostics on the container service VMs. +type ContainerServiceVMDiagnostics struct { + Enabled *bool `json:"enabled,omitempty"` + StorageURI *string `json:"storageUri,omitempty"` +} + +// ContainerServiceWindowsProfile is profile for Windows VMs in the container service cluster. +type ContainerServiceWindowsProfile struct { + AdminUsername *string `json:"adminUsername,omitempty"` + AdminPassword *string `json:"adminPassword,omitempty"` +} + +// CreationData is data used when creating a disk. +type CreationData struct { + CreateOption DiskCreateOption `json:"createOption,omitempty"` + StorageAccountID *string `json:"storageAccountId,omitempty"` + ImageReference *ImageDiskReference `json:"imageReference,omitempty"` + SourceURI *string `json:"sourceUri,omitempty"` + SourceResourceID *string `json:"sourceResourceId,omitempty"` +} + // DataDisk is describes a data disk. type DataDisk struct { Lun *int32 `json:"lun,omitempty"` @@ -454,11 +919,25 @@ type DataDiskImage struct { Lun *int32 `json:"lun,omitempty"` } -// DiagnosticsProfile is describes a diagnostics profile. +// DiagnosticsProfile is specifies the boot diagnostic settings state.

Minimum api-version: 2015-06-15. type DiagnosticsProfile struct { BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"` } +// Disk is disk resource. +type Disk struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` + Zones *[]string `json:"zones,omitempty"` + *DiskProperties `json:"properties,omitempty"` +} + // DiskEncryptionSettings is describes a Encryption Settings for a Disk type DiskEncryptionSettings struct { DiskEncryptionKey *KeyVaultSecretReference `json:"diskEncryptionKey,omitempty"` @@ -468,16 +947,80 @@ type DiskEncryptionSettings struct { // DiskInstanceView is the instance view of the disk. type DiskInstanceView struct { - Name *string `json:"name,omitempty"` - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + Name *string `json:"name,omitempty"` + EncryptionSettings *[]DiskEncryptionSettings `json:"encryptionSettings,omitempty"` + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` } -// HardwareProfile is describes a hardware profile. +// DiskList is the List Disks operation response. +type DiskList struct { + autorest.Response `json:"-"` + Value *[]Disk `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// DiskListPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client DiskList) DiskListPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// DiskProperties is disk resource properties. +type DiskProperties struct { + TimeCreated *date.Time `json:"timeCreated,omitempty"` + OsType OperatingSystemTypes `json:"osType,omitempty"` + CreationData *CreationData `json:"creationData,omitempty"` + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// DiskSku is the disks and snapshots sku name. Can be Standard_LRS or Premium_LRS. +type DiskSku struct { + Name StorageAccountTypes `json:"name,omitempty"` + Tier *string `json:"tier,omitempty"` +} + +// DiskUpdate is disk update resource. +type DiskUpdate struct { + Tags *map[string]*string `json:"tags,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` + *DiskUpdateProperties `json:"properties,omitempty"` +} + +// DiskUpdateProperties is disk resource update properties. +type DiskUpdateProperties struct { + OsType OperatingSystemTypes `json:"osType,omitempty"` + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"` +} + +// EncryptionSettings is encryption settings for disk or snapshot +type EncryptionSettings struct { + Enabled *bool `json:"enabled,omitempty"` + DiskEncryptionKey *KeyVaultAndSecretReference `json:"diskEncryptionKey,omitempty"` + KeyEncryptionKey *KeyVaultAndKeyReference `json:"keyEncryptionKey,omitempty"` +} + +// GrantAccessData is data used for requesting a SAS. +type GrantAccessData struct { + Access AccessLevel `json:"access,omitempty"` + DurationInSeconds *int32 `json:"durationInSeconds,omitempty"` +} + +// HardwareProfile is specifies the hardware settings for the virtual machine. type HardwareProfile struct { VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"` } -// Image is describes an Image. +// Image is the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the +// virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist. type Image struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -490,12 +1033,19 @@ type Image struct { // ImageDataDisk is describes a data disk. type ImageDataDisk struct { - Lun *int32 `json:"lun,omitempty"` - Snapshot *SubResource `json:"snapshot,omitempty"` - ManagedDisk *SubResource `json:"managedDisk,omitempty"` - BlobURI *string `json:"blobUri,omitempty"` - Caching CachingTypes `json:"caching,omitempty"` - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + Lun *int32 `json:"lun,omitempty"` + Snapshot *SubResource `json:"snapshot,omitempty"` + ManagedDisk *SubResource `json:"managedDisk,omitempty"` + BlobURI *string `json:"blobUri,omitempty"` + Caching CachingTypes `json:"caching,omitempty"` + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` +} + +// ImageDiskReference is the source image used for creating the disk. +type ImageDiskReference struct { + ID *string `json:"id,omitempty"` + Lun *int32 `json:"lun,omitempty"` } // ImageListResult is the List Image operation response. @@ -519,13 +1069,14 @@ func (client ImageListResult) ImageListResultPreparer() (*http.Request, error) { // ImageOSDisk is describes an Operating System disk. type ImageOSDisk struct { - OsType OperatingSystemTypes `json:"osType,omitempty"` - OsState OperatingSystemStateTypes `json:"osState,omitempty"` - Snapshot *SubResource `json:"snapshot,omitempty"` - ManagedDisk *SubResource `json:"managedDisk,omitempty"` - BlobURI *string `json:"blobUri,omitempty"` - Caching CachingTypes `json:"caching,omitempty"` - DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + OsType OperatingSystemTypes `json:"osType,omitempty"` + OsState OperatingSystemStateTypes `json:"osState,omitempty"` + Snapshot *SubResource `json:"snapshot,omitempty"` + ManagedDisk *SubResource `json:"managedDisk,omitempty"` + BlobURI *string `json:"blobUri,omitempty"` + Caching CachingTypes `json:"caching,omitempty"` + DiskSizeGB *int32 `json:"diskSizeGB,omitempty"` + StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` } // ImageProperties is describes the properties of an Image. @@ -535,7 +1086,9 @@ type ImageProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ImageReference is the image reference. +// ImageReference is specifies information about the image to use. You can specify information about platform images, +// marketplace images, or virtual machine images. This element is required when you want to use a platform image, +// marketplace image, or virtual machine image, but is not used in other creation operations. type ImageReference struct { ID *string `json:"id,omitempty"` Publisher *string `json:"publisher,omitempty"` @@ -565,6 +1118,19 @@ type InstanceViewStatus struct { Time *date.Time `json:"time,omitempty"` } +// KeyVaultAndKeyReference is key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to +// unwrap the encryptionKey +type KeyVaultAndKeyReference struct { + SourceVault *SourceVault `json:"sourceVault,omitempty"` + KeyURL *string `json:"keyUrl,omitempty"` +} + +// KeyVaultAndSecretReference is key Vault Secret Url and vault id of the encryption key +type KeyVaultAndSecretReference struct { + SourceVault *SourceVault `json:"sourceVault,omitempty"` + SecretURL *string `json:"secretUrl,omitempty"` +} + // KeyVaultKeyReference is describes a reference to Key Vault Key type KeyVaultKeyReference struct { KeyURL *string `json:"keyUrl,omitempty"` @@ -577,7 +1143,11 @@ type KeyVaultSecretReference struct { SourceVault *SubResource `json:"sourceVault,omitempty"` } -// LinuxConfiguration is describes Windows configuration of the OS Profile. +// LinuxConfiguration is specifies the Linux operating system settings on the virtual machine.

For a list of +// supported Linux distributions, see [Linux on Azure-Endorsed +// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) +//

For running non-endorsed distributions, see [Information for Non-Endorsed +// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json). type LinuxConfiguration struct { DisablePasswordAuthentication *bool `json:"disablePasswordAuthentication,omitempty"` SSH *SSHConfiguration `json:"ssh,omitempty"` @@ -614,12 +1184,22 @@ type ListVirtualMachineImageResource struct { Value *[]VirtualMachineImageResource `json:"value,omitempty"` } -// LongRunningOperationProperties is compute-specific operation properties, -// including output +// LongRunningOperationProperties is compute-specific operation properties, including output type LongRunningOperationProperties struct { Output *map[string]interface{} `json:"output,omitempty"` } +// MaintenanceRedeployStatus is maintenance Operation Status. +type MaintenanceRedeployStatus struct { + IsCustomerInitiatedMaintenanceAllowed *bool `json:"isCustomerInitiatedMaintenanceAllowed,omitempty"` + PreMaintenanceWindowStartTime *date.Time `json:"preMaintenanceWindowStartTime,omitempty"` + PreMaintenanceWindowEndTime *date.Time `json:"preMaintenanceWindowEndTime,omitempty"` + MaintenanceWindowStartTime *date.Time `json:"maintenanceWindowStartTime,omitempty"` + MaintenanceWindowEndTime *date.Time `json:"maintenanceWindowEndTime,omitempty"` + LastOperationResultCode MaintenanceOperationResultCodeTypes `json:"lastOperationResultCode,omitempty"` + LastOperationMessage *string `json:"lastOperationMessage,omitempty"` +} + // ManagedDiskParameters is the parameters of a managed disk. type ManagedDiskParameters struct { ID *string `json:"id,omitempty"` @@ -632,13 +1212,12 @@ type NetworkInterfaceReference struct { *NetworkInterfaceReferenceProperties `json:"properties,omitempty"` } -// NetworkInterfaceReferenceProperties is describes a network interface -// reference properties. +// NetworkInterfaceReferenceProperties is describes a network interface reference properties. type NetworkInterfaceReferenceProperties struct { Primary *bool `json:"primary,omitempty"` } -// NetworkProfile is describes a network profile. +// NetworkProfile is specifies the network interfaces of the virtual machine. type NetworkProfile struct { NetworkInterfaces *[]NetworkInterfaceReference `json:"networkInterfaces,omitempty"` } @@ -653,7 +1232,9 @@ type OperationStatusResponse struct { Error *APIError `json:"error,omitempty"` } -// OSDisk is describes an Operating System disk. +// OSDisk is specifies information about the operating system disk used by the virtual machine.

For more +// information about disks, see [About disks and VHDs for Azure virtual +// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). type OSDisk struct { OsType OperatingSystemTypes `json:"osType,omitempty"` EncryptionSettings *DiskEncryptionSettings `json:"encryptionSettings,omitempty"` @@ -671,7 +1252,7 @@ type OSDiskImage struct { OperatingSystem OperatingSystemTypes `json:"operatingSystem,omitempty"` } -// OSProfile is describes an OS profile. +// OSProfile is specifies the operating system settings for the virtual machine. type OSProfile struct { ComputerName *string `json:"computerName,omitempty"` AdminUsername *string `json:"adminUsername,omitempty"` @@ -682,7 +1263,10 @@ type OSProfile struct { Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` } -// Plan is plan for the resource. +// Plan is specifies information about the marketplace image used to create the virtual machine. This element is only +// used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for +// programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to +// deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. type Plan struct { Name *string `json:"name,omitempty"` Publisher *string `json:"publisher,omitempty"` @@ -690,8 +1274,7 @@ type Plan struct { PromotionCode *string `json:"promotionCode,omitempty"` } -// PurchasePlan is used for establishing the purchase context of any 3rd Party -// artifact through MarketPlace. +// PurchasePlan is used for establishing the purchase context of any 3rd Party artifact through MarketPlace. type PurchasePlan struct { Publisher *string `json:"publisher,omitempty"` Name *string `json:"name,omitempty"` @@ -707,6 +1290,195 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } +// ResourceSku is describes an available Compute SKU. +type ResourceSku struct { + ResourceType *string `json:"resourceType,omitempty"` + Name *string `json:"name,omitempty"` + Tier *string `json:"tier,omitempty"` + Size *string `json:"size,omitempty"` + Family *string `json:"family,omitempty"` + Kind *string `json:"kind,omitempty"` + Capacity *ResourceSkuCapacity `json:"capacity,omitempty"` + Locations *[]string `json:"locations,omitempty"` + APIVersions *[]string `json:"apiVersions,omitempty"` + Costs *[]ResourceSkuCosts `json:"costs,omitempty"` + Capabilities *[]ResourceSkuCapabilities `json:"capabilities,omitempty"` + Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"` +} + +// ResourceSkuCapabilities is describes The SKU capabilites object. +type ResourceSkuCapabilities struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} + +// ResourceSkuCapacity is describes scaling information of a SKU. +type ResourceSkuCapacity struct { + Minimum *int64 `json:"minimum,omitempty"` + Maximum *int64 `json:"maximum,omitempty"` + Default *int64 `json:"default,omitempty"` + ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"` +} + +// ResourceSkuCosts is describes metadata for retrieving price info. +type ResourceSkuCosts struct { + MeterID *string `json:"meterID,omitempty"` + Quantity *int64 `json:"quantity,omitempty"` + ExtendedUnit *string `json:"extendedUnit,omitempty"` +} + +// ResourceSkuRestrictions is describes scaling information of a SKU. +type ResourceSkuRestrictions struct { + Type ResourceSkuRestrictionsType `json:"type,omitempty"` + Values *[]string `json:"values,omitempty"` + ReasonCode ResourceSkuRestrictionsReasonCode `json:"reasonCode,omitempty"` +} + +// ResourceSkusResult is the Compute List Skus operation response. +type ResourceSkusResult struct { + autorest.Response `json:"-"` + Value *[]ResourceSku `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ResourceSkusResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ResourceSkusResult) ResourceSkusResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ResourceUpdate is the Resource model definition. +type ResourceUpdate struct { + Tags *map[string]*string `json:"tags,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` +} + +// RollingUpgradePolicy is the configuration parameters used while performing a rolling upgrade. +type RollingUpgradePolicy struct { + MaxBatchInstancePercent *int32 `json:"maxBatchInstancePercent,omitempty"` + MaxUnhealthyInstancePercent *int32 `json:"maxUnhealthyInstancePercent,omitempty"` + MaxUnhealthyUpgradedInstancePercent *int32 `json:"maxUnhealthyUpgradedInstancePercent,omitempty"` + PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"` +} + +// RollingUpgradeProgressInfo is information about the number of virtual machine instances in each upgrade state. +type RollingUpgradeProgressInfo struct { + SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"` + FailedInstanceCount *int32 `json:"failedInstanceCount,omitempty"` + InProgressInstanceCount *int32 `json:"inProgressInstanceCount,omitempty"` + PendingInstanceCount *int32 `json:"pendingInstanceCount,omitempty"` +} + +// RollingUpgradeRunningStatus is information about the current running state of the overall upgrade. +type RollingUpgradeRunningStatus struct { + Code RollingUpgradeStatusCode `json:"code,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + LastAction RollingUpgradeActionType `json:"lastAction,omitempty"` + LastActionTime *date.Time `json:"lastActionTime,omitempty"` +} + +// RollingUpgradeStatusInfo is the status of the latest virtual machine scale set rolling upgrade. +type RollingUpgradeStatusInfo struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *RollingUpgradeStatusInfoProperties `json:"properties,omitempty"` +} + +// RollingUpgradeStatusInfoProperties is the status of the latest virtual machine scale set rolling upgrade. +type RollingUpgradeStatusInfoProperties struct { + Policy *RollingUpgradePolicy `json:"policy,omitempty"` + RunningStatus *RollingUpgradeRunningStatus `json:"runningStatus,omitempty"` + Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"` + Error *APIError `json:"error,omitempty"` +} + +// RunCommandDocument is describes the properties of a Run Command. +type RunCommandDocument struct { + autorest.Response `json:"-"` + Schema *string `json:"$schema,omitempty"` + ID *string `json:"id,omitempty"` + OsType OperatingSystemTypes `json:"osType,omitempty"` + Label *string `json:"label,omitempty"` + Description *string `json:"description,omitempty"` + Script *[]string `json:"script,omitempty"` + Parameters *[]RunCommandParameterDefinition `json:"parameters,omitempty"` +} + +// RunCommandDocumentBase is describes the properties of a Run Command metadata. +type RunCommandDocumentBase struct { + Schema *string `json:"$schema,omitempty"` + ID *string `json:"id,omitempty"` + OsType OperatingSystemTypes `json:"osType,omitempty"` + Label *string `json:"label,omitempty"` + Description *string `json:"description,omitempty"` +} + +// RunCommandInput is capture Virtual Machine parameters. +type RunCommandInput struct { + CommandID *string `json:"commandId,omitempty"` + Script *[]string `json:"script,omitempty"` + Parameters *[]RunCommandInputParameter `json:"parameters,omitempty"` +} + +// RunCommandInputParameter is describes the properties of a run command parameter. +type RunCommandInputParameter struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} + +// RunCommandListResult is the List Virtual Machine operation response. +type RunCommandListResult struct { + autorest.Response `json:"-"` + Value *[]RunCommandDocumentBase `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// RunCommandListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client RunCommandListResult) RunCommandListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// RunCommandParameterDefinition is describes the properties of a run command parameter. +type RunCommandParameterDefinition struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + DefaultValue *string `json:"defaultValue,omitempty"` + Required *bool `json:"required,omitempty"` +} + +// RunCommandResult is run command operation response. +type RunCommandResult struct { + autorest.Response `json:"-"` + Name *string `json:"name,omitempty"` + Status *string `json:"status,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + Error *APIError `json:"error,omitempty"` + *RunCommandResultProperties `json:"properties,omitempty"` +} + +// RunCommandResultProperties is compute-specific operation properties, including output +type RunCommandResultProperties struct { + Output *map[string]interface{} `json:"output,omitempty"` +} + // Sku is describes a virtual machine scale set sku. type Sku struct { Name *string `json:"name,omitempty"` @@ -714,19 +1486,64 @@ type Sku struct { Capacity *int64 `json:"capacity,omitempty"` } -// SSHConfiguration is sSH configuration for Linux based VMs running on Azure +// Snapshot is snapshot resource. +type Snapshot struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` + *DiskProperties `json:"properties,omitempty"` +} + +// SnapshotList is the List Snapshots operation response. +type SnapshotList struct { + autorest.Response `json:"-"` + Value *[]Snapshot `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SnapshotListPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SnapshotList) SnapshotListPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SnapshotUpdate is snapshot update resource. +type SnapshotUpdate struct { + Tags *map[string]*string `json:"tags,omitempty"` + Sku *DiskSku `json:"sku,omitempty"` + *DiskUpdateProperties `json:"properties,omitempty"` +} + +// SourceVault is the vault id is an Azure Resource Manager Resoure id in the form +// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName} +type SourceVault struct { + ID *string `json:"id,omitempty"` +} + +// SSHConfiguration is SSH configuration for Linux based VMs running on Azure type SSHConfiguration struct { PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` } -// SSHPublicKey is contains information about SSH certificate public key and -// the path on the Linux VM where the public key is placed. +// SSHPublicKey is contains information about SSH certificate public key and the path on the Linux VM where the public +// key is placed. type SSHPublicKey struct { Path *string `json:"path,omitempty"` KeyData *string `json:"keyData,omitempty"` } -// StorageProfile is describes a storage profile. +// StorageProfile is specifies the storage settings for the virtual machine disks. type StorageProfile struct { ImageReference *ImageReference `json:"imageReference,omitempty"` OsDisk *OSDisk `json:"osDisk,omitempty"` @@ -743,9 +1560,16 @@ type SubResourceReadOnly struct { ID *string `json:"id,omitempty"` } -// UpgradePolicy is describes an upgrade policy - automatic or manual. +// UpdateResource is the Update Resource model definition. +type UpdateResource struct { + Tags *map[string]*string `json:"tags,omitempty"` +} + +// UpgradePolicy is describes an upgrade policy - automatic, manual, or rolling. type UpgradePolicy struct { - Mode UpgradeMode `json:"mode,omitempty"` + Mode UpgradeMode `json:"mode,omitempty"` + RollingUpgradePolicy *RollingUpgradePolicy `json:"rollingUpgradePolicy,omitempty"` + AutomaticOSUpgrade *bool `json:"automaticOSUpgrade,omitempty"` } // Usage is describes Compute Resource Usage. @@ -762,15 +1586,14 @@ type UsageName struct { LocalizedValue *string `json:"localizedValue,omitempty"` } -// VaultCertificate is describes a single certificate reference in a Key Vault, -// and where the certificate should reside on the VM. +// VaultCertificate is describes a single certificate reference in a Key Vault, and where the certificate should reside +// on the VM. type VaultCertificate struct { CertificateURL *string `json:"certificateUrl,omitempty"` CertificateStore *string `json:"certificateStore,omitempty"` } -// VaultSecretGroup is describes a set of certificates which are all in the -// same Key Vault. +// VaultSecretGroup is describes a set of certificates which are all in the same Key Vault. type VaultSecretGroup struct { SourceVault *SubResource `json:"sourceVault,omitempty"` VaultCertificates *[]VaultCertificate `json:"vaultCertificates,omitempty"` @@ -793,10 +1616,10 @@ type VirtualMachine struct { *VirtualMachineProperties `json:"properties,omitempty"` Resources *[]VirtualMachineExtension `json:"resources,omitempty"` Identity *VirtualMachineIdentity `json:"identity,omitempty"` + Zones *[]string `json:"zones,omitempty"` } -// VirtualMachineAgentInstanceView is the instance view of the VM Agent running -// on the virtual machine. +// VirtualMachineAgentInstanceView is the instance view of the VM Agent running on the virtual machine. type VirtualMachineAgentInstanceView struct { VMAgentVersion *string `json:"vmAgentVersion,omitempty"` ExtensionHandlers *[]VirtualMachineExtensionHandlerInstanceView `json:"extensionHandlers,omitempty"` @@ -817,8 +1640,7 @@ type VirtualMachineCaptureResult struct { *VirtualMachineCaptureResultProperties `json:"properties,omitempty"` } -// VirtualMachineCaptureResultProperties is compute-specific operation -// properties, including output +// VirtualMachineCaptureResultProperties is compute-specific operation properties, including output type VirtualMachineCaptureResultProperties struct { Output *map[string]interface{} `json:"output,omitempty"` } @@ -834,8 +1656,7 @@ type VirtualMachineExtension struct { *VirtualMachineExtensionProperties `json:"properties,omitempty"` } -// VirtualMachineExtensionHandlerInstanceView is the instance view of a virtual -// machine extension handler. +// VirtualMachineExtensionHandlerInstanceView is the instance view of a virtual machine extension handler. type VirtualMachineExtensionHandlerInstanceView struct { Type *string `json:"type,omitempty"` TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` @@ -853,8 +1674,7 @@ type VirtualMachineExtensionImage struct { *VirtualMachineExtensionImageProperties `json:"properties,omitempty"` } -// VirtualMachineExtensionImageProperties is describes the properties of a -// Virtual Machine Extension Image. +// VirtualMachineExtensionImageProperties is describes the properties of a Virtual Machine Extension Image. type VirtualMachineExtensionImageProperties struct { OperatingSystem *string `json:"operatingSystem,omitempty"` ComputeRole *string `json:"computeRole,omitempty"` @@ -863,8 +1683,7 @@ type VirtualMachineExtensionImageProperties struct { SupportsMultipleExtensions *bool `json:"supportsMultipleExtensions,omitempty"` } -// VirtualMachineExtensionInstanceView is the instance view of a virtual -// machine extension. +// VirtualMachineExtensionInstanceView is the instance view of a virtual machine extension. type VirtualMachineExtensionInstanceView struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` @@ -873,8 +1692,7 @@ type VirtualMachineExtensionInstanceView struct { Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` } -// VirtualMachineExtensionProperties is describes the properties of a Virtual -// Machine Extension. +// VirtualMachineExtensionProperties is describes the properties of a Virtual Machine Extension. type VirtualMachineExtensionProperties struct { ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` Publisher *string `json:"publisher,omitempty"` @@ -887,6 +1705,11 @@ type VirtualMachineExtensionProperties struct { InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"` } +// VirtualMachineHealthStatus is the health status of the VM. +type VirtualMachineHealthStatus struct { + Status *InstanceViewStatus `json:"status,omitempty"` +} + // VirtualMachineIdentity is identity for the virtual machine. type VirtualMachineIdentity struct { PrincipalID *string `json:"principalId,omitempty"` @@ -904,8 +1727,7 @@ type VirtualMachineImage struct { *VirtualMachineImageProperties `json:"properties,omitempty"` } -// VirtualMachineImageProperties is describes the properties of a Virtual -// Machine Image. +// VirtualMachineImageProperties is describes the properties of a Virtual Machine Image. type VirtualMachineImageProperties struct { Plan *PurchasePlan `json:"plan,omitempty"` OsDiskImage *OSDiskImage `json:"osDiskImage,omitempty"` @@ -922,14 +1744,16 @@ type VirtualMachineImageResource struct { // VirtualMachineInstanceView is the instance view of a virtual machine. type VirtualMachineInstanceView struct { - PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` - PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` - RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` - VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` - Disks *[]DiskInstanceView `json:"disks,omitempty"` - Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` - BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` - Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` + autorest.Response `json:"-"` + PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` + PlatformFaultDomain *int32 `json:"platformFaultDomain,omitempty"` + RdpThumbPrint *string `json:"rdpThumbPrint,omitempty"` + VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` + MaintenanceRedeployStatus *MaintenanceRedeployStatus `json:"maintenanceRedeployStatus,omitempty"` + Disks *[]DiskInstanceView `json:"disks,omitempty"` + Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` + BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` + Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` } // VirtualMachineListResult is the List Virtual Machine operation response. @@ -977,10 +1801,10 @@ type VirtualMachineScaleSet struct { Plan *Plan `json:"plan,omitempty"` *VirtualMachineScaleSetProperties `json:"properties,omitempty"` Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` + Zones *[]string `json:"zones,omitempty"` } -// VirtualMachineScaleSetDataDisk is describes a virtual machine scale set data -// disk. +// VirtualMachineScaleSetDataDisk is describes a virtual machine scale set data disk. type VirtualMachineScaleSetDataDisk struct { Name *string `json:"name,omitempty"` Lun *int32 `json:"lun,omitempty"` @@ -990,23 +1814,41 @@ type VirtualMachineScaleSetDataDisk struct { ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` } -// VirtualMachineScaleSetExtension is describes a Virtual Machine Scale Set -// Extension. +// VirtualMachineScaleSetExtension is describes a Virtual Machine Scale Set Extension. type VirtualMachineScaleSetExtension struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` *VirtualMachineScaleSetExtensionProperties `json:"properties,omitempty"` } -// VirtualMachineScaleSetExtensionProfile is describes a virtual machine scale -// set extension profile. +// VirtualMachineScaleSetExtensionListResult is the List VM scale set extension operation response. +type VirtualMachineScaleSetExtensionListResult struct { + autorest.Response `json:"-"` + Value *[]VirtualMachineScaleSetExtension `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client VirtualMachineScaleSetExtensionListResult) VirtualMachineScaleSetExtensionListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// VirtualMachineScaleSetExtensionProfile is describes a virtual machine scale set extension profile. type VirtualMachineScaleSetExtensionProfile struct { Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"` } -// VirtualMachineScaleSetExtensionProperties is describes the properties of a -// Virtual Machine Scale Set Extension. +// VirtualMachineScaleSetExtensionProperties is describes the properties of a Virtual Machine Scale Set Extension. type VirtualMachineScaleSetExtensionProperties struct { + ForceUpdateTag *string `json:"forceUpdateTag,omitempty"` Publisher *string `json:"publisher,omitempty"` Type *string `json:"type,omitempty"` TypeHandlerVersion *string `json:"typeHandlerVersion,omitempty"` @@ -1016,16 +1858,14 @@ type VirtualMachineScaleSetExtensionProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualMachineScaleSetIdentity is identity for the virtual machine scale -// set. +// VirtualMachineScaleSetIdentity is identity for the virtual machine scale set. type VirtualMachineScaleSetIdentity struct { PrincipalID *string `json:"principalId,omitempty"` TenantID *string `json:"tenantId,omitempty"` Type ResourceIdentityType `json:"type,omitempty"` } -// VirtualMachineScaleSetInstanceView is the instance view of a virtual machine -// scale set. +// VirtualMachineScaleSetInstanceView is the instance view of a virtual machine scale set. type VirtualMachineScaleSetInstanceView struct { autorest.Response `json:"-"` VirtualMachine *VirtualMachineScaleSetInstanceViewStatusesSummary `json:"virtualMachine,omitempty"` @@ -1033,31 +1873,32 @@ type VirtualMachineScaleSetInstanceView struct { Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` } -// VirtualMachineScaleSetInstanceViewStatusesSummary is instance view statuses -// summary for virtual machines of a virtual machine scale set. +// VirtualMachineScaleSetInstanceViewStatusesSummary is instance view statuses summary for virtual machines of a +// virtual machine scale set. type VirtualMachineScaleSetInstanceViewStatusesSummary struct { StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` } -// VirtualMachineScaleSetIPConfiguration is describes a virtual machine scale -// set network profile's IP configuration. +// VirtualMachineScaleSetIPConfiguration is describes a virtual machine scale set network profile's IP configuration. type VirtualMachineScaleSetIPConfiguration struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` *VirtualMachineScaleSetIPConfigurationProperties `json:"properties,omitempty"` } -// VirtualMachineScaleSetIPConfigurationProperties is describes a virtual -// machine scale set network profile's IP configuration properties. +// VirtualMachineScaleSetIPConfigurationProperties is describes a virtual machine scale set network profile's IP +// configuration properties. type VirtualMachineScaleSetIPConfigurationProperties struct { - Subnet *APIEntityReference `json:"subnet,omitempty"` - ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` - LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` - LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` + Subnet *APIEntityReference `json:"subnet,omitempty"` + Primary *bool `json:"primary,omitempty"` + PublicIPAddressConfiguration *VirtualMachineScaleSetPublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` + LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` + LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` } -// VirtualMachineScaleSetListResult is the List Virtual Machine operation -// response. +// VirtualMachineScaleSetListResult is the List Virtual Machine operation response. type VirtualMachineScaleSetListResult struct { autorest.Response `json:"-"` Value *[]VirtualMachineScaleSet `json:"value,omitempty"` @@ -1076,8 +1917,7 @@ func (client VirtualMachineScaleSetListResult) VirtualMachineScaleSetListResultP autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualMachineScaleSetListSkusResult is the Virtual Machine Scale Set List -// Skus operation response. +// VirtualMachineScaleSetListSkusResult is the Virtual Machine Scale Set List Skus operation response. type VirtualMachineScaleSetListSkusResult struct { autorest.Response `json:"-"` Value *[]VirtualMachineScaleSetSku `json:"value,omitempty"` @@ -1096,8 +1936,7 @@ func (client VirtualMachineScaleSetListSkusResult) VirtualMachineScaleSetListSku autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualMachineScaleSetListWithLinkResult is the List Virtual Machine -// operation response. +// VirtualMachineScaleSetListWithLinkResult is the List Virtual Machine operation response. type VirtualMachineScaleSetListWithLinkResult struct { autorest.Response `json:"-"` Value *[]VirtualMachineScaleSet `json:"value,omitempty"` @@ -1116,35 +1955,42 @@ func (client VirtualMachineScaleSetListWithLinkResult) VirtualMachineScaleSetLis autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualMachineScaleSetManagedDiskParameters is describes the parameters of a -// ScaleSet managed disk. +// VirtualMachineScaleSetManagedDiskParameters is describes the parameters of a ScaleSet managed disk. type VirtualMachineScaleSetManagedDiskParameters struct { StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"` } -// VirtualMachineScaleSetNetworkConfiguration is describes a virtual machine -// scale set network profile's network configurations. +// VirtualMachineScaleSetNetworkConfiguration is describes a virtual machine scale set network profile's network +// configurations. type VirtualMachineScaleSetNetworkConfiguration struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` *VirtualMachineScaleSetNetworkConfigurationProperties `json:"properties,omitempty"` } -// VirtualMachineScaleSetNetworkConfigurationProperties is describes a virtual -// machine scale set network profile's IP configuration. -type VirtualMachineScaleSetNetworkConfigurationProperties struct { - Primary *bool `json:"primary,omitempty"` - IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"` +// VirtualMachineScaleSetNetworkConfigurationDNSSettings is describes a virtual machines scale sets network +// configuration's DNS settings. +type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct { + DNSServers *[]string `json:"dnsServers,omitempty"` } -// VirtualMachineScaleSetNetworkProfile is describes a virtual machine scale -// set network profile. +// VirtualMachineScaleSetNetworkConfigurationProperties is describes a virtual machine scale set network profile's IP +// configuration. +type VirtualMachineScaleSetNetworkConfigurationProperties struct { + Primary *bool `json:"primary,omitempty"` + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` + IPConfigurations *[]VirtualMachineScaleSetIPConfiguration `json:"ipConfigurations,omitempty"` +} + +// VirtualMachineScaleSetNetworkProfile is describes a virtual machine scale set network profile. type VirtualMachineScaleSetNetworkProfile struct { + HealthProbe *APIEntityReference `json:"healthProbe,omitempty"` NetworkInterfaceConfigurations *[]VirtualMachineScaleSetNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` } -// VirtualMachineScaleSetOSDisk is describes a virtual machine scale set -// operating system disk. +// VirtualMachineScaleSetOSDisk is describes a virtual machine scale set operating system disk. type VirtualMachineScaleSetOSDisk struct { Name *string `json:"name,omitempty"` Caching CachingTypes `json:"caching,omitempty"` @@ -1155,8 +2001,7 @@ type VirtualMachineScaleSetOSDisk struct { ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` } -// VirtualMachineScaleSetOSProfile is describes a virtual machine scale set OS -// profile. +// VirtualMachineScaleSetOSProfile is describes a virtual machine scale set OS profile. type VirtualMachineScaleSetOSProfile struct { ComputerNamePrefix *string `json:"computerNamePrefix,omitempty"` AdminUsername *string `json:"adminUsername,omitempty"` @@ -1167,18 +2012,37 @@ type VirtualMachineScaleSetOSProfile struct { Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` } -// VirtualMachineScaleSetProperties is describes the properties of a Virtual -// Machine Scale Set. +// VirtualMachineScaleSetProperties is describes the properties of a Virtual Machine Scale Set. type VirtualMachineScaleSetProperties struct { UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` VirtualMachineProfile *VirtualMachineScaleSetVMProfile `json:"virtualMachineProfile,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` Overprovision *bool `json:"overprovision,omitempty"` + UniqueID *string `json:"uniqueId,omitempty"` SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` } -// VirtualMachineScaleSetSku is describes an available virtual machine scale -// set sku. +// VirtualMachineScaleSetPublicIPAddressConfiguration is describes a virtual machines scale set IP Configuration's +// PublicIPAddress configuration +type VirtualMachineScaleSetPublicIPAddressConfiguration struct { + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetPublicIPAddressConfigurationProperties `json:"properties,omitempty"` +} + +// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings is describes a virtual machines scale sets network +// configuration's DNS settings. +type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct { + DomainNameLabel *string `json:"domainNameLabel,omitempty"` +} + +// VirtualMachineScaleSetPublicIPAddressConfigurationProperties is describes a virtual machines scale set IP +// Configuration's PublicIPAddress configuration +type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct { + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` +} + +// VirtualMachineScaleSetSku is describes an available virtual machine scale set sku. type VirtualMachineScaleSetSku struct { ResourceType *string `json:"resourceType,omitempty"` Sku *Sku `json:"sku,omitempty"` @@ -1193,16 +2057,122 @@ type VirtualMachineScaleSetSkuCapacity struct { ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"` } -// VirtualMachineScaleSetStorageProfile is describes a virtual machine scale -// set storage profile. +// VirtualMachineScaleSetStorageProfile is describes a virtual machine scale set storage profile. type VirtualMachineScaleSetStorageProfile struct { ImageReference *ImageReference `json:"imageReference,omitempty"` OsDisk *VirtualMachineScaleSetOSDisk `json:"osDisk,omitempty"` DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` } -// VirtualMachineScaleSetVM is describes a virtual machine scale set virtual -// machine. +// VirtualMachineScaleSetUpdate is describes a Virtual Machine Scale Set. +type VirtualMachineScaleSetUpdate struct { + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + Plan *Plan `json:"plan,omitempty"` + *VirtualMachineScaleSetUpdateProperties `json:"properties,omitempty"` + Identity *VirtualMachineScaleSetIdentity `json:"identity,omitempty"` +} + +// VirtualMachineScaleSetUpdateIPConfiguration is describes a virtual machine scale set network profile's IP +// configuration. +type VirtualMachineScaleSetUpdateIPConfiguration struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetUpdateIPConfigurationProperties `json:"properties,omitempty"` +} + +// VirtualMachineScaleSetUpdateIPConfigurationProperties is describes a virtual machine scale set network profile's IP +// configuration properties. +type VirtualMachineScaleSetUpdateIPConfigurationProperties struct { + Subnet *APIEntityReference `json:"subnet,omitempty"` + Primary *bool `json:"primary,omitempty"` + PublicIPAddressConfiguration *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration `json:"publicIPAddressConfiguration,omitempty"` + PrivateIPAddressVersion IPVersion `json:"privateIPAddressVersion,omitempty"` + ApplicationGatewayBackendAddressPools *[]SubResource `json:"applicationGatewayBackendAddressPools,omitempty"` + LoadBalancerBackendAddressPools *[]SubResource `json:"loadBalancerBackendAddressPools,omitempty"` + LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"` +} + +// VirtualMachineScaleSetUpdateNetworkConfiguration is describes a virtual machine scale set network profile's network +// configurations. +type VirtualMachineScaleSetUpdateNetworkConfiguration struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetUpdateNetworkConfigurationProperties `json:"properties,omitempty"` +} + +// VirtualMachineScaleSetUpdateNetworkConfigurationProperties is describes a virtual machine scale set updatable +// network profile's IP configuration.Use this object for updating network profile's IP Configuration. +type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct { + Primary *bool `json:"primary,omitempty"` + EnableAcceleratedNetworking *bool `json:"enableAcceleratedNetworking,omitempty"` + NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` + DNSSettings *VirtualMachineScaleSetNetworkConfigurationDNSSettings `json:"dnsSettings,omitempty"` + IPConfigurations *[]VirtualMachineScaleSetUpdateIPConfiguration `json:"ipConfigurations,omitempty"` +} + +// VirtualMachineScaleSetUpdateNetworkProfile is describes a virtual machine scale set network profile. +type VirtualMachineScaleSetUpdateNetworkProfile struct { + NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"` +} + +// VirtualMachineScaleSetUpdateOSDisk is describes virtual machine scale set operating system disk Update Object. This +// should be used for Updating VMSS OS Disk. +type VirtualMachineScaleSetUpdateOSDisk struct { + Caching CachingTypes `json:"caching,omitempty"` + Image *VirtualHardDisk `json:"image,omitempty"` + VhdContainers *[]string `json:"vhdContainers,omitempty"` + ManagedDisk *VirtualMachineScaleSetManagedDiskParameters `json:"managedDisk,omitempty"` +} + +// VirtualMachineScaleSetUpdateOSProfile is describes a virtual machine scale set OS profile. +type VirtualMachineScaleSetUpdateOSProfile struct { + CustomData *string `json:"customData,omitempty"` + WindowsConfiguration *WindowsConfiguration `json:"windowsConfiguration,omitempty"` + LinuxConfiguration *LinuxConfiguration `json:"linuxConfiguration,omitempty"` + Secrets *[]VaultSecretGroup `json:"secrets,omitempty"` +} + +// VirtualMachineScaleSetUpdateProperties is describes the properties of a Virtual Machine Scale Set. +type VirtualMachineScaleSetUpdateProperties struct { + UpgradePolicy *UpgradePolicy `json:"upgradePolicy,omitempty"` + VirtualMachineProfile *VirtualMachineScaleSetUpdateVMProfile `json:"virtualMachineProfile,omitempty"` + Overprovision *bool `json:"overprovision,omitempty"` + SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"` +} + +// VirtualMachineScaleSetUpdatePublicIPAddressConfiguration is describes a virtual machines scale set IP +// Configuration's PublicIPAddress configuration +type VirtualMachineScaleSetUpdatePublicIPAddressConfiguration struct { + Name *string `json:"name,omitempty"` + *VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties `json:"properties,omitempty"` +} + +// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties is describes a virtual machines scale set IP +// Configuration's PublicIPAddress configuration +type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct { + IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` + DNSSettings *VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings `json:"dnsSettings,omitempty"` +} + +// VirtualMachineScaleSetUpdateStorageProfile is describes a virtual machine scale set storage profile. +type VirtualMachineScaleSetUpdateStorageProfile struct { + ImageReference *ImageReference `json:"imageReference,omitempty"` + OsDisk *VirtualMachineScaleSetUpdateOSDisk `json:"osDisk,omitempty"` + DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"` +} + +// VirtualMachineScaleSetUpdateVMProfile is describes a virtual machine scale set virtual machine profile. +type VirtualMachineScaleSetUpdateVMProfile struct { + OsProfile *VirtualMachineScaleSetUpdateOSProfile `json:"osProfile,omitempty"` + StorageProfile *VirtualMachineScaleSetUpdateStorageProfile `json:"storageProfile,omitempty"` + NetworkProfile *VirtualMachineScaleSetUpdateNetworkProfile `json:"networkProfile,omitempty"` + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` + LicenseType *string `json:"licenseType,omitempty"` +} + +// VirtualMachineScaleSetVM is describes a virtual machine scale set virtual machine. type VirtualMachineScaleSetVM struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1217,27 +2187,24 @@ type VirtualMachineScaleSetVM struct { Resources *[]VirtualMachineExtension `json:"resources,omitempty"` } -// VirtualMachineScaleSetVMExtensionsSummary is extensions summary for virtual -// machines of a virtual machine scale set. +// VirtualMachineScaleSetVMExtensionsSummary is extensions summary for virtual machines of a virtual machine scale set. type VirtualMachineScaleSetVMExtensionsSummary struct { Name *string `json:"name,omitempty"` StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"` } -// VirtualMachineScaleSetVMInstanceIDs is specifies a list of virtual machine -// instance IDs from the VM scale set. +// VirtualMachineScaleSetVMInstanceIDs is specifies a list of virtual machine instance IDs from the VM scale set. type VirtualMachineScaleSetVMInstanceIDs struct { InstanceIds *[]string `json:"instanceIds,omitempty"` } -// VirtualMachineScaleSetVMInstanceRequiredIDs is specifies a list of virtual -// machine instance IDs from the VM scale set. +// VirtualMachineScaleSetVMInstanceRequiredIDs is specifies a list of virtual machine instance IDs from the VM scale +// set. type VirtualMachineScaleSetVMInstanceRequiredIDs struct { InstanceIds *[]string `json:"instanceIds,omitempty"` } -// VirtualMachineScaleSetVMInstanceView is the instance view of a virtual -// machine scale set VM. +// VirtualMachineScaleSetVMInstanceView is the instance view of a virtual machine scale set VM. type VirtualMachineScaleSetVMInstanceView struct { autorest.Response `json:"-"` PlatformUpdateDomain *int32 `json:"platformUpdateDomain,omitempty"` @@ -1246,13 +2213,13 @@ type VirtualMachineScaleSetVMInstanceView struct { VMAgent *VirtualMachineAgentInstanceView `json:"vmAgent,omitempty"` Disks *[]DiskInstanceView `json:"disks,omitempty"` Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"` + VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"` BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"` Statuses *[]InstanceViewStatus `json:"statuses,omitempty"` PlacementGroupID *string `json:"placementGroupId,omitempty"` } -// VirtualMachineScaleSetVMListResult is the List Virtual Machine Scale Set VMs -// operation response. +// VirtualMachineScaleSetVMListResult is the List Virtual Machine Scale Set VMs operation response. type VirtualMachineScaleSetVMListResult struct { autorest.Response `json:"-"` Value *[]VirtualMachineScaleSetVM `json:"value,omitempty"` @@ -1271,17 +2238,17 @@ func (client VirtualMachineScaleSetVMListResult) VirtualMachineScaleSetVMListRes autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualMachineScaleSetVMProfile is describes a virtual machine scale set -// virtual machine profile. +// VirtualMachineScaleSetVMProfile is describes a virtual machine scale set virtual machine profile. type VirtualMachineScaleSetVMProfile struct { - OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"` - StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"` - NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"` - ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` + OsProfile *VirtualMachineScaleSetOSProfile `json:"osProfile,omitempty"` + StorageProfile *VirtualMachineScaleSetStorageProfile `json:"storageProfile,omitempty"` + NetworkProfile *VirtualMachineScaleSetNetworkProfile `json:"networkProfile,omitempty"` + DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"` + ExtensionProfile *VirtualMachineScaleSetExtensionProfile `json:"extensionProfile,omitempty"` + LicenseType *string `json:"licenseType,omitempty"` } -// VirtualMachineScaleSetVMProperties is describes the properties of a virtual -// machine scale set virtual machine. +// VirtualMachineScaleSetVMProperties is describes the properties of a virtual machine scale set virtual machine. type VirtualMachineScaleSetVMProperties struct { LatestModelApplied *bool `json:"latestModelApplied,omitempty"` VMID *string `json:"vmId,omitempty"` @@ -1312,14 +2279,14 @@ type VirtualMachineSizeListResult struct { Value *[]VirtualMachineSize `json:"value,omitempty"` } -// VirtualMachineStatusCodeCount is the status code and count of the virtual -// machine scale set instance view status summary. +// VirtualMachineStatusCodeCount is the status code and count of the virtual machine scale set instance view status +// summary. type VirtualMachineStatusCodeCount struct { Code *string `json:"code,omitempty"` Count *int32 `json:"count,omitempty"` } -// WindowsConfiguration is describes Windows Configuration of the OS Profile. +// WindowsConfiguration is specifies Windows operating system settings on the virtual machine. type WindowsConfiguration struct { ProvisionVMAgent *bool `json:"provisionVMAgent,omitempty"` EnableAutomaticUpdates *bool `json:"enableAutomaticUpdates,omitempty"` @@ -1328,14 +2295,12 @@ type WindowsConfiguration struct { WinRM *WinRMConfiguration `json:"winRM,omitempty"` } -// WinRMConfiguration is describes Windows Remote Management configuration of -// the VM +// WinRMConfiguration is describes Windows Remote Management configuration of the VM type WinRMConfiguration struct { Listeners *[]WinRMListener `json:"listeners,omitempty"` } -// WinRMListener is describes Protocol and thumbprint of Windows Remote -// Management listener +// WinRMListener is describes Protocol and thumbprint of Windows Remote Management listener type WinRMListener struct { Protocol ProtocolTypes `json:"protocol,omitempty"` CertificateURL *string `json:"certificateUrl,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/resourceskus.go new file mode 100644 index 000000000..9dd7fffa8 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/resourceskus.go @@ -0,0 +1,169 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ResourceSkusClient is the compute Client +type ResourceSkusClient struct { + ManagementClient +} + +// NewResourceSkusClient creates an instance of the ResourceSkusClient client. +func NewResourceSkusClient(subscriptionID string) ResourceSkusClient { + return NewResourceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewResourceSkusClientWithBaseURI creates an instance of the ResourceSkusClient client. +func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) ResourceSkusClient { + return ResourceSkusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets the list of Microsoft.Compute SKUs available for your Subscription. +func (client ResourceSkusClient) List() (result ResourceSkusResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ResourceSkusClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ResourceSkusClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ResourceSkusClient) ListResponder(resp *http.Response) (result ResourceSkusResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client ResourceSkusClient) ListNextResults(lastResults ResourceSkusResult) (result ResourceSkusResult, err error) { + req, err := lastResults.ResourceSkusResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client ResourceSkusClient) ListComplete(cancel <-chan struct{}) (<-chan ResourceSku, <-chan error) { + resultChan := make(chan ResourceSku) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/snapshots.go new file mode 100644 index 000000000..2c7135292 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/snapshots.go @@ -0,0 +1,819 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// SnapshotsClient is the compute Client +type SnapshotsClient struct { + ManagementClient +} + +// NewSnapshotsClient creates an instance of the SnapshotsClient client. +func NewSnapshotsClient(subscriptionID string) SnapshotsClient { + return NewSnapshotsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSnapshotsClientWithBaseURI creates an instance of the SnapshotsClient client. +func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) SnapshotsClient { + return SnapshotsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a snapshot. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. snapshotName is the name of the snapshot within the given +// subscription and resource group. snapshot is snapshot object supplied in the body of the Put disk operation. +func (client SnapshotsClient) CreateOrUpdate(resourceGroupName string, snapshotName string, snapshot Snapshot, cancel <-chan struct{}) (<-chan Snapshot, <-chan error) { + resultChan := make(chan Snapshot, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: snapshot, + Constraints: []validation.Constraint{{Target: "snapshot.DiskProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.CreationData", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.CreationData.ImageReference", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.CreationData.ImageReference.ID", Name: validation.Null, Rule: true, Chain: nil}}}, + }}, + {Target: "snapshot.DiskProperties.EncryptionSettings", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "snapshot.DiskProperties.EncryptionSettings.DiskEncryptionKey.SecretURL", Name: validation.Null, Rule: true, Chain: nil}, + }}, + {Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey.SourceVault", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "snapshot.DiskProperties.EncryptionSettings.KeyEncryptionKey.KeyURL", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "compute.SnapshotsClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result Snapshot + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, snapshotName, snapshot, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SnapshotsClient) CreateOrUpdatePreparer(resourceGroupName string, snapshotName string, snapshot Snapshot, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters), + autorest.WithJSON(snapshot), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a snapshot. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. snapshotName is the name of the snapshot within the given +// subscription and resource group. +func (client SnapshotsClient) Delete(resourceGroupName string, snapshotName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, snapshotName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client SnapshotsClient) DeletePreparer(resourceGroupName string, snapshotName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets information about a snapshot. +// +// resourceGroupName is the name of the resource group. snapshotName is the name of the snapshot within the given +// subscription and resource group. +func (client SnapshotsClient) Get(resourceGroupName string, snapshotName string) (result Snapshot, err error) { + req, err := client.GetPreparer(resourceGroupName, snapshotName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SnapshotsClient) GetPreparer(resourceGroupName string, snapshotName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GrantAccess grants access to a snapshot. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. snapshotName is the name of the snapshot within the given +// subscription and resource group. grantAccessData is access data object supplied in the body of the get snapshot +// access operation. +func (client SnapshotsClient) GrantAccess(resourceGroupName string, snapshotName string, grantAccessData GrantAccessData, cancel <-chan struct{}) (<-chan AccessURI, <-chan error) { + resultChan := make(chan AccessURI, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: grantAccessData, + Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "compute.SnapshotsClient", "GrantAccess") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result AccessURI + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.GrantAccessPreparer(resourceGroupName, snapshotName, grantAccessData, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", nil, "Failure preparing request") + return + } + + resp, err := client.GrantAccessSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", resp, "Failure sending request") + return + } + + result, err = client.GrantAccessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "GrantAccess", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// GrantAccessPreparer prepares the GrantAccess request. +func (client SnapshotsClient) GrantAccessPreparer(resourceGroupName string, snapshotName string, grantAccessData GrantAccessData, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess", pathParameters), + autorest.WithJSON(grantAccessData), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// GrantAccessSender sends the GrantAccess request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) GrantAccessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// GrantAccessResponder handles the response to the GrantAccess request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) GrantAccessResponder(resp *http.Response) (result AccessURI, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists snapshots under a subscription. +func (client SnapshotsClient) List() (result SnapshotList, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client SnapshotsClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) ListResponder(resp *http.Response) (result SnapshotList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client SnapshotsClient) ListNextResults(lastResults SnapshotList) (result SnapshotList, err error) { + req, err := lastResults.SnapshotListPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client SnapshotsClient) ListComplete(cancel <-chan struct{}) (<-chan Snapshot, <-chan error) { + resultChan := make(chan Snapshot) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup lists snapshots under a resource group. +// +// resourceGroupName is the name of the resource group. +func (client SnapshotsClient) ListByResourceGroup(resourceGroupName string) (result SnapshotList, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SnapshotsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) ListByResourceGroupResponder(resp *http.Response) (result SnapshotList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client SnapshotsClient) ListByResourceGroupNextResults(lastResults SnapshotList) (result SnapshotList, err error) { + req, err := lastResults.SnapshotListPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure sending next results request") + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "ListByResourceGroup", resp, "Failure responding to next results request") + } + + return +} + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client SnapshotsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Snapshot, <-chan error) { + resultChan := make(chan Snapshot) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// RevokeAccess revokes access to a snapshot. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. snapshotName is the name of the snapshot within the given +// subscription and resource group. +func (client SnapshotsClient) RevokeAccess(resourceGroupName string, snapshotName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.RevokeAccessPreparer(resourceGroupName, snapshotName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure preparing request") + return + } + + resp, err := client.RevokeAccessSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", resp, "Failure sending request") + return + } + + result, err = client.RevokeAccessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// RevokeAccessPreparer prepares the RevokeAccess request. +func (client SnapshotsClient) RevokeAccessPreparer(resourceGroupName string, snapshotName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// RevokeAccessSender sends the RevokeAccess request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// RevokeAccessResponder handles the response to the RevokeAccess request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates (patches) a snapshot. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. snapshotName is the name of the snapshot within the given +// subscription and resource group. snapshot is snapshot object supplied in the body of the Patch snapshot operation. +func (client SnapshotsClient) Update(resourceGroupName string, snapshotName string, snapshot SnapshotUpdate, cancel <-chan struct{}) (<-chan Snapshot, <-chan error) { + resultChan := make(chan Snapshot, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result Snapshot + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, snapshotName, snapshot, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client SnapshotsClient) UpdatePreparer(resourceGroupName string, snapshotName string, snapshot SnapshotUpdate, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "snapshotName": autorest.Encode("path", snapshotName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}", pathParameters), + autorest.WithJSON(snapshot), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client SnapshotsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SnapshotsClient) UpdateResponder(resp *http.Response) (result Snapshot, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usage.go index 97c53e0ef..86e9ebabf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/usage.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// UsageClient is the the Compute Management Client. +// UsageClient is the compute Client type UsageClient struct { ManagementClient } @@ -40,9 +39,8 @@ func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClien return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List gets, for the specified location, the current compute resource usage -// information as well as the limits for compute resources under the -// subscription. +// List gets, for the specified location, the current compute resource usage information as well as the limits for +// compute resources under the subscription. // // location is the location for which resource usage is queried. func (client UsageClient) List(location string) (result ListUsagesResult, err error) { @@ -80,7 +78,7 @@ func (client UsageClient) ListPreparer(location string) (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -135,3 +133,48 @@ func (client UsageClient) ListNextResults(lastResults ListUsagesResult) (result return } + +// ListComplete gets all elements from the list without paging. +func (client UsageClient) ListComplete(location string, cancel <-chan struct{}) (<-chan Usage, <-chan error) { + resultChan := make(chan Usage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(location) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go index b9d4e2699..2f9cac6f3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/version.go @@ -14,15 +14,15 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-compute/" + return "Azure-SDK-For-Go/v11.0.0-beta arm-compute/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensionimages.go index fcd122704..c486f63ce 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensionimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensionimages.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,25 +23,25 @@ import ( "net/http" ) -// VirtualMachineExtensionImagesClient is the the Compute Management Client. +// VirtualMachineExtensionImagesClient is the compute Client type VirtualMachineExtensionImagesClient struct { ManagementClient } -// NewVirtualMachineExtensionImagesClient creates an instance of the -// VirtualMachineExtensionImagesClient client. +// NewVirtualMachineExtensionImagesClient creates an instance of the VirtualMachineExtensionImagesClient client. func NewVirtualMachineExtensionImagesClient(subscriptionID string) VirtualMachineExtensionImagesClient { return NewVirtualMachineExtensionImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the -// VirtualMachineExtensionImagesClient client. +// NewVirtualMachineExtensionImagesClientWithBaseURI creates an instance of the VirtualMachineExtensionImagesClient +// client. func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionImagesClient { return VirtualMachineExtensionImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a virtual machine extension image. // +// location is the name of a supported Azure region. func (client VirtualMachineExtensionImagesClient) Get(location string, publisherName string, typeParameter string, version string) (result VirtualMachineExtensionImage, err error) { req, err := client.GetPreparer(location, publisherName, typeParameter, version) if err != nil { @@ -75,7 +74,7 @@ func (client VirtualMachineExtensionImagesClient) GetPreparer(location string, p "version": autorest.Encode("path", version), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -109,6 +108,7 @@ func (client VirtualMachineExtensionImagesClient) GetResponder(resp *http.Respon // ListTypes gets a list of virtual machine extension image types. // +// location is the name of a supported Azure region. func (client VirtualMachineExtensionImagesClient) ListTypes(location string, publisherName string) (result ListVirtualMachineExtensionImage, err error) { req, err := client.ListTypesPreparer(location, publisherName) if err != nil { @@ -139,7 +139,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesPreparer(location str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -173,7 +173,7 @@ func (client VirtualMachineExtensionImagesClient) ListTypesResponder(resp *http. // ListVersions gets a list of virtual machine extension image versions. // -// filter is the filter to apply on the operation. +// location is the name of a supported Azure region. filter is the filter to apply on the operation. func (client VirtualMachineExtensionImagesClient) ListVersions(location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (result ListVirtualMachineExtensionImage, err error) { req, err := client.ListVersionsPreparer(location, publisherName, typeParameter, filter, top, orderby) if err != nil { @@ -205,7 +205,7 @@ func (client VirtualMachineExtensionImagesClient) ListVersionsPreparer(location "type": autorest.Encode("path", typeParameter), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go index 7a876cfef..e8f0b27f1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineextensions.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,33 +23,28 @@ import ( "net/http" ) -// VirtualMachineExtensionsClient is the the Compute Management Client. +// VirtualMachineExtensionsClient is the compute Client type VirtualMachineExtensionsClient struct { ManagementClient } -// NewVirtualMachineExtensionsClient creates an instance of the -// VirtualMachineExtensionsClient client. +// NewVirtualMachineExtensionsClient creates an instance of the VirtualMachineExtensionsClient client. func NewVirtualMachineExtensionsClient(subscriptionID string) VirtualMachineExtensionsClient { return NewVirtualMachineExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the -// VirtualMachineExtensionsClient client. +// NewVirtualMachineExtensionsClientWithBaseURI creates an instance of the VirtualMachineExtensionsClient client. func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineExtensionsClient { return VirtualMachineExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the operation to create or update the extension. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate the operation to create or update the extension. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine where the extension should be create or updated. -// VMExtensionName is the name of the virtual machine extension. -// extensionParameters is parameters supplied to the Create Virtual Machine -// Extension operation. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine where the extension +// should be create or updated. VMExtensionName is the name of the virtual machine extension. extensionParameters is +// parameters supplied to the Create Virtual Machine Extension operation. func (client VirtualMachineExtensionsClient) CreateOrUpdate(resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension, cancel <-chan struct{}) (<-chan VirtualMachineExtension, <-chan error) { resultChan := make(chan VirtualMachineExtension, 1) errChan := make(chan error, 1) @@ -58,8 +52,10 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdate(resourceGroupName st var err error var result VirtualMachineExtension defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -93,7 +89,7 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdatePreparer(resourceGrou "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -129,14 +125,11 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http. return } -// Delete the operation to delete the extension. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete the operation to delete the extension. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine where the extension should be deleted. VMExtensionName -// is the name of the virtual machine extension. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine where the extension +// should be deleted. VMExtensionName is the name of the virtual machine extension. func (client VirtualMachineExtensionsClient) Delete(resourceGroupName string, VMName string, VMExtensionName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -144,8 +137,10 @@ func (client VirtualMachineExtensionsClient) Delete(resourceGroupName string, VM var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -179,7 +174,7 @@ func (client VirtualMachineExtensionsClient) DeletePreparer(resourceGroupName st "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -215,9 +210,8 @@ func (client VirtualMachineExtensionsClient) DeleteResponder(resp *http.Response // Get the operation to get the extension. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine containing the extension. VMExtensionName is the name of -// the virtual machine extension. expand is the expand expression to apply on +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine containing the +// extension. VMExtensionName is the name of the virtual machine extension. expand is the expand expression to apply on // the operation. func (client VirtualMachineExtensionsClient) Get(resourceGroupName string, VMName string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) { req, err := client.GetPreparer(resourceGroupName, VMName, VMExtensionName, expand) @@ -250,7 +244,7 @@ func (client VirtualMachineExtensionsClient) GetPreparer(resourceGroupName strin "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go index 6c090568f..9eda416e9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineimages.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,28 +23,25 @@ import ( "net/http" ) -// VirtualMachineImagesClient is the the Compute Management Client. +// VirtualMachineImagesClient is the compute Client type VirtualMachineImagesClient struct { ManagementClient } -// NewVirtualMachineImagesClient creates an instance of the -// VirtualMachineImagesClient client. +// NewVirtualMachineImagesClient creates an instance of the VirtualMachineImagesClient client. func NewVirtualMachineImagesClient(subscriptionID string) VirtualMachineImagesClient { return NewVirtualMachineImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineImagesClientWithBaseURI creates an instance of the -// VirtualMachineImagesClient client. +// NewVirtualMachineImagesClientWithBaseURI creates an instance of the VirtualMachineImagesClient client. func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineImagesClient { return VirtualMachineImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a virtual machine image. // -// location is the name of a supported Azure region. publisherName is a valid -// image publisher. offer is a valid image publisher offer. skus is a valid -// image SKU. version is a valid image SKU version. +// location is the name of a supported Azure region. publisherName is a valid image publisher. offer is a valid image +// publisher offer. skus is a valid image SKU. version is a valid image SKU version. func (client VirtualMachineImagesClient) Get(location string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) { req, err := client.GetPreparer(location, publisherName, offer, skus, version) if err != nil { @@ -79,7 +75,7 @@ func (client VirtualMachineImagesClient) GetPreparer(location string, publisherN "version": autorest.Encode("path", version), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -111,12 +107,10 @@ func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (resu return } -// List gets a list of all virtual machine image versions for the specified -// location, publisher, offer, and SKU. +// List gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. // -// location is the name of a supported Azure region. publisherName is a valid -// image publisher. offer is a valid image publisher offer. skus is a valid -// image SKU. filter is the filter to apply on the operation. +// location is the name of a supported Azure region. publisherName is a valid image publisher. offer is a valid image +// publisher offer. skus is a valid image SKU. filter is the filter to apply on the operation. func (client VirtualMachineImagesClient) List(location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) { req, err := client.ListPreparer(location, publisherName, offer, skus, filter, top, orderby) if err != nil { @@ -149,7 +143,7 @@ func (client VirtualMachineImagesClient) ListPreparer(location string, publisher "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -190,11 +184,9 @@ func (client VirtualMachineImagesClient) ListResponder(resp *http.Response) (res return } -// ListOffers gets a list of virtual machine image offers for the specified -// location and publisher. +// ListOffers gets a list of virtual machine image offers for the specified location and publisher. // -// location is the name of a supported Azure region. publisherName is a valid -// image publisher. +// location is the name of a supported Azure region. publisherName is a valid image publisher. func (client VirtualMachineImagesClient) ListOffers(location string, publisherName string) (result ListVirtualMachineImageResource, err error) { req, err := client.ListOffersPreparer(location, publisherName) if err != nil { @@ -225,7 +217,7 @@ func (client VirtualMachineImagesClient) ListOffersPreparer(location string, pub "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,8 +249,7 @@ func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response return } -// ListPublishers gets a list of virtual machine image publishers for the -// specified Azure location. +// ListPublishers gets a list of virtual machine image publishers for the specified Azure location. // // location is the name of a supported Azure region. func (client VirtualMachineImagesClient) ListPublishers(location string) (result ListVirtualMachineImageResource, err error) { @@ -290,7 +281,7 @@ func (client VirtualMachineImagesClient) ListPublishersPreparer(location string) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -322,11 +313,10 @@ func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Resp return } -// ListSkus gets a list of virtual machine image SKUs for the specified -// location, publisher, and offer. +// ListSkus gets a list of virtual machine image SKUs for the specified location, publisher, and offer. // -// location is the name of a supported Azure region. publisherName is a valid -// image publisher. offer is a valid image publisher offer. +// location is the name of a supported Azure region. publisherName is a valid image publisher. offer is a valid image +// publisher offer. func (client VirtualMachineImagesClient) ListSkus(location string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) { req, err := client.ListSkusPreparer(location, publisherName, offer) if err != nil { @@ -358,7 +348,7 @@ func (client VirtualMachineImagesClient) ListSkusPreparer(location string, publi "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineruncommands.go new file mode 100644 index 000000000..f422c92f5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachineruncommands.go @@ -0,0 +1,250 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// VirtualMachineRunCommandsClient is the compute Client +type VirtualMachineRunCommandsClient struct { + ManagementClient +} + +// NewVirtualMachineRunCommandsClient creates an instance of the VirtualMachineRunCommandsClient client. +func NewVirtualMachineRunCommandsClient(subscriptionID string) VirtualMachineRunCommandsClient { + return NewVirtualMachineRunCommandsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineRunCommandsClientWithBaseURI creates an instance of the VirtualMachineRunCommandsClient client. +func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineRunCommandsClient { + return VirtualMachineRunCommandsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets specific run command for a subscription in a location. +// +// location is the location upon which run commands is queried. commandID is the command id. +func (client VirtualMachineRunCommandsClient) Get(location string, commandID string) (result RunCommandDocument, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "compute.VirtualMachineRunCommandsClient", "Get") + } + + req, err := client.GetPreparer(location, commandID) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineRunCommandsClient) GetPreparer(location string, commandID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "commandId": autorest.Encode("path", commandID), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands/{commandId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response) (result RunCommandDocument, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all available run commands for a subscription in a location. +// +// location is the location upon which run commands is queried. +func (client VirtualMachineRunCommandsClient) List(location string) (result RunCommandListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: location, + Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "compute.VirtualMachineRunCommandsClient", "List") + } + + req, err := client.ListPreparer(location) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineRunCommandsClient) ListPreparer(location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/runCommands", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineRunCommandsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response) (result RunCommandListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client VirtualMachineRunCommandsClient) ListNextResults(lastResults RunCommandListResult) (result RunCommandListResult, err error) { + req, err := lastResults.RunCommandListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client VirtualMachineRunCommandsClient) ListComplete(location string, cancel <-chan struct{}) (<-chan RunCommandDocumentBase, <-chan error) { + resultChan := make(chan RunCommandDocumentBase) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(location) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go index 686b7ace2..ad1d829d1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachines.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,27 @@ import ( "net/http" ) -// VirtualMachinesClient is the the Compute Management Client. +// VirtualMachinesClient is the compute Client type VirtualMachinesClient struct { ManagementClient } -// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient -// client. +// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient client. func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the -// VirtualMachinesClient client. +// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient { return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Capture captures the VM by copying virtual hard disks of the VM and outputs -// a template that can be used to create similar VMs. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Capture captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create +// similar VMs. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. +// The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. parameters is parameters supplied to the Capture -// Virtual Machine operation. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. parameters is +// parameters supplied to the Capture Virtual Machine operation. func (client VirtualMachinesClient) Capture(resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters, cancel <-chan struct{}) (<-chan VirtualMachineCaptureResult, <-chan error) { resultChan := make(chan VirtualMachineCaptureResult, 1) errChan := make(chan error, 1) @@ -69,8 +63,10 @@ func (client VirtualMachinesClient) Capture(resourceGroupName string, VMName str var err error var result VirtualMachineCaptureResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -103,7 +99,7 @@ func (client VirtualMachinesClient) CapturePreparer(resourceGroupName string, VM "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -139,14 +135,11 @@ func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (resul return } -// ConvertToManagedDisks converts virtual machine disks from blob-based to -// managed disks. Virtual machine must be stop-deallocated before invoking this -// operation. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// ConvertToManagedDisks converts virtual machine disks from blob-based to managed disks. Virtual machine must be +// stop-deallocated before invoking this operation. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) ConvertToManagedDisks(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -154,8 +147,10 @@ func (client VirtualMachinesClient) ConvertToManagedDisks(resourceGroupName stri var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -188,7 +183,7 @@ func (client VirtualMachinesClient) ConvertToManagedDisksPreparer(resourceGroupN "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -222,14 +217,12 @@ func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Re return } -// CreateOrUpdate the operation to create or update a virtual machine. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate the operation to create or update a virtual machine. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. parameters is parameters supplied to the Create Virtual -// Machine operation. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. parameters is +// parameters supplied to the Create Virtual Machine operation. func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, VMName string, parameters VirtualMachine, cancel <-chan struct{}) (<-chan VirtualMachine, <-chan error) { resultChan := make(chan VirtualMachine, 1) errChan := make(chan error, 1) @@ -261,8 +254,10 @@ func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, VMN var err error var result VirtualMachine defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -295,7 +290,7 @@ func (client VirtualMachinesClient) CreateOrUpdatePreparer(resourceGroupName str "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -331,14 +326,11 @@ func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) return } -// Deallocate shuts down the virtual machine and releases the compute -// resources. You are not billed for the compute resources that this virtual -// machine uses. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Deallocate shuts down the virtual machine and releases the compute resources. You are not billed for the compute +// resources that this virtual machine uses. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) Deallocate(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -346,8 +338,10 @@ func (client VirtualMachinesClient) Deallocate(resourceGroupName string, VMName var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -380,7 +374,7 @@ func (client VirtualMachinesClient) DeallocatePreparer(resourceGroupName string, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -414,13 +408,10 @@ func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (re return } -// Delete the operation to delete a virtual machine. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete the operation to delete a virtual machine. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) Delete(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -428,8 +419,10 @@ func (client VirtualMachinesClient) Delete(resourceGroupName string, VMName stri var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -462,7 +455,7 @@ func (client VirtualMachinesClient) DeletePreparer(resourceGroupName string, VMN "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -498,8 +491,7 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result // Generalize sets the state of the virtual machine to generalized. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) Generalize(resourceGroupName string, VMName string) (result OperationStatusResponse, err error) { req, err := client.GeneralizePreparer(resourceGroupName, VMName) if err != nil { @@ -530,7 +522,7 @@ func (client VirtualMachinesClient) GeneralizePreparer(resourceGroupName string, "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -562,12 +554,10 @@ func (client VirtualMachinesClient) GeneralizeResponder(resp *http.Response) (re return } -// Get retrieves information about the model view or the instance view of a -// virtual machine. +// Get retrieves information about the model view or the instance view of a virtual machine. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. expand is the expand expression to apply on the -// operation. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. expand is the expand +// expression to apply on the operation. func (client VirtualMachinesClient) Get(resourceGroupName string, VMName string, expand InstanceViewTypes) (result VirtualMachine, err error) { req, err := client.GetPreparer(resourceGroupName, VMName, expand) if err != nil { @@ -598,7 +588,7 @@ func (client VirtualMachinesClient) GetPreparer(resourceGroupName string, VMName "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -633,9 +623,73 @@ func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result Vi return } -// List lists all of the virtual machines in the specified resource group. Use -// the nextLink property in the response to get the next page of virtual -// machines. +// InstanceView retrieves information about the run-time state of a virtual machine. +// +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. +func (client VirtualMachinesClient) InstanceView(resourceGroupName string, VMName string) (result VirtualMachineInstanceView, err error) { + req, err := client.InstanceViewPreparer(resourceGroupName, VMName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", nil, "Failure preparing request") + return + } + + resp, err := client.InstanceViewSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure sending request") + return + } + + result, err = client.InstanceViewResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", resp, "Failure responding to request") + } + + return +} + +// InstanceViewPreparer prepares the InstanceView request. +func (client VirtualMachinesClient) InstanceViewPreparer(resourceGroupName string, VMName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// InstanceViewSender sends the InstanceView request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) InstanceViewSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// InstanceViewResponder handles the response to the InstanceView request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) InstanceViewResponder(resp *http.Response) (result VirtualMachineInstanceView, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to +// get the next page of virtual machines. // // resourceGroupName is the name of the resource group. func (client VirtualMachinesClient) List(resourceGroupName string) (result VirtualMachineListResult, err error) { @@ -667,7 +721,7 @@ func (client VirtualMachinesClient) ListPreparer(resourceGroupName string) (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -723,9 +777,53 @@ func (client VirtualMachinesClient) ListNextResults(lastResults VirtualMachineLi return } -// ListAll lists all of the virtual machines in the specified subscription. Use -// the nextLink property in the response to get the next page of virtual -// machines. +// ListComplete gets all elements from the list without paging. +func (client VirtualMachinesClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan VirtualMachine, <-chan error) { + resultChan := make(chan VirtualMachine) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAll lists all of the virtual machines in the specified subscription. Use the nextLink property in the response +// to get the next page of virtual machines. func (client VirtualMachinesClient) ListAll() (result VirtualMachineListResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -754,7 +852,7 @@ func (client VirtualMachinesClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -810,11 +908,54 @@ func (client VirtualMachinesClient) ListAllNextResults(lastResults VirtualMachin return } -// ListAvailableSizes lists all available virtual machine sizes to which the -// specified virtual machine can be resized. +// ListAllComplete gets all elements from the list without paging. +func (client VirtualMachinesClient) ListAllComplete(cancel <-chan struct{}) (<-chan VirtualMachine, <-chan error) { + resultChan := make(chan VirtualMachine) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAvailableSizes lists all available virtual machine sizes to which the specified virtual machine can be resized. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) ListAvailableSizes(resourceGroupName string, VMName string) (result VirtualMachineSizeListResult, err error) { req, err := client.ListAvailableSizesPreparer(resourceGroupName, VMName) if err != nil { @@ -845,7 +986,7 @@ func (client VirtualMachinesClient) ListAvailableSizesPreparer(resourceGroupName "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -877,14 +1018,94 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo return } -// PowerOff the operation to power off (stop) a virtual machine. The virtual -// machine can be restarted with the same provisioned resources. You are still -// charged for this virtual machine. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// PerformMaintenance the operation to perform maintenance on a virtual machine. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. +func (client VirtualMachinesClient) PerformMaintenance(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.PerformMaintenancePreparer(resourceGroupName, VMName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure preparing request") + return + } + + resp, err := client.PerformMaintenanceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", resp, "Failure sending request") + return + } + + result, err = client.PerformMaintenanceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// PerformMaintenancePreparer prepares the PerformMaintenance request. +func (client VirtualMachinesClient) PerformMaintenancePreparer(resourceGroupName string, VMName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// PerformMaintenanceSender sends the PerformMaintenance request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// PerformMaintenanceResponder handles the response to the PerformMaintenance request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) PerformMaintenanceResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// PowerOff the operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same +// provisioned resources. You are still charged for this virtual machine. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) PowerOff(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -892,8 +1113,10 @@ func (client VirtualMachinesClient) PowerOff(resourceGroupName string, VMName st var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -926,7 +1149,7 @@ func (client VirtualMachinesClient) PowerOffPreparer(resourceGroupName string, V "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -960,13 +1183,11 @@ func (client VirtualMachinesClient) PowerOffResponder(resp *http.Response) (resu return } -// Redeploy the operation to redeploy a virtual machine. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Redeploy the operation to redeploy a virtual machine. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) Redeploy(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -974,8 +1195,10 @@ func (client VirtualMachinesClient) Redeploy(resourceGroupName string, VMName st var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1008,7 +1231,7 @@ func (client VirtualMachinesClient) RedeployPreparer(resourceGroupName string, V "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1042,13 +1265,10 @@ func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (resu return } -// Restart the operation to restart a virtual machine. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Restart the operation to restart a virtual machine. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) Restart(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -1056,8 +1276,10 @@ func (client VirtualMachinesClient) Restart(resourceGroupName string, VMName str var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1090,7 +1312,7 @@ func (client VirtualMachinesClient) RestartPreparer(resourceGroupName string, VM "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1124,13 +1346,103 @@ func (client VirtualMachinesClient) RestartResponder(resp *http.Response) (resul return } -// Start the operation to start a virtual machine. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// RunCommand run command on the VM. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMName is the name of -// the virtual machine. +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. parameters is +// parameters supplied to the Run command operation. +func (client VirtualMachinesClient) RunCommand(resourceGroupName string, VMName string, parameters RunCommandInput, cancel <-chan struct{}) (<-chan RunCommandResult, <-chan error) { + resultChan := make(chan RunCommandResult, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "compute.VirtualMachinesClient", "RunCommand") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result RunCommandResult + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.RunCommandPreparer(resourceGroupName, VMName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", nil, "Failure preparing request") + return + } + + resp, err := client.RunCommandSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", resp, "Failure sending request") + return + } + + result, err = client.RunCommandResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "RunCommand", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// RunCommandPreparer prepares the RunCommand request. +func (client VirtualMachinesClient) RunCommandPreparer(resourceGroupName string, VMName string, parameters RunCommandInput, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmName": autorest.Encode("path", VMName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommand", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// RunCommandSender sends the RunCommand request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// RunCommandResponder handles the response to the RunCommand request. The method always +// closes the http.Response Body. +func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (result RunCommandResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Start the operation to start a virtual machine. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. VMName is the name of the virtual machine. func (client VirtualMachinesClient) Start(resourceGroupName string, VMName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -1138,8 +1450,10 @@ func (client VirtualMachinesClient) Start(resourceGroupName string, VMName strin var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1172,7 +1486,7 @@ func (client VirtualMachinesClient) StartPreparer(resourceGroupName string, VMNa "vmName": autorest.Encode("path", VMName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetextensions.go new file mode 100644 index 000000000..9a198f148 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetextensions.go @@ -0,0 +1,416 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// VirtualMachineScaleSetExtensionsClient is the compute Client +type VirtualMachineScaleSetExtensionsClient struct { + ManagementClient +} + +// NewVirtualMachineScaleSetExtensionsClient creates an instance of the VirtualMachineScaleSetExtensionsClient client. +func NewVirtualMachineScaleSetExtensionsClient(subscriptionID string) VirtualMachineScaleSetExtensionsClient { + return NewVirtualMachineScaleSetExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetExtensionsClientWithBaseURI creates an instance of the +// VirtualMachineScaleSetExtensionsClient client. +func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetExtensionsClient { + return VirtualMachineScaleSetExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate the operation to create or update an extension. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set where the +// extension should be create or updated. vmssExtensionName is the name of the VM scale set extension. +// extensionParameters is parameters supplied to the Create VM scale set Extension operation. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension, cancel <-chan struct{}) (<-chan VirtualMachineScaleSetExtension, <-chan error) { + resultChan := make(chan VirtualMachineScaleSetExtension, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result VirtualMachineScaleSetExtension + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdatePreparer(resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + "vmssExtensionName": autorest.Encode("path", vmssExtensionName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters), + autorest.WithJSON(extensionParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete the operation to delete the extension. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set where the +// extension should be deleted. vmssExtensionName is the name of the VM scale set extension. +func (client VirtualMachineScaleSetExtensionsClient) Delete(resourceGroupName string, VMScaleSetName string, vmssExtensionName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, VMScaleSetName, vmssExtensionName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client VirtualMachineScaleSetExtensionsClient) DeletePreparer(resourceGroupName string, VMScaleSetName string, vmssExtensionName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + "vmssExtensionName": autorest.Encode("path", vmssExtensionName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) DeleteResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get the operation to get the extension. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set containing the +// extension. vmssExtensionName is the name of the VM scale set extension. expand is the expand expression to apply on +// the operation. +func (client VirtualMachineScaleSetExtensionsClient) Get(resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result VirtualMachineScaleSetExtension, err error) { + req, err := client.GetPreparer(resourceGroupName, VMScaleSetName, vmssExtensionName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualMachineScaleSetExtensionsClient) GetPreparer(resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + "vmssExtensionName": autorest.Encode("path", vmssExtensionName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions/{vmssExtensionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) GetResponder(resp *http.Response) (result VirtualMachineScaleSetExtension, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of all extensions in a VM scale set. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set containing the +// extension. +func (client VirtualMachineScaleSetExtensionsClient) List(resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client VirtualMachineScaleSetExtensionsClient) ListPreparer(resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/extensions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetExtensionsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetExtensionsClient) ListResponder(resp *http.Response) (result VirtualMachineScaleSetExtensionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client VirtualMachineScaleSetExtensionsClient) ListNextResults(lastResults VirtualMachineScaleSetExtensionListResult) (result VirtualMachineScaleSetExtensionListResult, err error) { + req, err := lastResults.VirtualMachineScaleSetExtensionListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client VirtualMachineScaleSetExtensionsClient) ListComplete(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan VirtualMachineScaleSetExtension, <-chan error) { + resultChan := make(chan VirtualMachineScaleSetExtension) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, VMScaleSetName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetrollingupgrades.go new file mode 100644 index 000000000..45cc6e5c5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetrollingupgrades.go @@ -0,0 +1,271 @@ +package compute + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// VirtualMachineScaleSetRollingUpgradesClient is the compute Client +type VirtualMachineScaleSetRollingUpgradesClient struct { + ManagementClient +} + +// NewVirtualMachineScaleSetRollingUpgradesClient creates an instance of the +// VirtualMachineScaleSetRollingUpgradesClient client. +func NewVirtualMachineScaleSetRollingUpgradesClient(subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { + return NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI creates an instance of the +// VirtualMachineScaleSetRollingUpgradesClient client. +func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetRollingUpgradesClient { + return VirtualMachineScaleSetRollingUpgradesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Cancel cancels the current virtual machine scale set rolling upgrade. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. +func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CancelPreparer(resourceGroupName, VMScaleSetName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure preparing request") + return + } + + resp, err := client.CancelSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", resp, "Failure sending request") + return + } + + result, err = client.CancelResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CancelPreparer prepares the Cancel request. +func (client VirtualMachineScaleSetRollingUpgradesClient) CancelPreparer(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/cancel", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CancelSender sends the Cancel request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CancelResponder handles the response to the Cancel request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetRollingUpgradesClient) CancelResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetLatest gets the status of the latest virtual machine scale set rolling upgrade. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(resourceGroupName string, VMScaleSetName string) (result RollingUpgradeStatusInfo, err error) { + req, err := client.GetLatestPreparer(resourceGroupName, VMScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", nil, "Failure preparing request") + return + } + + resp, err := client.GetLatestSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure sending request") + return + } + + result, err = client.GetLatestResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", resp, "Failure responding to request") + } + + return +} + +// GetLatestPreparer prepares the GetLatest request. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestPreparer(resourceGroupName string, VMScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/rollingUpgrades/latest", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetLatestSender sends the GetLatest request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetLatestResponder handles the response to the GetLatest request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(resp *http.Response) (result RollingUpgradeStatusInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// StartOSUpgrade starts a rolling upgrade to move all virtual machine scale set instances to the latest available +// Platform Image OS version. Instances which are already running the latest available OS version are not affected. +// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel +// will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { + resultChan := make(chan OperationStatusResponse, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result OperationStatusResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.StartOSUpgradePreparer(resourceGroupName, VMScaleSetName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure preparing request") + return + } + + resp, err := client.StartOSUpgradeSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", resp, "Failure sending request") + return + } + + result, err = client.StartOSUpgradeResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// StartOSUpgradePreparer prepares the StartOSUpgrade request. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradePreparer(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osRollingUpgrade", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// StartOSUpgradeSender sends the StartOSUpgrade request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// StartOSUpgradeResponder handles the response to the StartOSUpgrade request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeResponder(resp *http.Response) (result OperationStatusResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go index 53700c8dd..72a868579 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesets.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,43 +24,67 @@ import ( "net/http" ) -// VirtualMachineScaleSetsClient is the the Compute Management Client. +// VirtualMachineScaleSetsClient is the compute Client type VirtualMachineScaleSetsClient struct { ManagementClient } -// NewVirtualMachineScaleSetsClient creates an instance of the -// VirtualMachineScaleSetsClient client. +// NewVirtualMachineScaleSetsClient creates an instance of the VirtualMachineScaleSetsClient client. func NewVirtualMachineScaleSetsClient(subscriptionID string) VirtualMachineScaleSetsClient { return NewVirtualMachineScaleSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetsClient client. +// NewVirtualMachineScaleSetsClientWithBaseURI creates an instance of the VirtualMachineScaleSetsClient client. func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetsClient { return VirtualMachineScaleSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or update a VM scale set. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate create or update a VM scale set. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// VM scale set to create or update. parameters is the scale set object. -func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName string, name string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) { +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set to create or +// update. parameters is the scale set object. +func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) { resultChan := make(chan VirtualMachineScaleSet, 1) errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxBatchInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + }}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyInstancePercent", Name: validation.InclusiveMinimum, Rule: 5, Chain: nil}, + }}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + {Target: "parameters.VirtualMachineScaleSetProperties.UpgradePolicy.RollingUpgradePolicy.MaxUnhealthyUpgradedInstancePercent", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}, + }}, + }}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + go func() { var err error var result VirtualMachineScaleSet defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() - req, err := client.CreateOrUpdatePreparer(resourceGroupName, name, parameters, cancel) + req, err := client.CreateOrUpdatePreparer(resourceGroupName, VMScaleSetName, parameters, cancel) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "CreateOrUpdate", nil, "Failure preparing request") return @@ -83,14 +106,14 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdate(resourceGroupName str } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(resourceGroupName string, name string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (*http.Request, error) { +func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ - "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -99,7 +122,7 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdatePreparer(resourceGroup autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{name}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) @@ -126,16 +149,13 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.R return } -// Deallocate deallocates specific virtual machines in a VM scale set. Shuts -// down the virtual machines and releases the compute resources. You are not -// billed for the compute resources that this virtual machine scale set -// deallocates. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Deallocate deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the +// compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates. +// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel +// will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. VMInstanceIDs is a list of virtual machine -// instance IDs from the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) Deallocate(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -143,8 +163,10 @@ func (client VirtualMachineScaleSetsClient) Deallocate(resourceGroupName string, var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -177,7 +199,7 @@ func (client VirtualMachineScaleSetsClient) DeallocatePreparer(resourceGroupName "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -216,12 +238,10 @@ func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Respo return } -// Delete deletes a VM scale set. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Delete deletes a VM scale set. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. func (client VirtualMachineScaleSetsClient) Delete(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -229,8 +249,10 @@ func (client VirtualMachineScaleSetsClient) Delete(resourceGroupName string, VMS var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -263,7 +285,7 @@ func (client VirtualMachineScaleSetsClient) DeletePreparer(resourceGroupName str "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -297,14 +319,12 @@ func (client VirtualMachineScaleSetsClient) DeleteResponder(resp *http.Response) return } -// DeleteInstances deletes virtual machines in a VM scale set. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// DeleteInstances deletes virtual machines in a VM scale set. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. VMInstanceIDs is a list of virtual machine -// instance IDs from the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) DeleteInstances(resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -321,8 +341,10 @@ func (client VirtualMachineScaleSetsClient) DeleteInstances(resourceGroupName st var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -355,7 +377,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesPreparer(resourceGrou "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -393,8 +415,7 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http. // Get display information about a virtual machine scale set. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. func (client VirtualMachineScaleSetsClient) Get(resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSet, err error) { req, err := client.GetPreparer(resourceGroupName, VMScaleSetName) if err != nil { @@ -425,7 +446,7 @@ func (client VirtualMachineScaleSetsClient) GetPreparer(resourceGroupName string "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -459,8 +480,7 @@ func (client VirtualMachineScaleSetsClient) GetResponder(resp *http.Response) (r // GetInstanceView gets the status of a VM scale set instance. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. func (client VirtualMachineScaleSetsClient) GetInstanceView(resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetInstanceView, err error) { req, err := client.GetInstanceViewPreparer(resourceGroupName, VMScaleSetName) if err != nil { @@ -491,7 +511,7 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewPreparer(resourceGrou "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -555,7 +575,7 @@ func (client VirtualMachineScaleSetsClient) ListPreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -611,9 +631,53 @@ func (client VirtualMachineScaleSetsClient) ListNextResults(lastResults VirtualM return } -// ListAll gets a list of all VM Scale Sets in the subscription, regardless of -// the associated resource group. Use nextLink property in the response to get -// the next page of VM Scale Sets. Do this till nextLink is not null to fetch +// ListComplete gets all elements from the list without paging. +func (client VirtualMachineScaleSetsClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) { + resultChan := make(chan VirtualMachineScaleSet) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAll gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use +// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is not null to fetch // all the VM Scale Sets. func (client VirtualMachineScaleSetsClient) ListAll() (result VirtualMachineScaleSetListWithLinkResult, err error) { req, err := client.ListAllPreparer() @@ -643,7 +707,7 @@ func (client VirtualMachineScaleSetsClient) ListAllPreparer() (*http.Request, er "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -699,11 +763,55 @@ func (client VirtualMachineScaleSetsClient) ListAllNextResults(lastResults Virtu return } -// ListSkus gets a list of SKUs available for your VM scale set, including the -// minimum and maximum VM instances allowed for each SKU. +// ListAllComplete gets all elements from the list without paging. +func (client VirtualMachineScaleSetsClient) ListAllComplete(cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) { + resultChan := make(chan VirtualMachineScaleSet) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListSkus gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed +// for each SKU. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. func (client VirtualMachineScaleSetsClient) ListSkus(resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResult, err error) { req, err := client.ListSkusPreparer(resourceGroupName, VMScaleSetName) if err != nil { @@ -734,7 +842,7 @@ func (client VirtualMachineScaleSetsClient) ListSkusPreparer(resourceGroupName s "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -790,16 +898,58 @@ func (client VirtualMachineScaleSetsClient) ListSkusNextResults(lastResults Virt return } -// PowerOff power off (stop) one or more virtual machines in a VM scale set. -// Note that resources are still attached and you are getting charged for the -// resources. Instead, use deallocate to release resources and avoid charges. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// ListSkusComplete gets all elements from the list without paging. +func (client VirtualMachineScaleSetsClient) ListSkusComplete(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan VirtualMachineScaleSetSku, <-chan error) { + resultChan := make(chan VirtualMachineScaleSetSku) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSkus(resourceGroupName, VMScaleSetName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSkusNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// PowerOff power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and +// you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. VMInstanceIDs is a list of virtual machine -// instance IDs from the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) PowerOff(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -807,8 +957,10 @@ func (client VirtualMachineScaleSetsClient) PowerOff(resourceGroupName string, V var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -841,7 +993,7 @@ func (client VirtualMachineScaleSetsClient) PowerOffPreparer(resourceGroupName s "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -880,26 +1032,27 @@ func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Respons return } -// Reimage reimages (upgrade the operating system) one or more virtual machines -// in a VM scale set. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. -func (client VirtualMachineScaleSetsClient) Reimage(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) Reimage(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) go func() { var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() - req, err := client.ReimagePreparer(resourceGroupName, VMScaleSetName, cancel) + req, err := client.ReimagePreparer(resourceGroupName, VMScaleSetName, VMInstanceIDs, cancel) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure preparing request") return @@ -921,23 +1074,28 @@ func (client VirtualMachineScaleSetsClient) Reimage(resourceGroupName string, VM } // ReimagePreparer prepares the Reimage request. -func (client VirtualMachineScaleSetsClient) ReimagePreparer(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (*http.Request, error) { +func (client VirtualMachineScaleSetsClient) ReimagePreparer(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( + autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", pathParameters), autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } return preparer.Prepare(&http.Request{Cancel: cancel}) } @@ -962,27 +1120,27 @@ func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response return } -// ReimageAll reimages all the disks ( including data disks ) in the virtual -// machines in a virtual machine scale set. This operation is only supported -// for managed disks. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// ReimageAll reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation +// is only supported for managed disks. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. -func (client VirtualMachineScaleSetsClient) ReimageAll(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. +func (client VirtualMachineScaleSetsClient) ReimageAll(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) go func() { var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() - req, err := client.ReimageAllPreparer(resourceGroupName, VMScaleSetName, cancel) + req, err := client.ReimageAllPreparer(resourceGroupName, VMScaleSetName, VMInstanceIDs, cancel) if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure preparing request") return @@ -1004,23 +1162,28 @@ func (client VirtualMachineScaleSetsClient) ReimageAll(resourceGroupName string, } // ReimageAllPreparer prepares the ReimageAll request. -func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(resourceGroupName string, VMScaleSetName string, cancel <-chan struct{}) (*http.Request, error) { +func (client VirtualMachineScaleSetsClient) ReimageAllPreparer(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( + autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimageall", pathParameters), autorest.WithQueryParameters(queryParameters)) + if VMInstanceIDs != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(VMInstanceIDs)) + } return preparer.Prepare(&http.Request{Cancel: cancel}) } @@ -1045,14 +1208,12 @@ func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Respo return } -// Restart restarts one or more virtual machines in a VM scale set. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Restart restarts one or more virtual machines in a VM scale set. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. VMInstanceIDs is a list of virtual machine -// instance IDs from the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) Restart(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -1060,8 +1221,10 @@ func (client VirtualMachineScaleSetsClient) Restart(resourceGroupName string, VM var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1094,7 +1257,7 @@ func (client VirtualMachineScaleSetsClient) RestartPreparer(resourceGroupName st "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1133,14 +1296,12 @@ func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response return } -// Start starts one or more virtual machines in a VM scale set. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Start starts one or more virtual machines in a VM scale set. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. VMInstanceIDs is a list of virtual machine -// instance IDs from the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) Start(resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -1148,8 +1309,10 @@ func (client VirtualMachineScaleSetsClient) Start(resourceGroupName string, VMSc var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1182,7 +1345,7 @@ func (client VirtualMachineScaleSetsClient) StartPreparer(resourceGroupName stri "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1221,14 +1384,96 @@ func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response) return } -// UpdateInstances upgrades one or more virtual machines to the latest SKU set -// in the VM scale set model. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Update update a VM scale set. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. VMInstanceIDs is a list of virtual machine -// instance IDs from the VM scale set. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set to create or +// update. parameters is the scale set object. +func (client VirtualMachineScaleSetsClient) Update(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate, cancel <-chan struct{}) (<-chan VirtualMachineScaleSet, <-chan error) { + resultChan := make(chan VirtualMachineScaleSet, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result VirtualMachineScaleSet + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, VMScaleSetName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client VirtualMachineScaleSetsClient) UpdatePreparer(resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vmScaleSetName": autorest.Encode("path", VMScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client VirtualMachineScaleSetsClient) UpdateResponder(resp *http.Response) (result VirtualMachineScaleSet, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateInstances upgrades one or more virtual machines to the latest SKU set in the VM scale set model. This method +// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. VMInstanceIDs +// is a list of virtual machine instance IDs from the VM scale set. func (client VirtualMachineScaleSetsClient) UpdateInstances(resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -1245,8 +1490,10 @@ func (client VirtualMachineScaleSetsClient) UpdateInstances(resourceGroupName st var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1279,7 +1526,7 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesPreparer(resourceGrou "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go index 34e0934dc..5a15edae9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinescalesetvms.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,33 +23,28 @@ import ( "net/http" ) -// VirtualMachineScaleSetVMsClient is the the Compute Management Client. +// VirtualMachineScaleSetVMsClient is the compute Client type VirtualMachineScaleSetVMsClient struct { ManagementClient } -// NewVirtualMachineScaleSetVMsClient creates an instance of the -// VirtualMachineScaleSetVMsClient client. +// NewVirtualMachineScaleSetVMsClient creates an instance of the VirtualMachineScaleSetVMsClient client. func NewVirtualMachineScaleSetVMsClient(subscriptionID string) VirtualMachineScaleSetVMsClient { return NewVirtualMachineScaleSetVMsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the -// VirtualMachineScaleSetVMsClient client. +// NewVirtualMachineScaleSetVMsClientWithBaseURI creates an instance of the VirtualMachineScaleSetVMsClient client. func NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineScaleSetVMsClient { return VirtualMachineScaleSetVMsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Deallocate deallocates a specific virtual machine in a VM scale set. Shuts -// down the virtual machine and releases the compute resources it uses. You are -// not billed for the compute resources of this virtual machine once it is -// deallocated. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Deallocate deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the +// compute resources it uses. You are not billed for the compute resources of this virtual machine once it is +// deallocated. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. +// The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) Deallocate(resourceGroupName string, VMScaleSetName string, instanceID string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -58,8 +52,10 @@ func (client VirtualMachineScaleSetVMsClient) Deallocate(resourceGroupName strin var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -93,7 +89,7 @@ func (client VirtualMachineScaleSetVMsClient) DeallocatePreparer(resourceGroupNa "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -127,14 +123,12 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateResponder(resp *http.Res return } -// Delete deletes a virtual machine from a VM scale set. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes a virtual machine from a VM scale set. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) Delete(resourceGroupName string, VMScaleSetName string, instanceID string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -142,8 +136,10 @@ func (client VirtualMachineScaleSetVMsClient) Delete(resourceGroupName string, V var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -177,7 +173,7 @@ func (client VirtualMachineScaleSetVMsClient) DeletePreparer(resourceGroupName s "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -213,9 +209,8 @@ func (client VirtualMachineScaleSetVMsClient) DeleteResponder(resp *http.Respons // Get gets a virtual machine from a VM scale set. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) Get(resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVM, err error) { req, err := client.GetPreparer(resourceGroupName, VMScaleSetName, instanceID) if err != nil { @@ -247,7 +242,7 @@ func (client VirtualMachineScaleSetVMsClient) GetPreparer(resourceGroupName stri "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,9 +276,8 @@ func (client VirtualMachineScaleSetVMsClient) GetResponder(resp *http.Response) // GetInstanceView gets the status of a virtual machine from a VM scale set. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) GetInstanceView(resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMInstanceView, err error) { req, err := client.GetInstanceViewPreparer(resourceGroupName, VMScaleSetName, instanceID) if err != nil { @@ -315,7 +309,7 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewPreparer(resourceGr "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -349,10 +343,9 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewResponder(resp *htt // List gets a list of all virtual machines in a VM scale sets. // -// resourceGroupName is the name of the resource group. -// virtualMachineScaleSetName is the name of the VM scale set. filter is the -// filter to apply to the operation. selectParameter is the list parameters. -// expand is the expand expression to apply to the operation. +// resourceGroupName is the name of the resource group. virtualMachineScaleSetName is the name of the VM scale set. +// filter is the filter to apply to the operation. selectParameter is the list parameters. expand is the expand +// expression to apply to the operation. func (client VirtualMachineScaleSetVMsClient) List(resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResult, err error) { req, err := client.ListPreparer(resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand) if err != nil { @@ -383,7 +376,7 @@ func (client VirtualMachineScaleSetVMsClient) ListPreparer(resourceGroupName str "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -448,16 +441,58 @@ func (client VirtualMachineScaleSetVMsClient) ListNextResults(lastResults Virtua return } -// PowerOff power off (stop) a virtual machine in a VM scale set. Note that -// resources are still attached and you are getting charged for the resources. -// Instead, use deallocate to release resources and avoid charges. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// ListComplete gets all elements from the list without paging. +func (client VirtualMachineScaleSetVMsClient) ListComplete(resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string, cancel <-chan struct{}) (<-chan VirtualMachineScaleSetVM, <-chan error) { + resultChan := make(chan VirtualMachineScaleSetVM) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// PowerOff power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are +// getting charged for the resources. Instead, use deallocate to release resources and avoid charges. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) PowerOff(resourceGroupName string, VMScaleSetName string, instanceID string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -465,8 +500,10 @@ func (client VirtualMachineScaleSetVMsClient) PowerOff(resourceGroupName string, var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -500,7 +537,7 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffPreparer(resourceGroupName "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -534,14 +571,12 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffResponder(resp *http.Respo return } -// Reimage reimages (upgrade the operating system) a specific virtual machine -// in a VM scale set. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// Reimage reimages (upgrade the operating system) a specific virtual machine in a VM scale set. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) Reimage(resourceGroupName string, VMScaleSetName string, instanceID string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -549,8 +584,10 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(resourceGroupName string, var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -584,7 +621,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(resourceGroupName "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -618,15 +655,12 @@ func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Respon return } -// ReimageAll allows you to re-image all the disks ( including data disks ) in -// the a virtual machine scale set instance. This operation is only supported -// for managed disks. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// ReimageAll allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This +// operation is only supported for managed disks. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) ReimageAll(resourceGroupName string, VMScaleSetName string, instanceID string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -634,8 +668,10 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAll(resourceGroupName strin var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -669,7 +705,7 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllPreparer(resourceGroupNa "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -703,14 +739,12 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllResponder(resp *http.Res return } -// Restart restarts a virtual machine in a VM scale set. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Restart restarts a virtual machine in a VM scale set. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) Restart(resourceGroupName string, VMScaleSetName string, instanceID string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -718,8 +752,10 @@ func (client VirtualMachineScaleSetVMsClient) Restart(resourceGroupName string, var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -753,7 +789,7 @@ func (client VirtualMachineScaleSetVMsClient) RestartPreparer(resourceGroupName "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -787,14 +823,11 @@ func (client VirtualMachineScaleSetVMsClient) RestartResponder(resp *http.Respon return } -// Start starts a virtual machine in a VM scale set. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Start starts a virtual machine in a VM scale set. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. VMScaleSetName is the -// name of the VM scale set. instanceID is the instance ID of the virtual -// machine. +// resourceGroupName is the name of the resource group. VMScaleSetName is the name of the VM scale set. instanceID is +// the instance ID of the virtual machine. func (client VirtualMachineScaleSetVMsClient) Start(resourceGroupName string, VMScaleSetName string, instanceID string, cancel <-chan struct{}) (<-chan OperationStatusResponse, <-chan error) { resultChan := make(chan OperationStatusResponse, 1) errChan := make(chan error, 1) @@ -802,8 +835,10 @@ func (client VirtualMachineScaleSetVMsClient) Start(resourceGroupName string, VM var err error var result OperationStatusResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -837,7 +872,7 @@ func (client VirtualMachineScaleSetVMsClient) StartPreparer(resourceGroupName st "vmScaleSetName": autorest.Encode("path", VMScaleSetName), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinesizes.go index c76b203e7..dc2f2778b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinesizes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/compute/virtualmachinesizes.go @@ -14,9 +14,8 @@ package compute // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,25 +24,22 @@ import ( "net/http" ) -// VirtualMachineSizesClient is the the Compute Management Client. +// VirtualMachineSizesClient is the compute Client type VirtualMachineSizesClient struct { ManagementClient } -// NewVirtualMachineSizesClient creates an instance of the -// VirtualMachineSizesClient client. +// NewVirtualMachineSizesClient creates an instance of the VirtualMachineSizesClient client. func NewVirtualMachineSizesClient(subscriptionID string) VirtualMachineSizesClient { return NewVirtualMachineSizesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSizesClientWithBaseURI creates an instance of the -// VirtualMachineSizesClient client. +// NewVirtualMachineSizesClientWithBaseURI creates an instance of the VirtualMachineSizesClient client. func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSizesClient { return VirtualMachineSizesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all available virtual machine sizes for a subscription in a -// location. +// List lists all available virtual machine sizes for a subscription in a location. // // location is the location upon which virtual-machine-sizes is queried. func (client VirtualMachineSizesClient) List(location string) (result VirtualMachineSizeListResult, err error) { @@ -81,7 +77,7 @@ func (client VirtualMachineSizesClient) ListPreparer(location string) (*http.Req "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-04-30-preview" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/client.go index 54adcbaf1..f8bb59837 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/client.go @@ -1,10 +1,8 @@ -// Package consumption implements the Azure ARM Consumption service API version -// 2017-04-24-preview. +// Package consumption implements the Azure ARM Consumption service API version 2017-04-24-preview. // -// Consumption management client provides access to consumption resources for -// Azure Web-Direct subscriptions. Other subscription types which were not -// purchased directly through the Azure web portal are not supported through -// this preview API. +// Consumption management client provides access to consumption resources for Azure Web-Direct subscriptions. Other +// subscription types which were not purchased directly through the Azure web portal are not supported through this +// preview API. package consumption // Copyright (c) Microsoft and contributors. All rights reserved. @@ -21,9 +19,8 @@ package consumption // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/models.go index 49e06fe8c..da3086956 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/models.go @@ -14,9 +14,8 @@ package consumption // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -33,8 +32,8 @@ type ErrorDetails struct { Target *string `json:"target,omitempty"` } -// ErrorResponse is error response indicates that the service is not able to -// process the incoming request. The reason is provided in the error message. +// ErrorResponse is error response indicates that the service is not able to process the incoming request. The reason +// is provided in the error message. type ErrorResponse struct { Error *ErrorDetails `json:"error,omitempty"` } @@ -63,8 +62,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of listing consumption operations. It contains -// a list of operations and a URL link to get the next set of results. +// OperationListResult is result of listing consumption operations. It contains a list of operations and a URL link to +// get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -119,9 +118,8 @@ type UsageDetailProperties struct { AdditionalProperties *map[string]*string `json:"additionalProperties,omitempty"` } -// UsageDetailsListResult is result of listing usage details. It contains a -// list of available usage details in reverse chronological order by billing -// period. +// UsageDetailsListResult is result of listing usage details. It contains a list of available usage details in reverse +// chronological order by billing period. type UsageDetailsListResult struct { autorest.Response `json:"-"` Value *[]UsageDetail `json:"value,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/operations.go index d4d0b313d..bb8b20593 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/operations.go @@ -14,9 +14,8 @@ package consumption // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,9 +23,8 @@ import ( "net/http" ) -// OperationsClient is the consumption management client provides access to -// consumption resources for Azure Web-Direct subscriptions. Other subscription -// types which were not purchased directly through the Azure web portal are not +// OperationsClient is the consumption management client provides access to consumption resources for Azure Web-Direct +// subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not // supported through this preview API. type OperationsClient struct { ManagementClient @@ -37,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -123,3 +120,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/usagedetails.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/usagedetails.go index f60768e73..1cdb5c0b9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/usagedetails.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/usagedetails.go @@ -14,9 +14,8 @@ package consumption // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// UsageDetailsClient is the consumption management client provides access to -// consumption resources for Azure Web-Direct subscriptions. Other subscription -// types which were not purchased directly through the Azure web portal are not -// supported through this preview API. +// UsageDetailsClient is the consumption management client provides access to consumption resources for Azure +// Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal +// are not supported through this preview API. type UsageDetailsClient struct { ManagementClient } @@ -38,32 +36,24 @@ func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient { return NewUsageDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageDetailsClientWithBaseURI creates an instance of the -// UsageDetailsClient client. +// NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client. func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient { return UsageDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists the usage details for a scope in reverse chronological order by -// billing period. Usage details are available via this API only for January 1, -// 2017 or later. +// List lists the usage details for a scope in reverse chronological order by billing period. Usage details are +// available via this API only for January 1, 2017 or later. // -// scope is the scope of the usage details. The scope can be -// '/subscriptions/{subscriptionId}/' for a subscription, or -// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}' -// for an invoice or -// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' -// for a billing perdiod. expand is may be used to expand the -// additionalProperties or meterDetails property within a list of usage -// details. By default, these fields are not included when listing usage -// details. filter is may be used to filter usageDetails by usageEnd (Utc -// time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does -// not currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only -// used if a previous operation returned a partial result. If a previous -// response contains a nextLink element, the value of the nextLink element will -// include a skiptoken parameter that specifies a starting point to use for -// subsequent calls. top is may be used to limit the number of results to the -// most recent N usageDetails. +// scope is the scope of the usage details. The scope can be '/subscriptions/{subscriptionId}' for a subscription, or +// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}' for an invoice or +// '/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' for a billing +// perdiod. expand is may be used to expand the additionalProperties or meterDetails property within a list of usage +// details. By default, these fields are not included when listing usage details. filter is may be used to filter +// usageDetails by usageEnd (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not +// currently support 'ne', 'or', or 'not'. skiptoken is skiptoken is only used if a previous operation returned a +// partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a +// skiptoken parameter that specifies a starting point to use for subsequent calls. top is may be used to limit the +// number of results to the most recent N usageDetails. func (client UsageDetailsClient) List(scope string, expand string, filter string, skiptoken string, top *int32) (result UsageDetailsListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -98,7 +88,7 @@ func (client UsageDetailsClient) List(scope string, expand string, filter string // ListPreparer prepares the List request. func (client UsageDetailsClient) ListPreparer(scope string, expand string, filter string, skiptoken string, top *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ - "scope": autorest.Encode("path", scope), + "scope": scope, } const APIVersion = "2017-04-24-preview" @@ -168,3 +158,48 @@ func (client UsageDetailsClient) ListNextResults(lastResults UsageDetailsListRes return } + +// ListComplete gets all elements from the list without paging. +func (client UsageDetailsClient) ListComplete(scope string, expand string, filter string, skiptoken string, top *int32, cancel <-chan struct{}) (<-chan UsageDetail, <-chan error) { + resultChan := make(chan UsageDetail) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(scope, expand, filter, skiptoken, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go index 8835f23e6..69fac76f9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/consumption/version.go @@ -14,15 +14,15 @@ package consumption // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-consumption/2017-04-24-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-consumption/2017-04-24-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go index 8428722c5..2cb55471a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/client.go @@ -17,7 +17,7 @@ package containerinstance // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go index 0396dac00..14c243329 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containergroups.go @@ -14,7 +14,7 @@ package containerinstance // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -39,10 +39,11 @@ func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string) return ContainerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or update container groups. +// CreateOrUpdate create or update container groups with specified configurations. // -// resourceGroupName is azure resource group name containerGroupName is container group name containerGroup is -// definition of the container to be created. +// resourceGroupName is the name of the resource group to contain the container group to be created or updated. +// containerGroupName is the name of the container group to be created or updated. containerGroup is the properties of +// the container group to be created or updated. func (client ContainerGroupsClient) CreateOrUpdate(resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (result ContainerGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: containerGroup, @@ -118,9 +119,11 @@ func (client ContainerGroupsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete delete container groups. +// Delete delete the specified container group in the specified subscription and resource group. The operation does not +// delete other resources provided by the user, such as volumes. // -// resourceGroupName is azure resource group name containerGroupName is name of the container group to be deleted +// resourceGroupName is the name of the resource group that contains the container group. containerGroupName is the +// name of the container group to be deleted. func (client ContainerGroupsClient) Delete(resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) { req, err := client.DeletePreparer(resourceGroupName, containerGroupName) if err != nil { @@ -183,9 +186,12 @@ func (client ContainerGroupsClient) DeleteResponder(resp *http.Response) (result return } -// Get get details for this container group. +// Get gets the properties of the specified container group in the specified subscription and resource group. The +// operation returns the properties of each container group including containers, image registry credentials, restart +// policy, IP address type, OS type, state, and volumes. // -// resourceGroupName is azure resource group name containerGroupName is container group name +// resourceGroupName is the name of the resource group that contains the container group. containerGroupName is the +// name of the container group. func (client ContainerGroupsClient) Get(resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) { req, err := client.GetPreparer(resourceGroupName, containerGroupName) if err != nil { @@ -248,7 +254,9 @@ func (client ContainerGroupsClient) GetResponder(resp *http.Response) (result Co return } -// List get the list of container groups in a given subscription. +// List get a list of container groups in the specified subscription. This operation returns properties of each +// container group including containers, image registry credentials, restart policy, IP address type, OS type, state, +// and volumes. func (client ContainerGroupsClient) List() (result ContainerGroupListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -378,9 +386,11 @@ func (client ContainerGroupsClient) ListComplete(cancel <-chan struct{}) (<-chan return resultChan, errChan } -// ListByResourceGroup get the list of container groups in a given resource group. +// ListByResourceGroup get a list of container groups in a specified subscription and resource group. This operation +// returns properties of each container group including containers, image registry credentials, restart policy, IP +// address type, OS type, state, and volumes. // -// resourceGroupName is azure resource group name +// resourceGroupName is the name of the resource group that contains the container group. func (client ContainerGroupsClient) ListByResourceGroup(resourceGroupName string) (result ContainerGroupListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go index c11264b18..9f742dd79 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/containerlogs.go @@ -14,7 +14,7 @@ package containerinstance // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -38,10 +38,12 @@ func NewContainerLogsClientWithBaseURI(baseURI string, subscriptionID string) Co return ContainerLogsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List get the logs for this container. +// List get the logs for a specified container instance in a specified resource group and container group. // -// resourceGroupName is azure resource group name containerName is container name containerGroupName is container group -// name tail is only show this number of log lines. If not provided, all available logs are shown. +// resourceGroupName is the name of the resource group that contains the container instance. containerName is the name +// of the container instance. containerGroupName is the name of the container group the container instance belongs to. +// tail is the number of lines to show from the tail of the container instance log. If not provided, all available logs +// are shown up to 4mb. func (client ContainerLogsClient) List(resourceGroupName string, containerName string, containerGroupName string, tail *int32) (result Logs, err error) { req, err := client.ListPreparer(resourceGroupName, containerName, containerGroupName, tail) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go index 51aea50b0..f04bedfcf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/models.go @@ -14,7 +14,7 @@ package containerinstance // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -52,7 +52,7 @@ const ( Windows OperatingSystemTypes = "Windows" ) -// AzureFileVolume is the Azure file volume. +// AzureFileVolume is the properties of the Azure File volume. Azure File shares are mounted as volumes. type AzureFileVolume struct { ShareName *string `json:"shareName,omitempty"` ReadOnly *bool `json:"readOnly,omitempty"` @@ -66,7 +66,7 @@ type Container struct { *ContainerProperties `json:"properties,omitempty"` } -// ContainerEvent is a container event. +// ContainerEvent is a container instance event. type ContainerEvent struct { Count *int32 `json:"count,omitempty"` FirstTimestamp *date.Time `json:"firstTimestamp,omitempty"` @@ -117,12 +117,12 @@ func (client ContainerGroupListResult) ContainerGroupListResultPreparer() (*http autorest.WithBaseURL(to.String(client.NextLink))) } -// ContainerPort is the container port. +// ContainerPort is the port exposed on the container instance. type ContainerPort struct { Port *int32 `json:"port,omitempty"` } -// ContainerProperties is the container properties. +// ContainerProperties is the container instance properties. type ContainerProperties struct { Image *string `json:"image,omitempty"` Command *[]string `json:"command,omitempty"` @@ -133,7 +133,7 @@ type ContainerProperties struct { VolumeMounts *[]VolumeMount `json:"volumeMounts,omitempty"` } -// ContainerPropertiesInstanceView is the instance view of the container. Only valid in response. +// ContainerPropertiesInstanceView is the instance view of the container instance. Only valid in response. type ContainerPropertiesInstanceView struct { RestartCount *int32 `json:"restartCount,omitempty"` CurrentState *ContainerState `json:"currentState,omitempty"` @@ -141,7 +141,7 @@ type ContainerPropertiesInstanceView struct { Events *[]ContainerEvent `json:"events,omitempty"` } -// ContainerState is the container state. +// ContainerState is the container instance state. type ContainerState struct { State *string `json:"state,omitempty"` StartTime *date.Time `json:"startTime,omitempty"` @@ -150,7 +150,7 @@ type ContainerState struct { DetailStatus *string `json:"detailStatus,omitempty"` } -// EnvironmentVariable is environment variable to set within the container. +// EnvironmentVariable is the environment variable to set within the container instance. type EnvironmentVariable struct { Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` @@ -163,7 +163,7 @@ type ImageRegistryCredential struct { Password *string `json:"password,omitempty"` } -// IPAddress is IP address for the group. +// IPAddress is IP address for the container group. type IPAddress struct { Ports *[]Port `json:"ports,omitempty"` Type *string `json:"type,omitempty"` @@ -176,7 +176,7 @@ type Logs struct { Content *string `json:"content,omitempty"` } -// Port is the port. +// Port is the port exposed on the container group. type Port struct { Protocol ContainerGroupNetworkProtocol `json:"protocol,omitempty"` Port *int32 `json:"port,omitempty"` @@ -209,13 +209,13 @@ type ResourceRequirements struct { Limits *ResourceLimits `json:"limits,omitempty"` } -// Volume is the volume. +// Volume is the properties of the volume. type Volume struct { Name *string `json:"name,omitempty"` AzureFile *AzureFileVolume `json:"azureFile,omitempty"` } -// VolumeMount is the volume mount. +// VolumeMount is the properties of the volume mount. type VolumeMount struct { Name *string `json:"name,omitempty"` MountPath *string `json:"mountPath,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go index d62e4bc37..86834aed5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerinstance/version.go @@ -14,15 +14,15 @@ package containerinstance // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-containerinstance/2017-08-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-containerinstance/2017-08-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/client.go index e5e99db67..b3eea6cb2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/client.go @@ -1,5 +1,4 @@ -// Package containerregistry implements the Azure ARM Containerregistry service -// API version 2017-03-01. +// Package containerregistry implements the Azure ARM Containerregistry service API version 2017-10-01. // // package containerregistry @@ -18,9 +17,8 @@ package containerregistry // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/models.go index 66edd68c5..b717f5708 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/models.go @@ -14,9 +14,8 @@ package containerregistry // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -39,28 +38,155 @@ const ( type ProvisioningState string const ( + // Canceled specifies the canceled state for provisioning state. + Canceled ProvisioningState = "Canceled" // Creating specifies the creating state for provisioning state. Creating ProvisioningState = "Creating" + // Deleting specifies the deleting state for provisioning state. + Deleting ProvisioningState = "Deleting" + // Failed specifies the failed state for provisioning state. + Failed ProvisioningState = "Failed" // Succeeded specifies the succeeded state for provisioning state. Succeeded ProvisioningState = "Succeeded" + // Updating specifies the updating state for provisioning state. + Updating ProvisioningState = "Updating" +) + +// RegistryUsageUnit enumerates the values for registry usage unit. +type RegistryUsageUnit string + +const ( + // Bytes specifies the bytes state for registry usage unit. + Bytes RegistryUsageUnit = "Bytes" + // Count specifies the count state for registry usage unit. + Count RegistryUsageUnit = "Count" +) + +// SkuName enumerates the values for sku name. +type SkuName string + +const ( + // Classic specifies the classic state for sku name. + Classic SkuName = "Classic" + // ManagedBasic specifies the managed basic state for sku name. + ManagedBasic SkuName = "Managed_Basic" + // ManagedPremium specifies the managed premium state for sku name. + ManagedPremium SkuName = "Managed_Premium" + // ManagedStandard specifies the managed standard state for sku name. + ManagedStandard SkuName = "Managed_Standard" ) // SkuTier enumerates the values for sku tier. type SkuTier string const ( - // Basic specifies the basic state for sku tier. - Basic SkuTier = "Basic" + // SkuTierClassic specifies the sku tier classic state for sku tier. + SkuTierClassic SkuTier = "Classic" + // SkuTierManaged specifies the sku tier managed state for sku tier. + SkuTierManaged SkuTier = "Managed" ) +// WebhookAction enumerates the values for webhook action. +type WebhookAction string + +const ( + // Delete specifies the delete state for webhook action. + Delete WebhookAction = "delete" + // Push specifies the push state for webhook action. + Push WebhookAction = "push" +) + +// WebhookStatus enumerates the values for webhook status. +type WebhookStatus string + +const ( + // Disabled specifies the disabled state for webhook status. + Disabled WebhookStatus = "disabled" + // Enabled specifies the enabled state for webhook status. + Enabled WebhookStatus = "enabled" +) + +// Actor is the agent that initiated the event. For most situations, this could be from the authorization context of +// the request. +type Actor struct { + Name *string `json:"name,omitempty"` +} + +// CallbackConfig is the configuration of service URI and custom headers for the webhook. +type CallbackConfig struct { + autorest.Response `json:"-"` + ServiceURI *string `json:"serviceUri,omitempty"` + CustomHeaders *map[string]*string `json:"customHeaders,omitempty"` +} + +// Event is the event for a webhook. +type Event struct { + ID *string `json:"id,omitempty"` + EventRequestMessage *EventRequestMessage `json:"eventRequestMessage,omitempty"` + EventResponseMessage *EventResponseMessage `json:"eventResponseMessage,omitempty"` +} + +// EventContent is the content of the event request message. +type EventContent struct { + ID *string `json:"id,omitempty"` + Timestamp *date.Time `json:"timestamp,omitempty"` + Action *string `json:"action,omitempty"` + Target *Target `json:"target,omitempty"` + Request *Request `json:"request,omitempty"` + Actor *Actor `json:"actor,omitempty"` + Source *Source `json:"source,omitempty"` +} + +// EventInfo is the basic information of an event. +type EventInfo struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` +} + +// EventListResult is the result of a request to list events for a webhook. +type EventListResult struct { + autorest.Response `json:"-"` + Value *[]Event `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// EventListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client EventListResult) EventListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// EventRequestMessage is the event request message sent to the service URI. +type EventRequestMessage struct { + Content *EventContent `json:"content,omitempty"` + Headers *map[string]*string `json:"headers,omitempty"` + Method *string `json:"method,omitempty"` + RequestURI *string `json:"requestUri,omitempty"` + Version *string `json:"version,omitempty"` +} + +// EventResponseMessage is the event response message received from the service URI. +type EventResponseMessage struct { + Content *string `json:"content,omitempty"` + Headers *map[string]*string `json:"headers,omitempty"` + ReasonPhrase *string `json:"reasonPhrase,omitempty"` + StatusCode *string `json:"statusCode,omitempty"` + Version *string `json:"version,omitempty"` +} + // OperationDefinition is the definition of a container registry operation. type OperationDefinition struct { Name *string `json:"name,omitempty"` Display *OperationDisplayDefinition `json:"display,omitempty"` } -// OperationDisplayDefinition is the display information for a container -// registry operation. +// OperationDisplayDefinition is the display information for a container registry operation. type OperationDisplayDefinition struct { Provider *string `json:"provider,omitempty"` Resource *string `json:"resource,omitempty"` @@ -68,8 +194,7 @@ type OperationDisplayDefinition struct { Description *string `json:"description,omitempty"` } -// OperationListResult is the result of a request to list container registry -// operations. +// OperationListResult is the result of a request to list container registry operations. type OperationListResult struct { autorest.Response `json:"-"` Value *[]OperationDefinition `json:"value,omitempty"` @@ -88,8 +213,7 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// RegenerateCredentialParameters is the parameters used to regenerate the -// login credential. +// RegenerateCredentialParameters is the parameters used to regenerate the login credential. type RegenerateCredentialParameters struct { Name PasswordName `json:"name,omitempty"` } @@ -106,17 +230,7 @@ type Registry struct { *RegistryProperties `json:"properties,omitempty"` } -// RegistryCreateParameters is the parameters for creating a container -// registry. -type RegistryCreateParameters struct { - Tags *map[string]*string `json:"tags,omitempty"` - Location *string `json:"location,omitempty"` - Sku *Sku `json:"sku,omitempty"` - *RegistryPropertiesCreateParameters `json:"properties,omitempty"` -} - -// RegistryListCredentialsResult is the response from the ListCredentials -// operation. +// RegistryListCredentialsResult is the response from the ListCredentials operation. type RegistryListCredentialsResult struct { autorest.Response `json:"-"` Username *string `json:"username,omitempty"` @@ -142,15 +256,13 @@ func (client RegistryListResult) RegistryListResultPreparer() (*http.Request, er autorest.WithBaseURL(to.String(client.NextLink))) } -// RegistryNameCheckRequest is a request to check whether a container registry -// name is available. +// RegistryNameCheckRequest is a request to check whether a container registry name is available. type RegistryNameCheckRequest struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } -// RegistryNameStatus is the result of a request to check the availability of a -// container registry name. +// RegistryNameStatus is the result of a request to check the availability of a container registry name. type RegistryNameStatus struct { autorest.Response `json:"-"` NameAvailable *bool `json:"nameAvailable,omitempty"` @@ -169,31 +281,88 @@ type RegistryProperties struct { LoginServer *string `json:"loginServer,omitempty"` CreationDate *date.Time `json:"creationDate,omitempty"` ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + Status *Status `json:"status,omitempty"` AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"` StorageAccount *StorageAccountProperties `json:"storageAccount,omitempty"` } -// RegistryPropertiesCreateParameters is the parameters for creating the -// properties of a container registry. -type RegistryPropertiesCreateParameters struct { - AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"` - StorageAccount *StorageAccountParameters `json:"storageAccount,omitempty"` -} - -// RegistryPropertiesUpdateParameters is the parameters for updating the -// properties of a container registry. +// RegistryPropertiesUpdateParameters is the parameters for updating the properties of a container registry. type RegistryPropertiesUpdateParameters struct { AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"` - StorageAccount *StorageAccountParameters `json:"storageAccount,omitempty"` + StorageAccount *StorageAccountProperties `json:"storageAccount,omitempty"` } -// RegistryUpdateParameters is the parameters for updating a container -// registry. +// RegistryUpdateParameters is the parameters for updating a container registry. type RegistryUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` *RegistryPropertiesUpdateParameters `json:"properties,omitempty"` } +// RegistryUsage is the quota usage for a container registry. +type RegistryUsage struct { + Name *string `json:"name,omitempty"` + Limit *int64 `json:"limit,omitempty"` + CurrentValue *int64 `json:"currentValue,omitempty"` + Unit RegistryUsageUnit `json:"unit,omitempty"` +} + +// RegistryUsageListResult is the result of a request to get container registry quota usages. +type RegistryUsageListResult struct { + autorest.Response `json:"-"` + Value *[]RegistryUsage `json:"value,omitempty"` +} + +// Replication is an object that represents a replication for a container registry. +type Replication struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ReplicationProperties `json:"properties,omitempty"` +} + +// ReplicationListResult is the result of a request to list replications for a container registry. +type ReplicationListResult struct { + autorest.Response `json:"-"` + Value *[]Replication `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ReplicationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ReplicationListResult) ReplicationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ReplicationProperties is the properties of a replication. +type ReplicationProperties struct { + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` + Status *Status `json:"status,omitempty"` +} + +// ReplicationUpdateParameters is the parameters for updating a replication. +type ReplicationUpdateParameters struct { + Tags *map[string]*string `json:"tags,omitempty"` +} + +// Request is the request that generated the event. +type Request struct { + ID *string `json:"id,omitempty"` + Addr *string `json:"addr,omitempty"` + Host *string `json:"host,omitempty"` + Method *string `json:"method,omitempty"` + Useragent *string `json:"useragent,omitempty"` +} + // Resource is an Azure resource. type Resource struct { ID *string `json:"id,omitempty"` @@ -205,19 +374,106 @@ type Resource struct { // Sku is the SKU of a container registry. type Sku struct { - Name *string `json:"name,omitempty"` + Name SkuName `json:"name,omitempty"` Tier SkuTier `json:"tier,omitempty"` } -// StorageAccountParameters is the parameters of a storage account for a -// container registry. -type StorageAccountParameters struct { - Name *string `json:"name,omitempty"` - AccessKey *string `json:"accessKey,omitempty"` +// Source is the registry node that generated the event. Put differently, while the actor initiates the event, the +// source generates it. +type Source struct { + Addr *string `json:"addr,omitempty"` + InstanceID *string `json:"instanceID,omitempty"` } -// StorageAccountProperties is the properties of a storage account for a -// container registry. -type StorageAccountProperties struct { - Name *string `json:"name,omitempty"` +// Status is the status of an Azure resource at the time the operation was called. +type Status struct { + DisplayStatus *string `json:"displayStatus,omitempty"` + Message *string `json:"message,omitempty"` + Timestamp *date.Time `json:"timestamp,omitempty"` +} + +// StorageAccountProperties is the properties of a storage account for a container registry. Only applicable to Classic +// SKU. +type StorageAccountProperties struct { + ID *string `json:"id,omitempty"` +} + +// Target is the target of the event. +type Target struct { + MediaType *string `json:"mediaType,omitempty"` + Size *int64 `json:"size,omitempty"` + Digest *string `json:"digest,omitempty"` + Length *int64 `json:"length,omitempty"` + Repository *string `json:"repository,omitempty"` + URL *string `json:"url,omitempty"` + Tag *string `json:"tag,omitempty"` +} + +// Webhook is an object that represents a webhook for a container registry. +type Webhook struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *WebhookProperties `json:"properties,omitempty"` +} + +// WebhookCreateParameters is the parameters for creating a webhook. +type WebhookCreateParameters struct { + Tags *map[string]*string `json:"tags,omitempty"` + Location *string `json:"location,omitempty"` + *WebhookPropertiesCreateParameters `json:"properties,omitempty"` +} + +// WebhookListResult is the result of a request to list webhooks for a container registry. +type WebhookListResult struct { + autorest.Response `json:"-"` + Value *[]Webhook `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// WebhookListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client WebhookListResult) WebhookListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// WebhookProperties is the properties of a webhook. +type WebhookProperties struct { + Status WebhookStatus `json:"status,omitempty"` + Scope *string `json:"scope,omitempty"` + Actions *[]WebhookAction `json:"actions,omitempty"` + ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` +} + +// WebhookPropertiesCreateParameters is the parameters for creating the properties of a webhook. +type WebhookPropertiesCreateParameters struct { + ServiceURI *string `json:"serviceUri,omitempty"` + CustomHeaders *map[string]*string `json:"customHeaders,omitempty"` + Status WebhookStatus `json:"status,omitempty"` + Scope *string `json:"scope,omitempty"` + Actions *[]WebhookAction `json:"actions,omitempty"` +} + +// WebhookPropertiesUpdateParameters is the parameters for updating the properties of a webhook. +type WebhookPropertiesUpdateParameters struct { + ServiceURI *string `json:"serviceUri,omitempty"` + CustomHeaders *map[string]*string `json:"customHeaders,omitempty"` + Status WebhookStatus `json:"status,omitempty"` + Scope *string `json:"scope,omitempty"` + Actions *[]WebhookAction `json:"actions,omitempty"` +} + +// WebhookUpdateParameters is the parameters for updating a webhook. +type WebhookUpdateParameters struct { + Tags *map[string]*string `json:"tags,omitempty"` + *WebhookPropertiesUpdateParameters `json:"properties,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/operations.go index a1694180c..a9143e739 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/operations.go @@ -14,9 +14,8 @@ package containerregistry // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// OperationsClient is the client for the Operations methods of the -// Containerregistry service. +// OperationsClient is the client for the Operations methods of the Containerregistry service. type OperationsClient struct { ManagementClient } @@ -35,14 +33,12 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all of the available Azure Container Registry REST API -// operations. +// List lists all of the available Azure Container Registry REST API operations. func (client OperationsClient) List() (result OperationListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -67,7 +63,7 @@ func (client OperationsClient) List() (result OperationListResult, err error) { // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -122,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationDefinition, <-chan error) { + resultChan := make(chan OperationDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/registries.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/registries.go index fe03ba338..c1c9af59e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/registries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/registries.go @@ -14,9 +14,8 @@ package containerregistry // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// RegistriesClient is the client for the Registries methods of the -// Containerregistry service. +// RegistriesClient is the client for the Registries methods of the Containerregistry service. type RegistriesClient struct { ManagementClient } @@ -36,18 +34,15 @@ func NewRegistriesClient(subscriptionID string) RegistriesClient { return NewRegistriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient -// client. +// NewRegistriesClientWithBaseURI creates an instance of the RegistriesClient client. func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) RegistriesClient { return RegistriesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailability checks whether the container registry name is -// available for use. The name must contain only alphanumeric characters, be -// globally unique, and between 5 and 60 characters in length. +// CheckNameAvailability checks whether the container registry name is available for use. The name must contain only +// alphanumeric characters, be globally unique, and between 5 and 50 characters in length. // -// registryNameCheckRequest is the object containing information for the -// availability request. +// registryNameCheckRequest is the object containing information for the availability request. func (client RegistriesClient) CheckNameAvailability(registryNameCheckRequest RegistryNameCheckRequest) (result RegistryNameStatus, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: registryNameCheckRequest, @@ -87,7 +82,7 @@ func (client RegistriesClient) CheckNameAvailabilityPreparer(registryNameCheckRe "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -121,16 +116,13 @@ func (client RegistriesClient) CheckNameAvailabilityResponder(resp *http.Respons return } -// Create creates a container registry with the specified parameters. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Create creates a container registry with the specified parameters. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the resource group to which the container -// registry belongs. registryName is the name of the container registry. -// registryCreateParameters is the parameters for creating a container -// registry. -func (client RegistriesClient) Create(resourceGroupName string, registryName string, registryCreateParameters RegistryCreateParameters, cancel <-chan struct{}) (<-chan Registry, <-chan error) { +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. registry is the parameters for creating a container registry. +func (client RegistriesClient) Create(resourceGroupName string, registryName string, registry Registry, cancel <-chan struct{}) (<-chan Registry, <-chan error) { resultChan := make(chan Registry, 1) errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ @@ -138,15 +130,11 @@ func (client RegistriesClient) Create(resourceGroupName string, registryName str Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, - {TargetValue: registryCreateParameters, - Constraints: []validation.Constraint{{Target: "registryCreateParameters.Location", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "registryCreateParameters.Sku", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "registryCreateParameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "registryCreateParameters.RegistryPropertiesCreateParameters", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "registryCreateParameters.RegistryPropertiesCreateParameters.StorageAccount", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "registryCreateParameters.RegistryPropertiesCreateParameters.StorageAccount.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "registryCreateParameters.RegistryPropertiesCreateParameters.StorageAccount.AccessKey", Name: validation.Null, Rule: true, Chain: nil}, - }}, + {TargetValue: registry, + Constraints: []validation.Constraint{{Target: "registry.Sku", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "registry.RegistryProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "registry.RegistryProperties.StorageAccount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "registry.RegistryProperties.StorageAccount.ID", Name: validation.Null, Rule: true, Chain: nil}}}, }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "containerregistry.RegistriesClient", "Create") close(errChan) @@ -158,12 +146,14 @@ func (client RegistriesClient) Create(resourceGroupName string, registryName str var err error var result Registry defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() - req, err := client.CreatePreparer(resourceGroupName, registryName, registryCreateParameters, cancel) + req, err := client.CreatePreparer(resourceGroupName, registryName, registry, cancel) if err != nil { err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Create", nil, "Failure preparing request") return @@ -185,14 +175,14 @@ func (client RegistriesClient) Create(resourceGroupName string, registryName str } // CreatePreparer prepares the Create request. -func (client RegistriesClient) CreatePreparer(resourceGroupName string, registryName string, registryCreateParameters RegistryCreateParameters, cancel <-chan struct{}) (*http.Request, error) { +func (client RegistriesClient) CreatePreparer(resourceGroupName string, registryName string, registry Registry, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "registryName": autorest.Encode("path", registryName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -202,7 +192,7 @@ func (client RegistriesClient) CreatePreparer(resourceGroupName string, registry autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}", pathParameters), - autorest.WithJSON(registryCreateParameters), + autorest.WithJSON(registry), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) } @@ -221,56 +211,73 @@ func (client RegistriesClient) CreateResponder(resp *http.Response) (result Regi err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// Delete deletes a container registry. +// Delete deletes a container registry. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group to which the container -// registry belongs. registryName is the name of the container registry. -func (client RegistriesClient) Delete(resourceGroupName string, registryName string) (result autorest.Response, err error) { +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. +func (client RegistriesClient) Delete(resourceGroupName string, registryName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: registryName, Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "containerregistry.RegistriesClient", "Delete") + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.RegistriesClient", "Delete") + close(errChan) + close(resultChan) + return resultChan, errChan } - req, err := client.DeletePreparer(resourceGroupName, registryName) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", nil, "Failure preparing request") - return - } + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, registryName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", nil, "Failure preparing request") + return + } - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", resp, "Failure sending request") - return - } + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", resp, "Failure sending request") + return + } - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", resp, "Failure responding to request") - } - - return + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan } // DeletePreparer prepares the Delete request. -func (client RegistriesClient) DeletePreparer(resourceGroupName string, registryName string) (*http.Request, error) { +func (client RegistriesClient) DeletePreparer(resourceGroupName string, registryName string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "registryName": autorest.Encode("path", registryName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -280,13 +287,15 @@ func (client RegistriesClient) DeletePreparer(resourceGroupName string, registry autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}", pathParameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client RegistriesClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } // DeleteResponder handles the response to the Delete request. The method always @@ -295,7 +304,7 @@ func (client RegistriesClient) DeleteResponder(resp *http.Response) (result auto err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -303,8 +312,8 @@ func (client RegistriesClient) DeleteResponder(resp *http.Response) (result auto // Get gets the properties of the specified container registry. // -// resourceGroupName is the name of the resource group to which the container -// registry belongs. registryName is the name of the container registry. +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. func (client RegistriesClient) Get(resourceGroupName string, registryName string) (result Registry, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: registryName, @@ -343,7 +352,7 @@ func (client RegistriesClient) GetPreparer(resourceGroupName string, registryNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -404,7 +413,7 @@ func (client RegistriesClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -460,11 +469,54 @@ func (client RegistriesClient) ListNextResults(lastResults RegistryListResult) ( return } -// ListByResourceGroup lists all the container registries under the specified -// resource group. +// ListComplete gets all elements from the list without paging. +func (client RegistriesClient) ListComplete(cancel <-chan struct{}) (<-chan Registry, <-chan error) { + resultChan := make(chan Registry) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup lists all the container registries under the specified resource group. // -// resourceGroupName is the name of the resource group to which the container -// registry belongs. +// resourceGroupName is the name of the resource group to which the container registry belongs. func (client RegistriesClient) ListByResourceGroup(resourceGroupName string) (result RegistryListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { @@ -494,7 +546,7 @@ func (client RegistriesClient) ListByResourceGroupPreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -550,11 +602,55 @@ func (client RegistriesClient) ListByResourceGroupNextResults(lastResults Regist return } -// ListCredentials lists the login credentials for the specified container -// registry. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client RegistriesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Registry, <-chan error) { + resultChan := make(chan Registry) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListCredentials lists the login credentials for the specified container registry. // -// resourceGroupName is the name of the resource group to which the container -// registry belongs. registryName is the name of the container registry. +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. func (client RegistriesClient) ListCredentials(resourceGroupName string, registryName string) (result RegistryListCredentialsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: registryName, @@ -593,7 +689,7 @@ func (client RegistriesClient) ListCredentialsPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -625,13 +721,85 @@ func (client RegistriesClient) ListCredentialsResponder(resp *http.Response) (re return } -// RegenerateCredential regenerates one of the login credentials for the -// specified container registry. +// ListUsages gets the quota usages for the specified container registry. // -// resourceGroupName is the name of the resource group to which the container -// registry belongs. registryName is the name of the container registry. -// regenerateCredentialParameters is specifies name of the password which -// should be regenerated -- password or password2. +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. +func (client RegistriesClient) ListUsages(resourceGroupName string, registryName string) (result RegistryUsageListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.RegistriesClient", "ListUsages") + } + + req, err := client.ListUsagesPreparer(resourceGroupName, registryName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListUsages", nil, "Failure preparing request") + return + } + + resp, err := client.ListUsagesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListUsages", resp, "Failure sending request") + return + } + + result, err = client.ListUsagesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "ListUsages", resp, "Failure responding to request") + } + + return +} + +// ListUsagesPreparer prepares the ListUsages request. +func (client RegistriesClient) ListUsagesPreparer(resourceGroupName string, registryName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListUsagesSender sends the ListUsages request. The method will close the +// http.Response Body if it receives an error. +func (client RegistriesClient) ListUsagesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListUsagesResponder handles the response to the ListUsages request. The method always +// closes the http.Response Body. +func (client RegistriesClient) ListUsagesResponder(resp *http.Response) (result RegistryUsageListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegenerateCredential regenerates one of the login credentials for the specified container registry. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. regenerateCredentialParameters is specifies name of the password which should be +// regenerated -- password or password2. func (client RegistriesClient) RegenerateCredential(resourceGroupName string, registryName string, regenerateCredentialParameters RegenerateCredentialParameters) (result RegistryListCredentialsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: registryName, @@ -670,7 +838,7 @@ func (client RegistriesClient) RegenerateCredentialPreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -704,51 +872,67 @@ func (client RegistriesClient) RegenerateCredentialResponder(resp *http.Response return } -// Update updates a container registry with the specified parameters. +// Update updates a container registry with the specified parameters. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the resource group to which the container -// registry belongs. registryName is the name of the container registry. -// registryUpdateParameters is the parameters for updating a container -// registry. -func (client RegistriesClient) Update(resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters) (result Registry, err error) { +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. registryUpdateParameters is the parameters for updating a container registry. +func (client RegistriesClient) Update(resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters, cancel <-chan struct{}) (<-chan Registry, <-chan error) { + resultChan := make(chan Registry, 1) + errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: registryName, Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "containerregistry.RegistriesClient", "Update") + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.RegistriesClient", "Update") + close(errChan) + close(resultChan) + return resultChan, errChan } - req, err := client.UpdatePreparer(resourceGroupName, registryName, registryUpdateParameters) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", nil, "Failure preparing request") - return - } + go func() { + var err error + var result Registry + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, registryName, registryUpdateParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", nil, "Failure preparing request") + return + } - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", resp, "Failure sending request") - return - } + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", resp, "Failure sending request") + return + } - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", resp, "Failure responding to request") - } - - return + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan } // UpdatePreparer prepares the Update request. -func (client RegistriesClient) UpdatePreparer(resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters) (*http.Request, error) { +func (client RegistriesClient) UpdatePreparer(resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "registryName": autorest.Encode("path", registryName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -760,13 +944,15 @@ func (client RegistriesClient) UpdatePreparer(resourceGroupName string, registry autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}", pathParameters), autorest.WithJSON(registryUpdateParameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } // UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. func (client RegistriesClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } // UpdateResponder handles the response to the Update request. The method always @@ -775,7 +961,7 @@ func (client RegistriesClient) UpdateResponder(resp *http.Response) (result Regi err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/replications.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/replications.go new file mode 100644 index 000000000..79fce2d21 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/replications.go @@ -0,0 +1,564 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ReplicationsClient is the client for the Replications methods of the Containerregistry service. +type ReplicationsClient struct { + ManagementClient +} + +// NewReplicationsClient creates an instance of the ReplicationsClient client. +func NewReplicationsClient(subscriptionID string) ReplicationsClient { + return NewReplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewReplicationsClientWithBaseURI creates an instance of the ReplicationsClient client. +func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) ReplicationsClient { + return ReplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a replication for a container registry with the specified parameters. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. replicationName is the name of the replication. replication is the parameters for +// creating a replication. +func (client ReplicationsClient) Create(resourceGroupName string, registryName string, replicationName string, replication Replication, cancel <-chan struct{}) (<-chan Replication, <-chan error) { + resultChan := make(chan Replication, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: replicationName, + Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.ReplicationsClient", "Create") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result Replication + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreatePreparer(resourceGroupName, registryName, replicationName, replication, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Create", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreatePreparer prepares the Create request. +func (client ReplicationsClient) CreatePreparer(resourceGroupName string, registryName string, replicationName string, replication Replication, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "replicationName": autorest.Encode("path", replicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}", pathParameters), + autorest.WithJSON(replication), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationsClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ReplicationsClient) CreateResponder(resp *http.Response) (result Replication, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a replication from a container registry. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. replicationName is the name of the replication. +func (client ReplicationsClient) Delete(resourceGroupName string, registryName string, replicationName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: replicationName, + Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.ReplicationsClient", "Delete") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, registryName, replicationName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationsClient) DeletePreparer(resourceGroupName string, registryName string, replicationName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "replicationName": autorest.Encode("path", replicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the properties of the specified replication. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. replicationName is the name of the replication. +func (client ReplicationsClient) Get(resourceGroupName string, registryName string, replicationName string) (result Replication, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: replicationName, + Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.ReplicationsClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, registryName, replicationName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationsClient) GetPreparer(resourceGroupName string, registryName string, replicationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "replicationName": autorest.Encode("path", replicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationsClient) GetResponder(resp *http.Response) (result Replication, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the replications for the specified container registry. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. +func (client ReplicationsClient) List(resourceGroupName string, registryName string) (result ReplicationListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.ReplicationsClient", "List") + } + + req, err := client.ListPreparer(resourceGroupName, registryName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationsClient) ListPreparer(resourceGroupName string, registryName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationsClient) ListResponder(resp *http.Response) (result ReplicationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client ReplicationsClient) ListNextResults(lastResults ReplicationListResult) (result ReplicationListResult, err error) { + req, err := lastResults.ReplicationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client ReplicationsClient) ListComplete(resourceGroupName string, registryName string, cancel <-chan struct{}) (<-chan Replication, <-chan error) { + resultChan := make(chan Replication) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, registryName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates a replication for a container registry with the specified parameters. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. replicationName is the name of the replication. replicationUpdateParameters is the +// parameters for updating a replication. +func (client ReplicationsClient) Update(resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters ReplicationUpdateParameters, cancel <-chan struct{}) (<-chan Replication, <-chan error) { + resultChan := make(chan Replication, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: replicationName, + Constraints: []validation.Constraint{{Target: "replicationName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "replicationName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "replicationName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.ReplicationsClient", "Update") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result Replication + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, registryName, replicationName, replicationUpdateParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client ReplicationsClient) UpdatePreparer(resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters ReplicationUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "replicationName": autorest.Encode("path", replicationName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}", pathParameters), + autorest.WithJSON(replicationUpdateParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ReplicationsClient) UpdateResponder(resp *http.Response) (result Replication, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go index 9b3a4037a..ab34e4801 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/version.go @@ -14,15 +14,15 @@ package containerregistry // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-containerregistry/2017-06-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-containerregistry/2017-10-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/webhooks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/webhooks.go new file mode 100644 index 000000000..ff5f9ce78 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerregistry/webhooks.go @@ -0,0 +1,875 @@ +package containerregistry + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// WebhooksClient is the client for the Webhooks methods of the Containerregistry service. +type WebhooksClient struct { + ManagementClient +} + +// NewWebhooksClient creates an instance of the WebhooksClient client. +func NewWebhooksClient(subscriptionID string) WebhooksClient { + return NewWebhooksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWebhooksClientWithBaseURI creates an instance of the WebhooksClient client. +func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) WebhooksClient { + return WebhooksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a webhook for a container registry with the specified parameters. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. webhookName is the name of the webhook. webhookCreateParameters is the parameters +// for creating a webhook. +func (client WebhooksClient) Create(resourceGroupName string, registryName string, webhookName string, webhookCreateParameters WebhookCreateParameters, cancel <-chan struct{}) (<-chan Webhook, <-chan error) { + resultChan := make(chan Webhook, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookName, + Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookCreateParameters, + Constraints: []validation.Constraint{{Target: "webhookCreateParameters.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "webhookCreateParameters.WebhookPropertiesCreateParameters", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "webhookCreateParameters.WebhookPropertiesCreateParameters.ServiceURI", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "webhookCreateParameters.WebhookPropertiesCreateParameters.Actions", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "Create") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result Webhook + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreatePreparer(resourceGroupName, registryName, webhookName, webhookCreateParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Create", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreatePreparer prepares the Create request. +func (client WebhooksClient) CreatePreparer(resourceGroupName string, registryName string, webhookName string, webhookCreateParameters WebhookCreateParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webhookName": autorest.Encode("path", webhookName), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", pathParameters), + autorest.WithJSON(webhookCreateParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client WebhooksClient) CreateResponder(resp *http.Response) (result Webhook, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a webhook from a container registry. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. webhookName is the name of the webhook. +func (client WebhooksClient) Delete(resourceGroupName string, registryName string, webhookName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookName, + Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "Delete") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, registryName, webhookName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client WebhooksClient) DeletePreparer(resourceGroupName string, registryName string, webhookName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webhookName": autorest.Encode("path", webhookName), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client WebhooksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the properties of the specified webhook. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. webhookName is the name of the webhook. +func (client WebhooksClient) Get(resourceGroupName string, registryName string, webhookName string) (result Webhook, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookName, + Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, registryName, webhookName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client WebhooksClient) GetPreparer(resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webhookName": autorest.Encode("path", webhookName), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client WebhooksClient) GetResponder(resp *http.Response) (result Webhook, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetCallbackConfig gets the configuration of service URI and custom headers for the webhook. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. webhookName is the name of the webhook. +func (client WebhooksClient) GetCallbackConfig(resourceGroupName string, registryName string, webhookName string) (result CallbackConfig, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookName, + Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "GetCallbackConfig") + } + + req, err := client.GetCallbackConfigPreparer(resourceGroupName, registryName, webhookName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "GetCallbackConfig", nil, "Failure preparing request") + return + } + + resp, err := client.GetCallbackConfigSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "GetCallbackConfig", resp, "Failure sending request") + return + } + + result, err = client.GetCallbackConfigResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "GetCallbackConfig", resp, "Failure responding to request") + } + + return +} + +// GetCallbackConfigPreparer prepares the GetCallbackConfig request. +func (client WebhooksClient) GetCallbackConfigPreparer(resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webhookName": autorest.Encode("path", webhookName), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetCallbackConfigSender sends the GetCallbackConfig request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) GetCallbackConfigSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetCallbackConfigResponder handles the response to the GetCallbackConfig request. The method always +// closes the http.Response Body. +func (client WebhooksClient) GetCallbackConfigResponder(resp *http.Response) (result CallbackConfig, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists all the webhooks for the specified container registry. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. +func (client WebhooksClient) List(resourceGroupName string, registryName string) (result WebhookListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "List") + } + + req, err := client.ListPreparer(resourceGroupName, registryName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client WebhooksClient) ListPreparer(resourceGroupName string, registryName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client WebhooksClient) ListResponder(resp *http.Response) (result WebhookListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client WebhooksClient) ListNextResults(lastResults WebhookListResult) (result WebhookListResult, err error) { + req, err := lastResults.WebhookListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client WebhooksClient) ListComplete(resourceGroupName string, registryName string, cancel <-chan struct{}) (<-chan Webhook, <-chan error) { + resultChan := make(chan Webhook) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, registryName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListEvents lists recent events for the specified webhook. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. webhookName is the name of the webhook. +func (client WebhooksClient) ListEvents(resourceGroupName string, registryName string, webhookName string) (result EventListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookName, + Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "ListEvents") + } + + req, err := client.ListEventsPreparer(resourceGroupName, registryName, webhookName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", nil, "Failure preparing request") + return + } + + resp, err := client.ListEventsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure sending request") + return + } + + result, err = client.ListEventsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure responding to request") + } + + return +} + +// ListEventsPreparer prepares the ListEvents request. +func (client WebhooksClient) ListEventsPreparer(resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webhookName": autorest.Encode("path", webhookName), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListEventsSender sends the ListEvents request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) ListEventsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListEventsResponder handles the response to the ListEvents request. The method always +// closes the http.Response Body. +func (client WebhooksClient) ListEventsResponder(resp *http.Response) (result EventListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListEventsNextResults retrieves the next set of results, if any. +func (client WebhooksClient) ListEventsNextResults(lastResults EventListResult) (result EventListResult, err error) { + req, err := lastResults.EventListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListEventsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure sending next results request") + } + + result, err = client.ListEventsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "ListEvents", resp, "Failure responding to next results request") + } + + return +} + +// ListEventsComplete gets all elements from the list without paging. +func (client WebhooksClient) ListEventsComplete(resourceGroupName string, registryName string, webhookName string, cancel <-chan struct{}) (<-chan Event, <-chan error) { + resultChan := make(chan Event) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListEvents(resourceGroupName, registryName, webhookName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListEventsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Ping triggers a ping event to be sent to the webhook. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. webhookName is the name of the webhook. +func (client WebhooksClient) Ping(resourceGroupName string, registryName string, webhookName string) (result EventInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookName, + Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "Ping") + } + + req, err := client.PingPreparer(resourceGroupName, registryName, webhookName) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Ping", nil, "Failure preparing request") + return + } + + resp, err := client.PingSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Ping", resp, "Failure sending request") + return + } + + result, err = client.PingResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Ping", resp, "Failure responding to request") + } + + return +} + +// PingPreparer prepares the Ping request. +func (client WebhooksClient) PingPreparer(resourceGroupName string, registryName string, webhookName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webhookName": autorest.Encode("path", webhookName), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// PingSender sends the Ping request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) PingSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// PingResponder handles the response to the Ping request. The method always +// closes the http.Response Body. +func (client WebhooksClient) PingResponder(resp *http.Response) (result EventInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates a webhook with the specified parameters. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group to which the container registry belongs. registryName is the +// name of the container registry. webhookName is the name of the webhook. webhookUpdateParameters is the parameters +// for updating a webhook. +func (client WebhooksClient) Update(resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters WebhookUpdateParameters, cancel <-chan struct{}) (<-chan Webhook, <-chan error) { + resultChan := make(chan Webhook, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: registryName, + Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, + {TargetValue: webhookName, + Constraints: []validation.Constraint{{Target: "webhookName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "webhookName", Name: validation.MinLength, Rule: 5, Chain: nil}, + {Target: "webhookName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "containerregistry.WebhooksClient", "Update") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result Webhook + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, registryName, webhookName, webhookUpdateParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client WebhooksClient) UpdatePreparer(resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters WebhookUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "registryName": autorest.Encode("path", registryName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webhookName": autorest.Encode("path", webhookName), + } + + const APIVersion = "2017-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}", pathParameters), + autorest.WithJSON(webhookUpdateParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client WebhooksClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client WebhooksClient) UpdateResponder(resp *http.Response) (result Webhook, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/client.go index 7aefda8a8..8133d6e50 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/client.go @@ -1,7 +1,6 @@ -// Package containerservice implements the Azure ARM Containerservice service -// API version 2017-01-31. +// Package containerservice implements the Azure ARM Containerservice service API version 2017-01-31. // -// The Container Service Client. +// Compute Client package containerservice // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package containerservice // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/containerservices.go index 6fca953c8..e5c67e5f5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/containerservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/containerservices.go @@ -14,9 +14,8 @@ package containerservice // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,27 @@ import ( "net/http" ) -// ContainerServicesClient is the the Container Service Client. +// ContainerServicesClient is the compute Client type ContainerServicesClient struct { ManagementClient } -// NewContainerServicesClient creates an instance of the -// ContainerServicesClient client. +// NewContainerServicesClient creates an instance of the ContainerServicesClient client. func NewContainerServicesClient(subscriptionID string) ContainerServicesClient { return NewContainerServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewContainerServicesClientWithBaseURI creates an instance of the -// ContainerServicesClient client. +// NewContainerServicesClientWithBaseURI creates an instance of the ContainerServicesClient client. func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string) ContainerServicesClient { return ContainerServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a container service with the specified -// configuration of orchestrator, masters, and agents. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate creates or updates a container service with the specified configuration of orchestrator, masters, and +// agents. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. containerServiceName is -// the name of the container service in the specified subscription and resource -// group. parameters is parameters supplied to the Create or Update a Container +// resourceGroupName is the name of the resource group. containerServiceName is the name of the container service in +// the specified subscription and resource group. parameters is parameters supplied to the Create or Update a Container // Service operation. func (client ContainerServicesClient) CreateOrUpdate(resourceGroupName string, containerServiceName string, parameters ContainerService, cancel <-chan struct{}) (<-chan ContainerService, <-chan error) { resultChan := make(chan ContainerService, 1) @@ -94,8 +88,10 @@ func (client ContainerServicesClient) CreateOrUpdate(resourceGroupName string, c var err error var result ContainerService defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -164,18 +160,14 @@ func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Respons return } -// Delete deletes the specified container service in the specified subscription -// and resource group. The operation does not delete other resources created as -// part of creating a container service, including storage accounts, VMs, and -// availability sets. All the other resources created with the container -// service are part of the same resource group and can be deleted individually. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Delete deletes the specified container service in the specified subscription and resource group. The operation does +// not delete other resources created as part of creating a container service, including storage accounts, VMs, and +// availability sets. All the other resources created with the container service are part of the same resource group +// and can be deleted individually. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. containerServiceName is -// the name of the container service in the specified subscription and resource -// group. +// resourceGroupName is the name of the resource group. containerServiceName is the name of the container service in +// the specified subscription and resource group. func (client ContainerServicesClient) Delete(resourceGroupName string, containerServiceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -183,8 +175,10 @@ func (client ContainerServicesClient) Delete(resourceGroupName string, container var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -250,14 +244,12 @@ func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (resu return } -// Get gets the properties of the specified container service in the specified -// subscription and resource group. The operation returns the properties -// including state, orchestrator, number of masters and agents, and FQDNs of -// masters and agents. +// Get gets the properties of the specified container service in the specified subscription and resource group. The +// operation returns the properties including state, orchestrator, number of masters and agents, and FQDNs of masters +// and agents. // -// resourceGroupName is the name of the resource group. containerServiceName is -// the name of the container service in the specified subscription and resource -// group. +// resourceGroupName is the name of the resource group. containerServiceName is the name of the container service in +// the specified subscription and resource group. func (client ContainerServicesClient) Get(resourceGroupName string, containerServiceName string) (result ContainerService, err error) { req, err := client.GetPreparer(resourceGroupName, containerServiceName) if err != nil { @@ -320,9 +312,8 @@ func (client ContainerServicesClient) GetResponder(resp *http.Response) (result return } -// List gets a list of container services in the specified subscription. The -// operation returns properties of each container service including state, -// orchestrator, number of masters and agents, and FQDNs of masters and agents. +// List gets a list of container services in the specified subscription. The operation returns properties of each +// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents. func (client ContainerServicesClient) List() (result ListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -407,10 +398,54 @@ func (client ContainerServicesClient) ListNextResults(lastResults ListResult) (r return } -// ListByResourceGroup gets a list of container services in the specified -// subscription and resource group. The operation returns properties of each -// container service including state, orchestrator, number of masters and -// agents, and FQDNs of masters and agents. +// ListComplete gets all elements from the list without paging. +func (client ContainerServicesClient) ListComplete(cancel <-chan struct{}) (<-chan ContainerService, <-chan error) { + resultChan := make(chan ContainerService) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup gets a list of container services in the specified subscription and resource group. The +// operation returns properties of each container service including state, orchestrator, number of masters and agents, +// and FQDNs of masters and agents. // // resourceGroupName is the name of the resource group. func (client ContainerServicesClient) ListByResourceGroup(resourceGroupName string) (result ListResult, err error) { @@ -497,3 +532,48 @@ func (client ContainerServicesClient) ListByResourceGroupNextResults(lastResults return } + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ContainerServicesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ContainerService, <-chan error) { + resultChan := make(chan ContainerService) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/models.go index 852420c66..a46a87d4b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/models.go @@ -14,9 +14,8 @@ package containerservice // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,18 +23,18 @@ import ( "net/http" ) -// OchestratorTypes enumerates the values for ochestrator types. -type OchestratorTypes string +// OrchestratorTypes enumerates the values for orchestrator types. +type OrchestratorTypes string const ( - // Custom specifies the custom state for ochestrator types. - Custom OchestratorTypes = "Custom" - // DCOS specifies the dcos state for ochestrator types. - DCOS OchestratorTypes = "DCOS" - // Kubernetes specifies the kubernetes state for ochestrator types. - Kubernetes OchestratorTypes = "Kubernetes" - // Swarm specifies the swarm state for ochestrator types. - Swarm OchestratorTypes = "Swarm" + // Custom specifies the custom state for orchestrator types. + Custom OrchestratorTypes = "Custom" + // DCOS specifies the dcos state for orchestrator types. + DCOS OrchestratorTypes = "DCOS" + // Kubernetes specifies the kubernetes state for orchestrator types. + Kubernetes OrchestratorTypes = "Kubernetes" + // Swarm specifies the swarm state for orchestrator types. + Swarm OrchestratorTypes = "Swarm" ) // VMSizeTypes enumerates the values for vm size types. @@ -202,7 +201,7 @@ type MasterProfile struct { // OrchestratorProfile is profile for the container service orchestrator. type OrchestratorProfile struct { - OrchestratorType OchestratorTypes `json:"orchestratorType,omitempty"` + OrchestratorType OrchestratorTypes `json:"orchestratorType,omitempty"` } // Properties is properties of the container service. @@ -227,14 +226,14 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ServicePrincipalProfile is information about a service principal identity -// for the cluster to use for manipulating Azure APIs. +// ServicePrincipalProfile is information about a service principal identity for the cluster to use for manipulating +// Azure APIs. type ServicePrincipalProfile struct { ClientID *string `json:"clientId,omitempty"` Secret *string `json:"secret,omitempty"` } -// SSHConfiguration is sSH configuration for Linux-based VMs running on Azure. +// SSHConfiguration is SSH configuration for Linux-based VMs running on Azure. type SSHConfiguration struct { PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go index 07bef1e72..d926c410a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/containerservice/version.go @@ -14,15 +14,15 @@ package containerservice // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-containerservice/2017-01-31" + return "Azure-SDK-For-Go/v11.0.0-beta arm-containerservice/2017-01-31" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/client.go index 58e3e951d..a5d9da5db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/client.go @@ -17,7 +17,7 @@ package cosmosdb // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/databaseaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/databaseaccounts.go index f6c65d6a8..8bbfc52ca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/databaseaccounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/databaseaccounts.go @@ -14,7 +14,7 @@ package cosmosdb // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/models.go index 3fc98e79b..45b45dd36 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/models.go @@ -14,11 +14,13 @@ package cosmosdb // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/to" + "net/http" ) // DatabaseAccountKind enumerates the values for database account kind. @@ -187,6 +189,40 @@ type Location struct { FailoverPriority *int32 `json:"failoverPriority,omitempty"` } +// Operation is REST API operation +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay is the object that represents the operation. +type OperationDisplay struct { + Provider *string `json:"Provider,omitempty"` + Resource *string `json:"Resource,omitempty"` + Operation *string `json:"Operation,omitempty"` + Description *string `json:"Description,omitempty"` +} + +// OperationListResult is result of the request to list Resource Provider operations. It contains a list of operations +// and a URL link to get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // Resource is a database account resource. type Resource struct { ID *string `json:"id,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/operations.go new file mode 100644 index 000000000..305a47122 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/operations.go @@ -0,0 +1,165 @@ +package cosmosdb + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the azure Cosmos DB Database Service Resource Provider REST API +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available Cosmos DB Resource Provider operations. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "cosmosdb.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "cosmosdb.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cosmosdb.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2015-04-08" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.DocumentDB/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.OperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "cosmosdb.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "cosmosdb.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "cosmosdb.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go index 4bfe34cfc..fa55b1042 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/cosmos-db/version.go @@ -14,15 +14,15 @@ package cosmosdb // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-cosmosdb/2015-04-08" + return "Azure-SDK-For-Go/v11.0.0-beta arm-cosmosdb/2015-04-08" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/authorizationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/authorizationpolicies.go index fb08c5a4d..507d85763 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/authorizationpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/authorizationpolicies.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,27 @@ import ( "net/http" ) -// AuthorizationPoliciesClient is the the Azure Customer Insights management -// API provides a RESTful set of web services that interact with Azure Customer -// Insights service to manage your resources. The API has entities that capture -// the relationship between an end user and the Azure Customer Insights -// service. +// AuthorizationPoliciesClient is the the Azure Customer Insights management API provides a RESTful set of web services +// that interact with Azure Customer Insights service to manage your resources. The API has entities that capture the +// relationship between an end user and the Azure Customer Insights service. type AuthorizationPoliciesClient struct { ManagementClient } -// NewAuthorizationPoliciesClient creates an instance of the -// AuthorizationPoliciesClient client. +// NewAuthorizationPoliciesClient creates an instance of the AuthorizationPoliciesClient client. func NewAuthorizationPoliciesClient(subscriptionID string) AuthorizationPoliciesClient { return NewAuthorizationPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAuthorizationPoliciesClientWithBaseURI creates an instance of the -// AuthorizationPoliciesClient client. +// NewAuthorizationPoliciesClientWithBaseURI creates an instance of the AuthorizationPoliciesClient client. func NewAuthorizationPoliciesClientWithBaseURI(baseURI string, subscriptionID string) AuthorizationPoliciesClient { return AuthorizationPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates an authorization policy or updates an existing -// authorization policy. +// CreateOrUpdate creates an authorization policy or updates an existing authorization policy. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. authorizationPolicyName is the name of the policy. parameters is -// parameters supplied to the CreateOrUpdate authorization policy operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. authorizationPolicyName is the +// name of the policy. parameters is parameters supplied to the CreateOrUpdate authorization policy operation. func (client AuthorizationPoliciesClient) CreateOrUpdate(resourceGroupName string, hubName string, authorizationPolicyName string, parameters AuthorizationPolicyResourceFormat) (result AuthorizationPolicyResourceFormat, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: authorizationPolicyName, @@ -96,7 +89,7 @@ func (client AuthorizationPoliciesClient) CreateOrUpdatePreparer(resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -132,8 +125,8 @@ func (client AuthorizationPoliciesClient) CreateOrUpdateResponder(resp *http.Res // Get gets an authorization policy in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. authorizationPolicyName is the name of the policy. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. authorizationPolicyName is the +// name of the policy. func (client AuthorizationPoliciesClient) Get(resourceGroupName string, hubName string, authorizationPolicyName string) (result AuthorizationPolicyResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, authorizationPolicyName) if err != nil { @@ -165,7 +158,7 @@ func (client AuthorizationPoliciesClient) GetPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,8 +192,7 @@ func (client AuthorizationPoliciesClient) GetResponder(resp *http.Response) (res // ListByHub gets all the authorization policies in a specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client AuthorizationPoliciesClient) ListByHub(resourceGroupName string, hubName string) (result AuthorizationPolicyListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -231,7 +223,7 @@ func (client AuthorizationPoliciesClient) ListByHubPreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -287,11 +279,55 @@ func (client AuthorizationPoliciesClient) ListByHubNextResults(lastResults Autho return } -// RegeneratePrimaryKey regenerates the primary policy key of the specified -// authorization policy. +// ListByHubComplete gets all elements from the list without paging. +func (client AuthorizationPoliciesClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan AuthorizationPolicyResourceFormat, <-chan error) { + resultChan := make(chan AuthorizationPolicyResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// RegeneratePrimaryKey regenerates the primary policy key of the specified authorization policy. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. authorizationPolicyName is the name of the policy. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. authorizationPolicyName is the +// name of the policy. func (client AuthorizationPoliciesClient) RegeneratePrimaryKey(resourceGroupName string, hubName string, authorizationPolicyName string) (result AuthorizationPolicy, err error) { req, err := client.RegeneratePrimaryKeyPreparer(resourceGroupName, hubName, authorizationPolicyName) if err != nil { @@ -323,7 +359,7 @@ func (client AuthorizationPoliciesClient) RegeneratePrimaryKeyPreparer(resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -355,11 +391,10 @@ func (client AuthorizationPoliciesClient) RegeneratePrimaryKeyResponder(resp *ht return } -// RegenerateSecondaryKey regenerates the secondary policy key of the specified -// authorization policy. +// RegenerateSecondaryKey regenerates the secondary policy key of the specified authorization policy. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. authorizationPolicyName is the name of the policy. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. authorizationPolicyName is the +// name of the policy. func (client AuthorizationPoliciesClient) RegenerateSecondaryKey(resourceGroupName string, hubName string, authorizationPolicyName string) (result AuthorizationPolicy, err error) { req, err := client.RegenerateSecondaryKeyPreparer(resourceGroupName, hubName, authorizationPolicyName) if err != nil { @@ -391,7 +426,7 @@ func (client AuthorizationPoliciesClient) RegenerateSecondaryKeyPreparer(resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/client.go index 7161204a7..33c0a820d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/client.go @@ -1,10 +1,8 @@ -// Package customerinsights implements the Azure ARM Customerinsights service -// API version 2017-01-01. +// Package customerinsights implements the Azure ARM Customerinsights service API version 2017-04-26. // -// The Azure Customer Insights management API provides a RESTful set of web -// services that interact with Azure Customer Insights service to manage your -// resources. The API has entities that capture the relationship between an end -// user and the Azure Customer Insights service. +// The Azure Customer Insights management API provides a RESTful set of web services that interact with Azure Customer +// Insights service to manage your resources. The API has entities that capture the relationship between an end user +// and the Azure Customer Insights service. package customerinsights // Copyright (c) Microsoft and contributors. All rights reserved. @@ -21,9 +19,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectormappings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectormappings.go index fd13b7d69..43c968d4d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectormappings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectormappings.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,27 @@ import ( "net/http" ) -// ConnectorMappingsClient is the the Azure Customer Insights management API -// provides a RESTful set of web services that interact with Azure Customer -// Insights service to manage your resources. The API has entities that capture -// the relationship between an end user and the Azure Customer Insights -// service. +// ConnectorMappingsClient is the the Azure Customer Insights management API provides a RESTful set of web services +// that interact with Azure Customer Insights service to manage your resources. The API has entities that capture the +// relationship between an end user and the Azure Customer Insights service. type ConnectorMappingsClient struct { ManagementClient } -// NewConnectorMappingsClient creates an instance of the -// ConnectorMappingsClient client. +// NewConnectorMappingsClient creates an instance of the ConnectorMappingsClient client. func NewConnectorMappingsClient(subscriptionID string) ConnectorMappingsClient { return NewConnectorMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectorMappingsClientWithBaseURI creates an instance of the -// ConnectorMappingsClient client. +// NewConnectorMappingsClientWithBaseURI creates an instance of the ConnectorMappingsClient client. func NewConnectorMappingsClientWithBaseURI(baseURI string, subscriptionID string) ConnectorMappingsClient { return ConnectorMappingsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a connector mapping or updates an existing connector -// mapping in the connector. +// CreateOrUpdate creates a connector mapping or updates an existing connector mapping in the connector. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. connectorName is the name of the connector. mappingName is the name -// of the connector mapping. parameters is parameters supplied to the +// resourceGroupName is the name of the resource group. hubName is the name of the hub. connectorName is the name of +// the connector. mappingName is the name of the connector mapping. parameters is parameters supplied to the // CreateOrUpdate Connector Mapping operation. func (client ConnectorMappingsClient) CreateOrUpdate(resourceGroupName string, hubName string, connectorName string, mappingName string, parameters ConnectorMappingResourceFormat) (result ConnectorMappingResourceFormat, err error) { if err := validation.Validate([]validation.Validation{ @@ -106,7 +99,7 @@ func (client ConnectorMappingsClient) CreateOrUpdatePreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -142,9 +135,8 @@ func (client ConnectorMappingsClient) CreateOrUpdateResponder(resp *http.Respons // Delete deletes a connector mapping in the connector. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. connectorName is the name of the connector. mappingName is the name -// of the connector mapping. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. connectorName is the name of +// the connector. mappingName is the name of the connector mapping. func (client ConnectorMappingsClient) Delete(resourceGroupName string, hubName string, connectorName string, mappingName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, hubName, connectorName, mappingName) if err != nil { @@ -177,7 +169,7 @@ func (client ConnectorMappingsClient) DeletePreparer(resourceGroupName string, h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -210,9 +202,8 @@ func (client ConnectorMappingsClient) DeleteResponder(resp *http.Response) (resu // Get gets a connector mapping in the connector. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. connectorName is the name of the connector. mappingName is the name -// of the connector mapping. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. connectorName is the name of +// the connector. mappingName is the name of the connector mapping. func (client ConnectorMappingsClient) Get(resourceGroupName string, hubName string, connectorName string, mappingName string) (result ConnectorMappingResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, connectorName, mappingName) if err != nil { @@ -245,7 +236,7 @@ func (client ConnectorMappingsClient) GetPreparer(resourceGroupName string, hubN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -279,8 +270,8 @@ func (client ConnectorMappingsClient) GetResponder(resp *http.Response) (result // ListByConnector gets all the connector mappings in the specified connector. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. connectorName is the name of the connector. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. connectorName is the name of +// the connector. func (client ConnectorMappingsClient) ListByConnector(resourceGroupName string, hubName string, connectorName string) (result ConnectorMappingListResult, err error) { req, err := client.ListByConnectorPreparer(resourceGroupName, hubName, connectorName) if err != nil { @@ -312,7 +303,7 @@ func (client ConnectorMappingsClient) ListByConnectorPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -367,3 +358,48 @@ func (client ConnectorMappingsClient) ListByConnectorNextResults(lastResults Con return } + +// ListByConnectorComplete gets all elements from the list without paging. +func (client ConnectorMappingsClient) ListByConnectorComplete(resourceGroupName string, hubName string, connectorName string, cancel <-chan struct{}) (<-chan ConnectorMappingResourceFormat, <-chan error) { + resultChan := make(chan ConnectorMappingResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByConnector(resourceGroupName, hubName, connectorName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByConnectorNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectors.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectors.go index de3ff1d82..3386c6930 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/connectors.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,9 +24,8 @@ import ( "net/http" ) -// ConnectorsClient is the the Azure Customer Insights management API provides -// a RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the +// ConnectorsClient is the the Azure Customer Insights management API provides a RESTful set of web services that +// interact with Azure Customer Insights service to manage your resources. The API has entities that capture the // relationship between an end user and the Azure Customer Insights service. type ConnectorsClient struct { ManagementClient @@ -38,20 +36,17 @@ func NewConnectorsClient(subscriptionID string) ConnectorsClient { return NewConnectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConnectorsClientWithBaseURI creates an instance of the ConnectorsClient -// client. +// NewConnectorsClientWithBaseURI creates an instance of the ConnectorsClient client. func NewConnectorsClientWithBaseURI(baseURI string, subscriptionID string) ConnectorsClient { return ConnectorsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a connector or updates an existing connector in the -// hub. This method may poll for completion. Polling can be canceled by passing -// the cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// CreateOrUpdate creates a connector or updates an existing connector in the hub. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. connectorName is the name of the connector. parameters is -// parameters supplied to the CreateOrUpdate Connector operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. connectorName is the name of +// the connector. parameters is parameters supplied to the CreateOrUpdate Connector operation. func (client ConnectorsClient) CreateOrUpdate(resourceGroupName string, hubName string, connectorName string, parameters ConnectorResourceFormat, cancel <-chan struct{}) (<-chan ConnectorResourceFormat, <-chan error) { resultChan := make(chan ConnectorResourceFormat, 1) errChan := make(chan error, 1) @@ -73,8 +68,10 @@ func (client ConnectorsClient) CreateOrUpdate(resourceGroupName string, hubName var err error var result ConnectorResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -108,7 +105,7 @@ func (client ConnectorsClient) CreateOrUpdatePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -144,12 +141,11 @@ func (client ConnectorsClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// Delete deletes a connector in the hub. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes a connector in the hub. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. connectorName is the name of the connector. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. connectorName is the name of +// the connector. func (client ConnectorsClient) Delete(resourceGroupName string, hubName string, connectorName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -157,8 +153,10 @@ func (client ConnectorsClient) Delete(resourceGroupName string, hubName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -192,7 +190,7 @@ func (client ConnectorsClient) DeletePreparer(resourceGroupName string, hubName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -227,8 +225,8 @@ func (client ConnectorsClient) DeleteResponder(resp *http.Response) (result auto // Get gets a connector in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. connectorName is the name of the connector. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. connectorName is the name of +// the connector. func (client ConnectorsClient) Get(resourceGroupName string, hubName string, connectorName string) (result ConnectorResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, connectorName) if err != nil { @@ -260,7 +258,7 @@ func (client ConnectorsClient) GetPreparer(resourceGroupName string, hubName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -294,8 +292,7 @@ func (client ConnectorsClient) GetResponder(resp *http.Response) (result Connect // ListByHub gets all the connectors in the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client ConnectorsClient) ListByHub(resourceGroupName string, hubName string) (result ConnectorListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -326,7 +323,7 @@ func (client ConnectorsClient) ListByHubPreparer(resourceGroupName string, hubNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -381,3 +378,48 @@ func (client ConnectorsClient) ListByHubNextResults(lastResults ConnectorListRes return } + +// ListByHubComplete gets all elements from the list without paging. +func (client ConnectorsClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan ConnectorResourceFormat, <-chan error) { + resultChan := make(chan ConnectorResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/hubs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/hubs.go index 42becee80..f21cf2716 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/hubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/hubs.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// HubsClient is the the Azure Customer Insights management API provides a -// RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the -// relationship between an end user and the Azure Customer Insights service. +// HubsClient is the the Azure Customer Insights management API provides a RESTful set of web services that interact +// with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship +// between an end user and the Azure Customer Insights service. type HubsClient struct { ManagementClient } @@ -45,9 +43,8 @@ func NewHubsClientWithBaseURI(baseURI string, subscriptionID string) HubsClient // CreateOrUpdate creates a hub, or updates an existing hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the Hub. parameters is parameters supplied to the CreateOrUpdate Hub -// operation. +// resourceGroupName is the name of the resource group. hubName is the name of the Hub. parameters is parameters +// supplied to the CreateOrUpdate Hub operation. func (client HubsClient) CreateOrUpdate(resourceGroupName string, hubName string, parameters Hub) (result Hub, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: hubName, @@ -99,7 +96,7 @@ func (client HubsClient) CreateOrUpdatePreparer(resourceGroupName string, hubNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -133,12 +130,10 @@ func (client HubsClient) CreateOrUpdateResponder(resp *http.Response) (result Hu return } -// Delete deletes the specified hub. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified hub. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client HubsClient) Delete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -146,8 +141,10 @@ func (client HubsClient) Delete(resourceGroupName string, hubName string, cancel var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -180,7 +177,7 @@ func (client HubsClient) DeletePreparer(resourceGroupName string, hubName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -215,8 +212,7 @@ func (client HubsClient) DeleteResponder(resp *http.Response) (result autorest.R // Get gets information about the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client HubsClient) Get(resourceGroupName string, hubName string) (result Hub, err error) { req, err := client.GetPreparer(resourceGroupName, hubName) if err != nil { @@ -247,7 +243,7 @@ func (client HubsClient) GetPreparer(resourceGroupName string, hubName string) ( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -308,7 +304,7 @@ func (client HubsClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -364,6 +360,51 @@ func (client HubsClient) ListNextResults(lastResults HubListResult) (result HubL return } +// ListComplete gets all elements from the list without paging. +func (client HubsClient) ListComplete(cancel <-chan struct{}) (<-chan Hub, <-chan error) { + resultChan := make(chan Hub) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup gets all the hubs in a resource group. // // resourceGroupName is the name of the resource group. @@ -396,7 +437,7 @@ func (client HubsClient) ListByResourceGroupPreparer(resourceGroupName string) ( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -452,10 +493,55 @@ func (client HubsClient) ListByResourceGroupNextResults(lastResults HubListResul return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client HubsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Hub, <-chan error) { + resultChan := make(chan Hub) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates a Hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the Hub. parameters is parameters supplied to the Update Hub operation. +// resourceGroupName is the name of the resource group. hubName is the name of the Hub. parameters is parameters +// supplied to the Update Hub operation. func (client HubsClient) Update(resourceGroupName string, hubName string, parameters Hub) (result Hub, err error) { req, err := client.UpdatePreparer(resourceGroupName, hubName, parameters) if err != nil { @@ -486,7 +572,7 @@ func (client HubsClient) UpdatePreparer(resourceGroupName string, hubName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/images.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/images.go index c77ace5a9..645f9a23e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/images.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/images.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,10 +23,9 @@ import ( "net/http" ) -// ImagesClient is the the Azure Customer Insights management API provides a -// RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the -// relationship between an end user and the Azure Customer Insights service. +// ImagesClient is the the Azure Customer Insights management API provides a RESTful set of web services that interact +// with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship +// between an end user and the Azure Customer Insights service. type ImagesClient struct { ManagementClient } @@ -44,9 +42,8 @@ func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesCli // GetUploadURLForData gets data image upload URL. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. parameters is parameters supplied to the GetUploadUrlForData -// operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. parameters is parameters +// supplied to the GetUploadUrlForData operation. func (client ImagesClient) GetUploadURLForData(resourceGroupName string, hubName string, parameters GetImageUploadURLInput) (result ImageDefinition, err error) { req, err := client.GetUploadURLForDataPreparer(resourceGroupName, hubName, parameters) if err != nil { @@ -77,7 +74,7 @@ func (client ImagesClient) GetUploadURLForDataPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -111,12 +108,10 @@ func (client ImagesClient) GetUploadURLForDataResponder(resp *http.Response) (re return } -// GetUploadURLForEntityType gets entity type (profile or interaction) image -// upload URL. +// GetUploadURLForEntityType gets entity type (profile or interaction) image upload URL. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. parameters is parameters supplied to the GetUploadUrlForEntityType -// operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. parameters is parameters +// supplied to the GetUploadUrlForEntityType operation. func (client ImagesClient) GetUploadURLForEntityType(resourceGroupName string, hubName string, parameters GetImageUploadURLInput) (result ImageDefinition, err error) { req, err := client.GetUploadURLForEntityTypePreparer(resourceGroupName, hubName, parameters) if err != nil { @@ -147,7 +142,7 @@ func (client ImagesClient) GetUploadURLForEntityTypePreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/interactions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/interactions.go index 1999cf078..a9b9a0fe8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/interactions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/interactions.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,11 +24,9 @@ import ( "net/http" ) -// InteractionsClient is the the Azure Customer Insights management API -// provides a RESTful set of web services that interact with Azure Customer -// Insights service to manage your resources. The API has entities that capture -// the relationship between an end user and the Azure Customer Insights -// service. +// InteractionsClient is the the Azure Customer Insights management API provides a RESTful set of web services that +// interact with Azure Customer Insights service to manage your resources. The API has entities that capture the +// relationship between an end user and the Azure Customer Insights service. type InteractionsClient struct { ManagementClient } @@ -39,20 +36,17 @@ func NewInteractionsClient(subscriptionID string) InteractionsClient { return NewInteractionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInteractionsClientWithBaseURI creates an instance of the -// InteractionsClient client. +// NewInteractionsClientWithBaseURI creates an instance of the InteractionsClient client. func NewInteractionsClientWithBaseURI(baseURI string, subscriptionID string) InteractionsClient { return InteractionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates an interaction or updates an existing interaction -// within a hub. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates an interaction or updates an existing interaction within a hub. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. interactionName is the name of the interaction. parameters is -// parameters supplied to the CreateOrUpdate Interaction operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. interactionName is the name of +// the interaction. parameters is parameters supplied to the CreateOrUpdate Interaction operation. func (client InteractionsClient) CreateOrUpdate(resourceGroupName string, hubName string, interactionName string, parameters InteractionResourceFormat, cancel <-chan struct{}) (<-chan InteractionResourceFormat, <-chan error) { resultChan := make(chan InteractionResourceFormat, 1) errChan := make(chan error, 1) @@ -71,8 +65,10 @@ func (client InteractionsClient) CreateOrUpdate(resourceGroupName string, hubNam var err error var result InteractionResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -106,7 +102,7 @@ func (client InteractionsClient) CreateOrUpdatePreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -144,9 +140,8 @@ func (client InteractionsClient) CreateOrUpdateResponder(resp *http.Response) (r // Get gets information about the specified interaction. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. interactionName is the name of the interaction. localeCode is -// locale of interaction to retrieve, default is en-us. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. interactionName is the name of +// the interaction. localeCode is locale of interaction to retrieve, default is en-us. func (client InteractionsClient) Get(resourceGroupName string, hubName string, interactionName string, localeCode string) (result InteractionResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, interactionName, localeCode) if err != nil { @@ -178,7 +173,7 @@ func (client InteractionsClient) GetPreparer(resourceGroupName string, hubName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -215,8 +210,8 @@ func (client InteractionsClient) GetResponder(resp *http.Response) (result Inter // ListByHub gets all interactions in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. localeCode is locale of interaction to retrieve, default is en-us. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. localeCode is locale of +// interaction to retrieve, default is en-us. func (client InteractionsClient) ListByHub(resourceGroupName string, hubName string, localeCode string) (result InteractionListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName, localeCode) if err != nil { @@ -247,7 +242,7 @@ func (client InteractionsClient) ListByHubPreparer(resourceGroupName string, hub "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -306,11 +301,55 @@ func (client InteractionsClient) ListByHubNextResults(lastResults InteractionLis return } -// SuggestRelationshipLinks suggests relationships to create relationship -// links. +// ListByHubComplete gets all elements from the list without paging. +func (client InteractionsClient) ListByHubComplete(resourceGroupName string, hubName string, localeCode string, cancel <-chan struct{}) (<-chan InteractionResourceFormat, <-chan error) { + resultChan := make(chan InteractionResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName, localeCode) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// SuggestRelationshipLinks suggests relationships to create relationship links. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. interactionName is the name of the interaction. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. interactionName is the name of +// the interaction. func (client InteractionsClient) SuggestRelationshipLinks(resourceGroupName string, hubName string, interactionName string) (result SuggestRelationshipLinksResponse, err error) { req, err := client.SuggestRelationshipLinksPreparer(resourceGroupName, hubName, interactionName) if err != nil { @@ -342,7 +381,7 @@ func (client InteractionsClient) SuggestRelationshipLinksPreparer(resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/kpi.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/kpi.go index 7110ba198..90ea88cb6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/kpi.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/kpi.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// KpiClient is the the Azure Customer Insights management API provides a -// RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the -// relationship between an end user and the Azure Customer Insights service. +// KpiClient is the the Azure Customer Insights management API provides a RESTful set of web services that interact +// with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship +// between an end user and the Azure Customer Insights service. type KpiClient struct { ManagementClient } @@ -43,14 +41,12 @@ func NewKpiClientWithBaseURI(baseURI string, subscriptionID string) KpiClient { return KpiClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a KPI or updates an existing KPI in the hub. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate creates a KPI or updates an existing KPI in the hub. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. kpiName is the name of the KPI. parameters is parameters supplied -// to the create/update KPI operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. kpiName is the name of the KPI. +// parameters is parameters supplied to the create/update KPI operation. func (client KpiClient) CreateOrUpdate(resourceGroupName string, hubName string, kpiName string, parameters KpiResourceFormat, cancel <-chan struct{}) (<-chan KpiResourceFormat, <-chan error) { resultChan := make(chan KpiResourceFormat, 1) errChan := make(chan error, 1) @@ -79,8 +75,10 @@ func (client KpiClient) CreateOrUpdate(resourceGroupName string, hubName string, var err error var result KpiResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -114,7 +112,7 @@ func (client KpiClient) CreateOrUpdatePreparer(resourceGroupName string, hubName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -150,12 +148,10 @@ func (client KpiClient) CreateOrUpdateResponder(resp *http.Response) (result Kpi return } -// Delete deletes a KPI in the hub. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes a KPI in the hub. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. kpiName is the name of the KPI. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. kpiName is the name of the KPI. func (client KpiClient) Delete(resourceGroupName string, hubName string, kpiName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -163,8 +159,10 @@ func (client KpiClient) Delete(resourceGroupName string, hubName string, kpiName var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -198,7 +196,7 @@ func (client KpiClient) DeletePreparer(resourceGroupName string, hubName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -233,8 +231,7 @@ func (client KpiClient) DeleteResponder(resp *http.Response) (result autorest.Re // Get gets a KPI in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. kpiName is the name of the KPI. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. kpiName is the name of the KPI. func (client KpiClient) Get(resourceGroupName string, hubName string, kpiName string) (result KpiResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, kpiName) if err != nil { @@ -266,7 +263,7 @@ func (client KpiClient) GetPreparer(resourceGroupName string, hubName string, kp "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -300,8 +297,7 @@ func (client KpiClient) GetResponder(resp *http.Response) (result KpiResourceFor // ListByHub gets all the KPIs in the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client KpiClient) ListByHub(resourceGroupName string, hubName string) (result KpiListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -332,7 +328,7 @@ func (client KpiClient) ListByHubPreparer(resourceGroupName string, hubName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -388,10 +384,54 @@ func (client KpiClient) ListByHubNextResults(lastResults KpiListResult) (result return } +// ListByHubComplete gets all elements from the list without paging. +func (client KpiClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan KpiResourceFormat, <-chan error) { + resultChan := make(chan KpiResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Reprocess reprocesses the Kpi values of the specified KPI. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. kpiName is the name of the KPI. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. kpiName is the name of the KPI. func (client KpiClient) Reprocess(resourceGroupName string, hubName string, kpiName string) (result autorest.Response, err error) { req, err := client.ReprocessPreparer(resourceGroupName, hubName, kpiName) if err != nil { @@ -423,7 +463,7 @@ func (client KpiClient) ReprocessPreparer(resourceGroupName string, hubName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/links.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/links.go index dcae7fcd1..1b52e68a5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/links.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/links.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// LinksClient is the the Azure Customer Insights management API provides a -// RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the -// relationship between an end user and the Azure Customer Insights service. +// LinksClient is the the Azure Customer Insights management API provides a RESTful set of web services that interact +// with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship +// between an end user and the Azure Customer Insights service. type LinksClient struct { ManagementClient } @@ -43,14 +41,12 @@ func NewLinksClientWithBaseURI(baseURI string, subscriptionID string) LinksClien return LinksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a link or updates an existing link in the hub. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// CreateOrUpdate creates a link or updates an existing link in the hub. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. linkName is the name of the link. parameters is parameters supplied -// to the CreateOrUpdate Link operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. linkName is the name of the +// link. parameters is parameters supplied to the CreateOrUpdate Link operation. func (client LinksClient) CreateOrUpdate(resourceGroupName string, hubName string, linkName string, parameters LinkResourceFormat, cancel <-chan struct{}) (<-chan LinkResourceFormat, <-chan error) { resultChan := make(chan LinkResourceFormat, 1) errChan := make(chan error, 1) @@ -61,8 +57,8 @@ func (client LinksClient) CreateOrUpdate(resourceGroupName string, hubName strin {Target: "linkName", Name: validation.Pattern, Rule: `^[a-zA-Z][a-zA-Z0-9_]+$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.LinkDefinition", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.LinkDefinition.SourceInteractionType", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.LinkDefinition.TargetProfileType", Name: validation.Null, Rule: true, Chain: nil}, + Chain: []validation.Constraint{{Target: "parameters.LinkDefinition.SourceEntityTypeName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.LinkDefinition.TargetEntityTypeName", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.LinkDefinition.ParticipantPropertyReferences", Name: validation.Null, Rule: true, Chain: nil}, }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "customerinsights.LinksClient", "CreateOrUpdate") @@ -75,8 +71,10 @@ func (client LinksClient) CreateOrUpdate(resourceGroupName string, hubName strin var err error var result LinkResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -110,7 +108,7 @@ func (client LinksClient) CreateOrUpdatePreparer(resourceGroupName string, hubNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -148,8 +146,8 @@ func (client LinksClient) CreateOrUpdateResponder(resp *http.Response) (result L // Delete deletes a link in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. linkName is the name of the link. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. linkName is the name of the +// link. func (client LinksClient) Delete(resourceGroupName string, hubName string, linkName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, hubName, linkName) if err != nil { @@ -181,7 +179,7 @@ func (client LinksClient) DeletePreparer(resourceGroupName string, hubName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -214,8 +212,8 @@ func (client LinksClient) DeleteResponder(resp *http.Response) (result autorest. // Get gets a link in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. linkName is the name of the link. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. linkName is the name of the +// link. func (client LinksClient) Get(resourceGroupName string, hubName string, linkName string) (result LinkResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, linkName) if err != nil { @@ -247,7 +245,7 @@ func (client LinksClient) GetPreparer(resourceGroupName string, hubName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,8 +279,7 @@ func (client LinksClient) GetResponder(resp *http.Response) (result LinkResource // ListByHub gets all the links in the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client LinksClient) ListByHub(resourceGroupName string, hubName string) (result LinkListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -313,7 +310,7 @@ func (client LinksClient) ListByHubPreparer(resourceGroupName string, hubName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -368,3 +365,48 @@ func (client LinksClient) ListByHubNextResults(lastResults LinkListResult) (resu return } + +// ListByHubComplete gets all elements from the list without paging. +func (client LinksClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan LinkResourceFormat, <-chan error) { + resultChan := make(chan LinkResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/models.go index 8458d73cc..37e6ed139 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/models.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -42,6 +41,20 @@ const ( Week CalculationWindowTypes = "Week" ) +// CanonicalPropertyValueType enumerates the values for canonical property value type. +type CanonicalPropertyValueType string + +const ( + // Categorical specifies the categorical state for canonical property value type. + Categorical CanonicalPropertyValueType = "Categorical" + // DerivedCategorical specifies the derived categorical state for canonical property value type. + DerivedCategorical CanonicalPropertyValueType = "DerivedCategorical" + // DerivedNumeric specifies the derived numeric state for canonical property value type. + DerivedNumeric CanonicalPropertyValueType = "DerivedNumeric" + // Numeric specifies the numeric state for canonical property value type. + Numeric CanonicalPropertyValueType = "Numeric" +) + // CardinalityTypes enumerates the values for cardinality types. type CardinalityTypes string @@ -54,13 +67,11 @@ const ( OneToOne CardinalityTypes = "OneToOne" ) -// CompletionOperationTypes enumerates the values for completion operation -// types. +// CompletionOperationTypes enumerates the values for completion operation types. type CompletionOperationTypes string const ( - // DeleteFile specifies the delete file state for completion operation - // types. + // DeleteFile specifies the delete file state for completion operation types. DeleteFile CompletionOperationTypes = "DeleteFile" // DoNothing specifies the do nothing state for completion operation types. DoNothing CompletionOperationTypes = "DoNothing" @@ -92,23 +103,17 @@ const ( type ConnectorStates string const ( - // ConnectorStatesCreated specifies the connector states created state for - // connector states. + // ConnectorStatesCreated specifies the connector states created state for connector states. ConnectorStatesCreated ConnectorStates = "Created" - // ConnectorStatesCreating specifies the connector states creating state - // for connector states. + // ConnectorStatesCreating specifies the connector states creating state for connector states. ConnectorStatesCreating ConnectorStates = "Creating" - // ConnectorStatesDeleting specifies the connector states deleting state - // for connector states. + // ConnectorStatesDeleting specifies the connector states deleting state for connector states. ConnectorStatesDeleting ConnectorStates = "Deleting" - // ConnectorStatesExpiring specifies the connector states expiring state - // for connector states. + // ConnectorStatesExpiring specifies the connector states expiring state for connector states. ConnectorStatesExpiring ConnectorStates = "Expiring" - // ConnectorStatesFailed specifies the connector states failed state for - // connector states. + // ConnectorStatesFailed specifies the connector states failed state for connector states. ConnectorStatesFailed ConnectorStates = "Failed" - // ConnectorStatesReady specifies the connector states ready state for - // connector states. + // ConnectorStatesReady specifies the connector states ready state for connector states. ConnectorStatesReady ConnectorStates = "Ready" ) @@ -134,31 +139,39 @@ const ( type DataSourceType string const ( - // DataSourceTypeConnectorMapping specifies the data source type connector - // mapping state for data source type. - DataSourceTypeConnectorMapping DataSourceType = "ConnectorMapping" - // DataSourceTypeLinkInteraction specifies the data source type link - // interaction state for data source type. + // DataSourceTypeConnector specifies the data source type connector state for data source type. + DataSourceTypeConnector DataSourceType = "Connector" + // DataSourceTypeLinkInteraction specifies the data source type link interaction state for data source type. DataSourceTypeLinkInteraction DataSourceType = "LinkInteraction" - // DataSourceTypeSystemDefault specifies the data source type system - // default state for data source type. + // DataSourceTypeSystemDefault specifies the data source type system default state for data source type. DataSourceTypeSystemDefault DataSourceType = "SystemDefault" ) +// EntityType enumerates the values for entity type. +type EntityType string + +const ( + // EntityTypeInteraction specifies the entity type interaction state for entity type. + EntityTypeInteraction EntityType = "Interaction" + // EntityTypeNone specifies the entity type none state for entity type. + EntityTypeNone EntityType = "None" + // EntityTypeProfile specifies the entity type profile state for entity type. + EntityTypeProfile EntityType = "Profile" + // EntityTypeRelationship specifies the entity type relationship state for entity type. + EntityTypeRelationship EntityType = "Relationship" +) + // EntityTypes enumerates the values for entity types. type EntityTypes string const ( - // EntityTypesInteraction specifies the entity types interaction state for - // entity types. + // EntityTypesInteraction specifies the entity types interaction state for entity types. EntityTypesInteraction EntityTypes = "Interaction" // EntityTypesNone specifies the entity types none state for entity types. EntityTypesNone EntityTypes = "None" - // EntityTypesProfile specifies the entity types profile state for entity - // types. + // EntityTypesProfile specifies the entity types profile state for entity types. EntityTypesProfile EntityTypes = "Profile" - // EntityTypesRelationship specifies the entity types relationship state - // for entity types. + // EntityTypesRelationship specifies the entity types relationship state for entity types. EntityTypesRelationship EntityTypes = "Relationship" ) @@ -166,11 +179,9 @@ const ( type ErrorManagementTypes string const ( - // RejectAndContinue specifies the reject and continue state for error - // management types. + // RejectAndContinue specifies the reject and continue state for error management types. RejectAndContinue ErrorManagementTypes = "RejectAndContinue" - // RejectUntilLimit specifies the reject until limit state for error - // management types. + // RejectUntilLimit specifies the reject until limit state for error management types. RejectUntilLimit ErrorManagementTypes = "RejectUntilLimit" // StopImport specifies the stop import state for error management types. StopImport ErrorManagementTypes = "StopImport" @@ -180,20 +191,15 @@ const ( type FrequencyTypes string const ( - // FrequencyTypesDay specifies the frequency types day state for frequency - // types. + // FrequencyTypesDay specifies the frequency types day state for frequency types. FrequencyTypesDay FrequencyTypes = "Day" - // FrequencyTypesHour specifies the frequency types hour state for - // frequency types. + // FrequencyTypesHour specifies the frequency types hour state for frequency types. FrequencyTypesHour FrequencyTypes = "Hour" - // FrequencyTypesMinute specifies the frequency types minute state for - // frequency types. + // FrequencyTypesMinute specifies the frequency types minute state for frequency types. FrequencyTypesMinute FrequencyTypes = "Minute" - // FrequencyTypesMonth specifies the frequency types month state for - // frequency types. + // FrequencyTypesMonth specifies the frequency types month state for frequency types. FrequencyTypesMonth FrequencyTypes = "Month" - // FrequencyTypesWeek specifies the frequency types week state for - // frequency types. + // FrequencyTypesWeek specifies the frequency types week state for frequency types. FrequencyTypesWeek FrequencyTypes = "Week" ) @@ -213,21 +219,17 @@ type KpiFunctions string const ( // KpiFunctionsAvg specifies the kpi functions avg state for kpi functions. KpiFunctionsAvg KpiFunctions = "Avg" - // KpiFunctionsCount specifies the kpi functions count state for kpi - // functions. + // KpiFunctionsCount specifies the kpi functions count state for kpi functions. KpiFunctionsCount KpiFunctions = "Count" - // KpiFunctionsCountDistinct specifies the kpi functions count distinct - // state for kpi functions. + // KpiFunctionsCountDistinct specifies the kpi functions count distinct state for kpi functions. KpiFunctionsCountDistinct KpiFunctions = "CountDistinct" - // KpiFunctionsLast specifies the kpi functions last state for kpi - // functions. + // KpiFunctionsLast specifies the kpi functions last state for kpi functions. KpiFunctionsLast KpiFunctions = "Last" // KpiFunctionsMax specifies the kpi functions max state for kpi functions. KpiFunctionsMax KpiFunctions = "Max" // KpiFunctionsMin specifies the kpi functions min state for kpi functions. KpiFunctionsMin KpiFunctions = "Min" - // KpiFunctionsNone specifies the kpi functions none state for kpi - // functions. + // KpiFunctionsNone specifies the kpi functions none state for kpi functions. KpiFunctionsNone KpiFunctions = "None" // KpiFunctionsSum specifies the kpi functions sum state for kpi functions. KpiFunctionsSum KpiFunctions = "Sum" @@ -255,27 +257,81 @@ const ( Write PermissionTypes = "Write" ) +// PredictionModelLifeCycle enumerates the values for prediction model life cycle. +type PredictionModelLifeCycle string + +const ( + // PredictionModelLifeCycleActive specifies the prediction model life cycle active state for prediction model life + // cycle. + PredictionModelLifeCycleActive PredictionModelLifeCycle = "Active" + // PredictionModelLifeCycleDeleted specifies the prediction model life cycle deleted state for prediction model life + // cycle. + PredictionModelLifeCycleDeleted PredictionModelLifeCycle = "Deleted" + // PredictionModelLifeCycleDiscovering specifies the prediction model life cycle discovering state for prediction model + // life cycle. + PredictionModelLifeCycleDiscovering PredictionModelLifeCycle = "Discovering" + // PredictionModelLifeCycleEvaluating specifies the prediction model life cycle evaluating state for prediction model + // life cycle. + PredictionModelLifeCycleEvaluating PredictionModelLifeCycle = "Evaluating" + // PredictionModelLifeCycleEvaluatingFailed specifies the prediction model life cycle evaluating failed state for + // prediction model life cycle. + PredictionModelLifeCycleEvaluatingFailed PredictionModelLifeCycle = "EvaluatingFailed" + // PredictionModelLifeCycleFailed specifies the prediction model life cycle failed state for prediction model life + // cycle. + PredictionModelLifeCycleFailed PredictionModelLifeCycle = "Failed" + // PredictionModelLifeCycleFeaturing specifies the prediction model life cycle featuring state for prediction model + // life cycle. + PredictionModelLifeCycleFeaturing PredictionModelLifeCycle = "Featuring" + // PredictionModelLifeCycleFeaturingFailed specifies the prediction model life cycle featuring failed state for + // prediction model life cycle. + PredictionModelLifeCycleFeaturingFailed PredictionModelLifeCycle = "FeaturingFailed" + // PredictionModelLifeCycleHumanIntervention specifies the prediction model life cycle human intervention state for + // prediction model life cycle. + PredictionModelLifeCycleHumanIntervention PredictionModelLifeCycle = "HumanIntervention" + // PredictionModelLifeCycleNew specifies the prediction model life cycle new state for prediction model life cycle. + PredictionModelLifeCycleNew PredictionModelLifeCycle = "New" + // PredictionModelLifeCyclePendingDiscovering specifies the prediction model life cycle pending discovering state for + // prediction model life cycle. + PredictionModelLifeCyclePendingDiscovering PredictionModelLifeCycle = "PendingDiscovering" + // PredictionModelLifeCyclePendingFeaturing specifies the prediction model life cycle pending featuring state for + // prediction model life cycle. + PredictionModelLifeCyclePendingFeaturing PredictionModelLifeCycle = "PendingFeaturing" + // PredictionModelLifeCyclePendingModelConfirmation specifies the prediction model life cycle pending model + // confirmation state for prediction model life cycle. + PredictionModelLifeCyclePendingModelConfirmation PredictionModelLifeCycle = "PendingModelConfirmation" + // PredictionModelLifeCyclePendingTraining specifies the prediction model life cycle pending training state for + // prediction model life cycle. + PredictionModelLifeCyclePendingTraining PredictionModelLifeCycle = "PendingTraining" + // PredictionModelLifeCycleProvisioning specifies the prediction model life cycle provisioning state for prediction + // model life cycle. + PredictionModelLifeCycleProvisioning PredictionModelLifeCycle = "Provisioning" + // PredictionModelLifeCycleProvisioningFailed specifies the prediction model life cycle provisioning failed state for + // prediction model life cycle. + PredictionModelLifeCycleProvisioningFailed PredictionModelLifeCycle = "ProvisioningFailed" + // PredictionModelLifeCycleTraining specifies the prediction model life cycle training state for prediction model life + // cycle. + PredictionModelLifeCycleTraining PredictionModelLifeCycle = "Training" + // PredictionModelLifeCycleTrainingFailed specifies the prediction model life cycle training failed state for + // prediction model life cycle. + PredictionModelLifeCycleTrainingFailed PredictionModelLifeCycle = "TrainingFailed" +) + // ProvisioningStates enumerates the values for provisioning states. type ProvisioningStates string const ( - // ProvisioningStatesDeleting specifies the provisioning states deleting - // state for provisioning states. + // ProvisioningStatesDeleting specifies the provisioning states deleting state for provisioning states. ProvisioningStatesDeleting ProvisioningStates = "Deleting" - // ProvisioningStatesExpiring specifies the provisioning states expiring - // state for provisioning states. + // ProvisioningStatesExpiring specifies the provisioning states expiring state for provisioning states. ProvisioningStatesExpiring ProvisioningStates = "Expiring" - // ProvisioningStatesFailed specifies the provisioning states failed state - // for provisioning states. + // ProvisioningStatesFailed specifies the provisioning states failed state for provisioning states. ProvisioningStatesFailed ProvisioningStates = "Failed" - // ProvisioningStatesHumanIntervention specifies the provisioning states - // human intervention state for provisioning states. + // ProvisioningStatesHumanIntervention specifies the provisioning states human intervention state for provisioning + // states. ProvisioningStatesHumanIntervention ProvisioningStates = "HumanIntervention" - // ProvisioningStatesProvisioning specifies the provisioning states - // provisioning state for provisioning states. + // ProvisioningStatesProvisioning specifies the provisioning states provisioning state for provisioning states. ProvisioningStatesProvisioning ProvisioningStates = "Provisioning" - // ProvisioningStatesSucceeded specifies the provisioning states succeeded - // state for provisioning states. + // ProvisioningStatesSucceeded specifies the provisioning states succeeded state for provisioning states. ProvisioningStatesSucceeded ProvisioningStates = "Succeeded" ) @@ -297,6 +353,18 @@ const ( Reader RoleTypes = "Reader" ) +// Status enumerates the values for status. +type Status string + +const ( + // StatusActive specifies the status active state for status. + StatusActive Status = "Active" + // StatusDeleted specifies the status deleted state for status. + StatusDeleted Status = "Deleted" + // StatusNone specifies the status none state for status. + StatusNone Status = "None" +) + // AssignmentPrincipal is the AssignmentPrincipal type AssignmentPrincipal struct { PrincipalID *string `json:"principalId,omitempty"` @@ -313,8 +381,7 @@ type AuthorizationPolicy struct { SecondaryKey *string `json:"secondaryKey,omitempty"` } -// AuthorizationPolicyListResult is the response of list authorization policy -// operation. +// AuthorizationPolicyListResult is the response of list authorization policy operation. type AuthorizationPolicyListResult struct { autorest.Response `json:"-"` Value *[]AuthorizationPolicyResourceFormat `json:"value,omitempty"` @@ -333,8 +400,7 @@ func (client AuthorizationPolicyListResult) AuthorizationPolicyListResultPrepare autorest.WithBaseURL(to.String(client.NextLink))) } -// AuthorizationPolicyResourceFormat is the authorization policy resource -// format. +// AuthorizationPolicyResourceFormat is the authorization policy resource format. type AuthorizationPolicyResourceFormat struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -348,6 +414,21 @@ type AzureBlobConnectorProperties struct { ConnectionKeyVaultURL *string `json:"connectionKeyVaultUrl,omitempty"` } +// CanonicalProfileDefinition is definition of canonical profile. +type CanonicalProfileDefinition struct { + CanonicalProfileID *int32 `json:"canonicalProfileId,omitempty"` + Properties *[]CanonicalProfileDefinitionPropertiesItem `json:"properties,omitempty"` +} + +// CanonicalProfileDefinitionPropertiesItem is the definition of a canonical profile property. +type CanonicalProfileDefinitionPropertiesItem struct { + ProfileName *string `json:"profileName,omitempty"` + ProfilePropertyName *string `json:"profilePropertyName,omitempty"` + Rank *int32 `json:"rank,omitempty"` + Type CanonicalPropertyValueType `json:"type,omitempty"` + Value *string `json:"value,omitempty"` +} + // Connector is properties of connector. type Connector struct { ConnectorID *int32 `json:"connectorId,omitempty"` @@ -429,8 +510,7 @@ type ConnectorMappingFormat struct { ArraySeparator *string `json:"arraySeparator,omitempty"` } -// ConnectorMappingListResult is the response of list connector mapping -// operation. +// ConnectorMappingListResult is the response of list connector mapping operation. type ConnectorMappingListResult struct { autorest.Response `json:"-"` Value *[]ConnectorMappingResourceFormat `json:"value,omitempty"` @@ -503,14 +583,20 @@ type CrmConnectorProperties struct { AccessToken *string `json:"accessToken,omitempty"` } -// DataSource is data Source is a way for us to know the source of instances. A -// single type can have data coming in from multiple places. In activities we -// use this to determine precedence rules. +// DataSource is data Source is a way for us to know the source of instances. A single type can have data coming in +// from multiple places. In activities we use this to determine precedence rules. type DataSource struct { - DataSourceType DataSourceType `json:"dataSourceType,omitempty"` - ID *string `json:"id,omitempty"` - LinkID *string `json:"linkId,omitempty"` - ConnectorMappingID *string `json:"connectorMappingId,omitempty"` + Name *string `json:"name,omitempty"` + DataSourceType DataSourceType `json:"dataSourceType,omitempty"` + Status Status `json:"status,omitempty"` + ID *int32 `json:"id,omitempty"` + DataSourceReferenceID *string `json:"dataSourceReferenceId,omitempty"` +} + +// DataSourcePrecedence is the data source precedence is a way to know the precedence of each data source. +type DataSourcePrecedence struct { + *DataSource `json:"dataSource,omitempty"` + Precedence *int32 `json:"precedence,omitempty"` } // EnrichingKpi is the enriching KPI definition. @@ -668,9 +754,9 @@ type InteractionTypeDefinition struct { IDPropertyNames *[]string `json:"idPropertyNames,omitempty"` ParticipantProfiles *[]Participant `json:"participantProfiles,omitempty"` PrimaryParticipantProfilePropertyName *string `json:"primaryParticipantProfilePropertyName,omitempty"` - DataSources *[]DataSource `json:"dataSources,omitempty"` - DefaultDataSourceID *string `json:"defaultDataSourceId,omitempty"` - IsActivity *bool `json:"isActivity,omitempty"` + DataSourcePrecedenceRules *[]DataSourcePrecedence `json:"dataSourcePrecedenceRules,omitempty"` + *DataSource `json:"defaultDataSource,omitempty"` + IsActivity *bool `json:"isActivity,omitempty"` } // KpiAlias is the KPI alias. @@ -759,8 +845,10 @@ type KpiThresholds struct { type LinkDefinition struct { TenantID *string `json:"tenantId,omitempty"` LinkName *string `json:"linkName,omitempty"` - SourceInteractionType *string `json:"sourceInteractionType,omitempty"` - TargetProfileType *string `json:"targetProfileType,omitempty"` + SourceEntityType EntityType `json:"sourceEntityType,omitempty"` + TargetEntityType EntityType `json:"targetEntityType,omitempty"` + SourceEntityTypeName *string `json:"sourceEntityTypeName,omitempty"` + TargetEntityTypeName *string `json:"targetEntityTypeName,omitempty"` DisplayName *map[string]*string `json:"displayName,omitempty"` Description *map[string]*string `json:"description,omitempty"` Mappings *[]TypePropertiesMapping `json:"mappings,omitempty"` @@ -825,14 +913,131 @@ type Participant struct { Role *string `json:"role,omitempty"` } -// ParticipantPropertyReference is the participant property reference. -type ParticipantPropertyReference struct { +// ParticipantProfilePropertyReference is the participant profile property reference. +type ParticipantProfilePropertyReference struct { InteractionPropertyName *string `json:"interactionPropertyName,omitempty"` ProfilePropertyName *string `json:"profilePropertyName,omitempty"` } -// ProfileEnumValidValuesFormat is valid enum values in case of an enum -// property. +// ParticipantPropertyReference is the participant property reference. +type ParticipantPropertyReference struct { + SourcePropertyName *string `json:"sourcePropertyName,omitempty"` + TargetPropertyName *string `json:"targetPropertyName,omitempty"` +} + +// Prediction is the prediction definition. +type Prediction struct { + Description *map[string]*string `json:"description,omitempty"` + DisplayName *map[string]*string `json:"displayName,omitempty"` + InvolvedInteractionTypes *[]string `json:"involvedInteractionTypes,omitempty"` + InvolvedKpiTypes *[]string `json:"involvedKpiTypes,omitempty"` + InvolvedRelationships *[]string `json:"involvedRelationships,omitempty"` + NegativeOutcomeExpression *string `json:"negativeOutcomeExpression,omitempty"` + PositiveOutcomeExpression *string `json:"positiveOutcomeExpression,omitempty"` + PrimaryProfileType *string `json:"primaryProfileType,omitempty"` + ProvisioningState ProvisioningStates `json:"provisioningState,omitempty"` + PredictionName *string `json:"predictionName,omitempty"` + ScopeExpression *string `json:"scopeExpression,omitempty"` + TenantID *string `json:"tenantId,omitempty"` + AutoAnalyze *bool `json:"autoAnalyze,omitempty"` + Mappings *PredictionMappings `json:"mappings,omitempty"` + ScoreLabel *string `json:"scoreLabel,omitempty"` + Grades *[]PredictionGradesItem `json:"grades,omitempty"` + SystemGeneratedEntities *PredictionSystemGeneratedEntities `json:"systemGeneratedEntities,omitempty"` +} + +// PredictionGradesItem is the definition of a prediction grade. +type PredictionGradesItem struct { + GradeName *string `json:"gradeName,omitempty"` + MinScoreThreshold *int32 `json:"minScoreThreshold,omitempty"` + MaxScoreThreshold *int32 `json:"maxScoreThreshold,omitempty"` +} + +// PredictionMappings is definition of the link mapping of prediction. +type PredictionMappings struct { + Score *string `json:"score,omitempty"` + Grade *string `json:"grade,omitempty"` + Reason *string `json:"reason,omitempty"` +} + +// PredictionSystemGeneratedEntities is system generated entities. +type PredictionSystemGeneratedEntities struct { + GeneratedInteractionTypes *[]string `json:"generatedInteractionTypes,omitempty"` + GeneratedLinks *[]string `json:"generatedLinks,omitempty"` + GeneratedKpis *map[string]*string `json:"generatedKpis,omitempty"` +} + +// PredictionDistributionDefinition is the definition of the prediction distribution. +type PredictionDistributionDefinition struct { + TotalPositives *int64 `json:"totalPositives,omitempty"` + TotalNegatives *int64 `json:"totalNegatives,omitempty"` + Distributions *[]PredictionDistributionDefinitionDistributionsItem `json:"distributions,omitempty"` +} + +// PredictionDistributionDefinitionDistributionsItem is the definition of a prediction distribution. +type PredictionDistributionDefinitionDistributionsItem struct { + ScoreThreshold *int32 `json:"scoreThreshold,omitempty"` + Positives *int64 `json:"positives,omitempty"` + Negatives *int64 `json:"negatives,omitempty"` + PositivesAboveThreshold *int64 `json:"positivesAboveThreshold,omitempty"` + NegativesAboveThreshold *int64 `json:"negativesAboveThreshold,omitempty"` +} + +// PredictionListResult is the response of list predictions operation. +type PredictionListResult struct { + autorest.Response `json:"-"` + Value *[]PredictionResourceFormat `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// PredictionListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client PredictionListResult) PredictionListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// PredictionModelStatus is the prediction model status. +type PredictionModelStatus struct { + autorest.Response `json:"-"` + TenantID *string `json:"tenantId,omitempty"` + PredictionName *string `json:"predictionName,omitempty"` + PredictionGUIDID *string `json:"predictionGuidId,omitempty"` + Status PredictionModelLifeCycle `json:"status,omitempty"` + Message *string `json:"message,omitempty"` + TrainingSetCount *int32 `json:"trainingSetCount,omitempty"` + TestSetCount *int32 `json:"testSetCount,omitempty"` + ValidationSetCount *int32 `json:"validationSetCount,omitempty"` + TrainingAccuracy *int32 `json:"trainingAccuracy,omitempty"` + SignalsUsed *int32 `json:"signalsUsed,omitempty"` + ModelVersion *string `json:"modelVersion,omitempty"` +} + +// PredictionResourceFormat is the prediction resource format. +type PredictionResourceFormat struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *Prediction `json:"properties,omitempty"` +} + +// PredictionTrainingResults is the training results of the prediction. +type PredictionTrainingResults struct { + autorest.Response `json:"-"` + TenantID *string `json:"tenantId,omitempty"` + ScoreName *string `json:"scoreName,omitempty"` + PredictionDistribution *PredictionDistributionDefinition `json:"predictionDistribution,omitempty"` + CanonicalProfiles *[]CanonicalProfileDefinition `json:"canonicalProfiles,omitempty"` + PrimaryProfileInstanceCount *int64 `json:"primaryProfileInstanceCount,omitempty"` +} + +// ProfileEnumValidValuesFormat is valid enum values in case of an enum property. type ProfileEnumValidValuesFormat struct { Value *int32 `json:"value,omitempty"` LocalizedValueNames *map[string]*string `json:"localizedValueNames,omitempty"` @@ -890,21 +1095,22 @@ type ProfileTypeDefinition struct { // PropertyDefinition is property definition. type PropertyDefinition struct { - ArrayValueSeparator *string `json:"arrayValueSeparator,omitempty"` - EnumValidValues *[]ProfileEnumValidValuesFormat `json:"enumValidValues,omitempty"` - FieldName *string `json:"fieldName,omitempty"` - FieldType *string `json:"fieldType,omitempty"` - IsArray *bool `json:"isArray,omitempty"` - IsEnum *bool `json:"isEnum,omitempty"` - IsFlagEnum *bool `json:"isFlagEnum,omitempty"` - IsImage *bool `json:"isImage,omitempty"` - IsLocalizedString *bool `json:"isLocalizedString,omitempty"` - IsName *bool `json:"isName,omitempty"` - IsRequired *bool `json:"isRequired,omitempty"` - PropertyID *string `json:"propertyId,omitempty"` - SchemaItemPropLink *string `json:"schemaItemPropLink,omitempty"` - MaxLength *int32 `json:"maxLength,omitempty"` - IsAvailableInGraph *bool `json:"isAvailableInGraph,omitempty"` + ArrayValueSeparator *string `json:"arrayValueSeparator,omitempty"` + EnumValidValues *[]ProfileEnumValidValuesFormat `json:"enumValidValues,omitempty"` + FieldName *string `json:"fieldName,omitempty"` + FieldType *string `json:"fieldType,omitempty"` + IsArray *bool `json:"isArray,omitempty"` + IsEnum *bool `json:"isEnum,omitempty"` + IsFlagEnum *bool `json:"isFlagEnum,omitempty"` + IsImage *bool `json:"isImage,omitempty"` + IsLocalizedString *bool `json:"isLocalizedString,omitempty"` + IsName *bool `json:"isName,omitempty"` + IsRequired *bool `json:"isRequired,omitempty"` + PropertyID *string `json:"propertyId,omitempty"` + SchemaItemPropLink *string `json:"schemaItemPropLink,omitempty"` + MaxLength *int32 `json:"maxLength,omitempty"` + IsAvailableInGraph *bool `json:"isAvailableInGraph,omitempty"` + DataSourcePrecedenceRules *[]DataSourcePrecedence `json:"dataSourcePrecedenceRules,omitempty"` } // ProxyResource is common properties of proxy resource. @@ -932,17 +1138,17 @@ type RelationshipDefinition struct { // RelationshipLinkDefinition is the definition of relationship link. type RelationshipLinkDefinition struct { - DisplayName *map[string]*string `json:"displayName,omitempty"` - Description *map[string]*string `json:"description,omitempty"` - InteractionType *string `json:"interactionType,omitempty"` - LinkName *string `json:"linkName,omitempty"` - Mappings *[]RelationshipLinkFieldMapping `json:"mappings,omitempty"` - ProfilePropertyReferences *[]ParticipantPropertyReference `json:"profilePropertyReferences,omitempty"` - ProvisioningState ProvisioningStates `json:"provisioningState,omitempty"` - RelatedProfilePropertyReferences *[]ParticipantPropertyReference `json:"relatedProfilePropertyReferences,omitempty"` - RelationshipName *string `json:"relationshipName,omitempty"` - RelationshipGUIDID *string `json:"relationshipGuidId,omitempty"` - TenantID *string `json:"tenantId,omitempty"` + DisplayName *map[string]*string `json:"displayName,omitempty"` + Description *map[string]*string `json:"description,omitempty"` + InteractionType *string `json:"interactionType,omitempty"` + LinkName *string `json:"linkName,omitempty"` + Mappings *[]RelationshipLinkFieldMapping `json:"mappings,omitempty"` + ProfilePropertyReferences *[]ParticipantProfilePropertyReference `json:"profilePropertyReferences,omitempty"` + ProvisioningState ProvisioningStates `json:"provisioningState,omitempty"` + RelatedProfilePropertyReferences *[]ParticipantProfilePropertyReference `json:"relatedProfilePropertyReferences,omitempty"` + RelationshipName *string `json:"relationshipName,omitempty"` + RelationshipGUIDID *string `json:"relationshipGuidId,omitempty"` + TenantID *string `json:"tenantId,omitempty"` } // RelationshipLinkFieldMapping is the fields mapping for Relationships. @@ -952,8 +1158,7 @@ type RelationshipLinkFieldMapping struct { RelationshipFieldName *string `json:"relationshipFieldName,omitempty"` } -// RelationshipLinkListResult is the response of list relationship link -// operation. +// RelationshipLinkListResult is the response of list relationship link operation. type RelationshipLinkListResult struct { autorest.Response `json:"-"` Value *[]RelationshipLinkResourceFormat `json:"value,omitempty"` @@ -1009,25 +1214,22 @@ type RelationshipResourceFormat struct { *RelationshipDefinition `json:"properties,omitempty"` } -// RelationshipsLookup is the definition of suggested relationship for the -// type. +// RelationshipsLookup is the definition of suggested relationship for the type. type RelationshipsLookup struct { - ProfileName *string `json:"profileName,omitempty"` - ProfilePropertyReferences *[]ParticipantPropertyReference `json:"profilePropertyReferences,omitempty"` - RelatedProfileName *string `json:"relatedProfileName,omitempty"` - RelatedProfilePropertyReferences *[]ParticipantPropertyReference `json:"relatedProfilePropertyReferences,omitempty"` - ExistingRelationshipName *string `json:"existingRelationshipName,omitempty"` + ProfileName *string `json:"profileName,omitempty"` + ProfilePropertyReferences *[]ParticipantProfilePropertyReference `json:"profilePropertyReferences,omitempty"` + RelatedProfileName *string `json:"relatedProfileName,omitempty"` + RelatedProfilePropertyReferences *[]ParticipantProfilePropertyReference `json:"relatedProfilePropertyReferences,omitempty"` + ExistingRelationshipName *string `json:"existingRelationshipName,omitempty"` } -// RelationshipTypeFieldMapping is map a field of profile to its corresponding -// StrongId in Related Profile. +// RelationshipTypeFieldMapping is map a field of profile to its corresponding StrongId in Related Profile. type RelationshipTypeFieldMapping struct { ProfileFieldName *string `json:"profileFieldName,omitempty"` RelatedProfileKeyProperty *string `json:"relatedProfileKeyProperty,omitempty"` } -// RelationshipTypeMapping is maps fields in Profile to their corresponding -// StrongIds in Related Profile. +// RelationshipTypeMapping is maps fields in Profile to their corresponding StrongIds in Related Profile. type RelationshipTypeMapping struct { FieldMappings *[]RelationshipTypeFieldMapping `json:"fieldMappings,omitempty"` } @@ -1160,8 +1362,7 @@ type StrongID struct { Description *map[string]*string `json:"description,omitempty"` } -// SuggestRelationshipLinksResponse is the response of suggest relationship -// links operation. +// SuggestRelationshipLinksResponse is the response of suggest relationship links operation. type SuggestRelationshipLinksResponse struct { autorest.Response `json:"-"` InteractionName *string `json:"interactionName,omitempty"` @@ -1170,10 +1371,9 @@ type SuggestRelationshipLinksResponse struct { // TypePropertiesMapping is metadata for a Link's property mapping. type TypePropertiesMapping struct { - InteractionTypePropertyName *string `json:"interactionTypePropertyName,omitempty"` - ProfileTypePropertyName *string `json:"profileTypePropertyName,omitempty"` - IsProfileTypeID *bool `json:"isProfileTypeId,omitempty"` - LinkType LinkTypes `json:"linkType,omitempty"` + SourcePropertyName *string `json:"sourcePropertyName,omitempty"` + TargetPropertyName *string `json:"targetPropertyName,omitempty"` + LinkType LinkTypes `json:"linkType,omitempty"` } // View is the view in Customer 360 web application. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/predictions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/predictions.go new file mode 100644 index 000000000..11956e6d0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/predictions.go @@ -0,0 +1,633 @@ +package customerinsights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// PredictionsClient is the the Azure Customer Insights management API provides a RESTful set of web services that +// interact with Azure Customer Insights service to manage your resources. The API has entities that capture the +// relationship between an end user and the Azure Customer Insights service. +type PredictionsClient struct { + ManagementClient +} + +// NewPredictionsClient creates an instance of the PredictionsClient client. +func NewPredictionsClient(subscriptionID string) PredictionsClient { + return NewPredictionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPredictionsClientWithBaseURI creates an instance of the PredictionsClient client. +func NewPredictionsClientWithBaseURI(baseURI string, subscriptionID string) PredictionsClient { + return PredictionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a Prediction or updates an existing Prediction in the hub. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. hubName is the name of the hub. predictionName is the name of +// the Prediction. parameters is parameters supplied to the create/update Prediction operation. +func (client PredictionsClient) CreateOrUpdate(resourceGroupName string, hubName string, predictionName string, parameters PredictionResourceFormat, cancel <-chan struct{}) (<-chan PredictionResourceFormat, <-chan error) { + resultChan := make(chan PredictionResourceFormat, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: predictionName, + Constraints: []validation.Constraint{{Target: "predictionName", Name: validation.MaxLength, Rule: 512, Chain: nil}, + {Target: "predictionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Prediction", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Prediction.NegativeOutcomeExpression", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Prediction.PositiveOutcomeExpression", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Prediction.PrimaryProfileType", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Prediction.ScopeExpression", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Prediction.AutoAnalyze", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Prediction.Mappings", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Prediction.ScoreLabel", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "customerinsights.PredictionsClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result PredictionResourceFormat + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, hubName, predictionName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client PredictionsClient) CreateOrUpdatePreparer(resourceGroupName string, hubName string, predictionName string, parameters PredictionResourceFormat, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hubName": autorest.Encode("path", hubName), + "predictionName": autorest.Encode("path", predictionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-26" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions/{predictionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client PredictionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client PredictionsClient) CreateOrUpdateResponder(resp *http.Response) (result PredictionResourceFormat, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Prediction in the hub. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. hubName is the name of the hub. predictionName is the name of +// the Prediction. +func (client PredictionsClient) Delete(resourceGroupName string, hubName string, predictionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, hubName, predictionName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client PredictionsClient) DeletePreparer(resourceGroupName string, hubName string, predictionName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hubName": autorest.Encode("path", hubName), + "predictionName": autorest.Encode("path", predictionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-26" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions/{predictionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client PredictionsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PredictionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a Prediction in the hub. +// +// resourceGroupName is the name of the resource group. hubName is the name of the hub. predictionName is the name of +// the Prediction. +func (client PredictionsClient) Get(resourceGroupName string, hubName string, predictionName string) (result PredictionResourceFormat, err error) { + req, err := client.GetPreparer(resourceGroupName, hubName, predictionName) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PredictionsClient) GetPreparer(resourceGroupName string, hubName string, predictionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hubName": autorest.Encode("path", hubName), + "predictionName": autorest.Encode("path", predictionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-26" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions/{predictionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client PredictionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PredictionsClient) GetResponder(resp *http.Response) (result PredictionResourceFormat, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetModelStatus gets model status of the prediction. +// +// resourceGroupName is the name of the resource group. hubName is the name of the hub. predictionName is the name of +// the Prediction. +func (client PredictionsClient) GetModelStatus(resourceGroupName string, hubName string, predictionName string) (result PredictionModelStatus, err error) { + req, err := client.GetModelStatusPreparer(resourceGroupName, hubName, predictionName) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "GetModelStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetModelStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "GetModelStatus", resp, "Failure sending request") + return + } + + result, err = client.GetModelStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "GetModelStatus", resp, "Failure responding to request") + } + + return +} + +// GetModelStatusPreparer prepares the GetModelStatus request. +func (client PredictionsClient) GetModelStatusPreparer(resourceGroupName string, hubName string, predictionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hubName": autorest.Encode("path", hubName), + "predictionName": autorest.Encode("path", predictionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-26" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions/{predictionName}/getModelStatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetModelStatusSender sends the GetModelStatus request. The method will close the +// http.Response Body if it receives an error. +func (client PredictionsClient) GetModelStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetModelStatusResponder handles the response to the GetModelStatus request. The method always +// closes the http.Response Body. +func (client PredictionsClient) GetModelStatusResponder(resp *http.Response) (result PredictionModelStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTrainingResults gets training results. +// +// resourceGroupName is the name of the resource group. hubName is the name of the hub. predictionName is the name of +// the Prediction. +func (client PredictionsClient) GetTrainingResults(resourceGroupName string, hubName string, predictionName string) (result PredictionTrainingResults, err error) { + req, err := client.GetTrainingResultsPreparer(resourceGroupName, hubName, predictionName) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "GetTrainingResults", nil, "Failure preparing request") + return + } + + resp, err := client.GetTrainingResultsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "GetTrainingResults", resp, "Failure sending request") + return + } + + result, err = client.GetTrainingResultsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "GetTrainingResults", resp, "Failure responding to request") + } + + return +} + +// GetTrainingResultsPreparer prepares the GetTrainingResults request. +func (client PredictionsClient) GetTrainingResultsPreparer(resourceGroupName string, hubName string, predictionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hubName": autorest.Encode("path", hubName), + "predictionName": autorest.Encode("path", predictionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-26" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions/{predictionName}/getTrainingResults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetTrainingResultsSender sends the GetTrainingResults request. The method will close the +// http.Response Body if it receives an error. +func (client PredictionsClient) GetTrainingResultsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetTrainingResultsResponder handles the response to the GetTrainingResults request. The method always +// closes the http.Response Body. +func (client PredictionsClient) GetTrainingResultsResponder(resp *http.Response) (result PredictionTrainingResults, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByHub gets all the predictions in the specified hub. +// +// resourceGroupName is the name of the resource group. hubName is the name of the hub. +func (client PredictionsClient) ListByHub(resourceGroupName string, hubName string) (result PredictionListResult, err error) { + req, err := client.ListByHubPreparer(resourceGroupName, hubName) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ListByHub", nil, "Failure preparing request") + return + } + + resp, err := client.ListByHubSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ListByHub", resp, "Failure sending request") + return + } + + result, err = client.ListByHubResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ListByHub", resp, "Failure responding to request") + } + + return +} + +// ListByHubPreparer prepares the ListByHub request. +func (client PredictionsClient) ListByHubPreparer(resourceGroupName string, hubName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hubName": autorest.Encode("path", hubName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-26" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByHubSender sends the ListByHub request. The method will close the +// http.Response Body if it receives an error. +func (client PredictionsClient) ListByHubSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByHubResponder handles the response to the ListByHub request. The method always +// closes the http.Response Body. +func (client PredictionsClient) ListByHubResponder(resp *http.Response) (result PredictionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByHubNextResults retrieves the next set of results, if any. +func (client PredictionsClient) ListByHubNextResults(lastResults PredictionListResult) (result PredictionListResult, err error) { + req, err := lastResults.PredictionListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ListByHub", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByHubSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ListByHub", resp, "Failure sending next results request") + } + + result, err = client.ListByHubResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ListByHub", resp, "Failure responding to next results request") + } + + return +} + +// ListByHubComplete gets all elements from the list without paging. +func (client PredictionsClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan PredictionResourceFormat, <-chan error) { + resultChan := make(chan PredictionResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ModelStatus creates or updates the model status of prediction. +// +// resourceGroupName is the name of the resource group. hubName is the name of the hub. predictionName is the name of +// the Prediction. parameters is parameters supplied to the create/update prediction model status operation. +func (client PredictionsClient) ModelStatus(resourceGroupName string, hubName string, predictionName string, parameters PredictionModelStatus) (result autorest.Response, err error) { + req, err := client.ModelStatusPreparer(resourceGroupName, hubName, predictionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ModelStatus", nil, "Failure preparing request") + return + } + + resp, err := client.ModelStatusSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ModelStatus", resp, "Failure sending request") + return + } + + result, err = client.ModelStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "customerinsights.PredictionsClient", "ModelStatus", resp, "Failure responding to request") + } + + return +} + +// ModelStatusPreparer prepares the ModelStatus request. +func (client PredictionsClient) ModelStatusPreparer(resourceGroupName string, hubName string, predictionName string, parameters PredictionModelStatus) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "hubName": autorest.Encode("path", hubName), + "predictionName": autorest.Encode("path", predictionName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-26" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/predictions/{predictionName}/modelStatus", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ModelStatusSender sends the ModelStatus request. The method will close the +// http.Response Body if it receives an error. +func (client PredictionsClient) ModelStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ModelStatusResponder handles the response to the ModelStatus request. The method always +// closes the http.Response Body. +func (client PredictionsClient) ModelStatusResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/profiles.go index c323e8179..1f412d31f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/profiles.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,9 +24,8 @@ import ( "net/http" ) -// ProfilesClient is the the Azure Customer Insights management API provides a -// RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the +// ProfilesClient is the the Azure Customer Insights management API provides a RESTful set of web services that +// interact with Azure Customer Insights service to manage your resources. The API has entities that capture the // relationship between an end user and the Azure Customer Insights service. type ProfilesClient struct { ManagementClient @@ -38,20 +36,17 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient -// client. +// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient { return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a profile within a Hub, or updates an existing -// profile. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// CreateOrUpdate creates a profile within a Hub, or updates an existing profile. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. profileName is the name of the profile. parameters is parameters -// supplied to the create/delete Profile type operation +// resourceGroupName is the name of the resource group. hubName is the name of the hub. profileName is the name of the +// profile. parameters is parameters supplied to the create/delete Profile type operation func (client ProfilesClient) CreateOrUpdate(resourceGroupName string, hubName string, profileName string, parameters ProfileResourceFormat, cancel <-chan struct{}) (<-chan ProfileResourceFormat, <-chan error) { resultChan := make(chan ProfileResourceFormat, 1) errChan := make(chan error, 1) @@ -70,8 +65,10 @@ func (client ProfilesClient) CreateOrUpdate(resourceGroupName string, hubName st var err error var result ProfileResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -105,7 +102,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(resourceGroupName string, hu "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -141,13 +138,11 @@ func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes a profile within a hub This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes a profile within a hub This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. profileName is the name of the profile. localeCode is locale of -// profile to retrieve, default is en-us. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. profileName is the name of the +// profile. localeCode is locale of profile to retrieve, default is en-us. func (client ProfilesClient) Delete(resourceGroupName string, hubName string, profileName string, localeCode string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -155,8 +150,10 @@ func (client ProfilesClient) Delete(resourceGroupName string, hubName string, pr var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -190,7 +187,7 @@ func (client ProfilesClient) DeletePreparer(resourceGroupName string, hubName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -228,9 +225,8 @@ func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autore // Get gets information about the specified profile. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. profileName is the name of the profile. localeCode is locale of -// profile to retrieve, default is en-us. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. profileName is the name of the +// profile. localeCode is locale of profile to retrieve, default is en-us. func (client ProfilesClient) Get(resourceGroupName string, hubName string, profileName string, localeCode string) (result ProfileResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, profileName, localeCode) if err != nil { @@ -262,7 +258,7 @@ func (client ProfilesClient) GetPreparer(resourceGroupName string, hubName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -297,13 +293,11 @@ func (client ProfilesClient) GetResponder(resp *http.Response) (result ProfileRe return } -// GetEnrichingKpis gets the KPIs that enrich the profile Type identified by -// the supplied name. Enrichment happens through participants of the -// Interaction on an Interaction KPI and through Relationships for Profile -// KPIs. +// GetEnrichingKpis gets the KPIs that enrich the profile Type identified by the supplied name. Enrichment happens +// through participants of the Interaction on an Interaction KPI and through Relationships for Profile KPIs. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. profileName is the name of the profile. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. profileName is the name of the +// profile. func (client ProfilesClient) GetEnrichingKpis(resourceGroupName string, hubName string, profileName string) (result ListKpiDefinition, err error) { req, err := client.GetEnrichingKpisPreparer(resourceGroupName, hubName, profileName) if err != nil { @@ -335,7 +329,7 @@ func (client ProfilesClient) GetEnrichingKpisPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -369,8 +363,8 @@ func (client ProfilesClient) GetEnrichingKpisResponder(resp *http.Response) (res // ListByHub gets all profile in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. localeCode is locale of profile to retrieve, default is en-us. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. localeCode is locale of profile +// to retrieve, default is en-us. func (client ProfilesClient) ListByHub(resourceGroupName string, hubName string, localeCode string) (result ProfileListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName, localeCode) if err != nil { @@ -401,7 +395,7 @@ func (client ProfilesClient) ListByHubPreparer(resourceGroupName string, hubName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -459,3 +453,48 @@ func (client ProfilesClient) ListByHubNextResults(lastResults ProfileListResult) return } + +// ListByHubComplete gets all elements from the list without paging. +func (client ProfilesClient) ListByHubComplete(resourceGroupName string, hubName string, localeCode string, cancel <-chan struct{}) (<-chan ProfileResourceFormat, <-chan error) { + resultChan := make(chan ProfileResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName, localeCode) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationshiplinks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationshiplinks.go index 6cac63649..f04b806bf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationshiplinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationshiplinks.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,36 +24,29 @@ import ( "net/http" ) -// RelationshipLinksClient is the the Azure Customer Insights management API -// provides a RESTful set of web services that interact with Azure Customer -// Insights service to manage your resources. The API has entities that capture -// the relationship between an end user and the Azure Customer Insights -// service. +// RelationshipLinksClient is the the Azure Customer Insights management API provides a RESTful set of web services +// that interact with Azure Customer Insights service to manage your resources. The API has entities that capture the +// relationship between an end user and the Azure Customer Insights service. type RelationshipLinksClient struct { ManagementClient } -// NewRelationshipLinksClient creates an instance of the -// RelationshipLinksClient client. +// NewRelationshipLinksClient creates an instance of the RelationshipLinksClient client. func NewRelationshipLinksClient(subscriptionID string) RelationshipLinksClient { return NewRelationshipLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRelationshipLinksClientWithBaseURI creates an instance of the -// RelationshipLinksClient client. +// NewRelationshipLinksClientWithBaseURI creates an instance of the RelationshipLinksClient client. func NewRelationshipLinksClientWithBaseURI(baseURI string, subscriptionID string) RelationshipLinksClient { return RelationshipLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a relationship link or updates an existing -// relationship link within a hub. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates a relationship link or updates an existing relationship link within a hub. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. relationshipLinkName is the name of the relationship link. -// parameters is parameters supplied to the CreateOrUpdate relationship link -// operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. relationshipLinkName is the +// name of the relationship link. parameters is parameters supplied to the CreateOrUpdate relationship link operation. func (client RelationshipLinksClient) CreateOrUpdate(resourceGroupName string, hubName string, relationshipLinkName string, parameters RelationshipLinkResourceFormat, cancel <-chan struct{}) (<-chan RelationshipLinkResourceFormat, <-chan error) { resultChan := make(chan RelationshipLinkResourceFormat, 1) errChan := make(chan error, 1) @@ -80,8 +72,10 @@ func (client RelationshipLinksClient) CreateOrUpdate(resourceGroupName string, h var err error var result RelationshipLinkResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -115,7 +109,7 @@ func (client RelationshipLinksClient) CreateOrUpdatePreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -151,13 +145,11 @@ func (client RelationshipLinksClient) CreateOrUpdateResponder(resp *http.Respons return } -// Delete deletes a relationship link within a hub. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes a relationship link within a hub. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. relationshipLinkName is the name of the relationship. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. relationshipLinkName is the +// name of the relationship. func (client RelationshipLinksClient) Delete(resourceGroupName string, hubName string, relationshipLinkName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -165,8 +157,10 @@ func (client RelationshipLinksClient) Delete(resourceGroupName string, hubName s var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -200,7 +194,7 @@ func (client RelationshipLinksClient) DeletePreparer(resourceGroupName string, h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -235,8 +229,8 @@ func (client RelationshipLinksClient) DeleteResponder(resp *http.Response) (resu // Get gets information about the specified relationship Link. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. relationshipLinkName is the name of the relationship link. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. relationshipLinkName is the +// name of the relationship link. func (client RelationshipLinksClient) Get(resourceGroupName string, hubName string, relationshipLinkName string) (result RelationshipLinkResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, relationshipLinkName) if err != nil { @@ -268,7 +262,7 @@ func (client RelationshipLinksClient) GetPreparer(resourceGroupName string, hubN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -302,8 +296,7 @@ func (client RelationshipLinksClient) GetResponder(resp *http.Response) (result // ListByHub gets all relationship links in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client RelationshipLinksClient) ListByHub(resourceGroupName string, hubName string) (result RelationshipLinkListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -334,7 +327,7 @@ func (client RelationshipLinksClient) ListByHubPreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -389,3 +382,48 @@ func (client RelationshipLinksClient) ListByHubNextResults(lastResults Relations return } + +// ListByHubComplete gets all elements from the list without paging. +func (client RelationshipLinksClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan RelationshipLinkResourceFormat, <-chan error) { + resultChan := make(chan RelationshipLinkResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationships.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationships.go index 297835f2d..e4be35815 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationships.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/relationships.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,35 +24,29 @@ import ( "net/http" ) -// RelationshipsClient is the the Azure Customer Insights management API -// provides a RESTful set of web services that interact with Azure Customer -// Insights service to manage your resources. The API has entities that capture -// the relationship between an end user and the Azure Customer Insights -// service. +// RelationshipsClient is the the Azure Customer Insights management API provides a RESTful set of web services that +// interact with Azure Customer Insights service to manage your resources. The API has entities that capture the +// relationship between an end user and the Azure Customer Insights service. type RelationshipsClient struct { ManagementClient } -// NewRelationshipsClient creates an instance of the RelationshipsClient -// client. +// NewRelationshipsClient creates an instance of the RelationshipsClient client. func NewRelationshipsClient(subscriptionID string) RelationshipsClient { return NewRelationshipsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRelationshipsClientWithBaseURI creates an instance of the -// RelationshipsClient client. +// NewRelationshipsClientWithBaseURI creates an instance of the RelationshipsClient client. func NewRelationshipsClientWithBaseURI(baseURI string, subscriptionID string) RelationshipsClient { return RelationshipsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a relationship or updates an existing relationship -// within a hub. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates a relationship or updates an existing relationship within a hub. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. relationshipName is the name of the Relationship. parameters is -// parameters supplied to the CreateOrUpdate Relationship operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. relationshipName is the name of +// the Relationship. parameters is parameters supplied to the CreateOrUpdate Relationship operation. func (client RelationshipsClient) CreateOrUpdate(resourceGroupName string, hubName string, relationshipName string, parameters RelationshipResourceFormat, cancel <-chan struct{}) (<-chan RelationshipResourceFormat, <-chan error) { resultChan := make(chan RelationshipResourceFormat, 1) errChan := make(chan error, 1) @@ -77,8 +70,10 @@ func (client RelationshipsClient) CreateOrUpdate(resourceGroupName string, hubNa var err error var result RelationshipResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -112,7 +107,7 @@ func (client RelationshipsClient) CreateOrUpdatePreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -148,13 +143,11 @@ func (client RelationshipsClient) CreateOrUpdateResponder(resp *http.Response) ( return } -// Delete deletes a relationship within a hub. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes a relationship within a hub. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. relationshipName is the name of the relationship. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. relationshipName is the name of +// the relationship. func (client RelationshipsClient) Delete(resourceGroupName string, hubName string, relationshipName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -162,8 +155,10 @@ func (client RelationshipsClient) Delete(resourceGroupName string, hubName strin var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -197,7 +192,7 @@ func (client RelationshipsClient) DeletePreparer(resourceGroupName string, hubNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -232,8 +227,8 @@ func (client RelationshipsClient) DeleteResponder(resp *http.Response) (result a // Get gets information about the specified relationship. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. relationshipName is the name of the relationship. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. relationshipName is the name of +// the relationship. func (client RelationshipsClient) Get(resourceGroupName string, hubName string, relationshipName string) (result RelationshipResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, relationshipName) if err != nil { @@ -265,7 +260,7 @@ func (client RelationshipsClient) GetPreparer(resourceGroupName string, hubName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -299,8 +294,7 @@ func (client RelationshipsClient) GetResponder(resp *http.Response) (result Rela // ListByHub gets all relationships in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client RelationshipsClient) ListByHub(resourceGroupName string, hubName string) (result RelationshipListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -331,7 +325,7 @@ func (client RelationshipsClient) ListByHubPreparer(resourceGroupName string, hu "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -386,3 +380,48 @@ func (client RelationshipsClient) ListByHubNextResults(lastResults RelationshipL return } + +// ListByHubComplete gets all elements from the list without paging. +func (client RelationshipsClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan RelationshipResourceFormat, <-chan error) { + resultChan := make(chan RelationshipResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roleassignments.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roleassignments.go index 22b898812..75abcc698 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roleassignments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roleassignments.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,35 +24,29 @@ import ( "net/http" ) -// RoleAssignmentsClient is the the Azure Customer Insights management API -// provides a RESTful set of web services that interact with Azure Customer -// Insights service to manage your resources. The API has entities that capture -// the relationship between an end user and the Azure Customer Insights -// service. +// RoleAssignmentsClient is the the Azure Customer Insights management API provides a RESTful set of web services that +// interact with Azure Customer Insights service to manage your resources. The API has entities that capture the +// relationship between an end user and the Azure Customer Insights service. type RoleAssignmentsClient struct { ManagementClient } -// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient -// client. +// NewRoleAssignmentsClient creates an instance of the RoleAssignmentsClient client. func NewRoleAssignmentsClient(subscriptionID string) RoleAssignmentsClient { return NewRoleAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRoleAssignmentsClientWithBaseURI creates an instance of the -// RoleAssignmentsClient client. +// NewRoleAssignmentsClientWithBaseURI creates an instance of the RoleAssignmentsClient client. func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) RoleAssignmentsClient { return RoleAssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a role assignment in the hub. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate creates or updates a role assignment in the hub. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. assignmentName is the assignment name parameters is parameters -// supplied to the CreateOrUpdate RoleAssignment operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. assignmentName is the +// assignment name parameters is parameters supplied to the CreateOrUpdate RoleAssignment operation. func (client RoleAssignmentsClient) CreateOrUpdate(resourceGroupName string, hubName string, assignmentName string, parameters RoleAssignmentResourceFormat, cancel <-chan struct{}) (<-chan RoleAssignmentResourceFormat, <-chan error) { resultChan := make(chan RoleAssignmentResourceFormat, 1) errChan := make(chan error, 1) @@ -75,8 +68,10 @@ func (client RoleAssignmentsClient) CreateOrUpdate(resourceGroupName string, hub var err error var result RoleAssignmentResourceFormat defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -110,7 +105,7 @@ func (client RoleAssignmentsClient) CreateOrUpdatePreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -148,8 +143,8 @@ func (client RoleAssignmentsClient) CreateOrUpdateResponder(resp *http.Response) // Delete deletes the role assignment in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. assignmentName is the name of the role assignment. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. assignmentName is the name of +// the role assignment. func (client RoleAssignmentsClient) Delete(resourceGroupName string, hubName string, assignmentName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, hubName, assignmentName) if err != nil { @@ -181,7 +176,7 @@ func (client RoleAssignmentsClient) DeletePreparer(resourceGroupName string, hub "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -214,8 +209,8 @@ func (client RoleAssignmentsClient) DeleteResponder(resp *http.Response) (result // Get gets the role assignment in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. assignmentName is the name of the role assignment. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. assignmentName is the name of +// the role assignment. func (client RoleAssignmentsClient) Get(resourceGroupName string, hubName string, assignmentName string) (result RoleAssignmentResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, assignmentName) if err != nil { @@ -247,7 +242,7 @@ func (client RoleAssignmentsClient) GetPreparer(resourceGroupName string, hubNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,8 +276,7 @@ func (client RoleAssignmentsClient) GetResponder(resp *http.Response) (result Ro // ListByHub gets all the role assignments for the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client RoleAssignmentsClient) ListByHub(resourceGroupName string, hubName string) (result RoleAssignmentListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -313,7 +307,7 @@ func (client RoleAssignmentsClient) ListByHubPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -368,3 +362,48 @@ func (client RoleAssignmentsClient) ListByHubNextResults(lastResults RoleAssignm return } + +// ListByHubComplete gets all elements from the list without paging. +func (client RoleAssignmentsClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan RoleAssignmentResourceFormat, <-chan error) { + resultChan := make(chan RoleAssignmentResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roles.go index 6f0bc7e77..a7abf091e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/roles.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,10 +23,9 @@ import ( "net/http" ) -// RolesClient is the the Azure Customer Insights management API provides a -// RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the -// relationship between an end user and the Azure Customer Insights service. +// RolesClient is the the Azure Customer Insights management API provides a RESTful set of web services that interact +// with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship +// between an end user and the Azure Customer Insights service. type RolesClient struct { ManagementClient } @@ -44,8 +42,7 @@ func NewRolesClientWithBaseURI(baseURI string, subscriptionID string) RolesClien // ListByHub gets all the roles for the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client RolesClient) ListByHub(resourceGroupName string, hubName string) (result RoleListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -76,7 +73,7 @@ func (client RolesClient) ListByHubPreparer(resourceGroupName string, hubName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -131,3 +128,48 @@ func (client RolesClient) ListByHubNextResults(lastResults RoleListResult) (resu return } + +// ListByHubComplete gets all elements from the list without paging. +func (client RolesClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan RoleResourceFormat, <-chan error) { + resultChan := make(chan RoleResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go index 6bdf9b971..0f52997bc 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/version.go @@ -14,15 +14,15 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-customerinsights/2017-04-26" + return "Azure-SDK-For-Go/v11.0.0-beta arm-customerinsights/2017-04-26" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/views.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/views.go index 6eaba3d70..e79a68b90 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/views.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/views.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// ViewsClient is the the Azure Customer Insights management API provides a -// RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the -// relationship between an end user and the Azure Customer Insights service. +// ViewsClient is the the Azure Customer Insights management API provides a RESTful set of web services that interact +// with Azure Customer Insights service to manage your resources. The API has entities that capture the relationship +// between an end user and the Azure Customer Insights service. type ViewsClient struct { ManagementClient } @@ -45,9 +43,8 @@ func NewViewsClientWithBaseURI(baseURI string, subscriptionID string) ViewsClien // CreateOrUpdate creates a view or updates an exisiting view in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. viewName is the name of the view. parameters is parameters supplied -// to the CreateOrUpdate View operation. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. viewName is the name of the +// view. parameters is parameters supplied to the CreateOrUpdate View operation. func (client ViewsClient) CreateOrUpdate(resourceGroupName string, hubName string, viewName string, parameters ViewResourceFormat) (result ViewResourceFormat, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: viewName, @@ -89,7 +86,7 @@ func (client ViewsClient) CreateOrUpdatePreparer(resourceGroupName string, hubNa "viewName": autorest.Encode("path", viewName), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,9 +122,8 @@ func (client ViewsClient) CreateOrUpdateResponder(resp *http.Response) (result V // Delete deletes a view in the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. viewName is the name of the view. userID is the user ID. Use * to -// retreive hub level view. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. viewName is the name of the +// view. userID is the user ID. Use * to retreive hub level view. func (client ViewsClient) Delete(resourceGroupName string, hubName string, viewName string, userID string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, hubName, viewName, userID) if err != nil { @@ -159,7 +155,7 @@ func (client ViewsClient) DeletePreparer(resourceGroupName string, hubName strin "viewName": autorest.Encode("path", viewName), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, "userId": autorest.Encode("query", userID), @@ -193,9 +189,8 @@ func (client ViewsClient) DeleteResponder(resp *http.Response) (result autorest. // Get gets a view in the hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. viewName is the name of the view. userID is the user ID. Use * to -// retreive hub level view. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. viewName is the name of the +// view. userID is the user ID. Use * to retreive hub level view. func (client ViewsClient) Get(resourceGroupName string, hubName string, viewName string, userID string) (result ViewResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, viewName, userID) if err != nil { @@ -227,7 +222,7 @@ func (client ViewsClient) GetPreparer(resourceGroupName string, hubName string, "viewName": autorest.Encode("path", viewName), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, "userId": autorest.Encode("query", userID), @@ -262,8 +257,8 @@ func (client ViewsClient) GetResponder(resp *http.Response) (result ViewResource // ListByHub gets all available views for given user in the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. userID is the user ID. Use * to retreive hub level views. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. userID is the user ID. Use * to +// retreive hub level views. func (client ViewsClient) ListByHub(resourceGroupName string, hubName string, userID string) (result ViewListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName, userID) if err != nil { @@ -294,7 +289,7 @@ func (client ViewsClient) ListByHubPreparer(resourceGroupName string, hubName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, "userId": autorest.Encode("query", userID), @@ -350,3 +345,48 @@ func (client ViewsClient) ListByHubNextResults(lastResults ViewListResult) (resu return } + +// ListByHubComplete gets all elements from the list without paging. +func (client ViewsClient) ListByHubComplete(resourceGroupName string, hubName string, userID string, cancel <-chan struct{}) (<-chan ViewResourceFormat, <-chan error) { + resultChan := make(chan ViewResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName, userID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/widgettypes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/widgettypes.go index 120d613fb..03c65cc46 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/widgettypes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/customer-insights/widgettypes.go @@ -14,9 +14,8 @@ package customerinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,9 +23,8 @@ import ( "net/http" ) -// WidgetTypesClient is the the Azure Customer Insights management API provides -// a RESTful set of web services that interact with Azure Customer Insights -// service to manage your resources. The API has entities that capture the +// WidgetTypesClient is the the Azure Customer Insights management API provides a RESTful set of web services that +// interact with Azure Customer Insights service to manage your resources. The API has entities that capture the // relationship between an end user and the Azure Customer Insights service. type WidgetTypesClient struct { ManagementClient @@ -37,16 +35,15 @@ func NewWidgetTypesClient(subscriptionID string) WidgetTypesClient { return NewWidgetTypesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWidgetTypesClientWithBaseURI creates an instance of the WidgetTypesClient -// client. +// NewWidgetTypesClientWithBaseURI creates an instance of the WidgetTypesClient client. func NewWidgetTypesClientWithBaseURI(baseURI string, subscriptionID string) WidgetTypesClient { return WidgetTypesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a widget type in the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. widgetTypeName is the name of the widget type. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. widgetTypeName is the name of +// the widget type. func (client WidgetTypesClient) Get(resourceGroupName string, hubName string, widgetTypeName string) (result WidgetTypeResourceFormat, err error) { req, err := client.GetPreparer(resourceGroupName, hubName, widgetTypeName) if err != nil { @@ -78,7 +75,7 @@ func (client WidgetTypesClient) GetPreparer(resourceGroupName string, hubName st "widgetTypeName": autorest.Encode("path", widgetTypeName), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,8 +109,7 @@ func (client WidgetTypesClient) GetResponder(resp *http.Response) (result Widget // ListByHub gets all available widget types in the specified hub. // -// resourceGroupName is the name of the resource group. hubName is the name of -// the hub. +// resourceGroupName is the name of the resource group. hubName is the name of the hub. func (client WidgetTypesClient) ListByHub(resourceGroupName string, hubName string) (result WidgetTypeListResult, err error) { req, err := client.ListByHubPreparer(resourceGroupName, hubName) if err != nil { @@ -144,7 +140,7 @@ func (client WidgetTypesClient) ListByHubPreparer(resourceGroupName string, hubN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-01-01" + const APIVersion = "2017-04-26" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,3 +195,48 @@ func (client WidgetTypesClient) ListByHubNextResults(lastResults WidgetTypeListR return } + +// ListByHubComplete gets all elements from the list without paging. +func (client WidgetTypesClient) ListByHubComplete(resourceGroupName string, hubName string, cancel <-chan struct{}) (<-chan WidgetTypeResourceFormat, <-chan error) { + resultChan := make(chan WidgetTypeResourceFormat) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByHub(resourceGroupName, hubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/client.go index 41f91ac70..659d40438 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/client.go @@ -1,5 +1,4 @@ -// Package account implements the Azure ARM Account service API version -// 2016-11-01. +// Package account implements the Azure ARM Account service API version 2016-11-01. // // Creates an Azure Data Lake Analytics account management client. package account @@ -18,9 +17,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/computepolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/computepolicies.go new file mode 100644 index 000000000..f3a2b2aa0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/computepolicies.go @@ -0,0 +1,468 @@ +package account + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ComputePoliciesClient is the creates an Azure Data Lake Analytics account management client. +type ComputePoliciesClient struct { + ManagementClient +} + +// NewComputePoliciesClient creates an instance of the ComputePoliciesClient client. +func NewComputePoliciesClient(subscriptionID string) ComputePoliciesClient { + return NewComputePoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewComputePoliciesClientWithBaseURI creates an instance of the ComputePoliciesClient client. +func NewComputePoliciesClientWithBaseURI(baseURI string, subscriptionID string) ComputePoliciesClient { + return ComputePoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the specified compute policy. During update, the compute policy with the specified +// name will be replaced with this new compute policy. An account supports, at most, 50 policies +// +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to add or replace the compute policy. computePolicyName is the name +// of the compute policy to create or update. parameters is parameters supplied to create or update the compute policy. +// The max degree of parallelism per job property, min priority per job property, or both must be present. +func (client ComputePoliciesClient) CreateOrUpdate(resourceGroupName string, accountName string, computePolicyName string, parameters ComputePolicyCreateOrUpdateParameters) (result ComputePolicy, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ComputePolicyPropertiesCreateParameters", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ComputePolicyPropertiesCreateParameters.ObjectID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ComputePolicyPropertiesCreateParameters.MaxDegreeOfParallelismPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ComputePolicyPropertiesCreateParameters.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "parameters.ComputePolicyPropertiesCreateParameters.MinPriorityPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ComputePolicyPropertiesCreateParameters.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "account.ComputePoliciesClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, accountName, computePolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ComputePoliciesClient) CreateOrUpdatePreparer(resourceGroupName string, accountName string, computePolicyName string, parameters ComputePolicyCreateOrUpdateParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ComputePoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ComputePolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified compute policy from the specified Data Lake Analytics account +// +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to delete the compute policy. computePolicyName is the +// name of the compute policy to delete. +func (client ComputePoliciesClient) Delete(resourceGroupName string, accountName string, computePolicyName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceGroupName, accountName, computePolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ComputePoliciesClient) DeletePreparer(resourceGroupName string, accountName string, computePolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ComputePoliciesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified Data Lake Analytics compute policy. +// +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to get the compute policy. computePolicyName is the name +// of the compute policy to retrieve. +func (client ComputePoliciesClient) Get(resourceGroupName string, accountName string, computePolicyName string) (result ComputePolicy, err error) { + req, err := client.GetPreparer(resourceGroupName, accountName, computePolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ComputePoliciesClient) GetPreparer(resourceGroupName string, accountName string, computePolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ComputePoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) GetResponder(resp *http.Response) (result ComputePolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByAccount lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An +// account supports, at most, 50 policies +// +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to get the compute policies. +func (client ComputePoliciesClient) ListByAccount(resourceGroupName string, accountName string) (result ComputePolicyListResult, err error) { + req, err := client.ListByAccountPreparer(resourceGroupName, accountName) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", resp, "Failure sending request") + return + } + + result, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", resp, "Failure responding to request") + } + + return +} + +// ListByAccountPreparer prepares the ListByAccount request. +func (client ComputePoliciesClient) ListByAccountPreparer(resourceGroupName string, accountName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByAccountSender sends the ListByAccount request. The method will close the +// http.Response Body if it receives an error. +func (client ComputePoliciesClient) ListByAccountSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByAccountResponder handles the response to the ListByAccount request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) ListByAccountResponder(resp *http.Response) (result ComputePolicyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByAccountNextResults retrieves the next set of results, if any. +func (client ComputePoliciesClient) ListByAccountNextResults(lastResults ComputePolicyListResult) (result ComputePolicyListResult, err error) { + req, err := lastResults.ComputePolicyListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", resp, "Failure sending next results request") + } + + result, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "ListByAccount", resp, "Failure responding to next results request") + } + + return +} + +// ListByAccountComplete gets all elements from the list without paging. +func (client ComputePoliciesClient) ListByAccountComplete(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan ComputePolicy, <-chan error) { + resultChan := make(chan ComputePolicy) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAccount(resourceGroupName, accountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates the specified compute policy. +// +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to which to update the compute policy. computePolicyName is the name +// of the compute policy to update. parameters is parameters supplied to update the compute policy. +func (client ComputePoliciesClient) Update(resourceGroupName string, accountName string, computePolicyName string, parameters *ComputePolicy) (result ComputePolicy, err error) { + req, err := client.UpdatePreparer(resourceGroupName, accountName, computePolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ComputePoliciesClient) UpdatePreparer(resourceGroupName string, accountName string, computePolicyName string, parameters *ComputePolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountName": autorest.Encode("path", accountName), + "computePolicyName": autorest.Encode("path", computePolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-11-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeAnalytics/accounts/{accountName}/computePolicies/{computePolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + if parameters != nil { + preparer = autorest.DecoratePreparer(preparer, + autorest.WithJSON(parameters)) + } + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ComputePoliciesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ComputePoliciesClient) UpdateResponder(resp *http.Response) (result ComputePolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/datalakestoreaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/datalakestoreaccounts.go index 81bfb4243..f20823ddd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/datalakestoreaccounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/datalakestoreaccounts.go @@ -14,9 +14,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,26 @@ import ( "net/http" ) -// DataLakeStoreAccountsClient is the creates an Azure Data Lake Analytics -// account management client. +// DataLakeStoreAccountsClient is the creates an Azure Data Lake Analytics account management client. type DataLakeStoreAccountsClient struct { ManagementClient } -// NewDataLakeStoreAccountsClient creates an instance of the -// DataLakeStoreAccountsClient client. +// NewDataLakeStoreAccountsClient creates an instance of the DataLakeStoreAccountsClient client. func NewDataLakeStoreAccountsClient(subscriptionID string) DataLakeStoreAccountsClient { return NewDataLakeStoreAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataLakeStoreAccountsClientWithBaseURI creates an instance of the -// DataLakeStoreAccountsClient client. +// NewDataLakeStoreAccountsClientWithBaseURI creates an instance of the DataLakeStoreAccountsClient client. func NewDataLakeStoreAccountsClientWithBaseURI(baseURI string, subscriptionID string) DataLakeStoreAccountsClient { return DataLakeStoreAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Add updates the specified Data Lake Analytics account to include the -// additional Data Lake Store account. +// Add updates the specified Data Lake Analytics account to include the additional Data Lake Store account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to which to add the Data Lake Store account. -// dataLakeStoreAccountName is the name of the Data Lake Store account to add. -// parameters is the details of the Data Lake Store account. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to which to add the Data Lake Store account. dataLakeStoreAccountName +// is the name of the Data Lake Store account to add. parameters is the details of the Data Lake Store account. func (client DataLakeStoreAccountsClient) Add(resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters *AddDataLakeStoreParameters) (result autorest.Response, err error) { req, err := client.AddPreparer(resourceGroupName, accountName, dataLakeStoreAccountName, parameters) if err != nil { @@ -118,14 +111,11 @@ func (client DataLakeStoreAccountsClient) AddResponder(resp *http.Response) (res return } -// Delete updates the Data Lake Analytics account specified to remove the -// specified Data Lake Store account. +// Delete updates the Data Lake Analytics account specified to remove the specified Data Lake Store account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which to remove the Data Lake Store account. -// dataLakeStoreAccountName is the name of the Data Lake Store account to -// remove +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to remove the Data Lake Store account. +// dataLakeStoreAccountName is the name of the Data Lake Store account to remove func (client DataLakeStoreAccountsClient) Delete(resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, accountName, dataLakeStoreAccountName) if err != nil { @@ -188,14 +178,11 @@ func (client DataLakeStoreAccountsClient) DeleteResponder(resp *http.Response) ( return } -// Get gets the specified Data Lake Store account details in the specified Data -// Lake Analytics account. +// Get gets the specified Data Lake Store account details in the specified Data Lake Analytics account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which to retrieve the Data Lake Store account -// details. dataLakeStoreAccountName is the name of the Data Lake Store account -// to retrieve +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to retrieve the Data Lake Store account details. +// dataLakeStoreAccountName is the name of the Data Lake Store account to retrieve func (client DataLakeStoreAccountsClient) Get(resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result DataLakeStoreAccountInfo, err error) { req, err := client.GetPreparer(resourceGroupName, accountName, dataLakeStoreAccountName) if err != nil { @@ -259,23 +246,18 @@ func (client DataLakeStoreAccountsClient) GetResponder(resp *http.Response) (res return } -// ListByAccount gets the first page of Data Lake Store accounts linked to the -// specified Data Lake Analytics account. The response includes a link to the -// next page, if any. +// ListByAccount gets the first page of Data Lake Store accounts linked to the specified Data Lake Analytics account. +// The response includes a link to the next page, if any. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account for which to list Data Lake Store accounts. filter is -// oData filter. Optional. top is the number of items to return. Optional. skip -// is the number of items to skip over before returning elements. Optional. -// selectParameter is oData Select statement. Limits the properties on each -// entry to just those requested, e.g. -// Categories?$select=CategoryName,Description. Optional. orderby is orderBy -// clause. One or more comma-separated expressions with an optional "asc" (the -// default) or "desc" depending on the order you'd like the values sorted, e.g. -// Categories?$orderby=CategoryName desc. Optional. count is the Boolean value -// of true or false to request a count of the matching resources included with -// the resources in the response, e.g. Categories?$count=true. Optional. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account for which to list Data Lake Store accounts. filter is oData filter. +// Optional. top is the number of items to return. Optional. skip is the number of items to skip over before returning +// elements. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those +// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more +// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the +// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false to +// request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. +// Optional. func (client DataLakeStoreAccountsClient) ListByAccount(resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListDataLakeStoreResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -389,3 +371,48 @@ func (client DataLakeStoreAccountsClient) ListByAccountNextResults(lastResults D return } + +// ListByAccountComplete gets all elements from the list without paging. +func (client DataLakeStoreAccountsClient) ListByAccountComplete(resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, cancel <-chan struct{}) (<-chan DataLakeStoreAccountInfo, <-chan error) { + resultChan := make(chan DataLakeStoreAccountInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAccount(resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/firewallrules.go index deeb03252..a799dcb0c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/firewallrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/firewallrules.go @@ -14,9 +14,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,27 @@ import ( "net/http" ) -// FirewallRulesClient is the creates an Azure Data Lake Analytics account -// management client. +// FirewallRulesClient is the creates an Azure Data Lake Analytics account management client. type FirewallRulesClient struct { ManagementClient } -// NewFirewallRulesClient creates an instance of the FirewallRulesClient -// client. +// NewFirewallRulesClient creates an instance of the FirewallRulesClient client. func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the -// FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the specified firewall rule. During -// update, the firewall rule with the specified name will be replaced with this -// new firewall rule. +// CreateOrUpdate creates or updates the specified firewall rule. During update, the firewall rule with the specified +// name will be replaced with this new firewall rule. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to add or replace the firewall rule. firewallRuleName is -// the name of the firewall rule to create or update. parameters is parameters -// supplied to create or update the firewall rule. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to add or replace the firewall rule. firewallRuleName is the name of +// the firewall rule to create or update. parameters is parameters supplied to create or update the firewall rule. func (client FirewallRulesClient) CreateOrUpdate(resourceGroupName string, accountName string, firewallRuleName string, parameters FirewallRule) (result FirewallRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -126,13 +119,11 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) ( return } -// Delete deletes the specified firewall rule from the specified Data Lake -// Analytics account +// Delete deletes the specified firewall rule from the specified Data Lake Analytics account // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which to delete the firewall rule. firewallRuleName -// is the name of the firewall rule to delete. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to delete the firewall rule. firewallRuleName is the name +// of the firewall rule to delete. func (client FirewallRulesClient) Delete(resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, accountName, firewallRuleName) if err != nil { @@ -197,10 +188,9 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a // Get gets the specified Data Lake Analytics firewall rule. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which to get the firewall rule. firewallRuleName is -// the name of the firewall rule to retrieve. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to get the firewall rule. firewallRuleName is the name of +// the firewall rule to retrieve. func (client FirewallRulesClient) Get(resourceGroupName string, accountName string, firewallRuleName string) (result FirewallRule, err error) { req, err := client.GetPreparer(resourceGroupName, accountName, firewallRuleName) if err != nil { @@ -264,12 +254,10 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire return } -// ListByAccount lists the Data Lake Analytics firewall rules within the -// specified Data Lake Analytics account. +// ListByAccount lists the Data Lake Analytics firewall rules within the specified Data Lake Analytics account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which to get the firewall rules. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to get the firewall rules. func (client FirewallRulesClient) ListByAccount(resourceGroupName string, accountName string) (result DataLakeAnalyticsFirewallRuleListResult, err error) { req, err := client.ListByAccountPreparer(resourceGroupName, accountName) if err != nil { @@ -356,13 +344,56 @@ func (client FirewallRulesClient) ListByAccountNextResults(lastResults DataLakeA return } +// ListByAccountComplete gets all elements from the list without paging. +func (client FirewallRulesClient) ListByAccountComplete(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan FirewallRule, <-chan error) { + resultChan := make(chan FirewallRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAccount(resourceGroupName, accountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates the specified firewall rule. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to which to update the firewall rule. firewallRuleName is -// the name of the firewall rule to update. parameters is parameters supplied -// to update the firewall rule. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to which to update the firewall rule. firewallRuleName is the name of +// the firewall rule to update. parameters is parameters supplied to update the firewall rule. func (client FirewallRulesClient) Update(resourceGroupName string, accountName string, firewallRuleName string, parameters *UpdateFirewallRuleParameters) (result FirewallRule, err error) { req, err := client.UpdatePreparer(resourceGroupName, accountName, firewallRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/accountgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/group.go old mode 100755 new mode 100644 similarity index 79% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/accountgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/group.go index e1791b1da..553040198 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/accountgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/group.go @@ -14,9 +14,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// GroupClient is the creates an Azure Data Lake Analytics account management -// client. +// GroupClient is the creates an Azure Data Lake Analytics account management client. type GroupClient struct { ManagementClient } @@ -41,15 +39,12 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates the specified Data Lake Analytics account. This supplies the -// user with computation services for Data Lake Analytics workloads This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Create creates the specified Data Lake Analytics account. This supplies the user with computation services for Data +// Lake Analytics workloads This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account.the account will be associated with. accountName -// is the name of the Data Lake Analytics account to create. parameters is +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account.the account +// will be associated with. accountName is the name of the Data Lake Analytics account to create. parameters is // parameters supplied to the create Data Lake Analytics account operation. func (client GroupClient) Create(resourceGroupName string, accountName string, parameters DataLakeAnalyticsAccount, cancel <-chan struct{}) (<-chan DataLakeAnalyticsAccount, <-chan error) { resultChan := make(chan DataLakeAnalyticsAccount, 1) @@ -67,6 +62,10 @@ func (client GroupClient) Create(resourceGroupName string, accountName string, p {Target: "parameters.DataLakeAnalyticsAccountProperties.MaxJobCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.DataLakeAnalyticsAccountProperties.MaxJobCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, {Target: "parameters.DataLakeAnalyticsAccountProperties.DataLakeStoreAccounts", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DataLakeAnalyticsAccountProperties.MaxDegreeOfParallelismPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, + {Target: "parameters.DataLakeAnalyticsAccountProperties.MinPriorityPerJob", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DataLakeAnalyticsAccountProperties.MinPriorityPerJob", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}, }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "account.GroupClient", "Create") close(errChan) @@ -78,8 +77,10 @@ func (client GroupClient) Create(resourceGroupName string, accountName string, p var err error var result DataLakeAnalyticsAccount defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -141,21 +142,19 @@ func (client GroupClient) CreateResponder(resp *http.Response) (result DataLakeA err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// Delete begins the delete delete process for the Data Lake Analytics account -// object specified by the account name. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete begins the delete process for the Data Lake Analytics account object specified by the account name. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to delete +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to delete func (client GroupClient) Delete(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -163,8 +162,10 @@ func (client GroupClient) Delete(resourceGroupName string, accountName string, c var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -232,9 +233,8 @@ func (client GroupClient) DeleteResponder(resp *http.Response) (result autorest. // Get gets details of the specified Data Lake Analytics account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to retrieve. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to retrieve. func (client GroupClient) Get(resourceGroupName string, accountName string) (result DataLakeAnalyticsAccount, err error) { req, err := client.GetPreparer(resourceGroupName, accountName) if err != nil { @@ -297,19 +297,16 @@ func (client GroupClient) GetResponder(resp *http.Response) (result DataLakeAnal return } -// List gets the first page of Data Lake Analytics accounts, if any, within the -// current subscription. This includes a link to the next page, if any. +// List gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a +// link to the next page, if any. // -// filter is oData filter. Optional. top is the number of items to return. -// Optional. skip is the number of items to skip over before returning -// elements. Optional. selectParameter is oData Select statement. Limits the -// properties on each entry to just those requested, e.g. -// Categories?$select=CategoryName,Description. Optional. orderby is orderBy -// clause. One or more comma-separated expressions with an optional "asc" (the -// default) or "desc" depending on the order you'd like the values sorted, e.g. -// Categories?$orderby=CategoryName desc. Optional. count is the Boolean value -// of true or false to request a count of the matching resources included with -// the resources in the response, e.g. Categories?$count=true. Optional. +// filter is oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to +// skip over before returning elements. Optional. selectParameter is oData Select statement. Limits the properties on +// each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy +// clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the +// order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value +// of true or false to request a count of the matching resources included with the resources in the response, e.g. +// Categories?$count=true. Optional. func (client GroupClient) List(filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -422,21 +419,62 @@ func (client GroupClient) ListNextResults(lastResults DataLakeAnalyticsAccountLi return } -// ListByResourceGroup gets the first page of Data Lake Analytics accounts, if -// any, within a specific resource group. This includes a link to the next -// page, if any. +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, cancel <-chan struct{}) (<-chan DataLakeAnalyticsAccountBasic, <-chan error) { + resultChan := make(chan DataLakeAnalyticsAccountBasic) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter, top, skip, selectParameter, orderby, count) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. +// This includes a link to the next page, if any. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. filter is oData filter. Optional. top is the -// number of items to return. Optional. skip is the number of items to skip -// over before returning elements. Optional. selectParameter is oData Select -// statement. Limits the properties on each entry to just those requested, e.g. -// Categories?$select=CategoryName,Description. Optional. orderby is orderBy -// clause. One or more comma-separated expressions with an optional "asc" (the -// default) or "desc" depending on the order you'd like the values sorted, e.g. -// Categories?$orderby=CategoryName desc. Optional. count is the Boolean value -// of true or false to request a count of the matching resources included with -// the resources in the response, e.g. Categories?$count=true. Optional. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. filter is +// oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip over +// before returning elements. Optional. selectParameter is oData Select statement. Limits the properties on each entry +// to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One +// or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like +// the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false +// to request a count of the matching resources included with the resources in the response, e.g. +// Categories?$count=true. Optional. func (client GroupClient) ListByResourceGroup(resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -550,16 +588,58 @@ func (client GroupClient) ListByResourceGroupNextResults(lastResults DataLakeAna return } -// Update updates the Data Lake Analytics account object specified by the -// accountName with the contents of the account object. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client GroupClient) ListByResourceGroupComplete(resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, cancel <-chan struct{}) (<-chan DataLakeAnalyticsAccountBasic, <-chan error) { + resultChan := make(chan DataLakeAnalyticsAccountBasic) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, filter, top, skip, selectParameter, orderby, count) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates the Data Lake Analytics account object specified by the accountName with the contents of the account +// object. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to update. parameters is parameters supplied to the update -// Data Lake Analytics account operation. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to update. parameters is parameters supplied to the update Data Lake +// Analytics account operation. func (client GroupClient) Update(resourceGroupName string, accountName string, parameters *DataLakeAnalyticsAccountUpdateParameters, cancel <-chan struct{}) (<-chan DataLakeAnalyticsAccount, <-chan error) { resultChan := make(chan DataLakeAnalyticsAccount, 1) errChan := make(chan error, 1) @@ -567,8 +647,10 @@ func (client GroupClient) Update(resourceGroupName string, accountName string, p var err error var result DataLakeAnalyticsAccount defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/models.go index 8ca7a8d2a..b05516f36 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/models.go @@ -14,70 +14,68 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" + uuid "github.com/satori/go.uuid" "net/http" ) -// DataLakeAnalyticsAccountState enumerates the values for data lake analytics -// account state. +// AADObjectType enumerates the values for aad object type. +type AADObjectType string + +const ( + // Group specifies the group state for aad object type. + Group AADObjectType = "Group" + // ServicePrincipal specifies the service principal state for aad object type. + ServicePrincipal AADObjectType = "ServicePrincipal" + // User specifies the user state for aad object type. + User AADObjectType = "User" +) + +// DataLakeAnalyticsAccountState enumerates the values for data lake analytics account state. type DataLakeAnalyticsAccountState string const ( // Active specifies the active state for data lake analytics account state. Active DataLakeAnalyticsAccountState = "Active" - // Suspended specifies the suspended state for data lake analytics account - // state. + // Suspended specifies the suspended state for data lake analytics account state. Suspended DataLakeAnalyticsAccountState = "Suspended" ) -// DataLakeAnalyticsAccountStatus enumerates the values for data lake analytics -// account status. +// DataLakeAnalyticsAccountStatus enumerates the values for data lake analytics account status. type DataLakeAnalyticsAccountStatus string const ( - // Creating specifies the creating state for data lake analytics account - // status. + // Creating specifies the creating state for data lake analytics account status. Creating DataLakeAnalyticsAccountStatus = "Creating" - // Deleted specifies the deleted state for data lake analytics account - // status. + // Deleted specifies the deleted state for data lake analytics account status. Deleted DataLakeAnalyticsAccountStatus = "Deleted" - // Deleting specifies the deleting state for data lake analytics account - // status. + // Deleting specifies the deleting state for data lake analytics account status. Deleting DataLakeAnalyticsAccountStatus = "Deleting" - // Failed specifies the failed state for data lake analytics account - // status. + // Failed specifies the failed state for data lake analytics account status. Failed DataLakeAnalyticsAccountStatus = "Failed" - // Patching specifies the patching state for data lake analytics account - // status. + // Patching specifies the patching state for data lake analytics account status. Patching DataLakeAnalyticsAccountStatus = "Patching" - // Resuming specifies the resuming state for data lake analytics account - // status. + // Resuming specifies the resuming state for data lake analytics account status. Resuming DataLakeAnalyticsAccountStatus = "Resuming" - // Running specifies the running state for data lake analytics account - // status. + // Running specifies the running state for data lake analytics account status. Running DataLakeAnalyticsAccountStatus = "Running" - // Succeeded specifies the succeeded state for data lake analytics account - // status. + // Succeeded specifies the succeeded state for data lake analytics account status. Succeeded DataLakeAnalyticsAccountStatus = "Succeeded" - // Suspending specifies the suspending state for data lake analytics - // account status. + // Suspending specifies the suspending state for data lake analytics account status. Suspending DataLakeAnalyticsAccountStatus = "Suspending" ) -// FirewallAllowAzureIpsState enumerates the values for firewall allow azure -// ips state. +// FirewallAllowAzureIpsState enumerates the values for firewall allow azure ips state. type FirewallAllowAzureIpsState string const ( - // Disabled specifies the disabled state for firewall allow azure ips - // state. + // Disabled specifies the disabled state for firewall allow azure ips state. Disabled FirewallAllowAzureIpsState = "Disabled" // Enabled specifies the enabled state for firewall allow azure ips state. Enabled FirewallAllowAzureIpsState = "Enabled" @@ -87,11 +85,9 @@ const ( type FirewallState string const ( - // FirewallStateDisabled specifies the firewall state disabled state for - // firewall state. + // FirewallStateDisabled specifies the firewall state disabled state for firewall state. FirewallStateDisabled FirewallState = "Disabled" - // FirewallStateEnabled specifies the firewall state enabled state for - // firewall state. + // FirewallStateEnabled specifies the firewall state enabled state for firewall state. FirewallStateEnabled FirewallState = "Enabled" ) @@ -99,29 +95,21 @@ const ( type TierType string const ( - // Commitment100000AUHours specifies the commitment 100000au hours state - // for tier type. + // Commitment100000AUHours specifies the commitment 100000au hours state for tier type. Commitment100000AUHours TierType = "Commitment_100000AUHours" - // Commitment10000AUHours specifies the commitment 10000au hours state for - // tier type. + // Commitment10000AUHours specifies the commitment 10000au hours state for tier type. Commitment10000AUHours TierType = "Commitment_10000AUHours" - // Commitment1000AUHours specifies the commitment 1000au hours state for - // tier type. + // Commitment1000AUHours specifies the commitment 1000au hours state for tier type. Commitment1000AUHours TierType = "Commitment_1000AUHours" - // Commitment100AUHours specifies the commitment 100au hours state for tier - // type. + // Commitment100AUHours specifies the commitment 100au hours state for tier type. Commitment100AUHours TierType = "Commitment_100AUHours" - // Commitment500000AUHours specifies the commitment 500000au hours state - // for tier type. + // Commitment500000AUHours specifies the commitment 500000au hours state for tier type. Commitment500000AUHours TierType = "Commitment_500000AUHours" - // Commitment50000AUHours specifies the commitment 50000au hours state for - // tier type. + // Commitment50000AUHours specifies the commitment 50000au hours state for tier type. Commitment50000AUHours TierType = "Commitment_50000AUHours" - // Commitment5000AUHours specifies the commitment 5000au hours state for - // tier type. + // Commitment5000AUHours specifies the commitment 5000au hours state for tier type. Commitment5000AUHours TierType = "Commitment_5000AUHours" - // Commitment500AUHours specifies the commitment 500au hours state for tier - // type. + // Commitment500AUHours specifies the commitment 500au hours state for tier type. Commitment500AUHours TierType = "Commitment_500AUHours" // Consumption specifies the consumption state for tier type. Consumption TierType = "Consumption" @@ -132,14 +120,67 @@ type AddDataLakeStoreParameters struct { *DataLakeStoreAccountInfoProperties `json:"properties,omitempty"` } -// AddStorageAccountParameters is storage account parameters for a storage -// account being added to a Data Lake Analytics account. +// AddStorageAccountParameters is storage account parameters for a storage account being added to a Data Lake Analytics +// account. type AddStorageAccountParameters struct { *StorageAccountProperties `json:"properties,omitempty"` } -// DataLakeAnalyticsAccount is a Data Lake Analytics account object, containing -// all information associated with the named Data Lake Analytics account. +// ComputePolicy is the parameters used to create a new compute policy. +type ComputePolicy struct { + autorest.Response `json:"-"` + Name *string `json:"name,omitempty"` + *ComputePolicyProperties `json:"properties,omitempty"` +} + +// ComputePolicyAccountCreateParameters is the parameters used to create a new compute policy. +type ComputePolicyAccountCreateParameters struct { + Name *string `json:"name,omitempty"` + *ComputePolicyPropertiesCreateParameters `json:"properties,omitempty"` +} + +// ComputePolicyCreateOrUpdateParameters is the parameters used to create a new compute policy. +type ComputePolicyCreateOrUpdateParameters struct { + *ComputePolicyPropertiesCreateParameters `json:"properties,omitempty"` +} + +// ComputePolicyListResult is the list of compute policies in the account. +type ComputePolicyListResult struct { + autorest.Response `json:"-"` + Value *[]ComputePolicy `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ComputePolicyListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ComputePolicyListResult) ComputePolicyListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ComputePolicyProperties is the compute policy properties to use when creating a new compute policy +type ComputePolicyProperties struct { + ObjectID *uuid.UUID `json:"objectId,omitempty"` + ObjectType AADObjectType `json:"objectType,omitempty"` + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` +} + +// ComputePolicyPropertiesCreateParameters is the compute policy properties to use when creating a new compute policy +type ComputePolicyPropertiesCreateParameters struct { + ObjectID *uuid.UUID `json:"objectId,omitempty"` + ObjectType AADObjectType `json:"objectType,omitempty"` + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` +} + +// DataLakeAnalyticsAccount is a Data Lake Analytics account object, containing all information associated with the +// named Data Lake Analytics account. type DataLakeAnalyticsAccount struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -150,8 +191,18 @@ type DataLakeAnalyticsAccount struct { *DataLakeAnalyticsAccountProperties `json:"properties,omitempty"` } -// DataLakeAnalyticsAccountListDataLakeStoreResult is data Lake Account list -// information. +// DataLakeAnalyticsAccountBasic is a Data Lake Analytics account object, containing all information associated with +// the named Data Lake Analytics account. +type DataLakeAnalyticsAccountBasic struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *DataLakeAnalyticsAccountPropertiesBasic `json:"properties,omitempty"` +} + +// DataLakeAnalyticsAccountListDataLakeStoreResult is data Lake Account list information. type DataLakeAnalyticsAccountListDataLakeStoreResult struct { autorest.Response `json:"-"` Value *[]DataLakeStoreAccountInfo `json:"value,omitempty"` @@ -170,12 +221,11 @@ func (client DataLakeAnalyticsAccountListDataLakeStoreResult) DataLakeAnalyticsA autorest.WithBaseURL(to.String(client.NextLink))) } -// DataLakeAnalyticsAccountListResult is dataLakeAnalytics Account list -// information. +// DataLakeAnalyticsAccountListResult is dataLakeAnalytics Account list information. type DataLakeAnalyticsAccountListResult struct { autorest.Response `json:"-"` - Value *[]DataLakeAnalyticsAccount `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]DataLakeAnalyticsAccountBasic `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } // DataLakeAnalyticsAccountListResultPreparer prepares a request to retrieve the next set of results. It returns @@ -190,8 +240,7 @@ func (client DataLakeAnalyticsAccountListResult) DataLakeAnalyticsAccountListRes autorest.WithBaseURL(to.String(client.NextLink))) } -// DataLakeAnalyticsAccountListStorageAccountsResult is azure Storage Account -// list information. +// DataLakeAnalyticsAccountListStorageAccountsResult is azure Storage Account list information. type DataLakeAnalyticsAccountListStorageAccountsResult struct { autorest.Response `json:"-"` Value *[]StorageAccountInfo `json:"value,omitempty"` @@ -210,38 +259,52 @@ func (client DataLakeAnalyticsAccountListStorageAccountsResult) DataLakeAnalytic autorest.WithBaseURL(to.String(client.NextLink))) } -// DataLakeAnalyticsAccountProperties is the account specific properties that -// are associated with an underlying Data Lake Analytics account. +// DataLakeAnalyticsAccountProperties is the account specific properties that are associated with an underlying Data +// Lake Analytics account. Returned only when retrieving a specific account. type DataLakeAnalyticsAccountProperties struct { - ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"` - State DataLakeAnalyticsAccountState `json:"state,omitempty"` - DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"` - MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` - QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` - MaxJobCount *int32 `json:"maxJobCount,omitempty"` - SystemMaxDegreeOfParallelism *int32 `json:"systemMaxDegreeOfParallelism,omitempty"` - SystemMaxJobCount *int32 `json:"systemMaxJobCount,omitempty"` - DataLakeStoreAccounts *[]DataLakeStoreAccountInfo `json:"dataLakeStoreAccounts,omitempty"` - StorageAccounts *[]StorageAccountInfo `json:"storageAccounts,omitempty"` - CreationTime *date.Time `json:"creationTime,omitempty"` - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - Endpoint *string `json:"endpoint,omitempty"` - NewTier TierType `json:"newTier,omitempty"` - CurrentTier TierType `json:"currentTier,omitempty"` - FirewallState FirewallState `json:"firewallState,omitempty"` - FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` - FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` + ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"` + State DataLakeAnalyticsAccountState `json:"state,omitempty"` + CreationTime *date.Time `json:"creationTime,omitempty"` + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + AccountID *uuid.UUID `json:"accountId,omitempty"` + DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"` + MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` + QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` + MaxJobCount *int32 `json:"maxJobCount,omitempty"` + SystemMaxDegreeOfParallelism *int32 `json:"systemMaxDegreeOfParallelism,omitempty"` + SystemMaxJobCount *int32 `json:"systemMaxJobCount,omitempty"` + DataLakeStoreAccounts *[]DataLakeStoreAccountInfo `json:"dataLakeStoreAccounts,omitempty"` + StorageAccounts *[]StorageAccountInfo `json:"storageAccounts,omitempty"` + NewTier TierType `json:"newTier,omitempty"` + CurrentTier TierType `json:"currentTier,omitempty"` + FirewallState FirewallState `json:"firewallState,omitempty"` + FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` + FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` + ComputePolicies *[]ComputePolicyAccountCreateParameters `json:"computePolicies,omitempty"` } -// DataLakeAnalyticsAccountUpdateParameters is the parameters that can be used -// to update an existing Data Lake Analytics account. +// DataLakeAnalyticsAccountPropertiesBasic is the basic account specific properties that are associated with an +// underlying Data Lake Analytics account. +type DataLakeAnalyticsAccountPropertiesBasic struct { + ProvisioningState DataLakeAnalyticsAccountStatus `json:"provisioningState,omitempty"` + State DataLakeAnalyticsAccountState `json:"state,omitempty"` + CreationTime *date.Time `json:"creationTime,omitempty"` + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + AccountID *uuid.UUID `json:"accountId,omitempty"` +} + +// DataLakeAnalyticsAccountUpdateParameters is the parameters that can be used to update an existing Data Lake +// Analytics account. type DataLakeAnalyticsAccountUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` *UpdateDataLakeAnalyticsAccountProperties `json:"properties,omitempty"` } -// DataLakeAnalyticsFirewallRuleListResult is data Lake Analytics firewall rule -// list information. +// DataLakeAnalyticsFirewallRuleListResult is data Lake Analytics firewall rule list information. type DataLakeAnalyticsFirewallRuleListResult struct { autorest.Response `json:"-"` Value *[]FirewallRule `json:"value,omitempty"` @@ -269,8 +332,7 @@ type DataLakeStoreAccountInfo struct { *DataLakeStoreAccountInfoProperties `json:"properties,omitempty"` } -// DataLakeStoreAccountInfoProperties is data Lake Store account properties -// information. +// DataLakeStoreAccountInfoProperties is data Lake Store account properties information. type DataLakeStoreAccountInfoProperties struct { Suffix *string `json:"suffix,omitempty"` } @@ -284,15 +346,14 @@ type FirewallRule struct { *FirewallRuleProperties `json:"properties,omitempty"` } -// FirewallRuleProperties is data Lake Analytics firewall rule properties -// information +// FirewallRuleProperties is data Lake Analytics firewall rule properties information type FirewallRuleProperties struct { StartIPAddress *string `json:"startIpAddress,omitempty"` EndIPAddress *string `json:"endIpAddress,omitempty"` } -// ListSasTokensResult is the SAS response that contains the storage account, -// container and associated SAS token for connection use. +// ListSasTokensResult is the SAS response that contains the storage account, container and associated SAS token for +// connection use. type ListSasTokensResult struct { autorest.Response `json:"-"` Value *[]SasTokenInfo `json:"value,omitempty"` @@ -311,8 +372,8 @@ func (client ListSasTokensResult) ListSasTokensResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// ListStorageContainersResult is the list of blob containers associated with -// the storage account attached to the Data Lake Analytics account. +// ListStorageContainersResult is the list of blob containers associated with the storage account attached to the Data +// Lake Analytics account. type ListStorageContainersResult struct { autorest.Response `json:"-"` Value *[]StorageContainer `json:"value,omitempty"` @@ -331,8 +392,7 @@ func (client ListStorageContainersResult) ListStorageContainersResultPreparer() autorest.WithBaseURL(to.String(client.NextLink))) } -// OptionalSubResource is the Resource model definition for a nested resource -// with no required properties. +// OptionalSubResource is the Resource model definition for a nested resource with no required properties. type OptionalSubResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -348,7 +408,7 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// SasTokenInfo is sAS token information. +// SasTokenInfo is SAS token information. type SasTokenInfo struct { AccessToken *string `json:"accessToken,omitempty"` } @@ -371,14 +431,13 @@ type StorageAccountProperties struct { // StorageContainer is azure Storage blob container information. type StorageContainer struct { autorest.Response `json:"-"` - Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` *StorageContainerProperties `json:"properties,omitempty"` } -// StorageContainerProperties is azure Storage blob container properties -// information. +// StorageContainerProperties is azure Storage blob container properties information. type StorageContainerProperties struct { LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` } @@ -390,39 +449,39 @@ type SubResource struct { Type *string `json:"type,omitempty"` } -// UpdateDataLakeAnalyticsAccountProperties is the properties to update that -// are associated with an underlying Data Lake Analytics account to. +// UpdateDataLakeAnalyticsAccountProperties is the properties to update that are associated with an underlying Data +// Lake Analytics account to. type UpdateDataLakeAnalyticsAccountProperties struct { - MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` - QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` - MaxJobCount *int32 `json:"maxJobCount,omitempty"` - NewTier TierType `json:"newTier,omitempty"` - FirewallState FirewallState `json:"firewallState,omitempty"` - FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` - FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` + MaxDegreeOfParallelism *int32 `json:"maxDegreeOfParallelism,omitempty"` + QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"` + MaxJobCount *int32 `json:"maxJobCount,omitempty"` + NewTier TierType `json:"newTier,omitempty"` + FirewallState FirewallState `json:"firewallState,omitempty"` + FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` + FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` + MaxDegreeOfParallelismPerJob *int32 `json:"maxDegreeOfParallelismPerJob,omitempty"` + MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"` + ComputePolicies *[]ComputePolicy `json:"computePolicies,omitempty"` } -// UpdateFirewallRuleParameters is data Lake Analytics firewall rule update -// parameters +// UpdateFirewallRuleParameters is data Lake Analytics firewall rule update parameters type UpdateFirewallRuleParameters struct { *UpdateFirewallRuleProperties `json:"properties,omitempty"` } -// UpdateFirewallRuleProperties is data Lake Analytics firewall rule properties -// information +// UpdateFirewallRuleProperties is data Lake Analytics firewall rule properties information type UpdateFirewallRuleProperties struct { StartIPAddress *string `json:"startIpAddress,omitempty"` EndIPAddress *string `json:"endIpAddress,omitempty"` } -// UpdateStorageAccountParameters is storage account parameters for a storage -// account being updated in a Data Lake Analytics account. +// UpdateStorageAccountParameters is storage account parameters for a storage account being updated in a Data Lake +// Analytics account. type UpdateStorageAccountParameters struct { *UpdateStorageAccountProperties `json:"properties,omitempty"` } -// UpdateStorageAccountProperties is azure Storage account properties -// information to update. +// UpdateStorageAccountProperties is azure Storage account properties information to update. type UpdateStorageAccountProperties struct { AccessKey *string `json:"accessKey,omitempty"` Suffix *string `json:"suffix,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/storageaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/storageaccounts.go index d0f823938..388368f20 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/storageaccounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/storageaccounts.go @@ -14,9 +14,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,26 @@ import ( "net/http" ) -// StorageAccountsClient is the creates an Azure Data Lake Analytics account -// management client. +// StorageAccountsClient is the creates an Azure Data Lake Analytics account management client. type StorageAccountsClient struct { ManagementClient } -// NewStorageAccountsClient creates an instance of the StorageAccountsClient -// client. +// NewStorageAccountsClient creates an instance of the StorageAccountsClient client. func NewStorageAccountsClient(subscriptionID string) StorageAccountsClient { return NewStorageAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountsClientWithBaseURI creates an instance of the -// StorageAccountsClient client. +// NewStorageAccountsClientWithBaseURI creates an instance of the StorageAccountsClient client. func NewStorageAccountsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountsClient { return StorageAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Add updates the specified Data Lake Analytics account to add an Azure -// Storage account. +// Add updates the specified Data Lake Analytics account to add an Azure Storage account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to which to add the Azure Storage account. -// storageAccountName is the name of the Azure Storage account to add -// parameters is the parameters containing the access key and optional suffix +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to which to add the Azure Storage account. storageAccountName is the +// name of the Azure Storage account to add parameters is the parameters containing the access key and optional suffix // for the Azure Storage Account. func (client StorageAccountsClient) Add(resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ @@ -123,13 +116,11 @@ func (client StorageAccountsClient) AddResponder(resp *http.Response) (result au return } -// Delete updates the specified Data Lake Analytics account to remove an Azure -// Storage account. +// Delete updates the specified Data Lake Analytics account to remove an Azure Storage account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which to remove the Azure Storage account. -// storageAccountName is the name of the Azure Storage account to remove +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to remove the Azure Storage account. storageAccountName is +// the name of the Azure Storage account to remove func (client StorageAccountsClient) Delete(resourceGroupName string, accountName string, storageAccountName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, accountName, storageAccountName) if err != nil { @@ -192,14 +183,11 @@ func (client StorageAccountsClient) DeleteResponder(resp *http.Response) (result return } -// Get gets the specified Azure Storage account linked to the given Data Lake -// Analytics account. +// Get gets the specified Azure Storage account linked to the given Data Lake Analytics account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which to retrieve Azure storage account details. -// storageAccountName is the name of the Azure Storage account for which to -// retrieve the details. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which to retrieve Azure storage account details. +// storageAccountName is the name of the Azure Storage account for which to retrieve the details. func (client StorageAccountsClient) Get(resourceGroupName string, accountName string, storageAccountName string) (result StorageAccountInfo, err error) { req, err := client.GetPreparer(resourceGroupName, accountName, storageAccountName) if err != nil { @@ -263,15 +251,13 @@ func (client StorageAccountsClient) GetResponder(resp *http.Response) (result St return } -// GetStorageContainer gets the specified Azure Storage container associated -// with the given Data Lake Analytics and Azure Storage accounts. +// GetStorageContainer gets the specified Azure Storage container associated with the given Data Lake Analytics and +// Azure Storage accounts. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account for which to retrieve blob container. storageAccountName -// is the name of the Azure storage account from which to retrieve the blob -// container. containerName is the name of the Azure storage container to -// retrieve +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account for which to retrieve blob container. storageAccountName is the name +// of the Azure storage account from which to retrieve the blob container. containerName is the name of the Azure +// storage container to retrieve func (client StorageAccountsClient) GetStorageContainer(resourceGroupName string, accountName string, storageAccountName string, containerName string) (result StorageContainer, err error) { req, err := client.GetStorageContainerPreparer(resourceGroupName, accountName, storageAccountName, containerName) if err != nil { @@ -336,23 +322,18 @@ func (client StorageAccountsClient) GetStorageContainerResponder(resp *http.Resp return } -// ListByAccount gets the first page of Azure Storage accounts, if any, linked -// to the specified Data Lake Analytics account. The response includes a link -// to the next page, if any. +// ListByAccount gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics +// account. The response includes a link to the next page, if any. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account for which to list Azure Storage accounts. filter is the -// OData filter. Optional. top is the number of items to return. Optional. skip -// is the number of items to skip over before returning elements. Optional. -// selectParameter is oData Select statement. Limits the properties on each -// entry to just those requested, e.g. -// Categories?$select=CategoryName,Description. Optional. orderby is orderBy -// clause. One or more comma-separated expressions with an optional "asc" (the -// default) or "desc" depending on the order you'd like the values sorted, e.g. -// Categories?$orderby=CategoryName desc. Optional. count is the Boolean value -// of true or false to request a count of the matching resources included with -// the resources in the response, e.g. Categories?$count=true. Optional. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account for which to list Azure Storage accounts. filter is the OData filter. +// Optional. top is the number of items to return. Optional. skip is the number of items to skip over before returning +// elements. Optional. selectParameter is oData Select statement. Limits the properties on each entry to just those +// requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One or more +// comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like the +// values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value of true or false to +// request a count of the matching resources included with the resources in the response, e.g. Categories?$count=true. +// Optional. func (client StorageAccountsClient) ListByAccount(resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListStorageAccountsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -467,15 +448,58 @@ func (client StorageAccountsClient) ListByAccountNextResults(lastResults DataLak return } -// ListSasTokens gets the SAS token associated with the specified Data Lake -// Analytics and Azure Storage account and container combination. +// ListByAccountComplete gets all elements from the list without paging. +func (client StorageAccountsClient) ListByAccountComplete(resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, cancel <-chan struct{}) (<-chan StorageAccountInfo, <-chan error) { + resultChan := make(chan StorageAccountInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAccount(resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListSasTokens gets the SAS token associated with the specified Data Lake Analytics and Azure Storage account and +// container combination. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account from which an Azure Storage account's SAS token is being -// requested. storageAccountName is the name of the Azure storage account for -// which the SAS token is being requested. containerName is the name of the -// Azure storage container for which the SAS token is being requested. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account from which an Azure Storage account's SAS token is being requested. +// storageAccountName is the name of the Azure storage account for which the SAS token is being requested. +// containerName is the name of the Azure storage container for which the SAS token is being requested. func (client StorageAccountsClient) ListSasTokens(resourceGroupName string, accountName string, storageAccountName string, containerName string) (result ListSasTokensResult, err error) { req, err := client.ListSasTokensPreparer(resourceGroupName, accountName, storageAccountName, containerName) if err != nil { @@ -564,16 +588,57 @@ func (client StorageAccountsClient) ListSasTokensNextResults(lastResults ListSas return } -// ListStorageContainers lists the Azure Storage containers, if any, associated -// with the specified Data Lake Analytics and Azure Storage account -// combination. The response includes a link to the next page of results, if -// any. +// ListSasTokensComplete gets all elements from the list without paging. +func (client StorageAccountsClient) ListSasTokensComplete(resourceGroupName string, accountName string, storageAccountName string, containerName string, cancel <-chan struct{}) (<-chan SasTokenInfo, <-chan error) { + resultChan := make(chan SasTokenInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSasTokens(resourceGroupName, accountName, storageAccountName, containerName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSasTokensNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListStorageContainers lists the Azure Storage containers, if any, associated with the specified Data Lake Analytics +// and Azure Storage account combination. The response includes a link to the next page of results, if any. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account for which to list Azure Storage blob containers. -// storageAccountName is the name of the Azure storage account from which to -// list blob containers. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account for which to list Azure Storage blob containers. storageAccountName +// is the name of the Azure storage account from which to list blob containers. func (client StorageAccountsClient) ListStorageContainers(resourceGroupName string, accountName string, storageAccountName string) (result ListStorageContainersResult, err error) { req, err := client.ListStorageContainersPreparer(resourceGroupName, accountName, storageAccountName) if err != nil { @@ -661,15 +726,58 @@ func (client StorageAccountsClient) ListStorageContainersNextResults(lastResults return } -// Update updates the Data Lake Analytics account to replace Azure Storage blob -// account details, such as the access key and/or suffix. +// ListStorageContainersComplete gets all elements from the list without paging. +func (client StorageAccountsClient) ListStorageContainersComplete(resourceGroupName string, accountName string, storageAccountName string, cancel <-chan struct{}) (<-chan StorageContainer, <-chan error) { + resultChan := make(chan StorageContainer) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListStorageContainers(resourceGroupName, accountName, storageAccountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListStorageContainersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates the Data Lake Analytics account to replace Azure Storage blob account details, such as the access key +// and/or suffix. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Analytics account. accountName is the name of the Data Lake -// Analytics account to modify storage accounts in storageAccountName is the -// Azure Storage account to modify parameters is the parameters containing the -// access key and suffix to update the storage account with, if any. Passing -// nothing results in no change. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Analytics account. accountName +// is the name of the Data Lake Analytics account to modify storage accounts in storageAccountName is the Azure Storage +// account to modify parameters is the parameters containing the access key and suffix to update the storage account +// with, if any. Passing nothing results in no change. func (client StorageAccountsClient) Update(resourceGroupName string, accountName string, storageAccountName string, parameters *UpdateStorageAccountParameters) (result autorest.Response, err error) { req, err := client.UpdatePreparer(resourceGroupName, accountName, storageAccountName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go index 62f3860b0..b6ccc9741 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-analytics/account/version.go @@ -14,15 +14,15 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-account/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/client.go index b48c790c3..63e0e7f5f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/client.go @@ -1,5 +1,4 @@ -// Package account implements the Azure ARM Account service API version -// 2016-11-01. +// Package account implements the Azure ARM Account service API version 2016-11-01. // // Creates an Azure Data Lake Store account management client. package account @@ -18,9 +17,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/firewallrules.go index cd27b5ee1..4e2998723 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/firewallrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/firewallrules.go @@ -14,9 +14,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,27 @@ import ( "net/http" ) -// FirewallRulesClient is the creates an Azure Data Lake Store account -// management client. +// FirewallRulesClient is the creates an Azure Data Lake Store account management client. type FirewallRulesClient struct { ManagementClient } -// NewFirewallRulesClient creates an instance of the FirewallRulesClient -// client. +// NewFirewallRulesClient creates an instance of the FirewallRulesClient client. func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the -// FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the specified firewall rule. During -// update, the firewall rule with the specified name will be replaced with this -// new firewall rule. +// CreateOrUpdate creates or updates the specified firewall rule. During update, the firewall rule with the specified +// name will be replaced with this new firewall rule. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account to add or replace the firewall rule. firewallRuleName is the name of -// the firewall rule to create or update. parameters is parameters supplied to -// create or update the firewall rule. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account to add or replace the firewall rule. firewallRuleName is the name of the +// firewall rule to create or update. parameters is parameters supplied to create or update the firewall rule. func (client FirewallRulesClient) CreateOrUpdate(resourceGroupName string, accountName string, firewallRuleName string, parameters FirewallRule) (result FirewallRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -126,13 +119,11 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) ( return } -// Delete deletes the specified firewall rule from the specified Data Lake -// Store account +// Delete deletes the specified firewall rule from the specified Data Lake Store account // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account from which to delete the firewall rule. firewallRuleName is the name -// of the firewall rule to delete. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account from which to delete the firewall rule. firewallRuleName is the name of the +// firewall rule to delete. func (client FirewallRulesClient) Delete(resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, accountName, firewallRuleName) if err != nil { @@ -197,10 +188,9 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a // Get gets the specified Data Lake Store firewall rule. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account from which to get the firewall rule. firewallRuleName is the name of -// the firewall rule to retrieve. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account from which to get the firewall rule. firewallRuleName is the name of the +// firewall rule to retrieve. func (client FirewallRulesClient) Get(resourceGroupName string, accountName string, firewallRuleName string) (result FirewallRule, err error) { req, err := client.GetPreparer(resourceGroupName, accountName, firewallRuleName) if err != nil { @@ -264,12 +254,10 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire return } -// ListByAccount lists the Data Lake Store firewall rules within the specified -// Data Lake Store account. +// ListByAccount lists the Data Lake Store firewall rules within the specified Data Lake Store account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account from which to get the firewall rules. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account from which to get the firewall rules. func (client FirewallRulesClient) ListByAccount(resourceGroupName string, accountName string) (result DataLakeStoreFirewallRuleListResult, err error) { req, err := client.ListByAccountPreparer(resourceGroupName, accountName) if err != nil { @@ -356,13 +344,56 @@ func (client FirewallRulesClient) ListByAccountNextResults(lastResults DataLakeS return } +// ListByAccountComplete gets all elements from the list without paging. +func (client FirewallRulesClient) ListByAccountComplete(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan FirewallRule, <-chan error) { + resultChan := make(chan FirewallRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAccount(resourceGroupName, accountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates the specified firewall rule. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account to which to update the firewall rule. firewallRuleName is the name -// of the firewall rule to update. parameters is parameters supplied to update -// the firewall rule. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account to which to update the firewall rule. firewallRuleName is the name of the +// firewall rule to update. parameters is parameters supplied to update the firewall rule. func (client FirewallRulesClient) Update(resourceGroupName string, accountName string, firewallRuleName string, parameters *UpdateFirewallRuleParameters) (result FirewallRule, err error) { req, err := client.UpdatePreparer(resourceGroupName, accountName, firewallRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/accountgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/group.go old mode 100755 new mode 100644 similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/accountgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/group.go index 50042ad67..8f7a5c02d --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/accountgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/group.go @@ -14,9 +14,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// GroupClient is the creates an Azure Data Lake Store account management -// client. +// GroupClient is the creates an Azure Data Lake Store account management client. type GroupClient struct { ManagementClient } @@ -41,14 +39,12 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates the specified Data Lake Store account. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Create creates the specified Data Lake Store account. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. name is the name of the Data Lake Store account to -// create. parameters is parameters supplied to create the Data Lake Store +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. name is the +// name of the Data Lake Store account to create. parameters is parameters supplied to create the Data Lake Store // account. func (client GroupClient) Create(resourceGroupName string, name string, parameters DataLakeStoreAccount, cancel <-chan struct{}) (<-chan DataLakeStoreAccount, <-chan error) { resultChan := make(chan DataLakeStoreAccount, 1) @@ -76,8 +72,10 @@ func (client GroupClient) Create(resourceGroupName string, name string, paramete var err error var result DataLakeStoreAccount defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -139,21 +137,19 @@ func (client GroupClient) CreateResponder(resp *http.Response) (result DataLakeS err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// Delete deletes the specified Data Lake Store account. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified Data Lake Store account. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. name is the name of the Data Lake Store account to -// delete. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. name is the +// name of the Data Lake Store account to delete. func (client GroupClient) Delete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -161,8 +157,10 @@ func (client GroupClient) Delete(resourceGroupName string, name string, cancel < var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -228,12 +226,10 @@ func (client GroupClient) DeleteResponder(resp *http.Response) (result autorest. return } -// EnableKeyVault attempts to enable a user managed key vault for encryption of -// the specified Data Lake Store account. +// EnableKeyVault attempts to enable a user managed Key Vault for encryption of the specified Data Lake Store account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account to attempt to enable the Key Vault for. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account to attempt to enable the Key Vault for. func (client GroupClient) EnableKeyVault(resourceGroupName string, accountName string) (result autorest.Response, err error) { req, err := client.EnableKeyVaultPreparer(resourceGroupName, accountName) if err != nil { @@ -297,9 +293,8 @@ func (client GroupClient) EnableKeyVaultResponder(resp *http.Response) (result a // Get gets the specified Data Lake Store account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. name is the name of the Data Lake Store account to -// retrieve. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. name is the +// name of the Data Lake Store account to retrieve. func (client GroupClient) Get(resourceGroupName string, name string) (result DataLakeStoreAccount, err error) { req, err := client.GetPreparer(resourceGroupName, name) if err != nil { @@ -362,19 +357,16 @@ func (client GroupClient) GetResponder(resp *http.Response) (result DataLakeStor return } -// List lists the Data Lake Store accounts within the subscription. The -// response includes a link to the next page of results, if any. +// List lists the Data Lake Store accounts within the subscription. The response includes a link to the next page of +// results, if any. // -// filter is oData filter. Optional. top is the number of items to return. -// Optional. skip is the number of items to skip over before returning -// elements. Optional. selectParameter is oData Select statement. Limits the -// properties on each entry to just those requested, e.g. -// Categories?$select=CategoryName,Description. Optional. orderby is orderBy -// clause. One or more comma-separated expressions with an optional "asc" (the -// default) or "desc" depending on the order you'd like the values sorted, e.g. -// Categories?$orderby=CategoryName desc. Optional. count is the Boolean value -// of true or false to request a count of the matching resources included with -// the resources in the response, e.g. Categories?$count=true. Optional. +// filter is oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to +// skip over before returning elements. Optional. selectParameter is oData Select statement. Limits the properties on +// each entry to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy +// clause. One or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the +// order you'd like the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is the Boolean value +// of true or false to request a count of the matching resources included with the resources in the response, e.g. +// Categories?$count=true. Optional. func (client GroupClient) List(filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -487,21 +479,62 @@ func (client GroupClient) ListNextResults(lastResults DataLakeStoreAccountListRe return } -// ListByResourceGroup lists the Data Lake Store accounts within a specific -// resource group. The response includes a link to the next page of results, if -// any. +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, cancel <-chan struct{}) (<-chan DataLakeStoreAccountBasic, <-chan error) { + resultChan := make(chan DataLakeStoreAccountBasic) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter, top, skip, selectParameter, orderby, count) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup lists the Data Lake Store accounts within a specific resource group. The response includes a +// link to the next page of results, if any. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account(s). filter is oData filter. Optional. top is the -// number of items to return. Optional. skip is the number of items to skip -// over before returning elements. Optional. selectParameter is oData Select -// statement. Limits the properties on each entry to just those requested, e.g. -// Categories?$select=CategoryName,Description. Optional. orderby is orderBy -// clause. One or more comma-separated expressions with an optional "asc" (the -// default) or "desc" depending on the order you'd like the values sorted, e.g. -// Categories?$orderby=CategoryName desc. Optional. count is a Boolean value of -// true or false to request a count of the matching resources included with the -// resources in the response, e.g. Categories?$count=true. Optional. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account(s). filter is +// oData filter. Optional. top is the number of items to return. Optional. skip is the number of items to skip over +// before returning elements. Optional. selectParameter is oData Select statement. Limits the properties on each entry +// to just those requested, e.g. Categories?$select=CategoryName,Description. Optional. orderby is orderBy clause. One +// or more comma-separated expressions with an optional "asc" (the default) or "desc" depending on the order you'd like +// the values sorted, e.g. Categories?$orderby=CategoryName desc. Optional. count is a Boolean value of true or false +// to request a count of the matching resources included with the resources in the response, e.g. +// Categories?$count=true. Optional. func (client GroupClient) ListByResourceGroup(resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -615,14 +648,57 @@ func (client GroupClient) ListByResourceGroupNextResults(lastResults DataLakeSto return } -// Update updates the specified Data Lake Store account information. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client GroupClient) ListByResourceGroupComplete(resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool, cancel <-chan struct{}) (<-chan DataLakeStoreAccountBasic, <-chan error) { + resultChan := make(chan DataLakeStoreAccountBasic) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, filter, top, skip, selectParameter, orderby, count) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates the specified Data Lake Store account information. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. name is the name of the Data Lake Store account to -// update. parameters is parameters supplied to update the Data Lake Store +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. name is the +// name of the Data Lake Store account to update. parameters is parameters supplied to update the Data Lake Store // account. func (client GroupClient) Update(resourceGroupName string, name string, parameters DataLakeStoreAccountUpdateParameters, cancel <-chan struct{}) (<-chan DataLakeStoreAccount, <-chan error) { resultChan := make(chan DataLakeStoreAccount, 1) @@ -631,8 +707,10 @@ func (client GroupClient) Update(resourceGroupName string, name string, paramete var err error var result DataLakeStoreAccount defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/models.go index c70781ff1..78273a087 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/models.go @@ -14,58 +14,48 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// DataLakeStoreAccountState enumerates the values for data lake store account -// state. +// DataLakeStoreAccountState enumerates the values for data lake store account state. type DataLakeStoreAccountState string const ( // Active specifies the active state for data lake store account state. Active DataLakeStoreAccountState = "Active" - // Suspended specifies the suspended state for data lake store account - // state. + // Suspended specifies the suspended state for data lake store account state. Suspended DataLakeStoreAccountState = "Suspended" ) -// DataLakeStoreAccountStatus enumerates the values for data lake store account -// status. +// DataLakeStoreAccountStatus enumerates the values for data lake store account status. type DataLakeStoreAccountStatus string const ( - // Creating specifies the creating state for data lake store account - // status. + // Creating specifies the creating state for data lake store account status. Creating DataLakeStoreAccountStatus = "Creating" // Deleted specifies the deleted state for data lake store account status. Deleted DataLakeStoreAccountStatus = "Deleted" - // Deleting specifies the deleting state for data lake store account - // status. + // Deleting specifies the deleting state for data lake store account status. Deleting DataLakeStoreAccountStatus = "Deleting" // Failed specifies the failed state for data lake store account status. Failed DataLakeStoreAccountStatus = "Failed" - // Patching specifies the patching state for data lake store account - // status. + // Patching specifies the patching state for data lake store account status. Patching DataLakeStoreAccountStatus = "Patching" - // Resuming specifies the resuming state for data lake store account - // status. + // Resuming specifies the resuming state for data lake store account status. Resuming DataLakeStoreAccountStatus = "Resuming" // Running specifies the running state for data lake store account status. Running DataLakeStoreAccountStatus = "Running" - // Succeeded specifies the succeeded state for data lake store account - // status. + // Succeeded specifies the succeeded state for data lake store account status. Succeeded DataLakeStoreAccountStatus = "Succeeded" - // Suspending specifies the suspending state for data lake store account - // status. + // Suspending specifies the suspending state for data lake store account status. Suspending DataLakeStoreAccountStatus = "Suspending" ) @@ -73,23 +63,21 @@ const ( type EncryptionConfigType string const ( - // ServiceManaged specifies the service managed state for encryption config - // type. + // ServiceManaged specifies the service managed state for encryption config type. ServiceManaged EncryptionConfigType = "ServiceManaged" // UserManaged specifies the user managed state for encryption config type. UserManaged EncryptionConfigType = "UserManaged" ) -// EncryptionProvisioningState enumerates the values for encryption -// provisioning state. +// EncryptionProvisioningState enumerates the values for encryption provisioning state. type EncryptionProvisioningState string const ( - // EncryptionProvisioningStateCreating specifies the encryption - // provisioning state creating state for encryption provisioning state. + // EncryptionProvisioningStateCreating specifies the encryption provisioning state creating state for encryption + // provisioning state. EncryptionProvisioningStateCreating EncryptionProvisioningState = "Creating" - // EncryptionProvisioningStateSucceeded specifies the encryption - // provisioning state succeeded state for encryption provisioning state. + // EncryptionProvisioningStateSucceeded specifies the encryption provisioning state succeeded state for encryption + // provisioning state. EncryptionProvisioningStateSucceeded EncryptionProvisioningState = "Succeeded" ) @@ -103,16 +91,15 @@ const ( Enabled EncryptionState = "Enabled" ) -// FirewallAllowAzureIpsState enumerates the values for firewall allow azure -// ips state. +// FirewallAllowAzureIpsState enumerates the values for firewall allow azure ips state. type FirewallAllowAzureIpsState string const ( - // FirewallAllowAzureIpsStateDisabled specifies the firewall allow azure - // ips state disabled state for firewall allow azure ips state. + // FirewallAllowAzureIpsStateDisabled specifies the firewall allow azure ips state disabled state for firewall allow + // azure ips state. FirewallAllowAzureIpsStateDisabled FirewallAllowAzureIpsState = "Disabled" - // FirewallAllowAzureIpsStateEnabled specifies the firewall allow azure ips - // state enabled state for firewall allow azure ips state. + // FirewallAllowAzureIpsStateEnabled specifies the firewall allow azure ips state enabled state for firewall allow + // azure ips state. FirewallAllowAzureIpsStateEnabled FirewallAllowAzureIpsState = "Enabled" ) @@ -120,11 +107,9 @@ const ( type FirewallState string const ( - // FirewallStateDisabled specifies the firewall state disabled state for - // firewall state. + // FirewallStateDisabled specifies the firewall state disabled state for firewall state. FirewallStateDisabled FirewallState = "Disabled" - // FirewallStateEnabled specifies the firewall state enabled state for - // firewall state. + // FirewallStateEnabled specifies the firewall state enabled state for firewall state. FirewallStateEnabled FirewallState = "Enabled" ) @@ -152,11 +137,9 @@ const ( type TrustedIDProviderState string const ( - // TrustedIDProviderStateDisabled specifies the trusted id provider state - // disabled state for trusted id provider state. + // TrustedIDProviderStateDisabled specifies the trusted id provider state disabled state for trusted id provider state. TrustedIDProviderStateDisabled TrustedIDProviderState = "Disabled" - // TrustedIDProviderStateEnabled specifies the trusted id provider state - // enabled state for trusted id provider state. + // TrustedIDProviderStateEnabled specifies the trusted id provider state enabled state for trusted id provider state. TrustedIDProviderStateEnabled TrustedIDProviderState = "Enabled" ) @@ -172,12 +155,21 @@ type DataLakeStoreAccount struct { *DataLakeStoreAccountProperties `json:"properties,omitempty"` } -// DataLakeStoreAccountListResult is data Lake Store account list information -// response. +// DataLakeStoreAccountBasic is basic Data Lake Store account information, returned on list calls. +type DataLakeStoreAccountBasic struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *DataLakeStoreAccountPropertiesBasic `json:"properties,omitempty"` +} + +// DataLakeStoreAccountListResult is data Lake Store account list information response. type DataLakeStoreAccountListResult struct { autorest.Response `json:"-"` - Value *[]DataLakeStoreAccount `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]DataLakeStoreAccountBasic `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } // DataLakeStoreAccountListResultPreparer prepares a request to retrieve the next set of results. It returns @@ -192,12 +184,14 @@ func (client DataLakeStoreAccountListResult) DataLakeStoreAccountListResultPrepa autorest.WithBaseURL(to.String(client.NextLink))) } -// DataLakeStoreAccountProperties is data Lake Store account properties -// information +// DataLakeStoreAccountProperties is data Lake Store account properties information type DataLakeStoreAccountProperties struct { ProvisioningState DataLakeStoreAccountStatus `json:"provisioningState,omitempty"` State DataLakeStoreAccountState `json:"state,omitempty"` CreationTime *date.Time `json:"creationTime,omitempty"` + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + AccountID *uuid.UUID `json:"accountId,omitempty"` EncryptionState EncryptionState `json:"encryptionState,omitempty"` EncryptionProvisioningState EncryptionProvisioningState `json:"encryptionProvisioningState,omitempty"` EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"` @@ -205,23 +199,30 @@ type DataLakeStoreAccountProperties struct { FirewallRules *[]FirewallRule `json:"firewallRules,omitempty"` TrustedIDProviderState TrustedIDProviderState `json:"trustedIdProviderState,omitempty"` TrustedIDProviders *[]TrustedIDProvider `json:"trustedIdProviders,omitempty"` - LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` - Endpoint *string `json:"endpoint,omitempty"` DefaultGroup *string `json:"defaultGroup,omitempty"` NewTier TierType `json:"newTier,omitempty"` CurrentTier TierType `json:"currentTier,omitempty"` FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` } -// DataLakeStoreAccountUpdateParameters is data Lake Store account information -// to update +// DataLakeStoreAccountPropertiesBasic is the basic account specific properties that are associated with an underlying +// Data Lake Store account. +type DataLakeStoreAccountPropertiesBasic struct { + ProvisioningState DataLakeStoreAccountStatus `json:"provisioningState,omitempty"` + State DataLakeStoreAccountState `json:"state,omitempty"` + CreationTime *date.Time `json:"creationTime,omitempty"` + LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` + Endpoint *string `json:"endpoint,omitempty"` + AccountID *uuid.UUID `json:"accountId,omitempty"` +} + +// DataLakeStoreAccountUpdateParameters is data Lake Store account information to update type DataLakeStoreAccountUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` *UpdateDataLakeStoreAccountProperties `json:"properties,omitempty"` } -// DataLakeStoreFirewallRuleListResult is data Lake Store firewall rule list -// information. +// DataLakeStoreFirewallRuleListResult is data Lake Store firewall rule list information. type DataLakeStoreFirewallRuleListResult struct { autorest.Response `json:"-"` Value *[]FirewallRule `json:"value,omitempty"` @@ -240,8 +241,7 @@ func (client DataLakeStoreFirewallRuleListResult) DataLakeStoreFirewallRuleListR autorest.WithBaseURL(to.String(client.NextLink))) } -// DataLakeStoreTrustedIDProviderListResult is data Lake Store trusted identity -// provider list information. +// DataLakeStoreTrustedIDProviderListResult is data Lake Store trusted identity provider list information. type DataLakeStoreTrustedIDProviderListResult struct { autorest.Response `json:"-"` Value *[]TrustedIDProvider `json:"value,omitempty"` @@ -289,8 +289,7 @@ type FirewallRule struct { *FirewallRuleProperties `json:"properties,omitempty"` } -// FirewallRuleProperties is data Lake Store firewall rule properties -// information +// FirewallRuleProperties is data Lake Store firewall rule properties information type FirewallRuleProperties struct { StartIPAddress *string `json:"startIpAddress,omitempty"` EndIPAddress *string `json:"endIpAddress,omitempty"` @@ -328,43 +327,48 @@ type TrustedIDProvider struct { *TrustedIDProviderProperties `json:"properties,omitempty"` } -// TrustedIDProviderProperties is data Lake Store trusted identity provider -// properties information +// TrustedIDProviderProperties is data Lake Store trusted identity provider properties information type TrustedIDProviderProperties struct { IDProvider *string `json:"idProvider,omitempty"` } -// UpdateDataLakeStoreAccountProperties is data Lake Store account properties -// information to be updated. +// UpdateDataLakeStoreAccountProperties is data Lake Store account properties information to be updated. type UpdateDataLakeStoreAccountProperties struct { FirewallState FirewallState `json:"firewallState,omitempty"` TrustedIDProviderState TrustedIDProviderState `json:"trustedIdProviderState,omitempty"` DefaultGroup *string `json:"defaultGroup,omitempty"` NewTier TierType `json:"newTier,omitempty"` FirewallAllowAzureIps FirewallAllowAzureIpsState `json:"firewallAllowAzureIps,omitempty"` + EncryptionConfig *UpdateEncryptionConfig `json:"encryptionConfig,omitempty"` } -// UpdateFirewallRuleParameters is data Lake Analytics firewall rule update -// parameters +// UpdateEncryptionConfig is the encryption configuration used to update a user managed Key Vault key. +type UpdateEncryptionConfig struct { + KeyVaultMetaInfo *UpdateKeyVaultMetaInfo `json:"keyVaultMetaInfo,omitempty"` +} + +// UpdateFirewallRuleParameters is data Lake Analytics firewall rule update parameters type UpdateFirewallRuleParameters struct { *UpdateFirewallRuleProperties `json:"properties,omitempty"` } -// UpdateFirewallRuleProperties is data Lake Analytics firewall rule properties -// information +// UpdateFirewallRuleProperties is data Lake Analytics firewall rule properties information type UpdateFirewallRuleProperties struct { StartIPAddress *string `json:"startIpAddress,omitempty"` EndIPAddress *string `json:"endIpAddress,omitempty"` } -// UpdateTrustedIDProviderParameters is data Lake Store Trusted Identity -// Provider update parameters +// UpdateKeyVaultMetaInfo is the Key Vault update information used for user managed key rotation. +type UpdateKeyVaultMetaInfo struct { + EncryptionKeyVersion *string `json:"encryptionKeyVersion,omitempty"` +} + +// UpdateTrustedIDProviderParameters is data Lake Store Trusted Identity Provider update parameters type UpdateTrustedIDProviderParameters struct { *UpdateTrustedIDProviderProperties `json:"properties,omitempty"` } -// UpdateTrustedIDProviderProperties is data Lake Store trusted identity -// provider property update information +// UpdateTrustedIDProviderProperties is data Lake Store trusted identity provider property update information type UpdateTrustedIDProviderProperties struct { IDProvider *string `json:"idProvider,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/trustedidproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/trustedidproviders.go index 9411268b3..d82091ee9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/trustedidproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/trustedidproviders.go @@ -14,9 +14,8 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,34 +24,28 @@ import ( "net/http" ) -// TrustedIDProvidersClient is the creates an Azure Data Lake Store account -// management client. +// TrustedIDProvidersClient is the creates an Azure Data Lake Store account management client. type TrustedIDProvidersClient struct { ManagementClient } -// NewTrustedIDProvidersClient creates an instance of the -// TrustedIDProvidersClient client. +// NewTrustedIDProvidersClient creates an instance of the TrustedIDProvidersClient client. func NewTrustedIDProvidersClient(subscriptionID string) TrustedIDProvidersClient { return NewTrustedIDProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTrustedIDProvidersClientWithBaseURI creates an instance of the -// TrustedIDProvidersClient client. +// NewTrustedIDProvidersClientWithBaseURI creates an instance of the TrustedIDProvidersClient client. func NewTrustedIDProvidersClientWithBaseURI(baseURI string, subscriptionID string) TrustedIDProvidersClient { return TrustedIDProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the specified trusted identity provider. -// During update, the trusted identity provider with the specified name will be -// replaced with this new provider +// CreateOrUpdate creates or updates the specified trusted identity provider. During update, the trusted identity +// provider with the specified name will be replaced with this new provider // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account to add or replace the trusted identity provider. -// trustedIDProviderName is the name of the trusted identity provider. This is -// used for differentiation of providers in the account. parameters is -// parameters supplied to create or replace the trusted identity provider. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account to add or replace the trusted identity provider. trustedIDProviderName is +// the name of the trusted identity provider. This is used for differentiation of providers in the account. parameters +// is parameters supplied to create or replace the trusted identity provider. func (client TrustedIDProvidersClient) CreateOrUpdate(resourceGroupName string, accountName string, trustedIDProviderName string, parameters TrustedIDProvider) (result TrustedIDProvider, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -125,14 +118,11 @@ func (client TrustedIDProvidersClient) CreateOrUpdateResponder(resp *http.Respon return } -// Delete deletes the specified trusted identity provider from the specified -// Data Lake Store account +// Delete deletes the specified trusted identity provider from the specified Data Lake Store account // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account from which to delete the trusted identity provider. -// trustedIDProviderName is the name of the trusted identity provider to -// delete. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account from which to delete the trusted identity provider. trustedIDProviderName is +// the name of the trusted identity provider to delete. func (client TrustedIDProvidersClient) Delete(resourceGroupName string, accountName string, trustedIDProviderName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, accountName, trustedIDProviderName) if err != nil { @@ -197,11 +187,9 @@ func (client TrustedIDProvidersClient) DeleteResponder(resp *http.Response) (res // Get gets the specified Data Lake Store trusted identity provider. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account from which to get the trusted identity provider. -// trustedIDProviderName is the name of the trusted identity provider to -// retrieve. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account from which to get the trusted identity provider. trustedIDProviderName is +// the name of the trusted identity provider to retrieve. func (client TrustedIDProvidersClient) Get(resourceGroupName string, accountName string, trustedIDProviderName string) (result TrustedIDProvider, err error) { req, err := client.GetPreparer(resourceGroupName, accountName, trustedIDProviderName) if err != nil { @@ -265,12 +253,10 @@ func (client TrustedIDProvidersClient) GetResponder(resp *http.Response) (result return } -// ListByAccount lists the Data Lake Store trusted identity providers within -// the specified Data Lake Store account. +// ListByAccount lists the Data Lake Store trusted identity providers within the specified Data Lake Store account. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account from which to get the trusted identity providers. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account from which to get the trusted identity providers. func (client TrustedIDProvidersClient) ListByAccount(resourceGroupName string, accountName string) (result DataLakeStoreTrustedIDProviderListResult, err error) { req, err := client.ListByAccountPreparer(resourceGroupName, accountName) if err != nil { @@ -357,14 +343,57 @@ func (client TrustedIDProvidersClient) ListByAccountNextResults(lastResults Data return } +// ListByAccountComplete gets all elements from the list without paging. +func (client TrustedIDProvidersClient) ListByAccountComplete(resourceGroupName string, accountName string, cancel <-chan struct{}) (<-chan TrustedIDProvider, <-chan error) { + resultChan := make(chan TrustedIDProvider) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByAccount(resourceGroupName, accountName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByAccountNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates the specified trusted identity provider. // -// resourceGroupName is the name of the Azure resource group that contains the -// Data Lake Store account. accountName is the name of the Data Lake Store -// account to which to update the trusted identity provider. -// trustedIDProviderName is the name of the trusted identity provider. This is -// used for differentiation of providers in the account. parameters is -// parameters supplied to update the trusted identity provider. +// resourceGroupName is the name of the Azure resource group that contains the Data Lake Store account. accountName is +// the name of the Data Lake Store account to which to update the trusted identity provider. trustedIDProviderName is +// the name of the trusted identity provider. This is used for differentiation of providers in the account. parameters +// is parameters supplied to update the trusted identity provider. func (client TrustedIDProvidersClient) Update(resourceGroupName string, accountName string, trustedIDProviderName string, parameters *UpdateTrustedIDProviderParameters) (result TrustedIDProvider, err error) { req, err := client.UpdatePreparer(resourceGroupName, accountName, trustedIDProviderName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go index 62f3860b0..b6ccc9741 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/datalake-store/account/version.go @@ -14,15 +14,15 @@ package account // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-account/2016-11-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-account/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/deployment/deployment.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/deployment/deployment.go new file mode 100644 index 000000000..89315f77a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/deployment/deployment.go @@ -0,0 +1,63 @@ +package deployment + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "encoding/json" + "io/ioutil" + + "github.com/Azure/azure-sdk-for-go/arm/resources/resources" +) + +// Build is a helper that creates a resources.Deployment, which can +// be used as a parameter for a CreateOrUpdate deployment operation. +// templateFile is a local Azure template. +// See https://github.com/Azure-Samples/resource-manager-go-template-deployment +func Build(mode resources.DeploymentMode, templateFile string, parameters map[string]interface{}) (deployment resources.Deployment, err error) { + template, err := parseJSONFromFile(templateFile) + if err != nil { + return + } + + finalParameters := map[string]interface{}{} + for k, v := range parameters { + addElementToMap(&finalParameters, k, v) + } + + deployment.Properties = &resources.DeploymentProperties{ + Mode: mode, + Template: template, + Parameters: &finalParameters, + } + return +} + +func parseJSONFromFile(filePath string) (*map[string]interface{}, error) { + text, err := ioutil.ReadFile(filePath) + if err != nil { + return nil, err + } + fileMap := map[string]interface{}{} + if err = json.Unmarshal(text, &fileMap); err != nil { + return nil, err + } + return &fileMap, err +} + +func addElementToMap(parameter *map[string]interface{}, key string, value interface{}) { + (*parameter)[key] = map[string]interface{}{ + "value": value, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/armtemplates.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/armtemplates.go index 1e017dc10..1be31e058 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/armtemplates.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/armtemplates.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,17 +33,15 @@ func NewArmTemplatesClient(subscriptionID string) ArmTemplatesClient { return NewArmTemplatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArmTemplatesClientWithBaseURI creates an instance of the -// ArmTemplatesClient client. +// NewArmTemplatesClientWithBaseURI creates an instance of the ArmTemplatesClient client. func NewArmTemplatesClientWithBaseURI(baseURI string, subscriptionID string) ArmTemplatesClient { return ArmTemplatesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get get azure resource manager template. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. artifactSourceName is the name of the artifact source. name is the -// name of the azure Resource Manager template. expand is specify the $expand +// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name +// of the artifact source. name is the name of the azure Resource Manager template. expand is specify the $expand // query. Example: 'properties($select=displayName)' func (client ArmTemplatesClient) Get(resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result ArmTemplate, err error) { req, err := client.GetPreparer(resourceGroupName, labName, artifactSourceName, name, expand) @@ -115,12 +112,10 @@ func (client ArmTemplatesClient) GetResponder(resp *http.Response) (result ArmTe // List list azure resource manager templates in a given artifact source. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. artifactSourceName is the name of the artifact source. expand is -// specify the $expand query. Example: 'properties($select=displayName)' filter -// is the filter to apply to the operation. top is the maximum number of -// resources to return from the operation. orderby is the ordering expression -// for the results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name +// of the artifact source. expand is specify the $expand query. Example: 'properties($select=displayName)' filter is +// the filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby +// is the ordering expression for the results, using OData notation. func (client ArmTemplatesClient) List(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArmTemplate, err error) { req, err := client.ListPreparer(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) if err != nil { @@ -219,3 +214,48 @@ func (client ArmTemplatesClient) ListNextResults(lastResults ResponseWithContinu return } + +// ListComplete gets all elements from the list without paging. +func (client ArmTemplatesClient) ListComplete(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan ArmTemplate, <-chan error) { + resultChan := make(chan ArmTemplate) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifacts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifacts.go index eaed0a1aa..419555bcb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifacts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifacts.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,20 +33,17 @@ func NewArtifactsClient(subscriptionID string) ArtifactsClient { return NewArtifactsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient -// client. +// NewArtifactsClientWithBaseURI creates an instance of the ArtifactsClient client. func NewArtifactsClientWithBaseURI(baseURI string, subscriptionID string) ArtifactsClient { return ArtifactsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// GenerateArmTemplate generates an ARM template for the given artifact, -// uploads the required files to a storage account, and validates the generated -// artifact. +// GenerateArmTemplate generates an ARM template for the given artifact, uploads the required files to a storage +// account, and validates the generated artifact. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. artifactSourceName is the name of the artifact source. name is the -// name of the artifact. generateArmTemplateRequest is parameters for -// generating an ARM template for deploying artifacts. +// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name +// of the artifact source. name is the name of the artifact. generateArmTemplateRequest is parameters for generating an +// ARM template for deploying artifacts. func (client ArtifactsClient) GenerateArmTemplate(resourceGroupName string, labName string, artifactSourceName string, name string, generateArmTemplateRequest GenerateArmTemplateRequest) (result ArmTemplateInfo, err error) { req, err := client.GenerateArmTemplatePreparer(resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest) if err != nil { @@ -116,9 +112,8 @@ func (client ArtifactsClient) GenerateArmTemplateResponder(resp *http.Response) // Get get artifact. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. artifactSourceName is the name of the artifact source. name is the -// name of the artifact. expand is specify the $expand query. Example: +// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name +// of the artifact source. name is the name of the artifact. expand is specify the $expand query. Example: // 'properties($select=title)' func (client ArtifactsClient) Get(resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result Artifact, err error) { req, err := client.GetPreparer(resourceGroupName, labName, artifactSourceName, name, expand) @@ -189,12 +184,10 @@ func (client ArtifactsClient) GetResponder(resp *http.Response) (result Artifact // List list artifacts in a given artifact source. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. artifactSourceName is the name of the artifact source. expand is -// specify the $expand query. Example: 'properties($select=title)' filter is -// the filter to apply to the operation. top is the maximum number of resources -// to return from the operation. orderby is the ordering expression for the -// results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. artifactSourceName is the name +// of the artifact source. expand is specify the $expand query. Example: 'properties($select=title)' filter is the +// filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby is +// the ordering expression for the results, using OData notation. func (client ArtifactsClient) List(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifact, err error) { req, err := client.ListPreparer(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) if err != nil { @@ -293,3 +286,48 @@ func (client ArtifactsClient) ListNextResults(lastResults ResponseWithContinuati return } + +// ListComplete gets all elements from the list without paging. +func (client ArtifactsClient) ListComplete(resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Artifact, <-chan error) { + resultChan := make(chan Artifact) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifactsources.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifactsources.go index 20b7306a4..ba551f55d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifactsources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/artifactsources.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,23 +29,20 @@ type ArtifactSourcesClient struct { ManagementClient } -// NewArtifactSourcesClient creates an instance of the ArtifactSourcesClient -// client. +// NewArtifactSourcesClient creates an instance of the ArtifactSourcesClient client. func NewArtifactSourcesClient(subscriptionID string) ArtifactSourcesClient { return NewArtifactSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewArtifactSourcesClientWithBaseURI creates an instance of the -// ArtifactSourcesClient client. +// NewArtifactSourcesClientWithBaseURI creates an instance of the ArtifactSourcesClient client. func NewArtifactSourcesClientWithBaseURI(baseURI string, subscriptionID string) ArtifactSourcesClient { return ArtifactSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or replace an existing artifact source. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the artifact source. artifactSource is -// properties of an artifact source. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// artifact source. artifactSource is properties of an artifact source. func (client ArtifactSourcesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, artifactSource ArtifactSource) (result ArtifactSource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: artifactSource, @@ -120,8 +116,8 @@ func (client ArtifactSourcesClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete artifact source. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the artifact source. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// artifact source. func (client ArtifactSourcesClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, name) if err != nil { @@ -186,9 +182,8 @@ func (client ArtifactSourcesClient) DeleteResponder(resp *http.Response) (result // Get get artifact source. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the artifact source. expand is specify the -// $expand query. Example: 'properties($select=displayName)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// artifact source. expand is specify the $expand query. Example: 'properties($select=displayName)' func (client ArtifactSourcesClient) Get(resourceGroupName string, labName string, name string, expand string) (result ArtifactSource, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { @@ -257,11 +252,9 @@ func (client ArtifactSourcesClient) GetResponder(resp *http.Response) (result Ar // List list artifact sources in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($select=displayName)' filter is the filter to apply to the -// operation. top is the maximum number of resources to return from the -// operation. orderby is the ordering expression for the results, using OData +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=displayName)' filter is the filter to apply to the operation. top is the maximum +// number of resources to return from the operation. orderby is the ordering expression for the results, using OData // notation. func (client ArtifactSourcesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifactSource, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) @@ -361,11 +354,55 @@ func (client ArtifactSourcesClient) ListNextResults(lastResults ResponseWithCont return } +// ListComplete gets all elements from the list without paging. +func (client ArtifactSourcesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan ArtifactSource, <-chan error) { + resultChan := make(chan ArtifactSource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update modify properties of artifact sources. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the artifact source. artifactSource is -// properties of an artifact source. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// artifact source. artifactSource is properties of an artifact source. func (client ArtifactSourcesClient) Update(resourceGroupName string, labName string, name string, artifactSource ArtifactSourceFragment) (result ArtifactSource, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, name, artifactSource) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/client.go index 65e59fad0..c7c47c5f8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/client.go @@ -1,5 +1,4 @@ -// Package devtestlabs implements the Azure ARM Devtestlabs service API version -// 2016-05-15. +// Package devtestlabs implements the Azure ARM Devtestlabs service API version 2016-05-15. // // The DevTest Labs Client. package devtestlabs @@ -18,9 +17,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/costs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/costs.go index 0e4dcc256..8d9bfc9d3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/costs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/costs.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -42,8 +41,8 @@ func NewCostsClientWithBaseURI(baseURI string, subscriptionID string) CostsClien // CreateOrUpdate create or replace an existing cost. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the cost. labCost is a cost item. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the cost. +// labCost is a cost item. func (client CostsClient) CreateOrUpdate(resourceGroupName string, labName string, name string, labCost LabCost) (result LabCost, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: labCost, @@ -117,9 +116,8 @@ func (client CostsClient) CreateOrUpdateResponder(resp *http.Response) (result L // Get get cost. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the cost. expand is specify the $expand query. -// Example: 'properties($expand=labCostDetails)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the cost. +// expand is specify the $expand query. Example: 'properties($expand=labCostDetails)' func (client CostsClient) Get(resourceGroupName string, labName string, name string, expand string) (result LabCost, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/customimages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/customimages.go index 7cfdd5715..d45cab2fb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/customimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/customimages.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,20 +34,17 @@ func NewCustomImagesClient(subscriptionID string) CustomImagesClient { return NewCustomImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCustomImagesClientWithBaseURI creates an instance of the -// CustomImagesClient client. +// NewCustomImagesClientWithBaseURI creates an instance of the CustomImagesClient client. func NewCustomImagesClientWithBaseURI(baseURI string, subscriptionID string) CustomImagesClient { return CustomImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or replace an existing custom image. This operation -// can take a while to complete. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate create or replace an existing custom image. This operation can take a while to complete. This method +// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the custom image. customImage is a custom -// image. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the custom +// image. customImage is a custom image. func (client CustomImagesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, customImage CustomImage, cancel <-chan struct{}) (<-chan CustomImage, <-chan error) { resultChan := make(chan CustomImage, 1) errChan := make(chan error, 1) @@ -65,8 +61,10 @@ func (client CustomImagesClient) CreateOrUpdate(resourceGroupName string, labNam var err error var result CustomImage defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -136,13 +134,12 @@ func (client CustomImagesClient) CreateOrUpdateResponder(resp *http.Response) (r return } -// Delete delete custom image. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Delete delete custom image. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the custom image. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the custom +// image. func (client CustomImagesClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -150,8 +147,10 @@ func (client CustomImagesClient) Delete(resourceGroupName string, labName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -220,9 +219,8 @@ func (client CustomImagesClient) DeleteResponder(resp *http.Response) (result au // Get get custom image. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the custom image. expand is specify the $expand -// query. Example: 'properties($select=vm)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the custom +// image. expand is specify the $expand query. Example: 'properties($select=vm)' func (client CustomImagesClient) Get(resourceGroupName string, labName string, name string, expand string) (result CustomImage, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { @@ -291,11 +289,9 @@ func (client CustomImagesClient) GetResponder(resp *http.Response) (result Custo // List list custom images in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($select=vm)' filter is the filter to apply to the operation. top -// is the maximum number of resources to return from the operation. orderby is -// the ordering expression for the results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=vm)' filter is the filter to apply to the operation. top is the maximum number +// of resources to return from the operation. orderby is the ordering expression for the results, using OData notation. func (client CustomImagesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationCustomImage, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) if err != nil { @@ -393,3 +389,48 @@ func (client CustomImagesClient) ListNextResults(lastResults ResponseWithContinu return } + +// ListComplete gets all elements from the list without paging. +func (client CustomImagesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan CustomImage, <-chan error) { + resultChan := make(chan CustomImage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/disks.go index 6cf380933..a418157a1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/disks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/disks.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -40,14 +39,12 @@ func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClien return DisksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Attach attach and create the lease of the disk to the virtual machine. This -// operation can take a while to complete. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel +// Attach attach and create the lease of the disk to the virtual machine. This operation can take a while to complete. +// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel // will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// disk. attachDiskProperties is properties of the disk to attach. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the disk. attachDiskProperties is properties of the disk to attach. func (client DisksClient) Attach(resourceGroupName string, labName string, userName string, name string, attachDiskProperties AttachDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -55,8 +52,10 @@ func (client DisksClient) Attach(resourceGroupName string, labName string, userN var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -126,14 +125,12 @@ func (client DisksClient) AttachResponder(resp *http.Response) (result autorest. return } -// CreateOrUpdate create or replace an existing disk. This operation can take a -// while to complete. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// CreateOrUpdate create or replace an existing disk. This operation can take a while to complete. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// disk. disk is a Disk. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the disk. disk is a Disk. func (client DisksClient) CreateOrUpdate(resourceGroupName string, labName string, userName string, name string, disk Disk, cancel <-chan struct{}) (<-chan Disk, <-chan error) { resultChan := make(chan Disk, 1) errChan := make(chan error, 1) @@ -150,8 +147,10 @@ func (client DisksClient) CreateOrUpdate(resourceGroupName string, labName strin var err error var result Disk defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -222,14 +221,12 @@ func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result D return } -// Delete delete disk. This operation can take a while to complete. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Delete delete disk. This operation can take a while to complete. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// disk. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the disk. func (client DisksClient) Delete(resourceGroupName string, labName string, userName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -237,8 +234,10 @@ func (client DisksClient) Delete(resourceGroupName string, labName string, userN var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -306,15 +305,12 @@ func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest. return } -// Detach detach and break the lease of the disk attached to the virtual -// machine. This operation can take a while to complete. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Detach detach and break the lease of the disk attached to the virtual machine. This operation can take a while to +// complete. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// disk. detachDiskProperties is properties of the disk to detach. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the disk. detachDiskProperties is properties of the disk to detach. func (client DisksClient) Detach(resourceGroupName string, labName string, userName string, name string, detachDiskProperties DetachDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -322,8 +318,10 @@ func (client DisksClient) Detach(resourceGroupName string, labName string, userN var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -395,9 +393,8 @@ func (client DisksClient) DetachResponder(resp *http.Response) (result autorest. // Get get disk. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// disk. expand is specify the $expand query. Example: +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the disk. expand is specify the $expand query. Example: // 'properties($select=diskType)' func (client DisksClient) Get(resourceGroupName string, labName string, userName string, name string, expand string) (result Disk, err error) { req, err := client.GetPreparer(resourceGroupName, labName, userName, name, expand) @@ -468,12 +465,10 @@ func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err er // List list disks in a given user profile. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. expand is specify the -// $expand query. Example: 'properties($select=diskType)' filter is the filter -// to apply to the operation. top is the maximum number of resources to return -// from the operation. orderby is the ordering expression for the results, -// using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. expand is specify the $expand query. Example: 'properties($select=diskType)' filter is the filter to +// apply to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering +// expression for the results, using OData notation. func (client DisksClient) List(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDisk, err error) { req, err := client.ListPreparer(resourceGroupName, labName, userName, expand, filter, top, orderby) if err != nil { @@ -572,3 +567,48 @@ func (client DisksClient) ListNextResults(lastResults ResponseWithContinuationDi return } + +// ListComplete gets all elements from the list without paging. +func (client DisksClient) ListComplete(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Disk, <-chan error) { + resultChan := make(chan Disk) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, userName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/environments.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/environments.go index ee5f41fe7..b7cf950ed 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/environments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/environments.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,20 +34,17 @@ func NewEnvironmentsClient(subscriptionID string) EnvironmentsClient { return NewEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEnvironmentsClientWithBaseURI creates an instance of the -// EnvironmentsClient client. +// NewEnvironmentsClientWithBaseURI creates an instance of the EnvironmentsClient client. func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) EnvironmentsClient { return EnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or replace an existing environment. This operation can -// take a while to complete. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate create or replace an existing environment. This operation can take a while to complete. This method +// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// environment. dtlEnvironment is an environment, which is essentially an ARM +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the environment. dtlEnvironment is an environment, which is essentially an ARM // template deployment. func (client EnvironmentsClient) CreateOrUpdate(resourceGroupName string, labName string, userName string, name string, dtlEnvironment DtlEnvironment, cancel <-chan struct{}) (<-chan DtlEnvironment, <-chan error) { resultChan := make(chan DtlEnvironment, 1) @@ -66,8 +62,10 @@ func (client EnvironmentsClient) CreateOrUpdate(resourceGroupName string, labNam var err error var result DtlEnvironment defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -138,14 +136,12 @@ func (client EnvironmentsClient) CreateOrUpdateResponder(resp *http.Response) (r return } -// Delete delete environment. This operation can take a while to complete. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Delete delete environment. This operation can take a while to complete. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// environment. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the environment. func (client EnvironmentsClient) Delete(resourceGroupName string, labName string, userName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -153,8 +149,10 @@ func (client EnvironmentsClient) Delete(resourceGroupName string, labName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -224,9 +222,8 @@ func (client EnvironmentsClient) DeleteResponder(resp *http.Response) (result au // Get get environment. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// environment. expand is specify the $expand query. Example: +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the environment. expand is specify the $expand query. Example: // 'properties($select=deploymentProperties)' func (client EnvironmentsClient) Get(resourceGroupName string, labName string, userName string, name string, expand string) (result DtlEnvironment, err error) { req, err := client.GetPreparer(resourceGroupName, labName, userName, name, expand) @@ -297,12 +294,10 @@ func (client EnvironmentsClient) GetResponder(resp *http.Response) (result DtlEn // List list environments in a given user profile. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. expand is specify the -// $expand query. Example: 'properties($select=deploymentProperties)' filter is -// the filter to apply to the operation. top is the maximum number of resources -// to return from the operation. orderby is the ordering expression for the -// results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. expand is specify the $expand query. Example: 'properties($select=deploymentProperties)' filter is the +// filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby is +// the ordering expression for the results, using OData notation. func (client EnvironmentsClient) List(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDtlEnvironment, err error) { req, err := client.ListPreparer(resourceGroupName, labName, userName, expand, filter, top, orderby) if err != nil { @@ -401,3 +396,48 @@ func (client EnvironmentsClient) ListNextResults(lastResults ResponseWithContinu return } + +// ListComplete gets all elements from the list without paging. +func (client EnvironmentsClient) ListComplete(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan DtlEnvironment, <-chan error) { + resultChan := make(chan DtlEnvironment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, userName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/formulas.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/formulas.go index 9c8572921..c3b684d2b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/formulas.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/formulas.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,20 +34,17 @@ func NewFormulasClient(subscriptionID string) FormulasClient { return NewFormulasClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFormulasClientWithBaseURI creates an instance of the FormulasClient -// client. +// NewFormulasClientWithBaseURI creates an instance of the FormulasClient client. func NewFormulasClientWithBaseURI(baseURI string, subscriptionID string) FormulasClient { return FormulasClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or replace an existing Formula. This operation can -// take a while to complete. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate create or replace an existing Formula. This operation can take a while to complete. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the formula. formula is a formula for creating -// a VM, specifying an image base and other parameters +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// formula. formula is a formula for creating a VM, specifying an image base and other parameters func (client FormulasClient) CreateOrUpdate(resourceGroupName string, labName string, name string, formula Formula, cancel <-chan struct{}) (<-chan Formula, <-chan error) { resultChan := make(chan Formula, 1) errChan := make(chan error, 1) @@ -78,8 +74,10 @@ func (client FormulasClient) CreateOrUpdate(resourceGroupName string, labName st var err error var result Formula defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -151,8 +149,8 @@ func (client FormulasClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete formula. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the formula. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// formula. func (client FormulasClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, name) if err != nil { @@ -217,9 +215,8 @@ func (client FormulasClient) DeleteResponder(resp *http.Response) (result autore // Get get formula. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the formula. expand is specify the $expand -// query. Example: 'properties($select=description)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// formula. expand is specify the $expand query. Example: 'properties($select=description)' func (client FormulasClient) Get(resourceGroupName string, labName string, name string, expand string) (result Formula, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { @@ -288,11 +285,9 @@ func (client FormulasClient) GetResponder(resp *http.Response) (result Formula, // List list formulas in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($select=description)' filter is the filter to apply to the -// operation. top is the maximum number of resources to return from the -// operation. orderby is the ordering expression for the results, using OData +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=description)' filter is the filter to apply to the operation. top is the maximum +// number of resources to return from the operation. orderby is the ordering expression for the results, using OData // notation. func (client FormulasClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationFormula, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) @@ -391,3 +386,48 @@ func (client FormulasClient) ListNextResults(lastResults ResponseWithContinuatio return } + +// ListComplete gets all elements from the list without paging. +func (client FormulasClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Formula, <-chan error) { + resultChan := make(chan Formula) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/galleryimages.go index 16df40fb4..d55a281c4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/galleryimages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/galleryimages.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,25 +28,22 @@ type GalleryImagesClient struct { ManagementClient } -// NewGalleryImagesClient creates an instance of the GalleryImagesClient -// client. +// NewGalleryImagesClient creates an instance of the GalleryImagesClient client. func NewGalleryImagesClient(subscriptionID string) GalleryImagesClient { return NewGalleryImagesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGalleryImagesClientWithBaseURI creates an instance of the -// GalleryImagesClient client. +// NewGalleryImagesClientWithBaseURI creates an instance of the GalleryImagesClient client. func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) GalleryImagesClient { return GalleryImagesClient{NewWithBaseURI(baseURI, subscriptionID)} } // List list gallery images in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($select=author)' filter is the filter to apply to the operation. -// top is the maximum number of resources to return from the operation. orderby -// is the ordering expression for the results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=author)' filter is the filter to apply to the operation. top is the maximum +// number of resources to return from the operation. orderby is the ordering expression for the results, using OData +// notation. func (client GalleryImagesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationGalleryImage, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) if err != nil { @@ -145,3 +141,48 @@ func (client GalleryImagesClient) ListNextResults(lastResults ResponseWithContin return } + +// ListComplete gets all elements from the list without paging. +func (client GalleryImagesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan GalleryImage, <-chan error) { + resultChan := make(chan GalleryImage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/globalschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/globalschedules.go index 8c5b5d076..394a454db 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/globalschedules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/globalschedules.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,22 +29,19 @@ type GlobalSchedulesClient struct { ManagementClient } -// NewGlobalSchedulesClient creates an instance of the GlobalSchedulesClient -// client. +// NewGlobalSchedulesClient creates an instance of the GlobalSchedulesClient client. func NewGlobalSchedulesClient(subscriptionID string) GlobalSchedulesClient { return NewGlobalSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewGlobalSchedulesClientWithBaseURI creates an instance of the -// GlobalSchedulesClient client. +// NewGlobalSchedulesClientWithBaseURI creates an instance of the GlobalSchedulesClient client. func NewGlobalSchedulesClientWithBaseURI(baseURI string, subscriptionID string) GlobalSchedulesClient { return GlobalSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or replace an existing schedule. // -// resourceGroupName is the name of the resource group. name is the name of the -// schedule. schedule is a schedule. +// resourceGroupName is the name of the resource group. name is the name of the schedule. schedule is a schedule. func (client GlobalSchedulesClient) CreateOrUpdate(resourceGroupName string, name string, schedule Schedule) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: schedule, @@ -118,8 +114,7 @@ func (client GlobalSchedulesClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete schedule. // -// resourceGroupName is the name of the resource group. name is the name of the -// schedule. +// resourceGroupName is the name of the resource group. name is the name of the schedule. func (client GlobalSchedulesClient) Delete(resourceGroupName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, name) if err != nil { @@ -181,13 +176,11 @@ func (client GlobalSchedulesClient) DeleteResponder(resp *http.Response) (result return } -// Execute execute a schedule. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Execute execute a schedule. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// schedule. +// resourceGroupName is the name of the resource group. name is the name of the schedule. func (client GlobalSchedulesClient) Execute(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -195,8 +188,10 @@ func (client GlobalSchedulesClient) Execute(resourceGroupName string, name strin var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -264,9 +259,8 @@ func (client GlobalSchedulesClient) ExecuteResponder(resp *http.Response) (resul // Get get schedule. // -// resourceGroupName is the name of the resource group. name is the name of the -// schedule. expand is specify the $expand query. Example: -// 'properties($select=status)' +// resourceGroupName is the name of the resource group. name is the name of the schedule. expand is specify the $expand +// query. Example: 'properties($select=status)' func (client GlobalSchedulesClient) Get(resourceGroupName string, name string, expand string) (result Schedule, err error) { req, err := client.GetPreparer(resourceGroupName, name, expand) if err != nil { @@ -334,11 +328,9 @@ func (client GlobalSchedulesClient) GetResponder(resp *http.Response) (result Sc // ListByResourceGroup list schedules in a resource group. // -// resourceGroupName is the name of the resource group. expand is specify the -// $expand query. Example: 'properties($select=status)' filter is the filter to -// apply to the operation. top is the maximum number of resources to return -// from the operation. orderby is the ordering expression for the results, -// using OData notation. +// resourceGroupName is the name of the resource group. expand is specify the $expand query. Example: +// 'properties($select=status)' filter is the filter to apply to the operation. top is the maximum number of resources +// to return from the operation. orderby is the ordering expression for the results, using OData notation. func (client GlobalSchedulesClient) ListByResourceGroup(resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, expand, filter, top, orderby) if err != nil { @@ -436,11 +428,55 @@ func (client GlobalSchedulesClient) ListByResourceGroupNextResults(lastResults R return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client GlobalSchedulesClient) ListByResourceGroupComplete(resourceGroupName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) { + resultChan := make(chan Schedule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBySubscription list schedules in a subscription. // -// expand is specify the $expand query. Example: 'properties($select=status)' -// filter is the filter to apply to the operation. top is the maximum number of -// resources to return from the operation. orderby is the ordering expression +// expand is specify the $expand query. Example: 'properties($select=status)' filter is the filter to apply to the +// operation. top is the maximum number of resources to return from the operation. orderby is the ordering expression // for the results, using OData notation. func (client GlobalSchedulesClient) ListBySubscription(expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) { req, err := client.ListBySubscriptionPreparer(expand, filter, top, orderby) @@ -538,14 +574,57 @@ func (client GlobalSchedulesClient) ListBySubscriptionNextResults(lastResults Re return } -// Retarget updates a schedule's target resource Id. This operation can take a -// while to complete. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// ListBySubscriptionComplete gets all elements from the list without paging. +func (client GlobalSchedulesClient) ListBySubscriptionComplete(expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) { + resultChan := make(chan Schedule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscription(expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Retarget updates a schedule's target resource Id. This operation can take a while to complete. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// schedule. retargetScheduleProperties is properties for retargeting a virtual -// machine schedule. +// resourceGroupName is the name of the resource group. name is the name of the schedule. retargetScheduleProperties is +// properties for retargeting a virtual machine schedule. func (client GlobalSchedulesClient) Retarget(resourceGroupName string, name string, retargetScheduleProperties RetargetScheduleProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -553,8 +632,10 @@ func (client GlobalSchedulesClient) Retarget(resourceGroupName string, name stri var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -624,8 +705,7 @@ func (client GlobalSchedulesClient) RetargetResponder(resp *http.Response) (resu // Update modify properties of schedules. // -// resourceGroupName is the name of the resource group. name is the name of the -// schedule. schedule is a schedule. +// resourceGroupName is the name of the resource group. name is the name of the schedule. schedule is a schedule. func (client GlobalSchedulesClient) Update(resourceGroupName string, name string, schedule ScheduleFragment) (result Schedule, err error) { req, err := client.UpdatePreparer(resourceGroupName, name, schedule) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/labs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/labs.go index 0ed14dabb..edf0645c0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/labs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/labs.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -40,13 +39,11 @@ func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient return LabsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// ClaimAnyVM claim a random claimable virtual machine in the lab. This -// operation can take a while to complete. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// ClaimAnyVM claim a random claimable virtual machine in the lab. This operation can take a while to complete. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. +// resourceGroupName is the name of the resource group. name is the name of the lab. func (client LabsClient) ClaimAnyVM(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -54,8 +51,10 @@ func (client LabsClient) ClaimAnyVM(resourceGroupName string, name string, cance var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -121,14 +120,12 @@ func (client LabsClient) ClaimAnyVMResponder(resp *http.Response) (result autore return } -// CreateEnvironment create virtual machines in a lab. This operation can take -// a while to complete. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to +// CreateEnvironment create virtual machines in a lab. This operation can take a while to complete. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to // cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. labVirtualMachineCreationParameter is properties for creating a virtual -// machine. +// resourceGroupName is the name of the resource group. name is the name of the lab. labVirtualMachineCreationParameter +// is properties for creating a virtual machine. func (client LabsClient) CreateEnvironment(resourceGroupName string, name string, labVirtualMachineCreationParameter LabVirtualMachineCreationParameter, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -154,8 +151,10 @@ func (client LabsClient) CreateEnvironment(resourceGroupName string, name string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -223,13 +222,11 @@ func (client LabsClient) CreateEnvironmentResponder(resp *http.Response) (result return } -// CreateOrUpdate create or replace an existing lab. This operation can take a -// while to complete. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// CreateOrUpdate create or replace an existing lab. This operation can take a while to complete. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. lab is a lab. +// resourceGroupName is the name of the resource group. name is the name of the lab. lab is a lab. func (client LabsClient) CreateOrUpdate(resourceGroupName string, name string, lab Lab, cancel <-chan struct{}) (<-chan Lab, <-chan error) { resultChan := make(chan Lab, 1) errChan := make(chan error, 1) @@ -237,8 +234,10 @@ func (client LabsClient) CreateOrUpdate(resourceGroupName string, name string, l var err error var result Lab defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -307,13 +306,11 @@ func (client LabsClient) CreateOrUpdateResponder(resp *http.Response) (result La return } -// Delete delete lab. This operation can take a while to complete. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Delete delete lab. This operation can take a while to complete. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. +// resourceGroupName is the name of the resource group. name is the name of the lab. func (client LabsClient) Delete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -321,8 +318,10 @@ func (client LabsClient) Delete(resourceGroupName string, name string, cancel <- var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -388,15 +387,12 @@ func (client LabsClient) DeleteResponder(resp *http.Response) (result autorest.R return } -// ExportResourceUsage exports the lab resource usage into a storage account -// This operation can take a while to complete. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ExportResourceUsage exports the lab resource usage into a storage account This operation can take a while to +// complete. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. exportResourceUsageParameters is the parameters of the export -// operation. +// resourceGroupName is the name of the resource group. name is the name of the lab. exportResourceUsageParameters is +// the parameters of the export operation. func (client LabsClient) ExportResourceUsage(resourceGroupName string, name string, exportResourceUsageParameters ExportResourceUsageParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -404,8 +400,10 @@ func (client LabsClient) ExportResourceUsage(resourceGroupName string, name stri var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -475,8 +473,8 @@ func (client LabsClient) ExportResourceUsageResponder(resp *http.Response) (resu // GenerateUploadURI generate a URI for uploading custom disk images to a Lab. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. generateUploadURIParameter is properties for generating an upload URI. +// resourceGroupName is the name of the resource group. name is the name of the lab. generateUploadURIParameter is +// properties for generating an upload URI. func (client LabsClient) GenerateUploadURI(resourceGroupName string, name string, generateUploadURIParameter GenerateUploadURIParameter) (result GenerateUploadURIResponse, err error) { req, err := client.GenerateUploadURIPreparer(resourceGroupName, name, generateUploadURIParameter) if err != nil { @@ -543,9 +541,8 @@ func (client LabsClient) GenerateUploadURIResponder(resp *http.Response) (result // Get get lab. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. expand is specify the $expand query. Example: -// 'properties($select=defaultStorageAccount)' +// resourceGroupName is the name of the resource group. name is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=defaultStorageAccount)' func (client LabsClient) Get(resourceGroupName string, name string, expand string) (result Lab, err error) { req, err := client.GetPreparer(resourceGroupName, name, expand) if err != nil { @@ -613,11 +610,10 @@ func (client LabsClient) GetResponder(resp *http.Response) (result Lab, err erro // ListByResourceGroup list labs in a resource group. // -// resourceGroupName is the name of the resource group. expand is specify the -// $expand query. Example: 'properties($select=defaultStorageAccount)' filter -// is the filter to apply to the operation. top is the maximum number of -// resources to return from the operation. orderby is the ordering expression -// for the results, using OData notation. +// resourceGroupName is the name of the resource group. expand is specify the $expand query. Example: +// 'properties($select=defaultStorageAccount)' filter is the filter to apply to the operation. top is the maximum +// number of resources to return from the operation. orderby is the ordering expression for the results, using OData +// notation. func (client LabsClient) ListByResourceGroup(resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLab, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, expand, filter, top, orderby) if err != nil { @@ -715,13 +711,56 @@ func (client LabsClient) ListByResourceGroupNextResults(lastResults ResponseWith return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client LabsClient) ListByResourceGroupComplete(resourceGroupName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Lab, <-chan error) { + resultChan := make(chan Lab) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBySubscription list labs in a subscription. // -// expand is specify the $expand query. Example: -// 'properties($select=defaultStorageAccount)' filter is the filter to apply to -// the operation. top is the maximum number of resources to return from the -// operation. orderby is the ordering expression for the results, using OData -// notation. +// expand is specify the $expand query. Example: 'properties($select=defaultStorageAccount)' filter is the filter to +// apply to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering +// expression for the results, using OData notation. func (client LabsClient) ListBySubscription(expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLab, err error) { req, err := client.ListBySubscriptionPreparer(expand, filter, top, orderby) if err != nil { @@ -818,10 +857,54 @@ func (client LabsClient) ListBySubscriptionNextResults(lastResults ResponseWithC return } +// ListBySubscriptionComplete gets all elements from the list without paging. +func (client LabsClient) ListBySubscriptionComplete(expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Lab, <-chan error) { + resultChan := make(chan Lab) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscription(expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListVhds list disk images available for custom image creation. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. +// resourceGroupName is the name of the resource group. name is the name of the lab. func (client LabsClient) ListVhds(resourceGroupName string, name string) (result ResponseWithContinuationLabVhd, err error) { req, err := client.ListVhdsPreparer(resourceGroupName, name) if err != nil { @@ -908,10 +991,54 @@ func (client LabsClient) ListVhdsNextResults(lastResults ResponseWithContinuatio return } +// ListVhdsComplete gets all elements from the list without paging. +func (client LabsClient) ListVhdsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan LabVhd, <-chan error) { + resultChan := make(chan LabVhd) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListVhds(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListVhdsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update modify properties of labs. // -// resourceGroupName is the name of the resource group. name is the name of the -// lab. lab is a lab. +// resourceGroupName is the name of the resource group. name is the name of the lab. lab is a lab. func (client LabsClient) Update(resourceGroupName string, name string, lab LabFragment) (result Lab, err error) { req, err := client.UpdatePreparer(resourceGroupName, name, lab) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/models.go index 5525e7f01..fc5e3112f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/models.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -63,11 +62,9 @@ const ( type EnableStatus string const ( - // EnableStatusDisabled specifies the enable status disabled state for - // enable status. + // EnableStatusDisabled specifies the enable status disabled state for enable status. EnableStatusDisabled EnableStatus = "Disabled" - // EnableStatusEnabled specifies the enable status enabled state for enable - // status. + // EnableStatusEnabled specifies the enable status enabled state for enable status. EnableStatusEnabled EnableStatus = "Enabled" ) @@ -75,12 +72,10 @@ const ( type FileUploadOptions string const ( - // FileUploadOptionsNone specifies the file upload options none state for - // file upload options. + // FileUploadOptionsNone specifies the file upload options none state for file upload options. FileUploadOptionsNone FileUploadOptions = "None" - // FileUploadOptionsUploadFilesAndGenerateSasTokens specifies the file - // upload options upload files and generate sas tokens state for file - // upload options. + // FileUploadOptionsUploadFilesAndGenerateSasTokens specifies the file upload options upload files and generate sas + // tokens state for file upload options. FileUploadOptionsUploadFilesAndGenerateSasTokens FileUploadOptions = "UploadFilesAndGenerateSasTokens" ) @@ -88,14 +83,11 @@ const ( type HostCachingOptions string const ( - // HostCachingOptionsNone specifies the host caching options none state for - // host caching options. + // HostCachingOptionsNone specifies the host caching options none state for host caching options. HostCachingOptionsNone HostCachingOptions = "None" - // HostCachingOptionsReadOnly specifies the host caching options read only - // state for host caching options. + // HostCachingOptionsReadOnly specifies the host caching options read only state for host caching options. HostCachingOptionsReadOnly HostCachingOptions = "ReadOnly" - // HostCachingOptionsReadWrite specifies the host caching options read - // write state for host caching options. + // HostCachingOptionsReadWrite specifies the host caching options read write state for host caching options. HostCachingOptionsReadWrite HostCachingOptions = "ReadWrite" ) @@ -103,24 +95,19 @@ const ( type LinuxOsState string const ( - // DeprovisionApplied specifies the deprovision applied state for linux os - // state. + // DeprovisionApplied specifies the deprovision applied state for linux os state. DeprovisionApplied LinuxOsState = "DeprovisionApplied" - // DeprovisionRequested specifies the deprovision requested state for linux - // os state. + // DeprovisionRequested specifies the deprovision requested state for linux os state. DeprovisionRequested LinuxOsState = "DeprovisionRequested" - // NonDeprovisioned specifies the non deprovisioned state for linux os - // state. + // NonDeprovisioned specifies the non deprovisioned state for linux os state. NonDeprovisioned LinuxOsState = "NonDeprovisioned" ) -// NotificationChannelEventType enumerates the values for notification channel -// event type. +// NotificationChannelEventType enumerates the values for notification channel event type. type NotificationChannelEventType string const ( - // AutoShutdown specifies the auto shutdown state for notification channel - // event type. + // AutoShutdown specifies the auto shutdown state for notification channel event type. AutoShutdown NotificationChannelEventType = "AutoShutdown" // Cost specifies the cost state for notification channel event type. Cost NotificationChannelEventType = "Cost" @@ -130,11 +117,9 @@ const ( type NotificationStatus string const ( - // NotificationStatusDisabled specifies the notification status disabled - // state for notification status. + // NotificationStatusDisabled specifies the notification status disabled state for notification status. NotificationStatusDisabled NotificationStatus = "Disabled" - // NotificationStatusEnabled specifies the notification status enabled - // state for notification status. + // NotificationStatusEnabled specifies the notification status enabled state for notification status. NotificationStatusEnabled NotificationStatus = "Enabled" ) @@ -142,11 +127,9 @@ const ( type PolicyEvaluatorType string const ( - // AllowedValuesPolicy specifies the allowed values policy state for policy - // evaluator type. + // AllowedValuesPolicy specifies the allowed values policy state for policy evaluator type. AllowedValuesPolicy PolicyEvaluatorType = "AllowedValuesPolicy" - // MaxValuePolicy specifies the max value policy state for policy evaluator - // type. + // MaxValuePolicy specifies the max value policy state for policy evaluator type. MaxValuePolicy PolicyEvaluatorType = "MaxValuePolicy" ) @@ -154,29 +137,23 @@ const ( type PolicyFactName string const ( - // PolicyFactNameGalleryImage specifies the policy fact name gallery image - // state for policy fact name. + // PolicyFactNameGalleryImage specifies the policy fact name gallery image state for policy fact name. PolicyFactNameGalleryImage PolicyFactName = "GalleryImage" - // PolicyFactNameLabPremiumVMCount specifies the policy fact name lab - // premium vm count state for policy fact name. + // PolicyFactNameLabPremiumVMCount specifies the policy fact name lab premium vm count state for policy fact name. PolicyFactNameLabPremiumVMCount PolicyFactName = "LabPremiumVmCount" - // PolicyFactNameLabTargetCost specifies the policy fact name lab target - // cost state for policy fact name. + // PolicyFactNameLabTargetCost specifies the policy fact name lab target cost state for policy fact name. PolicyFactNameLabTargetCost PolicyFactName = "LabTargetCost" - // PolicyFactNameLabVMCount specifies the policy fact name lab vm count - // state for policy fact name. + // PolicyFactNameLabVMCount specifies the policy fact name lab vm count state for policy fact name. PolicyFactNameLabVMCount PolicyFactName = "LabVmCount" - // PolicyFactNameLabVMSize specifies the policy fact name lab vm size state - // for policy fact name. + // PolicyFactNameLabVMSize specifies the policy fact name lab vm size state for policy fact name. PolicyFactNameLabVMSize PolicyFactName = "LabVmSize" - // PolicyFactNameUserOwnedLabPremiumVMCount specifies the policy fact name - // user owned lab premium vm count state for policy fact name. + // PolicyFactNameUserOwnedLabPremiumVMCount specifies the policy fact name user owned lab premium vm count state for + // policy fact name. PolicyFactNameUserOwnedLabPremiumVMCount PolicyFactName = "UserOwnedLabPremiumVmCount" - // PolicyFactNameUserOwnedLabVMCount specifies the policy fact name user - // owned lab vm count state for policy fact name. + // PolicyFactNameUserOwnedLabVMCount specifies the policy fact name user owned lab vm count state for policy fact name. PolicyFactNameUserOwnedLabVMCount PolicyFactName = "UserOwnedLabVmCount" - // PolicyFactNameUserOwnedLabVMCountInSubnet specifies the policy fact name - // user owned lab vm count in subnet state for policy fact name. + // PolicyFactNameUserOwnedLabVMCountInSubnet specifies the policy fact name user owned lab vm count in subnet state for + // policy fact name. PolicyFactNameUserOwnedLabVMCountInSubnet PolicyFactName = "UserOwnedLabVmCountInSubnet" ) @@ -184,11 +161,9 @@ const ( type PolicyStatus string const ( - // PolicyStatusDisabled specifies the policy status disabled state for - // policy status. + // PolicyStatusDisabled specifies the policy status disabled state for policy status. PolicyStatusDisabled PolicyStatus = "Disabled" - // PolicyStatusEnabled specifies the policy status enabled state for policy - // status. + // PolicyStatusEnabled specifies the policy status enabled state for policy status. PolicyStatusEnabled PolicyStatus = "Enabled" ) @@ -196,11 +171,9 @@ const ( type PremiumDataDisk string const ( - // PremiumDataDiskDisabled specifies the premium data disk disabled state - // for premium data disk. + // PremiumDataDiskDisabled specifies the premium data disk disabled state for premium data disk. PremiumDataDiskDisabled PremiumDataDisk = "Disabled" - // PremiumDataDiskEnabled specifies the premium data disk enabled state for - // premium data disk. + // PremiumDataDiskEnabled specifies the premium data disk enabled state for premium data disk. PremiumDataDiskEnabled PremiumDataDisk = "Enabled" ) @@ -208,8 +181,7 @@ const ( type ReportingCycleType string const ( - // CalendarMonth specifies the calendar month state for reporting cycle - // type. + // CalendarMonth specifies the calendar month state for reporting cycle type. CalendarMonth ReportingCycleType = "CalendarMonth" // Custom specifies the custom state for reporting cycle type. Custom ReportingCycleType = "Custom" @@ -239,11 +211,9 @@ const ( type TargetCostStatus string const ( - // TargetCostStatusDisabled specifies the target cost status disabled state - // for target cost status. + // TargetCostStatusDisabled specifies the target cost status disabled state for target cost status. TargetCostStatusDisabled TargetCostStatus = "Disabled" - // TargetCostStatusEnabled specifies the target cost status enabled state - // for target cost status. + // TargetCostStatusEnabled specifies the target cost status enabled state for target cost status. TargetCostStatusEnabled TargetCostStatus = "Enabled" ) @@ -269,16 +239,13 @@ const ( Deny UsagePermissionType = "Deny" ) -// VirtualMachineCreationSource enumerates the values for virtual machine -// creation source. +// VirtualMachineCreationSource enumerates the values for virtual machine creation source. type VirtualMachineCreationSource string const ( - // FromCustomImage specifies the from custom image state for virtual - // machine creation source. + // FromCustomImage specifies the from custom image state for virtual machine creation source. FromCustomImage VirtualMachineCreationSource = "FromCustomImage" - // FromGalleryImage specifies the from gallery image state for virtual - // machine creation source. + // FromGalleryImage specifies the from gallery image state for virtual machine creation source. FromGalleryImage VirtualMachineCreationSource = "FromGalleryImage" ) @@ -290,13 +257,12 @@ const ( NonSysprepped WindowsOsState = "NonSysprepped" // SysprepApplied specifies the sysprep applied state for windows os state. SysprepApplied WindowsOsState = "SysprepApplied" - // SysprepRequested specifies the sysprep requested state for windows os - // state. + // SysprepRequested specifies the sysprep requested state for windows os state. SysprepRequested WindowsOsState = "SysprepRequested" ) -// ApplicableSchedule is schedules applicable to a virtual machine. The -// schedules may have been defined on a VM or on lab level. +// ApplicableSchedule is schedules applicable to a virtual machine. The schedules may have been defined on a VM or on +// lab level. type ApplicableSchedule struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -307,8 +273,8 @@ type ApplicableSchedule struct { *ApplicableScheduleProperties `json:"properties,omitempty"` } -// ApplicableScheduleFragment is schedules applicable to a virtual machine. The -// schedules may have been defined on a VM or on lab level. +// ApplicableScheduleFragment is schedules applicable to a virtual machine. The schedules may have been defined on a VM +// or on lab level. type ApplicableScheduleFragment struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -318,22 +284,19 @@ type ApplicableScheduleFragment struct { *ApplicableSchedulePropertiesFragment `json:"properties,omitempty"` } -// ApplicableScheduleProperties is properties of a schedules applicable to a -// virtual machine. +// ApplicableScheduleProperties is properties of a schedules applicable to a virtual machine. type ApplicableScheduleProperties struct { LabVmsShutdown *Schedule `json:"labVmsShutdown,omitempty"` LabVmsStartup *Schedule `json:"labVmsStartup,omitempty"` } -// ApplicableSchedulePropertiesFragment is properties of a schedules applicable -// to a virtual machine. +// ApplicableSchedulePropertiesFragment is properties of a schedules applicable to a virtual machine. type ApplicableSchedulePropertiesFragment struct { LabVmsShutdown *ScheduleFragment `json:"labVmsShutdown,omitempty"` LabVmsStartup *ScheduleFragment `json:"labVmsStartup,omitempty"` } -// ApplyArtifactsRequest is request body for applying artifacts to a virtual -// machine. +// ApplyArtifactsRequest is request body for applying artifacts to a virtual machine. type ApplyArtifactsRequest struct { Artifacts *[]ArtifactInstallProperties `json:"artifacts,omitempty"` } @@ -356,8 +319,7 @@ type ArmTemplateInfo struct { Parameters *map[string]interface{} `json:"parameters,omitempty"` } -// ArmTemplateParameterProperties is properties of an Azure Resource Manager -// template parameter. +// ArmTemplateParameterProperties is properties of an Azure Resource Manager template parameter. type ArmTemplateParameterProperties struct { Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` @@ -392,8 +354,7 @@ type ArtifactDeploymentStatusProperties struct { TotalArtifacts *int32 `json:"totalArtifacts,omitempty"` } -// ArtifactDeploymentStatusPropertiesFragment is properties of an artifact -// deployment. +// ArtifactDeploymentStatusPropertiesFragment is properties of an artifact deployment. type ArtifactDeploymentStatusPropertiesFragment struct { DeploymentStatus *string `json:"deploymentStatus,omitempty"` ArtifactsApplied *int32 `json:"artifactsApplied,omitempty"` @@ -499,16 +460,14 @@ type AttachDiskProperties struct { LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"` } -// AttachNewDataDiskOptions is properties to attach new disk to the Virtual -// Machine. +// AttachNewDataDiskOptions is properties to attach new disk to the Virtual Machine. type AttachNewDataDiskOptions struct { DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"` DiskName *string `json:"diskName,omitempty"` DiskType StorageType `json:"diskType,omitempty"` } -// BulkCreationParameters is parameters for creating multiple virtual machines -// as a single action. +// BulkCreationParameters is parameters for creating multiple virtual machines as a single action. type BulkCreationParameters struct { InstanceCount *int32 `json:"instanceCount,omitempty"` } @@ -549,16 +508,14 @@ type ComputeVMInstanceViewStatus struct { Message *string `json:"message,omitempty"` } -// ComputeVMInstanceViewStatusFragment is status information about a virtual -// machine. +// ComputeVMInstanceViewStatusFragment is status information about a virtual machine. type ComputeVMInstanceViewStatusFragment struct { Code *string `json:"code,omitempty"` DisplayStatus *string `json:"displayStatus,omitempty"` Message *string `json:"message,omitempty"` } -// ComputeVMProperties is properties of a virtual machine returned by the -// Microsoft.Compute API. +// ComputeVMProperties is properties of a virtual machine returned by the Microsoft.Compute API. type ComputeVMProperties struct { Statuses *[]ComputeVMInstanceViewStatus `json:"statuses,omitempty"` OsType *string `json:"osType,omitempty"` @@ -569,8 +526,7 @@ type ComputeVMProperties struct { DataDisks *[]ComputeDataDisk `json:"dataDisks,omitempty"` } -// ComputeVMPropertiesFragment is properties of a virtual machine returned by -// the Microsoft.Compute API. +// ComputeVMPropertiesFragment is properties of a virtual machine returned by the Microsoft.Compute API. type ComputeVMPropertiesFragment struct { Statuses *[]ComputeVMInstanceViewStatusFragment `json:"statuses,omitempty"` OsType *string `json:"osType,omitempty"` @@ -613,24 +569,21 @@ type CustomImageProperties struct { UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"` } -// CustomImagePropertiesCustom is properties for creating a custom image from a -// VHD. +// CustomImagePropertiesCustom is properties for creating a custom image from a VHD. type CustomImagePropertiesCustom struct { ImageName *string `json:"imageName,omitempty"` SysPrep *bool `json:"sysPrep,omitempty"` OsType CustomImageOsType `json:"osType,omitempty"` } -// CustomImagePropertiesFromVM is properties for creating a custom image from a -// virtual machine. +// CustomImagePropertiesFromVM is properties for creating a custom image from a virtual machine. type CustomImagePropertiesFromVM struct { SourceVMID *string `json:"sourceVmId,omitempty"` WindowsOsInfo *WindowsOsInfo `json:"windowsOsInfo,omitempty"` LinuxOsInfo *LinuxOsInfo `json:"linuxOsInfo,omitempty"` } -// DataDiskProperties is request body for adding a new or existing data disk to -// a virtual machine. +// DataDiskProperties is request body for adding a new or existing data disk to a virtual machine. type DataDiskProperties struct { AttachNewDataDiskOptions *AttachNewDataDiskOptions `json:"attachNewDataDiskOptions,omitempty"` ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"` @@ -647,8 +600,7 @@ type DayDetailsFragment struct { Time *string `json:"time,omitempty"` } -// DetachDataDiskProperties is request body for detaching data disk from a -// virtual machine. +// DetachDataDiskProperties is request body for detaching data disk from a virtual machine. type DetachDataDiskProperties struct { ExistingLabDiskID *string `json:"existingLabDiskId,omitempty"` } @@ -683,8 +635,7 @@ type DiskProperties struct { UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"` } -// DtlEnvironment is an environment, which is essentially an ARM template -// deployment. +// DtlEnvironment is an environment, which is essentially an ARM template deployment. type DtlEnvironment struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -745,22 +696,19 @@ type ExportResourceUsageParameters struct { UsageStartDate *date.Time `json:"usageStartDate,omitempty"` } -// ExternalSubnet is subnet information as returned by the Microsoft.Network -// API. +// ExternalSubnet is subnet information as returned by the Microsoft.Network API. type ExternalSubnet struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` } -// ExternalSubnetFragment is subnet information as returned by the -// Microsoft.Network API. +// ExternalSubnetFragment is subnet information as returned by the Microsoft.Network API. type ExternalSubnetFragment struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` } -// Formula is a formula for creating a VM, specifying an image base and other -// parameters +// Formula is a formula for creating a VM, specifying an image base and other parameters type Formula struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -783,8 +731,7 @@ type FormulaProperties struct { UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"` } -// FormulaPropertiesFromVM is information about a VM from which a formula is to -// be created. +// FormulaPropertiesFromVM is information about a VM from which a formula is to be created. type FormulaPropertiesFromVM struct { LabVMID *string `json:"labVmId,omitempty"` } @@ -809,8 +756,7 @@ type GalleryImageProperties struct { Enabled *bool `json:"enabled,omitempty"` } -// GalleryImageReference is the reference information for an Azure Marketplace -// image. +// GalleryImageReference is the reference information for an Azure Marketplace image. type GalleryImageReference struct { Offer *string `json:"offer,omitempty"` Publisher *string `json:"publisher,omitempty"` @@ -819,8 +765,7 @@ type GalleryImageReference struct { Version *string `json:"version,omitempty"` } -// GalleryImageReferenceFragment is the reference information for an Azure -// Marketplace image. +// GalleryImageReferenceFragment is the reference information for an Azure Marketplace image. type GalleryImageReferenceFragment struct { Offer *string `json:"offer,omitempty"` Publisher *string `json:"publisher,omitempty"` @@ -829,8 +774,7 @@ type GalleryImageReferenceFragment struct { Version *string `json:"version,omitempty"` } -// GenerateArmTemplateRequest is parameters for generating an ARM template for -// deploying artifacts. +// GenerateArmTemplateRequest is parameters for generating an ARM template for deploying artifacts. type GenerateArmTemplateRequest struct { VirtualMachineName *string `json:"virtualMachineName,omitempty"` Parameters *[]ParameterInfo `json:"parameters,omitempty"` @@ -867,16 +811,16 @@ type IdentityProperties struct { ClientSecretURL *string `json:"clientSecretUrl,omitempty"` } -// InboundNatRule is a rule for NAT - exposing a VM's port (backendPort) on the -// public IP address using a load balancer. +// InboundNatRule is a rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load +// balancer. type InboundNatRule struct { TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"` FrontendPort *int32 `json:"frontendPort,omitempty"` BackendPort *int32 `json:"backendPort,omitempty"` } -// InboundNatRuleFragment is a rule for NAT - exposing a VM's port -// (backendPort) on the public IP address using a load balancer. +// InboundNatRuleFragment is a rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load +// balancer. type InboundNatRuleFragment struct { TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"` FrontendPort *int32 `json:"frontendPort,omitempty"` @@ -992,8 +936,7 @@ type LabVirtualMachine struct { *LabVirtualMachineProperties `json:"properties,omitempty"` } -// LabVirtualMachineCreationParameter is properties for creating a virtual -// machine. +// LabVirtualMachineCreationParameter is properties for creating a virtual machine. type LabVirtualMachineCreationParameter struct { *LabVirtualMachineCreationParameterProperties `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -1001,8 +944,7 @@ type LabVirtualMachineCreationParameter struct { Tags *map[string]*string `json:"tags,omitempty"` } -// LabVirtualMachineCreationParameterProperties is properties for virtual -// machine creation. +// LabVirtualMachineCreationParameterProperties is properties for virtual machine creation. type LabVirtualMachineCreationParameterProperties struct { BulkCreationParameters *BulkCreationParameters `json:"bulkCreationParameters,omitempty"` Notes *string `json:"notes,omitempty"` @@ -1213,15 +1155,13 @@ type ParameterInfo struct { Value *string `json:"value,omitempty"` } -// ParametersValueFileInfo is a file containing a set of parameter values for -// an ARM template. +// ParametersValueFileInfo is a file containing a set of parameter values for an ARM template. type ParametersValueFileInfo struct { FileName *string `json:"fileName,omitempty"` ParametersValueInfo *map[string]interface{} `json:"parametersValueInfo,omitempty"` } -// PercentageCostThresholdProperties is properties of a percentage cost -// threshold. +// PercentageCostThresholdProperties is properties of a percentage cost threshold. type PercentageCostThresholdProperties struct { ThresholdValue *float64 `json:"thresholdValue,omitempty"` } @@ -1495,8 +1435,7 @@ func (client ResponseWithContinuationLabVhd) ResponseWithContinuationLabVhdPrepa autorest.WithBaseURL(to.String(client.NextLink))) } -// ResponseWithContinuationLabVirtualMachine is the response of a list -// operation. +// ResponseWithContinuationLabVirtualMachine is the response of a list operation. type ResponseWithContinuationLabVirtualMachine struct { autorest.Response `json:"-"` Value *[]LabVirtualMachine `json:"value,omitempty"` @@ -1515,8 +1454,7 @@ func (client ResponseWithContinuationLabVirtualMachine) ResponseWithContinuation autorest.WithBaseURL(to.String(client.NextLink))) } -// ResponseWithContinuationNotificationChannel is the response of a list -// operation. +// ResponseWithContinuationNotificationChannel is the response of a list operation. type ResponseWithContinuationNotificationChannel struct { autorest.Response `json:"-"` Value *[]NotificationChannel `json:"value,omitempty"` @@ -1649,8 +1587,7 @@ func (client ResponseWithContinuationVirtualNetwork) ResponseWithContinuationVir autorest.WithBaseURL(to.String(client.NextLink))) } -// RetargetScheduleProperties is properties for retargeting a virtual machine -// schedule. +// RetargetScheduleProperties is properties for retargeting a virtual machine schedule. type RetargetScheduleProperties struct { CurrentResourceID *string `json:"currentResourceId,omitempty"` TargetResourceID *string `json:"targetResourceId,omitempty"` @@ -1724,8 +1661,7 @@ type SecretProperties struct { UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"` } -// ServiceRunner is a container for a managed identity to execute DevTest lab -// services. +// ServiceRunner is a container for a managed identity to execute DevTest lab services. type ServiceRunner struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1736,21 +1672,20 @@ type ServiceRunner struct { Identity *IdentityProperties `json:"identity,omitempty"` } -// SharedPublicIPAddressConfiguration is properties of a virtual machine that -// determine how it is connected to a load balancer. +// SharedPublicIPAddressConfiguration is properties of a virtual machine that determine how it is connected to a load +// balancer. type SharedPublicIPAddressConfiguration struct { InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"` } -// SharedPublicIPAddressConfigurationFragment is properties of a virtual -// machine that determine how it is connected to a load balancer. +// SharedPublicIPAddressConfigurationFragment is properties of a virtual machine that determine how it is connected to +// a load balancer. type SharedPublicIPAddressConfigurationFragment struct { InboundNatRules *[]InboundNatRuleFragment `json:"inboundNatRules,omitempty"` } -// ShutdownNotificationContent is the contents of a shutdown notification. -// Webhooks can use this type to deserialize the request body when they get -// notified of an imminent shutdown. +// ShutdownNotificationContent is the contents of a shutdown notification. Webhooks can use this type to deserialize +// the request body when they get notified of an imminent shutdown. type ShutdownNotificationContent struct { SkipURL *string `json:"skipUrl,omitempty"` DelayURL60 *string `json:"delayUrl60,omitempty"` @@ -1789,8 +1724,7 @@ type SubnetOverride struct { VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"` } -// SubnetOverrideFragment is property overrides on a subnet of a virtual -// network. +// SubnetOverrideFragment is property overrides on a subnet of a virtual network. type SubnetOverrideFragment struct { ResourceID *string `json:"resourceId,omitempty"` LabSubnetName *string `json:"labSubnetName,omitempty"` @@ -1800,14 +1734,12 @@ type SubnetOverrideFragment struct { VirtualNetworkPoolName *string `json:"virtualNetworkPoolName,omitempty"` } -// SubnetSharedPublicIPAddressConfiguration is configuration for public IP -// address sharing. +// SubnetSharedPublicIPAddressConfiguration is configuration for public IP address sharing. type SubnetSharedPublicIPAddressConfiguration struct { AllowedPorts *[]Port `json:"allowedPorts,omitempty"` } -// SubnetSharedPublicIPAddressConfigurationFragment is configuration for public -// IP address sharing. +// SubnetSharedPublicIPAddressConfigurationFragment is configuration for public IP address sharing. type SubnetSharedPublicIPAddressConfigurationFragment struct { AllowedPorts *[]PortFragment `json:"allowedPorts,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/notificationchannels.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/notificationchannels.go index f9acf5b38..d39a8f872 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/notificationchannels.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/notificationchannels.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,23 +29,20 @@ type NotificationChannelsClient struct { ManagementClient } -// NewNotificationChannelsClient creates an instance of the -// NotificationChannelsClient client. +// NewNotificationChannelsClient creates an instance of the NotificationChannelsClient client. func NewNotificationChannelsClient(subscriptionID string) NotificationChannelsClient { return NewNotificationChannelsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNotificationChannelsClientWithBaseURI creates an instance of the -// NotificationChannelsClient client. +// NewNotificationChannelsClientWithBaseURI creates an instance of the NotificationChannelsClient client. func NewNotificationChannelsClientWithBaseURI(baseURI string, subscriptionID string) NotificationChannelsClient { return NotificationChannelsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or replace an existing notificationChannel. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the notificationChannel. notificationChannel is -// a notification. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// notificationChannel. notificationChannel is a notification. func (client NotificationChannelsClient) CreateOrUpdate(resourceGroupName string, labName string, name string, notificationChannel NotificationChannel) (result NotificationChannel, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: notificationChannel, @@ -120,8 +116,8 @@ func (client NotificationChannelsClient) CreateOrUpdateResponder(resp *http.Resp // Delete delete notificationchannel. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the notificationChannel. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// notificationChannel. func (client NotificationChannelsClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, name) if err != nil { @@ -186,9 +182,8 @@ func (client NotificationChannelsClient) DeleteResponder(resp *http.Response) (r // Get get notificationchannel. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the notificationChannel. expand is specify the -// $expand query. Example: 'properties($select=webHookUrl)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// notificationChannel. expand is specify the $expand query. Example: 'properties($select=webHookUrl)' func (client NotificationChannelsClient) Get(resourceGroupName string, labName string, name string, expand string) (result NotificationChannel, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { @@ -257,11 +252,9 @@ func (client NotificationChannelsClient) GetResponder(resp *http.Response) (resu // List list notificationchannels in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($select=webHookUrl)' filter is the filter to apply to the -// operation. top is the maximum number of resources to return from the -// operation. orderby is the ordering expression for the results, using OData +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=webHookUrl)' filter is the filter to apply to the operation. top is the maximum +// number of resources to return from the operation. orderby is the ordering expression for the results, using OData // notation. func (client NotificationChannelsClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationNotificationChannel, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) @@ -361,11 +354,55 @@ func (client NotificationChannelsClient) ListNextResults(lastResults ResponseWit return } +// ListComplete gets all elements from the list without paging. +func (client NotificationChannelsClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan NotificationChannel, <-chan error) { + resultChan := make(chan NotificationChannel) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Notify send notification to provided channel. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the notificationChannel. notifyParameters is -// properties for generating a Notification. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// notificationChannel. notifyParameters is properties for generating a Notification. func (client NotificationChannelsClient) Notify(resourceGroupName string, labName string, name string, notifyParameters NotifyParameters) (result autorest.Response, err error) { req, err := client.NotifyPreparer(resourceGroupName, labName, name, notifyParameters) if err != nil { @@ -432,9 +469,8 @@ func (client NotificationChannelsClient) NotifyResponder(resp *http.Response) (r // Update modify properties of notificationchannels. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the notificationChannel. notificationChannel is -// a notification. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// notificationChannel. notificationChannel is a notification. func (client NotificationChannelsClient) Update(resourceGroupName string, labName string, name string, notificationChannel NotificationChannelFragment) (result NotificationChannel, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, name, notificationChannel) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policies.go index 7405b86e1..2bd717770 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policies.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,17 +34,15 @@ func NewPoliciesClient(subscriptionID string) PoliciesClient { return NewPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient -// client. +// NewPoliciesClientWithBaseURI creates an instance of the PoliciesClient client. func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) PoliciesClient { return PoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or replace an existing policy. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. policySetName is the name of the policy set. name is the name of -// the policy. policy is a Policy. +// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of +// the policy set. name is the name of the policy. policy is a Policy. func (client PoliciesClient) CreateOrUpdate(resourceGroupName string, labName string, policySetName string, name string, policy Policy) (result Policy, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: policy, @@ -120,9 +117,8 @@ func (client PoliciesClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete delete policy. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. policySetName is the name of the policy set. name is the name of -// the policy. +// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of +// the policy set. name is the name of the policy. func (client PoliciesClient) Delete(resourceGroupName string, labName string, policySetName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, policySetName, name) if err != nil { @@ -188,9 +184,8 @@ func (client PoliciesClient) DeleteResponder(resp *http.Response) (result autore // Get get policy. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. policySetName is the name of the policy set. name is the name of -// the policy. expand is specify the $expand query. Example: +// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of +// the policy set. name is the name of the policy. expand is specify the $expand query. Example: // 'properties($select=description)' func (client PoliciesClient) Get(resourceGroupName string, labName string, policySetName string, name string, expand string) (result Policy, err error) { req, err := client.GetPreparer(resourceGroupName, labName, policySetName, name, expand) @@ -261,12 +256,10 @@ func (client PoliciesClient) GetResponder(resp *http.Response) (result Policy, e // List list policies in a given policy set. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. policySetName is the name of the policy set. expand is specify the -// $expand query. Example: 'properties($select=description)' filter is the -// filter to apply to the operation. top is the maximum number of resources to -// return from the operation. orderby is the ordering expression for the -// results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of +// the policy set. expand is specify the $expand query. Example: 'properties($select=description)' filter is the filter +// to apply to the operation. top is the maximum number of resources to return from the operation. orderby is the +// ordering expression for the results, using OData notation. func (client PoliciesClient) List(resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationPolicy, err error) { req, err := client.ListPreparer(resourceGroupName, labName, policySetName, expand, filter, top, orderby) if err != nil { @@ -366,11 +359,55 @@ func (client PoliciesClient) ListNextResults(lastResults ResponseWithContinuatio return } +// ListComplete gets all elements from the list without paging. +func (client PoliciesClient) ListComplete(resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Policy, <-chan error) { + resultChan := make(chan Policy) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, policySetName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update modify properties of policies. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. policySetName is the name of the policy set. name is the name of -// the policy. policy is a Policy. +// resourceGroupName is the name of the resource group. labName is the name of the lab. policySetName is the name of +// the policy set. name is the name of the policy. policy is a Policy. func (client PoliciesClient) Update(resourceGroupName string, labName string, policySetName string, name string, policy PolicyFragment) (result Policy, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, policySetName, name, policy) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policysets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policysets.go index d61065502..4fe929881 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policysets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/policysets.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,17 +33,15 @@ func NewPolicySetsClient(subscriptionID string) PolicySetsClient { return NewPolicySetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient -// client. +// NewPolicySetsClientWithBaseURI creates an instance of the PolicySetsClient client. func NewPolicySetsClientWithBaseURI(baseURI string, subscriptionID string) PolicySetsClient { return PolicySetsClient{NewWithBaseURI(baseURI, subscriptionID)} } // EvaluatePolicies evaluates lab policy. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the policy set. evaluatePoliciesRequest is -// request body for evaluating a policy set. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the policy +// set. evaluatePoliciesRequest is request body for evaluating a policy set. func (client PolicySetsClient) EvaluatePolicies(resourceGroupName string, labName string, name string, evaluatePoliciesRequest EvaluatePoliciesRequest) (result EvaluatePoliciesResponse, err error) { req, err := client.EvaluatePoliciesPreparer(resourceGroupName, labName, name, evaluatePoliciesRequest) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/schedules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/schedules.go index 2a8ab3335..9cf35cff5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/schedules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/schedules.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,16 +34,15 @@ func NewSchedulesClient(subscriptionID string) SchedulesClient { return NewSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient -// client. +// NewSchedulesClientWithBaseURI creates an instance of the SchedulesClient client. func NewSchedulesClientWithBaseURI(baseURI string, subscriptionID string) SchedulesClient { return SchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or replace an existing schedule. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the schedule. schedule is a schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// schedule. schedule is a schedule. func (client SchedulesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, schedule Schedule) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: schedule, @@ -118,8 +116,8 @@ func (client SchedulesClient) CreateOrUpdateResponder(resp *http.Response) (resu // Delete delete schedule. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// schedule. func (client SchedulesClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, name) if err != nil { @@ -182,13 +180,12 @@ func (client SchedulesClient) DeleteResponder(resp *http.Response) (result autor return } -// Execute execute a schedule. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Execute execute a schedule. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// schedule. func (client SchedulesClient) Execute(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -196,8 +193,10 @@ func (client SchedulesClient) Execute(resourceGroupName string, labName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -266,9 +265,8 @@ func (client SchedulesClient) ExecuteResponder(resp *http.Response) (result auto // Get get schedule. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the schedule. expand is specify the $expand -// query. Example: 'properties($select=status)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// schedule. expand is specify the $expand query. Example: 'properties($select=status)' func (client SchedulesClient) Get(resourceGroupName string, labName string, name string, expand string) (result Schedule, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { @@ -337,11 +335,10 @@ func (client SchedulesClient) GetResponder(resp *http.Response) (result Schedule // List list schedules in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($select=status)' filter is the filter to apply to the operation. -// top is the maximum number of resources to return from the operation. orderby -// is the ordering expression for the results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=status)' filter is the filter to apply to the operation. top is the maximum +// number of resources to return from the operation. orderby is the ordering expression for the results, using OData +// notation. func (client SchedulesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) if err != nil { @@ -440,10 +437,55 @@ func (client SchedulesClient) ListNextResults(lastResults ResponseWithContinuati return } +// ListComplete gets all elements from the list without paging. +func (client SchedulesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) { + resultChan := make(chan Schedule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListApplicable lists all applicable schedules // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// schedule. func (client SchedulesClient) ListApplicable(resourceGroupName string, labName string, name string) (result ResponseWithContinuationSchedule, err error) { req, err := client.ListApplicablePreparer(resourceGroupName, labName, name) if err != nil { @@ -531,10 +573,55 @@ func (client SchedulesClient) ListApplicableNextResults(lastResults ResponseWith return } +// ListApplicableComplete gets all elements from the list without paging. +func (client SchedulesClient) ListApplicableComplete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) { + resultChan := make(chan Schedule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListApplicable(resourceGroupName, labName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListApplicableNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update modify properties of schedules. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the schedule. schedule is a schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the +// schedule. schedule is a schedule. func (client SchedulesClient) Update(resourceGroupName string, labName string, name string, schedule ScheduleFragment) (result Schedule, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, name, schedule) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/secrets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/secrets.go index 598a7d065..78effb2d0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/secrets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/secrets.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -42,9 +41,8 @@ func NewSecretsClientWithBaseURI(baseURI string, subscriptionID string) SecretsC // CreateOrUpdate create or replace an existing secret. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// secret. secret is a secret. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the secret. secret is a secret. func (client SecretsClient) CreateOrUpdate(resourceGroupName string, labName string, userName string, name string, secret Secret) (result Secret, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: secret, @@ -119,9 +117,8 @@ func (client SecretsClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete delete secret. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// secret. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the secret. func (client SecretsClient) Delete(resourceGroupName string, labName string, userName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, userName, name) if err != nil { @@ -187,9 +184,8 @@ func (client SecretsClient) DeleteResponder(resp *http.Response) (result autores // Get get secret. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. name is the name of the -// secret. expand is specify the $expand query. Example: +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. name is the name of the secret. expand is specify the $expand query. Example: // 'properties($select=value)' func (client SecretsClient) Get(resourceGroupName string, labName string, userName string, name string, expand string) (result Secret, err error) { req, err := client.GetPreparer(resourceGroupName, labName, userName, name, expand) @@ -260,12 +256,10 @@ func (client SecretsClient) GetResponder(resp *http.Response) (result Secret, er // List list secrets in a given user profile. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. userName is the name of the user profile. expand is specify the -// $expand query. Example: 'properties($select=value)' filter is the filter to -// apply to the operation. top is the maximum number of resources to return -// from the operation. orderby is the ordering expression for the results, -// using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. userName is the name of the +// user profile. expand is specify the $expand query. Example: 'properties($select=value)' filter is the filter to +// apply to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering +// expression for the results, using OData notation. func (client SecretsClient) List(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSecret, err error) { req, err := client.ListPreparer(resourceGroupName, labName, userName, expand, filter, top, orderby) if err != nil { @@ -364,3 +358,48 @@ func (client SecretsClient) ListNextResults(lastResults ResponseWithContinuation return } + +// ListComplete gets all elements from the list without paging. +func (client SecretsClient) ListComplete(resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Secret, <-chan error) { + resultChan := make(chan Secret) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, userName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/servicerunners.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/servicerunners.go index 5f473b636..06606bc72 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/servicerunners.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/servicerunners.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,23 +28,20 @@ type ServiceRunnersClient struct { ManagementClient } -// NewServiceRunnersClient creates an instance of the ServiceRunnersClient -// client. +// NewServiceRunnersClient creates an instance of the ServiceRunnersClient client. func NewServiceRunnersClient(subscriptionID string) ServiceRunnersClient { return NewServiceRunnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServiceRunnersClientWithBaseURI creates an instance of the -// ServiceRunnersClient client. +// NewServiceRunnersClientWithBaseURI creates an instance of the ServiceRunnersClient client. func NewServiceRunnersClientWithBaseURI(baseURI string, subscriptionID string) ServiceRunnersClient { return ServiceRunnersClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or replace an existing Service runner. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the service runner. serviceRunner is a -// container for a managed identity to execute DevTest lab services. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the service +// runner. serviceRunner is a container for a managed identity to execute DevTest lab services. func (client ServiceRunnersClient) CreateOrUpdate(resourceGroupName string, labName string, name string, serviceRunner ServiceRunner) (result ServiceRunner, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, labName, name, serviceRunner) if err != nil { @@ -113,8 +109,8 @@ func (client ServiceRunnersClient) CreateOrUpdateResponder(resp *http.Response) // Delete delete service runner. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the service runner. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the service +// runner. func (client ServiceRunnersClient) Delete(resourceGroupName string, labName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, name) if err != nil { @@ -179,8 +175,8 @@ func (client ServiceRunnersClient) DeleteResponder(resp *http.Response) (result // Get get service runner. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the service runner. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the service +// runner. func (client ServiceRunnersClient) Get(resourceGroupName string, labName string, name string) (result ServiceRunner, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name) if err != nil { @@ -246,9 +242,8 @@ func (client ServiceRunnersClient) GetResponder(resp *http.Response) (result Ser // List list service runners in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. filter is the filter to apply to the operation. top is the maximum -// number of resources to return from the operation. orderby is the ordering +// resourceGroupName is the name of the resource group. labName is the name of the lab. filter is the filter to apply +// to the operation. top is the maximum number of resources to return from the operation. orderby is the ordering // expression for the results, using OData notation. func (client ServiceRunnersClient) List(resourceGroupName string, labName string, filter string, top *int32, orderby string) (result ResponseWithContinuationServiceRunner, err error) { req, err := client.ListPreparer(resourceGroupName, labName, filter, top, orderby) @@ -344,3 +339,48 @@ func (client ServiceRunnersClient) ListNextResults(lastResults ResponseWithConti return } + +// ListComplete gets all elements from the list without paging. +func (client ServiceRunnersClient) ListComplete(resourceGroupName string, labName string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan ServiceRunner, <-chan error) { + resultChan := make(chan ServiceRunner) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/users.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/users.go index 86c22e8de..67d5bae1c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/users.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/users.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -41,9 +40,8 @@ func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClien // CreateOrUpdate create or replace an existing user profile. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the user profile. userParameter is profile of a -// lab user. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user +// profile. userParameter is profile of a lab user. func (client UsersClient) CreateOrUpdate(resourceGroupName string, labName string, name string, userParameter User) (result User, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, labName, name, userParameter) if err != nil { @@ -109,13 +107,12 @@ func (client UsersClient) CreateOrUpdateResponder(resp *http.Response) (result U return } -// Delete delete user profile. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Delete delete user profile. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the user profile. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user +// profile. func (client UsersClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -123,8 +120,10 @@ func (client UsersClient) Delete(resourceGroupName string, labName string, name var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -193,9 +192,8 @@ func (client UsersClient) DeleteResponder(resp *http.Response) (result autorest. // Get get user profile. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the user profile. expand is specify the $expand -// query. Example: 'properties($select=identity)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user +// profile. expand is specify the $expand query. Example: 'properties($select=identity)' func (client UsersClient) Get(resourceGroupName string, labName string, name string, expand string) (result User, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { @@ -264,11 +262,9 @@ func (client UsersClient) GetResponder(resp *http.Response) (result User, err er // List list user profiles in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($select=identity)' filter is the filter to apply to the -// operation. top is the maximum number of resources to return from the -// operation. orderby is the ordering expression for the results, using OData +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($select=identity)' filter is the filter to apply to the operation. top is the maximum +// number of resources to return from the operation. orderby is the ordering expression for the results, using OData // notation. func (client UsersClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationUser, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) @@ -368,11 +364,55 @@ func (client UsersClient) ListNextResults(lastResults ResponseWithContinuationUs return } +// ListComplete gets all elements from the list without paging. +func (client UsersClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan User, <-chan error) { + resultChan := make(chan User) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update modify properties of user profiles. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the user profile. userParameter is profile of a -// lab user. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the user +// profile. userParameter is profile of a lab user. func (client UsersClient) Update(resourceGroupName string, labName string, name string, userParameter UserFragment) (result User, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, name, userParameter) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go index 0729f19be..31692b041 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/version.go @@ -14,15 +14,15 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-devtestlabs/2016-05-15" + return "Azure-SDK-For-Go/v11.0.0-beta arm-devtestlabs/2016-05-15" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachines.go index bcd1f5194..c84fa7db1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachines.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,26 +29,22 @@ type VirtualMachinesClient struct { ManagementClient } -// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient -// client. +// NewVirtualMachinesClient creates an instance of the VirtualMachinesClient client. func NewVirtualMachinesClient(subscriptionID string) VirtualMachinesClient { return NewVirtualMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachinesClientWithBaseURI creates an instance of the -// VirtualMachinesClient client. +// NewVirtualMachinesClientWithBaseURI creates an instance of the VirtualMachinesClient client. func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachinesClient { return VirtualMachinesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// AddDataDisk attach a new or existing data disk to virtual machine. This -// operation can take a while to complete. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// AddDataDisk attach a new or existing data disk to virtual machine. This operation can take a while to complete. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. dataDiskProperties is -// request body for adding a new or existing data disk to a virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. dataDiskProperties is request body for adding a new or existing data disk to a virtual machine. func (client VirtualMachinesClient) AddDataDisk(resourceGroupName string, labName string, name string, dataDiskProperties DataDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -57,8 +52,10 @@ func (client VirtualMachinesClient) AddDataDisk(resourceGroupName string, labNam var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -127,14 +124,12 @@ func (client VirtualMachinesClient) AddDataDiskResponder(resp *http.Response) (r return } -// ApplyArtifacts apply artifacts to virtual machine. This operation can take a -// while to complete. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// ApplyArtifacts apply artifacts to virtual machine. This operation can take a while to complete. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. applyArtifactsRequest is -// request body for applying artifacts to a virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. applyArtifactsRequest is request body for applying artifacts to a virtual machine. func (client VirtualMachinesClient) ApplyArtifacts(resourceGroupName string, labName string, name string, applyArtifactsRequest ApplyArtifactsRequest, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -142,8 +137,10 @@ func (client VirtualMachinesClient) ApplyArtifacts(resourceGroupName string, lab var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -212,13 +209,12 @@ func (client VirtualMachinesClient) ApplyArtifactsResponder(resp *http.Response) return } -// Claim take ownership of an existing virtual machine This operation can take -// a while to complete. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to +// Claim take ownership of an existing virtual machine This operation can take a while to complete. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to // cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. func (client VirtualMachinesClient) Claim(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -226,8 +222,10 @@ func (client VirtualMachinesClient) Claim(resourceGroupName string, labName stri var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -294,14 +292,12 @@ func (client VirtualMachinesClient) ClaimResponder(resp *http.Response) (result return } -// CreateOrUpdate create or replace an existing Virtual machine. This operation -// can take a while to complete. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be +// CreateOrUpdate create or replace an existing Virtual machine. This operation can take a while to complete. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be // used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. labVirtualMachine is a -// virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. labVirtualMachine is a virtual machine. func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachine, cancel <-chan struct{}) (<-chan LabVirtualMachine, <-chan error) { resultChan := make(chan LabVirtualMachine, 1) errChan := make(chan error, 1) @@ -327,8 +323,10 @@ func (client VirtualMachinesClient) CreateOrUpdate(resourceGroupName string, lab var err error var result LabVirtualMachine defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -398,13 +396,12 @@ func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete delete virtual machine. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Delete delete virtual machine. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. func (client VirtualMachinesClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -412,8 +409,10 @@ func (client VirtualMachinesClient) Delete(resourceGroupName string, labName str var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -480,14 +479,12 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result return } -// DetachDataDisk detach the specified disk from the virtual machine. This -// operation can take a while to complete. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// DetachDataDisk detach the specified disk from the virtual machine. This operation can take a while to complete. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. detachDataDiskProperties -// is request body for detaching data disk from a virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. detachDataDiskProperties is request body for detaching data disk from a virtual machine. func (client VirtualMachinesClient) DetachDataDisk(resourceGroupName string, labName string, name string, detachDataDiskProperties DetachDataDiskProperties, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -495,8 +492,10 @@ func (client VirtualMachinesClient) DetachDataDisk(resourceGroupName string, lab var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -567,9 +566,8 @@ func (client VirtualMachinesClient) DetachDataDiskResponder(resp *http.Response) // Get get virtual machine. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. expand is specify the -// $expand query. Example: +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. expand is specify the $expand query. Example: // 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' func (client VirtualMachinesClient) Get(resourceGroupName string, labName string, name string, expand string) (result LabVirtualMachine, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) @@ -639,12 +637,10 @@ func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result La // List list virtual machines in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' -// filter is the filter to apply to the operation. top is the maximum number of -// resources to return from the operation. orderby is the ordering expression -// for the results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)' filter is the filter +// to apply to the operation. top is the maximum number of resources to return from the operation. orderby is the +// ordering expression for the results, using OData notation. func (client VirtualMachinesClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabVirtualMachine, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) if err != nil { @@ -743,10 +739,55 @@ func (client VirtualMachinesClient) ListNextResults(lastResults ResponseWithCont return } +// ListComplete gets all elements from the list without paging. +func (client VirtualMachinesClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan LabVirtualMachine, <-chan error) { + resultChan := make(chan LabVirtualMachine) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListApplicableSchedules lists all applicable schedules // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. func (client VirtualMachinesClient) ListApplicableSchedules(resourceGroupName string, labName string, name string) (result ApplicableSchedule, err error) { req, err := client.ListApplicableSchedulesPreparer(resourceGroupName, labName, name) if err != nil { @@ -810,13 +851,12 @@ func (client VirtualMachinesClient) ListApplicableSchedulesResponder(resp *http. return } -// Start start a virtual machine. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Start start a virtual machine. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. func (client VirtualMachinesClient) Start(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -824,8 +864,10 @@ func (client VirtualMachinesClient) Start(resourceGroupName string, labName stri var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -892,13 +934,12 @@ func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result return } -// Stop stop a virtual machine This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Stop stop a virtual machine This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. func (client VirtualMachinesClient) Stop(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -906,8 +947,10 @@ func (client VirtualMachinesClient) Stop(resourceGroupName string, labName strin var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -976,9 +1019,8 @@ func (client VirtualMachinesClient) StopResponder(resp *http.Response) (result a // Update modify properties of virtual machines. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual machine. labVirtualMachine is a -// virtual machine. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// machine. labVirtualMachine is a virtual machine. func (client VirtualMachinesClient) Update(resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachineFragment) (result LabVirtualMachine, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, name, labVirtualMachine) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachineschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachineschedules.go index 509d9d03d..6367b0c2c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachineschedules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualmachineschedules.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,23 +29,20 @@ type VirtualMachineSchedulesClient struct { ManagementClient } -// NewVirtualMachineSchedulesClient creates an instance of the -// VirtualMachineSchedulesClient client. +// NewVirtualMachineSchedulesClient creates an instance of the VirtualMachineSchedulesClient client. func NewVirtualMachineSchedulesClient(subscriptionID string) VirtualMachineSchedulesClient { return NewVirtualMachineSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the -// VirtualMachineSchedulesClient client. +// NewVirtualMachineSchedulesClientWithBaseURI creates an instance of the VirtualMachineSchedulesClient client. func NewVirtualMachineSchedulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualMachineSchedulesClient { return VirtualMachineSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or replace an existing schedule. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. virtualMachineName is the name of the virtual machine. name is the -// name of the schedule. schedule is a schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name +// of the virtual machine. name is the name of the schedule. schedule is a schedule. func (client VirtualMachineSchedulesClient) CreateOrUpdate(resourceGroupName string, labName string, virtualMachineName string, name string, schedule Schedule) (result Schedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: schedule, @@ -121,9 +117,8 @@ func (client VirtualMachineSchedulesClient) CreateOrUpdateResponder(resp *http.R // Delete delete schedule. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. virtualMachineName is the name of the virtual machine. name is the -// name of the schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name +// of the virtual machine. name is the name of the schedule. func (client VirtualMachineSchedulesClient) Delete(resourceGroupName string, labName string, virtualMachineName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, labName, virtualMachineName, name) if err != nil { @@ -187,14 +182,12 @@ func (client VirtualMachineSchedulesClient) DeleteResponder(resp *http.Response) return } -// Execute execute a schedule. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Execute execute a schedule. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. virtualMachineName is the name of the virtual machine. name is the -// name of the schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name +// of the virtual machine. name is the name of the schedule. func (client VirtualMachineSchedulesClient) Execute(resourceGroupName string, labName string, virtualMachineName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -202,8 +195,10 @@ func (client VirtualMachineSchedulesClient) Execute(resourceGroupName string, la var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -273,9 +268,8 @@ func (client VirtualMachineSchedulesClient) ExecuteResponder(resp *http.Response // Get get schedule. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. virtualMachineName is the name of the virtual machine. name is the -// name of the schedule. expand is specify the $expand query. Example: +// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name +// of the virtual machine. name is the name of the schedule. expand is specify the $expand query. Example: // 'properties($select=status)' func (client VirtualMachineSchedulesClient) Get(resourceGroupName string, labName string, virtualMachineName string, name string, expand string) (result Schedule, err error) { req, err := client.GetPreparer(resourceGroupName, labName, virtualMachineName, name, expand) @@ -346,12 +340,10 @@ func (client VirtualMachineSchedulesClient) GetResponder(resp *http.Response) (r // List list schedules in a given virtual machine. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. virtualMachineName is the name of the virtual machine. expand is -// specify the $expand query. Example: 'properties($select=status)' filter is -// the filter to apply to the operation. top is the maximum number of resources -// to return from the operation. orderby is the ordering expression for the -// results, using OData notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name +// of the virtual machine. expand is specify the $expand query. Example: 'properties($select=status)' filter is the +// filter to apply to the operation. top is the maximum number of resources to return from the operation. orderby is +// the ordering expression for the results, using OData notation. func (client VirtualMachineSchedulesClient) List(resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedule, err error) { req, err := client.ListPreparer(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby) if err != nil { @@ -451,11 +443,55 @@ func (client VirtualMachineSchedulesClient) ListNextResults(lastResults Response return } +// ListComplete gets all elements from the list without paging. +func (client VirtualMachineSchedulesClient) ListComplete(resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan Schedule, <-chan error) { + resultChan := make(chan Schedule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update modify properties of schedules. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. virtualMachineName is the name of the virtual machine. name is the -// name of the schedule. schedule is a schedule. +// resourceGroupName is the name of the resource group. labName is the name of the lab. virtualMachineName is the name +// of the virtual machine. name is the name of the schedule. schedule is a schedule. func (client VirtualMachineSchedulesClient) Update(resourceGroupName string, labName string, virtualMachineName string, name string, schedule ScheduleFragment) (result Schedule, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, virtualMachineName, name, schedule) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualnetworks.go index 148411c28..03ed7a2bd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/devtestlabs/virtualnetworks.go @@ -14,9 +14,8 @@ package devtestlabs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,26 +28,22 @@ type VirtualNetworksClient struct { ManagementClient } -// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient -// client. +// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient client. func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the -// VirtualNetworksClient client. +// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient { return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or replace an existing virtual network. This operation -// can take a while to complete. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be +// CreateOrUpdate create or replace an existing virtual network. This operation can take a while to complete. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be // used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual network. virtualNetwork is a -// virtual network. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// network. virtualNetwork is a virtual network. func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetwork, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) { resultChan := make(chan VirtualNetwork, 1) errChan := make(chan error, 1) @@ -56,8 +51,10 @@ func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, lab var err error var result VirtualNetwork defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -127,13 +124,12 @@ func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete delete virtual network. This operation can take a while to complete. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// Delete delete virtual network. This operation can take a while to complete. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual network. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// network. func (client VirtualNetworksClient) Delete(resourceGroupName string, labName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -141,8 +137,10 @@ func (client VirtualNetworksClient) Delete(resourceGroupName string, labName str var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -211,9 +209,8 @@ func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result // Get get virtual network. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual network. expand is specify the -// $expand query. Example: 'properties($expand=externalSubnets)' +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// network. expand is specify the $expand query. Example: 'properties($expand=externalSubnets)' func (client VirtualNetworksClient) Get(resourceGroupName string, labName string, name string, expand string) (result VirtualNetwork, err error) { req, err := client.GetPreparer(resourceGroupName, labName, name, expand) if err != nil { @@ -282,12 +279,10 @@ func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result Vi // List list virtual networks in a given lab. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. expand is specify the $expand query. Example: -// 'properties($expand=externalSubnets)' filter is the filter to apply to the -// operation. top is the maximum number of resources to return from the -// operation. orderby is the ordering expression for the results, using OData -// notation. +// resourceGroupName is the name of the resource group. labName is the name of the lab. expand is specify the $expand +// query. Example: 'properties($expand=externalSubnets)' filter is the filter to apply to the operation. top is the +// maximum number of resources to return from the operation. orderby is the ordering expression for the results, using +// OData notation. func (client VirtualNetworksClient) List(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationVirtualNetwork, err error) { req, err := client.ListPreparer(resourceGroupName, labName, expand, filter, top, orderby) if err != nil { @@ -386,11 +381,55 @@ func (client VirtualNetworksClient) ListNextResults(lastResults ResponseWithCont return } +// ListComplete gets all elements from the list without paging. +func (client VirtualNetworksClient) ListComplete(resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) { + resultChan := make(chan VirtualNetwork) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, labName, expand, filter, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update modify properties of virtual networks. // -// resourceGroupName is the name of the resource group. labName is the name of -// the lab. name is the name of the virtual network. virtualNetwork is a -// virtual network. +// resourceGroupName is the name of the resource group. labName is the name of the lab. name is the name of the virtual +// network. virtualNetwork is a virtual network. func (client VirtualNetworksClient) Update(resourceGroupName string, labName string, name string, virtualNetwork VirtualNetworkFragment) (result VirtualNetwork, err error) { req, err := client.UpdatePreparer(resourceGroupName, labName, name, virtualNetwork) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/client.go index 05ef36995..714b698b5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/client.go @@ -17,9 +17,8 @@ package dns // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/models.go index a95db4a29..a81f49b8e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/models.go @@ -14,9 +14,8 @@ package dns // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -42,8 +41,7 @@ const ( Continue HTTPStatusCode = "Continue" // Created specifies the created state for http status code. Created HTTPStatusCode = "Created" - // ExpectationFailed specifies the expectation failed state for http status - // code. + // ExpectationFailed specifies the expectation failed state for http status code. ExpectationFailed HTTPStatusCode = "ExpectationFailed" // Forbidden specifies the forbidden state for http status code. Forbidden HTTPStatusCode = "Forbidden" @@ -53,29 +51,23 @@ const ( GatewayTimeout HTTPStatusCode = "GatewayTimeout" // Gone specifies the gone state for http status code. Gone HTTPStatusCode = "Gone" - // HTTPVersionNotSupported specifies the http version not supported state - // for http status code. + // HTTPVersionNotSupported specifies the http version not supported state for http status code. HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" - // InternalServerError specifies the internal server error state for http - // status code. + // InternalServerError specifies the internal server error state for http status code. InternalServerError HTTPStatusCode = "InternalServerError" // LengthRequired specifies the length required state for http status code. LengthRequired HTTPStatusCode = "LengthRequired" - // MethodNotAllowed specifies the method not allowed state for http status - // code. + // MethodNotAllowed specifies the method not allowed state for http status code. MethodNotAllowed HTTPStatusCode = "MethodNotAllowed" // Moved specifies the moved state for http status code. Moved HTTPStatusCode = "Moved" - // MovedPermanently specifies the moved permanently state for http status - // code. + // MovedPermanently specifies the moved permanently state for http status code. MovedPermanently HTTPStatusCode = "MovedPermanently" - // MultipleChoices specifies the multiple choices state for http status - // code. + // MultipleChoices specifies the multiple choices state for http status code. MultipleChoices HTTPStatusCode = "MultipleChoices" // NoContent specifies the no content state for http status code. NoContent HTTPStatusCode = "NoContent" - // NonAuthoritativeInformation specifies the non authoritative information - // state for http status code. + // NonAuthoritativeInformation specifies the non authoritative information state for http status code. NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" // NotAcceptable specifies the not acceptable state for http status code. NotAcceptable HTTPStatusCode = "NotAcceptable" @@ -89,55 +81,43 @@ const ( OK HTTPStatusCode = "OK" // PartialContent specifies the partial content state for http status code. PartialContent HTTPStatusCode = "PartialContent" - // PaymentRequired specifies the payment required state for http status - // code. + // PaymentRequired specifies the payment required state for http status code. PaymentRequired HTTPStatusCode = "PaymentRequired" - // PreconditionFailed specifies the precondition failed state for http - // status code. + // PreconditionFailed specifies the precondition failed state for http status code. PreconditionFailed HTTPStatusCode = "PreconditionFailed" - // ProxyAuthenticationRequired specifies the proxy authentication required - // state for http status code. + // ProxyAuthenticationRequired specifies the proxy authentication required state for http status code. ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" // Redirect specifies the redirect state for http status code. Redirect HTTPStatusCode = "Redirect" - // RedirectKeepVerb specifies the redirect keep verb state for http status - // code. + // RedirectKeepVerb specifies the redirect keep verb state for http status code. RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" // RedirectMethod specifies the redirect method state for http status code. RedirectMethod HTTPStatusCode = "RedirectMethod" - // RequestedRangeNotSatisfiable specifies the requested range not - // satisfiable state for http status code. + // RequestedRangeNotSatisfiable specifies the requested range not satisfiable state for http status code. RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" - // RequestEntityTooLarge specifies the request entity too large state for - // http status code. + // RequestEntityTooLarge specifies the request entity too large state for http status code. RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" // RequestTimeout specifies the request timeout state for http status code. RequestTimeout HTTPStatusCode = "RequestTimeout" - // RequestURITooLong specifies the request uri too long state for http - // status code. + // RequestURITooLong specifies the request uri too long state for http status code. RequestURITooLong HTTPStatusCode = "RequestUriTooLong" // ResetContent specifies the reset content state for http status code. ResetContent HTTPStatusCode = "ResetContent" // SeeOther specifies the see other state for http status code. SeeOther HTTPStatusCode = "SeeOther" - // ServiceUnavailable specifies the service unavailable state for http - // status code. + // ServiceUnavailable specifies the service unavailable state for http status code. ServiceUnavailable HTTPStatusCode = "ServiceUnavailable" - // SwitchingProtocols specifies the switching protocols state for http - // status code. + // SwitchingProtocols specifies the switching protocols state for http status code. SwitchingProtocols HTTPStatusCode = "SwitchingProtocols" - // TemporaryRedirect specifies the temporary redirect state for http status - // code. + // TemporaryRedirect specifies the temporary redirect state for http status code. TemporaryRedirect HTTPStatusCode = "TemporaryRedirect" // Unauthorized specifies the unauthorized state for http status code. Unauthorized HTTPStatusCode = "Unauthorized" - // UnsupportedMediaType specifies the unsupported media type state for http - // status code. + // UnsupportedMediaType specifies the unsupported media type state for http status code. UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" // Unused specifies the unused state for http status code. Unused HTTPStatusCode = "Unused" - // UpgradeRequired specifies the upgrade required state for http status - // code. + // UpgradeRequired specifies the upgrade required state for http status code. UpgradeRequired HTTPStatusCode = "UpgradeRequired" // UseProxy specifies the use proxy state for http status code. UseProxy HTTPStatusCode = "UseProxy" @@ -223,8 +203,7 @@ type PtrRecord struct { Ptrdname *string `json:"ptrdname,omitempty"` } -// RecordSet is describes a DNS record set (a collection of DNS records with -// the same name and type). +// RecordSet is describes a DNS record set (a collection of DNS records with the same name and type). type RecordSet struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -253,8 +232,7 @@ func (client RecordSetListResult) RecordSetListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// RecordSetProperties is represents the properties of the records in the -// record set. +// RecordSetProperties is represents the properties of the records in the record set. type RecordSetProperties struct { Metadata *map[string]*string `json:"metadata,omitempty"` TTL *int64 `json:"TTL,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/recordsets.go index 8d3992dd6..8d59929f7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/recordsets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/recordsets.go @@ -14,9 +14,8 @@ package dns // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,25 +33,20 @@ func NewRecordSetsClient(subscriptionID string) RecordSetsClient { return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient -// client. +// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client. func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a record set within a DNS zone. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). relativeRecordSetName is the name -// of the record set, relative to the name of the zone. recordType is the type -// of DNS record in this record set. Record sets of type SOA can be updated but -// not created (they are created when the DNS zone is created). parameters is -// parameters supplied to the CreateOrUpdate operation. ifMatch is the etag of -// the record set. Omit this value to always overwrite the current record set. -// Specify the last-seen etag value to prevent accidentally overwritting any -// concurrent changes. ifNoneMatch is set to '*' to allow a new record set to -// be created, but to prevent updating an existing record set. Other values -// will be ignored. +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). relativeRecordSetName is the name of the record set, relative to the name of the zone. recordType is the type +// of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the +// DNS zone is created). parameters is parameters supplied to the CreateOrUpdate operation. ifMatch is the etag of the +// record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent +// accidentally overwritting any concurrent changes. ifNoneMatch is set to '*' to allow a new record set to be created, +// but to prevent updating an existing record set. Other values will be ignored. func (client RecordSetsClient) CreateOrUpdate(resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string, ifNoneMatch string) (result RecordSet, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch, ifNoneMatch) if err != nil { @@ -127,17 +121,13 @@ func (client RecordSetsClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// Delete deletes a record set from a DNS zone. This operation cannot be -// undone. +// Delete deletes a record set from a DNS zone. This operation cannot be undone. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). relativeRecordSetName is the name -// of the record set, relative to the name of the zone. recordType is the type -// of DNS record in this record set. Record sets of type SOA cannot be deleted -// (they are deleted when the DNS zone is deleted). ifMatch is the etag of the -// record set. Omit this value to always delete the current record set. Specify -// the last-seen etag value to prevent accidentally deleting any concurrent -// changes. +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). relativeRecordSetName is the name of the record set, relative to the name of the zone. recordType is the type +// of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is +// deleted). ifMatch is the etag of the record set. Omit this value to always delete the current record set. Specify +// the last-seen etag value to prevent accidentally deleting any concurrent changes. func (client RecordSetsClient) Delete(resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, ifMatch string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, zoneName, relativeRecordSetName, recordType, ifMatch) if err != nil { @@ -207,9 +197,8 @@ func (client RecordSetsClient) DeleteResponder(resp *http.Response) (result auto // Get gets a record set. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). relativeRecordSetName is the name -// of the record set, relative to the name of the zone. recordType is the type +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). relativeRecordSetName is the name of the record set, relative to the name of the zone. recordType is the type // of DNS record in this record set. func (client RecordSetsClient) Get(resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType) (result RecordSet, err error) { req, err := client.GetPreparer(resourceGroupName, zoneName, relativeRecordSetName, recordType) @@ -277,11 +266,13 @@ func (client RecordSetsClient) GetResponder(resp *http.Response) (result RecordS // ListByDNSZone lists all record sets in a DNS zone. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). top is the maximum number of -// record sets to return. If not specified, returns up to 100 record sets. -func (client RecordSetsClient) ListByDNSZone(resourceGroupName string, zoneName string, top *int32) (result RecordSetListResult, err error) { - req, err := client.ListByDNSZonePreparer(resourceGroupName, zoneName, top) +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). top is the maximum number of record sets to return. If not specified, returns up to 100 record sets. +// recordsetnamesuffix is the suffix label of the record set name that has to be used to filter the record set +// enumerations. If this parameter is specified, Enumeration will return only records that end with +// . +func (client RecordSetsClient) ListByDNSZone(resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResult, err error) { + req, err := client.ListByDNSZonePreparer(resourceGroupName, zoneName, top, recordsetnamesuffix) if err != nil { err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", nil, "Failure preparing request") return @@ -303,7 +294,7 @@ func (client RecordSetsClient) ListByDNSZone(resourceGroupName string, zoneName } // ListByDNSZonePreparer prepares the ListByDNSZone request. -func (client RecordSetsClient) ListByDNSZonePreparer(resourceGroupName string, zoneName string, top *int32) (*http.Request, error) { +func (client RecordSetsClient) ListByDNSZonePreparer(resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -317,6 +308,9 @@ func (client RecordSetsClient) ListByDNSZonePreparer(resourceGroupName string, z if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) } + if len(recordsetnamesuffix) > 0 { + queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -369,14 +363,60 @@ func (client RecordSetsClient) ListByDNSZoneNextResults(lastResults RecordSetLis return } +// ListByDNSZoneComplete gets all elements from the list without paging. +func (client RecordSetsClient) ListByDNSZoneComplete(resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string, cancel <-chan struct{}) (<-chan RecordSet, <-chan error) { + resultChan := make(chan RecordSet) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByDNSZone(resourceGroupName, zoneName, top, recordsetnamesuffix) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByDNSZoneNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByType lists the record sets of a specified type in a DNS zone. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). recordType is the type of record -// sets to enumerate. top is the maximum number of record sets to return. If -// not specified, returns up to 100 record sets. -func (client RecordSetsClient) ListByType(resourceGroupName string, zoneName string, recordType RecordType, top *int32) (result RecordSetListResult, err error) { - req, err := client.ListByTypePreparer(resourceGroupName, zoneName, recordType, top) +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). recordType is the type of record sets to enumerate. top is the maximum number of record sets to return. If not +// specified, returns up to 100 record sets. recordsetnamesuffix is the suffix label of the record set name that has to +// be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records +// that end with . +func (client RecordSetsClient) ListByType(resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResult, err error) { + req, err := client.ListByTypePreparer(resourceGroupName, zoneName, recordType, top, recordsetnamesuffix) if err != nil { err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", nil, "Failure preparing request") return @@ -398,7 +438,7 @@ func (client RecordSetsClient) ListByType(resourceGroupName string, zoneName str } // ListByTypePreparer prepares the ListByType request. -func (client RecordSetsClient) ListByTypePreparer(resourceGroupName string, zoneName string, recordType RecordType, top *int32) (*http.Request, error) { +func (client RecordSetsClient) ListByTypePreparer(resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (*http.Request, error) { pathParameters := map[string]interface{}{ "recordType": autorest.Encode("path", recordType), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -413,6 +453,9 @@ func (client RecordSetsClient) ListByTypePreparer(resourceGroupName string, zone if top != nil { queryParameters["$top"] = autorest.Encode("query", *top) } + if len(recordsetnamesuffix) > 0 { + queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -465,14 +508,57 @@ func (client RecordSetsClient) ListByTypeNextResults(lastResults RecordSetListRe return } +// ListByTypeComplete gets all elements from the list without paging. +func (client RecordSetsClient) ListByTypeComplete(resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string, cancel <-chan struct{}) (<-chan RecordSet, <-chan error) { + resultChan := make(chan RecordSet) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByType(resourceGroupName, zoneName, recordType, top, recordsetnamesuffix) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByTypeNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates a record set within a DNS zone. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). relativeRecordSetName is the name -// of the record set, relative to the name of the zone. recordType is the type -// of DNS record in this record set. parameters is parameters supplied to the -// Update operation. ifMatch is the etag of the record set. Omit this value to -// always overwrite the current record set. Specify the last-seen etag value to +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). relativeRecordSetName is the name of the record set, relative to the name of the zone. recordType is the type +// of DNS record in this record set. parameters is parameters supplied to the Update operation. ifMatch is the etag of +// the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to // prevent accidentally overwritting concurrent changes. func (client RecordSetsClient) Update(resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string) (result RecordSet, err error) { req, err := client.UpdatePreparer(resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go index 97933554a..d5ade9afd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/version.go @@ -14,15 +14,15 @@ package dns // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-dns/2016-04-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-dns/2016-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/zones.go index 31ad0ba36..33b230b03 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/zones.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/dns/zones.go @@ -14,9 +14,8 @@ package dns // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -39,16 +38,13 @@ func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClien return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a DNS zone. Does not modify DNS records -// within the zone. +// CreateOrUpdate creates or updates a DNS zone. Does not modify DNS records within the zone. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). parameters is parameters supplied -// to the CreateOrUpdate operation. ifMatch is the etag of the DNS zone. Omit -// this value to always overwrite the current zone. Specify the last-seen etag -// value to prevent accidentally overwritting any concurrent changes. -// ifNoneMatch is set to '*' to allow a new DNS zone to be created, but to -// prevent updating an existing zone. Other values will be ignored. +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). parameters is parameters supplied to the CreateOrUpdate operation. ifMatch is the etag of the DNS zone. Omit +// this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally +// overwritting any concurrent changes. ifNoneMatch is set to '*' to allow a new DNS zone to be created, but to prevent +// updating an existing zone. Other values will be ignored. func (client ZonesClient) CreateOrUpdate(resourceGroupName string, zoneName string, parameters Zone, ifMatch string, ifNoneMatch string) (result Zone, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, zoneName, parameters, ifMatch, ifNoneMatch) if err != nil { @@ -121,17 +117,13 @@ func (client ZonesClient) CreateOrUpdateResponder(resp *http.Response) (result Z return } -// Delete deletes a DNS zone. WARNING: All DNS records in the zone will also be -// deleted. This operation cannot be undone. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be +// undone. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). ifMatch is the etag of the DNS -// zone. Omit this value to always delete the current zone. Specify the -// last-seen etag value to prevent accidentally deleting any concurrent -// changes. +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). ifMatch is the etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen +// etag value to prevent accidentally deleting any concurrent changes. func (client ZonesClient) Delete(resourceGroupName string, zoneName string, ifMatch string, cancel <-chan struct{}) (<-chan ZoneDeleteResult, <-chan error) { resultChan := make(chan ZoneDeleteResult, 1) errChan := make(chan error, 1) @@ -139,8 +131,10 @@ func (client ZonesClient) Delete(resourceGroupName string, zoneName string, ifMa var err error var result ZoneDeleteResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -211,11 +205,10 @@ func (client ZonesClient) DeleteResponder(resp *http.Response) (result ZoneDelet return } -// Get gets a DNS zone. Retrieves the zone properties, but not the record sets -// within the zone. +// Get gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. // -// resourceGroupName is the name of the resource group. zoneName is the name of -// the DNS zone (without a terminating dot). +// resourceGroupName is the name of the resource group. zoneName is the name of the DNS zone (without a terminating +// dot). func (client ZonesClient) Get(resourceGroupName string, zoneName string) (result Zone, err error) { req, err := client.GetPreparer(resourceGroupName, zoneName) if err != nil { @@ -280,8 +273,7 @@ func (client ZonesClient) GetResponder(resp *http.Response) (result Zone, err er // List lists the DNS zones in all resource groups in a subscription. // -// top is the maximum number of DNS zones to return. If not specified, returns -// up to 100 zones. +// top is the maximum number of DNS zones to return. If not specified, returns up to 100 zones. func (client ZonesClient) List(top *int32) (result ZoneListResult, err error) { req, err := client.ListPreparer(top) if err != nil { @@ -369,11 +361,55 @@ func (client ZonesClient) ListNextResults(lastResults ZoneListResult) (result Zo return } +// ListComplete gets all elements from the list without paging. +func (client ZonesClient) ListComplete(top *int32, cancel <-chan struct{}) (<-chan Zone, <-chan error) { + resultChan := make(chan Zone) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup lists the DNS zones within a resource group. // -// resourceGroupName is the name of the resource group. top is the maximum -// number of record sets to return. If not specified, returns up to 100 record -// sets. +// resourceGroupName is the name of the resource group. top is the maximum number of record sets to return. If not +// specified, returns up to 100 record sets. func (client ZonesClient) ListByResourceGroup(resourceGroupName string, top *int32) (result ZoneListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, top) if err != nil { @@ -461,3 +497,48 @@ func (client ZonesClient) ListByResourceGroupNextResults(lastResults ZoneListRes return } + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ZonesClient) ListByResourceGroupComplete(resourceGroupName string, top *int32, cancel <-chan struct{}) (<-chan Zone, <-chan error) { + resultChan := make(chan Zone) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go index 52f4456ea..82fa46570 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/client.go @@ -1,4 +1,4 @@ -// Package eventgrid implements the Azure ARM Eventgrid service API version 2017-06-15-preview. +// Package eventgrid implements the Azure ARM Eventgrid service API version 2017-09-15-preview. // // Azure EventGrid Management Client package eventgrid @@ -17,7 +17,7 @@ package eventgrid // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go index 994b6048a..5f7152014 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/eventsubscriptions.go @@ -14,7 +14,7 @@ package eventgrid // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -95,7 +95,7 @@ func (client EventSubscriptionsClient) CreatePreparer(scope string, eventSubscri "scope": scope, } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,7 +184,7 @@ func (client EventSubscriptionsClient) DeletePreparer(scope string, eventSubscri "scope": scope, } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,7 +256,7 @@ func (client EventSubscriptionsClient) GetPreparer(scope string, eventSubscripti "scope": scope, } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -327,7 +327,7 @@ func (client EventSubscriptionsClient) GetFullURLPreparer(scope string, eventSub "scope": scope, } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -395,7 +395,7 @@ func (client EventSubscriptionsClient) ListByResourcePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -459,7 +459,7 @@ func (client EventSubscriptionsClient) ListGlobalByResourceGroupPreparer(resourc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -526,7 +526,7 @@ func (client EventSubscriptionsClient) ListGlobalByResourceGroupForTopicTypePrep "topicTypeName": autorest.Encode("path", topicTypeName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -587,7 +587,7 @@ func (client EventSubscriptionsClient) ListGlobalBySubscriptionPreparer() (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -652,7 +652,7 @@ func (client EventSubscriptionsClient) ListGlobalBySubscriptionForTopicTypePrepa "topicTypeName": autorest.Encode("path", topicTypeName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -718,7 +718,7 @@ func (client EventSubscriptionsClient) ListRegionalByResourceGroupPreparer(resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -786,7 +786,7 @@ func (client EventSubscriptionsClient) ListRegionalByResourceGroupForTopicTypePr "topicTypeName": autorest.Encode("path", topicTypeName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -850,7 +850,7 @@ func (client EventSubscriptionsClient) ListRegionalBySubscriptionPreparer(locati "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -916,7 +916,7 @@ func (client EventSubscriptionsClient) ListRegionalBySubscriptionForTopicTypePre "topicTypeName": autorest.Encode("path", topicTypeName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1003,7 +1003,7 @@ func (client EventSubscriptionsClient) UpdatePreparer(scope string, eventSubscri "scope": scope, } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go index efcf8c3ad..9ca6d16b7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/models.go @@ -14,10 +14,12 @@ package eventgrid // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" ) @@ -25,8 +27,10 @@ import ( type EndpointType string const ( - // WebHook specifies the web hook state for endpoint type. - WebHook EndpointType = "WebHook" + // EndpointTypeEventHub specifies the endpoint type event hub state for endpoint type. + EndpointTypeEventHub EndpointType = "EventHub" + // EndpointTypeWebHook specifies the endpoint type web hook state for endpoint type. + EndpointTypeWebHook EndpointType = "WebHook" ) // EventSubscriptionProvisioningState enumerates the values for event subscription provisioning state. @@ -73,22 +77,17 @@ const ( type TopicProvisioningState string const ( - // TopicProvisioningStateCanceled specifies the topic provisioning state canceled state for topic provisioning - // state. + // TopicProvisioningStateCanceled specifies the topic provisioning state canceled state for topic provisioning state. TopicProvisioningStateCanceled TopicProvisioningState = "Canceled" - // TopicProvisioningStateCreating specifies the topic provisioning state creating state for topic provisioning - // state. + // TopicProvisioningStateCreating specifies the topic provisioning state creating state for topic provisioning state. TopicProvisioningStateCreating TopicProvisioningState = "Creating" - // TopicProvisioningStateDeleting specifies the topic provisioning state deleting state for topic provisioning - // state. + // TopicProvisioningStateDeleting specifies the topic provisioning state deleting state for topic provisioning state. TopicProvisioningStateDeleting TopicProvisioningState = "Deleting" // TopicProvisioningStateFailed specifies the topic provisioning state failed state for topic provisioning state. TopicProvisioningStateFailed TopicProvisioningState = "Failed" - // TopicProvisioningStateSucceeded specifies the topic provisioning state succeeded state for topic provisioning - // state. + // TopicProvisioningStateSucceeded specifies the topic provisioning state succeeded state for topic provisioning state. TopicProvisioningStateSucceeded TopicProvisioningState = "Succeeded" - // TopicProvisioningStateUpdating specifies the topic provisioning state updating state for topic provisioning - // state. + // TopicProvisioningStateUpdating specifies the topic provisioning state updating state for topic provisioning state. TopicProvisioningStateUpdating TopicProvisioningState = "Updating" ) @@ -116,6 +115,38 @@ const ( TopicTypeProvisioningStateUpdating TopicTypeProvisioningState = "Updating" ) +// EventHubEventSubscriptionDestination is information about the event hub destination for an event subscription +type EventHubEventSubscriptionDestination struct { + EndpointType EndpointType `json:"endpointType,omitempty"` + *EventHubEventSubscriptionDestinationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for EventHubEventSubscriptionDestination. +func (ehesd EventHubEventSubscriptionDestination) MarshalJSON() ([]byte, error) { + ehesd.EndpointType = EndpointTypeEventHub + type Alias EventHubEventSubscriptionDestination + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ehesd), + }) +} + +// AsWebHookEventSubscriptionDestination is the EventSubscriptionDestination implementation for EventHubEventSubscriptionDestination. +func (ehesd EventHubEventSubscriptionDestination) AsWebHookEventSubscriptionDestination() (*WebHookEventSubscriptionDestination, bool) { + return nil, false +} + +// AsEventHubEventSubscriptionDestination is the EventSubscriptionDestination implementation for EventHubEventSubscriptionDestination. +func (ehesd EventHubEventSubscriptionDestination) AsEventHubEventSubscriptionDestination() (*EventHubEventSubscriptionDestination, bool) { + return &ehesd, true +} + +// EventHubEventSubscriptionDestinationProperties is the properties for a event hub destination. +type EventHubEventSubscriptionDestinationProperties struct { + ResourceID *string `json:"resourceId,omitempty"` +} + // EventSubscription is event Subscription type EventSubscription struct { autorest.Response `json:"-"` @@ -126,15 +157,48 @@ type EventSubscription struct { } // EventSubscriptionDestination is information about the destination for an event subscription -type EventSubscriptionDestination struct { - EndpointType EndpointType `json:"endpointType,omitempty"` - *EventSubscriptionDestinationProperties `json:"properties,omitempty"` +type EventSubscriptionDestination interface { + AsWebHookEventSubscriptionDestination() (*WebHookEventSubscriptionDestination, bool) + AsEventHubEventSubscriptionDestination() (*EventHubEventSubscriptionDestination, bool) } -// EventSubscriptionDestinationProperties is properties of the event subscription destination -type EventSubscriptionDestinationProperties struct { - EndpointURL *string `json:"endpointUrl,omitempty"` - EndpointBaseURL *string `json:"endpointBaseUrl,omitempty"` +func unmarshalEventSubscriptionDestination(body []byte) (EventSubscriptionDestination, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["endpointType"] { + case string(EndpointTypeWebHook): + var whesd WebHookEventSubscriptionDestination + err := json.Unmarshal(body, &whesd) + return whesd, err + case string(EndpointTypeEventHub): + var ehesd EventHubEventSubscriptionDestination + err := json.Unmarshal(body, &ehesd) + return ehesd, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalEventSubscriptionDestinationArray(body []byte) ([]EventSubscriptionDestination, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + esdArray := make([]EventSubscriptionDestination, len(rawMessages)) + + for index, rawMessage := range rawMessages { + esd, err := unmarshalEventSubscriptionDestination(*rawMessage) + if err != nil { + return nil, err + } + esdArray[index] = esd + } + return esdArray, nil } // EventSubscriptionFilter is filter for the Event Subscription @@ -155,11 +219,72 @@ type EventSubscriptionFullURL struct { type EventSubscriptionProperties struct { Topic *string `json:"topic,omitempty"` ProvisioningState EventSubscriptionProvisioningState `json:"provisioningState,omitempty"` - Destination *EventSubscriptionDestination `json:"destination,omitempty"` + Destination EventSubscriptionDestination `json:"destination,omitempty"` Filter *EventSubscriptionFilter `json:"filter,omitempty"` Labels *[]string `json:"labels,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for EventSubscriptionProperties struct. +func (esp *EventSubscriptionProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["topic"] + if v != nil { + var topic string + err = json.Unmarshal(*m["topic"], &topic) + if err != nil { + return err + } + esp.Topic = &topic + } + + v = m["provisioningState"] + if v != nil { + var provisioningState EventSubscriptionProvisioningState + err = json.Unmarshal(*m["provisioningState"], &provisioningState) + if err != nil { + return err + } + esp.ProvisioningState = provisioningState + } + + v = m["destination"] + if v != nil { + destination, err := unmarshalEventSubscriptionDestination(*m["destination"]) + if err != nil { + return err + } + esp.Destination = destination + } + + v = m["filter"] + if v != nil { + var filter EventSubscriptionFilter + err = json.Unmarshal(*m["filter"], &filter) + if err != nil { + return err + } + esp.Filter = &filter + } + + v = m["labels"] + if v != nil { + var labels []string + err = json.Unmarshal(*m["labels"], &labels) + if err != nil { + return err + } + esp.Labels = &labels + } + + return nil +} + // EventSubscriptionsListResult is result of the List EventSubscriptions operation type EventSubscriptionsListResult struct { autorest.Response `json:"-"` @@ -168,9 +293,50 @@ type EventSubscriptionsListResult struct { // EventSubscriptionUpdateParameters is properties of the Event Subscription update type EventSubscriptionUpdateParameters struct { - Destination *EventSubscriptionDestination `json:"destination,omitempty"` - Filter *EventSubscriptionFilter `json:"filter,omitempty"` - Labels *[]string `json:"labels,omitempty"` + Destination EventSubscriptionDestination `json:"destination,omitempty"` + Filter *EventSubscriptionFilter `json:"filter,omitempty"` + Labels *[]string `json:"labels,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for EventSubscriptionUpdateParameters struct. +func (esup *EventSubscriptionUpdateParameters) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["destination"] + if v != nil { + destination, err := unmarshalEventSubscriptionDestination(*m["destination"]) + if err != nil { + return err + } + esup.Destination = destination + } + + v = m["filter"] + if v != nil { + var filter EventSubscriptionFilter + err = json.Unmarshal(*m["filter"], &filter) + if err != nil { + return err + } + esup.Filter = &filter + } + + v = m["labels"] + if v != nil { + var labels []string + err = json.Unmarshal(*m["labels"], &labels) + if err != nil { + return err + } + esup.Labels = &labels + } + + return nil } // EventType is event Type for a subject under a topic @@ -274,6 +440,7 @@ type TopicTypeProperties struct { Description *string `json:"description,omitempty"` ResourceRegionType ResourceRegionType `json:"resourceRegionType,omitempty"` ProvisioningState TopicTypeProvisioningState `json:"provisioningState,omitempty"` + SupportedLocations *[]string `json:"supportedLocations,omitempty"` } // TopicTypesListResult is result of the List Topic Types operation @@ -290,3 +457,37 @@ type TrackedResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` } + +// WebHookEventSubscriptionDestination is information about the webhook destination for an event subscription +type WebHookEventSubscriptionDestination struct { + EndpointType EndpointType `json:"endpointType,omitempty"` + *WebHookEventSubscriptionDestinationProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for WebHookEventSubscriptionDestination. +func (whesd WebHookEventSubscriptionDestination) MarshalJSON() ([]byte, error) { + whesd.EndpointType = EndpointTypeWebHook + type Alias WebHookEventSubscriptionDestination + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(whesd), + }) +} + +// AsWebHookEventSubscriptionDestination is the EventSubscriptionDestination implementation for WebHookEventSubscriptionDestination. +func (whesd WebHookEventSubscriptionDestination) AsWebHookEventSubscriptionDestination() (*WebHookEventSubscriptionDestination, bool) { + return &whesd, true +} + +// AsEventHubEventSubscriptionDestination is the EventSubscriptionDestination implementation for WebHookEventSubscriptionDestination. +func (whesd WebHookEventSubscriptionDestination) AsEventHubEventSubscriptionDestination() (*EventHubEventSubscriptionDestination, bool) { + return nil, false +} + +// WebHookEventSubscriptionDestinationProperties is information about the webhook destination properties for an event +// subscription +type WebHookEventSubscriptionDestinationProperties struct { + EndpointURL *string `json:"endpointUrl,omitempty"` + EndpointBaseURL *string `json:"endpointBaseUrl,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go index 8c89d3eb0..915992d07 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/operations.go @@ -14,7 +14,7 @@ package eventgrid // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -63,7 +63,7 @@ func (client OperationsClient) List() (result OperationsListResult, err error) { // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go index e094c867a..8e3920bc7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topics.go @@ -14,7 +14,7 @@ package eventgrid // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -88,7 +88,7 @@ func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, topi "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -171,7 +171,7 @@ func (client TopicsClient) DeletePreparer(resourceGroupName string, topicName st "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -237,7 +237,7 @@ func (client TopicsClient) GetPreparer(resourceGroupName string, topicName strin "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -301,7 +301,7 @@ func (client TopicsClient) ListByResourceGroupPreparer(resourceGroupName string) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -362,7 +362,7 @@ func (client TopicsClient) ListBySubscriptionPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -430,7 +430,7 @@ func (client TopicsClient) ListEventTypesPreparer(resourceGroupName string, prov "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -495,7 +495,7 @@ func (client TopicsClient) ListSharedAccessKeysPreparer(resourceGroupName string "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -567,7 +567,7 @@ func (client TopicsClient) RegenerateKeyPreparer(resourceGroupName string, topic "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go index 8986cc735..3f4e39990 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/topictypes.go @@ -14,7 +14,7 @@ package eventgrid // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -69,7 +69,7 @@ func (client TopicTypesClient) GetPreparer(topicTypeName string) (*http.Request, "topicTypeName": autorest.Encode("path", topicTypeName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -126,7 +126,7 @@ func (client TopicTypesClient) List() (result TopicTypesListResult, err error) { // ListPreparer prepares the List request. func (client TopicTypesClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -189,7 +189,7 @@ func (client TopicTypesClient) ListEventTypesPreparer(topicTypeName string) (*ht "topicTypeName": autorest.Encode("path", topicTypeName), } - const APIVersion = "2017-06-15-preview" + const APIVersion = "2017-09-15-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go index 14770d16d..741dabd27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventgrid/version.go @@ -14,15 +14,15 @@ package eventgrid // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-eventgrid/2017-06-15-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-eventgrid/2017-09-15-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go index 204ad6729..a9ae459d9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/client.go @@ -1,5 +1,4 @@ -// Package eventhub implements the Azure ARM Eventhub service API version -// 2015-08-01. +// Package eventhub implements the Azure ARM Eventhub service API version 2017-04-01. // // Azure Event Hubs client package eventhub @@ -18,9 +17,8 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go index e9a194ba9..eebbc20c9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/consumergroups.go @@ -14,9 +14,8 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,26 +29,22 @@ type ConsumerGroupsClient struct { ManagementClient } -// NewConsumerGroupsClient creates an instance of the ConsumerGroupsClient -// client. +// NewConsumerGroupsClient creates an instance of the ConsumerGroupsClient client. func NewConsumerGroupsClient(subscriptionID string) ConsumerGroupsClient { return NewConsumerGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConsumerGroupsClientWithBaseURI creates an instance of the -// ConsumerGroupsClient client. +// NewConsumerGroupsClientWithBaseURI creates an instance of the ConsumerGroupsClient client. func NewConsumerGroupsClientWithBaseURI(baseURI string, subscriptionID string) ConsumerGroupsClient { return ConsumerGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates an Event Hubs consumer group as a nested -// resource within a Namespace. +// CreateOrUpdate creates or updates an Event Hubs consumer group as a nested resource within a Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name consumerGroupName is the consumer group name parameters is -// parameters supplied to create or update a consumer group resource. -func (client ConsumerGroupsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, parameters ConsumerGroupCreateOrUpdateParameters) (result ConsumerGroupResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name consumerGroupName is the consumer group name parameters is parameters supplied to +// create or update a consumer group resource. +func (client ConsumerGroupsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, parameters ConsumerGroup) (result ConsumerGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -58,13 +53,9 @@ func (client ConsumerGroupsClient) CreateOrUpdate(resourceGroupName string, name Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, - Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.ConsumerGroupsClient", "CreateOrUpdate") } @@ -90,7 +81,7 @@ func (client ConsumerGroupsClient) CreateOrUpdate(resourceGroupName string, name } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ConsumerGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, parameters ConsumerGroupCreateOrUpdateParameters) (*http.Request, error) { +func (client ConsumerGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, parameters ConsumerGroup) (*http.Request, error) { pathParameters := map[string]interface{}{ "consumerGroupName": autorest.Encode("path", consumerGroupName), "eventHubName": autorest.Encode("path", eventHubName), @@ -99,7 +90,7 @@ func (client ConsumerGroupsClient) CreateOrUpdatePreparer(resourceGroupName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -122,7 +113,7 @@ func (client ConsumerGroupsClient) CreateOrUpdateSender(req *http.Request) (*htt // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client ConsumerGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ConsumerGroupResource, err error) { +func (client ConsumerGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ConsumerGroup, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -133,12 +124,10 @@ func (client ConsumerGroupsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes a consumer group from the specified Event Hub and resource -// group. +// Delete deletes a consumer group from the specified Event Hub and resource group. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name consumerGroupName is the consumer group name +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name consumerGroupName is the consumer group name func (client ConsumerGroupsClient) Delete(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -148,11 +137,9 @@ func (client ConsumerGroupsClient) Delete(resourceGroupName string, namespaceNam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, - Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.ConsumerGroupsClient", "Delete") } @@ -187,7 +174,7 @@ func (client ConsumerGroupsClient) DeletePreparer(resourceGroupName string, name "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -220,10 +207,9 @@ func (client ConsumerGroupsClient) DeleteResponder(resp *http.Response) (result // Get gets a description for the specified consumer group. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name consumerGroupName is the consumer group name -func (client ConsumerGroupsClient) Get(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result ConsumerGroupResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name consumerGroupName is the consumer group name +func (client ConsumerGroupsClient) Get(resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result ConsumerGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -232,11 +218,9 @@ func (client ConsumerGroupsClient) Get(resourceGroupName string, namespaceName s Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: consumerGroupName, - Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "consumerGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.ConsumerGroupsClient", "Get") } @@ -271,7 +255,7 @@ func (client ConsumerGroupsClient) GetPreparer(resourceGroupName string, namespa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -292,7 +276,7 @@ func (client ConsumerGroupsClient) GetSender(req *http.Request) (*http.Response, // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client ConsumerGroupsClient) GetResponder(resp *http.Response) (result ConsumerGroupResource, err error) { +func (client ConsumerGroupsClient) GetResponder(resp *http.Response) (result ConsumerGroup, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -303,13 +287,12 @@ func (client ConsumerGroupsClient) GetResponder(resp *http.Response) (result Con return } -// ListAll gets all the consumer groups in a Namespace. An empty feed is -// returned if no consumer group exists in the Namespace. +// ListByEventHub gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in +// the Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name -func (client ConsumerGroupsClient) ListAll(resourceGroupName string, namespaceName string, eventHubName string) (result ConsumerGroupListResult, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name +func (client ConsumerGroupsClient) ListByEventHub(resourceGroupName string, namespaceName string, eventHubName string) (result ConsumerGroupListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -318,34 +301,33 @@ func (client ConsumerGroupsClient) ListAll(resourceGroupName string, namespaceNa Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "eventhub.ConsumerGroupsClient", "ListAll") + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub") } - req, err := client.ListAllPreparer(resourceGroupName, namespaceName, eventHubName) + req, err := client.ListByEventHubPreparer(resourceGroupName, namespaceName, eventHubName) if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListAll", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub", nil, "Failure preparing request") return } - resp, err := client.ListAllSender(req) + resp, err := client.ListByEventHubSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListAll", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub", resp, "Failure sending request") return } - result, err = client.ListAllResponder(resp) + result, err = client.ListByEventHubResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListAll", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub", resp, "Failure responding to request") } return } -// ListAllPreparer prepares the ListAll request. -func (client ConsumerGroupsClient) ListAllPreparer(resourceGroupName string, namespaceName string, eventHubName string) (*http.Request, error) { +// ListByEventHubPreparer prepares the ListByEventHub request. +func (client ConsumerGroupsClient) ListByEventHubPreparer(resourceGroupName string, namespaceName string, eventHubName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "eventHubName": autorest.Encode("path", eventHubName), "namespaceName": autorest.Encode("path", namespaceName), @@ -353,7 +335,7 @@ func (client ConsumerGroupsClient) ListAllPreparer(resourceGroupName string, nam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -366,15 +348,15 @@ func (client ConsumerGroupsClient) ListAllPreparer(resourceGroupName string, nam return preparer.Prepare(&http.Request{}) } -// ListAllSender sends the ListAll request. The method will close the +// ListByEventHubSender sends the ListByEventHub request. The method will close the // http.Response Body if it receives an error. -func (client ConsumerGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { +func (client ConsumerGroupsClient) ListByEventHubSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListAllResponder handles the response to the ListAll request. The method always +// ListByEventHubResponder handles the response to the ListByEventHub request. The method always // closes the http.Response Body. -func (client ConsumerGroupsClient) ListAllResponder(resp *http.Response) (result ConsumerGroupListResult, err error) { +func (client ConsumerGroupsClient) ListByEventHubResponder(resp *http.Response) (result ConsumerGroupListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -385,26 +367,71 @@ func (client ConsumerGroupsClient) ListAllResponder(resp *http.Response) (result return } -// ListAllNextResults retrieves the next set of results, if any. -func (client ConsumerGroupsClient) ListAllNextResults(lastResults ConsumerGroupListResult) (result ConsumerGroupListResult, err error) { +// ListByEventHubNextResults retrieves the next set of results, if any. +func (client ConsumerGroupsClient) ListByEventHubNextResults(lastResults ConsumerGroupListResult) (result ConsumerGroupListResult, err error) { req, err := lastResults.ConsumerGroupListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListAll", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListAllSender(req) + resp, err := client.ListByEventHubSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListAll", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub", resp, "Failure sending next results request") } - result, err = client.ListAllResponder(resp) + result, err = client.ListByEventHubResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListAll", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "ListByEventHub", resp, "Failure responding to next results request") } return } + +// ListByEventHubComplete gets all elements from the list without paging. +func (client ConsumerGroupsClient) ListByEventHubComplete(resourceGroupName string, namespaceName string, eventHubName string, cancel <-chan struct{}) (<-chan ConsumerGroup, <-chan error) { + resultChan := make(chan ConsumerGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByEventHub(resourceGroupName, namespaceName, eventHubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByEventHubNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go index 359e0da10..c0236fe54 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/eventhubs.go @@ -14,9 +14,8 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,19 +34,16 @@ func NewEventHubsClient(subscriptionID string) EventHubsClient { return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient -// client. +// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client. func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a new Event Hub as a nested resource -// within a Namespace. +// CreateOrUpdate creates or updates a new Event Hub as a nested resource within a Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name parameters is parameters supplied to create an Event Hub resource. -func (client EventHubsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, eventHubName string, parameters CreateOrUpdateParameters) (result ResourceType, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name parameters is parameters supplied to create an Event Hub resource. +func (client EventHubsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, eventHubName string, parameters Model) (result Model, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -56,10 +52,28 @@ func (client EventHubsClient) CreateOrUpdate(resourceGroupName string, namespace Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.MessageRetentionInDays", Name: validation.InclusiveMaximum, Rule: 7, Chain: nil}, + {Target: "parameters.Properties.MessageRetentionInDays", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}, + {Target: "parameters.Properties.PartitionCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.PartitionCount", Name: validation.InclusiveMaximum, Rule: 32, Chain: nil}, + {Target: "parameters.Properties.PartitionCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}, + {Target: "parameters.Properties.CaptureDescription", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMaximum, Rule: 900, Chain: nil}, + {Target: "parameters.Properties.CaptureDescription.IntervalInSeconds", Name: validation.InclusiveMinimum, Rule: 60, Chain: nil}, + }}, + {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMaximum, Rule: 524288000, Chain: nil}, + {Target: "parameters.Properties.CaptureDescription.SizeLimitInBytes", Name: validation.InclusiveMinimum, Rule: 10485760, Chain: nil}, + }}, + }}, + }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "CreateOrUpdate") } @@ -85,7 +99,7 @@ func (client EventHubsClient) CreateOrUpdate(resourceGroupName string, namespace } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client EventHubsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, eventHubName string, parameters CreateOrUpdateParameters) (*http.Request, error) { +func (client EventHubsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, eventHubName string, parameters Model) (*http.Request, error) { pathParameters := map[string]interface{}{ "eventHubName": autorest.Encode("path", eventHubName), "namespaceName": autorest.Encode("path", namespaceName), @@ -93,7 +107,7 @@ func (client EventHubsClient) CreateOrUpdatePreparer(resourceGroupName string, n "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -116,7 +130,7 @@ func (client EventHubsClient) CreateOrUpdateSender(req *http.Request) (*http.Res // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (result ResourceType, err error) { +func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (result Model, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -127,14 +141,12 @@ func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (resu return } -// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for -// the specified Event Hub. +// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for the specified Event Hub. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name authorizationRuleName is the authorization rule name. parameters is -// the shared access AuthorizationRule. -func (client EventHubsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name authorizationRuleName is the authorization rule name. parameters is the shared +// access AuthorizationRule. +func (client EventHubsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -143,14 +155,9 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRule(resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "CreateOrUpdateAuthorizationRule") } @@ -176,7 +183,7 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRule(resourceGroupName } // CreateOrUpdateAuthorizationRulePreparer prepares the CreateOrUpdateAuthorizationRule request. -func (client EventHubsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (*http.Request, error) { +func (client EventHubsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters AuthorizationRule) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "eventHubName": autorest.Encode("path", eventHubName), @@ -185,7 +192,7 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -208,7 +215,7 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRuleSender(req *http.Re // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always // closes the http.Response Body. -func (client EventHubsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client EventHubsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result AuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -221,9 +228,8 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRuleResponder(resp *htt // Delete deletes an Event Hub from the specified Namespace and resource group. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name func (client EventHubsClient) Delete(resourceGroupName string, namespaceName string, eventHubName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -233,8 +239,7 @@ func (client EventHubsClient) Delete(resourceGroupName string, namespaceName str Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "Delete") } @@ -268,7 +273,7 @@ func (client EventHubsClient) DeletePreparer(resourceGroupName string, namespace "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -301,9 +306,8 @@ func (client EventHubsClient) DeleteResponder(resp *http.Response) (result autor // DeleteAuthorizationRule deletes an Event Hub AuthorizationRule. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name authorizationRuleName is the authorization rule name. +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name authorizationRuleName is the authorization rule name. func (client EventHubsClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -313,11 +317,9 @@ func (client EventHubsClient) DeleteAuthorizationRule(resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "DeleteAuthorizationRule") } @@ -352,7 +354,7 @@ func (client EventHubsClient) DeleteAuthorizationRulePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -385,10 +387,9 @@ func (client EventHubsClient) DeleteAuthorizationRuleResponder(resp *http.Respon // Get gets an Event Hubs description for the specified Event Hub. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name -func (client EventHubsClient) Get(resourceGroupName string, namespaceName string, eventHubName string) (result ResourceType, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name +func (client EventHubsClient) Get(resourceGroupName string, namespaceName string, eventHubName string) (result Model, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -397,8 +398,7 @@ func (client EventHubsClient) Get(resourceGroupName string, namespaceName string Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "Get") } @@ -432,7 +432,7 @@ func (client EventHubsClient) GetPreparer(resourceGroupName string, namespaceNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -453,7 +453,7 @@ func (client EventHubsClient) GetSender(req *http.Request) (*http.Response, erro // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client EventHubsClient) GetResponder(resp *http.Response) (result ResourceType, err error) { +func (client EventHubsClient) GetResponder(resp *http.Response) (result Model, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -464,13 +464,11 @@ func (client EventHubsClient) GetResponder(resp *http.Response) (result Resource return } -// GetAuthorizationRule gets an AuthorizationRule for an Event Hub by rule -// name. +// GetAuthorizationRule gets an AuthorizationRule for an Event Hub by rule name. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name authorizationRuleName is the authorization rule name. -func (client EventHubsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name authorizationRuleName is the authorization rule name. +func (client EventHubsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -479,11 +477,9 @@ func (client EventHubsClient) GetAuthorizationRule(resourceGroupName string, nam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "GetAuthorizationRule") } @@ -518,7 +514,7 @@ func (client EventHubsClient) GetAuthorizationRulePreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,7 +535,7 @@ func (client EventHubsClient) GetAuthorizationRuleSender(req *http.Request) (*ht // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always // closes the http.Response Body. -func (client EventHubsClient) GetAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client EventHubsClient) GetAuthorizationRuleResponder(resp *http.Response) (result AuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -550,112 +546,11 @@ func (client EventHubsClient) GetAuthorizationRuleResponder(resp *http.Response) return } -// ListAll gets all the Event Hubs in a Namespace. -// -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name -func (client EventHubsClient) ListAll(resourceGroupName string, namespaceName string) (result ListResult, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: namespaceName, - Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "ListAll") - } - - req, err := client.ListAllPreparer(resourceGroupName, namespaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListAll", resp, "Failure sending request") - return - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListAll", resp, "Failure responding to request") - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client EventHubsClient) ListAllPreparer(resourceGroupName string, namespaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "namespaceName": autorest.Encode("path", namespaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client EventHubsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client EventHubsClient) ListAllResponder(resp *http.Response) (result ListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAllNextResults retrieves the next set of results, if any. -func (client EventHubsClient) ListAllNextResults(lastResults ListResult) (result ListResult, err error) { - req, err := lastResults.ListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListAll", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListAll", resp, "Failure sending next results request") - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListAll", resp, "Failure responding to next results request") - } - - return -} - // ListAuthorizationRules gets the authorization rules for an Event Hub. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name -func (client EventHubsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, eventHubName string) (result SharedAccessAuthorizationRuleListResult, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name +func (client EventHubsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, eventHubName string) (result AuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -664,8 +559,7 @@ func (client EventHubsClient) ListAuthorizationRules(resourceGroupName string, n Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "ListAuthorizationRules") } @@ -699,7 +593,7 @@ func (client EventHubsClient) ListAuthorizationRulesPreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -720,7 +614,7 @@ func (client EventHubsClient) ListAuthorizationRulesSender(req *http.Request) (* // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always // closes the http.Response Body. -func (client EventHubsClient) ListAuthorizationRulesResponder(resp *http.Response) (result SharedAccessAuthorizationRuleListResult, err error) { +func (client EventHubsClient) ListAuthorizationRulesResponder(resp *http.Response) (result AuthorizationRuleListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -732,8 +626,8 @@ func (client EventHubsClient) ListAuthorizationRulesResponder(resp *http.Respons } // ListAuthorizationRulesNextResults retrieves the next set of results, if any. -func (client EventHubsClient) ListAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) { - req, err := lastResults.SharedAccessAuthorizationRuleListResultPreparer() +func (client EventHubsClient) ListAuthorizationRulesNextResults(lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) { + req, err := lastResults.AuthorizationRuleListResultPreparer() if err != nil { return result, autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListAuthorizationRules", nil, "Failure preparing next results request") } @@ -755,12 +649,200 @@ func (client EventHubsClient) ListAuthorizationRulesNextResults(lastResults Shar return } +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client EventHubsClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, eventHubName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) { + resultChan := make(chan AuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, eventHubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByNamespace gets all the Event Hubs in a Namespace. +// +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +func (client EventHubsClient) ListByNamespace(resourceGroupName string, namespaceName string) (result ListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "ListByNamespace") + } + + req, err := client.ListByNamespacePreparer(resourceGroupName, namespaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListByNamespace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListByNamespace", resp, "Failure sending request") + return + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListByNamespace", resp, "Failure responding to request") + } + + return +} + +// ListByNamespacePreparer prepares the ListByNamespace request. +func (client EventHubsClient) ListByNamespacePreparer(resourceGroupName string, namespaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByNamespaceSender sends the ListByNamespace request. The method will close the +// http.Response Body if it receives an error. +func (client EventHubsClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByNamespaceResponder handles the response to the ListByNamespace request. The method always +// closes the http.Response Body. +func (client EventHubsClient) ListByNamespaceResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByNamespaceNextResults retrieves the next set of results, if any. +func (client EventHubsClient) ListByNamespaceNextResults(lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.ListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListByNamespace", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListByNamespace", resp, "Failure sending next results request") + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "ListByNamespace", resp, "Failure responding to next results request") + } + + return +} + +// ListByNamespaceComplete gets all elements from the list without paging. +func (client EventHubsClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan Model, <-chan error) { + resultChan := make(chan Model) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByNamespace(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByNamespaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListKeys gets the ACS and SAS connection strings for the Event Hub. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name authorizationRuleName is the authorization rule name. -func (client EventHubsClient) ListKeys(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result ResourceListKeys, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name authorizationRuleName is the authorization rule name. +func (client EventHubsClient) ListKeys(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -769,11 +851,9 @@ func (client EventHubsClient) ListKeys(resourceGroupName string, namespaceName s Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "ListKeys") } @@ -808,7 +888,7 @@ func (client EventHubsClient) ListKeysPreparer(resourceGroupName string, namespa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -829,7 +909,7 @@ func (client EventHubsClient) ListKeysSender(req *http.Request) (*http.Response, // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client EventHubsClient) ListKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client EventHubsClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -840,15 +920,12 @@ func (client EventHubsClient) ListKeysResponder(resp *http.Response) (result Res return } -// RegenerateKeys regenerates the ACS and SAS connection strings for the Event -// Hub. +// RegenerateKeys regenerates the ACS and SAS connection strings for the Event Hub. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name eventHubName is the Event -// Hub name authorizationRuleName is the authorization rule name. parameters is -// parameters supplied to regenerate the AuthorizationRule Keys -// (PrimaryKey/SecondaryKey). -func (client EventHubsClient) RegenerateKeys(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// eventHubName is the Event Hub name authorizationRuleName is the authorization rule name. parameters is parameters +// supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). +func (client EventHubsClient) RegenerateKeys(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -857,11 +934,9 @@ func (client EventHubsClient) RegenerateKeys(resourceGroupName string, namespace Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: eventHubName, - Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "eventHubName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.EventHubsClient", "RegenerateKeys") } @@ -887,7 +962,7 @@ func (client EventHubsClient) RegenerateKeys(resourceGroupName string, namespace } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client EventHubsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client EventHubsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "eventHubName": autorest.Encode("path", eventHubName), @@ -896,7 +971,7 @@ func (client EventHubsClient) RegenerateKeysPreparer(resourceGroupName string, n "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -919,7 +994,7 @@ func (client EventHubsClient) RegenerateKeysSender(req *http.Request) (*http.Res // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client EventHubsClient) RegenerateKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client EventHubsClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go index 299bb5e87..afef330a0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/models.go @@ -14,9 +14,8 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -37,6 +36,16 @@ const ( Send AccessRights = "Send" ) +// EncodingCaptureDescription enumerates the values for encoding capture description. +type EncodingCaptureDescription string + +const ( + // Avro specifies the avro state for encoding capture description. + Avro EncodingCaptureDescription = "Avro" + // AvroDeflate specifies the avro deflate state for encoding capture description. + AvroDeflate EncodingCaptureDescription = "AvroDeflate" +) + // EntityStatus enumerates the values for entity status. type EntityStatus string @@ -61,59 +70,14 @@ const ( Unknown EntityStatus = "Unknown" ) -// NamespaceState enumerates the values for namespace state. -type NamespaceState string +// KeyType enumerates the values for key type. +type KeyType string const ( - // NamespaceStateActivating specifies the namespace state activating state - // for namespace state. - NamespaceStateActivating NamespaceState = "Activating" - // NamespaceStateActive specifies the namespace state active state for - // namespace state. - NamespaceStateActive NamespaceState = "Active" - // NamespaceStateCreated specifies the namespace state created state for - // namespace state. - NamespaceStateCreated NamespaceState = "Created" - // NamespaceStateCreating specifies the namespace state creating state for - // namespace state. - NamespaceStateCreating NamespaceState = "Creating" - // NamespaceStateDisabled specifies the namespace state disabled state for - // namespace state. - NamespaceStateDisabled NamespaceState = "Disabled" - // NamespaceStateDisabling specifies the namespace state disabling state - // for namespace state. - NamespaceStateDisabling NamespaceState = "Disabling" - // NamespaceStateEnabling specifies the namespace state enabling state for - // namespace state. - NamespaceStateEnabling NamespaceState = "Enabling" - // NamespaceStateFailed specifies the namespace state failed state for - // namespace state. - NamespaceStateFailed NamespaceState = "Failed" - // NamespaceStateRemoved specifies the namespace state removed state for - // namespace state. - NamespaceStateRemoved NamespaceState = "Removed" - // NamespaceStateRemoving specifies the namespace state removing state for - // namespace state. - NamespaceStateRemoving NamespaceState = "Removing" - // NamespaceStateSoftDeleted specifies the namespace state soft deleted - // state for namespace state. - NamespaceStateSoftDeleted NamespaceState = "SoftDeleted" - // NamespaceStateSoftDeleting specifies the namespace state soft deleting - // state for namespace state. - NamespaceStateSoftDeleting NamespaceState = "SoftDeleting" - // NamespaceStateUnknown specifies the namespace state unknown state for - // namespace state. - NamespaceStateUnknown NamespaceState = "Unknown" -) - -// Policykey enumerates the values for policykey. -type Policykey string - -const ( - // PrimaryKey specifies the primary key state for policykey. - PrimaryKey Policykey = "PrimaryKey" - // SecondaryKey specifies the secondary key state for policykey. - SecondaryKey Policykey = "SecondaryKey" + // PrimaryKey specifies the primary key state for key type. + PrimaryKey KeyType = "PrimaryKey" + // SecondaryKey specifies the secondary key state for key type. + SecondaryKey KeyType = "SecondaryKey" ) // SkuName enumerates the values for sku name. @@ -132,8 +96,6 @@ type SkuTier string const ( // SkuTierBasic specifies the sku tier basic state for sku tier. SkuTierBasic SkuTier = "Basic" - // SkuTierPremium specifies the sku tier premium state for sku tier. - SkuTierPremium SkuTier = "Premium" // SkuTierStandard specifies the sku tier standard state for sku tier. SkuTierStandard SkuTier = "Standard" ) @@ -144,50 +106,105 @@ type UnavailableReason string const ( // InvalidName specifies the invalid name state for unavailable reason. InvalidName UnavailableReason = "InvalidName" - // NameInLockdown specifies the name in lockdown state for unavailable - // reason. + // NameInLockdown specifies the name in lockdown state for unavailable reason. NameInLockdown UnavailableReason = "NameInLockdown" // NameInUse specifies the name in use state for unavailable reason. NameInUse UnavailableReason = "NameInUse" // None specifies the none state for unavailable reason. None UnavailableReason = "None" - // SubscriptionIsDisabled specifies the subscription is disabled state for - // unavailable reason. + // SubscriptionIsDisabled specifies the subscription is disabled state for unavailable reason. SubscriptionIsDisabled UnavailableReason = "SubscriptionIsDisabled" - // TooManyNamespaceInCurrentSubscription specifies the too many namespace - // in current subscription state for unavailable reason. + // TooManyNamespaceInCurrentSubscription specifies the too many namespace in current subscription state for unavailable + // reason. TooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription" ) -// CheckNameAvailabilityParameter is parameter supplied to check Namespace name -// availability operation +// AccessKeys is namespace/EventHub Connection String +type AccessKeys struct { + autorest.Response `json:"-"` + PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"` + SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` + PrimaryKey *string `json:"primaryKey,omitempty"` + SecondaryKey *string `json:"secondaryKey,omitempty"` + KeyName *string `json:"keyName,omitempty"` +} + +// AuthorizationRule is single item in a List or Get AuthorizationRule operation +type AuthorizationRule struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *AuthorizationRuleProperties `json:"properties,omitempty"` +} + +// AuthorizationRuleProperties is properties supplied to create or update AuthorizationRule +type AuthorizationRuleProperties struct { + Rights *[]AccessRights `json:"rights,omitempty"` +} + +// AuthorizationRuleListResult is the response from the List namespace operation. +type AuthorizationRuleListResult struct { + autorest.Response `json:"-"` + Value *[]AuthorizationRule `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// AuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client AuthorizationRuleListResult) AuthorizationRuleListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// CaptureDescription is properties to configure capture description for eventhub +type CaptureDescription struct { + Enabled *bool `json:"enabled,omitempty"` + Encoding EncodingCaptureDescription `json:"encoding,omitempty"` + IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` + SizeLimitInBytes *int32 `json:"sizeLimitInBytes,omitempty"` + Destination *Destination `json:"destination,omitempty"` +} + +// CheckNameAvailabilityParameter is parameter supplied to check Namespace name availability operation type CheckNameAvailabilityParameter struct { Name *string `json:"name,omitempty"` } -// CheckNameAvailabilityResult is the Result of the CheckNameAvailability -// operation +// CheckNameAvailabilityResult is the Result of the CheckNameAvailability operation type CheckNameAvailabilityResult struct { autorest.Response `json:"-"` + Message *string `json:"message,omitempty"` NameAvailable *bool `json:"nameAvailable,omitempty"` Reason UnavailableReason `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` } -// ConsumerGroupCreateOrUpdateParameters is parameters supplied to the Create -// Or Update Consumer Group operation. -type ConsumerGroupCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` +// ConsumerGroup is single item in List or Get Consumer group operation +type ConsumerGroup struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` *ConsumerGroupProperties `json:"properties,omitempty"` } +// ConsumerGroupProperties is single item in List or Get Consumer group operation +type ConsumerGroupProperties struct { + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + UserMetadata *string `json:"userMetadata,omitempty"` +} + // ConsumerGroupListResult is the result to the List Consumer Group operation. type ConsumerGroupListResult struct { autorest.Response `json:"-"` - Value *[]ConsumerGroupResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]ConsumerGroup `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } // ConsumerGroupListResultPreparer prepares a request to retrieve the next set of results. It returns @@ -202,39 +219,74 @@ func (client ConsumerGroupListResult) ConsumerGroupListResultPreparer() (*http.R autorest.WithBaseURL(to.String(client.NextLink))) } -// ConsumerGroupProperties is properties supplied to the Create Or Update -// Consumer Group operation. -type ConsumerGroupProperties struct { - CreatedAt *date.Time `json:"createdAt,omitempty"` - EventHubPath *string `json:"eventHubPath,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` - UserMetadata *string `json:"userMetadata,omitempty"` +// Destination is capture storage details for capture description +type Destination struct { + Name *string `json:"name,omitempty"` + *DestinationProperties `json:"properties,omitempty"` } -// ConsumerGroupResource is single item in List or Get Consumer group operation -type ConsumerGroupResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *ConsumerGroupProperties `json:"properties,omitempty"` +// DestinationProperties is properties describing the storage account, blob container and acrchive anme format for +// capture destination +type DestinationProperties struct { + StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` + BlobContainer *string `json:"blobContainer,omitempty"` + ArchiveNameFormat *string `json:"archiveNameFormat,omitempty"` } -// CreateOrUpdateParameters is parameters supplied to the Create Or Update -// Event Hub operation. -type CreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - *Properties `json:"properties,omitempty"` +// EHNamespace is single Namespace item in List or Get Operation +type EHNamespace struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + *EHNamespaceProperties `json:"properties,omitempty"` +} + +// EHNamespaceProperties is namespace properties supplied for create namespace operation. +type EHNamespaceProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` + MetricID *string `json:"metricId,omitempty"` + IsAutoInflateEnabled *bool `json:"isAutoInflateEnabled,omitempty"` + MaximumThroughputUnits *int32 `json:"maximumThroughputUnits,omitempty"` +} + +// EHNamespaceListResult is the response of the List Namespace operation +type EHNamespaceListResult struct { + autorest.Response `json:"-"` + Value *[]EHNamespace `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// EHNamespaceListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client EHNamespaceListResult) EHNamespaceListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ErrorResponse is error reponse indicates EventHub service is not able to process the incoming request. The reason is +// provided in the error message. +type ErrorResponse struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` } // ListResult is the result of the List EventHubs operation. type ListResult struct { autorest.Response `json:"-"` - Value *[]ResourceType `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]Model `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } // ListResultPreparer prepares a request to retrieve the next set of results. It returns @@ -249,63 +301,13 @@ func (client ListResult) ListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// NamespaceCreateOrUpdateParameters is parameters supplied to the Create Or -// Update Namespace operation. -type NamespaceCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *NamespaceProperties `json:"properties,omitempty"` -} - -// NamespaceListResult is the response of the List Namespace operation. -type NamespaceListResult struct { +// Model is single item in List or Get Event Hub operation +type Model struct { autorest.Response `json:"-"` - Value *[]NamespaceResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` -} - -// NamespaceListResultPreparer prepares a request to retrieve the next set of results. It returns -// nil if no more results exist. -func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, error) { - if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { - return nil, nil - } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(client.NextLink))) -} - -// NamespaceProperties is properties of the Namespace supplied for create or -// update Namespace operation -type NamespaceProperties struct { - Status NamespaceState `json:"status,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - CreatedAt *date.Time `json:"createdAt,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` - ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` - MetricID *string `json:"metricId,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} - -// NamespaceResource is single Namespace item in List or Get Operation -type NamespaceResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` - *NamespaceProperties `json:"properties,omitempty"` -} - -// NamespaceUpdateParameter is parameters supplied to the Patch/update -// Namespace operation. -type NamespaceUpdateParameter struct { - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *Properties `json:"properties,omitempty"` } // Operation is a Event Hub REST API operation @@ -321,9 +323,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of the request to list Event Hub operations. -// It contains a list of operations and a URL link to get the next set of -// results. +// OperationListResult is result of the request to list Event Hub operations. It contains a list of operations and a +// URL link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -342,97 +343,32 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// Properties is properties supplied to the Create Or Update Event Hub -// operation. +// Properties is properties supplied to the Create Or Update Event Hub operation. type Properties struct { - CreatedAt *date.Time `json:"createdAt,omitempty"` - MessageRetentionInDays *int64 `json:"messageRetentionInDays,omitempty"` - PartitionCount *int64 `json:"partitionCount,omitempty"` - PartitionIds *[]string `json:"partitionIds,omitempty"` - Status EntityStatus `json:"status,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` + PartitionIds *[]string `json:"partitionIds,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + MessageRetentionInDays *int64 `json:"messageRetentionInDays,omitempty"` + PartitionCount *int64 `json:"partitionCount,omitempty"` + Status EntityStatus `json:"status,omitempty"` + CaptureDescription *CaptureDescription `json:"captureDescription,omitempty"` } -// RegenerateKeysParameters is parameters supplied to the Regenerate -// Authorization Rule keys operation. -type RegenerateKeysParameters struct { - Policykey Policykey `json:"policykey,omitempty"` +// RegenerateAccessKeyParameters is parameters supplied to the Regenerate Authorization Rule operation, specifies which +// key neeeds to be reset. +type RegenerateAccessKeyParameters struct { + KeyType KeyType `json:"keyType,omitempty"` + Key *string `json:"key,omitempty"` } // Resource is the Resource definition type Resource struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` } -// ResourceListKeys is namespace/EventHub Connection String -type ResourceListKeys struct { - autorest.Response `json:"-"` - PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"` - SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` - PrimaryKey *string `json:"primaryKey,omitempty"` - SecondaryKey *string `json:"secondaryKey,omitempty"` - KeyName *string `json:"keyName,omitempty"` -} - -// ResourceType is single item in List or Get Event Hub operation -type ResourceType struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *Properties `json:"properties,omitempty"` -} - -// SharedAccessAuthorizationRuleCreateOrUpdateParameters is parameters supplied -// to the Create Or Update Authorization Rules operation. -type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` -} - -// SharedAccessAuthorizationRuleListResult is the response from the List -// Namespace operation. -type SharedAccessAuthorizationRuleListResult struct { - autorest.Response `json:"-"` - Value *[]SharedAccessAuthorizationRuleResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` -} - -// SharedAccessAuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results. It returns -// nil if no more results exist. -func (client SharedAccessAuthorizationRuleListResult) SharedAccessAuthorizationRuleListResultPreparer() (*http.Request, error) { - if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { - return nil, nil - } - return autorest.Prepare(&http.Request{}, - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(client.NextLink))) -} - -// SharedAccessAuthorizationRuleProperties is properties supplied to create or -// update SharedAccessAuthorizationRule -type SharedAccessAuthorizationRuleProperties struct { - Rights *[]AccessRights `json:"rights,omitempty"` -} - -// SharedAccessAuthorizationRuleResource is single item in a List or Get -// AuthorizationRule operation -type SharedAccessAuthorizationRuleResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` -} - -// Sku is sKU parameters supplied to the create Namespace operation +// Sku is SKU parameters supplied to the create namespace operation type Sku struct { Name SkuName `json:"name,omitempty"` Tier SkuTier `json:"tier,omitempty"` @@ -443,7 +379,7 @@ type Sku struct { type TrackedResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go index 2f1f3bcbb..90a80c39c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/namespaces.go @@ -14,9 +14,8 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,8 +34,7 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient -// client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -78,7 +76,7 @@ func (client NamespacesClient) CheckNameAvailabilityPreparer(parameters CheckNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,17 +110,14 @@ func (client NamespacesClient) CheckNameAvailabilityResponder(resp *http.Respons return } -// CreateOrUpdate creates or updates a namespace. Once created, this -// namespace's resource manifest is immutable. This operation is idempotent. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This +// operation is idempotent. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name parameters is parameters -// for creating a namespace resource. -func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters, cancel <-chan struct{}) (<-chan NamespaceResource, <-chan error) { - resultChan := make(chan NamespaceResource, 1) +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// parameters is parameters for creating a namespace resource. +func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters EHNamespace, cancel <-chan struct{}) (<-chan EHNamespace, <-chan error) { + resultChan := make(chan EHNamespace, 1) errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -132,7 +127,18 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Sku.Capacity", Name: validation.InclusiveMaximum, Rule: 20, Chain: nil}, + {Target: "parameters.Sku.Capacity", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}, + }}, + {Target: "parameters.EHNamespaceProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMaximum, Rule: 20, Chain: nil}, + {Target: "parameters.EHNamespaceProperties.MaximumThroughputUnits", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}, + }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "eventhub.NamespacesClient", "CreateOrUpdate") close(errChan) close(resultChan) @@ -141,10 +147,12 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac go func() { var err error - var result NamespaceResource + var result EHNamespace defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -170,14 +178,14 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client NamespacesClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { +func (client NamespacesClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, parameters EHNamespace, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -202,7 +210,7 @@ func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (*http.Re // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (result NamespaceResource, err error) { +func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (result EHNamespace, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -213,14 +221,11 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for -// a Namespace. +// CreateOrUpdateAuthorizationRule creates or updates an AuthorizationRule for a Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name authorizationRuleName is -// the authorization rule name. parameters is the shared access -// AuthorizationRule. -func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// authorizationRuleName is the authorization rule name. parameters is the shared access AuthorizationRule. +func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -229,11 +234,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.NamespacesClient", "CreateOrUpdateAuthorizationRule") } @@ -259,7 +260,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName } // CreateOrUpdateAuthorizationRulePreparer prepares the CreateOrUpdateAuthorizationRule request. -func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (*http.Request, error) { +func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters AuthorizationRule) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -267,7 +268,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -290,7 +291,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleSender(req *http.R // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always // closes the http.Response Body. -func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result AuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -301,14 +302,11 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht return } -// Delete deletes an existing namespace. This operation also removes all -// associated resources under the namespace. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes an existing namespace. This operation also removes all associated resources under the namespace. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name func (client NamespacesClient) Delete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -329,8 +327,10 @@ func (client NamespacesClient) Delete(resourceGroupName string, namespaceName st var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -363,7 +363,7 @@ func (client NamespacesClient) DeletePreparer(resourceGroupName string, namespac "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -398,9 +398,8 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto // DeleteAuthorizationRule deletes an AuthorizationRule for a Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name authorizationRuleName is -// the authorization rule name. +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// authorizationRuleName is the authorization rule name. func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -410,8 +409,7 @@ func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.NamespacesClient", "DeleteAuthorizationRule") } @@ -445,7 +443,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -478,9 +476,8 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo // Get gets the description of the specified namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name -func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result NamespaceResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result EHNamespace, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -520,7 +517,7 @@ func (client NamespacesClient) GetPreparer(resourceGroupName string, namespaceNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -541,7 +538,7 @@ func (client NamespacesClient) GetSender(req *http.Request) (*http.Response, err // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client NamespacesClient) GetResponder(resp *http.Response) (result NamespaceResource, err error) { +func (client NamespacesClient) GetResponder(resp *http.Response) (result EHNamespace, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -554,10 +551,9 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa // GetAuthorizationRule gets an AuthorizationRule for a Namespace by rule name. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name authorizationRuleName is -// the authorization rule name. -func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// authorizationRuleName is the authorization rule name. +func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -566,8 +562,7 @@ func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, na Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.NamespacesClient", "GetAuthorizationRule") } @@ -601,7 +596,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -622,7 +617,7 @@ func (client NamespacesClient) GetAuthorizationRuleSender(req *http.Request) (*h // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always // closes the http.Response Body. -func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response) (result AuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -633,11 +628,140 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response return } +// List lists all the available Namespaces within a subscription, irrespective of the resource groups. +func (client NamespacesClient) List() (result EHNamespaceListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client NamespacesClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client NamespacesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client NamespacesClient) ListResponder(resp *http.Response) (result EHNamespaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client NamespacesClient) ListNextResults(lastResults EHNamespaceListResult) (result EHNamespaceListResult, err error) { + req, err := lastResults.EHNamespaceListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client NamespacesClient) ListComplete(cancel <-chan struct{}) (<-chan EHNamespace, <-chan error) { + resultChan := make(chan EHNamespace) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAuthorizationRules gets a list of authorization rules for a Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name -func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result SharedAccessAuthorizationRuleListResult, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result AuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -677,7 +801,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -698,7 +822,7 @@ func (client NamespacesClient) ListAuthorizationRulesSender(req *http.Request) ( // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always // closes the http.Response Body. -func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Response) (result SharedAccessAuthorizationRuleListResult, err error) { +func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Response) (result AuthorizationRuleListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -710,8 +834,8 @@ func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Respon } // ListAuthorizationRulesNextResults retrieves the next set of results, if any. -func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) { - req, err := lastResults.SharedAccessAuthorizationRuleListResultPreparer() +func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) { + req, err := lastResults.AuthorizationRuleListResultPreparer() if err != nil { return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListAuthorizationRules", nil, "Failure preparing next results request") } @@ -733,11 +857,55 @@ func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults Sha return } +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client NamespacesClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) { + resultChan := make(chan AuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup lists the available Namespaces within a resource group. // -// resourceGroupName is name of the resource group within the azure -// subscription. -func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result NamespaceListResult, err error) { +// resourceGroupName is name of the resource group within the azure subscription. +func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result EHNamespaceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -773,7 +941,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -794,7 +962,7 @@ func (client NamespacesClient) ListByResourceGroupSender(req *http.Request) (*ht // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client NamespacesClient) ListByResourceGroupResponder(resp *http.Response) (result NamespaceListResult, err error) { +func (client NamespacesClient) ListByResourceGroupResponder(resp *http.Response) (result EHNamespaceListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -806,8 +974,8 @@ func (client NamespacesClient) ListByResourceGroupResponder(resp *http.Response) } // ListByResourceGroupNextResults retrieves the next set of results, if any. -func (client NamespacesClient) ListByResourceGroupNextResults(lastResults NamespaceListResult) (result NamespaceListResult, err error) { - req, err := lastResults.NamespaceListResultPreparer() +func (client NamespacesClient) ListByResourceGroupNextResults(lastResults EHNamespaceListResult) (result EHNamespaceListResult, err error) { + req, err := lastResults.EHNamespaceListResultPreparer() if err != nil { return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListByResourceGroup", nil, "Failure preparing next results request") } @@ -829,99 +997,56 @@ func (client NamespacesClient) ListByResourceGroupNextResults(lastResults Namesp return } -// ListBySubscription lists all the available Namespaces within a subscription, -// irrespective of the resource groups. -func (client NamespacesClient) ListBySubscription() (result NamespaceListResult, err error) { - req, err := client.ListBySubscriptionPreparer() - if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListBySubscription", resp, "Failure responding to request") - } - - return +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client NamespacesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan EHNamespace, <-chan error) { + resultChan := make(chan EHNamespace) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan } -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client NamespacesClient) ListBySubscriptionPreparer() (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client NamespacesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client NamespacesClient) ListBySubscriptionResponder(resp *http.Response) (result NamespaceListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListBySubscriptionNextResults retrieves the next set of results, if any. -func (client NamespacesClient) ListBySubscriptionNextResults(lastResults NamespaceListResult) (result NamespaceListResult, err error) { - req, err := lastResults.NamespaceListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListBySubscription", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListBySubscription", resp, "Failure sending next results request") - } - - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "ListBySubscription", resp, "Failure responding to next results request") - } - - return -} - -// ListKeys gets the primary and secondary connection strings for the -// Namespace. +// ListKeys gets the primary and secondary connection strings for the Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name authorizationRuleName is -// the authorization rule name. -func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result ResourceListKeys, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// authorizationRuleName is the authorization rule name. +func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -930,8 +1055,7 @@ func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.NamespacesClient", "ListKeys") } @@ -965,7 +1089,7 @@ func (client NamespacesClient) ListKeysPreparer(resourceGroupName string, namesp "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -986,7 +1110,7 @@ func (client NamespacesClient) ListKeysSender(req *http.Request) (*http.Response // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -997,14 +1121,12 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Re return } -// RegenerateKeys regenerates the primary or secondary connection strings for -// the specified Namespace. +// RegenerateKeys regenerates the primary or secondary connection strings for the specified Namespace. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name authorizationRuleName is -// the authorization rule name. parameters is parameters required to regenerate -// the connection string. -func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// authorizationRuleName is the authorization rule name. parameters is parameters required to regenerate the connection +// string. +func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -1013,8 +1135,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "eventhub.NamespacesClient", "RegenerateKeys") } @@ -1040,7 +1161,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -1048,7 +1169,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1071,7 +1192,7 @@ func (client NamespacesClient) RegenerateKeysSender(req *http.Request) (*http.Re // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1082,13 +1203,12 @@ func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (res return } -// Update creates or updates a namespace. Once created, this namespace's -// resource manifest is immutable. This operation is idempotent. +// Update creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation +// is idempotent. // -// resourceGroupName is name of the resource group within the azure -// subscription. namespaceName is the Namespace name parameters is parameters -// for updating a namespace resource. -func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameter) (result NamespaceResource, err error) { +// resourceGroupName is name of the resource group within the azure subscription. namespaceName is the Namespace name +// parameters is parameters for updating a namespace resource. +func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters EHNamespace) (result EHNamespace, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -1121,14 +1241,14 @@ func (client NamespacesClient) Update(resourceGroupName string, namespaceName st } // UpdatePreparer prepares the Update request. -func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameter) (*http.Request, error) { +func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters EHNamespace) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1151,7 +1271,7 @@ func (client NamespacesClient) UpdateSender(req *http.Request) (*http.Response, // UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client NamespacesClient) UpdateResponder(resp *http.Response) (result NamespaceResource, err error) { +func (client NamespacesClient) UpdateResponder(resp *http.Response) (result EHNamespace, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/operations.go index c86a01619..6f3ea2c8a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/operations.go @@ -14,9 +14,8 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -65,7 +63,7 @@ func (client OperationsClient) List() (result OperationListResult, err error) { // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -120,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go index 16a30d037..45040aed7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/eventhub/version.go @@ -14,15 +14,15 @@ package eventhub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-eventhub/2017-04-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-eventhub/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/check/check.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/check/check.go index 762e8c3d4..c876931d2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/check/check.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/check/check.go @@ -1,5 +1,19 @@ package main +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" "log" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/create/create.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/create/create.go index 48ef886fd..0a520b9a3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/create/create.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/create/create.go @@ -1,5 +1,19 @@ package main +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" "log" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/create.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/create.go index d8c9effe2..1a9bd5d58 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/create.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/create.go @@ -1,5 +1,19 @@ package main +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" "log" @@ -107,7 +121,7 @@ func main() { var top int32 top = 10 - rrsets, err := rc.ListByDNSZone(resourceGroup, newZoneName, &top) + rrsets, err := rc.ListByDNSZone(resourceGroup, newZoneName, &top, "") if err != nil { log.Fatalf("Error: %v", err) return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/paging/paging.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/paging/paging.go index 7d5744864..c7a86c4c4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/paging/paging.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/dns/paging/paging.go @@ -1,5 +1,19 @@ package main +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" "log" @@ -95,7 +109,7 @@ func main() { top = 10 page := 0 rrsets := make([]dns.RecordSet, 0) - result, err := rc.ListByDNSZone(resourceGroup, newZoneName, &top) + result, err := rc.ListByDNSZone(resourceGroup, newZoneName, &top, "") if err != nil { log.Fatalf("Error: %v", err) return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/helpers/helpers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/helpers/helpers.go index f883215ef..de9d55166 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/helpers/helpers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/examples/helpers/helpers.go @@ -1,8 +1,23 @@ package helpers +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/json" "fmt" + "github.com/Azure/go-autorest/autorest/adal" "github.com/Azure/go-autorest/autorest/azure" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/applications.go index cb0fad4d5..7c43c4a20 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/applications.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/applications.go @@ -14,9 +14,8 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// ApplicationsClient is the composite Swagger specification for Azure Active -// Directory Graph RBAC management client. +// ApplicationsClient is the the Graph RBAC Management Client type ApplicationsClient struct { ManagementClient } @@ -36,8 +34,7 @@ func NewApplicationsClient(tenantID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewApplicationsClientWithBaseURI creates an instance of the -// ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. func NewApplicationsClientWithBaseURI(baseURI string, tenantID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, tenantID)} } @@ -308,6 +305,51 @@ func (client ApplicationsClient) ListResponder(resp *http.Response) (result Appl return } +// ListComplete gets all elements from the list without paging. +func (client ApplicationsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan Application, <-chan error) { + resultChan := make(chan Application) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.OdataNextLink != nil { + list, err = client.ListNext(*list.OdataNextLink) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListKeyCredentials get the keyCredentials associated with an application. // // applicationObjectID is application object ID. @@ -436,8 +478,7 @@ func (client ApplicationsClient) ListNextResponder(resp *http.Response) (result return } -// ListPasswordCredentials get the passwordCredentials associated with an -// application. +// ListPasswordCredentials get the passwordCredentials associated with an application. // // applicationObjectID is application object ID. func (client ApplicationsClient) ListPasswordCredentials(applicationObjectID string) (result PasswordCredentialListResult, err error) { @@ -503,8 +544,7 @@ func (client ApplicationsClient) ListPasswordCredentialsResponder(resp *http.Res // Patch update an existing application. // -// applicationObjectID is application object ID. parameters is parameters to -// update an existing application. +// applicationObjectID is application object ID. parameters is parameters to update an existing application. func (client ApplicationsClient) Patch(applicationObjectID string, parameters ApplicationUpdateParameters) (result autorest.Response, err error) { req, err := client.PatchPreparer(applicationObjectID, parameters) if err != nil { @@ -567,11 +607,10 @@ func (client ApplicationsClient) PatchResponder(resp *http.Response) (result aut return } -// UpdateKeyCredentials update the keyCredentials associated with an -// application. +// UpdateKeyCredentials update the keyCredentials associated with an application. // -// applicationObjectID is application object ID. parameters is parameters to -// update the keyCredentials of an existing application. +// applicationObjectID is application object ID. parameters is parameters to update the keyCredentials of an existing +// application. func (client ApplicationsClient) UpdateKeyCredentials(applicationObjectID string, parameters KeyCredentialsUpdateParameters) (result autorest.Response, err error) { req, err := client.UpdateKeyCredentialsPreparer(applicationObjectID, parameters) if err != nil { @@ -634,11 +673,10 @@ func (client ApplicationsClient) UpdateKeyCredentialsResponder(resp *http.Respon return } -// UpdatePasswordCredentials update passwordCredentials associated with an -// application. +// UpdatePasswordCredentials update passwordCredentials associated with an application. // -// applicationObjectID is application object ID. parameters is parameters to -// update passwordCredentials of an existing application. +// applicationObjectID is application object ID. parameters is parameters to update passwordCredentials of an existing +// application. func (client ApplicationsClient) UpdatePasswordCredentials(applicationObjectID string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error) { req, err := client.UpdatePasswordCredentialsPreparer(applicationObjectID, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/client.go index 282c2af0d..627cc0254 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/client.go @@ -1,7 +1,6 @@ -// Package graphrbac implements the Azure ARM Graphrbac service API version . +// Package graphrbac implements the Azure ARM Graphrbac service API version 1.6. // -// Composite Swagger specification for Azure Active Directory Graph RBAC -// management client. +// The Graph RBAC Management Client package graphrbac // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/domains.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/domains.go new file mode 100644 index 000000000..78a34dcc7 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/domains.go @@ -0,0 +1,169 @@ +package graphrbac + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DomainsClient is the the Graph RBAC Management Client +type DomainsClient struct { + ManagementClient +} + +// NewDomainsClient creates an instance of the DomainsClient client. +func NewDomainsClient(tenantID string) DomainsClient { + return NewDomainsClientWithBaseURI(DefaultBaseURI, tenantID) +} + +// NewDomainsClientWithBaseURI creates an instance of the DomainsClient client. +func NewDomainsClientWithBaseURI(baseURI string, tenantID string) DomainsClient { + return DomainsClient{NewWithBaseURI(baseURI, tenantID)} +} + +// Get gets a specific domain in the current tenant. +// +// domainName is name of the domain. +func (client DomainsClient) Get(domainName string) (result Domain, err error) { + req, err := client.GetPreparer(domainName) + if err != nil { + err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DomainsClient) GetPreparer(domainName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "domainName": autorest.Encode("path", domainName), + "tenantID": autorest.Encode("path", client.TenantID), + } + + const APIVersion = "1.6" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{tenantID}/domains/{domainName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DomainsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DomainsClient) GetResponder(resp *http.Response) (result Domain, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets a list of domains for the current tenant. +// +// filter is the filter to apply to the operation. +func (client DomainsClient) List(filter string) (result DomainListResult, err error) { + req, err := client.ListPreparer(filter) + if err != nil { + err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DomainsClient) ListPreparer(filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "tenantID": autorest.Encode("path", client.TenantID), + } + + const APIVersion = "1.6" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{tenantID}/domains", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DomainsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DomainsClient) ListResponder(resp *http.Response) (result DomainListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/groups.go index 6c26e0805..2a450837e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/groups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/groups.go @@ -14,9 +14,8 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// GroupsClient is the composite Swagger specification for Azure Active -// Directory Graph RBAC management client. +// GroupsClient is the the Graph RBAC Management Client type GroupsClient struct { ManagementClient } @@ -43,8 +41,8 @@ func NewGroupsClientWithBaseURI(baseURI string, tenantID string) GroupsClient { // AddMember add a member to a group. // -// groupObjectID is the object ID of the group to which to add the member. -// parameters is the URL of the member object, such as +// groupObjectID is the object ID of the group to which to add the member. parameters is the URL of the member object, +// such as // https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd. func (client GroupsClient) AddMember(groupObjectID string, parameters GroupAddMemberParameters) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ @@ -379,6 +377,51 @@ func (client GroupsClient) GetGroupMembersResponder(resp *http.Response) (result return } +// GetGroupMembersComplete gets all elements from the list without paging. +func (client GroupsClient) GetGroupMembersComplete(objectID string, cancel <-chan struct{}) (<-chan AADObject, <-chan error) { + resultChan := make(chan AADObject) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetGroupMembers(objectID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.OdataNextLink != nil { + list, err = client.GetGroupMembersNext(*list.OdataNextLink) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetGroupMembersNext gets the members of a group. // // nextLink is next link for the list operation. @@ -443,11 +486,9 @@ func (client GroupsClient) GetGroupMembersNextResponder(resp *http.Response) (re return } -// GetMemberGroups gets a collection of object IDs of groups of which the -// specified group is a member. +// GetMemberGroups gets a collection of object IDs of groups of which the specified group is a member. // -// objectID is the object ID of the group for which to get group membership. -// parameters is group filtering parameters. +// objectID is the object ID of the group for which to get group membership. parameters is group filtering parameters. func (client GroupsClient) GetMemberGroups(objectID string, parameters GroupGetMemberGroupsParameters) (result GroupGetMemberGroupsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -517,8 +558,8 @@ func (client GroupsClient) GetMemberGroupsResponder(resp *http.Response) (result return } -// IsMemberOf checks whether the specified user, group, contact, or service -// principal is a direct or transitive member of the specified group. +// IsMemberOf checks whether the specified user, group, contact, or service principal is a direct or transitive member +// of the specified group. // // parameters is the check group membership parameters. func (client GroupsClient) IsMemberOf(parameters CheckGroupMembershipParameters) (result CheckGroupMembershipResult, err error) { @@ -656,6 +697,51 @@ func (client GroupsClient) ListResponder(resp *http.Response) (result GroupListR return } +// ListComplete gets all elements from the list without paging. +func (client GroupsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan ADGroup, <-chan error) { + resultChan := make(chan ADGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.OdataNextLink != nil { + list, err = client.ListNext(*list.OdataNextLink) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListNext gets a list of groups for the current tenant. // // nextLink is next link for the list operation. @@ -722,8 +808,7 @@ func (client GroupsClient) ListNextResponder(resp *http.Response) (result GroupL // RemoveMember remove a member from a group. // -// groupObjectID is the object ID of the group from which to remove the member. -// memberObjectID is member object id +// groupObjectID is the object ID of the group from which to remove the member. memberObjectID is member object id func (client GroupsClient) RemoveMember(groupObjectID string, memberObjectID string) (result autorest.Response, err error) { req, err := client.RemoveMemberPreparer(groupObjectID, memberObjectID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/models.go index ab8775a72..490d1f32e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/models.go @@ -14,28 +14,45 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" ) +// UserType enumerates the values for user type. +type UserType string + +const ( + // Guest specifies the guest state for user type. + Guest UserType = "Guest" + // Member specifies the member state for user type. + Member UserType = "Member" +) + // AADObject is the properties of an Active Directory object. type AADObject struct { - autorest.Response `json:"-"` - ObjectID *string `json:"objectId,omitempty"` - ObjectType *string `json:"objectType,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - UserPrincipalName *string `json:"userPrincipalName,omitempty"` - Mail *string `json:"mail,omitempty"` - MailEnabled *bool `json:"mailEnabled,omitempty"` - SecurityEnabled *bool `json:"securityEnabled,omitempty"` - SignInName *string `json:"signInName,omitempty"` - ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"` - UserType *string `json:"userType,omitempty"` + autorest.Response `json:"-"` + ObjectID *string `json:"objectId,omitempty"` + ObjectType *string `json:"objectType,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + UserPrincipalName *string `json:"userPrincipalName,omitempty"` + Mail *string `json:"mail,omitempty"` + MailEnabled *bool `json:"mailEnabled,omitempty"` + MailNickname *string `json:"mailNickname,omitempty"` + SecurityEnabled *bool `json:"securityEnabled,omitempty"` + SignInName *string `json:"signInName,omitempty"` + ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"` + UserType *string `json:"userType,omitempty"` + UsageLocation *string `json:"usageLocation,omitempty"` + AppID *string `json:"appId,omitempty"` + AppPermissions *[]string `json:"appPermissions,omitempty"` + AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"` + IdentifierUris *[]string `json:"identifierUris,omitempty"` + ReplyUrls *[]string `json:"replyUrls,omitempty"` + Homepage *string `json:"homepage,omitempty"` } // ADGroup is active Directory group information. @@ -60,18 +77,20 @@ type Application struct { IdentifierUris *[]string `json:"identifierUris,omitempty"` ReplyUrls *[]string `json:"replyUrls,omitempty"` Homepage *string `json:"homepage,omitempty"` + Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"` } -// ApplicationCreateParameters is request parameters for creating a new -// application. +// ApplicationCreateParameters is request parameters for creating a new application. type ApplicationCreateParameters struct { - AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Homepage *string `json:"homepage,omitempty"` - IdentifierUris *[]string `json:"identifierUris,omitempty"` - ReplyUrls *[]string `json:"replyUrls,omitempty"` - KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"` - PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"` + AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Homepage *string `json:"homepage,omitempty"` + IdentifierUris *[]string `json:"identifierUris,omitempty"` + ReplyUrls *[]string `json:"replyUrls,omitempty"` + KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"` + PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"` + Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"` + RequiredResourceAccess *[]RequiredResourceAccess `json:"requiredResourceAccess,omitempty"` } // ApplicationListResult is application list operation result. @@ -81,20 +100,20 @@ type ApplicationListResult struct { OdataNextLink *string `json:"odata.nextLink,omitempty"` } -// ApplicationUpdateParameters is request parameters for updating an existing -// application. +// ApplicationUpdateParameters is request parameters for updating an existing application. type ApplicationUpdateParameters struct { - AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - Homepage *string `json:"homepage,omitempty"` - IdentifierUris *[]string `json:"identifierUris,omitempty"` - ReplyUrls *[]string `json:"replyUrls,omitempty"` - KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"` - PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"` + AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Homepage *string `json:"homepage,omitempty"` + IdentifierUris *[]string `json:"identifierUris,omitempty"` + ReplyUrls *[]string `json:"replyUrls,omitempty"` + KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"` + PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"` + Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"` + RequiredResourceAccess *[]RequiredResourceAccess `json:"requiredResourceAccess,omitempty"` } -// CheckGroupMembershipParameters is request parameters for IsMemberOf API -// call. +// CheckGroupMembershipParameters is request parameters for IsMemberOf API call. type CheckGroupMembershipParameters struct { GroupID *string `json:"groupId,omitempty"` MemberID *string `json:"memberId,omitempty"` @@ -106,21 +125,34 @@ type CheckGroupMembershipResult struct { Value *bool `json:"value,omitempty"` } +// Domain is active Directory Domain information. +type Domain struct { + autorest.Response `json:"-"` + AuthenticationType *string `json:"authenticationType,omitempty"` + IsDefault *bool `json:"isDefault,omitempty"` + IsVerified *bool `json:"isVerified,omitempty"` + Name *string `json:"name,omitempty"` +} + +// DomainListResult is server response for Get tenant domains API call. +type DomainListResult struct { + autorest.Response `json:"-"` + Value *[]Domain `json:"value,omitempty"` +} + // ErrorMessage is active Directory error message. type ErrorMessage struct { Message *string `json:"value,omitempty"` } -// GetObjectsParameters is request parameters for the GetObjectsByObjectIds -// API. +// GetObjectsParameters is request parameters for the GetObjectsByObjectIds API. type GetObjectsParameters struct { ObjectIds *[]string `json:"objectIds,omitempty"` Types *[]string `json:"types,omitempty"` IncludeDirectoryObjectReferences *bool `json:"includeDirectoryObjectReferences,omitempty"` } -// GetObjectsResult is the response to an Active Directory object inquiry API -// request. +// GetObjectsResult is the response to an Active Directory object inquiry API request. type GetObjectsResult struct { autorest.Response `json:"-"` Value *[]AADObject `json:"value,omitempty"` @@ -132,8 +164,7 @@ type GraphError struct { *OdataError `json:"odata.error,omitempty"` } -// GroupAddMemberParameters is request parameters for adding a member to a -// group. +// GroupAddMemberParameters is request parameters for adding a member to a group. type GroupAddMemberParameters struct { URL *string `json:"url,omitempty"` } @@ -146,8 +177,7 @@ type GroupCreateParameters struct { SecurityEnabled *bool `json:"securityEnabled,omitempty"` } -// GroupGetMemberGroupsParameters is request parameters for GetMemberGroups API -// call. +// GroupGetMemberGroupsParameters is request parameters for GetMemberGroups API call. type GroupGetMemberGroupsParameters struct { SecurityEnabledOnly *bool `json:"securityEnabledOnly,omitempty"` } @@ -181,8 +211,7 @@ type KeyCredentialListResult struct { Value *[]KeyCredential `json:"value,omitempty"` } -// KeyCredentialsUpdateParameters is request parameters for a KeyCredentials -// update operation +// KeyCredentialsUpdateParameters is request parameters for a KeyCredentials update operation type KeyCredentialsUpdateParameters struct { Value *[]KeyCredential `json:"value,omitempty"` } @@ -207,8 +236,7 @@ type PasswordCredentialListResult struct { Value *[]PasswordCredential `json:"value,omitempty"` } -// PasswordCredentialsUpdateParameters is request parameters for a -// PasswordCredentials update operation. +// PasswordCredentialsUpdateParameters is request parameters for a PasswordCredentials update operation. type PasswordCredentialsUpdateParameters struct { Value *[]PasswordCredential `json:"value,omitempty"` } @@ -219,6 +247,22 @@ type PasswordProfile struct { ForceChangePasswordNextLogin *bool `json:"forceChangePasswordNextLogin,omitempty"` } +// RequiredResourceAccess is specifies the set of OAuth 2.0 permission scopes and app roles under the specified +// resource that an application requires access to. The specified OAuth 2.0 permission scopes may be requested by +// client applications (through the requiredResourceAccess collection) when calling a resource application. The +// requiredResourceAccess property of the Application entity is a collection of ReqiredResourceAccess. +type RequiredResourceAccess struct { + ResourceAccess *[]ResourceAccess `json:"resourceAccess,omitempty"` + ResourceAppID *string `json:"resourceAppId,omitempty"` +} + +// ResourceAccess is specifies an OAuth 2.0 permission scope or an app role that an application requires. The +// resourceAccess property of the RequiredResourceAccess type is a collection of ResourceAccess. +type ResourceAccess struct { + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` +} + // ServicePrincipal is active Directory service principal information. type ServicePrincipal struct { autorest.Response `json:"-"` @@ -229,8 +273,7 @@ type ServicePrincipal struct { ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"` } -// ServicePrincipalCreateParameters is request parameters for creating a new -// service principal. +// ServicePrincipalCreateParameters is request parameters for creating a new service principal. type ServicePrincipalCreateParameters struct { AppID *string `json:"appId,omitempty"` AccountEnabled *bool `json:"accountEnabled,omitempty"` @@ -238,39 +281,63 @@ type ServicePrincipalCreateParameters struct { PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"` } -// ServicePrincipalListResult is server response for get tenant service -// principals API call. +// ServicePrincipalListResult is server response for get tenant service principals API call. type ServicePrincipalListResult struct { autorest.Response `json:"-"` Value *[]ServicePrincipal `json:"value,omitempty"` OdataNextLink *string `json:"odata.nextLink,omitempty"` } +// SignInName is contains information about a sign-in name of a local account user in an Azure Active Directory B2C +// tenant. +type SignInName struct { + Type *string `json:"type,omitempty"` + Value *string `json:"value,omitempty"` +} + // User is active Directory user information. type User struct { autorest.Response `json:"-"` - ObjectID *string `json:"objectId,omitempty"` - ObjectType *string `json:"objectType,omitempty"` - UserPrincipalName *string `json:"userPrincipalName,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - SignInName *string `json:"signInName,omitempty"` - Mail *string `json:"mail,omitempty"` - MailNickname *string `json:"mailNickname,omitempty"` + ImmutableID *string `json:"immutableId,omitempty"` + UsageLocation *string `json:"usageLocation,omitempty"` + GivenName *string `json:"givenName,omitempty"` + Surname *string `json:"surname,omitempty"` + UserType UserType `json:"userType,omitempty"` + AccountEnabled *bool `json:"accountEnabled,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + UserPrincipalName *string `json:"userPrincipalName,omitempty"` + MailNickname *string `json:"mailNickname,omitempty"` + Mail *string `json:"mail,omitempty"` + ObjectID *string `json:"objectId,omitempty"` + ObjectType *string `json:"objectType,omitempty"` + SignInNames *[]SignInName `json:"signInNames,omitempty"` } -// UserCreateParameters is request parameters for creating a new work or school -// account user. +// UserBase is +type UserBase struct { + ImmutableID *string `json:"immutableId,omitempty"` + UsageLocation *string `json:"usageLocation,omitempty"` + GivenName *string `json:"givenName,omitempty"` + Surname *string `json:"surname,omitempty"` + UserType UserType `json:"userType,omitempty"` +} + +// UserCreateParameters is request parameters for creating a new work or school account user. type UserCreateParameters struct { + ImmutableID *string `json:"immutableId,omitempty"` + UsageLocation *string `json:"usageLocation,omitempty"` + GivenName *string `json:"givenName,omitempty"` + Surname *string `json:"surname,omitempty"` + UserType UserType `json:"userType,omitempty"` AccountEnabled *bool `json:"accountEnabled,omitempty"` DisplayName *string `json:"displayName,omitempty"` PasswordProfile *PasswordProfile `json:"passwordProfile,omitempty"` UserPrincipalName *string `json:"userPrincipalName,omitempty"` MailNickname *string `json:"mailNickname,omitempty"` - ImmutableID *string `json:"immutableId,omitempty"` + Mail *string `json:"mail,omitempty"` } -// UserGetMemberGroupsParameters is request parameters for GetMemberGroups API -// call. +// UserGetMemberGroupsParameters is request parameters for GetMemberGroups API call. type UserGetMemberGroupsParameters struct { SecurityEnabledOnly *bool `json:"securityEnabledOnly,omitempty"` } @@ -288,11 +355,16 @@ type UserListResult struct { OdataNextLink *string `json:"odata.nextLink,omitempty"` } -// UserUpdateParameters is request parameters for updating an existing work or -// school account user. +// UserUpdateParameters is request parameters for updating an existing work or school account user. type UserUpdateParameters struct { - AccountEnabled *bool `json:"accountEnabled,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - PasswordProfile *PasswordProfile `json:"passwordProfile,omitempty"` - MailNickname *string `json:"mailNickname,omitempty"` + ImmutableID *string `json:"immutableId,omitempty"` + UsageLocation *string `json:"usageLocation,omitempty"` + GivenName *string `json:"givenName,omitempty"` + Surname *string `json:"surname,omitempty"` + UserType UserType `json:"userType,omitempty"` + AccountEnabled *bool `json:"accountEnabled,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + PasswordProfile *PasswordProfile `json:"passwordProfile,omitempty"` + UserPrincipalName *string `json:"userPrincipalName,omitempty"` + MailNickname *string `json:"mailNickname,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/objects.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/objects.go index b0a7e94da..4d6c6f1d8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/objects.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/objects.go @@ -14,9 +14,8 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// ObjectsClient is the composite Swagger specification for Azure Active -// Directory Graph RBAC management client. +// ObjectsClient is the the Graph RBAC Management Client type ObjectsClient struct { ManagementClient } @@ -102,8 +100,7 @@ func (client ObjectsClient) GetCurrentUserResponder(resp *http.Response) (result return } -// GetObjectsByObjectIds gets AD group membership for the specified AD object -// IDs. +// GetObjectsByObjectIds gets AD group membership for the specified AD object IDs. // // parameters is objects filtering parameters. func (client ObjectsClient) GetObjectsByObjectIds(parameters GetObjectsParameters) (result GetObjectsResult, err error) { @@ -174,8 +171,52 @@ func (client ObjectsClient) GetObjectsByObjectIdsResponder(resp *http.Response) return } -// GetObjectsByObjectIdsNext gets AD group membership for the specified AD -// object IDs. +// GetObjectsByObjectIdsComplete gets all elements from the list without paging. +func (client ObjectsClient) GetObjectsByObjectIdsComplete(parameters GetObjectsParameters, cancel <-chan struct{}) (<-chan AADObject, <-chan error) { + resultChan := make(chan AADObject) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetObjectsByObjectIds(parameters) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.OdataNextLink != nil { + list, err = client.GetObjectsByObjectIdsNext(*list.OdataNextLink) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetObjectsByObjectIdsNext gets AD group membership for the specified AD object IDs. // // nextLink is next link for the list operation. func (client ObjectsClient) GetObjectsByObjectIdsNext(nextLink string) (result GetObjectsResult, err error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/serviceprincipals.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/serviceprincipals.go index 57a173968..215f8f96c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/serviceprincipals.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/serviceprincipals.go @@ -14,9 +14,8 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,20 +24,17 @@ import ( "net/http" ) -// ServicePrincipalsClient is the composite Swagger specification for Azure -// Active Directory Graph RBAC management client. +// ServicePrincipalsClient is the the Graph RBAC Management Client type ServicePrincipalsClient struct { ManagementClient } -// NewServicePrincipalsClient creates an instance of the -// ServicePrincipalsClient client. +// NewServicePrincipalsClient creates an instance of the ServicePrincipalsClient client. func NewServicePrincipalsClient(tenantID string) ServicePrincipalsClient { return NewServicePrincipalsClientWithBaseURI(DefaultBaseURI, tenantID) } -// NewServicePrincipalsClientWithBaseURI creates an instance of the -// ServicePrincipalsClient client. +// NewServicePrincipalsClientWithBaseURI creates an instance of the ServicePrincipalsClient client. func NewServicePrincipalsClientWithBaseURI(baseURI string, tenantID string) ServicePrincipalsClient { return ServicePrincipalsClient{NewWithBaseURI(baseURI, tenantID)} } @@ -308,11 +304,54 @@ func (client ServicePrincipalsClient) ListResponder(resp *http.Response) (result return } -// ListKeyCredentials get the keyCredentials associated with the specified -// service principal. +// ListComplete gets all elements from the list without paging. +func (client ServicePrincipalsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan ServicePrincipal, <-chan error) { + resultChan := make(chan ServicePrincipal) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.OdataNextLink != nil { + list, err = client.ListNext(*list.OdataNextLink) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeyCredentials get the keyCredentials associated with the specified service principal. // -// objectID is the object ID of the service principal for which to get -// keyCredentials. +// objectID is the object ID of the service principal for which to get keyCredentials. func (client ServicePrincipalsClient) ListKeyCredentials(objectID string) (result KeyCredentialListResult, err error) { req, err := client.ListKeyCredentialsPreparer(objectID) if err != nil { @@ -438,8 +477,7 @@ func (client ServicePrincipalsClient) ListNextResponder(resp *http.Response) (re return } -// ListPasswordCredentials gets the passwordCredentials associated with a -// service principal. +// ListPasswordCredentials gets the passwordCredentials associated with a service principal. // // objectID is the object ID of the service principal. func (client ServicePrincipalsClient) ListPasswordCredentials(objectID string) (result PasswordCredentialListResult, err error) { @@ -503,12 +541,10 @@ func (client ServicePrincipalsClient) ListPasswordCredentialsResponder(resp *htt return } -// UpdateKeyCredentials update the keyCredentials associated with a service -// principal. +// UpdateKeyCredentials update the keyCredentials associated with a service principal. // -// objectID is the object ID for which to get service principal information. -// parameters is parameters to update the keyCredentials of an existing service -// principal. +// objectID is the object ID for which to get service principal information. parameters is parameters to update the +// keyCredentials of an existing service principal. func (client ServicePrincipalsClient) UpdateKeyCredentials(objectID string, parameters KeyCredentialsUpdateParameters) (result autorest.Response, err error) { req, err := client.UpdateKeyCredentialsPreparer(objectID, parameters) if err != nil { @@ -571,11 +607,10 @@ func (client ServicePrincipalsClient) UpdateKeyCredentialsResponder(resp *http.R return } -// UpdatePasswordCredentials updates the passwordCredentials associated with a -// service principal. +// UpdatePasswordCredentials updates the passwordCredentials associated with a service principal. // -// objectID is the object ID of the service principal. parameters is parameters -// to update the passwordCredentials of an existing service principal. +// objectID is the object ID of the service principal. parameters is parameters to update the passwordCredentials of an +// existing service principal. func (client ServicePrincipalsClient) UpdatePasswordCredentials(objectID string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error) { req, err := client.UpdatePasswordCredentialsPreparer(objectID, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/users.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/users.go index 5722cb92a..242dc7354 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/users.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/users.go @@ -14,9 +14,8 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// UsersClient is the composite Swagger specification for Azure Active -// Directory Graph RBAC management client. +// UsersClient is the the Graph RBAC Management Client type UsersClient struct { ManagementClient } @@ -182,8 +180,7 @@ func (client UsersClient) DeleteResponder(resp *http.Response) (result autorest. // Get gets user information from the directory. // -// upnOrObjectID is the object ID or principal name of the user for which to -// get information. +// upnOrObjectID is the object ID or principal name of the user for which to get information. func (client UsersClient) Get(upnOrObjectID string) (result User, err error) { req, err := client.GetPreparer(upnOrObjectID) if err != nil { @@ -245,11 +242,9 @@ func (client UsersClient) GetResponder(resp *http.Response) (result User, err er return } -// GetMemberGroups gets a collection that contains the object IDs of the groups -// of which the user is a member. +// GetMemberGroups gets a collection that contains the object IDs of the groups of which the user is a member. // -// objectID is the object ID of the user for which to get group membership. -// parameters is user filtering parameters. +// objectID is the object ID of the user for which to get group membership. parameters is user filtering parameters. func (client UsersClient) GetMemberGroups(objectID string, parameters UserGetMemberGroupsParameters) (result UserGetMemberGroupsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -385,6 +380,51 @@ func (client UsersClient) ListResponder(resp *http.Response) (result UserListRes return } +// ListComplete gets all elements from the list without paging. +func (client UsersClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan User, <-chan error) { + resultChan := make(chan User) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.OdataNextLink != nil { + list, err = client.ListNext(*list.OdataNextLink) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListNext gets a list of users for the current tenant. // // nextLink is next link for the list operation. @@ -451,8 +491,8 @@ func (client UsersClient) ListNextResponder(resp *http.Response) (result UserLis // Update updates a user. // -// upnOrObjectID is the object ID or principal name of the user to update. -// parameters is parameters to update an existing user. +// upnOrObjectID is the object ID or principal name of the user to update. parameters is parameters to update an +// existing user. func (client UsersClient) Update(upnOrObjectID string, parameters UserUpdateParameters) (result autorest.Response, err error) { req, err := client.UpdatePreparer(upnOrObjectID, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go index 97c90e57c..84c93105b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/graphrbac/version.go @@ -14,15 +14,15 @@ package graphrbac // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-graphrbac/1.6" + return "Azure-SDK-For-Go/v11.0.0-beta arm-graphrbac/1.6" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/applications.go index c3a5cddc5..d5407807e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/applications.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/applications.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// ApplicationsClient is the the HDInsight Management Client. +// ApplicationsClient is the hDInsight Management Client type ApplicationsClient struct { ManagementClient } @@ -34,17 +33,15 @@ func NewApplicationsClient(subscriptionID string) ApplicationsClient { return NewApplicationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationsClientWithBaseURI creates an instance of the -// ApplicationsClient client. +// NewApplicationsClientWithBaseURI creates an instance of the ApplicationsClient client. func NewApplicationsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationsClient { return ApplicationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create the operation creates applications for the HDInsight cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. applicationName is the constant value for the -// applicationName parameters is the application create request. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the +// constant value for the applicationName parameters is the application create request. func (client ApplicationsClient) Create(resourceGroupName string, clusterName string, applicationName string, parameters ApplicationGetProperties) (result Application, err error) { req, err := client.CreatePreparer(resourceGroupName, clusterName, applicationName, parameters) if err != nil { @@ -110,14 +107,12 @@ func (client ApplicationsClient) CreateResponder(resp *http.Response) (result Ap return } -// Delete lists all of the applications HDInsight cluster. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete lists all of the applications HDInsight cluster. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. applicationName is the constant value for the -// applicationName. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the +// constant value for the applicationName. func (client ApplicationsClient) Delete(resourceGroupName string, clusterName string, applicationName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -125,8 +120,10 @@ func (client ApplicationsClient) Delete(resourceGroupName string, clusterName st var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -195,10 +192,9 @@ func (client ApplicationsClient) DeleteResponder(resp *http.Response) (result au // Get lists properties of the application. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. applicationName is the constant value for the -// applicationName -func (client ApplicationsClient) Get(resourceGroupName string, clusterName string, applicationName string) (result Application, err error) { +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. applicationName is the +// constant value for the applicationName +func (client ApplicationsClient) Get(resourceGroupName string, clusterName string, applicationName ApplicationName) (result Application, err error) { req, err := client.GetPreparer(resourceGroupName, clusterName, applicationName) if err != nil { err = autorest.NewErrorWithError(err, "hdinsight.ApplicationsClient", "Get", nil, "Failure preparing request") @@ -221,7 +217,7 @@ func (client ApplicationsClient) Get(resourceGroupName string, clusterName strin } // GetPreparer prepares the Get request. -func (client ApplicationsClient) GetPreparer(resourceGroupName string, clusterName string, applicationName string) (*http.Request, error) { +func (client ApplicationsClient) GetPreparer(resourceGroupName string, clusterName string, applicationName ApplicationName) (*http.Request, error) { pathParameters := map[string]interface{}{ "applicationName": autorest.Encode("path", applicationName), "clusterName": autorest.Encode("path", clusterName), @@ -263,8 +259,7 @@ func (client ApplicationsClient) GetResponder(resp *http.Response) (result Appli // List lists all of the applications HDInsight cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. func (client ApplicationsClient) List(resourceGroupName string, clusterName string) (result ApplicationListResult, err error) { req, err := client.ListPreparer(resourceGroupName, clusterName) if err != nil { @@ -350,3 +345,48 @@ func (client ApplicationsClient) ListNextResults(lastResults ApplicationListResu return } + +// ListComplete gets all elements from the list without paging. +func (client ApplicationsClient) ListComplete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan Application, <-chan error) { + resultChan := make(chan Application) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, clusterName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/client.go index f057af2d5..2edfb3bbd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/client.go @@ -1,6 +1,6 @@ -// Package hdinsight implements the Azure ARM Hdinsight service API version . +// Package hdinsight implements the Azure ARM Hdinsight service API version 2015-03-01-preview. // -// The HDInsight Management Client. +// HDInsight Management Client package hdinsight // Copyright (c) Microsoft and contributors. All rights reserved. @@ -17,9 +17,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/clusters.go index 69ec386f6..d56e7be01 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/clusters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/clusters.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// ClustersClient is the the HDInsight Management Client. +// ClustersClient is the hDInsight Management Client type ClustersClient struct { ManagementClient } @@ -35,19 +34,17 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient -// client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// ChangeRdpSettings begins changing the RDP settings on the specified cluster. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ChangeRdpSettings begins changing the RDP settings on the specified cluster. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. parameters is the OS profile for RDP. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the OS +// profile for RDP. func (client ClustersClient) ChangeRdpSettings(resourceGroupName string, clusterName string, parameters RDPSettingsParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -66,8 +63,10 @@ func (client ClustersClient) ChangeRdpSettings(resourceGroupName string, cluster var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -135,13 +134,12 @@ func (client ClustersClient) ChangeRdpSettingsResponder(resp *http.Response) (re return } -// Create begins creating a new HDInsight cluster with the specified -// parameters. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Create begins creating a new HDInsight cluster with the specified parameters. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. parameters is the cluster create request. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the +// cluster create request. func (client ClustersClient) Create(resourceGroupName string, clusterName string, parameters ClusterCreateParametersExtended, cancel <-chan struct{}) (<-chan Cluster, <-chan error) { resultChan := make(chan Cluster, 1) errChan := make(chan error, 1) @@ -149,8 +147,10 @@ func (client ClustersClient) Create(resourceGroupName string, clusterName string var err error var result Cluster defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -219,13 +219,11 @@ func (client ClustersClient) CreateResponder(resp *http.Response) (result Cluste return } -// Delete begins deleting the specified HDInsight cluster. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete begins deleting the specified HDInsight cluster. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. func (client ClustersClient) Delete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -233,8 +231,10 @@ func (client ClustersClient) Delete(resourceGroupName string, clusterName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -300,13 +300,12 @@ func (client ClustersClient) DeleteResponder(resp *http.Response) (result autore return } -// ExecuteScriptActions begins executing script actions on the specified -// HDInsight cluster. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// ExecuteScriptActions begins executing script actions on the specified HDInsight cluster. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. parameters is the parameters for executing script actions. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the +// parameters for executing script actions. func (client ClustersClient) ExecuteScriptActions(resourceGroupName string, clusterName string, parameters ExecuteScriptActionParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -323,8 +322,10 @@ func (client ClustersClient) ExecuteScriptActions(resourceGroupName string, clus var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -394,8 +395,7 @@ func (client ClustersClient) ExecuteScriptActionsResponder(resp *http.Response) // Get gets the specified cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. func (client ClustersClient) Get(resourceGroupName string, clusterName string) (result Cluster, err error) { req, err := client.GetPreparer(resourceGroupName, clusterName) if err != nil { @@ -543,6 +543,51 @@ func (client ClustersClient) ListNextResults(lastResults ClusterListResult) (res return } +// ListComplete gets all elements from the list without paging. +func (client ClustersClient) ListComplete(cancel <-chan struct{}) (<-chan Cluster, <-chan error) { + resultChan := make(chan Cluster) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup list the HDInsight clusters in a resource group. // // resourceGroupName is the name of the resource group. @@ -631,14 +676,57 @@ func (client ClustersClient) ListByResourceGroupNextResults(lastResults ClusterL return } -// Resize begins a resize operation on the specified HDInsight cluster. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ClustersClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Cluster, <-chan error) { + resultChan := make(chan Cluster) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Resize begins a resize operation on the specified HDInsight cluster. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. roleName is the constant value for the roleName parameters -// is the parameters for the resize operation. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. roleName is the +// constant value for the roleName parameters is the parameters for the resize operation. func (client ClustersClient) Resize(resourceGroupName string, clusterName string, roleName string, parameters ClusterResizeParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -646,8 +734,10 @@ func (client ClustersClient) Resize(resourceGroupName string, clusterName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -718,8 +808,8 @@ func (client ClustersClient) ResizeResponder(resp *http.Response) (result autore // Update patch HDInsight cluster with the specified parameters. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. parameters is the cluster patch request. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the +// cluster patch request. func (client ClustersClient) Update(resourceGroupName string, clusterName string, parameters ClusterPatchParameters) (result Cluster, err error) { req, err := client.UpdatePreparer(resourceGroupName, clusterName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/configurations.go index a1d3ee221..2f34c1695 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/configurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/configurations.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,28 +23,25 @@ import ( "net/http" ) -// ConfigurationsClient is the the HDInsight Management Client. +// ConfigurationsClient is the hDInsight Management Client type ConfigurationsClient struct { ManagementClient } -// NewConfigurationsClient creates an instance of the ConfigurationsClient -// client. +// NewConfigurationsClient creates an instance of the ConfigurationsClient client. func NewConfigurationsClient(subscriptionID string) ConfigurationsClient { return NewConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewConfigurationsClientWithBaseURI creates an instance of the -// ConfigurationsClient client. +// NewConfigurationsClientWithBaseURI creates an instance of the ConfigurationsClient client. func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) ConfigurationsClient { return ConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get the configuration object for the specified cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. configurationName is the constant for configuration type of -// gateway. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. configurationName is +// the constant for configuration type of gateway. func (client ConfigurationsClient) Get(resourceGroupName string, clusterName string, configurationName Configurationname) (result HTTPConnectivitySettings, err error) { req, err := client.GetPreparer(resourceGroupName, clusterName, configurationName) if err != nil { @@ -109,14 +105,12 @@ func (client ConfigurationsClient) GetResponder(resp *http.Response) (result HTT return } -// UpdateHTTPSettings begins configuring the HTTP settings on the specified -// cluster. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel +// UpdateHTTPSettings begins configuring the HTTP settings on the specified cluster. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. configurationName is the constant for configuration type of -// gateway. parameters is the name of the resource group. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. configurationName is +// the constant for configuration type of gateway. parameters is the name of the resource group. func (client ConfigurationsClient) UpdateHTTPSettings(resourceGroupName string, clusterName string, configurationName string, parameters HTTPConnectivitySettings, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -124,8 +118,10 @@ func (client ConfigurationsClient) UpdateHTTPSettings(resourceGroupName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/extension.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/extension.go index 348ef8368..843284652 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/extension.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/extension.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// ExtensionClient is the the HDInsight Management Client. +// ExtensionClient is the hDInsight Management Client type ExtensionClient struct { ManagementClient } @@ -34,17 +33,15 @@ func NewExtensionClient(subscriptionID string) ExtensionClient { return NewExtensionClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExtensionClientWithBaseURI creates an instance of the ExtensionClient -// client. +// NewExtensionClientWithBaseURI creates an instance of the ExtensionClient client. func NewExtensionClientWithBaseURI(baseURI string, subscriptionID string) ExtensionClient { return ExtensionClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create create HDInsight cluster extension. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. parameters is the cluster extensions create request. -// extensionName is the name of the cluster extension. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. parameters is the +// cluster extensions create request. extensionName is the name of the cluster extension. func (client ExtensionClient) Create(resourceGroupName string, clusterName string, parameters Extension, extensionName string) (result autorest.Response, err error) { req, err := client.CreatePreparer(resourceGroupName, clusterName, parameters, extensionName) if err != nil { @@ -111,8 +108,8 @@ func (client ExtensionClient) CreateResponder(resp *http.Response) (result autor // Delete delete extension for HDInsight cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. extensionName is the name of the cluster extension. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. extensionName is the +// name of the cluster extension. func (client ExtensionClient) Delete(resourceGroupName string, clusterName string, extensionName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, clusterName, extensionName) if err != nil { @@ -177,8 +174,8 @@ func (client ExtensionClient) DeleteResponder(resp *http.Response) (result autor // Get get extension properties for HDInsight cluster extension. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. extensionName is the name of the cluster extension. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. extensionName is the +// name of the cluster extension. func (client ExtensionClient) Get(resourceGroupName string, clusterName string, extensionName string) (result Extension, err error) { req, err := client.GetPreparer(resourceGroupName, clusterName, extensionName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/location.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/location.go index 8a94df775..a70564aca 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/location.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/location.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// LocationClient is the the HDInsight Management Client. +// LocationClient is the hDInsight Management Client type LocationClient struct { ManagementClient } @@ -34,8 +33,7 @@ func NewLocationClient(subscriptionID string) LocationClient { return NewLocationClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocationClientWithBaseURI creates an instance of the LocationClient -// client. +// NewLocationClientWithBaseURI creates an instance of the LocationClient client. func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) LocationClient { return LocationClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/models.go index f151cb7d5..0b42cd264 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/models.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,6 +24,9 @@ import ( "net/http" ) +// ApplicationName enumerates the values for application name. +type ApplicationName string + // AsyncOperationState enumerates the values for async operation state. type AsyncOperationState string @@ -37,25 +39,23 @@ const ( Succeeded AsyncOperationState = "Succeeded" ) -// ClusterProvisioningState enumerates the values for cluster provisioning -// state. +// ClusterProvisioningState enumerates the values for cluster provisioning state. type ClusterProvisioningState string const ( - // ClusterProvisioningStateCanceled specifies the cluster provisioning - // state canceled state for cluster provisioning state. + // ClusterProvisioningStateCanceled specifies the cluster provisioning state canceled state for cluster provisioning + // state. ClusterProvisioningStateCanceled ClusterProvisioningState = "Canceled" - // ClusterProvisioningStateDeleting specifies the cluster provisioning - // state deleting state for cluster provisioning state. + // ClusterProvisioningStateDeleting specifies the cluster provisioning state deleting state for cluster provisioning + // state. ClusterProvisioningStateDeleting ClusterProvisioningState = "Deleting" - // ClusterProvisioningStateFailed specifies the cluster provisioning state - // failed state for cluster provisioning state. + // ClusterProvisioningStateFailed specifies the cluster provisioning state failed state for cluster provisioning state. ClusterProvisioningStateFailed ClusterProvisioningState = "Failed" - // ClusterProvisioningStateInProgress specifies the cluster provisioning - // state in progress state for cluster provisioning state. + // ClusterProvisioningStateInProgress specifies the cluster provisioning state in progress state for cluster + // provisioning state. ClusterProvisioningStateInProgress ClusterProvisioningState = "InProgress" - // ClusterProvisioningStateSucceeded specifies the cluster provisioning - // state succeeded state for cluster provisioning state. + // ClusterProvisioningStateSucceeded specifies the cluster provisioning state succeeded state for cluster provisioning + // state. ClusterProvisioningStateSucceeded ClusterProvisioningState = "Succeeded" ) @@ -140,9 +140,8 @@ type ApplicationGetProperties struct { AdditionalProperties *string `json:"additionalProperties,omitempty"` } -// ApplicationListResult is result of the request to list cluster Applications. -// It contains a list of operations and a URL link to get the next set of -// results. +// ApplicationListResult is result of the request to list cluster Applications. It contains a list of operations and a +// URL link to get the next set of results. type ApplicationListResult struct { autorest.Response `json:"-"` Value *[]Application `json:"value,omitempty"` @@ -226,8 +225,7 @@ type ClusterGetProperties struct { ConnectivityEndpoints *[]ConnectivityEndpoint `json:"connectivityEndpoints,omitempty"` } -// ClusterListPersistedScriptActionsResult is list PersistedScriptActions -// operations response. +// ClusterListPersistedScriptActionsResult is list PersistedScriptActions operations response. type ClusterListPersistedScriptActionsResult struct { Value *[]RuntimeScriptAction `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` @@ -252,8 +250,7 @@ func (client ClusterListResult) ClusterListResultPreparer() (*http.Request, erro autorest.WithBaseURL(to.String(client.NextLink))) } -// ClusterListRuntimeScriptActionDetailResult is the ListScriptExecutionHistory -// response. +// ClusterListRuntimeScriptActionDetailResult is the ListScriptExecutionHistory response. type ClusterListRuntimeScriptActionDetailResult struct { Value *[]RuntimeScriptActionDetail `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` @@ -288,8 +285,7 @@ type Errors struct { Message *string `json:"message,omitempty"` } -// ExecuteScriptActionParameters is describes the script actions on a running -// cluster. +// ExecuteScriptActionParameters is describes the script actions on a running cluster. type ExecuteScriptActionParameters struct { ScriptActions *[]RuntimeScriptAction `json:"scriptActions,omitempty"` PersistOnSuccess *string `json:"persistOnSuccess,omitempty"` @@ -307,8 +303,7 @@ type HardwareProfile struct { VMSize *string `json:"vmSize,omitempty"` } -// HTTPConnectivitySettings is the payload for a Configure HTTP settings -// request. +// HTTPConnectivitySettings is the payload for a Configure HTTP settings request. type HTTPConnectivitySettings struct { autorest.Response `json:"-"` EnabledCredential *string `json:"restAuthCredential.isEnabled,omitempty"` @@ -318,13 +313,12 @@ type HTTPConnectivitySettings struct { // HTTPSettingsParameters is the payload for a Configure HTTP settings request. type HTTPSettingsParameters struct { - RestAuthCredentialisEnabled *string `json:"restAuthCredential.isEnabled,omitempty"` - RestAuthCredentialusername *string `json:"restAuthCredential.username,omitempty"` - RestAuthCredentialpassword *string `json:"restAuthCredential.password,omitempty"` + RestAuthCredentialIsEnabled *string `json:"restAuthCredential.isEnabled,omitempty"` + RestAuthCredentialUsername *string `json:"restAuthCredential.username,omitempty"` + RestAuthCredentialPassword *string `json:"restAuthCredential.password,omitempty"` } -// LinuxOperatingSystemProfile is the ssh username, password, and ssh public -// key. +// LinuxOperatingSystemProfile is the ssh username, password, and ssh public key. type LinuxOperatingSystemProfile struct { Username *string `json:"username,omitempty"` Password *string `json:"password,omitempty"` @@ -344,9 +338,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of the request to list HDInsight operations. -// It contains a list of operations and a URL link to get the next set of -// results. +// OperationListResult is result of the request to list HDInsight operations. It contains a list of operations and a +// URL link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -371,8 +364,7 @@ type OperationResource struct { Error *Errors `json:"error,omitempty"` } -// OsProfile is the Windows operation systems profile, and configure remote -// desktop settings. +// OsProfile is the Windows operation systems profile, and configure remote desktop settings. type OsProfile struct { WindowsOperatingSystemProfile *WindowsOperatingSystemProfile `json:"windowsOperatingSystemProfile,omitempty"` LinuxOperatingSystemProfile *LinuxOperatingSystemProfile `json:"linuxOperatingSystemProfile,omitempty"` @@ -395,8 +387,7 @@ type RdpSettings struct { ExpiryDate *date.Date `json:"expiryDate,omitempty"` } -// RDPSettingsParameters is parameters specifying the data factory gateway -// definition for a create or update operation. +// RDPSettingsParameters is parameters specifying the data factory gateway definition for a create or update operation. type RDPSettingsParameters struct { OsProfile *OsProfile `json:"osProfile,omitempty"` } @@ -442,8 +433,7 @@ type RuntimeScriptAction struct { ApplicationName *string `json:"applicationName,omitempty"` } -// RuntimeScriptActionDetail is describes the execution details of a script -// action. +// RuntimeScriptActionDetail is describes the execution details of a script action. type RuntimeScriptActionDetail struct { autorest.Response `json:"-"` ScriptExecutionID *int64 `json:"scriptExecutionId,omitempty"` @@ -486,15 +476,13 @@ func (client ScriptActionExecutionHistoryList) ScriptActionExecutionHistoryListP autorest.WithBaseURL(to.String(client.NextLink))) } -// ScriptActionExecutionSummary is describes the execution summary of a script -// action. +// ScriptActionExecutionSummary is describes the execution summary of a script action. type ScriptActionExecutionSummary struct { Status *string `json:"status,omitempty"` InstanceCount *int32 `json:"instanceCount,omitempty"` } -// ScriptActionPersistedGetResponseSpec is the persisted script action for -// cluster +// ScriptActionPersistedGetResponseSpec is the persisted script action for cluster type ScriptActionPersistedGetResponseSpec struct { Name *string `json:"name,omitempty"` URI *string `json:"uri,omitempty"` @@ -522,8 +510,7 @@ func (client ScriptActionsList) ScriptActionsListPreparer() (*http.Request, erro autorest.WithBaseURL(to.String(client.NextLink))) } -// SecurityProfile is the security profile which contains Ssh public key for -// the HDInsight cluster. +// SecurityProfile is the security profile which contains Ssh public key for the HDInsight cluster. type SecurityProfile struct { DirectoryType DirectoryType `json:"directoryType,omitempty"` Domain *string `json:"domain,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/operations.go index ee3e33792..3b2805163 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/operations.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// OperationsClient is the the HDInsight Management Client. +// OperationsClient is the hDInsight Management Client type OperationsClient struct { ManagementClient } @@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -120,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptactions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptactions.go index 9b5917edf..d0b79a297 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptactions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptactions.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,27 +23,25 @@ import ( "net/http" ) -// ScriptActionsClient is the the HDInsight Management Client. +// ScriptActionsClient is the hDInsight Management Client type ScriptActionsClient struct { ManagementClient } -// NewScriptActionsClient creates an instance of the ScriptActionsClient -// client. +// NewScriptActionsClient creates an instance of the ScriptActionsClient client. func NewScriptActionsClient(subscriptionID string) ScriptActionsClient { return NewScriptActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScriptActionsClientWithBaseURI creates an instance of the -// ScriptActionsClient client. +// NewScriptActionsClientWithBaseURI creates an instance of the ScriptActionsClient client. func NewScriptActionsClientWithBaseURI(baseURI string, subscriptionID string) ScriptActionsClient { return ScriptActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Delete deletes a given persisted script action of the cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. scriptName is the name of the script. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. scriptName is the name +// of the script. func (client ScriptActionsClient) Delete(resourceGroupName string, clusterName string, scriptName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, clusterName, scriptName) if err != nil { @@ -109,8 +106,7 @@ func (client ScriptActionsClient) DeleteResponder(resp *http.Response) (result a // List lists all persisted script actions for the given cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. func (client ScriptActionsClient) List(resourceGroupName string, clusterName string) (result ScriptActionsList, err error) { req, err := client.ListPreparer(resourceGroupName, clusterName) if err != nil { @@ -196,3 +192,48 @@ func (client ScriptActionsClient) ListNextResults(lastResults ScriptActionsList) return } + +// ListComplete gets all elements from the list without paging. +func (client ScriptActionsClient) ListComplete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan RuntimeScriptActionDetail, <-chan error) { + resultChan := make(chan RuntimeScriptActionDetail) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, clusterName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptexecutionhistory.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptexecutionhistory.go index dd06c170c..2db571913 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptexecutionhistory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/scriptexecutionhistory.go @@ -14,9 +14,8 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,27 +23,25 @@ import ( "net/http" ) -// ScriptExecutionHistoryClient is the the HDInsight Management Client. +// ScriptExecutionHistoryClient is the hDInsight Management Client type ScriptExecutionHistoryClient struct { ManagementClient } -// NewScriptExecutionHistoryClient creates an instance of the -// ScriptExecutionHistoryClient client. +// NewScriptExecutionHistoryClient creates an instance of the ScriptExecutionHistoryClient client. func NewScriptExecutionHistoryClient(subscriptionID string) ScriptExecutionHistoryClient { return NewScriptExecutionHistoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the -// ScriptExecutionHistoryClient client. +// NewScriptExecutionHistoryClientWithBaseURI creates an instance of the ScriptExecutionHistoryClient client. func NewScriptExecutionHistoryClientWithBaseURI(baseURI string, subscriptionID string) ScriptExecutionHistoryClient { return ScriptExecutionHistoryClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets the script execution detail for the given script execution id. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. scriptExecutionID is the script execution Id +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. scriptExecutionID is +// the script execution Id func (client ScriptExecutionHistoryClient) Get(resourceGroupName string, clusterName string, scriptExecutionID string) (result RuntimeScriptActionDetail, err error) { req, err := client.GetPreparer(resourceGroupName, clusterName, scriptExecutionID) if err != nil { @@ -110,8 +107,7 @@ func (client ScriptExecutionHistoryClient) GetResponder(resp *http.Response) (re // List lists all scripts execution history for the given cluster. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. func (client ScriptExecutionHistoryClient) List(resourceGroupName string, clusterName string) (result ScriptActionExecutionHistoryList, err error) { req, err := client.ListPreparer(resourceGroupName, clusterName) if err != nil { @@ -198,10 +194,55 @@ func (client ScriptExecutionHistoryClient) ListNextResults(lastResults ScriptAct return } +// ListComplete gets all elements from the list without paging. +func (client ScriptExecutionHistoryClient) ListComplete(resourceGroupName string, clusterName string, cancel <-chan struct{}) (<-chan RuntimeScriptActionDetail, <-chan error) { + resultChan := make(chan RuntimeScriptActionDetail) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, clusterName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Promote promote ad-hoc script execution to a persisted script. // -// resourceGroupName is the name of the resource group. clusterName is the name -// of the cluster. scriptExecutionID is the script execution Id +// resourceGroupName is the name of the resource group. clusterName is the name of the cluster. scriptExecutionID is +// the script execution Id func (client ScriptExecutionHistoryClient) Promote(resourceGroupName string, clusterName string, scriptExecutionID int64) (result autorest.Response, err error) { req, err := client.PromotePreparer(resourceGroupName, clusterName, scriptExecutionID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go index 9d1f5dd2d..c77786bc1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/hdinsight/version.go @@ -14,15 +14,15 @@ package hdinsight // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-hdinsight/2015-03-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-hdinsight/2015-03-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/android.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/android.go index c9813666a..b803b2bab 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/android.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/android.go @@ -14,9 +14,8 @@ package intune // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// AndroidClient is the microsoft.Intune Resource provider Api features in the -// swagger-2.0 specification +// AndroidClient is the microsoft.Intune Resource provider Api features in the swagger-2.0 specification type AndroidClient struct { ManagementClient } @@ -43,9 +41,8 @@ func NewAndroidClientWithBaseURI(baseURI string) AndroidClient { // AddAppForMAMPolicy add app to an AndroidMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy appName is application unique Name parameters is parameters -// supplied to the Create or update app to an android policy operation. +// hostName is location hostName for the tenant policyName is unique name for the policy appName is application unique +// Name parameters is parameters supplied to the Create or update app to an android policy operation. func (client AndroidClient) AddAppForMAMPolicy(hostName string, policyName string, appName string, parameters MAMPolicyAppIDOrGroupIDPayload) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -118,9 +115,8 @@ func (client AndroidClient) AddAppForMAMPolicyResponder(resp *http.Response) (re // AddGroupForMAMPolicy add group to an AndroidMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy groupID is group Id parameters is parameters supplied to the -// Create or update app to an android policy operation. +// hostName is location hostName for the tenant policyName is unique name for the policy groupID is group Id parameters +// is parameters supplied to the Create or update app to an android policy operation. func (client AndroidClient) AddGroupForMAMPolicy(hostName string, policyName string, groupID string, parameters MAMPolicyAppIDOrGroupIDPayload) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -193,9 +189,8 @@ func (client AndroidClient) AddGroupForMAMPolicyResponder(resp *http.Response) ( // CreateOrUpdateMAMPolicy creates or updates AndroidMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy parameters is parameters supplied to the Create or update an -// android policy operation. +// hostName is location hostName for the tenant policyName is unique name for the policy parameters is parameters +// supplied to the Create or update an android policy operation. func (client AndroidClient) CreateOrUpdateMAMPolicy(hostName string, policyName string, parameters AndroidMAMPolicy) (result AndroidMAMPolicy, err error) { req, err := client.CreateOrUpdateMAMPolicyPreparer(hostName, policyName, parameters) if err != nil { @@ -261,8 +256,8 @@ func (client AndroidClient) CreateOrUpdateMAMPolicyResponder(resp *http.Response // DeleteAppForMAMPolicy delete App for Android Policy // -// hostName is location hostName for the tenant policyName is unique name for -// the policy appName is application unique Name +// hostName is location hostName for the tenant policyName is unique name for the policy appName is application unique +// Name func (client AndroidClient) DeleteAppForMAMPolicy(hostName string, policyName string, appName string) (result autorest.Response, err error) { req, err := client.DeleteAppForMAMPolicyPreparer(hostName, policyName, appName) if err != nil { @@ -326,8 +321,8 @@ func (client AndroidClient) DeleteAppForMAMPolicyResponder(resp *http.Response) // DeleteGroupForMAMPolicy delete Group for Android Policy // -// hostName is location hostName for the tenant policyName is unique name for -// the policy groupID is application unique Name +// hostName is location hostName for the tenant policyName is unique name for the policy groupID is application unique +// Name func (client AndroidClient) DeleteGroupForMAMPolicy(hostName string, policyName string, groupID string) (result autorest.Response, err error) { req, err := client.DeleteGroupForMAMPolicyPreparer(hostName, policyName, groupID) if err != nil { @@ -391,8 +386,7 @@ func (client AndroidClient) DeleteGroupForMAMPolicyResponder(resp *http.Response // DeleteMAMPolicy delete Android Policy // -// hostName is location hostName for the tenant policyName is unique name for -// the policy +// hostName is location hostName for the tenant policyName is unique name for the policy func (client AndroidClient) DeleteMAMPolicy(hostName string, policyName string) (result autorest.Response, err error) { req, err := client.DeleteMAMPolicyPreparer(hostName, policyName) if err != nil { @@ -455,9 +449,8 @@ func (client AndroidClient) DeleteMAMPolicyResponder(resp *http.Response) (resul // GetAppForMAMPolicy get apps for an AndroidMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy filter is the filter to apply on the operation. selectParameter -// is select specific fields in entity. +// hostName is location hostName for the tenant policyName is unique name for the policy filter is the filter to apply +// on the operation. selectParameter is select specific fields in entity. func (client AndroidClient) GetAppForMAMPolicy(hostName string, policyName string, filter string, top *int32, selectParameter string) (result ApplicationCollection, err error) { req, err := client.GetAppForMAMPolicyPreparer(hostName, policyName, filter, top, selectParameter) if err != nil { @@ -552,10 +545,54 @@ func (client AndroidClient) GetAppForMAMPolicyNextResults(lastResults Applicatio return } +// GetAppForMAMPolicyComplete gets all elements from the list without paging. +func (client AndroidClient) GetAppForMAMPolicyComplete(hostName string, policyName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan Application, <-chan error) { + resultChan := make(chan Application) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetAppForMAMPolicy(hostName, policyName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetAppForMAMPolicyNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetGroupsForMAMPolicy returns groups for a given AndroidMAMPolicy. // -// hostName is location hostName for the tenant policyName is policy name for -// the tenant +// hostName is location hostName for the tenant policyName is policy name for the tenant func (client AndroidClient) GetGroupsForMAMPolicy(hostName string, policyName string) (result GroupsCollection, err error) { req, err := client.GetGroupsForMAMPolicyPreparer(hostName, policyName) if err != nil { @@ -641,10 +678,55 @@ func (client AndroidClient) GetGroupsForMAMPolicyNextResults(lastResults GroupsC return } +// GetGroupsForMAMPolicyComplete gets all elements from the list without paging. +func (client AndroidClient) GetGroupsForMAMPolicyComplete(hostName string, policyName string, cancel <-chan struct{}) (<-chan GroupItem, <-chan error) { + resultChan := make(chan GroupItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetGroupsForMAMPolicy(hostName, policyName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetGroupsForMAMPolicyNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetMAMPolicies returns Intune Android policies. // -// hostName is location hostName for the tenant filter is the filter to apply -// on the operation. selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant filter is the filter to apply on the operation. selectParameter is +// select specific fields in entity. func (client AndroidClient) GetMAMPolicies(hostName string, filter string, top *int32, selectParameter string) (result AndroidMAMPolicyCollection, err error) { req, err := client.GetMAMPoliciesPreparer(hostName, filter, top, selectParameter) if err != nil { @@ -738,10 +820,55 @@ func (client AndroidClient) GetMAMPoliciesNextResults(lastResults AndroidMAMPoli return } +// GetMAMPoliciesComplete gets all elements from the list without paging. +func (client AndroidClient) GetMAMPoliciesComplete(hostName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan AndroidMAMPolicy, <-chan error) { + resultChan := make(chan AndroidMAMPolicy) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetMAMPolicies(hostName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetMAMPoliciesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetMAMPolicyByName returns AndroidMAMPolicy with given name. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant policyName is unique name for the policy selectParameter is select +// specific fields in entity. func (client AndroidClient) GetMAMPolicyByName(hostName string, policyName string, selectParameter string) (result AndroidMAMPolicy, err error) { req, err := client.GetMAMPolicyByNamePreparer(hostName, policyName, selectParameter) if err != nil { @@ -808,9 +935,8 @@ func (client AndroidClient) GetMAMPolicyByNameResponder(resp *http.Response) (re // PatchMAMPolicy patch AndroidMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy parameters is parameters supplied to the Create or update an -// android policy operation. +// hostName is location hostName for the tenant policyName is unique name for the policy parameters is parameters +// supplied to the Create or update an android policy operation. func (client AndroidClient) PatchMAMPolicy(hostName string, policyName string, parameters AndroidMAMPolicy) (result AndroidMAMPolicy, err error) { req, err := client.PatchMAMPolicyPreparer(hostName, policyName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/client.go index c5b0a0837..ac192e2ad 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/client.go @@ -1,8 +1,6 @@ -// Package intune implements the Azure ARM Intune service API version -// 2015-01-14-preview. +// Package intune implements the Azure ARM Intune service API version 2015-01-14-preview. // -// Microsoft.Intune Resource provider Api features in the swagger-2.0 -// specification +// Microsoft.Intune Resource provider Api features in the swagger-2.0 specification package intune // Copyright (c) Microsoft and contributors. All rights reserved. @@ -19,9 +17,8 @@ package intune // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -55,8 +52,8 @@ func NewWithBaseURI(baseURI string) ManagementClient { // GetApps returns Intune Manageable apps. // -// hostName is location hostName for the tenant filter is the filter to apply -// on the operation. selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant filter is the filter to apply on the operation. selectParameter is +// select specific fields in entity. func (client ManagementClient) GetApps(hostName string, filter string, top *int32, selectParameter string) (result ApplicationCollection, err error) { req, err := client.GetAppsPreparer(hostName, filter, top, selectParameter) if err != nil { @@ -150,6 +147,51 @@ func (client ManagementClient) GetAppsNextResults(lastResults ApplicationCollect return } +// GetAppsComplete gets all elements from the list without paging. +func (client ManagementClient) GetAppsComplete(hostName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan Application, <-chan error) { + resultChan := make(chan Application) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetApps(hostName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetAppsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetLocationByHostName returns location for given tenant. func (client ManagementClient) GetLocationByHostName() (result Location, err error) { req, err := client.GetLocationByHostNamePreparer() @@ -288,10 +330,55 @@ func (client ManagementClient) GetLocationsNextResults(lastResults LocationColle return } +// GetLocationsComplete gets all elements from the list without paging. +func (client ManagementClient) GetLocationsComplete(cancel <-chan struct{}) (<-chan Location, <-chan error) { + resultChan := make(chan Location) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetLocations() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetLocationsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetMAMFlaggedUserByName returns Intune flagged user details // -// hostName is location hostName for the tenant userName is flagged userName -// selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant userName is flagged userName selectParameter is select specific fields +// in entity. func (client ManagementClient) GetMAMFlaggedUserByName(hostName string, userName string, selectParameter string) (result FlaggedUser, err error) { req, err := client.GetMAMFlaggedUserByNamePreparer(hostName, userName, selectParameter) if err != nil { @@ -358,8 +445,8 @@ func (client ManagementClient) GetMAMFlaggedUserByNameResponder(resp *http.Respo // GetMAMFlaggedUsers returns Intune flagged user collection // -// hostName is location hostName for the tenant filter is the filter to apply -// on the operation. selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant filter is the filter to apply on the operation. selectParameter is +// select specific fields in entity. func (client ManagementClient) GetMAMFlaggedUsers(hostName string, filter string, top *int32, selectParameter string) (result FlaggedUserCollection, err error) { req, err := client.GetMAMFlaggedUsersPreparer(hostName, filter, top, selectParameter) if err != nil { @@ -453,6 +540,51 @@ func (client ManagementClient) GetMAMFlaggedUsersNextResults(lastResults Flagged return } +// GetMAMFlaggedUsersComplete gets all elements from the list without paging. +func (client ManagementClient) GetMAMFlaggedUsersComplete(hostName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan FlaggedUser, <-chan error) { + resultChan := make(chan FlaggedUser) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetMAMFlaggedUsers(hostName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetMAMFlaggedUsersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetMAMStatuses returns Intune Tenant level statuses. // // hostName is location hostName for the tenant @@ -542,9 +674,8 @@ func (client ManagementClient) GetMAMStatusesNextResults(lastResults StatusesDef // GetMAMUserDeviceByDeviceName get a unique device for a user. // -// hostName is location hostName for the tenant userName is unique user name -// deviceName is device name selectParameter is select specific fields in -// entity. +// hostName is location hostName for the tenant userName is unique user name deviceName is device name selectParameter +// is select specific fields in entity. func (client ManagementClient) GetMAMUserDeviceByDeviceName(hostName string, userName string, deviceName string, selectParameter string) (result Device, err error) { req, err := client.GetMAMUserDeviceByDeviceNamePreparer(hostName, userName, deviceName, selectParameter) if err != nil { @@ -612,9 +743,8 @@ func (client ManagementClient) GetMAMUserDeviceByDeviceNameResponder(resp *http. // GetMAMUserDevices get devices for a user. // -// hostName is location hostName for the tenant userName is user unique Name -// filter is the filter to apply on the operation. selectParameter is select -// specific fields in entity. +// hostName is location hostName for the tenant userName is user unique Name filter is the filter to apply on the +// operation. selectParameter is select specific fields in entity. func (client ManagementClient) GetMAMUserDevices(hostName string, userName string, filter string, top *int32, selectParameter string) (result DeviceCollection, err error) { req, err := client.GetMAMUserDevicesPreparer(hostName, userName, filter, top, selectParameter) if err != nil { @@ -709,12 +839,55 @@ func (client ManagementClient) GetMAMUserDevicesNextResults(lastResults DeviceCo return } -// GetMAMUserFlaggedEnrolledApps returns Intune flagged enrolled app collection -// for the User +// GetMAMUserDevicesComplete gets all elements from the list without paging. +func (client ManagementClient) GetMAMUserDevicesComplete(hostName string, userName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan Device, <-chan error) { + resultChan := make(chan Device) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetMAMUserDevices(hostName, userName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetMAMUserDevicesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetMAMUserFlaggedEnrolledApps returns Intune flagged enrolled app collection for the User // -// hostName is location hostName for the tenant userName is user name for the -// tenant filter is the filter to apply on the operation. selectParameter is -// select specific fields in entity. +// hostName is location hostName for the tenant userName is user name for the tenant filter is the filter to apply on +// the operation. selectParameter is select specific fields in entity. func (client ManagementClient) GetMAMUserFlaggedEnrolledApps(hostName string, userName string, filter string, top *int32, selectParameter string) (result FlaggedEnrolledAppCollection, err error) { req, err := client.GetMAMUserFlaggedEnrolledAppsPreparer(hostName, userName, filter, top, selectParameter) if err != nil { @@ -809,10 +982,55 @@ func (client ManagementClient) GetMAMUserFlaggedEnrolledAppsNextResults(lastResu return } +// GetMAMUserFlaggedEnrolledAppsComplete gets all elements from the list without paging. +func (client ManagementClient) GetMAMUserFlaggedEnrolledAppsComplete(hostName string, userName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan FlaggedEnrolledApp, <-chan error) { + resultChan := make(chan FlaggedEnrolledApp) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetMAMUserFlaggedEnrolledApps(hostName, userName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetMAMUserFlaggedEnrolledAppsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetOperationResults returns operationResults. // -// hostName is location hostName for the tenant filter is the filter to apply -// on the operation. selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant filter is the filter to apply on the operation. selectParameter is +// select specific fields in entity. func (client ManagementClient) GetOperationResults(hostName string, filter string, top *int32, selectParameter string) (result OperationResultCollection, err error) { req, err := client.GetOperationResultsPreparer(hostName, filter, top, selectParameter) if err != nil { @@ -906,10 +1124,54 @@ func (client ManagementClient) GetOperationResultsNextResults(lastResults Operat return } +// GetOperationResultsComplete gets all elements from the list without paging. +func (client ManagementClient) GetOperationResultsComplete(hostName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan OperationResult, <-chan error) { + resultChan := make(chan OperationResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetOperationResults(hostName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetOperationResultsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // WipeMAMUserDevice wipe a device for a user. // -// hostName is location hostName for the tenant userName is unique user name -// deviceName is device name +// hostName is location hostName for the tenant userName is unique user name deviceName is device name func (client ManagementClient) WipeMAMUserDevice(hostName string, userName string, deviceName string) (result WipeDeviceOperationResult, err error) { req, err := client.WipeMAMUserDevicePreparer(hostName, userName, deviceName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/ios.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/ios.go index bcd4edd66..0ef1eeced 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/ios.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/ios.go @@ -14,9 +14,8 @@ package intune // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// IosClient is the microsoft.Intune Resource provider Api features in the -// swagger-2.0 specification +// IosClient is the microsoft.Intune Resource provider Api features in the swagger-2.0 specification type IosClient struct { ManagementClient } @@ -43,9 +41,8 @@ func NewIosClientWithBaseURI(baseURI string) IosClient { // AddAppForMAMPolicy add app to an iOSMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy appName is application unique Name parameters is parameters -// supplied to add an app to an ios policy. +// hostName is location hostName for the tenant policyName is unique name for the policy appName is application unique +// Name parameters is parameters supplied to add an app to an ios policy. func (client IosClient) AddAppForMAMPolicy(hostName string, policyName string, appName string, parameters MAMPolicyAppIDOrGroupIDPayload) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -118,9 +115,8 @@ func (client IosClient) AddAppForMAMPolicyResponder(resp *http.Response) (result // AddGroupForMAMPolicy add group to an iOSMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy groupID is group Id parameters is parameters supplied to the -// Create or update app to an android policy operation. +// hostName is location hostName for the tenant policyName is unique name for the policy groupID is group Id parameters +// is parameters supplied to the Create or update app to an android policy operation. func (client IosClient) AddGroupForMAMPolicy(hostName string, policyName string, groupID string, parameters MAMPolicyAppIDOrGroupIDPayload) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -193,9 +189,8 @@ func (client IosClient) AddGroupForMAMPolicyResponder(resp *http.Response) (resu // CreateOrUpdateMAMPolicy creates or updates iOSMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy parameters is parameters supplied to the Create or update an -// android policy operation. +// hostName is location hostName for the tenant policyName is unique name for the policy parameters is parameters +// supplied to the Create or update an android policy operation. func (client IosClient) CreateOrUpdateMAMPolicy(hostName string, policyName string, parameters IOSMAMPolicy) (result IOSMAMPolicy, err error) { req, err := client.CreateOrUpdateMAMPolicyPreparer(hostName, policyName, parameters) if err != nil { @@ -261,8 +256,8 @@ func (client IosClient) CreateOrUpdateMAMPolicyResponder(resp *http.Response) (r // DeleteAppForMAMPolicy delete App for Ios Policy // -// hostName is location hostName for the tenant policyName is unique name for -// the policy appName is application unique Name +// hostName is location hostName for the tenant policyName is unique name for the policy appName is application unique +// Name func (client IosClient) DeleteAppForMAMPolicy(hostName string, policyName string, appName string) (result autorest.Response, err error) { req, err := client.DeleteAppForMAMPolicyPreparer(hostName, policyName, appName) if err != nil { @@ -326,8 +321,8 @@ func (client IosClient) DeleteAppForMAMPolicyResponder(resp *http.Response) (res // DeleteGroupForMAMPolicy delete Group for iOS Policy // -// hostName is location hostName for the tenant policyName is unique name for -// the policy groupID is application unique Name +// hostName is location hostName for the tenant policyName is unique name for the policy groupID is application unique +// Name func (client IosClient) DeleteGroupForMAMPolicy(hostName string, policyName string, groupID string) (result autorest.Response, err error) { req, err := client.DeleteGroupForMAMPolicyPreparer(hostName, policyName, groupID) if err != nil { @@ -391,8 +386,7 @@ func (client IosClient) DeleteGroupForMAMPolicyResponder(resp *http.Response) (r // DeleteMAMPolicy delete Ios Policy // -// hostName is location hostName for the tenant policyName is unique name for -// the policy +// hostName is location hostName for the tenant policyName is unique name for the policy func (client IosClient) DeleteMAMPolicy(hostName string, policyName string) (result autorest.Response, err error) { req, err := client.DeleteMAMPolicyPreparer(hostName, policyName) if err != nil { @@ -455,9 +449,8 @@ func (client IosClient) DeleteMAMPolicyResponder(resp *http.Response) (result au // GetAppForMAMPolicy get apps for an iOSMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy filter is the filter to apply on the operation. selectParameter -// is select specific fields in entity. +// hostName is location hostName for the tenant policyName is unique name for the policy filter is the filter to apply +// on the operation. selectParameter is select specific fields in entity. func (client IosClient) GetAppForMAMPolicy(hostName string, policyName string, filter string, top *int32, selectParameter string) (result ApplicationCollection, err error) { req, err := client.GetAppForMAMPolicyPreparer(hostName, policyName, filter, top, selectParameter) if err != nil { @@ -552,10 +545,54 @@ func (client IosClient) GetAppForMAMPolicyNextResults(lastResults ApplicationCol return } +// GetAppForMAMPolicyComplete gets all elements from the list without paging. +func (client IosClient) GetAppForMAMPolicyComplete(hostName string, policyName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan Application, <-chan error) { + resultChan := make(chan Application) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetAppForMAMPolicy(hostName, policyName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetAppForMAMPolicyNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetGroupsForMAMPolicy returns groups for a given iOSMAMPolicy. // -// hostName is location hostName for the tenant policyName is policy name for -// the tenant +// hostName is location hostName for the tenant policyName is policy name for the tenant func (client IosClient) GetGroupsForMAMPolicy(hostName string, policyName string) (result GroupsCollection, err error) { req, err := client.GetGroupsForMAMPolicyPreparer(hostName, policyName) if err != nil { @@ -641,10 +678,55 @@ func (client IosClient) GetGroupsForMAMPolicyNextResults(lastResults GroupsColle return } +// GetGroupsForMAMPolicyComplete gets all elements from the list without paging. +func (client IosClient) GetGroupsForMAMPolicyComplete(hostName string, policyName string, cancel <-chan struct{}) (<-chan GroupItem, <-chan error) { + resultChan := make(chan GroupItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetGroupsForMAMPolicy(hostName, policyName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetGroupsForMAMPolicyNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetMAMPolicies returns Intune iOSPolicies. // -// hostName is location hostName for the tenant filter is the filter to apply -// on the operation. selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant filter is the filter to apply on the operation. selectParameter is +// select specific fields in entity. func (client IosClient) GetMAMPolicies(hostName string, filter string, top *int32, selectParameter string) (result IOSMAMPolicyCollection, err error) { req, err := client.GetMAMPoliciesPreparer(hostName, filter, top, selectParameter) if err != nil { @@ -738,10 +820,55 @@ func (client IosClient) GetMAMPoliciesNextResults(lastResults IOSMAMPolicyCollec return } +// GetMAMPoliciesComplete gets all elements from the list without paging. +func (client IosClient) GetMAMPoliciesComplete(hostName string, filter string, top *int32, selectParameter string, cancel <-chan struct{}) (<-chan IOSMAMPolicy, <-chan error) { + resultChan := make(chan IOSMAMPolicy) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetMAMPolicies(hostName, filter, top, selectParameter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.Nextlink != nil { + list, err = client.GetMAMPoliciesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetMAMPolicyByName returns Intune iOS policies. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy selectParameter is select specific fields in entity. +// hostName is location hostName for the tenant policyName is unique name for the policy selectParameter is select +// specific fields in entity. func (client IosClient) GetMAMPolicyByName(hostName string, policyName string, selectParameter string) (result IOSMAMPolicy, err error) { req, err := client.GetMAMPolicyByNamePreparer(hostName, policyName, selectParameter) if err != nil { @@ -808,9 +935,8 @@ func (client IosClient) GetMAMPolicyByNameResponder(resp *http.Response) (result // PatchMAMPolicy patch an iOSMAMPolicy. // -// hostName is location hostName for the tenant policyName is unique name for -// the policy parameters is parameters supplied to the Create or update an -// android policy operation. +// hostName is location hostName for the tenant policyName is unique name for the policy parameters is parameters +// supplied to the Create or update an android policy operation. func (client IosClient) PatchMAMPolicy(hostName string, policyName string, parameters IOSMAMPolicy) (result IOSMAMPolicy, err error) { req, err := client.PatchMAMPolicyPreparer(hostName, policyName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/models.go index b43970f62..a4f98c32d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/models.go @@ -14,9 +14,8 @@ package intune // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -33,8 +32,7 @@ const ( AllApps AppSharingFromLevel = "allApps" // None specifies the none state for app sharing from level. None AppSharingFromLevel = "none" - // PolicyManagedApps specifies the policy managed apps state for app - // sharing from level. + // PolicyManagedApps specifies the policy managed apps state for app sharing from level. PolicyManagedApps AppSharingFromLevel = "policyManagedApps" ) @@ -42,14 +40,12 @@ const ( type AppSharingToLevel string const ( - // AppSharingToLevelAllApps specifies the app sharing to level all apps - // state for app sharing to level. + // AppSharingToLevelAllApps specifies the app sharing to level all apps state for app sharing to level. AppSharingToLevelAllApps AppSharingToLevel = "allApps" - // AppSharingToLevelNone specifies the app sharing to level none state for - // app sharing to level. + // AppSharingToLevelNone specifies the app sharing to level none state for app sharing to level. AppSharingToLevelNone AppSharingToLevel = "none" - // AppSharingToLevelPolicyManagedApps specifies the app sharing to level - // policy managed apps state for app sharing to level. + // AppSharingToLevelPolicyManagedApps specifies the app sharing to level policy managed apps state for app sharing to + // level. AppSharingToLevelPolicyManagedApps AppSharingToLevel = "policyManagedApps" ) @@ -67,18 +63,15 @@ const ( type ClipboardSharingLevel string const ( - // ClipboardSharingLevelAllApps specifies the clipboard sharing level all - // apps state for clipboard sharing level. + // ClipboardSharingLevelAllApps specifies the clipboard sharing level all apps state for clipboard sharing level. ClipboardSharingLevelAllApps ClipboardSharingLevel = "allApps" - // ClipboardSharingLevelBlocked specifies the clipboard sharing level - // blocked state for clipboard sharing level. + // ClipboardSharingLevelBlocked specifies the clipboard sharing level blocked state for clipboard sharing level. ClipboardSharingLevelBlocked ClipboardSharingLevel = "blocked" - // ClipboardSharingLevelPolicyManagedApps specifies the clipboard sharing - // level policy managed apps state for clipboard sharing level. + // ClipboardSharingLevelPolicyManagedApps specifies the clipboard sharing level policy managed apps state for clipboard + // sharing level. ClipboardSharingLevelPolicyManagedApps ClipboardSharingLevel = "policyManagedApps" - // ClipboardSharingLevelPolicyManagedAppsWithPasteIn specifies the - // clipboard sharing level policy managed apps with paste in state for - // clipboard sharing level. + // ClipboardSharingLevelPolicyManagedAppsWithPasteIn specifies the clipboard sharing level policy managed apps with + // paste in state for clipboard sharing level. ClipboardSharingLevelPolicyManagedAppsWithPasteIn ClipboardSharingLevel = "policyManagedAppsWithPasteIn" ) @@ -106,11 +99,9 @@ const ( type FileEncryption string const ( - // FileEncryptionNotRequired specifies the file encryption not required - // state for file encryption. + // FileEncryptionNotRequired specifies the file encryption not required state for file encryption. FileEncryptionNotRequired FileEncryption = "notRequired" - // FileEncryptionRequired specifies the file encryption required state for - // file encryption. + // FileEncryptionRequired specifies the file encryption required state for file encryption. FileEncryptionRequired FileEncryption = "required" ) @@ -118,17 +109,13 @@ const ( type FileEncryptionLevel string const ( - // AfterDeviceRestart specifies the after device restart state for file - // encryption level. + // AfterDeviceRestart specifies the after device restart state for file encryption level. AfterDeviceRestart FileEncryptionLevel = "afterDeviceRestart" - // DeviceLocked specifies the device locked state for file encryption - // level. + // DeviceLocked specifies the device locked state for file encryption level. DeviceLocked FileEncryptionLevel = "deviceLocked" - // DeviceLockedExceptFilesOpen specifies the device locked except files - // open state for file encryption level. + // DeviceLockedExceptFilesOpen specifies the device locked except files open state for file encryption level. DeviceLockedExceptFilesOpen FileEncryptionLevel = "deviceLockedExceptFilesOpen" - // UseDeviceSettings specifies the use device settings state for file - // encryption level. + // UseDeviceSettings specifies the use device settings state for file encryption level. UseDeviceSettings FileEncryptionLevel = "useDeviceSettings" ) @@ -136,11 +123,9 @@ const ( type FileSharingSaveAs string const ( - // FileSharingSaveAsAllow specifies the file sharing save as allow state - // for file sharing save as. + // FileSharingSaveAsAllow specifies the file sharing save as allow state for file sharing save as. FileSharingSaveAsAllow FileSharingSaveAs = "allow" - // FileSharingSaveAsBlock specifies the file sharing save as block state - // for file sharing save as. + // FileSharingSaveAsBlock specifies the file sharing save as block state for file sharing save as. FileSharingSaveAsBlock FileSharingSaveAs = "block" ) @@ -158,11 +143,9 @@ const ( type ManagedBrowser string const ( - // ManagedBrowserNotRequired specifies the managed browser not required - // state for managed browser. + // ManagedBrowserNotRequired specifies the managed browser not required state for managed browser. ManagedBrowserNotRequired ManagedBrowser = "notRequired" - // ManagedBrowserRequired specifies the managed browser required state for - // managed browser. + // ManagedBrowserRequired specifies the managed browser required state for managed browser. ManagedBrowserRequired ManagedBrowser = "required" ) @@ -192,11 +175,9 @@ const ( type ScreenCapture string const ( - // ScreenCaptureAllow specifies the screen capture allow state for screen - // capture. + // ScreenCaptureAllow specifies the screen capture allow state for screen capture. ScreenCaptureAllow ScreenCapture = "allow" - // ScreenCaptureBlock specifies the screen capture block state for screen - // capture. + // ScreenCaptureBlock specifies the screen capture block state for screen capture. ScreenCaptureBlock ScreenCapture = "block" ) @@ -355,8 +336,7 @@ type FlaggedEnrolledApp struct { *FlaggedEnrolledAppProperties `json:"properties,omitempty"` } -// FlaggedEnrolledAppCollection is flagged Enrolled App collection for the -// given tenant. +// FlaggedEnrolledAppCollection is flagged Enrolled App collection for the given tenant. type FlaggedEnrolledAppCollection struct { autorest.Response `json:"-"` Value *[]FlaggedEnrolledApp `json:"value,omitempty"` @@ -549,14 +529,12 @@ type LocationProperties struct { HostName *string `json:"hostName,omitempty"` } -// MAMPolicyAppIDOrGroupIDPayload is mAM Policy request body for properties -// Intune MAM. +// MAMPolicyAppIDOrGroupIDPayload is MAM Policy request body for properties Intune MAM. type MAMPolicyAppIDOrGroupIDPayload struct { Properties *MAMPolicyAppOrGroupIDProperties `json:"properties,omitempty"` } -// MAMPolicyAppOrGroupIDProperties is android Policy request body for Intune -// MAM. +// MAMPolicyAppOrGroupIDProperties is android Policy request body for Intune MAM. type MAMPolicyAppOrGroupIDProperties struct { URL *string `json:"url,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go index fbf802d8c..38e0192ba 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/intune/version.go @@ -14,15 +14,15 @@ package intune // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-intune/2015-01-14-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-intune/2015-01-14-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/client.go index b54c132ee..f2461d01d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/client.go @@ -1,7 +1,6 @@ -// Package iothub implements the Azure ARM Iothub service API version -// 2016-02-03. +// Package iothub implements the Azure ARM Iothub service API version 2017-07-01. // -// Use this API to manage the IoT hubs in your subscription. +// Use this API to manage the IoT hubs in your Azure subscription. package iothub // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package iothub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/models.go index 6fa4abb25..0fcfdf7fe 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/models.go @@ -14,9 +14,8 @@ package iothub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -33,43 +32,36 @@ const ( DeviceConnect AccessRights = "DeviceConnect" // RegistryRead specifies the registry read state for access rights. RegistryRead AccessRights = "RegistryRead" - // RegistryReadDeviceConnect specifies the registry read device connect - // state for access rights. + // RegistryReadDeviceConnect specifies the registry read device connect state for access rights. RegistryReadDeviceConnect AccessRights = "RegistryRead, DeviceConnect" - // RegistryReadRegistryWrite specifies the registry read registry write - // state for access rights. + // RegistryReadRegistryWrite specifies the registry read registry write state for access rights. RegistryReadRegistryWrite AccessRights = "RegistryRead, RegistryWrite" - // RegistryReadRegistryWriteDeviceConnect specifies the registry read - // registry write device connect state for access rights. + // RegistryReadRegistryWriteDeviceConnect specifies the registry read registry write device connect state for access + // rights. RegistryReadRegistryWriteDeviceConnect AccessRights = "RegistryRead, RegistryWrite, DeviceConnect" - // RegistryReadRegistryWriteServiceConnect specifies the registry read - // registry write service connect state for access rights. + // RegistryReadRegistryWriteServiceConnect specifies the registry read registry write service connect state for access + // rights. RegistryReadRegistryWriteServiceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect" - // RegistryReadRegistryWriteServiceConnectDeviceConnect specifies the - // registry read registry write service connect device connect state for - // access rights. + // RegistryReadRegistryWriteServiceConnectDeviceConnect specifies the registry read registry write service connect + // device connect state for access rights. RegistryReadRegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" - // RegistryReadServiceConnect specifies the registry read service connect - // state for access rights. + // RegistryReadServiceConnect specifies the registry read service connect state for access rights. RegistryReadServiceConnect AccessRights = "RegistryRead, ServiceConnect" - // RegistryReadServiceConnectDeviceConnect specifies the registry read - // service connect device connect state for access rights. + // RegistryReadServiceConnectDeviceConnect specifies the registry read service connect device connect state for access + // rights. RegistryReadServiceConnectDeviceConnect AccessRights = "RegistryRead, ServiceConnect, DeviceConnect" // RegistryWrite specifies the registry write state for access rights. RegistryWrite AccessRights = "RegistryWrite" - // RegistryWriteDeviceConnect specifies the registry write device connect - // state for access rights. + // RegistryWriteDeviceConnect specifies the registry write device connect state for access rights. RegistryWriteDeviceConnect AccessRights = "RegistryWrite, DeviceConnect" - // RegistryWriteServiceConnect specifies the registry write service connect - // state for access rights. + // RegistryWriteServiceConnect specifies the registry write service connect state for access rights. RegistryWriteServiceConnect AccessRights = "RegistryWrite, ServiceConnect" - // RegistryWriteServiceConnectDeviceConnect specifies the registry write - // service connect device connect state for access rights. + // RegistryWriteServiceConnectDeviceConnect specifies the registry write service connect device connect state for + // access rights. RegistryWriteServiceConnectDeviceConnect AccessRights = "RegistryWrite, ServiceConnect, DeviceConnect" // ServiceConnect specifies the service connect state for access rights. ServiceConnect AccessRights = "ServiceConnect" - // ServiceConnectDeviceConnect specifies the service connect device connect - // state for access rights. + // ServiceConnectDeviceConnect specifies the service connect device connect state for access rights. ServiceConnectDeviceConnect AccessRights = "ServiceConnect, DeviceConnect" ) @@ -119,67 +111,69 @@ const ( JobTypeBackup JobType = "backup" // JobTypeExport specifies the job type export state for job type. JobTypeExport JobType = "export" - // JobTypeFactoryResetDevice specifies the job type factory reset device - // state for job type. + // JobTypeFactoryResetDevice specifies the job type factory reset device state for job type. JobTypeFactoryResetDevice JobType = "factoryResetDevice" - // JobTypeFirmwareUpdate specifies the job type firmware update state for - // job type. + // JobTypeFirmwareUpdate specifies the job type firmware update state for job type. JobTypeFirmwareUpdate JobType = "firmwareUpdate" // JobTypeImport specifies the job type import state for job type. JobTypeImport JobType = "import" - // JobTypeReadDeviceProperties specifies the job type read device - // properties state for job type. + // JobTypeReadDeviceProperties specifies the job type read device properties state for job type. JobTypeReadDeviceProperties JobType = "readDeviceProperties" - // JobTypeRebootDevice specifies the job type reboot device state for job - // type. + // JobTypeRebootDevice specifies the job type reboot device state for job type. JobTypeRebootDevice JobType = "rebootDevice" // JobTypeUnknown specifies the job type unknown state for job type. JobTypeUnknown JobType = "unknown" - // JobTypeUpdateDeviceConfiguration specifies the job type update device - // configuration state for job type. + // JobTypeUpdateDeviceConfiguration specifies the job type update device configuration state for job type. JobTypeUpdateDeviceConfiguration JobType = "updateDeviceConfiguration" - // JobTypeWriteDeviceProperties specifies the job type write device - // properties state for job type. + // JobTypeWriteDeviceProperties specifies the job type write device properties state for job type. JobTypeWriteDeviceProperties JobType = "writeDeviceProperties" ) -// NameUnavailabilityReason enumerates the values for name unavailability -// reason. +// NameUnavailabilityReason enumerates the values for name unavailability reason. type NameUnavailabilityReason string const ( - // AlreadyExists specifies the already exists state for name unavailability - // reason. + // AlreadyExists specifies the already exists state for name unavailability reason. AlreadyExists NameUnavailabilityReason = "AlreadyExists" // Invalid specifies the invalid state for name unavailability reason. Invalid NameUnavailabilityReason = "Invalid" ) -// OperationMonitoringLevel enumerates the values for operation monitoring -// level. +// OperationMonitoringLevel enumerates the values for operation monitoring level. type OperationMonitoringLevel string const ( - // OperationMonitoringLevelError specifies the operation monitoring level - // error state for operation monitoring level. + // OperationMonitoringLevelError specifies the operation monitoring level error state for operation monitoring level. OperationMonitoringLevelError OperationMonitoringLevel = "Error" - // OperationMonitoringLevelErrorInformation specifies the operation - // monitoring level error information state for operation monitoring level. + // OperationMonitoringLevelErrorInformation specifies the operation monitoring level error information state for + // operation monitoring level. OperationMonitoringLevelErrorInformation OperationMonitoringLevel = "Error, Information" - // OperationMonitoringLevelInformation specifies the operation monitoring - // level information state for operation monitoring level. + // OperationMonitoringLevelInformation specifies the operation monitoring level information state for operation + // monitoring level. OperationMonitoringLevelInformation OperationMonitoringLevel = "Information" - // OperationMonitoringLevelNone specifies the operation monitoring level - // none state for operation monitoring level. + // OperationMonitoringLevelNone specifies the operation monitoring level none state for operation monitoring level. OperationMonitoringLevelNone OperationMonitoringLevel = "None" ) +// RoutingSource enumerates the values for routing source. +type RoutingSource string + +const ( + // DeviceJobLifecycleEvents specifies the device job lifecycle events state for routing source. + DeviceJobLifecycleEvents RoutingSource = "DeviceJobLifecycleEvents" + // DeviceLifecycleEvents specifies the device lifecycle events state for routing source. + DeviceLifecycleEvents RoutingSource = "DeviceLifecycleEvents" + // DeviceMessages specifies the device messages state for routing source. + DeviceMessages RoutingSource = "DeviceMessages" + // TwinChangeEvents specifies the twin change events state for routing source. + TwinChangeEvents RoutingSource = "TwinChangeEvents" +) + // ScaleType enumerates the values for scale type. type ScaleType string const ( - // ScaleTypeAutomatic specifies the scale type automatic state for scale - // type. + // ScaleTypeAutomatic specifies the scale type automatic state for scale type. ScaleTypeAutomatic ScaleType = "Automatic" // ScaleTypeManual specifies the scale type manual state for scale type. ScaleTypeManual ScaleType = "Manual" @@ -241,8 +235,7 @@ type Description struct { Sku *SkuInfo `json:"sku,omitempty"` } -// DescriptionListResult is the JSON-serialized array of IotHubDescription -// objects with a next link. +// DescriptionListResult is the JSON-serialized array of IotHubDescription objects with a next link. type DescriptionListResult struct { autorest.Response `json:"-"` Value *[]Description `json:"value,omitempty"` @@ -269,8 +262,7 @@ type ErrorDetails struct { Details *string `json:"Details,omitempty"` } -// EventHubConsumerGroupInfo is the properties of the EventHubConsumerGroupInfo -// object. +// EventHubConsumerGroupInfo is the properties of the EventHubConsumerGroupInfo object. type EventHubConsumerGroupInfo struct { autorest.Response `json:"-"` Tags *map[string]*string `json:"tags,omitempty"` @@ -278,8 +270,8 @@ type EventHubConsumerGroupInfo struct { Name *string `json:"name,omitempty"` } -// EventHubConsumerGroupsListResult is the JSON-serialized array of Event -// Hub-compatible consumer group names with a next link. +// EventHubConsumerGroupsListResult is the JSON-serialized array of Event Hub-compatible consumer group names with a +// next link. type EventHubConsumerGroupsListResult struct { autorest.Response `json:"-"` Value *[]string `json:"value,omitempty"` @@ -298,8 +290,7 @@ func (client EventHubConsumerGroupsListResult) EventHubConsumerGroupsListResultP autorest.WithBaseURL(to.String(client.NextLink))) } -// EventHubProperties is the properties of the provisioned Event Hub-compatible -// endpoint used by the IoT hub. +// EventHubProperties is the properties of the provisioned Event Hub-compatible endpoint used by the IoT hub. type EventHubProperties struct { RetentionTimeInDays *int64 `json:"retentionTimeInDays,omitempty"` PartitionCount *int32 `json:"partitionCount,omitempty"` @@ -308,23 +299,29 @@ type EventHubProperties struct { Endpoint *string `json:"endpoint,omitempty"` } -// ExportDevicesRequest is use to provide parameters when requesting an export -// of all devices in the IoT hub. +// ExportDevicesRequest is use to provide parameters when requesting an export of all devices in the IoT hub. type ExportDevicesRequest struct { ExportBlobContainerURI *string `json:"ExportBlobContainerUri,omitempty"` ExcludeKeys *bool `json:"ExcludeKeys,omitempty"` } -// FeedbackProperties is the properties of the feedback queue for -// cloud-to-device messages. +// FallbackRouteProperties is the properties of the fallback route. IoT Hub uses these properties when it routes +// messages to the fallback endpoint. +type FallbackRouteProperties struct { + Source *string `json:"source,omitempty"` + Condition *string `json:"condition,omitempty"` + EndpointNames *[]string `json:"endpointNames,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// FeedbackProperties is the properties of the feedback queue for cloud-to-device messages. type FeedbackProperties struct { LockDurationAsIso8601 *string `json:"lockDurationAsIso8601,omitempty"` TTLAsIso8601 *string `json:"ttlAsIso8601,omitempty"` MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` } -// ImportDevicesRequest is use to provide parameters when requesting an import -// of all devices in the hub. +// ImportDevicesRequest is use to provide parameters when requesting an import of all devices in the hub. type ImportDevicesRequest struct { InputBlobContainerURI *string `json:"InputBlobContainerUri,omitempty"` OutputBlobContainerURI *string `json:"OutputBlobContainerUri,omitempty"` @@ -350,8 +347,7 @@ type JobResponse struct { ParentJobID *string `json:"parentJobId,omitempty"` } -// JobResponseListResult is the JSON-serialized array of JobResponse objects -// with a next link. +// JobResponseListResult is the JSON-serialized array of JobResponse objects with a next link. type JobResponseListResult struct { autorest.Response `json:"-"` Value *[]JobResponse `json:"value,omitempty"` @@ -370,16 +366,14 @@ func (client JobResponseListResult) JobResponseListResultPreparer() (*http.Reque autorest.WithBaseURL(to.String(client.NextLink))) } -// MessagingEndpointProperties is the properties of the messaging endpoints -// used by this IoT hub. +// MessagingEndpointProperties is the properties of the messaging endpoints used by this IoT hub. type MessagingEndpointProperties struct { LockDurationAsIso8601 *string `json:"lockDurationAsIso8601,omitempty"` TTLAsIso8601 *string `json:"ttlAsIso8601,omitempty"` MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` } -// NameAvailabilityInfo is the properties indicating whether a given IoT hub -// name is available. +// NameAvailabilityInfo is the properties indicating whether a given IoT hub name is available. type NameAvailabilityInfo struct { autorest.Response `json:"-"` NameAvailable *bool `json:"nameAvailable,omitempty"` @@ -387,15 +381,47 @@ type NameAvailabilityInfo struct { Message *string `json:"message,omitempty"` } +// Operation is ioT Hub REST API operation +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay is the object that represents the operation. +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` +} + // OperationInputs is input values. type OperationInputs struct { Name *string `json:"Name,omitempty"` } -// OperationsMonitoringProperties is the operations monitoring properties for -// the IoT hub. The possible keys to the dictionary are Connections, -// DeviceTelemetry, C2DCommands, DeviceIdentityOperations, -// FileUploadOperations. +// OperationListResult is result of the request to list IoT Hub operations. It contains a list of operations and a URL +// link to get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// OperationsMonitoringProperties is the operations monitoring properties for the IoT hub. The possible keys to the +// dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations, Routes, +// D2CTwinOperations, C2DTwinOperations, TwinQueries, JobsOperations, DirectMethods. type OperationsMonitoringProperties struct { Events *map[string]*OperationMonitoringLevel `json:"events,omitempty"` } @@ -407,6 +433,7 @@ type Properties struct { ProvisioningState *string `json:"provisioningState,omitempty"` HostName *string `json:"hostName,omitempty"` EventHubEndpoints *map[string]*EventHubProperties `json:"eventHubEndpoints,omitempty"` + Routing *RoutingProperties `json:"routing,omitempty"` StorageEndpoints *map[string]*StorageEndpointProperties `json:"storageEndpoints,omitempty"` MessagingEndpoints *map[string]*MessagingEndpointProperties `json:"messagingEndpoints,omitempty"` EnableFileUploadNotifications *bool `json:"enableFileUploadNotifications,omitempty"` @@ -423,8 +450,7 @@ type QuotaMetricInfo struct { MaxValue *int64 `json:"MaxValue,omitempty"` } -// QuotaMetricInfoListResult is the JSON-serialized array of -// IotHubQuotaMetricInfo objects with a next link. +// QuotaMetricInfoListResult is the JSON-serialized array of IotHubQuotaMetricInfo objects with a next link. type QuotaMetricInfoListResult struct { autorest.Response `json:"-"` Value *[]QuotaMetricInfo `json:"value,omitempty"` @@ -451,7 +477,7 @@ type RegistryStatistics struct { DisabledDeviceCount *int64 `json:"disabledDeviceCount,omitempty"` } -// Resource is +// Resource is the common properties of an Azure resource. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -460,14 +486,77 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } +// RouteProperties is the properties of a routing rule that your IoT hub uses to route messages to endpoints. +type RouteProperties struct { + Name *string `json:"name,omitempty"` + Source RoutingSource `json:"source,omitempty"` + Condition *string `json:"condition,omitempty"` + EndpointNames *[]string `json:"endpointNames,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` +} + +// RoutingEndpoints is the properties related to the custom endpoints to which your IoT hub routes messages based on +// the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 +// custom endpoint is allowed across all endpoint types for free hubs. +type RoutingEndpoints struct { + ServiceBusQueues *[]RoutingServiceBusQueueEndpointProperties `json:"serviceBusQueues,omitempty"` + ServiceBusTopics *[]RoutingServiceBusTopicEndpointProperties `json:"serviceBusTopics,omitempty"` + EventHubs *[]RoutingEventHubProperties `json:"eventHubs,omitempty"` + StorageContainers *[]RoutingStorageContainerProperties `json:"storageContainers,omitempty"` +} + +// RoutingEventHubProperties is the properties related to an event hub endpoint. +type RoutingEventHubProperties struct { + ConnectionString *string `json:"connectionString,omitempty"` + Name *string `json:"name,omitempty"` + SubscriptionID *string `json:"subscriptionId,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` +} + +// RoutingProperties is the routing related properties of the IoT hub. See: +// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging +type RoutingProperties struct { + Endpoints *RoutingEndpoints `json:"endpoints,omitempty"` + Routes *[]RouteProperties `json:"routes,omitempty"` + FallbackRoute *FallbackRouteProperties `json:"fallbackRoute,omitempty"` +} + +// RoutingServiceBusQueueEndpointProperties is the properties related to service bus queue endpoint types. +type RoutingServiceBusQueueEndpointProperties struct { + ConnectionString *string `json:"connectionString,omitempty"` + Name *string `json:"name,omitempty"` + SubscriptionID *string `json:"subscriptionId,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` +} + +// RoutingServiceBusTopicEndpointProperties is the properties related to service bus topic endpoint types. +type RoutingServiceBusTopicEndpointProperties struct { + ConnectionString *string `json:"connectionString,omitempty"` + Name *string `json:"name,omitempty"` + SubscriptionID *string `json:"subscriptionId,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` +} + +// RoutingStorageContainerProperties is the properties related to a storage container endpoint. +type RoutingStorageContainerProperties struct { + ConnectionString *string `json:"connectionString,omitempty"` + Name *string `json:"name,omitempty"` + SubscriptionID *string `json:"subscriptionId,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + FileNameFormat *string `json:"fileNameFormat,omitempty"` + BatchFrequencyInSeconds *int32 `json:"batchFrequencyInSeconds,omitempty"` + MaxChunkSizeInBytes *int32 `json:"maxChunkSizeInBytes,omitempty"` + Encoding *string `json:"encoding,omitempty"` +} + // SetObject is type SetObject struct { autorest.Response `json:"-"` Value *map[string]interface{} `json:"value,omitempty"` } -// SharedAccessSignatureAuthorizationRule is the properties of an IoT hub -// shared access policy. +// SharedAccessSignatureAuthorizationRule is the properties of an IoT hub shared access policy. type SharedAccessSignatureAuthorizationRule struct { autorest.Response `json:"-"` KeyName *string `json:"keyName,omitempty"` @@ -476,8 +565,7 @@ type SharedAccessSignatureAuthorizationRule struct { Rights AccessRights `json:"rights,omitempty"` } -// SharedAccessSignatureAuthorizationRuleListResult is the list of shared -// access policies with a next link. +// SharedAccessSignatureAuthorizationRuleListResult is the list of shared access policies with a next link. type SharedAccessSignatureAuthorizationRuleListResult struct { autorest.Response `json:"-"` Value *[]SharedAccessSignatureAuthorizationRule `json:"value,omitempty"` @@ -496,15 +584,14 @@ func (client SharedAccessSignatureAuthorizationRuleListResult) SharedAccessSigna autorest.WithBaseURL(to.String(client.NextLink))) } -// SkuDescription is sKU properties. +// SkuDescription is SKU properties. type SkuDescription struct { ResourceType *string `json:"resourceType,omitempty"` Sku *SkuInfo `json:"sku,omitempty"` Capacity *Capacity `json:"capacity,omitempty"` } -// SkuDescriptionListResult is the JSON-serialized array of -// IotHubSkuDescription objects with a next link. +// SkuDescriptionListResult is the JSON-serialized array of IotHubSkuDescription objects with a next link. type SkuDescriptionListResult struct { autorest.Response `json:"-"` Value *[]SkuDescription `json:"value,omitempty"` @@ -530,8 +617,7 @@ type SkuInfo struct { Capacity *int64 `json:"capacity,omitempty"` } -// StorageEndpointProperties is the properties of the Azure Storage endpoint -// for file upload. +// StorageEndpointProperties is the properties of the Azure Storage endpoint for file upload. type StorageEndpointProperties struct { SasTTLAsIso8601 *string `json:"sasTtlAsIso8601,omitempty"` ConnectionString *string `json:"connectionString,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/operations.go new file mode 100644 index 000000000..ae4d1bf0c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/operations.go @@ -0,0 +1,165 @@ +package iothub + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the use this API to manage the IoT hubs in your Azure subscription. +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available IoT Hub REST API operations. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "iothub.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "iothub.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "iothub.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-07-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Devices/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.OperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "iothub.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "iothub.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "iothub.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/resource.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/resource.go index 83b970429..defcf9591 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/resource.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/resource.go @@ -14,9 +14,8 @@ package iothub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// ResourceClient is the use this API to manage the IoT hubs in your -// subscription. +// ResourceClient is the use this API to manage the IoT hubs in your Azure subscription. type ResourceClient struct { ManagementClient } @@ -36,16 +34,14 @@ func NewResourceClient(subscriptionID string) ResourceClient { return NewResourceClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceClientWithBaseURI creates an instance of the ResourceClient -// client. +// NewResourceClientWithBaseURI creates an instance of the ResourceClient client. func NewResourceClientWithBaseURI(baseURI string, subscriptionID string) ResourceClient { return ResourceClient{NewWithBaseURI(baseURI, subscriptionID)} } // CheckNameAvailability check if an IoT hub name is available. // -// operationInputs is set the name parameter in the OperationInputs structure -// to the name of the IoT hub to check. +// operationInputs is set the name parameter in the OperationInputs structure to the name of the IoT hub to check. func (client ResourceClient) CheckNameAvailability(operationInputs OperationInputs) (result NameAvailabilityInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: operationInputs, @@ -80,7 +76,7 @@ func (client ResourceClient) CheckNameAvailabilityPreparer(operationInputs Opera "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -114,13 +110,11 @@ func (client ResourceClient) CheckNameAvailabilityResponder(resp *http.Response) return } -// CreateEventHubConsumerGroup add a consumer group to an Event Hub-compatible -// endpoint in an IoT hub. +// CreateEventHubConsumerGroup add a consumer group to an Event Hub-compatible endpoint in an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the -// name of the Event Hub-compatible endpoint in the IoT hub. name is the name -// of the consumer group to add. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint in the IoT hub. name is the name of the +// consumer group to add. func (client ResourceClient) CreateEventHubConsumerGroup(resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result EventHubConsumerGroupInfo, err error) { req, err := client.CreateEventHubConsumerGroupPreparer(resourceGroupName, resourceName, eventHubEndpointName, name) if err != nil { @@ -153,7 +147,7 @@ func (client ResourceClient) CreateEventHubConsumerGroupPreparer(resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -185,16 +179,13 @@ func (client ResourceClient) CreateEventHubConsumerGroupResponder(resp *http.Res return } -// CreateOrUpdate create or update the metadata of an Iot hub. The usual -// pattern to modify a property is to retrieve the IoT hub metadata and -// security metadata, and then combine them with the modified values in a new -// body to update the IoT hub. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve +// the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update +// the IoT hub. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. +// The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub to create or update. -// iotHubDescription is the IoT hub metadata and security metadata. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub to create or update. iotHubDescription is the IoT hub metadata and security metadata. func (client ResourceClient) CreateOrUpdate(resourceGroupName string, resourceName string, iotHubDescription Description, cancel <-chan struct{}) (<-chan Description, <-chan error) { resultChan := make(chan Description, 1) errChan := make(chan error, 1) @@ -203,18 +194,28 @@ func (client ResourceClient) CreateOrUpdate(resourceGroupName string, resourceNa Constraints: []validation.Constraint{{Target: "iotHubDescription.Subscriptionid", Name: validation.Null, Rule: true, Chain: nil}, {Target: "iotHubDescription.Resourcegroup", Name: validation.Null, Rule: true, Chain: nil}, {Target: "iotHubDescription.Properties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, - }}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, - {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing.FallbackRoute", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing.FallbackRoute.Source", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "iotHubDescription.Properties.Routing.FallbackRoute.EndpointNames", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing.FallbackRoute.EndpointNames", Name: validation.MaxItems, Rule: 1, Chain: nil}, + {Target: "iotHubDescription.Properties.Routing.FallbackRoute.EndpointNames", Name: validation.MinItems, Rule: 1, Chain: nil}, }}, - }}, + {Target: "iotHubDescription.Properties.Routing.FallbackRoute.IsEnabled", Name: validation.Null, Rule: true, Chain: nil}, + }}, }}, + {Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil}, + {Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}, + }}, + }}, }}, {Target: "iotHubDescription.Sku", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "iotHubDescription.Sku.Capacity", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { @@ -228,8 +229,10 @@ func (client ResourceClient) CreateOrUpdate(resourceGroupName string, resourceNa var err error var result Description defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -262,7 +265,7 @@ func (client ResourceClient) CreateOrUpdatePreparer(resourceGroupName string, re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -298,12 +301,11 @@ func (client ResourceClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete delete an IoT hub. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete delete an IoT hub. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub to delete. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub to delete. func (client ResourceClient) Delete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan SetObject, <-chan error) { resultChan := make(chan SetObject, 1) errChan := make(chan error, 1) @@ -311,8 +313,10 @@ func (client ResourceClient) Delete(resourceGroupName string, resourceName strin var err error var result SetObject defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -345,7 +349,7 @@ func (client ResourceClient) DeletePreparer(resourceGroupName string, resourceNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -379,13 +383,11 @@ func (client ResourceClient) DeleteResponder(resp *http.Response) (result SetObj return } -// DeleteEventHubConsumerGroup delete a consumer group from an Event -// Hub-compatible endpoint in an IoT hub. +// DeleteEventHubConsumerGroup delete a consumer group from an Event Hub-compatible endpoint in an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the -// name of the Event Hub-compatible endpoint in the IoT hub. name is the name -// of the consumer group to delete. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint in the IoT hub. name is the name of the +// consumer group to delete. func (client ResourceClient) DeleteEventHubConsumerGroup(resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result autorest.Response, err error) { req, err := client.DeleteEventHubConsumerGroupPreparer(resourceGroupName, resourceName, eventHubEndpointName, name) if err != nil { @@ -418,7 +420,7 @@ func (client ResourceClient) DeleteEventHubConsumerGroupPreparer(resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -449,13 +451,12 @@ func (client ResourceClient) DeleteEventHubConsumerGroupResponder(resp *http.Res return } -// ExportDevices exports all the device identities in the IoT hub identity -// registry to an Azure Storage blob container. For more information, see: +// ExportDevices exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. +// For more information, see: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. exportDevicesParameters is the -// parameters that specify the export devices operation. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. exportDevicesParameters is the parameters that specify the export devices operation. func (client ResourceClient) ExportDevices(resourceGroupName string, resourceName string, exportDevicesParameters ExportDevicesRequest) (result JobResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: exportDevicesParameters, @@ -493,7 +494,7 @@ func (client ResourceClient) ExportDevicesPreparer(resourceGroupName string, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -529,8 +530,8 @@ func (client ResourceClient) ExportDevicesResponder(resp *http.Response) (result // Get get the non-security related metadata of an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. func (client ResourceClient) Get(resourceGroupName string, resourceName string) (result Description, err error) { req, err := client.GetPreparer(resourceGroupName, resourceName) if err != nil { @@ -561,7 +562,7 @@ func (client ResourceClient) GetPreparer(resourceGroupName string, resourceName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -593,13 +594,11 @@ func (client ResourceClient) GetResponder(resp *http.Response) (result Descripti return } -// GetEventHubConsumerGroup get a consumer group from the Event Hub-compatible -// device-to-cloud endpoint for an IoT hub. +// GetEventHubConsumerGroup get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the -// name of the Event Hub-compatible endpoint in the IoT hub. name is the name -// of the consumer group to retrieve. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint in the IoT hub. name is the name of the +// consumer group to retrieve. func (client ResourceClient) GetEventHubConsumerGroup(resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result EventHubConsumerGroupInfo, err error) { req, err := client.GetEventHubConsumerGroupPreparer(resourceGroupName, resourceName, eventHubEndpointName, name) if err != nil { @@ -632,7 +631,7 @@ func (client ResourceClient) GetEventHubConsumerGroupPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -667,8 +666,8 @@ func (client ResourceClient) GetEventHubConsumerGroupResponder(resp *http.Respon // GetJob get the details of a job from an IoT hub. For more information, see: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. jobID is the job identifier. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. jobID is the job identifier. func (client ResourceClient) GetJob(resourceGroupName string, resourceName string, jobID string) (result JobResponse, err error) { req, err := client.GetJobPreparer(resourceGroupName, resourceName, jobID) if err != nil { @@ -700,7 +699,7 @@ func (client ResourceClient) GetJobPreparer(resourceGroupName string, resourceNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -732,13 +731,11 @@ func (client ResourceClient) GetJobResponder(resp *http.Response) (result JobRes return } -// GetKeysForKeyName get a shared access policy by name from an IoT hub. For -// more information, see: +// GetKeysForKeyName get a shared access policy by name from an IoT hub. For more information, see: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. keyName is the name of the -// shared access policy. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. keyName is the name of the shared access policy. func (client ResourceClient) GetKeysForKeyName(resourceGroupName string, resourceName string, keyName string) (result SharedAccessSignatureAuthorizationRule, err error) { req, err := client.GetKeysForKeyNamePreparer(resourceGroupName, resourceName, keyName) if err != nil { @@ -770,7 +767,7 @@ func (client ResourceClient) GetKeysForKeyNamePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -804,8 +801,8 @@ func (client ResourceClient) GetKeysForKeyNameResponder(resp *http.Response) (re // GetQuotaMetrics get the quota metrics for an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. func (client ResourceClient) GetQuotaMetrics(resourceGroupName string, resourceName string) (result QuotaMetricInfoListResult, err error) { req, err := client.GetQuotaMetricsPreparer(resourceGroupName, resourceName) if err != nil { @@ -836,7 +833,7 @@ func (client ResourceClient) GetQuotaMetricsPreparer(resourceGroupName string, r "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -892,10 +889,55 @@ func (client ResourceClient) GetQuotaMetricsNextResults(lastResults QuotaMetricI return } +// GetQuotaMetricsComplete gets all elements from the list without paging. +func (client ResourceClient) GetQuotaMetricsComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan QuotaMetricInfo, <-chan error) { + resultChan := make(chan QuotaMetricInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetQuotaMetrics(resourceGroupName, resourceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetQuotaMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // GetStats get the statistics from an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. func (client ResourceClient) GetStats(resourceGroupName string, resourceName string) (result RegistryStatistics, err error) { req, err := client.GetStatsPreparer(resourceGroupName, resourceName) if err != nil { @@ -926,7 +968,7 @@ func (client ResourceClient) GetStatsPreparer(resourceGroupName string, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -960,8 +1002,8 @@ func (client ResourceClient) GetStatsResponder(resp *http.Response) (result Regi // GetValidSkus get the list of valid SKUs for an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. func (client ResourceClient) GetValidSkus(resourceGroupName string, resourceName string) (result SkuDescriptionListResult, err error) { req, err := client.GetValidSkusPreparer(resourceGroupName, resourceName) if err != nil { @@ -992,7 +1034,7 @@ func (client ResourceClient) GetValidSkusPreparer(resourceGroupName string, reso "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1048,13 +1090,57 @@ func (client ResourceClient) GetValidSkusNextResults(lastResults SkuDescriptionL return } -// ImportDevices import, update, or delete device identities in the IoT hub -// identity registry from a blob. For more information, see: +// GetValidSkusComplete gets all elements from the list without paging. +func (client ResourceClient) GetValidSkusComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan SkuDescription, <-chan error) { + resultChan := make(chan SkuDescription) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetValidSkus(resourceGroupName, resourceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetValidSkusNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ImportDevices import, update, or delete device identities in the IoT hub identity registry from a blob. For more +// information, see: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. importDevicesParameters is the -// parameters that specify the import devices operation. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. importDevicesParameters is the parameters that specify the import devices operation. func (client ResourceClient) ImportDevices(resourceGroupName string, resourceName string, importDevicesParameters ImportDevicesRequest) (result JobResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: importDevicesParameters, @@ -1092,7 +1178,7 @@ func (client ResourceClient) ImportDevicesPreparer(resourceGroupName string, res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1128,8 +1214,7 @@ func (client ResourceClient) ImportDevicesResponder(resp *http.Response) (result // ListByResourceGroup get all the IoT hubs in a resource group. // -// resourceGroupName is the name of the resource group that contains the IoT -// hubs. +// resourceGroupName is the name of the resource group that contains the IoT hubs. func (client ResourceClient) ListByResourceGroup(resourceGroupName string) (result DescriptionListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { @@ -1159,7 +1244,7 @@ func (client ResourceClient) ListByResourceGroupPreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1215,6 +1300,51 @@ func (client ResourceClient) ListByResourceGroupNextResults(lastResults Descript return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ResourceClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Description, <-chan error) { + resultChan := make(chan Description) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBySubscription get all the IoT hubs in a subscription. func (client ResourceClient) ListBySubscription() (result DescriptionListResult, err error) { req, err := client.ListBySubscriptionPreparer() @@ -1244,7 +1374,7 @@ func (client ResourceClient) ListBySubscriptionPreparer() (*http.Request, error) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1300,12 +1430,56 @@ func (client ResourceClient) ListBySubscriptionNextResults(lastResults Descripti return } -// ListEventHubConsumerGroups get a list of the consumer groups in the Event -// Hub-compatible device-to-cloud endpoint in an IoT hub. +// ListBySubscriptionComplete gets all elements from the list without paging. +func (client ResourceClient) ListBySubscriptionComplete(cancel <-chan struct{}) (<-chan Description, <-chan error) { + resultChan := make(chan Description) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscription() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListEventHubConsumerGroups get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in +// an IoT hub. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the -// name of the Event Hub-compatible endpoint. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint. func (client ResourceClient) ListEventHubConsumerGroups(resourceGroupName string, resourceName string, eventHubEndpointName string) (result EventHubConsumerGroupsListResult, err error) { req, err := client.ListEventHubConsumerGroupsPreparer(resourceGroupName, resourceName, eventHubEndpointName) if err != nil { @@ -1337,7 +1511,7 @@ func (client ResourceClient) ListEventHubConsumerGroupsPreparer(resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1393,12 +1567,56 @@ func (client ResourceClient) ListEventHubConsumerGroupsNextResults(lastResults E return } -// ListJobs get a list of all the jobs in an IoT hub. For more information, -// see: +// ListEventHubConsumerGroupsComplete gets all elements from the list without paging. +func (client ResourceClient) ListEventHubConsumerGroupsComplete(resourceGroupName string, resourceName string, eventHubEndpointName string, cancel <-chan struct{}) (<-chan string, <-chan error) { + resultChan := make(chan string) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListEventHubConsumerGroups(resourceGroupName, resourceName, eventHubEndpointName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListEventHubConsumerGroupsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListJobs get a list of all the jobs in an IoT hub. For more information, see: // https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. func (client ResourceClient) ListJobs(resourceGroupName string, resourceName string) (result JobResponseListResult, err error) { req, err := client.ListJobsPreparer(resourceGroupName, resourceName) if err != nil { @@ -1429,7 +1647,7 @@ func (client ResourceClient) ListJobsPreparer(resourceGroupName string, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1485,11 +1703,56 @@ func (client ResourceClient) ListJobsNextResults(lastResults JobResponseListResu return } -// ListKeys get the security metadata for an IoT hub. For more information, -// see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. +// ListJobsComplete gets all elements from the list without paging. +func (client ResourceClient) ListJobsComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan JobResponse, <-chan error) { + resultChan := make(chan JobResponse) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListJobs(resourceGroupName, resourceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListJobsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeys get the security metadata for an IoT hub. For more information, see: +// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. // -// resourceGroupName is the name of the resource group that contains the IoT -// hub. resourceName is the name of the IoT hub. +// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT +// hub. func (client ResourceClient) ListKeys(resourceGroupName string, resourceName string) (result SharedAccessSignatureAuthorizationRuleListResult, err error) { req, err := client.ListKeysPreparer(resourceGroupName, resourceName) if err != nil { @@ -1520,7 +1783,7 @@ func (client ResourceClient) ListKeysPreparer(resourceGroupName string, resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-02-03" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1575,3 +1838,48 @@ func (client ResourceClient) ListKeysNextResults(lastResults SharedAccessSignatu return } + +// ListKeysComplete gets all elements from the list without paging. +func (client ResourceClient) ListKeysComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan SharedAccessSignatureAuthorizationRule, <-chan error) { + resultChan := make(chan SharedAccessSignatureAuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListKeys(resourceGroupName, resourceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListKeysNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go index 8459b9d90..71c1b6e27 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/iothub/version.go @@ -14,15 +14,15 @@ package iothub // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-iothub/2017-07-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-iothub/2017-07-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/client.go index 7bca66be4..4cbb7dce6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/client.go @@ -1,8 +1,6 @@ -// Package keyvault implements the Azure ARM Keyvault service API version -// 2015-06-01. +// Package keyvault implements the Azure ARM Keyvault service API version 2016-10-01. // -// The Azure management API provides a RESTful set of web services that -// interact with Azure Key Vault. +// The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. package keyvault // Copyright (c) Microsoft and contributors. All rights reserved. @@ -19,9 +17,8 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/models.go index b0162c4b1..c0b4bee56 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/models.go @@ -14,14 +14,14 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) @@ -29,14 +29,11 @@ import ( type CertificatePermissions string const ( - // All specifies the all state for certificate permissions. - All CertificatePermissions = "all" // Create specifies the create state for certificate permissions. Create CertificatePermissions = "create" // Delete specifies the delete state for certificate permissions. Delete CertificatePermissions = "delete" - // Deleteissuers specifies the deleteissuers state for certificate - // permissions. + // Deleteissuers specifies the deleteissuers state for certificate permissions. Deleteissuers CertificatePermissions = "deleteissuers" // Get specifies the get state for certificate permissions. Get CertificatePermissions = "get" @@ -48,66 +45,65 @@ const ( List CertificatePermissions = "list" // Listissuers specifies the listissuers state for certificate permissions. Listissuers CertificatePermissions = "listissuers" - // Managecontacts specifies the managecontacts state for certificate - // permissions. + // Managecontacts specifies the managecontacts state for certificate permissions. Managecontacts CertificatePermissions = "managecontacts" - // Manageissuers specifies the manageissuers state for certificate - // permissions. + // Manageissuers specifies the manageissuers state for certificate permissions. Manageissuers CertificatePermissions = "manageissuers" + // Purge specifies the purge state for certificate permissions. + Purge CertificatePermissions = "purge" + // Recover specifies the recover state for certificate permissions. + Recover CertificatePermissions = "recover" // Setissuers specifies the setissuers state for certificate permissions. Setissuers CertificatePermissions = "setissuers" // Update specifies the update state for certificate permissions. Update CertificatePermissions = "update" ) +// CreateMode enumerates the values for create mode. +type CreateMode string + +const ( + // CreateModeDefault specifies the create mode default state for create mode. + CreateModeDefault CreateMode = "default" + // CreateModeRecover specifies the create mode recover state for create mode. + CreateModeRecover CreateMode = "recover" +) + // KeyPermissions enumerates the values for key permissions. type KeyPermissions string const ( - // KeyPermissionsAll specifies the key permissions all state for key - // permissions. - KeyPermissionsAll KeyPermissions = "all" - // KeyPermissionsBackup specifies the key permissions backup state for key - // permissions. + // KeyPermissionsBackup specifies the key permissions backup state for key permissions. KeyPermissionsBackup KeyPermissions = "backup" - // KeyPermissionsCreate specifies the key permissions create state for key - // permissions. + // KeyPermissionsCreate specifies the key permissions create state for key permissions. KeyPermissionsCreate KeyPermissions = "create" - // KeyPermissionsDecrypt specifies the key permissions decrypt state for - // key permissions. + // KeyPermissionsDecrypt specifies the key permissions decrypt state for key permissions. KeyPermissionsDecrypt KeyPermissions = "decrypt" - // KeyPermissionsDelete specifies the key permissions delete state for key - // permissions. + // KeyPermissionsDelete specifies the key permissions delete state for key permissions. KeyPermissionsDelete KeyPermissions = "delete" - // KeyPermissionsEncrypt specifies the key permissions encrypt state for - // key permissions. + // KeyPermissionsEncrypt specifies the key permissions encrypt state for key permissions. KeyPermissionsEncrypt KeyPermissions = "encrypt" - // KeyPermissionsGet specifies the key permissions get state for key - // permissions. + // KeyPermissionsGet specifies the key permissions get state for key permissions. KeyPermissionsGet KeyPermissions = "get" - // KeyPermissionsImport specifies the key permissions import state for key - // permissions. + // KeyPermissionsImport specifies the key permissions import state for key permissions. KeyPermissionsImport KeyPermissions = "import" - // KeyPermissionsList specifies the key permissions list state for key - // permissions. + // KeyPermissionsList specifies the key permissions list state for key permissions. KeyPermissionsList KeyPermissions = "list" - // KeyPermissionsRestore specifies the key permissions restore state for - // key permissions. + // KeyPermissionsPurge specifies the key permissions purge state for key permissions. + KeyPermissionsPurge KeyPermissions = "purge" + // KeyPermissionsRecover specifies the key permissions recover state for key permissions. + KeyPermissionsRecover KeyPermissions = "recover" + // KeyPermissionsRestore specifies the key permissions restore state for key permissions. KeyPermissionsRestore KeyPermissions = "restore" - // KeyPermissionsSign specifies the key permissions sign state for key - // permissions. + // KeyPermissionsSign specifies the key permissions sign state for key permissions. KeyPermissionsSign KeyPermissions = "sign" - // KeyPermissionsUnwrapKey specifies the key permissions unwrap key state - // for key permissions. + // KeyPermissionsUnwrapKey specifies the key permissions unwrap key state for key permissions. KeyPermissionsUnwrapKey KeyPermissions = "unwrapKey" - // KeyPermissionsUpdate specifies the key permissions update state for key - // permissions. + // KeyPermissionsUpdate specifies the key permissions update state for key permissions. KeyPermissionsUpdate KeyPermissions = "update" - // KeyPermissionsVerify specifies the key permissions verify state for key - // permissions. + // KeyPermissionsVerify specifies the key permissions verify state for key permissions. KeyPermissionsVerify KeyPermissions = "verify" - // KeyPermissionsWrapKey specifies the key permissions wrap key state for - // key permissions. + // KeyPermissionsWrapKey specifies the key permissions wrap key state for key permissions. KeyPermissionsWrapKey KeyPermissions = "wrapKey" ) @@ -115,20 +111,21 @@ const ( type SecretPermissions string const ( - // SecretPermissionsAll specifies the secret permissions all state for - // secret permissions. - SecretPermissionsAll SecretPermissions = "all" - // SecretPermissionsDelete specifies the secret permissions delete state - // for secret permissions. + // SecretPermissionsBackup specifies the secret permissions backup state for secret permissions. + SecretPermissionsBackup SecretPermissions = "backup" + // SecretPermissionsDelete specifies the secret permissions delete state for secret permissions. SecretPermissionsDelete SecretPermissions = "delete" - // SecretPermissionsGet specifies the secret permissions get state for - // secret permissions. + // SecretPermissionsGet specifies the secret permissions get state for secret permissions. SecretPermissionsGet SecretPermissions = "get" - // SecretPermissionsList specifies the secret permissions list state for - // secret permissions. + // SecretPermissionsList specifies the secret permissions list state for secret permissions. SecretPermissionsList SecretPermissions = "list" - // SecretPermissionsSet specifies the secret permissions set state for - // secret permissions. + // SecretPermissionsPurge specifies the secret permissions purge state for secret permissions. + SecretPermissionsPurge SecretPermissions = "purge" + // SecretPermissionsRecover specifies the secret permissions recover state for secret permissions. + SecretPermissionsRecover SecretPermissions = "recover" + // SecretPermissionsRestore specifies the secret permissions restore state for secret permissions. + SecretPermissionsRestore SecretPermissions = "restore" + // SecretPermissionsSet specifies the secret permissions set state for secret permissions. SecretPermissionsSet SecretPermissions = "set" ) @@ -142,9 +139,34 @@ const ( Standard SkuName = "standard" ) -// AccessPolicyEntry is an identity that have access to the key vault. All -// identities in the array must use the same tenant ID as the key vault's -// tenant ID. +// StoragePermissions enumerates the values for storage permissions. +type StoragePermissions string + +const ( + // StoragePermissionsDelete specifies the storage permissions delete state for storage permissions. + StoragePermissionsDelete StoragePermissions = "delete" + // StoragePermissionsDeletesas specifies the storage permissions deletesas state for storage permissions. + StoragePermissionsDeletesas StoragePermissions = "deletesas" + // StoragePermissionsGet specifies the storage permissions get state for storage permissions. + StoragePermissionsGet StoragePermissions = "get" + // StoragePermissionsGetsas specifies the storage permissions getsas state for storage permissions. + StoragePermissionsGetsas StoragePermissions = "getsas" + // StoragePermissionsList specifies the storage permissions list state for storage permissions. + StoragePermissionsList StoragePermissions = "list" + // StoragePermissionsListsas specifies the storage permissions listsas state for storage permissions. + StoragePermissionsListsas StoragePermissions = "listsas" + // StoragePermissionsRegeneratekey specifies the storage permissions regeneratekey state for storage permissions. + StoragePermissionsRegeneratekey StoragePermissions = "regeneratekey" + // StoragePermissionsSet specifies the storage permissions set state for storage permissions. + StoragePermissionsSet StoragePermissions = "set" + // StoragePermissionsSetsas specifies the storage permissions setsas state for storage permissions. + StoragePermissionsSetsas StoragePermissions = "setsas" + // StoragePermissionsUpdate specifies the storage permissions update state for storage permissions. + StoragePermissionsUpdate StoragePermissions = "update" +) + +// AccessPolicyEntry is an identity that have access to the key vault. All identities in the array must use the same +// tenant ID as the key vault's tenant ID. type AccessPolicyEntry struct { TenantID *uuid.UUID `json:"tenantId,omitempty"` ObjectID *string `json:"objectId,omitempty"` @@ -152,12 +174,49 @@ type AccessPolicyEntry struct { Permissions *Permissions `json:"permissions,omitempty"` } -// Permissions is permissions the identity has for keys, secrets and -// certificates. +// DeletedVault is deleted vault information with extended details. +type DeletedVault struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Properties *DeletedVaultProperties `json:"properties,omitempty"` +} + +// DeletedVaultListResult is list of vaults +type DeletedVaultListResult struct { + autorest.Response `json:"-"` + Value *[]DeletedVault `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// DeletedVaultListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client DeletedVaultListResult) DeletedVaultListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// DeletedVaultProperties is properties of the deleted vault. +type DeletedVaultProperties struct { + VaultID *string `json:"vaultId,omitempty"` + Location *string `json:"location,omitempty"` + DeletionDate *date.Time `json:"deletionDate,omitempty"` + ScheduledPurgeDate *date.Time `json:"scheduledPurgeDate,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// Permissions is permissions the identity has for keys, secrets, certificates and storage. type Permissions struct { Keys *[]KeyPermissions `json:"keys,omitempty"` Secrets *[]SecretPermissions `json:"secrets,omitempty"` Certificates *[]CertificatePermissions `json:"certificates,omitempty"` + Storage *[]StoragePermissions `json:"storage,omitempty"` } // Resource is key Vault resource @@ -188,7 +247,7 @@ func (client ResourceListResult) ResourceListResultPreparer() (*http.Request, er autorest.WithBaseURL(to.String(client.NextLink))) } -// Sku is sKU details +// Sku is SKU details type Sku struct { Family *string `json:"family,omitempty"` Name SkuName `json:"name,omitempty"` @@ -233,11 +292,13 @@ func (client VaultListResult) VaultListResultPreparer() (*http.Request, error) { // VaultProperties is properties of the vault type VaultProperties struct { - VaultURI *string `json:"vaultUri,omitempty"` TenantID *uuid.UUID `json:"tenantId,omitempty"` Sku *Sku `json:"sku,omitempty"` AccessPolicies *[]AccessPolicyEntry `json:"accessPolicies,omitempty"` + VaultURI *string `json:"vaultUri,omitempty"` EnabledForDeployment *bool `json:"enabledForDeployment,omitempty"` EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty"` EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty"` + EnableSoftDelete *bool `json:"enableSoftDelete,omitempty"` + CreateMode CreateMode `json:"createMode,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/vaults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/vaults.go index 5b8c021ed..47638d206 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/vaults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/vaults.go @@ -14,9 +14,8 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,8 @@ import ( "net/http" ) -// VaultsClient is the the Azure management API provides a RESTful set of web -// services that interact with Azure Key Vault. +// VaultsClient is the the Azure management API provides a RESTful set of web services that interact with Azure Key +// Vault. type VaultsClient struct { ManagementClient } @@ -43,9 +42,8 @@ func NewVaultsClientWithBaseURI(baseURI string, subscriptionID string) VaultsCli // CreateOrUpdate create or update a key vault in the specified subscription. // -// resourceGroupName is the name of the Resource Group to which the server -// belongs. vaultName is name of the vault parameters is parameters to create -// or update the vault +// resourceGroupName is the name of the Resource Group to which the server belongs. vaultName is name of the vault +// parameters is parameters to create or update the vault func (client VaultsClient) CreateOrUpdate(resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters) (result Vault, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: vaultName, @@ -56,7 +54,7 @@ func (client VaultsClient) CreateOrUpdate(resourceGroupName string, vaultName st Chain: []validation.Constraint{{Target: "parameters.Properties.TenantID", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Properties.Sku", Name: validation.Null, Rule: true, Chain: []validation.Constraint{{Target: "parameters.Properties.Sku.Family", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.Properties.AccessPolicies", Name: validation.Null, Rule: true, + {Target: "parameters.Properties.AccessPolicies", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.Properties.AccessPolicies", Name: validation.MaxItems, Rule: 16, Chain: nil}}}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "keyvault.VaultsClient", "CreateOrUpdate") @@ -91,7 +89,7 @@ func (client VaultsClient) CreateOrUpdatePreparer(resourceGroupName string, vaul "vaultName": autorest.Encode("path", vaultName), } - const APIVersion = "2015-06-01" + const APIVersion = "2016-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -127,8 +125,8 @@ func (client VaultsClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete deletes the specified Azure key vault. // -// resourceGroupName is the name of the Resource Group to which the vault -// belongs. vaultName is the name of the vault to delete +// resourceGroupName is the name of the Resource Group to which the vault belongs. vaultName is the name of the vault +// to delete func (client VaultsClient) Delete(resourceGroupName string, vaultName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, vaultName) if err != nil { @@ -159,7 +157,7 @@ func (client VaultsClient) DeletePreparer(resourceGroupName string, vaultName st "vaultName": autorest.Encode("path", vaultName), } - const APIVersion = "2015-06-01" + const APIVersion = "2016-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -192,8 +190,7 @@ func (client VaultsClient) DeleteResponder(resp *http.Response) (result autorest // Get gets the specified Azure key vault. // -// resourceGroupName is the name of the Resource Group to which the vault -// belongs. vaultName is the name of the vault. +// resourceGroupName is the name of the Resource Group to which the vault belongs. vaultName is the name of the vault. func (client VaultsClient) Get(resourceGroupName string, vaultName string) (result Vault, err error) { req, err := client.GetPreparer(resourceGroupName, vaultName) if err != nil { @@ -224,7 +221,7 @@ func (client VaultsClient) GetPreparer(resourceGroupName string, vaultName strin "vaultName": autorest.Encode("path", vaultName), } - const APIVersion = "2015-06-01" + const APIVersion = "2016-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -256,11 +253,74 @@ func (client VaultsClient) GetResponder(resp *http.Response) (result Vault, err return } -// List the List operation gets information about the vaults associated with -// the subscription. +// GetDeleted gets the deleted Azure key vault. // -// filter is the filter to apply on the operation. top is maximum number of -// results to return. +// vaultName is the name of the vault. location is the location of the deleted vault. +func (client VaultsClient) GetDeleted(vaultName string, location string) (result DeletedVault, err error) { + req, err := client.GetDeletedPreparer(vaultName, location) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "GetDeleted", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeletedSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "GetDeleted", resp, "Failure sending request") + return + } + + result, err = client.GetDeletedResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "GetDeleted", resp, "Failure responding to request") + } + + return +} + +// GetDeletedPreparer prepares the GetDeleted request. +func (client VaultsClient) GetDeletedPreparer(vaultName string, location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDeletedSender sends the GetDeleted request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) GetDeletedSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDeletedResponder handles the response to the GetDeleted request. The method always +// closes the http.Response Body. +func (client VaultsClient) GetDeletedResponder(resp *http.Response) (result DeletedVault, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List the List operation gets information about the vaults associated with the subscription. +// +// filter is the filter to apply on the operation. top is maximum number of results to return. func (client VaultsClient) List(filter string, top *int32) (result ResourceListResult, err error) { req, err := client.ListPreparer(filter, top) if err != nil { @@ -349,11 +409,56 @@ func (client VaultsClient) ListNextResults(lastResults ResourceListResult) (resu return } -// ListByResourceGroup the List operation gets information about the vaults -// associated with the subscription and within the specified resource group. +// ListComplete gets all elements from the list without paging. +func (client VaultsClient) ListComplete(filter string, top *int32, cancel <-chan struct{}) (<-chan Resource, <-chan error) { + resultChan := make(chan Resource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup the List operation gets information about the vaults associated with the subscription and within +// the specified resource group. // -// resourceGroupName is the name of the Resource Group to which the vault -// belongs. top is maximum number of results to return. +// resourceGroupName is the name of the Resource Group to which the vault belongs. top is maximum number of results to +// return. func (client VaultsClient) ListByResourceGroup(resourceGroupName string, top *int32) (result VaultListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, top) if err != nil { @@ -383,7 +488,7 @@ func (client VaultsClient) ListByResourceGroupPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-06-01" + const APIVersion = "2016-10-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -441,3 +546,259 @@ func (client VaultsClient) ListByResourceGroupNextResults(lastResults VaultListR return } + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client VaultsClient) ListByResourceGroupComplete(resourceGroupName string, top *int32, cancel <-chan struct{}) (<-chan Vault, <-chan error) { + resultChan := make(chan Vault) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListDeleted gets information about the deleted vaults in a subscription. +func (client VaultsClient) ListDeleted() (result DeletedVaultListResult, err error) { + req, err := client.ListDeletedPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "ListDeleted", nil, "Failure preparing request") + return + } + + resp, err := client.ListDeletedSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "ListDeleted", resp, "Failure sending request") + return + } + + result, err = client.ListDeletedResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "ListDeleted", resp, "Failure responding to request") + } + + return +} + +// ListDeletedPreparer prepares the ListDeleted request. +func (client VaultsClient) ListDeletedPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListDeletedSender sends the ListDeleted request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) ListDeletedSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListDeletedResponder handles the response to the ListDeleted request. The method always +// closes the http.Response Body. +func (client VaultsClient) ListDeletedResponder(resp *http.Response) (result DeletedVaultListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListDeletedNextResults retrieves the next set of results, if any. +func (client VaultsClient) ListDeletedNextResults(lastResults DeletedVaultListResult) (result DeletedVaultListResult, err error) { + req, err := lastResults.DeletedVaultListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "keyvault.VaultsClient", "ListDeleted", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListDeletedSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "keyvault.VaultsClient", "ListDeleted", resp, "Failure sending next results request") + } + + result, err = client.ListDeletedResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "ListDeleted", resp, "Failure responding to next results request") + } + + return +} + +// ListDeletedComplete gets all elements from the list without paging. +func (client VaultsClient) ListDeletedComplete(cancel <-chan struct{}) (<-chan DeletedVault, <-chan error) { + resultChan := make(chan DeletedVault) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListDeleted() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListDeletedNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// PurgeDeleted permanently deletes the specified vault. aka Purges the deleted Azure key vault. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// vaultName is the name of the soft-deleted vault. location is the location of the soft-deleted vault. +func (client VaultsClient) PurgeDeleted(vaultName string, location string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.PurgeDeletedPreparer(vaultName, location, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "PurgeDeleted", nil, "Failure preparing request") + return + } + + resp, err := client.PurgeDeletedSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "PurgeDeleted", resp, "Failure sending request") + return + } + + result, err = client.PurgeDeletedResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "PurgeDeleted", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// PurgeDeletedPreparer prepares the PurgeDeleted request. +func (client VaultsClient) PurgeDeletedPreparer(vaultName string, location string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// PurgeDeletedSender sends the PurgeDeleted request. The method will close the +// http.Response Body if it receives an error. +func (client VaultsClient) PurgeDeletedSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// PurgeDeletedResponder handles the response to the PurgeDeleted request. The method always +// closes the http.Response Body. +func (client VaultsClient) PurgeDeletedResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go index 6ef6ca2d3..64ff8541e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/keyvault/version.go @@ -14,15 +14,15 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-keyvault/2016-10-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/agreements.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/agreements.go index 20a2bd1b9..6845db82e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/agreements.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/agreements.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// AgreementsClient is the rEST API for Azure Logic Apps. +// AgreementsClient is the REST API for Azure Logic Apps. type AgreementsClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewAgreementsClient(subscriptionID string) AgreementsClient { return NewAgreementsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAgreementsClientWithBaseURI creates an instance of the AgreementsClient -// client. +// NewAgreementsClientWithBaseURI creates an instance of the AgreementsClient client. func NewAgreementsClientWithBaseURI(baseURI string, subscriptionID string) AgreementsClient { return AgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an integration account agreement. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. agreementName is the integration account agreement -// name. agreement is the integration account agreement. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. agreementName +// is the integration account agreement name. agreement is the integration account agreement. func (client AgreementsClient) CreateOrUpdate(resourceGroupName string, integrationAccountName string, agreementName string, agreement IntegrationAccountAgreement) (result IntegrationAccountAgreement, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: agreement, @@ -548,9 +545,8 @@ func (client AgreementsClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete deletes an integration account agreement. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. agreementName is the integration account agreement -// name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. agreementName +// is the integration account agreement name. func (client AgreementsClient) Delete(resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, integrationAccountName, agreementName) if err != nil { @@ -615,9 +611,8 @@ func (client AgreementsClient) DeleteResponder(resp *http.Response) (result auto // Get gets an integration account agreement. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. agreementName is the integration account agreement -// name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. agreementName +// is the integration account agreement name. func (client AgreementsClient) Get(resourceGroupName string, integrationAccountName string, agreementName string) (result IntegrationAccountAgreement, err error) { req, err := client.GetPreparer(resourceGroupName, integrationAccountName, agreementName) if err != nil { @@ -683,9 +678,8 @@ func (client AgreementsClient) GetResponder(resp *http.Response) (result Integra // ListByIntegrationAccounts gets a list of integration account agreements. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. top is the number of items to be included in the -// result. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. top is the +// number of items to be included in the result. filter is the filter to apply on the operation. func (client AgreementsClient) ListByIntegrationAccounts(resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountAgreementListResult, err error) { req, err := client.ListByIntegrationAccountsPreparer(resourceGroupName, integrationAccountName, top, filter) if err != nil { @@ -777,3 +771,48 @@ func (client AgreementsClient) ListByIntegrationAccountsNextResults(lastResults return } + +// ListByIntegrationAccountsComplete gets all elements from the list without paging. +func (client AgreementsClient) ListByIntegrationAccountsComplete(resourceGroupName string, integrationAccountName string, top *int32, filter string, cancel <-chan struct{}) (<-chan IntegrationAccountAgreement, <-chan error) { + resultChan := make(chan IntegrationAccountAgreement) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByIntegrationAccounts(resourceGroupName, integrationAccountName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByIntegrationAccountsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/certificates.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/certificates.go index 04f3e7596..175ccbae3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/certificates.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/certificates.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// CertificatesClient is the rEST API for Azure Logic Apps. +// CertificatesClient is the REST API for Azure Logic Apps. type CertificatesClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the -// CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an integration account certificate. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. certificateName is the integration account -// certificate name. certificate is the integration account certificate. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. +// certificateName is the integration account certificate name. certificate is the integration account certificate. func (client CertificatesClient) CreateOrUpdate(resourceGroupName string, integrationAccountName string, certificateName string, certificate IntegrationAccountCertificate) (result IntegrationAccountCertificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: certificate, @@ -124,9 +121,8 @@ func (client CertificatesClient) CreateOrUpdateResponder(resp *http.Response) (r // Delete deletes an integration account certificate. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. certificateName is the integration account -// certificate name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. +// certificateName is the integration account certificate name. func (client CertificatesClient) Delete(resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, integrationAccountName, certificateName) if err != nil { @@ -191,9 +187,8 @@ func (client CertificatesClient) DeleteResponder(resp *http.Response) (result au // Get gets an integration account certificate. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. certificateName is the integration account -// certificate name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. +// certificateName is the integration account certificate name. func (client CertificatesClient) Get(resourceGroupName string, integrationAccountName string, certificateName string) (result IntegrationAccountCertificate, err error) { req, err := client.GetPreparer(resourceGroupName, integrationAccountName, certificateName) if err != nil { @@ -259,9 +254,8 @@ func (client CertificatesClient) GetResponder(resp *http.Response) (result Integ // ListByIntegrationAccounts gets a list of integration account certificates. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. top is the number of items to be included in the -// result. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. top is the +// number of items to be included in the result. func (client CertificatesClient) ListByIntegrationAccounts(resourceGroupName string, integrationAccountName string, top *int32) (result IntegrationAccountCertificateListResult, err error) { req, err := client.ListByIntegrationAccountsPreparer(resourceGroupName, integrationAccountName, top) if err != nil { @@ -350,3 +344,48 @@ func (client CertificatesClient) ListByIntegrationAccountsNextResults(lastResult return } + +// ListByIntegrationAccountsComplete gets all elements from the list without paging. +func (client CertificatesClient) ListByIntegrationAccountsComplete(resourceGroupName string, integrationAccountName string, top *int32, cancel <-chan struct{}) (<-chan IntegrationAccountCertificate, <-chan error) { + resultChan := make(chan IntegrationAccountCertificate) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByIntegrationAccounts(resourceGroupName, integrationAccountName, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByIntegrationAccountsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/client.go index 673d79956..5f1a079fe 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/client.go @@ -17,9 +17,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -133,3 +132,48 @@ func (client ManagementClient) ListOperationsNextResults(lastResults OperationLi return } + +// ListOperationsComplete gets all elements from the list without paging. +func (client ManagementClient) ListOperationsComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListOperations() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListOperationsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/integrationaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/integrationaccounts.go index 9de0b8072..f9fa29791 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/integrationaccounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/integrationaccounts.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,27 +23,25 @@ import ( "net/http" ) -// IntegrationAccountsClient is the rEST API for Azure Logic Apps. +// IntegrationAccountsClient is the REST API for Azure Logic Apps. type IntegrationAccountsClient struct { ManagementClient } -// NewIntegrationAccountsClient creates an instance of the -// IntegrationAccountsClient client. +// NewIntegrationAccountsClient creates an instance of the IntegrationAccountsClient client. func NewIntegrationAccountsClient(subscriptionID string) IntegrationAccountsClient { return NewIntegrationAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewIntegrationAccountsClientWithBaseURI creates an instance of the -// IntegrationAccountsClient client. +// NewIntegrationAccountsClientWithBaseURI creates an instance of the IntegrationAccountsClient client. func NewIntegrationAccountsClientWithBaseURI(baseURI string, subscriptionID string) IntegrationAccountsClient { return IntegrationAccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an integration account. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. integrationAccount is the integration account. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. +// integrationAccount is the integration account. func (client IntegrationAccountsClient) CreateOrUpdate(resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (result IntegrationAccount, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, integrationAccountName, integrationAccount) if err != nil { @@ -111,8 +108,7 @@ func (client IntegrationAccountsClient) CreateOrUpdateResponder(resp *http.Respo // Delete deletes an integration account. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. func (client IntegrationAccountsClient) Delete(resourceGroupName string, integrationAccountName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, integrationAccountName) if err != nil { @@ -176,8 +172,7 @@ func (client IntegrationAccountsClient) DeleteResponder(resp *http.Response) (re // Get gets an integration account. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. func (client IntegrationAccountsClient) Get(resourceGroupName string, integrationAccountName string) (result IntegrationAccount, err error) { req, err := client.GetPreparer(resourceGroupName, integrationAccountName) if err != nil { @@ -242,8 +237,8 @@ func (client IntegrationAccountsClient) GetResponder(resp *http.Response) (resul // GetCallbackURL gets the integration account callback URL. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. parameters is the callback URL parameters. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. parameters is +// the callback URL parameters. func (client IntegrationAccountsClient) GetCallbackURL(resourceGroupName string, integrationAccountName string, parameters GetCallbackURLParameters) (result CallbackURL, err error) { req, err := client.GetCallbackURLPreparer(resourceGroupName, integrationAccountName, parameters) if err != nil { @@ -310,8 +305,7 @@ func (client IntegrationAccountsClient) GetCallbackURLResponder(resp *http.Respo // ListByResourceGroup gets a list of integration accounts by resource group. // -// resourceGroupName is the resource group name. top is the number of items to -// be included in the result. +// resourceGroupName is the resource group name. top is the number of items to be included in the result. func (client IntegrationAccountsClient) ListByResourceGroup(resourceGroupName string, top *int32) (result IntegrationAccountListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, top) if err != nil { @@ -400,6 +394,51 @@ func (client IntegrationAccountsClient) ListByResourceGroupNextResults(lastResul return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client IntegrationAccountsClient) ListByResourceGroupComplete(resourceGroupName string, top *int32, cancel <-chan struct{}) (<-chan IntegrationAccount, <-chan error) { + resultChan := make(chan IntegrationAccount) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBySubscription gets a list of integration accounts by subscription. // // top is the number of items to be included in the result. @@ -490,10 +529,55 @@ func (client IntegrationAccountsClient) ListBySubscriptionNextResults(lastResult return } +// ListBySubscriptionComplete gets all elements from the list without paging. +func (client IntegrationAccountsClient) ListBySubscriptionComplete(top *int32, cancel <-chan struct{}) (<-chan IntegrationAccount, <-chan error) { + resultChan := make(chan IntegrationAccount) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscription(top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates an integration account. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. integrationAccount is the integration account. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. +// integrationAccount is the integration account. func (client IntegrationAccountsClient) Update(resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (result IntegrationAccount, err error) { req, err := client.UpdatePreparer(resourceGroupName, integrationAccountName, integrationAccount) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/maps.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/maps.go index 40ca83df4..9dfa5dcb4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/maps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/maps.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// MapsClient is the rEST API for Azure Logic Apps. +// MapsClient is the REST API for Azure Logic Apps. type MapsClient struct { ManagementClient } @@ -42,9 +41,8 @@ func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient // CreateOrUpdate creates or updates an integration account map. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. mapName is the integration account map name. -// mapParameter is the integration account map. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. mapName is the +// integration account map name. mapParameter is the integration account map. func (client MapsClient) CreateOrUpdate(resourceGroupName string, integrationAccountName string, mapName string, mapParameter IntegrationAccountMap) (result IntegrationAccountMap, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mapParameter, @@ -118,8 +116,8 @@ func (client MapsClient) CreateOrUpdateResponder(resp *http.Response) (result In // Delete deletes an integration account map. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. mapName is the integration account map name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. mapName is the +// integration account map name. func (client MapsClient) Delete(resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, integrationAccountName, mapName) if err != nil { @@ -184,8 +182,8 @@ func (client MapsClient) DeleteResponder(resp *http.Response) (result autorest.R // Get gets an integration account map. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. mapName is the integration account map name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. mapName is the +// integration account map name. func (client MapsClient) Get(resourceGroupName string, integrationAccountName string, mapName string) (result IntegrationAccountMap, err error) { req, err := client.GetPreparer(resourceGroupName, integrationAccountName, mapName) if err != nil { @@ -251,9 +249,8 @@ func (client MapsClient) GetResponder(resp *http.Response) (result IntegrationAc // ListByIntegrationAccounts gets a list of integration account maps. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. top is the number of items to be included in the -// result. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. top is the +// number of items to be included in the result. filter is the filter to apply on the operation. func (client MapsClient) ListByIntegrationAccounts(resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountMapListResult, err error) { req, err := client.ListByIntegrationAccountsPreparer(resourceGroupName, integrationAccountName, top, filter) if err != nil { @@ -345,3 +342,48 @@ func (client MapsClient) ListByIntegrationAccountsNextResults(lastResults Integr return } + +// ListByIntegrationAccountsComplete gets all elements from the list without paging. +func (client MapsClient) ListByIntegrationAccountsComplete(resourceGroupName string, integrationAccountName string, top *int32, filter string, cancel <-chan struct{}) (<-chan IntegrationAccountMap, <-chan error) { + resultChan := make(chan IntegrationAccountMap) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByIntegrationAccounts(resourceGroupName, integrationAccountName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByIntegrationAccountsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/models.go index 159cda6dc..80b94db41 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/models.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -63,26 +62,19 @@ const ( type DaysOfWeek string const ( - // DaysOfWeekFriday specifies the days of week friday state for days of - // week. + // DaysOfWeekFriday specifies the days of week friday state for days of week. DaysOfWeekFriday DaysOfWeek = "Friday" - // DaysOfWeekMonday specifies the days of week monday state for days of - // week. + // DaysOfWeekMonday specifies the days of week monday state for days of week. DaysOfWeekMonday DaysOfWeek = "Monday" - // DaysOfWeekSaturday specifies the days of week saturday state for days of - // week. + // DaysOfWeekSaturday specifies the days of week saturday state for days of week. DaysOfWeekSaturday DaysOfWeek = "Saturday" - // DaysOfWeekSunday specifies the days of week sunday state for days of - // week. + // DaysOfWeekSunday specifies the days of week sunday state for days of week. DaysOfWeekSunday DaysOfWeek = "Sunday" - // DaysOfWeekThursday specifies the days of week thursday state for days of - // week. + // DaysOfWeekThursday specifies the days of week thursday state for days of week. DaysOfWeekThursday DaysOfWeek = "Thursday" - // DaysOfWeekTuesday specifies the days of week tuesday state for days of - // week. + // DaysOfWeekTuesday specifies the days of week tuesday state for days of week. DaysOfWeekTuesday DaysOfWeek = "Tuesday" - // DaysOfWeekWednesday specifies the days of week wednesday state for days - // of week. + // DaysOfWeekWednesday specifies the days of week wednesday state for days of week. DaysOfWeekWednesday DaysOfWeek = "Wednesday" ) @@ -90,50 +82,35 @@ const ( type EdifactCharacterSet string const ( - // EdifactCharacterSetKECA specifies the edifact character set keca state - // for edifact character set. + // EdifactCharacterSetKECA specifies the edifact character set keca state for edifact character set. EdifactCharacterSetKECA EdifactCharacterSet = "KECA" - // EdifactCharacterSetNotSpecified specifies the edifact character set not - // specified state for edifact character set. + // EdifactCharacterSetNotSpecified specifies the edifact character set not specified state for edifact character set. EdifactCharacterSetNotSpecified EdifactCharacterSet = "NotSpecified" - // EdifactCharacterSetUNOA specifies the edifact character set unoa state - // for edifact character set. + // EdifactCharacterSetUNOA specifies the edifact character set unoa state for edifact character set. EdifactCharacterSetUNOA EdifactCharacterSet = "UNOA" - // EdifactCharacterSetUNOB specifies the edifact character set unob state - // for edifact character set. + // EdifactCharacterSetUNOB specifies the edifact character set unob state for edifact character set. EdifactCharacterSetUNOB EdifactCharacterSet = "UNOB" - // EdifactCharacterSetUNOC specifies the edifact character set unoc state - // for edifact character set. + // EdifactCharacterSetUNOC specifies the edifact character set unoc state for edifact character set. EdifactCharacterSetUNOC EdifactCharacterSet = "UNOC" - // EdifactCharacterSetUNOD specifies the edifact character set unod state - // for edifact character set. + // EdifactCharacterSetUNOD specifies the edifact character set unod state for edifact character set. EdifactCharacterSetUNOD EdifactCharacterSet = "UNOD" - // EdifactCharacterSetUNOE specifies the edifact character set unoe state - // for edifact character set. + // EdifactCharacterSetUNOE specifies the edifact character set unoe state for edifact character set. EdifactCharacterSetUNOE EdifactCharacterSet = "UNOE" - // EdifactCharacterSetUNOF specifies the edifact character set unof state - // for edifact character set. + // EdifactCharacterSetUNOF specifies the edifact character set unof state for edifact character set. EdifactCharacterSetUNOF EdifactCharacterSet = "UNOF" - // EdifactCharacterSetUNOG specifies the edifact character set unog state - // for edifact character set. + // EdifactCharacterSetUNOG specifies the edifact character set unog state for edifact character set. EdifactCharacterSetUNOG EdifactCharacterSet = "UNOG" - // EdifactCharacterSetUNOH specifies the edifact character set unoh state - // for edifact character set. + // EdifactCharacterSetUNOH specifies the edifact character set unoh state for edifact character set. EdifactCharacterSetUNOH EdifactCharacterSet = "UNOH" - // EdifactCharacterSetUNOI specifies the edifact character set unoi state - // for edifact character set. + // EdifactCharacterSetUNOI specifies the edifact character set unoi state for edifact character set. EdifactCharacterSetUNOI EdifactCharacterSet = "UNOI" - // EdifactCharacterSetUNOJ specifies the edifact character set unoj state - // for edifact character set. + // EdifactCharacterSetUNOJ specifies the edifact character set unoj state for edifact character set. EdifactCharacterSetUNOJ EdifactCharacterSet = "UNOJ" - // EdifactCharacterSetUNOK specifies the edifact character set unok state - // for edifact character set. + // EdifactCharacterSetUNOK specifies the edifact character set unok state for edifact character set. EdifactCharacterSetUNOK EdifactCharacterSet = "UNOK" - // EdifactCharacterSetUNOX specifies the edifact character set unox state - // for edifact character set. + // EdifactCharacterSetUNOX specifies the edifact character set unox state for edifact character set. EdifactCharacterSetUNOX EdifactCharacterSet = "UNOX" - // EdifactCharacterSetUNOY specifies the edifact character set unoy state - // for edifact character set. + // EdifactCharacterSetUNOY specifies the edifact character set unoy state for edifact character set. EdifactCharacterSetUNOY EdifactCharacterSet = "UNOY" ) @@ -141,14 +118,12 @@ const ( type EdifactDecimalIndicator string const ( - // EdifactDecimalIndicatorComma specifies the edifact decimal indicator - // comma state for edifact decimal indicator. + // EdifactDecimalIndicatorComma specifies the edifact decimal indicator comma state for edifact decimal indicator. EdifactDecimalIndicatorComma EdifactDecimalIndicator = "Comma" - // EdifactDecimalIndicatorDecimal specifies the edifact decimal indicator - // decimal state for edifact decimal indicator. + // EdifactDecimalIndicatorDecimal specifies the edifact decimal indicator decimal state for edifact decimal indicator. EdifactDecimalIndicatorDecimal EdifactDecimalIndicator = "Decimal" - // EdifactDecimalIndicatorNotSpecified specifies the edifact decimal - // indicator not specified state for edifact decimal indicator. + // EdifactDecimalIndicatorNotSpecified specifies the edifact decimal indicator not specified state for edifact decimal + // indicator. EdifactDecimalIndicatorNotSpecified EdifactDecimalIndicator = "NotSpecified" ) @@ -156,26 +131,19 @@ const ( type EncryptionAlgorithm string const ( - // EncryptionAlgorithmAES128 specifies the encryption algorithm aes128 - // state for encryption algorithm. + // EncryptionAlgorithmAES128 specifies the encryption algorithm aes128 state for encryption algorithm. EncryptionAlgorithmAES128 EncryptionAlgorithm = "AES128" - // EncryptionAlgorithmAES192 specifies the encryption algorithm aes192 - // state for encryption algorithm. + // EncryptionAlgorithmAES192 specifies the encryption algorithm aes192 state for encryption algorithm. EncryptionAlgorithmAES192 EncryptionAlgorithm = "AES192" - // EncryptionAlgorithmAES256 specifies the encryption algorithm aes256 - // state for encryption algorithm. + // EncryptionAlgorithmAES256 specifies the encryption algorithm aes256 state for encryption algorithm. EncryptionAlgorithmAES256 EncryptionAlgorithm = "AES256" - // EncryptionAlgorithmDES3 specifies the encryption algorithm des3 state - // for encryption algorithm. + // EncryptionAlgorithmDES3 specifies the encryption algorithm des3 state for encryption algorithm. EncryptionAlgorithmDES3 EncryptionAlgorithm = "DES3" - // EncryptionAlgorithmNone specifies the encryption algorithm none state - // for encryption algorithm. + // EncryptionAlgorithmNone specifies the encryption algorithm none state for encryption algorithm. EncryptionAlgorithmNone EncryptionAlgorithm = "None" - // EncryptionAlgorithmNotSpecified specifies the encryption algorithm not - // specified state for encryption algorithm. + // EncryptionAlgorithmNotSpecified specifies the encryption algorithm not specified state for encryption algorithm. EncryptionAlgorithmNotSpecified EncryptionAlgorithm = "NotSpecified" - // EncryptionAlgorithmRC2 specifies the encryption algorithm rc2 state for - // encryption algorithm. + // EncryptionAlgorithmRC2 specifies the encryption algorithm rc2 state for encryption algorithm. EncryptionAlgorithmRC2 EncryptionAlgorithm = "RC2" ) @@ -183,42 +151,34 @@ const ( type HashingAlgorithm string const ( - // HashingAlgorithmMD5 specifies the hashing algorithm md5 state for - // hashing algorithm. + // HashingAlgorithmMD5 specifies the hashing algorithm md5 state for hashing algorithm. HashingAlgorithmMD5 HashingAlgorithm = "MD5" - // HashingAlgorithmNone specifies the hashing algorithm none state for - // hashing algorithm. + // HashingAlgorithmNone specifies the hashing algorithm none state for hashing algorithm. HashingAlgorithmNone HashingAlgorithm = "None" - // HashingAlgorithmNotSpecified specifies the hashing algorithm not - // specified state for hashing algorithm. + // HashingAlgorithmNotSpecified specifies the hashing algorithm not specified state for hashing algorithm. HashingAlgorithmNotSpecified HashingAlgorithm = "NotSpecified" - // HashingAlgorithmSHA1 specifies the hashing algorithm sha1 state for - // hashing algorithm. + // HashingAlgorithmSHA1 specifies the hashing algorithm sha1 state for hashing algorithm. HashingAlgorithmSHA1 HashingAlgorithm = "SHA1" - // HashingAlgorithmSHA2256 specifies the hashing algorithm sha2256 state - // for hashing algorithm. + // HashingAlgorithmSHA2256 specifies the hashing algorithm sha2256 state for hashing algorithm. HashingAlgorithmSHA2256 HashingAlgorithm = "SHA2256" - // HashingAlgorithmSHA2384 specifies the hashing algorithm sha2384 state - // for hashing algorithm. + // HashingAlgorithmSHA2384 specifies the hashing algorithm sha2384 state for hashing algorithm. HashingAlgorithmSHA2384 HashingAlgorithm = "SHA2384" - // HashingAlgorithmSHA2512 specifies the hashing algorithm sha2512 state - // for hashing algorithm. + // HashingAlgorithmSHA2512 specifies the hashing algorithm sha2512 state for hashing algorithm. HashingAlgorithmSHA2512 HashingAlgorithm = "SHA2512" ) -// IntegrationAccountSkuName enumerates the values for integration account sku -// name. +// IntegrationAccountSkuName enumerates the values for integration account sku name. type IntegrationAccountSkuName string const ( - // IntegrationAccountSkuNameFree specifies the integration account sku name - // free state for integration account sku name. + // IntegrationAccountSkuNameFree specifies the integration account sku name free state for integration account sku + // name. IntegrationAccountSkuNameFree IntegrationAccountSkuName = "Free" - // IntegrationAccountSkuNameNotSpecified specifies the integration account - // sku name not specified state for integration account sku name. + // IntegrationAccountSkuNameNotSpecified specifies the integration account sku name not specified state for integration + // account sku name. IntegrationAccountSkuNameNotSpecified IntegrationAccountSkuName = "NotSpecified" - // IntegrationAccountSkuNameStandard specifies the integration account sku - // name standard state for integration account sku name. + // IntegrationAccountSkuNameStandard specifies the integration account sku name standard state for integration account + // sku name. IntegrationAccountSkuNameStandard IntegrationAccountSkuName = "Standard" ) @@ -226,8 +186,7 @@ const ( type KeyType string const ( - // KeyTypeNotSpecified specifies the key type not specified state for key - // type. + // KeyTypeNotSpecified specifies the key type not specified state for key type. KeyTypeNotSpecified KeyType = "NotSpecified" // KeyTypePrimary specifies the key type primary state for key type. KeyTypePrimary KeyType = "Primary" @@ -239,8 +198,7 @@ const ( type MapType string const ( - // MapTypeNotSpecified specifies the map type not specified state for map - // type. + // MapTypeNotSpecified specifies the map type not specified state for map type. MapTypeNotSpecified MapType = "NotSpecified" // MapTypeXslt specifies the map type xslt state for map type. MapTypeXslt MapType = "Xslt" @@ -250,14 +208,11 @@ const ( type MessageFilterType string const ( - // MessageFilterTypeExclude specifies the message filter type exclude state - // for message filter type. + // MessageFilterTypeExclude specifies the message filter type exclude state for message filter type. MessageFilterTypeExclude MessageFilterType = "Exclude" - // MessageFilterTypeInclude specifies the message filter type include state - // for message filter type. + // MessageFilterTypeInclude specifies the message filter type include state for message filter type. MessageFilterTypeInclude MessageFilterType = "Include" - // MessageFilterTypeNotSpecified specifies the message filter type not - // specified state for message filter type. + // MessageFilterTypeNotSpecified specifies the message filter type not specified state for message filter type. MessageFilterTypeNotSpecified MessageFilterType = "NotSpecified" ) @@ -265,32 +220,23 @@ const ( type ParameterType string const ( - // ParameterTypeArray specifies the parameter type array state for - // parameter type. + // ParameterTypeArray specifies the parameter type array state for parameter type. ParameterTypeArray ParameterType = "Array" - // ParameterTypeBool specifies the parameter type bool state for parameter - // type. + // ParameterTypeBool specifies the parameter type bool state for parameter type. ParameterTypeBool ParameterType = "Bool" - // ParameterTypeFloat specifies the parameter type float state for - // parameter type. + // ParameterTypeFloat specifies the parameter type float state for parameter type. ParameterTypeFloat ParameterType = "Float" - // ParameterTypeInt specifies the parameter type int state for parameter - // type. + // ParameterTypeInt specifies the parameter type int state for parameter type. ParameterTypeInt ParameterType = "Int" - // ParameterTypeNotSpecified specifies the parameter type not specified - // state for parameter type. + // ParameterTypeNotSpecified specifies the parameter type not specified state for parameter type. ParameterTypeNotSpecified ParameterType = "NotSpecified" - // ParameterTypeObject specifies the parameter type object state for - // parameter type. + // ParameterTypeObject specifies the parameter type object state for parameter type. ParameterTypeObject ParameterType = "Object" - // ParameterTypeSecureObject specifies the parameter type secure object - // state for parameter type. + // ParameterTypeSecureObject specifies the parameter type secure object state for parameter type. ParameterTypeSecureObject ParameterType = "SecureObject" - // ParameterTypeSecureString specifies the parameter type secure string - // state for parameter type. + // ParameterTypeSecureString specifies the parameter type secure string state for parameter type. ParameterTypeSecureString ParameterType = "SecureString" - // ParameterTypeString specifies the parameter type string state for - // parameter type. + // ParameterTypeString specifies the parameter type string state for parameter type. ParameterTypeString ParameterType = "String" ) @@ -300,8 +246,7 @@ type PartnerType string const ( // PartnerTypeB2B specifies the partner type b2b state for partner type. PartnerTypeB2B PartnerType = "B2B" - // PartnerTypeNotSpecified specifies the partner type not specified state - // for partner type. + // PartnerTypeNotSpecified specifies the partner type not specified state for partner type. PartnerTypeNotSpecified PartnerType = "NotSpecified" ) @@ -309,29 +254,21 @@ const ( type RecurrenceFrequency string const ( - // RecurrenceFrequencyDay specifies the recurrence frequency day state for - // recurrence frequency. + // RecurrenceFrequencyDay specifies the recurrence frequency day state for recurrence frequency. RecurrenceFrequencyDay RecurrenceFrequency = "Day" - // RecurrenceFrequencyHour specifies the recurrence frequency hour state - // for recurrence frequency. + // RecurrenceFrequencyHour specifies the recurrence frequency hour state for recurrence frequency. RecurrenceFrequencyHour RecurrenceFrequency = "Hour" - // RecurrenceFrequencyMinute specifies the recurrence frequency minute - // state for recurrence frequency. + // RecurrenceFrequencyMinute specifies the recurrence frequency minute state for recurrence frequency. RecurrenceFrequencyMinute RecurrenceFrequency = "Minute" - // RecurrenceFrequencyMonth specifies the recurrence frequency month state - // for recurrence frequency. + // RecurrenceFrequencyMonth specifies the recurrence frequency month state for recurrence frequency. RecurrenceFrequencyMonth RecurrenceFrequency = "Month" - // RecurrenceFrequencyNotSpecified specifies the recurrence frequency not - // specified state for recurrence frequency. + // RecurrenceFrequencyNotSpecified specifies the recurrence frequency not specified state for recurrence frequency. RecurrenceFrequencyNotSpecified RecurrenceFrequency = "NotSpecified" - // RecurrenceFrequencySecond specifies the recurrence frequency second - // state for recurrence frequency. + // RecurrenceFrequencySecond specifies the recurrence frequency second state for recurrence frequency. RecurrenceFrequencySecond RecurrenceFrequency = "Second" - // RecurrenceFrequencyWeek specifies the recurrence frequency week state - // for recurrence frequency. + // RecurrenceFrequencyWeek specifies the recurrence frequency week state for recurrence frequency. RecurrenceFrequencyWeek RecurrenceFrequency = "Week" - // RecurrenceFrequencyYear specifies the recurrence frequency year state - // for recurrence frequency. + // RecurrenceFrequencyYear specifies the recurrence frequency year state for recurrence frequency. RecurrenceFrequencyYear RecurrenceFrequency = "Year" ) @@ -339,8 +276,7 @@ const ( type SchemaType string const ( - // SchemaTypeNotSpecified specifies the schema type not specified state for - // schema type. + // SchemaTypeNotSpecified specifies the schema type not specified state for schema type. SchemaTypeNotSpecified SchemaType = "NotSpecified" // SchemaTypeXML specifies the schema type xml state for schema type. SchemaTypeXML SchemaType = "Xml" @@ -350,20 +286,16 @@ const ( type SegmentTerminatorSuffix string const ( - // SegmentTerminatorSuffixCR specifies the segment terminator suffix cr - // state for segment terminator suffix. + // SegmentTerminatorSuffixCR specifies the segment terminator suffix cr state for segment terminator suffix. SegmentTerminatorSuffixCR SegmentTerminatorSuffix = "CR" - // SegmentTerminatorSuffixCRLF specifies the segment terminator suffix crlf - // state for segment terminator suffix. + // SegmentTerminatorSuffixCRLF specifies the segment terminator suffix crlf state for segment terminator suffix. SegmentTerminatorSuffixCRLF SegmentTerminatorSuffix = "CRLF" - // SegmentTerminatorSuffixLF specifies the segment terminator suffix lf - // state for segment terminator suffix. + // SegmentTerminatorSuffixLF specifies the segment terminator suffix lf state for segment terminator suffix. SegmentTerminatorSuffixLF SegmentTerminatorSuffix = "LF" - // SegmentTerminatorSuffixNone specifies the segment terminator suffix none - // state for segment terminator suffix. + // SegmentTerminatorSuffixNone specifies the segment terminator suffix none state for segment terminator suffix. SegmentTerminatorSuffixNone SegmentTerminatorSuffix = "None" - // SegmentTerminatorSuffixNotSpecified specifies the segment terminator - // suffix not specified state for segment terminator suffix. + // SegmentTerminatorSuffixNotSpecified specifies the segment terminator suffix not specified state for segment + // terminator suffix. SegmentTerminatorSuffixNotSpecified SegmentTerminatorSuffix = "NotSpecified" ) @@ -371,23 +303,17 @@ const ( type SigningAlgorithm string const ( - // SigningAlgorithmDefault specifies the signing algorithm default state - // for signing algorithm. + // SigningAlgorithmDefault specifies the signing algorithm default state for signing algorithm. SigningAlgorithmDefault SigningAlgorithm = "Default" - // SigningAlgorithmNotSpecified specifies the signing algorithm not - // specified state for signing algorithm. + // SigningAlgorithmNotSpecified specifies the signing algorithm not specified state for signing algorithm. SigningAlgorithmNotSpecified SigningAlgorithm = "NotSpecified" - // SigningAlgorithmSHA1 specifies the signing algorithm sha1 state for - // signing algorithm. + // SigningAlgorithmSHA1 specifies the signing algorithm sha1 state for signing algorithm. SigningAlgorithmSHA1 SigningAlgorithm = "SHA1" - // SigningAlgorithmSHA2256 specifies the signing algorithm sha2256 state - // for signing algorithm. + // SigningAlgorithmSHA2256 specifies the signing algorithm sha2256 state for signing algorithm. SigningAlgorithmSHA2256 SigningAlgorithm = "SHA2256" - // SigningAlgorithmSHA2384 specifies the signing algorithm sha2384 state - // for signing algorithm. + // SigningAlgorithmSHA2384 specifies the signing algorithm sha2384 state for signing algorithm. SigningAlgorithmSHA2384 SigningAlgorithm = "SHA2384" - // SigningAlgorithmSHA2512 specifies the signing algorithm sha2512 state - // for signing algorithm. + // SigningAlgorithmSHA2512 specifies the signing algorithm sha2512 state for signing algorithm. SigningAlgorithmSHA2512 SigningAlgorithm = "SHA2512" ) @@ -399,8 +325,7 @@ const ( SkuNameBasic SkuName = "Basic" // SkuNameFree specifies the sku name free state for sku name. SkuNameFree SkuName = "Free" - // SkuNameNotSpecified specifies the sku name not specified state for sku - // name. + // SkuNameNotSpecified specifies the sku name not specified state for sku name. SkuNameNotSpecified SkuName = "NotSpecified" // SkuNamePremium specifies the sku name premium state for sku name. SkuNamePremium SkuName = "Premium" @@ -414,17 +339,17 @@ const ( type TrailingSeparatorPolicy string const ( - // TrailingSeparatorPolicyMandatory specifies the trailing separator policy - // mandatory state for trailing separator policy. + // TrailingSeparatorPolicyMandatory specifies the trailing separator policy mandatory state for trailing separator + // policy. TrailingSeparatorPolicyMandatory TrailingSeparatorPolicy = "Mandatory" - // TrailingSeparatorPolicyNotAllowed specifies the trailing separator - // policy not allowed state for trailing separator policy. + // TrailingSeparatorPolicyNotAllowed specifies the trailing separator policy not allowed state for trailing separator + // policy. TrailingSeparatorPolicyNotAllowed TrailingSeparatorPolicy = "NotAllowed" - // TrailingSeparatorPolicyNotSpecified specifies the trailing separator - // policy not specified state for trailing separator policy. + // TrailingSeparatorPolicyNotSpecified specifies the trailing separator policy not specified state for trailing + // separator policy. TrailingSeparatorPolicyNotSpecified TrailingSeparatorPolicy = "NotSpecified" - // TrailingSeparatorPolicyOptional specifies the trailing separator policy - // optional state for trailing separator policy. + // TrailingSeparatorPolicyOptional specifies the trailing separator policy optional state for trailing separator + // policy. TrailingSeparatorPolicyOptional TrailingSeparatorPolicy = "Optional" ) @@ -432,78 +357,73 @@ const ( type UsageIndicator string const ( - // UsageIndicatorInformation specifies the usage indicator information - // state for usage indicator. + // UsageIndicatorInformation specifies the usage indicator information state for usage indicator. UsageIndicatorInformation UsageIndicator = "Information" - // UsageIndicatorNotSpecified specifies the usage indicator not specified - // state for usage indicator. + // UsageIndicatorNotSpecified specifies the usage indicator not specified state for usage indicator. UsageIndicatorNotSpecified UsageIndicator = "NotSpecified" - // UsageIndicatorProduction specifies the usage indicator production state - // for usage indicator. + // UsageIndicatorProduction specifies the usage indicator production state for usage indicator. UsageIndicatorProduction UsageIndicator = "Production" - // UsageIndicatorTest specifies the usage indicator test state for usage - // indicator. + // UsageIndicatorTest specifies the usage indicator test state for usage indicator. UsageIndicatorTest UsageIndicator = "Test" ) -// WorkflowProvisioningState enumerates the values for workflow provisioning -// state. +// WorkflowProvisioningState enumerates the values for workflow provisioning state. type WorkflowProvisioningState string const ( - // WorkflowProvisioningStateAccepted specifies the workflow provisioning - // state accepted state for workflow provisioning state. + // WorkflowProvisioningStateAccepted specifies the workflow provisioning state accepted state for workflow provisioning + // state. WorkflowProvisioningStateAccepted WorkflowProvisioningState = "Accepted" - // WorkflowProvisioningStateCanceled specifies the workflow provisioning - // state canceled state for workflow provisioning state. + // WorkflowProvisioningStateCanceled specifies the workflow provisioning state canceled state for workflow provisioning + // state. WorkflowProvisioningStateCanceled WorkflowProvisioningState = "Canceled" - // WorkflowProvisioningStateCompleted specifies the workflow provisioning - // state completed state for workflow provisioning state. + // WorkflowProvisioningStateCompleted specifies the workflow provisioning state completed state for workflow + // provisioning state. WorkflowProvisioningStateCompleted WorkflowProvisioningState = "Completed" - // WorkflowProvisioningStateCreated specifies the workflow provisioning - // state created state for workflow provisioning state. + // WorkflowProvisioningStateCreated specifies the workflow provisioning state created state for workflow provisioning + // state. WorkflowProvisioningStateCreated WorkflowProvisioningState = "Created" - // WorkflowProvisioningStateCreating specifies the workflow provisioning - // state creating state for workflow provisioning state. + // WorkflowProvisioningStateCreating specifies the workflow provisioning state creating state for workflow provisioning + // state. WorkflowProvisioningStateCreating WorkflowProvisioningState = "Creating" - // WorkflowProvisioningStateDeleted specifies the workflow provisioning - // state deleted state for workflow provisioning state. + // WorkflowProvisioningStateDeleted specifies the workflow provisioning state deleted state for workflow provisioning + // state. WorkflowProvisioningStateDeleted WorkflowProvisioningState = "Deleted" - // WorkflowProvisioningStateDeleting specifies the workflow provisioning - // state deleting state for workflow provisioning state. + // WorkflowProvisioningStateDeleting specifies the workflow provisioning state deleting state for workflow provisioning + // state. WorkflowProvisioningStateDeleting WorkflowProvisioningState = "Deleting" - // WorkflowProvisioningStateFailed specifies the workflow provisioning - // state failed state for workflow provisioning state. + // WorkflowProvisioningStateFailed specifies the workflow provisioning state failed state for workflow provisioning + // state. WorkflowProvisioningStateFailed WorkflowProvisioningState = "Failed" - // WorkflowProvisioningStateMoving specifies the workflow provisioning - // state moving state for workflow provisioning state. + // WorkflowProvisioningStateMoving specifies the workflow provisioning state moving state for workflow provisioning + // state. WorkflowProvisioningStateMoving WorkflowProvisioningState = "Moving" - // WorkflowProvisioningStateNotSpecified specifies the workflow - // provisioning state not specified state for workflow provisioning state. + // WorkflowProvisioningStateNotSpecified specifies the workflow provisioning state not specified state for workflow + // provisioning state. WorkflowProvisioningStateNotSpecified WorkflowProvisioningState = "NotSpecified" - // WorkflowProvisioningStateReady specifies the workflow provisioning state - // ready state for workflow provisioning state. + // WorkflowProvisioningStateReady specifies the workflow provisioning state ready state for workflow provisioning + // state. WorkflowProvisioningStateReady WorkflowProvisioningState = "Ready" - // WorkflowProvisioningStateRegistered specifies the workflow provisioning - // state registered state for workflow provisioning state. + // WorkflowProvisioningStateRegistered specifies the workflow provisioning state registered state for workflow + // provisioning state. WorkflowProvisioningStateRegistered WorkflowProvisioningState = "Registered" - // WorkflowProvisioningStateRegistering specifies the workflow provisioning - // state registering state for workflow provisioning state. + // WorkflowProvisioningStateRegistering specifies the workflow provisioning state registering state for workflow + // provisioning state. WorkflowProvisioningStateRegistering WorkflowProvisioningState = "Registering" - // WorkflowProvisioningStateRunning specifies the workflow provisioning - // state running state for workflow provisioning state. + // WorkflowProvisioningStateRunning specifies the workflow provisioning state running state for workflow provisioning + // state. WorkflowProvisioningStateRunning WorkflowProvisioningState = "Running" - // WorkflowProvisioningStateSucceeded specifies the workflow provisioning - // state succeeded state for workflow provisioning state. + // WorkflowProvisioningStateSucceeded specifies the workflow provisioning state succeeded state for workflow + // provisioning state. WorkflowProvisioningStateSucceeded WorkflowProvisioningState = "Succeeded" - // WorkflowProvisioningStateUnregistered specifies the workflow - // provisioning state unregistered state for workflow provisioning state. + // WorkflowProvisioningStateUnregistered specifies the workflow provisioning state unregistered state for workflow + // provisioning state. WorkflowProvisioningStateUnregistered WorkflowProvisioningState = "Unregistered" - // WorkflowProvisioningStateUnregistering specifies the workflow - // provisioning state unregistering state for workflow provisioning state. + // WorkflowProvisioningStateUnregistering specifies the workflow provisioning state unregistering state for workflow + // provisioning state. WorkflowProvisioningStateUnregistering WorkflowProvisioningState = "Unregistering" - // WorkflowProvisioningStateUpdating specifies the workflow provisioning - // state updating state for workflow provisioning state. + // WorkflowProvisioningStateUpdating specifies the workflow provisioning state updating state for workflow provisioning + // state. WorkflowProvisioningStateUpdating WorkflowProvisioningState = "Updating" ) @@ -511,23 +431,17 @@ const ( type WorkflowState string const ( - // WorkflowStateCompleted specifies the workflow state completed state for - // workflow state. + // WorkflowStateCompleted specifies the workflow state completed state for workflow state. WorkflowStateCompleted WorkflowState = "Completed" - // WorkflowStateDeleted specifies the workflow state deleted state for - // workflow state. + // WorkflowStateDeleted specifies the workflow state deleted state for workflow state. WorkflowStateDeleted WorkflowState = "Deleted" - // WorkflowStateDisabled specifies the workflow state disabled state for - // workflow state. + // WorkflowStateDisabled specifies the workflow state disabled state for workflow state. WorkflowStateDisabled WorkflowState = "Disabled" - // WorkflowStateEnabled specifies the workflow state enabled state for - // workflow state. + // WorkflowStateEnabled specifies the workflow state enabled state for workflow state. WorkflowStateEnabled WorkflowState = "Enabled" - // WorkflowStateNotSpecified specifies the workflow state not specified - // state for workflow state. + // WorkflowStateNotSpecified specifies the workflow state not specified state for workflow state. WorkflowStateNotSpecified WorkflowState = "NotSpecified" - // WorkflowStateSuspended specifies the workflow state suspended state for - // workflow state. + // WorkflowStateSuspended specifies the workflow state suspended state for workflow state. WorkflowStateSuspended WorkflowState = "Suspended" ) @@ -535,120 +449,91 @@ const ( type WorkflowStatus string const ( - // WorkflowStatusAborted specifies the workflow status aborted state for - // workflow status. + // WorkflowStatusAborted specifies the workflow status aborted state for workflow status. WorkflowStatusAborted WorkflowStatus = "Aborted" - // WorkflowStatusCancelled specifies the workflow status cancelled state - // for workflow status. + // WorkflowStatusCancelled specifies the workflow status cancelled state for workflow status. WorkflowStatusCancelled WorkflowStatus = "Cancelled" - // WorkflowStatusFailed specifies the workflow status failed state for - // workflow status. + // WorkflowStatusFailed specifies the workflow status failed state for workflow status. WorkflowStatusFailed WorkflowStatus = "Failed" - // WorkflowStatusFaulted specifies the workflow status faulted state for - // workflow status. + // WorkflowStatusFaulted specifies the workflow status faulted state for workflow status. WorkflowStatusFaulted WorkflowStatus = "Faulted" - // WorkflowStatusIgnored specifies the workflow status ignored state for - // workflow status. + // WorkflowStatusIgnored specifies the workflow status ignored state for workflow status. WorkflowStatusIgnored WorkflowStatus = "Ignored" - // WorkflowStatusNotSpecified specifies the workflow status not specified - // state for workflow status. + // WorkflowStatusNotSpecified specifies the workflow status not specified state for workflow status. WorkflowStatusNotSpecified WorkflowStatus = "NotSpecified" - // WorkflowStatusPaused specifies the workflow status paused state for - // workflow status. + // WorkflowStatusPaused specifies the workflow status paused state for workflow status. WorkflowStatusPaused WorkflowStatus = "Paused" - // WorkflowStatusRunning specifies the workflow status running state for - // workflow status. + // WorkflowStatusRunning specifies the workflow status running state for workflow status. WorkflowStatusRunning WorkflowStatus = "Running" - // WorkflowStatusSkipped specifies the workflow status skipped state for - // workflow status. + // WorkflowStatusSkipped specifies the workflow status skipped state for workflow status. WorkflowStatusSkipped WorkflowStatus = "Skipped" - // WorkflowStatusSucceeded specifies the workflow status succeeded state - // for workflow status. + // WorkflowStatusSucceeded specifies the workflow status succeeded state for workflow status. WorkflowStatusSucceeded WorkflowStatus = "Succeeded" - // WorkflowStatusSuspended specifies the workflow status suspended state - // for workflow status. + // WorkflowStatusSuspended specifies the workflow status suspended state for workflow status. WorkflowStatusSuspended WorkflowStatus = "Suspended" - // WorkflowStatusTimedOut specifies the workflow status timed out state for - // workflow status. + // WorkflowStatusTimedOut specifies the workflow status timed out state for workflow status. WorkflowStatusTimedOut WorkflowStatus = "TimedOut" - // WorkflowStatusWaiting specifies the workflow status waiting state for - // workflow status. + // WorkflowStatusWaiting specifies the workflow status waiting state for workflow status. WorkflowStatusWaiting WorkflowStatus = "Waiting" ) -// WorkflowTriggerProvisioningState enumerates the values for workflow trigger -// provisioning state. +// WorkflowTriggerProvisioningState enumerates the values for workflow trigger provisioning state. type WorkflowTriggerProvisioningState string const ( - // WorkflowTriggerProvisioningStateAccepted specifies the workflow trigger - // provisioning state accepted state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateAccepted specifies the workflow trigger provisioning state accepted state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateAccepted WorkflowTriggerProvisioningState = "Accepted" - // WorkflowTriggerProvisioningStateCanceled specifies the workflow trigger - // provisioning state canceled state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateCanceled specifies the workflow trigger provisioning state canceled state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateCanceled WorkflowTriggerProvisioningState = "Canceled" - // WorkflowTriggerProvisioningStateCompleted specifies the workflow trigger - // provisioning state completed state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateCompleted specifies the workflow trigger provisioning state completed state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateCompleted WorkflowTriggerProvisioningState = "Completed" - // WorkflowTriggerProvisioningStateCreated specifies the workflow trigger - // provisioning state created state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateCreated specifies the workflow trigger provisioning state created state for workflow + // trigger provisioning state. WorkflowTriggerProvisioningStateCreated WorkflowTriggerProvisioningState = "Created" - // WorkflowTriggerProvisioningStateCreating specifies the workflow trigger - // provisioning state creating state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateCreating specifies the workflow trigger provisioning state creating state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateCreating WorkflowTriggerProvisioningState = "Creating" - // WorkflowTriggerProvisioningStateDeleted specifies the workflow trigger - // provisioning state deleted state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateDeleted specifies the workflow trigger provisioning state deleted state for workflow + // trigger provisioning state. WorkflowTriggerProvisioningStateDeleted WorkflowTriggerProvisioningState = "Deleted" - // WorkflowTriggerProvisioningStateDeleting specifies the workflow trigger - // provisioning state deleting state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateDeleting specifies the workflow trigger provisioning state deleting state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateDeleting WorkflowTriggerProvisioningState = "Deleting" - // WorkflowTriggerProvisioningStateFailed specifies the workflow trigger - // provisioning state failed state for workflow trigger provisioning state. + // WorkflowTriggerProvisioningStateFailed specifies the workflow trigger provisioning state failed state for workflow + // trigger provisioning state. WorkflowTriggerProvisioningStateFailed WorkflowTriggerProvisioningState = "Failed" - // WorkflowTriggerProvisioningStateMoving specifies the workflow trigger - // provisioning state moving state for workflow trigger provisioning state. + // WorkflowTriggerProvisioningStateMoving specifies the workflow trigger provisioning state moving state for workflow + // trigger provisioning state. WorkflowTriggerProvisioningStateMoving WorkflowTriggerProvisioningState = "Moving" - // WorkflowTriggerProvisioningStateNotSpecified specifies the workflow - // trigger provisioning state not specified state for workflow trigger - // provisioning state. + // WorkflowTriggerProvisioningStateNotSpecified specifies the workflow trigger provisioning state not specified state + // for workflow trigger provisioning state. WorkflowTriggerProvisioningStateNotSpecified WorkflowTriggerProvisioningState = "NotSpecified" - // WorkflowTriggerProvisioningStateReady specifies the workflow trigger - // provisioning state ready state for workflow trigger provisioning state. + // WorkflowTriggerProvisioningStateReady specifies the workflow trigger provisioning state ready state for workflow + // trigger provisioning state. WorkflowTriggerProvisioningStateReady WorkflowTriggerProvisioningState = "Ready" - // WorkflowTriggerProvisioningStateRegistered specifies the workflow - // trigger provisioning state registered state for workflow trigger - // provisioning state. + // WorkflowTriggerProvisioningStateRegistered specifies the workflow trigger provisioning state registered state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateRegistered WorkflowTriggerProvisioningState = "Registered" - // WorkflowTriggerProvisioningStateRegistering specifies the workflow - // trigger provisioning state registering state for workflow trigger - // provisioning state. + // WorkflowTriggerProvisioningStateRegistering specifies the workflow trigger provisioning state registering state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateRegistering WorkflowTriggerProvisioningState = "Registering" - // WorkflowTriggerProvisioningStateRunning specifies the workflow trigger - // provisioning state running state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateRunning specifies the workflow trigger provisioning state running state for workflow + // trigger provisioning state. WorkflowTriggerProvisioningStateRunning WorkflowTriggerProvisioningState = "Running" - // WorkflowTriggerProvisioningStateSucceeded specifies the workflow trigger - // provisioning state succeeded state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateSucceeded specifies the workflow trigger provisioning state succeeded state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateSucceeded WorkflowTriggerProvisioningState = "Succeeded" - // WorkflowTriggerProvisioningStateUnregistered specifies the workflow - // trigger provisioning state unregistered state for workflow trigger - // provisioning state. + // WorkflowTriggerProvisioningStateUnregistered specifies the workflow trigger provisioning state unregistered state + // for workflow trigger provisioning state. WorkflowTriggerProvisioningStateUnregistered WorkflowTriggerProvisioningState = "Unregistered" - // WorkflowTriggerProvisioningStateUnregistering specifies the workflow - // trigger provisioning state unregistering state for workflow trigger - // provisioning state. + // WorkflowTriggerProvisioningStateUnregistering specifies the workflow trigger provisioning state unregistering state + // for workflow trigger provisioning state. WorkflowTriggerProvisioningStateUnregistering WorkflowTriggerProvisioningState = "Unregistering" - // WorkflowTriggerProvisioningStateUpdating specifies the workflow trigger - // provisioning state updating state for workflow trigger provisioning - // state. + // WorkflowTriggerProvisioningStateUpdating specifies the workflow trigger provisioning state updating state for + // workflow trigger provisioning state. WorkflowTriggerProvisioningStateUpdating WorkflowTriggerProvisioningState = "Updating" ) @@ -656,17 +541,13 @@ const ( type X12CharacterSet string const ( - // X12CharacterSetBasic specifies the x12 character set basic state for x12 - // character set. + // X12CharacterSetBasic specifies the x12 character set basic state for x12 character set. X12CharacterSetBasic X12CharacterSet = "Basic" - // X12CharacterSetExtended specifies the x12 character set extended state - // for x12 character set. + // X12CharacterSetExtended specifies the x12 character set extended state for x12 character set. X12CharacterSetExtended X12CharacterSet = "Extended" - // X12CharacterSetNotSpecified specifies the x12 character set not - // specified state for x12 character set. + // X12CharacterSetNotSpecified specifies the x12 character set not specified state for x12 character set. X12CharacterSetNotSpecified X12CharacterSet = "NotSpecified" - // X12CharacterSetUTF8 specifies the x12 character set utf8 state for x12 - // character set. + // X12CharacterSetUTF8 specifies the x12 character set utf8 state for x12 character set. X12CharacterSetUTF8 X12CharacterSet = "UTF8" ) @@ -674,14 +555,11 @@ const ( type X12DateFormat string const ( - // X12DateFormatCCYYMMDD specifies the x12 date format ccyymmdd state for - // x12 date format. + // X12DateFormatCCYYMMDD specifies the x12 date format ccyymmdd state for x12 date format. X12DateFormatCCYYMMDD X12DateFormat = "CCYYMMDD" - // X12DateFormatNotSpecified specifies the x12 date format not specified - // state for x12 date format. + // X12DateFormatNotSpecified specifies the x12 date format not specified state for x12 date format. X12DateFormatNotSpecified X12DateFormat = "NotSpecified" - // X12DateFormatYYMMDD specifies the x12 date format yymmdd state for x12 - // date format. + // X12DateFormatYYMMDD specifies the x12 date format yymmdd state for x12 date format. X12DateFormatYYMMDD X12DateFormat = "YYMMDD" ) @@ -689,20 +567,15 @@ const ( type X12TimeFormat string const ( - // X12TimeFormatHHMM specifies the x12 time format hhmm state for x12 time - // format. + // X12TimeFormatHHMM specifies the x12 time format hhmm state for x12 time format. X12TimeFormatHHMM X12TimeFormat = "HHMM" - // X12TimeFormatHHMMSS specifies the x12 time format hhmmss state for x12 - // time format. + // X12TimeFormatHHMMSS specifies the x12 time format hhmmss state for x12 time format. X12TimeFormatHHMMSS X12TimeFormat = "HHMMSS" - // X12TimeFormatHHMMSSd specifies the x12 time format hhmms sd state for - // x12 time format. + // X12TimeFormatHHMMSSd specifies the x12 time format hhmms sd state for x12 time format. X12TimeFormatHHMMSSd X12TimeFormat = "HHMMSSd" - // X12TimeFormatHHMMSSdd specifies the x12 time format hhmms sdd state for - // x12 time format. + // X12TimeFormatHHMMSSdd specifies the x12 time format hhmms sdd state for x12 time format. X12TimeFormatHHMMSSdd X12TimeFormat = "HHMMSSdd" - // X12TimeFormatNotSpecified specifies the x12 time format not specified - // state for x12 time format. + // X12TimeFormatNotSpecified specifies the x12 time format not specified state for x12 time format. X12TimeFormatNotSpecified X12TimeFormat = "NotSpecified" ) @@ -713,8 +586,7 @@ type AgreementContent struct { Edifact *EdifactAgreementContent `json:"edifact,omitempty"` } -// AS2AcknowledgementConnectionSettings is the AS2 agreement acknowledegment -// connection settings. +// AS2AcknowledgementConnectionSettings is the AS2 agreement acknowledegment connection settings. type AS2AcknowledgementConnectionSettings struct { IgnoreCertificateNameMismatch *bool `json:"ignoreCertificateNameMismatch,omitempty"` SupportHTTPStatusCodeContinue *bool `json:"supportHttpStatusCodeContinue,omitempty"` @@ -756,8 +628,7 @@ type AS2MdnSettings struct { MicHashingAlgorithm HashingAlgorithm `json:"micHashingAlgorithm,omitempty"` } -// AS2MessageConnectionSettings is the AS2 agreement message connection -// settings. +// AS2MessageConnectionSettings is the AS2 agreement message connection settings. type AS2MessageConnectionSettings struct { IgnoreCertificateNameMismatch *bool `json:"ignoreCertificateNameMismatch,omitempty"` SupportHTTPStatusCodeContinue *bool `json:"supportHttpStatusCodeContinue,omitempty"` @@ -848,8 +719,7 @@ type Correlation struct { ClientTrackingID *string `json:"clientTrackingId,omitempty"` } -// EdifactAcknowledgementSettings is the Edifact agreement acknowledgement -// settings. +// EdifactAcknowledgementSettings is the Edifact agreement acknowledgement settings. type EdifactAcknowledgementSettings struct { NeedTechnicalAcknowledgement *bool `json:"needTechnicalAcknowledgement,omitempty"` BatchTechnicalAcknowledgements *bool `json:"batchTechnicalAcknowledgements,omitempty"` @@ -1042,22 +912,20 @@ type EdifactValidationSettings struct { TrailingSeparatorPolicy TrailingSeparatorPolicy `json:"trailingSeparatorPolicy,omitempty"` } -// ErrorProperties is error properties indicate why the Logic service was not -// able to process the incoming request. The reason is provided in the error -// message. +// ErrorProperties is error properties indicate why the Logic service was not able to process the incoming request. The +// reason is provided in the error message. type ErrorProperties struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } -// ErrorResponse is error reponse indicates Logic service is not able to -// process the incoming request. The error property contains the error details. +// ErrorResponse is error reponse indicates Logic service is not able to process the incoming request. The error +// property contains the error details. type ErrorResponse struct { Error *ErrorProperties `json:"error,omitempty"` } -// GenerateUpgradedDefinitionParameters is the parameters to generate upgraded -// definition. +// GenerateUpgradedDefinitionParameters is the parameters to generate upgraded definition. type GenerateUpgradedDefinitionParameters struct { TargetSchemaVersion *string `json:"targetSchemaVersion,omitempty"` } @@ -1091,14 +959,12 @@ type IntegrationAccountAgreement struct { *IntegrationAccountAgreementProperties `json:"properties,omitempty"` } -// IntegrationAccountAgreementFilter is the integration account agreement -// filter for odata query. +// IntegrationAccountAgreementFilter is the integration account agreement filter for odata query. type IntegrationAccountAgreementFilter struct { AgreementType AgreementType `json:"agreementType,omitempty"` } -// IntegrationAccountAgreementListResult is the list of integration account -// agreements. +// IntegrationAccountAgreementListResult is the list of integration account agreements. type IntegrationAccountAgreementListResult struct { autorest.Response `json:"-"` Value *[]IntegrationAccountAgreement `json:"value,omitempty"` @@ -1117,8 +983,7 @@ func (client IntegrationAccountAgreementListResult) IntegrationAccountAgreementL autorest.WithBaseURL(to.String(client.NextLink))) } -// IntegrationAccountAgreementProperties is the integration account agreement -// properties. +// IntegrationAccountAgreementProperties is the integration account agreement properties. type IntegrationAccountAgreementProperties struct { CreatedTime *date.Time `json:"createdTime,omitempty"` ChangedTime *date.Time `json:"changedTime,omitempty"` @@ -1142,8 +1007,7 @@ type IntegrationAccountCertificate struct { *IntegrationAccountCertificateProperties `json:"properties,omitempty"` } -// IntegrationAccountCertificateListResult is the list of integration account -// certificates. +// IntegrationAccountCertificateListResult is the list of integration account certificates. type IntegrationAccountCertificateListResult struct { autorest.Response `json:"-"` Value *[]IntegrationAccountCertificate `json:"value,omitempty"` @@ -1162,8 +1026,7 @@ func (client IntegrationAccountCertificateListResult) IntegrationAccountCertific autorest.WithBaseURL(to.String(client.NextLink))) } -// IntegrationAccountCertificateProperties is the integration account -// certificate properties. +// IntegrationAccountCertificateProperties is the integration account certificate properties. type IntegrationAccountCertificateProperties struct { CreatedTime *date.Time `json:"createdTime,omitempty"` ChangedTime *date.Time `json:"changedTime,omitempty"` @@ -1202,8 +1065,7 @@ type IntegrationAccountMap struct { *IntegrationAccountMapProperties `json:"properties,omitempty"` } -// IntegrationAccountMapFilter is the integration account map filter for odata -// query. +// IntegrationAccountMapFilter is the integration account map filter for odata query. type IntegrationAccountMapFilter struct { MapType MapType `json:"mapType,omitempty"` } @@ -1239,8 +1101,7 @@ type IntegrationAccountMapProperties struct { Metadata *map[string]interface{} `json:"metadata,omitempty"` } -// IntegrationAccountMapPropertiesParametersSchema is the parameters schema of -// integration account map. +// IntegrationAccountMapPropertiesParametersSchema is the parameters schema of integration account map. type IntegrationAccountMapPropertiesParametersSchema struct { Ref *string `json:"ref,omitempty"` } @@ -1256,14 +1117,12 @@ type IntegrationAccountPartner struct { *IntegrationAccountPartnerProperties `json:"properties,omitempty"` } -// IntegrationAccountPartnerFilter is the integration account partner filter -// for odata query. +// IntegrationAccountPartnerFilter is the integration account partner filter for odata query. type IntegrationAccountPartnerFilter struct { PartnerType PartnerType `json:"partnerType,omitempty"` } -// IntegrationAccountPartnerListResult is the list of integration account -// partners. +// IntegrationAccountPartnerListResult is the list of integration account partners. type IntegrationAccountPartnerListResult struct { autorest.Response `json:"-"` Value *[]IntegrationAccountPartner `json:"value,omitempty"` @@ -1282,8 +1141,7 @@ func (client IntegrationAccountPartnerListResult) IntegrationAccountPartnerListR autorest.WithBaseURL(to.String(client.NextLink))) } -// IntegrationAccountPartnerProperties is the integration account partner -// properties. +// IntegrationAccountPartnerProperties is the integration account partner properties. type IntegrationAccountPartnerProperties struct { PartnerType PartnerType `json:"partnerType,omitempty"` CreatedTime *date.Time `json:"createdTime,omitempty"` @@ -1303,14 +1161,12 @@ type IntegrationAccountSchema struct { *IntegrationAccountSchemaProperties `json:"properties,omitempty"` } -// IntegrationAccountSchemaFilter is the integration account schema filter for -// odata query. +// IntegrationAccountSchemaFilter is the integration account schema filter for odata query. type IntegrationAccountSchemaFilter struct { SchemaType SchemaType `json:"schemaType,omitempty"` } -// IntegrationAccountSchemaListResult is the list of integration account -// schemas. +// IntegrationAccountSchemaListResult is the list of integration account schemas. type IntegrationAccountSchemaListResult struct { autorest.Response `json:"-"` Value *[]IntegrationAccountSchema `json:"value,omitempty"` @@ -1329,8 +1185,7 @@ func (client IntegrationAccountSchemaListResult) IntegrationAccountSchemaListRes autorest.WithBaseURL(to.String(client.NextLink))) } -// IntegrationAccountSchemaProperties is the integration account schema -// properties. +// IntegrationAccountSchemaProperties is the integration account schema properties. type IntegrationAccountSchemaProperties struct { SchemaType SchemaType `json:"schemaType,omitempty"` TargetNamespace *string `json:"targetNamespace,omitempty"` @@ -1360,8 +1215,7 @@ type IntegrationAccountSessionFilter struct { ChangedTime *date.Time `json:"changedTime,omitempty"` } -// IntegrationAccountSessionListResult is the list of integration account -// sessions. +// IntegrationAccountSessionListResult is the list of integration account sessions. type IntegrationAccountSessionListResult struct { autorest.Response `json:"-"` Value *[]IntegrationAccountSession `json:"value,omitempty"` @@ -1380,8 +1234,7 @@ func (client IntegrationAccountSessionListResult) IntegrationAccountSessionListR autorest.WithBaseURL(to.String(client.NextLink))) } -// IntegrationAccountSessionProperties is the integration account session -// properties. +// IntegrationAccountSessionProperties is the integration account session properties. type IntegrationAccountSessionProperties struct { CreatedTime *date.Time `json:"createdTime,omitempty"` ChangedTime *date.Time `json:"changedTime,omitempty"` @@ -1420,8 +1273,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of the request to list Logic operations. It -// contains a list of operations and a URL link to get the next set of results. +// OperationListResult is result of the request to list Logic operations. It contains a list of operations and a URL +// link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -1760,8 +1613,7 @@ type WorkflowTriggerHistoryProperties struct { Run *ResourceReference `json:"run,omitempty"` } -// WorkflowTriggerListCallbackURLQueries is gets the workflow trigger callback -// URL query parameters. +// WorkflowTriggerListCallbackURLQueries is gets the workflow trigger callback URL query parameters. type WorkflowTriggerListCallbackURLQueries struct { APIVersion *string `json:"api-version,omitempty"` Sp *string `json:"sp,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/partners.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/partners.go index f361cd261..40ed304dd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/partners.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/partners.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// PartnersClient is the rEST API for Azure Logic Apps. +// PartnersClient is the REST API for Azure Logic Apps. type PartnersClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewPartnersClient(subscriptionID string) PartnersClient { return NewPartnersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPartnersClientWithBaseURI creates an instance of the PartnersClient -// client. +// NewPartnersClientWithBaseURI creates an instance of the PartnersClient client. func NewPartnersClientWithBaseURI(baseURI string, subscriptionID string) PartnersClient { return PartnersClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an integration account partner. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. partnerName is the integration account partner -// name. partner is the integration account partner. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. partnerName is +// the integration account partner name. partner is the integration account partner. func (client PartnersClient) CreateOrUpdate(resourceGroupName string, integrationAccountName string, partnerName string, partner IntegrationAccountPartner) (result IntegrationAccountPartner, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: partner, @@ -120,9 +117,8 @@ func (client PartnersClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete deletes an integration account partner. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. partnerName is the integration account partner -// name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. partnerName is +// the integration account partner name. func (client PartnersClient) Delete(resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, integrationAccountName, partnerName) if err != nil { @@ -187,9 +183,8 @@ func (client PartnersClient) DeleteResponder(resp *http.Response) (result autore // Get gets an integration account partner. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. partnerName is the integration account partner -// name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. partnerName is +// the integration account partner name. func (client PartnersClient) Get(resourceGroupName string, integrationAccountName string, partnerName string) (result IntegrationAccountPartner, err error) { req, err := client.GetPreparer(resourceGroupName, integrationAccountName, partnerName) if err != nil { @@ -255,9 +250,8 @@ func (client PartnersClient) GetResponder(resp *http.Response) (result Integrati // ListByIntegrationAccounts gets a list of integration account partners. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. top is the number of items to be included in the -// result. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. top is the +// number of items to be included in the result. filter is the filter to apply on the operation. func (client PartnersClient) ListByIntegrationAccounts(resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountPartnerListResult, err error) { req, err := client.ListByIntegrationAccountsPreparer(resourceGroupName, integrationAccountName, top, filter) if err != nil { @@ -349,3 +343,48 @@ func (client PartnersClient) ListByIntegrationAccountsNextResults(lastResults In return } + +// ListByIntegrationAccountsComplete gets all elements from the list without paging. +func (client PartnersClient) ListByIntegrationAccountsComplete(resourceGroupName string, integrationAccountName string, top *int32, filter string, cancel <-chan struct{}) (<-chan IntegrationAccountPartner, <-chan error) { + resultChan := make(chan IntegrationAccountPartner) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByIntegrationAccounts(resourceGroupName, integrationAccountName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByIntegrationAccountsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/schemas.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/schemas.go index a5ad456b7..557644ae0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/schemas.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/schemas.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// SchemasClient is the rEST API for Azure Logic Apps. +// SchemasClient is the REST API for Azure Logic Apps. type SchemasClient struct { ManagementClient } @@ -42,9 +41,8 @@ func NewSchemasClientWithBaseURI(baseURI string, subscriptionID string) SchemasC // CreateOrUpdate creates or updates an integration account schema. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. schemaName is the integration account schema name. -// schema is the integration account schema. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. schemaName is +// the integration account schema name. schema is the integration account schema. func (client SchemasClient) CreateOrUpdate(resourceGroupName string, integrationAccountName string, schemaName string, schema IntegrationAccountSchema) (result IntegrationAccountSchema, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: schema, @@ -118,8 +116,8 @@ func (client SchemasClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete deletes an integration account schema. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. schemaName is the integration account schema name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. schemaName is +// the integration account schema name. func (client SchemasClient) Delete(resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, integrationAccountName, schemaName) if err != nil { @@ -184,8 +182,8 @@ func (client SchemasClient) DeleteResponder(resp *http.Response) (result autores // Get gets an integration account schema. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. schemaName is the integration account schema name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. schemaName is +// the integration account schema name. func (client SchemasClient) Get(resourceGroupName string, integrationAccountName string, schemaName string) (result IntegrationAccountSchema, err error) { req, err := client.GetPreparer(resourceGroupName, integrationAccountName, schemaName) if err != nil { @@ -251,9 +249,8 @@ func (client SchemasClient) GetResponder(resp *http.Response) (result Integratio // ListByIntegrationAccounts gets a list of integration account schemas. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. top is the number of items to be included in the -// result. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. top is the +// number of items to be included in the result. filter is the filter to apply on the operation. func (client SchemasClient) ListByIntegrationAccounts(resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSchemaListResult, err error) { req, err := client.ListByIntegrationAccountsPreparer(resourceGroupName, integrationAccountName, top, filter) if err != nil { @@ -345,3 +342,48 @@ func (client SchemasClient) ListByIntegrationAccountsNextResults(lastResults Int return } + +// ListByIntegrationAccountsComplete gets all elements from the list without paging. +func (client SchemasClient) ListByIntegrationAccountsComplete(resourceGroupName string, integrationAccountName string, top *int32, filter string, cancel <-chan struct{}) (<-chan IntegrationAccountSchema, <-chan error) { + resultChan := make(chan IntegrationAccountSchema) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByIntegrationAccounts(resourceGroupName, integrationAccountName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByIntegrationAccountsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/sessions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/sessions.go index aa7cf6012..d00cff216 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/sessions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/sessions.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// SessionsClient is the rEST API for Azure Logic Apps. +// SessionsClient is the REST API for Azure Logic Apps. type SessionsClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewSessionsClient(subscriptionID string) SessionsClient { return NewSessionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSessionsClientWithBaseURI creates an instance of the SessionsClient -// client. +// NewSessionsClientWithBaseURI creates an instance of the SessionsClient client. func NewSessionsClientWithBaseURI(baseURI string, subscriptionID string) SessionsClient { return SessionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an integration account session. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. sessionName is the integration account session -// name. session is the integration account session. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. sessionName is +// the integration account session name. session is the integration account session. func (client SessionsClient) CreateOrUpdate(resourceGroupName string, integrationAccountName string, sessionName string, session IntegrationAccountSession) (result IntegrationAccountSession, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: session, @@ -119,9 +116,8 @@ func (client SessionsClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete deletes an integration account session. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. sessionName is the integration account session -// name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. sessionName is +// the integration account session name. func (client SessionsClient) Delete(resourceGroupName string, integrationAccountName string, sessionName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, integrationAccountName, sessionName) if err != nil { @@ -186,9 +182,8 @@ func (client SessionsClient) DeleteResponder(resp *http.Response) (result autore // Get gets an integration account session. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. sessionName is the integration account session -// name. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. sessionName is +// the integration account session name. func (client SessionsClient) Get(resourceGroupName string, integrationAccountName string, sessionName string) (result IntegrationAccountSession, err error) { req, err := client.GetPreparer(resourceGroupName, integrationAccountName, sessionName) if err != nil { @@ -254,9 +249,8 @@ func (client SessionsClient) GetResponder(resp *http.Response) (result Integrati // ListByIntegrationAccounts gets a list of integration account sessions. // -// resourceGroupName is the resource group name. integrationAccountName is the -// integration account name. top is the number of items to be included in the -// result. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. integrationAccountName is the integration account name. top is the +// number of items to be included in the result. filter is the filter to apply on the operation. func (client SessionsClient) ListByIntegrationAccounts(resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSessionListResult, err error) { req, err := client.ListByIntegrationAccountsPreparer(resourceGroupName, integrationAccountName, top, filter) if err != nil { @@ -348,3 +342,48 @@ func (client SessionsClient) ListByIntegrationAccountsNextResults(lastResults In return } + +// ListByIntegrationAccountsComplete gets all elements from the list without paging. +func (client SessionsClient) ListByIntegrationAccountsComplete(resourceGroupName string, integrationAccountName string, top *int32, filter string, cancel <-chan struct{}) (<-chan IntegrationAccountSession, <-chan error) { + resultChan := make(chan IntegrationAccountSession) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByIntegrationAccounts(resourceGroupName, integrationAccountName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByIntegrationAccountsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go index 277f45b94..1fdbbd72e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/version.go @@ -14,15 +14,15 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-logic/2016-06-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-logic/2016-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowrunactions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowrunactions.go index e89d7c7f3..7a89c2aac 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowrunactions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowrunactions.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,28 +23,25 @@ import ( "net/http" ) -// WorkflowRunActionsClient is the rEST API for Azure Logic Apps. +// WorkflowRunActionsClient is the REST API for Azure Logic Apps. type WorkflowRunActionsClient struct { ManagementClient } -// NewWorkflowRunActionsClient creates an instance of the -// WorkflowRunActionsClient client. +// NewWorkflowRunActionsClient creates an instance of the WorkflowRunActionsClient client. func NewWorkflowRunActionsClient(subscriptionID string) WorkflowRunActionsClient { return NewWorkflowRunActionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunActionsClientWithBaseURI creates an instance of the -// WorkflowRunActionsClient client. +// NewWorkflowRunActionsClientWithBaseURI creates an instance of the WorkflowRunActionsClient client. func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionsClient { return WorkflowRunActionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a workflow run action. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. runName is the workflow run name. actionName is the workflow action -// name. +// resourceGroupName is the resource group name. workflowName is the workflow name. runName is the workflow run name. +// actionName is the workflow action name. func (client WorkflowRunActionsClient) Get(resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunAction, err error) { req, err := client.GetPreparer(resourceGroupName, workflowName, runName, actionName) if err != nil { @@ -112,9 +108,8 @@ func (client WorkflowRunActionsClient) GetResponder(resp *http.Response) (result // List gets a list of workflow run actions. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. runName is the workflow run name. top is the number of items to be -// included in the result. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. workflowName is the workflow name. runName is the workflow run name. +// top is the number of items to be included in the result. filter is the filter to apply on the operation. func (client WorkflowRunActionsClient) List(resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result WorkflowRunActionListResult, err error) { req, err := client.ListPreparer(resourceGroupName, workflowName, runName, top, filter) if err != nil { @@ -207,3 +202,48 @@ func (client WorkflowRunActionsClient) ListNextResults(lastResults WorkflowRunAc return } + +// ListComplete gets all elements from the list without paging. +func (client WorkflowRunActionsClient) ListComplete(resourceGroupName string, workflowName string, runName string, top *int32, filter string, cancel <-chan struct{}) (<-chan WorkflowRunAction, <-chan error) { + resultChan := make(chan WorkflowRunAction) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, workflowName, runName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowruns.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowruns.go index 57b8959c8..4e82f6b20 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowruns.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowruns.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// WorkflowRunsClient is the rEST API for Azure Logic Apps. +// WorkflowRunsClient is the REST API for Azure Logic Apps. type WorkflowRunsClient struct { ManagementClient } @@ -34,16 +33,14 @@ func NewWorkflowRunsClient(subscriptionID string) WorkflowRunsClient { return NewWorkflowRunsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowRunsClientWithBaseURI creates an instance of the -// WorkflowRunsClient client. +// NewWorkflowRunsClientWithBaseURI creates an instance of the WorkflowRunsClient client. func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunsClient { return WorkflowRunsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Cancel cancels a workflow run. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. runName is the workflow run name. +// resourceGroupName is the resource group name. workflowName is the workflow name. runName is the workflow run name. func (client WorkflowRunsClient) Cancel(resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error) { req, err := client.CancelPreparer(resourceGroupName, workflowName, runName) if err != nil { @@ -108,8 +105,7 @@ func (client WorkflowRunsClient) CancelResponder(resp *http.Response) (result au // Get gets a workflow run. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. runName is the workflow run name. +// resourceGroupName is the resource group name. workflowName is the workflow name. runName is the workflow run name. func (client WorkflowRunsClient) Get(resourceGroupName string, workflowName string, runName string) (result WorkflowRun, err error) { req, err := client.GetPreparer(resourceGroupName, workflowName, runName) if err != nil { @@ -175,9 +171,8 @@ func (client WorkflowRunsClient) GetResponder(resp *http.Response) (result Workf // List gets a list of workflow runs. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. top is the number of items to be included in the result. filter is the -// filter to apply on the operation. +// resourceGroupName is the resource group name. workflowName is the workflow name. top is the number of items to be +// included in the result. filter is the filter to apply on the operation. func (client WorkflowRunsClient) List(resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowRunListResult, err error) { req, err := client.ListPreparer(resourceGroupName, workflowName, top, filter) if err != nil { @@ -269,3 +264,48 @@ func (client WorkflowRunsClient) ListNextResults(lastResults WorkflowRunListResu return } + +// ListComplete gets all elements from the list without paging. +func (client WorkflowRunsClient) ListComplete(resourceGroupName string, workflowName string, top *int32, filter string, cancel <-chan struct{}) (<-chan WorkflowRun, <-chan error) { + resultChan := make(chan WorkflowRun) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, workflowName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflows.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflows.go index 521a2d458..7732f185f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflows.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflows.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// WorkflowsClient is the rEST API for Azure Logic Apps. +// WorkflowsClient is the REST API for Azure Logic Apps. type WorkflowsClient struct { ManagementClient } @@ -34,16 +33,14 @@ func NewWorkflowsClient(subscriptionID string) WorkflowsClient { return NewWorkflowsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient -// client. +// NewWorkflowsClientWithBaseURI creates an instance of the WorkflowsClient client. func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowsClient { return WorkflowsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. workflow is the workflow. +// resourceGroupName is the resource group name. workflowName is the workflow name. workflow is the workflow. func (client WorkflowsClient) CreateOrUpdate(resourceGroupName string, workflowName string, workflow Workflow) (result Workflow, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, workflowName, workflow) if err != nil { @@ -110,8 +107,7 @@ func (client WorkflowsClient) CreateOrUpdateResponder(resp *http.Response) (resu // Delete deletes a workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. +// resourceGroupName is the resource group name. workflowName is the workflow name. func (client WorkflowsClient) Delete(resourceGroupName string, workflowName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, workflowName) if err != nil { @@ -175,8 +171,7 @@ func (client WorkflowsClient) DeleteResponder(resp *http.Response) (result autor // Disable disables a workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. +// resourceGroupName is the resource group name. workflowName is the workflow name. func (client WorkflowsClient) Disable(resourceGroupName string, workflowName string) (result autorest.Response, err error) { req, err := client.DisablePreparer(resourceGroupName, workflowName) if err != nil { @@ -240,8 +235,7 @@ func (client WorkflowsClient) DisableResponder(resp *http.Response) (result auto // Enable enables a workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. +// resourceGroupName is the resource group name. workflowName is the workflow name. func (client WorkflowsClient) Enable(resourceGroupName string, workflowName string) (result autorest.Response, err error) { req, err := client.EnablePreparer(resourceGroupName, workflowName) if err != nil { @@ -305,8 +299,8 @@ func (client WorkflowsClient) EnableResponder(resp *http.Response) (result autor // GenerateUpgradedDefinition generates the upgraded definition for a workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. parameters is parameters for generating an upgraded definition. +// resourceGroupName is the resource group name. workflowName is the workflow name. parameters is parameters for +// generating an upgraded definition. func (client WorkflowsClient) GenerateUpgradedDefinition(resourceGroupName string, workflowName string, parameters GenerateUpgradedDefinitionParameters) (result SetObject, err error) { req, err := client.GenerateUpgradedDefinitionPreparer(resourceGroupName, workflowName, parameters) if err != nil { @@ -373,8 +367,7 @@ func (client WorkflowsClient) GenerateUpgradedDefinitionResponder(resp *http.Res // Get gets a workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. +// resourceGroupName is the resource group name. workflowName is the workflow name. func (client WorkflowsClient) Get(resourceGroupName string, workflowName string) (result Workflow, err error) { req, err := client.GetPreparer(resourceGroupName, workflowName) if err != nil { @@ -439,8 +432,8 @@ func (client WorkflowsClient) GetResponder(resp *http.Response) (result Workflow // ListByResourceGroup gets a list of workflows by resource group. // -// resourceGroupName is the resource group name. top is the number of items to -// be included in the result. filter is the filter to apply on the operation. +// resourceGroupName is the resource group name. top is the number of items to be included in the result. filter is the +// filter to apply on the operation. func (client WorkflowsClient) ListByResourceGroup(resourceGroupName string, top *int32, filter string) (result WorkflowListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, top, filter) if err != nil { @@ -532,10 +525,54 @@ func (client WorkflowsClient) ListByResourceGroupNextResults(lastResults Workflo return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client WorkflowsClient) ListByResourceGroupComplete(resourceGroupName string, top *int32, filter string, cancel <-chan struct{}) (<-chan Workflow, <-chan error) { + resultChan := make(chan Workflow) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBySubscription gets a list of workflows by subscription. // -// top is the number of items to be included in the result. filter is the -// filter to apply on the operation. +// top is the number of items to be included in the result. filter is the filter to apply on the operation. func (client WorkflowsClient) ListBySubscription(top *int32, filter string) (result WorkflowListResult, err error) { req, err := client.ListBySubscriptionPreparer(top, filter) if err != nil { @@ -626,10 +663,54 @@ func (client WorkflowsClient) ListBySubscriptionNextResults(lastResults Workflow return } +// ListBySubscriptionComplete gets all elements from the list without paging. +func (client WorkflowsClient) ListBySubscriptionComplete(top *int32, filter string, cancel <-chan struct{}) (<-chan Workflow, <-chan error) { + resultChan := make(chan Workflow) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscription(top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListSwagger gets an OpenAPI definition for the workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. +// resourceGroupName is the resource group name. workflowName is the workflow name. func (client WorkflowsClient) ListSwagger(resourceGroupName string, workflowName string) (result SetObject, err error) { req, err := client.ListSwaggerPreparer(resourceGroupName, workflowName) if err != nil { @@ -692,11 +773,9 @@ func (client WorkflowsClient) ListSwaggerResponder(resp *http.Response) (result return } -// RegenerateAccessKey regenerates the callback URL access key for request -// triggers. +// RegenerateAccessKey regenerates the callback URL access key for request triggers. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. keyType is the access key type. +// resourceGroupName is the resource group name. workflowName is the workflow name. keyType is the access key type. func (client WorkflowsClient) RegenerateAccessKey(resourceGroupName string, workflowName string, keyType RegenerateActionParameter) (result autorest.Response, err error) { req, err := client.RegenerateAccessKeyPreparer(resourceGroupName, workflowName, keyType) if err != nil { @@ -762,8 +841,7 @@ func (client WorkflowsClient) RegenerateAccessKeyResponder(resp *http.Response) // Update updates a workflow. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. workflow is the workflow. +// resourceGroupName is the resource group name. workflowName is the workflow name. workflow is the workflow. func (client WorkflowsClient) Update(resourceGroupName string, workflowName string, workflow Workflow) (result Workflow, err error) { req, err := client.UpdatePreparer(resourceGroupName, workflowName, workflow) if err != nil { @@ -830,9 +908,8 @@ func (client WorkflowsClient) UpdateResponder(resp *http.Response) (result Workf // Validate validates the workflow definition. // -// resourceGroupName is the resource group name. location is the workflow -// location. workflowName is the workflow name. workflow is the workflow -// definition. +// resourceGroupName is the resource group name. location is the workflow location. workflowName is the workflow name. +// workflow is the workflow definition. func (client WorkflowsClient) Validate(resourceGroupName string, location string, workflowName string, workflow Workflow) (result autorest.Response, err error) { req, err := client.ValidatePreparer(resourceGroupName, location, workflowName, workflow) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggerhistories.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggerhistories.go index f83cf395e..4867f152e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggerhistories.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggerhistories.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,29 +23,26 @@ import ( "net/http" ) -// WorkflowTriggerHistoriesClient is the rEST API for Azure Logic Apps. +// WorkflowTriggerHistoriesClient is the REST API for Azure Logic Apps. type WorkflowTriggerHistoriesClient struct { ManagementClient } -// NewWorkflowTriggerHistoriesClient creates an instance of the -// WorkflowTriggerHistoriesClient client. +// NewWorkflowTriggerHistoriesClient creates an instance of the WorkflowTriggerHistoriesClient client. func NewWorkflowTriggerHistoriesClient(subscriptionID string) WorkflowTriggerHistoriesClient { return NewWorkflowTriggerHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the -// WorkflowTriggerHistoriesClient client. +// NewWorkflowTriggerHistoriesClientWithBaseURI creates an instance of the WorkflowTriggerHistoriesClient client. func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggerHistoriesClient { return WorkflowTriggerHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a workflow trigger history. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. triggerName is the workflow trigger name. historyName is the workflow -// trigger history name. Corresponds to the run name for triggers that resulted -// in a run. +// resourceGroupName is the resource group name. workflowName is the workflow name. triggerName is the workflow trigger +// name. historyName is the workflow trigger history name. Corresponds to the run name for triggers that resulted in a +// run. func (client WorkflowTriggerHistoriesClient) Get(resourceGroupName string, workflowName string, triggerName string, historyName string) (result WorkflowTriggerHistory, err error) { req, err := client.GetPreparer(resourceGroupName, workflowName, triggerName, historyName) if err != nil { @@ -113,10 +109,8 @@ func (client WorkflowTriggerHistoriesClient) GetResponder(resp *http.Response) ( // List gets a list of workflow trigger histories. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. triggerName is the workflow trigger name. top is the number of items -// to be included in the result. filter is the filter to apply on the -// operation. +// resourceGroupName is the resource group name. workflowName is the workflow name. triggerName is the workflow trigger +// name. top is the number of items to be included in the result. filter is the filter to apply on the operation. func (client WorkflowTriggerHistoriesClient) List(resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result WorkflowTriggerHistoryListResult, err error) { req, err := client.ListPreparer(resourceGroupName, workflowName, triggerName, top, filter) if err != nil { @@ -210,12 +204,56 @@ func (client WorkflowTriggerHistoriesClient) ListNextResults(lastResults Workflo return } +// ListComplete gets all elements from the list without paging. +func (client WorkflowTriggerHistoriesClient) ListComplete(resourceGroupName string, workflowName string, triggerName string, top *int32, filter string, cancel <-chan struct{}) (<-chan WorkflowTriggerHistory, <-chan error) { + resultChan := make(chan WorkflowTriggerHistory) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, workflowName, triggerName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Resubmit resubmits a workflow run based on the trigger history. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. triggerName is the workflow trigger name. historyName is the workflow -// trigger history name. Corresponds to the run name for triggers that resulted -// in a run. +// resourceGroupName is the resource group name. workflowName is the workflow name. triggerName is the workflow trigger +// name. historyName is the workflow trigger history name. Corresponds to the run name for triggers that resulted in a +// run. func (client WorkflowTriggerHistoriesClient) Resubmit(resourceGroupName string, workflowName string, triggerName string, historyName string) (result autorest.Response, err error) { req, err := client.ResubmitPreparer(resourceGroupName, workflowName, triggerName, historyName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggers.go index e374b14e9..669e02455 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowtriggers.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,27 +23,25 @@ import ( "net/http" ) -// WorkflowTriggersClient is the rEST API for Azure Logic Apps. +// WorkflowTriggersClient is the REST API for Azure Logic Apps. type WorkflowTriggersClient struct { ManagementClient } -// NewWorkflowTriggersClient creates an instance of the WorkflowTriggersClient -// client. +// NewWorkflowTriggersClient creates an instance of the WorkflowTriggersClient client. func NewWorkflowTriggersClient(subscriptionID string) WorkflowTriggersClient { return NewWorkflowTriggersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowTriggersClientWithBaseURI creates an instance of the -// WorkflowTriggersClient client. +// NewWorkflowTriggersClientWithBaseURI creates an instance of the WorkflowTriggersClient client. func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string) WorkflowTriggersClient { return WorkflowTriggersClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a workflow trigger. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. triggerName is the workflow trigger name. +// resourceGroupName is the resource group name. workflowName is the workflow name. triggerName is the workflow trigger +// name. func (client WorkflowTriggersClient) Get(resourceGroupName string, workflowName string, triggerName string) (result WorkflowTrigger, err error) { req, err := client.GetPreparer(resourceGroupName, workflowName, triggerName) if err != nil { @@ -110,9 +107,8 @@ func (client WorkflowTriggersClient) GetResponder(resp *http.Response) (result W // List gets a list of workflow triggers. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. top is the number of items to be included in the result. filter is the -// filter to apply on the operation. +// resourceGroupName is the resource group name. workflowName is the workflow name. top is the number of items to be +// included in the result. filter is the filter to apply on the operation. func (client WorkflowTriggersClient) List(resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowTriggerListResult, err error) { req, err := client.ListPreparer(resourceGroupName, workflowName, top, filter) if err != nil { @@ -205,10 +201,55 @@ func (client WorkflowTriggersClient) ListNextResults(lastResults WorkflowTrigger return } +// ListComplete gets all elements from the list without paging. +func (client WorkflowTriggersClient) ListComplete(resourceGroupName string, workflowName string, top *int32, filter string, cancel <-chan struct{}) (<-chan WorkflowTrigger, <-chan error) { + resultChan := make(chan WorkflowTrigger) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, workflowName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListCallbackURL gets the callback URL for a workflow trigger. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. triggerName is the workflow trigger name. +// resourceGroupName is the resource group name. workflowName is the workflow name. triggerName is the workflow trigger +// name. func (client WorkflowTriggersClient) ListCallbackURL(resourceGroupName string, workflowName string, triggerName string) (result WorkflowTriggerCallbackURL, err error) { req, err := client.ListCallbackURLPreparer(resourceGroupName, workflowName, triggerName) if err != nil { @@ -274,8 +315,8 @@ func (client WorkflowTriggersClient) ListCallbackURLResponder(resp *http.Respons // Run runs a workflow trigger. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. triggerName is the workflow trigger name. +// resourceGroupName is the resource group name. workflowName is the workflow name. triggerName is the workflow trigger +// name. func (client WorkflowTriggersClient) Run(resourceGroupName string, workflowName string, triggerName string) (result SetObject, err error) { req, err := client.RunPreparer(resourceGroupName, workflowName, triggerName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowversions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowversions.go index 9db33e9b4..69d79b507 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/logic/workflowversions.go @@ -14,9 +14,8 @@ package logic // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,27 +23,25 @@ import ( "net/http" ) -// WorkflowVersionsClient is the rEST API for Azure Logic Apps. +// WorkflowVersionsClient is the REST API for Azure Logic Apps. type WorkflowVersionsClient struct { ManagementClient } -// NewWorkflowVersionsClient creates an instance of the WorkflowVersionsClient -// client. +// NewWorkflowVersionsClient creates an instance of the WorkflowVersionsClient client. func NewWorkflowVersionsClient(subscriptionID string) WorkflowVersionsClient { return NewWorkflowVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkflowVersionsClientWithBaseURI creates an instance of the -// WorkflowVersionsClient client. +// NewWorkflowVersionsClientWithBaseURI creates an instance of the WorkflowVersionsClient client. func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string) WorkflowVersionsClient { return WorkflowVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a workflow version. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. versionID is the workflow versionId. +// resourceGroupName is the resource group name. workflowName is the workflow name. versionID is the workflow +// versionId. func (client WorkflowVersionsClient) Get(resourceGroupName string, workflowName string, versionID string) (result WorkflowVersion, err error) { req, err := client.GetPreparer(resourceGroupName, workflowName, versionID) if err != nil { @@ -110,8 +107,8 @@ func (client WorkflowVersionsClient) GetResponder(resp *http.Response) (result W // List gets a list of workflow versions. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. top is the number of items to be included in the result. +// resourceGroupName is the resource group name. workflowName is the workflow name. top is the number of items to be +// included in the result. func (client WorkflowVersionsClient) List(resourceGroupName string, workflowName string, top *int32) (result WorkflowVersionListResult, err error) { req, err := client.ListPreparer(resourceGroupName, workflowName, top) if err != nil { @@ -201,11 +198,55 @@ func (client WorkflowVersionsClient) ListNextResults(lastResults WorkflowVersion return } +// ListComplete gets all elements from the list without paging. +func (client WorkflowVersionsClient) ListComplete(resourceGroupName string, workflowName string, top *int32, cancel <-chan struct{}) (<-chan WorkflowVersion, <-chan error) { + resultChan := make(chan WorkflowVersion) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, workflowName, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListCallbackURL lists the callback URL for a trigger of a workflow version. // -// resourceGroupName is the resource group name. workflowName is the workflow -// name. versionID is the workflow versionId. triggerName is the workflow -// trigger name. parameters is the callback URL parameters. +// resourceGroupName is the resource group name. workflowName is the workflow name. versionID is the workflow +// versionId. triggerName is the workflow trigger name. parameters is the callback URL parameters. func (client WorkflowVersionsClient) ListCallbackURL(resourceGroupName string, workflowName string, versionID string, triggerName string, parameters *GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) { req, err := client.ListCallbackURLPreparer(resourceGroupName, workflowName, versionID, triggerName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/client.go index c4d5300c8..1c1f4e903 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/client.go @@ -1,11 +1,9 @@ -// Package commitmentplans implements the Azure ARM Commitmentplans service API -// version 2016-05-01-preview. +// Package commitmentplans implements the Azure ARM Commitmentplans service API version 2016-05-01-preview. // -// These APIs allow end users to operate on Azure Machine Learning Commitment -// Plans resources and their child Commitment Association resources. They -// support CRUD operations for commitment plans, get and list operations for -// commitment associations, moving commitment associations between commitment -// plans, and retrieving commitment plan usage history. +// These APIs allow end users to operate on Azure Machine Learning Commitment Plans resources and their child +// Commitment Association resources. They support CRUD operations for commitment plans, get and list operations for +// commitment associations, moving commitment associations between commitment plans, and retrieving commitment plan +// usage history. package commitmentplans // Copyright (c) Microsoft and contributors. All rights reserved. @@ -22,9 +20,8 @@ package commitmentplans // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/commitmentassociations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/commitmentassociations.go index 7e72a6103..e3bcd4466 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/commitmentassociations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/commitmentassociations.go @@ -14,9 +14,8 @@ package commitmentplans // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,33 +23,28 @@ import ( "net/http" ) -// CommitmentAssociationsClient is the these APIs allow end users to operate on -// Azure Machine Learning Commitment Plans resources and their child Commitment -// Association resources. They support CRUD operations for commitment plans, -// get and list operations for commitment associations, moving commitment -// associations between commitment plans, and retrieving commitment plan usage -// history. +// CommitmentAssociationsClient is the these APIs allow end users to operate on Azure Machine Learning Commitment Plans +// resources and their child Commitment Association resources. They support CRUD operations for commitment plans, get +// and list operations for commitment associations, moving commitment associations between commitment plans, and +// retrieving commitment plan usage history. type CommitmentAssociationsClient struct { ManagementClient } -// NewCommitmentAssociationsClient creates an instance of the -// CommitmentAssociationsClient client. +// NewCommitmentAssociationsClient creates an instance of the CommitmentAssociationsClient client. func NewCommitmentAssociationsClient(subscriptionID string) CommitmentAssociationsClient { return NewCommitmentAssociationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCommitmentAssociationsClientWithBaseURI creates an instance of the -// CommitmentAssociationsClient client. +// NewCommitmentAssociationsClientWithBaseURI creates an instance of the CommitmentAssociationsClient client. func NewCommitmentAssociationsClientWithBaseURI(baseURI string, subscriptionID string) CommitmentAssociationsClient { return CommitmentAssociationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get get a commitment association. // -// resourceGroupName is the resource group name. commitmentPlanName is the -// Azure ML commitment plan name. commitmentAssociationName is the commitment -// association name. +// resourceGroupName is the resource group name. commitmentPlanName is the Azure ML commitment plan name. +// commitmentAssociationName is the commitment association name. func (client CommitmentAssociationsClient) Get(resourceGroupName string, commitmentPlanName string, commitmentAssociationName string) (result CommitmentAssociation, err error) { req, err := client.GetPreparer(resourceGroupName, commitmentPlanName, commitmentAssociationName) if err != nil { @@ -116,9 +110,8 @@ func (client CommitmentAssociationsClient) GetResponder(resp *http.Response) (re // List get all commitment associations for a parent commitment plan. // -// resourceGroupName is the resource group name. commitmentPlanName is the -// Azure ML commitment plan name. skipToken is continuation token for -// pagination. +// resourceGroupName is the resource group name. commitmentPlanName is the Azure ML commitment plan name. skipToken is +// continuation token for pagination. func (client CommitmentAssociationsClient) List(resourceGroupName string, commitmentPlanName string, skipToken string) (result CommitmentAssociationListResult, err error) { req, err := client.ListPreparer(resourceGroupName, commitmentPlanName, skipToken) if err != nil { @@ -208,11 +201,55 @@ func (client CommitmentAssociationsClient) ListNextResults(lastResults Commitmen return } +// ListComplete gets all elements from the list without paging. +func (client CommitmentAssociationsClient) ListComplete(resourceGroupName string, commitmentPlanName string, skipToken string, cancel <-chan struct{}) (<-chan CommitmentAssociation, <-chan error) { + resultChan := make(chan CommitmentAssociation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, commitmentPlanName, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Move re-parent a commitment association from one commitment plan to another. // -// resourceGroupName is the resource group name. commitmentPlanName is the -// Azure ML commitment plan name. commitmentAssociationName is the commitment -// association name. movePayload is the move request payload. +// resourceGroupName is the resource group name. commitmentPlanName is the Azure ML commitment plan name. +// commitmentAssociationName is the commitment association name. movePayload is the move request payload. func (client CommitmentAssociationsClient) Move(resourceGroupName string, commitmentPlanName string, commitmentAssociationName string, movePayload MoveCommitmentAssociationRequest) (result CommitmentAssociation, err error) { req, err := client.MovePreparer(resourceGroupName, commitmentPlanName, commitmentAssociationName, movePayload) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/commitmentplansgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/group.go old mode 100755 new mode 100644 similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/commitmentplansgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/group.go index d3ab0eb88..cb76baa83 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/commitmentplansgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/group.go @@ -14,9 +14,8 @@ package commitmentplans // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,11 +23,10 @@ import ( "net/http" ) -// GroupClient is the these APIs allow end users to operate on Azure Machine -// Learning Commitment Plans resources and their child Commitment Association -// resources. They support CRUD operations for commitment plans, get and list -// operations for commitment associations, moving commitment associations -// between commitment plans, and retrieving commitment plan usage history. +// GroupClient is the these APIs allow end users to operate on Azure Machine Learning Commitment Plans resources and +// their child Commitment Association resources. They support CRUD operations for commitment plans, get and list +// operations for commitment associations, moving commitment associations between commitment plans, and retrieving +// commitment plan usage history. type GroupClient struct { ManagementClient } @@ -43,12 +41,10 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create a new Azure ML commitment plan resource or updates an -// existing one. +// CreateOrUpdate create a new Azure ML commitment plan resource or updates an existing one. // -// createOrUpdatePayload is the payload to create or update the Azure ML -// commitment plan. resourceGroupName is the resource group name. -// commitmentPlanName is the Azure ML commitment plan name. +// createOrUpdatePayload is the payload to create or update the Azure ML commitment plan. resourceGroupName is the +// resource group name. commitmentPlanName is the Azure ML commitment plan name. func (client GroupClient) CreateOrUpdate(createOrUpdatePayload CommitmentPlan, resourceGroupName string, commitmentPlanName string) (result CommitmentPlan, err error) { req, err := client.CreateOrUpdatePreparer(createOrUpdatePayload, resourceGroupName, commitmentPlanName) if err != nil { @@ -113,11 +109,9 @@ func (client GroupClient) CreateOrUpdateResponder(resp *http.Response) (result C return } -// Get retrieve an Azure ML commitment plan by its subscription, resource group -// and name. +// Get retrieve an Azure ML commitment plan by its subscription, resource group and name. // -// resourceGroupName is the resource group name. commitmentPlanName is the -// Azure ML commitment plan name. +// resourceGroupName is the resource group name. commitmentPlanName is the Azure ML commitment plan name. func (client GroupClient) Get(resourceGroupName string, commitmentPlanName string) (result CommitmentPlan, err error) { req, err := client.GetPreparer(resourceGroupName, commitmentPlanName) if err != nil { @@ -270,11 +264,54 @@ func (client GroupClient) ListNextResults(lastResults ListResult) (result ListRe return } -// ListInResourceGroup retrieve all Azure ML commitment plans in a resource -// group. +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(skipToken string, cancel <-chan struct{}) (<-chan CommitmentPlan, <-chan error) { + resultChan := make(chan CommitmentPlan) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListInResourceGroup retrieve all Azure ML commitment plans in a resource group. // -// resourceGroupName is the resource group name. skipToken is continuation -// token for pagination. +// resourceGroupName is the resource group name. skipToken is continuation token for pagination. func (client GroupClient) ListInResourceGroup(resourceGroupName string, skipToken string) (result ListResult, err error) { req, err := client.ListInResourceGroupPreparer(resourceGroupName, skipToken) if err != nil { @@ -363,12 +400,56 @@ func (client GroupClient) ListInResourceGroupNextResults(lastResults ListResult) return } +// ListInResourceGroupComplete gets all elements from the list without paging. +func (client GroupClient) ListInResourceGroupComplete(resourceGroupName string, skipToken string, cancel <-chan struct{}) (<-chan CommitmentPlan, <-chan error) { + resultChan := make(chan CommitmentPlan) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInResourceGroup(resourceGroupName, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Patch patch an existing Azure ML commitment plan resource. // -// patchPayload is the payload to use to patch the Azure ML commitment plan. -// Only tags and SKU may be modified on an existing commitment plan. -// resourceGroupName is the resource group name. commitmentPlanName is the -// Azure ML commitment plan name. +// patchPayload is the payload to use to patch the Azure ML commitment plan. Only tags and SKU may be modified on an +// existing commitment plan. resourceGroupName is the resource group name. commitmentPlanName is the Azure ML +// commitment plan name. func (client GroupClient) Patch(patchPayload PatchPayload, resourceGroupName string, commitmentPlanName string) (result CommitmentPlan, err error) { req, err := client.PatchPreparer(patchPayload, resourceGroupName, commitmentPlanName) if err != nil { @@ -435,8 +516,7 @@ func (client GroupClient) PatchResponder(resp *http.Response) (result Commitment // Remove remove an existing Azure ML commitment plan. // -// resourceGroupName is the resource group name. commitmentPlanName is the -// Azure ML commitment plan name. +// resourceGroupName is the resource group name. commitmentPlanName is the Azure ML commitment plan name. func (client GroupClient) Remove(resourceGroupName string, commitmentPlanName string) (result autorest.Response, err error) { req, err := client.RemovePreparer(resourceGroupName, commitmentPlanName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/models.go index dc12d0ad6..24433df30 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/models.go @@ -14,9 +14,8 @@ package commitmentplans // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,8 @@ import ( "net/http" ) -// CommitmentAssociation is represents the association between a commitment -// plan and some other resource, such as a Machine Learning web service. +// CommitmentAssociation is represents the association between a commitment plan and some other resource, such as a +// Machine Learning web service. type CommitmentAssociation struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -38,8 +37,7 @@ type CommitmentAssociation struct { Properties *CommitmentAssociationProperties `json:"properties,omitempty"` } -// CommitmentAssociationListResult is a page of commitment association -// resources. +// CommitmentAssociationListResult is a page of commitment association resources. type CommitmentAssociationListResult struct { autorest.Response `json:"-"` NextLink *string `json:"nextLink,omitempty"` @@ -58,8 +56,7 @@ func (client CommitmentAssociationListResult) CommitmentAssociationListResultPre autorest.WithBaseURL(to.String(client.NextLink))) } -// CommitmentAssociationProperties is properties of an Azure ML commitment -// association. +// CommitmentAssociationProperties is properties of an Azure ML commitment association. type CommitmentAssociationProperties struct { AssociatedResourceID *string `json:"associatedResourceId,omitempty"` CommitmentPlanID *string `json:"commitmentPlanId,omitempty"` @@ -98,21 +95,18 @@ func (client ListResult) ListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// MoveCommitmentAssociationRequest is specifies the destination Azure ML -// commitment plan for a move operation. +// MoveCommitmentAssociationRequest is specifies the destination Azure ML commitment plan for a move operation. type MoveCommitmentAssociationRequest struct { DestinationPlanID *string `json:"destinationPlanId,omitempty"` } -// PatchPayload is the properties of a commitment plan which may be updated via -// PATCH. +// PatchPayload is the properties of a commitment plan which may be updated via PATCH. type PatchPayload struct { Tags *map[string]*string `json:"tags,omitempty"` Sku *ResourceSku `json:"sku,omitempty"` } -// PlanQuantity is represents the quantity a commitment plan provides of a -// metered resource. +// PlanQuantity is represents the quantity a commitment plan provides of a metered resource. type PlanQuantity struct { Allowance *float64 `json:"allowance,omitempty"` Amount *float64 `json:"amount,omitempty"` @@ -120,8 +114,8 @@ type PlanQuantity struct { OverageMeter *string `json:"overageMeter,omitempty"` } -// PlanUsageHistory is represents historical information about usage of the -// Azure resources associated with a commitment plan. +// PlanUsageHistory is represents historical information about usage of the Azure resources associated with a +// commitment plan. type PlanUsageHistory struct { PlanDeletionOverage *map[string]*float64 `json:"planDeletionOverage,omitempty"` PlanMigrationOverage *map[string]*float64 `json:"planMigrationOverage,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/usagehistory.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/usagehistory.go index 3fa496d08..ca3ce5d15 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/usagehistory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/usagehistory.go @@ -14,9 +14,8 @@ package commitmentplans // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,12 +23,10 @@ import ( "net/http" ) -// UsageHistoryClient is the these APIs allow end users to operate on Azure -// Machine Learning Commitment Plans resources and their child Commitment -// Association resources. They support CRUD operations for commitment plans, -// get and list operations for commitment associations, moving commitment -// associations between commitment plans, and retrieving commitment plan usage -// history. +// UsageHistoryClient is the these APIs allow end users to operate on Azure Machine Learning Commitment Plans resources +// and their child Commitment Association resources. They support CRUD operations for commitment plans, get and list +// operations for commitment associations, moving commitment associations between commitment plans, and retrieving +// commitment plan usage history. type UsageHistoryClient struct { ManagementClient } @@ -39,17 +36,15 @@ func NewUsageHistoryClient(subscriptionID string) UsageHistoryClient { return NewUsageHistoryClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewUsageHistoryClientWithBaseURI creates an instance of the -// UsageHistoryClient client. +// NewUsageHistoryClientWithBaseURI creates an instance of the UsageHistoryClient client. func NewUsageHistoryClientWithBaseURI(baseURI string, subscriptionID string) UsageHistoryClient { return UsageHistoryClient{NewWithBaseURI(baseURI, subscriptionID)} } // List retrieve the usage history for an Azure ML commitment plan. // -// resourceGroupName is the resource group name. commitmentPlanName is the -// Azure ML commitment plan name. skipToken is continuation token for -// pagination. +// resourceGroupName is the resource group name. commitmentPlanName is the Azure ML commitment plan name. skipToken is +// continuation token for pagination. func (client UsageHistoryClient) List(resourceGroupName string, commitmentPlanName string, skipToken string) (result PlanUsageHistoryListResult, err error) { req, err := client.ListPreparer(resourceGroupName, commitmentPlanName, skipToken) if err != nil { @@ -138,3 +133,48 @@ func (client UsageHistoryClient) ListNextResults(lastResults PlanUsageHistoryLis return } + +// ListComplete gets all elements from the list without paging. +func (client UsageHistoryClient) ListComplete(resourceGroupName string, commitmentPlanName string, skipToken string, cancel <-chan struct{}) (<-chan PlanUsageHistory, <-chan error) { + resultChan := make(chan PlanUsageHistory) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, commitmentPlanName, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go index 08322317b..877f776aa 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/commitmentplans/version.go @@ -14,15 +14,15 @@ package commitmentplans // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-commitmentplans/2016-05-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-commitmentplans/2016-05-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/client.go index 24c7399fd..5a6437139 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/client.go @@ -1,12 +1,9 @@ -// Package webservices implements the Azure ARM Webservices service API version -// 2017-01-01. +// Package webservices implements the Azure ARM Webservices service API version 2017-01-01. // -// These APIs allow end users to operate on Azure Machine Learning Web Services -// resources. They support the following operations:

  • Create or update a -// web service
  • Get a web service
  • Patch a web -// service
  • Delete a web service
  • Get All Web Services in a -// Resource Group
  • Get All Web Services in a Subscription
  • Get -// Web Services Keys
+// These APIs allow end users to operate on Azure Machine Learning Web Services resources. They support the following +// operations:
  • Create or update a web service
  • Get a web service
  • Patch a web +// service
  • Delete a web service
  • Get All Web Services in a Resource Group
  • Get All Web Services +// in a Subscription
  • Get Web Services Keys
package webservices // Copyright (c) Microsoft and contributors. All rights reserved. @@ -23,9 +20,8 @@ package webservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/webservicesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/group.go old mode 100755 new mode 100644 similarity index 85% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/webservicesgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/group.go index 642b37e45..c465aba92 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/webservicesgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/group.go @@ -14,9 +14,8 @@ package webservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,12 +24,10 @@ import ( "net/http" ) -// GroupClient is the these APIs allow end users to operate on Azure Machine -// Learning Web Services resources. They support the following -// operations:
  • Create or update a web service
  • Get a web -// service
  • Patch a web service
  • Delete a web service
  • Get -// All Web Services in a Resource Group
  • Get All Web Services in a -// Subscription
  • Get Web Services Keys
+// GroupClient is the these APIs allow end users to operate on Azure Machine Learning Web Services resources. They +// support the following operations:
  • Create or update a web service
  • Get a web service
  • Patch a +// web service
  • Delete a web service
  • Get All Web Services in a Resource Group
  • Get All Web +// Services in a Subscription
  • Get Web Services Keys
type GroupClient struct { ManagementClient } @@ -45,18 +42,14 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or update a web service. This call will overwrite an -// existing web service. Note that there is no warning or confirmation. This is -// a nonrecoverable operation. If your intent is to create a new web service, -// call the Get operation first to verify that it does not exist. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate create or update a web service. This call will overwrite an existing web service. Note that there is +// no warning or confirmation. This is a nonrecoverable operation. If your intent is to create a new web service, call +// the Get operation first to verify that it does not exist. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group in which the web service is -// located. webServiceName is the name of the web service. -// createOrUpdatePayload is the payload that is used to create or update the -// web service. +// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of +// the web service. createOrUpdatePayload is the payload that is used to create or update the web service. func (client GroupClient) CreateOrUpdate(resourceGroupName string, webServiceName string, createOrUpdatePayload WebService, cancel <-chan struct{}) (<-chan WebService, <-chan error) { resultChan := make(chan WebService, 1) errChan := make(chan error, 1) @@ -94,8 +87,10 @@ func (client GroupClient) CreateOrUpdate(resourceGroupName string, webServiceNam var err error var result WebService defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -164,18 +159,15 @@ func (client GroupClient) CreateOrUpdateResponder(resp *http.Response) (result W return } -// CreateRegionalProperties creates an encrypted credentials parameter blob for -// the specified region. To get the web service from a region other than the -// region in which it has been created, you must first call Create Regional Web -// Services Properties to create a copy of the encrypted credential parameter -// blob in that region. You only need to do this before the first time that you -// get the web service in the new region. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// CreateRegionalProperties creates an encrypted credentials parameter blob for the specified region. To get the web +// service from a region other than the region in which it has been created, you must first call Create Regional Web +// Services Properties to create a copy of the encrypted credential parameter blob in that region. You only need to do +// this before the first time that you get the web service in the new region. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is name of the resource group in which the web service is -// located. webServiceName is the name of the web service. region is the region -// for which encrypted credential parameters are created. +// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of +// the web service. region is the region for which encrypted credential parameters are created. func (client GroupClient) CreateRegionalProperties(resourceGroupName string, webServiceName string, region string, cancel <-chan struct{}) (<-chan AsyncOperationStatus, <-chan error) { resultChan := make(chan AsyncOperationStatus, 1) errChan := make(chan error, 1) @@ -183,8 +175,10 @@ func (client GroupClient) CreateRegionalProperties(resourceGroupName string, web var err error var result AsyncOperationStatus defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -252,14 +246,11 @@ func (client GroupClient) CreateRegionalPropertiesResponder(resp *http.Response) return } -// Get gets the Web Service Definition as specified by a subscription, resource -// group, and name. Note that the storage credentials and web service keys are -// not returned by this call. To get the web service access keys, call List -// Keys. +// Get gets the Web Service Definition as specified by a subscription, resource group, and name. Note that the storage +// credentials and web service keys are not returned by this call. To get the web service access keys, call List Keys. // -// resourceGroupName is name of the resource group in which the web service is -// located. webServiceName is the name of the web service. region is the region -// for which encrypted credential parameters are valid. +// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of +// the web service. region is the region for which encrypted credential parameters are valid. func (client GroupClient) Get(resourceGroupName string, webServiceName string, region string) (result WebService, err error) { req, err := client.GetPreparer(resourceGroupName, webServiceName, region) if err != nil { @@ -327,8 +318,8 @@ func (client GroupClient) GetResponder(resp *http.Response) (result WebService, // ListByResourceGroup gets the web services in the specified resource group. // -// resourceGroupName is name of the resource group in which the web service is -// located. skiptoken is continuation token for pagination. +// resourceGroupName is name of the resource group in which the web service is located. skiptoken is continuation token +// for pagination. func (client GroupClient) ListByResourceGroup(resourceGroupName string, skiptoken string) (result PaginatedWebServicesList, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, skiptoken) if err != nil { @@ -417,6 +408,51 @@ func (client GroupClient) ListByResourceGroupNextResults(lastResults PaginatedWe return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client GroupClient) ListByResourceGroupComplete(resourceGroupName string, skiptoken string, cancel <-chan struct{}) (<-chan WebService, <-chan error) { + resultChan := make(chan WebService) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, skiptoken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBySubscriptionID gets the web services in the specified subscription. // // skiptoken is continuation token for pagination. @@ -507,10 +543,55 @@ func (client GroupClient) ListBySubscriptionIDNextResults(lastResults PaginatedW return } +// ListBySubscriptionIDComplete gets all elements from the list without paging. +func (client GroupClient) ListBySubscriptionIDComplete(skiptoken string, cancel <-chan struct{}) (<-chan WebService, <-chan error) { + resultChan := make(chan WebService) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscriptionID(skiptoken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionIDNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListKeys gets the access keys for the specified web service. // -// resourceGroupName is name of the resource group in which the web service is -// located. webServiceName is the name of the web service. +// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of +// the web service. func (client GroupClient) ListKeys(resourceGroupName string, webServiceName string) (result Keys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, webServiceName) if err != nil { @@ -573,15 +654,13 @@ func (client GroupClient) ListKeysResponder(resp *http.Response) (result Keys, e return } -// Patch modifies an existing web service resource. The PATCH API call is an -// asynchronous operation. To determine whether it has completed successfully, -// you must perform a Get operation. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Patch modifies an existing web service resource. The PATCH API call is an asynchronous operation. To determine +// whether it has completed successfully, you must perform a Get operation. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is name of the resource group in which the web service is -// located. webServiceName is the name of the web service. patchPayload is the -// payload to use to patch the web service. +// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of +// the web service. patchPayload is the payload to use to patch the web service. func (client GroupClient) Patch(resourceGroupName string, webServiceName string, patchPayload WebService, cancel <-chan struct{}) (<-chan WebService, <-chan error) { resultChan := make(chan WebService, 1) errChan := make(chan error, 1) @@ -589,8 +668,10 @@ func (client GroupClient) Patch(resourceGroupName string, webServiceName string, var err error var result WebService defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -659,13 +740,11 @@ func (client GroupClient) PatchResponder(resp *http.Response) (result WebService return } -// Remove deletes the specified web service. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Remove deletes the specified web service. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group in which the web service is -// located. webServiceName is the name of the web service. +// resourceGroupName is name of the resource group in which the web service is located. webServiceName is the name of +// the web service. func (client GroupClient) Remove(resourceGroupName string, webServiceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -673,8 +752,10 @@ func (client GroupClient) Remove(resourceGroupName string, webServiceName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/models.go index c7235051d..1f7a0e6cc 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/models.go @@ -14,11 +14,12 @@ package webservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" @@ -31,8 +32,7 @@ type AssetType string const ( // AssetTypeModule specifies the asset type module state for asset type. AssetTypeModule AssetType = "Module" - // AssetTypeResource specifies the asset type resource state for asset - // type. + // AssetTypeResource specifies the asset type resource state for asset type. AssetTypeResource AssetType = "Resource" ) @@ -114,50 +114,45 @@ const ( type OutputPortType string const ( - // OutputPortTypeDataset specifies the output port type dataset state for - // output port type. + // OutputPortTypeDataset specifies the output port type dataset state for output port type. OutputPortTypeDataset OutputPortType = "Dataset" ) +// PackageType enumerates the values for package type. +type PackageType string + +const ( + // PackageTypeGraph specifies the package type graph state for package type. + PackageTypeGraph PackageType = "Graph" +) + // ParameterType enumerates the values for parameter type. type ParameterType string const ( - // ParameterTypeBoolean specifies the parameter type boolean state for - // parameter type. + // ParameterTypeBoolean specifies the parameter type boolean state for parameter type. ParameterTypeBoolean ParameterType = "Boolean" - // ParameterTypeColumnPicker specifies the parameter type column picker - // state for parameter type. + // ParameterTypeColumnPicker specifies the parameter type column picker state for parameter type. ParameterTypeColumnPicker ParameterType = "ColumnPicker" - // ParameterTypeCredential specifies the parameter type credential state - // for parameter type. + // ParameterTypeCredential specifies the parameter type credential state for parameter type. ParameterTypeCredential ParameterType = "Credential" - // ParameterTypeDataGatewayName specifies the parameter type data gateway - // name state for parameter type. + // ParameterTypeDataGatewayName specifies the parameter type data gateway name state for parameter type. ParameterTypeDataGatewayName ParameterType = "DataGatewayName" - // ParameterTypeDouble specifies the parameter type double state for - // parameter type. + // ParameterTypeDouble specifies the parameter type double state for parameter type. ParameterTypeDouble ParameterType = "Double" - // ParameterTypeEnumerated specifies the parameter type enumerated state - // for parameter type. + // ParameterTypeEnumerated specifies the parameter type enumerated state for parameter type. ParameterTypeEnumerated ParameterType = "Enumerated" - // ParameterTypeFloat specifies the parameter type float state for - // parameter type. + // ParameterTypeFloat specifies the parameter type float state for parameter type. ParameterTypeFloat ParameterType = "Float" - // ParameterTypeInt specifies the parameter type int state for parameter - // type. + // ParameterTypeInt specifies the parameter type int state for parameter type. ParameterTypeInt ParameterType = "Int" - // ParameterTypeMode specifies the parameter type mode state for parameter - // type. + // ParameterTypeMode specifies the parameter type mode state for parameter type. ParameterTypeMode ParameterType = "Mode" - // ParameterTypeParameterRange specifies the parameter type parameter range - // state for parameter type. + // ParameterTypeParameterRange specifies the parameter type parameter range state for parameter type. ParameterTypeParameterRange ParameterType = "ParameterRange" - // ParameterTypeScript specifies the parameter type script state for - // parameter type. + // ParameterTypeScript specifies the parameter type script state for parameter type. ParameterTypeScript ParameterType = "Script" - // ParameterTypeString specifies the parameter type string state for - // parameter type. + // ParameterTypeString specifies the parameter type string state for parameter type. ParameterTypeString ParameterType = "String" ) @@ -213,9 +208,8 @@ type BlobLocation struct { Credentials *string `json:"credentials,omitempty"` } -// ColumnSpecification is swagger 2.0 schema for a column within the data table -// representing a web service input or output. See Swagger specification: -// http://swagger.io/specification/ +// ColumnSpecification is swagger 2.0 schema for a column within the data table representing a web service input or +// output. See Swagger specification: http://swagger.io/specification/ type ColumnSpecification struct { Type ColumnType `json:"type,omitempty"` Format ColumnFormat `json:"format,omitempty"` @@ -224,14 +218,12 @@ type ColumnSpecification struct { XMsIsordered *bool `json:"x-ms-isordered,omitempty"` } -// CommitmentPlan is information about the machine learning commitment plan -// associated with the web service. +// CommitmentPlan is information about the machine learning commitment plan associated with the web service. type CommitmentPlan struct { ID *string `json:"id,omitempty"` } -// DiagnosticsConfiguration is diagnostics settings for an Azure ML web -// service. +// DiagnosticsConfiguration is diagnostics settings for an Azure ML web service. type DiagnosticsConfiguration struct { Level DiagnosticsLevel `json:"level,omitempty"` Expiry *date.Time `json:"expiry,omitempty"` @@ -251,9 +243,8 @@ type GraphEdge struct { TargetPortID *string `json:"targetPortId,omitempty"` } -// GraphNode is specifies a node in the web service graph. The node can either -// be an input, output or asset node, so only one of the corresponding id -// properties is populated at any given time. +// GraphNode is specifies a node in the web service graph. The node can either be an input, output or asset node, so +// only one of the corresponding id properties is populated at any given time. type GraphNode struct { AssetID *string `json:"assetId,omitempty"` InputID *string `json:"inputId,omitempty"` @@ -261,8 +252,7 @@ type GraphNode struct { Parameters *map[string]*Parameter `json:"parameters,omitempty"` } -// GraphPackage is defines the graph of modules making up the machine learning -// solution. +// GraphPackage is defines the graph of modules making up the machine learning solution. type GraphPackage struct { Nodes *map[string]*GraphNode `json:"nodes,omitempty"` Edges *[]GraphEdge `json:"edges,omitempty"` @@ -276,8 +266,7 @@ type GraphParameter struct { Links *[]GraphParameterLink `json:"links,omitempty"` } -// GraphParameterLink is association link for a graph global parameter to a -// node in the graph. +// GraphParameterLink is association link for a graph global parameter to a node in the graph. type GraphParameterLink struct { NodeID *string `json:"nodeId,omitempty"` ParameterKey *string `json:"parameterKey,omitempty"` @@ -295,8 +284,8 @@ type Keys struct { Secondary *string `json:"secondary,omitempty"` } -// MachineLearningWorkspace is information about the machine learning workspace -// containing the experiment that is source for the web service. +// MachineLearningWorkspace is information about the machine learning workspace containing the experiment that is +// source for the web service. type MachineLearningWorkspace struct { ID *string `json:"id,omitempty"` } @@ -344,30 +333,44 @@ type Parameter struct { CertificateThumbprint *string `json:"certificateThumbprint,omitempty"` } -// Properties is the set of properties specific to the Azure ML web service -// resource. -type Properties struct { - Title *string `json:"title,omitempty"` - Description *string `json:"description,omitempty"` - CreatedOn *date.Time `json:"createdOn,omitempty"` - ModifiedOn *date.Time `json:"modifiedOn,omitempty"` - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - Keys *Keys `json:"keys,omitempty"` - ReadOnly *bool `json:"readOnly,omitempty"` - SwaggerLocation *string `json:"swaggerLocation,omitempty"` - ExposeSampleData *bool `json:"exposeSampleData,omitempty"` - RealtimeConfiguration *RealtimeConfiguration `json:"realtimeConfiguration,omitempty"` - Diagnostics *DiagnosticsConfiguration `json:"diagnostics,omitempty"` - StorageAccount *StorageAccount `json:"storageAccount,omitempty"` - MachineLearningWorkspace *MachineLearningWorkspace `json:"machineLearningWorkspace,omitempty"` - CommitmentPlan *CommitmentPlan `json:"commitmentPlan,omitempty"` - Input *ServiceInputOutputSpecification `json:"input,omitempty"` - Output *ServiceInputOutputSpecification `json:"output,omitempty"` - ExampleRequest *ExampleRequest `json:"exampleRequest,omitempty"` - Assets *map[string]*AssetItem `json:"assets,omitempty"` - Parameters *map[string]*Parameter `json:"parameters,omitempty"` - PayloadsInBlobStorage *bool `json:"payloadsInBlobStorage,omitempty"` - PayloadsLocation *BlobLocation `json:"payloadsLocation,omitempty"` +// Properties is the set of properties specific to the Azure ML web service resource. +type Properties interface { + AsPropertiesForGraph() (*PropertiesForGraph, bool) +} + +func unmarshalProperties(body []byte) (Properties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["packageType"] { + case string(PackageTypeGraph): + var pfg PropertiesForGraph + err := json.Unmarshal(body, &pfg) + return pfg, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalPropertiesArray(body []byte) ([]Properties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pArray := make([]Properties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + p, err := unmarshalProperties(*rawMessage) + if err != nil { + return nil, err + } + pArray[index] = p + } + return pArray, nil } // PropertiesForGraph is properties specific to a Graph based web service. @@ -393,11 +396,27 @@ type PropertiesForGraph struct { Parameters *map[string]*Parameter `json:"parameters,omitempty"` PayloadsInBlobStorage *bool `json:"payloadsInBlobStorage,omitempty"` PayloadsLocation *BlobLocation `json:"payloadsLocation,omitempty"` + PackageType PackageType `json:"packageType,omitempty"` Package *GraphPackage `json:"package,omitempty"` } -// RealtimeConfiguration is holds the available configuration options for an -// Azure ML web service endpoint. +// MarshalJSON is the custom marshaler for PropertiesForGraph. +func (pfg PropertiesForGraph) MarshalJSON() ([]byte, error) { + pfg.PackageType = PackageTypeGraph + type Alias PropertiesForGraph + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(pfg), + }) +} + +// AsPropertiesForGraph is the Properties implementation for PropertiesForGraph. +func (pfg PropertiesForGraph) AsPropertiesForGraph() (*PropertiesForGraph, bool) { + return &pfg, true +} + +// RealtimeConfiguration is holds the available configuration options for an Azure ML web service endpoint. type RealtimeConfiguration struct { MaxConcurrentCalls *int32 `json:"maxConcurrentCalls,omitempty"` } @@ -411,9 +430,8 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ServiceInputOutputSpecification is the swagger 2.0 schema describing the -// service's inputs or outputs. See Swagger specification: -// http://swagger.io/specification/ +// ServiceInputOutputSpecification is the swagger 2.0 schema describing the service's inputs or outputs. See Swagger +// specification: http://swagger.io/specification/ type ServiceInputOutputSpecification struct { Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` @@ -427,8 +445,8 @@ type StorageAccount struct { Key *string `json:"key,omitempty"` } -// TableSpecification is the swagger 2.0 schema describing a single service -// input or output. See Swagger specification: http://swagger.io/specification/ +// TableSpecification is the swagger 2.0 schema describing a single service input or output. See Swagger specification: +// http://swagger.io/specification/ type TableSpecification struct { Title *string `json:"title,omitempty"` Description *string `json:"description,omitempty"` @@ -445,5 +463,76 @@ type WebService struct { Location *string `json:"location,omitempty"` Type *string `json:"type,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` - Properties *Properties `json:"properties,omitempty"` + Properties Properties `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for WebService struct. +func (ws *WebService) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalProperties(*m["properties"]) + if err != nil { + return err + } + ws.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + ws.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + ws.Name = &name + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + ws.Location = &location + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + ws.Type = &typeVar + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + ws.Tags = &tags + } + + return nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go index 281936f24..1c29f5baa 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/machinelearning/webservices/version.go @@ -14,15 +14,15 @@ package webservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-webservices/2017-01-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-webservices/2017-01-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/client.go new file mode 100644 index 000000000..a7a7bec06 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/client.go @@ -0,0 +1,51 @@ +// Package marketplaceordering implements the Azure ARM Marketplaceordering service API version 2015-06-01. +// +// REST API for MarketplaceOrdering Agreements. +package marketplaceordering + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Marketplaceordering + DefaultBaseURI = "https://management.azure.com" +) + +// ManagementClient is the base client for Marketplaceordering. +type ManagementClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the ManagementClient client. +func New(subscriptionID string) ManagementClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the ManagementClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { + return ManagementClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/marketplaceagreements.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/marketplaceagreements.go new file mode 100644 index 000000000..24583e234 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/marketplaceagreements.go @@ -0,0 +1,179 @@ +package marketplaceordering + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// MarketplaceAgreementsClient is the REST API for MarketplaceOrdering Agreements. +type MarketplaceAgreementsClient struct { + ManagementClient +} + +// NewMarketplaceAgreementsClient creates an instance of the MarketplaceAgreementsClient client. +func NewMarketplaceAgreementsClient(subscriptionID string) MarketplaceAgreementsClient { + return NewMarketplaceAgreementsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewMarketplaceAgreementsClientWithBaseURI creates an instance of the MarketplaceAgreementsClient client. +func NewMarketplaceAgreementsClientWithBaseURI(baseURI string, subscriptionID string) MarketplaceAgreementsClient { + return MarketplaceAgreementsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create save marketplace terms. +// +// offerType is offer Type, currently only virtualmachine type is supported. publisherID is publisher identifier string +// of image being deployed. offerID is offer identifier string of image being deployed. planID is plan identifier +// string of image being deployed. parameters is parameters supplied to the Create Marketplace Terms operation. +func (client MarketplaceAgreementsClient) Create(offerType string, publisherID string, offerID string, planID string, parameters AgreementTerms) (result AgreementTerms, err error) { + req, err := client.CreatePreparer(offerType, publisherID, offerID, planID, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "marketplaceordering.MarketplaceAgreementsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "marketplaceordering.MarketplaceAgreementsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "marketplaceordering.MarketplaceAgreementsClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client MarketplaceAgreementsClient) CreatePreparer(offerType string, publisherID string, offerID string, planID string, parameters AgreementTerms) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "offerId": autorest.Encode("path", offerID), + "offerType": autorest.Encode("path", offerType), + "planId": autorest.Encode("path", planID), + "publisherId": autorest.Encode("path", publisherID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client MarketplaceAgreementsClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client MarketplaceAgreementsClient) CreateResponder(resp *http.Response) (result AgreementTerms, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get get marketplace terms. +// +// offerType is offer Type, currently only virtualmachine type is supported. publisherID is publisher identifier string +// of image being deployed. offerID is offer identifier string of image being deployed. planID is plan identifier +// string of image being deployed. +func (client MarketplaceAgreementsClient) Get(offerType string, publisherID string, offerID string, planID string) (result AgreementTerms, err error) { + req, err := client.GetPreparer(offerType, publisherID, offerID, planID) + if err != nil { + err = autorest.NewErrorWithError(err, "marketplaceordering.MarketplaceAgreementsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "marketplaceordering.MarketplaceAgreementsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "marketplaceordering.MarketplaceAgreementsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client MarketplaceAgreementsClient) GetPreparer(offerType string, publisherID string, offerID string, planID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "offerId": autorest.Encode("path", offerID), + "offerType": autorest.Encode("path", offerType), + "planId": autorest.Encode("path", planID), + "publisherId": autorest.Encode("path", publisherID), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.MarketplaceOrdering/offerTypes/{offerType}/publishers/{publisherId}/offers/{offerId}/plans/{planId}/agreements/current", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client MarketplaceAgreementsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client MarketplaceAgreementsClient) GetResponder(resp *http.Response) (result AgreementTerms, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/models.go new file mode 100644 index 000000000..e04bb4345 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/models.go @@ -0,0 +1,98 @@ +package marketplaceordering + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" + "github.com/Azure/go-autorest/autorest/to" + "net/http" +) + +// AgreementProperties is agreement Terms definition +type AgreementProperties struct { + Publisher *string `json:"publisher,omitempty"` + Product *string `json:"product,omitempty"` + Plan *string `json:"plan,omitempty"` + LicenseTextLink *string `json:"licenseTextLink,omitempty"` + PrivacyPolicyLink *string `json:"privacyPolicyLink,omitempty"` + RetrieveDatetime *date.Time `json:"retrieveDatetime,omitempty"` + Signature *string `json:"signature,omitempty"` + Accepted *bool `json:"accepted,omitempty"` +} + +// AgreementTerms is terms properties for provided Publisher/Offer/Plan tuple +type AgreementTerms struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *AgreementProperties `json:"properties,omitempty"` +} + +// ErrorResponse is error reponse indicates Microsoft.MarketplaceOrdering service is not able to process the incoming +// request. The reason is provided in the error message. +type ErrorResponse struct { + Error *ErrorResponseError `json:"error,omitempty"` +} + +// ErrorResponseError is the details of the error. +type ErrorResponseError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// Operation is microsoft.MarketplaceOrdering REST API operation +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay is the object that represents the operation. +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` +} + +// OperationListResult is result of the request to list MarketplaceOrdering operations. It contains a list of +// operations and a URL link to get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// Resource is ARM resource. +type Resource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/operations.go new file mode 100644 index 000000000..9cdd6ebb4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/operations.go @@ -0,0 +1,165 @@ +package marketplaceordering + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the REST API for MarketplaceOrdering Agreements. +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available Microsoft.MarketplaceOrdering REST API operations. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "marketplaceordering.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "marketplaceordering.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "marketplaceordering.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2015-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.MarketplaceOrdering/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.OperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "marketplaceordering.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "marketplaceordering.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "marketplaceordering.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/version.go new file mode 100644 index 000000000..ee158688c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/marketplaceordering/version.go @@ -0,0 +1,28 @@ +package marketplaceordering + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/v11.0.0-beta arm-marketplaceordering/2015-06-01" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return "v11.0.0-beta" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/client.go index b67e498ad..2711f6fe3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/client.go @@ -1,5 +1,4 @@ -// Package mediaservices implements the Azure ARM Mediaservices service API -// version 2015-10-01. +// Package mediaservices implements the Azure ARM Mediaservices service API version 2015-10-01. // // Media Services resource management APIs. package mediaservices @@ -18,9 +17,8 @@ package mediaservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/mediaservice.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/mediaservice.go index ab632e05b..5a13c7ed4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/mediaservice.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/mediaservice.go @@ -14,9 +14,8 @@ package mediaservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -40,24 +39,22 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client { return Client{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailability checks whether the Media Service resource name is -// available. The name must be globally unique. +// CheckNameAvailability checks whether the Media Service resource name is available. The name must be globally unique. // -// checkNameAvailabilityInput is properties needed to check the availability of -// a name. -func (client Client) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { +// parameters is properties needed to check the availability of a name. +func (client Client) CheckNameAvailability(parameters CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) { if err := validation.Validate([]validation.Validation{ - {TargetValue: checkNameAvailabilityInput, - Constraints: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.MaxLength, Rule: 24, Chain: nil}, - {Target: "checkNameAvailabilityInput.Name", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "checkNameAvailabilityInput.Name", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Name", Name: validation.MaxLength, Rule: 24, Chain: nil}, + {Target: "parameters.Name", Name: validation.MinLength, Rule: 3, Chain: nil}, + {Target: "parameters.Name", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}, }}, - {Target: "checkNameAvailabilityInput.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + {Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "CheckNameAvailability") } - req, err := client.CheckNameAvailabilityPreparer(checkNameAvailabilityInput) + req, err := client.CheckNameAvailabilityPreparer(parameters) if err != nil { err = autorest.NewErrorWithError(err, "mediaservices.Client", "CheckNameAvailability", nil, "Failure preparing request") return @@ -79,7 +76,7 @@ func (client Client) CheckNameAvailability(checkNameAvailabilityInput CheckNameA } // CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. -func (client Client) CheckNameAvailabilityPreparer(checkNameAvailabilityInput CheckNameAvailabilityInput) (*http.Request, error) { +func (client Client) CheckNameAvailabilityPreparer(parameters CheckNameAvailabilityInput) (*http.Request, error) { pathParameters := map[string]interface{}{ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -94,7 +91,7 @@ func (client Client) CheckNameAvailabilityPreparer(checkNameAvailabilityInput Ch autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Media/CheckNameAvailability", pathParameters), - autorest.WithJSON(checkNameAvailabilityInput), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -120,19 +117,18 @@ func (client Client) CheckNameAvailabilityResponder(resp *http.Response) (result // Create creates a Media Service. // -// resourceGroupName is name of the resource group within the Azure -// subscription. mediaServiceName is name of the Media Service. mediaService is -// media Service properties needed for creation. -func (client Client) Create(resourceGroupName string, mediaServiceName string, mediaService MediaService) (result MediaService, err error) { +// resourceGroupName is name of the resource group within the Azure subscription. mediaServiceName is name of the Media +// Service. parameters is media Service properties needed for creation. +func (client Client) Create(resourceGroupName string, mediaServiceName string, parameters MediaService) (result MediaService, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mediaServiceName, Constraints: []validation.Constraint{{Target: "mediaServiceName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "mediaServiceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}}}}); err != nil { + {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "Create") } - req, err := client.CreatePreparer(resourceGroupName, mediaServiceName, mediaService) + req, err := client.CreatePreparer(resourceGroupName, mediaServiceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mediaservices.Client", "Create", nil, "Failure preparing request") return @@ -154,7 +150,7 @@ func (client Client) Create(resourceGroupName string, mediaServiceName string, m } // CreatePreparer prepares the Create request. -func (client Client) CreatePreparer(resourceGroupName string, mediaServiceName string, mediaService MediaService) (*http.Request, error) { +func (client Client) CreatePreparer(resourceGroupName string, mediaServiceName string, parameters MediaService) (*http.Request, error) { pathParameters := map[string]interface{}{ "mediaServiceName": autorest.Encode("path", mediaServiceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -171,7 +167,7 @@ func (client Client) CreatePreparer(resourceGroupName string, mediaServiceName s autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}", pathParameters), - autorest.WithJSON(mediaService), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -197,14 +193,14 @@ func (client Client) CreateResponder(resp *http.Response) (result MediaService, // Delete deletes a Media Service. // -// resourceGroupName is name of the resource group within the Azure -// subscription. mediaServiceName is name of the Media Service. +// resourceGroupName is name of the resource group within the Azure subscription. mediaServiceName is name of the Media +// Service. func (client Client) Delete(resourceGroupName string, mediaServiceName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mediaServiceName, Constraints: []validation.Constraint{{Target: "mediaServiceName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "mediaServiceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}}}}); err != nil { + {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "Delete") } @@ -270,14 +266,14 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo // Get gets a Media Service. // -// resourceGroupName is name of the resource group within the Azure -// subscription. mediaServiceName is name of the Media Service. +// resourceGroupName is name of the resource group within the Azure subscription. mediaServiceName is name of the Media +// Service. func (client Client) Get(resourceGroupName string, mediaServiceName string) (result MediaService, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mediaServiceName, Constraints: []validation.Constraint{{Target: "mediaServiceName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "mediaServiceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}}}}); err != nil { + {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "Get") } @@ -344,8 +340,7 @@ func (client Client) GetResponder(resp *http.Response) (result MediaService, err // ListByResourceGroup lists all of the Media Services in a resource group. // -// resourceGroupName is name of the resource group within the Azure -// subscription. +// resourceGroupName is name of the resource group within the Azure subscription. func (client Client) ListByResourceGroup(resourceGroupName string) (result Collection, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { @@ -409,14 +404,14 @@ func (client Client) ListByResourceGroupResponder(resp *http.Response) (result C // ListKeys lists the keys for a Media Service. // -// resourceGroupName is name of the resource group within the Azure -// subscription. mediaServiceName is name of the Media Service. +// resourceGroupName is name of the resource group within the Azure subscription. mediaServiceName is name of the Media +// Service. func (client Client) ListKeys(resourceGroupName string, mediaServiceName string) (result ServiceKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mediaServiceName, Constraints: []validation.Constraint{{Target: "mediaServiceName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "mediaServiceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}}}}); err != nil { + {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "ListKeys") } @@ -483,19 +478,18 @@ func (client Client) ListKeysResponder(resp *http.Response) (result ServiceKeys, // RegenerateKey regenerates a primary or secondary key for a Media Service. // -// resourceGroupName is name of the resource group within the Azure -// subscription. mediaServiceName is name of the Media Service. -// regenerateKeyInput is properties needed to regenerate the Media Service key. -func (client Client) RegenerateKey(resourceGroupName string, mediaServiceName string, regenerateKeyInput RegenerateKeyInput) (result RegenerateKeyOutput, err error) { +// resourceGroupName is name of the resource group within the Azure subscription. mediaServiceName is name of the Media +// Service. parameters is properties needed to regenerate the Media Service key. +func (client Client) RegenerateKey(resourceGroupName string, mediaServiceName string, parameters RegenerateKeyInput) (result RegenerateKeyOutput, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mediaServiceName, Constraints: []validation.Constraint{{Target: "mediaServiceName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "mediaServiceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}}}}); err != nil { + {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "RegenerateKey") } - req, err := client.RegenerateKeyPreparer(resourceGroupName, mediaServiceName, regenerateKeyInput) + req, err := client.RegenerateKeyPreparer(resourceGroupName, mediaServiceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mediaservices.Client", "RegenerateKey", nil, "Failure preparing request") return @@ -517,7 +511,7 @@ func (client Client) RegenerateKey(resourceGroupName string, mediaServiceName st } // RegenerateKeyPreparer prepares the RegenerateKey request. -func (client Client) RegenerateKeyPreparer(resourceGroupName string, mediaServiceName string, regenerateKeyInput RegenerateKeyInput) (*http.Request, error) { +func (client Client) RegenerateKeyPreparer(resourceGroupName string, mediaServiceName string, parameters RegenerateKeyInput) (*http.Request, error) { pathParameters := map[string]interface{}{ "mediaServiceName": autorest.Encode("path", mediaServiceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -534,7 +528,7 @@ func (client Client) RegenerateKeyPreparer(resourceGroupName string, mediaServic autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/regenerateKey", pathParameters), - autorest.WithJSON(regenerateKeyInput), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -558,25 +552,22 @@ func (client Client) RegenerateKeyResponder(resp *http.Response) (result Regener return } -// SyncStorageKeys synchronizes storage account keys for a storage account -// associated with the Media Service account. +// SyncStorageKeys synchronizes storage account keys for a storage account associated with the Media Service account. // -// resourceGroupName is name of the resource group within the Azure -// subscription. mediaServiceName is name of the Media Service. -// syncStorageKeysInput is properties needed to synchronize the keys for a -// storage account to the Media Service. -func (client Client) SyncStorageKeys(resourceGroupName string, mediaServiceName string, syncStorageKeysInput SyncStorageKeysInput) (result autorest.Response, err error) { +// resourceGroupName is name of the resource group within the Azure subscription. mediaServiceName is name of the Media +// Service. parameters is properties needed to synchronize the keys for a storage account to the Media Service. +func (client Client) SyncStorageKeys(resourceGroupName string, mediaServiceName string, parameters SyncStorageKeysInput) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mediaServiceName, Constraints: []validation.Constraint{{Target: "mediaServiceName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "mediaServiceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}}}, - {TargetValue: syncStorageKeysInput, - Constraints: []validation.Constraint{{Target: "syncStorageKeysInput.ID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "SyncStorageKeys") } - req, err := client.SyncStorageKeysPreparer(resourceGroupName, mediaServiceName, syncStorageKeysInput) + req, err := client.SyncStorageKeysPreparer(resourceGroupName, mediaServiceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mediaservices.Client", "SyncStorageKeys", nil, "Failure preparing request") return @@ -598,7 +589,7 @@ func (client Client) SyncStorageKeys(resourceGroupName string, mediaServiceName } // SyncStorageKeysPreparer prepares the SyncStorageKeys request. -func (client Client) SyncStorageKeysPreparer(resourceGroupName string, mediaServiceName string, syncStorageKeysInput SyncStorageKeysInput) (*http.Request, error) { +func (client Client) SyncStorageKeysPreparer(resourceGroupName string, mediaServiceName string, parameters SyncStorageKeysInput) (*http.Request, error) { pathParameters := map[string]interface{}{ "mediaServiceName": autorest.Encode("path", mediaServiceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -615,7 +606,7 @@ func (client Client) SyncStorageKeysPreparer(resourceGroupName string, mediaServ autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}/syncStorageKeys", pathParameters), - autorest.WithJSON(syncStorageKeysInput), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -640,19 +631,18 @@ func (client Client) SyncStorageKeysResponder(resp *http.Response) (result autor // Update updates a Media Service. // -// resourceGroupName is name of the resource group within the Azure -// subscription. mediaServiceName is name of the Media Service. mediaService is -// media Service properties needed for update. -func (client Client) Update(resourceGroupName string, mediaServiceName string, mediaService MediaService) (result MediaService, err error) { +// resourceGroupName is name of the resource group within the Azure subscription. mediaServiceName is name of the Media +// Service. parameters is media Service properties needed for update. +func (client Client) Update(resourceGroupName string, mediaServiceName string, parameters MediaService) (result MediaService, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: mediaServiceName, Constraints: []validation.Constraint{{Target: "mediaServiceName", Name: validation.MaxLength, Rule: 24, Chain: nil}, {Target: "mediaServiceName", Name: validation.MinLength, Rule: 3, Chain: nil}, - {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]`, Chain: nil}}}}); err != nil { + {Target: "mediaServiceName", Name: validation.Pattern, Rule: `^[a-z0-9]{3,24}$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "mediaservices.Client", "Update") } - req, err := client.UpdatePreparer(resourceGroupName, mediaServiceName, mediaService) + req, err := client.UpdatePreparer(resourceGroupName, mediaServiceName, parameters) if err != nil { err = autorest.NewErrorWithError(err, "mediaservices.Client", "Update", nil, "Failure preparing request") return @@ -674,7 +664,7 @@ func (client Client) Update(resourceGroupName string, mediaServiceName string, m } // UpdatePreparer prepares the Update request. -func (client Client) UpdatePreparer(resourceGroupName string, mediaServiceName string, mediaService MediaService) (*http.Request, error) { +func (client Client) UpdatePreparer(resourceGroupName string, mediaServiceName string, parameters MediaService) (*http.Request, error) { pathParameters := map[string]interface{}{ "mediaServiceName": autorest.Encode("path", mediaServiceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -691,7 +681,7 @@ func (client Client) UpdatePreparer(resourceGroupName string, mediaServiceName s autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaservices/{mediaServiceName}", pathParameters), - autorest.WithJSON(mediaService), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/models.go index d8fa72549..552061d08 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/models.go @@ -14,24 +14,20 @@ package mediaservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" ) -// EntityNameUnavailabilityReason enumerates the values for entity name -// unavailability reason. +// EntityNameUnavailabilityReason enumerates the values for entity name unavailability reason. type EntityNameUnavailabilityReason string const ( - // AlreadyExists specifies the already exists state for entity name - // unavailability reason. + // AlreadyExists specifies the already exists state for entity name unavailability reason. AlreadyExists EntityNameUnavailabilityReason = "AlreadyExists" - // Invalid specifies the invalid state for entity name unavailability - // reason. + // Invalid specifies the invalid state for entity name unavailability reason. Invalid EntityNameUnavailabilityReason = "Invalid" // None specifies the none state for entity name unavailability reason. None EntityNameUnavailabilityReason = "None" @@ -67,20 +63,18 @@ type APIError struct { Message *string `json:"message,omitempty"` } -// CheckNameAvailabilityInput is the request body for CheckNameAvailability -// API. +// CheckNameAvailabilityInput is the request body for CheckNameAvailability API. type CheckNameAvailabilityInput struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } -// CheckNameAvailabilityOutput is the response body for CheckNameAvailability -// API. +// CheckNameAvailabilityOutput is the response body for CheckNameAvailability API. type CheckNameAvailabilityOutput struct { autorest.Response `json:"-"` - NameAvailable *bool `json:"NameAvailable,omitempty"` - Reason EntityNameUnavailabilityReason `json:"Reason,omitempty"` - Message *string `json:"Message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` + Reason EntityNameUnavailabilityReason `json:"reason,omitempty"` + Message *string `json:"message,omitempty"` } // Collection is the collection of Media Service resources. @@ -100,6 +94,26 @@ type MediaService struct { *Properties `json:"properties,omitempty"` } +// Operation is a Media Services REST API operation +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay is the object that represents the operation. +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` +} + +// OperationListResult is result of the request to list Media Services operations. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + // Properties is the additional properties of a Media Service resource. type Properties struct { APIEndpoints *[]APIEndpoint `json:"apiEndpoints,omitempty"` @@ -136,8 +150,7 @@ type ServiceKeys struct { Scope *string `json:"scope,omitempty"` } -// StorageAccount is the properties of a storage account associated with this -// resource. +// StorageAccount is the properties of a storage account associated with this resource. type StorageAccount struct { ID *string `json:"id,omitempty"` IsPrimary *bool `json:"isPrimary,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/operations.go new file mode 100644 index 000000000..d96a84270 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/operations.go @@ -0,0 +1,96 @@ +package mediaservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the media Services resource management APIs. +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available Media Services REST API operations. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "mediaservices.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "mediaservices.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "mediaservices.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2015-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Media/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go index 1a8c6ad40..19656b211 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mediaservices/version.go @@ -14,15 +14,15 @@ package mediaservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-mediaservices/2015-10-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-mediaservices/2015-10-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/appcollections.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/appcollections.go index 5c91b67e2..33c462616 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/appcollections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/appcollections.go @@ -14,9 +14,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,20 +28,17 @@ type AppCollectionsClient struct { ManagementClient } -// NewAppCollectionsClient creates an instance of the AppCollectionsClient -// client. +// NewAppCollectionsClient creates an instance of the AppCollectionsClient client. func NewAppCollectionsClient(subscriptionID string) AppCollectionsClient { return NewAppCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppCollectionsClientWithBaseURI creates an instance of the -// AppCollectionsClient client. +// NewAppCollectionsClientWithBaseURI creates an instance of the AppCollectionsClient client. func NewAppCollectionsClientWithBaseURI(baseURI string, subscriptionID string) AppCollectionsClient { return AppCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailability checks availability of an app collection name in the -// Engagement domain. +// CheckNameAvailability checks availability of an app collection name in the Engagement domain. // func (client AppCollectionsClient) CheckNameAvailability(parameters AppCollectionNameAvailability) (result AppCollectionNameAvailability, err error) { req, err := client.CheckNameAvailabilityPreparer(parameters) @@ -190,3 +186,48 @@ func (client AppCollectionsClient) ListNextResults(lastResults AppCollectionList return } + +// ListComplete gets all elements from the list without paging. +func (client AppCollectionsClient) ListComplete(cancel <-chan struct{}) (<-chan AppCollection, <-chan error) { + resultChan := make(chan AppCollection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/apps.go index ddc0c7549..613336a4c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/apps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/apps.go @@ -14,9 +14,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -41,8 +40,7 @@ func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient // List lists apps in an appCollection. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. +// resourceGroupName is the name of the resource group. appCollection is application collection. func (client AppsClient) List(resourceGroupName string, appCollection string) (result AppListResult, err error) { req, err := client.ListPreparer(resourceGroupName, appCollection) if err != nil { @@ -128,3 +126,48 @@ func (client AppsClient) ListNextResults(lastResults AppListResult) (result AppL return } + +// ListComplete gets all elements from the list without paging. +func (client AppsClient) ListComplete(resourceGroupName string, appCollection string, cancel <-chan struct{}) (<-chan App, <-chan error) { + resultChan := make(chan App) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, appCollection) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/campaigns.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/campaigns.go index d1da83e0b..ccb120e96 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/campaigns.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/campaigns.go @@ -14,9 +14,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,18 +34,15 @@ func NewCampaignsClient(subscriptionID string) CampaignsClient { return NewCampaignsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCampaignsClientWithBaseURI creates an instance of the CampaignsClient -// client. +// NewCampaignsClientWithBaseURI creates an instance of the CampaignsClient client. func NewCampaignsClientWithBaseURI(baseURI string, subscriptionID string) CampaignsClient { return CampaignsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Activate activate a campaign previously created by a call to Create -// campaign. +// Activate activate a campaign previously created by a call to Create campaign. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. ID is campaign identifier. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. ID is campaign identifier. func (client CampaignsClient) Activate(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, ID int32) (result CampaignStateResult, err error) { req, err := client.ActivatePreparer(resourceGroupName, appCollection, appName, kind, ID) if err != nil { @@ -112,13 +108,10 @@ func (client CampaignsClient) ActivateResponder(resp *http.Response) (result Cam return } -// Create create a push campaign (announcement, poll, data push or native -// push). +// Create create a push campaign (announcement, poll, data push or native push). // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. parameters is parameters supplied to the Update Campaign -// operation. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. parameters is parameters supplied to the Update Campaign operation. func (client CampaignsClient) Create(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, parameters Campaign) (result CampaignStateResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -196,9 +189,8 @@ func (client CampaignsClient) CreateResponder(resp *http.Response) (result Campa // Delete delete a campaign previously created by a call to Create campaign. // -// kind is campaign kind. ID is campaign identifier. resourceGroupName is the -// name of the resource group. appCollection is application collection. appName -// is application resource name. +// kind is campaign kind. ID is campaign identifier. resourceGroupName is the name of the resource group. appCollection +// is application collection. appName is application resource name. func (client CampaignsClient) Delete(kind CampaignKinds, ID int32, resourceGroupName string, appCollection string, appName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(kind, ID, resourceGroupName, appCollection, appName) if err != nil { @@ -263,12 +255,10 @@ func (client CampaignsClient) DeleteResponder(resp *http.Response) (result autor return } -// Finish finish a push campaign previously activated by a call to Activate -// campaign. +// Finish finish a push campaign previously activated by a call to Activate campaign. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. ID is campaign identifier. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. ID is campaign identifier. func (client CampaignsClient) Finish(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, ID int32) (result CampaignStateResult, err error) { req, err := client.FinishPreparer(resourceGroupName, appCollection, appName, kind, ID) if err != nil { @@ -334,12 +324,10 @@ func (client CampaignsClient) FinishResponder(resp *http.Response) (result Campa return } -// Get the Get campaign operation retrieves information about a previously -// created campaign. +// Get the Get campaign operation retrieves information about a previously created campaign. // -// kind is campaign kind. ID is campaign identifier. resourceGroupName is the -// name of the resource group. appCollection is application collection. appName -// is application resource name. +// kind is campaign kind. ID is campaign identifier. resourceGroupName is the name of the resource group. appCollection +// is application collection. appName is application resource name. func (client CampaignsClient) Get(kind CampaignKinds, ID int32, resourceGroupName string, appCollection string, appName string) (result CampaignResult, err error) { req, err := client.GetPreparer(kind, ID, resourceGroupName, appCollection, appName) if err != nil { @@ -405,12 +393,10 @@ func (client CampaignsClient) GetResponder(resp *http.Response) (result Campaign return } -// GetByName the Get campaign operation retrieves information about a -// previously created campaign. +// GetByName the Get campaign operation retrieves information about a previously created campaign. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. name is campaign name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. name is campaign name. func (client CampaignsClient) GetByName(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, name string) (result CampaignResult, err error) { req, err := client.GetByNamePreparer(resourceGroupName, appCollection, appName, kind, name) if err != nil { @@ -478,9 +464,8 @@ func (client CampaignsClient) GetByNameResponder(resp *http.Response) (result Ca // GetStatistics get all the campaign statistics. // -// kind is campaign kind. ID is campaign identifier. resourceGroupName is the -// name of the resource group. appCollection is application collection. appName -// is application resource name. +// kind is campaign kind. ID is campaign identifier. resourceGroupName is the name of the resource group. appCollection +// is application collection. appName is application resource name. func (client CampaignsClient) GetStatistics(kind CampaignKinds, ID int32, resourceGroupName string, appCollection string, appName string) (result CampaignStatisticsResult, err error) { req, err := client.GetStatisticsPreparer(kind, ID, resourceGroupName, appCollection, appName) if err != nil { @@ -548,27 +533,20 @@ func (client CampaignsClient) GetStatisticsResponder(resp *http.Response) (resul // List get the list of campaigns. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. skip is control paging of campaigns, start results at the -// given offset, defaults to 0 (1st page of data). top is control paging of -// campaigns, number of campaigns to return with each call. It returns all -// campaigns by default. When specifying $top parameter, the response contains -// a `nextLink` property describing the path to get the next page if there are -// more results. filter is filter can be used to restrict the results to -// campaigns matching a specific state. The syntax is `$filter=state eq -// 'draft'`. Valid state values are: draft, scheduled, in-progress, and -// finished. Only the eq operator and the state property are supported. orderby -// is sort results by an expression which looks like `$orderby=id asc` (this -// example is actually the default behavior). The syntax is orderby={property} -// {direction} or just orderby={property}. The available sorting properties are -// id, name, state, activatedDate, and finishedDate. The available directions -// are asc (for ascending order) and desc (for descending order). When not -// specified the asc direction is used. Only one property at a time can be used -// for sorting. search is restrict results to campaigns matching the optional -// `search` expression. This currently performs the search based on the name on -// the campaign only, case insensitive. If the campaign contains the value of -// the `search` parameter anywhere in the name, it matches. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. skip is control paging of campaigns, start results at the given offset, +// defaults to 0 (1st page of data). top is control paging of campaigns, number of campaigns to return with each call. +// It returns all campaigns by default. When specifying $top parameter, the response contains a `nextLink` property +// describing the path to get the next page if there are more results. filter is filter can be used to restrict the +// results to campaigns matching a specific state. The syntax is `$filter=state eq 'draft'`. Valid state values are: +// draft, scheduled, in-progress, and finished. Only the eq operator and the state property are supported. orderby is +// sort results by an expression which looks like `$orderby=id asc` (this example is actually the default behavior). +// The syntax is orderby={property} {direction} or just orderby={property}. The available sorting properties are id, +// name, state, activatedDate, and finishedDate. The available directions are asc (for ascending order) and desc (for +// descending order). When not specified the asc direction is used. Only one property at a time can be used for +// sorting. search is restrict results to campaigns matching the optional `search` expression. This currently performs +// the search based on the name on the campaign only, case insensitive. If the campaign contains the value of the +// `search` parameter anywhere in the name, it matches. func (client CampaignsClient) List(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, skip *int32, top *int32, filter string, orderby string, search string) (result CampaignsListResult, err error) { req, err := client.ListPreparer(resourceGroupName, appCollection, appName, kind, skip, top, filter, orderby, search) if err != nil { @@ -672,13 +650,56 @@ func (client CampaignsClient) ListNextResults(lastResults CampaignsListResult) ( return } -// Push push a previously saved campaign (created with Create campaign) to a -// set of devices. +// ListComplete gets all elements from the list without paging. +func (client CampaignsClient) ListComplete(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, skip *int32, top *int32, filter string, orderby string, search string, cancel <-chan struct{}) (<-chan CampaignListResult, <-chan error) { + resultChan := make(chan CampaignListResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, appCollection, appName, kind, skip, top, filter, orderby, search) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Push push a previously saved campaign (created with Create campaign) to a set of devices. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. ID is campaign identifier. parameters is parameters supplied -// to the Push Campaign operation. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. ID is campaign identifier. parameters is parameters supplied to the Push +// Campaign operation. func (client CampaignsClient) Push(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, ID int32, parameters CampaignPushParameters) (result CampaignPushResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -758,12 +779,10 @@ func (client CampaignsClient) PushResponder(resp *http.Response) (result Campaig return } -// Suspend suspend a push campaign previously activated by a call to Activate -// campaign. +// Suspend suspend a push campaign previously activated by a call to Activate campaign. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. ID is campaign identifier. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. ID is campaign identifier. func (client CampaignsClient) Suspend(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, ID int32) (result CampaignStateResult, err error) { req, err := client.SuspendPreparer(resourceGroupName, appCollection, appName, kind, ID) if err != nil { @@ -831,10 +850,8 @@ func (client CampaignsClient) SuspendResponder(resp *http.Response) (result Camp // TestNew test a new campaign on a set of devices. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. parameters is parameters supplied to the Test Campaign -// operation. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. parameters is parameters supplied to the Test Campaign operation. func (client CampaignsClient) TestNew(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, parameters CampaignTestNewParameters) (result CampaignState, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -912,13 +929,11 @@ func (client CampaignsClient) TestNewResponder(resp *http.Response) (result Camp return } -// TestSaved test an existing campaign (created with Create campaign) on a set -// of devices. +// TestSaved test an existing campaign (created with Create campaign) on a set of devices. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. kind is -// campaign kind. ID is campaign identifier. parameters is parameters supplied -// to the Test Campaign operation. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. kind is campaign kind. ID is campaign identifier. parameters is parameters supplied to the Test +// Campaign operation. func (client CampaignsClient) TestSaved(resourceGroupName string, appCollection string, appName string, kind CampaignKinds, ID int32, parameters CampaignTestSavedParameters) (result CampaignStateResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -992,12 +1007,10 @@ func (client CampaignsClient) TestSavedResponder(resp *http.Response) (result Ca return } -// Update update an existing push campaign (announcement, poll, data push or -// native push). +// Update update an existing push campaign (announcement, poll, data push or native push). // -// kind is campaign kind. ID is campaign identifier. parameters is parameters -// supplied to the Update Campaign operation. resourceGroupName is the name of -// the resource group. appCollection is application collection. appName is +// kind is campaign kind. ID is campaign identifier. parameters is parameters supplied to the Update Campaign +// operation. resourceGroupName is the name of the resource group. appCollection is application collection. appName is // application resource name. func (client CampaignsClient) Update(kind CampaignKinds, ID int32, parameters Campaign, resourceGroupName string, appCollection string, appName string) (result CampaignStateResult, err error) { if err := validation.Validate([]validation.Validation{ diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/client.go index c80e35de9..eeed41fdd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/client.go @@ -1,5 +1,4 @@ -// Package mobileengagement implements the Azure ARM Mobileengagement service -// API version 2014-12-01. +// Package mobileengagement implements the Azure ARM Mobileengagement service API version 2014-12-01. // // Microsoft Azure Mobile Engagement REST APIs. package mobileengagement @@ -18,9 +17,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/devices.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/devices.go index 2a221be15..ef4978c30 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/devices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/devices.go @@ -14,9 +14,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -40,12 +39,10 @@ func NewDevicesClientWithBaseURI(baseURI string, subscriptionID string) DevicesC return DevicesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// GetByDeviceID get the information associated to a device running an -// application. +// GetByDeviceID get the information associated to a device running an application. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. deviceID is -// device identifier. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. deviceID is device identifier. func (client DevicesClient) GetByDeviceID(resourceGroupName string, appCollection string, appName string, deviceID string) (result Device, err error) { req, err := client.GetByDeviceIDPreparer(resourceGroupName, appCollection, appName, deviceID) if err != nil { @@ -110,12 +107,10 @@ func (client DevicesClient) GetByDeviceIDResponder(resp *http.Response) (result return } -// GetByUserID get the information associated to a device running an -// application using the user identifier. +// GetByUserID get the information associated to a device running an application using the user identifier. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. userID is user -// identifier. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. userID is user identifier. func (client DevicesClient) GetByUserID(resourceGroupName string, appCollection string, appName string, userID string) (result Device, err error) { req, err := client.GetByUserIDPreparer(resourceGroupName, appCollection, appName, userID) if err != nil { @@ -182,47 +177,32 @@ func (client DevicesClient) GetByUserIDResponder(resp *http.Response) (result De // List query the information associated to the devices running an application. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. top is number -// of devices to return with each call. Defaults to 100 and cannot return more. -// Passing a greater value is ignored. The response contains a `nextLink` -// property describing the URI path to get the next page of results if not all -// results could be returned at once. selectParameter is by default all `meta` -// and `appInfo` properties are returned, this property is used to restrict the -// output to the desired properties. It also excludes all devices from the -// output that have none of the selected properties. In other terms, only -// devices having at least one of the selected property being set is part of -// the results. Examples: - `$select=appInfo` : select all devices having at -// least 1 appInfo, return them all and don’t return any meta property. - -// `$select=meta` : return only meta properties in the output. - -// `$select=appInfo,meta/firstSeen,meta/lastSeen` : return all `appInfo`, plus -// meta object containing only firstSeen and lastSeen properties. The format is -// thus a comma separated list of properties to select. Use `appInfo` to select -// all appInfo properties, `meta` to select all meta properties. Use -// `appInfo/{key}` and `meta/{key}` to select specific appInfo and meta -// properties. filter is filter can be used to reduce the number of results. -// Filter is a boolean expression that can look like the following examples: * -// `$filter=deviceId gt 'abcdef0123456789abcdef0123456789'` * -// `$filter=lastModified le 1447284263690L` * `$filter=(deviceId ge -// 'abcdef0123456789abcdef0123456789') and (deviceId lt -// 'bacdef0123456789abcdef0123456789') and (lastModified gt 1447284263690L)` -// The first example is used automatically for paging when returning the -// `nextLink` property. The filter expression is a combination of checks on -// some properties that can be compared to their value. The available operators -// are: * `gt` : greater than * `ge` : greater than or equals * `lt` : less -// than * `le` : less than or equals * `and` : to add multiple checks (all -// checks must pass), optional parentheses can be used. The properties that can -// be used in the expression are the following: * `deviceId {operator} -// '{deviceIdValue}'` : a lexicographical comparison is made on the deviceId -// value, use single quotes for the value. * `lastModified {operator} -// {number}L` : returns only meta properties or appInfo properties whose last -// value modification timestamp compared to the specified value is matching -// (value is milliseconds since January 1st, 1970 UTC). Please note the `L` -// character after the number of milliseconds, its required when the number of -// milliseconds exceeds `2^31 - 1` (which is always the case for recent -// timestamps). Using `lastModified` excludes all devices from the output that -// have no property matching the timestamp criteria, like `$select`. Please -// note that the internal value of `lastModified` timestamp for a given +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. top is number of devices to return with each call. Defaults to 100 and cannot return more. Passing a +// greater value is ignored. The response contains a `nextLink` property describing the URI path to get the next page +// of results if not all results could be returned at once. selectParameter is by default all `meta` and `appInfo` +// properties are returned, this property is used to restrict the output to the desired properties. It also excludes +// all devices from the output that have none of the selected properties. In other terms, only devices having at least +// one of the selected property being set is part of the results. Examples: - `$select=appInfo` : select all devices +// having at least 1 appInfo, return them all and don’t return any meta property. - `$select=meta` : return only meta +// properties in the output. - `$select=appInfo,meta/firstSeen,meta/lastSeen` : return all `appInfo`, plus meta object +// containing only firstSeen and lastSeen properties. The format is thus a comma separated list of properties to +// select. Use `appInfo` to select all appInfo properties, `meta` to select all meta properties. Use `appInfo/{key}` +// and `meta/{key}` to select specific appInfo and meta properties. filter is filter can be used to reduce the number +// of results. Filter is a boolean expression that can look like the following examples: * `$filter=deviceId gt +// 'abcdef0123456789abcdef0123456789'` * `$filter=lastModified le 1447284263690L` * `$filter=(deviceId ge +// 'abcdef0123456789abcdef0123456789') and (deviceId lt 'bacdef0123456789abcdef0123456789') and (lastModified gt +// 1447284263690L)` The first example is used automatically for paging when returning the `nextLink` property. The +// filter expression is a combination of checks on some properties that can be compared to their value. The available +// operators are: * `gt` : greater than * `ge` : greater than or equals * `lt` : less than * `le` : less than or +// equals * `and` : to add multiple checks (all checks must pass), optional parentheses can be used. The properties +// that can be used in the expression are the following: * `deviceId {operator} '{deviceIdValue}'` : a lexicographical +// comparison is made on the deviceId value, use single quotes for the value. * `lastModified {operator} {number}L` : +// returns only meta properties or appInfo properties whose last value modification timestamp compared to the specified +// value is matching (value is milliseconds since January 1st, 1970 UTC). Please note the `L` character after the +// number of milliseconds, its required when the number of milliseconds exceeds `2^31 - 1` (which is always the case +// for recent timestamps). Using `lastModified` excludes all devices from the output that have no property matching the +// timestamp criteria, like `$select`. Please note that the internal value of `lastModified` timestamp for a given // property is never part of the results. func (client DevicesClient) List(resourceGroupName string, appCollection string, appName string, top *int32, selectParameter string, filter string) (result DevicesQueryResult, err error) { req, err := client.ListPreparer(resourceGroupName, appCollection, appName, top, selectParameter, filter) @@ -320,13 +300,57 @@ func (client DevicesClient) ListNextResults(lastResults DevicesQueryResult) (res return } -// TagByDeviceID update the tags registered for a set of devices running an -// application. Updates are performed asynchronously, meaning that a few -// seconds are needed before the modifications appear in the results of the Get +// ListComplete gets all elements from the list without paging. +func (client DevicesClient) ListComplete(resourceGroupName string, appCollection string, appName string, top *int32, selectParameter string, filter string, cancel <-chan struct{}) (<-chan DeviceQueryResult, <-chan error) { + resultChan := make(chan DeviceQueryResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, appCollection, appName, top, selectParameter, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// TagByDeviceID update the tags registered for a set of devices running an application. Updates are performed +// asynchronously, meaning that a few seconds are needed before the modifications appear in the results of the Get // device command. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client DevicesClient) TagByDeviceID(resourceGroupName string, appCollection string, appName string, parameters DeviceTagsParameters) (result DeviceTagsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -398,13 +422,12 @@ func (client DevicesClient) TagByDeviceIDResponder(resp *http.Response) (result return } -// TagByUserID update the tags registered for a set of users running an -// application. Updates are performed asynchronously, meaning that a few -// seconds are needed before the modifications appear in the results of the Get +// TagByUserID update the tags registered for a set of users running an application. Updates are performed +// asynchronously, meaning that a few seconds are needed before the modifications appear in the results of the Get // device command. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client DevicesClient) TagByUserID(resourceGroupName string, appCollection string, appName string, parameters DeviceTagsParameters) (result DeviceTagsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/exporttasks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/exporttasks.go index 8b7ab443d..f83ea7b6b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/exporttasks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/exporttasks.go @@ -14,9 +14,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,16 +34,15 @@ func NewExportTasksClient(subscriptionID string) ExportTasksClient { return NewExportTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExportTasksClientWithBaseURI creates an instance of the ExportTasksClient -// client. +// NewExportTasksClientWithBaseURI creates an instance of the ExportTasksClient client. func NewExportTasksClientWithBaseURI(baseURI string, subscriptionID string) ExportTasksClient { return ExportTasksClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateActivitiesTask creates a task to export activities. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateActivitiesTask(resourceGroupName string, appCollection string, appName string, parameters DateRangeExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -120,8 +118,8 @@ func (client ExportTasksClient) CreateActivitiesTaskResponder(resp *http.Respons // CreateCrashesTask creates a task to export crashes. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateCrashesTask(resourceGroupName string, appCollection string, appName string, parameters DateRangeExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -197,8 +195,8 @@ func (client ExportTasksClient) CreateCrashesTaskResponder(resp *http.Response) // CreateErrorsTask creates a task to export errors. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateErrorsTask(resourceGroupName string, appCollection string, appName string, parameters DateRangeExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -274,8 +272,8 @@ func (client ExportTasksClient) CreateErrorsTaskResponder(resp *http.Response) ( // CreateEventsTask creates a task to export events. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateEventsTask(resourceGroupName string, appCollection string, appName string, parameters DateRangeExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -349,11 +347,10 @@ func (client ExportTasksClient) CreateEventsTaskResponder(resp *http.Response) ( return } -// CreateFeedbackTaskByCampaign creates a task to export push campaign data for -// a set of campaigns. +// CreateFeedbackTaskByCampaign creates a task to export push campaign data for a set of campaigns. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateFeedbackTaskByCampaign(resourceGroupName string, appCollection string, appName string, parameters FeedbackByCampaignParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -427,11 +424,10 @@ func (client ExportTasksClient) CreateFeedbackTaskByCampaignResponder(resp *http return } -// CreateFeedbackTaskByDateRange creates a task to export push campaign data -// for a date range. +// CreateFeedbackTaskByDateRange creates a task to export push campaign data for a date range. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateFeedbackTaskByDateRange(resourceGroupName string, appCollection string, appName string, parameters FeedbackByDateRangeParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -507,8 +503,8 @@ func (client ExportTasksClient) CreateFeedbackTaskByDateRangeResponder(resp *htt // CreateJobsTask creates a task to export jobs. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateJobsTask(resourceGroupName string, appCollection string, appName string, parameters DateRangeExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -584,8 +580,8 @@ func (client ExportTasksClient) CreateJobsTaskResponder(resp *http.Response) (re // CreateSessionsTask creates a task to export sessions. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateSessionsTask(resourceGroupName string, appCollection string, appName string, parameters DateRangeExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -661,8 +657,8 @@ func (client ExportTasksClient) CreateSessionsTaskResponder(resp *http.Response) // CreateTagsTask creates a task to export tags. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateTagsTask(resourceGroupName string, appCollection string, appName string, parameters ExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -736,8 +732,8 @@ func (client ExportTasksClient) CreateTagsTaskResponder(resp *http.Response) (re // CreateTokensTask creates a task to export tags. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ExportTasksClient) CreateTokensTask(resourceGroupName string, appCollection string, appName string, parameters ExportTaskParameter) (result ExportTaskResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -811,9 +807,8 @@ func (client ExportTasksClient) CreateTokensTaskResponder(resp *http.Response) ( // Get retrieves information about a previously created export task. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. ID is export -// task identifier. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. ID is export task identifier. func (client ExportTasksClient) Get(resourceGroupName string, appCollection string, appName string, ID string) (result ExportTaskResult, err error) { req, err := client.GetPreparer(resourceGroupName, appCollection, appName, ID) if err != nil { @@ -880,22 +875,16 @@ func (client ExportTasksClient) GetResponder(resp *http.Response) (result Export // List get the list of export tasks. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. skip is -// control paging of export tasks, start results at the given offset, defaults -// to 0 (1st page of data). top is control paging of export tasks, number of -// export tasks to return with each call. By default, it returns all export -// tasks with a default paging of 20. -// The response contains a `nextLink` property describing the path to get the -// next page if there are more results. -// The maximum paging limit for $top is 40. orderby is sort results by an -// expression which looks like `$orderby=taskId asc` (default when not -// specified). +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. skip is control paging of export tasks, start results at the given offset, defaults to 0 (1st page of +// data). top is control paging of export tasks, number of export tasks to return with each call. By default, it +// returns all export tasks with a default paging of 20. +// The response contains a `nextLink` property describing the path to get the next page if there are more results. +// The maximum paging limit for $top is 40. orderby is sort results by an expression which looks like `$orderby=taskId +// asc` (default when not specified). // The syntax is orderby={property} {direction} or just orderby={property}. -// Properties that can be specified for sorting: taskId, errorDetails, -// dateCreated, taskStatus, and dateCreated. -// The available directions are asc (for ascending order) and desc (for -// descending order). +// Properties that can be specified for sorting: taskId, errorDetails, dateCreated, taskStatus, and dateCreated. +// The available directions are asc (for ascending order) and desc (for descending order). // When not specified the asc direction is used. // Only one orderby property can be specified. func (client ExportTasksClient) List(resourceGroupName string, appCollection string, appName string, skip *int32, top *int32, orderby string) (result ExportTaskListResult, err error) { @@ -1005,3 +994,48 @@ func (client ExportTasksClient) ListNextResults(lastResults ExportTaskListResult return } + +// ListComplete gets all elements from the list without paging. +func (client ExportTasksClient) ListComplete(resourceGroupName string, appCollection string, appName string, skip *int32, top *int32, orderby string, cancel <-chan struct{}) (<-chan ExportTaskResult, <-chan error) { + resultChan := make(chan ExportTaskResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, appCollection, appName, skip, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/importtasks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/importtasks.go index 2fae682c8..983e4655c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/importtasks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/importtasks.go @@ -14,9 +14,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,16 +34,15 @@ func NewImportTasksClient(subscriptionID string) ImportTasksClient { return NewImportTasksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewImportTasksClientWithBaseURI creates an instance of the ImportTasksClient -// client. +// NewImportTasksClientWithBaseURI creates an instance of the ImportTasksClient client. func NewImportTasksClientWithBaseURI(baseURI string, subscriptionID string) ImportTasksClient { return ImportTasksClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates a job to import the specified data to a storageUrl. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. func (client ImportTasksClient) Create(resourceGroupName string, appCollection string, appName string, parameters ImportTask) (result ImportTaskResult, err error) { req, err := client.CreatePreparer(resourceGroupName, appCollection, appName, parameters) if err != nil { @@ -110,12 +108,10 @@ func (client ImportTasksClient) CreateResponder(resp *http.Response) (result Imp return } -// Get the Get import job operation retrieves information about a previously -// created import job. +// Get the Get import job operation retrieves information about a previously created import job. // -// ID is import job identifier. resourceGroupName is the name of the resource -// group. appCollection is application collection. appName is application -// resource name. +// ID is import job identifier. resourceGroupName is the name of the resource group. appCollection is application +// collection. appName is application resource name. func (client ImportTasksClient) Get(ID string, resourceGroupName string, appCollection string, appName string) (result ImportTaskResult, err error) { req, err := client.GetPreparer(ID, resourceGroupName, appCollection, appName) if err != nil { @@ -182,22 +178,16 @@ func (client ImportTasksClient) GetResponder(resp *http.Response) (result Import // List get the list of import jobs. // -// resourceGroupName is the name of the resource group. appCollection is -// application collection. appName is application resource name. skip is -// control paging of import jobs, start results at the given offset, defaults -// to 0 (1st page of data). top is control paging of import jobs, number of -// import jobs to return with each call. By default, it returns all import jobs -// with a default paging of 20. -// The response contains a `nextLink` property describing the path to get the -// next page if there are more results. -// The maximum paging limit for $top is 40. orderby is sort results by an -// expression which looks like `$orderby=jobId asc` (default when not -// specified). +// resourceGroupName is the name of the resource group. appCollection is application collection. appName is application +// resource name. skip is control paging of import jobs, start results at the given offset, defaults to 0 (1st page of +// data). top is control paging of import jobs, number of import jobs to return with each call. By default, it returns +// all import jobs with a default paging of 20. +// The response contains a `nextLink` property describing the path to get the next page if there are more results. +// The maximum paging limit for $top is 40. orderby is sort results by an expression which looks like `$orderby=jobId +// asc` (default when not specified). // The syntax is orderby={property} {direction} or just orderby={property}. -// Properties that can be specified for sorting: jobId, errorDetails, -// dateCreated, jobStatus, and dateCreated. -// The available directions are asc (for ascending order) and desc (for -// descending order). +// Properties that can be specified for sorting: jobId, errorDetails, dateCreated, jobStatus, and dateCreated. +// The available directions are asc (for ascending order) and desc (for descending order). // When not specified the asc direction is used. // Only one orderby property can be specified. func (client ImportTasksClient) List(resourceGroupName string, appCollection string, appName string, skip *int32, top *int32, orderby string) (result ImportTaskListResult, err error) { @@ -307,3 +297,48 @@ func (client ImportTasksClient) ListNextResults(lastResults ImportTaskListResult return } + +// ListComplete gets all elements from the list without paging. +func (client ImportTasksClient) ListComplete(resourceGroupName string, appCollection string, appName string, skip *int32, top *int32, orderby string, cancel <-chan struct{}) (<-chan ImportTaskResult, <-chan error) { + resultChan := make(chan ImportTaskResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, appCollection, appName, skip, top, orderby) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/models.go index 92b9ad725..1e3c177e7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/models.go @@ -14,11 +14,12 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" @@ -139,17 +140,13 @@ const ( type ExportState string const ( - // ExportStateFailed specifies the export state failed state for export - // state. + // ExportStateFailed specifies the export state failed state for export state. ExportStateFailed ExportState = "Failed" - // ExportStateQueued specifies the export state queued state for export - // state. + // ExportStateQueued specifies the export state queued state for export state. ExportStateQueued ExportState = "Queued" - // ExportStateStarted specifies the export state started state for export - // state. + // ExportStateStarted specifies the export state started state for export state. ExportStateStarted ExportState = "Started" - // ExportStateSucceeded specifies the export state succeeded state for - // export state. + // ExportStateSucceeded specifies the export state succeeded state for export state. ExportStateSucceeded ExportState = "Succeeded" ) @@ -157,8 +154,7 @@ const ( type ExportType string const ( - // ExportTypeActivity specifies the export type activity state for export - // type. + // ExportTypeActivity specifies the export type activity state for export type. ExportTypeActivity ExportType = "Activity" // ExportTypeCrash specifies the export type crash state for export type. ExportTypeCrash ExportType = "Crash" @@ -170,8 +166,7 @@ const ( ExportTypeJob ExportType = "Job" // ExportTypePush specifies the export type push state for export type. ExportTypePush ExportType = "Push" - // ExportTypeSession specifies the export type session state for export - // type. + // ExportTypeSession specifies the export type session state for export type. ExportTypeSession ExportType = "Session" // ExportTypeTag specifies the export type tag state for export type. ExportTypeTag ExportType = "Tag" @@ -189,8 +184,7 @@ const ( JobStatesQueued JobStates = "Queued" // JobStatesStarted specifies the job states started state for job states. JobStatesStarted JobStates = "Started" - // JobStatesSucceeded specifies the job states succeeded state for job - // states. + // JobStatesSucceeded specifies the job states succeeded state for job states. JobStatesSucceeded JobStates = "Succeeded" ) @@ -226,13 +220,192 @@ const ( RealTime PushModes = "real-time" ) -// AnnouncementFeedbackCriterion is used to target devices who received an -// announcement. +// Type enumerates the values for type. +type Type string + +const ( + // TypeAnnouncementFeedback specifies the type announcement feedback state for type. + TypeAnnouncementFeedback Type = "announcement-feedback" + // TypeApplicationVersion specifies the type application version state for type. + TypeApplicationVersion Type = "application-version" + // TypeBooleanTag specifies the type boolean tag state for type. + TypeBooleanTag Type = "boolean-tag" + // TypeCarrierCountry specifies the type carrier country state for type. + TypeCarrierCountry Type = "carrier-country" + // TypeCarrierName specifies the type carrier name state for type. + TypeCarrierName Type = "carrier-name" + // TypeDatapushFeedback specifies the type datapush feedback state for type. + TypeDatapushFeedback Type = "datapush-feedback" + // TypeDateTag specifies the type date tag state for type. + TypeDateTag Type = "date-tag" + // TypeDeviceManufacturer specifies the type device manufacturer state for type. + TypeDeviceManufacturer Type = "device-manufacturer" + // TypeDeviceModel specifies the type device model state for type. + TypeDeviceModel Type = "device-model" + // TypeFirmwareVersion specifies the type firmware version state for type. + TypeFirmwareVersion Type = "firmware-version" + // TypeGeoFencing specifies the type geo fencing state for type. + TypeGeoFencing Type = "geo-fencing" + // TypeIntegerTag specifies the type integer tag state for type. + TypeIntegerTag Type = "integer-tag" + // TypeLanguage specifies the type language state for type. + TypeLanguage Type = "language" + // TypeLocation specifies the type location state for type. + TypeLocation Type = "location" + // TypeNetworkType specifies the type network type state for type. + TypeNetworkType Type = "network-type" + // TypePollAnswerFeedback specifies the type poll answer feedback state for type. + TypePollAnswerFeedback Type = "poll-answer-feedback" + // TypePollFeedback specifies the type poll feedback state for type. + TypePollFeedback Type = "poll-feedback" + // TypeScreenSize specifies the type screen size state for type. + TypeScreenSize Type = "screen-size" + // TypeSegment specifies the type segment state for type. + TypeSegment Type = "segment" + // TypeStringTag specifies the type string tag state for type. + TypeStringTag Type = "string-tag" +) + +// TypeFilter enumerates the values for type filter. +type TypeFilter string + +const ( + // TypeAppInfo specifies the type app info state for type filter. + TypeAppInfo TypeFilter = "app-info" + // TypeEngageActiveUsers specifies the type engage active users state for type filter. + TypeEngageActiveUsers TypeFilter = "engage-active-users" + // TypeEngageIdleUsers specifies the type engage idle users state for type filter. + TypeEngageIdleUsers TypeFilter = "engage-idle-users" + // TypeEngageNewUsers specifies the type engage new users state for type filter. + TypeEngageNewUsers TypeFilter = "engage-new-users" + // TypeEngageOldUsers specifies the type engage old users state for type filter. + TypeEngageOldUsers TypeFilter = "engage-old-users" + // TypeEngageSubset specifies the type engage subset state for type filter. + TypeEngageSubset TypeFilter = "engage-subset" + // TypeNativePushEnabled specifies the type native push enabled state for type filter. + TypeNativePushEnabled TypeFilter = "native-push-enabled" + // TypePushQuota specifies the type push quota state for type filter. + TypePushQuota TypeFilter = "push-quota" +) + +// AnnouncementFeedbackCriterion is used to target devices who received an announcement. type AnnouncementFeedbackCriterion struct { + Type Type `json:"type,omitempty"` ContentID *int32 `json:"content-id,omitempty"` Action CampaignFeedbacks `json:"action,omitempty"` } +// MarshalJSON is the custom marshaler for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) MarshalJSON() ([]byte, error) { + afc.Type = TypeAnnouncementFeedback + type Alias AnnouncementFeedbackCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(afc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return &afc, true +} + +// AsPollFeedbackCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for AnnouncementFeedbackCriterion. +func (afc AnnouncementFeedbackCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // APIError is type APIError struct { Error *APIErrorError `json:"error,omitempty"` @@ -296,20 +469,182 @@ type AppCollectionProperties struct { ProvisioningState ProvisioningStates `json:"provisioningState,omitempty"` } -// AppInfoFilter is send only to users who have some app info set. This is a -// special filter that is automatically added if your campaign contains appInfo -// parameters. It is not intended to be public and should not be used as it -// could be removed or replaced by the API. +// AppInfoFilter is send only to users who have some app info set. This is a special filter that is automatically added +// if your campaign contains appInfo parameters. It is not intended to be public and should not be used as it could be +// removed or replaced by the API. type AppInfoFilter struct { - AppInfo *[]string `json:"appInfo,omitempty"` + Type TypeFilter `json:"type,omitempty"` + AppInfo *[]string `json:"appInfo,omitempty"` } -// ApplicationVersionCriterion is used to target devices based on the version -// of the application they are using. +// MarshalJSON is the custom marshaler for AppInfoFilter. +func (aif AppInfoFilter) MarshalJSON() ([]byte, error) { + aif.Type = TypeAppInfo + type Alias AppInfoFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aif), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return nil, false +} + +// AsEngageOldUsersFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return nil, false +} + +// AsEngageNewUsersFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return nil, false +} + +// AsEngageActiveUsersFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return nil, false +} + +// AsEngageIdleUsersFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return nil, false +} + +// AsNativePushEnabledFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return nil, false +} + +// AsPushQuotaFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return nil, false +} + +// AsAppInfoFilter is the Filter implementation for AppInfoFilter. +func (aif AppInfoFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return &aif, true +} + +// ApplicationVersionCriterion is used to target devices based on the version of the application they are using. type ApplicationVersionCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) MarshalJSON() ([]byte, error) { + avc.Type = TypeApplicationVersion + type Alias ApplicationVersionCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(avc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return &avc, true +} + +// AsNetworkTypeCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for ApplicationVersionCriterion. +func (avc ApplicationVersionCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // AppListResult is the list Apps operation response. type AppListResult struct { autorest.Response `json:"-"` @@ -338,10 +673,122 @@ type AppProperties struct { // BooleanTagCriterion is target devices based on a boolean tag value. type BooleanTagCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` Value *bool `json:"value,omitempty"` } +// MarshalJSON is the custom marshaler for BooleanTagCriterion. +func (btc BooleanTagCriterion) MarshalJSON() ([]byte, error) { + btc.Type = TypeBooleanTag + type Alias BooleanTagCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(btc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for BooleanTagCriterion. +func (btc BooleanTagCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return &btc, true +} + // Campaign is type Campaign struct { NotificationTitle *string `json:"notificationTitle,omitempty"` @@ -374,18 +821,57 @@ type Campaign struct { Questions *[]PollQuestion `json:"questions,omitempty"` } -// CampaignAudience is specify which users will be targeted by this campaign. -// By default, all users will be targeted. If you set `pushMode` property to -// `manual`, the only thing you can specify in the audience is the push quota -// filter. An audience is a boolean expression made of criteria (variables) -// operators (`not`, `and` or `or`) and parenthesis. Additionally, a set of -// filters can be added to an audience. 65535 bytes max as per JSON encoding. +// CampaignAudience is specify which users will be targeted by this campaign. By default, all users will be targeted. +// If you set `pushMode` property to `manual`, the only thing you can specify in the audience is the push quota filter. +// An audience is a boolean expression made of criteria (variables) operators (`not`, `and` or `or`) and parenthesis. +// Additionally, a set of filters can be added to an audience. 65535 bytes max as per JSON encoding. type CampaignAudience struct { Expression *string `json:"expression,omitempty"` Criteria *map[string]*Criterion `json:"criteria,omitempty"` Filters *[]Filter `json:"filters,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for CampaignAudience struct. +func (c *CampaignAudience) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["expression"] + if v != nil { + var expression string + err = json.Unmarshal(*m["expression"], &expression) + if err != nil { + return err + } + c.Expression = &expression + } + + v = m["criteria"] + if v != nil { + var criteria map[string]*Criterion + err = json.Unmarshal(*m["criteria"], &criteria) + if err != nil { + return err + } + c.Criteria = &criteria + } + + v = m["filters"] + if v != nil { + filters, err := unmarshalFilterArray(*m["filters"]) + if err != nil { + return err + } + c.Filters = &filters + } + + return nil +} + // CampaignListResult is type CampaignListResult struct { State CampaignStates `json:"state,omitempty"` @@ -528,28 +1014,493 @@ type CampaignTestSavedParameters struct { Lang *string `json:"lang,omitempty"` } -// CarrierCountryCriterion is used to target devices based on their carrier -// country. +// CarrierCountryCriterion is used to target devices based on their carrier country. type CarrierCountryCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) MarshalJSON() ([]byte, error) { + ccc.Type = TypeCarrierCountry + type Alias CarrierCountryCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ccc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return &ccc, true +} + +// AsFirmwareVersionCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for CarrierCountryCriterion. +func (ccc CarrierCountryCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // CarrierNameCriterion is used to target devices based on their carrier name. type CarrierNameCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } -// Criterion is -type Criterion struct { +// MarshalJSON is the custom marshaler for CarrierNameCriterion. +func (cnc CarrierNameCriterion) MarshalJSON() ([]byte, error) { + cnc.Type = TypeCarrierName + type Alias CarrierNameCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(cnc), + }) } -// DatapushFeedbackCriterion is used to target devices who received a data -// push. +// AsCarrierNameCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return &cnc, true +} + +// AsCarrierCountryCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for CarrierNameCriterion. +func (cnc CarrierNameCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + +// Criterion is +type Criterion interface { + AsCarrierNameCriterion() (*CarrierNameCriterion, bool) + AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) + AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) + AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) + AsDeviceModelCriterion() (*DeviceModelCriterion, bool) + AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) + AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) + AsLanguageCriterion() (*LanguageCriterion, bool) + AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) + AsLocationCriterion() (*LocationCriterion, bool) + AsGeoFencingCriterion() (*GeoFencingCriterion, bool) + AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) + AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) + AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) + AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) + AsSegmentCriterion() (*SegmentCriterion, bool) + AsStringTagCriterion() (*StringTagCriterion, bool) + AsDateTagCriterion() (*DateTagCriterion, bool) + AsIntegerTagCriterion() (*IntegerTagCriterion, bool) + AsBooleanTagCriterion() (*BooleanTagCriterion, bool) +} + +func unmarshalCriterion(body []byte) (Criterion, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeCarrierName): + var cnc CarrierNameCriterion + err := json.Unmarshal(body, &cnc) + return cnc, err + case string(TypeCarrierCountry): + var ccc CarrierCountryCriterion + err := json.Unmarshal(body, &ccc) + return ccc, err + case string(TypeFirmwareVersion): + var fvc FirmwareVersionCriterion + err := json.Unmarshal(body, &fvc) + return fvc, err + case string(TypeDeviceManufacturer): + var dmc DeviceManufacturerCriterion + err := json.Unmarshal(body, &dmc) + return dmc, err + case string(TypeDeviceModel): + var dmc DeviceModelCriterion + err := json.Unmarshal(body, &dmc) + return dmc, err + case string(TypeApplicationVersion): + var avc ApplicationVersionCriterion + err := json.Unmarshal(body, &avc) + return avc, err + case string(TypeNetworkType): + var ntc NetworkTypeCriterion + err := json.Unmarshal(body, &ntc) + return ntc, err + case string(TypeLanguage): + var lc LanguageCriterion + err := json.Unmarshal(body, &lc) + return lc, err + case string(TypeScreenSize): + var ssc ScreenSizeCriterion + err := json.Unmarshal(body, &ssc) + return ssc, err + case string(TypeLocation): + var lc LocationCriterion + err := json.Unmarshal(body, &lc) + return lc, err + case string(TypeGeoFencing): + var gfc GeoFencingCriterion + err := json.Unmarshal(body, &gfc) + return gfc, err + case string(TypeAnnouncementFeedback): + var afc AnnouncementFeedbackCriterion + err := json.Unmarshal(body, &afc) + return afc, err + case string(TypePollFeedback): + var pfc PollFeedbackCriterion + err := json.Unmarshal(body, &pfc) + return pfc, err + case string(TypePollAnswerFeedback): + var pafc PollAnswerFeedbackCriterion + err := json.Unmarshal(body, &pafc) + return pafc, err + case string(TypeDatapushFeedback): + var dfc DatapushFeedbackCriterion + err := json.Unmarshal(body, &dfc) + return dfc, err + case string(TypeSegment): + var sc SegmentCriterion + err := json.Unmarshal(body, &sc) + return sc, err + case string(TypeStringTag): + var stc StringTagCriterion + err := json.Unmarshal(body, &stc) + return stc, err + case string(TypeDateTag): + var dtc DateTagCriterion + err := json.Unmarshal(body, &dtc) + return dtc, err + case string(TypeIntegerTag): + var itc IntegerTagCriterion + err := json.Unmarshal(body, &itc) + return itc, err + case string(TypeBooleanTag): + var btc BooleanTagCriterion + err := json.Unmarshal(body, &btc) + return btc, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalCriterionArray(body []byte) ([]Criterion, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + cArray := make([]Criterion, len(rawMessages)) + + for index, rawMessage := range rawMessages { + c, err := unmarshalCriterion(*rawMessage) + if err != nil { + return nil, err + } + cArray[index] = c + } + return cArray, nil +} + +// DatapushFeedbackCriterion is used to target devices who received a data push. type DatapushFeedbackCriterion struct { + Type Type `json:"type,omitempty"` ContentID *int32 `json:"content-id,omitempty"` Action CampaignFeedbacks `json:"action,omitempty"` } +// MarshalJSON is the custom marshaler for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) MarshalJSON() ([]byte, error) { + dfc.Type = TypeDatapushFeedback + type Alias DatapushFeedbackCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dfc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return &dfc, true +} + +// AsSegmentCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for DatapushFeedbackCriterion. +func (dfc DatapushFeedbackCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // DateRangeExportTaskParameter is type DateRangeExportTaskParameter struct { ContainerURL *string `json:"containerUrl,omitempty"` @@ -561,11 +1512,123 @@ type DateRangeExportTaskParameter struct { // DateTagCriterion is target devices based on a date tag value. type DateTagCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` Value *date.Date `json:"value,omitempty"` Op AudienceOperators `json:"op,omitempty"` } +// MarshalJSON is the custom marshaler for DateTagCriterion. +func (dtc DateTagCriterion) MarshalJSON() ([]byte, error) { + dtc.Type = TypeDateTag + type Alias DateTagCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dtc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return &dtc, true +} + +// AsIntegerTagCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for DateTagCriterion. +func (dtc DateTagCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // Device is type Device struct { autorest.Response `json:"-"` @@ -601,12 +1664,123 @@ type DeviceLocation struct { Locality *string `json:"locality,omitempty"` } -// DeviceManufacturerCriterion is used to target devices based on the device -// manufacturer. +// DeviceManufacturerCriterion is used to target devices based on the device manufacturer. type DeviceManufacturerCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) MarshalJSON() ([]byte, error) { + dmc.Type = TypeDeviceManufacturer + type Alias DeviceManufacturerCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dmc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return &dmc, true +} + +// AsDeviceModelCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for DeviceManufacturerCriterion. +func (dmc DeviceManufacturerCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // DeviceMeta is type DeviceMeta struct { FirstSeen *int64 `json:"firstSeen,omitempty"` @@ -618,9 +1792,121 @@ type DeviceMeta struct { // DeviceModelCriterion is used to target devices based on the device model. type DeviceModelCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for DeviceModelCriterion. +func (dmc DeviceModelCriterion) MarshalJSON() ([]byte, error) { + dmc.Type = TypeDeviceModel + type Alias DeviceModelCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dmc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return &dmc, true +} + +// AsApplicationVersionCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for DeviceModelCriterion. +func (dmc DeviceModelCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // DeviceQueryResult is type DeviceQueryResult struct { DeviceID *string `json:"deviceId,omitempty"` @@ -659,33 +1945,289 @@ type DeviceTagsResult struct { InvalidIds *[]string `json:"invalidIds,omitempty"` } -// EngageActiveUsersFilter is send only to users who have used the app in the -// last {threshold} days. +// EngageActiveUsersFilter is send only to users who have used the app in the last {threshold} days. type EngageActiveUsersFilter struct { - Threshold *int32 `json:"threshold,omitempty"` + Type TypeFilter `json:"type,omitempty"` + Threshold *int32 `json:"threshold,omitempty"` } -// EngageIdleUsersFilter is send only to users who haven't used the app in the -// last {threshold} days. +// MarshalJSON is the custom marshaler for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) MarshalJSON() ([]byte, error) { + eauf.Type = TypeEngageActiveUsers + type Alias EngageActiveUsersFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(eauf), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return nil, false +} + +// AsEngageOldUsersFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return nil, false +} + +// AsEngageNewUsersFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return nil, false +} + +// AsEngageActiveUsersFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return &eauf, true +} + +// AsEngageIdleUsersFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return nil, false +} + +// AsNativePushEnabledFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return nil, false +} + +// AsPushQuotaFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return nil, false +} + +// AsAppInfoFilter is the Filter implementation for EngageActiveUsersFilter. +func (eauf EngageActiveUsersFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return nil, false +} + +// EngageIdleUsersFilter is send only to users who haven't used the app in the last {threshold} days. type EngageIdleUsersFilter struct { - Threshold *int32 `json:"threshold,omitempty"` + Type TypeFilter `json:"type,omitempty"` + Threshold *int32 `json:"threshold,omitempty"` } -// EngageNewUsersFilter is send only to users whose first app use is less than -// {threshold} days old. +// MarshalJSON is the custom marshaler for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) MarshalJSON() ([]byte, error) { + eiuf.Type = TypeEngageIdleUsers + type Alias EngageIdleUsersFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(eiuf), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return nil, false +} + +// AsEngageOldUsersFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return nil, false +} + +// AsEngageNewUsersFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return nil, false +} + +// AsEngageActiveUsersFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return nil, false +} + +// AsEngageIdleUsersFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return &eiuf, true +} + +// AsNativePushEnabledFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return nil, false +} + +// AsPushQuotaFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return nil, false +} + +// AsAppInfoFilter is the Filter implementation for EngageIdleUsersFilter. +func (eiuf EngageIdleUsersFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return nil, false +} + +// EngageNewUsersFilter is send only to users whose first app use is less than {threshold} days old. type EngageNewUsersFilter struct { - Threshold *int32 `json:"threshold,omitempty"` + Type TypeFilter `json:"type,omitempty"` + Threshold *int32 `json:"threshold,omitempty"` } -// EngageOldUsersFilter is send only to users whose first app use is more than -// {threshold} days old. +// MarshalJSON is the custom marshaler for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) MarshalJSON() ([]byte, error) { + enuf.Type = TypeEngageNewUsers + type Alias EngageNewUsersFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(enuf), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return nil, false +} + +// AsEngageOldUsersFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return nil, false +} + +// AsEngageNewUsersFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return &enuf, true +} + +// AsEngageActiveUsersFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return nil, false +} + +// AsEngageIdleUsersFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return nil, false +} + +// AsNativePushEnabledFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return nil, false +} + +// AsPushQuotaFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return nil, false +} + +// AsAppInfoFilter is the Filter implementation for EngageNewUsersFilter. +func (enuf EngageNewUsersFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return nil, false +} + +// EngageOldUsersFilter is send only to users whose first app use is more than {threshold} days old. type EngageOldUsersFilter struct { - Threshold *int32 `json:"threshold,omitempty"` + Type TypeFilter `json:"type,omitempty"` + Threshold *int32 `json:"threshold,omitempty"` +} + +// MarshalJSON is the custom marshaler for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) MarshalJSON() ([]byte, error) { + eouf.Type = TypeEngageOldUsers + type Alias EngageOldUsersFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(eouf), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return nil, false +} + +// AsEngageOldUsersFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return &eouf, true +} + +// AsEngageNewUsersFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return nil, false +} + +// AsEngageActiveUsersFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return nil, false +} + +// AsEngageIdleUsersFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return nil, false +} + +// AsNativePushEnabledFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return nil, false +} + +// AsPushQuotaFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return nil, false +} + +// AsAppInfoFilter is the Filter implementation for EngageOldUsersFilter. +func (eouf EngageOldUsersFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return nil, false } // EngageSubsetFilter is send only to a maximum of max users. type EngageSubsetFilter struct { - Max *int32 `json:"max,omitempty"` + Type TypeFilter `json:"type,omitempty"` + Max *int32 `json:"max,omitempty"` +} + +// MarshalJSON is the custom marshaler for EngageSubsetFilter. +func (esf EngageSubsetFilter) MarshalJSON() ([]byte, error) { + esf.Type = TypeEngageSubset + type Alias EngageSubsetFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(esf), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return &esf, true +} + +// AsEngageOldUsersFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return nil, false +} + +// AsEngageNewUsersFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return nil, false +} + +// AsEngageActiveUsersFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return nil, false +} + +// AsEngageIdleUsersFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return nil, false +} + +// AsNativePushEnabledFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return nil, false +} + +// AsPushQuotaFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return nil, false +} + +// AsAppInfoFilter is the Filter implementation for EngageSubsetFilter. +func (esf EngageSubsetFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return nil, false } // ExportOptions is options to control export generation. @@ -751,26 +2293,319 @@ type FeedbackByDateRangeParameter struct { } // Filter is -type Filter struct { +type Filter interface { + AsEngageSubsetFilter() (*EngageSubsetFilter, bool) + AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) + AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) + AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) + AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) + AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) + AsPushQuotaFilter() (*PushQuotaFilter, bool) + AsAppInfoFilter() (*AppInfoFilter, bool) } -// FirmwareVersionCriterion is used to target devices based on their firmware -// version. +func unmarshalFilter(body []byte) (Filter, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeEngageSubset): + var esf EngageSubsetFilter + err := json.Unmarshal(body, &esf) + return esf, err + case string(TypeEngageOldUsers): + var eouf EngageOldUsersFilter + err := json.Unmarshal(body, &eouf) + return eouf, err + case string(TypeEngageNewUsers): + var enuf EngageNewUsersFilter + err := json.Unmarshal(body, &enuf) + return enuf, err + case string(TypeEngageActiveUsers): + var eauf EngageActiveUsersFilter + err := json.Unmarshal(body, &eauf) + return eauf, err + case string(TypeEngageIdleUsers): + var eiuf EngageIdleUsersFilter + err := json.Unmarshal(body, &eiuf) + return eiuf, err + case string(TypeNativePushEnabled): + var npef NativePushEnabledFilter + err := json.Unmarshal(body, &npef) + return npef, err + case string(TypePushQuota): + var pqf PushQuotaFilter + err := json.Unmarshal(body, &pqf) + return pqf, err + case string(TypeAppInfo): + var aif AppInfoFilter + err := json.Unmarshal(body, &aif) + return aif, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFilterArray(body []byte) ([]Filter, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fArray := make([]Filter, len(rawMessages)) + + for index, rawMessage := range rawMessages { + f, err := unmarshalFilter(*rawMessage) + if err != nil { + return nil, err + } + fArray[index] = f + } + return fArray, nil +} + +// FirmwareVersionCriterion is used to target devices based on their firmware version. type FirmwareVersionCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } -// GeoFencingCriterion is used to target devices based on a specific region. A -// center point (defined by a latitude and longitude) and a radius form the -// boundary for the region. This criterion will be met when the user crosses -// the boundaries of the region. +// MarshalJSON is the custom marshaler for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) MarshalJSON() ([]byte, error) { + fvc.Type = TypeFirmwareVersion + type Alias FirmwareVersionCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(fvc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return &fvc, true +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for FirmwareVersionCriterion. +func (fvc FirmwareVersionCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + +// GeoFencingCriterion is used to target devices based on a specific region. A center point (defined by a latitude and +// longitude) and a radius form the boundary for the region. This criterion will be met when the user crosses the +// boundaries of the region. type GeoFencingCriterion struct { + Type Type `json:"type,omitempty"` Lat *float64 `json:"lat,omitempty"` Lon *float64 `json:"lon,omitempty"` Radius *int32 `json:"radius,omitempty"` Expiration *int32 `json:"expiration,omitempty"` } +// MarshalJSON is the custom marshaler for GeoFencingCriterion. +func (gfc GeoFencingCriterion) MarshalJSON() ([]byte, error) { + gfc.Type = TypeGeoFencing + type Alias GeoFencingCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(gfc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return &gfc, true +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for GeoFencingCriterion. +func (gfc GeoFencingCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // ImportTask is type ImportTask struct { StorageURL *string `json:"storageUrl,omitempty"` @@ -808,33 +2643,532 @@ type ImportTaskResult struct { // IntegerTagCriterion is target devices based on an integer tag value. type IntegerTagCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` Value *int32 `json:"value,omitempty"` Op AudienceOperators `json:"op,omitempty"` } -// LanguageCriterion is used to target devices based on the language of their -// device. +// MarshalJSON is the custom marshaler for IntegerTagCriterion. +func (itc IntegerTagCriterion) MarshalJSON() ([]byte, error) { + itc.Type = TypeIntegerTag + type Alias IntegerTagCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(itc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return &itc, true +} + +// AsBooleanTagCriterion is the Criterion implementation for IntegerTagCriterion. +func (itc IntegerTagCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + +// LanguageCriterion is used to target devices based on the language of their device. type LanguageCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for LanguageCriterion. +func (lc LanguageCriterion) MarshalJSON() ([]byte, error) { + lc.Type = TypeLanguage + type Alias LanguageCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(lc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return &lc, true +} + +// AsScreenSizeCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for LanguageCriterion. +func (lc LanguageCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // LocationCriterion is used to target devices based on their last know area. type LocationCriterion struct { + Type Type `json:"type,omitempty"` Country *string `json:"country,omitempty"` Region *string `json:"region,omitempty"` Locality *string `json:"locality,omitempty"` } +// MarshalJSON is the custom marshaler for LocationCriterion. +func (lc LocationCriterion) MarshalJSON() ([]byte, error) { + lc.Type = TypeLocation + type Alias LocationCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(lc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return &lc, true +} + +// AsGeoFencingCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for LocationCriterion. +func (lc LocationCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // NativePushEnabledFilter is engage only users with native push enabled. type NativePushEnabledFilter struct { + Type TypeFilter `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) MarshalJSON() ([]byte, error) { + npef.Type = TypeNativePushEnabled + type Alias NativePushEnabledFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(npef), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return nil, false +} + +// AsEngageOldUsersFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return nil, false +} + +// AsEngageNewUsersFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return nil, false +} + +// AsEngageActiveUsersFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return nil, false +} + +// AsEngageIdleUsersFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return nil, false +} + +// AsNativePushEnabledFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return &npef, true +} + +// AsPushQuotaFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return nil, false +} + +// AsAppInfoFilter is the Filter implementation for NativePushEnabledFilter. +func (npef NativePushEnabledFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return nil, false } // NetworkTypeCriterion is used to target devices based their network type. type NetworkTypeCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) MarshalJSON() ([]byte, error) { + ntc.Type = TypeNetworkType + type Alias NetworkTypeCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ntc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return &ntc, true +} + +// AsLanguageCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for NetworkTypeCriterion. +func (ntc NetworkTypeCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // NotificationOptions is type NotificationOptions struct { BigText *string `json:"bigText,omitempty"` @@ -843,19 +3177,242 @@ type NotificationOptions struct { ActionText *string `json:"actionText,omitempty"` } -// PollAnswerFeedbackCriterion is used to target devices who answered X to a -// given question. +// PollAnswerFeedbackCriterion is used to target devices who answered X to a given question. type PollAnswerFeedbackCriterion struct { + Type Type `json:"type,omitempty"` ContentID *int32 `json:"content-id,omitempty"` ChoiceID *int32 `json:"choice-id,omitempty"` } +// MarshalJSON is the custom marshaler for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) MarshalJSON() ([]byte, error) { + pafc.Type = TypePollAnswerFeedback + type Alias PollAnswerFeedbackCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(pafc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return &pafc, true +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for PollAnswerFeedbackCriterion. +func (pafc PollAnswerFeedbackCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // PollFeedbackCriterion is used to target devices who received a poll. type PollFeedbackCriterion struct { + Type Type `json:"type,omitempty"` ContentID *int32 `json:"content-id,omitempty"` Action CampaignFeedbacks `json:"action,omitempty"` } +// MarshalJSON is the custom marshaler for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) MarshalJSON() ([]byte, error) { + pfc.Type = TypePollFeedback + type Alias PollFeedbackCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(pfc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return &pfc, true +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for PollFeedbackCriterion. +func (pfc PollFeedbackCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // PollQuestion is type PollQuestion struct { Title *string `json:"title,omitempty"` @@ -884,6 +3441,58 @@ type PollQuestionLocalization struct { // PushQuotaFilter is engage only users for whom the push quota is not reached. type PushQuotaFilter struct { + Type TypeFilter `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for PushQuotaFilter. +func (pqf PushQuotaFilter) MarshalJSON() ([]byte, error) { + pqf.Type = TypePushQuota + type Alias PushQuotaFilter + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(pqf), + }) +} + +// AsEngageSubsetFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsEngageSubsetFilter() (*EngageSubsetFilter, bool) { + return nil, false +} + +// AsEngageOldUsersFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsEngageOldUsersFilter() (*EngageOldUsersFilter, bool) { + return nil, false +} + +// AsEngageNewUsersFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsEngageNewUsersFilter() (*EngageNewUsersFilter, bool) { + return nil, false +} + +// AsEngageActiveUsersFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsEngageActiveUsersFilter() (*EngageActiveUsersFilter, bool) { + return nil, false +} + +// AsEngageIdleUsersFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsEngageIdleUsersFilter() (*EngageIdleUsersFilter, bool) { + return nil, false +} + +// AsNativePushEnabledFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsNativePushEnabledFilter() (*NativePushEnabledFilter, bool) { + return nil, false +} + +// AsPushQuotaFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsPushQuotaFilter() (*PushQuotaFilter, bool) { + return &pqf, true +} + +// AsAppInfoFilter is the Filter implementation for PushQuotaFilter. +func (pqf PushQuotaFilter) AsAppInfoFilter() (*AppInfoFilter, bool) { + return nil, false } // Resource is @@ -895,24 +3504,359 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ScreenSizeCriterion is used to target devices based on the screen resolution -// of their device. +// ScreenSizeCriterion is used to target devices based on the screen resolution of their device. type ScreenSizeCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` } +// MarshalJSON is the custom marshaler for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) MarshalJSON() ([]byte, error) { + ssc.Type = TypeScreenSize + type Alias ScreenSizeCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ssc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return &ssc, true +} + +// AsLocationCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for ScreenSizeCriterion. +func (ssc ScreenSizeCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // SegmentCriterion is target devices based on an existing segment. type SegmentCriterion struct { + Type Type `json:"type,omitempty"` ID *int32 `json:"id,omitempty"` Exclude *bool `json:"exclude,omitempty"` } +// MarshalJSON is the custom marshaler for SegmentCriterion. +func (sc SegmentCriterion) MarshalJSON() ([]byte, error) { + sc.Type = TypeSegment + type Alias SegmentCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(sc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return &sc, true +} + +// AsStringTagCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return nil, false +} + +// AsDateTagCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for SegmentCriterion. +func (sc SegmentCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // StringTagCriterion is target devices based on a string tag value. type StringTagCriterion struct { + Type Type `json:"type,omitempty"` Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` } +// MarshalJSON is the custom marshaler for StringTagCriterion. +func (stc StringTagCriterion) MarshalJSON() ([]byte, error) { + stc.Type = TypeStringTag + type Alias StringTagCriterion + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(stc), + }) +} + +// AsCarrierNameCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsCarrierNameCriterion() (*CarrierNameCriterion, bool) { + return nil, false +} + +// AsCarrierCountryCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsCarrierCountryCriterion() (*CarrierCountryCriterion, bool) { + return nil, false +} + +// AsFirmwareVersionCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsFirmwareVersionCriterion() (*FirmwareVersionCriterion, bool) { + return nil, false +} + +// AsDeviceManufacturerCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsDeviceManufacturerCriterion() (*DeviceManufacturerCriterion, bool) { + return nil, false +} + +// AsDeviceModelCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsDeviceModelCriterion() (*DeviceModelCriterion, bool) { + return nil, false +} + +// AsApplicationVersionCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsApplicationVersionCriterion() (*ApplicationVersionCriterion, bool) { + return nil, false +} + +// AsNetworkTypeCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsNetworkTypeCriterion() (*NetworkTypeCriterion, bool) { + return nil, false +} + +// AsLanguageCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsLanguageCriterion() (*LanguageCriterion, bool) { + return nil, false +} + +// AsScreenSizeCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsScreenSizeCriterion() (*ScreenSizeCriterion, bool) { + return nil, false +} + +// AsLocationCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsLocationCriterion() (*LocationCriterion, bool) { + return nil, false +} + +// AsGeoFencingCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsGeoFencingCriterion() (*GeoFencingCriterion, bool) { + return nil, false +} + +// AsAnnouncementFeedbackCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsAnnouncementFeedbackCriterion() (*AnnouncementFeedbackCriterion, bool) { + return nil, false +} + +// AsPollFeedbackCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsPollFeedbackCriterion() (*PollFeedbackCriterion, bool) { + return nil, false +} + +// AsPollAnswerFeedbackCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsPollAnswerFeedbackCriterion() (*PollAnswerFeedbackCriterion, bool) { + return nil, false +} + +// AsDatapushFeedbackCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsDatapushFeedbackCriterion() (*DatapushFeedbackCriterion, bool) { + return nil, false +} + +// AsSegmentCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsSegmentCriterion() (*SegmentCriterion, bool) { + return nil, false +} + +// AsStringTagCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsStringTagCriterion() (*StringTagCriterion, bool) { + return &stc, true +} + +// AsDateTagCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsDateTagCriterion() (*DateTagCriterion, bool) { + return nil, false +} + +// AsIntegerTagCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsIntegerTagCriterion() (*IntegerTagCriterion, bool) { + return nil, false +} + +// AsBooleanTagCriterion is the Criterion implementation for StringTagCriterion. +func (stc StringTagCriterion) AsBooleanTagCriterion() (*BooleanTagCriterion, bool) { + return nil, false +} + // SupportedPlatformsListResult is type SupportedPlatformsListResult struct { autorest.Response `json:"-"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/supportedplatforms.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/supportedplatforms.go index f34b1e6e6..3072edd41 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/supportedplatforms.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/supportedplatforms.go @@ -14,9 +14,8 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,14 +28,12 @@ type SupportedPlatformsClient struct { ManagementClient } -// NewSupportedPlatformsClient creates an instance of the -// SupportedPlatformsClient client. +// NewSupportedPlatformsClient creates an instance of the SupportedPlatformsClient client. func NewSupportedPlatformsClient(subscriptionID string) SupportedPlatformsClient { return NewSupportedPlatformsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSupportedPlatformsClientWithBaseURI creates an instance of the -// SupportedPlatformsClient client. +// NewSupportedPlatformsClientWithBaseURI creates an instance of the SupportedPlatformsClient client. func NewSupportedPlatformsClientWithBaseURI(baseURI string, subscriptionID string) SupportedPlatformsClient { return SupportedPlatformsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go index 300e03145..5407b1650 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mobileengagement/version.go @@ -14,15 +14,15 @@ package mobileengagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-mobileengagement/2014-12-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-mobileengagement/2014-12-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/actiongroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/actiongroups.go new file mode 100644 index 000000000..9df12ff00 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/actiongroups.go @@ -0,0 +1,445 @@ +package monitor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ActionGroupsClient is the monitor Management Client +type ActionGroupsClient struct { + ManagementClient +} + +// NewActionGroupsClient creates an instance of the ActionGroupsClient client. +func NewActionGroupsClient(subscriptionID string) ActionGroupsClient { + return NewActionGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewActionGroupsClientWithBaseURI creates an instance of the ActionGroupsClient client. +func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) ActionGroupsClient { + return ActionGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create a new action group or update an existing one. +// +// resourceGroupName is the name of the resource group. actionGroupName is the name of the action group. actionGroup is +// the action group to create or use for the update. +func (client ActionGroupsClient) CreateOrUpdate(resourceGroupName string, actionGroupName string, actionGroup ActionGroupResource) (result ActionGroupResource, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: actionGroup, + Constraints: []validation.Constraint{{Target: "actionGroup.ActionGroup", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "actionGroup.ActionGroup.GroupShortName", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "actionGroup.ActionGroup.GroupShortName", Name: validation.MaxLength, Rule: 15, Chain: nil}}}, + {Target: "actionGroup.ActionGroup.Enabled", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "monitor.ActionGroupsClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, actionGroupName, actionGroup) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ActionGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, actionGroupName string, actionGroup ActionGroupResource) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionGroupName": autorest.Encode("path", actionGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}", pathParameters), + autorest.WithJSON(actionGroup), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ActionGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ActionGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ActionGroupResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an action group. +// +// resourceGroupName is the name of the resource group. actionGroupName is the name of the action group. +func (client ActionGroupsClient) Delete(resourceGroupName string, actionGroupName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceGroupName, actionGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ActionGroupsClient) DeletePreparer(resourceGroupName string, actionGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionGroupName": autorest.Encode("path", actionGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ActionGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ActionGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// EnableReceiver enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. +// +// resourceGroupName is the name of the resource group. actionGroupName is the name of the action group. enableRequest +// is the receiver to re-enable. +func (client ActionGroupsClient) EnableReceiver(resourceGroupName string, actionGroupName string, enableRequest EnableRequest) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: enableRequest, + Constraints: []validation.Constraint{{Target: "enableRequest.ReceiverName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "monitor.ActionGroupsClient", "EnableReceiver") + } + + req, err := client.EnableReceiverPreparer(resourceGroupName, actionGroupName, enableRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "EnableReceiver", nil, "Failure preparing request") + return + } + + resp, err := client.EnableReceiverSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "EnableReceiver", resp, "Failure sending request") + return + } + + result, err = client.EnableReceiverResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "EnableReceiver", resp, "Failure responding to request") + } + + return +} + +// EnableReceiverPreparer prepares the EnableReceiver request. +func (client ActionGroupsClient) EnableReceiverPreparer(resourceGroupName string, actionGroupName string, enableRequest EnableRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionGroupName": autorest.Encode("path", actionGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}/subscribe", pathParameters), + autorest.WithJSON(enableRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// EnableReceiverSender sends the EnableReceiver request. The method will close the +// http.Response Body if it receives an error. +func (client ActionGroupsClient) EnableReceiverSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// EnableReceiverResponder handles the response to the EnableReceiver request. The method always +// closes the http.Response Body. +func (client ActionGroupsClient) EnableReceiverResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusConflict), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get get an action group. +// +// resourceGroupName is the name of the resource group. actionGroupName is the name of the action group. +func (client ActionGroupsClient) Get(resourceGroupName string, actionGroupName string) (result ActionGroupResource, err error) { + req, err := client.GetPreparer(resourceGroupName, actionGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ActionGroupsClient) GetPreparer(resourceGroupName string, actionGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "actionGroupName": autorest.Encode("path", actionGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups/{actionGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ActionGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ActionGroupsClient) GetResponder(resp *http.Response) (result ActionGroupResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup get a list of all action groups in a resource group. +// +// resourceGroupName is the name of the resource group. +func (client ActionGroupsClient) ListByResourceGroup(resourceGroupName string) (result ActionGroupList, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ActionGroupsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/actionGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ActionGroupsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ActionGroupsClient) ListByResourceGroupResponder(resp *http.Response) (result ActionGroupList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscriptionID get a list of all action groups in a subscription. +func (client ActionGroupsClient) ListBySubscriptionID() (result ActionGroupList, err error) { + req, err := client.ListBySubscriptionIDPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "ListBySubscriptionID", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionIDSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "ListBySubscriptionID", resp, "Failure sending request") + return + } + + result, err = client.ListBySubscriptionIDResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.ActionGroupsClient", "ListBySubscriptionID", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionIDPreparer prepares the ListBySubscriptionID request. +func (client ActionGroupsClient) ListBySubscriptionIDPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/microsoft.insights/actionGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListBySubscriptionIDSender sends the ListBySubscriptionID request. The method will close the +// http.Response Body if it receives an error. +func (client ActionGroupsClient) ListBySubscriptionIDSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListBySubscriptionIDResponder handles the response to the ListBySubscriptionID request. The method always +// closes the http.Response Body. +func (client ActionGroupsClient) ListBySubscriptionIDResponder(resp *http.Response) (result ActionGroupList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/activitylogalerts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/activitylogalerts.go index 10e802176..9801cbb00 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/activitylogalerts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/activitylogalerts.go @@ -14,9 +14,8 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,29 +24,25 @@ import ( "net/http" ) -// ActivityLogAlertsClient is the composite Swagger for Monitor Management -// Client +// ActivityLogAlertsClient is the monitor Management Client type ActivityLogAlertsClient struct { ManagementClient } -// NewActivityLogAlertsClient creates an instance of the -// ActivityLogAlertsClient client. +// NewActivityLogAlertsClient creates an instance of the ActivityLogAlertsClient client. func NewActivityLogAlertsClient(subscriptionID string) ActivityLogAlertsClient { return NewActivityLogAlertsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewActivityLogAlertsClientWithBaseURI creates an instance of the -// ActivityLogAlertsClient client. +// NewActivityLogAlertsClientWithBaseURI creates an instance of the ActivityLogAlertsClient client. func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string) ActivityLogAlertsClient { return ActivityLogAlertsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create a new activity log alert or update an existing one. // -// resourceGroupName is the name of the resource group. activityLogAlertName is -// the name of the activity log alert. activityLogAlert is the activity log -// alert to create or use for the update. +// resourceGroupName is the name of the resource group. activityLogAlertName is the name of the activity log alert. +// activityLogAlert is the activity log alert to create or use for the update. func (client ActivityLogAlertsClient) CreateOrUpdate(resourceGroupName string, activityLogAlertName string, activityLogAlert ActivityLogAlertResource) (result ActivityLogAlertResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: activityLogAlert, @@ -89,7 +84,7 @@ func (client ActivityLogAlertsClient) CreateOrUpdatePreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01-preview" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,8 +120,7 @@ func (client ActivityLogAlertsClient) CreateOrUpdateResponder(resp *http.Respons // Delete delete an activity log alert. // -// resourceGroupName is the name of the resource group. activityLogAlertName is -// the name of the activity log alert. +// resourceGroupName is the name of the resource group. activityLogAlertName is the name of the activity log alert. func (client ActivityLogAlertsClient) Delete(resourceGroupName string, activityLogAlertName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, activityLogAlertName) if err != nil { @@ -157,7 +151,7 @@ func (client ActivityLogAlertsClient) DeletePreparer(resourceGroupName string, a "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01-preview" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -190,8 +184,7 @@ func (client ActivityLogAlertsClient) DeleteResponder(resp *http.Response) (resu // Get get an activity log alert. // -// resourceGroupName is the name of the resource group. activityLogAlertName is -// the name of the activity log alert. +// resourceGroupName is the name of the resource group. activityLogAlertName is the name of the activity log alert. func (client ActivityLogAlertsClient) Get(resourceGroupName string, activityLogAlertName string) (result ActivityLogAlertResource, err error) { req, err := client.GetPreparer(resourceGroupName, activityLogAlertName) if err != nil { @@ -222,7 +215,7 @@ func (client ActivityLogAlertsClient) GetPreparer(resourceGroupName string, acti "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01-preview" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -254,8 +247,7 @@ func (client ActivityLogAlertsClient) GetResponder(resp *http.Response) (result return } -// ListByResourceGroup get a list of all activity log alerts in a resource -// group. +// ListByResourceGroup get a list of all activity log alerts in a resource group. // // resourceGroupName is the name of the resource group. func (client ActivityLogAlertsClient) ListByResourceGroup(resourceGroupName string) (result ActivityLogAlertList, err error) { @@ -287,7 +279,7 @@ func (client ActivityLogAlertsClient) ListByResourceGroupPreparer(resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01-preview" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -319,8 +311,7 @@ func (client ActivityLogAlertsClient) ListByResourceGroupResponder(resp *http.Re return } -// ListBySubscriptionID get a list of all activity log alerts in a -// subscription. +// ListBySubscriptionID get a list of all activity log alerts in a subscription. func (client ActivityLogAlertsClient) ListBySubscriptionID() (result ActivityLogAlertList, err error) { req, err := client.ListBySubscriptionIDPreparer() if err != nil { @@ -349,7 +340,7 @@ func (client ActivityLogAlertsClient) ListBySubscriptionIDPreparer() (*http.Requ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01-preview" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -381,13 +372,11 @@ func (client ActivityLogAlertsClient) ListBySubscriptionIDResponder(resp *http.R return } -// Update updates an existing ActivityLogAlertResource's tags. To update other -// fields use the CreateOrUpdate method. +// Update updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. // -// resourceGroupName is the name of the resource group. activityLogAlertName is -// the name of the activity log alert. activityLogAlertPatch is parameters -// supplied to the operation. -func (client ActivityLogAlertsClient) Update(resourceGroupName string, activityLogAlertName string, activityLogAlertPatch ActivityLogAlertResourcePatch) (result ActivityLogAlertResource, err error) { +// resourceGroupName is the name of the resource group. activityLogAlertName is the name of the activity log alert. +// activityLogAlertPatch is parameters supplied to the operation. +func (client ActivityLogAlertsClient) Update(resourceGroupName string, activityLogAlertName string, activityLogAlertPatch ActivityLogAlertPatchBody) (result ActivityLogAlertResource, err error) { req, err := client.UpdatePreparer(resourceGroupName, activityLogAlertName, activityLogAlertPatch) if err != nil { err = autorest.NewErrorWithError(err, "monitor.ActivityLogAlertsClient", "Update", nil, "Failure preparing request") @@ -410,14 +399,14 @@ func (client ActivityLogAlertsClient) Update(resourceGroupName string, activityL } // UpdatePreparer prepares the Update request. -func (client ActivityLogAlertsClient) UpdatePreparer(resourceGroupName string, activityLogAlertName string, activityLogAlertPatch ActivityLogAlertResourcePatch) (*http.Request, error) { +func (client ActivityLogAlertsClient) UpdatePreparer(resourceGroupName string, activityLogAlertName string, activityLogAlertPatch ActivityLogAlertPatchBody) (*http.Request, error) { pathParameters := map[string]interface{}{ "activityLogAlertName": autorest.Encode("path", activityLogAlertName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01-preview" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertruleincidents.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertruleincidents.go index 5874e190f..fafabe35c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertruleincidents.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertruleincidents.go @@ -14,9 +14,8 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,28 +23,25 @@ import ( "net/http" ) -// AlertRuleIncidentsClient is the composite Swagger for Monitor Management -// Client +// AlertRuleIncidentsClient is the monitor Management Client type AlertRuleIncidentsClient struct { ManagementClient } -// NewAlertRuleIncidentsClient creates an instance of the -// AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClient creates an instance of the AlertRuleIncidentsClient client. func NewAlertRuleIncidentsClient(subscriptionID string) AlertRuleIncidentsClient { return NewAlertRuleIncidentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the -// AlertRuleIncidentsClient client. +// NewAlertRuleIncidentsClientWithBaseURI creates an instance of the AlertRuleIncidentsClient client. func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID string) AlertRuleIncidentsClient { return AlertRuleIncidentsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets an incident associated to an alert rule // -// resourceGroupName is the name of the resource group. ruleName is the name of -// the rule. incidentName is the name of the incident to retrieve. +// resourceGroupName is the name of the resource group. ruleName is the name of the rule. incidentName is the name of +// the incident to retrieve. func (client AlertRuleIncidentsClient) Get(resourceGroupName string, ruleName string, incidentName string) (result Incident, err error) { req, err := client.GetPreparer(resourceGroupName, ruleName, incidentName) if err != nil { @@ -111,8 +107,7 @@ func (client AlertRuleIncidentsClient) GetResponder(resp *http.Response) (result // ListByAlertRule gets a list of incidents associated to an alert rule // -// resourceGroupName is the name of the resource group. ruleName is the name of -// the rule. +// resourceGroupName is the name of the resource group. ruleName is the name of the rule. func (client AlertRuleIncidentsClient) ListByAlertRule(resourceGroupName string, ruleName string) (result IncidentListResult, err error) { req, err := client.ListByAlertRulePreparer(resourceGroupName, ruleName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertrules.go index 77771b880..f344ff54e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/alertrules.go @@ -14,9 +14,8 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// AlertRulesClient is the composite Swagger for Monitor Management Client +// AlertRulesClient is the monitor Management Client type AlertRulesClient struct { ManagementClient } @@ -35,16 +34,15 @@ func NewAlertRulesClient(subscriptionID string) AlertRulesClient { return NewAlertRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient -// client. +// NewAlertRulesClientWithBaseURI creates an instance of the AlertRulesClient client. func NewAlertRulesClientWithBaseURI(baseURI string, subscriptionID string) AlertRulesClient { return AlertRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an alert rule. // -// resourceGroupName is the name of the resource group. ruleName is the name of -// the rule. parameters is the parameters of the rule to create or update. +// resourceGroupName is the name of the resource group. ruleName is the name of the rule. parameters is the parameters +// of the rule to create or update. func (client AlertRulesClient) CreateOrUpdate(resourceGroupName string, ruleName string, parameters AlertRuleResource) (result AlertRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -121,8 +119,7 @@ func (client AlertRulesClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete deletes an alert rule // -// resourceGroupName is the name of the resource group. ruleName is the name of -// the rule. +// resourceGroupName is the name of the resource group. ruleName is the name of the rule. func (client AlertRulesClient) Delete(resourceGroupName string, ruleName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, ruleName) if err != nil { @@ -186,8 +183,7 @@ func (client AlertRulesClient) DeleteResponder(resp *http.Response) (result auto // Get gets an alert rule // -// resourceGroupName is the name of the resource group. ruleName is the name of -// the rule. +// resourceGroupName is the name of the resource group. ruleName is the name of the rule. func (client AlertRulesClient) Get(resourceGroupName string, ruleName string) (result AlertRuleResource, err error) { req, err := client.GetPreparer(resourceGroupName, ruleName) if err != nil { @@ -313,3 +309,71 @@ func (client AlertRulesClient) ListByResourceGroupResponder(resp *http.Response) result.Response = autorest.Response{Response: resp} return } + +// Update updates an existing AlertRuleResource. To update other fields use the CreateOrUpdate method. +// +// resourceGroupName is the name of the resource group. ruleName is the name of the rule. alertRulesResource is +// parameters supplied to the operation. +func (client AlertRulesClient) Update(resourceGroupName string, ruleName string, alertRulesResource AlertRuleResourcePatch) (result AlertRuleResource, err error) { + req, err := client.UpdatePreparer(resourceGroupName, ruleName, alertRulesResource) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.AlertRulesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.AlertRulesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.AlertRulesClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client AlertRulesClient) UpdatePreparer(resourceGroupName string, ruleName string, alertRulesResource AlertRuleResourcePatch) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}", pathParameters), + autorest.WithJSON(alertRulesResource), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client AlertRulesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client AlertRulesClient) UpdateResponder(resp *http.Response) (result AlertRuleResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/autoscalesettings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/autoscalesettings.go index 1dd707712..9f12f04bf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/autoscalesettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/autoscalesettings.go @@ -14,9 +14,8 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,29 +24,25 @@ import ( "net/http" ) -// AutoscaleSettingsClient is the composite Swagger for Monitor Management -// Client +// AutoscaleSettingsClient is the monitor Management Client type AutoscaleSettingsClient struct { ManagementClient } -// NewAutoscaleSettingsClient creates an instance of the -// AutoscaleSettingsClient client. +// NewAutoscaleSettingsClient creates an instance of the AutoscaleSettingsClient client. func NewAutoscaleSettingsClient(subscriptionID string) AutoscaleSettingsClient { return NewAutoscaleSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAutoscaleSettingsClientWithBaseURI creates an instance of the -// AutoscaleSettingsClient client. +// NewAutoscaleSettingsClientWithBaseURI creates an instance of the AutoscaleSettingsClient client. func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string) AutoscaleSettingsClient { return AutoscaleSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates an autoscale setting. // -// resourceGroupName is the name of the resource group. autoscaleSettingName is -// the autoscale setting name. parameters is parameters supplied to the -// operation. +// resourceGroupName is the name of the resource group. autoscaleSettingName is the autoscale setting name. parameters +// is parameters supplied to the operation. func (client AutoscaleSettingsClient) CreateOrUpdate(resourceGroupName string, autoscaleSettingName string, parameters AutoscaleSettingResource) (result AutoscaleSettingResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -123,8 +118,7 @@ func (client AutoscaleSettingsClient) CreateOrUpdateResponder(resp *http.Respons // Delete deletes and autoscale setting // -// resourceGroupName is the name of the resource group. autoscaleSettingName is -// the autoscale setting name. +// resourceGroupName is the name of the resource group. autoscaleSettingName is the autoscale setting name. func (client AutoscaleSettingsClient) Delete(resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, autoscaleSettingName) if err != nil { @@ -188,8 +182,7 @@ func (client AutoscaleSettingsClient) DeleteResponder(resp *http.Response) (resu // Get gets an autoscale setting // -// resourceGroupName is the name of the resource group. autoscaleSettingName is -// the autoscale setting name. +// resourceGroupName is the name of the resource group. autoscaleSettingName is the autoscale setting name. func (client AutoscaleSettingsClient) Get(resourceGroupName string, autoscaleSettingName string) (result AutoscaleSettingResource, err error) { req, err := client.GetPreparer(resourceGroupName, autoscaleSettingName) if err != nil { @@ -339,3 +332,116 @@ func (client AutoscaleSettingsClient) ListByResourceGroupNextResults(lastResults return } + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AutoscaleSettingsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan AutoscaleSettingResource, <-chan error) { + resultChan := make(chan AutoscaleSettingResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. +// +// resourceGroupName is the name of the resource group. autoscaleSettingName is the autoscale setting name. +// autoscaleSettingResource is parameters supplied to the operation. +func (client AutoscaleSettingsClient) Update(resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource AutoscaleSettingResourcePatch) (result AutoscaleSettingResource, err error) { + req, err := client.UpdatePreparer(resourceGroupName, autoscaleSettingName, autoscaleSettingResource) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.AutoscaleSettingsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.AutoscaleSettingsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.AutoscaleSettingsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client AutoscaleSettingsClient) UpdatePreparer(resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource AutoscaleSettingResourcePatch) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "autoscaleSettingName": autorest.Encode("path", autoscaleSettingName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}", pathParameters), + autorest.WithJSON(autoscaleSettingResource), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client AutoscaleSettingsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client AutoscaleSettingsClient) UpdateResponder(resp *http.Response) (result AutoscaleSettingResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/client.go index dc06b09f3..ef04adcb8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/client.go @@ -1,6 +1,6 @@ // Package monitor implements the Azure ARM Monitor service API version . // -// Composite Swagger for Monitor Management Client +// Monitor Management Client package monitor // Copyright (c) Microsoft and contributors. All rights reserved. @@ -17,9 +17,8 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettings.go new file mode 100644 index 000000000..a0da9c77c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettings.go @@ -0,0 +1,296 @@ +package monitor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DiagnosticSettingsClient is the monitor Management Client +type DiagnosticSettingsClient struct { + ManagementClient +} + +// NewDiagnosticSettingsClient creates an instance of the DiagnosticSettingsClient client. +func NewDiagnosticSettingsClient(subscriptionID string) DiagnosticSettingsClient { + return NewDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDiagnosticSettingsClientWithBaseURI creates an instance of the DiagnosticSettingsClient client. +func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsClient { + return DiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates diagnostic settings for the specified resource. +// +// resourceURI is the identifier of the resource. parameters is parameters supplied to the operation. name is the name +// of the diagnostic setting. +func (client DiagnosticSettingsClient) CreateOrUpdate(resourceURI string, parameters DiagnosticSettingsResource, name string) (result DiagnosticSettingsResource, err error) { + req, err := client.CreateOrUpdatePreparer(resourceURI, parameters, name) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DiagnosticSettingsClient) CreateOrUpdatePreparer(resourceURI string, parameters DiagnosticSettingsResource, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceUri": autorest.Encode("path", resourceURI), + } + + const APIVersion = "2017-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DiagnosticSettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DiagnosticSettingsClient) CreateOrUpdateResponder(resp *http.Response) (result DiagnosticSettingsResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes existing diagnostic settings for the specified resource. +// +// resourceURI is the identifier of the resource. name is the name of the diagnostic setting. +func (client DiagnosticSettingsClient) Delete(resourceURI string, name string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceURI, name) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client DiagnosticSettingsClient) DeletePreparer(resourceURI string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceUri": autorest.Encode("path", resourceURI), + } + + const APIVersion = "2017-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client DiagnosticSettingsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client DiagnosticSettingsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the active diagnostic settings for the specified resource. +// +// resourceURI is the identifier of the resource. name is the name of the diagnostic setting. +func (client DiagnosticSettingsClient) Get(resourceURI string, name string) (result DiagnosticSettingsResource, err error) { + req, err := client.GetPreparer(resourceURI, name) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DiagnosticSettingsClient) GetPreparer(resourceURI string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceUri": autorest.Encode("path", resourceURI), + } + + const APIVersion = "2017-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DiagnosticSettingsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DiagnosticSettingsClient) GetResponder(resp *http.Response) (result DiagnosticSettingsResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets the active diagnostic settings list for the specified resource. +// +// resourceURI is the identifier of the resource. +func (client DiagnosticSettingsClient) List(resourceURI string) (result DiagnosticSettingsResourceCollection, err error) { + req, err := client.ListPreparer(resourceURI) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DiagnosticSettingsClient) ListPreparer(resourceURI string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceUri": autorest.Encode("path", resourceURI), + } + + const APIVersion = "2017-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettings", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DiagnosticSettingsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DiagnosticSettingsClient) ListResponder(resp *http.Response) (result DiagnosticSettingsResourceCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettingscategory.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettingscategory.go new file mode 100644 index 000000000..da7c096ae --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/diagnosticsettingscategory.go @@ -0,0 +1,166 @@ +package monitor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DiagnosticSettingsCategoryClient is the monitor Management Client +type DiagnosticSettingsCategoryClient struct { + ManagementClient +} + +// NewDiagnosticSettingsCategoryClient creates an instance of the DiagnosticSettingsCategoryClient client. +func NewDiagnosticSettingsCategoryClient(subscriptionID string) DiagnosticSettingsCategoryClient { + return NewDiagnosticSettingsCategoryClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDiagnosticSettingsCategoryClientWithBaseURI creates an instance of the DiagnosticSettingsCategoryClient client. +func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscriptionID string) DiagnosticSettingsCategoryClient { + return DiagnosticSettingsCategoryClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the diagnostic settings category for the specified resource. +// +// resourceURI is the identifier of the resource. name is the name of the diagnostic setting. +func (client DiagnosticSettingsCategoryClient) Get(resourceURI string, name string) (result DiagnosticSettingsCategoryResource, err error) { + req, err := client.GetPreparer(resourceURI, name) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsCategoryClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsCategoryClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsCategoryClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DiagnosticSettingsCategoryClient) GetPreparer(resourceURI string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceUri": autorest.Encode("path", resourceURI), + } + + const APIVersion = "2017-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DiagnosticSettingsCategoryClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DiagnosticSettingsCategoryClient) GetResponder(resp *http.Response) (result DiagnosticSettingsCategoryResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List lists the diagnostic settings categories for the specified resource. +// +// resourceURI is the identifier of the resource. +func (client DiagnosticSettingsCategoryClient) List(resourceURI string) (result DiagnosticSettingsCategoryResourceCollection, err error) { + req, err := client.ListPreparer(resourceURI) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsCategoryClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsCategoryClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.DiagnosticSettingsCategoryClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DiagnosticSettingsCategoryClient) ListPreparer(resourceURI string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceUri": autorest.Encode("path", resourceURI), + } + + const APIVersion = "2017-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DiagnosticSettingsCategoryClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DiagnosticSettingsCategoryClient) ListResponder(resp *http.Response) (result DiagnosticSettingsCategoryResourceCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/logprofiles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/logprofiles.go index 0ed8686f1..e7f8d7292 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/logprofiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/logprofiles.go @@ -14,9 +14,8 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// LogProfilesClient is the composite Swagger for Monitor Management Client +// LogProfilesClient is the monitor Management Client type LogProfilesClient struct { ManagementClient } @@ -35,16 +34,14 @@ func NewLogProfilesClient(subscriptionID string) LogProfilesClient { return NewLogProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient -// client. +// NewLogProfilesClientWithBaseURI creates an instance of the LogProfilesClient client. func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogProfilesClient { return LogProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a log profile in Azure Monitoring REST API. // -// logProfileName is the name of the log profile. parameters is parameters -// supplied to the operation. +// logProfileName is the name of the log profile. parameters is parameters supplied to the operation. func (client LogProfilesClient) CreateOrUpdate(logProfileName string, parameters LogProfileResource) (result LogProfileResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -309,3 +306,69 @@ func (client LogProfilesClient) ListResponder(resp *http.Response) (result LogPr result.Response = autorest.Response{Response: resp} return } + +// Update updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. +// +// logProfileName is the name of the log profile. logProfilesResource is parameters supplied to the operation. +func (client LogProfilesClient) Update(logProfileName string, logProfilesResource LogProfileResourcePatch) (result LogProfileResource, err error) { + req, err := client.UpdatePreparer(logProfileName, logProfilesResource) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.LogProfilesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.LogProfilesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.LogProfilesClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client LogProfilesClient) UpdatePreparer(logProfileName string, logProfilesResource LogProfileResourcePatch) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "logProfileName": autorest.Encode("path", logProfileName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}", pathParameters), + autorest.WithJSON(logProfilesResource), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client LogProfilesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client LogProfilesClient) UpdateResponder(resp *http.Response) (result LogProfileResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/models.go index d10b4457a..272ae76bf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/models.go @@ -14,33 +14,41 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "net/http" ) +// CategoryType enumerates the values for category type. +type CategoryType string + +const ( + // Logs specifies the logs state for category type. + Logs CategoryType = "Logs" + // Metrics specifies the metrics state for category type. + Metrics CategoryType = "Metrics" +) + // ComparisonOperationType enumerates the values for comparison operation type. type ComparisonOperationType string const ( // Equals specifies the equals state for comparison operation type. Equals ComparisonOperationType = "Equals" - // GreaterThan specifies the greater than state for comparison operation - // type. + // GreaterThan specifies the greater than state for comparison operation type. GreaterThan ComparisonOperationType = "GreaterThan" - // GreaterThanOrEqual specifies the greater than or equal state for - // comparison operation type. + // GreaterThanOrEqual specifies the greater than or equal state for comparison operation type. GreaterThanOrEqual ComparisonOperationType = "GreaterThanOrEqual" // LessThan specifies the less than state for comparison operation type. LessThan ComparisonOperationType = "LessThan" - // LessThanOrEqual specifies the less than or equal state for comparison - // operation type. + // LessThanOrEqual specifies the less than or equal state for comparison operation type. LessThanOrEqual ComparisonOperationType = "LessThanOrEqual" // NotEquals specifies the not equals state for comparison operation type. NotEquals ComparisonOperationType = "NotEquals" @@ -50,17 +58,14 @@ const ( type ConditionOperator string const ( - // ConditionOperatorGreaterThan specifies the condition operator greater - // than state for condition operator. + // ConditionOperatorGreaterThan specifies the condition operator greater than state for condition operator. ConditionOperatorGreaterThan ConditionOperator = "GreaterThan" - // ConditionOperatorGreaterThanOrEqual specifies the condition operator - // greater than or equal state for condition operator. + // ConditionOperatorGreaterThanOrEqual specifies the condition operator greater than or equal state for condition + // operator. ConditionOperatorGreaterThanOrEqual ConditionOperator = "GreaterThanOrEqual" - // ConditionOperatorLessThan specifies the condition operator less than - // state for condition operator. + // ConditionOperatorLessThan specifies the condition operator less than state for condition operator. ConditionOperatorLessThan ConditionOperator = "LessThan" - // ConditionOperatorLessThanOrEqual specifies the condition operator less - // than or equal state for condition operator. + // ConditionOperatorLessThanOrEqual specifies the condition operator less than or equal state for condition operator. ConditionOperatorLessThanOrEqual ConditionOperator = "LessThanOrEqual" ) @@ -78,6 +83,57 @@ const ( Sum MetricStatisticType = "Sum" ) +// OdataType enumerates the values for odata type. +type OdataType string + +const ( + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource specifies the odata type microsoft + // azure management insights models rule management event data source state for odata type. + OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource specifies the odata type microsoft azure + // management insights models rule metric data source state for odata type. + OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource OdataType = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" +) + +// OdataType1 enumerates the values for odata type 1. +type OdataType1 string + +const ( + // OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition specifies the odata type microsoft + // azure management insights models location threshold rule condition state for odata type 1. + OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition OdataType1 = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" + // OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition specifies the odata type microsoft azure + // management insights models management event rule condition state for odata type 1. + OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition OdataType1 = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" + // OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition specifies the odata type microsoft azure + // management insights models threshold rule condition state for odata type 1. + OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition OdataType1 = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" +) + +// OdataType2 enumerates the values for odata type 2. +type OdataType2 string + +const ( + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction specifies the odata type microsoft azure management + // insights models rule email action state for odata type 2. + OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction OdataType2 = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" + // OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction specifies the odata type microsoft azure management + // insights models rule webhook action state for odata type 2. + OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction OdataType2 = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" +) + +// ReceiverStatus enumerates the values for receiver status. +type ReceiverStatus string + +const ( + // Disabled specifies the disabled state for receiver status. + Disabled ReceiverStatus = "Disabled" + // Enabled specifies the enabled state for receiver status. + Enabled ReceiverStatus = "Enabled" + // NotSpecified specifies the not specified state for receiver status. + NotSpecified ReceiverStatus = "NotSpecified" +) + // RecurrenceFrequency enumerates the values for recurrence frequency. type RecurrenceFrequency string @@ -104,14 +160,11 @@ const ( type ScaleDirection string const ( - // ScaleDirectionDecrease specifies the scale direction decrease state for - // scale direction. + // ScaleDirectionDecrease specifies the scale direction decrease state for scale direction. ScaleDirectionDecrease ScaleDirection = "Decrease" - // ScaleDirectionIncrease specifies the scale direction increase state for - // scale direction. + // ScaleDirectionIncrease specifies the scale direction increase state for scale direction. ScaleDirectionIncrease ScaleDirection = "Increase" - // ScaleDirectionNone specifies the scale direction none state for scale - // direction. + // ScaleDirectionNone specifies the scale direction none state for scale direction. ScaleDirectionNone ScaleDirection = "None" ) @@ -123,8 +176,7 @@ const ( ChangeCount ScaleType = "ChangeCount" // ExactCount specifies the exact count state for scale type. ExactCount ScaleType = "ExactCount" - // PercentChangeCount specifies the percent change count state for scale - // type. + // PercentChangeCount specifies the percent change count state for scale type. PercentChangeCount ScaleType = "PercentChangeCount" ) @@ -132,20 +184,15 @@ const ( type TimeAggregationOperator string const ( - // TimeAggregationOperatorAverage specifies the time aggregation operator - // average state for time aggregation operator. + // TimeAggregationOperatorAverage specifies the time aggregation operator average state for time aggregation operator. TimeAggregationOperatorAverage TimeAggregationOperator = "Average" - // TimeAggregationOperatorLast specifies the time aggregation operator last - // state for time aggregation operator. + // TimeAggregationOperatorLast specifies the time aggregation operator last state for time aggregation operator. TimeAggregationOperatorLast TimeAggregationOperator = "Last" - // TimeAggregationOperatorMaximum specifies the time aggregation operator - // maximum state for time aggregation operator. + // TimeAggregationOperatorMaximum specifies the time aggregation operator maximum state for time aggregation operator. TimeAggregationOperatorMaximum TimeAggregationOperator = "Maximum" - // TimeAggregationOperatorMinimum specifies the time aggregation operator - // minimum state for time aggregation operator. + // TimeAggregationOperatorMinimum specifies the time aggregation operator minimum state for time aggregation operator. TimeAggregationOperatorMinimum TimeAggregationOperator = "Minimum" - // TimeAggregationOperatorTotal specifies the time aggregation operator - // total state for time aggregation operator. + // TimeAggregationOperatorTotal specifies the time aggregation operator total state for time aggregation operator. TimeAggregationOperatorTotal TimeAggregationOperator = "Total" ) @@ -153,23 +200,45 @@ const ( type TimeAggregationType string const ( - // TimeAggregationTypeAverage specifies the time aggregation type average - // state for time aggregation type. + // TimeAggregationTypeAverage specifies the time aggregation type average state for time aggregation type. TimeAggregationTypeAverage TimeAggregationType = "Average" - // TimeAggregationTypeCount specifies the time aggregation type count state - // for time aggregation type. + // TimeAggregationTypeCount specifies the time aggregation type count state for time aggregation type. TimeAggregationTypeCount TimeAggregationType = "Count" - // TimeAggregationTypeMaximum specifies the time aggregation type maximum - // state for time aggregation type. + // TimeAggregationTypeMaximum specifies the time aggregation type maximum state for time aggregation type. TimeAggregationTypeMaximum TimeAggregationType = "Maximum" - // TimeAggregationTypeMinimum specifies the time aggregation type minimum - // state for time aggregation type. + // TimeAggregationTypeMinimum specifies the time aggregation type minimum state for time aggregation type. TimeAggregationTypeMinimum TimeAggregationType = "Minimum" - // TimeAggregationTypeTotal specifies the time aggregation type total state - // for time aggregation type. + // TimeAggregationTypeTotal specifies the time aggregation type total state for time aggregation type. TimeAggregationTypeTotal TimeAggregationType = "Total" ) +// ActionGroup is an Azure action group. +type ActionGroup struct { + GroupShortName *string `json:"groupShortName,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + EmailReceivers *[]EmailReceiver `json:"emailReceivers,omitempty"` + SmsReceivers *[]SmsReceiver `json:"smsReceivers,omitempty"` + WebhookReceivers *[]WebhookReceiver `json:"webhookReceivers,omitempty"` +} + +// ActionGroupList is a list of action groups. +type ActionGroupList struct { + autorest.Response `json:"-"` + Value *[]ActionGroupResource `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ActionGroupResource is an action group resource. +type ActionGroupResource struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ActionGroup `json:"properties,omitempty"` +} + // ActivityLogAlert is an Azure activity log alert. type ActivityLogAlert struct { Scopes *[]string `json:"scopes,omitempty"` @@ -190,14 +259,14 @@ type ActivityLogAlertActionList struct { ActionGroups *[]ActivityLogAlertActionGroup `json:"actionGroups,omitempty"` } -// ActivityLogAlertAllOfCondition is an Activity Log alert condition that is -// met when all its member conditions are met. +// ActivityLogAlertAllOfCondition is an Activity Log alert condition that is met when all its member conditions are +// met. type ActivityLogAlertAllOfCondition struct { AllOf *[]ActivityLogAlertLeafCondition `json:"allOf,omitempty"` } -// ActivityLogAlertLeafCondition is an Activity Log alert condition that is met -// by comparing an activity log field and value. +// ActivityLogAlertLeafCondition is an Activity Log alert condition that is met by comparing an activity log field and +// value. type ActivityLogAlertLeafCondition struct { Field *string `json:"field,omitempty"` Equals *string `json:"equals,omitempty"` @@ -207,6 +276,7 @@ type ActivityLogAlertLeafCondition struct { type ActivityLogAlertList struct { autorest.Response `json:"-"` Value *[]ActivityLogAlertResource `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } // ActivityLogAlertPatch is an Azure activity log alert for patch operations. @@ -214,6 +284,12 @@ type ActivityLogAlertPatch struct { Enabled *bool `json:"enabled,omitempty"` } +// ActivityLogAlertPatchBody is an activity log alert object for the body of patch operations. +type ActivityLogAlertPatchBody struct { + Tags *map[string]*string `json:"tags,omitempty"` + *ActivityLogAlertPatch `json:"properties,omitempty"` +} + // ActivityLogAlertResource is an activity log alert resource. type ActivityLogAlertResource struct { autorest.Response `json:"-"` @@ -225,25 +301,84 @@ type ActivityLogAlertResource struct { *ActivityLogAlert `json:"properties,omitempty"` } -// ActivityLogAlertResourcePatch is an activity log alert resource for patch -// operations. -type ActivityLogAlertResourcePatch struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *ActivityLogAlertPatch `json:"properties,omitempty"` -} - // AlertRule is an alert rule. type AlertRule struct { - Name *string `json:"name,omitempty"` - Description *string `json:"description,omitempty"` - IsEnabled *bool `json:"isEnabled,omitempty"` - Condition *RuleCondition `json:"condition,omitempty"` - Actions *[]RuleAction `json:"actions,omitempty"` - LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` + Name *string `json:"name,omitempty"` + Description *string `json:"description,omitempty"` + IsEnabled *bool `json:"isEnabled,omitempty"` + Condition RuleCondition `json:"condition,omitempty"` + Actions *[]RuleAction `json:"actions,omitempty"` + LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for AlertRule struct. +func (ar *AlertRule) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + ar.Name = &name + } + + v = m["description"] + if v != nil { + var description string + err = json.Unmarshal(*m["description"], &description) + if err != nil { + return err + } + ar.Description = &description + } + + v = m["isEnabled"] + if v != nil { + var isEnabled bool + err = json.Unmarshal(*m["isEnabled"], &isEnabled) + if err != nil { + return err + } + ar.IsEnabled = &isEnabled + } + + v = m["condition"] + if v != nil { + condition, err := unmarshalRuleCondition(*m["condition"]) + if err != nil { + return err + } + ar.Condition = condition + } + + v = m["actions"] + if v != nil { + actions, err := unmarshalRuleActionArray(*m["actions"]) + if err != nil { + return err + } + ar.Actions = &actions + } + + v = m["lastUpdatedTime"] + if v != nil { + var lastUpdatedTime date.Time + err = json.Unmarshal(*m["lastUpdatedTime"], &lastUpdatedTime) + if err != nil { + return err + } + ar.LastUpdatedTime = &lastUpdatedTime + } + + return nil } // AlertRuleResource is the alert rule resource. @@ -257,13 +392,18 @@ type AlertRuleResource struct { *AlertRule `json:"properties,omitempty"` } -// AlertRuleResourceCollection is represents a collection of alert rule -// resources. +// AlertRuleResourceCollection is represents a collection of alert rule resources. type AlertRuleResourceCollection struct { autorest.Response `json:"-"` Value *[]AlertRuleResource `json:"value,omitempty"` } +// AlertRuleResourcePatch is the alert rule object for patch operations. +type AlertRuleResourcePatch struct { + Tags *map[string]*string `json:"tags,omitempty"` + *AlertRule `json:"properties,omitempty"` +} + // AutoscaleNotification is autoscale notification. type AutoscaleNotification struct { Operation *string `json:"operation,omitempty"` @@ -280,8 +420,7 @@ type AutoscaleProfile struct { Recurrence *Recurrence `json:"recurrence,omitempty"` } -// AutoscaleSetting is a setting that contains all of the configuration for the -// automatic scaling of a resource. +// AutoscaleSetting is a setting that contains all of the configuration for the automatic scaling of a resource. type AutoscaleSetting struct { Profiles *[]AutoscaleProfile `json:"profiles,omitempty"` Notifications *[]AutoscaleNotification `json:"notifications,omitempty"` @@ -301,8 +440,7 @@ type AutoscaleSettingResource struct { *AutoscaleSetting `json:"properties,omitempty"` } -// AutoscaleSettingResourceCollection is represents a collection of autoscale -// setting resources. +// AutoscaleSettingResourceCollection is represents a collection of autoscale setting resources. type AutoscaleSettingResourceCollection struct { autorest.Response `json:"-"` Value *[]AutoscaleSettingResource `json:"value,omitempty"` @@ -321,6 +459,57 @@ func (client AutoscaleSettingResourceCollection) AutoscaleSettingResourceCollect autorest.WithBaseURL(to.String(client.NextLink))) } +// AutoscaleSettingResourcePatch is the autoscale setting object for patch operations. +type AutoscaleSettingResourcePatch struct { + Tags *map[string]*string `json:"tags,omitempty"` + *AutoscaleSetting `json:"properties,omitempty"` +} + +// DiagnosticSettings is the diagnostic settings. +type DiagnosticSettings struct { + StorageAccountID *string `json:"storageAccountId,omitempty"` + EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"` + EventHubName *string `json:"eventHubName,omitempty"` + Metrics *[]MetricSettings `json:"metrics,omitempty"` + Logs *[]LogSettings `json:"logs,omitempty"` + WorkspaceID *string `json:"workspaceId,omitempty"` +} + +// DiagnosticSettingsCategory is the diagnostic settings Category. +type DiagnosticSettingsCategory struct { + CategoryType CategoryType `json:"categoryType,omitempty"` +} + +// DiagnosticSettingsCategoryResource is the diagnostic settings category resource. +type DiagnosticSettingsCategoryResource struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *DiagnosticSettingsCategory `json:"properties,omitempty"` +} + +// DiagnosticSettingsCategoryResourceCollection is represents a collection of diagnostic setting category resources. +type DiagnosticSettingsCategoryResourceCollection struct { + autorest.Response `json:"-"` + Value *[]DiagnosticSettingsCategoryResource `json:"value,omitempty"` +} + +// DiagnosticSettingsResource is the diagnostic setting resource. +type DiagnosticSettingsResource struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *DiagnosticSettings `json:"properties,omitempty"` +} + +// DiagnosticSettingsResourceCollection is represents a collection of alert rule resources. +type DiagnosticSettingsResourceCollection struct { + autorest.Response `json:"-"` + Value *[]DiagnosticSettingsResource `json:"value,omitempty"` +} + // EmailNotification is email notification of an autoscale event. type EmailNotification struct { SendToSubscriptionAdministrator *bool `json:"sendToSubscriptionAdministrator,omitempty"` @@ -328,14 +517,25 @@ type EmailNotification struct { CustomEmails *[]string `json:"customEmails,omitempty"` } +// EmailReceiver is an email receiver. +type EmailReceiver struct { + Name *string `json:"name,omitempty"` + EmailAddress *string `json:"emailAddress,omitempty"` + Status ReceiverStatus `json:"status,omitempty"` +} + +// EnableRequest is describes a receiver that should be resubscribed. +type EnableRequest struct { + ReceiverName *string `json:"receiverName,omitempty"` +} + // ErrorResponse is describes the format of Error response. type ErrorResponse struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } -// Incident is an alert incident indicates the activation status of an alert -// rule. +// Incident is an alert incident indicates the activation status of an alert rule. type Incident struct { autorest.Response `json:"-"` Name *string `json:"name,omitempty"` @@ -351,12 +551,89 @@ type IncidentListResult struct { Value *[]Incident `json:"value,omitempty"` } -// LocationThresholdRuleCondition is a rule condition based on a certain number -// of locations failing. +// LocationThresholdRuleCondition is a rule condition based on a certain number of locations failing. type LocationThresholdRuleCondition struct { - DataSource *RuleDataSource `json:"dataSource,omitempty"` - WindowSize *string `json:"windowSize,omitempty"` - FailedLocationCount *int32 `json:"failedLocationCount,omitempty"` + DataSource RuleDataSource `json:"dataSource,omitempty"` + OdataType OdataType1 `json:"odata.type,omitempty"` + WindowSize *string `json:"windowSize,omitempty"` + FailedLocationCount *int32 `json:"failedLocationCount,omitempty"` +} + +// MarshalJSON is the custom marshaler for LocationThresholdRuleCondition. +func (ltrc LocationThresholdRuleCondition) MarshalJSON() ([]byte, error) { + ltrc.OdataType = OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition + type Alias LocationThresholdRuleCondition + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ltrc), + }) +} + +// AsThresholdRuleCondition is the RuleCondition implementation for LocationThresholdRuleCondition. +func (ltrc LocationThresholdRuleCondition) AsThresholdRuleCondition() (*ThresholdRuleCondition, bool) { + return nil, false +} + +// AsLocationThresholdRuleCondition is the RuleCondition implementation for LocationThresholdRuleCondition. +func (ltrc LocationThresholdRuleCondition) AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool) { + return <rc, true +} + +// AsManagementEventRuleCondition is the RuleCondition implementation for LocationThresholdRuleCondition. +func (ltrc LocationThresholdRuleCondition) AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool) { + return nil, false +} + +// UnmarshalJSON is the custom unmarshaler for LocationThresholdRuleCondition struct. +func (ltrc *LocationThresholdRuleCondition) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["windowSize"] + if v != nil { + var windowSize string + err = json.Unmarshal(*m["windowSize"], &windowSize) + if err != nil { + return err + } + ltrc.WindowSize = &windowSize + } + + v = m["failedLocationCount"] + if v != nil { + var failedLocationCount int32 + err = json.Unmarshal(*m["failedLocationCount"], &failedLocationCount) + if err != nil { + return err + } + ltrc.FailedLocationCount = &failedLocationCount + } + + v = m["dataSource"] + if v != nil { + dataSource, err := unmarshalRuleDataSource(*m["dataSource"]) + if err != nil { + return err + } + ltrc.DataSource = dataSource + } + + v = m["odata.type"] + if v != nil { + var odatatype OdataType1 + err = json.Unmarshal(*m["odata.type"], &odatatype) + if err != nil { + return err + } + ltrc.OdataType = odatatype + } + + return nil } // LogProfileCollection is represents a collection of log profiles. @@ -385,16 +662,20 @@ type LogProfileResource struct { *LogProfileProperties `json:"properties,omitempty"` } -// LogSettings is part of MultiTenantDiagnosticSettings. Specifies the settings -// for a particular log. +// LogProfileResourcePatch is the log profile resource for patch operations. +type LogProfileResourcePatch struct { + Tags *map[string]*string `json:"tags,omitempty"` + *LogProfileProperties `json:"properties,omitempty"` +} + +// LogSettings is part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. type LogSettings struct { Category *string `json:"category,omitempty"` Enabled *bool `json:"enabled,omitempty"` RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` } -// ManagementEventAggregationCondition is how the data that is collected should -// be combined over time. +// ManagementEventAggregationCondition is how the data that is collected should be combined over time. type ManagementEventAggregationCondition struct { Operator ConditionOperator `json:"operator,omitempty"` Threshold *float64 `json:"threshold,omitempty"` @@ -403,14 +684,82 @@ type ManagementEventAggregationCondition struct { // ManagementEventRuleCondition is a management event rule condition. type ManagementEventRuleCondition struct { - DataSource *RuleDataSource `json:"dataSource,omitempty"` + DataSource RuleDataSource `json:"dataSource,omitempty"` + OdataType OdataType1 `json:"odata.type,omitempty"` Aggregation *ManagementEventAggregationCondition `json:"aggregation,omitempty"` } -// MetricSettings is part of MultiTenantDiagnosticSettings. Specifies the -// settings for a particular metric. +// MarshalJSON is the custom marshaler for ManagementEventRuleCondition. +func (merc ManagementEventRuleCondition) MarshalJSON() ([]byte, error) { + merc.OdataType = OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition + type Alias ManagementEventRuleCondition + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(merc), + }) +} + +// AsThresholdRuleCondition is the RuleCondition implementation for ManagementEventRuleCondition. +func (merc ManagementEventRuleCondition) AsThresholdRuleCondition() (*ThresholdRuleCondition, bool) { + return nil, false +} + +// AsLocationThresholdRuleCondition is the RuleCondition implementation for ManagementEventRuleCondition. +func (merc ManagementEventRuleCondition) AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool) { + return nil, false +} + +// AsManagementEventRuleCondition is the RuleCondition implementation for ManagementEventRuleCondition. +func (merc ManagementEventRuleCondition) AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool) { + return &merc, true +} + +// UnmarshalJSON is the custom unmarshaler for ManagementEventRuleCondition struct. +func (merc *ManagementEventRuleCondition) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["aggregation"] + if v != nil { + var aggregation ManagementEventAggregationCondition + err = json.Unmarshal(*m["aggregation"], &aggregation) + if err != nil { + return err + } + merc.Aggregation = &aggregation + } + + v = m["dataSource"] + if v != nil { + dataSource, err := unmarshalRuleDataSource(*m["dataSource"]) + if err != nil { + return err + } + merc.DataSource = dataSource + } + + v = m["odata.type"] + if v != nil { + var odatatype OdataType1 + err = json.Unmarshal(*m["odata.type"], &odatatype) + if err != nil { + return err + } + merc.OdataType = odatatype + } + + return nil +} + +// MetricSettings is part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. type MetricSettings struct { TimeGrain *string `json:"timeGrain,omitempty"` + Category *string `json:"category,omitempty"` Enabled *bool `json:"enabled,omitempty"` RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` } @@ -427,8 +776,36 @@ type MetricTrigger struct { Threshold *float64 `json:"threshold,omitempty"` } -// Recurrence is the repeating times at which this profile begins. This element -// is not used if the FixedDate element is used. +// Operation is microsoft Insights API operation definition. +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay is display metadata associated with the operation. +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` +} + +// OperationListResult is result of the request to list Microsoft.Insights operations. It contains a list of operations +// and a URL link to get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ProxyOnlyResource is a proxy only azure resource object +type ProxyOnlyResource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// Recurrence is the repeating times at which this profile begins. This element is not used if the FixedDate element is +// used. type Recurrence struct { Frequency RecurrenceFrequency `json:"frequency,omitempty"` Schedule *RecurrentSchedule `json:"schedule,omitempty"` @@ -457,40 +834,186 @@ type RetentionPolicy struct { Days *int32 `json:"days,omitempty"` } -// RuleAction is the action that is performed when the alert rule becomes -// active, and when an alert condition is resolved. -type RuleAction struct { +// RuleAction is the action that is performed when the alert rule becomes active, and when an alert condition is +// resolved. +type RuleAction interface { + AsRuleEmailAction() (*RuleEmailAction, bool) + AsRuleWebhookAction() (*RuleWebhookAction, bool) } -// RuleCondition is the condition that results in the alert rule being -// activated. -type RuleCondition struct { - DataSource *RuleDataSource `json:"dataSource,omitempty"` +func unmarshalRuleAction(body []byte) (RuleAction, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["odata.type"] { + case string(OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction): + var rea RuleEmailAction + err := json.Unmarshal(body, &rea) + return rea, err + case string(OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction): + var rwa RuleWebhookAction + err := json.Unmarshal(body, &rwa) + return rwa, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRuleActionArray(body []byte) ([]RuleAction, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + raArray := make([]RuleAction, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ra, err := unmarshalRuleAction(*rawMessage) + if err != nil { + return nil, err + } + raArray[index] = ra + } + return raArray, nil +} + +// RuleCondition is the condition that results in the alert rule being activated. +type RuleCondition interface { + AsThresholdRuleCondition() (*ThresholdRuleCondition, bool) + AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool) + AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool) +} + +func unmarshalRuleCondition(body []byte) (RuleCondition, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["odata.type"] { + case string(OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition): + var trc ThresholdRuleCondition + err := json.Unmarshal(body, &trc) + return trc, err + case string(OdataTypeMicrosoftAzureManagementInsightsModelsLocationThresholdRuleCondition): + var ltrc LocationThresholdRuleCondition + err := json.Unmarshal(body, <rc) + return ltrc, err + case string(OdataTypeMicrosoftAzureManagementInsightsModelsManagementEventRuleCondition): + var merc ManagementEventRuleCondition + err := json.Unmarshal(body, &merc) + return merc, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRuleConditionArray(body []byte) ([]RuleCondition, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rcArray := make([]RuleCondition, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rc, err := unmarshalRuleCondition(*rawMessage) + if err != nil { + return nil, err + } + rcArray[index] = rc + } + return rcArray, nil } // RuleDataSource is the resource from which the rule collects its data. -type RuleDataSource struct { - ResourceURI *string `json:"resourceUri,omitempty"` +type RuleDataSource interface { + AsRuleMetricDataSource() (*RuleMetricDataSource, bool) + AsRuleManagementEventDataSource() (*RuleManagementEventDataSource, bool) } -// RuleEmailAction is specifies the action to send email when the rule -// condition is evaluated. The discriminator is always RuleEmailAction in this -// case. +func unmarshalRuleDataSource(body []byte) (RuleDataSource, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["odata.type"] { + case string(OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource): + var rmds RuleMetricDataSource + err := json.Unmarshal(body, &rmds) + return rmds, err + case string(OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource): + var rmeds RuleManagementEventDataSource + err := json.Unmarshal(body, &rmeds) + return rmeds, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRuleDataSourceArray(body []byte) ([]RuleDataSource, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rdsArray := make([]RuleDataSource, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rds, err := unmarshalRuleDataSource(*rawMessage) + if err != nil { + return nil, err + } + rdsArray[index] = rds + } + return rdsArray, nil +} + +// RuleEmailAction is specifies the action to send email when the rule condition is evaluated. The discriminator is +// always RuleEmailAction in this case. type RuleEmailAction struct { - SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"` - CustomEmails *[]string `json:"customEmails,omitempty"` + OdataType OdataType2 `json:"odata.type,omitempty"` + SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"` + CustomEmails *[]string `json:"customEmails,omitempty"` } -// RuleManagementEventClaimsDataSource is the claims for a rule management -// event data source. +// MarshalJSON is the custom marshaler for RuleEmailAction. +func (rea RuleEmailAction) MarshalJSON() ([]byte, error) { + rea.OdataType = OdataTypeMicrosoftAzureManagementInsightsModelsRuleEmailAction + type Alias RuleEmailAction + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rea), + }) +} + +// AsRuleEmailAction is the RuleAction implementation for RuleEmailAction. +func (rea RuleEmailAction) AsRuleEmailAction() (*RuleEmailAction, bool) { + return &rea, true +} + +// AsRuleWebhookAction is the RuleAction implementation for RuleEmailAction. +func (rea RuleEmailAction) AsRuleWebhookAction() (*RuleWebhookAction, bool) { + return nil, false +} + +// RuleManagementEventClaimsDataSource is the claims for a rule management event data source. type RuleManagementEventClaimsDataSource struct { EmailAddress *string `json:"emailAddress,omitempty"` } -// RuleManagementEventDataSource is a rule management event data source. The -// discriminator fields is always RuleManagementEventDataSource in this case. +// RuleManagementEventDataSource is a rule management event data source. The discriminator fields is always +// RuleManagementEventDataSource in this case. type RuleManagementEventDataSource struct { ResourceURI *string `json:"resourceUri,omitempty"` + OdataType OdataType `json:"odata.type,omitempty"` EventName *string `json:"eventName,omitempty"` EventSource *string `json:"eventSource,omitempty"` Level *string `json:"level,omitempty"` @@ -502,21 +1025,85 @@ type RuleManagementEventDataSource struct { Claims *RuleManagementEventClaimsDataSource `json:"claims,omitempty"` } -// RuleMetricDataSource is a rule metric data source. The discriminator value -// is always RuleMetricDataSource in this case. -type RuleMetricDataSource struct { - ResourceURI *string `json:"resourceUri,omitempty"` - MetricName *string `json:"metricName,omitempty"` +// MarshalJSON is the custom marshaler for RuleManagementEventDataSource. +func (rmeds RuleManagementEventDataSource) MarshalJSON() ([]byte, error) { + rmeds.OdataType = OdataTypeMicrosoftAzureManagementInsightsModelsRuleManagementEventDataSource + type Alias RuleManagementEventDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rmeds), + }) } -// RuleWebhookAction is specifies the action to post to service when the rule -// condition is evaluated. The discriminator is always RuleWebhookAction in -// this case. +// AsRuleMetricDataSource is the RuleDataSource implementation for RuleManagementEventDataSource. +func (rmeds RuleManagementEventDataSource) AsRuleMetricDataSource() (*RuleMetricDataSource, bool) { + return nil, false +} + +// AsRuleManagementEventDataSource is the RuleDataSource implementation for RuleManagementEventDataSource. +func (rmeds RuleManagementEventDataSource) AsRuleManagementEventDataSource() (*RuleManagementEventDataSource, bool) { + return &rmeds, true +} + +// RuleMetricDataSource is a rule metric data source. The discriminator value is always RuleMetricDataSource in this +// case. +type RuleMetricDataSource struct { + ResourceURI *string `json:"resourceUri,omitempty"` + OdataType OdataType `json:"odata.type,omitempty"` + MetricName *string `json:"metricName,omitempty"` +} + +// MarshalJSON is the custom marshaler for RuleMetricDataSource. +func (rmds RuleMetricDataSource) MarshalJSON() ([]byte, error) { + rmds.OdataType = OdataTypeMicrosoftAzureManagementInsightsModelsRuleMetricDataSource + type Alias RuleMetricDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rmds), + }) +} + +// AsRuleMetricDataSource is the RuleDataSource implementation for RuleMetricDataSource. +func (rmds RuleMetricDataSource) AsRuleMetricDataSource() (*RuleMetricDataSource, bool) { + return &rmds, true +} + +// AsRuleManagementEventDataSource is the RuleDataSource implementation for RuleMetricDataSource. +func (rmds RuleMetricDataSource) AsRuleManagementEventDataSource() (*RuleManagementEventDataSource, bool) { + return nil, false +} + +// RuleWebhookAction is specifies the action to post to service when the rule condition is evaluated. The discriminator +// is always RuleWebhookAction in this case. type RuleWebhookAction struct { + OdataType OdataType2 `json:"odata.type,omitempty"` ServiceURI *string `json:"serviceUri,omitempty"` Properties *map[string]*string `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for RuleWebhookAction. +func (rwa RuleWebhookAction) MarshalJSON() ([]byte, error) { + rwa.OdataType = OdataTypeMicrosoftAzureManagementInsightsModelsRuleWebhookAction + type Alias RuleWebhookAction + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rwa), + }) +} + +// AsRuleEmailAction is the RuleAction implementation for RuleWebhookAction. +func (rwa RuleWebhookAction) AsRuleEmailAction() (*RuleEmailAction, bool) { + return nil, false +} + +// AsRuleWebhookAction is the RuleAction implementation for RuleWebhookAction. +func (rwa RuleWebhookAction) AsRuleWebhookAction() (*RuleWebhookAction, bool) { + return &rwa, true +} + // ScaleAction is the parameters for the scaling action. type ScaleAction struct { Direction ScaleDirection `json:"direction,omitempty"` @@ -525,53 +1112,134 @@ type ScaleAction struct { Cooldown *string `json:"cooldown,omitempty"` } -// ScaleCapacity is the number of instances that can be used during this -// profile. +// ScaleCapacity is the number of instances that can be used during this profile. type ScaleCapacity struct { Minimum *string `json:"minimum,omitempty"` Maximum *string `json:"maximum,omitempty"` Default *string `json:"default,omitempty"` } -// ScaleRule is a rule that provide the triggers and parameters for the scaling -// action. +// ScaleRule is a rule that provide the triggers and parameters for the scaling action. type ScaleRule struct { MetricTrigger *MetricTrigger `json:"metricTrigger,omitempty"` ScaleAction *ScaleAction `json:"scaleAction,omitempty"` } -// ServiceDiagnosticSettings is the diagnostic settings for service. -type ServiceDiagnosticSettings struct { - StorageAccountID *string `json:"storageAccountId,omitempty"` - ServiceBusRuleID *string `json:"serviceBusRuleId,omitempty"` - EventHubAuthorizationRuleID *string `json:"eventHubAuthorizationRuleId,omitempty"` - Metrics *[]MetricSettings `json:"metrics,omitempty"` - Logs *[]LogSettings `json:"logs,omitempty"` - WorkspaceID *string `json:"workspaceId,omitempty"` +// SmsReceiver is an SMS receiver. +type SmsReceiver struct { + Name *string `json:"name,omitempty"` + CountryCode *string `json:"countryCode,omitempty"` + PhoneNumber *string `json:"phoneNumber,omitempty"` + Status ReceiverStatus `json:"status,omitempty"` } -// ServiceDiagnosticSettingsResource is description of a service diagnostic -// setting -type ServiceDiagnosticSettingsResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *ServiceDiagnosticSettings `json:"properties,omitempty"` -} - -// ThresholdRuleCondition is a rule condition based on a metric crossing a -// threshold. +// ThresholdRuleCondition is a rule condition based on a metric crossing a threshold. type ThresholdRuleCondition struct { - DataSource *RuleDataSource `json:"dataSource,omitempty"` + DataSource RuleDataSource `json:"dataSource,omitempty"` + OdataType OdataType1 `json:"odata.type,omitempty"` Operator ConditionOperator `json:"operator,omitempty"` Threshold *float64 `json:"threshold,omitempty"` WindowSize *string `json:"windowSize,omitempty"` TimeAggregation TimeAggregationOperator `json:"timeAggregation,omitempty"` } +// MarshalJSON is the custom marshaler for ThresholdRuleCondition. +func (trc ThresholdRuleCondition) MarshalJSON() ([]byte, error) { + trc.OdataType = OdataTypeMicrosoftAzureManagementInsightsModelsThresholdRuleCondition + type Alias ThresholdRuleCondition + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(trc), + }) +} + +// AsThresholdRuleCondition is the RuleCondition implementation for ThresholdRuleCondition. +func (trc ThresholdRuleCondition) AsThresholdRuleCondition() (*ThresholdRuleCondition, bool) { + return &trc, true +} + +// AsLocationThresholdRuleCondition is the RuleCondition implementation for ThresholdRuleCondition. +func (trc ThresholdRuleCondition) AsLocationThresholdRuleCondition() (*LocationThresholdRuleCondition, bool) { + return nil, false +} + +// AsManagementEventRuleCondition is the RuleCondition implementation for ThresholdRuleCondition. +func (trc ThresholdRuleCondition) AsManagementEventRuleCondition() (*ManagementEventRuleCondition, bool) { + return nil, false +} + +// UnmarshalJSON is the custom unmarshaler for ThresholdRuleCondition struct. +func (trc *ThresholdRuleCondition) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["operator"] + if v != nil { + var operator ConditionOperator + err = json.Unmarshal(*m["operator"], &operator) + if err != nil { + return err + } + trc.Operator = operator + } + + v = m["threshold"] + if v != nil { + var threshold float64 + err = json.Unmarshal(*m["threshold"], &threshold) + if err != nil { + return err + } + trc.Threshold = &threshold + } + + v = m["windowSize"] + if v != nil { + var windowSize string + err = json.Unmarshal(*m["windowSize"], &windowSize) + if err != nil { + return err + } + trc.WindowSize = &windowSize + } + + v = m["timeAggregation"] + if v != nil { + var timeAggregation TimeAggregationOperator + err = json.Unmarshal(*m["timeAggregation"], &timeAggregation) + if err != nil { + return err + } + trc.TimeAggregation = timeAggregation + } + + v = m["dataSource"] + if v != nil { + dataSource, err := unmarshalRuleDataSource(*m["dataSource"]) + if err != nil { + return err + } + trc.DataSource = dataSource + } + + v = m["odata.type"] + if v != nil { + var odatatype OdataType1 + err = json.Unmarshal(*m["odata.type"], &odatatype) + if err != nil { + return err + } + trc.OdataType = odatatype + } + + return nil +} + // TimeWindow is a specific date-time for the profile. type TimeWindow struct { TimeZone *string `json:"timeZone,omitempty"` @@ -584,3 +1252,9 @@ type WebhookNotification struct { ServiceURI *string `json:"serviceUri,omitempty"` Properties *map[string]*string `json:"properties,omitempty"` } + +// WebhookReceiver is a webhook receiver. +type WebhookReceiver struct { + Name *string `json:"name,omitempty"` + ServiceURI *string `json:"serviceUri,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/operations.go new file mode 100644 index 000000000..b825494ca --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/operations.go @@ -0,0 +1,96 @@ +package monitor + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the monitor Management Client +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available operations from Microsoft.Insights provider. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "monitor.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "monitor.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2015-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/microsoft.insights/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/servicediagnosticsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/servicediagnosticsettings.go deleted file mode 100755 index ead661a31..000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/servicediagnosticsettings.go +++ /dev/null @@ -1,242 +0,0 @@ -package monitor - -// Copyright (c) Microsoft and contributors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "net/http" -) - -// ServiceDiagnosticSettingsClient is the composite Swagger for Monitor -// Management Client -type ServiceDiagnosticSettingsClient struct { - ManagementClient -} - -// NewServiceDiagnosticSettingsClient creates an instance of the -// ServiceDiagnosticSettingsClient client. -func NewServiceDiagnosticSettingsClient(subscriptionID string) ServiceDiagnosticSettingsClient { - return NewServiceDiagnosticSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewServiceDiagnosticSettingsClientWithBaseURI creates an instance of the -// ServiceDiagnosticSettingsClient client. -func NewServiceDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID string) ServiceDiagnosticSettingsClient { - return ServiceDiagnosticSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate create or update new diagnostic settings for the specified -// resource. **WARNING**: This method will be deprecated in future releases. -// -// resourceURI is the identifier of the resource. parameters is parameters -// supplied to the operation. -func (client ServiceDiagnosticSettingsClient) CreateOrUpdate(resourceURI string, parameters ServiceDiagnosticSettingsResource) (result ServiceDiagnosticSettingsResource, err error) { - req, err := client.CreateOrUpdatePreparer(resourceURI, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "CreateOrUpdate", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServiceDiagnosticSettingsClient) CreateOrUpdatePreparer(resourceURI string, parameters ServiceDiagnosticSettingsResource) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceUri": autorest.Encode("path", resourceURI), - } - - const APIVersion = "2016-09-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceDiagnosticSettingsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ServiceDiagnosticSettingsClient) CreateOrUpdateResponder(resp *http.Response) (result ServiceDiagnosticSettingsResource, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Get gets the active diagnostic settings for the specified resource. -// **WARNING**: This method will be deprecated in future releases. -// -// resourceURI is the identifier of the resource. -func (client ServiceDiagnosticSettingsClient) Get(resourceURI string) (result ServiceDiagnosticSettingsResource, err error) { - req, err := client.GetPreparer(resourceURI) - if err != nil { - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "Get", resp, "Failure responding to request") - } - - return -} - -// GetPreparer prepares the Get request. -func (client ServiceDiagnosticSettingsClient) GetPreparer(resourceURI string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceUri": autorest.Encode("path", resourceURI), - } - - const APIVersion = "2016-09-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceDiagnosticSettingsClient) GetSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ServiceDiagnosticSettingsClient) GetResponder(resp *http.Response) (result ServiceDiagnosticSettingsResource, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Update updates an existing ServiceDiagnosticSettingsResource. To update -// other fields use the CreateOrUpdate method. **WARNING**: This method will be -// deprecated in future releases. -// -// resourceURI is the identifier of the resource. -// serviceDiagnosticSettingsResource is parameters supplied to the operation. -func (client ServiceDiagnosticSettingsClient) Update(resourceURI string, serviceDiagnosticSettingsResource ServiceDiagnosticSettingsResource) (result ServiceDiagnosticSettingsResource, err error) { - req, err := client.UpdatePreparer(resourceURI, serviceDiagnosticSettingsResource) - if err != nil { - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "monitor.ServiceDiagnosticSettingsClient", "Update", resp, "Failure responding to request") - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ServiceDiagnosticSettingsClient) UpdatePreparer(resourceURI string, serviceDiagnosticSettingsResource ServiceDiagnosticSettingsResource) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceUri": autorest.Encode("path", resourceURI), - } - - const APIVersion = "2016-09-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{resourceUri}/providers/microsoft.insights/diagnosticSettings/service", pathParameters), - autorest.WithJSON(serviceDiagnosticSettingsResource), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ServiceDiagnosticSettingsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ServiceDiagnosticSettingsClient) UpdateResponder(resp *http.Response) (result ServiceDiagnosticSettingsResource, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go index 5788cfc1f..1500a1502 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/monitor/version.go @@ -14,15 +14,15 @@ package monitor // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-monitor/" + return "Azure-SDK-For-Go/v11.0.0-beta arm-monitor/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/client.go index 5608020c7..ac960b12e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/client.go @@ -18,7 +18,7 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/configurations.go index 065e9079f..216451e62 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/configurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/configurations.go @@ -14,7 +14,7 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/databases.go index f90bf8d5c..864b6e4d1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/databases.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/databases.go @@ -14,7 +14,7 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/firewallrules.go index 8b6301772..67c4b4733 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/firewallrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/firewallrules.go @@ -14,7 +14,7 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/logfiles.go index 19807f871..87eed6aca 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/logfiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/logfiles.go @@ -14,7 +14,7 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/models.go index 71983c769..c8cdfedda 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/models.go @@ -14,24 +14,23 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "encoding/json" "errors" - "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" ) -// CreateMode enumerates the mode to create a new server +// CreateMode enumerates the values for create mode. type CreateMode string const ( - // CreateModeDefault specifies the mode to create a new server + // CreateModeDefault specifies the create mode default state for create mode. CreateModeDefault CreateMode = "Default" - // CreateModePointInTimeRestore specifies the mode to create a new server + // CreateModePointInTimeRestore specifies the create mode point in time restore state for create mode. CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" ) @@ -229,15 +228,16 @@ type ServerForCreate struct { Tags *map[string]*string `json:"tags,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for ServerForCreate model -func (sfc *ServerForCreate) UnmarshalJSON(b []byte) error { +// UnmarshalJSON is the custom unmarshaler for ServerForCreate struct. +func (sfc *ServerForCreate) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage - err := json.Unmarshal(b, &m) + err := json.Unmarshal(body, &m) if err != nil { return err } + var v *json.RawMessage - v := m["sku"] + v = m["sku"] if v != nil { var sku Sku err = json.Unmarshal(*m["sku"], &sku) @@ -249,11 +249,11 @@ func (sfc *ServerForCreate) UnmarshalJSON(b []byte) error { v = m["properties"] if v != nil { - p, err := unmarshalServerPropertiesForCreate(*m["properties"]) + properties, err := unmarshalServerPropertiesForCreate(*m["properties"]) if err != nil { return err } - sfc.Properties = p + sfc.Properties = properties } v = m["location"] @@ -279,27 +279,6 @@ func (sfc *ServerForCreate) UnmarshalJSON(b []byte) error { return nil } -func unmarshalServerPropertiesForCreate(b []byte) (ServerPropertiesForCreate, error) { - var m map[string]interface{} - err := json.Unmarshal(b, &m) - if err != nil { - return nil, err - } - - switch m["createMode"] { - case string(CreateModeDefault): - var spfdc ServerPropertiesForDefaultCreate - err := json.Unmarshal(b, &spfdc) - return spfdc, err - case string(CreateModePointInTimeRestore): - var spfr ServerPropertiesForRestore - err := json.Unmarshal(b, &spfr) - return spfr, err - default: - return nil, errors.New("Unsupported type") - } -} - // ServerListResult is a list of servers. type ServerListResult struct { autorest.Response `json:"-"` @@ -316,23 +295,62 @@ type ServerProperties struct { FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` } -// ServerPropertiesForCreate is interface used for polymorphic Properties in ServerForCreate +// ServerPropertiesForCreate is the properties used to create a new server. type ServerPropertiesForCreate interface { AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) } +func unmarshalServerPropertiesForCreate(body []byte) (ServerPropertiesForCreate, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["createMode"] { + case string(CreateModeDefault): + var spfdc ServerPropertiesForDefaultCreate + err := json.Unmarshal(body, &spfdc) + return spfdc, err + case string(CreateModePointInTimeRestore): + var spfr ServerPropertiesForRestore + err := json.Unmarshal(body, &spfr) + return spfr, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalServerPropertiesForCreateArray(body []byte) ([]ServerPropertiesForCreate, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + spfcArray := make([]ServerPropertiesForCreate, len(rawMessages)) + + for index, rawMessage := range rawMessages { + spfc, err := unmarshalServerPropertiesForCreate(*rawMessage) + if err != nil { + return nil, err + } + spfcArray[index] = spfc + } + return spfcArray, nil +} + // ServerPropertiesForDefaultCreate is the properties used to create a new server. type ServerPropertiesForDefaultCreate struct { - CreateMode CreateMode `json:"createMode,omitempty"` StorageMB *int64 `json:"storageMB,omitempty"` Version ServerVersion `json:"version,omitempty"` SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + CreateMode CreateMode `json:"createMode,omitempty"` AdministratorLogin *string `json:"administratorLogin,omitempty"` AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` } -// MarshalJSON is the custom marshaler for ServerPropertiesForDefaultCreate +// MarshalJSON is the custom marshaler for ServerPropertiesForDefaultCreate. func (spfdc ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { spfdc.CreateMode = CreateModeDefault type Alias ServerPropertiesForDefaultCreate @@ -343,27 +361,27 @@ func (spfdc ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { }) } -// AsServerPropertiesForDefaultCreate is the IServerPropertiesForCreate for ServerPropertiesForDefaultCreate +// AsServerPropertiesForDefaultCreate is the ServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { return &spfdc, true } -// AsServerPropertiesForRestore is the IServerPropertiesForCreate for ServerPropertiesForDefaultCreate +// AsServerPropertiesForRestore is the ServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { return nil, false } // ServerPropertiesForRestore is the properties to a new server by restoring from a backup. type ServerPropertiesForRestore struct { - CreateMode CreateMode `json:"createMode,omitempty"` StorageMB *int64 `json:"storageMB,omitempty"` Version ServerVersion `json:"version,omitempty"` SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + CreateMode CreateMode `json:"createMode,omitempty"` SourceServerID *string `json:"sourceServerId,omitempty"` RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` } -// MarshalJSON is the custom marshaler for ServerPropertiesForRestore +// MarshalJSON is the custom marshaler for ServerPropertiesForRestore. func (spfr ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { spfr.CreateMode = CreateModePointInTimeRestore type Alias ServerPropertiesForRestore @@ -374,14 +392,14 @@ func (spfr ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { }) } -// AsServerPropertiesForDefaultCreate is the IServerPropertiesForCreate for ServerPropertiesForRestore +// AsServerPropertiesForDefaultCreate is the ServerPropertiesForCreate implementation for ServerPropertiesForRestore. func (spfr ServerPropertiesForRestore) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { return nil, false } -// AsServerPropertiesForRestore is the IServerPropertiesForCreate for ServerPropertiesForRestore +// AsServerPropertiesForRestore is the ServerPropertiesForCreate implementation for ServerPropertiesForRestore. func (spfr ServerPropertiesForRestore) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { - return &spfr, false + return &spfr, true } // ServerUpdateParameters is parameters allowd to update for a server. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/mysql_test.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/mysql_test.go index cf3087c97..889d113b6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/mysql_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/mysql_test.go @@ -1,5 +1,19 @@ package mysql +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/json" "testing" @@ -23,9 +37,9 @@ var ( "capacity": 100 }, "properties": { - "createMode": "Default", "storageMB": 1024, "sslEnforcement": "Enabled", + "createMode": "Default", "administratorLogin": "cloudsa", "administratorLoginPassword": "password" }, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/operations.go index 6aa028ace..59946f8fe 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/operations.go @@ -14,7 +14,7 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/servers.go index bddf7b710..ee01c0ae2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/servers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/servers.go @@ -14,7 +14,7 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go index 0c6094d0f..d61968f2b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/mysql/version.go @@ -14,15 +14,15 @@ package mysql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-mysql/2017-04-30-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-mysql/2017-04-30-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go index 4ab4e0734..c000be117 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationgateways.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,27 @@ import ( "net/http" ) -// ApplicationGatewaysClient is the composite Swagger for Network Client +// ApplicationGatewaysClient is the network Client type ApplicationGatewaysClient struct { ManagementClient } -// NewApplicationGatewaysClient creates an instance of the -// ApplicationGatewaysClient client. +// NewApplicationGatewaysClient creates an instance of the ApplicationGatewaysClient client. func NewApplicationGatewaysClient(subscriptionID string) ApplicationGatewaysClient { return NewApplicationGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplicationGatewaysClientWithBaseURI creates an instance of the -// ApplicationGatewaysClient client. +// NewApplicationGatewaysClientWithBaseURI creates an instance of the ApplicationGatewaysClient client. func NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID string) ApplicationGatewaysClient { return ApplicationGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// BackendHealth gets the backend health of the specified application gateway -// in a resource group. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// BackendHealth gets the backend health of the specified application gateway in a resource group. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. applicationGatewayName -// is the name of the application gateway. expand is expands BackendAddressPool -// and BackendHttpSettings referenced in backend health. +// resourceGroupName is the name of the resource group. applicationGatewayName is the name of the application gateway. +// expand is expands BackendAddressPool and BackendHttpSettings referenced in backend health. func (client ApplicationGatewaysClient) BackendHealth(resourceGroupName string, applicationGatewayName string, expand string, cancel <-chan struct{}) (<-chan ApplicationGatewayBackendHealth, <-chan error) { resultChan := make(chan ApplicationGatewayBackendHealth, 1) errChan := make(chan error, 1) @@ -57,8 +52,10 @@ func (client ApplicationGatewaysClient) BackendHealth(resourceGroupName string, var err error var result ApplicationGatewayBackendHealth defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -91,7 +88,7 @@ func (client ApplicationGatewaysClient) BackendHealthPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -128,14 +125,12 @@ func (client ApplicationGatewaysClient) BackendHealthResponder(resp *http.Respon return } -// CreateOrUpdate creates or updates the specified application gateway. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// CreateOrUpdate creates or updates the specified application gateway. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. applicationGatewayName -// is the name of the application gateway. parameters is parameters supplied to -// the create or update application gateway operation. +// resourceGroupName is the name of the resource group. applicationGatewayName is the name of the application gateway. +// parameters is parameters supplied to the create or update application gateway operation. func (client ApplicationGatewaysClient) CreateOrUpdate(resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway, cancel <-chan struct{}) (<-chan ApplicationGateway, <-chan error) { resultChan := make(chan ApplicationGateway, 1) errChan := make(chan error, 1) @@ -158,8 +153,10 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(resourceGroupName string, var err error var result ApplicationGateway defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -192,7 +189,7 @@ func (client ApplicationGatewaysClient) CreateOrUpdatePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -228,13 +225,10 @@ func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Respo return } -// Delete deletes the specified application gateway. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified application gateway. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. applicationGatewayName -// is the name of the application gateway. +// resourceGroupName is the name of the resource group. applicationGatewayName is the name of the application gateway. func (client ApplicationGatewaysClient) Delete(resourceGroupName string, applicationGatewayName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -242,8 +236,10 @@ func (client ApplicationGatewaysClient) Delete(resourceGroupName string, applica var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -276,7 +272,7 @@ func (client ApplicationGatewaysClient) DeletePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -311,8 +307,7 @@ func (client ApplicationGatewaysClient) DeleteResponder(resp *http.Response) (re // Get gets the specified application gateway. // -// resourceGroupName is the name of the resource group. applicationGatewayName -// is the name of the application gateway. +// resourceGroupName is the name of the resource group. applicationGatewayName is the name of the application gateway. func (client ApplicationGatewaysClient) Get(resourceGroupName string, applicationGatewayName string) (result ApplicationGateway, err error) { req, err := client.GetPreparer(resourceGroupName, applicationGatewayName) if err != nil { @@ -343,7 +338,7 @@ func (client ApplicationGatewaysClient) GetPreparer(resourceGroupName string, ap "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -375,6 +370,70 @@ func (client ApplicationGatewaysClient) GetResponder(resp *http.Response) (resul return } +// GetSslPredefinedPolicy gets Ssl predefined policy with the specified policy name. +// +// predefinedPolicyName is name of Ssl predefined policy. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicy(predefinedPolicyName string) (result ApplicationGatewaySslPredefinedPolicy, err error) { + req, err := client.GetSslPredefinedPolicyPreparer(predefinedPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", nil, "Failure preparing request") + return + } + + resp, err := client.GetSslPredefinedPolicySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure sending request") + return + } + + result, err = client.GetSslPredefinedPolicyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", resp, "Failure responding to request") + } + + return +} + +// GetSslPredefinedPolicyPreparer prepares the GetSslPredefinedPolicy request. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicyPreparer(predefinedPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "predefinedPolicyName": autorest.Encode("path", predefinedPolicyName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSslPredefinedPolicySender sends the GetSslPredefinedPolicy request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetSslPredefinedPolicyResponder handles the response to the GetSslPredefinedPolicy request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) GetSslPredefinedPolicyResponder(resp *http.Response) (result ApplicationGatewaySslPredefinedPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List lists all application gateways in a resource group. // // resourceGroupName is the name of the resource group. @@ -407,7 +466,7 @@ func (client ApplicationGatewaysClient) ListPreparer(resourceGroupName string) ( "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -463,6 +522,51 @@ func (client ApplicationGatewaysClient) ListNextResults(lastResults ApplicationG return } +// ListComplete gets all elements from the list without paging. +func (client ApplicationGatewaysClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ApplicationGateway, <-chan error) { + resultChan := make(chan ApplicationGateway) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all the application gateways in a subscription. func (client ApplicationGatewaysClient) ListAll() (result ApplicationGatewayListResult, err error) { req, err := client.ListAllPreparer() @@ -492,7 +596,7 @@ func (client ApplicationGatewaysClient) ListAllPreparer() (*http.Request, error) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -548,8 +652,243 @@ func (client ApplicationGatewaysClient) ListAllNextResults(lastResults Applicati return } -// ListAvailableWafRuleSets lists all available web application firewall rule -// sets. +// ListAllComplete gets all elements from the list without paging. +func (client ApplicationGatewaysClient) ListAllComplete(cancel <-chan struct{}) (<-chan ApplicationGateway, <-chan error) { + resultChan := make(chan ApplicationGateway) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAvailableSslOptions lists available Ssl options for configuring Ssl policy. +func (client ApplicationGatewaysClient) ListAvailableSslOptions() (result ApplicationGatewayAvailableSslOptions, err error) { + req, err := client.ListAvailableSslOptionsPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableSslOptionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableSslOptionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", resp, "Failure responding to request") + } + + return +} + +// ListAvailableSslOptionsPreparer prepares the ListAvailableSslOptions request. +func (client ApplicationGatewaysClient) ListAvailableSslOptionsPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListAvailableSslOptionsSender sends the ListAvailableSslOptions request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableSslOptionsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListAvailableSslOptionsResponder handles the response to the ListAvailableSslOptions request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableSslOptionsResponder(resp *http.Response) (result ApplicationGatewayAvailableSslOptions, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableSslPredefinedPolicies lists all SSL predefined policies for configuring Ssl policy. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies() (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) { + req, err := client.ListAvailableSslPredefinedPoliciesPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableSslPredefinedPoliciesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableSslPredefinedPoliciesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure responding to request") + } + + return +} + +// ListAvailableSslPredefinedPoliciesPreparer prepares the ListAvailableSslPredefinedPolicies request. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListAvailableSslPredefinedPoliciesSender sends the ListAvailableSslPredefinedPolicies request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListAvailableSslPredefinedPoliciesResponder handles the response to the ListAvailableSslPredefinedPolicies request. The method always +// closes the http.Response Body. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesResponder(resp *http.Response) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAvailableSslPredefinedPoliciesNextResults retrieves the next set of results, if any. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesNextResults(lastResults ApplicationGatewayAvailableSslPredefinedPolicies) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) { + req, err := lastResults.ApplicationGatewayAvailableSslPredefinedPoliciesPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListAvailableSslPredefinedPoliciesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure sending next results request") + } + + result, err = client.ListAvailableSslPredefinedPoliciesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslPredefinedPolicies", resp, "Failure responding to next results request") + } + + return +} + +// ListAvailableSslPredefinedPoliciesComplete gets all elements from the list without paging. +func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(cancel <-chan struct{}) (<-chan ApplicationGatewaySslPredefinedPolicy, <-chan error) { + resultChan := make(chan ApplicationGatewaySslPredefinedPolicy) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAvailableSslPredefinedPolicies() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAvailableSslPredefinedPoliciesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAvailableWafRuleSets lists all available web application firewall rule sets. func (client ApplicationGatewaysClient) ListAvailableWafRuleSets() (result ApplicationGatewayAvailableWafRuleSetsResult, err error) { req, err := client.ListAvailableWafRuleSetsPreparer() if err != nil { @@ -578,7 +917,7 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsPreparer() (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -610,13 +949,10 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsResponder(resp * return } -// Start starts the specified application gateway. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Start starts the specified application gateway. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. applicationGatewayName -// is the name of the application gateway. +// resourceGroupName is the name of the resource group. applicationGatewayName is the name of the application gateway. func (client ApplicationGatewaysClient) Start(resourceGroupName string, applicationGatewayName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -624,8 +960,10 @@ func (client ApplicationGatewaysClient) Start(resourceGroupName string, applicat var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -658,7 +996,7 @@ func (client ApplicationGatewaysClient) StartPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -691,13 +1029,11 @@ func (client ApplicationGatewaysClient) StartResponder(resp *http.Response) (res return } -// Stop stops the specified application gateway in a resource group. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Stop stops the specified application gateway in a resource group. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the resource group. applicationGatewayName -// is the name of the application gateway. +// resourceGroupName is the name of the resource group. applicationGatewayName is the name of the application gateway. func (client ApplicationGatewaysClient) Stop(resourceGroupName string, applicationGatewayName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -705,8 +1041,10 @@ func (client ApplicationGatewaysClient) Stop(resourceGroupName string, applicati var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -739,7 +1077,7 @@ func (client ApplicationGatewaysClient) StopPreparer(resourceGroupName string, a "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationsecuritygroups.go new file mode 100644 index 000000000..1e84e7064 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/applicationsecuritygroups.go @@ -0,0 +1,535 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ApplicationSecurityGroupsClient is the network Client +type ApplicationSecurityGroupsClient struct { + ManagementClient +} + +// NewApplicationSecurityGroupsClient creates an instance of the ApplicationSecurityGroupsClient client. +func NewApplicationSecurityGroupsClient(subscriptionID string) ApplicationSecurityGroupsClient { + return NewApplicationSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewApplicationSecurityGroupsClientWithBaseURI creates an instance of the ApplicationSecurityGroupsClient client. +func NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) ApplicationSecurityGroupsClient { + return ApplicationSecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an application security group. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group. applicationSecurityGroupName is the name of the application +// security group. parameters is parameters supplied to the create or update ApplicationSecurityGroup operation. +func (client ApplicationSecurityGroupsClient) CreateOrUpdate(resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, cancel <-chan struct{}) (<-chan ApplicationSecurityGroup, <-chan error) { + resultChan := make(chan ApplicationSecurityGroup, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result ApplicationSecurityGroup + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, applicationSecurityGroupName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ApplicationSecurityGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified application security group. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group. applicationSecurityGroupName is the name of the application +// security group. +func (client ApplicationSecurityGroupsClient) Delete(resourceGroupName string, applicationSecurityGroupName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, applicationSecurityGroupName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client ApplicationSecurityGroupsClient) DeletePreparer(resourceGroupName string, applicationSecurityGroupName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusAccepted, http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets information about the specified application security group. +// +// resourceGroupName is the name of the resource group. applicationSecurityGroupName is the name of the application +// security group. +func (client ApplicationSecurityGroupsClient) Get(resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroup, err error) { + req, err := client.GetPreparer(resourceGroupName, applicationSecurityGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ApplicationSecurityGroupsClient) GetPreparer(resourceGroupName string, applicationSecurityGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "applicationSecurityGroupName": autorest.Encode("path", applicationSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) GetResponder(resp *http.Response) (result ApplicationSecurityGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the application security groups in a resource group. +// +// resourceGroupName is the name of the resource group. +func (client ApplicationSecurityGroupsClient) List(resourceGroupName string) (result ApplicationSecurityGroupListResult, err error) { + req, err := client.ListPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ApplicationSecurityGroupsClient) ListPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) ListResponder(resp *http.Response) (result ApplicationSecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client ApplicationSecurityGroupsClient) ListNextResults(lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) { + req, err := lastResults.ApplicationSecurityGroupListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client ApplicationSecurityGroupsClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ApplicationSecurityGroup, <-chan error) { + resultChan := make(chan ApplicationSecurityGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAll gets all application security groups in a subscription. +func (client ApplicationSecurityGroupsClient) ListAll() (result ApplicationSecurityGroupListResult, err error) { + req, err := client.ListAllPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", nil, "Failure preparing request") + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure sending request") + return + } + + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure responding to request") + } + + return +} + +// ListAllPreparer prepares the ListAll request. +func (client ApplicationSecurityGroupsClient) ListAllPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListAllSender sends the ListAll request. The method will close the +// http.Response Body if it receives an error. +func (client ApplicationSecurityGroupsClient) ListAllSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListAllResponder handles the response to the ListAll request. The method always +// closes the http.Response Body. +func (client ApplicationSecurityGroupsClient) ListAllResponder(resp *http.Response) (result ApplicationSecurityGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListAllNextResults retrieves the next set of results, if any. +func (client ApplicationSecurityGroupsClient) ListAllNextResults(lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) { + req, err := lastResults.ApplicationSecurityGroupListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListAllSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure sending next results request") + } + + result, err = client.ListAllResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "ListAll", resp, "Failure responding to next results request") + } + + return +} + +// ListAllComplete gets all elements from the list without paging. +func (client ApplicationSecurityGroupsClient) ListAllComplete(cancel <-chan struct{}) (<-chan ApplicationSecurityGroup, <-chan error) { + resultChan := make(chan ApplicationSecurityGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/availableendpointservices.go new file mode 100644 index 000000000..26bcaf8b6 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/availableendpointservices.go @@ -0,0 +1,172 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// AvailableEndpointServicesClient is the network Client +type AvailableEndpointServicesClient struct { + ManagementClient +} + +// NewAvailableEndpointServicesClient creates an instance of the AvailableEndpointServicesClient client. +func NewAvailableEndpointServicesClient(subscriptionID string) AvailableEndpointServicesClient { + return NewAvailableEndpointServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAvailableEndpointServicesClientWithBaseURI creates an instance of the AvailableEndpointServicesClient client. +func NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionID string) AvailableEndpointServicesClient { + return AvailableEndpointServicesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list what values of endpoint services are available for use. +// +// location is the location to check available endpoint services. +func (client AvailableEndpointServicesClient) List(location string) (result EndpointServicesListResult, err error) { + req, err := client.ListPreparer(location) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client AvailableEndpointServicesClient) ListPreparer(location string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client AvailableEndpointServicesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client AvailableEndpointServicesClient) ListResponder(resp *http.Response) (result EndpointServicesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client AvailableEndpointServicesClient) ListNextResults(lastResults EndpointServicesListResult) (result EndpointServicesListResult, err error) { + req, err := lastResults.EndpointServicesListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client AvailableEndpointServicesClient) ListComplete(location string, cancel <-chan struct{}) (<-chan EndpointServiceResult, <-chan error) { + resultChan := make(chan EndpointServiceResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(location) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/bgpservicecommunities.go index 5024f5164..10cfa2cdd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/bgpservicecommunities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/bgpservicecommunities.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,19 +23,17 @@ import ( "net/http" ) -// BgpServiceCommunitiesClient is the composite Swagger for Network Client +// BgpServiceCommunitiesClient is the network Client type BgpServiceCommunitiesClient struct { ManagementClient } -// NewBgpServiceCommunitiesClient creates an instance of the -// BgpServiceCommunitiesClient client. +// NewBgpServiceCommunitiesClient creates an instance of the BgpServiceCommunitiesClient client. func NewBgpServiceCommunitiesClient(subscriptionID string) BgpServiceCommunitiesClient { return NewBgpServiceCommunitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the -// BgpServiceCommunitiesClient client. +// NewBgpServiceCommunitiesClientWithBaseURI creates an instance of the BgpServiceCommunitiesClient client. func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID string) BgpServiceCommunitiesClient { return BgpServiceCommunitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -70,7 +67,7 @@ func (client BgpServiceCommunitiesClient) ListPreparer() (*http.Request, error) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,3 +122,48 @@ func (client BgpServiceCommunitiesClient) ListNextResults(lastResults BgpService return } + +// ListComplete gets all elements from the list without paging. +func (client BgpServiceCommunitiesClient) ListComplete(cancel <-chan struct{}) (<-chan BgpServiceCommunity, <-chan error) { + resultChan := make(chan BgpServiceCommunity) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go index ec5bf7ced..a3576c393 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/client.go @@ -1,6 +1,6 @@ // Package network implements the Azure ARM Network service API version . // -// Composite Swagger for Network Client +// Network Client package network // Copyright (c) Microsoft and contributors. All rights reserved. @@ -17,9 +17,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -53,12 +52,10 @@ func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { } } -// CheckDNSNameAvailability checks whether a domain name in the cloudapp.net -// zone is available for use. +// CheckDNSNameAvailability checks whether a domain name in the cloudapp.azure.com zone is available for use. // -// location is the location of the domain name. domainNameLabel is the domain -// name to be verified. It must conform to the following regular expression: -// ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. +// location is the location of the domain name. domainNameLabel is the domain name to be verified. It must conform to +// the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. func (client ManagementClient) CheckDNSNameAvailability(location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) { req, err := client.CheckDNSNameAvailabilityPreparer(location, domainNameLabel) if err != nil { @@ -88,12 +85,10 @@ func (client ManagementClient) CheckDNSNameAvailabilityPreparer(location string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(domainNameLabel) > 0 { - queryParameters["domainNameLabel"] = autorest.Encode("query", domainNameLabel) + "api-version": APIVersion, + "domainNameLabel": autorest.Encode("query", domainNameLabel), } preparer := autorest.CreatePreparer( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/defaultsecurityrules.go new file mode 100644 index 000000000..9a3ded19d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/defaultsecurityrules.go @@ -0,0 +1,241 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DefaultSecurityRulesClient is the network Client +type DefaultSecurityRulesClient struct { + ManagementClient +} + +// NewDefaultSecurityRulesClient creates an instance of the DefaultSecurityRulesClient client. +func NewDefaultSecurityRulesClient(subscriptionID string) DefaultSecurityRulesClient { + return NewDefaultSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDefaultSecurityRulesClientWithBaseURI creates an instance of the DefaultSecurityRulesClient client. +func NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) DefaultSecurityRulesClient { + return DefaultSecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get get the specified default network security rule. +// +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. defaultSecurityRuleName is the name of the default security rule. +func (client DefaultSecurityRulesClient) Get(resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (result SecurityRule, err error) { + req, err := client.GetPreparer(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DefaultSecurityRulesClient) GetPreparer(resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "defaultSecurityRuleName": autorest.Encode("path", defaultSecurityRuleName), + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DefaultSecurityRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DefaultSecurityRulesClient) GetResponder(resp *http.Response) (result SecurityRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all default security rules in a network security group. +// +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. +func (client DefaultSecurityRulesClient) List(resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, networkSecurityGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client DefaultSecurityRulesClient) ListPreparer(resourceGroupName string, networkSecurityGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkSecurityGroupName": autorest.Encode("path", networkSecurityGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client DefaultSecurityRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client DefaultSecurityRulesClient) ListResponder(resp *http.Response) (result SecurityRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client DefaultSecurityRulesClient) ListNextResults(lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) { + req, err := lastResults.SecurityRuleListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client DefaultSecurityRulesClient) ListComplete(resourceGroupName string, networkSecurityGroupName string, cancel <-chan struct{}) (<-chan SecurityRule, <-chan error) { + resultChan := make(chan SecurityRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, networkSecurityGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go index feb974fb9..9b7fd524e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitauthorizations.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,33 +23,30 @@ import ( "net/http" ) -// ExpressRouteCircuitAuthorizationsClient is the composite Swagger for Network -// Client +// ExpressRouteCircuitAuthorizationsClient is the network Client type ExpressRouteCircuitAuthorizationsClient struct { ManagementClient } -// NewExpressRouteCircuitAuthorizationsClient creates an instance of the -// ExpressRouteCircuitAuthorizationsClient client. +// NewExpressRouteCircuitAuthorizationsClient creates an instance of the ExpressRouteCircuitAuthorizationsClient +// client. func NewExpressRouteCircuitAuthorizationsClient(subscriptionID string) ExpressRouteCircuitAuthorizationsClient { return NewExpressRouteCircuitAuthorizationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of -// the ExpressRouteCircuitAuthorizationsClient client. +// NewExpressRouteCircuitAuthorizationsClientWithBaseURI creates an instance of the +// ExpressRouteCircuitAuthorizationsClient client. func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitAuthorizationsClient { return ExpressRouteCircuitAuthorizationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates an authorization in the specified express -// route circuit. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates or updates an authorization in the specified express route circuit. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. authorizationName is the name of the -// authorization. authorizationParameters is parameters supplied to the create -// or update express route circuit authorization operation. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// authorizationName is the name of the authorization. authorizationParameters is parameters supplied to the create or +// update express route circuit authorization operation. func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization, cancel <-chan struct{}) (<-chan ExpressRouteCircuitAuthorization, <-chan error) { resultChan := make(chan ExpressRouteCircuitAuthorization, 1) errChan := make(chan error, 1) @@ -58,8 +54,10 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(resourceGro var err error var result ExpressRouteCircuitAuthorization defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -93,7 +91,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdatePreparer(res "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -129,14 +127,12 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(re return } -// Delete deletes the specified authorization from the specified express route -// circuit. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel +// Delete deletes the specified authorization from the specified express route circuit. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. authorizationName is the name of the -// authorization. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// authorizationName is the name of the authorization. func (client ExpressRouteCircuitAuthorizationsClient) Delete(resourceGroupName string, circuitName string, authorizationName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -144,8 +140,10 @@ func (client ExpressRouteCircuitAuthorizationsClient) Delete(resourceGroupName s var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -179,7 +177,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeletePreparer(resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -212,12 +210,10 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteResponder(resp *http return } -// Get gets the specified authorization from the specified express route -// circuit. +// Get gets the specified authorization from the specified express route circuit. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. authorizationName is the name of the -// authorization. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// authorizationName is the name of the authorization. func (client ExpressRouteCircuitAuthorizationsClient) Get(resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorization, err error) { req, err := client.GetPreparer(resourceGroupName, circuitName, authorizationName) if err != nil { @@ -249,7 +245,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetPreparer(resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -283,8 +279,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Re // List gets all authorizations in an express route circuit. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the circuit. +// resourceGroupName is the name of the resource group. circuitName is the name of the circuit. func (client ExpressRouteCircuitAuthorizationsClient) List(resourceGroupName string, circuitName string) (result AuthorizationListResult, err error) { req, err := client.ListPreparer(resourceGroupName, circuitName) if err != nil { @@ -315,7 +310,7 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListPreparer(resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -370,3 +365,48 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListNextResults(lastResult return } + +// ListComplete gets all elements from the list without paging. +func (client ExpressRouteCircuitAuthorizationsClient) ListComplete(resourceGroupName string, circuitName string, cancel <-chan struct{}) (<-chan ExpressRouteCircuitAuthorization, <-chan error) { + resultChan := make(chan ExpressRouteCircuitAuthorization) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, circuitName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go index 28b926f24..af9fc67e0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuitpeerings.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,27 @@ import ( "net/http" ) -// ExpressRouteCircuitPeeringsClient is the composite Swagger for Network -// Client +// ExpressRouteCircuitPeeringsClient is the network Client type ExpressRouteCircuitPeeringsClient struct { ManagementClient } -// NewExpressRouteCircuitPeeringsClient creates an instance of the -// ExpressRouteCircuitPeeringsClient client. +// NewExpressRouteCircuitPeeringsClient creates an instance of the ExpressRouteCircuitPeeringsClient client. func NewExpressRouteCircuitPeeringsClient(subscriptionID string) ExpressRouteCircuitPeeringsClient { return NewExpressRouteCircuitPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitPeeringsClient client. +// NewExpressRouteCircuitPeeringsClientWithBaseURI creates an instance of the ExpressRouteCircuitPeeringsClient client. func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitPeeringsClient { return ExpressRouteCircuitPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a peering in the specified express route -// circuits. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates or updates a peering in the specified express route circuits. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. peeringName is the name of the peering. -// peeringParameters is parameters supplied to the create or update express +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// peeringName is the name of the peering. peeringParameters is parameters supplied to the create or update express // route circuit peering operation. func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering, cancel <-chan struct{}) (<-chan ExpressRouteCircuitPeering, <-chan error) { resultChan := make(chan ExpressRouteCircuitPeering, 1) @@ -58,8 +52,10 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(resourceGroupName var err error var result ExpressRouteCircuitPeering defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -93,7 +89,7 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdatePreparer(resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -129,13 +125,12 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *ht return } -// Delete deletes the specified peering from the specified express route -// circuit. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// Delete deletes the specified peering from the specified express route circuit. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. peeringName is the name of the peering. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// peeringName is the name of the peering. func (client ExpressRouteCircuitPeeringsClient) Delete(resourceGroupName string, circuitName string, peeringName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -143,8 +138,10 @@ func (client ExpressRouteCircuitPeeringsClient) Delete(resourceGroupName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -178,7 +175,7 @@ func (client ExpressRouteCircuitPeeringsClient) DeletePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -211,11 +208,10 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Respo return } -// Get gets the specified authorization from the specified express route -// circuit. +// Get gets the specified authorization from the specified express route circuit. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. peeringName is the name of the peering. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// peeringName is the name of the peering. func (client ExpressRouteCircuitPeeringsClient) Get(resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeering, err error) { req, err := client.GetPreparer(resourceGroupName, circuitName, peeringName) if err != nil { @@ -247,7 +243,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetPreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,8 +277,7 @@ func (client ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response // List gets all peerings in a specified express route circuit. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. func (client ExpressRouteCircuitPeeringsClient) List(resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResult, err error) { req, err := client.ListPreparer(resourceGroupName, circuitName) if err != nil { @@ -313,7 +308,7 @@ func (client ExpressRouteCircuitPeeringsClient) ListPreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -368,3 +363,48 @@ func (client ExpressRouteCircuitPeeringsClient) ListNextResults(lastResults Expr return } + +// ListComplete gets all elements from the list without paging. +func (client ExpressRouteCircuitPeeringsClient) ListComplete(resourceGroupName string, circuitName string, cancel <-chan struct{}) (<-chan ExpressRouteCircuitPeering, <-chan error) { + resultChan := make(chan ExpressRouteCircuitPeering) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, circuitName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go index b60aa10a4..63cfeff9e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressroutecircuits.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,31 +23,27 @@ import ( "net/http" ) -// ExpressRouteCircuitsClient is the composite Swagger for Network Client +// ExpressRouteCircuitsClient is the network Client type ExpressRouteCircuitsClient struct { ManagementClient } -// NewExpressRouteCircuitsClient creates an instance of the -// ExpressRouteCircuitsClient client. +// NewExpressRouteCircuitsClient creates an instance of the ExpressRouteCircuitsClient client. func NewExpressRouteCircuitsClient(subscriptionID string) ExpressRouteCircuitsClient { return NewExpressRouteCircuitsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the -// ExpressRouteCircuitsClient client. +// NewExpressRouteCircuitsClientWithBaseURI creates an instance of the ExpressRouteCircuitsClient client. func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteCircuitsClient { return ExpressRouteCircuitsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates an express route circuit. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates an express route circuit. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the circuit. parameters is parameters supplied to the create or update -// express route circuit operation. +// resourceGroupName is the name of the resource group. circuitName is the name of the circuit. parameters is +// parameters supplied to the create or update express route circuit operation. func (client ExpressRouteCircuitsClient) CreateOrUpdate(resourceGroupName string, circuitName string, parameters ExpressRouteCircuit, cancel <-chan struct{}) (<-chan ExpressRouteCircuit, <-chan error) { resultChan := make(chan ExpressRouteCircuit, 1) errChan := make(chan error, 1) @@ -56,8 +51,10 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdate(resourceGroupName string var err error var result ExpressRouteCircuit defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -90,7 +87,7 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdatePreparer(resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -126,13 +123,10 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Resp return } -// Delete deletes the specified express route circuit. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified express route circuit. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. func (client ExpressRouteCircuitsClient) Delete(resourceGroupName string, circuitName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -140,8 +134,10 @@ func (client ExpressRouteCircuitsClient) Delete(resourceGroupName string, circui var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -174,7 +170,7 @@ func (client ExpressRouteCircuitsClient) DeletePreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -209,8 +205,7 @@ func (client ExpressRouteCircuitsClient) DeleteResponder(resp *http.Response) (r // Get gets information about the specified express route circuit. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of express route circuit. +// resourceGroupName is the name of the resource group. circuitName is the name of express route circuit. func (client ExpressRouteCircuitsClient) Get(resourceGroupName string, circuitName string) (result ExpressRouteCircuit, err error) { req, err := client.GetPreparer(resourceGroupName, circuitName) if err != nil { @@ -241,7 +236,7 @@ func (client ExpressRouteCircuitsClient) GetPreparer(resourceGroupName string, c "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -273,11 +268,10 @@ func (client ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (resu return } -// GetPeeringStats gets all stats from an express route circuit in a resource -// group. +// GetPeeringStats gets all stats from an express route circuit in a resource group. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. peeringName is the name of the peering. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// peeringName is the name of the peering. func (client ExpressRouteCircuitsClient) GetPeeringStats(resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitStats, err error) { req, err := client.GetPeeringStatsPreparer(resourceGroupName, circuitName, peeringName) if err != nil { @@ -309,7 +303,7 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsPreparer(resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -341,11 +335,9 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsResponder(resp *http.Res return } -// GetStats gets all the stats from an express route circuit in a resource -// group. +// GetStats gets all the stats from an express route circuit in a resource group. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. func (client ExpressRouteCircuitsClient) GetStats(resourceGroupName string, circuitName string) (result ExpressRouteCircuitStats, err error) { req, err := client.GetStatsPreparer(resourceGroupName, circuitName) if err != nil { @@ -376,7 +368,7 @@ func (client ExpressRouteCircuitsClient) GetStatsPreparer(resourceGroupName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -440,7 +432,7 @@ func (client ExpressRouteCircuitsClient) ListPreparer(resourceGroupName string) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -496,6 +488,51 @@ func (client ExpressRouteCircuitsClient) ListNextResults(lastResults ExpressRout return } +// ListComplete gets all elements from the list without paging. +func (client ExpressRouteCircuitsClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ExpressRouteCircuit, <-chan error) { + resultChan := make(chan ExpressRouteCircuit) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all the express route circuits in a subscription. func (client ExpressRouteCircuitsClient) ListAll() (result ExpressRouteCircuitListResult, err error) { req, err := client.ListAllPreparer() @@ -525,7 +562,7 @@ func (client ExpressRouteCircuitsClient) ListAllPreparer() (*http.Request, error "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -581,15 +618,57 @@ func (client ExpressRouteCircuitsClient) ListAllNextResults(lastResults ExpressR return } -// ListArpTable gets the currently advertised ARP table associated with the -// express route circuit in a resource group. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ListAllComplete gets all elements from the list without paging. +func (client ExpressRouteCircuitsClient) ListAllComplete(cancel <-chan struct{}) (<-chan ExpressRouteCircuit, <-chan error) { + resultChan := make(chan ExpressRouteCircuit) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListArpTable gets the currently advertised ARP table associated with the express route circuit in a resource group. +// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel +// will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. peeringName is the name of the peering. -// devicePath is the path of the device. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// peeringName is the name of the peering. devicePath is the path of the device. func (client ExpressRouteCircuitsClient) ListArpTable(resourceGroupName string, circuitName string, peeringName string, devicePath string, cancel <-chan struct{}) (<-chan ExpressRouteCircuitsArpTableListResult, <-chan error) { resultChan := make(chan ExpressRouteCircuitsArpTableListResult, 1) errChan := make(chan error, 1) @@ -597,8 +676,10 @@ func (client ExpressRouteCircuitsClient) ListArpTable(resourceGroupName string, var err error var result ExpressRouteCircuitsArpTableListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -633,7 +714,7 @@ func (client ExpressRouteCircuitsClient) ListArpTablePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -667,15 +748,12 @@ func (client ExpressRouteCircuitsClient) ListArpTableResponder(resp *http.Respon return } -// ListRoutesTable gets the currently advertised routes table associated with -// the express route circuit in a resource group. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ListRoutesTable gets the currently advertised routes table associated with the express route circuit in a resource +// group. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. peeringName is the name of the peering. -// devicePath is the path of the device. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// peeringName is the name of the peering. devicePath is the path of the device. func (client ExpressRouteCircuitsClient) ListRoutesTable(resourceGroupName string, circuitName string, peeringName string, devicePath string, cancel <-chan struct{}) (<-chan ExpressRouteCircuitsRoutesTableListResult, <-chan error) { resultChan := make(chan ExpressRouteCircuitsRoutesTableListResult, 1) errChan := make(chan error, 1) @@ -683,8 +761,10 @@ func (client ExpressRouteCircuitsClient) ListRoutesTable(resourceGroupName strin var err error var result ExpressRouteCircuitsRoutesTableListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -719,7 +799,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTablePreparer(resourceGroupNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -753,15 +833,12 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableResponder(resp *http.Res return } -// ListRoutesTableSummary gets the currently advertised routes table summary -// associated with the express route circuit in a resource group. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// ListRoutesTableSummary gets the currently advertised routes table summary associated with the express route circuit +// in a resource group. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. circuitName is the name -// of the express route circuit. peeringName is the name of the peering. -// devicePath is the path of the device. +// resourceGroupName is the name of the resource group. circuitName is the name of the express route circuit. +// peeringName is the name of the peering. devicePath is the path of the device. func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(resourceGroupName string, circuitName string, peeringName string, devicePath string, cancel <-chan struct{}) (<-chan ExpressRouteCircuitsRoutesTableSummaryListResult, <-chan error) { resultChan := make(chan ExpressRouteCircuitsRoutesTableSummaryListResult, 1) errChan := make(chan error, 1) @@ -769,8 +846,10 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(resourceGroupNam var err error var result ExpressRouteCircuitsRoutesTableSummaryListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -805,7 +884,7 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryPreparer(resource "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go index 94db9a4f6..5e39087b2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/expressrouteserviceproviders.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,20 +23,18 @@ import ( "net/http" ) -// ExpressRouteServiceProvidersClient is the composite Swagger for Network -// Client +// ExpressRouteServiceProvidersClient is the network Client type ExpressRouteServiceProvidersClient struct { ManagementClient } -// NewExpressRouteServiceProvidersClient creates an instance of the -// ExpressRouteServiceProvidersClient client. +// NewExpressRouteServiceProvidersClient creates an instance of the ExpressRouteServiceProvidersClient client. func NewExpressRouteServiceProvidersClient(subscriptionID string) ExpressRouteServiceProvidersClient { return NewExpressRouteServiceProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the -// ExpressRouteServiceProvidersClient client. +// NewExpressRouteServiceProvidersClientWithBaseURI creates an instance of the ExpressRouteServiceProvidersClient +// client. func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteServiceProvidersClient { return ExpressRouteServiceProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -71,7 +68,7 @@ func (client ExpressRouteServiceProvidersClient) ListPreparer() (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -126,3 +123,48 @@ func (client ExpressRouteServiceProvidersClient) ListNextResults(lastResults Exp return } + +// ListComplete gets all elements from the list without paging. +func (client ExpressRouteServiceProvidersClient) ListComplete(cancel <-chan struct{}) (<-chan ExpressRouteServiceProvider, <-chan error) { + resultChan := make(chan ExpressRouteServiceProvider) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/inboundnatrules.go new file mode 100644 index 000000000..eab80ac57 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/inboundnatrules.go @@ -0,0 +1,436 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// InboundNatRulesClient is the network Client +type InboundNatRulesClient struct { + ManagementClient +} + +// NewInboundNatRulesClient creates an instance of the InboundNatRulesClient client. +func NewInboundNatRulesClient(subscriptionID string) InboundNatRulesClient { + return NewInboundNatRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInboundNatRulesClientWithBaseURI creates an instance of the InboundNatRulesClient client. +func NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string) InboundNatRulesClient { + return InboundNatRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a load balancer inbound nat rule. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +// inboundNatRuleName is the name of the inbound nat rule. inboundNatRuleParameters is parameters supplied to the +// create or update inbound nat rule operation. +func (client InboundNatRulesClient) CreateOrUpdate(resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, cancel <-chan struct{}) (<-chan InboundNatRule, <-chan error) { + resultChan := make(chan InboundNatRule, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: inboundNatRuleParameters, + Constraints: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat.BackendIPConfiguration.InterfaceIPConfigurationPropertiesFormat.PublicIPAddress.PublicIPAddressPropertiesFormat.IPConfiguration.IPConfigurationPropertiesFormat.PublicIPAddress", Name: validation.Null, Rule: false, Chain: nil}}}, + }}, + }}, + }}, + }}, + }}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "network.InboundNatRulesClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result InboundNatRule + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, loadBalancerName, inboundNatRuleName, inboundNatRuleParameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client InboundNatRulesClient) CreateOrUpdatePreparer(resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", pathParameters), + autorest.WithJSON(inboundNatRuleParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client InboundNatRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) CreateOrUpdateResponder(resp *http.Response) (result InboundNatRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified load balancer inbound nat rule. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +// inboundNatRuleName is the name of the inbound nat rule. +func (client InboundNatRulesClient) Delete(resourceGroupName string, loadBalancerName string, inboundNatRuleName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, loadBalancerName, inboundNatRuleName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client InboundNatRulesClient) DeletePreparer(resourceGroupName string, loadBalancerName string, inboundNatRuleName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client InboundNatRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusAccepted, http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified load balancer inbound nat rule. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +// inboundNatRuleName is the name of the inbound nat rule. expand is expands referenced resources. +func (client InboundNatRulesClient) Get(resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (result InboundNatRule, err error) { + req, err := client.GetPreparer(resourceGroupName, loadBalancerName, inboundNatRuleName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client InboundNatRulesClient) GetPreparer(resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "inboundNatRuleName": autorest.Encode("path", inboundNatRuleName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client InboundNatRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) GetResponder(resp *http.Response) (result InboundNatRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the inbound nat rules in a load balancer. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +func (client InboundNatRulesClient) List(resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client InboundNatRulesClient) ListPreparer(resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client InboundNatRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InboundNatRulesClient) ListResponder(resp *http.Response) (result InboundNatRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client InboundNatRulesClient) ListNextResults(lastResults InboundNatRuleListResult) (result InboundNatRuleListResult, err error) { + req, err := lastResults.InboundNatRuleListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client InboundNatRulesClient) ListComplete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (<-chan InboundNatRule, <-chan error) { + resultChan := make(chan InboundNatRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, loadBalancerName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceipconfigurations.go new file mode 100644 index 000000000..ca0359f09 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceipconfigurations.go @@ -0,0 +1,240 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// InterfaceIPConfigurationsClient is the network Client +type InterfaceIPConfigurationsClient struct { + ManagementClient +} + +// NewInterfaceIPConfigurationsClient creates an instance of the InterfaceIPConfigurationsClient client. +func NewInterfaceIPConfigurationsClient(subscriptionID string) InterfaceIPConfigurationsClient { + return NewInterfaceIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInterfaceIPConfigurationsClientWithBaseURI creates an instance of the InterfaceIPConfigurationsClient client. +func NewInterfaceIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) InterfaceIPConfigurationsClient { + return InterfaceIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified network interface ip configuration. +// +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. +// IPConfigurationName is the name of the ip configuration name. +func (client InterfaceIPConfigurationsClient) Get(resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (result InterfaceIPConfiguration, err error) { + req, err := client.GetPreparer(resourceGroupName, networkInterfaceName, IPConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client InterfaceIPConfigurationsClient) GetPreparer(resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client InterfaceIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client InterfaceIPConfigurationsClient) GetResponder(resp *http.Response) (result InterfaceIPConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List get all ip configurations in a network interface +// +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. +func (client InterfaceIPConfigurationsClient) List(resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client InterfaceIPConfigurationsClient) ListPreparer(resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client InterfaceIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceIPConfigurationsClient) ListResponder(resp *http.Response) (result InterfaceIPConfigurationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client InterfaceIPConfigurationsClient) ListNextResults(lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) { + req, err := lastResults.InterfaceIPConfigurationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client InterfaceIPConfigurationsClient) ListComplete(resourceGroupName string, networkInterfaceName string, cancel <-chan struct{}) (<-chan InterfaceIPConfiguration, <-chan error) { + resultChan := make(chan InterfaceIPConfiguration) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, networkInterfaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceloadbalancers.go new file mode 100644 index 000000000..c7b7d272f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaceloadbalancers.go @@ -0,0 +1,173 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// InterfaceLoadBalancersClient is the network Client +type InterfaceLoadBalancersClient struct { + ManagementClient +} + +// NewInterfaceLoadBalancersClient creates an instance of the InterfaceLoadBalancersClient client. +func NewInterfaceLoadBalancersClient(subscriptionID string) InterfaceLoadBalancersClient { + return NewInterfaceLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewInterfaceLoadBalancersClientWithBaseURI creates an instance of the InterfaceLoadBalancersClient client. +func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) InterfaceLoadBalancersClient { + return InterfaceLoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List list all load balancers in a network interface. +// +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. +func (client InterfaceLoadBalancersClient) List(resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, networkInterfaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client InterfaceLoadBalancersClient) ListPreparer(resourceGroupName string, networkInterfaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client InterfaceLoadBalancersClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client InterfaceLoadBalancersClient) ListResponder(resp *http.Response) (result InterfaceLoadBalancerListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client InterfaceLoadBalancersClient) ListNextResults(lastResults InterfaceLoadBalancerListResult) (result InterfaceLoadBalancerListResult, err error) { + req, err := lastResults.InterfaceLoadBalancerListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client InterfaceLoadBalancersClient) ListComplete(resourceGroupName string, networkInterfaceName string, cancel <-chan struct{}) (<-chan LoadBalancer, <-chan error) { + resultChan := make(chan LoadBalancer) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, networkInterfaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go index 8918c08b4..c2fdb3e90 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/interfaces.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// InterfacesClient is the composite Swagger for Network Client +// InterfacesClient is the network Client type InterfacesClient struct { ManagementClient } @@ -34,20 +33,17 @@ func NewInterfacesClient(subscriptionID string) InterfacesClient { return NewInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient -// client. +// NewInterfacesClientWithBaseURI creates an instance of the InterfacesClient client. func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) InterfacesClient { return InterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a network interface. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates a network interface. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. networkInterfaceName is -// the name of the network interface. parameters is parameters supplied to the -// create or update network interface operation. +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. +// parameters is parameters supplied to the create or update network interface operation. func (client InterfacesClient) CreateOrUpdate(resourceGroupName string, networkInterfaceName string, parameters Interface, cancel <-chan struct{}) (<-chan Interface, <-chan error) { resultChan := make(chan Interface, 1) errChan := make(chan error, 1) @@ -55,8 +51,10 @@ func (client InterfacesClient) CreateOrUpdate(resourceGroupName string, networkI var err error var result Interface defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -89,7 +87,7 @@ func (client InterfacesClient) CreateOrUpdatePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,13 +123,10 @@ func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// Delete deletes the specified network interface. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified network interface. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkInterfaceName is -// the name of the network interface. +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. func (client InterfacesClient) Delete(resourceGroupName string, networkInterfaceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -139,8 +134,10 @@ func (client InterfacesClient) Delete(resourceGroupName string, networkInterface var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -173,7 +170,7 @@ func (client InterfacesClient) DeletePreparer(resourceGroupName string, networkI "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -208,8 +205,8 @@ func (client InterfacesClient) DeleteResponder(resp *http.Response) (result auto // Get gets information about the specified network interface. // -// resourceGroupName is the name of the resource group. networkInterfaceName is -// the name of the network interface. expand is expands referenced resources. +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. +// expand is expands referenced resources. func (client InterfacesClient) Get(resourceGroupName string, networkInterfaceName string, expand string) (result Interface, err error) { req, err := client.GetPreparer(resourceGroupName, networkInterfaceName, expand) if err != nil { @@ -240,7 +237,7 @@ func (client InterfacesClient) GetPreparer(resourceGroupName string, networkInte "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -275,13 +272,11 @@ func (client InterfacesClient) GetResponder(resp *http.Response) (result Interfa return } -// GetEffectiveRouteTable gets all route tables applied to a network interface. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// GetEffectiveRouteTable gets all route tables applied to a network interface. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkInterfaceName is -// the name of the network interface. +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. func (client InterfacesClient) GetEffectiveRouteTable(resourceGroupName string, networkInterfaceName string, cancel <-chan struct{}) (<-chan EffectiveRouteListResult, <-chan error) { resultChan := make(chan EffectiveRouteListResult, 1) errChan := make(chan error, 1) @@ -289,8 +284,10 @@ func (client InterfacesClient) GetEffectiveRouteTable(resourceGroupName string, var err error var result EffectiveRouteListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -323,7 +320,7 @@ func (client InterfacesClient) GetEffectiveRouteTablePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -357,13 +354,11 @@ func (client InterfacesClient) GetEffectiveRouteTableResponder(resp *http.Respon return } -// GetVirtualMachineScaleSetNetworkInterface get the specified network -// interface in a virtual machine scale set. +// GetVirtualMachineScaleSetNetworkInterface get the specified network interface in a virtual machine scale set. // -// resourceGroupName is the name of the resource group. -// virtualMachineScaleSetName is the name of the virtual machine scale set. -// virtualmachineIndex is the virtual machine index. networkInterfaceName is -// the name of the network interface. expand is expands referenced resources. +// resourceGroupName is the name of the resource group. virtualMachineScaleSetName is the name of the virtual machine +// scale set. virtualmachineIndex is the virtual machine index. networkInterfaceName is the name of the network +// interface. expand is expands referenced resources. func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result Interface, err error) { req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand) if err != nil { @@ -396,7 +391,7 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfacePreparer "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -463,7 +458,7 @@ func (client InterfacesClient) ListPreparer(resourceGroupName string) (*http.Req "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -519,6 +514,51 @@ func (client InterfacesClient) ListNextResults(lastResults InterfaceListResult) return } +// ListComplete gets all elements from the list without paging. +func (client InterfacesClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Interface, <-chan error) { + resultChan := make(chan Interface) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all network interfaces in a subscription. func (client InterfacesClient) ListAll() (result InterfaceListResult, err error) { req, err := client.ListAllPreparer() @@ -548,7 +588,7 @@ func (client InterfacesClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -604,13 +644,56 @@ func (client InterfacesClient) ListAllNextResults(lastResults InterfaceListResul return } -// ListEffectiveNetworkSecurityGroups gets all network security groups applied -// to a network interface. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to +// ListAllComplete gets all elements from the list without paging. +func (client InterfacesClient) ListAllComplete(cancel <-chan struct{}) (<-chan Interface, <-chan error) { + resultChan := make(chan Interface) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListEffectiveNetworkSecurityGroups gets all network security groups applied to a network interface. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to // cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkInterfaceName is -// the name of the network interface. +// resourceGroupName is the name of the resource group. networkInterfaceName is the name of the network interface. func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(resourceGroupName string, networkInterfaceName string, cancel <-chan struct{}) (<-chan EffectiveNetworkSecurityGroupListResult, <-chan error) { resultChan := make(chan EffectiveNetworkSecurityGroupListResult, 1) errChan := make(chan error, 1) @@ -618,8 +701,10 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(resourceGroupN var err error var result EffectiveNetworkSecurityGroupListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -652,7 +737,7 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsPreparer(resour "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -686,11 +771,10 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsResponder(resp return } -// ListVirtualMachineScaleSetNetworkInterfaces gets all network interfaces in a -// virtual machine scale set. +// ListVirtualMachineScaleSetNetworkInterfaces gets all network interfaces in a virtual machine scale set. // -// resourceGroupName is the name of the resource group. -// virtualMachineScaleSetName is the name of the virtual machine scale set. +// resourceGroupName is the name of the resource group. virtualMachineScaleSetName is the name of the virtual machine +// scale set. func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResult, err error) { req, err := client.ListVirtualMachineScaleSetNetworkInterfacesPreparer(resourceGroupName, virtualMachineScaleSetName) if err != nil { @@ -721,7 +805,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesPrepar "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -777,12 +861,56 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesNextRe return } -// ListVirtualMachineScaleSetVMNetworkInterfaces gets information about all -// network interfaces in a virtual machine in a virtual machine scale set. +// ListVirtualMachineScaleSetNetworkInterfacesComplete gets all elements from the list without paging. +func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(resourceGroupName string, virtualMachineScaleSetName string, cancel <-chan struct{}) (<-chan Interface, <-chan error) { + resultChan := make(chan Interface) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListVirtualMachineScaleSetNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListVirtualMachineScaleSetNetworkInterfacesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListVirtualMachineScaleSetVMNetworkInterfaces gets information about all network interfaces in a virtual machine in +// a virtual machine scale set. // -// resourceGroupName is the name of the resource group. -// virtualMachineScaleSetName is the name of the virtual machine scale set. -// virtualmachineIndex is the virtual machine index. +// resourceGroupName is the name of the resource group. virtualMachineScaleSetName is the name of the virtual machine +// scale set. virtualmachineIndex is the virtual machine index. func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResult, err error) { req, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) if err != nil { @@ -814,7 +942,7 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesPrep "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-03-30" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -869,3 +997,48 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesNext return } + +// ListVirtualMachineScaleSetVMNetworkInterfacesComplete gets all elements from the list without paging. +func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, cancel <-chan struct{}) (<-chan Interface, <-chan error) { + resultChan := make(chan Interface) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListVirtualMachineScaleSetVMNetworkInterfacesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerbackendaddresspools.go new file mode 100644 index 000000000..de14c3556 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerbackendaddresspools.go @@ -0,0 +1,241 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// LoadBalancerBackendAddressPoolsClient is the network Client +type LoadBalancerBackendAddressPoolsClient struct { + ManagementClient +} + +// NewLoadBalancerBackendAddressPoolsClient creates an instance of the LoadBalancerBackendAddressPoolsClient client. +func NewLoadBalancerBackendAddressPoolsClient(subscriptionID string) LoadBalancerBackendAddressPoolsClient { + return NewLoadBalancerBackendAddressPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerBackendAddressPoolsClientWithBaseURI creates an instance of the LoadBalancerBackendAddressPoolsClient +// client. +func NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerBackendAddressPoolsClient { + return LoadBalancerBackendAddressPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets load balancer backend address pool. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +// backendAddressPoolName is the name of the backend address pool. +func (client LoadBalancerBackendAddressPoolsClient) Get(resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result BackendAddressPool, err error) { + req, err := client.GetPreparer(resourceGroupName, loadBalancerName, backendAddressPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerBackendAddressPoolsClient) GetPreparer(resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backendAddressPoolName": autorest.Encode("path", backendAddressPoolName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerBackendAddressPoolsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) GetResponder(resp *http.Response) (result BackendAddressPool, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancer backed address pools. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +func (client LoadBalancerBackendAddressPoolsClient) List(resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerBackendAddressPoolsClient) ListPreparer(resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerBackendAddressPoolsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerBackendAddressPoolsClient) ListResponder(resp *http.Response) (result LoadBalancerBackendAddressPoolListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client LoadBalancerBackendAddressPoolsClient) ListNextResults(lastResults LoadBalancerBackendAddressPoolListResult) (result LoadBalancerBackendAddressPoolListResult, err error) { + req, err := lastResults.LoadBalancerBackendAddressPoolListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client LoadBalancerBackendAddressPoolsClient) ListComplete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (<-chan BackendAddressPool, <-chan error) { + resultChan := make(chan BackendAddressPool) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, loadBalancerName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerfrontendipconfigurations.go new file mode 100644 index 000000000..515b875a1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerfrontendipconfigurations.go @@ -0,0 +1,242 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// LoadBalancerFrontendIPConfigurationsClient is the network Client +type LoadBalancerFrontendIPConfigurationsClient struct { + ManagementClient +} + +// NewLoadBalancerFrontendIPConfigurationsClient creates an instance of the LoadBalancerFrontendIPConfigurationsClient +// client. +func NewLoadBalancerFrontendIPConfigurationsClient(subscriptionID string) LoadBalancerFrontendIPConfigurationsClient { + return NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI creates an instance of the +// LoadBalancerFrontendIPConfigurationsClient client. +func NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerFrontendIPConfigurationsClient { + return LoadBalancerFrontendIPConfigurationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets load balancer frontend IP configuration. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +// frontendIPConfigurationName is the name of the frontend IP configuration. +func (client LoadBalancerFrontendIPConfigurationsClient) Get(resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (result FrontendIPConfiguration, err error) { + req, err := client.GetPreparer(resourceGroupName, loadBalancerName, frontendIPConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerFrontendIPConfigurationsClient) GetPreparer(resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "frontendIPConfigurationName": autorest.Encode("path", frontendIPConfigurationName), + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerFrontendIPConfigurationsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerFrontendIPConfigurationsClient) GetResponder(resp *http.Response) (result FrontendIPConfiguration, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancer frontend IP configurations. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +func (client LoadBalancerFrontendIPConfigurationsClient) List(resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerFrontendIPConfigurationsClient) ListPreparer(resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerFrontendIPConfigurationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerFrontendIPConfigurationsClient) ListResponder(resp *http.Response) (result LoadBalancerFrontendIPConfigurationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client LoadBalancerFrontendIPConfigurationsClient) ListNextResults(lastResults LoadBalancerFrontendIPConfigurationListResult) (result LoadBalancerFrontendIPConfigurationListResult, err error) { + req, err := lastResults.LoadBalancerFrontendIPConfigurationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client LoadBalancerFrontendIPConfigurationsClient) ListComplete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (<-chan FrontendIPConfiguration, <-chan error) { + resultChan := make(chan FrontendIPConfiguration) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, loadBalancerName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerloadbalancingrules.go new file mode 100644 index 000000000..2ecd6be0d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerloadbalancingrules.go @@ -0,0 +1,241 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// LoadBalancerLoadBalancingRulesClient is the network Client +type LoadBalancerLoadBalancingRulesClient struct { + ManagementClient +} + +// NewLoadBalancerLoadBalancingRulesClient creates an instance of the LoadBalancerLoadBalancingRulesClient client. +func NewLoadBalancerLoadBalancingRulesClient(subscriptionID string) LoadBalancerLoadBalancingRulesClient { + return NewLoadBalancerLoadBalancingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerLoadBalancingRulesClientWithBaseURI creates an instance of the LoadBalancerLoadBalancingRulesClient +// client. +func NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerLoadBalancingRulesClient { + return LoadBalancerLoadBalancingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets the specified load balancer load balancing rule. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +// loadBalancingRuleName is the name of the load balancing rule. +func (client LoadBalancerLoadBalancingRulesClient) Get(resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (result LoadBalancingRule, err error) { + req, err := client.GetPreparer(resourceGroupName, loadBalancerName, loadBalancingRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerLoadBalancingRulesClient) GetPreparer(resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "loadBalancingRuleName": autorest.Encode("path", loadBalancingRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerLoadBalancingRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerLoadBalancingRulesClient) GetResponder(resp *http.Response) (result LoadBalancingRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancing rules in a load balancer. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +func (client LoadBalancerLoadBalancingRulesClient) List(resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerLoadBalancingRulesClient) ListPreparer(resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerLoadBalancingRulesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerLoadBalancingRulesClient) ListResponder(resp *http.Response) (result LoadBalancerLoadBalancingRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client LoadBalancerLoadBalancingRulesClient) ListNextResults(lastResults LoadBalancerLoadBalancingRuleListResult) (result LoadBalancerLoadBalancingRuleListResult, err error) { + req, err := lastResults.LoadBalancerLoadBalancingRuleListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client LoadBalancerLoadBalancingRulesClient) ListComplete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (<-chan LoadBalancingRule, <-chan error) { + resultChan := make(chan LoadBalancingRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, loadBalancerName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancernetworkinterfaces.go new file mode 100644 index 000000000..356503542 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancernetworkinterfaces.go @@ -0,0 +1,174 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// LoadBalancerNetworkInterfacesClient is the network Client +type LoadBalancerNetworkInterfacesClient struct { + ManagementClient +} + +// NewLoadBalancerNetworkInterfacesClient creates an instance of the LoadBalancerNetworkInterfacesClient client. +func NewLoadBalancerNetworkInterfacesClient(subscriptionID string) LoadBalancerNetworkInterfacesClient { + return NewLoadBalancerNetworkInterfacesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerNetworkInterfacesClientWithBaseURI creates an instance of the LoadBalancerNetworkInterfacesClient +// client. +func NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerNetworkInterfacesClient { + return LoadBalancerNetworkInterfacesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets associated load balancer network interfaces. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +func (client LoadBalancerNetworkInterfacesClient) List(resourceGroupName string, loadBalancerName string) (result InterfaceListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerNetworkInterfacesClient) ListPreparer(resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerNetworkInterfacesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerNetworkInterfacesClient) ListResponder(resp *http.Response) (result InterfaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client LoadBalancerNetworkInterfacesClient) ListNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) { + req, err := lastResults.InterfaceListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client LoadBalancerNetworkInterfacesClient) ListComplete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (<-chan Interface, <-chan error) { + resultChan := make(chan Interface) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, loadBalancerName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerprobes.go new file mode 100644 index 000000000..daee51e0f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancerprobes.go @@ -0,0 +1,240 @@ +package network + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// LoadBalancerProbesClient is the network Client +type LoadBalancerProbesClient struct { + ManagementClient +} + +// NewLoadBalancerProbesClient creates an instance of the LoadBalancerProbesClient client. +func NewLoadBalancerProbesClient(subscriptionID string) LoadBalancerProbesClient { + return NewLoadBalancerProbesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewLoadBalancerProbesClientWithBaseURI creates an instance of the LoadBalancerProbesClient client. +func NewLoadBalancerProbesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerProbesClient { + return LoadBalancerProbesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets load balancer probe. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. probeName is +// the name of the probe. +func (client LoadBalancerProbesClient) Get(resourceGroupName string, loadBalancerName string, probeName string) (result Probe, err error) { + req, err := client.GetPreparer(resourceGroupName, loadBalancerName, probeName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client LoadBalancerProbesClient) GetPreparer(resourceGroupName string, loadBalancerName string, probeName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "probeName": autorest.Encode("path", probeName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerProbesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client LoadBalancerProbesClient) GetResponder(resp *http.Response) (result Probe, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List gets all the load balancer probes. +// +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. +func (client LoadBalancerProbesClient) List(resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResult, err error) { + req, err := client.ListPreparer(resourceGroupName, loadBalancerName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client LoadBalancerProbesClient) ListPreparer(resourceGroupName string, loadBalancerName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "loadBalancerName": autorest.Encode("path", loadBalancerName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client LoadBalancerProbesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client LoadBalancerProbesClient) ListResponder(resp *http.Response) (result LoadBalancerProbeListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client LoadBalancerProbesClient) ListNextResults(lastResults LoadBalancerProbeListResult) (result LoadBalancerProbeListResult, err error) { + req, err := lastResults.LoadBalancerProbeListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client LoadBalancerProbesClient) ListComplete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (<-chan Probe, <-chan error) { + resultChan := make(chan Probe) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, loadBalancerName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go index 11d649b27..3a2528d85 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/loadbalancers.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,31 +23,26 @@ import ( "net/http" ) -// LoadBalancersClient is the composite Swagger for Network Client +// LoadBalancersClient is the network Client type LoadBalancersClient struct { ManagementClient } -// NewLoadBalancersClient creates an instance of the LoadBalancersClient -// client. +// NewLoadBalancersClient creates an instance of the LoadBalancersClient client. func NewLoadBalancersClient(subscriptionID string) LoadBalancersClient { return NewLoadBalancersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLoadBalancersClientWithBaseURI creates an instance of the -// LoadBalancersClient client. +// NewLoadBalancersClientWithBaseURI creates an instance of the LoadBalancersClient client. func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancersClient { return LoadBalancersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a load balancer. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate creates or updates a load balancer. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. loadBalancerName is the -// name of the load balancer. parameters is parameters supplied to the create -// or update load balancer operation. +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. parameters +// is parameters supplied to the create or update load balancer operation. func (client LoadBalancersClient) CreateOrUpdate(resourceGroupName string, loadBalancerName string, parameters LoadBalancer, cancel <-chan struct{}) (<-chan LoadBalancer, <-chan error) { resultChan := make(chan LoadBalancer, 1) errChan := make(chan error, 1) @@ -56,8 +50,10 @@ func (client LoadBalancersClient) CreateOrUpdate(resourceGroupName string, loadB var err error var result LoadBalancer defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -90,7 +86,7 @@ func (client LoadBalancersClient) CreateOrUpdatePreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -126,13 +122,10 @@ func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) ( return } -// Delete deletes the specified load balancer. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified load balancer. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. loadBalancerName is the -// name of the load balancer. +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. func (client LoadBalancersClient) Delete(resourceGroupName string, loadBalancerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -140,8 +133,10 @@ func (client LoadBalancersClient) Delete(resourceGroupName string, loadBalancerN var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -174,7 +169,7 @@ func (client LoadBalancersClient) DeletePreparer(resourceGroupName string, loadB "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -209,8 +204,8 @@ func (client LoadBalancersClient) DeleteResponder(resp *http.Response) (result a // Get gets the specified load balancer. // -// resourceGroupName is the name of the resource group. loadBalancerName is the -// name of the load balancer. expand is expands referenced resources. +// resourceGroupName is the name of the resource group. loadBalancerName is the name of the load balancer. expand is +// expands referenced resources. func (client LoadBalancersClient) Get(resourceGroupName string, loadBalancerName string, expand string) (result LoadBalancer, err error) { req, err := client.GetPreparer(resourceGroupName, loadBalancerName, expand) if err != nil { @@ -241,7 +236,7 @@ func (client LoadBalancersClient) GetPreparer(resourceGroupName string, loadBala "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -308,7 +303,7 @@ func (client LoadBalancersClient) ListPreparer(resourceGroupName string) (*http. "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -364,6 +359,51 @@ func (client LoadBalancersClient) ListNextResults(lastResults LoadBalancerListRe return } +// ListComplete gets all elements from the list without paging. +func (client LoadBalancersClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan LoadBalancer, <-chan error) { + resultChan := make(chan LoadBalancer) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all the load balancers in a subscription. func (client LoadBalancersClient) ListAll() (result LoadBalancerListResult, err error) { req, err := client.ListAllPreparer() @@ -393,7 +433,7 @@ func (client LoadBalancersClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -448,3 +488,48 @@ func (client LoadBalancersClient) ListAllNextResults(lastResults LoadBalancerLis return } + +// ListAllComplete gets all elements from the list without paging. +func (client LoadBalancersClient) ListAllComplete(cancel <-chan struct{}) (<-chan LoadBalancer, <-chan error) { + resultChan := make(chan LoadBalancer) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go index c1e66076e..64cdea20a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/localnetworkgateways.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,27 @@ import ( "net/http" ) -// LocalNetworkGatewaysClient is the composite Swagger for Network Client +// LocalNetworkGatewaysClient is the network Client type LocalNetworkGatewaysClient struct { ManagementClient } -// NewLocalNetworkGatewaysClient creates an instance of the -// LocalNetworkGatewaysClient client. +// NewLocalNetworkGatewaysClient creates an instance of the LocalNetworkGatewaysClient client. func NewLocalNetworkGatewaysClient(subscriptionID string) LocalNetworkGatewaysClient { return NewLocalNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the -// LocalNetworkGatewaysClient client. +// NewLocalNetworkGatewaysClientWithBaseURI creates an instance of the LocalNetworkGatewaysClient client. func NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) LocalNetworkGatewaysClient { return LocalNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a local network gateway in the specified -// resource group. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates or updates a local network gateway in the specified resource group. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. localNetworkGatewayName -// is the name of the local network gateway. parameters is parameters supplied -// to the create or update local network gateway operation. +// resourceGroupName is the name of the resource group. localNetworkGatewayName is the name of the local network +// gateway. parameters is parameters supplied to the create or update local network gateway operation. func (client LocalNetworkGatewaysClient) CreateOrUpdate(resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway, cancel <-chan struct{}) (<-chan LocalNetworkGateway, <-chan error) { resultChan := make(chan LocalNetworkGateway, 1) errChan := make(chan error, 1) @@ -68,8 +63,10 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdate(resourceGroupName string var err error var result LocalNetworkGateway defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -102,7 +99,7 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdatePreparer(resourceGroupNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -138,13 +135,11 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Resp return } -// Delete deletes the specified local network gateway. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified local network gateway. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. localNetworkGatewayName -// is the name of the local network gateway. +// resourceGroupName is the name of the resource group. localNetworkGatewayName is the name of the local network +// gateway. func (client LocalNetworkGatewaysClient) Delete(resourceGroupName string, localNetworkGatewayName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -161,8 +156,10 @@ func (client LocalNetworkGatewaysClient) Delete(resourceGroupName string, localN var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -195,7 +192,7 @@ func (client LocalNetworkGatewaysClient) DeletePreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -230,8 +227,8 @@ func (client LocalNetworkGatewaysClient) DeleteResponder(resp *http.Response) (r // Get gets the specified local network gateway in a resource group. // -// resourceGroupName is the name of the resource group. localNetworkGatewayName -// is the name of the local network gateway. +// resourceGroupName is the name of the resource group. localNetworkGatewayName is the name of the local network +// gateway. func (client LocalNetworkGatewaysClient) Get(resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: localNetworkGatewayName, @@ -268,7 +265,7 @@ func (client LocalNetworkGatewaysClient) GetPreparer(resourceGroupName string, l "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -332,7 +329,7 @@ func (client LocalNetworkGatewaysClient) ListPreparer(resourceGroupName string) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -387,3 +384,48 @@ func (client LocalNetworkGatewaysClient) ListNextResults(lastResults LocalNetwor return } + +// ListComplete gets all elements from the list without paging. +func (client LocalNetworkGatewaysClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan LocalNetworkGateway, <-chan error) { + resultChan := make(chan LocalNetworkGateway) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go index 505691db0..8e083f366 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/models.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,75 +34,58 @@ const ( Deny Access = "Deny" ) -// ApplicationGatewayBackendHealthServerHealth enumerates the values for -// application gateway backend health server health. +// ApplicationGatewayBackendHealthServerHealth enumerates the values for application gateway backend health server +// health. type ApplicationGatewayBackendHealthServerHealth string const ( - // Down specifies the down state for application gateway backend health - // server health. + // Down specifies the down state for application gateway backend health server health. Down ApplicationGatewayBackendHealthServerHealth = "Down" - // Draining specifies the draining state for application gateway backend - // health server health. + // Draining specifies the draining state for application gateway backend health server health. Draining ApplicationGatewayBackendHealthServerHealth = "Draining" - // Partial specifies the partial state for application gateway backend - // health server health. + // Partial specifies the partial state for application gateway backend health server health. Partial ApplicationGatewayBackendHealthServerHealth = "Partial" - // Unknown specifies the unknown state for application gateway backend - // health server health. + // Unknown specifies the unknown state for application gateway backend health server health. Unknown ApplicationGatewayBackendHealthServerHealth = "Unknown" - // Up specifies the up state for application gateway backend health server - // health. + // Up specifies the up state for application gateway backend health server health. Up ApplicationGatewayBackendHealthServerHealth = "Up" ) -// ApplicationGatewayCookieBasedAffinity enumerates the values for application -// gateway cookie based affinity. +// ApplicationGatewayCookieBasedAffinity enumerates the values for application gateway cookie based affinity. type ApplicationGatewayCookieBasedAffinity string const ( - // Disabled specifies the disabled state for application gateway cookie - // based affinity. + // Disabled specifies the disabled state for application gateway cookie based affinity. Disabled ApplicationGatewayCookieBasedAffinity = "Disabled" - // Enabled specifies the enabled state for application gateway cookie based - // affinity. + // Enabled specifies the enabled state for application gateway cookie based affinity. Enabled ApplicationGatewayCookieBasedAffinity = "Enabled" ) -// ApplicationGatewayFirewallMode enumerates the values for application gateway -// firewall mode. +// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode. type ApplicationGatewayFirewallMode string const ( - // Detection specifies the detection state for application gateway firewall - // mode. + // Detection specifies the detection state for application gateway firewall mode. Detection ApplicationGatewayFirewallMode = "Detection" - // Prevention specifies the prevention state for application gateway - // firewall mode. + // Prevention specifies the prevention state for application gateway firewall mode. Prevention ApplicationGatewayFirewallMode = "Prevention" ) -// ApplicationGatewayOperationalState enumerates the values for application -// gateway operational state. +// ApplicationGatewayOperationalState enumerates the values for application gateway operational state. type ApplicationGatewayOperationalState string const ( - // Running specifies the running state for application gateway operational - // state. + // Running specifies the running state for application gateway operational state. Running ApplicationGatewayOperationalState = "Running" - // Starting specifies the starting state for application gateway - // operational state. + // Starting specifies the starting state for application gateway operational state. Starting ApplicationGatewayOperationalState = "Starting" - // Stopped specifies the stopped state for application gateway operational - // state. + // Stopped specifies the stopped state for application gateway operational state. Stopped ApplicationGatewayOperationalState = "Stopped" - // Stopping specifies the stopping state for application gateway - // operational state. + // Stopping specifies the stopping state for application gateway operational state. Stopping ApplicationGatewayOperationalState = "Stopping" ) -// ApplicationGatewayProtocol enumerates the values for application gateway -// protocol. +// ApplicationGatewayProtocol enumerates the values for application gateway protocol. type ApplicationGatewayProtocol string const ( @@ -113,53 +95,147 @@ const ( HTTPS ApplicationGatewayProtocol = "Https" ) -// ApplicationGatewayRequestRoutingRuleType enumerates the values for -// application gateway request routing rule type. +// ApplicationGatewayRedirectType enumerates the values for application gateway redirect type. +type ApplicationGatewayRedirectType string + +const ( + // Found specifies the found state for application gateway redirect type. + Found ApplicationGatewayRedirectType = "Found" + // Permanent specifies the permanent state for application gateway redirect type. + Permanent ApplicationGatewayRedirectType = "Permanent" + // SeeOther specifies the see other state for application gateway redirect type. + SeeOther ApplicationGatewayRedirectType = "SeeOther" + // Temporary specifies the temporary state for application gateway redirect type. + Temporary ApplicationGatewayRedirectType = "Temporary" +) + +// ApplicationGatewayRequestRoutingRuleType enumerates the values for application gateway request routing rule type. type ApplicationGatewayRequestRoutingRuleType string const ( - // Basic specifies the basic state for application gateway request routing - // rule type. + // Basic specifies the basic state for application gateway request routing rule type. Basic ApplicationGatewayRequestRoutingRuleType = "Basic" - // PathBasedRouting specifies the path based routing state for application - // gateway request routing rule type. + // PathBasedRouting specifies the path based routing state for application gateway request routing rule type. PathBasedRouting ApplicationGatewayRequestRoutingRuleType = "PathBasedRouting" ) -// ApplicationGatewaySkuName enumerates the values for application gateway sku -// name. +// ApplicationGatewaySkuName enumerates the values for application gateway sku name. type ApplicationGatewaySkuName string const ( - // StandardLarge specifies the standard large state for application gateway - // sku name. + // StandardLarge specifies the standard large state for application gateway sku name. StandardLarge ApplicationGatewaySkuName = "Standard_Large" - // StandardMedium specifies the standard medium state for application - // gateway sku name. + // StandardMedium specifies the standard medium state for application gateway sku name. StandardMedium ApplicationGatewaySkuName = "Standard_Medium" - // StandardSmall specifies the standard small state for application gateway - // sku name. + // StandardSmall specifies the standard small state for application gateway sku name. StandardSmall ApplicationGatewaySkuName = "Standard_Small" // WAFLarge specifies the waf large state for application gateway sku name. WAFLarge ApplicationGatewaySkuName = "WAF_Large" - // WAFMedium specifies the waf medium state for application gateway sku - // name. + // WAFMedium specifies the waf medium state for application gateway sku name. WAFMedium ApplicationGatewaySkuName = "WAF_Medium" ) -// ApplicationGatewaySslProtocol enumerates the values for application gateway -// ssl protocol. +// ApplicationGatewaySslCipherSuite enumerates the values for application gateway ssl cipher suite. +type ApplicationGatewaySslCipherSuite string + +const ( + // TLSDHEDSSWITHAES128CBCSHA specifies the tlsdhedsswithaes128cbcsha state for application gateway ssl cipher suite. + TLSDHEDSSWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + // TLSDHEDSSWITHAES128CBCSHA256 specifies the tlsdhedsswithaes128cbcsha256 state for application gateway ssl cipher + // suite. + TLSDHEDSSWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" + // TLSDHEDSSWITHAES256CBCSHA specifies the tlsdhedsswithaes256cbcsha state for application gateway ssl cipher suite. + TLSDHEDSSWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + // TLSDHEDSSWITHAES256CBCSHA256 specifies the tlsdhedsswithaes256cbcsha256 state for application gateway ssl cipher + // suite. + TLSDHEDSSWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" + // TLSDHERSAWITHAES128CBCSHA specifies the tlsdhersawithaes128cbcsha state for application gateway ssl cipher suite. + TLSDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + // TLSDHERSAWITHAES128GCMSHA256 specifies the tlsdhersawithaes128gcmsha256 state for application gateway ssl cipher + // suite. + TLSDHERSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + // TLSDHERSAWITHAES256CBCSHA specifies the tlsdhersawithaes256cbcsha state for application gateway ssl cipher suite. + TLSDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + // TLSDHERSAWITHAES256GCMSHA384 specifies the tlsdhersawithaes256gcmsha384 state for application gateway ssl cipher + // suite. + TLSDHERSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + // TLSECDHEECDSAWITHAES128CBCSHA specifies the tlsecdheecdsawithaes128cbcsha state for application gateway ssl cipher + // suite. + TLSECDHEECDSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" + // TLSECDHEECDSAWITHAES128CBCSHA256 specifies the tlsecdheecdsawithaes128cbcsha256 state for application gateway ssl + // cipher suite. + TLSECDHEECDSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + // TLSECDHEECDSAWITHAES128GCMSHA256 specifies the tlsecdheecdsawithaes128gcmsha256 state for application gateway ssl + // cipher suite. + TLSECDHEECDSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + // TLSECDHEECDSAWITHAES256CBCSHA specifies the tlsecdheecdsawithaes256cbcsha state for application gateway ssl cipher + // suite. + TLSECDHEECDSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + // TLSECDHEECDSAWITHAES256CBCSHA384 specifies the tlsecdheecdsawithaes256cbcsha384 state for application gateway ssl + // cipher suite. + TLSECDHEECDSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + // TLSECDHEECDSAWITHAES256GCMSHA384 specifies the tlsecdheecdsawithaes256gcmsha384 state for application gateway ssl + // cipher suite. + TLSECDHEECDSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + // TLSECDHERSAWITHAES128CBCSHA specifies the tlsecdhersawithaes128cbcsha state for application gateway ssl cipher + // suite. + TLSECDHERSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + // TLSECDHERSAWITHAES128CBCSHA256 specifies the tlsecdhersawithaes128cbcsha256 state for application gateway ssl cipher + // suite. + TLSECDHERSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + // TLSECDHERSAWITHAES256CBCSHA specifies the tlsecdhersawithaes256cbcsha state for application gateway ssl cipher + // suite. + TLSECDHERSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + // TLSECDHERSAWITHAES256CBCSHA384 specifies the tlsecdhersawithaes256cbcsha384 state for application gateway ssl cipher + // suite. + TLSECDHERSAWITHAES256CBCSHA384 ApplicationGatewaySslCipherSuite = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + // TLSRSAWITH3DESEDECBCSHA specifies the tlsrsawith3desedecbcsha state for application gateway ssl cipher suite. + TLSRSAWITH3DESEDECBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" + // TLSRSAWITHAES128CBCSHA specifies the tlsrsawithaes128cbcsha state for application gateway ssl cipher suite. + TLSRSAWITHAES128CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA" + // TLSRSAWITHAES128CBCSHA256 specifies the tlsrsawithaes128cbcsha256 state for application gateway ssl cipher suite. + TLSRSAWITHAES128CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_CBC_SHA256" + // TLSRSAWITHAES128GCMSHA256 specifies the tlsrsawithaes128gcmsha256 state for application gateway ssl cipher suite. + TLSRSAWITHAES128GCMSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_128_GCM_SHA256" + // TLSRSAWITHAES256CBCSHA specifies the tlsrsawithaes256cbcsha state for application gateway ssl cipher suite. + TLSRSAWITHAES256CBCSHA ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA" + // TLSRSAWITHAES256CBCSHA256 specifies the tlsrsawithaes256cbcsha256 state for application gateway ssl cipher suite. + TLSRSAWITHAES256CBCSHA256 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_CBC_SHA256" + // TLSRSAWITHAES256GCMSHA384 specifies the tlsrsawithaes256gcmsha384 state for application gateway ssl cipher suite. + TLSRSAWITHAES256GCMSHA384 ApplicationGatewaySslCipherSuite = "TLS_RSA_WITH_AES_256_GCM_SHA384" +) + +// ApplicationGatewaySslPolicyName enumerates the values for application gateway ssl policy name. +type ApplicationGatewaySslPolicyName string + +const ( + // AppGwSslPolicy20150501 specifies the app gw ssl policy 20150501 state for application gateway ssl policy name. + AppGwSslPolicy20150501 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20150501" + // AppGwSslPolicy20170401 specifies the app gw ssl policy 20170401 state for application gateway ssl policy name. + AppGwSslPolicy20170401 ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401" + // AppGwSslPolicy20170401S specifies the app gw ssl policy 20170401s state for application gateway ssl policy name. + AppGwSslPolicy20170401S ApplicationGatewaySslPolicyName = "AppGwSslPolicy20170401S" +) + +// ApplicationGatewaySslPolicyType enumerates the values for application gateway ssl policy type. +type ApplicationGatewaySslPolicyType string + +const ( + // Custom specifies the custom state for application gateway ssl policy type. + Custom ApplicationGatewaySslPolicyType = "Custom" + // Predefined specifies the predefined state for application gateway ssl policy type. + Predefined ApplicationGatewaySslPolicyType = "Predefined" +) + +// ApplicationGatewaySslProtocol enumerates the values for application gateway ssl protocol. type ApplicationGatewaySslProtocol string const ( - // TLSv10 specifies the tl sv 10 state for application gateway ssl - // protocol. + // TLSv10 specifies the tl sv 10 state for application gateway ssl protocol. TLSv10 ApplicationGatewaySslProtocol = "TLSv1_0" - // TLSv11 specifies the tl sv 11 state for application gateway ssl - // protocol. + // TLSv11 specifies the tl sv 11 state for application gateway ssl protocol. TLSv11 ApplicationGatewaySslProtocol = "TLSv1_1" - // TLSv12 specifies the tl sv 12 state for application gateway ssl - // protocol. + // TLSv12 specifies the tl sv 12 state for application gateway ssl protocol. TLSv12 ApplicationGatewaySslProtocol = "TLSv1_2" ) @@ -183,6 +259,16 @@ const ( Contains AssociationType = "Contains" ) +// AuthenticationMethod enumerates the values for authentication method. +type AuthenticationMethod string + +const ( + // EAPMSCHAPv2 specifies the eapmscha pv 2 state for authentication method. + EAPMSCHAPv2 AuthenticationMethod = "EAPMSCHAPv2" + // EAPTLS specifies the eaptls state for authentication method. + EAPTLS AuthenticationMethod = "EAPTLS" +) + // AuthorizationUseStatus enumerates the values for authorization use status. type AuthorizationUseStatus string @@ -197,23 +283,32 @@ const ( type BgpPeerState string const ( - // BgpPeerStateConnected specifies the bgp peer state connected state for - // bgp peer state. + // BgpPeerStateConnected specifies the bgp peer state connected state for bgp peer state. BgpPeerStateConnected BgpPeerState = "Connected" - // BgpPeerStateConnecting specifies the bgp peer state connecting state for - // bgp peer state. + // BgpPeerStateConnecting specifies the bgp peer state connecting state for bgp peer state. BgpPeerStateConnecting BgpPeerState = "Connecting" - // BgpPeerStateIdle specifies the bgp peer state idle state for bgp peer - // state. + // BgpPeerStateIdle specifies the bgp peer state idle state for bgp peer state. BgpPeerStateIdle BgpPeerState = "Idle" - // BgpPeerStateStopped specifies the bgp peer state stopped state for bgp - // peer state. + // BgpPeerStateStopped specifies the bgp peer state stopped state for bgp peer state. BgpPeerStateStopped BgpPeerState = "Stopped" - // BgpPeerStateUnknown specifies the bgp peer state unknown state for bgp - // peer state. + // BgpPeerStateUnknown specifies the bgp peer state unknown state for bgp peer state. BgpPeerStateUnknown BgpPeerState = "Unknown" ) +// ConnectionStatus enumerates the values for connection status. +type ConnectionStatus string + +const ( + // ConnectionStatusConnected specifies the connection status connected state for connection status. + ConnectionStatusConnected ConnectionStatus = "Connected" + // ConnectionStatusDegraded specifies the connection status degraded state for connection status. + ConnectionStatusDegraded ConnectionStatus = "Degraded" + // ConnectionStatusDisconnected specifies the connection status disconnected state for connection status. + ConnectionStatusDisconnected ConnectionStatus = "Disconnected" + // ConnectionStatusUnknown specifies the connection status unknown state for connection status. + ConnectionStatusUnknown ConnectionStatus = "Unknown" +) + // DhGroup enumerates the values for dh group. type DhGroup string @@ -250,17 +345,14 @@ const ( type EffectiveRouteSource string const ( - // EffectiveRouteSourceDefault specifies the effective route source default - // state for effective route source. + // EffectiveRouteSourceDefault specifies the effective route source default state for effective route source. EffectiveRouteSourceDefault EffectiveRouteSource = "Default" - // EffectiveRouteSourceUnknown specifies the effective route source unknown - // state for effective route source. + // EffectiveRouteSourceUnknown specifies the effective route source unknown state for effective route source. EffectiveRouteSourceUnknown EffectiveRouteSource = "Unknown" - // EffectiveRouteSourceUser specifies the effective route source user state - // for effective route source. + // EffectiveRouteSourceUser specifies the effective route source user state for effective route source. EffectiveRouteSourceUser EffectiveRouteSource = "User" - // EffectiveRouteSourceVirtualNetworkGateway specifies the effective route - // source virtual network gateway state for effective route source. + // EffectiveRouteSourceVirtualNetworkGateway specifies the effective route source virtual network gateway state for + // effective route source. EffectiveRouteSourceVirtualNetworkGateway EffectiveRouteSource = "VirtualNetworkGateway" ) @@ -274,79 +366,77 @@ const ( Invalid EffectiveRouteState = "Invalid" ) -// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values -// for express route circuit peering advertised public prefix state. +// EffectiveSecurityRuleProtocol enumerates the values for effective security rule protocol. +type EffectiveSecurityRuleProtocol string + +const ( + // All specifies the all state for effective security rule protocol. + All EffectiveSecurityRuleProtocol = "All" + // TCP specifies the tcp state for effective security rule protocol. + TCP EffectiveSecurityRuleProtocol = "Tcp" + // UDP specifies the udp state for effective security rule protocol. + UDP EffectiveSecurityRuleProtocol = "Udp" +) + +// ExpressRouteCircuitPeeringAdvertisedPublicPrefixState enumerates the values for express route circuit peering +// advertised public prefix state. type ExpressRouteCircuitPeeringAdvertisedPublicPrefixState string const ( - // Configured specifies the configured state for express route circuit - // peering advertised public prefix state. + // Configured specifies the configured state for express route circuit peering advertised public prefix state. Configured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configured" - // Configuring specifies the configuring state for express route circuit - // peering advertised public prefix state. + // Configuring specifies the configuring state for express route circuit peering advertised public prefix state. Configuring ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "Configuring" - // NotConfigured specifies the not configured state for express route - // circuit peering advertised public prefix state. + // NotConfigured specifies the not configured state for express route circuit peering advertised public prefix state. NotConfigured ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "NotConfigured" - // ValidationNeeded specifies the validation needed state for express route - // circuit peering advertised public prefix state. + // ValidationNeeded specifies the validation needed state for express route circuit peering advertised public prefix + // state. ValidationNeeded ExpressRouteCircuitPeeringAdvertisedPublicPrefixState = "ValidationNeeded" ) -// ExpressRouteCircuitPeeringState enumerates the values for express route -// circuit peering state. +// ExpressRouteCircuitPeeringState enumerates the values for express route circuit peering state. type ExpressRouteCircuitPeeringState string const ( - // ExpressRouteCircuitPeeringStateDisabled specifies the express route - // circuit peering state disabled state for express route circuit peering - // state. + // ExpressRouteCircuitPeeringStateDisabled specifies the express route circuit peering state disabled state for express + // route circuit peering state. ExpressRouteCircuitPeeringStateDisabled ExpressRouteCircuitPeeringState = "Disabled" - // ExpressRouteCircuitPeeringStateEnabled specifies the express route - // circuit peering state enabled state for express route circuit peering - // state. + // ExpressRouteCircuitPeeringStateEnabled specifies the express route circuit peering state enabled state for express + // route circuit peering state. ExpressRouteCircuitPeeringStateEnabled ExpressRouteCircuitPeeringState = "Enabled" ) -// ExpressRouteCircuitPeeringType enumerates the values for express route -// circuit peering type. +// ExpressRouteCircuitPeeringType enumerates the values for express route circuit peering type. type ExpressRouteCircuitPeeringType string const ( - // AzurePrivatePeering specifies the azure private peering state for - // express route circuit peering type. + // AzurePrivatePeering specifies the azure private peering state for express route circuit peering type. AzurePrivatePeering ExpressRouteCircuitPeeringType = "AzurePrivatePeering" - // AzurePublicPeering specifies the azure public peering state for express - // route circuit peering type. + // AzurePublicPeering specifies the azure public peering state for express route circuit peering type. AzurePublicPeering ExpressRouteCircuitPeeringType = "AzurePublicPeering" - // MicrosoftPeering specifies the microsoft peering state for express route - // circuit peering type. + // MicrosoftPeering specifies the microsoft peering state for express route circuit peering type. MicrosoftPeering ExpressRouteCircuitPeeringType = "MicrosoftPeering" ) -// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit -// sku family. +// ExpressRouteCircuitSkuFamily enumerates the values for express route circuit sku family. type ExpressRouteCircuitSkuFamily string const ( - // MeteredData specifies the metered data state for express route circuit - // sku family. + // MeteredData specifies the metered data state for express route circuit sku family. MeteredData ExpressRouteCircuitSkuFamily = "MeteredData" - // UnlimitedData specifies the unlimited data state for express route - // circuit sku family. + // UnlimitedData specifies the unlimited data state for express route circuit sku family. UnlimitedData ExpressRouteCircuitSkuFamily = "UnlimitedData" ) -// ExpressRouteCircuitSkuTier enumerates the values for express route circuit -// sku tier. +// ExpressRouteCircuitSkuTier enumerates the values for express route circuit sku tier. type ExpressRouteCircuitSkuTier string const ( - // ExpressRouteCircuitSkuTierPremium specifies the express route circuit - // sku tier premium state for express route circuit sku tier. + // ExpressRouteCircuitSkuTierPremium specifies the express route circuit sku tier premium state for express route + // circuit sku tier. ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium" - // ExpressRouteCircuitSkuTierStandard specifies the express route circuit - // sku tier standard state for express route circuit sku tier. + // ExpressRouteCircuitSkuTierStandard specifies the express route circuit sku tier standard state for express route + // circuit sku tier. ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard" ) @@ -394,32 +484,23 @@ const ( type IpsecEncryption string const ( - // IpsecEncryptionAES128 specifies the ipsec encryption aes128 state for - // ipsec encryption. + // IpsecEncryptionAES128 specifies the ipsec encryption aes128 state for ipsec encryption. IpsecEncryptionAES128 IpsecEncryption = "AES128" - // IpsecEncryptionAES192 specifies the ipsec encryption aes192 state for - // ipsec encryption. + // IpsecEncryptionAES192 specifies the ipsec encryption aes192 state for ipsec encryption. IpsecEncryptionAES192 IpsecEncryption = "AES192" - // IpsecEncryptionAES256 specifies the ipsec encryption aes256 state for - // ipsec encryption. + // IpsecEncryptionAES256 specifies the ipsec encryption aes256 state for ipsec encryption. IpsecEncryptionAES256 IpsecEncryption = "AES256" - // IpsecEncryptionDES specifies the ipsec encryption des state for ipsec - // encryption. + // IpsecEncryptionDES specifies the ipsec encryption des state for ipsec encryption. IpsecEncryptionDES IpsecEncryption = "DES" - // IpsecEncryptionDES3 specifies the ipsec encryption des3 state for ipsec - // encryption. + // IpsecEncryptionDES3 specifies the ipsec encryption des3 state for ipsec encryption. IpsecEncryptionDES3 IpsecEncryption = "DES3" - // IpsecEncryptionGCMAES128 specifies the ipsec encryption gcmaes128 state - // for ipsec encryption. + // IpsecEncryptionGCMAES128 specifies the ipsec encryption gcmaes128 state for ipsec encryption. IpsecEncryptionGCMAES128 IpsecEncryption = "GCMAES128" - // IpsecEncryptionGCMAES192 specifies the ipsec encryption gcmaes192 state - // for ipsec encryption. + // IpsecEncryptionGCMAES192 specifies the ipsec encryption gcmaes192 state for ipsec encryption. IpsecEncryptionGCMAES192 IpsecEncryption = "GCMAES192" - // IpsecEncryptionGCMAES256 specifies the ipsec encryption gcmaes256 state - // for ipsec encryption. + // IpsecEncryptionGCMAES256 specifies the ipsec encryption gcmaes256 state for ipsec encryption. IpsecEncryptionGCMAES256 IpsecEncryption = "GCMAES256" - // IpsecEncryptionNone specifies the ipsec encryption none state for ipsec - // encryption. + // IpsecEncryptionNone specifies the ipsec encryption none state for ipsec encryption. IpsecEncryptionNone IpsecEncryption = "None" ) @@ -427,23 +508,17 @@ const ( type IpsecIntegrity string const ( - // IpsecIntegrityGCMAES128 specifies the ipsec integrity gcmaes128 state - // for ipsec integrity. + // IpsecIntegrityGCMAES128 specifies the ipsec integrity gcmaes128 state for ipsec integrity. IpsecIntegrityGCMAES128 IpsecIntegrity = "GCMAES128" - // IpsecIntegrityGCMAES192 specifies the ipsec integrity gcmaes192 state - // for ipsec integrity. + // IpsecIntegrityGCMAES192 specifies the ipsec integrity gcmaes192 state for ipsec integrity. IpsecIntegrityGCMAES192 IpsecIntegrity = "GCMAES192" - // IpsecIntegrityGCMAES256 specifies the ipsec integrity gcmaes256 state - // for ipsec integrity. + // IpsecIntegrityGCMAES256 specifies the ipsec integrity gcmaes256 state for ipsec integrity. IpsecIntegrityGCMAES256 IpsecIntegrity = "GCMAES256" - // IpsecIntegrityMD5 specifies the ipsec integrity md5 state for ipsec - // integrity. + // IpsecIntegrityMD5 specifies the ipsec integrity md5 state for ipsec integrity. IpsecIntegrityMD5 IpsecIntegrity = "MD5" - // IpsecIntegritySHA1 specifies the ipsec integrity sha1 state for ipsec - // integrity. + // IpsecIntegritySHA1 specifies the ipsec integrity sha1 state for ipsec integrity. IpsecIntegritySHA1 IpsecIntegrity = "SHA1" - // IpsecIntegritySHA256 specifies the ipsec integrity sha256 state for - // ipsec integrity. + // IpsecIntegritySHA256 specifies the ipsec integrity sha256 state for ipsec integrity. IpsecIntegritySHA256 IpsecIntegrity = "SHA256" ) @@ -457,6 +532,40 @@ const ( IPv6 IPVersion = "IPv6" ) +// IssueType enumerates the values for issue type. +type IssueType string + +const ( + // IssueTypeAgentStopped specifies the issue type agent stopped state for issue type. + IssueTypeAgentStopped IssueType = "AgentStopped" + // IssueTypeDNSResolution specifies the issue type dns resolution state for issue type. + IssueTypeDNSResolution IssueType = "DnsResolution" + // IssueTypeGuestFirewall specifies the issue type guest firewall state for issue type. + IssueTypeGuestFirewall IssueType = "GuestFirewall" + // IssueTypeNetworkSecurityRule specifies the issue type network security rule state for issue type. + IssueTypeNetworkSecurityRule IssueType = "NetworkSecurityRule" + // IssueTypePlatform specifies the issue type platform state for issue type. + IssueTypePlatform IssueType = "Platform" + // IssueTypePortThrottled specifies the issue type port throttled state for issue type. + IssueTypePortThrottled IssueType = "PortThrottled" + // IssueTypeSocketBind specifies the issue type socket bind state for issue type. + IssueTypeSocketBind IssueType = "SocketBind" + // IssueTypeUnknown specifies the issue type unknown state for issue type. + IssueTypeUnknown IssueType = "Unknown" + // IssueTypeUserDefinedRoute specifies the issue type user defined route state for issue type. + IssueTypeUserDefinedRoute IssueType = "UserDefinedRoute" +) + +// LoadBalancerSkuName enumerates the values for load balancer sku name. +type LoadBalancerSkuName string + +const ( + // LoadBalancerSkuNameBasic specifies the load balancer sku name basic state for load balancer sku name. + LoadBalancerSkuNameBasic LoadBalancerSkuName = "Basic" + // LoadBalancerSkuNameStandard specifies the load balancer sku name standard state for load balancer sku name. + LoadBalancerSkuNameStandard LoadBalancerSkuName = "Standard" +) + // LoadDistribution enumerates the values for load distribution. type LoadDistribution string @@ -465,8 +574,7 @@ const ( Default LoadDistribution = "Default" // SourceIP specifies the source ip state for load distribution. SourceIP LoadDistribution = "SourceIP" - // SourceIPProtocol specifies the source ip protocol state for load - // distribution. + // SourceIPProtocol specifies the source ip protocol state for load distribution. SourceIPProtocol LoadDistribution = "SourceIPProtocol" ) @@ -474,23 +582,17 @@ const ( type NextHopType string const ( - // NextHopTypeHyperNetGateway specifies the next hop type hyper net gateway - // state for next hop type. + // NextHopTypeHyperNetGateway specifies the next hop type hyper net gateway state for next hop type. NextHopTypeHyperNetGateway NextHopType = "HyperNetGateway" - // NextHopTypeInternet specifies the next hop type internet state for next - // hop type. + // NextHopTypeInternet specifies the next hop type internet state for next hop type. NextHopTypeInternet NextHopType = "Internet" - // NextHopTypeNone specifies the next hop type none state for next hop - // type. + // NextHopTypeNone specifies the next hop type none state for next hop type. NextHopTypeNone NextHopType = "None" - // NextHopTypeVirtualAppliance specifies the next hop type virtual - // appliance state for next hop type. + // NextHopTypeVirtualAppliance specifies the next hop type virtual appliance state for next hop type. NextHopTypeVirtualAppliance NextHopType = "VirtualAppliance" - // NextHopTypeVirtualNetworkGateway specifies the next hop type virtual - // network gateway state for next hop type. + // NextHopTypeVirtualNetworkGateway specifies the next hop type virtual network gateway state for next hop type. NextHopTypeVirtualNetworkGateway NextHopType = "VirtualNetworkGateway" - // NextHopTypeVnetLocal specifies the next hop type vnet local state for - // next hop type. + // NextHopTypeVnetLocal specifies the next hop type vnet local state for next hop type. NextHopTypeVnetLocal NextHopType = "VnetLocal" ) @@ -506,6 +608,18 @@ const ( Succeeded OperationStatus = "Succeeded" ) +// Origin enumerates the values for origin. +type Origin string + +const ( + // OriginInbound specifies the origin inbound state for origin. + OriginInbound Origin = "Inbound" + // OriginLocal specifies the origin local state for origin. + OriginLocal Origin = "Local" + // OriginOutbound specifies the origin outbound state for origin. + OriginOutbound Origin = "Outbound" +) + // PcError enumerates the values for pc error. type PcError string @@ -526,12 +640,12 @@ const ( type PcProtocol string const ( - // Any specifies the any state for pc protocol. - Any PcProtocol = "Any" - // TCP specifies the tcp state for pc protocol. - TCP PcProtocol = "TCP" - // UDP specifies the udp state for pc protocol. - UDP PcProtocol = "UDP" + // PcProtocolAny specifies the pc protocol any state for pc protocol. + PcProtocolAny PcProtocol = "Any" + // PcProtocolTCP specifies the pc protocol tcp state for pc protocol. + PcProtocolTCP PcProtocol = "TCP" + // PcProtocolUDP specifies the pc protocol udp state for pc protocol. + PcProtocolUDP PcProtocol = "UDP" ) // PcStatus enumerates the values for pc status. @@ -540,8 +654,7 @@ type PcStatus string const ( // PcStatusError specifies the pc status error state for pc status. PcStatusError PcStatus = "Error" - // PcStatusNotStarted specifies the pc status not started state for pc - // status. + // PcStatusNotStarted specifies the pc status not started state for pc status. PcStatusNotStarted PcStatus = "NotStarted" // PcStatusRunning specifies the pc status running state for pc status. PcStatusRunning PcStatus = "Running" @@ -575,11 +688,9 @@ const ( type ProbeProtocol string const ( - // ProbeProtocolHTTP specifies the probe protocol http state for probe - // protocol. + // ProbeProtocolHTTP specifies the probe protocol http state for probe protocol. ProbeProtocolHTTP ProbeProtocol = "Http" - // ProbeProtocolTCP specifies the probe protocol tcp state for probe - // protocol. + // ProbeProtocolTCP specifies the probe protocol tcp state for probe protocol. ProbeProtocolTCP ProbeProtocol = "Tcp" ) @@ -607,38 +718,41 @@ const ( type ProvisioningState string const ( - // ProvisioningStateDeleting specifies the provisioning state deleting - // state for provisioning state. + // ProvisioningStateDeleting specifies the provisioning state deleting state for provisioning state. ProvisioningStateDeleting ProvisioningState = "Deleting" - // ProvisioningStateFailed specifies the provisioning state failed state - // for provisioning state. + // ProvisioningStateFailed specifies the provisioning state failed state for provisioning state. ProvisioningStateFailed ProvisioningState = "Failed" - // ProvisioningStateSucceeded specifies the provisioning state succeeded - // state for provisioning state. + // ProvisioningStateSucceeded specifies the provisioning state succeeded state for provisioning state. ProvisioningStateSucceeded ProvisioningState = "Succeeded" - // ProvisioningStateUpdating specifies the provisioning state updating - // state for provisioning state. + // ProvisioningStateUpdating specifies the provisioning state updating state for provisioning state. ProvisioningStateUpdating ProvisioningState = "Updating" ) +// PublicIPAddressSkuName enumerates the values for public ip address sku name. +type PublicIPAddressSkuName string + +const ( + // PublicIPAddressSkuNameBasic specifies the public ip address sku name basic state for public ip address sku name. + PublicIPAddressSkuNameBasic PublicIPAddressSkuName = "Basic" + // PublicIPAddressSkuNameStandard specifies the public ip address sku name standard state for public ip address sku + // name. + PublicIPAddressSkuNameStandard PublicIPAddressSkuName = "Standard" +) + // RouteNextHopType enumerates the values for route next hop type. type RouteNextHopType string const ( - // RouteNextHopTypeInternet specifies the route next hop type internet - // state for route next hop type. + // RouteNextHopTypeInternet specifies the route next hop type internet state for route next hop type. RouteNextHopTypeInternet RouteNextHopType = "Internet" - // RouteNextHopTypeNone specifies the route next hop type none state for - // route next hop type. + // RouteNextHopTypeNone specifies the route next hop type none state for route next hop type. RouteNextHopTypeNone RouteNextHopType = "None" - // RouteNextHopTypeVirtualAppliance specifies the route next hop type - // virtual appliance state for route next hop type. + // RouteNextHopTypeVirtualAppliance specifies the route next hop type virtual appliance state for route next hop type. RouteNextHopTypeVirtualAppliance RouteNextHopType = "VirtualAppliance" - // RouteNextHopTypeVirtualNetworkGateway specifies the route next hop type - // virtual network gateway state for route next hop type. + // RouteNextHopTypeVirtualNetworkGateway specifies the route next hop type virtual network gateway state for route next + // hop type. RouteNextHopTypeVirtualNetworkGateway RouteNextHopType = "VirtualNetworkGateway" - // RouteNextHopTypeVnetLocal specifies the route next hop type vnet local - // state for route next hop type. + // RouteNextHopTypeVnetLocal specifies the route next hop type vnet local state for route next hop type. RouteNextHopTypeVnetLocal RouteNextHopType = "VnetLocal" ) @@ -646,11 +760,9 @@ const ( type SecurityRuleAccess string const ( - // SecurityRuleAccessAllow specifies the security rule access allow state - // for security rule access. + // SecurityRuleAccessAllow specifies the security rule access allow state for security rule access. SecurityRuleAccessAllow SecurityRuleAccess = "Allow" - // SecurityRuleAccessDeny specifies the security rule access deny state for - // security rule access. + // SecurityRuleAccessDeny specifies the security rule access deny state for security rule access. SecurityRuleAccessDeny SecurityRuleAccess = "Deny" ) @@ -658,11 +770,9 @@ const ( type SecurityRuleDirection string const ( - // SecurityRuleDirectionInbound specifies the security rule direction - // inbound state for security rule direction. + // SecurityRuleDirectionInbound specifies the security rule direction inbound state for security rule direction. SecurityRuleDirectionInbound SecurityRuleDirection = "Inbound" - // SecurityRuleDirectionOutbound specifies the security rule direction - // outbound state for security rule direction. + // SecurityRuleDirectionOutbound specifies the security rule direction outbound state for security rule direction. SecurityRuleDirectionOutbound SecurityRuleDirection = "Outbound" ) @@ -670,179 +780,169 @@ const ( type SecurityRuleProtocol string const ( - // SecurityRuleProtocolAsterisk specifies the security rule protocol - // asterisk state for security rule protocol. + // SecurityRuleProtocolAsterisk specifies the security rule protocol asterisk state for security rule protocol. SecurityRuleProtocolAsterisk SecurityRuleProtocol = "*" - // SecurityRuleProtocolTCP specifies the security rule protocol tcp state - // for security rule protocol. + // SecurityRuleProtocolTCP specifies the security rule protocol tcp state for security rule protocol. SecurityRuleProtocolTCP SecurityRuleProtocol = "Tcp" - // SecurityRuleProtocolUDP specifies the security rule protocol udp state - // for security rule protocol. + // SecurityRuleProtocolUDP specifies the security rule protocol udp state for security rule protocol. SecurityRuleProtocolUDP SecurityRuleProtocol = "Udp" ) -// ServiceProviderProvisioningState enumerates the values for service provider -// provisioning state. +// ServiceProviderProvisioningState enumerates the values for service provider provisioning state. type ServiceProviderProvisioningState string const ( - // Deprovisioning specifies the deprovisioning state for service provider - // provisioning state. + // Deprovisioning specifies the deprovisioning state for service provider provisioning state. Deprovisioning ServiceProviderProvisioningState = "Deprovisioning" - // NotProvisioned specifies the not provisioned state for service provider - // provisioning state. + // NotProvisioned specifies the not provisioned state for service provider provisioning state. NotProvisioned ServiceProviderProvisioningState = "NotProvisioned" - // Provisioned specifies the provisioned state for service provider - // provisioning state. + // Provisioned specifies the provisioned state for service provider provisioning state. Provisioned ServiceProviderProvisioningState = "Provisioned" - // Provisioning specifies the provisioning state for service provider - // provisioning state. + // Provisioning specifies the provisioning state for service provider provisioning state. Provisioning ServiceProviderProvisioningState = "Provisioning" ) +// Severity enumerates the values for severity. +type Severity string + +const ( + // SeverityError specifies the severity error state for severity. + SeverityError Severity = "Error" + // SeverityWarning specifies the severity warning state for severity. + SeverityWarning Severity = "Warning" +) + // TransportProtocol enumerates the values for transport protocol. type TransportProtocol string const ( - // TransportProtocolTCP specifies the transport protocol tcp state for - // transport protocol. + // TransportProtocolAll specifies the transport protocol all state for transport protocol. + TransportProtocolAll TransportProtocol = "All" + // TransportProtocolTCP specifies the transport protocol tcp state for transport protocol. TransportProtocolTCP TransportProtocol = "Tcp" - // TransportProtocolUDP specifies the transport protocol udp state for - // transport protocol. + // TransportProtocolUDP specifies the transport protocol udp state for transport protocol. TransportProtocolUDP TransportProtocol = "Udp" ) -// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual -// network gateway connection status. +// VirtualNetworkGatewayConnectionStatus enumerates the values for virtual network gateway connection status. type VirtualNetworkGatewayConnectionStatus string const ( - // VirtualNetworkGatewayConnectionStatusConnected specifies the virtual - // network gateway connection status connected state for virtual network - // gateway connection status. + // VirtualNetworkGatewayConnectionStatusConnected specifies the virtual network gateway connection status connected + // state for virtual network gateway connection status. VirtualNetworkGatewayConnectionStatusConnected VirtualNetworkGatewayConnectionStatus = "Connected" - // VirtualNetworkGatewayConnectionStatusConnecting specifies the virtual - // network gateway connection status connecting state for virtual network - // gateway connection status. + // VirtualNetworkGatewayConnectionStatusConnecting specifies the virtual network gateway connection status connecting + // state for virtual network gateway connection status. VirtualNetworkGatewayConnectionStatusConnecting VirtualNetworkGatewayConnectionStatus = "Connecting" - // VirtualNetworkGatewayConnectionStatusNotConnected specifies the virtual - // network gateway connection status not connected state for virtual - // network gateway connection status. + // VirtualNetworkGatewayConnectionStatusNotConnected specifies the virtual network gateway connection status not + // connected state for virtual network gateway connection status. VirtualNetworkGatewayConnectionStatusNotConnected VirtualNetworkGatewayConnectionStatus = "NotConnected" - // VirtualNetworkGatewayConnectionStatusUnknown specifies the virtual - // network gateway connection status unknown state for virtual network - // gateway connection status. + // VirtualNetworkGatewayConnectionStatusUnknown specifies the virtual network gateway connection status unknown state + // for virtual network gateway connection status. VirtualNetworkGatewayConnectionStatusUnknown VirtualNetworkGatewayConnectionStatus = "Unknown" ) -// VirtualNetworkGatewayConnectionType enumerates the values for virtual -// network gateway connection type. +// VirtualNetworkGatewayConnectionType enumerates the values for virtual network gateway connection type. type VirtualNetworkGatewayConnectionType string const ( - // ExpressRoute specifies the express route state for virtual network - // gateway connection type. + // ExpressRoute specifies the express route state for virtual network gateway connection type. ExpressRoute VirtualNetworkGatewayConnectionType = "ExpressRoute" - // IPsec specifies the i psec state for virtual network gateway connection - // type. + // IPsec specifies the i psec state for virtual network gateway connection type. IPsec VirtualNetworkGatewayConnectionType = "IPsec" - // Vnet2Vnet specifies the vnet 2 vnet state for virtual network gateway - // connection type. + // Vnet2Vnet specifies the vnet 2 vnet state for virtual network gateway connection type. Vnet2Vnet VirtualNetworkGatewayConnectionType = "Vnet2Vnet" - // VPNClient specifies the vpn client state for virtual network gateway - // connection type. + // VPNClient specifies the vpn client state for virtual network gateway connection type. VPNClient VirtualNetworkGatewayConnectionType = "VPNClient" ) -// VirtualNetworkGatewaySkuName enumerates the values for virtual network -// gateway sku name. +// VirtualNetworkGatewaySkuName enumerates the values for virtual network gateway sku name. type VirtualNetworkGatewaySkuName string const ( - // VirtualNetworkGatewaySkuNameBasic specifies the virtual network gateway - // sku name basic state for virtual network gateway sku name. + // VirtualNetworkGatewaySkuNameBasic specifies the virtual network gateway sku name basic state for virtual network + // gateway sku name. VirtualNetworkGatewaySkuNameBasic VirtualNetworkGatewaySkuName = "Basic" - // VirtualNetworkGatewaySkuNameHighPerformance specifies the virtual - // network gateway sku name high performance state for virtual network - // gateway sku name. + // VirtualNetworkGatewaySkuNameHighPerformance specifies the virtual network gateway sku name high performance state + // for virtual network gateway sku name. VirtualNetworkGatewaySkuNameHighPerformance VirtualNetworkGatewaySkuName = "HighPerformance" - // VirtualNetworkGatewaySkuNameStandard specifies the virtual network - // gateway sku name standard state for virtual network gateway sku name. + // VirtualNetworkGatewaySkuNameStandard specifies the virtual network gateway sku name standard state for virtual + // network gateway sku name. VirtualNetworkGatewaySkuNameStandard VirtualNetworkGatewaySkuName = "Standard" - // VirtualNetworkGatewaySkuNameUltraPerformance specifies the virtual - // network gateway sku name ultra performance state for virtual network - // gateway sku name. + // VirtualNetworkGatewaySkuNameUltraPerformance specifies the virtual network gateway sku name ultra performance state + // for virtual network gateway sku name. VirtualNetworkGatewaySkuNameUltraPerformance VirtualNetworkGatewaySkuName = "UltraPerformance" - // VirtualNetworkGatewaySkuNameVpnGw1 specifies the virtual network gateway - // sku name vpn gw 1 state for virtual network gateway sku name. + // VirtualNetworkGatewaySkuNameVpnGw1 specifies the virtual network gateway sku name vpn gw 1 state for virtual network + // gateway sku name. VirtualNetworkGatewaySkuNameVpnGw1 VirtualNetworkGatewaySkuName = "VpnGw1" - // VirtualNetworkGatewaySkuNameVpnGw2 specifies the virtual network gateway - // sku name vpn gw 2 state for virtual network gateway sku name. + // VirtualNetworkGatewaySkuNameVpnGw2 specifies the virtual network gateway sku name vpn gw 2 state for virtual network + // gateway sku name. VirtualNetworkGatewaySkuNameVpnGw2 VirtualNetworkGatewaySkuName = "VpnGw2" - // VirtualNetworkGatewaySkuNameVpnGw3 specifies the virtual network gateway - // sku name vpn gw 3 state for virtual network gateway sku name. + // VirtualNetworkGatewaySkuNameVpnGw3 specifies the virtual network gateway sku name vpn gw 3 state for virtual network + // gateway sku name. VirtualNetworkGatewaySkuNameVpnGw3 VirtualNetworkGatewaySkuName = "VpnGw3" ) -// VirtualNetworkGatewaySkuTier enumerates the values for virtual network -// gateway sku tier. +// VirtualNetworkGatewaySkuTier enumerates the values for virtual network gateway sku tier. type VirtualNetworkGatewaySkuTier string const ( - // VirtualNetworkGatewaySkuTierBasic specifies the virtual network gateway - // sku tier basic state for virtual network gateway sku tier. + // VirtualNetworkGatewaySkuTierBasic specifies the virtual network gateway sku tier basic state for virtual network + // gateway sku tier. VirtualNetworkGatewaySkuTierBasic VirtualNetworkGatewaySkuTier = "Basic" - // VirtualNetworkGatewaySkuTierHighPerformance specifies the virtual - // network gateway sku tier high performance state for virtual network - // gateway sku tier. + // VirtualNetworkGatewaySkuTierHighPerformance specifies the virtual network gateway sku tier high performance state + // for virtual network gateway sku tier. VirtualNetworkGatewaySkuTierHighPerformance VirtualNetworkGatewaySkuTier = "HighPerformance" - // VirtualNetworkGatewaySkuTierStandard specifies the virtual network - // gateway sku tier standard state for virtual network gateway sku tier. + // VirtualNetworkGatewaySkuTierStandard specifies the virtual network gateway sku tier standard state for virtual + // network gateway sku tier. VirtualNetworkGatewaySkuTierStandard VirtualNetworkGatewaySkuTier = "Standard" - // VirtualNetworkGatewaySkuTierUltraPerformance specifies the virtual - // network gateway sku tier ultra performance state for virtual network - // gateway sku tier. + // VirtualNetworkGatewaySkuTierUltraPerformance specifies the virtual network gateway sku tier ultra performance state + // for virtual network gateway sku tier. VirtualNetworkGatewaySkuTierUltraPerformance VirtualNetworkGatewaySkuTier = "UltraPerformance" - // VirtualNetworkGatewaySkuTierVpnGw1 specifies the virtual network gateway - // sku tier vpn gw 1 state for virtual network gateway sku tier. + // VirtualNetworkGatewaySkuTierVpnGw1 specifies the virtual network gateway sku tier vpn gw 1 state for virtual network + // gateway sku tier. VirtualNetworkGatewaySkuTierVpnGw1 VirtualNetworkGatewaySkuTier = "VpnGw1" - // VirtualNetworkGatewaySkuTierVpnGw2 specifies the virtual network gateway - // sku tier vpn gw 2 state for virtual network gateway sku tier. + // VirtualNetworkGatewaySkuTierVpnGw2 specifies the virtual network gateway sku tier vpn gw 2 state for virtual network + // gateway sku tier. VirtualNetworkGatewaySkuTierVpnGw2 VirtualNetworkGatewaySkuTier = "VpnGw2" - // VirtualNetworkGatewaySkuTierVpnGw3 specifies the virtual network gateway - // sku tier vpn gw 3 state for virtual network gateway sku tier. + // VirtualNetworkGatewaySkuTierVpnGw3 specifies the virtual network gateway sku tier vpn gw 3 state for virtual network + // gateway sku tier. VirtualNetworkGatewaySkuTierVpnGw3 VirtualNetworkGatewaySkuTier = "VpnGw3" ) -// VirtualNetworkGatewayType enumerates the values for virtual network gateway -// type. +// VirtualNetworkGatewayType enumerates the values for virtual network gateway type. type VirtualNetworkGatewayType string const ( - // VirtualNetworkGatewayTypeExpressRoute specifies the virtual network - // gateway type express route state for virtual network gateway type. + // VirtualNetworkGatewayTypeExpressRoute specifies the virtual network gateway type express route state for virtual + // network gateway type. VirtualNetworkGatewayTypeExpressRoute VirtualNetworkGatewayType = "ExpressRoute" - // VirtualNetworkGatewayTypeVpn specifies the virtual network gateway type - // vpn state for virtual network gateway type. + // VirtualNetworkGatewayTypeVpn specifies the virtual network gateway type vpn state for virtual network gateway type. VirtualNetworkGatewayTypeVpn VirtualNetworkGatewayType = "Vpn" ) -// VirtualNetworkPeeringState enumerates the values for virtual network peering -// state. +// VirtualNetworkPeeringState enumerates the values for virtual network peering state. type VirtualNetworkPeeringState string const ( - // Connected specifies the connected state for virtual network peering - // state. + // Connected specifies the connected state for virtual network peering state. Connected VirtualNetworkPeeringState = "Connected" - // Disconnected specifies the disconnected state for virtual network - // peering state. + // Disconnected specifies the disconnected state for virtual network peering state. Disconnected VirtualNetworkPeeringState = "Disconnected" - // Initiated specifies the initiated state for virtual network peering - // state. + // Initiated specifies the initiated state for virtual network peering state. Initiated VirtualNetworkPeeringState = "Initiated" ) +// VpnClientProtocol enumerates the values for vpn client protocol. +type VpnClientProtocol string + +const ( + // IkeV2 specifies the ike v2 state for vpn client protocol. + IkeV2 VpnClientProtocol = "IkeV2" + // SSTP specifies the sstp state for vpn client protocol. + SSTP VpnClientProtocol = "SSTP" +) + // VpnType enumerates the values for vpn type. type VpnType string @@ -853,8 +953,8 @@ const ( RouteBased VpnType = "RouteBased" ) -// AddressSpace is addressSpace contains an array of IP address ranges that can -// be used by subnets of the virtual network. +// AddressSpace is addressSpace contains an array of IP address ranges that can be used by subnets of the virtual +// network. type AddressSpace struct { AddressPrefixes *[]string `json:"addressPrefixes,omitempty"` } @@ -871,114 +971,151 @@ type ApplicationGateway struct { Etag *string `json:"etag,omitempty"` } -// ApplicationGatewayAuthenticationCertificate is authentication certificates -// of an application gateway. +// ApplicationGatewayAuthenticationCertificate is authentication certificates of an application gateway. type ApplicationGatewayAuthenticationCertificate struct { ID *string `json:"id,omitempty"` *ApplicationGatewayAuthenticationCertificatePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayAuthenticationCertificatePropertiesFormat is -// authentication certificates properties of an application gateway. +// ApplicationGatewayAuthenticationCertificatePropertiesFormat is authentication certificates properties of an +// application gateway. type ApplicationGatewayAuthenticationCertificatePropertiesFormat struct { Data *string `json:"data,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayAvailableWafRuleSetsResult is response for -// ApplicationGatewayAvailableWafRuleSets API service call. +// ApplicationGatewayAvailableSslOptions is response for ApplicationGatewayAvailableSslOptions API service call. +type ApplicationGatewayAvailableSslOptions struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"` +} + +// ApplicationGatewayAvailableSslOptionsPropertiesFormat is properties of ApplicationGatewayAvailableSslOptions +type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct { + PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"` + DefaultPolicy ApplicationGatewaySslPolicyName `json:"defaultPolicy,omitempty"` + AvailableCipherSuites *[]ApplicationGatewaySslCipherSuite `json:"availableCipherSuites,omitempty"` + AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"` +} + +// ApplicationGatewayAvailableSslPredefinedPolicies is response for ApplicationGatewayAvailableSslOptions API service +// call. +type ApplicationGatewayAvailableSslPredefinedPolicies struct { + autorest.Response `json:"-"` + Value *[]ApplicationGatewaySslPredefinedPolicy `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ApplicationGatewayAvailableSslPredefinedPolicies) ApplicationGatewayAvailableSslPredefinedPoliciesPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ApplicationGatewayAvailableWafRuleSetsResult is response for ApplicationGatewayAvailableWafRuleSets API service +// call. type ApplicationGatewayAvailableWafRuleSetsResult struct { autorest.Response `json:"-"` Value *[]ApplicationGatewayFirewallRuleSet `json:"value,omitempty"` } -// ApplicationGatewayBackendAddress is backend address of an application -// gateway. +// ApplicationGatewayBackendAddress is backend address of an application gateway. type ApplicationGatewayBackendAddress struct { Fqdn *string `json:"fqdn,omitempty"` IPAddress *string `json:"ipAddress,omitempty"` } -// ApplicationGatewayBackendAddressPool is backend Address Pool of an -// application gateway. +// ApplicationGatewayBackendAddressPool is backend Address Pool of an application gateway. type ApplicationGatewayBackendAddressPool struct { ID *string `json:"id,omitempty"` *ApplicationGatewayBackendAddressPoolPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayBackendAddressPoolPropertiesFormat is properties of -// Backend Address Pool of an application gateway. +// ApplicationGatewayBackendAddressPoolPropertiesFormat is properties of Backend Address Pool of an application +// gateway. type ApplicationGatewayBackendAddressPoolPropertiesFormat struct { BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` BackendAddresses *[]ApplicationGatewayBackendAddress `json:"backendAddresses,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayBackendHealth is list of -// ApplicationGatewayBackendHealthPool resources. +// ApplicationGatewayBackendHealth is list of ApplicationGatewayBackendHealthPool resources. type ApplicationGatewayBackendHealth struct { autorest.Response `json:"-"` BackendAddressPools *[]ApplicationGatewayBackendHealthPool `json:"backendAddressPools,omitempty"` } -// ApplicationGatewayBackendHealthHTTPSettings is application gateway -// BackendHealthHttp settings. +// ApplicationGatewayBackendHealthHTTPSettings is application gateway BackendHealthHttp settings. type ApplicationGatewayBackendHealthHTTPSettings struct { BackendHTTPSettings *ApplicationGatewayBackendHTTPSettings `json:"backendHttpSettings,omitempty"` Servers *[]ApplicationGatewayBackendHealthServer `json:"servers,omitempty"` } -// ApplicationGatewayBackendHealthPool is application gateway BackendHealth -// pool. +// ApplicationGatewayBackendHealthPool is application gateway BackendHealth pool. type ApplicationGatewayBackendHealthPool struct { BackendAddressPool *ApplicationGatewayBackendAddressPool `json:"backendAddressPool,omitempty"` BackendHTTPSettingsCollection *[]ApplicationGatewayBackendHealthHTTPSettings `json:"backendHttpSettingsCollection,omitempty"` } -// ApplicationGatewayBackendHealthServer is application gateway backendhealth -// http settings. +// ApplicationGatewayBackendHealthServer is application gateway backendhealth http settings. type ApplicationGatewayBackendHealthServer struct { Address *string `json:"address,omitempty"` - IPConfiguration *SubResource `json:"ipConfiguration,omitempty"` + IPConfiguration *InterfaceIPConfiguration `json:"ipConfiguration,omitempty"` Health ApplicationGatewayBackendHealthServerHealth `json:"health,omitempty"` } -// ApplicationGatewayBackendHTTPSettings is backend address pool settings of an -// application gateway. +// ApplicationGatewayBackendHTTPSettings is backend address pool settings of an application gateway. type ApplicationGatewayBackendHTTPSettings struct { ID *string `json:"id,omitempty"` *ApplicationGatewayBackendHTTPSettingsPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayBackendHTTPSettingsPropertiesFormat is properties of -// Backend address pool settings of an application gateway. +// ApplicationGatewayBackendHTTPSettingsPropertiesFormat is properties of Backend address pool settings of an +// application gateway. type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct { - Port *int32 `json:"port,omitempty"` - Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` - CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` - RequestTimeout *int32 `json:"requestTimeout,omitempty"` - Probe *SubResource `json:"probe,omitempty"` - AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` + Port *int32 `json:"port,omitempty"` + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + CookieBasedAffinity ApplicationGatewayCookieBasedAffinity `json:"cookieBasedAffinity,omitempty"` + RequestTimeout *int32 `json:"requestTimeout,omitempty"` + Probe *SubResource `json:"probe,omitempty"` + AuthenticationCertificates *[]SubResource `json:"authenticationCertificates,omitempty"` + ConnectionDraining *ApplicationGatewayConnectionDraining `json:"connectionDraining,omitempty"` + HostName *string `json:"hostName,omitempty"` + PickHostNameFromBackendAddress *bool `json:"pickHostNameFromBackendAddress,omitempty"` + AffinityCookieName *string `json:"affinityCookieName,omitempty"` + ProbeEnabled *bool `json:"probeEnabled,omitempty"` + Path *string `json:"path,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayConnectionDraining is connection draining allows open -// connections to a backend server to be active for a specified time after the -// backend server got removed from the configuration. +// ApplicationGatewayConnectionDraining is connection draining allows open connections to a backend server to be active +// for a specified time after the backend server got removed from the configuration. type ApplicationGatewayConnectionDraining struct { Enabled *bool `json:"enabled,omitempty"` DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"` } -// ApplicationGatewayFirewallDisabledRuleGroup is allows to disable rules -// within a rule group or an entire rule group. +// ApplicationGatewayFirewallDisabledRuleGroup is allows to disable rules within a rule group or an entire rule group. type ApplicationGatewayFirewallDisabledRuleGroup struct { RuleGroupName *string `json:"ruleGroupName,omitempty"` Rules *[]int32 `json:"rules,omitempty"` @@ -990,8 +1127,7 @@ type ApplicationGatewayFirewallRule struct { Description *string `json:"description,omitempty"` } -// ApplicationGatewayFirewallRuleGroup is a web application firewall rule -// group. +// ApplicationGatewayFirewallRuleGroup is a web application firewall rule group. type ApplicationGatewayFirewallRuleGroup struct { RuleGroupName *string `json:"ruleGroupName,omitempty"` Description *string `json:"description,omitempty"` @@ -1008,8 +1144,7 @@ type ApplicationGatewayFirewallRuleSet struct { *ApplicationGatewayFirewallRuleSetPropertiesFormat `json:"properties,omitempty"` } -// ApplicationGatewayFirewallRuleSetPropertiesFormat is properties of the web -// application firewall rule set. +// ApplicationGatewayFirewallRuleSetPropertiesFormat is properties of the web application firewall rule set. type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` RuleSetType *string `json:"ruleSetType,omitempty"` @@ -1017,17 +1152,17 @@ type ApplicationGatewayFirewallRuleSetPropertiesFormat struct { RuleGroups *[]ApplicationGatewayFirewallRuleGroup `json:"ruleGroups,omitempty"` } -// ApplicationGatewayFrontendIPConfiguration is frontend IP configuration of an -// application gateway. +// ApplicationGatewayFrontendIPConfiguration is frontend IP configuration of an application gateway. type ApplicationGatewayFrontendIPConfiguration struct { ID *string `json:"id,omitempty"` *ApplicationGatewayFrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayFrontendIPConfigurationPropertiesFormat is properties of -// Frontend IP configuration of an application gateway. +// ApplicationGatewayFrontendIPConfigurationPropertiesFormat is properties of Frontend IP configuration of an +// application gateway. type ApplicationGatewayFrontendIPConfigurationPropertiesFormat struct { PrivateIPAddress *string `json:"privateIPAddress,omitempty"` PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` @@ -1042,10 +1177,10 @@ type ApplicationGatewayFrontendPort struct { *ApplicationGatewayFrontendPortPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayFrontendPortPropertiesFormat is properties of Frontend -// port of an application gateway. +// ApplicationGatewayFrontendPortPropertiesFormat is properties of Frontend port of an application gateway. type ApplicationGatewayFrontendPortPropertiesFormat struct { Port *int32 `json:"port,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` @@ -1057,10 +1192,10 @@ type ApplicationGatewayHTTPListener struct { *ApplicationGatewayHTTPListenerPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayHTTPListenerPropertiesFormat is properties of HTTP -// listener of an application gateway. +// ApplicationGatewayHTTPListenerPropertiesFormat is properties of HTTP listener of an application gateway. type ApplicationGatewayHTTPListenerPropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` FrontendPort *SubResource `json:"frontendPort,omitempty"` @@ -1071,24 +1206,23 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayIPConfiguration is iP configuration of an application -// gateway. Currently 1 public and 1 private IP configuration is allowed. +// ApplicationGatewayIPConfiguration is IP configuration of an application gateway. Currently 1 public and 1 private IP +// configuration is allowed. type ApplicationGatewayIPConfiguration struct { ID *string `json:"id,omitempty"` *ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayIPConfigurationPropertiesFormat is properties of IP -// configuration of an application gateway. +// ApplicationGatewayIPConfigurationPropertiesFormat is properties of IP configuration of an application gateway. type ApplicationGatewayIPConfigurationPropertiesFormat struct { Subnet *SubResource `json:"subnet,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayListResult is response for ListApplicationGateways API -// service call. +// ApplicationGatewayListResult is response for ListApplicationGateways API service call. type ApplicationGatewayListResult struct { autorest.Response `json:"-"` Value *[]ApplicationGateway `json:"value,omitempty"` @@ -1107,22 +1241,22 @@ func (client ApplicationGatewayListResult) ApplicationGatewayListResultPreparer( autorest.WithBaseURL(to.String(client.NextLink))) } -// ApplicationGatewayPathRule is path rule of URL path map of an application -// gateway. +// ApplicationGatewayPathRule is path rule of URL path map of an application gateway. type ApplicationGatewayPathRule struct { ID *string `json:"id,omitempty"` *ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayPathRulePropertiesFormat is properties of probe of an -// application gateway. +// ApplicationGatewayPathRulePropertiesFormat is properties of path rule of an application gateway. type ApplicationGatewayPathRulePropertiesFormat struct { - Paths *[]string `json:"paths,omitempty"` - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + Paths *[]string `json:"paths,omitempty"` + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` + RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } // ApplicationGatewayProbe is probe of the application gateway. @@ -1131,18 +1265,27 @@ type ApplicationGatewayProbe struct { *ApplicationGatewayProbePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayProbePropertiesFormat is properties of probe of an -// application gateway. +// ApplicationGatewayProbeHealthResponseMatch is application gateway probe health response match +type ApplicationGatewayProbeHealthResponseMatch struct { + Body *string `json:"body,omitempty"` + StatusCodes *[]string `json:"statusCodes,omitempty"` +} + +// ApplicationGatewayProbePropertiesFormat is properties of probe of an application gateway. type ApplicationGatewayProbePropertiesFormat struct { - Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` - Host *string `json:"host,omitempty"` - Path *string `json:"path,omitempty"` - Interval *int32 `json:"interval,omitempty"` - Timeout *int32 `json:"timeout,omitempty"` - UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + Protocol ApplicationGatewayProtocol `json:"protocol,omitempty"` + Host *string `json:"host,omitempty"` + Path *string `json:"path,omitempty"` + Interval *int32 `json:"interval,omitempty"` + Timeout *int32 `json:"timeout,omitempty"` + UnhealthyThreshold *int32 `json:"unhealthyThreshold,omitempty"` + PickHostNameFromBackendHTTPSettings *bool `json:"pickHostNameFromBackendHttpSettings,omitempty"` + MinServers *int32 `json:"minServers,omitempty"` + Match *ApplicationGatewayProbeHealthResponseMatch `json:"match,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } // ApplicationGatewayPropertiesFormat is properties of the application gateway. @@ -1161,49 +1304,72 @@ type ApplicationGatewayPropertiesFormat struct { HTTPListeners *[]ApplicationGatewayHTTPListener `json:"httpListeners,omitempty"` URLPathMaps *[]ApplicationGatewayURLPathMap `json:"urlPathMaps,omitempty"` RequestRoutingRules *[]ApplicationGatewayRequestRoutingRule `json:"requestRoutingRules,omitempty"` + RedirectConfigurations *[]ApplicationGatewayRedirectConfiguration `json:"redirectConfigurations,omitempty"` WebApplicationFirewallConfiguration *ApplicationGatewayWebApplicationFirewallConfiguration `json:"webApplicationFirewallConfiguration,omitempty"` ResourceGUID *string `json:"resourceGuid,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayRequestRoutingRule is request routing rule of an -// application gateway. +// ApplicationGatewayRedirectConfiguration is redirect configuration of an application gateway. +type ApplicationGatewayRedirectConfiguration struct { + ID *string `json:"id,omitempty"` + *ApplicationGatewayRedirectConfigurationPropertiesFormat `json:"properties,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` +} + +// ApplicationGatewayRedirectConfigurationPropertiesFormat is properties of redirect configuration of the application +// gateway. +type ApplicationGatewayRedirectConfigurationPropertiesFormat struct { + RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"` + TargetListener *SubResource `json:"targetListener,omitempty"` + TargetURL *string `json:"targetUrl,omitempty"` + IncludePath *bool `json:"includePath,omitempty"` + IncludeQueryString *bool `json:"includeQueryString,omitempty"` + RequestRoutingRules *[]SubResource `json:"requestRoutingRules,omitempty"` + URLPathMaps *[]SubResource `json:"urlPathMaps,omitempty"` + PathRules *[]SubResource `json:"pathRules,omitempty"` +} + +// ApplicationGatewayRequestRoutingRule is request routing rule of an application gateway. type ApplicationGatewayRequestRoutingRule struct { ID *string `json:"id,omitempty"` *ApplicationGatewayRequestRoutingRulePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayRequestRoutingRulePropertiesFormat is properties of -// request routing rule of the application gateway. +// ApplicationGatewayRequestRoutingRulePropertiesFormat is properties of request routing rule of the application +// gateway. type ApplicationGatewayRequestRoutingRulePropertiesFormat struct { - RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` - BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` - BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` - HTTPListener *SubResource `json:"httpListener,omitempty"` - URLPathMap *SubResource `json:"urlPathMap,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"` + BackendAddressPool *SubResource `json:"backendAddressPool,omitempty"` + BackendHTTPSettings *SubResource `json:"backendHttpSettings,omitempty"` + HTTPListener *SubResource `json:"httpListener,omitempty"` + URLPathMap *SubResource `json:"urlPathMap,omitempty"` + RedirectConfiguration *SubResource `json:"redirectConfiguration,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewaySku is sKU of an application gateway +// ApplicationGatewaySku is SKU of an application gateway type ApplicationGatewaySku struct { Name ApplicationGatewaySkuName `json:"name,omitempty"` Tier ApplicationGatewayTier `json:"tier,omitempty"` Capacity *int32 `json:"capacity,omitempty"` } -// ApplicationGatewaySslCertificate is sSL certificates of an application -// gateway. +// ApplicationGatewaySslCertificate is SSL certificates of an application gateway. type ApplicationGatewaySslCertificate struct { ID *string `json:"id,omitempty"` *ApplicationGatewaySslCertificatePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewaySslCertificatePropertiesFormat is properties of SSL -// certificates of an application gateway. +// ApplicationGatewaySslCertificatePropertiesFormat is properties of SSL certificates of an application gateway. type ApplicationGatewaySslCertificatePropertiesFormat struct { Data *string `json:"data,omitempty"` Password *string `json:"password,omitempty"` @@ -1211,31 +1377,48 @@ type ApplicationGatewaySslCertificatePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewaySslPolicy is application gateway SSL policy. +// ApplicationGatewaySslPolicy is application Gateway Ssl policy. type ApplicationGatewaySslPolicy struct { - DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` + DisabledSslProtocols *[]ApplicationGatewaySslProtocol `json:"disabledSslProtocols,omitempty"` + PolicyType ApplicationGatewaySslPolicyType `json:"policyType,omitempty"` + PolicyName ApplicationGatewaySslPolicyName `json:"policyName,omitempty"` + CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` + MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` } -// ApplicationGatewayURLPathMap is urlPathMaps give a url path to the backend -// mapping information for PathBasedRouting. +// ApplicationGatewaySslPredefinedPolicy is an Ssl predefined policy +type ApplicationGatewaySslPredefinedPolicy struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + *ApplicationGatewaySslPredefinedPolicyPropertiesFormat `json:"properties,omitempty"` +} + +// ApplicationGatewaySslPredefinedPolicyPropertiesFormat is properties of ApplicationGatewaySslPredefinedPolicy +type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct { + CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"` + MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"` +} + +// ApplicationGatewayURLPathMap is urlPathMaps give a url path to the backend mapping information for PathBasedRouting. type ApplicationGatewayURLPathMap struct { ID *string `json:"id,omitempty"` *ApplicationGatewayURLPathMapPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` + Type *string `json:"type,omitempty"` } -// ApplicationGatewayURLPathMapPropertiesFormat is properties of UrlPathMap of -// the application gateway. +// ApplicationGatewayURLPathMapPropertiesFormat is properties of UrlPathMap of the application gateway. type ApplicationGatewayURLPathMapPropertiesFormat struct { - DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` - DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` - PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + DefaultBackendAddressPool *SubResource `json:"defaultBackendAddressPool,omitempty"` + DefaultBackendHTTPSettings *SubResource `json:"defaultBackendHttpSettings,omitempty"` + DefaultRedirectConfiguration *SubResource `json:"defaultRedirectConfiguration,omitempty"` + PathRules *[]ApplicationGatewayPathRule `json:"pathRules,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// ApplicationGatewayWebApplicationFirewallConfiguration is application gateway -// web application firewall configuration. +// ApplicationGatewayWebApplicationFirewallConfiguration is application gateway web application firewall configuration. type ApplicationGatewayWebApplicationFirewallConfiguration struct { Enabled *bool `json:"enabled,omitempty"` FirewallMode ApplicationGatewayFirewallMode `json:"firewallMode,omitempty"` @@ -1244,8 +1427,45 @@ type ApplicationGatewayWebApplicationFirewallConfiguration struct { DisabledRuleGroups *[]ApplicationGatewayFirewallDisabledRuleGroup `json:"disabledRuleGroups,omitempty"` } -// AuthorizationListResult is response for ListAuthorizations API service call -// retrieves all authorizations that belongs to an ExpressRouteCircuit. +// ApplicationSecurityGroup is an application security group in a resource group. +type ApplicationSecurityGroup struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ApplicationSecurityGroupPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` +} + +// ApplicationSecurityGroupListResult is a list of application security groups. +type ApplicationSecurityGroupListResult struct { + autorest.Response `json:"-"` + Value *[]ApplicationSecurityGroup `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ApplicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ApplicationSecurityGroupListResult) ApplicationSecurityGroupListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ApplicationSecurityGroupPropertiesFormat is application security group properties. +type ApplicationSecurityGroupPropertiesFormat struct { + ResourceGUID *string `json:"resourceGuid,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// AuthorizationListResult is response for ListAuthorizations API service call retrieves all authorizations that +// belongs to an ExpressRouteCircuit. type AuthorizationListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitAuthorization `json:"value,omitempty"` @@ -1271,29 +1491,97 @@ type AuthorizationPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// AzureAsyncOperationResult is the response body contains the status of the -// specified asynchronous operation, indicating whether it has succeeded, is in -// progress, or has failed. Note that this status is distinct from the HTTP -// status code returned for the Get Operation Status operation itself. If the -// asynchronous operation succeeded, the response body includes the HTTP status -// code for the successful request. If the asynchronous operation failed, the -// response body includes the HTTP status code for the failed request and error -// information regarding the failure. +// AvailableProvidersList is list of available countries with details. +type AvailableProvidersList struct { + autorest.Response `json:"-"` + Countries *[]AvailableProvidersListCountry `json:"countries,omitempty"` +} + +// AvailableProvidersListCity is city or town details. +type AvailableProvidersListCity struct { + CityName *string `json:"cityName,omitempty"` + Providers *[]string `json:"providers,omitempty"` +} + +// AvailableProvidersListCountry is country details. +type AvailableProvidersListCountry struct { + CountryName *string `json:"countryName,omitempty"` + Providers *[]string `json:"providers,omitempty"` + States *[]AvailableProvidersListState `json:"states,omitempty"` +} + +// AvailableProvidersListParameters is constraints that determine the list of available Internet service providers. +type AvailableProvidersListParameters struct { + AzureLocations *[]string `json:"azureLocations,omitempty"` + Country *string `json:"country,omitempty"` + State *string `json:"state,omitempty"` + City *string `json:"city,omitempty"` +} + +// AvailableProvidersListState is state details. +type AvailableProvidersListState struct { + StateName *string `json:"stateName,omitempty"` + Providers *[]string `json:"providers,omitempty"` + Cities *[]AvailableProvidersListCity `json:"cities,omitempty"` +} + +// AzureAsyncOperationResult is the response body contains the status of the specified asynchronous operation, +// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP +// status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the +// response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the +// response body includes the HTTP status code for the failed request and error information regarding the failure. type AzureAsyncOperationResult struct { Status OperationStatus `json:"status,omitempty"` Error *Error `json:"error,omitempty"` } +// AzureReachabilityReport is azure reachability report details. +type AzureReachabilityReport struct { + autorest.Response `json:"-"` + AggregationLevel *string `json:"aggregationLevel,omitempty"` + ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` + ReachabilityReport *[]AzureReachabilityReportItem `json:"reachabilityReport,omitempty"` +} + +// AzureReachabilityReportItem is azure reachability report details for a given provider location. +type AzureReachabilityReportItem struct { + Provider *string `json:"provider,omitempty"` + AzureLocation *string `json:"azureLocation,omitempty"` + Latencies *[]AzureReachabilityReportLatencyInfo `json:"latencies,omitempty"` +} + +// AzureReachabilityReportLatencyInfo is details on latency for a time series. +type AzureReachabilityReportLatencyInfo struct { + TimeStamp *date.Time `json:"timeStamp,omitempty"` + Score *int32 `json:"score,omitempty"` +} + +// AzureReachabilityReportLocation is parameters that define a geographic location. +type AzureReachabilityReportLocation struct { + Country *string `json:"country,omitempty"` + State *string `json:"state,omitempty"` + City *string `json:"city,omitempty"` +} + +// AzureReachabilityReportParameters is geographic and time constraints for Azure reachability report. +type AzureReachabilityReportParameters struct { + ProviderLocation *AzureReachabilityReportLocation `json:"providerLocation,omitempty"` + Providers *[]string `json:"providers,omitempty"` + AzureLocations *[]string `json:"azureLocations,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` +} + // BackendAddressPool is pool of backend IP addresses. type BackendAddressPool struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` *BackendAddressPoolPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` } -// BackendAddressPoolPropertiesFormat is properties of the backend address -// pool. +// BackendAddressPoolPropertiesFormat is properties of the backend address pool. type BackendAddressPoolPropertiesFormat struct { BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"` LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` @@ -1301,16 +1589,17 @@ type BackendAddressPoolPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// BGPCommunity is contains bgp community information offered in Service -// Community resources. +// BGPCommunity is contains bgp community information offered in Service Community resources. type BGPCommunity struct { ServiceSupportedRegion *string `json:"serviceSupportedRegion,omitempty"` CommunityName *string `json:"communityName,omitempty"` CommunityValue *string `json:"communityValue,omitempty"` CommunityPrefixes *[]string `json:"communityPrefixes,omitempty"` + IsAuthorizedToUse *bool `json:"isAuthorizedToUse,omitempty"` + ServiceGroup *string `json:"serviceGroup,omitempty"` } -// BgpPeerStatus is bGP peer status details +// BgpPeerStatus is BGP peer status details type BgpPeerStatus struct { LocalAddress *string `json:"localAddress,omitempty"` Neighbor *string `json:"neighbor,omitempty"` @@ -1322,8 +1611,7 @@ type BgpPeerStatus struct { MessagesReceived *int64 `json:"messagesReceived,omitempty"` } -// BgpPeerStatusListResult is response for list BGP peer status API service -// call +// BgpPeerStatusListResult is response for list BGP peer status API service call type BgpPeerStatusListResult struct { autorest.Response `json:"-"` Value *[]BgpPeerStatus `json:"value,omitempty"` @@ -1339,8 +1627,7 @@ type BgpServiceCommunity struct { *BgpServiceCommunityPropertiesFormat `json:"properties,omitempty"` } -// BgpServiceCommunityListResult is response for the ListServiceCommunity API -// service call. +// BgpServiceCommunityListResult is response for the ListServiceCommunity API service call. type BgpServiceCommunityListResult struct { autorest.Response `json:"-"` Value *[]BgpServiceCommunity `json:"value,omitempty"` @@ -1365,7 +1652,7 @@ type BgpServiceCommunityPropertiesFormat struct { BgpCommunities *[]BGPCommunity `json:"bgpCommunities,omitempty"` } -// BgpSettings is bGP settings details +// BgpSettings is BGP settings details type BgpSettings struct { Asn *int64 `json:"asn,omitempty"` BgpPeeringAddress *string `json:"bgpPeeringAddress,omitempty"` @@ -1384,15 +1671,62 @@ type ConnectionSharedKey struct { Value *string `json:"value,omitempty"` } -// DhcpOptions is dhcpOptions contains an array of DNS servers available to VMs -// deployed in the virtual network. Standard DHCP option for a subnet overrides -// VNET DHCP options. +// ConnectivityDestination is parameters that define destination of connection. +type ConnectivityDestination struct { + ResourceID *string `json:"resourceId,omitempty"` + Address *string `json:"address,omitempty"` + Port *int32 `json:"port,omitempty"` +} + +// ConnectivityHop is information about a hop between the source and the destination. +type ConnectivityHop struct { + Type *string `json:"type,omitempty"` + ID *string `json:"id,omitempty"` + Address *string `json:"address,omitempty"` + ResourceID *string `json:"resourceId,omitempty"` + NextHopIds *[]string `json:"nextHopIds,omitempty"` + Issues *[]ConnectivityIssue `json:"issues,omitempty"` +} + +// ConnectivityInformation is information on the connectivity status. +type ConnectivityInformation struct { + autorest.Response `json:"-"` + Hops *[]ConnectivityHop `json:"hops,omitempty"` + ConnectionStatus ConnectionStatus `json:"connectionStatus,omitempty"` + AvgLatencyInMs *int32 `json:"avgLatencyInMs,omitempty"` + MinLatencyInMs *int32 `json:"minLatencyInMs,omitempty"` + MaxLatencyInMs *int32 `json:"maxLatencyInMs,omitempty"` + ProbesSent *int32 `json:"probesSent,omitempty"` + ProbesFailed *int32 `json:"probesFailed,omitempty"` +} + +// ConnectivityIssue is information about an issue encountered in the process of checking for connectivity. +type ConnectivityIssue struct { + Origin Origin `json:"origin,omitempty"` + Severity Severity `json:"severity,omitempty"` + Type IssueType `json:"type,omitempty"` + Context *[]map[string]*string `json:"context,omitempty"` +} + +// ConnectivityParameters is parameters that determine how the connectivity check will be performed. +type ConnectivityParameters struct { + Source *ConnectivitySource `json:"source,omitempty"` + Destination *ConnectivityDestination `json:"destination,omitempty"` +} + +// ConnectivitySource is parameters that define the source of the connection. +type ConnectivitySource struct { + ResourceID *string `json:"resourceId,omitempty"` + Port *int32 `json:"port,omitempty"` +} + +// DhcpOptions is dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. +// Standard DHCP option for a subnet overrides VNET DHCP options. type DhcpOptions struct { DNSServers *[]string `json:"dnsServers,omitempty"` } -// DNSNameAvailabilityResult is response for the CheckDnsNameAvailability API -// service call. +// DNSNameAvailabilityResult is response for the CheckDnsNameAvailability API service call. type DNSNameAvailabilityResult struct { autorest.Response `json:"-"` Available *bool `json:"available,omitempty"` @@ -1403,17 +1737,16 @@ type EffectiveNetworkSecurityGroup struct { NetworkSecurityGroup *SubResource `json:"networkSecurityGroup,omitempty"` Association *EffectiveNetworkSecurityGroupAssociation `json:"association,omitempty"` EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` + TagMap *map[string][]string `json:"tagMap,omitempty"` } -// EffectiveNetworkSecurityGroupAssociation is the effective network security -// group association. +// EffectiveNetworkSecurityGroupAssociation is the effective network security group association. type EffectiveNetworkSecurityGroupAssociation struct { Subnet *SubResource `json:"subnet,omitempty"` NetworkInterface *SubResource `json:"networkInterface,omitempty"` } -// EffectiveNetworkSecurityGroupListResult is response for list effective -// network security groups API service call. +// EffectiveNetworkSecurityGroupListResult is response for list effective network security groups API service call. type EffectiveNetworkSecurityGroupListResult struct { autorest.Response `json:"-"` Value *[]EffectiveNetworkSecurityGroup `json:"value,omitempty"` @@ -1422,17 +1755,21 @@ type EffectiveNetworkSecurityGroupListResult struct { // EffectiveNetworkSecurityRule is effective network security rules. type EffectiveNetworkSecurityRule struct { - Name *string `json:"name,omitempty"` - Protocol SecurityRuleProtocol `json:"protocol,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` - ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` - Access SecurityRuleAccess `json:"access,omitempty"` - Priority *int32 `json:"priority,omitempty"` - Direction SecurityRuleDirection `json:"direction,omitempty"` + Name *string `json:"name,omitempty"` + Protocol EffectiveSecurityRuleProtocol `json:"protocol,omitempty"` + SourcePortRange *string `json:"sourcePortRange,omitempty"` + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + ExpandedSourceAddressPrefix *[]string `json:"expandedSourceAddressPrefix,omitempty"` + ExpandedDestinationAddressPrefix *[]string `json:"expandedDestinationAddressPrefix,omitempty"` + Access SecurityRuleAccess `json:"access,omitempty"` + Priority *int32 `json:"priority,omitempty"` + Direction SecurityRuleDirection `json:"direction,omitempty"` } // EffectiveRoute is effective Route @@ -1445,14 +1782,39 @@ type EffectiveRoute struct { NextHopType RouteNextHopType `json:"nextHopType,omitempty"` } -// EffectiveRouteListResult is response for list effective route API service -// call. +// EffectiveRouteListResult is response for list effective route API service call. type EffectiveRouteListResult struct { autorest.Response `json:"-"` Value *[]EffectiveRoute `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` } +// EndpointServiceResult is endpoint service. +type EndpointServiceResult struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// EndpointServicesListResult is response for the ListAvailableEndpointServices API service call. +type EndpointServicesListResult struct { + autorest.Response `json:"-"` + Value *[]EndpointServiceResult `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// EndpointServicesListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client EndpointServicesListResult) EndpointServicesListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // Error is type Error struct { Code *string `json:"code,omitempty"` @@ -1482,8 +1844,7 @@ type ExpressRouteCircuit struct { Etag *string `json:"etag,omitempty"` } -// ExpressRouteCircuitArpTable is the ARP table associated with the -// ExpressRouteCircuit. +// ExpressRouteCircuitArpTable is the ARP table associated with the ExpressRouteCircuit. type ExpressRouteCircuitArpTable struct { Age *int32 `json:"age,omitempty"` Interface *string `json:"interface,omitempty"` @@ -1491,8 +1852,7 @@ type ExpressRouteCircuitArpTable struct { MacAddress *string `json:"macAddress,omitempty"` } -// ExpressRouteCircuitAuthorization is authorization in an ExpressRouteCircuit -// resource. +// ExpressRouteCircuitAuthorization is authorization in an ExpressRouteCircuit resource. type ExpressRouteCircuitAuthorization struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1501,8 +1861,7 @@ type ExpressRouteCircuitAuthorization struct { Etag *string `json:"etag,omitempty"` } -// ExpressRouteCircuitListResult is response for ListExpressRouteCircuit API -// service call. +// ExpressRouteCircuitListResult is response for ListExpressRouteCircuit API service call. type ExpressRouteCircuitListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuit `json:"value,omitempty"` @@ -1533,13 +1892,15 @@ type ExpressRouteCircuitPeering struct { // ExpressRouteCircuitPeeringConfig is specifies the peering configuration. type ExpressRouteCircuitPeeringConfig struct { AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"` + AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"` AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"` + LegacyMode *int32 `json:"legacyMode,omitempty"` CustomerASN *int32 `json:"customerASN,omitempty"` RoutingRegistryName *string `json:"routingRegistryName,omitempty"` } -// ExpressRouteCircuitPeeringListResult is response for ListPeering API service -// call retrieves all peerings that belong to an ExpressRouteCircuit. +// ExpressRouteCircuitPeeringListResult is response for ListPeering API service call retrieves all peerings that belong +// to an ExpressRouteCircuit. type ExpressRouteCircuitPeeringListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitPeering `json:"value,omitempty"` @@ -1560,22 +1921,23 @@ func (client ExpressRouteCircuitPeeringListResult) ExpressRouteCircuitPeeringLis // ExpressRouteCircuitPeeringPropertiesFormat is type ExpressRouteCircuitPeeringPropertiesFormat struct { - PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"` - State ExpressRouteCircuitPeeringState `json:"state,omitempty"` - AzureASN *int32 `json:"azureASN,omitempty"` - PeerASN *int32 `json:"peerASN,omitempty"` - PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` - SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` - PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` - SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` - SharedKey *string `json:"sharedKey,omitempty"` - VlanID *int32 `json:"vlanId,omitempty"` - MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` - Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` - GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` - LastModifiedBy *string `json:"lastModifiedBy,omitempty"` - RouteFilter *RouteFilter `json:"routeFilter,omitempty"` + PeeringType ExpressRouteCircuitPeeringType `json:"peeringType,omitempty"` + State ExpressRouteCircuitPeeringState `json:"state,omitempty"` + AzureASN *int32 `json:"azureASN,omitempty"` + PeerASN *int32 `json:"peerASN,omitempty"` + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + PrimaryAzurePort *string `json:"primaryAzurePort,omitempty"` + SecondaryAzurePort *string `json:"secondaryAzurePort,omitempty"` + SharedKey *string `json:"sharedKey,omitempty"` + VlanID *int32 `json:"vlanId,omitempty"` + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + Stats *ExpressRouteCircuitStats `json:"stats,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + RouteFilter *RouteFilter `json:"routeFilter,omitempty"` + Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"` } // ExpressRouteCircuitPropertiesFormat is properties of ExpressRouteCircuit. @@ -1592,8 +1954,7 @@ type ExpressRouteCircuitPropertiesFormat struct { GatewayManagerEtag *string `json:"gatewayManagerEtag,omitempty"` } -// ExpressRouteCircuitRoutesTable is the routes table associated with the -// ExpressRouteCircuit +// ExpressRouteCircuitRoutesTable is the routes table associated with the ExpressRouteCircuit type ExpressRouteCircuitRoutesTable struct { NetworkProperty *string `json:"network,omitempty"` NextHop *string `json:"nextHop,omitempty"` @@ -1602,8 +1963,7 @@ type ExpressRouteCircuitRoutesTable struct { Path *string `json:"path,omitempty"` } -// ExpressRouteCircuitRoutesTableSummary is the routes table associated with -// the ExpressRouteCircuit. +// ExpressRouteCircuitRoutesTableSummary is the routes table associated with the ExpressRouteCircuit. type ExpressRouteCircuitRoutesTableSummary struct { Neighbor *string `json:"neighbor,omitempty"` V *int32 `json:"v,omitempty"` @@ -1612,16 +1972,14 @@ type ExpressRouteCircuitRoutesTableSummary struct { StatePfxRcd *string `json:"statePfxRcd,omitempty"` } -// ExpressRouteCircuitsArpTableListResult is response for ListArpTable -// associated with the Express Route Circuits API. +// ExpressRouteCircuitsArpTableListResult is response for ListArpTable associated with the Express Route Circuits API. type ExpressRouteCircuitsArpTableListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitArpTable `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitServiceProviderProperties is contains -// ServiceProviderProperties in an ExpressRouteCircuit. +// ExpressRouteCircuitServiceProviderProperties is contains ServiceProviderProperties in an ExpressRouteCircuit. type ExpressRouteCircuitServiceProviderProperties struct { ServiceProviderName *string `json:"serviceProviderName,omitempty"` PeeringLocation *string `json:"peeringLocation,omitempty"` @@ -1635,16 +1993,16 @@ type ExpressRouteCircuitSku struct { Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"` } -// ExpressRouteCircuitsRoutesTableListResult is response for ListRoutesTable -// associated with the Express Route Circuits API. +// ExpressRouteCircuitsRoutesTableListResult is response for ListRoutesTable associated with the Express Route Circuits +// API. type ExpressRouteCircuitsRoutesTableListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitRoutesTable `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` } -// ExpressRouteCircuitsRoutesTableSummaryListResult is response for -// ListRoutesTable associated with the Express Route Circuits API. +// ExpressRouteCircuitsRoutesTableSummaryListResult is response for ListRoutesTable associated with the Express Route +// Circuits API. type ExpressRouteCircuitsRoutesTableSummaryListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteCircuitRoutesTableSummary `json:"value,omitempty"` @@ -1670,15 +2028,14 @@ type ExpressRouteServiceProvider struct { *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"` } -// ExpressRouteServiceProviderBandwidthsOffered is contains bandwidths offered -// in ExpressRouteServiceProvider resources. +// ExpressRouteServiceProviderBandwidthsOffered is contains bandwidths offered in ExpressRouteServiceProvider +// resources. type ExpressRouteServiceProviderBandwidthsOffered struct { OfferName *string `json:"offerName,omitempty"` ValueInMbps *int32 `json:"valueInMbps,omitempty"` } -// ExpressRouteServiceProviderListResult is response for the -// ListExpressRouteServiceProvider API service call. +// ExpressRouteServiceProviderListResult is response for the ListExpressRouteServiceProvider API service call. type ExpressRouteServiceProviderListResult struct { autorest.Response `json:"-"` Value *[]ExpressRouteServiceProvider `json:"value,omitempty"` @@ -1697,8 +2054,7 @@ func (client ExpressRouteServiceProviderListResult) ExpressRouteServiceProviderL autorest.WithBaseURL(to.String(client.NextLink))) } -// ExpressRouteServiceProviderPropertiesFormat is properties of -// ExpressRouteServiceProvider. +// ExpressRouteServiceProviderPropertiesFormat is properties of ExpressRouteServiceProvider. type ExpressRouteServiceProviderPropertiesFormat struct { PeeringLocations *[]string `json:"peeringLocations,omitempty"` BandwidthsOffered *[]ExpressRouteServiceProviderBandwidthsOffered `json:"bandwidthsOffered,omitempty"` @@ -1719,22 +2075,22 @@ type FlowLogProperties struct { RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"` } -// FlowLogStatusParameters is parameters that define a resource to query flow -// log status. +// FlowLogStatusParameters is parameters that define a resource to query flow log status. type FlowLogStatusParameters struct { TargetResourceID *string `json:"targetResourceId,omitempty"` } // FrontendIPConfiguration is frontend IP address of the load balancer. type FrontendIPConfiguration struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` *FrontendIPConfigurationPropertiesFormat `json:"properties,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` + Zones *[]string `json:"zones,omitempty"` } -// FrontendIPConfigurationPropertiesFormat is properties of Frontend IP -// Configuration of the load balancer. +// FrontendIPConfigurationPropertiesFormat is properties of Frontend IP Configuration of the load balancer. type FrontendIPConfigurationPropertiesFormat struct { InboundNatRules *[]SubResource `json:"inboundNatRules,omitempty"` InboundNatPools *[]SubResource `json:"inboundNatPools,omitempty"` @@ -1784,12 +2140,32 @@ type InboundNatPoolPropertiesFormat struct { // InboundNatRule is inbound NAT rule of the load balancer. type InboundNatRule struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` *InboundNatRulePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` } +// InboundNatRuleListResult is response for ListInboundNatRule API service call. +type InboundNatRuleListResult struct { + autorest.Response `json:"-"` + Value *[]InboundNatRule `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// InboundNatRuleListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client InboundNatRuleListResult) InboundNatRuleListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // InboundNatRulePropertiesFormat is properties of the inbound NAT rule. type InboundNatRulePropertiesFormat struct { FrontendIPConfiguration *SubResource `json:"frontendIPConfiguration,omitempty"` @@ -1820,7 +2196,7 @@ type InterfaceAssociation struct { SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` } -// InterfaceDNSSettings is dNS settings of a network interface. +// InterfaceDNSSettings is DNS settings of a network interface. type InterfaceDNSSettings struct { DNSServers *[]string `json:"dnsServers,omitempty"` AppliedDNSServers *[]string `json:"appliedDnsServers,omitempty"` @@ -1831,12 +2207,32 @@ type InterfaceDNSSettings struct { // InterfaceIPConfiguration is iPConfiguration in a network interface. type InterfaceIPConfiguration struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` *InterfaceIPConfigurationPropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` } +// InterfaceIPConfigurationListResult is response for list ip configurations API service call. +type InterfaceIPConfigurationListResult struct { + autorest.Response `json:"-"` + Value *[]InterfaceIPConfiguration `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// InterfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client InterfaceIPConfigurationListResult) InterfaceIPConfigurationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // InterfaceIPConfigurationPropertiesFormat is properties of IP configuration. type InterfaceIPConfigurationPropertiesFormat struct { ApplicationGatewayBackendAddressPools *[]ApplicationGatewayBackendAddressPool `json:"applicationGatewayBackendAddressPools,omitempty"` @@ -1848,11 +2244,11 @@ type InterfaceIPConfigurationPropertiesFormat struct { Subnet *Subnet `json:"subnet,omitempty"` Primary *bool `json:"primary,omitempty"` PublicIPAddress *PublicIPAddress `json:"publicIPAddress,omitempty"` + ApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"applicationSecurityGroups,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// InterfaceListResult is response for the ListNetworkInterface API service -// call. +// InterfaceListResult is response for the ListNetworkInterface API service call. type InterfaceListResult struct { autorest.Response `json:"-"` Value *[]Interface `json:"value,omitempty"` @@ -1871,6 +2267,25 @@ func (client InterfaceListResult) InterfaceListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } +// InterfaceLoadBalancerListResult is response for list ip configurations API service call. +type InterfaceLoadBalancerListResult struct { + autorest.Response `json:"-"` + Value *[]LoadBalancer `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// InterfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client InterfaceLoadBalancerListResult) InterfaceLoadBalancerListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // InterfacePropertiesFormat is networkInterface properties. type InterfacePropertiesFormat struct { VirtualMachine *SubResource `json:"virtualMachine,omitempty"` @@ -1885,15 +2300,14 @@ type InterfacePropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// IPAddressAvailabilityResult is response for CheckIPAddressAvailability API -// service call +// IPAddressAvailabilityResult is response for CheckIPAddressAvailability API service call type IPAddressAvailabilityResult struct { autorest.Response `json:"-"` Available *bool `json:"available,omitempty"` AvailableIPAddresses *[]string `json:"availableIPAddresses,omitempty"` } -// IPConfiguration is iPConfiguration +// IPConfiguration is IP configuration type IPConfiguration struct { ID *string `json:"id,omitempty"` *IPConfigurationPropertiesFormat `json:"properties,omitempty"` @@ -1910,8 +2324,7 @@ type IPConfigurationPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// IpsecPolicy is an IPSec Policy configuration for a virtual network gateway -// connection +// IpsecPolicy is an IPSec Policy configuration for a virtual network gateway connection type IpsecPolicy struct { SaLifeTimeSeconds *int32 `json:"saLifeTimeSeconds,omitempty"` SaDataSizeKilobytes *int32 `json:"saDataSizeKilobytes,omitempty"` @@ -1923,6 +2336,15 @@ type IpsecPolicy struct { PfsGroup PfsGroup `json:"pfsGroup,omitempty"` } +// Ipv6ExpressRouteCircuitPeeringConfig is contains IPv6 peering config. +type Ipv6ExpressRouteCircuitPeeringConfig struct { + PrimaryPeerAddressPrefix *string `json:"primaryPeerAddressPrefix,omitempty"` + SecondaryPeerAddressPrefix *string `json:"secondaryPeerAddressPrefix,omitempty"` + MicrosoftPeeringConfig *ExpressRouteCircuitPeeringConfig `json:"microsoftPeeringConfig,omitempty"` + RouteFilter *RouteFilter `json:"routeFilter,omitempty"` + State ExpressRouteCircuitPeeringState `json:"state,omitempty"` +} + // LoadBalancer is loadBalancer resource type LoadBalancer struct { autorest.Response `json:"-"` @@ -1931,10 +2353,49 @@ type LoadBalancer struct { Type *string `json:"type,omitempty"` Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` + Sku *LoadBalancerSku `json:"sku,omitempty"` *LoadBalancerPropertiesFormat `json:"properties,omitempty"` Etag *string `json:"etag,omitempty"` } +// LoadBalancerBackendAddressPoolListResult is response for ListBackendAddressPool API service call. +type LoadBalancerBackendAddressPoolListResult struct { + autorest.Response `json:"-"` + Value *[]BackendAddressPool `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// LoadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client LoadBalancerBackendAddressPoolListResult) LoadBalancerBackendAddressPoolListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// LoadBalancerFrontendIPConfigurationListResult is response for ListFrontendIPConfiguration API service call. +type LoadBalancerFrontendIPConfigurationListResult struct { + autorest.Response `json:"-"` + Value *[]FrontendIPConfiguration `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// LoadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client LoadBalancerFrontendIPConfigurationListResult) LoadBalancerFrontendIPConfigurationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // LoadBalancerListResult is response for ListLoadBalancers API service call. type LoadBalancerListResult struct { autorest.Response `json:"-"` @@ -1954,6 +2415,44 @@ func (client LoadBalancerListResult) LoadBalancerListResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } +// LoadBalancerLoadBalancingRuleListResult is response for ListLoadBalancingRule API service call. +type LoadBalancerLoadBalancingRuleListResult struct { + autorest.Response `json:"-"` + Value *[]LoadBalancingRule `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// LoadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client LoadBalancerLoadBalancingRuleListResult) LoadBalancerLoadBalancingRuleListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// LoadBalancerProbeListResult is response for ListProbe API service call. +type LoadBalancerProbeListResult struct { + autorest.Response `json:"-"` + Value *[]Probe `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// LoadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client LoadBalancerProbeListResult) LoadBalancerProbeListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // LoadBalancerPropertiesFormat is properties of the load balancer. type LoadBalancerPropertiesFormat struct { FrontendIPConfigurations *[]FrontendIPConfiguration `json:"frontendIPConfigurations,omitempty"` @@ -1967,8 +2466,14 @@ type LoadBalancerPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// LoadBalancingRule is a loag balancing rule for a load balancer. +// LoadBalancerSku is SKU of a load balancer +type LoadBalancerSku struct { + Name LoadBalancerSkuName `json:"name,omitempty"` +} + +// LoadBalancingRule is a load balancing rule for a load balancer. type LoadBalancingRule struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` *LoadBalancingRulePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` @@ -1986,6 +2491,7 @@ type LoadBalancingRulePropertiesFormat struct { BackendPort *int32 `json:"backendPort,omitempty"` IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"` EnableFloatingIP *bool `json:"enableFloatingIP,omitempty"` + DisableOutboundSnat *bool `json:"disableOutboundSnat,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } @@ -2001,8 +2507,7 @@ type LocalNetworkGateway struct { Etag *string `json:"etag,omitempty"` } -// LocalNetworkGatewayListResult is response for ListLocalNetworkGateways API -// service call. +// LocalNetworkGatewayListResult is response for ListLocalNetworkGateways API service call. type LocalNetworkGatewayListResult struct { autorest.Response `json:"-"` Value *[]LocalNetworkGateway `json:"value,omitempty"` @@ -2030,8 +2535,7 @@ type LocalNetworkGatewayPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// NextHopParameters is parameters that define the source and destination -// endpoint. +// NextHopParameters is parameters that define the source and destination endpoint. type NextHopParameters struct { TargetResourceID *string `json:"targetResourceId,omitempty"` SourceIPAddress *string `json:"sourceIPAddress,omitempty"` @@ -2068,8 +2572,7 @@ type PacketCapture struct { *PacketCaptureParameters `json:"properties,omitempty"` } -// PacketCaptureFilter is filter that is applied to packet capture request. -// Multiple filters can be applied. +// PacketCaptureFilter is filter that is applied to packet capture request. Multiple filters can be applied. type PacketCaptureFilter struct { Protocol PcProtocol `json:"protocol,omitempty"` LocalIPAddress *string `json:"localIPAddress,omitempty"` @@ -2084,8 +2587,7 @@ type PacketCaptureListResult struct { Value *[]PacketCaptureResult `json:"value,omitempty"` } -// PacketCaptureParameters is parameters that define the create packet capture -// operation. +// PacketCaptureParameters is parameters that define the create packet capture operation. type PacketCaptureParameters struct { Target *string `json:"target,omitempty"` BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` @@ -2115,8 +2617,7 @@ type PacketCaptureResult struct { *PacketCaptureResultProperties `json:"properties,omitempty"` } -// PacketCaptureResultProperties is describes the properties of a packet -// capture session. +// PacketCaptureResultProperties is describes the properties of a packet capture session. type PacketCaptureResultProperties struct { Target *string `json:"target,omitempty"` BytesToCapturePerPacket *int32 `json:"bytesToCapturePerPacket,omitempty"` @@ -2127,8 +2628,7 @@ type PacketCaptureResultProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// PacketCaptureStorageLocation is describes the storage location for a packet -// capture session. +// PacketCaptureStorageLocation is describes the storage location for a packet capture session. type PacketCaptureStorageLocation struct { StorageID *string `json:"storageId,omitempty"` StoragePath *string `json:"storagePath,omitempty"` @@ -2156,13 +2656,14 @@ type PatchRouteFilterRule struct { // Probe is a load balancer probe. type Probe struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` *ProbePropertiesFormat `json:"properties,omitempty"` Name *string `json:"name,omitempty"` Etag *string `json:"etag,omitempty"` } -// ProbePropertiesFormat is +// ProbePropertiesFormat is load balancer probe resource. type ProbePropertiesFormat struct { LoadBalancingRules *[]SubResource `json:"loadBalancingRules,omitempty"` Protocol ProbeProtocol `json:"protocol,omitempty"` @@ -2181,20 +2682,20 @@ type PublicIPAddress struct { Type *string `json:"type,omitempty"` Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` + Sku *PublicIPAddressSku `json:"sku,omitempty"` *PublicIPAddressPropertiesFormat `json:"properties,omitempty"` - Etag *string `json:"etag,omitempty"` + Etag *string `json:"etag,omitempty"` + Zones *[]string `json:"zones,omitempty"` } -// PublicIPAddressDNSSettings is contains FQDN of the DNS record associated -// with the public IP address +// PublicIPAddressDNSSettings is contains FQDN of the DNS record associated with the public IP address type PublicIPAddressDNSSettings struct { DomainNameLabel *string `json:"domainNameLabel,omitempty"` Fqdn *string `json:"fqdn,omitempty"` ReverseFqdn *string `json:"reverseFqdn,omitempty"` } -// PublicIPAddressListResult is response for ListPublicIpAddresses API service -// call. +// PublicIPAddressListResult is response for ListPublicIpAddresses API service call. type PublicIPAddressListResult struct { autorest.Response `json:"-"` Value *[]PublicIPAddress `json:"value,omitempty"` @@ -2225,13 +2726,17 @@ type PublicIPAddressPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// QueryTroubleshootingParameters is parameters that define the resource to -// query the troubleshooting result. +// PublicIPAddressSku is SKU of a public IP address +type PublicIPAddressSku struct { + Name PublicIPAddressSkuName `json:"name,omitempty"` +} + +// QueryTroubleshootingParameters is parameters that define the resource to query the troubleshooting result. type QueryTroubleshootingParameters struct { TargetResourceID *string `json:"targetResourceId,omitempty"` } -// Resource is +// Resource is common resource representation. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -2255,8 +2760,7 @@ type ResourceNavigationLinkFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// RetentionPolicyParameters is parameters that define the retention policy for -// flow log. +// RetentionPolicyParameters is parameters that define the retention policy for flow log. type RetentionPolicyParameters struct { Days *int32 `json:"days,omitempty"` Enabled *bool `json:"enabled,omitempty"` @@ -2320,8 +2824,7 @@ type RouteFilterRule struct { Tags *map[string]*string `json:"tags,omitempty"` } -// RouteFilterRuleListResult is response for the ListRouteFilterRules API -// service call +// RouteFilterRuleListResult is response for the ListRouteFilterRules API service call type RouteFilterRuleListResult struct { autorest.Response `json:"-"` Value *[]RouteFilterRule `json:"value,omitempty"` @@ -2425,8 +2928,7 @@ type SecurityGroup struct { Etag *string `json:"etag,omitempty"` } -// SecurityGroupListResult is response for ListNetworkSecurityGroups API -// service call. +// SecurityGroupListResult is response for ListNetworkSecurityGroups API service call. type SecurityGroupListResult struct { autorest.Response `json:"-"` Value *[]SecurityGroup `json:"value,omitempty"` @@ -2445,8 +2947,7 @@ func (client SecurityGroupListResult) SecurityGroupListResultPreparer() (*http.R autorest.WithBaseURL(to.String(client.NextLink))) } -// SecurityGroupNetworkInterface is network interface and all its associated -// security rules. +// SecurityGroupNetworkInterface is network interface and all its associated security rules. type SecurityGroupNetworkInterface struct { ID *string `json:"id,omitempty"` SecurityRuleAssociations *SecurityRuleAssociations `json:"securityRuleAssociations,omitempty"` @@ -2462,14 +2963,12 @@ type SecurityGroupPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// SecurityGroupViewParameters is parameters that define the VM to check -// security groups for. +// SecurityGroupViewParameters is parameters that define the VM to check security groups for. type SecurityGroupViewParameters struct { TargetResourceID *string `json:"targetResourceId,omitempty"` } -// SecurityGroupViewResult is the information about security rules applied to -// the specified VM. +// SecurityGroupViewResult is the information about security rules applied to the specified VM. type SecurityGroupViewResult struct { autorest.Response `json:"-"` NetworkInterfaces *[]SecurityGroupNetworkInterface `json:"networkInterfaces,omitempty"` @@ -2484,8 +2983,7 @@ type SecurityRule struct { Etag *string `json:"etag,omitempty"` } -// SecurityRuleAssociations is all security rules associated with the network -// interface. +// SecurityRuleAssociations is all security rules associated with the network interface. type SecurityRuleAssociations struct { NetworkInterfaceAssociation *InterfaceAssociation `json:"networkInterfaceAssociation,omitempty"` SubnetAssociation *SubnetAssociation `json:"subnetAssociation,omitempty"` @@ -2493,8 +2991,8 @@ type SecurityRuleAssociations struct { EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"` } -// SecurityRuleListResult is response for ListSecurityRule API service call. -// Retrieves all security rules that belongs to a network security group. +// SecurityRuleListResult is response for ListSecurityRule API service call. Retrieves all security rules that belongs +// to a network security group. type SecurityRuleListResult struct { autorest.Response `json:"-"` Value *[]SecurityRule `json:"value,omitempty"` @@ -2513,18 +3011,31 @@ func (client SecurityRuleListResult) SecurityRuleListResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// SecurityRulePropertiesFormat is +// SecurityRulePropertiesFormat is security rule resource. type SecurityRulePropertiesFormat struct { - Description *string `json:"description,omitempty"` - Protocol SecurityRuleProtocol `json:"protocol,omitempty"` - SourcePortRange *string `json:"sourcePortRange,omitempty"` - DestinationPortRange *string `json:"destinationPortRange,omitempty"` - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` - Access SecurityRuleAccess `json:"access,omitempty"` - Priority *int32 `json:"priority,omitempty"` - Direction SecurityRuleDirection `json:"direction,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + Description *string `json:"description,omitempty"` + Protocol SecurityRuleProtocol `json:"protocol,omitempty"` + SourcePortRange *string `json:"sourcePortRange,omitempty"` + DestinationPortRange *string `json:"destinationPortRange,omitempty"` + SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty"` + SourceAddressPrefixes *[]string `json:"sourceAddressPrefixes,omitempty"` + SourceApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"sourceApplicationSecurityGroups,omitempty"` + DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty"` + DestinationAddressPrefixes *[]string `json:"destinationAddressPrefixes,omitempty"` + DestinationApplicationSecurityGroups *[]ApplicationSecurityGroup `json:"destinationApplicationSecurityGroups,omitempty"` + SourcePortRanges *[]string `json:"sourcePortRanges,omitempty"` + DestinationPortRanges *[]string `json:"destinationPortRanges,omitempty"` + Access SecurityRuleAccess `json:"access,omitempty"` + Priority *int32 `json:"priority,omitempty"` + Direction SecurityRuleDirection `json:"direction,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// ServiceEndpointPropertiesFormat is the service endpoint properties. +type ServiceEndpointPropertiesFormat struct { + Service *string `json:"service,omitempty"` + Locations *[]string `json:"locations,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } // String is @@ -2548,8 +3059,7 @@ type SubnetAssociation struct { SecurityRules *[]SecurityRule `json:"securityRules,omitempty"` } -// SubnetListResult is response for ListSubnets API service callRetrieves all -// subnet that belongs to a virtual network +// SubnetListResult is response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network type SubnetListResult struct { autorest.Response `json:"-"` Value *[]Subnet `json:"value,omitempty"` @@ -2568,17 +3078,18 @@ func (client SubnetListResult) SubnetListResultPreparer() (*http.Request, error) autorest.WithBaseURL(to.String(client.NextLink))) } -// SubnetPropertiesFormat is +// SubnetPropertiesFormat is properties of the subnet. type SubnetPropertiesFormat struct { - AddressPrefix *string `json:"addressPrefix,omitempty"` - NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` - RouteTable *RouteTable `json:"routeTable,omitempty"` - IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` - ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` - ProvisioningState *string `json:"provisioningState,omitempty"` + AddressPrefix *string `json:"addressPrefix,omitempty"` + NetworkSecurityGroup *SecurityGroup `json:"networkSecurityGroup,omitempty"` + RouteTable *RouteTable `json:"routeTable,omitempty"` + ServiceEndpoints *[]ServiceEndpointPropertiesFormat `json:"serviceEndpoints,omitempty"` + IPConfigurations *[]IPConfiguration `json:"ipConfigurations,omitempty"` + ResourceNavigationLinks *[]ResourceNavigationLink `json:"resourceNavigationLinks,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` } -// SubResource is +// SubResource is reference to another subresource. type SubResource struct { ID *string `json:"id,omitempty"` } @@ -2592,8 +3103,7 @@ type Topology struct { Resources *[]TopologyResource `json:"resources,omitempty"` } -// TopologyAssociation is resources that have an association with the parent -// resource. +// TopologyAssociation is resources that have an association with the parent resource. type TopologyAssociation struct { Name *string `json:"name,omitempty"` ResourceID *string `json:"resourceId,omitempty"` @@ -2605,8 +3115,7 @@ type TopologyParameters struct { TargetResourceGroupName *string `json:"targetResourceGroupName,omitempty"` } -// TopologyResource is the network resource topology information for the given -// resource group. +// TopologyResource is the network resource topology information for the given resource group. type TopologyResource struct { Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` @@ -2614,8 +3123,7 @@ type TopologyResource struct { Associations *[]TopologyAssociation `json:"associations,omitempty"` } -// TroubleshootingDetails is information gained from troubleshooting of -// specified resource. +// TroubleshootingDetails is information gained from troubleshooting of specified resource. type TroubleshootingDetails struct { ID *string `json:"id,omitempty"` ReasonType *string `json:"reasonType,omitempty"` @@ -2624,8 +3132,7 @@ type TroubleshootingDetails struct { RecommendedActions *[]TroubleshootingRecommendedActions `json:"recommendedActions,omitempty"` } -// TroubleshootingParameters is parameters that define the resource to -// troubleshoot. +// TroubleshootingParameters is parameters that define the resource to troubleshoot. type TroubleshootingParameters struct { TargetResourceID *string `json:"targetResourceId,omitempty"` *TroubleshootingProperties `json:"properties,omitempty"` @@ -2637,8 +3144,7 @@ type TroubleshootingProperties struct { StoragePath *string `json:"storagePath,omitempty"` } -// TroubleshootingRecommendedActions is recommended actions based on discovered -// issues. +// TroubleshootingRecommendedActions is recommended actions based on discovered issues. type TroubleshootingRecommendedActions struct { ActionID *string `json:"actionId,omitempty"` ActionText *string `json:"actionText,omitempty"` @@ -2646,8 +3152,7 @@ type TroubleshootingRecommendedActions struct { ActionURIText *string `json:"actionUriText,omitempty"` } -// TroubleshootingResult is troubleshooting information gained from specified -// resource. +// TroubleshootingResult is troubleshooting information gained from specified resource. type TroubleshootingResult struct { autorest.Response `json:"-"` StartTime *date.Time `json:"startTime,omitempty"` @@ -2667,6 +3172,7 @@ type TunnelConnectionHealth struct { // Usage is describes network resource usage. type Usage struct { + ID *string `json:"id,omitempty"` Unit *string `json:"unit,omitempty"` CurrentValue *int64 `json:"currentValue,omitempty"` Limit *int64 `json:"limit,omitempty"` @@ -2698,8 +3204,7 @@ func (client UsagesListResult) UsagesListResultPreparer() (*http.Request, error) autorest.WithBaseURL(to.String(client.NextLink))) } -// VerificationIPFlowParameters is parameters that define the IP flow to be -// verified. +// VerificationIPFlowParameters is parameters that define the IP flow to be verified. type VerificationIPFlowParameters struct { TargetResourceID *string `json:"targetResourceId,omitempty"` Direction Direction `json:"direction,omitempty"` @@ -2711,8 +3216,7 @@ type VerificationIPFlowParameters struct { TargetNicResourceID *string `json:"targetNicResourceId,omitempty"` } -// VerificationIPFlowResult is results of IP flow verification on the target -// resource. +// VerificationIPFlowResult is results of IP flow verification on the target resource. type VerificationIPFlowResult struct { autorest.Response `json:"-"` Access Access `json:"access,omitempty"` @@ -2731,6 +3235,11 @@ type VirtualNetwork struct { Etag *string `json:"etag,omitempty"` } +// VirtualNetworkConnectionGatewayReference is a reference to VirtualNetworkGateway or LocalNetworkGateway resource. +type VirtualNetworkConnectionGatewayReference struct { + ID *string `json:"id,omitempty"` +} + // VirtualNetworkGateway is a common class for general resource information type VirtualNetworkGateway struct { autorest.Response `json:"-"` @@ -2743,8 +3252,7 @@ type VirtualNetworkGateway struct { Etag *string `json:"etag,omitempty"` } -// VirtualNetworkGatewayConnection is a common class for general resource -// information +// VirtualNetworkGatewayConnection is a common class for general resource information type VirtualNetworkGatewayConnection struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -2756,8 +3264,39 @@ type VirtualNetworkGatewayConnection struct { Etag *string `json:"etag,omitempty"` } -// VirtualNetworkGatewayConnectionListResult is response for the -// ListVirtualNetworkGatewayConnections API service call +// VirtualNetworkGatewayConnectionListEntity is a common class for general resource information +type VirtualNetworkGatewayConnectionListEntity struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *VirtualNetworkGatewayConnectionListEntityPropertiesFormat `json:"properties,omitempty"` + Etag *string `json:"etag,omitempty"` +} + +// VirtualNetworkGatewayConnectionListEntityPropertiesFormat is virtualNetworkGatewayConnection properties +type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct { + AuthorizationKey *string `json:"authorizationKey,omitempty"` + VirtualNetworkGateway1 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway1,omitempty"` + VirtualNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"virtualNetworkGateway2,omitempty"` + LocalNetworkGateway2 *VirtualNetworkConnectionGatewayReference `json:"localNetworkGateway2,omitempty"` + ConnectionType VirtualNetworkGatewayConnectionType `json:"connectionType,omitempty"` + RoutingWeight *int32 `json:"routingWeight,omitempty"` + SharedKey *string `json:"sharedKey,omitempty"` + ConnectionStatus VirtualNetworkGatewayConnectionStatus `json:"connectionStatus,omitempty"` + TunnelConnectionStatus *[]TunnelConnectionHealth `json:"tunnelConnectionStatus,omitempty"` + EgressBytesTransferred *int64 `json:"egressBytesTransferred,omitempty"` + IngressBytesTransferred *int64 `json:"ingressBytesTransferred,omitempty"` + Peer *SubResource `json:"peer,omitempty"` + EnableBgp *bool `json:"enableBgp,omitempty"` + UsePolicyBasedTrafficSelectors *bool `json:"usePolicyBasedTrafficSelectors,omitempty"` + IpsecPolicies *[]IpsecPolicy `json:"ipsecPolicies,omitempty"` + ResourceGUID *string `json:"resourceGuid,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` +} + +// VirtualNetworkGatewayConnectionListResult is response for the ListVirtualNetworkGatewayConnections API service call type VirtualNetworkGatewayConnectionListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetworkGatewayConnection `json:"value,omitempty"` @@ -2776,8 +3315,7 @@ func (client VirtualNetworkGatewayConnectionListResult) VirtualNetworkGatewayCon autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualNetworkGatewayConnectionPropertiesFormat is -// virtualNetworkGatewayConnection properties +// VirtualNetworkGatewayConnectionPropertiesFormat is virtualNetworkGatewayConnection properties type VirtualNetworkGatewayConnectionPropertiesFormat struct { AuthorizationKey *string `json:"authorizationKey,omitempty"` VirtualNetworkGateway1 *VirtualNetworkGateway `json:"virtualNetworkGateway1,omitempty"` @@ -2798,8 +3336,7 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkGatewayIPConfiguration is iP configuration for virtual network -// gateway +// VirtualNetworkGatewayIPConfiguration is IP configuration for virtual network gateway type VirtualNetworkGatewayIPConfiguration struct { ID *string `json:"id,omitempty"` *VirtualNetworkGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"` @@ -2807,8 +3344,7 @@ type VirtualNetworkGatewayIPConfiguration struct { Etag *string `json:"etag,omitempty"` } -// VirtualNetworkGatewayIPConfigurationPropertiesFormat is properties of -// VirtualNetworkGatewayIPConfiguration +// VirtualNetworkGatewayIPConfigurationPropertiesFormat is properties of VirtualNetworkGatewayIPConfiguration type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { PrivateIPAllocationMethod IPAllocationMethod `json:"privateIPAllocationMethod,omitempty"` Subnet *SubResource `json:"subnet,omitempty"` @@ -2816,8 +3352,26 @@ type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkGatewayListResult is response for the -// ListVirtualNetworkGateways API service call. +// VirtualNetworkGatewayListConnectionsResult is response for the VirtualNetworkGatewayListConnections API service call +type VirtualNetworkGatewayListConnectionsResult struct { + autorest.Response `json:"-"` + Value *[]VirtualNetworkGatewayConnectionListEntity `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client VirtualNetworkGatewayListConnectionsResult) VirtualNetworkGatewayListConnectionsResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// VirtualNetworkGatewayListResult is response for the ListVirtualNetworkGateways API service call. type VirtualNetworkGatewayListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetworkGateway `json:"value,omitempty"` @@ -2858,8 +3412,7 @@ type VirtualNetworkGatewaySku struct { Capacity *int32 `json:"capacity,omitempty"` } -// VirtualNetworkListResult is response for the ListVirtualNetworks API service -// call. +// VirtualNetworkListResult is response for the ListVirtualNetworks API service call. type VirtualNetworkListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetwork `json:"value,omitempty"` @@ -2878,6 +3431,25 @@ func (client VirtualNetworkListResult) VirtualNetworkListResultPreparer() (*http autorest.WithBaseURL(to.String(client.NextLink))) } +// VirtualNetworkListUsageResult is response for the virtual networks GetUsage API service call. +type VirtualNetworkListUsageResult struct { + autorest.Response `json:"-"` + Value *[]VirtualNetworkUsage `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client VirtualNetworkListUsageResult) VirtualNetworkListUsageResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // VirtualNetworkPeering is peerings in a virtual network resource. type VirtualNetworkPeering struct { autorest.Response `json:"-"` @@ -2887,8 +3459,8 @@ type VirtualNetworkPeering struct { Etag *string `json:"etag,omitempty"` } -// VirtualNetworkPeeringListResult is response for ListSubnets API service -// call. Retrieves all subnets that belong to a virtual network. +// VirtualNetworkPeeringListResult is response for ListSubnets API service call. Retrieves all subnets that belong to a +// virtual network. type VirtualNetworkPeeringListResult struct { autorest.Response `json:"-"` Value *[]VirtualNetworkPeering `json:"value,omitempty"` @@ -2907,7 +3479,7 @@ func (client VirtualNetworkPeeringListResult) VirtualNetworkPeeringListResultPre autorest.WithBaseURL(to.String(client.NextLink))) } -// VirtualNetworkPeeringPropertiesFormat is +// VirtualNetworkPeeringPropertiesFormat is properties of the virtual network peering. type VirtualNetworkPeeringPropertiesFormat struct { AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty"` AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty"` @@ -2918,7 +3490,7 @@ type VirtualNetworkPeeringPropertiesFormat struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// VirtualNetworkPropertiesFormat is +// VirtualNetworkPropertiesFormat is properties of the virtual network. type VirtualNetworkPropertiesFormat struct { AddressSpace *AddressSpace `json:"addressSpace,omitempty"` DhcpOptions *DhcpOptions `json:"dhcpOptions,omitempty"` @@ -2926,6 +3498,23 @@ type VirtualNetworkPropertiesFormat struct { VirtualNetworkPeerings *[]VirtualNetworkPeering `json:"virtualNetworkPeerings,omitempty"` ResourceGUID *string `json:"resourceGuid,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` + EnableDdosProtection *bool `json:"enableDdosProtection,omitempty"` + EnableVMProtection *bool `json:"enableVmProtection,omitempty"` +} + +// VirtualNetworkUsage is usage details for subnet. +type VirtualNetworkUsage struct { + CurrentValue *float64 `json:"currentValue,omitempty"` + ID *string `json:"id,omitempty"` + Limit *float64 `json:"limit,omitempty"` + Name *VirtualNetworkUsageName `json:"name,omitempty"` + Unit *string `json:"unit,omitempty"` +} + +// VirtualNetworkUsageName is usage strings container. +type VirtualNetworkUsageName struct { + LocalizedValue *string `json:"localizedValue,omitempty"` + Value *string `json:"value,omitempty"` } // VpnClientConfiguration is vpnClientConfiguration for P2S client. @@ -2933,15 +3522,20 @@ type VpnClientConfiguration struct { VpnClientAddressPool *AddressSpace `json:"vpnClientAddressPool,omitempty"` VpnClientRootCertificates *[]VpnClientRootCertificate `json:"vpnClientRootCertificates,omitempty"` VpnClientRevokedCertificates *[]VpnClientRevokedCertificate `json:"vpnClientRevokedCertificates,omitempty"` + VpnClientProtocols *[]VpnClientProtocol `json:"vpnClientProtocols,omitempty"` + RadiusServerAddress *string `json:"radiusServerAddress,omitempty"` + RadiusServerSecret *string `json:"radiusServerSecret,omitempty"` } // VpnClientParameters is vpn Client Parameters for package generation type VpnClientParameters struct { - ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` + ProcessorArchitecture ProcessorArchitecture `json:"processorArchitecture,omitempty"` + AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"` + RadiusServerAuthCertificate *string `json:"radiusServerAuthCertificate,omitempty"` + ClientRootCertificates *[]string `json:"clientRootCertificates,omitempty"` } -// VpnClientRevokedCertificate is vPN client revoked certificate of virtual -// network gateway. +// VpnClientRevokedCertificate is VPN client revoked certificate of virtual network gateway. type VpnClientRevokedCertificate struct { ID *string `json:"id,omitempty"` *VpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"` @@ -2949,15 +3543,14 @@ type VpnClientRevokedCertificate struct { Etag *string `json:"etag,omitempty"` } -// VpnClientRevokedCertificatePropertiesFormat is properties of the revoked VPN -// client certificate of virtual network gateway. +// VpnClientRevokedCertificatePropertiesFormat is properties of the revoked VPN client certificate of virtual network +// gateway. type VpnClientRevokedCertificatePropertiesFormat struct { Thumbprint *string `json:"thumbprint,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } -// VpnClientRootCertificate is vPN client root certificate of virtual network -// gateway +// VpnClientRootCertificate is VPN client root certificate of virtual network gateway type VpnClientRootCertificate struct { ID *string `json:"id,omitempty"` *VpnClientRootCertificatePropertiesFormat `json:"properties,omitempty"` @@ -2965,13 +3558,19 @@ type VpnClientRootCertificate struct { Etag *string `json:"etag,omitempty"` } -// VpnClientRootCertificatePropertiesFormat is properties of SSL certificates -// of application gateway +// VpnClientRootCertificatePropertiesFormat is properties of SSL certificates of application gateway type VpnClientRootCertificatePropertiesFormat struct { PublicCertData *string `json:"publicCertData,omitempty"` ProvisioningState *string `json:"provisioningState,omitempty"` } +// VpnDeviceScriptParameters is vpn device configuration script generation parameters +type VpnDeviceScriptParameters struct { + Vendor *string `json:"vendor,omitempty"` + DeviceFamily *string `json:"deviceFamily,omitempty"` + FirmwareVersion *string `json:"firmwareVersion,omitempty"` +} + // Watcher is network watcher in a resource group. type Watcher struct { autorest.Response `json:"-"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/packetcaptures.go index fbeb0d9ef..1ad97a5e2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/packetcaptures.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/packetcaptures.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,27 @@ import ( "net/http" ) -// PacketCapturesClient is the composite Swagger for Network Client +// PacketCapturesClient is the network Client type PacketCapturesClient struct { ManagementClient } -// NewPacketCapturesClient creates an instance of the PacketCapturesClient -// client. +// NewPacketCapturesClient creates an instance of the PacketCapturesClient client. func NewPacketCapturesClient(subscriptionID string) PacketCapturesClient { return NewPacketCapturesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPacketCapturesClientWithBaseURI creates an instance of the -// PacketCapturesClient client. +// NewPacketCapturesClientWithBaseURI creates an instance of the PacketCapturesClient client. func NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) PacketCapturesClient { return PacketCapturesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create create and start a packet capture on the specified VM. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Create create and start a packet capture on the specified VM. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. packetCaptureName is the name of the packet -// capture session. parameters is parameters that define the create packet +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// packetCaptureName is the name of the packet capture session. parameters is parameters that define the create packet // capture operation. func (client PacketCapturesClient) Create(resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture, cancel <-chan struct{}) (<-chan PacketCaptureResult, <-chan error) { resultChan := make(chan PacketCaptureResult, 1) @@ -70,8 +65,10 @@ func (client PacketCapturesClient) Create(resourceGroupName string, networkWatch var err error var result PacketCaptureResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -105,7 +102,7 @@ func (client PacketCapturesClient) CreatePreparer(resourceGroupName string, netw "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -141,14 +138,11 @@ func (client PacketCapturesClient) CreateResponder(resp *http.Response) (result return } -// Delete deletes the specified packet capture session. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified packet capture session. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. packetCaptureName is the name of the packet -// capture session. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// packetCaptureName is the name of the packet capture session. func (client PacketCapturesClient) Delete(resourceGroupName string, networkWatcherName string, packetCaptureName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -156,8 +150,10 @@ func (client PacketCapturesClient) Delete(resourceGroupName string, networkWatch var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -191,7 +187,7 @@ func (client PacketCapturesClient) DeletePreparer(resourceGroupName string, netw "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -226,9 +222,8 @@ func (client PacketCapturesClient) DeleteResponder(resp *http.Response) (result // Get gets a packet capture session by name. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. packetCaptureName is the name of the packet -// capture session. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// packetCaptureName is the name of the packet capture session. func (client PacketCapturesClient) Get(resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCaptureResult, err error) { req, err := client.GetPreparer(resourceGroupName, networkWatcherName, packetCaptureName) if err != nil { @@ -260,7 +255,7 @@ func (client PacketCapturesClient) GetPreparer(resourceGroupName string, network "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -292,14 +287,12 @@ func (client PacketCapturesClient) GetResponder(resp *http.Response) (result Pac return } -// GetStatus query the status of a running packet capture session. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// GetStatus query the status of a running packet capture session. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the Network Watcher resource. packetCaptureName is the name -// given to the packet capture session. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the Network Watcher resource. +// packetCaptureName is the name given to the packet capture session. func (client PacketCapturesClient) GetStatus(resourceGroupName string, networkWatcherName string, packetCaptureName string, cancel <-chan struct{}) (<-chan PacketCaptureQueryStatusResult, <-chan error) { resultChan := make(chan PacketCaptureQueryStatusResult, 1) errChan := make(chan error, 1) @@ -307,8 +300,10 @@ func (client PacketCapturesClient) GetStatus(resourceGroupName string, networkWa var err error var result PacketCaptureQueryStatusResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -342,7 +337,7 @@ func (client PacketCapturesClient) GetStatusPreparer(resourceGroupName string, n "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -378,8 +373,7 @@ func (client PacketCapturesClient) GetStatusResponder(resp *http.Response) (resu // List lists all packet capture sessions within the specified resource group. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the Network Watcher resource. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the Network Watcher resource. func (client PacketCapturesClient) List(resourceGroupName string, networkWatcherName string) (result PacketCaptureListResult, err error) { req, err := client.ListPreparer(resourceGroupName, networkWatcherName) if err != nil { @@ -410,7 +404,7 @@ func (client PacketCapturesClient) ListPreparer(resourceGroupName string, networ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -442,14 +436,11 @@ func (client PacketCapturesClient) ListResponder(resp *http.Response) (result Pa return } -// Stop stops a specified packet capture session. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Stop stops a specified packet capture session. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. packetCaptureName is the name of the packet -// capture session. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// packetCaptureName is the name of the packet capture session. func (client PacketCapturesClient) Stop(resourceGroupName string, networkWatcherName string, packetCaptureName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -457,8 +448,10 @@ func (client PacketCapturesClient) Stop(resourceGroupName string, networkWatcher var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -492,7 +485,7 @@ func (client PacketCapturesClient) StopPreparer(resourceGroupName string, networ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go index 896bc817d..af7e7ec85 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/publicipaddresses.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,27 @@ import ( "net/http" ) -// PublicIPAddressesClient is the composite Swagger for Network Client +// PublicIPAddressesClient is the network Client type PublicIPAddressesClient struct { ManagementClient } -// NewPublicIPAddressesClient creates an instance of the -// PublicIPAddressesClient client. +// NewPublicIPAddressesClient creates an instance of the PublicIPAddressesClient client. func NewPublicIPAddressesClient(subscriptionID string) PublicIPAddressesClient { return NewPublicIPAddressesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPublicIPAddressesClientWithBaseURI creates an instance of the -// PublicIPAddressesClient client. +// NewPublicIPAddressesClientWithBaseURI creates an instance of the PublicIPAddressesClient client. func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string) PublicIPAddressesClient { return PublicIPAddressesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a static or dynamic public IP address. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// CreateOrUpdate creates or updates a static or dynamic public IP address. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. publicIPAddressName is -// the name of the public IP address. parameters is parameters supplied to the -// create or update public IP address operation. +// resourceGroupName is the name of the resource group. publicIPAddressName is the name of the public IP address. +// parameters is parameters supplied to the create or update public IP address operation. func (client PublicIPAddressesClient) CreateOrUpdate(resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress, cancel <-chan struct{}) (<-chan PublicIPAddress, <-chan error) { resultChan := make(chan PublicIPAddress, 1) errChan := make(chan error, 1) @@ -71,8 +66,10 @@ func (client PublicIPAddressesClient) CreateOrUpdate(resourceGroupName string, p var err error var result PublicIPAddress defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -105,7 +102,7 @@ func (client PublicIPAddressesClient) CreateOrUpdatePreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -141,13 +138,10 @@ func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Respons return } -// Delete deletes the specified public IP address. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified public IP address. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. publicIPAddressName is -// the name of the subnet. +// resourceGroupName is the name of the resource group. publicIPAddressName is the name of the subnet. func (client PublicIPAddressesClient) Delete(resourceGroupName string, publicIPAddressName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -155,8 +149,10 @@ func (client PublicIPAddressesClient) Delete(resourceGroupName string, publicIPA var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -189,7 +185,7 @@ func (client PublicIPAddressesClient) DeletePreparer(resourceGroupName string, p "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -224,8 +220,8 @@ func (client PublicIPAddressesClient) DeleteResponder(resp *http.Response) (resu // Get gets the specified public IP address in a specified resource group. // -// resourceGroupName is the name of the resource group. publicIPAddressName is -// the name of the subnet. expand is expands referenced resources. +// resourceGroupName is the name of the resource group. publicIPAddressName is the name of the subnet. expand is +// expands referenced resources. func (client PublicIPAddressesClient) Get(resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { req, err := client.GetPreparer(resourceGroupName, publicIPAddressName, expand) if err != nil { @@ -256,7 +252,7 @@ func (client PublicIPAddressesClient) GetPreparer(resourceGroupName string, publ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -291,6 +287,81 @@ func (client PublicIPAddressesClient) GetResponder(resp *http.Response) (result return } +// GetVirtualMachineScaleSetPublicIPAddress get the specified public IP address in a virtual machine scale set. +// +// resourceGroupName is the name of the resource group. virtualMachineScaleSetName is the name of the virtual machine +// scale set. virtualmachineIndex is the virtual machine index. networkInterfaceName is the name of the network +// interface. IPConfigurationName is the name of the IP configuration. publicIPAddressName is the name of the public IP +// Address. expand is expands referenced resources. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) { + req, err := client.GetVirtualMachineScaleSetPublicIPAddressPreparer(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", nil, "Failure preparing request") + return + } + + resp, err := client.GetVirtualMachineScaleSetPublicIPAddressSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure sending request") + return + } + + result, err = client.GetVirtualMachineScaleSetPublicIPAddressResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", resp, "Failure responding to request") + } + + return +} + +// GetVirtualMachineScaleSetPublicIPAddressPreparer prepares the GetVirtualMachineScaleSetPublicIPAddress request. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressPreparer(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "publicIpAddressName": autorest.Encode("path", publicIPAddressName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetVirtualMachineScaleSetPublicIPAddressSender sends the GetVirtualMachineScaleSetPublicIPAddress request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetVirtualMachineScaleSetPublicIPAddressResponder handles the response to the GetVirtualMachineScaleSetPublicIPAddress request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressResponder(resp *http.Response) (result PublicIPAddress, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List gets all public IP addresses in a resource group. // // resourceGroupName is the name of the resource group. @@ -323,7 +394,7 @@ func (client PublicIPAddressesClient) ListPreparer(resourceGroupName string) (*h "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -379,6 +450,51 @@ func (client PublicIPAddressesClient) ListNextResults(lastResults PublicIPAddres return } +// ListComplete gets all elements from the list without paging. +func (client PublicIPAddressesClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan PublicIPAddress, <-chan error) { + resultChan := make(chan PublicIPAddress) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all the public IP addresses in a subscription. func (client PublicIPAddressesClient) ListAll() (result PublicIPAddressListResult, err error) { req, err := client.ListAllPreparer() @@ -408,7 +524,7 @@ func (client PublicIPAddressesClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -463,3 +579,324 @@ func (client PublicIPAddressesClient) ListAllNextResults(lastResults PublicIPAdd return } + +// ListAllComplete gets all elements from the list without paging. +func (client PublicIPAddressesClient) ListAllComplete(cancel <-chan struct{}) (<-chan PublicIPAddress, <-chan error) { + resultChan := make(chan PublicIPAddress) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListVirtualMachineScaleSetPublicIPAddresses gets information about all public IP addresses on a virtual machine +// scale set level. +// +// resourceGroupName is the name of the resource group. virtualMachineScaleSetName is the name of the virtual machine +// scale set. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresses(resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResult, err error) { + req, err := client.ListVirtualMachineScaleSetPublicIPAddressesPreparer(resourceGroupName, virtualMachineScaleSetName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", nil, "Failure preparing request") + return + } + + resp, err := client.ListVirtualMachineScaleSetPublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure sending request") + return + } + + result, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure responding to request") + } + + return +} + +// ListVirtualMachineScaleSetPublicIPAddressesPreparer prepares the ListVirtualMachineScaleSetPublicIPAddresses request. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesPreparer(resourceGroupName string, virtualMachineScaleSetName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListVirtualMachineScaleSetPublicIPAddressesSender sends the ListVirtualMachineScaleSetPublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListVirtualMachineScaleSetPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetPublicIPAddresses request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListVirtualMachineScaleSetPublicIPAddressesNextResults retrieves the next set of results, if any. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.PublicIPAddressListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListVirtualMachineScaleSetPublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure sending next results request") + } + + result, err = client.ListVirtualMachineScaleSetPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetPublicIPAddresses", resp, "Failure responding to next results request") + } + + return +} + +// ListVirtualMachineScaleSetPublicIPAddressesComplete gets all elements from the list without paging. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesComplete(resourceGroupName string, virtualMachineScaleSetName string, cancel <-chan struct{}) (<-chan PublicIPAddress, <-chan error) { + resultChan := make(chan PublicIPAddress) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListVirtualMachineScaleSetPublicIPAddresses(resourceGroupName, virtualMachineScaleSetName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListVirtualMachineScaleSetPublicIPAddressesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListVirtualMachineScaleSetVMPublicIPAddresses gets information about all public IP addresses in a virtual machine IP +// configuration in a virtual machine scale set. +// +// resourceGroupName is the name of the resource group. virtualMachineScaleSetName is the name of the virtual machine +// scale set. virtualmachineIndex is the virtual machine index. networkInterfaceName is the network interface name. +// IPConfigurationName is the IP configuration name. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResult, err error) { + req, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", nil, "Failure preparing request") + return + } + + resp, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure sending request") + return + } + + result, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure responding to request") + } + + return +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesPreparer prepares the ListVirtualMachineScaleSetVMPublicIPAddresses request. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "ipConfigurationName": autorest.Encode("path", IPConfigurationName), + "networkInterfaceName": autorest.Encode("path", networkInterfaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualmachineIndex": autorest.Encode("path", virtualmachineIndex), + "virtualMachineScaleSetName": autorest.Encode("path", virtualMachineScaleSetName), + } + + const APIVersion = "2017-03-30" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesSender sends the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method will close the +// http.Response Body if it receives an error. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesResponder handles the response to the ListVirtualMachineScaleSetVMPublicIPAddresses request. The method always +// closes the http.Response Body. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp *http.Response) (result PublicIPAddressListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesNextResults retrieves the next set of results, if any. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) { + req, err := lastResults.PublicIPAddressListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure sending next results request") + } + + result, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "ListVirtualMachineScaleSetVMPublicIPAddresses", resp, "Failure responding to next results request") + } + + return +} + +// ListVirtualMachineScaleSetVMPublicIPAddressesComplete gets all elements from the list without paging. +func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesComplete(resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, cancel <-chan struct{}) (<-chan PublicIPAddress, <-chan error) { + resultChan := make(chan PublicIPAddress) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListVirtualMachineScaleSetVMPublicIPAddressesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilterrules.go index 378a75bb2..7c0ab1790 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilterrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilterrules.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,28 @@ import ( "net/http" ) -// RouteFilterRulesClient is the composite Swagger for Network Client +// RouteFilterRulesClient is the network Client type RouteFilterRulesClient struct { ManagementClient } -// NewRouteFilterRulesClient creates an instance of the RouteFilterRulesClient -// client. +// NewRouteFilterRulesClient creates an instance of the RouteFilterRulesClient client. func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient { return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFilterRulesClientWithBaseURI creates an instance of the -// RouteFilterRulesClient client. +// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client. func NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient { return RouteFilterRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a route in the specified route filter. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// CreateOrUpdate creates or updates a route in the specified route filter. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. ruleName is the name of the route filter rule. -// routeFilterRuleParameters is parameters supplied to the create or update -// route filter rule operation. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. ruleName is +// the name of the route filter rule. routeFilterRuleParameters is parameters supplied to the create or update route +// filter rule operation. func (client RouteFilterRulesClient) CreateOrUpdate(resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule, cancel <-chan struct{}) (<-chan RouteFilterRule, <-chan error) { resultChan := make(chan RouteFilterRule, 1) errChan := make(chan error, 1) @@ -70,8 +65,10 @@ func (client RouteFilterRulesClient) CreateOrUpdate(resourceGroupName string, ro var err error var result RouteFilterRule defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -105,7 +102,7 @@ func (client RouteFilterRulesClient) CreateOrUpdatePreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -141,13 +138,12 @@ func (client RouteFilterRulesClient) CreateOrUpdateResponder(resp *http.Response return } -// Delete deletes the specified rule from a route filter. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified rule from a route filter. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. ruleName is the name of the rule. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. ruleName is +// the name of the rule. func (client RouteFilterRulesClient) Delete(resourceGroupName string, routeFilterName string, ruleName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -155,8 +151,10 @@ func (client RouteFilterRulesClient) Delete(resourceGroupName string, routeFilte var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -190,7 +188,7 @@ func (client RouteFilterRulesClient) DeletePreparer(resourceGroupName string, ro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -225,8 +223,8 @@ func (client RouteFilterRulesClient) DeleteResponder(resp *http.Response) (resul // Get gets the specified rule from a route filter. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. ruleName is the name of the rule. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. ruleName is +// the name of the rule. func (client RouteFilterRulesClient) Get(resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRule, err error) { req, err := client.GetPreparer(resourceGroupName, routeFilterName, ruleName) if err != nil { @@ -258,7 +256,7 @@ func (client RouteFilterRulesClient) GetPreparer(resourceGroupName string, route "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -292,8 +290,7 @@ func (client RouteFilterRulesClient) GetResponder(resp *http.Response) (result R // ListByRouteFilter gets all RouteFilterRules in a route filter. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. func (client RouteFilterRulesClient) ListByRouteFilter(resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResult, err error) { req, err := client.ListByRouteFilterPreparer(resourceGroupName, routeFilterName) if err != nil { @@ -324,7 +321,7 @@ func (client RouteFilterRulesClient) ListByRouteFilterPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -380,15 +377,58 @@ func (client RouteFilterRulesClient) ListByRouteFilterNextResults(lastResults Ro return } -// Update updates a route in the specified route filter. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// ListByRouteFilterComplete gets all elements from the list without paging. +func (client RouteFilterRulesClient) ListByRouteFilterComplete(resourceGroupName string, routeFilterName string, cancel <-chan struct{}) (<-chan RouteFilterRule, <-chan error) { + resultChan := make(chan RouteFilterRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByRouteFilter(resourceGroupName, routeFilterName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByRouteFilterNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates a route in the specified route filter. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. ruleName is the name of the route filter rule. -// routeFilterRuleParameters is parameters supplied to the update route filter -// rule operation. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. ruleName is +// the name of the route filter rule. routeFilterRuleParameters is parameters supplied to the update route filter rule +// operation. func (client RouteFilterRulesClient) Update(resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule, cancel <-chan struct{}) (<-chan RouteFilterRule, <-chan error) { resultChan := make(chan RouteFilterRule, 1) errChan := make(chan error, 1) @@ -396,8 +436,10 @@ func (client RouteFilterRulesClient) Update(resourceGroupName string, routeFilte var err error var result RouteFilterRule defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -431,7 +473,7 @@ func (client RouteFilterRulesClient) UpdatePreparer(resourceGroupName string, ro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilters.go index 860ccae5c..711e58fc9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routefilters.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// RouteFiltersClient is the composite Swagger for Network Client +// RouteFiltersClient is the network Client type RouteFiltersClient struct { ManagementClient } @@ -34,20 +33,17 @@ func NewRouteFiltersClient(subscriptionID string) RouteFiltersClient { return NewRouteFiltersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteFiltersClientWithBaseURI creates an instance of the -// RouteFiltersClient client. +// NewRouteFiltersClientWithBaseURI creates an instance of the RouteFiltersClient client. func NewRouteFiltersClientWithBaseURI(baseURI string, subscriptionID string) RouteFiltersClient { return RouteFiltersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a route filter in a specified resource -// group. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a route filter in a specified resource group. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. routeFilterParameters is parameters supplied to -// the create or update route filter operation. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. +// routeFilterParameters is parameters supplied to the create or update route filter operation. func (client RouteFiltersClient) CreateOrUpdate(resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter, cancel <-chan struct{}) (<-chan RouteFilter, <-chan error) { resultChan := make(chan RouteFilter, 1) errChan := make(chan error, 1) @@ -55,8 +51,10 @@ func (client RouteFiltersClient) CreateOrUpdate(resourceGroupName string, routeF var err error var result RouteFilter defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -89,7 +87,7 @@ func (client RouteFiltersClient) CreateOrUpdatePreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,13 +123,10 @@ func (client RouteFiltersClient) CreateOrUpdateResponder(resp *http.Response) (r return } -// Delete deletes the specified route filter. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified route filter. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. func (client RouteFiltersClient) Delete(resourceGroupName string, routeFilterName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -139,8 +134,10 @@ func (client RouteFiltersClient) Delete(resourceGroupName string, routeFilterNam var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -173,7 +170,7 @@ func (client RouteFiltersClient) DeletePreparer(resourceGroupName string, routeF "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -208,9 +205,8 @@ func (client RouteFiltersClient) DeleteResponder(resp *http.Response) (result au // Get gets the specified route filter. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. expand is expands referenced express route bgp -// peering resources. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. expand is +// expands referenced express route bgp peering resources. func (client RouteFiltersClient) Get(resourceGroupName string, routeFilterName string, expand string) (result RouteFilter, err error) { req, err := client.GetPreparer(resourceGroupName, routeFilterName, expand) if err != nil { @@ -241,7 +237,7 @@ func (client RouteFiltersClient) GetPreparer(resourceGroupName string, routeFilt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -305,7 +301,7 @@ func (client RouteFiltersClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -361,6 +357,51 @@ func (client RouteFiltersClient) ListNextResults(lastResults RouteFilterListResu return } +// ListComplete gets all elements from the list without paging. +func (client RouteFiltersClient) ListComplete(cancel <-chan struct{}) (<-chan RouteFilter, <-chan error) { + resultChan := make(chan RouteFilter) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup gets all route filters in a resource group. // // resourceGroupName is the name of the resource group. @@ -393,7 +434,7 @@ func (client RouteFiltersClient) ListByResourceGroupPreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -449,14 +490,57 @@ func (client RouteFiltersClient) ListByResourceGroupNextResults(lastResults Rout return } -// Update updates a route filter in a specified resource group. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client RouteFiltersClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan RouteFilter, <-chan error) { + resultChan := make(chan RouteFilter) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates a route filter in a specified resource group. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. routeFilterName is the -// name of the route filter. routeFilterParameters is parameters supplied to -// the update route filter operation. +// resourceGroupName is the name of the resource group. routeFilterName is the name of the route filter. +// routeFilterParameters is parameters supplied to the update route filter operation. func (client RouteFiltersClient) Update(resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter, cancel <-chan struct{}) (<-chan RouteFilter, <-chan error) { resultChan := make(chan RouteFilter, 1) errChan := make(chan error, 1) @@ -464,8 +548,10 @@ func (client RouteFiltersClient) Update(resourceGroupName string, routeFilterNam var err error var result RouteFilter defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -498,7 +584,7 @@ func (client RouteFiltersClient) UpdatePreparer(resourceGroupName string, routeF "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go index 1366d3c14..0dcde6fa0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routes.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// RoutesClient is the composite Swagger for Network Client +// RoutesClient is the network Client type RoutesClient struct { ManagementClient } @@ -39,14 +38,12 @@ func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesCli return RoutesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a route in the specified route table. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// CreateOrUpdate creates or updates a route in the specified route table. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. routeName is the name of the route. routeParameters -// is parameters supplied to the create or update route operation. +// resourceGroupName is the name of the resource group. routeTableName is the name of the route table. routeName is the +// name of the route. routeParameters is parameters supplied to the create or update route operation. func (client RoutesClient) CreateOrUpdate(resourceGroupName string, routeTableName string, routeName string, routeParameters Route, cancel <-chan struct{}) (<-chan Route, <-chan error) { resultChan := make(chan Route, 1) errChan := make(chan error, 1) @@ -54,8 +51,10 @@ func (client RoutesClient) CreateOrUpdate(resourceGroupName string, routeTableNa var err error var result Route defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -89,7 +88,7 @@ func (client RoutesClient) CreateOrUpdatePreparer(resourceGroupName string, rout "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,13 +124,12 @@ func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete deletes the specified route from a route table. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified route from a route table. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. routeName is the name of the route. +// resourceGroupName is the name of the resource group. routeTableName is the name of the route table. routeName is the +// name of the route. func (client RoutesClient) Delete(resourceGroupName string, routeTableName string, routeName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -139,8 +137,10 @@ func (client RoutesClient) Delete(resourceGroupName string, routeTableName strin var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -174,7 +174,7 @@ func (client RoutesClient) DeletePreparer(resourceGroupName string, routeTableNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -209,8 +209,8 @@ func (client RoutesClient) DeleteResponder(resp *http.Response) (result autorest // Get gets the specified route from a route table. // -// resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. routeName is the name of the route. +// resourceGroupName is the name of the resource group. routeTableName is the name of the route table. routeName is the +// name of the route. func (client RoutesClient) Get(resourceGroupName string, routeTableName string, routeName string) (result Route, err error) { req, err := client.GetPreparer(resourceGroupName, routeTableName, routeName) if err != nil { @@ -242,7 +242,7 @@ func (client RoutesClient) GetPreparer(resourceGroupName string, routeTableName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -276,8 +276,7 @@ func (client RoutesClient) GetResponder(resp *http.Response) (result Route, err // List gets all routes in a route table. // -// resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. +// resourceGroupName is the name of the resource group. routeTableName is the name of the route table. func (client RoutesClient) List(resourceGroupName string, routeTableName string) (result RouteListResult, err error) { req, err := client.ListPreparer(resourceGroupName, routeTableName) if err != nil { @@ -308,7 +307,7 @@ func (client RoutesClient) ListPreparer(resourceGroupName string, routeTableName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -363,3 +362,48 @@ func (client RoutesClient) ListNextResults(lastResults RouteListResult) (result return } + +// ListComplete gets all elements from the list without paging. +func (client RoutesClient) ListComplete(resourceGroupName string, routeTableName string, cancel <-chan struct{}) (<-chan Route, <-chan error) { + resultChan := make(chan Route) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, routeTableName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go index 80339f207..e9b557bc0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/routetables.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// RouteTablesClient is the composite Swagger for Network Client +// RouteTablesClient is the network Client type RouteTablesClient struct { ManagementClient } @@ -34,20 +33,17 @@ func NewRouteTablesClient(subscriptionID string) RouteTablesClient { return NewRouteTablesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient -// client. +// NewRouteTablesClientWithBaseURI creates an instance of the RouteTablesClient client. func NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) RouteTablesClient { return RouteTablesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or updates a route table in a specified resource -// group. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// CreateOrUpdate create or updates a route table in a specified resource group. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. parameters is parameters supplied to the create or -// update route table operation. +// resourceGroupName is the name of the resource group. routeTableName is the name of the route table. parameters is +// parameters supplied to the create or update route table operation. func (client RouteTablesClient) CreateOrUpdate(resourceGroupName string, routeTableName string, parameters RouteTable, cancel <-chan struct{}) (<-chan RouteTable, <-chan error) { resultChan := make(chan RouteTable, 1) errChan := make(chan error, 1) @@ -55,8 +51,10 @@ func (client RouteTablesClient) CreateOrUpdate(resourceGroupName string, routeTa var err error var result RouteTable defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -89,7 +87,7 @@ func (client RouteTablesClient) CreateOrUpdatePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,13 +123,10 @@ func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (re return } -// Delete deletes the specified route table. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified route table. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. +// resourceGroupName is the name of the resource group. routeTableName is the name of the route table. func (client RouteTablesClient) Delete(resourceGroupName string, routeTableName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -139,8 +134,10 @@ func (client RouteTablesClient) Delete(resourceGroupName string, routeTableName var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -173,7 +170,7 @@ func (client RouteTablesClient) DeletePreparer(resourceGroupName string, routeTa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -208,8 +205,8 @@ func (client RouteTablesClient) DeleteResponder(resp *http.Response) (result aut // Get gets the specified route table. // -// resourceGroupName is the name of the resource group. routeTableName is the -// name of the route table. expand is expands referenced resources. +// resourceGroupName is the name of the resource group. routeTableName is the name of the route table. expand is +// expands referenced resources. func (client RouteTablesClient) Get(resourceGroupName string, routeTableName string, expand string) (result RouteTable, err error) { req, err := client.GetPreparer(resourceGroupName, routeTableName, expand) if err != nil { @@ -240,7 +237,7 @@ func (client RouteTablesClient) GetPreparer(resourceGroupName string, routeTable "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -307,7 +304,7 @@ func (client RouteTablesClient) ListPreparer(resourceGroupName string) (*http.Re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -363,6 +360,51 @@ func (client RouteTablesClient) ListNextResults(lastResults RouteTableListResult return } +// ListComplete gets all elements from the list without paging. +func (client RouteTablesClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan RouteTable, <-chan error) { + resultChan := make(chan RouteTable) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all route tables in a subscription. func (client RouteTablesClient) ListAll() (result RouteTableListResult, err error) { req, err := client.ListAllPreparer() @@ -392,7 +434,7 @@ func (client RouteTablesClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -447,3 +489,48 @@ func (client RouteTablesClient) ListAllNextResults(lastResults RouteTableListRes return } + +// ListAllComplete gets all elements from the list without paging. +func (client RouteTablesClient) ListAllComplete(cancel <-chan struct{}) (<-chan RouteTable, <-chan error) { + resultChan := make(chan RouteTable) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go index 3faaf007f..b1a5ae4a6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securitygroups.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,27 @@ import ( "net/http" ) -// SecurityGroupsClient is the composite Swagger for Network Client +// SecurityGroupsClient is the network Client type SecurityGroupsClient struct { ManagementClient } -// NewSecurityGroupsClient creates an instance of the SecurityGroupsClient -// client. +// NewSecurityGroupsClient creates an instance of the SecurityGroupsClient client. func NewSecurityGroupsClient(subscriptionID string) SecurityGroupsClient { return NewSecurityGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityGroupsClientWithBaseURI creates an instance of the -// SecurityGroupsClient client. +// NewSecurityGroupsClientWithBaseURI creates an instance of the SecurityGroupsClient client. func NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) SecurityGroupsClient { return SecurityGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a network security group in the specified -// resource group. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates or updates a network security group in the specified resource group. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// networkSecurityGroupName is the name of the network security group. -// parameters is parameters supplied to the create or update network security -// group operation. +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. parameters is parameters supplied to the create or update network security group operation. func (client SecurityGroupsClient) CreateOrUpdate(resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup, cancel <-chan struct{}) (<-chan SecurityGroup, <-chan error) { resultChan := make(chan SecurityGroup, 1) errChan := make(chan error, 1) @@ -57,8 +51,10 @@ func (client SecurityGroupsClient) CreateOrUpdate(resourceGroupName string, netw var err error var result SecurityGroup defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -91,7 +87,7 @@ func (client SecurityGroupsClient) CreateOrUpdatePreparer(resourceGroupName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -127,13 +123,11 @@ func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes the specified network security group. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified network security group. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// networkSecurityGroupName is the name of the network security group. +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. func (client SecurityGroupsClient) Delete(resourceGroupName string, networkSecurityGroupName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -141,8 +135,10 @@ func (client SecurityGroupsClient) Delete(resourceGroupName string, networkSecur var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -175,7 +171,7 @@ func (client SecurityGroupsClient) DeletePreparer(resourceGroupName string, netw "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -210,9 +206,8 @@ func (client SecurityGroupsClient) DeleteResponder(resp *http.Response) (result // Get gets the specified network security group. // -// resourceGroupName is the name of the resource group. -// networkSecurityGroupName is the name of the network security group. expand -// is expands referenced resources. +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. expand is expands referenced resources. func (client SecurityGroupsClient) Get(resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) { req, err := client.GetPreparer(resourceGroupName, networkSecurityGroupName, expand) if err != nil { @@ -243,7 +238,7 @@ func (client SecurityGroupsClient) GetPreparer(resourceGroupName string, network "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -310,7 +305,7 @@ func (client SecurityGroupsClient) ListPreparer(resourceGroupName string) (*http "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -366,6 +361,51 @@ func (client SecurityGroupsClient) ListNextResults(lastResults SecurityGroupList return } +// ListComplete gets all elements from the list without paging. +func (client SecurityGroupsClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan SecurityGroup, <-chan error) { + resultChan := make(chan SecurityGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all network security groups in a subscription. func (client SecurityGroupsClient) ListAll() (result SecurityGroupListResult, err error) { req, err := client.ListAllPreparer() @@ -395,7 +435,7 @@ func (client SecurityGroupsClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -450,3 +490,48 @@ func (client SecurityGroupsClient) ListAllNextResults(lastResults SecurityGroupL return } + +// ListAllComplete gets all elements from the list without paging. +func (client SecurityGroupsClient) ListAllComplete(cancel <-chan struct{}) (<-chan SecurityGroup, <-chan error) { + resultChan := make(chan SecurityGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go index 2e2738605..9c76ef54e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/securityrules.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,28 @@ import ( "net/http" ) -// SecurityRulesClient is the composite Swagger for Network Client +// SecurityRulesClient is the network Client type SecurityRulesClient struct { ManagementClient } -// NewSecurityRulesClient creates an instance of the SecurityRulesClient -// client. +// NewSecurityRulesClient creates an instance of the SecurityRulesClient client. func NewSecurityRulesClient(subscriptionID string) SecurityRulesClient { return NewSecurityRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityRulesClientWithBaseURI creates an instance of the -// SecurityRulesClient client. +// NewSecurityRulesClientWithBaseURI creates an instance of the SecurityRulesClient client. func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) SecurityRulesClient { return SecurityRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a security rule in the specified network -// security group. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates or updates a security rule in the specified network security group. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// networkSecurityGroupName is the name of the network security group. -// securityRuleName is the name of the security rule. securityRuleParameters is -// parameters supplied to the create or update network security rule operation. +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. securityRuleName is the name of the security rule. securityRuleParameters is parameters supplied to the +// create or update network security rule operation. func (client SecurityRulesClient) CreateOrUpdate(resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule, cancel <-chan struct{}) (<-chan SecurityRule, <-chan error) { resultChan := make(chan SecurityRule, 1) errChan := make(chan error, 1) @@ -70,8 +65,10 @@ func (client SecurityRulesClient) CreateOrUpdate(resourceGroupName string, netwo var err error var result SecurityRule defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -105,7 +102,7 @@ func (client SecurityRulesClient) CreateOrUpdatePreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -141,14 +138,11 @@ func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) ( return } -// Delete deletes the specified network security rule. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified network security rule. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// networkSecurityGroupName is the name of the network security group. -// securityRuleName is the name of the security rule. +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. securityRuleName is the name of the security rule. func (client SecurityRulesClient) Delete(resourceGroupName string, networkSecurityGroupName string, securityRuleName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -156,8 +150,10 @@ func (client SecurityRulesClient) Delete(resourceGroupName string, networkSecuri var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -191,7 +187,7 @@ func (client SecurityRulesClient) DeletePreparer(resourceGroupName string, netwo "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -226,9 +222,8 @@ func (client SecurityRulesClient) DeleteResponder(resp *http.Response) (result a // Get get the specified network security rule. // -// resourceGroupName is the name of the resource group. -// networkSecurityGroupName is the name of the network security group. -// securityRuleName is the name of the security rule. +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. securityRuleName is the name of the security rule. func (client SecurityRulesClient) Get(resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRule, err error) { req, err := client.GetPreparer(resourceGroupName, networkSecurityGroupName, securityRuleName) if err != nil { @@ -260,7 +255,7 @@ func (client SecurityRulesClient) GetPreparer(resourceGroupName string, networkS "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -294,8 +289,8 @@ func (client SecurityRulesClient) GetResponder(resp *http.Response) (result Secu // List gets all security rules in a network security group. // -// resourceGroupName is the name of the resource group. -// networkSecurityGroupName is the name of the network security group. +// resourceGroupName is the name of the resource group. networkSecurityGroupName is the name of the network security +// group. func (client SecurityRulesClient) List(resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResult, err error) { req, err := client.ListPreparer(resourceGroupName, networkSecurityGroupName) if err != nil { @@ -326,7 +321,7 @@ func (client SecurityRulesClient) ListPreparer(resourceGroupName string, network "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -381,3 +376,48 @@ func (client SecurityRulesClient) ListNextResults(lastResults SecurityRuleListRe return } + +// ListComplete gets all elements from the list without paging. +func (client SecurityRulesClient) ListComplete(resourceGroupName string, networkSecurityGroupName string, cancel <-chan struct{}) (<-chan SecurityRule, <-chan error) { + resultChan := make(chan SecurityRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, networkSecurityGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go index 7d6ff882a..62a1789e5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/subnets.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// SubnetsClient is the composite Swagger for Network Client +// SubnetsClient is the network Client type SubnetsClient struct { ManagementClient } @@ -39,14 +38,12 @@ func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsC return SubnetsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a subnet in the specified virtual network. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// CreateOrUpdate creates or updates a subnet in the specified virtual network. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. subnetName is the name of the subnet. -// subnetParameters is parameters supplied to the create or update subnet +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// subnetName is the name of the subnet. subnetParameters is parameters supplied to the create or update subnet // operation. func (client SubnetsClient) CreateOrUpdate(resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet, cancel <-chan struct{}) (<-chan Subnet, <-chan error) { resultChan := make(chan Subnet, 1) @@ -55,8 +52,10 @@ func (client SubnetsClient) CreateOrUpdate(resourceGroupName string, virtualNetw var err error var result Subnet defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -90,7 +89,7 @@ func (client SubnetsClient) CreateOrUpdatePreparer(resourceGroupName string, vir "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -126,12 +125,11 @@ func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete deletes the specified subnet. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes the specified subnet. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. subnetName is the name of the subnet. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// subnetName is the name of the subnet. func (client SubnetsClient) Delete(resourceGroupName string, virtualNetworkName string, subnetName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -139,8 +137,10 @@ func (client SubnetsClient) Delete(resourceGroupName string, virtualNetworkName var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -174,7 +174,7 @@ func (client SubnetsClient) DeletePreparer(resourceGroupName string, virtualNetw "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -209,9 +209,8 @@ func (client SubnetsClient) DeleteResponder(resp *http.Response) (result autores // Get gets the specified subnet by virtual network and resource group. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. subnetName is the name of the subnet. -// expand is expands referenced resources. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// subnetName is the name of the subnet. expand is expands referenced resources. func (client SubnetsClient) Get(resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result Subnet, err error) { req, err := client.GetPreparer(resourceGroupName, virtualNetworkName, subnetName, expand) if err != nil { @@ -243,7 +242,7 @@ func (client SubnetsClient) GetPreparer(resourceGroupName string, virtualNetwork "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -280,8 +279,7 @@ func (client SubnetsClient) GetResponder(resp *http.Response) (result Subnet, er // List gets all subnets in a virtual network. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. func (client SubnetsClient) List(resourceGroupName string, virtualNetworkName string) (result SubnetListResult, err error) { req, err := client.ListPreparer(resourceGroupName, virtualNetworkName) if err != nil { @@ -312,7 +310,7 @@ func (client SubnetsClient) ListPreparer(resourceGroupName string, virtualNetwor "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -367,3 +365,48 @@ func (client SubnetsClient) ListNextResults(lastResults SubnetListResult) (resul return } + +// ListComplete gets all elements from the list without paging. +func (client SubnetsClient) ListComplete(resourceGroupName string, virtualNetworkName string, cancel <-chan struct{}) (<-chan Subnet, <-chan error) { + resultChan := make(chan Subnet) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, virtualNetworkName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go index 34fa0df4b..85c220065 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/usages.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// UsagesClient is the composite Swagger for Network Client +// UsagesClient is the network Client type UsagesClient struct { ManagementClient } @@ -40,7 +39,7 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists compute usages for a subscription. +// List list network usages for a subscription. // // location is the location where resource usage is queried. func (client UsagesClient) List(location string) (result UsagesListResult, err error) { @@ -78,7 +77,7 @@ func (client UsagesClient) ListPreparer(location string) (*http.Request, error) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -133,3 +132,48 @@ func (client UsagesClient) ListNextResults(lastResults UsagesListResult) (result return } + +// ListComplete gets all elements from the list without paging. +func (client UsagesClient) ListComplete(location string, cancel <-chan struct{}) (<-chan Usage, <-chan error) { + resultChan := make(chan Usage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(location) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go index cf04f75c9..7f510b4e4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/version.go @@ -14,15 +14,15 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-network/" + return "Azure-SDK-For-Go/v11.0.0-beta arm-network/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go index 13e1392d2..7db4d5de6 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgatewayconnections.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,29 @@ import ( "net/http" ) -// VirtualNetworkGatewayConnectionsClient is the composite Swagger for Network -// Client +// VirtualNetworkGatewayConnectionsClient is the network Client type VirtualNetworkGatewayConnectionsClient struct { ManagementClient } -// NewVirtualNetworkGatewayConnectionsClient creates an instance of the -// VirtualNetworkGatewayConnectionsClient client. +// NewVirtualNetworkGatewayConnectionsClient creates an instance of the VirtualNetworkGatewayConnectionsClient client. func NewVirtualNetworkGatewayConnectionsClient(subscriptionID string) VirtualNetworkGatewayConnectionsClient { return NewVirtualNetworkGatewayConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of -// the VirtualNetworkGatewayConnectionsClient client. +// NewVirtualNetworkGatewayConnectionsClientWithBaseURI creates an instance of the +// VirtualNetworkGatewayConnectionsClient client. func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewayConnectionsClient { return VirtualNetworkGatewayConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a virtual network gateway connection in -// the specified resource group. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a virtual network gateway connection in the specified resource group. This method +// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayConnectionName is the name of the virtual network -// gateway connection. parameters is parameters supplied to the create or -// update virtual network gateway connection operation. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayConnectionName is the name of the virtual +// network gateway connection. parameters is parameters supplied to the create or update virtual network gateway +// connection operation. func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection, cancel <-chan struct{}) (<-chan VirtualNetworkGatewayConnection, <-chan error) { resultChan := make(chan VirtualNetworkGatewayConnection, 1) errChan := make(chan error, 1) @@ -75,8 +70,10 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(resourceGrou var err error var result VirtualNetworkGatewayConnection defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -109,7 +106,7 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdatePreparer(reso "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -145,14 +142,12 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(res return } -// Delete deletes the specified virtual network Gateway connection. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Delete deletes the specified virtual network Gateway connection. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayConnectionName is the name of the virtual network -// gateway connection. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayConnectionName is the name of the virtual +// network gateway connection. func (client VirtualNetworkGatewayConnectionsClient) Delete(resourceGroupName string, virtualNetworkGatewayConnectionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -160,8 +155,10 @@ func (client VirtualNetworkGatewayConnectionsClient) Delete(resourceGroupName st var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -194,7 +191,7 @@ func (client VirtualNetworkGatewayConnectionsClient) DeletePreparer(resourceGrou "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -229,9 +226,8 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteResponder(resp *http. // Get gets the specified virtual network gateway connection by resource group. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayConnectionName is the name of the virtual network -// gateway connection. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayConnectionName is the name of the virtual +// network gateway connection. func (client VirtualNetworkGatewayConnectionsClient) Get(resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnection, err error) { req, err := client.GetPreparer(resourceGroupName, virtualNetworkGatewayConnectionName) if err != nil { @@ -262,7 +258,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetPreparer(resourceGroupNa "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -294,13 +290,11 @@ func (client VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Res return } -// GetSharedKey the Get VirtualNetworkGatewayConnectionSharedKey operation -// retrieves information about the specified virtual network gateway connection -// shared key through Network resource provider. +// GetSharedKey the Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the specified +// virtual network gateway connection shared key through Network resource provider. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayConnectionName is the virtual network gateway -// connection shared key name. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayConnectionName is the virtual network +// gateway connection shared key name. func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(resourceGroupName string, virtualNetworkGatewayConnectionName string) (result ConnectionSharedKey, err error) { req, err := client.GetSharedKeyPreparer(resourceGroupName, virtualNetworkGatewayConnectionName) if err != nil { @@ -331,7 +325,7 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyPreparer(resour "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -363,8 +357,8 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp return } -// List the List VirtualNetworkGatewayConnections operation retrieves all the -// virtual network gateways connections created. +// List the List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections +// created. // // resourceGroupName is the name of the resource group. func (client VirtualNetworkGatewayConnectionsClient) List(resourceGroupName string) (result VirtualNetworkGatewayConnectionListResult, err error) { @@ -396,7 +390,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ListPreparer(resourceGroupN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -452,18 +446,59 @@ func (client VirtualNetworkGatewayConnectionsClient) ListNextResults(lastResults return } -// ResetSharedKey the VirtualNetworkGatewayConnectionResetSharedKey operation -// resets the virtual network gateway connection shared key for passed virtual -// network gateway connection in the specified resource group through Network -// resource provider. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// ListComplete gets all elements from the list without paging. +func (client VirtualNetworkGatewayConnectionsClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan VirtualNetworkGatewayConnection, <-chan error) { + resultChan := make(chan VirtualNetworkGatewayConnection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ResetSharedKey the VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway +// connection shared key for passed virtual network gateway connection in the specified resource group through Network +// resource provider. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayConnectionName is the virtual network gateway -// connection reset shared key Name. parameters is parameters supplied to the -// begin reset virtual network gateway connection shared key operation through -// network resource provider. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayConnectionName is the virtual network +// gateway connection reset shared key Name. parameters is parameters supplied to the begin reset virtual network +// gateway connection shared key operation through network resource provider. func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey, cancel <-chan struct{}) (<-chan ConnectionResetSharedKey, <-chan error) { resultChan := make(chan ConnectionResetSharedKey, 1) errChan := make(chan error, 1) @@ -483,8 +518,10 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(resourceGrou var err error var result ConnectionResetSharedKey defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -517,7 +554,7 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyPreparer(reso "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -553,18 +590,14 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyResponder(res return } -// SetSharedKey the Put VirtualNetworkGatewayConnectionSharedKey operation sets -// the virtual network gateway connection shared key for passed virtual network -// gateway connection in the specified resource group through Network resource -// provider. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// SetSharedKey the Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway connection +// shared key for passed virtual network gateway connection in the specified resource group through Network resource +// provider. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayConnectionName is the virtual network gateway -// connection name. parameters is parameters supplied to the Begin Set Virtual -// Network Gateway connection Shared key operation throughNetwork resource -// provider. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayConnectionName is the virtual network +// gateway connection name. parameters is parameters supplied to the Begin Set Virtual Network Gateway connection +// Shared key operation throughNetwork resource provider. func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey, cancel <-chan struct{}) (<-chan ConnectionSharedKey, <-chan error) { resultChan := make(chan ConnectionSharedKey, 1) errChan := make(chan error, 1) @@ -581,8 +614,10 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(resourceGroupN var err error var result ConnectionSharedKey defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -615,7 +650,7 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyPreparer(resour "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go index 720978e83..5f56a204b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkgateways.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,27 @@ import ( "net/http" ) -// VirtualNetworkGatewaysClient is the composite Swagger for Network Client +// VirtualNetworkGatewaysClient is the network Client type VirtualNetworkGatewaysClient struct { ManagementClient } -// NewVirtualNetworkGatewaysClient creates an instance of the -// VirtualNetworkGatewaysClient client. +// NewVirtualNetworkGatewaysClient creates an instance of the VirtualNetworkGatewaysClient client. func NewVirtualNetworkGatewaysClient(subscriptionID string) VirtualNetworkGatewaysClient { return NewVirtualNetworkGatewaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the -// VirtualNetworkGatewaysClient client. +// NewVirtualNetworkGatewaysClientWithBaseURI creates an instance of the VirtualNetworkGatewaysClient client. func NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkGatewaysClient { return VirtualNetworkGatewaysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a virtual network gateway in the specified -// resource group. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates or updates a virtual network gateway in the specified resource group. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. -// parameters is parameters supplied to create or update virtual network -// gateway operation. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. parameters is parameters supplied to create or update virtual network gateway operation. func (client VirtualNetworkGatewaysClient) CreateOrUpdate(resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway, cancel <-chan struct{}) (<-chan VirtualNetworkGateway, <-chan error) { resultChan := make(chan VirtualNetworkGateway, 1) errChan := make(chan error, 1) @@ -67,8 +61,10 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdate(resourceGroupName stri var err error var result VirtualNetworkGateway defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -101,7 +97,7 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdatePreparer(resourceGroupN "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -137,13 +133,12 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Re return } -// Delete deletes the specified virtual network gateway. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified virtual network gateway. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. func (client VirtualNetworkGatewaysClient) Delete(resourceGroupName string, virtualNetworkGatewayName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -151,8 +146,10 @@ func (client VirtualNetworkGatewaysClient) Delete(resourceGroupName string, virt var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -185,7 +182,7 @@ func (client VirtualNetworkGatewaysClient) DeletePreparer(resourceGroupName stri "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -218,44 +215,56 @@ func (client VirtualNetworkGatewaysClient) DeleteResponder(resp *http.Response) return } -// Generatevpnclientpackage generates VPN client package for P2S client of the -// virtual network gateway in the specified resource group. +// Generatevpnclientpackage generates VPN client package for P2S client of the virtual network gateway in the specified +// resource group. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. +// The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. -// parameters is parameters supplied to the generate virtual network gateway -// VPN client package operation. -func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result String, err error) { - req, err := client.GeneratevpnclientpackagePreparer(resourceGroupName, virtualNetworkGatewayName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure preparing request") - return - } +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. parameters is parameters supplied to the generate virtual network gateway VPN client package operation. +func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters, cancel <-chan struct{}) (<-chan String, <-chan error) { + resultChan := make(chan String, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result String + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.GeneratevpnclientpackagePreparer(resourceGroupName, virtualNetworkGatewayName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure preparing request") + return + } - resp, err := client.GeneratevpnclientpackageSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", resp, "Failure sending request") - return - } + resp, err := client.GeneratevpnclientpackageSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", resp, "Failure sending request") + return + } - result, err = client.GeneratevpnclientpackageResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", resp, "Failure responding to request") - } - - return + result, err = client.GeneratevpnclientpackageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", resp, "Failure responding to request") + } + }() + return resultChan, errChan } // GeneratevpnclientpackagePreparer prepares the Generatevpnclientpackage request. -func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (*http.Request, error) { +func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -267,18 +276,106 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackagePreparer(reso autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } // GeneratevpnclientpackageSender sends the Generatevpnclientpackage request. The method will close the // http.Response Body if it receives an error. func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } // GeneratevpnclientpackageResponder handles the response to the Generatevpnclientpackage request. The method always // closes the http.Response Body. func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GenerateVpnProfile generates VPN profile for P2S client of the virtual network gateway in the specified resource +// group. Used for IKEV2 and radius based authentication. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. parameters is parameters supplied to the generate virtual network gateway VPN client package operation. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters, cancel <-chan struct{}) (<-chan String, <-chan error) { + resultChan := make(chan String, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result String + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.GenerateVpnProfilePreparer(resourceGroupName, virtualNetworkGatewayName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request") + return + } + + resp, err := client.GenerateVpnProfileSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", resp, "Failure sending request") + return + } + + result, err = client.GenerateVpnProfileResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// GenerateVpnProfilePreparer prepares the GenerateVpnProfile request. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfilePreparer(resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// GenerateVpnProfileSender sends the GenerateVpnProfile request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfileSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// GenerateVpnProfileResponder handles the response to the GenerateVpnProfile request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GenerateVpnProfileResponder(resp *http.Response) (result String, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -291,8 +388,8 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res // Get gets the specified virtual network gateway by resource group. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. func (client VirtualNetworkGatewaysClient) Get(resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGateway, err error) { req, err := client.GetPreparer(resourceGroupName, virtualNetworkGatewayName) if err != nil { @@ -323,7 +420,7 @@ func (client VirtualNetworkGatewaysClient) GetPreparer(resourceGroupName string, "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -355,15 +452,12 @@ func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (re return } -// GetAdvertisedRoutes this operation retrieves a list of routes the virtual -// network gateway is advertising to the specified peer. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// GetAdvertisedRoutes this operation retrieves a list of routes the virtual network gateway is advertising to the +// specified peer. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. +// The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. peer -// is the IP address of the peer +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. peer is the IP address of the peer func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(resourceGroupName string, virtualNetworkGatewayName string, peer string, cancel <-chan struct{}) (<-chan GatewayRouteListResult, <-chan error) { resultChan := make(chan GatewayRouteListResult, 1) errChan := make(chan error, 1) @@ -371,8 +465,10 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(resourceGroupName var err error var result GatewayRouteListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -405,7 +501,7 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesPreparer(resourceG "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, "peer": autorest.Encode("query", peer), @@ -440,14 +536,12 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesResponder(resp *ht return } -// GetBgpPeerStatus the GetBgpPeerStatus operation retrieves the status of all -// BGP peers. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel +// GetBgpPeerStatus the GetBgpPeerStatus operation retrieves the status of all BGP peers. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. peer -// is the IP address of the peer to retrieve the status of. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. peer is the IP address of the peer to retrieve the status of. func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(resourceGroupName string, virtualNetworkGatewayName string, peer string, cancel <-chan struct{}) (<-chan BgpPeerStatusListResult, <-chan error) { resultChan := make(chan BgpPeerStatusListResult, 1) errChan := make(chan error, 1) @@ -455,8 +549,10 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(resourceGroupName st var err error var result BgpPeerStatusListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -489,7 +585,7 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusPreparer(resourceGrou "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -526,14 +622,12 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusResponder(resp *http. return } -// GetLearnedRoutes this operation retrieves a list of routes the virtual -// network gateway has learned, including routes learned from BGP peers. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// GetLearnedRoutes this operation retrieves a list of routes the virtual network gateway has learned, including routes +// learned from BGP peers. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(resourceGroupName string, virtualNetworkGatewayName string, cancel <-chan struct{}) (<-chan GatewayRouteListResult, <-chan error) { resultChan := make(chan GatewayRouteListResult, 1) errChan := make(chan error, 1) @@ -541,8 +635,10 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(resourceGroupName st var err error var result GatewayRouteListResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -575,7 +671,7 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesPreparer(resourceGrou "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -609,6 +705,90 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http. return } +// GetVpnProfilePackageURL gets pre-generated VPN profile for P2S client of the virtual network gateway in the +// specified resource group. The profile needs to be generated first using generateVpnProfile. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(resourceGroupName string, virtualNetworkGatewayName string, cancel <-chan struct{}) (<-chan String, <-chan error) { + resultChan := make(chan String, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result String + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.GetVpnProfilePackageURLPreparer(resourceGroupName, virtualNetworkGatewayName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure preparing request") + return + } + + resp, err := client.GetVpnProfilePackageURLSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", resp, "Failure sending request") + return + } + + result, err = client.GetVpnProfilePackageURLResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// GetVpnProfilePackageURLPreparer prepares the GetVpnProfilePackageURL request. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLPreparer(resourceGroupName string, virtualNetworkGatewayName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// GetVpnProfilePackageURLSender sends the GetVpnProfilePackageURL request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// GetVpnProfilePackageURLResponder handles the response to the GetVpnProfilePackageURL request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List gets all virtual network gateways by resource group. // // resourceGroupName is the name of the resource group. @@ -641,7 +821,7 @@ func (client VirtualNetworkGatewaysClient) ListPreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -697,15 +877,193 @@ func (client VirtualNetworkGatewaysClient) ListNextResults(lastResults VirtualNe return } -// Reset resets the primary of the virtual network gateway in the specified -// resource group. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// ListComplete gets all elements from the list without paging. +func (client VirtualNetworkGatewaysClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan VirtualNetworkGateway, <-chan error) { + resultChan := make(chan VirtualNetworkGateway) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListConnections gets all the connections in a virtual network gateway. +// +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. +func (client VirtualNetworkGatewaysClient) ListConnections(resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResult, err error) { + req, err := client.ListConnectionsPreparer(resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", nil, "Failure preparing request") + return + } + + resp, err := client.ListConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure sending request") + return + } + + result, err = client.ListConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure responding to request") + } + + return +} + +// ListConnectionsPreparer prepares the ListConnections request. +func (client VirtualNetworkGatewaysClient) ListConnectionsPreparer(resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListConnectionsSender sends the ListConnections request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) ListConnectionsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListConnectionsResponder handles the response to the ListConnections request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) ListConnectionsResponder(resp *http.Response) (result VirtualNetworkGatewayListConnectionsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListConnectionsNextResults retrieves the next set of results, if any. +func (client VirtualNetworkGatewaysClient) ListConnectionsNextResults(lastResults VirtualNetworkGatewayListConnectionsResult) (result VirtualNetworkGatewayListConnectionsResult, err error) { + req, err := lastResults.VirtualNetworkGatewayListConnectionsResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListConnectionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure sending next results request") + } + + result, err = client.ListConnectionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ListConnections", resp, "Failure responding to next results request") + } + + return +} + +// ListConnectionsComplete gets all elements from the list without paging. +func (client VirtualNetworkGatewaysClient) ListConnectionsComplete(resourceGroupName string, virtualNetworkGatewayName string, cancel <-chan struct{}) (<-chan VirtualNetworkGatewayConnectionListEntity, <-chan error) { + resultChan := make(chan VirtualNetworkGatewayConnectionListEntity) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListConnections(resourceGroupName, virtualNetworkGatewayName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListConnectionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Reset resets the primary of the virtual network gateway in the specified resource group. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. -// virtualNetworkGatewayName is the name of the virtual network gateway. -// gatewayVip is virtual network gateway vip address supplied to the begin -// reset of the active-active feature enabled gateway. +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. gatewayVip is virtual network gateway vip address supplied to the begin reset of the active-active feature +// enabled gateway. func (client VirtualNetworkGatewaysClient) Reset(resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string, cancel <-chan struct{}) (<-chan VirtualNetworkGateway, <-chan error) { resultChan := make(chan VirtualNetworkGateway, 1) errChan := make(chan error, 1) @@ -713,8 +1071,10 @@ func (client VirtualNetworkGatewaysClient) Reset(resourceGroupName string, virtu var err error var result VirtualNetworkGateway defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -747,7 +1107,7 @@ func (client VirtualNetworkGatewaysClient) ResetPreparer(resourceGroupName strin "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -783,3 +1143,138 @@ func (client VirtualNetworkGatewaysClient) ResetResponder(resp *http.Response) ( result.Response = autorest.Response{Response: resp} return } + +// SupportedVpnDevices gets a xml format representation for supported vpn devices. +// +// resourceGroupName is the name of the resource group. virtualNetworkGatewayName is the name of the virtual network +// gateway. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevices(resourceGroupName string, virtualNetworkGatewayName string) (result String, err error) { + req, err := client.SupportedVpnDevicesPreparer(resourceGroupName, virtualNetworkGatewayName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", nil, "Failure preparing request") + return + } + + resp, err := client.SupportedVpnDevicesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure sending request") + return + } + + result, err = client.SupportedVpnDevicesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", resp, "Failure responding to request") + } + + return +} + +// SupportedVpnDevicesPreparer prepares the SupportedVpnDevices request. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesPreparer(resourceGroupName string, virtualNetworkGatewayName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayName": autorest.Encode("path", virtualNetworkGatewayName), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// SupportedVpnDevicesSender sends the SupportedVpnDevices request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// SupportedVpnDevicesResponder handles the response to the SupportedVpnDevices request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// VpnDeviceConfigurationScript gets a xml format representation for vpn device configuration script. +// +// resourceGroupName is the name of the resource group. virtualNetworkGatewayConnectionName is the name of the virtual +// network gateway connection for which the configuration script is generated. parameters is parameters supplied to the +// generate vpn device script operation. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (result String, err error) { + req, err := client.VpnDeviceConfigurationScriptPreparer(resourceGroupName, virtualNetworkGatewayConnectionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", nil, "Failure preparing request") + return + } + + resp, err := client.VpnDeviceConfigurationScriptSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure sending request") + return + } + + result, err = client.VpnDeviceConfigurationScriptResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", resp, "Failure responding to request") + } + + return +} + +// VpnDeviceConfigurationScriptPreparer prepares the VpnDeviceConfigurationScript request. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptPreparer(resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkGatewayConnectionName": autorest.Encode("path", virtualNetworkGatewayConnectionName), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// VpnDeviceConfigurationScriptSender sends the VpnDeviceConfigurationScript request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// VpnDeviceConfigurationScriptResponder handles the response to the VpnDeviceConfigurationScript request. The method always +// closes the http.Response Body. +func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScriptResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go index 27fafdfd0..0a945c1bb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworkpeerings.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,31 +23,27 @@ import ( "net/http" ) -// VirtualNetworkPeeringsClient is the composite Swagger for Network Client +// VirtualNetworkPeeringsClient is the network Client type VirtualNetworkPeeringsClient struct { ManagementClient } -// NewVirtualNetworkPeeringsClient creates an instance of the -// VirtualNetworkPeeringsClient client. +// NewVirtualNetworkPeeringsClient creates an instance of the VirtualNetworkPeeringsClient client. func NewVirtualNetworkPeeringsClient(subscriptionID string) VirtualNetworkPeeringsClient { return NewVirtualNetworkPeeringsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the -// VirtualNetworkPeeringsClient client. +// NewVirtualNetworkPeeringsClientWithBaseURI creates an instance of the VirtualNetworkPeeringsClient client. func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkPeeringsClient { return VirtualNetworkPeeringsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a peering in the specified virtual -// network. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// CreateOrUpdate creates or updates a peering in the specified virtual network. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. virtualNetworkPeeringName is the name of -// the peering. virtualNetworkPeeringParameters is parameters supplied to the +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// virtualNetworkPeeringName is the name of the peering. virtualNetworkPeeringParameters is parameters supplied to the // create or update virtual network peering operation. func (client VirtualNetworkPeeringsClient) CreateOrUpdate(resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering, cancel <-chan struct{}) (<-chan VirtualNetworkPeering, <-chan error) { resultChan := make(chan VirtualNetworkPeering, 1) @@ -57,8 +52,10 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdate(resourceGroupName stri var err error var result VirtualNetworkPeering defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -92,7 +89,7 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdatePreparer(resourceGroupN "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -128,14 +125,12 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdateResponder(resp *http.Re return } -// Delete deletes the specified virtual network peering. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified virtual network peering. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. virtualNetworkPeeringName is the name of -// the virtual network peering. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// virtualNetworkPeeringName is the name of the virtual network peering. func (client VirtualNetworkPeeringsClient) Delete(resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -143,8 +138,10 @@ func (client VirtualNetworkPeeringsClient) Delete(resourceGroupName string, virt var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -178,7 +175,7 @@ func (client VirtualNetworkPeeringsClient) DeletePreparer(resourceGroupName stri "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -213,9 +210,8 @@ func (client VirtualNetworkPeeringsClient) DeleteResponder(resp *http.Response) // Get gets the specified virtual network peering. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. virtualNetworkPeeringName is the name of -// the virtual network peering. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// virtualNetworkPeeringName is the name of the virtual network peering. func (client VirtualNetworkPeeringsClient) Get(resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeering, err error) { req, err := client.GetPreparer(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName) if err != nil { @@ -247,7 +243,7 @@ func (client VirtualNetworkPeeringsClient) GetPreparer(resourceGroupName string, "virtualNetworkPeeringName": autorest.Encode("path", virtualNetworkPeeringName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -281,8 +277,7 @@ func (client VirtualNetworkPeeringsClient) GetResponder(resp *http.Response) (re // List gets all virtual network peerings in a virtual network. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. func (client VirtualNetworkPeeringsClient) List(resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResult, err error) { req, err := client.ListPreparer(resourceGroupName, virtualNetworkName) if err != nil { @@ -313,7 +308,7 @@ func (client VirtualNetworkPeeringsClient) ListPreparer(resourceGroupName string "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -368,3 +363,48 @@ func (client VirtualNetworkPeeringsClient) ListNextResults(lastResults VirtualNe return } + +// ListComplete gets all elements from the list without paging. +func (client VirtualNetworkPeeringsClient) ListComplete(resourceGroupName string, virtualNetworkName string, cancel <-chan struct{}) (<-chan VirtualNetworkPeering, <-chan error) { + resultChan := make(chan VirtualNetworkPeering) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, virtualNetworkName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go index eab048c72..58ac8ab11 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/virtualnetworks.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,29 +23,25 @@ import ( "net/http" ) -// VirtualNetworksClient is the composite Swagger for Network Client +// VirtualNetworksClient is the network Client type VirtualNetworksClient struct { ManagementClient } -// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient -// client. +// NewVirtualNetworksClient creates an instance of the VirtualNetworksClient client. func NewVirtualNetworksClient(subscriptionID string) VirtualNetworksClient { return NewVirtualNetworksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVirtualNetworksClientWithBaseURI creates an instance of the -// VirtualNetworksClient client. +// NewVirtualNetworksClientWithBaseURI creates an instance of the VirtualNetworksClient client. func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworksClient { return VirtualNetworksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckIPAddressAvailability checks whether a private IP address is available -// for use. +// CheckIPAddressAvailability checks whether a private IP address is available for use. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. IPAddress is the private IP address to be -// verified. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// IPAddress is the private IP address to be verified. func (client VirtualNetworksClient) CheckIPAddressAvailability(resourceGroupName string, virtualNetworkName string, IPAddress string) (result IPAddressAvailabilityResult, err error) { req, err := client.CheckIPAddressAvailabilityPreparer(resourceGroupName, virtualNetworkName, IPAddress) if err != nil { @@ -77,7 +72,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(resourceG "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,14 +107,12 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityResponder(resp *ht return } -// CreateOrUpdate creates or updates a virtual network in the specified -// resource group. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdate creates or updates a virtual network in the specified resource group. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. parameters is parameters supplied to the -// create or update virtual network operation +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +// parameters is parameters supplied to the create or update virtual network operation func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) { resultChan := make(chan VirtualNetwork, 1) errChan := make(chan error, 1) @@ -127,8 +120,10 @@ func (client VirtualNetworksClient) CreateOrUpdate(resourceGroupName string, vir var err error var result VirtualNetwork defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -161,7 +156,7 @@ func (client VirtualNetworksClient) CreateOrUpdatePreparer(resourceGroupName str "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -197,13 +192,10 @@ func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes the specified virtual network. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the specified virtual network. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. func (client VirtualNetworksClient) Delete(resourceGroupName string, virtualNetworkName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -211,8 +203,10 @@ func (client VirtualNetworksClient) Delete(resourceGroupName string, virtualNetw var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -245,7 +239,7 @@ func (client VirtualNetworksClient) DeletePreparer(resourceGroupName string, vir "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -280,8 +274,8 @@ func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result // Get gets the specified virtual network by resource group. // -// resourceGroupName is the name of the resource group. virtualNetworkName is -// the name of the virtual network. expand is expands referenced resources. +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. expand +// is expands referenced resources. func (client VirtualNetworksClient) Get(resourceGroupName string, virtualNetworkName string, expand string) (result VirtualNetwork, err error) { req, err := client.GetPreparer(resourceGroupName, virtualNetworkName, expand) if err != nil { @@ -312,7 +306,7 @@ func (client VirtualNetworksClient) GetPreparer(resourceGroupName string, virtua "virtualNetworkName": autorest.Encode("path", virtualNetworkName), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -379,7 +373,7 @@ func (client VirtualNetworksClient) ListPreparer(resourceGroupName string) (*htt "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -435,6 +429,51 @@ func (client VirtualNetworksClient) ListNextResults(lastResults VirtualNetworkLi return } +// ListComplete gets all elements from the list without paging. +func (client VirtualNetworksClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) { + resultChan := make(chan VirtualNetwork) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAll gets all virtual networks in a subscription. func (client VirtualNetworksClient) ListAll() (result VirtualNetworkListResult, err error) { req, err := client.ListAllPreparer() @@ -464,7 +503,7 @@ func (client VirtualNetworksClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -519,3 +558,182 @@ func (client VirtualNetworksClient) ListAllNextResults(lastResults VirtualNetwor return } + +// ListAllComplete gets all elements from the list without paging. +func (client VirtualNetworksClient) ListAllComplete(cancel <-chan struct{}) (<-chan VirtualNetwork, <-chan error) { + resultChan := make(chan VirtualNetwork) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListUsage lists usage stats. +// +// resourceGroupName is the name of the resource group. virtualNetworkName is the name of the virtual network. +func (client VirtualNetworksClient) ListUsage(resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResult, err error) { + req, err := client.ListUsagePreparer(resourceGroupName, virtualNetworkName) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", nil, "Failure preparing request") + return + } + + resp, err := client.ListUsageSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure sending request") + return + } + + result, err = client.ListUsageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure responding to request") + } + + return +} + +// ListUsagePreparer prepares the ListUsage request. +func (client VirtualNetworksClient) ListUsagePreparer(resourceGroupName string, virtualNetworkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkName": autorest.Encode("path", virtualNetworkName), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListUsageSender sends the ListUsage request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworksClient) ListUsageSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListUsageResponder handles the response to the ListUsage request. The method always +// closes the http.Response Body. +func (client VirtualNetworksClient) ListUsageResponder(resp *http.Response) (result VirtualNetworkListUsageResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListUsageNextResults retrieves the next set of results, if any. +func (client VirtualNetworksClient) ListUsageNextResults(lastResults VirtualNetworkListUsageResult) (result VirtualNetworkListUsageResult, err error) { + req, err := lastResults.VirtualNetworkListUsageResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListUsageSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure sending next results request") + } + + result, err = client.ListUsageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "ListUsage", resp, "Failure responding to next results request") + } + + return +} + +// ListUsageComplete gets all elements from the list without paging. +func (client VirtualNetworksClient) ListUsageComplete(resourceGroupName string, virtualNetworkName string, cancel <-chan struct{}) (<-chan VirtualNetworkUsage, <-chan error) { + resultChan := make(chan VirtualNetworkUsage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListUsage(resourceGroupName, virtualNetworkName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListUsageNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/watchers.go index 28febf847..798d8c1bb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/network/watchers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/network/watchers.go @@ -14,9 +14,8 @@ package network // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// WatchersClient is the composite Swagger for Network Client +// WatchersClient is the network Client type WatchersClient struct { ManagementClient } @@ -35,18 +34,112 @@ func NewWatchersClient(subscriptionID string) WatchersClient { return NewWatchersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWatchersClientWithBaseURI creates an instance of the WatchersClient -// client. +// NewWatchersClientWithBaseURI creates an instance of the WatchersClient client. func NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) WatchersClient { return WatchersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a network watcher in the specified -// resource group. +// CheckConnectivity verifies the possibility of establishing a direct TCP connection from a virtual machine to a given +// endpoint including another VM or an arbitrary remote server. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. parameters is parameters that define the -// network watcher resource. +// resourceGroupName is the name of the network watcher resource group. networkWatcherName is the name of the network +// watcher resource. parameters is parameters that determine how the connectivity check will be performed. +func (client WatchersClient) CheckConnectivity(resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, cancel <-chan struct{}) (<-chan ConnectivityInformation, <-chan error) { + resultChan := make(chan ConnectivityInformation, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.Source.ResourceID", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Destination", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "network.WatchersClient", "CheckConnectivity") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result ConnectivityInformation + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CheckConnectivityPreparer(resourceGroupName, networkWatcherName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", nil, "Failure preparing request") + return + } + + resp, err := client.CheckConnectivitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", resp, "Failure sending request") + return + } + + result, err = client.CheckConnectivityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "CheckConnectivity", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CheckConnectivityPreparer prepares the CheckConnectivity request. +func (client WatchersClient) CheckConnectivityPreparer(resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CheckConnectivitySender sends the CheckConnectivity request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) CheckConnectivitySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CheckConnectivityResponder handles the response to the CheckConnectivity request. The method always +// closes the http.Response Body. +func (client WatchersClient) CheckConnectivityResponder(resp *http.Response) (result ConnectivityInformation, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a network watcher in the specified resource group. +// +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// parameters is parameters that define the network watcher resource. func (client WatchersClient) CreateOrUpdate(resourceGroupName string, networkWatcherName string, parameters Watcher) (result Watcher, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, networkWatcherName, parameters) if err != nil { @@ -77,7 +170,7 @@ func (client WatchersClient) CreateOrUpdatePreparer(resourceGroupName string, ne "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -111,13 +204,11 @@ func (client WatchersClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes the specified network watcher resource. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Delete deletes the specified network watcher resource. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. func (client WatchersClient) Delete(resourceGroupName string, networkWatcherName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -125,8 +216,10 @@ func (client WatchersClient) Delete(resourceGroupName string, networkWatcherName var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -159,7 +252,7 @@ func (client WatchersClient) DeletePreparer(resourceGroupName string, networkWat "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -194,8 +287,7 @@ func (client WatchersClient) DeleteResponder(resp *http.Response) (result autore // Get gets the specified network watcher by resource group. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. func (client WatchersClient) Get(resourceGroupName string, networkWatcherName string) (result Watcher, err error) { req, err := client.GetPreparer(resourceGroupName, networkWatcherName) if err != nil { @@ -226,7 +318,7 @@ func (client WatchersClient) GetPreparer(resourceGroupName string, networkWatche "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -258,14 +350,109 @@ func (client WatchersClient) GetResponder(resp *http.Response) (result Watcher, return } -// GetFlowLogStatus queries status of flow log on a specified resource. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// GetAzureReachabilityReport gets the relative latency score for internet service providers from a specified location +// to Azure regions. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the network watcher resource group. networkWatcherName is the name of the network +// watcher resource. parameters is parameters that determine Azure reachability report configuration. +func (client WatchersClient) GetAzureReachabilityReport(resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, cancel <-chan struct{}) (<-chan AzureReachabilityReport, <-chan error) { + resultChan := make(chan AzureReachabilityReport, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ProviderLocation", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.ProviderLocation.Country", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.StartTime", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.EndTime", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "network.WatchersClient", "GetAzureReachabilityReport") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result AzureReachabilityReport + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.GetAzureReachabilityReportPreparer(resourceGroupName, networkWatcherName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", nil, "Failure preparing request") + return + } + + resp, err := client.GetAzureReachabilityReportSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", resp, "Failure sending request") + return + } + + result, err = client.GetAzureReachabilityReportResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetAzureReachabilityReport", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// GetAzureReachabilityReportPreparer prepares the GetAzureReachabilityReport request. +func (client WatchersClient) GetAzureReachabilityReportPreparer(resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// GetAzureReachabilityReportSender sends the GetAzureReachabilityReport request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) GetAzureReachabilityReportSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// GetAzureReachabilityReportResponder handles the response to the GetAzureReachabilityReport request. The method always +// closes the http.Response Body. +func (client WatchersClient) GetAzureReachabilityReportResponder(resp *http.Response) (result AzureReachabilityReport, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFlowLogStatus queries status of flow log on a specified resource. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the network watcher resource group. -// networkWatcherName is the name of the network watcher resource. parameters -// is parameters that define a resource to query flow log status. +// resourceGroupName is the name of the network watcher resource group. networkWatcherName is the name of the network +// watcher resource. parameters is parameters that define a resource to query flow log status. func (client WatchersClient) GetFlowLogStatus(resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters, cancel <-chan struct{}) (<-chan FlowLogInformation, <-chan error) { resultChan := make(chan FlowLogInformation, 1) errChan := make(chan error, 1) @@ -282,8 +469,10 @@ func (client WatchersClient) GetFlowLogStatus(resourceGroupName string, networkW var err error var result FlowLogInformation defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -316,7 +505,7 @@ func (client WatchersClient) GetFlowLogStatusPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -352,14 +541,11 @@ func (client WatchersClient) GetFlowLogStatusResponder(resp *http.Response) (res return } -// GetNextHop gets the next hop from the specified VM. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// GetNextHop gets the next hop from the specified VM. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. parameters is parameters that define the -// source and destination endpoint. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// parameters is parameters that define the source and destination endpoint. func (client WatchersClient) GetNextHop(resourceGroupName string, networkWatcherName string, parameters NextHopParameters, cancel <-chan struct{}) (<-chan NextHopResult, <-chan error) { resultChan := make(chan NextHopResult, 1) errChan := make(chan error, 1) @@ -378,8 +564,10 @@ func (client WatchersClient) GetNextHop(resourceGroupName string, networkWatcher var err error var result NextHopResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -412,7 +600,7 @@ func (client WatchersClient) GetNextHopPreparer(resourceGroupName string, networ "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -450,9 +638,8 @@ func (client WatchersClient) GetNextHopResponder(resp *http.Response) (result Ne // GetTopology gets the current network topology by resource group. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. parameters is parameters that define the -// representation of topology. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// parameters is parameters that define the representation of topology. func (client WatchersClient) GetTopology(resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (result Topology, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -489,7 +676,7 @@ func (client WatchersClient) GetTopologyPreparer(resourceGroupName string, netwo "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -523,14 +710,12 @@ func (client WatchersClient) GetTopologyResponder(resp *http.Response) (result T return } -// GetTroubleshooting initiate troubleshooting on a specified resource This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// GetTroubleshooting initiate troubleshooting on a specified resource This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher resource. parameters is parameters that -// define the resource to troubleshoot. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher resource. +// parameters is parameters that define the resource to troubleshoot. func (client WatchersClient) GetTroubleshooting(resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters, cancel <-chan struct{}) (<-chan TroubleshootingResult, <-chan error) { resultChan := make(chan TroubleshootingResult, 1) errChan := make(chan error, 1) @@ -551,8 +736,10 @@ func (client WatchersClient) GetTroubleshooting(resourceGroupName string, networ var err error var result TroubleshootingResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -585,7 +772,7 @@ func (client WatchersClient) GetTroubleshootingPreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -621,14 +808,12 @@ func (client WatchersClient) GetTroubleshootingResponder(resp *http.Response) (r return } -// GetTroubleshootingResult get the last completed troubleshooting result on a -// specified resource This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// GetTroubleshootingResult get the last completed troubleshooting result on a specified resource This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher resource. parameters is parameters that -// define the resource to query the troubleshooting result. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher resource. +// parameters is parameters that define the resource to query the troubleshooting result. func (client WatchersClient) GetTroubleshootingResult(resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters, cancel <-chan struct{}) (<-chan TroubleshootingResult, <-chan error) { resultChan := make(chan TroubleshootingResult, 1) errChan := make(chan error, 1) @@ -645,8 +830,10 @@ func (client WatchersClient) GetTroubleshootingResult(resourceGroupName string, var err error var result TroubleshootingResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -679,7 +866,7 @@ func (client WatchersClient) GetTroubleshootingResultPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -715,14 +902,12 @@ func (client WatchersClient) GetTroubleshootingResultResponder(resp *http.Respon return } -// GetVMSecurityRules gets the configured and effective security group rules on -// the specified VM. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// GetVMSecurityRules gets the configured and effective security group rules on the specified VM. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. parameters is parameters that define the VM -// to check security groups for. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// parameters is parameters that define the VM to check security groups for. func (client WatchersClient) GetVMSecurityRules(resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters, cancel <-chan struct{}) (<-chan SecurityGroupViewResult, <-chan error) { resultChan := make(chan SecurityGroupViewResult, 1) errChan := make(chan error, 1) @@ -739,8 +924,10 @@ func (client WatchersClient) GetVMSecurityRules(resourceGroupName string, networ var err error var result SecurityGroupViewResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -773,7 +960,7 @@ func (client WatchersClient) GetVMSecurityRulesPreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -841,7 +1028,7 @@ func (client WatchersClient) ListPreparer(resourceGroupName string) (*http.Reque "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -902,7 +1089,7 @@ func (client WatchersClient) ListAllPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -934,14 +1121,97 @@ func (client WatchersClient) ListAllResponder(resp *http.Response) (result Watch return } -// SetFlowLogConfiguration configures flow log on a specified resource. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ListAvailableProviders lists all available internet service providers for a specified Azure region. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the network watcher resource group. networkWatcherName is the name of the network +// watcher resource. parameters is parameters that scope the list of available providers. +func (client WatchersClient) ListAvailableProviders(resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, cancel <-chan struct{}) (<-chan AvailableProvidersList, <-chan error) { + resultChan := make(chan AvailableProvidersList, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result AvailableProvidersList + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.ListAvailableProvidersPreparer(resourceGroupName, networkWatcherName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure preparing request") + return + } + + resp, err := client.ListAvailableProvidersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", resp, "Failure sending request") + return + } + + result, err = client.ListAvailableProvidersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// ListAvailableProvidersPreparer prepares the ListAvailableProviders request. +func (client WatchersClient) ListAvailableProvidersPreparer(resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "networkWatcherName": autorest.Encode("path", networkWatcherName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// ListAvailableProvidersSender sends the ListAvailableProviders request. The method will close the +// http.Response Body if it receives an error. +func (client WatchersClient) ListAvailableProvidersSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// ListAvailableProvidersResponder handles the response to the ListAvailableProviders request. The method always +// closes the http.Response Body. +func (client WatchersClient) ListAvailableProvidersResponder(resp *http.Response) (result AvailableProvidersList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SetFlowLogConfiguration configures flow log on a specified resource. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the network watcher resource group. -// networkWatcherName is the name of the network watcher resource. parameters -// is parameters that define the configuration of flow log. +// resourceGroupName is the name of the network watcher resource group. networkWatcherName is the name of the network +// watcher resource. parameters is parameters that define the configuration of flow log. func (client WatchersClient) SetFlowLogConfiguration(resourceGroupName string, networkWatcherName string, parameters FlowLogInformation, cancel <-chan struct{}) (<-chan FlowLogInformation, <-chan error) { resultChan := make(chan FlowLogInformation, 1) errChan := make(chan error, 1) @@ -962,8 +1232,10 @@ func (client WatchersClient) SetFlowLogConfiguration(resourceGroupName string, n var err error var result FlowLogInformation defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -996,7 +1268,7 @@ func (client WatchersClient) SetFlowLogConfigurationPreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1032,14 +1304,12 @@ func (client WatchersClient) SetFlowLogConfigurationResponder(resp *http.Respons return } -// VerifyIPFlow verify IP flow from the specified VM to a location given the -// currently configured NSG rules. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be +// VerifyIPFlow verify IP flow from the specified VM to a location given the currently configured NSG rules. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be // used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. networkWatcherName is -// the name of the network watcher. parameters is parameters that define the IP -// flow to be verified. +// resourceGroupName is the name of the resource group. networkWatcherName is the name of the network watcher. +// parameters is parameters that define the IP flow to be verified. func (client WatchersClient) VerifyIPFlow(resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters, cancel <-chan struct{}) (<-chan VerificationIPFlowResult, <-chan error) { resultChan := make(chan VerificationIPFlowResult, 1) errChan := make(chan error, 1) @@ -1060,8 +1330,10 @@ func (client WatchersClient) VerifyIPFlow(resourceGroupName string, networkWatch var err error var result VerificationIPFlowResult defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1094,7 +1366,7 @@ func (client WatchersClient) VerifyIPFlowPreparer(resourceGroupName string, netw "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2017-03-01" + const APIVersion = "2017-09-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/client.go index f02acec65..4cfed4767 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/client.go @@ -1,5 +1,4 @@ -// Package notificationhubs implements the Azure ARM Notificationhubs service -// API version 2017-04-01. +// Package notificationhubs implements the Azure ARM Notificationhubs service API version 2017-04-01. // // Azure NotificationHub client package notificationhubs @@ -18,9 +17,8 @@ package notificationhubs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/notificationhubsgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/group.go old mode 100755 new mode 100644 similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/notificationhubsgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/group.go index cbdd1c1f8..3645f5770 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/notificationhubsgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/group.go @@ -14,9 +14,8 @@ package notificationhubs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -40,11 +39,10 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckAvailability checks the availability of the given notificationHub in a -// namespace. +// CheckAvailability checks the availability of the given notificationHub in a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. parameters is the notificationHub name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. parameters is the +// notificationHub name. func (client GroupClient) CheckAvailability(resourceGroupName string, namespaceName string, parameters CheckAvailabilityParameters) (result CheckAvailabilityResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -118,9 +116,8 @@ func (client GroupClient) CheckAvailabilityResponder(resp *http.Response) (resul // CreateOrUpdate creates/Update a NotificationHub in a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. parameters -// is parameters supplied to the create/update a NotificationHub Resource. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. parameters is parameters supplied to the create/update a NotificationHub Resource. func (client GroupClient) CreateOrUpdate(resourceGroupName string, namespaceName string, notificationHubName string, parameters CreateOrUpdateParameters) (result ResourceType, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -192,13 +189,11 @@ func (client GroupClient) CreateOrUpdateResponder(resp *http.Response) (result R return } -// CreateOrUpdateAuthorizationRule creates/Updates an authorization rule for a -// NotificationHub +// CreateOrUpdateAuthorizationRule creates/Updates an authorization rule for a NotificationHub // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. -// authorizationRuleName is authorization Rule Name. parameters is the shared -// access authorization rule. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. authorizationRuleName is authorization Rule Name. parameters is the shared access +// authorization rule. func (client GroupClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -273,8 +268,8 @@ func (client GroupClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Re // Delete deletes a notification hub associated with a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. func (client GroupClient) Delete(resourceGroupName string, namespaceName string, notificationHubName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, namespaceName, notificationHubName) if err != nil { @@ -339,9 +334,8 @@ func (client GroupClient) DeleteResponder(resp *http.Response) (result autorest. // DeleteAuthorizationRule deletes a notificationHub authorization rule // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. -// authorizationRuleName is authorization Rule Name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. authorizationRuleName is authorization Rule Name. func (client GroupClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result autorest.Response, err error) { req, err := client.DeleteAuthorizationRulePreparer(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName) if err != nil { @@ -407,8 +401,8 @@ func (client GroupClient) DeleteAuthorizationRuleResponder(resp *http.Response) // Get lists the notification hubs associated with a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. func (client GroupClient) Get(resourceGroupName string, namespaceName string, notificationHubName string) (result ResourceType, err error) { req, err := client.GetPreparer(resourceGroupName, namespaceName, notificationHubName) if err != nil { @@ -472,12 +466,10 @@ func (client GroupClient) GetResponder(resp *http.Response) (result ResourceType return } -// GetAuthorizationRule gets an authorization rule for a NotificationHub by -// name. +// GetAuthorizationRule gets an authorization rule for a NotificationHub by name. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name notificationHubName is the notification hub name. -// authorizationRuleName is authorization rule name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name notificationHubName is the +// notification hub name. authorizationRuleName is authorization rule name. func (client GroupClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { req, err := client.GetAuthorizationRulePreparer(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName) if err != nil { @@ -542,11 +534,10 @@ func (client GroupClient) GetAuthorizationRuleResponder(resp *http.Response) (re return } -// GetPnsCredentials lists the PNS Credentials associated with a notification -// hub . +// GetPnsCredentials lists the PNS Credentials associated with a notification hub . // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. func (client GroupClient) GetPnsCredentials(resourceGroupName string, namespaceName string, notificationHubName string) (result PnsCredentialsResource, err error) { req, err := client.GetPnsCredentialsPreparer(resourceGroupName, namespaceName, notificationHubName) if err != nil { @@ -612,8 +603,7 @@ func (client GroupClient) GetPnsCredentialsResponder(resp *http.Response) (resul // List lists the notification hubs associated with a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. func (client GroupClient) List(resourceGroupName string, namespaceName string) (result ListResult, err error) { req, err := client.ListPreparer(resourceGroupName, namespaceName) if err != nil { @@ -700,10 +690,55 @@ func (client GroupClient) ListNextResults(lastResults ListResult) (result ListRe return } +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan ResourceType, <-chan error) { + resultChan := make(chan ResourceType) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAuthorizationRules gets the authorization rules for a NotificationHub. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name notificationHubName is the notification hub name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name notificationHubName is the +// notification hub name. func (client GroupClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, notificationHubName string) (result SharedAccessAuthorizationRuleListResult, err error) { req, err := client.ListAuthorizationRulesPreparer(resourceGroupName, namespaceName, notificationHubName) if err != nil { @@ -791,13 +826,56 @@ func (client GroupClient) ListAuthorizationRulesNextResults(lastResults SharedAc return } -// ListKeys gets the Primary and Secondary ConnectionStrings to the -// NotificationHub +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client GroupClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, notificationHubName string, cancel <-chan struct{}) (<-chan SharedAccessAuthorizationRuleResource, <-chan error) { + resultChan := make(chan SharedAccessAuthorizationRuleResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, notificationHubName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeys gets the Primary and Secondary ConnectionStrings to the NotificationHub // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. -// authorizationRuleName is the connection string of the NotificationHub for -// the specified authorizationRule. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. authorizationRuleName is the connection string of the NotificationHub for the specified +// authorizationRule. func (client GroupClient) ListKeys(resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result ResourceListKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName) if err != nil { @@ -862,14 +940,11 @@ func (client GroupClient) ListKeysResponder(resp *http.Response) (result Resourc return } -// RegenerateKeys regenerates the Primary/Secondary Keys to the NotificationHub -// Authorization Rule +// RegenerateKeys regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. notificationHubName is the notification hub name. -// authorizationRuleName is the connection string of the NotificationHub for -// the specified authorizationRule. parameters is parameters supplied to -// regenerate the NotificationHub Authorization Rule Key. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. notificationHubName is the +// notification hub name. authorizationRuleName is the connection string of the NotificationHub for the specified +// authorizationRule. parameters is parameters supplied to regenerate the NotificationHub Authorization Rule Key. func (client GroupClient) RegenerateKeys(resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters PolicykeyResource) (result ResourceListKeys, err error) { req, err := client.RegenerateKeysPreparer(resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/hubs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/hubs.go new file mode 100644 index 000000000..5400b9ad1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/hubs.go @@ -0,0 +1,114 @@ +package notificationhubs + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// HubsClient is the azure NotificationHub client +type HubsClient struct { + ManagementClient +} + +// NewHubsClient creates an instance of the HubsClient client. +func NewHubsClient(subscriptionID string) HubsClient { + return NewHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewHubsClientWithBaseURI creates an instance of the HubsClient client. +func NewHubsClientWithBaseURI(baseURI string, subscriptionID string) HubsClient { + return HubsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckAvailability checks the availability of the given notificationHub in a namespace. +// +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. parameters is the +// notificationHub name. +func (client HubsClient) CheckAvailability(resourceGroupName string, namespaceName string, parameters CheckNameAvailabilityRequestParameters) (result CheckNameAvailabilityResponse, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "notificationhubs.HubsClient", "CheckAvailability") + } + + req, err := client.CheckAvailabilityPreparer(resourceGroupName, namespaceName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "notificationhubs.HubsClient", "CheckAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "notificationhubs.HubsClient", "CheckAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "notificationhubs.HubsClient", "CheckAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckAvailabilityPreparer prepares the CheckAvailability request. +func (client HubsClient) CheckAvailabilityPreparer(resourceGroupName string, namespaceName string, parameters CheckNameAvailabilityRequestParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkHubAvailability", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CheckAvailabilitySender sends the CheckAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client HubsClient) CheckAvailabilitySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CheckAvailabilityResponder handles the response to the CheckAvailability request. The method always +// closes the http.Response Body. +func (client HubsClient) CheckAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/models.go index bca8ddd1f..d7d5672fc 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/models.go @@ -14,9 +14,8 @@ package notificationhubs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -93,16 +92,15 @@ type BaiduCredential struct { *BaiduCredentialProperties `json:"properties,omitempty"` } -// BaiduCredentialProperties is description of a NotificationHub -// BaiduCredential. +// BaiduCredentialProperties is description of a NotificationHub BaiduCredential. type BaiduCredentialProperties struct { BaiduAPIKey *string `json:"baiduApiKey,omitempty"` BaiduEndPoint *string `json:"baiduEndPoint,omitempty"` BaiduSecretKey *string `json:"baiduSecretKey,omitempty"` } -// CheckAvailabilityParameters is parameters supplied to the Check Name -// Availability for Namespace and NotificationHubs. +// CheckAvailabilityParameters is parameters supplied to the Check Name Availability for Namespace and +// NotificationHubs. type CheckAvailabilityParameters struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -125,8 +123,22 @@ type CheckAvailabilityResult struct { IsAvailiable *bool `json:"isAvailiable,omitempty"` } -// CreateOrUpdateParameters is parameters supplied to the CreateOrUpdate -// NotificationHub operation. +// CheckNameAvailabilityRequestParameters is parameters supplied to the Check Name Availability for Namespace and +// NotificationHubs. +type CheckNameAvailabilityRequestParameters struct { + Name *string `json:"Name,omitempty"` + Type *string `json:"Type,omitempty"` +} + +// CheckNameAvailabilityResponse is +type CheckNameAvailabilityResponse struct { + autorest.Response `json:"-"` + NameAvailable *bool `json:"NameAvailable,omitempty"` + Reason *string `json:"Reason,omitempty"` + Message *string `json:"Message,omitempty"` +} + +// CreateOrUpdateParameters is parameters supplied to the CreateOrUpdate NotificationHub operation. type CreateOrUpdateParameters struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -179,8 +191,7 @@ type MpnsCredentialProperties struct { Thumbprint *string `json:"thumbprint,omitempty"` } -// NamespaceCreateOrUpdateParameters is parameters supplied to the -// CreateOrUpdate Namespace operation. +// NamespaceCreateOrUpdateParameters is parameters supplied to the CreateOrUpdate Namespace operation. type NamespaceCreateOrUpdateParameters struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -210,8 +221,7 @@ func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// NamespacePatchParameters is parameters supplied to the Patch Namespace -// operation. +// NamespacePatchParameters is parameters supplied to the Patch Namespace operation. type NamespacePatchParameters struct { Tags *map[string]*string `json:"tags,omitempty"` Sku *Sku `json:"sku,omitempty"` @@ -244,8 +254,7 @@ type NamespaceResource struct { *NamespaceProperties `json:"properties,omitempty"` } -// PnsCredentialsProperties is description of a NotificationHub PNS -// Credentials. +// PnsCredentialsProperties is description of a NotificationHub PNS Credentials. type PnsCredentialsProperties struct { ApnsCredential *ApnsCredential `json:"apnsCredential,omitempty"` WnsCredential *WnsCredential `json:"wnsCredential,omitempty"` @@ -317,8 +326,8 @@ type ResourceType struct { *Properties `json:"properties,omitempty"` } -// SharedAccessAuthorizationRuleCreateOrUpdateParameters is parameters supplied -// to the CreateOrUpdate Namespace AuthorizationRules. +// SharedAccessAuthorizationRuleCreateOrUpdateParameters is parameters supplied to the CreateOrUpdate Namespace +// AuthorizationRules. type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -329,8 +338,7 @@ type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct { Properties *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` } -// SharedAccessAuthorizationRuleListResult is the response of the List -// Namespace operation. +// SharedAccessAuthorizationRuleListResult is the response of the List Namespace operation. type SharedAccessAuthorizationRuleListResult struct { autorest.Response `json:"-"` Value *[]SharedAccessAuthorizationRuleResource `json:"value,omitempty"` @@ -349,14 +357,12 @@ func (client SharedAccessAuthorizationRuleListResult) SharedAccessAuthorizationR autorest.WithBaseURL(to.String(client.NextLink))) } -// SharedAccessAuthorizationRuleProperties is sharedAccessAuthorizationRule -// properties. +// SharedAccessAuthorizationRuleProperties is sharedAccessAuthorizationRule properties. type SharedAccessAuthorizationRuleProperties struct { Rights *[]AccessRights `json:"rights,omitempty"` } -// SharedAccessAuthorizationRuleResource is description of a Namespace -// AuthorizationRules. +// SharedAccessAuthorizationRuleResource is description of a Namespace AuthorizationRules. type SharedAccessAuthorizationRuleResource struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/name.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/name.go new file mode 100644 index 000000000..3cf818ef0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/name.go @@ -0,0 +1,112 @@ +package notificationhubs + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// NameClient is the azure NotificationHub client +type NameClient struct { + ManagementClient +} + +// NewNameClient creates an instance of the NameClient client. +func NewNameClient(subscriptionID string) NameClient { + return NewNameClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewNameClientWithBaseURI creates an instance of the NameClient client. +func NewNameClientWithBaseURI(baseURI string, subscriptionID string) NameClient { + return NameClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckAvailability checks the availability of the given service namespace across all Azure subscriptions. This is +// useful because the domain name is created based on the service namespace name. +// +// parameters is the namespace name. +func (client NameClient) CheckAvailability(parameters CheckNameAvailabilityRequestParameters) (result CheckNameAvailabilityResponse, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "notificationhubs.NameClient", "CheckAvailability") + } + + req, err := client.CheckAvailabilityPreparer(parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "notificationhubs.NameClient", "CheckAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "notificationhubs.NameClient", "CheckAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "notificationhubs.NameClient", "CheckAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckAvailabilityPreparer prepares the CheckAvailability request. +func (client NameClient) CheckAvailabilityPreparer(parameters CheckNameAvailabilityRequestParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNameAvailability", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CheckAvailabilitySender sends the CheckAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client NameClient) CheckAvailabilitySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CheckAvailabilityResponder handles the response to the CheckAvailability request. The method always +// closes the http.Response Body. +func (client NameClient) CheckAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/namespaces.go index ff473d09f..0af0c272e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/namespaces.go @@ -14,9 +14,8 @@ package notificationhubs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,15 +34,13 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient -// client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckAvailability checks the availability of the given service namespace -// across all Azure subscriptions. This is useful because the domain name is -// created based on the service namespace name. +// CheckAvailability checks the availability of the given service namespace across all Azure subscriptions. This is +// useful because the domain name is created based on the service namespace name. // // parameters is the namespace name. func (client NamespacesClient) CheckAvailability(parameters CheckAvailabilityParameters) (result CheckAvailabilityResult, err error) { @@ -115,12 +112,11 @@ func (client NamespacesClient) CheckAvailabilityResponder(resp *http.Response) ( return } -// CreateOrUpdate creates/Updates a service namespace. Once created, this -// namespace's resource manifest is immutable. This operation is idempotent. +// CreateOrUpdate creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. +// This operation is idempotent. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. parameters is parameters supplied to create a Namespace -// Resource. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. parameters is parameters +// supplied to create a Namespace Resource. func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters) (result NamespaceResource, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, namespaceName, parameters) if err != nil { @@ -185,12 +181,10 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// CreateOrUpdateAuthorizationRule creates an authorization rule for a -// namespace +// CreateOrUpdateAuthorizationRule creates an authorization rule for a namespace // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is aauthorization Rule Name. -// parameters is the shared access authorization rule. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. authorizationRuleName is +// aauthorization Rule Name. parameters is the shared access authorization rule. func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -262,14 +256,11 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht return } -// Delete deletes an existing namespace. This operation also removes all -// associated notificationHubs under the namespace. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes an existing namespace. This operation also removes all associated notificationHubs under the +// namespace. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. func (client NamespacesClient) Delete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -277,8 +268,10 @@ func (client NamespacesClient) Delete(resourceGroupName string, namespaceName st var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -346,8 +339,8 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto // DeleteAuthorizationRule deletes a namespace authorization rule // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is authorization Rule Name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. authorizationRuleName is +// authorization Rule Name. func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) { req, err := client.DeleteAuthorizationRulePreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -412,8 +405,7 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo // Get returns the description for the specified namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result NamespaceResource, err error) { req, err := client.GetPreparer(resourceGroupName, namespaceName) if err != nil { @@ -478,8 +470,8 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa // GetAuthorizationRule gets an authorization rule for a namespace by name. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name authorizationRuleName is authorization rule name. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name authorizationRuleName is +// authorization rule name. func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { req, err := client.GetAuthorizationRulePreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -545,8 +537,8 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response // List lists the available namespaces within a resourceGroup. // -// resourceGroupName is the name of the resource group. If resourceGroupName -// value is null the method lists all the namespaces within subscription +// resourceGroupName is the name of the resource group. If resourceGroupName value is null the method lists all the +// namespaces within subscription func (client NamespacesClient) List(resourceGroupName string) (result NamespaceListResult, err error) { req, err := client.ListPreparer(resourceGroupName) if err != nil { @@ -632,8 +624,52 @@ func (client NamespacesClient) ListNextResults(lastResults NamespaceListResult) return } -// ListAll lists all the available namespaces within the subscription -// irrespective of the resourceGroups. +// ListComplete gets all elements from the list without paging. +func (client NamespacesClient) ListComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan NamespaceResource, <-chan error) { + resultChan := make(chan NamespaceResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAll lists all the available namespaces within the subscription irrespective of the resourceGroups. func (client NamespacesClient) ListAll() (result NamespaceListResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -718,10 +754,54 @@ func (client NamespacesClient) ListAllNextResults(lastResults NamespaceListResul return } +// ListAllComplete gets all elements from the list without paging. +func (client NamespacesClient) ListAllComplete(cancel <-chan struct{}) (<-chan NamespaceResource, <-chan error) { + resultChan := make(chan NamespaceResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAuthorizationRules gets the authorization rules for a namespace. // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name +// resourceGroupName is the name of the resource group. namespaceName is the namespace name func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result SharedAccessAuthorizationRuleListResult, err error) { req, err := client.ListAuthorizationRulesPreparer(resourceGroupName, namespaceName) if err != nil { @@ -808,11 +888,55 @@ func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults Sha return } +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client NamespacesClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan SharedAccessAuthorizationRuleResource, <-chan error) { + resultChan := make(chan SharedAccessAuthorizationRuleResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListKeys gets the Primary and Secondary ConnectionStrings to the namespace // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is the connection string of the -// namespace for the specified authorizationRule. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. authorizationRuleName is +// the connection string of the namespace for the specified authorizationRule. func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result ResourceListKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, namespaceName, authorizationRuleName) if err != nil { @@ -878,9 +1002,8 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Re // Patch patches the existing namespace // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. parameters is parameters supplied to patch a Namespace -// Resource. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. parameters is parameters +// supplied to patch a Namespace Resource. func (client NamespacesClient) Patch(resourceGroupName string, namespaceName string, parameters NamespacePatchParameters) (result NamespaceResource, err error) { req, err := client.PatchPreparer(resourceGroupName, namespaceName, parameters) if err != nil { @@ -945,13 +1068,11 @@ func (client NamespacesClient) PatchResponder(resp *http.Response) (result Names return } -// RegenerateKeys regenerates the Primary/Secondary Keys to the Namespace -// Authorization Rule +// RegenerateKeys regenerates the Primary/Secondary Keys to the Namespace Authorization Rule // -// resourceGroupName is the name of the resource group. namespaceName is the -// namespace name. authorizationRuleName is the connection string of the -// namespace for the specified authorizationRule. parameters is parameters -// supplied to regenerate the Namespace Authorization Rule Key. +// resourceGroupName is the name of the resource group. namespaceName is the namespace name. authorizationRuleName is +// the connection string of the namespace for the specified authorizationRule. parameters is parameters supplied to +// regenerate the Namespace Authorization Rule Key. func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters PolicykeyResource) (result ResourceListKeys, err error) { req, err := client.RegenerateKeysPreparer(resourceGroupName, namespaceName, authorizationRuleName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go index 813b99e1f..dea290b95 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/notificationhubs/version.go @@ -14,15 +14,15 @@ package notificationhubs // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-notificationhubs/2017-04-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-notificationhubs/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/client.go index a42ac00b4..7fc00380f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/client.go @@ -1,7 +1,6 @@ -// Package operationalinsights implements the Azure ARM Operationalinsights -// service API version 2015-11-01-preview. +// Package operationalinsights implements the Azure ARM Operationalinsights service API version . // -// Azure Log Analytics API reference +// Operational Insights Client package operationalinsights // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package operationalinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/datasources.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/datasources.go index 0a0653d0f..5b3ad40bb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/datasources.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/datasources.go @@ -14,9 +14,8 @@ package operationalinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// DataSourcesClient is the azure Log Analytics API reference +// DataSourcesClient is the operational Insights Client type DataSourcesClient struct { ManagementClient } @@ -35,19 +34,16 @@ func NewDataSourcesClient(subscriptionID string) DataSourcesClient { return NewDataSourcesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDataSourcesClientWithBaseURI creates an instance of the DataSourcesClient -// client. +// NewDataSourcesClientWithBaseURI creates an instance of the DataSourcesClient client. func NewDataSourcesClientWithBaseURI(baseURI string, subscriptionID string) DataSourcesClient { return DataSourcesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a data source. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace that will -// contain the datasource dataSourceName is the name of the datasource -// resource. parameters is the parameters required to create or update a -// datasource. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace that will contain the datasource dataSourceName is the name of the datasource resource. +// parameters is the parameters required to create or update a datasource. func (client DataSourcesClient) CreateOrUpdate(resourceGroupName string, workspaceName string, dataSourceName string, parameters DataSource) (result DataSource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -125,9 +121,8 @@ func (client DataSourcesClient) CreateOrUpdateResponder(resp *http.Response) (re // Delete deletes a data source instance. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace that -// contains the datasource. dataSourceName is name of the datasource. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace that contains the datasource. dataSourceName is name of the datasource. func (client DataSourcesClient) Delete(resourceGroupName string, workspaceName string, dataSourceName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -200,9 +195,8 @@ func (client DataSourcesClient) DeleteResponder(resp *http.Response) (result aut // Get gets a datasource instance. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace that -// contains the datasource. dataSourceName is name of the datasource +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace that contains the datasource. dataSourceName is name of the datasource func (client DataSourcesClient) Get(resourceGroupName string, workspaceName string, dataSourceName string) (result DataSource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -274,13 +268,11 @@ func (client DataSourcesClient) GetResponder(resp *http.Response) (result DataSo return } -// ListByWorkspace gets the first page of data source instances in a workspace -// with the link to the next page. +// ListByWorkspace gets the first page of data source instances in a workspace with the link to the next page. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is the workspace that contains the data sources. -// filter is the filter to apply on the operation. skiptoken is starting point -// of the collection of data source instances. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is the +// workspace that contains the data sources. filter is the filter to apply on the operation. skiptoken is starting +// point of the collection of data source instances. func (client DataSourcesClient) ListByWorkspace(resourceGroupName string, workspaceName string, filter string, skiptoken string) (result DataSourceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -378,3 +370,48 @@ func (client DataSourcesClient) ListByWorkspaceNextResults(lastResults DataSourc return } + +// ListByWorkspaceComplete gets all elements from the list without paging. +func (client DataSourcesClient) ListByWorkspaceComplete(resourceGroupName string, workspaceName string, filter string, skiptoken string, cancel <-chan struct{}) (<-chan DataSource, <-chan error) { + resultChan := make(chan DataSource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByWorkspace(resourceGroupName, workspaceName, filter, skiptoken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByWorkspaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/linkedservices.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/linkedservices.go index c7ef67562..0493090e9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/linkedservices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/linkedservices.go @@ -14,9 +14,8 @@ package operationalinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,30 +24,26 @@ import ( "net/http" ) -// LinkedServicesClient is the azure Log Analytics API reference +// LinkedServicesClient is the operational Insights Client type LinkedServicesClient struct { ManagementClient } -// NewLinkedServicesClient creates an instance of the LinkedServicesClient -// client. +// NewLinkedServicesClient creates an instance of the LinkedServicesClient client. func NewLinkedServicesClient(subscriptionID string) LinkedServicesClient { return NewLinkedServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewLinkedServicesClientWithBaseURI creates an instance of the -// LinkedServicesClient client. +// NewLinkedServicesClientWithBaseURI creates an instance of the LinkedServicesClient client. func NewLinkedServicesClientWithBaseURI(baseURI string, subscriptionID string) LinkedServicesClient { return LinkedServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a linked service. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace that will -// contain the linkedServices resource linkedServiceName is name of the -// linkedServices resource parameters is the parameters required to create or -// update a linked service. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace that will contain the linkedServices resource linkedServiceName is name of the +// linkedServices resource parameters is the parameters required to create or update a linked service. func (client LinkedServicesClient) CreateOrUpdate(resourceGroupName string, workspaceName string, linkedServiceName string, parameters LinkedService) (result LinkedService, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -127,9 +122,8 @@ func (client LinkedServicesClient) CreateOrUpdateResponder(resp *http.Response) // Delete deletes a linked service instance. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace that -// contains the linkedServices resource linkedServiceName is name of the linked +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace that contains the linkedServices resource linkedServiceName is name of the linked // service. func (client LinkedServicesClient) Delete(resourceGroupName string, workspaceName string, linkedServiceName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ @@ -203,9 +197,8 @@ func (client LinkedServicesClient) DeleteResponder(resp *http.Response) (result // Get gets a linked service instance. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace that -// contains the linkedServices resource linkedServiceName is name of the linked +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace that contains the linkedServices resource linkedServiceName is name of the linked // service. func (client LinkedServicesClient) Get(resourceGroupName string, workspaceName string, linkedServiceName string) (result LinkedService, err error) { if err := validation.Validate([]validation.Validation{ @@ -280,9 +273,8 @@ func (client LinkedServicesClient) GetResponder(resp *http.Response) (result Lin // ListByWorkspace gets the linked services instances in a workspace. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace that -// contains the linked services. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace that contains the linked services. func (client LinkedServicesClient) ListByWorkspace(resourceGroupName string, workspaceName string) (result LinkedServiceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/models.go index b4057b90c..e3ef9782e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/models.go @@ -14,9 +14,8 @@ package operationalinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,46 +28,35 @@ import ( type DataSourceKind string const ( - // AzureActivityLog specifies the azure activity log state for data source - // kind. + // AzureActivityLog specifies the azure activity log state for data source kind. AzureActivityLog DataSourceKind = "AzureActivityLog" - // ChangeTrackingCustomRegistry specifies the change tracking custom - // registry state for data source kind. + // ChangeTrackingCustomRegistry specifies the change tracking custom registry state for data source kind. ChangeTrackingCustomRegistry DataSourceKind = "ChangeTrackingCustomRegistry" - // ChangeTrackingDefaultPath specifies the change tracking default path - // state for data source kind. + // ChangeTrackingDefaultPath specifies the change tracking default path state for data source kind. ChangeTrackingDefaultPath DataSourceKind = "ChangeTrackingDefaultPath" - // ChangeTrackingDefaultRegistry specifies the change tracking default - // registry state for data source kind. + // ChangeTrackingDefaultRegistry specifies the change tracking default registry state for data source kind. ChangeTrackingDefaultRegistry DataSourceKind = "ChangeTrackingDefaultRegistry" - // ChangeTrackingPath specifies the change tracking path state for data - // source kind. + // ChangeTrackingPath specifies the change tracking path state for data source kind. ChangeTrackingPath DataSourceKind = "ChangeTrackingPath" // CustomLog specifies the custom log state for data source kind. CustomLog DataSourceKind = "CustomLog" - // CustomLogCollection specifies the custom log collection state for data - // source kind. + // CustomLogCollection specifies the custom log collection state for data source kind. CustomLogCollection DataSourceKind = "CustomLogCollection" - // GenericDataSource specifies the generic data source state for data - // source kind. + // GenericDataSource specifies the generic data source state for data source kind. GenericDataSource DataSourceKind = "GenericDataSource" // IISLogs specifies the iis logs state for data source kind. IISLogs DataSourceKind = "IISLogs" - // LinuxPerformanceCollection specifies the linux performance collection - // state for data source kind. + // LinuxPerformanceCollection specifies the linux performance collection state for data source kind. LinuxPerformanceCollection DataSourceKind = "LinuxPerformanceCollection" - // LinuxPerformanceObject specifies the linux performance object state for - // data source kind. + // LinuxPerformanceObject specifies the linux performance object state for data source kind. LinuxPerformanceObject DataSourceKind = "LinuxPerformanceObject" // LinuxSyslog specifies the linux syslog state for data source kind. LinuxSyslog DataSourceKind = "LinuxSyslog" - // LinuxSyslogCollection specifies the linux syslog collection state for - // data source kind. + // LinuxSyslogCollection specifies the linux syslog collection state for data source kind. LinuxSyslogCollection DataSourceKind = "LinuxSyslogCollection" // WindowsEvent specifies the windows event state for data source kind. WindowsEvent DataSourceKind = "WindowsEvent" - // WindowsPerformanceCounter specifies the windows performance counter - // state for data source kind. + // WindowsPerformanceCounter specifies the windows performance counter state for data source kind. WindowsPerformanceCounter DataSourceKind = "WindowsPerformanceCounter" ) @@ -84,13 +72,22 @@ const ( Deleting EntityStatus = "Deleting" // Failed specifies the failed state for entity status. Failed EntityStatus = "Failed" - // ProvisioningAccount specifies the provisioning account state for entity - // status. + // ProvisioningAccount specifies the provisioning account state for entity status. ProvisioningAccount EntityStatus = "ProvisioningAccount" // Succeeded specifies the succeeded state for entity status. Succeeded EntityStatus = "Succeeded" ) +// SearchSortEnum enumerates the values for search sort enum. +type SearchSortEnum string + +const ( + // Asc specifies the asc state for search sort enum. + Asc SearchSortEnum = "asc" + // Desc specifies the desc state for search sort enum. + Desc SearchSortEnum = "desc" +) + // SkuNameEnum enumerates the values for sku name enum. type SkuNameEnum string @@ -109,6 +106,22 @@ const ( Unlimited SkuNameEnum = "Unlimited" ) +// StorageInsightState enumerates the values for storage insight state. +type StorageInsightState string + +const ( + // ERROR specifies the error state for storage insight state. + ERROR StorageInsightState = "ERROR" + // OK specifies the ok state for storage insight state. + OK StorageInsightState = "OK" +) + +// CoreSummary is the core summary of a search. +type CoreSummary struct { + Status *string `json:"Status,omitempty"` + NumberOfDocuments *int64 `json:"NumberOfDocuments,omitempty"` +} + // DataSource is datasources under OMS Workspace. type DataSource struct { autorest.Response `json:"-"` @@ -121,14 +134,12 @@ type DataSource struct { Kind DataSourceKind `json:"kind,omitempty"` } -// DataSourceFilter is dataSource filter. Right now, only filter by kind is -// supported. +// DataSourceFilter is dataSource filter. Right now, only filter by kind is supported. type DataSourceFilter struct { Kind DataSourceKind `json:"kind,omitempty"` } -// DataSourceListResult is the list data source by workspace operation -// response. +// DataSourceListResult is the list data source by workspace operation response. type DataSourceListResult struct { autorest.Response `json:"-"` Value *[]DataSource `json:"value,omitempty"` @@ -147,8 +158,7 @@ func (client DataSourceListResult) DataSourceListResultPreparer() (*http.Request autorest.WithBaseURL(to.String(client.NextLink))) } -// IntelligencePack is intelligence Pack containing a string name and boolean -// indicating if it's enabled. +// IntelligencePack is intelligence Pack containing a string name and boolean indicating if it's enabled. type IntelligencePack struct { Name *string `json:"name,omitempty"` Enabled *bool `json:"enabled,omitempty"` @@ -175,12 +185,26 @@ type LinkedServiceProperties struct { ResourceID *string `json:"resourceId,omitempty"` } +// LinkTarget is metadata for a workspace that isn't linked to an Azure subscription. +type LinkTarget struct { + CustomerID *string `json:"customerId,omitempty"` + DisplayName *string `json:"accountName,omitempty"` + WorkspaceName *string `json:"workspaceName,omitempty"` + Location *string `json:"location,omitempty"` +} + // ListIntelligencePack is type ListIntelligencePack struct { autorest.Response `json:"-"` Value *[]IntelligencePack `json:"value,omitempty"` } +// ListLinkTarget is +type ListLinkTarget struct { + autorest.Response `json:"-"` + Value *[]LinkTarget `json:"value,omitempty"` +} + // ManagementGroup is a management group that is connected to a workspace type ManagementGroup struct { *ManagementGroupProperties `json:"properties,omitempty"` @@ -221,6 +245,111 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } +// SavedSearch is value object for saved search results. +type SavedSearch struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Etag *string `json:"etag,omitempty"` + *SavedSearchProperties `json:"properties,omitempty"` +} + +// SavedSearchesListResult is the saved search operation response. +type SavedSearchesListResult struct { + autorest.Response `json:"-"` + Metadata *SearchMetadata `json:"__metadata,omitempty"` + Value *[]SavedSearch `json:"value,omitempty"` +} + +// SavedSearchProperties is value object for saved search results. +type SavedSearchProperties struct { + Category *string `json:"Category,omitempty"` + DisplayName *string `json:"DisplayName,omitempty"` + Query *string `json:"Query,omitempty"` + Version *int64 `json:"Version,omitempty"` + Tags *[]Tag `json:"Tags,omitempty"` +} + +// SearchError is details for a search error. +type SearchError struct { + Type *string `json:"type,omitempty"` + Message *string `json:"message,omitempty"` +} + +// SearchGetSchemaResponse is the get schema operation response. +type SearchGetSchemaResponse struct { + autorest.Response `json:"-"` + Metadata *SearchMetadata `json:"__metadata,omitempty"` + Value *[]SearchSchemaValue `json:"value,omitempty"` +} + +// SearchHighlight is highlight details. +type SearchHighlight struct { + Pre *string `json:"pre,omitempty"` + Post *string `json:"post,omitempty"` +} + +// SearchMetadata is metadata for search results. +type SearchMetadata struct { + SearchID *string `json:"RequestId,omitempty"` + ResultType *string `json:"resultType,omitempty"` + Total *int64 `json:"total,omitempty"` + Top *int64 `json:"top,omitempty"` + ID *string `json:"id,omitempty"` + CoreSummaries *[]CoreSummary `json:"CoreSummaries,omitempty"` + Status *string `json:"Status,omitempty"` + StartTime *date.Time `json:"StartTime,omitempty"` + LastUpdated *date.Time `json:"LastUpdated,omitempty"` + ETag *string `json:"ETag,omitempty"` + Sort *[]SearchSort `json:"sort,omitempty"` + RequestTime *int64 `json:"requestTime,omitempty"` + AggregatedValueField *string `json:"aggregatedValueField,omitempty"` + AggregatedGroupingFields *string `json:"aggregatedGroupingFields,omitempty"` + Sum *int64 `json:"sum,omitempty"` + Max *int64 `json:"max,omitempty"` + Schema *SearchMetadataSchema `json:"schema,omitempty"` +} + +// SearchMetadataSchema is schema metadata for search. +type SearchMetadataSchema struct { + Name *string `json:"name,omitempty"` + Version *int32 `json:"version,omitempty"` +} + +// SearchParameters is parameters specifying the search query and range. +type SearchParameters struct { + Top *int64 `json:"top,omitempty"` + Highlight *SearchHighlight `json:"highlight,omitempty"` + Query *string `json:"query,omitempty"` + Start *date.Time `json:"start,omitempty"` + End *date.Time `json:"end,omitempty"` +} + +// SearchResultsResponse is the get search result operation response. +type SearchResultsResponse struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Metadata *SearchMetadata `json:"__metadata,omitempty"` + Value *[]map[string]interface{} `json:"value,omitempty"` + Error *SearchError `json:"error,omitempty"` +} + +// SearchSchemaValue is value object for schema results. +type SearchSchemaValue struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + Type *string `json:"type,omitempty"` + Indexed *bool `json:"indexed,omitempty"` + Stored *bool `json:"stored,omitempty"` + Facet *bool `json:"facet,omitempty"` + OwnerType *[]string `json:"ownerType,omitempty"` +} + +// SearchSort is the sort parameters for search. +type SearchSort struct { + Name *string `json:"name,omitempty"` + Order SearchSortEnum `json:"order,omitempty"` +} + // SharedKeys is the shared keys for a workspace. type SharedKeys struct { autorest.Response `json:"-"` @@ -233,6 +362,62 @@ type Sku struct { Name SkuNameEnum `json:"name,omitempty"` } +// StorageAccount is describes a storage account connection. +type StorageAccount struct { + ID *string `json:"id,omitempty"` + Key *string `json:"key,omitempty"` +} + +// StorageInsight is the top level storage insight resource container. +type StorageInsight struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *StorageInsightProperties `json:"properties,omitempty"` + ETag *string `json:"eTag,omitempty"` +} + +// StorageInsightListResult is the list storage insights operation response. +type StorageInsightListResult struct { + autorest.Response `json:"-"` + Value *[]StorageInsight `json:"value,omitempty"` + OdataNextLink *string `json:"@odata.nextLink,omitempty"` +} + +// StorageInsightListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client StorageInsightListResult) StorageInsightListResultPreparer() (*http.Request, error) { + if client.OdataNextLink == nil || len(to.String(client.OdataNextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.OdataNextLink))) +} + +// StorageInsightProperties is storage insight properties. +type StorageInsightProperties struct { + Containers *[]string `json:"containers,omitempty"` + Tables *[]string `json:"tables,omitempty"` + StorageAccount *StorageAccount `json:"storageAccount,omitempty"` + Status *StorageInsightStatus `json:"status,omitempty"` +} + +// StorageInsightStatus is the status of the storage insight. +type StorageInsightStatus struct { + State StorageInsightState `json:"state,omitempty"` + Description *string `json:"description,omitempty"` +} + +// Tag is a tag of a saved search. +type Tag struct { + Name *string `json:"Name,omitempty"` + Value *string `json:"Value,omitempty"` +} + // UsageMetric is a metric describing the usage of a resource. type UsageMetric struct { Name *MetricName `json:"name,omitempty"` @@ -255,8 +440,7 @@ type Workspace struct { ETag *string `json:"eTag,omitempty"` } -// WorkspaceListManagementGroupsResult is the list workspace managmement groups -// operation response. +// WorkspaceListManagementGroupsResult is the list workspace managmement groups operation response. type WorkspaceListManagementGroupsResult struct { autorest.Response `json:"-"` Value *[]ManagementGroup `json:"value,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/savedsearches.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/savedsearches.go new file mode 100644 index 000000000..ea6cc997b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/savedsearches.go @@ -0,0 +1,426 @@ +package operationalinsights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// SavedSearchesClient is the operational Insights Client +type SavedSearchesClient struct { + ManagementClient +} + +// NewSavedSearchesClient creates an instance of the SavedSearchesClient client. +func NewSavedSearchesClient(subscriptionID string) SavedSearchesClient { + return NewSavedSearchesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSavedSearchesClientWithBaseURI creates an instance of the SavedSearchesClient client. +func NewSavedSearchesClientWithBaseURI(baseURI string, subscriptionID string) SavedSearchesClient { + return SavedSearchesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a saved search for a given workspace. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name savedSearchName is the id of the saved search. parameters is the parameters required to +// save a search. +func (client SavedSearchesClient) CreateOrUpdate(resourceGroupName string, workspaceName string, savedSearchName string, parameters SavedSearch) (result SavedSearch, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.SavedSearchProperties", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.SavedSearchProperties.Category", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.SavedSearchProperties.DisplayName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.SavedSearchProperties.Query", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.SavedSearchProperties.Version", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.SavedSearchProperties.Version", Name: validation.InclusiveMaximum, Rule: 1, Chain: nil}, + {Target: "parameters.SavedSearchProperties.Version", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.SavedSearchesClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, workspaceName, savedSearchName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SavedSearchesClient) CreateOrUpdatePreparer(resourceGroupName string, workspaceName string, savedSearchName string, parameters SavedSearch) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "savedSearchName": autorest.Encode("path", savedSearchName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SavedSearchesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SavedSearchesClient) CreateOrUpdateResponder(resp *http.Response) (result SavedSearch, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the specified saved search in a given workspace. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name savedSearchName is name of the saved search. +func (client SavedSearchesClient) Delete(resourceGroupName string, workspaceName string, savedSearchName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.SavedSearchesClient", "Delete") + } + + req, err := client.DeletePreparer(resourceGroupName, workspaceName, savedSearchName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SavedSearchesClient) DeletePreparer(resourceGroupName string, workspaceName string, savedSearchName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "savedSearchName": autorest.Encode("path", savedSearchName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SavedSearchesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SavedSearchesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the specified saved search for a given workspace. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name savedSearchName is the id of the saved search. +func (client SavedSearchesClient) Get(resourceGroupName string, workspaceName string, savedSearchName string) (result SavedSearch, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.SavedSearchesClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, workspaceName, savedSearchName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SavedSearchesClient) GetPreparer(resourceGroupName string, workspaceName string, savedSearchName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "savedSearchName": autorest.Encode("path", savedSearchName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SavedSearchesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SavedSearchesClient) GetResponder(resp *http.Response) (result SavedSearch, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetResults gets the results from a saved search for a given workspace. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name savedSearchName is the name of the saved search. +func (client SavedSearchesClient) GetResults(resourceGroupName string, workspaceName string, savedSearchName string) (result SearchResultsResponse, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.SavedSearchesClient", "GetResults") + } + + req, err := client.GetResultsPreparer(resourceGroupName, workspaceName, savedSearchName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "GetResults", nil, "Failure preparing request") + return + } + + resp, err := client.GetResultsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "GetResults", resp, "Failure sending request") + return + } + + result, err = client.GetResultsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "GetResults", resp, "Failure responding to request") + } + + return +} + +// GetResultsPreparer prepares the GetResults request. +func (client SavedSearchesClient) GetResultsPreparer(resourceGroupName string, workspaceName string, savedSearchName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "savedSearchName": autorest.Encode("path", savedSearchName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchName}/results", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetResultsSender sends the GetResults request. The method will close the +// http.Response Body if it receives an error. +func (client SavedSearchesClient) GetResultsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResultsResponder handles the response to the GetResults request. The method always +// closes the http.Response Body. +func (client SavedSearchesClient) GetResultsResponder(resp *http.Response) (result SearchResultsResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace gets the saved searches for a given Log Analytics Workspace +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name +func (client SavedSearchesClient) ListByWorkspace(resourceGroupName string, workspaceName string) (result SavedSearchesListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.SavedSearchesClient", "ListByWorkspace") + } + + req, err := client.ListByWorkspacePreparer(resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.SavedSearchesClient", "ListByWorkspace", resp, "Failure responding to request") + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client SavedSearchesClient) ListByWorkspacePreparer(resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client SavedSearchesClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client SavedSearchesClient) ListByWorkspaceResponder(resp *http.Response) (result SavedSearchesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/storageinsights.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/storageinsights.go new file mode 100644 index 000000000..048608014 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/storageinsights.go @@ -0,0 +1,419 @@ +package operationalinsights + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// StorageInsightsClient is the operational Insights Client +type StorageInsightsClient struct { + ManagementClient +} + +// NewStorageInsightsClient creates an instance of the StorageInsightsClient client. +func NewStorageInsightsClient(subscriptionID string) StorageInsightsClient { + return NewStorageInsightsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewStorageInsightsClientWithBaseURI creates an instance of the StorageInsightsClient client. +func NewStorageInsightsClientWithBaseURI(baseURI string, subscriptionID string) StorageInsightsClient { + return StorageInsightsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate create or update a storage insight. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics Workspace name that will contain the storageInsightsConfigs resource storageInsightName is name of the +// storageInsightsConfigs resource parameters is the parameters required to create or update a storage insight. +func (client StorageInsightsClient) CreateOrUpdate(resourceGroupName string, workspaceName string, storageInsightName string, parameters StorageInsight) (result StorageInsight, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.StorageInsightProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.StorageInsightProperties.StorageAccount", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.StorageInsightProperties.StorageAccount.ID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.StorageInsightProperties.StorageAccount.Key", Name: validation.Null, Rule: true, Chain: nil}, + }}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.StorageInsightsClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, workspaceName, storageInsightName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client StorageInsightsClient) CreateOrUpdatePreparer(resourceGroupName string, workspaceName string, storageInsightName string, parameters StorageInsight) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "storageInsightName": autorest.Encode("path", storageInsightName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client StorageInsightsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client StorageInsightsClient) CreateOrUpdateResponder(resp *http.Response) (result StorageInsight, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a storageInsightsConfigs resource +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics Workspace name that contains the storageInsightsConfigs resource storageInsightName is name of the +// storageInsightsConfigs resource +func (client StorageInsightsClient) Delete(resourceGroupName string, workspaceName string, storageInsightName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.StorageInsightsClient", "Delete") + } + + req, err := client.DeletePreparer(resourceGroupName, workspaceName, storageInsightName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client StorageInsightsClient) DeletePreparer(resourceGroupName string, workspaceName string, storageInsightName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "storageInsightName": autorest.Encode("path", storageInsightName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client StorageInsightsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client StorageInsightsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a storage insight instance. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics Workspace name that contains the storageInsightsConfigs resource storageInsightName is name of the +// storageInsightsConfigs resource +func (client StorageInsightsClient) Get(resourceGroupName string, workspaceName string, storageInsightName string) (result StorageInsight, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.StorageInsightsClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, workspaceName, storageInsightName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client StorageInsightsClient) GetPreparer(resourceGroupName string, workspaceName string, storageInsightName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "storageInsightName": autorest.Encode("path", storageInsightName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client StorageInsightsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client StorageInsightsClient) GetResponder(resp *http.Response) (result StorageInsight, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspace lists the storage insight instances within a workspace +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics Workspace name that will contain the storageInsightsConfigs resource +func (client StorageInsightsClient) ListByWorkspace(resourceGroupName string, workspaceName string) (result StorageInsightListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.StorageInsightsClient", "ListByWorkspace") + } + + req, err := client.ListByWorkspacePreparer(resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "ListByWorkspace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "ListByWorkspace", resp, "Failure sending request") + return + } + + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "ListByWorkspace", resp, "Failure responding to request") + } + + return +} + +// ListByWorkspacePreparer prepares the ListByWorkspace request. +func (client StorageInsightsClient) ListByWorkspacePreparer(resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByWorkspaceSender sends the ListByWorkspace request. The method will close the +// http.Response Body if it receives an error. +func (client StorageInsightsClient) ListByWorkspaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByWorkspaceResponder handles the response to the ListByWorkspace request. The method always +// closes the http.Response Body. +func (client StorageInsightsClient) ListByWorkspaceResponder(resp *http.Response) (result StorageInsightListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByWorkspaceNextResults retrieves the next set of results, if any. +func (client StorageInsightsClient) ListByWorkspaceNextResults(lastResults StorageInsightListResult) (result StorageInsightListResult, err error) { + req, err := lastResults.StorageInsightListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "ListByWorkspace", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByWorkspaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "ListByWorkspace", resp, "Failure sending next results request") + } + + result, err = client.ListByWorkspaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.StorageInsightsClient", "ListByWorkspace", resp, "Failure responding to next results request") + } + + return +} + +// ListByWorkspaceComplete gets all elements from the list without paging. +func (client StorageInsightsClient) ListByWorkspaceComplete(resourceGroupName string, workspaceName string, cancel <-chan struct{}) (<-chan StorageInsight, <-chan error) { + resultChan := make(chan StorageInsight) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByWorkspace(resourceGroupName, workspaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.OdataNextLink != nil { + list, err = client.ListByWorkspaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/version.go index 503cc1280..cce635f1b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/version.go @@ -14,15 +14,15 @@ package operationalinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.2.0-beta arm-operationalinsights/2015-11-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-operationalinsights/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.2.0-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/workspaces.go index be4d9c1f7..f67542e8e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/workspaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationalinsights/workspaces.go @@ -14,9 +14,8 @@ package operationalinsights // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// WorkspacesClient is the azure Log Analytics API reference +// WorkspacesClient is the operational Insights Client type WorkspacesClient struct { ManagementClient } @@ -35,20 +34,16 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient -// client. +// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) WorkspacesClient { return WorkspacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or update a workspace. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate create or update a workspace. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name of the workspace. workspaceName -// is the name of the workspace. parameters is the parameters required to -// create or update a workspace. +// resourceGroupName is the resource group name of the workspace. workspaceName is the name of the workspace. +// parameters is the parameters required to create or update a workspace. func (client WorkspacesClient) CreateOrUpdate(resourceGroupName string, workspaceName string, parameters Workspace, cancel <-chan struct{}) (<-chan Workspace, <-chan error) { resultChan := make(chan Workspace, 1) errChan := make(chan error, 1) @@ -74,8 +69,10 @@ func (client WorkspacesClient) CreateOrUpdate(resourceGroupName string, workspac var err error var result Workspace defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -146,8 +143,7 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res // Delete deletes a workspace instance. // -// resourceGroupName is the resource group name of the workspace. workspaceName -// is name of the Log Analytics Workspace. +// resourceGroupName is the resource group name of the workspace. workspaceName is name of the Log Analytics Workspace. func (client WorkspacesClient) Delete(resourceGroupName string, workspaceName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, workspaceName) if err != nil { @@ -211,9 +207,8 @@ func (client WorkspacesClient) DeleteResponder(resp *http.Response) (result auto // DisableIntelligencePack disables an intelligence pack for a given workspace. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace. -// intelligencePackName is the name of the intelligence pack to be disabled. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace. intelligencePackName is the name of the intelligence pack to be disabled. func (client WorkspacesClient) DisableIntelligencePack(resourceGroupName string, workspaceName string, intelligencePackName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -286,9 +281,8 @@ func (client WorkspacesClient) DisableIntelligencePackResponder(resp *http.Respo // EnableIntelligencePack enables an intelligence pack for a given workspace. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace. -// intelligencePackName is the name of the intelligence pack to be enabled. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace. intelligencePackName is the name of the intelligence pack to be enabled. func (client WorkspacesClient) EnableIntelligencePack(resourceGroupName string, workspaceName string, intelligencePackName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -361,8 +355,7 @@ func (client WorkspacesClient) EnableIntelligencePackResponder(resp *http.Respon // Get gets a workspace instance. // -// resourceGroupName is the resource group name of the workspace. workspaceName -// is name of the Log Analytics Workspace. +// resourceGroupName is the resource group name of the workspace. workspaceName is name of the Log Analytics Workspace. func (client WorkspacesClient) Get(resourceGroupName string, workspaceName string) (result Workspace, err error) { req, err := client.GetPreparer(resourceGroupName, workspaceName) if err != nil { @@ -425,10 +418,183 @@ func (client WorkspacesClient) GetResponder(resp *http.Response) (result Workspa return } +// GetSchema gets the schema for a given workspace. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name +func (client WorkspacesClient) GetSchema(resourceGroupName string, workspaceName string) (result SearchGetSchemaResponse, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.WorkspacesClient", "GetSchema") + } + + req, err := client.GetSchemaPreparer(resourceGroupName, workspaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "GetSchema", nil, "Failure preparing request") + return + } + + resp, err := client.GetSchemaSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "GetSchema", resp, "Failure sending request") + return + } + + result, err = client.GetSchemaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "GetSchema", resp, "Failure responding to request") + } + + return +} + +// GetSchemaPreparer prepares the GetSchema request. +func (client WorkspacesClient) GetSchemaPreparer(resourceGroupName string, workspaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSchemaSender sends the GetSchema request. The method will close the +// http.Response Body if it receives an error. +func (client WorkspacesClient) GetSchemaSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetSchemaResponder handles the response to the GetSchema request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) GetSchemaResponder(resp *http.Response) (result SearchGetSchemaResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSearchResults submit a search for a given workspace. The response will contain an id to track the search. User +// can use the id to poll the search status and get the full search result later if the search takes long time to +// finish. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name parameters is the parameters required to execute a search query. +func (client WorkspacesClient) GetSearchResults(resourceGroupName string, workspaceName string, parameters SearchParameters, cancel <-chan struct{}) (<-chan SearchResultsResponse, <-chan error) { + resultChan := make(chan SearchResultsResponse, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Query", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "operationalinsights.WorkspacesClient", "GetSearchResults") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result SearchResultsResponse + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.GetSearchResultsPreparer(resourceGroupName, workspaceName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "GetSearchResults", nil, "Failure preparing request") + return + } + + resp, err := client.GetSearchResultsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "GetSearchResults", resp, "Failure sending request") + return + } + + result, err = client.GetSearchResultsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "GetSearchResults", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// GetSearchResultsPreparer prepares the GetSearchResults request. +func (client WorkspacesClient) GetSearchResultsPreparer(resourceGroupName string, workspaceName string, parameters SearchParameters, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// GetSearchResultsSender sends the GetSearchResults request. The method will close the +// http.Response Body if it receives an error. +func (client WorkspacesClient) GetSearchResultsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// GetSearchResultsResponder handles the response to the GetSearchResults request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) GetSearchResultsResponder(resp *http.Response) (result SearchResultsResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetSharedKeys gets the shared keys for a workspace. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace. func (client WorkspacesClient) GetSharedKeys(resourceGroupName string, workspaceName string) (result SharedKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -562,8 +728,7 @@ func (client WorkspacesClient) ListResponder(resp *http.Response) (result Worksp // ListByResourceGroup gets workspaces in a resource group. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. func (client WorkspacesClient) ListByResourceGroup(resourceGroupName string) (result WorkspaceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -633,11 +798,11 @@ func (client WorkspacesClient) ListByResourceGroupResponder(resp *http.Response) return } -// ListIntelligencePacks lists all the intelligence packs possible and whether -// they are enabled or disabled for a given workspace. +// ListIntelligencePacks lists all the intelligence packs possible and whether they are enabled or disabled for a given +// workspace. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is name of the Log Analytics Workspace. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is name of +// the Log Analytics Workspace. func (client WorkspacesClient) ListIntelligencePacks(resourceGroupName string, workspaceName string) (result ListIntelligencePack, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -708,11 +873,72 @@ func (client WorkspacesClient) ListIntelligencePacksResponder(resp *http.Respons return } -// ListManagementGroups gets a list of management groups connected to a -// workspace. +// ListLinkTargets get a list of workspaces which the current user has administrator privileges and are not associated +// with an Azure Subscription. The subscriptionId parameter in the Url is ignored. +func (client WorkspacesClient) ListLinkTargets() (result ListLinkTarget, err error) { + req, err := client.ListLinkTargetsPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "ListLinkTargets", nil, "Failure preparing request") + return + } + + resp, err := client.ListLinkTargetsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "ListLinkTargets", resp, "Failure sending request") + return + } + + result, err = client.ListLinkTargetsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "ListLinkTargets", resp, "Failure responding to request") + } + + return +} + +// ListLinkTargetsPreparer prepares the ListLinkTargets request. +func (client WorkspacesClient) ListLinkTargetsPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/linkTargets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListLinkTargetsSender sends the ListLinkTargets request. The method will close the +// http.Response Body if it receives an error. +func (client WorkspacesClient) ListLinkTargetsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListLinkTargetsResponder handles the response to the ListLinkTargets request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) ListLinkTargetsResponder(resp *http.Response) (result ListLinkTarget, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListManagementGroups gets a list of management groups connected to a workspace. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is the name of the workspace. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is the name +// of the workspace. func (client WorkspacesClient) ListManagementGroups(resourceGroupName string, workspaceName string) (result WorkspaceListManagementGroupsResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -785,8 +1011,8 @@ func (client WorkspacesClient) ListManagementGroupsResponder(resp *http.Response // ListUsages gets a list of usage metrics for a workspace. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. workspaceName is the name of the workspace. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is the name +// of the workspace. func (client WorkspacesClient) ListUsages(resourceGroupName string, workspaceName string) (result WorkspaceListUsagesResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -856,3 +1082,79 @@ func (client WorkspacesClient) ListUsagesResponder(resp *http.Response) (result result.Response = autorest.Response{Response: resp} return } + +// UpdateSearchResults gets updated search results for a given search query. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. workspaceName is log +// Analytics workspace name ID is the id of the search that will have results updated. You can get the id from the +// response of the GetResults call. +func (client WorkspacesClient) UpdateSearchResults(resourceGroupName string, workspaceName string, ID string) (result SearchResultsResponse, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationalinsights.WorkspacesClient", "UpdateSearchResults") + } + + req, err := client.UpdateSearchResultsPreparer(resourceGroupName, workspaceName, ID) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "UpdateSearchResults", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSearchResultsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "UpdateSearchResults", resp, "Failure sending request") + return + } + + result, err = client.UpdateSearchResultsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "UpdateSearchResults", resp, "Failure responding to request") + } + + return +} + +// UpdateSearchResultsPreparer prepares the UpdateSearchResults request. +func (client WorkspacesClient) UpdateSearchResultsPreparer(resourceGroupName string, workspaceName string, ID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "workspaceName": autorest.Encode("path", workspaceName), + } + + const APIVersion = "2015-03-20" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/search/{id}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSearchResultsSender sends the UpdateSearchResults request. The method will close the +// http.Response Body if it receives an error. +func (client WorkspacesClient) UpdateSearchResultsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateSearchResultsResponder handles the response to the UpdateSearchResults request. The method always +// closes the http.Response Body. +func (client WorkspacesClient) UpdateSearchResultsResponder(resp *http.Response) (result SearchResultsResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/client.go new file mode 100644 index 000000000..97cb03153 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/client.go @@ -0,0 +1,53 @@ +// Package operationsmanagement implements the Azure ARM Operationsmanagement service API version 2015-11-01-preview. +// +// Operations Management Client +package operationsmanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Operationsmanagement + DefaultBaseURI = "https://management.azure.com" +) + +// ManagementClient is the base client for Operationsmanagement. +type ManagementClient struct { + autorest.Client + BaseURI string + SubscriptionID string + SolutionName string +} + +// New creates an instance of the ManagementClient client. +func New(subscriptionID string, solutionName string) ManagementClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID, solutionName) +} + +// NewWithBaseURI creates an instance of the ManagementClient client. +func NewWithBaseURI(baseURI string, subscriptionID string, solutionName string) ManagementClient { + return ManagementClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + SolutionName: solutionName, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/models.go new file mode 100644 index 000000000..2e6b1a44a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/models.go @@ -0,0 +1,85 @@ +package operationsmanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +// CodeMessageError is the error body contract. +type CodeMessageError struct { + Error *CodeMessageErrorError `json:"error,omitempty"` +} + +// CodeMessageErrorError is the error details for a failed request. +type CodeMessageErrorError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// Operation is supported operation of OperationsManagement resource provider. +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` +} + +// OperationDisplay is display metadata associated with the operation. +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` +} + +// OperationListResult is result of the request to list solution operations. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` +} + +// Solution is the container for solution. +type Solution struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Plan *SolutionPlan `json:"plan,omitempty"` + Properties *SolutionProperties `json:"properties,omitempty"` +} + +// SolutionPlan is plan for solution object supported by the OperationsManagement resource provider. +type SolutionPlan struct { + Name *string `json:"name,omitempty"` + Publisher *string `json:"publisher,omitempty"` + PromotionCode *string `json:"promotionCode,omitempty"` + Product *string `json:"product,omitempty"` +} + +// SolutionProperties is solution properties supported by the OperationsManagement resource provider. +type SolutionProperties struct { + WorkspaceResourceID *string `json:"workspaceResourceId,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + ContainedResources *[]string `json:"containedResources,omitempty"` + ReferencedResources *[]string `json:"referencedResources,omitempty"` +} + +// SolutionPropertiesList is the list of solution response +type SolutionPropertiesList struct { + autorest.Response `json:"-"` + Value *[]Solution `json:"value,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/operations.go new file mode 100644 index 000000000..6697e3e27 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/operations.go @@ -0,0 +1,96 @@ +package operationsmanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the operations Management Client +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string, solutionName string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, solutionName) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, solutionName string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, solutionName)} +} + +// List lists all of the available OperationsManagement Rest API operations. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationsmanagement.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2015-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.OperationsManagement/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/solutions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/solutions.go new file mode 100644 index 000000000..0af741f1f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/solutions.go @@ -0,0 +1,397 @@ +package operationsmanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// SolutionsClient is the operations Management Client +type SolutionsClient struct { + ManagementClient +} + +// NewSolutionsClient creates an instance of the SolutionsClient client. +func NewSolutionsClient(subscriptionID string, solutionName string) SolutionsClient { + return NewSolutionsClientWithBaseURI(DefaultBaseURI, subscriptionID, solutionName) +} + +// NewSolutionsClientWithBaseURI creates an instance of the SolutionsClient client. +func NewSolutionsClientWithBaseURI(baseURI string, subscriptionID string, solutionName string) SolutionsClient { + return SolutionsClient{NewWithBaseURI(baseURI, subscriptionID, solutionName)} +} + +// CreateOrUpdate creates or updates the Solution. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. parameters is the +// parameters required to create OMS Solution. +func (client SolutionsClient) CreateOrUpdate(resourceGroupName string, parameters Solution) (result Solution, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Properties.WorkspaceResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationsmanagement.SolutionsClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SolutionsClient) CreateOrUpdatePreparer(resourceGroupName string, parameters Solution) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", client.SolutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SolutionsClient) CreateOrUpdateResponder(resp *http.Response) (result Solution, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the solution in the subscription. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. +func (client SolutionsClient) Delete(resourceGroupName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationsmanagement.SolutionsClient", "Delete") + } + + req, err := client.DeletePreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client SolutionsClient) DeletePreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", client.SolutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SolutionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the user solution. +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. +func (client SolutionsClient) Get(resourceGroupName string) (result Solution, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationsmanagement.SolutionsClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SolutionsClient) GetPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "solutionName": autorest.Encode("path", client.SolutionName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions/{solutionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SolutionsClient) GetResponder(resp *http.Response) (result Solution, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup retrieves the solution list. It will retrieve both first party and third party solutions +// +// resourceGroupName is the name of the resource group to get. The name is case insensitive. +func (client SolutionsClient) ListByResourceGroup(resourceGroupName string) (result SolutionPropertiesList, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "operationsmanagement.SolutionsClient", "ListByResourceGroup") + } + + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client SolutionsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationsManagement/solutions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client SolutionsClient) ListByResourceGroupResponder(resp *http.Response) (result SolutionPropertiesList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription retrieves the solution list. It will retrieve both first party and third party solutions +func (client SolutionsClient) ListBySubscription() (result SolutionPropertiesList, err error) { + req, err := client.ListBySubscriptionPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client SolutionsClient) ListBySubscriptionPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-11-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.OperationsManagement/solutions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client SolutionsClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client SolutionsClient) ListBySubscriptionResponder(resp *http.Response) (result SolutionPropertiesList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/version.go new file mode 100644 index 000000000..1d8cb8033 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/operationsmanagement/version.go @@ -0,0 +1,28 @@ +package operationsmanagement + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/v11.0.0-beta arm-operationsmanagement/2015-11-01-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return "v11.0.0-beta" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/client.go index 68fd46c93..5cdc9318f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/client.go @@ -18,7 +18,7 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/configurations.go index f088d19ff..168e0ebc1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/configurations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/configurations.go @@ -14,7 +14,7 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/databases.go index 610c4f265..6f8bcb196 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/databases.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/databases.go @@ -14,7 +14,7 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/firewallrules.go index e5f5d6c52..88cf63e23 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/firewallrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/firewallrules.go @@ -14,7 +14,7 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/logfiles.go index 50db7f555..6959aad09 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/logfiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/logfiles.go @@ -14,7 +14,7 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/models.go index dae190e4e..1901c3c56 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/models.go @@ -14,24 +14,23 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "encoding/json" "errors" - "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" ) -// CreateMode enumerates the mode to create a new server +// CreateMode enumerates the values for create mode. type CreateMode string const ( - // CreateModeDefault specifies the mode to create a new server + // CreateModeDefault specifies the create mode default state for create mode. CreateModeDefault CreateMode = "Default" - // CreateModePointInTimeRestore specifies the mode to create a new server + // CreateModePointInTimeRestore specifies the create mode point in time restore state for create mode. CreateModePointInTimeRestore CreateMode = "PointInTimeRestore" ) @@ -229,15 +228,16 @@ type ServerForCreate struct { Tags *map[string]*string `json:"tags,omitempty"` } -// UnmarshalJSON is the custom unmarshaler for ServerForCreate model -func (sfc *ServerForCreate) UnmarshalJSON(b []byte) error { +// UnmarshalJSON is the custom unmarshaler for ServerForCreate struct. +func (sfc *ServerForCreate) UnmarshalJSON(body []byte) error { var m map[string]*json.RawMessage - err := json.Unmarshal(b, &m) + err := json.Unmarshal(body, &m) if err != nil { return err } + var v *json.RawMessage - v := m["sku"] + v = m["sku"] if v != nil { var sku Sku err = json.Unmarshal(*m["sku"], &sku) @@ -249,11 +249,11 @@ func (sfc *ServerForCreate) UnmarshalJSON(b []byte) error { v = m["properties"] if v != nil { - p, err := unmarshalServerPropertiesForCreate(*m["properties"]) + properties, err := unmarshalServerPropertiesForCreate(*m["properties"]) if err != nil { return err } - sfc.Properties = p + sfc.Properties = properties } v = m["location"] @@ -279,27 +279,6 @@ func (sfc *ServerForCreate) UnmarshalJSON(b []byte) error { return nil } -func unmarshalServerPropertiesForCreate(b []byte) (ServerPropertiesForCreate, error) { - var m map[string]interface{} - err := json.Unmarshal(b, &m) - if err != nil { - return nil, err - } - - switch m["createMode"] { - case string(CreateModeDefault): - var spfdc ServerPropertiesForDefaultCreate - err := json.Unmarshal(b, &spfdc) - return spfdc, err - case string(CreateModePointInTimeRestore): - var spfr ServerPropertiesForRestore - err := json.Unmarshal(b, &spfr) - return spfr, err - default: - return nil, errors.New("Unsupported type") - } -} - // ServerListResult is a list of servers. type ServerListResult struct { autorest.Response `json:"-"` @@ -316,23 +295,62 @@ type ServerProperties struct { FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` } -// ServerPropertiesForCreate is interface used for polymorphic Properties in ServerForCreate +// ServerPropertiesForCreate is the properties used to create a new server. type ServerPropertiesForCreate interface { AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) } +func unmarshalServerPropertiesForCreate(body []byte) (ServerPropertiesForCreate, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["createMode"] { + case string(CreateModeDefault): + var spfdc ServerPropertiesForDefaultCreate + err := json.Unmarshal(body, &spfdc) + return spfdc, err + case string(CreateModePointInTimeRestore): + var spfr ServerPropertiesForRestore + err := json.Unmarshal(body, &spfr) + return spfr, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalServerPropertiesForCreateArray(body []byte) ([]ServerPropertiesForCreate, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + spfcArray := make([]ServerPropertiesForCreate, len(rawMessages)) + + for index, rawMessage := range rawMessages { + spfc, err := unmarshalServerPropertiesForCreate(*rawMessage) + if err != nil { + return nil, err + } + spfcArray[index] = spfc + } + return spfcArray, nil +} + // ServerPropertiesForDefaultCreate is the properties used to create a new server. type ServerPropertiesForDefaultCreate struct { - CreateMode CreateMode `json:"createMode,omitempty"` StorageMB *int64 `json:"storageMB,omitempty"` Version ServerVersion `json:"version,omitempty"` SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + CreateMode CreateMode `json:"createMode,omitempty"` AdministratorLogin *string `json:"administratorLogin,omitempty"` AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` } -// MarshalJSON is the custom marshaler for ServerPropertiesForDefaultCreate +// MarshalJSON is the custom marshaler for ServerPropertiesForDefaultCreate. func (spfdc ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { spfdc.CreateMode = CreateModeDefault type Alias ServerPropertiesForDefaultCreate @@ -343,27 +361,27 @@ func (spfdc ServerPropertiesForDefaultCreate) MarshalJSON() ([]byte, error) { }) } -// AsServerPropertiesForDefaultCreate is the IServerPropertiesForCreate for ServerPropertiesForDefaultCreate +// AsServerPropertiesForDefaultCreate is the ServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { return &spfdc, true } -// AsServerPropertiesForRestore is the IServerPropertiesForCreate for ServerPropertiesForDefaultCreate +// AsServerPropertiesForRestore is the ServerPropertiesForCreate implementation for ServerPropertiesForDefaultCreate. func (spfdc ServerPropertiesForDefaultCreate) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { return nil, false } // ServerPropertiesForRestore is the properties to a new server by restoring from a backup. type ServerPropertiesForRestore struct { - CreateMode CreateMode `json:"createMode,omitempty"` StorageMB *int64 `json:"storageMB,omitempty"` Version ServerVersion `json:"version,omitempty"` SslEnforcement SslEnforcementEnum `json:"sslEnforcement,omitempty"` + CreateMode CreateMode `json:"createMode,omitempty"` SourceServerID *string `json:"sourceServerId,omitempty"` RestorePointInTime *date.Time `json:"restorePointInTime,omitempty"` } -// MarshalJSON is the custom marshaler for ServerPropertiesForRestore +// MarshalJSON is the custom marshaler for ServerPropertiesForRestore. func (spfr ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { spfr.CreateMode = CreateModePointInTimeRestore type Alias ServerPropertiesForRestore @@ -374,14 +392,14 @@ func (spfr ServerPropertiesForRestore) MarshalJSON() ([]byte, error) { }) } -// AsServerPropertiesForDefaultCreate is the IServerPropertiesForCreate for ServerPropertiesForRestore +// AsServerPropertiesForDefaultCreate is the ServerPropertiesForCreate implementation for ServerPropertiesForRestore. func (spfr ServerPropertiesForRestore) AsServerPropertiesForDefaultCreate() (*ServerPropertiesForDefaultCreate, bool) { return nil, false } -// AsServerPropertiesForRestore is the IServerPropertiesForCreate for ServerPropertiesForRestore +// AsServerPropertiesForRestore is the ServerPropertiesForCreate implementation for ServerPropertiesForRestore. func (spfr ServerPropertiesForRestore) AsServerPropertiesForRestore() (*ServerPropertiesForRestore, bool) { - return &spfr, false + return &spfr, true } // ServerUpdateParameters is parameters allowd to update for a server. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/operations.go index 18ce26ed1..003e5f50f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/operations.go @@ -14,7 +14,7 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/postgresql_test.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/postgresql_test.go index 168b4dfba..563ebe76f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/postgresql_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/postgresql_test.go @@ -1,5 +1,19 @@ package postgresql +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/json" "testing" @@ -23,9 +37,9 @@ var ( "capacity": 100 }, "properties": { - "createMode": "Default", "storageMB": 1024, "sslEnforcement": "Enabled", + "createMode": "Default", "administratorLogin": "cloudsa", "administratorLoginPassword": "password" }, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/servers.go index 7143cc0f8..43dbf1068 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/servers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/servers.go @@ -14,7 +14,7 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -40,14 +40,14 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a new server or updates an existing server. The update action will overwrite the existing -// server. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The -// channel will be used to cancel polling and any outstanding HTTP requests. +// Create creates a new server, or will overwrite an existing server. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // // resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the // Azure Resource Manager API or the portal. serverName is the name of the server. parameters is the required // parameters for creating or updating a server. -func (client ServersClient) CreateOrUpdate(resourceGroupName string, serverName string, parameters ServerForCreate, cancel <-chan struct{}) (<-chan Server, <-chan error) { +func (client ServersClient) Create(resourceGroupName string, serverName string, parameters ServerForCreate, cancel <-chan struct{}) (<-chan Server, <-chan error) { resultChan := make(chan Server, 1) errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ @@ -61,7 +61,7 @@ func (client ServersClient) CreateOrUpdate(resourceGroupName string, serverName Chain: []validation.Constraint{{Target: "parameters.Properties.StorageMB", Name: validation.InclusiveMinimum, Rule: 1024, Chain: nil}}}, }}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - errChan <- validation.NewErrorWithValidationError(err, "postgresql.ServersClient", "CreateOrUpdate") + errChan <- validation.NewErrorWithValidationError(err, "postgresql.ServersClient", "Create") close(errChan) close(resultChan) return resultChan, errChan @@ -78,29 +78,29 @@ func (client ServersClient) CreateOrUpdate(resourceGroupName string, serverName close(resultChan) close(errChan) }() - req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, parameters, cancel) + req, err := client.CreatePreparer(resourceGroupName, serverName, parameters, cancel) if err != nil { - err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "CreateOrUpdate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "Create", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateSender(req) + resp, err := client.CreateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "Create", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) + result, err = client.CreateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "CreateOrUpdate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "Create", resp, "Failure responding to request") } }() return resultChan, errChan } -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServersClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, parameters ServerForCreate, cancel <-chan struct{}) (*http.Request, error) { +// CreatePreparer prepares the Create request. +func (client ServersClient) CreatePreparer(resourceGroupName string, serverName string, parameters ServerForCreate, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), @@ -122,17 +122,17 @@ func (client ServersClient) CreateOrUpdatePreparer(resourceGroupName string, ser return preparer.Prepare(&http.Request{Cancel: cancel}) } -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// CreateSender sends the Create request. The method will close the // http.Response Body if it receives an error. -func (client ServersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { +func (client ServersClient) CreateSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req, azure.DoPollForAsynchronous(client.PollingDelay)) } -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// CreateResponder handles the response to the Create request. The method always // closes the http.Response Body. -func (client ServersClient) CreateOrUpdateResponder(resp *http.Response) (result Server, err error) { +func (client ServersClient) CreateResponder(resp *http.Response) (result Server, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go index 7bf070324..ad996f2e2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/postgresql/version.go @@ -14,15 +14,15 @@ package postgresql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-postgresql/2017-04-30-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-postgresql/2017-04-30-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/client.go index 25116e7e2..015b0260d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/client.go @@ -1,8 +1,6 @@ -// Package powerbiembedded implements the Azure ARM Powerbiembedded service API -// version 2016-01-29. +// Package powerbiembedded implements the Azure ARM Powerbiembedded service API version 2016-01-29. // -// Client to manage your Power BI Embedded workspace collections and retrieve -// workspaces. +// Client to manage your Power BI Embedded workspace collections and retrieve workspaces. package powerbiembedded // Copyright (c) Microsoft and contributors. All rights reserved. @@ -19,9 +17,8 @@ package powerbiembedded // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -55,8 +52,7 @@ func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { } } -// GetAvailableOperations indicates which operations can be performed by the -// Power BI Resource Provider. +// GetAvailableOperations indicates which operations can be performed by the Power BI Resource Provider. func (client ManagementClient) GetAvailableOperations() (result OperationList, err error) { req, err := client.GetAvailableOperationsPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/models.go index c89e648da..f47552c9b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/models.go @@ -14,9 +14,8 @@ package powerbiembedded // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go index 868428982..169020e04 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/version.go @@ -14,15 +14,15 @@ package powerbiembedded // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-powerbiembedded/2016-01-29" + return "Azure-SDK-For-Go/v11.0.0-beta arm-powerbiembedded/2016-01-29" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspacecollections.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspacecollections.go index 77a3c749b..614cbd54e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspacecollections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspacecollections.go @@ -14,9 +14,8 @@ package powerbiembedded // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,26 +24,23 @@ import ( "net/http" ) -// WorkspaceCollectionsClient is the client to manage your Power BI Embedded -// workspace collections and retrieve workspaces. +// WorkspaceCollectionsClient is the client to manage your Power BI Embedded workspace collections and retrieve +// workspaces. type WorkspaceCollectionsClient struct { ManagementClient } -// NewWorkspaceCollectionsClient creates an instance of the -// WorkspaceCollectionsClient client. +// NewWorkspaceCollectionsClient creates an instance of the WorkspaceCollectionsClient client. func NewWorkspaceCollectionsClient(subscriptionID string) WorkspaceCollectionsClient { return NewWorkspaceCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspaceCollectionsClientWithBaseURI creates an instance of the -// WorkspaceCollectionsClient client. +// NewWorkspaceCollectionsClientWithBaseURI creates an instance of the WorkspaceCollectionsClient client. func NewWorkspaceCollectionsClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceCollectionsClient { return WorkspaceCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailability verify the specified Power BI Workspace Collection -// name is valid and not already in use. +// CheckNameAvailability verify the specified Power BI Workspace Collection name is valid and not already in use. // // location is azure location body is check name availability request func (client WorkspaceCollectionsClient) CheckNameAvailability(location string, body CheckNameRequest) (result CheckNameResponse, err error) { @@ -110,14 +106,11 @@ func (client WorkspaceCollectionsClient) CheckNameAvailabilityResponder(resp *ht return } -// Create creates a new Power BI Workspace Collection with the specified -// properties. A Power BI Workspace Collection contains one or more workspaces, -// and can be used to provision keys that provide API access to those -// workspaces. +// Create creates a new Power BI Workspace Collection with the specified properties. A Power BI Workspace Collection +// contains one or more workspaces, and can be used to provision keys that provide API access to those workspaces. // -// resourceGroupName is azure resource group workspaceCollectionName is power -// BI Embedded Workspace Collection name body is create workspace collection -// request +// resourceGroupName is azure resource group workspaceCollectionName is power BI Embedded Workspace Collection name +// body is create workspace collection request func (client WorkspaceCollectionsClient) Create(resourceGroupName string, workspaceCollectionName string, body CreateWorkspaceCollectionRequest) (result WorkspaceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: body, @@ -191,13 +184,10 @@ func (client WorkspaceCollectionsClient) CreateResponder(resp *http.Response) (r return } -// Delete delete a Power BI Workspace Collection. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete delete a Power BI Workspace Collection. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is azure resource group workspaceCollectionName is power -// BI Embedded Workspace Collection name +// resourceGroupName is azure resource group workspaceCollectionName is power BI Embedded Workspace Collection name func (client WorkspaceCollectionsClient) Delete(resourceGroupName string, workspaceCollectionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -205,8 +195,10 @@ func (client WorkspaceCollectionsClient) Delete(resourceGroupName string, worksp var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -272,11 +264,9 @@ func (client WorkspaceCollectionsClient) DeleteResponder(resp *http.Response) (r return } -// GetAccessKeys retrieves the primary and secondary access keys for the -// specified Power BI Workspace Collection. +// GetAccessKeys retrieves the primary and secondary access keys for the specified Power BI Workspace Collection. // -// resourceGroupName is azure resource group workspaceCollectionName is power -// BI Embedded Workspace Collection name +// resourceGroupName is azure resource group workspaceCollectionName is power BI Embedded Workspace Collection name func (client WorkspaceCollectionsClient) GetAccessKeys(resourceGroupName string, workspaceCollectionName string) (result WorkspaceCollectionAccessKeys, err error) { req, err := client.GetAccessKeysPreparer(resourceGroupName, workspaceCollectionName) if err != nil { @@ -341,8 +331,7 @@ func (client WorkspaceCollectionsClient) GetAccessKeysResponder(resp *http.Respo // GetByName retrieves an existing Power BI Workspace Collection. // -// resourceGroupName is azure resource group workspaceCollectionName is power -// BI Embedded Workspace Collection name +// resourceGroupName is azure resource group workspaceCollectionName is power BI Embedded Workspace Collection name func (client WorkspaceCollectionsClient) GetByName(resourceGroupName string, workspaceCollectionName string) (result WorkspaceCollection, err error) { req, err := client.GetByNamePreparer(resourceGroupName, workspaceCollectionName) if err != nil { @@ -405,8 +394,7 @@ func (client WorkspaceCollectionsClient) GetByNameResponder(resp *http.Response) return } -// ListByResourceGroup retrieves all existing Power BI workspace collections in -// the specified resource group. +// ListByResourceGroup retrieves all existing Power BI workspace collections in the specified resource group. // // resourceGroupName is azure resource group func (client WorkspaceCollectionsClient) ListByResourceGroup(resourceGroupName string) (result WorkspaceCollectionList, err error) { @@ -470,8 +458,7 @@ func (client WorkspaceCollectionsClient) ListByResourceGroupResponder(resp *http return } -// ListBySubscription retrieves all existing Power BI workspace collections in -// the specified subscription. +// ListBySubscription retrieves all existing Power BI workspace collections in the specified subscription. func (client WorkspaceCollectionsClient) ListBySubscription() (result WorkspaceCollectionList, err error) { req, err := client.ListBySubscriptionPreparer() if err != nil { @@ -532,11 +519,9 @@ func (client WorkspaceCollectionsClient) ListBySubscriptionResponder(resp *http. return } -// Migrate migrates an existing Power BI Workspace Collection to a different -// resource group and/or subscription. +// Migrate migrates an existing Power BI Workspace Collection to a different resource group and/or subscription. // -// resourceGroupName is azure resource group body is workspace migration -// request +// resourceGroupName is azure resource group body is workspace migration request func (client WorkspaceCollectionsClient) Migrate(resourceGroupName string, body MigrateWorkspaceCollectionRequest) (result autorest.Response, err error) { req, err := client.MigratePreparer(resourceGroupName, body) if err != nil { @@ -599,11 +584,10 @@ func (client WorkspaceCollectionsClient) MigrateResponder(resp *http.Response) ( return } -// RegenerateKey regenerates the primary or secondary access key for the -// specified Power BI Workspace Collection. +// RegenerateKey regenerates the primary or secondary access key for the specified Power BI Workspace Collection. // -// resourceGroupName is azure resource group workspaceCollectionName is power -// BI Embedded Workspace Collection name body is access key to regenerate +// resourceGroupName is azure resource group workspaceCollectionName is power BI Embedded Workspace Collection name +// body is access key to regenerate func (client WorkspaceCollectionsClient) RegenerateKey(resourceGroupName string, workspaceCollectionName string, body WorkspaceCollectionAccessKey) (result WorkspaceCollectionAccessKeys, err error) { req, err := client.RegenerateKeyPreparer(resourceGroupName, workspaceCollectionName, body) if err != nil { @@ -668,12 +652,10 @@ func (client WorkspaceCollectionsClient) RegenerateKeyResponder(resp *http.Respo return } -// Update update an existing Power BI Workspace Collection with the specified -// properties. +// Update update an existing Power BI Workspace Collection with the specified properties. // -// resourceGroupName is azure resource group workspaceCollectionName is power -// BI Embedded Workspace Collection name body is update workspace collection -// request +// resourceGroupName is azure resource group workspaceCollectionName is power BI Embedded Workspace Collection name +// body is update workspace collection request func (client WorkspaceCollectionsClient) Update(resourceGroupName string, workspaceCollectionName string, body UpdateWorkspaceCollectionRequest) (result WorkspaceCollection, err error) { req, err := client.UpdatePreparer(resourceGroupName, workspaceCollectionName, body) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspaces.go index a34b282a6..44710ada7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/powerbiembedded/workspaces.go @@ -14,9 +14,8 @@ package powerbiembedded // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// WorkspacesClient is the client to manage your Power BI Embedded workspace -// collections and retrieve workspaces. +// WorkspacesClient is the client to manage your Power BI Embedded workspace collections and retrieve workspaces. type WorkspacesClient struct { ManagementClient } @@ -35,17 +33,14 @@ func NewWorkspacesClient(subscriptionID string) WorkspacesClient { return NewWorkspacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient -// client. +// NewWorkspacesClientWithBaseURI creates an instance of the WorkspacesClient client. func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) WorkspacesClient { return WorkspacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List retrieves all existing Power BI workspaces in the specified workspace -// collection. +// List retrieves all existing Power BI workspaces in the specified workspace collection. // -// resourceGroupName is azure resource group workspaceCollectionName is power -// BI Embedded Workspace Collection name +// resourceGroupName is azure resource group workspaceCollectionName is power BI Embedded Workspace Collection name func (client WorkspacesClient) List(resourceGroupName string, workspaceCollectionName string) (result WorkspaceList, err error) { req, err := client.ListPreparer(resourceGroupName, workspaceCollectionName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupstorageconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupstorageconfigs.go new file mode 100644 index 000000000..924bfe09b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupstorageconfigs.go @@ -0,0 +1,172 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// BackupStorageConfigsClient is the recovery Services Client +type BackupStorageConfigsClient struct { + ManagementClient +} + +// NewBackupStorageConfigsClient creates an instance of the BackupStorageConfigsClient client. +func NewBackupStorageConfigsClient(subscriptionID string) BackupStorageConfigsClient { + return NewBackupStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupStorageConfigsClientWithBaseURI creates an instance of the BackupStorageConfigsClient client. +func NewBackupStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) BackupStorageConfigsClient { + return BackupStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches resource storage config. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. +func (client BackupStorageConfigsClient) Get(resourceGroupName string, vaultName string) (result BackupStorageConfig, err error) { + req, err := client.GetPreparer(resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupStorageConfigsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.BackupStorageConfigsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupStorageConfigsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupStorageConfigsClient) GetPreparer(resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client BackupStorageConfigsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupStorageConfigsClient) GetResponder(resp *http.Response) (result BackupStorageConfig, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates vault storage model type. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. backupStorageConfig is backup storage config. +func (client BackupStorageConfigsClient) Update(resourceGroupName string, vaultName string, backupStorageConfig BackupStorageConfig) (result autorest.Response, err error) { + req, err := client.UpdatePreparer(resourceGroupName, vaultName, backupStorageConfig) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupStorageConfigsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "recoveryservices.BackupStorageConfigsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupStorageConfigsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BackupStorageConfigsClient) UpdatePreparer(resourceGroupName string, vaultName string, backupStorageConfig BackupStorageConfig) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig", pathParameters), + autorest.WithJSON(backupStorageConfig), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client BackupStorageConfigsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BackupStorageConfigsClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupvaultconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupvaultconfigs.go new file mode 100644 index 000000000..4d21a6628 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/backupvaultconfigs.go @@ -0,0 +1,173 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// BackupVaultConfigsClient is the recovery Services Client +type BackupVaultConfigsClient struct { + ManagementClient +} + +// NewBackupVaultConfigsClient creates an instance of the BackupVaultConfigsClient client. +func NewBackupVaultConfigsClient(subscriptionID string) BackupVaultConfigsClient { + return NewBackupVaultConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupVaultConfigsClientWithBaseURI creates an instance of the BackupVaultConfigsClient client. +func NewBackupVaultConfigsClientWithBaseURI(baseURI string, subscriptionID string) BackupVaultConfigsClient { + return BackupVaultConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get fetches vault config. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. +func (client BackupVaultConfigsClient) Get(resourceGroupName string, vaultName string) (result BackupVaultConfig, err error) { + req, err := client.GetPreparer(resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupVaultConfigsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.BackupVaultConfigsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupVaultConfigsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupVaultConfigsClient) GetPreparer(resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client BackupVaultConfigsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupVaultConfigsClient) GetResponder(resp *http.Response) (result BackupVaultConfig, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates vault config model type. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. backupVaultConfig is backup vault config. +func (client BackupVaultConfigsClient) Update(resourceGroupName string, vaultName string, backupVaultConfig BackupVaultConfig) (result BackupVaultConfig, err error) { + req, err := client.UpdatePreparer(resourceGroupName, vaultName, backupVaultConfig) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupVaultConfigsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.BackupVaultConfigsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.BackupVaultConfigsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client BackupVaultConfigsClient) UpdatePreparer(resourceGroupName string, vaultName string, backupVaultConfig BackupVaultConfig) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-12-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupconfig/vaultconfig", pathParameters), + autorest.WithJSON(backupVaultConfig), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client BackupVaultConfigsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client BackupVaultConfigsClient) UpdateResponder(resp *http.Response) (result BackupVaultConfig, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/client.go index 98b156452..7461bc138 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/client.go @@ -1,7 +1,6 @@ -// Package recoveryservices implements the Azure ARM Recoveryservices service -// API version 2016-06-01. -// +// Package recoveryservices implements the Azure ARM Recoveryservices service API version . // +// Recovery Services Client package recoveryservices // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package recoveryservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/models.go index 0117b9bf7..8504a45b2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/models.go @@ -14,17 +14,46 @@ package recoveryservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "net/http" ) +// AuthType enumerates the values for auth type. +type AuthType string + +const ( + // AAD specifies the aad state for auth type. + AAD AuthType = "AAD" + // AccessControlService specifies the access control service state for auth type. + AccessControlService AuthType = "AccessControlService" + // ACS specifies the acs state for auth type. + ACS AuthType = "ACS" + // AzureActiveDirectory specifies the azure active directory state for auth type. + AzureActiveDirectory AuthType = "AzureActiveDirectory" + // Invalid specifies the invalid state for auth type. + Invalid AuthType = "Invalid" +) + +// EnhancedSecurityState enumerates the values for enhanced security state. +type EnhancedSecurityState string + +const ( + // EnhancedSecurityStateDisabled specifies the enhanced security state disabled state for enhanced security state. + EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" + // EnhancedSecurityStateEnabled specifies the enhanced security state enabled state for enhanced security state. + EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" + // EnhancedSecurityStateInvalid specifies the enhanced security state invalid state for enhanced security state. + EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" +) + // SkuName enumerates the values for sku name. type SkuName string @@ -35,6 +64,42 @@ const ( Standard SkuName = "Standard" ) +// StorageModelType enumerates the values for storage model type. +type StorageModelType string + +const ( + // StorageModelTypeGeoRedundant specifies the storage model type geo redundant state for storage model type. + StorageModelTypeGeoRedundant StorageModelType = "GeoRedundant" + // StorageModelTypeInvalid specifies the storage model type invalid state for storage model type. + StorageModelTypeInvalid StorageModelType = "Invalid" + // StorageModelTypeLocallyRedundant specifies the storage model type locally redundant state for storage model type. + StorageModelTypeLocallyRedundant StorageModelType = "LocallyRedundant" +) + +// StorageType enumerates the values for storage type. +type StorageType string + +const ( + // StorageTypeGeoRedundant specifies the storage type geo redundant state for storage type. + StorageTypeGeoRedundant StorageType = "GeoRedundant" + // StorageTypeInvalid specifies the storage type invalid state for storage type. + StorageTypeInvalid StorageType = "Invalid" + // StorageTypeLocallyRedundant specifies the storage type locally redundant state for storage type. + StorageTypeLocallyRedundant StorageType = "LocallyRedundant" +) + +// StorageTypeState enumerates the values for storage type state. +type StorageTypeState string + +const ( + // StorageTypeStateInvalid specifies the storage type state invalid state for storage type state. + StorageTypeStateInvalid StorageTypeState = "Invalid" + // StorageTypeStateLocked specifies the storage type state locked state for storage type state. + StorageTypeStateLocked StorageTypeState = "Locked" + // StorageTypeStateUnlocked specifies the storage type state unlocked state for storage type state. + StorageTypeStateUnlocked StorageTypeState = "Unlocked" +) + // TriggerType enumerates the values for trigger type. type TriggerType string @@ -45,6 +110,24 @@ const ( UserTriggered TriggerType = "UserTriggered" ) +// UsagesUnit enumerates the values for usages unit. +type UsagesUnit string + +const ( + // Bytes specifies the bytes state for usages unit. + Bytes UsagesUnit = "Bytes" + // BytesPerSecond specifies the bytes per second state for usages unit. + BytesPerSecond UsagesUnit = "BytesPerSecond" + // Count specifies the count state for usages unit. + Count UsagesUnit = "Count" + // CountPerSecond specifies the count per second state for usages unit. + CountPerSecond UsagesUnit = "CountPerSecond" + // Percent specifies the percent state for usages unit. + Percent UsagesUnit = "Percent" + // Seconds specifies the seconds state for usages unit. + Seconds UsagesUnit = "Seconds" +) + // VaultUpgradeState enumerates the values for vault upgrade state. type VaultUpgradeState string @@ -59,6 +142,45 @@ const ( Upgraded VaultUpgradeState = "Upgraded" ) +// BackupStorageConfig is the backup storage config. +type BackupStorageConfig struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + ETag *string `json:"eTag,omitempty"` + *BackupStorageConfigProperties `json:"properties,omitempty"` +} + +// BackupStorageConfigProperties is the backup storage config. +type BackupStorageConfigProperties struct { + StorageModelType StorageModelType `json:"storageModelType,omitempty"` + StorageType StorageType `json:"storageType,omitempty"` + StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` +} + +// BackupVaultConfig is backup vault config details. +type BackupVaultConfig struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + ETag *string `json:"eTag,omitempty"` + *BackupVaultConfigProperties `json:"properties,omitempty"` +} + +// BackupVaultConfigProperties is backup vault config details. +type BackupVaultConfigProperties struct { + StorageType StorageType `json:"storageType,omitempty"` + StorageTypeState StorageTypeState `json:"storageTypeState,omitempty"` + EnhancedSecurityState EnhancedSecurityState `json:"enhancedSecurityState,omitempty"` +} + +// CertificateRequest is details of the certificate to be uploaded to the vault. +type CertificateRequest struct { + Properties *RawCertificateData `json:"properties,omitempty"` +} + // ClientDiscoveryDisplay is localized display information of an operation. type ClientDiscoveryDisplay struct { Provider *string `json:"Provider,omitempty"` @@ -67,24 +189,24 @@ type ClientDiscoveryDisplay struct { Description *string `json:"Description,omitempty"` } -// ClientDiscoveryForLogSpecification is log specification for the operation. +// ClientDiscoveryForLogSpecification is class to represent shoebox log specification in json client discovery. type ClientDiscoveryForLogSpecification struct { - Name *string `json:"name,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - BlobDuration *date.Time `json:"blobDuration,omitempty"` + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + BlobDuration *string `json:"blobDuration,omitempty"` } -// ClientDiscoveryForServiceSpecification is operation properties. +// ClientDiscoveryForProperties is class to represent shoebox properties in json client discovery. +type ClientDiscoveryForProperties struct { + ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// ClientDiscoveryForServiceSpecification is class to represent shoebox service specification in json client discovery. type ClientDiscoveryForServiceSpecification struct { LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` } -// ClientDiscoveryProperties is operation properties. -type ClientDiscoveryProperties struct { - ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` -} - -// ClientDiscoveryResponse is list of available operations. +// ClientDiscoveryResponse is operations List response which contains list of available APIs. type ClientDiscoveryResponse struct { autorest.Response `json:"-"` Value *[]ClientDiscoveryValueForSingleAPI `json:"Value,omitempty"` @@ -105,13 +227,58 @@ func (client ClientDiscoveryResponse) ClientDiscoveryResponsePreparer() (*http.R // ClientDiscoveryValueForSingleAPI is available operation details. type ClientDiscoveryValueForSingleAPI struct { - Name *string `json:"Name,omitempty"` - Display *ClientDiscoveryDisplay `json:"Display,omitempty"` - Origin *string `json:"Origin,omitempty"` - *ClientDiscoveryProperties `json:"Properties,omitempty"` + Name *string `json:"Name,omitempty"` + Display *ClientDiscoveryDisplay `json:"Display,omitempty"` + Origin *string `json:"Origin,omitempty"` + Properties *ClientDiscoveryForProperties `json:"Properties,omitempty"` } -// Resource is aRM Resource. +// JobsSummary is summary of the replication job data for this vault. +type JobsSummary struct { + FailedJobs *int32 `json:"failedJobs,omitempty"` + SuspendedJobs *int32 `json:"suspendedJobs,omitempty"` + InProgressJobs *int32 `json:"inProgressJobs,omitempty"` +} + +// MonitoringSummary is summary of the replication monitoring data for this vault. +type MonitoringSummary struct { + UnHealthyVMCount *int32 `json:"unHealthyVmCount,omitempty"` + UnHealthyProviderCount *int32 `json:"unHealthyProviderCount,omitempty"` + EventsCount *int32 `json:"eventsCount,omitempty"` + DeprecatedProviderCount *int32 `json:"deprecatedProviderCount,omitempty"` + SupportedProviderCount *int32 `json:"supportedProviderCount,omitempty"` + UnsupportedProviderCount *int32 `json:"unsupportedProviderCount,omitempty"` +} + +// NameInfo is the name of usage. +type NameInfo struct { + Value *string `json:"value,omitempty"` + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// RawCertificateData is raw certificate data. +type RawCertificateData struct { + AuthType AuthType `json:"authType,omitempty"` + Certificate *[]byte `json:"certificate,omitempty"` +} + +// ReplicationUsage is replication usages of a vault. +type ReplicationUsage struct { + MonitoringSummary *MonitoringSummary `json:"monitoringSummary,omitempty"` + JobsSummary *JobsSummary `json:"jobsSummary,omitempty"` + ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` + RecoveryPlanCount *int32 `json:"recoveryPlanCount,omitempty"` + RegisteredServersCount *int32 `json:"registeredServersCount,omitempty"` + RecoveryServicesProviderAuthType *int32 `json:"recoveryServicesProviderAuthType,omitempty"` +} + +// ReplicationUsageList is replication usages for vault. +type ReplicationUsageList struct { + autorest.Response `json:"-"` + Value *[]ReplicationUsage `json:"value,omitempty"` +} + +// Resource is ARM Resource. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -119,6 +286,127 @@ type Resource struct { ETag *string `json:"eTag,omitempty"` } +// ResourceCertificateAndAadDetails is certificate details representing the Vault credentials for AAD. +type ResourceCertificateAndAadDetails struct { + Certificate *[]byte `json:"certificate,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ResourceID *int64 `json:"resourceId,omitempty"` + Subject *string `json:"subject,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + ValidFrom *date.Time `json:"validFrom,omitempty"` + ValidTo *date.Time `json:"validTo,omitempty"` + AuthType AuthType `json:"authType,omitempty"` + AadAuthority *string `json:"aadAuthority,omitempty"` + AadTenantID *string `json:"aadTenantId,omitempty"` + ServicePrincipalClientID *string `json:"servicePrincipalClientId,omitempty"` + ServicePrincipalObjectID *string `json:"servicePrincipalObjectId,omitempty"` + AzureManagementEndpointAudience *string `json:"azureManagementEndpointAudience,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) MarshalJSON() ([]byte, error) { + rcaad.AuthType = AzureActiveDirectory + type Alias ResourceCertificateAndAadDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rcaad), + }) +} + +// AsResourceCertificateAndAadDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) { + return &rcaad, true +} + +// AsResourceCertificateAndAcsDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAadDetails. +func (rcaad ResourceCertificateAndAadDetails) AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) { + return nil, false +} + +// ResourceCertificateAndAcsDetails is certificate details representing the Vault credentials for ACS. +type ResourceCertificateAndAcsDetails struct { + Certificate *[]byte `json:"certificate,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + Issuer *string `json:"issuer,omitempty"` + ResourceID *int64 `json:"resourceId,omitempty"` + Subject *string `json:"subject,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + ValidFrom *date.Time `json:"validFrom,omitempty"` + ValidTo *date.Time `json:"validTo,omitempty"` + AuthType AuthType `json:"authType,omitempty"` + GlobalAcsNamespace *string `json:"globalAcsNamespace,omitempty"` + GlobalAcsHostName *string `json:"globalAcsHostName,omitempty"` + GlobalAcsRPRealm *string `json:"globalAcsRPRealm,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) MarshalJSON() ([]byte, error) { + rcaad.AuthType = AccessControlService + type Alias ResourceCertificateAndAcsDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rcaad), + }) +} + +// AsResourceCertificateAndAadDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) { + return nil, false +} + +// AsResourceCertificateAndAcsDetails is the ResourceCertificateDetails implementation for ResourceCertificateAndAcsDetails. +func (rcaad ResourceCertificateAndAcsDetails) AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) { + return &rcaad, true +} + +// ResourceCertificateDetails is certificate details representing the Vault credentials. +type ResourceCertificateDetails interface { + AsResourceCertificateAndAadDetails() (*ResourceCertificateAndAadDetails, bool) + AsResourceCertificateAndAcsDetails() (*ResourceCertificateAndAcsDetails, bool) +} + +func unmarshalResourceCertificateDetails(body []byte) (ResourceCertificateDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["authType"] { + case string(AzureActiveDirectory): + var rcaad ResourceCertificateAndAadDetails + err := json.Unmarshal(body, &rcaad) + return rcaad, err + case string(AccessControlService): + var rcaad ResourceCertificateAndAcsDetails + err := json.Unmarshal(body, &rcaad) + return rcaad, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalResourceCertificateDetailsArray(body []byte) ([]ResourceCertificateDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rcdArray := make([]ResourceCertificateDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rcd, err := unmarshalResourceCertificateDetails(*rawMessage) + if err != nil { + return nil, err + } + rcdArray[index] = rcd + } + return rcdArray, nil +} + // Sku is identifies the unique system identifier for each Azure resource. type Sku struct { Name SkuName `json:"name,omitempty"` @@ -160,6 +448,67 @@ type Vault struct { Sku *Sku `json:"sku,omitempty"` } +// VaultCertificateResponse is certificate corresponding to a vault that can be used by clients to register themselves +// with the vault. +type VaultCertificateResponse struct { + autorest.Response `json:"-"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + ID *string `json:"id,omitempty"` + Properties ResourceCertificateDetails `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for VaultCertificateResponse struct. +func (vcr *VaultCertificateResponse) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + vcr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + vcr.Type = &typeVar + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + vcr.ID = &ID + } + + v = m["properties"] + if v != nil { + properties, err := unmarshalResourceCertificateDetails(*m["properties"]) + if err != nil { + return err + } + vcr.Properties = properties + } + + return nil +} + // VaultExtendedInfo is vault extended information. type VaultExtendedInfo struct { IntegrityKey *string `json:"integrityKey,omitempty"` @@ -190,3 +539,19 @@ type VaultProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` UpgradeDetails *UpgradeDetails `json:"upgradeDetails,omitempty"` } + +// VaultUsage is usages of a vault. +type VaultUsage struct { + Unit UsagesUnit `json:"unit,omitempty"` + QuotaPeriod *string `json:"quotaPeriod,omitempty"` + NextResetTime *date.Time `json:"nextResetTime,omitempty"` + CurrentValue *int64 `json:"currentValue,omitempty"` + Limit *int64 `json:"limit,omitempty"` + Name *NameInfo `json:"name,omitempty"` +} + +// VaultUsageList is usage for vault. +type VaultUsageList struct { + autorest.Response `json:"-"` + Value *[]VaultUsage `json:"value,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/operations.go index 7e0a9cedc..142570338 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/operations.go @@ -14,9 +14,8 @@ package recoveryservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// OperationsClient is the client for the Operations methods of the -// Recoveryservices service. +// OperationsClient is the recovery Services Client type OperationsClient struct { ManagementClient } @@ -35,18 +33,14 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // List returns the list of available operations. -// -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. -func (client OperationsClient) List(resourceGroupName string) (result ClientDiscoveryResponse, err error) { - req, err := client.ListPreparer(resourceGroupName) +func (client OperationsClient) List() (result ClientDiscoveryResponse, err error) { + req, err := client.ListPreparer() if err != nil { err = autorest.NewErrorWithError(err, "recoveryservices.OperationsClient", "List", nil, "Failure preparing request") return @@ -68,12 +62,7 @@ func (client OperationsClient) List(resourceGroupName string) (result ClientDisc } // ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - +func (client OperationsClient) ListPreparer() (*http.Request, error) { const APIVersion = "2016-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, @@ -82,7 +71,7 @@ func (client OperationsClient) ListPreparer(resourceGroupName string) (*http.Req preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations", pathParameters), + autorest.WithPath("/providers/Microsoft.RecoveryServices/operations"), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -129,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults ClientDiscoveryRespon return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan ClientDiscoveryValueForSingleAPI, <-chan error) { + resultChan := make(chan ClientDiscoveryValueForSingleAPI) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/registeredidentities.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/registeredidentities.go new file mode 100644 index 000000000..68169e680 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/registeredidentities.go @@ -0,0 +1,105 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// RegisteredIdentitiesClient is the recovery Services Client +type RegisteredIdentitiesClient struct { + ManagementClient +} + +// NewRegisteredIdentitiesClient creates an instance of the RegisteredIdentitiesClient client. +func NewRegisteredIdentitiesClient(subscriptionID string) RegisteredIdentitiesClient { + return NewRegisteredIdentitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRegisteredIdentitiesClientWithBaseURI creates an instance of the RegisteredIdentitiesClient client. +func NewRegisteredIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) RegisteredIdentitiesClient { + return RegisteredIdentitiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete unregisters the given container from your Recovery Services vault. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. identityName is name of the protection container to unregister. +func (client RegisteredIdentitiesClient) Delete(resourceGroupName string, vaultName string, identityName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceGroupName, vaultName, identityName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.RegisteredIdentitiesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "recoveryservices.RegisteredIdentitiesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.RegisteredIdentitiesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RegisteredIdentitiesClient) DeletePreparer(resourceGroupName string, vaultName string, identityName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "identityName": autorest.Encode("path", identityName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/registeredIdentities/{identityName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client RegisteredIdentitiesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RegisteredIdentitiesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/replicationusages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/replicationusages.go new file mode 100644 index 000000000..e840d111c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/replicationusages.go @@ -0,0 +1,105 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ReplicationUsagesClient is the recovery Services Client +type ReplicationUsagesClient struct { + ManagementClient +} + +// NewReplicationUsagesClient creates an instance of the ReplicationUsagesClient client. +func NewReplicationUsagesClient(subscriptionID string) ReplicationUsagesClient { + return NewReplicationUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewReplicationUsagesClientWithBaseURI creates an instance of the ReplicationUsagesClient client. +func NewReplicationUsagesClientWithBaseURI(baseURI string, subscriptionID string) ReplicationUsagesClient { + return ReplicationUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List fetches the replication usages of the vault. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. +func (client ReplicationUsagesClient) List(resourceGroupName string, vaultName string) (result ReplicationUsageList, err error) { + req, err := client.ListPreparer(resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.ReplicationUsagesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.ReplicationUsagesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.ReplicationUsagesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ReplicationUsagesClient) ListPreparer(resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/replicationUsages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationUsagesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ReplicationUsagesClient) ListResponder(resp *http.Response) (result ReplicationUsageList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/usages.go new file mode 100644 index 000000000..98439a83b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/usages.go @@ -0,0 +1,105 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// UsagesClient is the recovery Services Client +type UsagesClient struct { + ManagementClient +} + +// NewUsagesClient creates an instance of the UsagesClient client. +func NewUsagesClient(subscriptionID string) UsagesClient { + return NewUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewUsagesClientWithBaseURI creates an instance of the UsagesClient client. +func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesClient { + return UsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByVaults fetches the usages of the vault. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. +func (client UsagesClient) ListByVaults(resourceGroupName string, vaultName string) (result VaultUsageList, err error) { + req, err := client.ListByVaultsPreparer(resourceGroupName, vaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.UsagesClient", "ListByVaults", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVaultsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.UsagesClient", "ListByVaults", resp, "Failure sending request") + return + } + + result, err = client.ListByVaultsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.UsagesClient", "ListByVaults", resp, "Failure responding to request") + } + + return +} + +// ListByVaultsPreparer prepares the ListByVaults request. +func (client UsagesClient) ListByVaultsPreparer(resourceGroupName string, vaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByVaultsSender sends the ListByVaults request. The method will close the +// http.Response Body if it receives an error. +func (client UsagesClient) ListByVaultsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByVaultsResponder handles the response to the ListByVaults request. The method always +// closes the http.Response Body. +func (client UsagesClient) ListByVaultsResponder(resp *http.Response) (result VaultUsageList, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultcertificates.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultcertificates.go new file mode 100644 index 000000000..573e24286 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultcertificates.go @@ -0,0 +1,109 @@ +package recoveryservices + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// VaultCertificatesClient is the recovery Services Client +type VaultCertificatesClient struct { + ManagementClient +} + +// NewVaultCertificatesClient creates an instance of the VaultCertificatesClient client. +func NewVaultCertificatesClient(subscriptionID string) VaultCertificatesClient { + return NewVaultCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVaultCertificatesClientWithBaseURI creates an instance of the VaultCertificatesClient client. +func NewVaultCertificatesClientWithBaseURI(baseURI string, subscriptionID string) VaultCertificatesClient { + return VaultCertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create upload a certificate for a resource. +// +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. certificateName is certificate friendly name. certificateRequest is input +// parameters for uploading the vault certificate. +func (client VaultCertificatesClient) Create(resourceGroupName string, vaultName string, certificateName string, certificateRequest CertificateRequest) (result VaultCertificateResponse, err error) { + req, err := client.CreatePreparer(resourceGroupName, vaultName, certificateName, certificateRequest) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultCertificatesClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservices.VaultCertificatesClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservices.VaultCertificatesClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client VaultCertificatesClient) CreatePreparer(resourceGroupName string, vaultName string, certificateName string, certificateRequest CertificateRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "certificateName": autorest.Encode("path", certificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "vaultName": autorest.Encode("path", vaultName), + } + + const APIVersion = "2016-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/certificates/{certificateName}", pathParameters), + autorest.WithJSON(certificateRequest), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client VaultCertificatesClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client VaultCertificatesClient) CreateResponder(resp *http.Response) (result VaultCertificateResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultextendedinfo.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultextendedinfo.go index 9c2ca76a4..6117cae97 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultextendedinfo.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaultextendedinfo.go @@ -14,9 +14,8 @@ package recoveryservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,25 @@ import ( "net/http" ) -// VaultExtendedInfoClient is the client for the VaultExtendedInfo methods of -// the Recoveryservices service. +// VaultExtendedInfoClient is the recovery Services Client type VaultExtendedInfoClient struct { ManagementClient } -// NewVaultExtendedInfoClient creates an instance of the -// VaultExtendedInfoClient client. +// NewVaultExtendedInfoClient creates an instance of the VaultExtendedInfoClient client. func NewVaultExtendedInfoClient(subscriptionID string) VaultExtendedInfoClient { return NewVaultExtendedInfoClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVaultExtendedInfoClientWithBaseURI creates an instance of the -// VaultExtendedInfoClient client. +// NewVaultExtendedInfoClientWithBaseURI creates an instance of the VaultExtendedInfoClient client. func NewVaultExtendedInfoClientWithBaseURI(baseURI string, subscriptionID string) VaultExtendedInfoClient { return VaultExtendedInfoClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create vault extended info. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. vaultName is the name of the recovery services -// vault. resourceResourceExtendedInfoDetails is -// resourceResourceExtendedInfoDetails +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. resourceResourceExtendedInfoDetails is resourceResourceExtendedInfoDetails func (client VaultExtendedInfoClient) CreateOrUpdate(resourceGroupName string, vaultName string, resourceResourceExtendedInfoDetails VaultExtendedInfoResource) (result VaultExtendedInfoResource, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails) if err != nil { @@ -114,9 +108,8 @@ func (client VaultExtendedInfoClient) CreateOrUpdateResponder(resp *http.Respons // Get get the vault extended info. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. vaultName is the name of the recovery services -// vault. +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. func (client VaultExtendedInfoClient) Get(resourceGroupName string, vaultName string) (result VaultExtendedInfoResource, err error) { req, err := client.GetPreparer(resourceGroupName, vaultName) if err != nil { @@ -181,10 +174,8 @@ func (client VaultExtendedInfoClient) GetResponder(resp *http.Response) (result // Update update vault extended info. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. vaultName is the name of the recovery services -// vault. resourceResourceExtendedInfoDetails is -// resourceResourceExtendedInfoDetails +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. resourceResourceExtendedInfoDetails is resourceResourceExtendedInfoDetails func (client VaultExtendedInfoClient) Update(resourceGroupName string, vaultName string, resourceResourceExtendedInfoDetails VaultExtendedInfoResource) (result VaultExtendedInfoResource, err error) { req, err := client.UpdatePreparer(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaults.go index dbbd47d8c..70a2c7228 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/vaults.go @@ -14,9 +14,8 @@ package recoveryservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// VaultsClient is the client for the Vaults methods of the Recoveryservices -// service. +// VaultsClient is the recovery Services Client type VaultsClient struct { ManagementClient } @@ -42,9 +40,8 @@ func NewVaultsClientWithBaseURI(baseURI string, subscriptionID string) VaultsCli // CreateOrUpdate creates or updates a Recovery Services vault. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. vaultName is the name of the recovery services -// vault. vault is recovery Services Vault to be created. +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. vault is recovery Services Vault to be created. func (client VaultsClient) CreateOrUpdate(resourceGroupName string, vaultName string, vault Vault) (result Vault, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, vaultName, vault) if err != nil { @@ -111,9 +108,8 @@ func (client VaultsClient) CreateOrUpdateResponder(resp *http.Response) (result // Delete deletes a vault. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. vaultName is the name of the recovery services -// vault. +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. func (client VaultsClient) Delete(resourceGroupName string, vaultName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, vaultName) if err != nil { @@ -177,9 +173,8 @@ func (client VaultsClient) DeleteResponder(resp *http.Response) (result autorest // Get get the Vault details. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. vaultName is the name of the recovery services -// vault. +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. func (client VaultsClient) Get(resourceGroupName string, vaultName string) (result Vault, err error) { req, err := client.GetPreparer(resourceGroupName, vaultName) if err != nil { @@ -244,8 +239,7 @@ func (client VaultsClient) GetResponder(resp *http.Response) (result Vault, err // ListByResourceGroup retrieve a list of Vaults. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. +// resourceGroupName is the name of the resource group where the recovery services vault is present. func (client VaultsClient) ListByResourceGroup(resourceGroupName string) (result VaultList, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { @@ -307,8 +301,7 @@ func (client VaultsClient) ListByResourceGroupResponder(resp *http.Response) (re return } -// ListBySubscriptionID fetches all the resources of the specified type in the -// subscription. +// ListBySubscriptionID fetches all the resources of the specified type in the subscription. func (client VaultsClient) ListBySubscriptionID() (result VaultList, err error) { req, err := client.ListBySubscriptionIDPreparer() if err != nil { @@ -371,9 +364,8 @@ func (client VaultsClient) ListBySubscriptionIDResponder(resp *http.Response) (r // Update updates the vault. // -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. vaultName is the name of the recovery services -// vault. vault is recovery Services Vault to be created. +// resourceGroupName is the name of the resource group where the recovery services vault is present. vaultName is the +// name of the recovery services vault. vault is recovery Services Vault to be created. func (client VaultsClient) Update(resourceGroupName string, vaultName string, vault Vault) (result Vault, err error) { req, err := client.UpdatePreparer(resourceGroupName, vaultName, vault) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go index 0d13412a6..60254d844 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservices/version.go @@ -14,15 +14,15 @@ package recoveryservices // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservices/" + return "Azure-SDK-For-Go/v11.0.0-beta arm-recoveryservices/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupengines.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupengines.go index 4d3c2156f..6f22085d5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupengines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupengines.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,26 @@ import ( "net/http" ) -// BackupEnginesClient is the client for the BackupEngines methods of the -// Recoveryservicesbackup service. +// BackupEnginesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupEnginesClient struct { ManagementClient } -// NewBackupEnginesClient creates an instance of the BackupEnginesClient -// client. +// NewBackupEnginesClient creates an instance of the BackupEnginesClient client. func NewBackupEnginesClient(subscriptionID string) BackupEnginesClient { return NewBackupEnginesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupEnginesClientWithBaseURI creates an instance of the -// BackupEnginesClient client. +// NewBackupEnginesClientWithBaseURI creates an instance of the BackupEnginesClient client. func NewBackupEnginesClientWithBaseURI(baseURI string, subscriptionID string) BackupEnginesClient { return BackupEnginesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get returns backup management server registered to Recovery Services Vault. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// backupEngineName is name of the backup management server. filter is oData -// filter options. skipToken is skipToken Filter. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. backupEngineName is name of the backup management server. filter is oData filter +// options. skipToken is skipToken Filter. func (client BackupEnginesClient) Get(vaultName string, resourceGroupName string, backupEngineName string, filter string, skipToken string) (result BackupEngineBaseResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, backupEngineName, filter, skipToken) if err != nil { @@ -117,12 +112,10 @@ func (client BackupEnginesClient) GetResponder(resp *http.Response) (result Back return } -// List backup management servers registered to Recovery Services Vault. -// Returns a pageable list of servers. +// List backup management servers registered to Recovery Services Vault. Returns a pageable list of servers. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. skipToken is skipToken Filter. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter. func (client BackupEnginesClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result BackupEngineBaseResourceList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken) if err != nil { @@ -214,3 +207,48 @@ func (client BackupEnginesClient) ListNextResults(lastResults BackupEngineBaseRe return } + +// ListComplete gets all elements from the list without paging. +func (client BackupEnginesClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan BackupEngineBaseResource, <-chan error) { + resultChan := make(chan BackupEngineBaseResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(vaultName, resourceGroupName, filter, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupjobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupjobs.go index 636cd364d..dda089b79 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupjobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupjobs.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// BackupJobsClient is the client for the BackupJobs methods of the -// Recoveryservicesbackup service. +// BackupJobsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupJobsClient struct { ManagementClient } @@ -35,17 +33,15 @@ func NewBackupJobsClient(subscriptionID string) BackupJobsClient { return NewBackupJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupJobsClientWithBaseURI creates an instance of the BackupJobsClient -// client. +// NewBackupJobsClientWithBaseURI creates an instance of the BackupJobsClient client. func NewBackupJobsClientWithBaseURI(baseURI string, subscriptionID string) BackupJobsClient { return BackupJobsClient{NewWithBaseURI(baseURI, subscriptionID)} } // List provides a pageable list of jobs. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. skipToken is skipToken Filter. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter. func (client BackupJobsClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result JobResourceList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken) if err != nil { @@ -76,7 +72,7 @@ func (client BackupJobsClient) ListPreparer(vaultName string, resourceGroupName "vaultName": autorest.Encode("path", vaultName), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -137,3 +133,48 @@ func (client BackupJobsClient) ListNextResults(lastResults JobResourceList) (res return } + +// ListComplete gets all elements from the list without paging. +func (client BackupJobsClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan JobResource, <-chan error) { + resultChan := make(chan JobResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(vaultName, resourceGroupName, filter, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationresults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationresults.go index 8167c53b6..ccd38b592 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationresults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationresults.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,34 +23,28 @@ import ( "net/http" ) -// BackupOperationResultsClient is the client for the BackupOperationResults -// methods of the Recoveryservicesbackup service. +// BackupOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupOperationResultsClient struct { ManagementClient } -// NewBackupOperationResultsClient creates an instance of the -// BackupOperationResultsClient client. +// NewBackupOperationResultsClient creates an instance of the BackupOperationResultsClient client. func NewBackupOperationResultsClient(subscriptionID string) BackupOperationResultsClient { return NewBackupOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupOperationResultsClientWithBaseURI creates an instance of the -// BackupOperationResultsClient client. +// NewBackupOperationResultsClientWithBaseURI creates an instance of the BackupOperationResultsClient client. func NewBackupOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) BackupOperationResultsClient { return BackupOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get provides the status of the delete operations such as deleting backed up -// item. Once the operation has started, the status code in the response would -// be Accepted. It will continue to be in this state till it reaches -// completion. On successful completion, the status code will be OK. This -// method expects OperationID as an argument. OperationID is part of the -// Location header of the operation response. +// Get provides the status of the delete operations such as deleting backed up item. Once the operation has started, +// the status code in the response would be Accepted. It will continue to be in this state till it reaches completion. +// On successful completion, the status code will be OK. This method expects OperationID as an argument. OperationID is +// part of the Location header of the operation response. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// operationID is operationID which represents the operation. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. operationID is operationID which represents the operation. func (client BackupOperationResultsClient) Get(vaultName string, resourceGroupName string, operationID string) (result autorest.Response, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationstatuses.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationstatuses.go index 9a5f14ba3..0a46c0b2e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationstatuses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupoperationstatuses.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,33 +23,27 @@ import ( "net/http" ) -// BackupOperationStatusesClient is the client for the BackupOperationStatuses -// methods of the Recoveryservicesbackup service. +// BackupOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupOperationStatusesClient struct { ManagementClient } -// NewBackupOperationStatusesClient creates an instance of the -// BackupOperationStatusesClient client. +// NewBackupOperationStatusesClient creates an instance of the BackupOperationStatusesClient client. func NewBackupOperationStatusesClient(subscriptionID string) BackupOperationStatusesClient { return NewBackupOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupOperationStatusesClientWithBaseURI creates an instance of the -// BackupOperationStatusesClient client. +// NewBackupOperationStatusesClientWithBaseURI creates an instance of the BackupOperationStatusesClient client. func NewBackupOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) BackupOperationStatusesClient { return BackupOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get fetches the status of an operation such as triggering a backup, restore. -// The status can be in progress, completed or failed. You can refer to the -// OperationStatus enum for all the possible states of an operation. Some -// operations create jobs. This method returns the list of jobs when the -// operation is complete. +// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress, +// completed or failed. You can refer to the OperationStatus enum for all the possible states of an operation. Some +// operations create jobs. This method returns the list of jobs when the operation is complete. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// operationID is operationID which represents the operation. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. operationID is operationID which represents the operation. func (client BackupOperationStatusesClient) Get(vaultName string, resourceGroupName string, operationID string) (result OperationStatus, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backuppolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backuppolicies.go index 2c81779a0..439a1268b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backuppolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backuppolicies.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,26 @@ import ( "net/http" ) -// BackupPoliciesClient is the client for the BackupPolicies methods of the -// Recoveryservicesbackup service. +// BackupPoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupPoliciesClient struct { ManagementClient } -// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient -// client. +// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient client. func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient { return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupPoliciesClientWithBaseURI creates an instance of the -// BackupPoliciesClient client. +// NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient client. func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient { return BackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists of backup policies associated with Recovery Services Vault. API -// provides pagination parameters to fetch scoped results. +// List lists of backup policies associated with Recovery Services Vault. API provides pagination parameters to fetch +// scoped results. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. func (client BackupPoliciesClient) List(vaultName string, resourceGroupName string, filter string) (result ProtectionPolicyResourceList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, filter) if err != nil { @@ -136,3 +131,48 @@ func (client BackupPoliciesClient) ListNextResults(lastResults ProtectionPolicyR return } + +// ListComplete gets all elements from the list without paging. +func (client BackupPoliciesClient) ListComplete(vaultName string, resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan ProtectionPolicyResource, <-chan error) { + resultChan := make(chan ProtectionPolicyResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(vaultName, resourceGroupName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectableitems.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectableitems.go index c8008db70..85f7a9a38 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectableitems.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectableitems.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,26 @@ import ( "net/http" ) -// BackupProtectableItemsClient is the client for the BackupProtectableItems -// methods of the Recoveryservicesbackup service. +// BackupProtectableItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupProtectableItemsClient struct { ManagementClient } -// NewBackupProtectableItemsClient creates an instance of the -// BackupProtectableItemsClient client. +// NewBackupProtectableItemsClient creates an instance of the BackupProtectableItemsClient client. func NewBackupProtectableItemsClient(subscriptionID string) BackupProtectableItemsClient { return NewBackupProtectableItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupProtectableItemsClientWithBaseURI creates an instance of the -// BackupProtectableItemsClient client. +// NewBackupProtectableItemsClientWithBaseURI creates an instance of the BackupProtectableItemsClient client. func NewBackupProtectableItemsClientWithBaseURI(baseURI string, subscriptionID string) BackupProtectableItemsClient { return BackupProtectableItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List provides a pageable list of protectable objects within your -// subscription according to the query filter and the pagination parameters. +// List provides a pageable list of protectable objects within your subscription according to the query filter and the +// pagination parameters. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. skipToken is skipToken Filter. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter. func (client BackupProtectableItemsClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result WorkloadProtectableItemResourceList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken) if err != nil { @@ -139,3 +134,48 @@ func (client BackupProtectableItemsClient) ListNextResults(lastResults WorkloadP return } + +// ListComplete gets all elements from the list without paging. +func (client BackupProtectableItemsClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan WorkloadProtectableItemResource, <-chan error) { + resultChan := make(chan WorkloadProtectableItemResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(vaultName, resourceGroupName, filter, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotecteditems.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotecteditems.go index 171dd82b9..702cb8d6a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotecteditems.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotecteditems.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,25 @@ import ( "net/http" ) -// BackupProtectedItemsClient is the client for the BackupProtectedItems -// methods of the Recoveryservicesbackup service. +// BackupProtectedItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupProtectedItemsClient struct { ManagementClient } -// NewBackupProtectedItemsClient creates an instance of the -// BackupProtectedItemsClient client. +// NewBackupProtectedItemsClient creates an instance of the BackupProtectedItemsClient client. func NewBackupProtectedItemsClient(subscriptionID string) BackupProtectedItemsClient { return NewBackupProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupProtectedItemsClientWithBaseURI creates an instance of the -// BackupProtectedItemsClient client. +// NewBackupProtectedItemsClientWithBaseURI creates an instance of the BackupProtectedItemsClient client. func NewBackupProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string) BackupProtectedItemsClient { return BackupProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List provides a pageable list of all items that can be backed up within a -// subscription. +// List provides a pageable list of all items that are backed up within a vault. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. skipToken is skipToken Filter. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter. func (client BackupProtectedItemsClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result ProtectedItemResourceList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken) if err != nil { @@ -139,3 +133,48 @@ func (client BackupProtectedItemsClient) ListNextResults(lastResults ProtectedIt return } + +// ListComplete gets all elements from the list without paging. +func (client BackupProtectedItemsClient) ListComplete(vaultName string, resourceGroupName string, filter string, skipToken string, cancel <-chan struct{}) (<-chan ProtectedItemResource, <-chan error) { + resultChan := make(chan ProtectedItemResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(vaultName, resourceGroupName, filter, skipToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectioncontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectioncontainers.go index 73611a215..7573ea7ce 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectioncontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupprotectioncontainers.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,29 +23,25 @@ import ( "net/http" ) -// BackupProtectionContainersClient is the client for the -// BackupProtectionContainers methods of the Recoveryservicesbackup service. +// BackupProtectionContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupProtectionContainersClient struct { ManagementClient } -// NewBackupProtectionContainersClient creates an instance of the -// BackupProtectionContainersClient client. +// NewBackupProtectionContainersClient creates an instance of the BackupProtectionContainersClient client. func NewBackupProtectionContainersClient(subscriptionID string) BackupProtectionContainersClient { return NewBackupProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupProtectionContainersClientWithBaseURI creates an instance of the -// BackupProtectionContainersClient client. +// NewBackupProtectionContainersClientWithBaseURI creates an instance of the BackupProtectionContainersClient client. func NewBackupProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) BackupProtectionContainersClient { return BackupProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } // List lists the containers registered to Recovery Services Vault. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. func (client BackupProtectionContainersClient) List(vaultName string, resourceGroupName string, filter string) (result ProtectionContainerResourceList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, filter) if err != nil { @@ -135,3 +130,48 @@ func (client BackupProtectionContainersClient) ListNextResults(lastResults Prote return } + +// ListComplete gets all elements from the list without paging. +func (client BackupProtectionContainersClient) ListComplete(vaultName string, resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan ProtectionContainerResource, <-chan error) { + resultChan := make(chan ProtectionContainerResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(vaultName, resourceGroupName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcestorageconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcestorageconfigs.go index 0a495b1bd..371bdd733 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcestorageconfigs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcestorageconfigs.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,28 +23,26 @@ import ( "net/http" ) -// BackupResourceStorageConfigsClient is the client for the -// BackupResourceStorageConfigs methods of the Recoveryservicesbackup service. +// BackupResourceStorageConfigsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupResourceStorageConfigsClient struct { ManagementClient } -// NewBackupResourceStorageConfigsClient creates an instance of the -// BackupResourceStorageConfigsClient client. +// NewBackupResourceStorageConfigsClient creates an instance of the BackupResourceStorageConfigsClient client. func NewBackupResourceStorageConfigsClient(subscriptionID string) BackupResourceStorageConfigsClient { return NewBackupResourceStorageConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupResourceStorageConfigsClientWithBaseURI creates an instance of the -// BackupResourceStorageConfigsClient client. +// NewBackupResourceStorageConfigsClientWithBaseURI creates an instance of the BackupResourceStorageConfigsClient +// client. func NewBackupResourceStorageConfigsClientWithBaseURI(baseURI string, subscriptionID string) BackupResourceStorageConfigsClient { return BackupResourceStorageConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get fetches resource storage config. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. func (client BackupResourceStorageConfigsClient) Get(vaultName string, resourceGroupName string) (result BackupResourceConfigResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName) if err != nil { @@ -110,8 +107,8 @@ func (client BackupResourceStorageConfigsClient) GetResponder(resp *http.Respons // Update updates vault storage model type. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. func (client BackupResourceStorageConfigsClient) Update(vaultName string, resourceGroupName string) (result autorest.Response, err error) { req, err := client.UpdatePreparer(vaultName, resourceGroupName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcevaultconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcevaultconfigs.go index 65c97f7ae..8c33da406 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcevaultconfigs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupresourcevaultconfigs.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,28 +23,25 @@ import ( "net/http" ) -// BackupResourceVaultConfigsClient is the client for the -// BackupResourceVaultConfigs methods of the Recoveryservicesbackup service. +// BackupResourceVaultConfigsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupResourceVaultConfigsClient struct { ManagementClient } -// NewBackupResourceVaultConfigsClient creates an instance of the -// BackupResourceVaultConfigsClient client. +// NewBackupResourceVaultConfigsClient creates an instance of the BackupResourceVaultConfigsClient client. func NewBackupResourceVaultConfigsClient(subscriptionID string) BackupResourceVaultConfigsClient { return NewBackupResourceVaultConfigsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupResourceVaultConfigsClientWithBaseURI creates an instance of the -// BackupResourceVaultConfigsClient client. +// NewBackupResourceVaultConfigsClientWithBaseURI creates an instance of the BackupResourceVaultConfigsClient client. func NewBackupResourceVaultConfigsClientWithBaseURI(baseURI string, subscriptionID string) BackupResourceVaultConfigsClient { return BackupResourceVaultConfigsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get fetches resource vault config. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. func (client BackupResourceVaultConfigsClient) Get(vaultName string, resourceGroupName string) (result BackupResourceVaultConfigResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName) if err != nil { @@ -110,9 +106,8 @@ func (client BackupResourceVaultConfigsClient) GetResponder(resp *http.Response) // Update updates vault security config. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// parameters is resource config request +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. parameters is resource config request func (client BackupResourceVaultConfigsClient) Update(vaultName string, resourceGroupName string, parameters BackupResourceVaultConfigResource) (result BackupResourceVaultConfigResource, err error) { req, err := client.UpdatePreparer(vaultName, resourceGroupName, parameters) if err != nil { @@ -170,7 +165,7 @@ func (client BackupResourceVaultConfigsClient) UpdateResponder(resp *http.Respon err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backups.go index 92587608d..fd9b434fb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backups.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// BackupsClient is the client for the Backups methods of the -// Recoveryservicesbackup service. +// BackupsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupsClient struct { ManagementClient } @@ -40,16 +38,13 @@ func NewBackupsClientWithBaseURI(baseURI string, subscriptionID string) BackupsC return BackupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Trigger triggers backup for specified backed up item. This is an -// asynchronous operation. To know the status of the operation, call -// GetProtectedItemOperationResult API. +// Trigger triggers backup for specified backed up item. This is an asynchronous operation. To know the status of the +// operation, call GetProtectedItemOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backup item. containerName is -// container name associated with the backup item. protectedItemName is backup -// item for which backup needs to be triggered. parameters is resource backup -// request +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is +// container name associated with the backup item. protectedItemName is backup item for which backup needs to be +// triggered. parameters is resource backup request func (client BackupsClient) Trigger(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters BackupRequestResource) (result autorest.Response, err error) { req, err := client.TriggerPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupusagesummaries.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupusagesummaries.go index 859a13680..0d831b3a5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupusagesummaries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/backupusagesummaries.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,29 +23,25 @@ import ( "net/http" ) -// BackupUsageSummariesClient is the client for the BackupUsageSummaries -// methods of the Recoveryservicesbackup service. +// BackupUsageSummariesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type BackupUsageSummariesClient struct { ManagementClient } -// NewBackupUsageSummariesClient creates an instance of the -// BackupUsageSummariesClient client. +// NewBackupUsageSummariesClient creates an instance of the BackupUsageSummariesClient client. func NewBackupUsageSummariesClient(subscriptionID string) BackupUsageSummariesClient { return NewBackupUsageSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupUsageSummariesClientWithBaseURI creates an instance of the -// BackupUsageSummariesClient client. +// NewBackupUsageSummariesClientWithBaseURI creates an instance of the BackupUsageSummariesClient client. func NewBackupUsageSummariesClientWithBaseURI(baseURI string, subscriptionID string) BackupUsageSummariesClient { return BackupUsageSummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } // List fetches the backup management usage summaries of the vault. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. skipToken is skipToken Filter. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. skipToken is skipToken Filter. func (client BackupUsageSummariesClient) List(vaultName string, resourceGroupName string, filter string, skipToken string) (result BackupManagementUsageList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, filter, skipToken) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/client.go index 94e5c4045..be35a6bf3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/client.go @@ -1,7 +1,6 @@ -// Package recoveryservicesbackup implements the Azure ARM -// Recoveryservicesbackup service API version 2016-12-01. -// +// Package recoveryservicesbackup implements the Azure ARM Recoveryservicesbackup service API version . // +// Open API 2.0 Specs for Azure RecoveryServices Backup service package recoveryservicesbackup // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/exportjobsoperationresults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/exportjobsoperationresults.go index e99b12c6c..51e3e45c8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/exportjobsoperationresults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/exportjobsoperationresults.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,27 @@ import ( "net/http" ) -// ExportJobsOperationResultsClient is the client for the -// ExportJobsOperationResults methods of the Recoveryservicesbackup service. +// ExportJobsOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ExportJobsOperationResultsClient struct { ManagementClient } -// NewExportJobsOperationResultsClient creates an instance of the -// ExportJobsOperationResultsClient client. +// NewExportJobsOperationResultsClient creates an instance of the ExportJobsOperationResultsClient client. func NewExportJobsOperationResultsClient(subscriptionID string) ExportJobsOperationResultsClient { return NewExportJobsOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the -// ExportJobsOperationResultsClient client. +// NewExportJobsOperationResultsClientWithBaseURI creates an instance of the ExportJobsOperationResultsClient client. func NewExportJobsOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ExportJobsOperationResultsClient { return ExportJobsOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get gets the operation result of operation triggered by Export Jobs API. If -// the operation is successful, then it also contains URL of a Blob and a SAS -// key to access the same. The blob contains exported jobs in JSON serialized +// Get gets the operation result of operation triggered by Export Jobs API. If the operation is successful, then it +// also contains URL of a Blob and a SAS key to access the same. The blob contains exported jobs in JSON serialized // format. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// operationID is operationID which represents the export job. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. operationID is operationID which represents the export job. func (client ExportJobsOperationResultsClient) Get(vaultName string, resourceGroupName string, operationID string) (result OperationResultInfoBaseResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/itemlevelrecoveryconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/itemlevelrecoveryconnections.go index 4df44e0ee..189684ae1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/itemlevelrecoveryconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/itemlevelrecoveryconnections.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,36 +23,31 @@ import ( "net/http" ) -// ItemLevelRecoveryConnectionsClient is the client for the -// ItemLevelRecoveryConnections methods of the Recoveryservicesbackup service. +// ItemLevelRecoveryConnectionsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ItemLevelRecoveryConnectionsClient struct { ManagementClient } -// NewItemLevelRecoveryConnectionsClient creates an instance of the -// ItemLevelRecoveryConnectionsClient client. +// NewItemLevelRecoveryConnectionsClient creates an instance of the ItemLevelRecoveryConnectionsClient client. func NewItemLevelRecoveryConnectionsClient(subscriptionID string) ItemLevelRecoveryConnectionsClient { return NewItemLevelRecoveryConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the -// ItemLevelRecoveryConnectionsClient client. +// NewItemLevelRecoveryConnectionsClientWithBaseURI creates an instance of the ItemLevelRecoveryConnectionsClient +// client. func NewItemLevelRecoveryConnectionsClientWithBaseURI(baseURI string, subscriptionID string) ItemLevelRecoveryConnectionsClient { return ItemLevelRecoveryConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Provision provisions a script which invokes an iSCSI connection to the -// backup data. Executing this script opens a file explorer displaying all the -// recoverable files and folders. This is an asynchronous operation. To know -// the status of provisioning, call GetProtectedItemOperationResult API. +// Provision provisions a script which invokes an iSCSI connection to the backup data. Executing this script opens a +// file explorer displaying all the recoverable files and folders. This is an asynchronous operation. To know the +// status of provisioning, call GetProtectedItemOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backed up items. containerName -// is container name associated with the backed up items. protectedItemName is -// backed up item name whose files/folders are to be restored. recoveryPointID -// is recovery point ID which represents backed up data. iSCSI connection will -// be provisioned for this backed up data. parameters is resource ILR request +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backed up items. containerName is +// container name associated with the backed up items. protectedItemName is backed up item name whose files/folders are +// to be restored. recoveryPointID is recovery point ID which represents backed up data. iSCSI connection will be +// provisioned for this backed up data. parameters is resource ILR request func (client ItemLevelRecoveryConnectionsClient) Provision(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters ILRRequestResource) (result autorest.Response, err error) { req, err := client.ProvisionPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters) if err != nil { @@ -121,17 +115,14 @@ func (client ItemLevelRecoveryConnectionsClient) ProvisionResponder(resp *http.R return } -// Revoke revokes an iSCSI connection which can be used to download a script. -// Executing this script opens a file explorer displaying all recoverable files -// and folders. This is an asynchronous operation. +// Revoke revokes an iSCSI connection which can be used to download a script. Executing this script opens a file +// explorer displaying all recoverable files and folders. This is an asynchronous operation. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backed up items. containerName -// is container name associated with the backed up items. protectedItemName is -// backed up item name whose files/folders are to be restored. recoveryPointID -// is recovery point ID which represents backed up data. iSCSI connection will -// be revoked for this backed up data. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backed up items. containerName is +// container name associated with the backed up items. protectedItemName is backed up item name whose files/folders are +// to be restored. recoveryPointID is recovery point ID which represents backed up data. iSCSI connection will be +// revoked for this backed up data. func (client ItemLevelRecoveryConnectionsClient) Revoke(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result autorest.Response, err error) { req, err := client.RevokePreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobcancellations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobcancellations.go index 03f04be3c..3fc966051 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobcancellations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobcancellations.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,30 +23,26 @@ import ( "net/http" ) -// JobCancellationsClient is the client for the JobCancellations methods of the -// Recoveryservicesbackup service. +// JobCancellationsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type JobCancellationsClient struct { ManagementClient } -// NewJobCancellationsClient creates an instance of the JobCancellationsClient -// client. +// NewJobCancellationsClient creates an instance of the JobCancellationsClient client. func NewJobCancellationsClient(subscriptionID string) JobCancellationsClient { return NewJobCancellationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCancellationsClientWithBaseURI creates an instance of the -// JobCancellationsClient client. +// NewJobCancellationsClientWithBaseURI creates an instance of the JobCancellationsClient client. func NewJobCancellationsClientWithBaseURI(baseURI string, subscriptionID string) JobCancellationsClient { return JobCancellationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Trigger cancels a job. This is an asynchronous operation. To know the status -// of the cancellation, call GetCancelOperationResult API. +// Trigger cancels a job. This is an asynchronous operation. To know the status of the cancellation, call +// GetCancelOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// jobName is name of the job to cancel. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. jobName is name of the job to cancel. func (client JobCancellationsClient) Trigger(vaultName string, resourceGroupName string, jobName string) (result autorest.Response, err error) { req, err := client.TriggerPreparer(vaultName, resourceGroupName, jobName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobdetails.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobdetails.go index b7bd259c0..365190d00 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobdetails.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobdetails.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// JobDetailsClient is the client for the JobDetails methods of the -// Recoveryservicesbackup service. +// JobDetailsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type JobDetailsClient struct { ManagementClient } @@ -35,17 +33,15 @@ func NewJobDetailsClient(subscriptionID string) JobDetailsClient { return NewJobDetailsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient -// client. +// NewJobDetailsClientWithBaseURI creates an instance of the JobDetailsClient client. func NewJobDetailsClientWithBaseURI(baseURI string, subscriptionID string) JobDetailsClient { return JobDetailsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets exteded information associated with the job. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// jobName is name of the job whose details are to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. jobName is name of the job whose details are to be fetched. func (client JobDetailsClient) Get(vaultName string, resourceGroupName string, jobName string) (result JobResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, jobName) if err != nil { @@ -77,7 +73,7 @@ func (client JobDetailsClient) GetPreparer(vaultName string, resourceGroupName s "vaultName": autorest.Encode("path", vaultName), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/joboperationresults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/joboperationresults.go index 7e7c24965..45c2ab71a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/joboperationresults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/joboperationresults.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,20 +23,17 @@ import ( "net/http" ) -// JobOperationResultsClient is the client for the JobOperationResults methods -// of the Recoveryservicesbackup service. +// JobOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type JobOperationResultsClient struct { ManagementClient } -// NewJobOperationResultsClient creates an instance of the -// JobOperationResultsClient client. +// NewJobOperationResultsClient creates an instance of the JobOperationResultsClient client. func NewJobOperationResultsClient(subscriptionID string) JobOperationResultsClient { return NewJobOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobOperationResultsClientWithBaseURI creates an instance of the -// JobOperationResultsClient client. +// NewJobOperationResultsClientWithBaseURI creates an instance of the JobOperationResultsClient client. func NewJobOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) JobOperationResultsClient { return JobOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -45,9 +41,8 @@ func NewJobOperationResultsClientWithBaseURI(baseURI string, subscriptionID stri // Get fetches the result of any operation. // the operation. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// jobName is job name whose operation result has to be fetched. operationID is +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. jobName is job name whose operation result has to be fetched. operationID is // operationID which represents the operation whose result has to be fetched. func (client JobOperationResultsClient) Get(vaultName string, resourceGroupName string, jobName string, operationID string) (result autorest.Response, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, jobName, operationID) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobs.go index e505fe307..fe4bf893e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/jobs.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// JobsClient is the client for the Jobs methods of the Recoveryservicesbackup -// service. +// JobsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type JobsClient struct { ManagementClient } @@ -40,12 +38,10 @@ func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient return JobsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Export triggers export of jobs specified by filters and returns an -// OperationID to track. +// Export triggers export of jobs specified by filters and returns an OperationID to track. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// filter is oData filter options. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. filter is oData filter options. func (client JobsClient) Export(vaultName string, resourceGroupName string, filter string) (result autorest.Response, err error) { req, err := client.ExportPreparer(vaultName, resourceGroupName, filter) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/models.go index 153523c88..fd56c5111 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/models.go @@ -14,17 +14,29 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "net/http" ) +// BackupEngineType enumerates the values for backup engine type. +type BackupEngineType string + +const ( + // BackupEngineTypeAzureBackupServerEngine specifies the backup engine type azure backup server engine state for backup + // engine type. + BackupEngineTypeAzureBackupServerEngine BackupEngineType = "AzureBackupServerEngine" + // BackupEngineTypeDpmBackupEngine specifies the backup engine type dpm backup engine state for backup engine type. + BackupEngineTypeDpmBackupEngine BackupEngineType = "DpmBackupEngine" +) + // BackupItemType enumerates the values for backup item type. type BackupItemType string @@ -37,8 +49,7 @@ const ( Exchange BackupItemType = "Exchange" // FileFolder specifies the file folder state for backup item type. FileFolder BackupItemType = "FileFolder" - // GenericDataSource specifies the generic data source state for backup - // item type. + // GenericDataSource specifies the generic data source state for backup item type. GenericDataSource BackupItemType = "GenericDataSource" // Invalid specifies the invalid state for backup item type. Invalid BackupItemType = "Invalid" @@ -58,23 +69,18 @@ const ( type BackupManagementType string const ( - // BackupManagementTypeAzureBackupServer specifies the backup management - // type azure backup server state for backup management type. + // BackupManagementTypeAzureBackupServer specifies the backup management type azure backup server state for backup + // management type. BackupManagementTypeAzureBackupServer BackupManagementType = "AzureBackupServer" - // BackupManagementTypeAzureIaasVM specifies the backup management type - // azure iaas vm state for backup management type. + // BackupManagementTypeAzureIaasVM specifies the backup management type azure iaas vm state for backup management type. BackupManagementTypeAzureIaasVM BackupManagementType = "AzureIaasVM" - // BackupManagementTypeAzureSQL specifies the backup management type azure - // sql state for backup management type. + // BackupManagementTypeAzureSQL specifies the backup management type azure sql state for backup management type. BackupManagementTypeAzureSQL BackupManagementType = "AzureSql" - // BackupManagementTypeDPM specifies the backup management type dpm state - // for backup management type. + // BackupManagementTypeDPM specifies the backup management type dpm state for backup management type. BackupManagementTypeDPM BackupManagementType = "DPM" - // BackupManagementTypeInvalid specifies the backup management type invalid - // state for backup management type. + // BackupManagementTypeInvalid specifies the backup management type invalid state for backup management type. BackupManagementTypeInvalid BackupManagementType = "Invalid" - // BackupManagementTypeMAB specifies the backup management type mab state - // for backup management type. + // BackupManagementTypeMAB specifies the backup management type mab state for backup management type. BackupManagementTypeMAB BackupManagementType = "MAB" ) @@ -82,38 +88,28 @@ const ( type ContainerType string const ( - // ContainerTypeAzureBackupServerContainer specifies the container type - // azure backup server container state for container type. + // ContainerTypeAzureBackupServerContainer specifies the container type azure backup server container state for + // container type. ContainerTypeAzureBackupServerContainer ContainerType = "AzureBackupServerContainer" - // ContainerTypeAzureSQLContainer specifies the container type azure sql - // container state for container type. + // ContainerTypeAzureSQLContainer specifies the container type azure sql container state for container type. ContainerTypeAzureSQLContainer ContainerType = "AzureSqlContainer" - // ContainerTypeCluster specifies the container type cluster state for - // container type. + // ContainerTypeCluster specifies the container type cluster state for container type. ContainerTypeCluster ContainerType = "Cluster" - // ContainerTypeDPMContainer specifies the container type dpm container - // state for container type. + // ContainerTypeDPMContainer specifies the container type dpm container state for container type. ContainerTypeDPMContainer ContainerType = "DPMContainer" - // ContainerTypeIaasVMContainer specifies the container type iaas vm - // container state for container type. + // ContainerTypeIaasVMContainer specifies the container type iaas vm container state for container type. ContainerTypeIaasVMContainer ContainerType = "IaasVMContainer" - // ContainerTypeIaasVMServiceContainer specifies the container type iaas vm - // service container state for container type. + // ContainerTypeIaasVMServiceContainer specifies the container type iaas vm service container state for container type. ContainerTypeIaasVMServiceContainer ContainerType = "IaasVMServiceContainer" - // ContainerTypeInvalid specifies the container type invalid state for - // container type. + // ContainerTypeInvalid specifies the container type invalid state for container type. ContainerTypeInvalid ContainerType = "Invalid" - // ContainerTypeMABContainer specifies the container type mab container - // state for container type. + // ContainerTypeMABContainer specifies the container type mab container state for container type. ContainerTypeMABContainer ContainerType = "MABContainer" - // ContainerTypeUnknown specifies the container type unknown state for - // container type. + // ContainerTypeUnknown specifies the container type unknown state for container type. ContainerTypeUnknown ContainerType = "Unknown" - // ContainerTypeVCenter specifies the container type v center state for - // container type. + // ContainerTypeVCenter specifies the container type v center state for container type. ContainerTypeVCenter ContainerType = "VCenter" - // ContainerTypeWindows specifies the container type windows state for - // container type. + // ContainerTypeWindows specifies the container type windows state for container type. ContainerTypeWindows ContainerType = "Windows" ) @@ -121,38 +117,27 @@ const ( type DataSourceType string const ( - // DataSourceTypeAzureSQLDb specifies the data source type azure sql db - // state for data source type. + // DataSourceTypeAzureSQLDb specifies the data source type azure sql db state for data source type. DataSourceTypeAzureSQLDb DataSourceType = "AzureSqlDb" - // DataSourceTypeClient specifies the data source type client state for - // data source type. + // DataSourceTypeClient specifies the data source type client state for data source type. DataSourceTypeClient DataSourceType = "Client" - // DataSourceTypeExchange specifies the data source type exchange state for - // data source type. + // DataSourceTypeExchange specifies the data source type exchange state for data source type. DataSourceTypeExchange DataSourceType = "Exchange" - // DataSourceTypeFileFolder specifies the data source type file folder - // state for data source type. + // DataSourceTypeFileFolder specifies the data source type file folder state for data source type. DataSourceTypeFileFolder DataSourceType = "FileFolder" - // DataSourceTypeGenericDataSource specifies the data source type generic - // data source state for data source type. + // DataSourceTypeGenericDataSource specifies the data source type generic data source state for data source type. DataSourceTypeGenericDataSource DataSourceType = "GenericDataSource" - // DataSourceTypeInvalid specifies the data source type invalid state for - // data source type. + // DataSourceTypeInvalid specifies the data source type invalid state for data source type. DataSourceTypeInvalid DataSourceType = "Invalid" - // DataSourceTypeSharepoint specifies the data source type sharepoint state - // for data source type. + // DataSourceTypeSharepoint specifies the data source type sharepoint state for data source type. DataSourceTypeSharepoint DataSourceType = "Sharepoint" - // DataSourceTypeSQLDB specifies the data source type sqldb state for data - // source type. + // DataSourceTypeSQLDB specifies the data source type sqldb state for data source type. DataSourceTypeSQLDB DataSourceType = "SQLDB" - // DataSourceTypeSystemState specifies the data source type system state - // state for data source type. + // DataSourceTypeSystemState specifies the data source type system state state for data source type. DataSourceTypeSystemState DataSourceType = "SystemState" - // DataSourceTypeVM specifies the data source type vm state for data source - // type. + // DataSourceTypeVM specifies the data source type vm state for data source type. DataSourceTypeVM DataSourceType = "VM" - // DataSourceTypeVMwareVM specifies the data source type v mware vm state - // for data source type. + // DataSourceTypeVMwareVM specifies the data source type v mware vm state for data source type. DataSourceTypeVMwareVM DataSourceType = "VMwareVM" ) @@ -180,14 +165,11 @@ const ( type EnhancedSecurityState string const ( - // EnhancedSecurityStateDisabled specifies the enhanced security state - // disabled state for enhanced security state. + // EnhancedSecurityStateDisabled specifies the enhanced security state disabled state for enhanced security state. EnhancedSecurityStateDisabled EnhancedSecurityState = "Disabled" - // EnhancedSecurityStateEnabled specifies the enhanced security state - // enabled state for enhanced security state. + // EnhancedSecurityStateEnabled specifies the enhanced security state enabled state for enhanced security state. EnhancedSecurityStateEnabled EnhancedSecurityState = "Enabled" - // EnhancedSecurityStateInvalid specifies the enhanced security state - // invalid state for enhanced security state. + // EnhancedSecurityStateInvalid specifies the enhanced security state invalid state for enhanced security state. EnhancedSecurityStateInvalid EnhancedSecurityState = "Invalid" ) @@ -195,17 +177,13 @@ const ( type HealthState string const ( - // HealthStateActionRequired specifies the health state action required - // state for health state. + // HealthStateActionRequired specifies the health state action required state for health state. HealthStateActionRequired HealthState = "ActionRequired" - // HealthStateActionSuggested specifies the health state action suggested - // state for health state. + // HealthStateActionSuggested specifies the health state action suggested state for health state. HealthStateActionSuggested HealthState = "ActionSuggested" - // HealthStateInvalid specifies the health state invalid state for health - // state. + // HealthStateInvalid specifies the health state invalid state for health state. HealthStateInvalid HealthState = "Invalid" - // HealthStatePassed specifies the health state passed state for health - // state. + // HealthStatePassed specifies the health state passed state for health state. HealthStatePassed HealthState = "Passed" ) @@ -213,17 +191,13 @@ const ( type HealthStatus string const ( - // HealthStatusActionRequired specifies the health status action required - // state for health status. + // HealthStatusActionRequired specifies the health status action required state for health status. HealthStatusActionRequired HealthStatus = "ActionRequired" - // HealthStatusActionSuggested specifies the health status action suggested - // state for health status. + // HealthStatusActionSuggested specifies the health status action suggested state for health status. HealthStatusActionSuggested HealthStatus = "ActionSuggested" - // HealthStatusInvalid specifies the health status invalid state for health - // status. + // HealthStatusInvalid specifies the health status invalid state for health status. HealthStatusInvalid HealthStatus = "Invalid" - // HealthStatusPassed specifies the health status passed state for health - // status. + // HealthStatusPassed specifies the health status passed state for health status. HealthStatusPassed HealthStatus = "Passed" ) @@ -245,8 +219,7 @@ const ( Continue HTTPStatusCode = "Continue" // Created specifies the created state for http status code. Created HTTPStatusCode = "Created" - // ExpectationFailed specifies the expectation failed state for http status - // code. + // ExpectationFailed specifies the expectation failed state for http status code. ExpectationFailed HTTPStatusCode = "ExpectationFailed" // Forbidden specifies the forbidden state for http status code. Forbidden HTTPStatusCode = "Forbidden" @@ -256,29 +229,23 @@ const ( GatewayTimeout HTTPStatusCode = "GatewayTimeout" // Gone specifies the gone state for http status code. Gone HTTPStatusCode = "Gone" - // HTTPVersionNotSupported specifies the http version not supported state - // for http status code. + // HTTPVersionNotSupported specifies the http version not supported state for http status code. HTTPVersionNotSupported HTTPStatusCode = "HttpVersionNotSupported" - // InternalServerError specifies the internal server error state for http - // status code. + // InternalServerError specifies the internal server error state for http status code. InternalServerError HTTPStatusCode = "InternalServerError" // LengthRequired specifies the length required state for http status code. LengthRequired HTTPStatusCode = "LengthRequired" - // MethodNotAllowed specifies the method not allowed state for http status - // code. + // MethodNotAllowed specifies the method not allowed state for http status code. MethodNotAllowed HTTPStatusCode = "MethodNotAllowed" // Moved specifies the moved state for http status code. Moved HTTPStatusCode = "Moved" - // MovedPermanently specifies the moved permanently state for http status - // code. + // MovedPermanently specifies the moved permanently state for http status code. MovedPermanently HTTPStatusCode = "MovedPermanently" - // MultipleChoices specifies the multiple choices state for http status - // code. + // MultipleChoices specifies the multiple choices state for http status code. MultipleChoices HTTPStatusCode = "MultipleChoices" // NoContent specifies the no content state for http status code. NoContent HTTPStatusCode = "NoContent" - // NonAuthoritativeInformation specifies the non authoritative information - // state for http status code. + // NonAuthoritativeInformation specifies the non authoritative information state for http status code. NonAuthoritativeInformation HTTPStatusCode = "NonAuthoritativeInformation" // NotAcceptable specifies the not acceptable state for http status code. NotAcceptable HTTPStatusCode = "NotAcceptable" @@ -292,55 +259,43 @@ const ( OK HTTPStatusCode = "OK" // PartialContent specifies the partial content state for http status code. PartialContent HTTPStatusCode = "PartialContent" - // PaymentRequired specifies the payment required state for http status - // code. + // PaymentRequired specifies the payment required state for http status code. PaymentRequired HTTPStatusCode = "PaymentRequired" - // PreconditionFailed specifies the precondition failed state for http - // status code. + // PreconditionFailed specifies the precondition failed state for http status code. PreconditionFailed HTTPStatusCode = "PreconditionFailed" - // ProxyAuthenticationRequired specifies the proxy authentication required - // state for http status code. + // ProxyAuthenticationRequired specifies the proxy authentication required state for http status code. ProxyAuthenticationRequired HTTPStatusCode = "ProxyAuthenticationRequired" // Redirect specifies the redirect state for http status code. Redirect HTTPStatusCode = "Redirect" - // RedirectKeepVerb specifies the redirect keep verb state for http status - // code. + // RedirectKeepVerb specifies the redirect keep verb state for http status code. RedirectKeepVerb HTTPStatusCode = "RedirectKeepVerb" // RedirectMethod specifies the redirect method state for http status code. RedirectMethod HTTPStatusCode = "RedirectMethod" - // RequestedRangeNotSatisfiable specifies the requested range not - // satisfiable state for http status code. + // RequestedRangeNotSatisfiable specifies the requested range not satisfiable state for http status code. RequestedRangeNotSatisfiable HTTPStatusCode = "RequestedRangeNotSatisfiable" - // RequestEntityTooLarge specifies the request entity too large state for - // http status code. + // RequestEntityTooLarge specifies the request entity too large state for http status code. RequestEntityTooLarge HTTPStatusCode = "RequestEntityTooLarge" // RequestTimeout specifies the request timeout state for http status code. RequestTimeout HTTPStatusCode = "RequestTimeout" - // RequestURITooLong specifies the request uri too long state for http - // status code. + // RequestURITooLong specifies the request uri too long state for http status code. RequestURITooLong HTTPStatusCode = "RequestUriTooLong" // ResetContent specifies the reset content state for http status code. ResetContent HTTPStatusCode = "ResetContent" // SeeOther specifies the see other state for http status code. SeeOther HTTPStatusCode = "SeeOther" - // ServiceUnavailable specifies the service unavailable state for http - // status code. + // ServiceUnavailable specifies the service unavailable state for http status code. ServiceUnavailable HTTPStatusCode = "ServiceUnavailable" - // SwitchingProtocols specifies the switching protocols state for http - // status code. + // SwitchingProtocols specifies the switching protocols state for http status code. SwitchingProtocols HTTPStatusCode = "SwitchingProtocols" - // TemporaryRedirect specifies the temporary redirect state for http status - // code. + // TemporaryRedirect specifies the temporary redirect state for http status code. TemporaryRedirect HTTPStatusCode = "TemporaryRedirect" // Unauthorized specifies the unauthorized state for http status code. Unauthorized HTTPStatusCode = "Unauthorized" - // UnsupportedMediaType specifies the unsupported media type state for http - // status code. + // UnsupportedMediaType specifies the unsupported media type state for http status code. UnsupportedMediaType HTTPStatusCode = "UnsupportedMediaType" // Unused specifies the unused state for http status code. Unused HTTPStatusCode = "Unused" - // UpgradeRequired specifies the upgrade required state for http status - // code. + // UpgradeRequired specifies the upgrade required state for http status code. UpgradeRequired HTTPStatusCode = "UpgradeRequired" // UseProxy specifies the use proxy state for http status code. UseProxy HTTPStatusCode = "UseProxy" @@ -350,29 +305,21 @@ const ( type JobOperationType string const ( - // JobOperationTypeBackup specifies the job operation type backup state for - // job operation type. + // JobOperationTypeBackup specifies the job operation type backup state for job operation type. JobOperationTypeBackup JobOperationType = "Backup" - // JobOperationTypeConfigureBackup specifies the job operation type - // configure backup state for job operation type. + // JobOperationTypeConfigureBackup specifies the job operation type configure backup state for job operation type. JobOperationTypeConfigureBackup JobOperationType = "ConfigureBackup" - // JobOperationTypeDeleteBackupData specifies the job operation type delete - // backup data state for job operation type. + // JobOperationTypeDeleteBackupData specifies the job operation type delete backup data state for job operation type. JobOperationTypeDeleteBackupData JobOperationType = "DeleteBackupData" - // JobOperationTypeDisableBackup specifies the job operation type disable - // backup state for job operation type. + // JobOperationTypeDisableBackup specifies the job operation type disable backup state for job operation type. JobOperationTypeDisableBackup JobOperationType = "DisableBackup" - // JobOperationTypeInvalid specifies the job operation type invalid state - // for job operation type. + // JobOperationTypeInvalid specifies the job operation type invalid state for job operation type. JobOperationTypeInvalid JobOperationType = "Invalid" - // JobOperationTypeRegister specifies the job operation type register state - // for job operation type. + // JobOperationTypeRegister specifies the job operation type register state for job operation type. JobOperationTypeRegister JobOperationType = "Register" - // JobOperationTypeRestore specifies the job operation type restore state - // for job operation type. + // JobOperationTypeRestore specifies the job operation type restore state for job operation type. JobOperationTypeRestore JobOperationType = "Restore" - // JobOperationTypeUnRegister specifies the job operation type un register - // state for job operation type. + // JobOperationTypeUnRegister specifies the job operation type un register state for job operation type. JobOperationTypeUnRegister JobOperationType = "UnRegister" ) @@ -380,22 +327,17 @@ const ( type JobStatus string const ( - // JobStatusCancelled specifies the job status cancelled state for job - // status. + // JobStatusCancelled specifies the job status cancelled state for job status. JobStatusCancelled JobStatus = "Cancelled" - // JobStatusCancelling specifies the job status cancelling state for job - // status. + // JobStatusCancelling specifies the job status cancelling state for job status. JobStatusCancelling JobStatus = "Cancelling" - // JobStatusCompleted specifies the job status completed state for job - // status. + // JobStatusCompleted specifies the job status completed state for job status. JobStatusCompleted JobStatus = "Completed" - // JobStatusCompletedWithWarnings specifies the job status completed with - // warnings state for job status. + // JobStatusCompletedWithWarnings specifies the job status completed with warnings state for job status. JobStatusCompletedWithWarnings JobStatus = "CompletedWithWarnings" // JobStatusFailed specifies the job status failed state for job status. JobStatusFailed JobStatus = "Failed" - // JobStatusInProgress specifies the job status in progress state for job - // status. + // JobStatusInProgress specifies the job status in progress state for job status. JobStatusInProgress JobStatus = "InProgress" // JobStatusInvalid specifies the job status invalid state for job status. JobStatusInvalid JobStatus = "Invalid" @@ -405,53 +347,53 @@ const ( type JobSupportedAction string const ( - // JobSupportedActionCancellable specifies the job supported action - // cancellable state for job supported action. + // JobSupportedActionCancellable specifies the job supported action cancellable state for job supported action. JobSupportedActionCancellable JobSupportedAction = "Cancellable" - // JobSupportedActionInvalid specifies the job supported action invalid - // state for job supported action. + // JobSupportedActionInvalid specifies the job supported action invalid state for job supported action. JobSupportedActionInvalid JobSupportedAction = "Invalid" - // JobSupportedActionRetriable specifies the job supported action retriable - // state for job supported action. + // JobSupportedActionRetriable specifies the job supported action retriable state for job supported action. JobSupportedActionRetriable JobSupportedAction = "Retriable" ) +// JobType enumerates the values for job type. +type JobType string + +const ( + // JobTypeAzureIaaSVMJob specifies the job type azure iaa svm job state for job type. + JobTypeAzureIaaSVMJob JobType = "AzureIaaSVMJob" + // JobTypeDpmJob specifies the job type dpm job state for job type. + JobTypeDpmJob JobType = "DpmJob" + // JobTypeMabJob specifies the job type mab job state for job type. + JobTypeMabJob JobType = "MabJob" +) + // MabServerType enumerates the values for mab server type. type MabServerType string const ( - // MabServerTypeAzureBackupServerContainer specifies the mab server type - // azure backup server container state for mab server type. + // MabServerTypeAzureBackupServerContainer specifies the mab server type azure backup server container state for mab + // server type. MabServerTypeAzureBackupServerContainer MabServerType = "AzureBackupServerContainer" - // MabServerTypeAzureSQLContainer specifies the mab server type azure sql - // container state for mab server type. + // MabServerTypeAzureSQLContainer specifies the mab server type azure sql container state for mab server type. MabServerTypeAzureSQLContainer MabServerType = "AzureSqlContainer" - // MabServerTypeCluster specifies the mab server type cluster state for mab - // server type. + // MabServerTypeCluster specifies the mab server type cluster state for mab server type. MabServerTypeCluster MabServerType = "Cluster" - // MabServerTypeDPMContainer specifies the mab server type dpm container - // state for mab server type. + // MabServerTypeDPMContainer specifies the mab server type dpm container state for mab server type. MabServerTypeDPMContainer MabServerType = "DPMContainer" - // MabServerTypeIaasVMContainer specifies the mab server type iaas vm - // container state for mab server type. + // MabServerTypeIaasVMContainer specifies the mab server type iaas vm container state for mab server type. MabServerTypeIaasVMContainer MabServerType = "IaasVMContainer" - // MabServerTypeIaasVMServiceContainer specifies the mab server type iaas - // vm service container state for mab server type. + // MabServerTypeIaasVMServiceContainer specifies the mab server type iaas vm service container state for mab server + // type. MabServerTypeIaasVMServiceContainer MabServerType = "IaasVMServiceContainer" - // MabServerTypeInvalid specifies the mab server type invalid state for mab - // server type. + // MabServerTypeInvalid specifies the mab server type invalid state for mab server type. MabServerTypeInvalid MabServerType = "Invalid" - // MabServerTypeMABContainer specifies the mab server type mab container - // state for mab server type. + // MabServerTypeMABContainer specifies the mab server type mab container state for mab server type. MabServerTypeMABContainer MabServerType = "MABContainer" - // MabServerTypeUnknown specifies the mab server type unknown state for mab - // server type. + // MabServerTypeUnknown specifies the mab server type unknown state for mab server type. MabServerTypeUnknown MabServerType = "Unknown" - // MabServerTypeVCenter specifies the mab server type v center state for - // mab server type. + // MabServerTypeVCenter specifies the mab server type v center state for mab server type. MabServerTypeVCenter MabServerType = "VCenter" - // MabServerTypeWindows specifies the mab server type windows state for mab - // server type. + // MabServerTypeWindows specifies the mab server type windows state for mab server type. MabServerTypeWindows MabServerType = "Windows" ) @@ -459,112 +401,216 @@ const ( type MonthOfYear string const ( - // MonthOfYearApril specifies the month of year april state for month of - // year. + // MonthOfYearApril specifies the month of year april state for month of year. MonthOfYearApril MonthOfYear = "April" - // MonthOfYearAugust specifies the month of year august state for month of - // year. + // MonthOfYearAugust specifies the month of year august state for month of year. MonthOfYearAugust MonthOfYear = "August" - // MonthOfYearDecember specifies the month of year december state for month - // of year. + // MonthOfYearDecember specifies the month of year december state for month of year. MonthOfYearDecember MonthOfYear = "December" - // MonthOfYearFebruary specifies the month of year february state for month - // of year. + // MonthOfYearFebruary specifies the month of year february state for month of year. MonthOfYearFebruary MonthOfYear = "February" - // MonthOfYearInvalid specifies the month of year invalid state for month - // of year. + // MonthOfYearInvalid specifies the month of year invalid state for month of year. MonthOfYearInvalid MonthOfYear = "Invalid" - // MonthOfYearJanuary specifies the month of year january state for month - // of year. + // MonthOfYearJanuary specifies the month of year january state for month of year. MonthOfYearJanuary MonthOfYear = "January" - // MonthOfYearJuly specifies the month of year july state for month of - // year. + // MonthOfYearJuly specifies the month of year july state for month of year. MonthOfYearJuly MonthOfYear = "July" - // MonthOfYearJune specifies the month of year june state for month of - // year. + // MonthOfYearJune specifies the month of year june state for month of year. MonthOfYearJune MonthOfYear = "June" - // MonthOfYearMarch specifies the month of year march state for month of - // year. + // MonthOfYearMarch specifies the month of year march state for month of year. MonthOfYearMarch MonthOfYear = "March" // MonthOfYearMay specifies the month of year may state for month of year. MonthOfYearMay MonthOfYear = "May" - // MonthOfYearNovember specifies the month of year november state for month - // of year. + // MonthOfYearNovember specifies the month of year november state for month of year. MonthOfYearNovember MonthOfYear = "November" - // MonthOfYearOctober specifies the month of year october state for month - // of year. + // MonthOfYearOctober specifies the month of year october state for month of year. MonthOfYearOctober MonthOfYear = "October" - // MonthOfYearSeptember specifies the month of year september state for - // month of year. + // MonthOfYearSeptember specifies the month of year september state for month of year. MonthOfYearSeptember MonthOfYear = "September" ) +// ObjectType enumerates the values for object type. +type ObjectType string + +const ( + // ObjectTypeIaasVMBackupRequest specifies the object type iaas vm backup request state for object type. + ObjectTypeIaasVMBackupRequest ObjectType = "IaasVMBackupRequest" +) + +// ObjectTypeILRRequest enumerates the values for object type ilr request. +type ObjectTypeILRRequest string + +const ( + // ObjectTypeIaasVMILRRegistrationRequest specifies the object type iaas vmilr registration request state for object + // type ilr request. + ObjectTypeIaasVMILRRegistrationRequest ObjectTypeILRRequest = "IaasVMILRRegistrationRequest" +) + +// ObjectTypeOperationResultInfoBase enumerates the values for object type operation result info base. +type ObjectTypeOperationResultInfoBase string + +const ( + // ObjectTypeExportJobsOperationResultInfo specifies the object type export jobs operation result info state for object + // type operation result info base. + ObjectTypeExportJobsOperationResultInfo ObjectTypeOperationResultInfoBase = "ExportJobsOperationResultInfo" + // ObjectTypeOperationResultInfo specifies the object type operation result info state for object type operation result + // info base. + ObjectTypeOperationResultInfo ObjectTypeOperationResultInfoBase = "OperationResultInfo" +) + +// ObjectTypeOperationStatusExtendedInfo enumerates the values for object type operation status extended info. +type ObjectTypeOperationStatusExtendedInfo string + +const ( + // ObjectTypeOperationStatusJobExtendedInfo specifies the object type operation status job extended info state for + // object type operation status extended info. + ObjectTypeOperationStatusJobExtendedInfo ObjectTypeOperationStatusExtendedInfo = "OperationStatusJobExtendedInfo" + // ObjectTypeOperationStatusJobsExtendedInfo specifies the object type operation status jobs extended info state for + // object type operation status extended info. + ObjectTypeOperationStatusJobsExtendedInfo ObjectTypeOperationStatusExtendedInfo = "OperationStatusJobsExtendedInfo" + // ObjectTypeOperationStatusProvisionILRExtendedInfo specifies the object type operation status provision ilr extended + // info state for object type operation status extended info. + ObjectTypeOperationStatusProvisionILRExtendedInfo ObjectTypeOperationStatusExtendedInfo = "OperationStatusProvisionILRExtendedInfo" +) + +// ObjectTypeRecoveryPoint enumerates the values for object type recovery point. +type ObjectTypeRecoveryPoint string + +const ( + // ObjectTypeGenericRecoveryPoint specifies the object type generic recovery point state for object type recovery + // point. + ObjectTypeGenericRecoveryPoint ObjectTypeRecoveryPoint = "GenericRecoveryPoint" + // ObjectTypeIaasVMRecoveryPoint specifies the object type iaas vm recovery point state for object type recovery point. + ObjectTypeIaasVMRecoveryPoint ObjectTypeRecoveryPoint = "IaasVMRecoveryPoint" +) + +// ObjectTypeRestoreRequest enumerates the values for object type restore request. +type ObjectTypeRestoreRequest string + +const ( + // ObjectTypeIaasVMRestoreRequest specifies the object type iaas vm restore request state for object type restore + // request. + ObjectTypeIaasVMRestoreRequest ObjectTypeRestoreRequest = "IaasVMRestoreRequest" +) + // OperationStatusValues enumerates the values for operation status values. type OperationStatusValues string const ( - // OperationStatusValuesCanceled specifies the operation status values - // canceled state for operation status values. + // OperationStatusValuesCanceled specifies the operation status values canceled state for operation status values. OperationStatusValuesCanceled OperationStatusValues = "Canceled" - // OperationStatusValuesFailed specifies the operation status values failed - // state for operation status values. + // OperationStatusValuesFailed specifies the operation status values failed state for operation status values. OperationStatusValuesFailed OperationStatusValues = "Failed" - // OperationStatusValuesInProgress specifies the operation status values in - // progress state for operation status values. + // OperationStatusValuesInProgress specifies the operation status values in progress state for operation status values. OperationStatusValuesInProgress OperationStatusValues = "InProgress" - // OperationStatusValuesInvalid specifies the operation status values - // invalid state for operation status values. + // OperationStatusValuesInvalid specifies the operation status values invalid state for operation status values. OperationStatusValuesInvalid OperationStatusValues = "Invalid" - // OperationStatusValuesSucceeded specifies the operation status values - // succeeded state for operation status values. + // OperationStatusValuesSucceeded specifies the operation status values succeeded state for operation status values. OperationStatusValuesSucceeded OperationStatusValues = "Succeeded" ) +// ProtectableItemType enumerates the values for protectable item type. +type ProtectableItemType string + +const ( + // ProtectableItemTypeIaaSVMProtectableItem specifies the protectable item type iaa svm protectable item state for + // protectable item type. + ProtectableItemTypeIaaSVMProtectableItem ProtectableItemType = "IaaSVMProtectableItem" + // ProtectableItemTypeMicrosoftClassicComputevirtualMachines specifies the protectable item type microsoft classic + // computevirtual machines state for protectable item type. + ProtectableItemTypeMicrosoftClassicComputevirtualMachines ProtectableItemType = "Microsoft.ClassicCompute/virtualMachines" + // ProtectableItemTypeMicrosoftComputevirtualMachines specifies the protectable item type microsoft computevirtual + // machines state for protectable item type. + ProtectableItemTypeMicrosoftComputevirtualMachines ProtectableItemType = "Microsoft.Compute/virtualMachines" +) + +// ProtectableObjectType enumerates the values for protectable object type. +type ProtectableObjectType string + +const ( + // ProtectableObjectTypeAzureBackupServerContainer specifies the protectable object type azure backup server container + // state for protectable object type. + ProtectableObjectTypeAzureBackupServerContainer ProtectableObjectType = "AzureBackupServerContainer" + // ProtectableObjectTypeAzureSQLContainer specifies the protectable object type azure sql container state for + // protectable object type. + ProtectableObjectTypeAzureSQLContainer ProtectableObjectType = "AzureSqlContainer" + // ProtectableObjectTypeDPMContainer specifies the protectable object type dpm container state for protectable object + // type. + ProtectableObjectTypeDPMContainer ProtectableObjectType = "DPMContainer" + // ProtectableObjectTypeIaaSVMContainer specifies the protectable object type iaa svm container state for protectable + // object type. + ProtectableObjectTypeIaaSVMContainer ProtectableObjectType = "IaaSVMContainer" + // ProtectableObjectTypeMABWindowsContainer specifies the protectable object type mab windows container state for + // protectable object type. + ProtectableObjectTypeMABWindowsContainer ProtectableObjectType = "MABWindowsContainer" + // ProtectableObjectTypeMicrosoftClassicComputevirtualMachines specifies the protectable object type microsoft classic + // computevirtual machines state for protectable object type. + ProtectableObjectTypeMicrosoftClassicComputevirtualMachines ProtectableObjectType = "Microsoft.ClassicCompute/virtualMachines" + // ProtectableObjectTypeMicrosoftComputevirtualMachines specifies the protectable object type microsoft computevirtual + // machines state for protectable object type. + ProtectableObjectTypeMicrosoftComputevirtualMachines ProtectableObjectType = "Microsoft.Compute/virtualMachines" +) + // ProtectedItemState enumerates the values for protected item state. type ProtectedItemState string const ( - // ProtectedItemStateInvalid specifies the protected item state invalid - // state for protected item state. + // ProtectedItemStateInvalid specifies the protected item state invalid state for protected item state. ProtectedItemStateInvalid ProtectedItemState = "Invalid" - // ProtectedItemStateIRPending specifies the protected item state ir - // pending state for protected item state. + // ProtectedItemStateIRPending specifies the protected item state ir pending state for protected item state. ProtectedItemStateIRPending ProtectedItemState = "IRPending" - // ProtectedItemStateProtected specifies the protected item state protected - // state for protected item state. + // ProtectedItemStateProtected specifies the protected item state protected state for protected item state. ProtectedItemStateProtected ProtectedItemState = "Protected" - // ProtectedItemStateProtectionError specifies the protected item state - // protection error state for protected item state. + // ProtectedItemStateProtectionError specifies the protected item state protection error state for protected item + // state. ProtectedItemStateProtectionError ProtectedItemState = "ProtectionError" - // ProtectedItemStateProtectionPaused specifies the protected item state - // protection paused state for protected item state. + // ProtectedItemStateProtectionPaused specifies the protected item state protection paused state for protected item + // state. ProtectedItemStateProtectionPaused ProtectedItemState = "ProtectionPaused" - // ProtectedItemStateProtectionStopped specifies the protected item state - // protection stopped state for protected item state. + // ProtectedItemStateProtectionStopped specifies the protected item state protection stopped state for protected item + // state. ProtectedItemStateProtectionStopped ProtectedItemState = "ProtectionStopped" ) +// ProtectedItemType enumerates the values for protected item type. +type ProtectedItemType string + +const ( + // ProtectedItemTypeAzureIaaSVMProtectedItem specifies the protected item type azure iaa svm protected item state for + // protected item type. + ProtectedItemTypeAzureIaaSVMProtectedItem ProtectedItemType = "AzureIaaSVMProtectedItem" + // ProtectedItemTypeDPMProtectedItem specifies the protected item type dpm protected item state for protected item + // type. + ProtectedItemTypeDPMProtectedItem ProtectedItemType = "DPMProtectedItem" + // ProtectedItemTypeMabFileFolderProtectedItem specifies the protected item type mab file folder protected item state + // for protected item type. + ProtectedItemTypeMabFileFolderProtectedItem ProtectedItemType = "MabFileFolderProtectedItem" + // ProtectedItemTypeMicrosoftClassicComputevirtualMachines specifies the protected item type microsoft classic + // computevirtual machines state for protected item type. + ProtectedItemTypeMicrosoftClassicComputevirtualMachines ProtectedItemType = "Microsoft.ClassicCompute/virtualMachines" + // ProtectedItemTypeMicrosoftComputevirtualMachines specifies the protected item type microsoft computevirtual machines + // state for protected item type. + ProtectedItemTypeMicrosoftComputevirtualMachines ProtectedItemType = "Microsoft.Compute/virtualMachines" + // ProtectedItemTypeMicrosoftSqlserversdatabases specifies the protected item type microsoft sqlserversdatabases state + // for protected item type. + ProtectedItemTypeMicrosoftSqlserversdatabases ProtectedItemType = "Microsoft.Sql/servers/databases" +) + // ProtectionState enumerates the values for protection state. type ProtectionState string const ( - // ProtectionStateInvalid specifies the protection state invalid state for - // protection state. + // ProtectionStateInvalid specifies the protection state invalid state for protection state. ProtectionStateInvalid ProtectionState = "Invalid" - // ProtectionStateIRPending specifies the protection state ir pending state - // for protection state. + // ProtectionStateIRPending specifies the protection state ir pending state for protection state. ProtectionStateIRPending ProtectionState = "IRPending" - // ProtectionStateProtected specifies the protection state protected state - // for protection state. + // ProtectionStateProtected specifies the protection state protected state for protection state. ProtectionStateProtected ProtectionState = "Protected" - // ProtectionStateProtectionError specifies the protection state protection - // error state for protection state. + // ProtectionStateProtectionError specifies the protection state protection error state for protection state. ProtectionStateProtectionError ProtectionState = "ProtectionError" - // ProtectionStateProtectionPaused specifies the protection state - // protection paused state for protection state. + // ProtectionStateProtectionPaused specifies the protection state protection paused state for protection state. ProtectionStateProtectionPaused ProtectionState = "ProtectionPaused" - // ProtectionStateProtectionStopped specifies the protection state - // protection stopped state for protection state. + // ProtectionStateProtectionStopped specifies the protection state protection stopped state for protection state. ProtectionStateProtectionStopped ProtectionState = "ProtectionStopped" ) @@ -572,36 +618,30 @@ const ( type ProtectionStatus string const ( - // ProtectionStatusInvalid specifies the protection status invalid state - // for protection status. + // ProtectionStatusInvalid specifies the protection status invalid state for protection status. ProtectionStatusInvalid ProtectionStatus = "Invalid" - // ProtectionStatusNotProtected specifies the protection status not - // protected state for protection status. + // ProtectionStatusNotProtected specifies the protection status not protected state for protection status. ProtectionStatusNotProtected ProtectionStatus = "NotProtected" - // ProtectionStatusProtected specifies the protection status protected - // state for protection status. + // ProtectionStatusProtected specifies the protection status protected state for protection status. ProtectionStatusProtected ProtectionStatus = "Protected" - // ProtectionStatusProtecting specifies the protection status protecting - // state for protection status. + // ProtectionStatusProtecting specifies the protection status protecting state for protection status. ProtectionStatusProtecting ProtectionStatus = "Protecting" ) -// RecoveryPointTierStatus enumerates the values for recovery point tier -// status. +// RecoveryPointTierStatus enumerates the values for recovery point tier status. type RecoveryPointTierStatus string const ( - // RecoveryPointTierStatusDeleted specifies the recovery point tier status - // deleted state for recovery point tier status. + // RecoveryPointTierStatusDeleted specifies the recovery point tier status deleted state for recovery point tier + // status. RecoveryPointTierStatusDeleted RecoveryPointTierStatus = "Deleted" - // RecoveryPointTierStatusDisabled specifies the recovery point tier status - // disabled state for recovery point tier status. + // RecoveryPointTierStatusDisabled specifies the recovery point tier status disabled state for recovery point tier + // status. RecoveryPointTierStatusDisabled RecoveryPointTierStatus = "Disabled" - // RecoveryPointTierStatusInvalid specifies the recovery point tier status - // invalid state for recovery point tier status. + // RecoveryPointTierStatusInvalid specifies the recovery point tier status invalid state for recovery point tier + // status. RecoveryPointTierStatusInvalid RecoveryPointTierStatus = "Invalid" - // RecoveryPointTierStatusValid specifies the recovery point tier status - // valid state for recovery point tier status. + // RecoveryPointTierStatusValid specifies the recovery point tier status valid state for recovery point tier status. RecoveryPointTierStatusValid RecoveryPointTierStatus = "Valid" ) @@ -609,14 +649,12 @@ const ( type RecoveryPointTierType string const ( - // RecoveryPointTierTypeHardenedRP specifies the recovery point tier type - // hardened rp state for recovery point tier type. + // RecoveryPointTierTypeHardenedRP specifies the recovery point tier type hardened rp state for recovery point tier + // type. RecoveryPointTierTypeHardenedRP RecoveryPointTierType = "HardenedRP" - // RecoveryPointTierTypeInstantRP specifies the recovery point tier type - // instant rp state for recovery point tier type. + // RecoveryPointTierTypeInstantRP specifies the recovery point tier type instant rp state for recovery point tier type. RecoveryPointTierTypeInstantRP RecoveryPointTierType = "InstantRP" - // RecoveryPointTierTypeInvalid specifies the recovery point tier type - // invalid state for recovery point tier type. + // RecoveryPointTierTypeInvalid specifies the recovery point tier type invalid state for recovery point tier type. RecoveryPointTierTypeInvalid RecoveryPointTierType = "Invalid" ) @@ -624,17 +662,13 @@ const ( type RecoveryType string const ( - // RecoveryTypeAlternateLocation specifies the recovery type alternate - // location state for recovery type. + // RecoveryTypeAlternateLocation specifies the recovery type alternate location state for recovery type. RecoveryTypeAlternateLocation RecoveryType = "AlternateLocation" - // RecoveryTypeInvalid specifies the recovery type invalid state for - // recovery type. + // RecoveryTypeInvalid specifies the recovery type invalid state for recovery type. RecoveryTypeInvalid RecoveryType = "Invalid" - // RecoveryTypeOriginalLocation specifies the recovery type original - // location state for recovery type. + // RecoveryTypeOriginalLocation specifies the recovery type original location state for recovery type. RecoveryTypeOriginalLocation RecoveryType = "OriginalLocation" - // RecoveryTypeRestoreDisks specifies the recovery type restore disks state - // for recovery type. + // RecoveryTypeRestoreDisks specifies the recovery type restore disks state for recovery type. RecoveryTypeRestoreDisks RecoveryType = "RestoreDisks" ) @@ -642,50 +676,63 @@ const ( type RetentionDurationType string const ( - // RetentionDurationTypeDays specifies the retention duration type days - // state for retention duration type. + // RetentionDurationTypeDays specifies the retention duration type days state for retention duration type. RetentionDurationTypeDays RetentionDurationType = "Days" - // RetentionDurationTypeInvalid specifies the retention duration type - // invalid state for retention duration type. + // RetentionDurationTypeInvalid specifies the retention duration type invalid state for retention duration type. RetentionDurationTypeInvalid RetentionDurationType = "Invalid" - // RetentionDurationTypeMonths specifies the retention duration type months - // state for retention duration type. + // RetentionDurationTypeMonths specifies the retention duration type months state for retention duration type. RetentionDurationTypeMonths RetentionDurationType = "Months" - // RetentionDurationTypeWeeks specifies the retention duration type weeks - // state for retention duration type. + // RetentionDurationTypeWeeks specifies the retention duration type weeks state for retention duration type. RetentionDurationTypeWeeks RetentionDurationType = "Weeks" - // RetentionDurationTypeYears specifies the retention duration type years - // state for retention duration type. + // RetentionDurationTypeYears specifies the retention duration type years state for retention duration type. RetentionDurationTypeYears RetentionDurationType = "Years" ) +// RetentionPolicyType enumerates the values for retention policy type. +type RetentionPolicyType string + +const ( + // RetentionPolicyTypeLongTermRetentionPolicy specifies the retention policy type long term retention policy state for + // retention policy type. + RetentionPolicyTypeLongTermRetentionPolicy RetentionPolicyType = "LongTermRetentionPolicy" + // RetentionPolicyTypeSimpleRetentionPolicy specifies the retention policy type simple retention policy state for + // retention policy type. + RetentionPolicyTypeSimpleRetentionPolicy RetentionPolicyType = "SimpleRetentionPolicy" +) + // RetentionScheduleFormat enumerates the values for retention schedule format. type RetentionScheduleFormat string const ( - // RetentionScheduleFormatDaily specifies the retention schedule format - // daily state for retention schedule format. + // RetentionScheduleFormatDaily specifies the retention schedule format daily state for retention schedule format. RetentionScheduleFormatDaily RetentionScheduleFormat = "Daily" - // RetentionScheduleFormatInvalid specifies the retention schedule format - // invalid state for retention schedule format. + // RetentionScheduleFormatInvalid specifies the retention schedule format invalid state for retention schedule format. RetentionScheduleFormatInvalid RetentionScheduleFormat = "Invalid" - // RetentionScheduleFormatWeekly specifies the retention schedule format - // weekly state for retention schedule format. + // RetentionScheduleFormatWeekly specifies the retention schedule format weekly state for retention schedule format. RetentionScheduleFormatWeekly RetentionScheduleFormat = "Weekly" ) +// SchedulePolicyType enumerates the values for schedule policy type. +type SchedulePolicyType string + +const ( + // SchedulePolicyTypeLongTermSchedulePolicy specifies the schedule policy type long term schedule policy state for + // schedule policy type. + SchedulePolicyTypeLongTermSchedulePolicy SchedulePolicyType = "LongTermSchedulePolicy" + // SchedulePolicyTypeSimpleSchedulePolicy specifies the schedule policy type simple schedule policy state for schedule + // policy type. + SchedulePolicyTypeSimpleSchedulePolicy SchedulePolicyType = "SimpleSchedulePolicy" +) + // ScheduleRunType enumerates the values for schedule run type. type ScheduleRunType string const ( - // ScheduleRunTypeDaily specifies the schedule run type daily state for - // schedule run type. + // ScheduleRunTypeDaily specifies the schedule run type daily state for schedule run type. ScheduleRunTypeDaily ScheduleRunType = "Daily" - // ScheduleRunTypeInvalid specifies the schedule run type invalid state for - // schedule run type. + // ScheduleRunTypeInvalid specifies the schedule run type invalid state for schedule run type. ScheduleRunTypeInvalid ScheduleRunType = "Invalid" - // ScheduleRunTypeWeekly specifies the schedule run type weekly state for - // schedule run type. + // ScheduleRunTypeWeekly specifies the schedule run type weekly state for schedule run type. ScheduleRunTypeWeekly ScheduleRunType = "Weekly" ) @@ -693,14 +740,11 @@ const ( type StorageType string const ( - // StorageTypeGeoRedundant specifies the storage type geo redundant state - // for storage type. + // StorageTypeGeoRedundant specifies the storage type geo redundant state for storage type. StorageTypeGeoRedundant StorageType = "GeoRedundant" - // StorageTypeInvalid specifies the storage type invalid state for storage - // type. + // StorageTypeInvalid specifies the storage type invalid state for storage type. StorageTypeInvalid StorageType = "Invalid" - // StorageTypeLocallyRedundant specifies the storage type locally redundant - // state for storage type. + // StorageTypeLocallyRedundant specifies the storage type locally redundant state for storage type. StorageTypeLocallyRedundant StorageType = "LocallyRedundant" ) @@ -708,14 +752,11 @@ const ( type StorageTypeState string const ( - // StorageTypeStateInvalid specifies the storage type state invalid state - // for storage type state. + // StorageTypeStateInvalid specifies the storage type state invalid state for storage type state. StorageTypeStateInvalid StorageTypeState = "Invalid" - // StorageTypeStateLocked specifies the storage type state locked state for - // storage type state. + // StorageTypeStateLocked specifies the storage type state locked state for storage type state. StorageTypeStateLocked StorageTypeState = "Locked" - // StorageTypeStateUnlocked specifies the storage type state unlocked state - // for storage type state. + // StorageTypeStateUnlocked specifies the storage type state unlocked state for storage type state. StorageTypeStateUnlocked StorageTypeState = "Unlocked" ) @@ -723,11 +764,10 @@ const ( type Type string const ( - // TypeBackupProtectedItemCountSummary specifies the type backup protected - // item count summary state for type. + // TypeBackupProtectedItemCountSummary specifies the type backup protected item count summary state for type. TypeBackupProtectedItemCountSummary Type = "BackupProtectedItemCountSummary" - // TypeBackupProtectionContainerCountSummary specifies the type backup - // protection container count summary state for type. + // TypeBackupProtectionContainerCountSummary specifies the type backup protection container count summary state for + // type. TypeBackupProtectionContainerCountSummary Type = "BackupProtectionContainerCountSummary" // TypeInvalid specifies the type invalid state for type. TypeInvalid Type = "Invalid" @@ -771,60 +811,95 @@ const ( type WorkloadType string const ( - // WorkloadTypeAzureSQLDb specifies the workload type azure sql db state - // for workload type. + // WorkloadTypeAzureSQLDb specifies the workload type azure sql db state for workload type. WorkloadTypeAzureSQLDb WorkloadType = "AzureSqlDb" - // WorkloadTypeClient specifies the workload type client state for workload - // type. + // WorkloadTypeClient specifies the workload type client state for workload type. WorkloadTypeClient WorkloadType = "Client" - // WorkloadTypeExchange specifies the workload type exchange state for - // workload type. + // WorkloadTypeExchange specifies the workload type exchange state for workload type. WorkloadTypeExchange WorkloadType = "Exchange" - // WorkloadTypeFileFolder specifies the workload type file folder state for - // workload type. + // WorkloadTypeFileFolder specifies the workload type file folder state for workload type. WorkloadTypeFileFolder WorkloadType = "FileFolder" - // WorkloadTypeGenericDataSource specifies the workload type generic data - // source state for workload type. + // WorkloadTypeGenericDataSource specifies the workload type generic data source state for workload type. WorkloadTypeGenericDataSource WorkloadType = "GenericDataSource" - // WorkloadTypeInvalid specifies the workload type invalid state for - // workload type. + // WorkloadTypeInvalid specifies the workload type invalid state for workload type. WorkloadTypeInvalid WorkloadType = "Invalid" - // WorkloadTypeSharepoint specifies the workload type sharepoint state for - // workload type. + // WorkloadTypeSharepoint specifies the workload type sharepoint state for workload type. WorkloadTypeSharepoint WorkloadType = "Sharepoint" - // WorkloadTypeSQLDB specifies the workload type sqldb state for workload - // type. + // WorkloadTypeSQLDB specifies the workload type sqldb state for workload type. WorkloadTypeSQLDB WorkloadType = "SQLDB" - // WorkloadTypeSystemState specifies the workload type system state state - // for workload type. + // WorkloadTypeSystemState specifies the workload type system state state for workload type. WorkloadTypeSystemState WorkloadType = "SystemState" // WorkloadTypeVM specifies the workload type vm state for workload type. WorkloadTypeVM WorkloadType = "VM" - // WorkloadTypeVMwareVM specifies the workload type v mware vm state for - // workload type. + // WorkloadTypeVMwareVM specifies the workload type v mware vm state for workload type. WorkloadTypeVMwareVM WorkloadType = "VMwareVM" ) -// AzureBackupServerContainer is azureBackupServer (DPMVenus) workload-specific -// protection container. +// AzureBackupServerContainer is azureBackupServer (DPMVenus) workload-specific protection container. type AzureBackupServerContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` - CanReRegister *bool `json:"canReRegister,omitempty"` - ContainerID *string `json:"containerId,omitempty"` - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` - DPMServers *[]string `json:"DPMServers,omitempty"` - UpgradeAvailable *bool `json:"UpgradeAvailable,omitempty"` - ProtectionStatus *string `json:"protectionStatus,omitempty"` - ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ContainerType ContainerType `json:"containerType,omitempty"` + ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + ContainerID *string `json:"containerId,omitempty"` + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` + DPMServers *[]string `json:"DPMServers,omitempty"` + UpgradeAvailable *bool `json:"UpgradeAvailable,omitempty"` + ProtectionStatus *string `json:"protectionStatus,omitempty"` + ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` } -// AzureBackupServerEngine is backup engine type when Azure Backup Server is -// used to manage the backups. +// MarshalJSON is the custom marshaler for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) MarshalJSON() ([]byte, error) { + absc.ProtectableObjectType = ProtectableObjectTypeAzureBackupServerContainer + type Alias AzureBackupServerContainer + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(absc), + }) +} + +// AsAzureBackupServerContainer is the ProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return &absc, true +} + +// AsAzureIaaSClassicComputeVMContainer is the ProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the ProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the ProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsDpmContainer is the ProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the ProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the ProtectionContainer implementation for AzureBackupServerContainer. +func (absc AzureBackupServerContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AzureBackupServerEngine is backup engine type when Azure Backup Server is used to manage the backups. type AzureBackupServerEngine struct { FriendlyName *string `json:"friendlyName,omitempty"` BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` @@ -838,32 +913,126 @@ type AzureBackupServerEngine struct { IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` IsDPMUpgradeAvailable *bool `json:"isDPMUpgradeAvailable,omitempty"` ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType,omitempty"` } -// AzureIaaSClassicComputeVMContainer is iaaS VM workload-specific backup item -// representing a classic virtual machine. +// MarshalJSON is the custom marshaler for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) MarshalJSON() ([]byte, error) { + abse.BackupEngineType = BackupEngineTypeAzureBackupServerEngine + type Alias AzureBackupServerEngine + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(abse), + }) +} + +// AsAzureBackupServerEngine is the BackupEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return &abse, true +} + +// AsDpmBackupEngine is the BackupEngineBase implementation for AzureBackupServerEngine. +func (abse AzureBackupServerEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return nil, false +} + +// AzureIaaSClassicComputeVMContainer is iaaS VM workload-specific backup item representing a classic virtual machine. type AzureIaaSClassicComputeVMContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ContainerType ContainerType `json:"containerType,omitempty"` + ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"` + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` } -// AzureIaaSClassicComputeVMProtectableItem is iaaS VM workload-specific backup -// item representing the Classic Compute VM. +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) MarshalJSON() ([]byte, error) { + aisccvc.ProtectableObjectType = ProtectableObjectTypeMicrosoftClassicComputevirtualMachines + type Alias AzureIaaSClassicComputeVMContainer + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aisccvc), + }) +} + +// AsAzureIaaSClassicComputeVMContainer is the IaaSVMContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return &aisccvc, true +} + +// AsAzureIaaSComputeVMContainer is the IaaSVMContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureBackupServerContainer is the IaaSVMContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the IaaSVMContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsDpmContainer is the IaaSVMContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the IaaSVMContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the IaaSVMContainer implementation for AzureIaaSClassicComputeVMContainer. +func (aisccvc AzureIaaSClassicComputeVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AzureIaaSClassicComputeVMProtectableItem is iaaS VM workload-specific backup item representing the Classic Compute +// VM. type AzureIaaSClassicComputeVMProtectableItem struct { - BackupManagementType *string `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - VirtualMachineID *string `json:"virtualMachineId,omitempty"` + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` + VirtualMachineID *string `json:"virtualMachineId,omitempty"` } -// AzureIaaSClassicComputeVMProtectedItem is iaaS VM workload-specific backup -// item representing the Classic Compute VM. +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aisccvpi.ProtectableItemType = ProtectableItemTypeMicrosoftClassicComputevirtualMachines + type Alias AzureIaaSClassicComputeVMProtectableItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aisccvpi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the IaaSVMProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return &aisccvpi, true +} + +// AsAzureIaaSComputeVMProtectableItem is the IaaSVMProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the IaaSVMProtectableItem implementation for AzureIaaSClassicComputeVMProtectableItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AzureIaaSClassicComputeVMProtectedItem is iaaS VM workload-specific backup item representing the Classic Compute VM. type AzureIaaSClassicComputeVMProtectedItem struct { BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` WorkloadType DataSourceType `json:"workloadType,omitempty"` @@ -871,6 +1040,7 @@ type AzureIaaSClassicComputeVMProtectedItem struct { SourceResourceID *string `json:"sourceResourceId,omitempty"` PolicyID *string `json:"policyId,omitempty"` LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` VirtualMachineID *string `json:"virtualMachineId,omitempty"` ProtectionStatus *string `json:"protectionStatus,omitempty"` @@ -883,30 +1053,144 @@ type AzureIaaSClassicComputeVMProtectedItem struct { ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` } -// AzureIaaSComputeVMContainer is iaaS VM workload-specific backup item -// representing an Azure Resource Manager virtual machine. +// MarshalJSON is the custom marshaler for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + aisccvpi.ProtectedItemType = ProtectedItemTypeMicrosoftClassicComputevirtualMachines + type Alias AzureIaaSClassicComputeVMProtectedItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aisccvpi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return &aisccvpi, true +} + +// AsAzureIaaSComputeVMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSClassicComputeVMProtectedItem. +func (aisccvpi AzureIaaSClassicComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AzureIaaSComputeVMContainer is iaaS VM workload-specific backup item representing an Azure Resource Manager virtual +// machine. type AzureIaaSComputeVMContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ContainerType ContainerType `json:"containerType,omitempty"` + ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"` + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` } -// AzureIaaSComputeVMProtectableItem is iaaS VM workload-specific backup item -// representing the Azure Resource Manager VM. +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) MarshalJSON() ([]byte, error) { + aiscvc.ProtectableObjectType = ProtectableObjectTypeMicrosoftComputevirtualMachines + type Alias AzureIaaSComputeVMContainer + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aiscvc), + }) +} + +// AsAzureIaaSClassicComputeVMContainer is the IaaSVMContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the IaaSVMContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return &aiscvc, true +} + +// AsAzureBackupServerContainer is the IaaSVMContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the IaaSVMContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsDpmContainer is the IaaSVMContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the IaaSVMContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the IaaSVMContainer implementation for AzureIaaSComputeVMContainer. +func (aiscvc AzureIaaSComputeVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// AzureIaaSComputeVMProtectableItem is iaaS VM workload-specific backup item representing the Azure Resource Manager +// VM. type AzureIaaSComputeVMProtectableItem struct { - BackupManagementType *string `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - VirtualMachineID *string `json:"virtualMachineId,omitempty"` + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` + VirtualMachineID *string `json:"virtualMachineId,omitempty"` } -// AzureIaaSComputeVMProtectedItem is iaaS VM workload-specific backup item -// representing the Azure Resource Manager VM. +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) MarshalJSON() ([]byte, error) { + aiscvpi.ProtectableItemType = ProtectableItemTypeMicrosoftComputevirtualMachines + type Alias AzureIaaSComputeVMProtectableItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aiscvpi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the IaaSVMProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the IaaSVMProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return &aiscvpi, true +} + +// AsIaaSVMProtectableItem is the IaaSVMProtectableItem implementation for AzureIaaSComputeVMProtectableItem. +func (aiscvpi AzureIaaSComputeVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return nil, false +} + +// AzureIaaSComputeVMProtectedItem is iaaS VM workload-specific backup item representing the Azure Resource Manager VM. type AzureIaaSComputeVMProtectedItem struct { BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` WorkloadType DataSourceType `json:"workloadType,omitempty"` @@ -914,6 +1198,7 @@ type AzureIaaSComputeVMProtectedItem struct { SourceResourceID *string `json:"sourceResourceId,omitempty"` PolicyID *string `json:"policyId,omitempty"` LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` VirtualMachineID *string `json:"virtualMachineId,omitempty"` ProtectionStatus *string `json:"protectionStatus,omitempty"` @@ -926,6 +1211,47 @@ type AzureIaaSComputeVMProtectedItem struct { ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` } +// MarshalJSON is the custom marshaler for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) MarshalJSON() ([]byte, error) { + aiscvpi.ProtectedItemType = ProtectedItemTypeMicrosoftComputevirtualMachines + type Alias AzureIaaSComputeVMProtectedItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aiscvpi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return &aiscvpi, true +} + +// AsAzureIaaSVMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the AzureIaaSVMProtectedItem implementation for AzureIaaSComputeVMProtectedItem. +func (aiscvpi AzureIaaSComputeVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + // AzureIaaSVMErrorInfo is azure IaaS VM workload-specific error information. type AzureIaaSVMErrorInfo struct { ErrorCode *int32 `json:"errorCode,omitempty"` @@ -951,6 +1277,7 @@ type AzureIaaSVMJob struct { StartTime *date.Time `json:"startTime,omitempty"` EndTime *date.Time `json:"endTime,omitempty"` ActivityID *string `json:"activityId,omitempty"` + JobType JobType `json:"jobType,omitempty"` Duration *string `json:"duration,omitempty"` ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` ErrorDetails *[]AzureIaaSVMErrorInfo `json:"errorDetails,omitempty"` @@ -958,8 +1285,33 @@ type AzureIaaSVMJob struct { ExtendedInfo *AzureIaaSVMJobExtendedInfo `json:"extendedInfo,omitempty"` } -// AzureIaaSVMJobExtendedInfo is azure IaaS VM workload-specific additional -// information for job. +// MarshalJSON is the custom marshaler for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) MarshalJSON() ([]byte, error) { + aisj.JobType = JobTypeAzureIaaSVMJob + type Alias AzureIaaSVMJob + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aisj), + }) +} + +// AsAzureIaaSVMJob is the Job implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return &aisj, true +} + +// AsDpmJob is the Job implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the Job implementation for AzureIaaSVMJob. +func (aisj AzureIaaSVMJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// AzureIaaSVMJobExtendedInfo is azure IaaS VM workload-specific additional information for job. type AzureIaaSVMJobExtendedInfo struct { TasksList *[]AzureIaaSVMJobTaskDetails `json:"tasksList,omitempty"` PropertyBag *map[string]*string `json:"propertyBag,omitempty"` @@ -967,8 +1319,7 @@ type AzureIaaSVMJobExtendedInfo struct { DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// AzureIaaSVMJobTaskDetails is azure IaaS VM workload-specific job task -// details. +// AzureIaaSVMJobTaskDetails is azure IaaS VM workload-specific job task details. type AzureIaaSVMJobTaskDetails struct { TaskID *string `json:"taskId,omitempty"` StartTime *date.Time `json:"startTime,omitempty"` @@ -987,6 +1338,7 @@ type AzureIaaSVMProtectedItem struct { SourceResourceID *string `json:"sourceResourceId,omitempty"` PolicyID *string `json:"policyId,omitempty"` LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` VirtualMachineID *string `json:"virtualMachineId,omitempty"` ProtectionStatus *string `json:"protectionStatus,omitempty"` @@ -999,8 +1351,48 @@ type AzureIaaSVMProtectedItem struct { ExtendedInfo *AzureIaaSVMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` } -// AzureIaaSVMProtectedItemExtendedInfo is additional information on Azure IaaS -// VM specific backup item. +// MarshalJSON is the custom marshaler for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) MarshalJSON() ([]byte, error) { + aispi.ProtectedItemType = ProtectedItemTypeAzureIaaSVMProtectedItem + type Alias AzureIaaSVMProtectedItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aispi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the ProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the ProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the ProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return &aispi, true +} + +// AsAzureSQLProtectedItem is the ProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the ProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the ProtectedItem implementation for AzureIaaSVMProtectedItem. +func (aispi AzureIaaSVMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AzureIaaSVMProtectedItemExtendedInfo is additional information on Azure IaaS VM specific backup item. type AzureIaaSVMProtectedItemExtendedInfo struct { OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` @@ -1009,19 +1401,153 @@ type AzureIaaSVMProtectedItemExtendedInfo struct { // AzureIaaSVMProtectionPolicy is iaaS VM workload-specific backup policy. type AzureIaaSVMProtectionPolicy struct { - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - SchedulePolicy *SchedulePolicy `json:"schedulePolicy,omitempty"` - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` - TimeZone *string `json:"timeZone,omitempty"` + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + SchedulePolicy SchedulePolicy `json:"schedulePolicy,omitempty"` + RetentionPolicy RetentionPolicy `json:"retentionPolicy,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) MarshalJSON() ([]byte, error) { + aispp.BackupManagementType = BackupManagementTypeAzureIaasVM + type Alias AzureIaaSVMProtectionPolicy + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aispp), + }) +} + +// AsAzureIaaSVMProtectionPolicy is the ProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return &aispp, true +} + +// AsAzureSQLProtectionPolicy is the ProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the ProtectionPolicy implementation for AzureIaaSVMProtectionPolicy. +func (aispp AzureIaaSVMProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// UnmarshalJSON is the custom unmarshaler for AzureIaaSVMProtectionPolicy struct. +func (aispp *AzureIaaSVMProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["schedulePolicy"] + if v != nil { + schedulePolicy, err := unmarshalSchedulePolicy(*m["schedulePolicy"]) + if err != nil { + return err + } + aispp.SchedulePolicy = schedulePolicy + } + + v = m["retentionPolicy"] + if v != nil { + retentionPolicy, err := unmarshalRetentionPolicy(*m["retentionPolicy"]) + if err != nil { + return err + } + aispp.RetentionPolicy = retentionPolicy + } + + v = m["timeZone"] + if v != nil { + var timeZone string + err = json.Unmarshal(*m["timeZone"], &timeZone) + if err != nil { + return err + } + aispp.TimeZone = &timeZone + } + + v = m["protectedItemsCount"] + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*m["protectedItemsCount"], &protectedItemsCount) + if err != nil { + return err + } + aispp.ProtectedItemsCount = &protectedItemsCount + } + + v = m["backupManagementType"] + if v != nil { + var backupManagementType BackupManagementType + err = json.Unmarshal(*m["backupManagementType"], &backupManagementType) + if err != nil { + return err + } + aispp.BackupManagementType = backupManagementType + } + + return nil } // AzureSQLContainer is azure Sql workload-specific container. type AzureSQLContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ContainerType ContainerType `json:"containerType,omitempty"` + ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureSQLContainer. +func (asc AzureSQLContainer) MarshalJSON() ([]byte, error) { + asc.ProtectableObjectType = ProtectableObjectTypeAzureSQLContainer + type Alias AzureSQLContainer + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(asc), + }) +} + +// AsAzureBackupServerContainer is the ProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the ProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the ProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the ProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return &asc, true +} + +// AsDpmContainer is the ProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the ProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the ProtectionContainer implementation for AzureSQLContainer. +func (asc AzureSQLContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false } // AzureSQLProtectedItem is azure SQL workload-specific backup item. @@ -1032,13 +1558,54 @@ type AzureSQLProtectedItem struct { SourceResourceID *string `json:"sourceResourceId,omitempty"` PolicyID *string `json:"policyId,omitempty"` LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` ProtectedItemDataID *string `json:"protectedItemDataId,omitempty"` ProtectionState ProtectedItemState `json:"protectionState,omitempty"` ExtendedInfo *AzureSQLProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` } -// AzureSQLProtectedItemExtendedInfo is additional information on Azure Sql -// specific protected item. +// MarshalJSON is the custom marshaler for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) MarshalJSON() ([]byte, error) { + aspi.ProtectedItemType = ProtectedItemTypeMicrosoftSqlserversdatabases + type Alias AzureSQLProtectedItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aspi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the ProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the ProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the ProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the ProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return &aspi, true +} + +// AsDPMProtectedItem is the ProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the ProtectedItem implementation for AzureSQLProtectedItem. +func (aspi AzureSQLProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// AzureSQLProtectedItemExtendedInfo is additional information on Azure Sql specific protected item. type AzureSQLProtectedItemExtendedInfo struct { OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` @@ -1047,29 +1614,125 @@ type AzureSQLProtectedItemExtendedInfo struct { // AzureSQLProtectionPolicy is azure SQL workload-specific backup policy. type AzureSQLProtectionPolicy struct { - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RetentionPolicy RetentionPolicy `json:"retentionPolicy,omitempty"` } -// BackupEngineBase is the base backup engine class. All workload specific -// backup engines derive from this class. -type BackupEngineBase struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - BackupEngineState *string `json:"backupEngineState,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - CanReRegister *bool `json:"canReRegister,omitempty"` - BackupEngineID *string `json:"backupEngineId,omitempty"` - DpmVersion *string `json:"dpmVersion,omitempty"` - AzureBackupAgentVersion *string `json:"azureBackupAgentVersion,omitempty"` - IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` - IsDPMUpgradeAvailable *bool `json:"isDPMUpgradeAvailable,omitempty"` - ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` +// MarshalJSON is the custom marshaler for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) MarshalJSON() ([]byte, error) { + aspp.BackupManagementType = BackupManagementTypeAzureSQL + type Alias AzureSQLProtectionPolicy + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aspp), + }) } -// BackupEngineBaseResource is the base backup engine class. All workload -// specific backup engines derive from this class. +// AsAzureIaaSVMProtectionPolicy is the ProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the ProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return &aspp, true +} + +// AsMabProtectionPolicy is the ProtectionPolicy implementation for AzureSQLProtectionPolicy. +func (aspp AzureSQLProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return nil, false +} + +// UnmarshalJSON is the custom unmarshaler for AzureSQLProtectionPolicy struct. +func (aspp *AzureSQLProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["retentionPolicy"] + if v != nil { + retentionPolicy, err := unmarshalRetentionPolicy(*m["retentionPolicy"]) + if err != nil { + return err + } + aspp.RetentionPolicy = retentionPolicy + } + + v = m["protectedItemsCount"] + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*m["protectedItemsCount"], &protectedItemsCount) + if err != nil { + return err + } + aspp.ProtectedItemsCount = &protectedItemsCount + } + + v = m["backupManagementType"] + if v != nil { + var backupManagementType BackupManagementType + err = json.Unmarshal(*m["backupManagementType"], &backupManagementType) + if err != nil { + return err + } + aspp.BackupManagementType = backupManagementType + } + + return nil +} + +// BackupEngineBase is the base backup engine class. All workload specific backup engines derive from this class. +type BackupEngineBase interface { + AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) + AsDpmBackupEngine() (*DpmBackupEngine, bool) +} + +func unmarshalBackupEngineBase(body []byte) (BackupEngineBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["backupEngineType"] { + case string(BackupEngineTypeAzureBackupServerEngine): + var abse AzureBackupServerEngine + err := json.Unmarshal(body, &abse) + return abse, err + case string(BackupEngineTypeDpmBackupEngine): + var dbe DpmBackupEngine + err := json.Unmarshal(body, &dbe) + return dbe, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalBackupEngineBaseArray(body []byte) ([]BackupEngineBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + bebArray := make([]BackupEngineBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + beb, err := unmarshalBackupEngineBase(*rawMessage) + if err != nil { + return nil, err + } + bebArray[index] = beb + } + return bebArray, nil +} + +// BackupEngineBaseResource is the base backup engine class. All workload specific backup engines derive from this +// class. type BackupEngineBaseResource struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1078,7 +1741,88 @@ type BackupEngineBaseResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *BackupEngineBase `json:"properties,omitempty"` + Properties BackupEngineBase `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for BackupEngineBaseResource struct. +func (bebr *BackupEngineBaseResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalBackupEngineBase(*m["properties"]) + if err != nil { + return err + } + bebr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + bebr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + bebr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + bebr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + bebr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + bebr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + bebr.ETag = &eTag + } + + return nil } // BackupEngineBaseResourceList is list of BackupEngineBase resources @@ -1128,13 +1872,48 @@ type BackupManagementUsageList struct { Value *[]BackupManagementUsage `json:"value,omitempty"` } -// BackupRequest is base class for backup request. Workload-specific backup -// requests are derived from this class. -type BackupRequest struct { +// BackupRequest is base class for backup request. Workload-specific backup requests are derived from this class. +type BackupRequest interface { + AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) } -// BackupRequestResource is base class for backup request. Workload-specific -// backup requests are derived from this class. +func unmarshalBackupRequest(body []byte) (BackupRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeIaasVMBackupRequest): + var ivbr IaasVMBackupRequest + err := json.Unmarshal(body, &ivbr) + return ivbr, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalBackupRequestArray(body []byte) ([]BackupRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + brArray := make([]BackupRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + br, err := unmarshalBackupRequest(*rawMessage) + if err != nil { + return nil, err + } + brArray[index] = br + } + return brArray, nil +} + +// BackupRequestResource is base class for backup request. Workload-specific backup requests are derived from this +// class. type BackupRequestResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -1142,7 +1921,88 @@ type BackupRequestResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *BackupRequest `json:"properties,omitempty"` + Properties BackupRequest `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for BackupRequestResource struct. +func (brr *BackupRequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalBackupRequest(*m["properties"]) + if err != nil { + return err + } + brr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + brr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + brr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + brr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + brr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + brr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + brr.ETag = &eTag + } + + return nil } // BackupResourceConfig is the resource storage details. @@ -1182,21 +2042,19 @@ type BackupResourceVaultConfigResource struct { Properties *BackupResourceVaultConfig `json:"properties,omitempty"` } -// BEKDetails is bEK is bitlocker encrpytion key. +// BEKDetails is BEK is bitlocker encrpytion key. type BEKDetails struct { SecretURL *string `json:"secretUrl,omitempty"` SecretVaultID *string `json:"secretVaultId,omitempty"` SecretData *string `json:"secretData,omitempty"` } -// BMSBackupEngineQueryObject is query parameters to fetch list of backup -// engines. +// BMSBackupEngineQueryObject is query parameters to fetch list of backup engines. type BMSBackupEngineQueryObject struct { Expand *string `json:"expand,omitempty"` } -// BMSBackupEnginesQueryObject is query parameters to fetch list of backup -// engines. +// BMSBackupEnginesQueryObject is query parameters to fetch list of backup engines. type BMSBackupEnginesQueryObject struct { BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` @@ -1208,8 +2066,7 @@ type BMSBackupSummariesQueryObject struct { Type Type `json:"type,omitempty"` } -// BMSContainerQueryObject is the query filters that can be used with the list -// containers API. +// BMSContainerQueryObject is the query filters that can be used with the list containers API. type BMSContainerQueryObject struct { BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` ContainerType ContainerType `json:"containerType,omitempty"` @@ -1239,28 +2096,24 @@ type ClientDiscoveryDisplay struct { Description *string `json:"Description,omitempty"` } -// ClientDiscoveryForLogSpecification is class to represent shoebox log -// specification in json client discovery. +// ClientDiscoveryForLogSpecification is class to represent shoebox log specification in json client discovery. type ClientDiscoveryForLogSpecification struct { Name *string `json:"name,omitempty"` DisplayName *string `json:"displayName,omitempty"` BlobDuration *string `json:"blobDuration,omitempty"` } -// ClientDiscoveryForProperties is class to represent shoebox properties in -// json client discovery. +// ClientDiscoveryForProperties is class to represent shoebox properties in json client discovery. type ClientDiscoveryForProperties struct { ServiceSpecification *ClientDiscoveryForServiceSpecification `json:"serviceSpecification,omitempty"` } -// ClientDiscoveryForServiceSpecification is class to represent shoebox service -// specification in json client discovery. +// ClientDiscoveryForServiceSpecification is class to represent shoebox service specification in json client discovery. type ClientDiscoveryForServiceSpecification struct { LogSpecifications *[]ClientDiscoveryForLogSpecification `json:"logSpecifications,omitempty"` } -// ClientDiscoveryResponse is operations List response which contains list of -// available APIs. +// ClientDiscoveryResponse is operations List response which contains list of available APIs. type ClientDiscoveryResponse struct { autorest.Response `json:"-"` Value *[]ClientDiscoveryValueForSingleAPI `json:"Value,omitempty"` @@ -1327,23 +2180,92 @@ type DpmBackupEngine struct { IsAzureBackupAgentUpgradeAvailable *bool `json:"isAzureBackupAgentUpgradeAvailable,omitempty"` IsDPMUpgradeAvailable *bool `json:"isDPMUpgradeAvailable,omitempty"` ExtendedInfo *BackupEngineExtendedInfo `json:"extendedInfo,omitempty"` + BackupEngineType BackupEngineType `json:"backupEngineType,omitempty"` } -// DpmContainer is dPM workload-specific protection container. +// MarshalJSON is the custom marshaler for DpmBackupEngine. +func (dbe DpmBackupEngine) MarshalJSON() ([]byte, error) { + dbe.BackupEngineType = BackupEngineTypeDpmBackupEngine + type Alias DpmBackupEngine + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dbe), + }) +} + +// AsAzureBackupServerEngine is the BackupEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsAzureBackupServerEngine() (*AzureBackupServerEngine, bool) { + return nil, false +} + +// AsDpmBackupEngine is the BackupEngineBase implementation for DpmBackupEngine. +func (dbe DpmBackupEngine) AsDpmBackupEngine() (*DpmBackupEngine, bool) { + return &dbe, true +} + +// DpmContainer is DPM workload-specific protection container. type DpmContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` - CanReRegister *bool `json:"canReRegister,omitempty"` - ContainerID *string `json:"containerId,omitempty"` - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` - DPMServers *[]string `json:"DPMServers,omitempty"` - UpgradeAvailable *bool `json:"UpgradeAvailable,omitempty"` - ProtectionStatus *string `json:"protectionStatus,omitempty"` - ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ContainerType ContainerType `json:"containerType,omitempty"` + ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + ContainerID *string `json:"containerId,omitempty"` + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + DpmAgentVersion *string `json:"dpmAgentVersion,omitempty"` + DPMServers *[]string `json:"DPMServers,omitempty"` + UpgradeAvailable *bool `json:"UpgradeAvailable,omitempty"` + ProtectionStatus *string `json:"protectionStatus,omitempty"` + ExtendedInfo *DPMContainerExtendedInfo `json:"extendedInfo,omitempty"` +} + +// MarshalJSON is the custom marshaler for DpmContainer. +func (dc DpmContainer) MarshalJSON() ([]byte, error) { + dc.ProtectableObjectType = ProtectableObjectTypeDPMContainer + type Alias DpmContainer + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dc), + }) +} + +// AsAzureBackupServerContainer is the ProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the ProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the ProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the ProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsDpmContainer is the ProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsDpmContainer() (*DpmContainer, bool) { + return &dc, true +} + +// AsIaaSVMContainer is the ProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the ProtectionContainer implementation for DpmContainer. +func (dc DpmContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false } // DPMContainerExtendedInfo is additional information of the DPMContainer. @@ -1351,13 +2273,13 @@ type DPMContainerExtendedInfo struct { LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` } -// DpmErrorInfo is dPM workload-specific error information. +// DpmErrorInfo is DPM workload-specific error information. type DpmErrorInfo struct { ErrorString *string `json:"errorString,omitempty"` Recommendations *[]string `json:"recommendations,omitempty"` } -// DpmJob is dPM workload-specifc job object. +// DpmJob is DPM workload-specifc job object. type DpmJob struct { EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` @@ -1366,6 +2288,7 @@ type DpmJob struct { StartTime *date.Time `json:"startTime,omitempty"` EndTime *date.Time `json:"endTime,omitempty"` ActivityID *string `json:"activityId,omitempty"` + JobType JobType `json:"jobType,omitempty"` Duration *string `json:"duration,omitempty"` DpmServerName *string `json:"dpmServerName,omitempty"` ContainerName *string `json:"containerName,omitempty"` @@ -1376,15 +2299,40 @@ type DpmJob struct { ExtendedInfo *DpmJobExtendedInfo `json:"extendedInfo,omitempty"` } -// DpmJobExtendedInfo is additional information on the DPM workload-specific -// job. +// MarshalJSON is the custom marshaler for DpmJob. +func (dj DpmJob) MarshalJSON() ([]byte, error) { + dj.JobType = JobTypeDpmJob + type Alias DpmJob + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dj), + }) +} + +// AsAzureIaaSVMJob is the Job implementation for DpmJob. +func (dj DpmJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsDpmJob is the Job implementation for DpmJob. +func (dj DpmJob) AsDpmJob() (*DpmJob, bool) { + return &dj, true +} + +// AsMabJob is the Job implementation for DpmJob. +func (dj DpmJob) AsMabJob() (*MabJob, bool) { + return nil, false +} + +// DpmJobExtendedInfo is additional information on the DPM workload-specific job. type DpmJobExtendedInfo struct { TasksList *[]DpmJobTaskDetails `json:"tasksList,omitempty"` PropertyBag *map[string]*string `json:"propertyBag,omitempty"` DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// DpmJobTaskDetails is dPM workload-specific job task details. +// DpmJobTaskDetails is DPM workload-specific job task details. type DpmJobTaskDetails struct { TaskID *string `json:"taskId,omitempty"` StartTime *date.Time `json:"startTime,omitempty"` @@ -1393,8 +2341,7 @@ type DpmJobTaskDetails struct { Status *string `json:"status,omitempty"` } -// DPMProtectedItem is additional information on Backup engine specific backup -// item. +// DPMProtectedItem is additional information on Backup engine specific backup item. type DPMProtectedItem struct { BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` WorkloadType DataSourceType `json:"workloadType,omitempty"` @@ -1402,6 +2349,7 @@ type DPMProtectedItem struct { SourceResourceID *string `json:"sourceResourceId,omitempty"` PolicyID *string `json:"policyId,omitempty"` LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` BackupEngineName *string `json:"backupEngineName,omitempty"` ProtectionState ProtectedItemState `json:"protectionState,omitempty"` @@ -1409,8 +2357,48 @@ type DPMProtectedItem struct { ExtendedInfo *DPMProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` } -// DPMProtectedItemExtendedInfo is additional information of DPM Protected -// item. +// MarshalJSON is the custom marshaler for DPMProtectedItem. +func (dpi DPMProtectedItem) MarshalJSON() ([]byte, error) { + dpi.ProtectedItemType = ProtectedItemTypeDPMProtectedItem + type Alias DPMProtectedItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(dpi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the ProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the ProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the ProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the ProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the ProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return &dpi, true +} + +// AsMabFileFolderProtectedItem is the ProtectedItem implementation for DPMProtectedItem. +func (dpi DPMProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return nil, false +} + +// DPMProtectedItemExtendedInfo is additional information of DPM Protected item. type DPMProtectedItemExtendedInfo struct { ProtectableObjectLoadPath *map[string]*string `json:"protectableObjectLoadPath,omitempty"` Protected *bool `json:"protected,omitempty"` @@ -1428,8 +2416,7 @@ type DPMProtectedItemExtendedInfo struct { TotalDiskStorageSizeInBytes *string `json:"totalDiskStorageSizeInBytes,omitempty"` } -// EncryptionDetails is details needed if the VM was encrypted at the time of -// backup. +// EncryptionDetails is details needed if the VM was encrypted at the time of backup. type EncryptionDetails struct { EncryptionEnabled *bool `json:"encryptionEnabled,omitempty"` KekURL *string `json:"kekUrl,omitempty"` @@ -1438,19 +2425,62 @@ type EncryptionDetails struct { SecretKeyVaultID *string `json:"secretKeyVaultId,omitempty"` } -// ExportJobsOperationResultInfo is this class is used to send blob details -// after exporting jobs. +// ExportJobsOperationResultInfo is this class is used to send blob details after exporting jobs. type ExportJobsOperationResultInfo struct { - BlobURL *string `json:"blobUrl,omitempty"` - BlobSasKey *string `json:"blobSasKey,omitempty"` + ObjectType ObjectTypeOperationResultInfoBase `json:"objectType,omitempty"` + BlobURL *string `json:"blobUrl,omitempty"` + BlobSasKey *string `json:"blobSasKey,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) MarshalJSON() ([]byte, error) { + ejori.ObjectType = ObjectTypeExportJobsOperationResultInfo + type Alias ExportJobsOperationResultInfo + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ejori), + }) +} + +// AsExportJobsOperationResultInfo is the OperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return &ejori, true +} + +// AsOperationResultInfo is the OperationResultInfoBase implementation for ExportJobsOperationResultInfo. +func (ejori ExportJobsOperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { + return nil, false } // GenericRecoveryPoint is generic backup copy. type GenericRecoveryPoint struct { - FriendlyName *string `json:"friendlyName,omitempty"` - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` - RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` + ObjectType ObjectTypeRecoveryPoint `json:"objectType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` +} + +// MarshalJSON is the custom marshaler for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) MarshalJSON() ([]byte, error) { + grp.ObjectType = ObjectTypeGenericRecoveryPoint + type Alias GenericRecoveryPoint + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(grp), + }) +} + +// AsGenericRecoveryPoint is the RecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return &grp, true +} + +// AsIaasVMRecoveryPoint is the RecoveryPoint implementation for GenericRecoveryPoint. +func (grp GenericRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return nil, false } // GetProtectedItemQueryObject is filters to list backup items. @@ -1460,71 +2490,255 @@ type GetProtectedItemQueryObject struct { // IaasVMBackupRequest is iaaS VM workload-specific backup request. type IaasVMBackupRequest struct { + ObjectType ObjectType `json:"objectType,omitempty"` RecoveryPointExpiryTimeInUTC *date.Time `json:"recoveryPointExpiryTimeInUTC,omitempty"` } +// MarshalJSON is the custom marshaler for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) MarshalJSON() ([]byte, error) { + ivbr.ObjectType = ObjectTypeIaasVMBackupRequest + type Alias IaasVMBackupRequest + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ivbr), + }) +} + +// AsIaasVMBackupRequest is the BackupRequest implementation for IaasVMBackupRequest. +func (ivbr IaasVMBackupRequest) AsIaasVMBackupRequest() (*IaasVMBackupRequest, bool) { + return &ivbr, true +} + // IaaSVMContainer is iaaS VM workload-specific container. type IaaSVMContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ContainerType ContainerType `json:"containerType,omitempty"` + ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"` + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + VirtualMachineVersion *string `json:"virtualMachineVersion,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` } -// IaasVMILRRegistrationRequest is restore files/folders from a backup copy of -// IaaS VM. +// MarshalJSON is the custom marshaler for IaaSVMContainer. +func (isc IaaSVMContainer) MarshalJSON() ([]byte, error) { + isc.ProtectableObjectType = ProtectableObjectTypeIaaSVMContainer + type Alias IaaSVMContainer + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(isc), + }) +} + +// AsAzureBackupServerContainer is the ProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the ProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the ProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the ProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsDpmContainer is the ProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the ProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return &isc, true +} + +// AsMabContainer is the ProtectionContainer implementation for IaaSVMContainer. +func (isc IaaSVMContainer) AsMabContainer() (*MabContainer, bool) { + return nil, false +} + +// IaasVMILRRegistrationRequest is restore files/folders from a backup copy of IaaS VM. type IaasVMILRRegistrationRequest struct { - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - VirtualMachineID *string `json:"virtualMachineId,omitempty"` - InitiatorName *string `json:"initiatorName,omitempty"` - RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` + ObjectType ObjectTypeILRRequest `json:"objectType,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + VirtualMachineID *string `json:"virtualMachineId,omitempty"` + InitiatorName *string `json:"initiatorName,omitempty"` + RenewExistingRegistration *bool `json:"renewExistingRegistration,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) MarshalJSON() ([]byte, error) { + ivrr.ObjectType = ObjectTypeIaasVMILRRegistrationRequest + type Alias IaasVMILRRegistrationRequest + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ivrr), + }) +} + +// AsIaasVMILRRegistrationRequest is the ILRRequest implementation for IaasVMILRRegistrationRequest. +func (ivrr IaasVMILRRegistrationRequest) AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) { + return &ivrr, true } // IaaSVMProtectableItem is iaaS VM workload-specific backup item. type IaaSVMProtectableItem struct { - BackupManagementType *string `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` - VirtualMachineID *string `json:"virtualMachineId,omitempty"` + BackupManagementType *string `json:"backupManagementType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionState ProtectionStatus `json:"protectionState,omitempty"` + ProtectableItemType ProtectableItemType `json:"protectableItemType,omitempty"` + VirtualMachineID *string `json:"virtualMachineId,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) MarshalJSON() ([]byte, error) { + ispi.ProtectableItemType = ProtectableItemTypeIaaSVMProtectableItem + type Alias IaaSVMProtectableItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ispi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectableItem is the WorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectableItem is the WorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) { + return nil, false +} + +// AsIaaSVMProtectableItem is the WorkloadProtectableItem implementation for IaaSVMProtectableItem. +func (ispi IaaSVMProtectableItem) AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) { + return &ispi, true } // IaasVMRecoveryPoint is iaaS VM workload specific backup copy. type IaasVMRecoveryPoint struct { - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` - RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` - SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` - IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` - KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` - IsInstantILRSessionActive *bool `json:"isInstantILRSessionActive,omitempty"` - RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` - IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` - VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` + ObjectType ObjectTypeRecoveryPoint `json:"objectType,omitempty"` + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + RecoveryPointAdditionalInfo *string `json:"recoveryPointAdditionalInfo,omitempty"` + SourceVMStorageType *string `json:"sourceVMStorageType,omitempty"` + IsSourceVMEncrypted *bool `json:"isSourceVMEncrypted,omitempty"` + KeyAndSecret *KeyAndSecretDetails `json:"keyAndSecret,omitempty"` + IsInstantILRSessionActive *bool `json:"isInstantILRSessionActive,omitempty"` + RecoveryPointTierDetails *[]RecoveryPointTierInformation `json:"recoveryPointTierDetails,omitempty"` + IsManagedVirtualMachine *bool `json:"isManagedVirtualMachine,omitempty"` + VirtualMachineSize *string `json:"virtualMachineSize,omitempty"` + OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) MarshalJSON() ([]byte, error) { + ivrp.ObjectType = ObjectTypeIaasVMRecoveryPoint + type Alias IaasVMRecoveryPoint + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ivrp), + }) +} + +// AsGenericRecoveryPoint is the RecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) { + return nil, false +} + +// AsIaasVMRecoveryPoint is the RecoveryPoint implementation for IaasVMRecoveryPoint. +func (ivrp IaasVMRecoveryPoint) AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) { + return &ivrp, true } // IaasVMRestoreRequest is iaaS VM workload-specific restore. type IaasVMRestoreRequest struct { - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - RecoveryType RecoveryType `json:"recoveryType,omitempty"` - SourceResourceID *string `json:"sourceResourceId,omitempty"` - TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` - TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` - StorageAccountID *string `json:"storageAccountId,omitempty"` - VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` - SubnetID *string `json:"subnetId,omitempty"` - TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` - Region *string `json:"region,omitempty"` - AffinityGroup *string `json:"affinityGroup,omitempty"` - CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` - EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` + ObjectType ObjectTypeRestoreRequest `json:"objectType,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + RecoveryType RecoveryType `json:"recoveryType,omitempty"` + SourceResourceID *string `json:"sourceResourceId,omitempty"` + TargetVirtualMachineID *string `json:"targetVirtualMachineId,omitempty"` + TargetResourceGroupID *string `json:"targetResourceGroupId,omitempty"` + StorageAccountID *string `json:"storageAccountId,omitempty"` + VirtualNetworkID *string `json:"virtualNetworkId,omitempty"` + SubnetID *string `json:"subnetId,omitempty"` + TargetDomainNameID *string `json:"targetDomainNameId,omitempty"` + Region *string `json:"region,omitempty"` + AffinityGroup *string `json:"affinityGroup,omitempty"` + CreateNewCloudService *bool `json:"createNewCloudService,omitempty"` + OriginalStorageAccountOption *bool `json:"originalStorageAccountOption,omitempty"` + EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) MarshalJSON() ([]byte, error) { + ivrr.ObjectType = ObjectTypeIaasVMRestoreRequest + type Alias IaasVMRestoreRequest + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ivrr), + }) +} + +// AsIaasVMRestoreRequest is the RestoreRequest implementation for IaasVMRestoreRequest. +func (ivrr IaasVMRestoreRequest) AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) { + return &ivrr, true } // ILRRequest is parameters to restore file/folders API. -type ILRRequest struct { +type ILRRequest interface { + AsIaasVMILRRegistrationRequest() (*IaasVMILRRegistrationRequest, bool) +} + +func unmarshalILRRequest(body []byte) (ILRRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeIaasVMILRRegistrationRequest): + var ivrr IaasVMILRRegistrationRequest + err := json.Unmarshal(body, &ivrr) + return ivrr, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalILRRequestArray(body []byte) ([]ILRRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + irArray := make([]ILRRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ir, err := unmarshalILRRequest(*rawMessage) + if err != nil { + return nil, err + } + irArray[index] = ir + } + return irArray, nil } // ILRRequestResource is parameters to restore file/folders API. @@ -1535,7 +2749,88 @@ type ILRRequestResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *ILRRequest `json:"properties,omitempty"` + Properties ILRRequest `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ILRRequestResource struct. +func (irr *ILRRequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalILRRequest(*m["properties"]) + if err != nil { + return err + } + irr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + irr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + irr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + irr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + irr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + irr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + irr.ETag = &eTag + } + + return nil } // InstantItemRecoveryTarget is target details for file / folder restore. @@ -1544,14 +2839,53 @@ type InstantItemRecoveryTarget struct { } // Job is defines workload agnostic properties for a job. -type Job struct { - EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - Operation *string `json:"operation,omitempty"` - Status *string `json:"status,omitempty"` - StartTime *date.Time `json:"startTime,omitempty"` - EndTime *date.Time `json:"endTime,omitempty"` - ActivityID *string `json:"activityId,omitempty"` +type Job interface { + AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) + AsDpmJob() (*DpmJob, bool) + AsMabJob() (*MabJob, bool) +} + +func unmarshalJob(body []byte) (Job, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["jobType"] { + case string(JobTypeAzureIaaSVMJob): + var aisj AzureIaaSVMJob + err := json.Unmarshal(body, &aisj) + return aisj, err + case string(JobTypeDpmJob): + var dj DpmJob + err := json.Unmarshal(body, &dj) + return dj, err + case string(JobTypeMabJob): + var mj MabJob + err := json.Unmarshal(body, &mj) + return mj, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalJobArray(body []byte) ([]Job, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + jArray := make([]Job, len(rawMessages)) + + for index, rawMessage := range rawMessages { + j, err := unmarshalJob(*rawMessage) + if err != nil { + return nil, err + } + jArray[index] = j + } + return jArray, nil } // JobQueryObject is filters to list the jobs. @@ -1573,7 +2907,88 @@ type JobResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *Job `json:"properties,omitempty"` + Properties Job `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for JobResource struct. +func (jr *JobResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalJob(*m["properties"]) + if err != nil { + return err + } + jr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + jr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + jr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + jr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + jr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + jr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + jr.ETag = &eTag + } + + return nil } // JobResourceList is list of Job resources @@ -1595,14 +3010,14 @@ func (client JobResourceList) JobResourceListPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// KEKDetails is kEK is encryption key for BEK. +// KEKDetails is KEK is encryption key for BEK. type KEKDetails struct { KeyURL *string `json:"keyUrl,omitempty"` KeyVaultID *string `json:"keyVaultId,omitempty"` KeyBackupData *string `json:"keyBackupData,omitempty"` } -// KeyAndSecretDetails is bEK is bitlocker key. +// KeyAndSecretDetails is BEK is bitlocker key. // KEK is encryption key for BEK // If the VM was encrypted then we will store follwing details : // 1. Secret(BEK) - Url + Backup Data + vaultId. @@ -1615,28 +3030,119 @@ type KeyAndSecretDetails struct { // LongTermRetentionPolicy is long term retention policy. type LongTermRetentionPolicy struct { - DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` - WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` - MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` - YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` + DailySchedule *DailyRetentionSchedule `json:"dailySchedule,omitempty"` + WeeklySchedule *WeeklyRetentionSchedule `json:"weeklySchedule,omitempty"` + MonthlySchedule *MonthlyRetentionSchedule `json:"monthlySchedule,omitempty"` + YearlySchedule *YearlyRetentionSchedule `json:"yearlySchedule,omitempty"` +} + +// MarshalJSON is the custom marshaler for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) MarshalJSON() ([]byte, error) { + ltrp.RetentionPolicyType = RetentionPolicyTypeLongTermRetentionPolicy + type Alias LongTermRetentionPolicy + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ltrp), + }) +} + +// AsLongTermRetentionPolicy is the RetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return <rp, true +} + +// AsSimpleRetentionPolicy is the RetentionPolicy implementation for LongTermRetentionPolicy. +func (ltrp LongTermRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return nil, false } // LongTermSchedulePolicy is long term policy schedule. type LongTermSchedulePolicy struct { + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` +} + +// MarshalJSON is the custom marshaler for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) MarshalJSON() ([]byte, error) { + ltsp.SchedulePolicyType = SchedulePolicyTypeLongTermSchedulePolicy + type Alias LongTermSchedulePolicy + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ltsp), + }) +} + +// AsLongTermSchedulePolicy is the SchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return <sp, true +} + +// AsSimpleSchedulePolicy is the SchedulePolicy implementation for LongTermSchedulePolicy. +func (ltsp LongTermSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return nil, false } // MabContainer is container with items backed up using MAB backup engine. type MabContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` - CanReRegister *bool `json:"canReRegister,omitempty"` - ContainerID *int64 `json:"containerId,omitempty"` - ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` - AgentVersion *string `json:"agentVersion,omitempty"` - ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + RegistrationStatus *string `json:"registrationStatus,omitempty"` + HealthStatus *string `json:"healthStatus,omitempty"` + ContainerType ContainerType `json:"containerType,omitempty"` + ProtectableObjectType ProtectableObjectType `json:"protectableObjectType,omitempty"` + CanReRegister *bool `json:"canReRegister,omitempty"` + ContainerID *int64 `json:"containerId,omitempty"` + ProtectedItemCount *int64 `json:"protectedItemCount,omitempty"` + AgentVersion *string `json:"agentVersion,omitempty"` + ExtendedInfo *MabContainerExtendedInfo `json:"extendedInfo,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabContainer. +func (mc MabContainer) MarshalJSON() ([]byte, error) { + mc.ProtectableObjectType = ProtectableObjectTypeMABWindowsContainer + type Alias MabContainer + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mc), + }) +} + +// AsAzureBackupServerContainer is the ProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) { + return nil, false +} + +// AsAzureIaaSClassicComputeVMContainer is the ProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMContainer is the ProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) { + return nil, false +} + +// AsAzureSQLContainer is the ProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsAzureSQLContainer() (*AzureSQLContainer, bool) { + return nil, false +} + +// AsDpmContainer is the ProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsDpmContainer() (*DpmContainer, bool) { + return nil, false +} + +// AsIaaSVMContainer is the ProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsIaaSVMContainer() (*IaaSVMContainer, bool) { + return nil, false +} + +// AsMabContainer is the ProtectionContainer implementation for MabContainer. +func (mc MabContainer) AsMabContainer() (*MabContainer, bool) { + return &mc, true } // MabContainerExtendedInfo is additional information of the container. @@ -1648,13 +3154,13 @@ type MabContainerExtendedInfo struct { LastBackupStatus *string `json:"lastBackupStatus,omitempty"` } -// MabErrorInfo is mAB workload-specific error information. +// MabErrorInfo is MAB workload-specific error information. type MabErrorInfo struct { ErrorString *string `json:"errorString,omitempty"` Recommendations *[]string `json:"recommendations,omitempty"` } -// MabFileFolderProtectedItem is mAB workload-specific backup item. +// MabFileFolderProtectedItem is MAB workload-specific backup item. type MabFileFolderProtectedItem struct { BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` WorkloadType DataSourceType `json:"workloadType,omitempty"` @@ -1662,6 +3168,7 @@ type MabFileFolderProtectedItem struct { SourceResourceID *string `json:"sourceResourceId,omitempty"` PolicyID *string `json:"policyId,omitempty"` LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` + ProtectedItemType ProtectedItemType `json:"protectedItemType,omitempty"` FriendlyName *string `json:"friendlyName,omitempty"` ComputerName *string `json:"computerName,omitempty"` LastBackupStatus *string `json:"lastBackupStatus,omitempty"` @@ -1671,15 +3178,55 @@ type MabFileFolderProtectedItem struct { ExtendedInfo *MabFileFolderProtectedItemExtendedInfo `json:"extendedInfo,omitempty"` } -// MabFileFolderProtectedItemExtendedInfo is additional information on the -// backed up item. +// MarshalJSON is the custom marshaler for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) MarshalJSON() ([]byte, error) { + mffpi.ProtectedItemType = ProtectedItemTypeMabFileFolderProtectedItem + type Alias MabFileFolderProtectedItem + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mffpi), + }) +} + +// AsAzureIaaSClassicComputeVMProtectedItem is the ProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSComputeVMProtectedItem is the ProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) { + return nil, false +} + +// AsAzureIaaSVMProtectedItem is the ProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) { + return nil, false +} + +// AsAzureSQLProtectedItem is the ProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) { + return nil, false +} + +// AsDPMProtectedItem is the ProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsDPMProtectedItem() (*DPMProtectedItem, bool) { + return nil, false +} + +// AsMabFileFolderProtectedItem is the ProtectedItem implementation for MabFileFolderProtectedItem. +func (mffpi MabFileFolderProtectedItem) AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) { + return &mffpi, true +} + +// MabFileFolderProtectedItemExtendedInfo is additional information on the backed up item. type MabFileFolderProtectedItemExtendedInfo struct { LastRefreshedAt *date.Time `json:"lastRefreshedAt,omitempty"` OldestRecoveryPoint *date.Time `json:"oldestRecoveryPoint,omitempty"` RecoveryPointCount *int32 `json:"recoveryPointCount,omitempty"` } -// MabJob is mAB workload-specific job. +// MabJob is MAB workload-specific job. type MabJob struct { EntityFriendlyName *string `json:"entityFriendlyName,omitempty"` BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` @@ -1688,6 +3235,7 @@ type MabJob struct { StartTime *date.Time `json:"startTime,omitempty"` EndTime *date.Time `json:"endTime,omitempty"` ActivityID *string `json:"activityId,omitempty"` + JobType JobType `json:"jobType,omitempty"` Duration *string `json:"duration,omitempty"` ActionsInfo *[]JobSupportedAction `json:"actionsInfo,omitempty"` MabServerName *string `json:"mabServerName,omitempty"` @@ -1697,15 +3245,40 @@ type MabJob struct { ExtendedInfo *MabJobExtendedInfo `json:"extendedInfo,omitempty"` } -// MabJobExtendedInfo is additional information for the MAB workload-specific -// job. +// MarshalJSON is the custom marshaler for MabJob. +func (mj MabJob) MarshalJSON() ([]byte, error) { + mj.JobType = JobTypeMabJob + type Alias MabJob + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mj), + }) +} + +// AsAzureIaaSVMJob is the Job implementation for MabJob. +func (mj MabJob) AsAzureIaaSVMJob() (*AzureIaaSVMJob, bool) { + return nil, false +} + +// AsDpmJob is the Job implementation for MabJob. +func (mj MabJob) AsDpmJob() (*DpmJob, bool) { + return nil, false +} + +// AsMabJob is the Job implementation for MabJob. +func (mj MabJob) AsMabJob() (*MabJob, bool) { + return &mj, true +} + +// MabJobExtendedInfo is additional information for the MAB workload-specific job. type MabJobExtendedInfo struct { TasksList *[]MabJobTaskDetails `json:"tasksList,omitempty"` PropertyBag *map[string]*string `json:"propertyBag,omitempty"` DynamicErrorMessage *string `json:"dynamicErrorMessage,omitempty"` } -// MabJobTaskDetails is mAB workload-specific job task details. +// MabJobTaskDetails is MAB workload-specific job task details. type MabJobTaskDetails struct { TaskID *string `json:"taskId,omitempty"` StartTime *date.Time `json:"startTime,omitempty"` @@ -1716,9 +3289,86 @@ type MabJobTaskDetails struct { // MabProtectionPolicy is mab container-specific backup policy. type MabProtectionPolicy struct { - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` - SchedulePolicy *SchedulePolicy `json:"schedulePolicy,omitempty"` - RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"` + ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` + BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` + SchedulePolicy SchedulePolicy `json:"schedulePolicy,omitempty"` + RetentionPolicy RetentionPolicy `json:"retentionPolicy,omitempty"` +} + +// MarshalJSON is the custom marshaler for MabProtectionPolicy. +func (mpp MabProtectionPolicy) MarshalJSON() ([]byte, error) { + mpp.BackupManagementType = BackupManagementTypeMAB + type Alias MabProtectionPolicy + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mpp), + }) +} + +// AsAzureIaaSVMProtectionPolicy is the ProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) { + return nil, false +} + +// AsAzureSQLProtectionPolicy is the ProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) { + return nil, false +} + +// AsMabProtectionPolicy is the ProtectionPolicy implementation for MabProtectionPolicy. +func (mpp MabProtectionPolicy) AsMabProtectionPolicy() (*MabProtectionPolicy, bool) { + return &mpp, true +} + +// UnmarshalJSON is the custom unmarshaler for MabProtectionPolicy struct. +func (mpp *MabProtectionPolicy) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["schedulePolicy"] + if v != nil { + schedulePolicy, err := unmarshalSchedulePolicy(*m["schedulePolicy"]) + if err != nil { + return err + } + mpp.SchedulePolicy = schedulePolicy + } + + v = m["retentionPolicy"] + if v != nil { + retentionPolicy, err := unmarshalRetentionPolicy(*m["retentionPolicy"]) + if err != nil { + return err + } + mpp.RetentionPolicy = retentionPolicy + } + + v = m["protectedItemsCount"] + if v != nil { + var protectedItemsCount int32 + err = json.Unmarshal(*m["protectedItemsCount"], &protectedItemsCount) + if err != nil { + return err + } + mpp.ProtectedItemsCount = &protectedItemsCount + } + + v = m["backupManagementType"] + if v != nil { + var backupManagementType BackupManagementType + err = json.Unmarshal(*m["backupManagementType"], &backupManagementType) + if err != nil { + return err + } + mpp.BackupManagementType = backupManagementType + } + + return nil } // MonthlyRetentionSchedule is monthly retention schedule. @@ -1738,78 +3388,440 @@ type NameInfo struct { // OperationResultInfo is operation result info. type OperationResultInfo struct { - JobList *[]string `json:"jobList,omitempty"` + ObjectType ObjectTypeOperationResultInfoBase `json:"objectType,omitempty"` + JobList *[]string `json:"jobList,omitempty"` +} + +// MarshalJSON is the custom marshaler for OperationResultInfo. +func (ori OperationResultInfo) MarshalJSON() ([]byte, error) { + ori.ObjectType = ObjectTypeOperationResultInfo + type Alias OperationResultInfo + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ori), + }) +} + +// AsExportJobsOperationResultInfo is the OperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) { + return nil, false +} + +// AsOperationResultInfo is the OperationResultInfoBase implementation for OperationResultInfo. +func (ori OperationResultInfo) AsOperationResultInfo() (*OperationResultInfo, bool) { + return &ori, true } // OperationResultInfoBase is base class for operation result info. -type OperationResultInfoBase struct { +type OperationResultInfoBase interface { + AsExportJobsOperationResultInfo() (*ExportJobsOperationResultInfo, bool) + AsOperationResultInfo() (*OperationResultInfo, bool) +} + +func unmarshalOperationResultInfoBase(body []byte) (OperationResultInfoBase, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeExportJobsOperationResultInfo): + var ejori ExportJobsOperationResultInfo + err := json.Unmarshal(body, &ejori) + return ejori, err + case string(ObjectTypeOperationResultInfo): + var ori OperationResultInfo + err := json.Unmarshal(body, &ori) + return ori, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalOperationResultInfoBaseArray(body []byte) ([]OperationResultInfoBase, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oribArray := make([]OperationResultInfoBase, len(rawMessages)) + + for index, rawMessage := range rawMessages { + orib, err := unmarshalOperationResultInfoBase(*rawMessage) + if err != nil { + return nil, err + } + oribArray[index] = orib + } + return oribArray, nil } // OperationResultInfoBaseResource is base class for operation result info. type OperationResultInfoBaseResource struct { autorest.Response `json:"-"` - StatusCode HTTPStatusCode `json:"statusCode,omitempty"` - Headers *map[string][]string `json:"Headers,omitempty"` - Operation *OperationResultInfoBase `json:"operation,omitempty"` + StatusCode HTTPStatusCode `json:"statusCode,omitempty"` + Headers *map[string][]string `json:"Headers,omitempty"` + Operation OperationResultInfoBase `json:"operation,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for OperationResultInfoBaseResource struct. +func (oribr *OperationResultInfoBaseResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["operation"] + if v != nil { + operation, err := unmarshalOperationResultInfoBase(*m["operation"]) + if err != nil { + return err + } + oribr.Operation = operation + } + + v = m["statusCode"] + if v != nil { + var statusCode HTTPStatusCode + err = json.Unmarshal(*m["statusCode"], &statusCode) + if err != nil { + return err + } + oribr.StatusCode = statusCode + } + + v = m["Headers"] + if v != nil { + var headers map[string][]string + err = json.Unmarshal(*m["Headers"], &headers) + if err != nil { + return err + } + oribr.Headers = &headers + } + + return nil } // OperationStatus is operation status. type OperationStatus struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Status OperationStatusValues `json:"status,omitempty"` - StartTime *date.Time `json:"startTime,omitempty"` - EndTime *date.Time `json:"endTime,omitempty"` - Error *OperationStatusError `json:"error,omitempty"` - Properties *OperationStatusExtendedInfo `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status OperationStatusValues `json:"status,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + Error *OperationStatusError `json:"error,omitempty"` + Properties OperationStatusExtendedInfo `json:"properties,omitempty"` } -// OperationStatusError is error information associated with operation status -// call. +// UnmarshalJSON is the custom unmarshaler for OperationStatus struct. +func (osVar *OperationStatus) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + osVar.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + osVar.Name = &name + } + + v = m["status"] + if v != nil { + var status OperationStatusValues + err = json.Unmarshal(*m["status"], &status) + if err != nil { + return err + } + osVar.Status = status + } + + v = m["startTime"] + if v != nil { + var startTime date.Time + err = json.Unmarshal(*m["startTime"], &startTime) + if err != nil { + return err + } + osVar.StartTime = &startTime + } + + v = m["endTime"] + if v != nil { + var endTime date.Time + err = json.Unmarshal(*m["endTime"], &endTime) + if err != nil { + return err + } + osVar.EndTime = &endTime + } + + v = m["error"] + if v != nil { + var errorVar OperationStatusError + err = json.Unmarshal(*m["error"], &errorVar) + if err != nil { + return err + } + osVar.Error = &errorVar + } + + v = m["properties"] + if v != nil { + properties, err := unmarshalOperationStatusExtendedInfo(*m["properties"]) + if err != nil { + return err + } + osVar.Properties = properties + } + + return nil +} + +// OperationStatusError is error information associated with operation status call. type OperationStatusError struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } -// OperationStatusExtendedInfo is base class for additional information of -// operation status. -type OperationStatusExtendedInfo struct { +// OperationStatusExtendedInfo is base class for additional information of operation status. +type OperationStatusExtendedInfo interface { + AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) + AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) + AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) +} + +func unmarshalOperationStatusExtendedInfo(body []byte) (OperationStatusExtendedInfo, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeOperationStatusJobExtendedInfo): + var osjei OperationStatusJobExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusJobsExtendedInfo): + var osjei OperationStatusJobsExtendedInfo + err := json.Unmarshal(body, &osjei) + return osjei, err + case string(ObjectTypeOperationStatusProvisionILRExtendedInfo): + var ospiei OperationStatusProvisionILRExtendedInfo + err := json.Unmarshal(body, &ospiei) + return ospiei, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalOperationStatusExtendedInfoArray(body []byte) ([]OperationStatusExtendedInfo, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + oseiArray := make([]OperationStatusExtendedInfo, len(rawMessages)) + + for index, rawMessage := range rawMessages { + osei, err := unmarshalOperationStatusExtendedInfo(*rawMessage) + if err != nil { + return nil, err + } + oseiArray[index] = osei + } + return oseiArray, nil } // OperationStatusJobExtendedInfo is operation status job extended info. type OperationStatusJobExtendedInfo struct { - JobID *string `json:"jobId,omitempty"` + ObjectType ObjectTypeOperationStatusExtendedInfo `json:"objectType,omitempty"` + JobID *string `json:"jobId,omitempty"` } -// OperationStatusJobsExtendedInfo is operation status extended info for list -// of jobs. +// MarshalJSON is the custom marshaler for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobExtendedInfo + type Alias OperationStatusJobExtendedInfo + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(osjei), + }) +} + +// AsOperationStatusJobExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return &osjei, true +} + +// AsOperationStatusJobsExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusJobExtendedInfo. +func (osjei OperationStatusJobExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// OperationStatusJobsExtendedInfo is operation status extended info for list of jobs. type OperationStatusJobsExtendedInfo struct { - JobIds *[]string `json:"jobIds,omitempty"` - FailedJobsError *map[string]*string `json:"failedJobsError,omitempty"` + ObjectType ObjectTypeOperationStatusExtendedInfo `json:"objectType,omitempty"` + JobIds *[]string `json:"jobIds,omitempty"` + FailedJobsError *map[string]*string `json:"failedJobsError,omitempty"` } -// OperationStatusProvisionILRExtendedInfo is operation status extended info -// for ILR provision action. +// MarshalJSON is the custom marshaler for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) MarshalJSON() ([]byte, error) { + osjei.ObjectType = ObjectTypeOperationStatusJobsExtendedInfo + type Alias OperationStatusJobsExtendedInfo + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(osjei), + }) +} + +// AsOperationStatusJobExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return &osjei, true +} + +// AsOperationStatusProvisionILRExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusJobsExtendedInfo. +func (osjei OperationStatusJobsExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return nil, false +} + +// OperationStatusProvisionILRExtendedInfo is operation status extended info for ILR provision action. type OperationStatusProvisionILRExtendedInfo struct { - RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` + ObjectType ObjectTypeOperationStatusExtendedInfo `json:"objectType,omitempty"` + RecoveryTarget *InstantItemRecoveryTarget `json:"recoveryTarget,omitempty"` } -// OperationWorkerResponse is this is the base class for operation result -// responses. +// MarshalJSON is the custom marshaler for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) MarshalJSON() ([]byte, error) { + ospiei.ObjectType = ObjectTypeOperationStatusProvisionILRExtendedInfo + type Alias OperationStatusProvisionILRExtendedInfo + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ospiei), + }) +} + +// AsOperationStatusJobExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobExtendedInfo() (*OperationStatusJobExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusJobsExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusJobsExtendedInfo() (*OperationStatusJobsExtendedInfo, bool) { + return nil, false +} + +// AsOperationStatusProvisionILRExtendedInfo is the OperationStatusExtendedInfo implementation for OperationStatusProvisionILRExtendedInfo. +func (ospiei OperationStatusProvisionILRExtendedInfo) AsOperationStatusProvisionILRExtendedInfo() (*OperationStatusProvisionILRExtendedInfo, bool) { + return &ospiei, true +} + +// OperationWorkerResponse is this is the base class for operation result responses. type OperationWorkerResponse struct { StatusCode HTTPStatusCode `json:"statusCode,omitempty"` Headers *map[string][]string `json:"Headers,omitempty"` } // ProtectedItem is base class for backup items. -type ProtectedItem struct { - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - WorkloadType DataSourceType `json:"workloadType,omitempty"` - ContainerName *string `json:"containerName,omitempty"` - SourceResourceID *string `json:"sourceResourceId,omitempty"` - PolicyID *string `json:"policyId,omitempty"` - LastRecoveryPoint *date.Time `json:"lastRecoveryPoint,omitempty"` +type ProtectedItem interface { + AsAzureIaaSClassicComputeVMProtectedItem() (*AzureIaaSClassicComputeVMProtectedItem, bool) + AsAzureIaaSComputeVMProtectedItem() (*AzureIaaSComputeVMProtectedItem, bool) + AsAzureIaaSVMProtectedItem() (*AzureIaaSVMProtectedItem, bool) + AsAzureSQLProtectedItem() (*AzureSQLProtectedItem, bool) + AsDPMProtectedItem() (*DPMProtectedItem, bool) + AsMabFileFolderProtectedItem() (*MabFileFolderProtectedItem, bool) +} + +func unmarshalProtectedItem(body []byte) (ProtectedItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectedItemType"] { + case string(ProtectedItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectedItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectedItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectedItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + case string(ProtectedItemTypeAzureIaaSVMProtectedItem): + var aispi AzureIaaSVMProtectedItem + err := json.Unmarshal(body, &aispi) + return aispi, err + case string(ProtectedItemTypeMicrosoftSqlserversdatabases): + var aspi AzureSQLProtectedItem + err := json.Unmarshal(body, &aspi) + return aspi, err + case string(ProtectedItemTypeDPMProtectedItem): + var dpi DPMProtectedItem + err := json.Unmarshal(body, &dpi) + return dpi, err + case string(ProtectedItemTypeMabFileFolderProtectedItem): + var mffpi MabFileFolderProtectedItem + err := json.Unmarshal(body, &mffpi) + return mffpi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalProtectedItemArray(body []byte) ([]ProtectedItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + piArray := make([]ProtectedItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pi, err := unmarshalProtectedItem(*rawMessage) + if err != nil { + return nil, err + } + piArray[index] = pi + } + return piArray, nil } // ProtectedItemQueryObject is filters to list backup items. @@ -1832,7 +3844,88 @@ type ProtectedItemResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *ProtectedItem `json:"properties,omitempty"` + Properties ProtectedItem `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProtectedItemResource struct. +func (pir *ProtectedItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalProtectedItem(*m["properties"]) + if err != nil { + return err + } + pir.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + pir.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + pir.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + pir.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + pir.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + pir.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + pir.ETag = &eTag + } + + return nil } // ProtectedItemResourceList is list of ProtectedItem resources @@ -1854,27 +3947,169 @@ func (client ProtectedItemResourceList) ProtectedItemResourceListPreparer() (*ht autorest.WithBaseURL(to.String(client.NextLink))) } -// ProtectionContainer is base class for container with backup items. -// Containers with specific workloads are derived from this class. -type ProtectionContainer struct { - FriendlyName *string `json:"friendlyName,omitempty"` - BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` - RegistrationStatus *string `json:"registrationStatus,omitempty"` - HealthStatus *string `json:"healthStatus,omitempty"` - ContainerType ContainerType `json:"containerType,omitempty"` +// ProtectionContainer is base class for container with backup items. Containers with specific workloads are derived +// from this class. +type ProtectionContainer interface { + AsAzureBackupServerContainer() (*AzureBackupServerContainer, bool) + AsAzureIaaSClassicComputeVMContainer() (*AzureIaaSClassicComputeVMContainer, bool) + AsAzureIaaSComputeVMContainer() (*AzureIaaSComputeVMContainer, bool) + AsAzureSQLContainer() (*AzureSQLContainer, bool) + AsDpmContainer() (*DpmContainer, bool) + AsIaaSVMContainer() (*IaaSVMContainer, bool) + AsMabContainer() (*MabContainer, bool) } -// ProtectionContainerResource is base class for container with backup items. -// Containers with specific workloads are derived from this class. +func unmarshalProtectionContainer(body []byte) (ProtectionContainer, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableObjectType"] { + case string(ProtectableObjectTypeAzureBackupServerContainer): + var absc AzureBackupServerContainer + err := json.Unmarshal(body, &absc) + return absc, err + case string(ProtectableObjectTypeMicrosoftClassicComputevirtualMachines): + var aisccvc AzureIaaSClassicComputeVMContainer + err := json.Unmarshal(body, &aisccvc) + return aisccvc, err + case string(ProtectableObjectTypeMicrosoftComputevirtualMachines): + var aiscvc AzureIaaSComputeVMContainer + err := json.Unmarshal(body, &aiscvc) + return aiscvc, err + case string(ProtectableObjectTypeAzureSQLContainer): + var asc AzureSQLContainer + err := json.Unmarshal(body, &asc) + return asc, err + case string(ProtectableObjectTypeDPMContainer): + var dc DpmContainer + err := json.Unmarshal(body, &dc) + return dc, err + case string(ProtectableObjectTypeIaaSVMContainer): + var isc IaaSVMContainer + err := json.Unmarshal(body, &isc) + return isc, err + case string(ProtectableObjectTypeMABWindowsContainer): + var mc MabContainer + err := json.Unmarshal(body, &mc) + return mc, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalProtectionContainerArray(body []byte) ([]ProtectionContainer, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + pcArray := make([]ProtectionContainer, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pc, err := unmarshalProtectionContainer(*rawMessage) + if err != nil { + return nil, err + } + pcArray[index] = pc + } + return pcArray, nil +} + +// ProtectionContainerResource is base class for container with backup items. Containers with specific workloads are +// derived from this class. type ProtectionContainerResource struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - ETag *string `json:"eTag,omitempty"` - Properties *ProtectionContainer `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + ETag *string `json:"eTag,omitempty"` + Properties ProtectionContainer `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionContainerResource struct. +func (pcr *ProtectionContainerResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalProtectionContainer(*m["properties"]) + if err != nil { + return err + } + pcr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + pcr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + pcr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + pcr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + pcr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + pcr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + pcr.ETag = &eTag + } + + return nil } // ProtectionContainerResourceList is list of ProtectionContainer resources @@ -1896,10 +4131,54 @@ func (client ProtectionContainerResourceList) ProtectionContainerResourceListPre autorest.WithBaseURL(to.String(client.NextLink))) } -// ProtectionPolicy is base class for backup policy. Workload-specific backup -// policies are derived from this class. -type ProtectionPolicy struct { - ProtectedItemsCount *int32 `json:"protectedItemsCount,omitempty"` +// ProtectionPolicy is base class for backup policy. Workload-specific backup policies are derived from this class. +type ProtectionPolicy interface { + AsAzureIaaSVMProtectionPolicy() (*AzureIaaSVMProtectionPolicy, bool) + AsAzureSQLProtectionPolicy() (*AzureSQLProtectionPolicy, bool) + AsMabProtectionPolicy() (*MabProtectionPolicy, bool) +} + +func unmarshalProtectionPolicy(body []byte) (ProtectionPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["backupManagementType"] { + case string(BackupManagementTypeAzureIaasVM): + var aispp AzureIaaSVMProtectionPolicy + err := json.Unmarshal(body, &aispp) + return aispp, err + case string(BackupManagementTypeAzureSQL): + var aspp AzureSQLProtectionPolicy + err := json.Unmarshal(body, &aspp) + return aspp, err + case string(BackupManagementTypeMAB): + var mpp MabProtectionPolicy + err := json.Unmarshal(body, &mpp) + return mpp, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalProtectionPolicyArray(body []byte) ([]ProtectionPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ppArray := make([]ProtectionPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + pp, err := unmarshalProtectionPolicy(*rawMessage) + if err != nil { + return nil, err + } + ppArray[index] = pp + } + return ppArray, nil } // ProtectionPolicyQueryObject is filters the list backup policies API. @@ -1907,8 +4186,8 @@ type ProtectionPolicyQueryObject struct { BackupManagementType BackupManagementType `json:"backupManagementType,omitempty"` } -// ProtectionPolicyResource is base class for backup policy. Workload-specific -// backup policies are derived from this class. +// ProtectionPolicyResource is base class for backup policy. Workload-specific backup policies are derived from this +// class. type ProtectionPolicyResource struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1917,7 +4196,88 @@ type ProtectionPolicyResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *ProtectionPolicy `json:"properties,omitempty"` + Properties ProtectionPolicy `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProtectionPolicyResource struct. +func (ppr *ProtectionPolicyResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalProtectionPolicy(*m["properties"]) + if err != nil { + return err + } + ppr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + ppr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + ppr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + ppr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + ppr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + ppr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + ppr.ETag = &eTag + } + + return nil } // ProtectionPolicyResourceList is list of ProtectionPolicy resources @@ -1939,13 +4299,52 @@ func (client ProtectionPolicyResourceList) ProtectionPolicyResourceListPreparer( autorest.WithBaseURL(to.String(client.NextLink))) } -// RecoveryPoint is base class for backup copies. Workload-specific backup -// copies are derived from this class. -type RecoveryPoint struct { +// RecoveryPoint is base class for backup copies. Workload-specific backup copies are derived from this class. +type RecoveryPoint interface { + AsGenericRecoveryPoint() (*GenericRecoveryPoint, bool) + AsIaasVMRecoveryPoint() (*IaasVMRecoveryPoint, bool) } -// RecoveryPointResource is base class for backup copies. Workload-specific -// backup copies are derived from this class. +func unmarshalRecoveryPoint(body []byte) (RecoveryPoint, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeGenericRecoveryPoint): + var grp GenericRecoveryPoint + err := json.Unmarshal(body, &grp) + return grp, err + case string(ObjectTypeIaasVMRecoveryPoint): + var ivrp IaasVMRecoveryPoint + err := json.Unmarshal(body, &ivrp) + return ivrp, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRecoveryPointArray(body []byte) ([]RecoveryPoint, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpArray := make([]RecoveryPoint, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rp, err := unmarshalRecoveryPoint(*rawMessage) + if err != nil { + return nil, err + } + rpArray[index] = rp + } + return rpArray, nil +} + +// RecoveryPointResource is base class for backup copies. Workload-specific backup copies are derived from this class. type RecoveryPointResource struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1954,7 +4353,88 @@ type RecoveryPointResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *RecoveryPoint `json:"properties,omitempty"` + Properties RecoveryPoint `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPointResource struct. +func (rpr *RecoveryPointResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalRecoveryPoint(*m["properties"]) + if err != nil { + return err + } + rpr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + rpr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + rpr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + rpr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + rpr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + rpr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + rpr.ETag = &eTag + } + + return nil } // RecoveryPointResourceList is list of RecoveryPoint resources @@ -1982,7 +4462,7 @@ type RecoveryPointTierInformation struct { Status RecoveryPointTierStatus `json:"status,omitempty"` } -// Resource is aRM Resource. +// Resource is ARM Resource. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -1997,13 +4477,48 @@ type ResourceList struct { NextLink *string `json:"nextLink,omitempty"` } -// RestoreRequest is base class for restore request. Workload-specific restore -// requests are derived from this class. -type RestoreRequest struct { +// RestoreRequest is base class for restore request. Workload-specific restore requests are derived from this class. +type RestoreRequest interface { + AsIaasVMRestoreRequest() (*IaasVMRestoreRequest, bool) } -// RestoreRequestResource is base class for restore request. Workload-specific -// restore requests are derived from this class. +func unmarshalRestoreRequest(body []byte) (RestoreRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["objectType"] { + case string(ObjectTypeIaasVMRestoreRequest): + var ivrr IaasVMRestoreRequest + err := json.Unmarshal(body, &ivrr) + return ivrr, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRestoreRequestArray(body []byte) ([]RestoreRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rrArray := make([]RestoreRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rr, err := unmarshalRestoreRequest(*rawMessage) + if err != nil { + return nil, err + } + rrArray[index] = rr + } + return rrArray, nil +} + +// RestoreRequestResource is base class for restore request. Workload-specific restore requests are derived from this +// class. type RestoreRequestResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -2011,7 +4526,88 @@ type RestoreRequestResource struct { Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` ETag *string `json:"eTag,omitempty"` - Properties *RestoreRequest `json:"properties,omitempty"` + Properties RestoreRequest `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RestoreRequestResource struct. +func (rrr *RestoreRequestResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalRestoreRequest(*m["properties"]) + if err != nil { + return err + } + rrr.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + rrr.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + rrr.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + rrr.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + rrr.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + rrr.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + rrr.ETag = &eTag + } + + return nil } // RetentionDuration is retention duration. @@ -2021,24 +4617,150 @@ type RetentionDuration struct { } // RetentionPolicy is base class for retention policy. -type RetentionPolicy struct { +type RetentionPolicy interface { + AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) + AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) +} + +func unmarshalRetentionPolicy(body []byte) (RetentionPolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["retentionPolicyType"] { + case string(RetentionPolicyTypeLongTermRetentionPolicy): + var ltrp LongTermRetentionPolicy + err := json.Unmarshal(body, <rp) + return ltrp, err + case string(RetentionPolicyTypeSimpleRetentionPolicy): + var srp SimpleRetentionPolicy + err := json.Unmarshal(body, &srp) + return srp, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRetentionPolicyArray(body []byte) ([]RetentionPolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpArray := make([]RetentionPolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rp, err := unmarshalRetentionPolicy(*rawMessage) + if err != nil { + return nil, err + } + rpArray[index] = rp + } + return rpArray, nil } // SchedulePolicy is base class for backup schedule. -type SchedulePolicy struct { +type SchedulePolicy interface { + AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) + AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) +} + +func unmarshalSchedulePolicy(body []byte) (SchedulePolicy, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["schedulePolicyType"] { + case string(SchedulePolicyTypeLongTermSchedulePolicy): + var ltsp LongTermSchedulePolicy + err := json.Unmarshal(body, <sp) + return ltsp, err + case string(SchedulePolicyTypeSimpleSchedulePolicy): + var ssp SimpleSchedulePolicy + err := json.Unmarshal(body, &ssp) + return ssp, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalSchedulePolicyArray(body []byte) ([]SchedulePolicy, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + spArray := make([]SchedulePolicy, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sp, err := unmarshalSchedulePolicy(*rawMessage) + if err != nil { + return nil, err + } + spArray[index] = sp + } + return spArray, nil } // SimpleRetentionPolicy is simple policy retention. type SimpleRetentionPolicy struct { - RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` + RetentionPolicyType RetentionPolicyType `json:"retentionPolicyType,omitempty"` + RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` +} + +// MarshalJSON is the custom marshaler for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) MarshalJSON() ([]byte, error) { + srp.RetentionPolicyType = RetentionPolicyTypeSimpleRetentionPolicy + type Alias SimpleRetentionPolicy + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(srp), + }) +} + +// AsLongTermRetentionPolicy is the RetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsLongTermRetentionPolicy() (*LongTermRetentionPolicy, bool) { + return nil, false +} + +// AsSimpleRetentionPolicy is the RetentionPolicy implementation for SimpleRetentionPolicy. +func (srp SimpleRetentionPolicy) AsSimpleRetentionPolicy() (*SimpleRetentionPolicy, bool) { + return &srp, true } // SimpleSchedulePolicy is simple policy schedule. type SimpleSchedulePolicy struct { - ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` - ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` - ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` - ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` + SchedulePolicyType SchedulePolicyType `json:"schedulePolicyType,omitempty"` + ScheduleRunFrequency ScheduleRunType `json:"scheduleRunFrequency,omitempty"` + ScheduleRunDays *[]DayOfWeek `json:"scheduleRunDays,omitempty"` + ScheduleRunTimes *[]date.Time `json:"scheduleRunTimes,omitempty"` + ScheduleWeeklyFrequency *int32 `json:"scheduleWeeklyFrequency,omitempty"` +} + +// MarshalJSON is the custom marshaler for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) MarshalJSON() ([]byte, error) { + ssp.SchedulePolicyType = SchedulePolicyTypeSimpleSchedulePolicy + type Alias SimpleSchedulePolicy + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ssp), + }) +} + +// AsLongTermSchedulePolicy is the SchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsLongTermSchedulePolicy() (*LongTermSchedulePolicy, bool) { + return nil, false +} + +// AsSimpleSchedulePolicy is the SchedulePolicy implementation for SimpleSchedulePolicy. +func (ssp SimpleSchedulePolicy) AsSimpleSchedulePolicy() (*SimpleSchedulePolicy, bool) { + return &ssp, true } // TokenInformation is the token information details. @@ -2062,28 +4784,150 @@ type WeeklyRetentionSchedule struct { RetentionDuration *RetentionDuration `json:"retentionDuration,omitempty"` } -// WorkloadProtectableItem is base class for backup item. Workload-specific -// backup items are derived from this class. -type WorkloadProtectableItem struct { - BackupManagementType *string `json:"backupManagementType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ProtectionState ProtectionStatus `json:"protectionState,omitempty"` +// WorkloadProtectableItem is base class for backup item. Workload-specific backup items are derived from this class. +type WorkloadProtectableItem interface { + AsAzureIaaSClassicComputeVMProtectableItem() (*AzureIaaSClassicComputeVMProtectableItem, bool) + AsAzureIaaSComputeVMProtectableItem() (*AzureIaaSComputeVMProtectableItem, bool) + AsIaaSVMProtectableItem() (*IaaSVMProtectableItem, bool) } -// WorkloadProtectableItemResource is base class for backup item. -// Workload-specific backup items are derived from this class. +func unmarshalWorkloadProtectableItem(body []byte) (WorkloadProtectableItem, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["protectableItemType"] { + case string(ProtectableItemTypeMicrosoftClassicComputevirtualMachines): + var aisccvpi AzureIaaSClassicComputeVMProtectableItem + err := json.Unmarshal(body, &aisccvpi) + return aisccvpi, err + case string(ProtectableItemTypeMicrosoftComputevirtualMachines): + var aiscvpi AzureIaaSComputeVMProtectableItem + err := json.Unmarshal(body, &aiscvpi) + return aiscvpi, err + case string(ProtectableItemTypeIaaSVMProtectableItem): + var ispi IaaSVMProtectableItem + err := json.Unmarshal(body, &ispi) + return ispi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalWorkloadProtectableItemArray(body []byte) ([]WorkloadProtectableItem, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + wpiArray := make([]WorkloadProtectableItem, len(rawMessages)) + + for index, rawMessage := range rawMessages { + wpi, err := unmarshalWorkloadProtectableItem(*rawMessage) + if err != nil { + return nil, err + } + wpiArray[index] = wpi + } + return wpiArray, nil +} + +// WorkloadProtectableItemResource is base class for backup item. Workload-specific backup items are derived from this +// class. type WorkloadProtectableItemResource struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - ETag *string `json:"eTag,omitempty"` - Properties *WorkloadProtectableItem `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + ETag *string `json:"eTag,omitempty"` + Properties WorkloadProtectableItem `json:"properties,omitempty"` } -// WorkloadProtectableItemResourceList is list of WorkloadProtectableItem -// resources +// UnmarshalJSON is the custom unmarshaler for WorkloadProtectableItemResource struct. +func (wpir *WorkloadProtectableItemResource) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalWorkloadProtectableItem(*m["properties"]) + if err != nil { + return err + } + wpir.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + wpir.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + wpir.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + wpir.Type = &typeVar + } + + v = m["location"] + if v != nil { + var location string + err = json.Unmarshal(*m["location"], &location) + if err != nil { + return err + } + wpir.Location = &location + } + + v = m["tags"] + if v != nil { + var tags map[string]*string + err = json.Unmarshal(*m["tags"], &tags) + if err != nil { + return err + } + wpir.Tags = &tags + } + + v = m["eTag"] + if v != nil { + var eTag string + err = json.Unmarshal(*m["eTag"], &eTag) + if err != nil { + return err + } + wpir.ETag = &eTag + } + + return nil +} + +// WorkloadProtectableItemResourceList is list of WorkloadProtectableItem resources type WorkloadProtectableItemResourceList struct { autorest.Response `json:"-"` NextLink *string `json:"nextLink,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/operations.go index 4c70df134..c587ba69a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/operations.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// OperationsClient is the client for the Operations methods of the -// Recoveryservicesbackup service. +// OperationsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type OperationsClient struct { ManagementClient } @@ -35,18 +33,14 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // List returns the list of available operations. -// -// resourceGroupName is the name of the resource group where the recovery -// services vault is present. -func (client OperationsClient) List(resourceGroupName string) (result ClientDiscoveryResponse, err error) { - req, err := client.ListPreparer(resourceGroupName) +func (client OperationsClient) List() (result ClientDiscoveryResponse, err error) { + req, err := client.ListPreparer() if err != nil { err = autorest.NewErrorWithError(err, "recoveryservicesbackup.OperationsClient", "List", nil, "Failure preparing request") return @@ -68,16 +62,17 @@ func (client OperationsClient) List(resourceGroupName string) (result ClientDisc } // ListPreparer prepares the List request. -func (client OperationsClient) ListPreparer(resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2016-08-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations", pathParameters)) + autorest.WithPath("/providers/Microsoft.RecoveryServices/operations"), + autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -123,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults ClientDiscoveryRespon return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan ClientDiscoveryValueForSingleAPI, <-chan error) { + resultChan := make(chan ClientDiscoveryValueForSingleAPI) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationresults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationresults.go index e4c9f881a..7d23fa95d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationresults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationresults.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,28 @@ import ( "net/http" ) -// ProtectedItemOperationResultsClient is the client for the -// ProtectedItemOperationResults methods of the Recoveryservicesbackup service. +// ProtectedItemOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectedItemOperationResultsClient struct { ManagementClient } -// NewProtectedItemOperationResultsClient creates an instance of the -// ProtectedItemOperationResultsClient client. +// NewProtectedItemOperationResultsClient creates an instance of the ProtectedItemOperationResultsClient client. func NewProtectedItemOperationResultsClient(subscriptionID string) ProtectedItemOperationResultsClient { return NewProtectedItemOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectedItemOperationResultsClientWithBaseURI creates an instance of the -// ProtectedItemOperationResultsClient client. +// NewProtectedItemOperationResultsClientWithBaseURI creates an instance of the ProtectedItemOperationResultsClient +// client. func NewProtectedItemOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationResultsClient { return ProtectedItemOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get fetches the result of any operation on the backup item. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backup item. containerName is -// container name associated with the backup item. protectedItemName is backup -// item name whose details are to be fetched. operationID is operationID which -// represents the operation whose result needs to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is +// container name associated with the backup item. protectedItemName is backup item name whose details are to be +// fetched. operationID is operationID which represents the operation whose result needs to be fetched. func (client ProtectedItemOperationResultsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result ProtectedItemResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationstatuses.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationstatuses.go index 6e80f9b7e..651826fea 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationstatuses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditemoperationstatuses.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,37 +23,30 @@ import ( "net/http" ) -// ProtectedItemOperationStatusesClient is the client for the -// ProtectedItemOperationStatuses methods of the Recoveryservicesbackup -// service. +// ProtectedItemOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectedItemOperationStatusesClient struct { ManagementClient } -// NewProtectedItemOperationStatusesClient creates an instance of the -// ProtectedItemOperationStatusesClient client. +// NewProtectedItemOperationStatusesClient creates an instance of the ProtectedItemOperationStatusesClient client. func NewProtectedItemOperationStatusesClient(subscriptionID string) ProtectedItemOperationStatusesClient { return NewProtectedItemOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of -// the ProtectedItemOperationStatusesClient client. +// NewProtectedItemOperationStatusesClientWithBaseURI creates an instance of the ProtectedItemOperationStatusesClient +// client. func NewProtectedItemOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemOperationStatusesClient { return ProtectedItemOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get fetches the status of an operation such as triggering a backup, restore. -// The status can be in progress, completed or failed. You can refer to the -// OperationStatus enum for all the possible states of the operation. Some -// operations create jobs. This method returns the list of jobs associated with -// the operation. +// Get fetches the status of an operation such as triggering a backup, restore. The status can be in progress, +// completed or failed. You can refer to the OperationStatus enum for all the possible states of the operation. Some +// operations create jobs. This method returns the list of jobs associated with the operation. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backup item. containerName is -// container name associated with the backup item. protectedItemName is backup -// item name whose details are to be fetched. operationID is operationID -// represents the operation whose status needs to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is +// container name associated with the backup item. protectedItemName is backup item name whose details are to be +// fetched. operationID is operationID represents the operation whose status needs to be fetched. func (client ProtectedItemOperationStatusesClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, operationID string) (result OperationStatus, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditems.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditems.go index 8edf293e7..737f05419 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditems.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protecteditems.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,33 +23,28 @@ import ( "net/http" ) -// ProtectedItemsClient is the client for the ProtectedItems methods of the -// Recoveryservicesbackup service. +// ProtectedItemsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectedItemsClient struct { ManagementClient } -// NewProtectedItemsClient creates an instance of the ProtectedItemsClient -// client. +// NewProtectedItemsClient creates an instance of the ProtectedItemsClient client. func NewProtectedItemsClient(subscriptionID string) ProtectedItemsClient { return NewProtectedItemsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectedItemsClientWithBaseURI creates an instance of the -// ProtectedItemsClient client. +// NewProtectedItemsClientWithBaseURI creates an instance of the ProtectedItemsClient client. func NewProtectedItemsClientWithBaseURI(baseURI string, subscriptionID string) ProtectedItemsClient { return ProtectedItemsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate enables backup of an item or to modifies the backup policy -// information of an already backed up item. This is an asynchronous operation. -// To know the status of the operation, call the GetItemOperationResult API. +// CreateOrUpdate enables backup of an item or to modifies the backup policy information of an already backed up item. +// This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backup item. containerName is -// container name associated with the backup item. protectedItemName is item -// name to be backed up. parameters is resource backed up item +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backup item. containerName is +// container name associated with the backup item. protectedItemName is item name to be backed up. parameters is +// resource backed up item func (client ProtectedItemsClient) CreateOrUpdate(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, parameters ProtectedItemResource) (result autorest.Response, err error) { req, err := client.CreateOrUpdatePreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, parameters) if err != nil { @@ -117,15 +111,12 @@ func (client ProtectedItemsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete used to disable backup of an item within a container. This is an -// asynchronous operation. To know the status of the request, call the -// GetItemOperationResult API. +// Delete used to disable backup of an item within a container. This is an asynchronous operation. To know the status +// of the request, call the GetItemOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backed up item. containerName -// is container name associated with the backed up item. protectedItemName is -// backed up item to be deleted. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backed up item. containerName is +// container name associated with the backed up item. protectedItemName is backed up item to be deleted. func (client ProtectedItemsClient) Delete(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName) if err != nil { @@ -190,16 +181,13 @@ func (client ProtectedItemsClient) DeleteResponder(resp *http.Response) (result return } -// Get provides the details of the backed up item. This is an asynchronous -// operation. To know the status of the operation, call the -// GetItemOperationResult API. +// Get provides the details of the backed up item. This is an asynchronous operation. To know the status of the +// operation, call the GetItemOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backed up item. containerName -// is container name associated with the backed up item. protectedItemName is -// backed up item name whose details are to be fetched. filter is oData filter -// options. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backed up item. containerName is +// container name associated with the backed up item. protectedItemName is backed up item name whose details are to be +// fetched. filter is oData filter options. func (client ProtectedItemsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result ProtectedItemResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontaineroperationresults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontaineroperationresults.go index c1d16a743..4f0b2333f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontaineroperationresults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontaineroperationresults.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,29 @@ import ( "net/http" ) -// ProtectionContainerOperationResultsClient is the client for the -// ProtectionContainerOperationResults methods of the Recoveryservicesbackup -// service. +// ProtectionContainerOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectionContainerOperationResultsClient struct { ManagementClient } -// NewProtectionContainerOperationResultsClient creates an instance of the -// ProtectionContainerOperationResultsClient client. +// NewProtectionContainerOperationResultsClient creates an instance of the ProtectionContainerOperationResultsClient +// client. func NewProtectionContainerOperationResultsClient(subscriptionID string) ProtectionContainerOperationResultsClient { return NewProtectionContainerOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainerOperationResultsClientWithBaseURI creates an instance -// of the ProtectionContainerOperationResultsClient client. +// NewProtectionContainerOperationResultsClientWithBaseURI creates an instance of the +// ProtectionContainerOperationResultsClient client. func NewProtectionContainerOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerOperationResultsClient { return ProtectionContainerOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get fetches the result of any operation on the container. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the container. containerName is -// container name whose information should be fetched. operationID is operation -// ID which represents the operation whose result needs to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the container. containerName is +// container name whose information should be fetched. operationID is operation ID which represents the operation whose +// result needs to be fetched. func (client ProtectionContainerOperationResultsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, operationID string) (result ProtectionContainerResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainerrefreshoperationresults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainerrefreshoperationresults.go index e8ff5422a..66f7b214c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainerrefreshoperationresults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainerrefreshoperationresults.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,31 +23,27 @@ import ( "net/http" ) -// ProtectionContainerRefreshOperationResultsClient is the client for the -// ProtectionContainerRefreshOperationResults methods of the -// Recoveryservicesbackup service. +// ProtectionContainerRefreshOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectionContainerRefreshOperationResultsClient struct { ManagementClient } -// NewProtectionContainerRefreshOperationResultsClient creates an instance of -// the ProtectionContainerRefreshOperationResultsClient client. +// NewProtectionContainerRefreshOperationResultsClient creates an instance of the +// ProtectionContainerRefreshOperationResultsClient client. func NewProtectionContainerRefreshOperationResultsClient(subscriptionID string) ProtectionContainerRefreshOperationResultsClient { return NewProtectionContainerRefreshOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an -// instance of the ProtectionContainerRefreshOperationResultsClient client. +// NewProtectionContainerRefreshOperationResultsClientWithBaseURI creates an instance of the +// ProtectionContainerRefreshOperationResultsClient client. func NewProtectionContainerRefreshOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainerRefreshOperationResultsClient { return ProtectionContainerRefreshOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get provides the result of the refresh operation triggered by the -// BeginRefresh operation. +// Get provides the result of the refresh operation triggered by the BeginRefresh operation. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the container. operationID is +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the container. operationID is // operation ID associated with the operation whose result needs to be fetched. func (client ProtectionContainerRefreshOperationResultsClient) Get(vaultName string, resourceGroupName string, fabricName string, operationID string) (result autorest.Response, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, operationID) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainers.go index 0b04ff18c..6c847f471 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectioncontainers.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,31 +23,26 @@ import ( "net/http" ) -// ProtectionContainersClient is the client for the ProtectionContainers -// methods of the Recoveryservicesbackup service. +// ProtectionContainersClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectionContainersClient struct { ManagementClient } -// NewProtectionContainersClient creates an instance of the -// ProtectionContainersClient client. +// NewProtectionContainersClient creates an instance of the ProtectionContainersClient client. func NewProtectionContainersClient(subscriptionID string) ProtectionContainersClient { return NewProtectionContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionContainersClientWithBaseURI creates an instance of the -// ProtectionContainersClient client. +// NewProtectionContainersClientWithBaseURI creates an instance of the ProtectionContainersClient client. func NewProtectionContainersClientWithBaseURI(baseURI string, subscriptionID string) ProtectionContainersClient { return ProtectionContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get gets details of the specific container registered to your Recovery -// Services Vault. +// Get gets details of the specific container registered to your Recovery Services Vault. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is name of the fabric where the container belongs. containerName -// is name of the container whose details need to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is name of the fabric where the container belongs. containerName is +// name of the container whose details need to be fetched. func (client ProtectionContainersClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string) (result ProtectionContainerResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName) if err != nil { @@ -113,13 +107,11 @@ func (client ProtectionContainersClient) GetResponder(resp *http.Response) (resu return } -// Refresh discovers all the containers in the subscription that can be backed -// up to Recovery Services Vault. This is an asynchronous operation. To know -// the status of the operation, call GetRefreshOperationResult API. +// Refresh discovers all the containers in the subscription that can be backed up to Recovery Services Vault. This is +// an asynchronous operation. To know the status of the operation, call GetRefreshOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated the container. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated the container. func (client ProtectionContainersClient) Refresh(vaultName string, resourceGroupName string, fabricName string) (result autorest.Response, err error) { req, err := client.RefreshPreparer(vaultName, resourceGroupName, fabricName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicies.go index 21c790f82..5d2f020a9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicies.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,26 @@ import ( "net/http" ) -// ProtectionPoliciesClient is the client for the ProtectionPolicies methods of -// the Recoveryservicesbackup service. +// ProtectionPoliciesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectionPoliciesClient struct { ManagementClient } -// NewProtectionPoliciesClient creates an instance of the -// ProtectionPoliciesClient client. +// NewProtectionPoliciesClient creates an instance of the ProtectionPoliciesClient client. func NewProtectionPoliciesClient(subscriptionID string) ProtectionPoliciesClient { return NewProtectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionPoliciesClientWithBaseURI creates an instance of the -// ProtectionPoliciesClient client. +// NewProtectionPoliciesClientWithBaseURI creates an instance of the ProtectionPoliciesClient client. func NewProtectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPoliciesClient { return ProtectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or modifies a backup policy. This is an asynchronous -// operation. Status of the operation can be fetched using -// GetPolicyOperationResult API. +// CreateOrUpdate creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can +// be fetched using GetPolicyOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// policyName is backup policy to be created. parameters is resource backup -// policy +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. policyName is backup policy to be created. parameters is resource backup policy func (client ProtectionPoliciesClient) CreateOrUpdate(vaultName string, resourceGroupName string, policyName string, parameters ProtectionPolicyResource) (result ProtectionPolicyResource, err error) { req, err := client.CreateOrUpdatePreparer(vaultName, resourceGroupName, policyName, parameters) if err != nil { @@ -115,13 +108,11 @@ func (client ProtectionPoliciesClient) CreateOrUpdateResponder(resp *http.Respon return } -// Delete deletes specified backup policy from your Recovery Services Vault. -// This is an asynchronous operation. Status of the operation can be fetched -// using GetPolicyOperationResult API. +// Delete deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status +// of the operation can be fetched using GetPolicyOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// policyName is backup policy to be deleted. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. policyName is backup policy to be deleted. func (client ProtectionPoliciesClient) Delete(vaultName string, resourceGroupName string, policyName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(vaultName, resourceGroupName, policyName) if err != nil { @@ -184,13 +175,11 @@ func (client ProtectionPoliciesClient) DeleteResponder(resp *http.Response) (res return } -// Get provides the details of the backup policies associated to Recovery -// Services Vault. This is an asynchronous operation. Status of the operation -// can be fetched using GetPolicyOperationResult API. +// Get provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous +// operation. Status of the operation can be fetched using GetPolicyOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// policyName is backup policy information to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. policyName is backup policy information to be fetched. func (client ProtectionPoliciesClient) Get(vaultName string, resourceGroupName string, policyName string) (result ProtectionPolicyResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, policyName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationresults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationresults.go index 7fb4fe4e4..29ed442c1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationresults.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationresults.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,27 @@ import ( "net/http" ) -// ProtectionPolicyOperationResultsClient is the client for the -// ProtectionPolicyOperationResults methods of the Recoveryservicesbackup -// service. +// ProtectionPolicyOperationResultsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectionPolicyOperationResultsClient struct { ManagementClient } -// NewProtectionPolicyOperationResultsClient creates an instance of the -// ProtectionPolicyOperationResultsClient client. +// NewProtectionPolicyOperationResultsClient creates an instance of the ProtectionPolicyOperationResultsClient client. func NewProtectionPolicyOperationResultsClient(subscriptionID string) ProtectionPolicyOperationResultsClient { return NewProtectionPolicyOperationResultsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionPolicyOperationResultsClientWithBaseURI creates an instance of -// the ProtectionPolicyOperationResultsClient client. +// NewProtectionPolicyOperationResultsClientWithBaseURI creates an instance of the +// ProtectionPolicyOperationResultsClient client. func NewProtectionPolicyOperationResultsClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationResultsClient { return ProtectionPolicyOperationResultsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get provides the result of an operation. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// policyName is backup policy name whose operation's result needs to be -// fetched. operationID is operation ID which represents the operation whose -// result needs to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. policyName is backup policy name whose operation's result needs to be fetched. +// operationID is operation ID which represents the operation whose result needs to be fetched. func (client ProtectionPolicyOperationResultsClient) Get(vaultName string, resourceGroupName string, policyName string, operationID string) (result ProtectionPolicyResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, policyName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationstatuses.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationstatuses.go index 6fdb8e9bf..757e0a7a3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationstatuses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/protectionpolicyoperationstatuses.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,36 +23,30 @@ import ( "net/http" ) -// ProtectionPolicyOperationStatusesClient is the client for the -// ProtectionPolicyOperationStatuses methods of the Recoveryservicesbackup -// service. +// ProtectionPolicyOperationStatusesClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type ProtectionPolicyOperationStatusesClient struct { ManagementClient } -// NewProtectionPolicyOperationStatusesClient creates an instance of the -// ProtectionPolicyOperationStatusesClient client. +// NewProtectionPolicyOperationStatusesClient creates an instance of the ProtectionPolicyOperationStatusesClient +// client. func NewProtectionPolicyOperationStatusesClient(subscriptionID string) ProtectionPolicyOperationStatusesClient { return NewProtectionPolicyOperationStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of -// the ProtectionPolicyOperationStatusesClient client. +// NewProtectionPolicyOperationStatusesClientWithBaseURI creates an instance of the +// ProtectionPolicyOperationStatusesClient client. func NewProtectionPolicyOperationStatusesClientWithBaseURI(baseURI string, subscriptionID string) ProtectionPolicyOperationStatusesClient { return ProtectionPolicyOperationStatusesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get provides the status of the asynchronous operations like backup, restore. -// The status can be in progress, completed or failed. You can refer to the -// Operation Status enum for all the possible states of an operation. Some -// operations create jobs. This method returns the list of jobs associated with -// operation. +// Get provides the status of the asynchronous operations like backup, restore. The status can be in progress, +// completed or failed. You can refer to the Operation Status enum for all the possible states of an operation. Some +// operations create jobs. This method returns the list of jobs associated with operation. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// policyName is backup policy name whose operation's status needs to be -// fetched. operationID is operation ID which represents an operation whose -// status needs to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. policyName is backup policy name whose operation's status needs to be fetched. +// operationID is operation ID which represents an operation whose status needs to be fetched. func (client ProtectionPolicyOperationStatusesClient) Get(vaultName string, resourceGroupName string, policyName string, operationID string) (result OperationStatus, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, policyName, operationID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/recoverypoints.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/recoverypoints.go index 185ed0224..9e9547c0f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/recoverypoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/recoverypoints.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,34 +23,28 @@ import ( "net/http" ) -// RecoveryPointsClient is the client for the RecoveryPoints methods of the -// Recoveryservicesbackup service. +// RecoveryPointsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type RecoveryPointsClient struct { ManagementClient } -// NewRecoveryPointsClient creates an instance of the RecoveryPointsClient -// client. +// NewRecoveryPointsClient creates an instance of the RecoveryPointsClient client. func NewRecoveryPointsClient(subscriptionID string) RecoveryPointsClient { return NewRecoveryPointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecoveryPointsClientWithBaseURI creates an instance of the -// RecoveryPointsClient client. +// NewRecoveryPointsClientWithBaseURI creates an instance of the RecoveryPointsClient client. func NewRecoveryPointsClientWithBaseURI(baseURI string, subscriptionID string) RecoveryPointsClient { return RecoveryPointsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get provides the information of the backed up data identified using -// RecoveryPointID. This is an asynchronous operation. To know the status of -// the operation, call the GetProtectedItemOperationResult API. +// Get provides the information of the backed up data identified using RecoveryPointID. This is an asynchronous +// operation. To know the status of the operation, call the GetProtectedItemOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with backed up item. containerName is -// container name associated with backed up item. protectedItemName is backed -// up item name whose backup data needs to be fetched. recoveryPointID is -// recoveryPointID represents the backed up data to be fetched. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with backed up item. containerName is +// container name associated with backed up item. protectedItemName is backed up item name whose backup data needs to +// be fetched. recoveryPointID is recoveryPointID represents the backed up data to be fetched. func (client RecoveryPointsClient) Get(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string) (result RecoveryPointResource, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID) if err != nil { @@ -120,12 +113,10 @@ func (client RecoveryPointsClient) GetResponder(resp *http.Response) (result Rec // List lists the backup copies for the backed up item. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backed up item. containerName -// is container name associated with the backed up item. protectedItemName is -// backed up item whose backup copies are to be fetched. filter is oData filter -// options. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backed up item. containerName is +// container name associated with the backed up item. protectedItemName is backed up item whose backup copies are to be +// fetched. filter is oData filter options. func (client RecoveryPointsClient) List(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string) (result RecoveryPointResourceList, err error) { req, err := client.ListPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter) if err != nil { @@ -217,3 +208,48 @@ func (client RecoveryPointsClient) ListNextResults(lastResults RecoveryPointReso return } + +// ListComplete gets all elements from the list without paging. +func (client RecoveryPointsClient) ListComplete(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, filter string, cancel <-chan struct{}) (<-chan RecoveryPointResource, <-chan error) { + resultChan := make(chan RecoveryPointResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/restores.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/restores.go index 17cb5c4be..5e3d994a1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/restores.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/restores.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// RestoresClient is the client for the Restores methods of the -// Recoveryservicesbackup service. +// RestoresClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type RestoresClient struct { ManagementClient } @@ -35,23 +33,19 @@ func NewRestoresClient(subscriptionID string) RestoresClient { return NewRestoresClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRestoresClientWithBaseURI creates an instance of the RestoresClient -// client. +// NewRestoresClientWithBaseURI creates an instance of the RestoresClient client. func NewRestoresClientWithBaseURI(baseURI string, subscriptionID string) RestoresClient { return RestoresClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Trigger restores the specified backed up data. This is an asynchronous -// operation. To know the status of this API call, use -// GetProtectedItemOperationResult API. +// Trigger restores the specified backed up data. This is an asynchronous operation. To know the status of this API +// call, use GetProtectedItemOperationResult API. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. -// fabricName is fabric name associated with the backed up items. containerName -// is container name associated with the backed up items. protectedItemName is -// backed up item to be restored. recoveryPointID is recovery point ID which -// represents the backed up data to be restored. parameters is resource restore -// request +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. fabricName is fabric name associated with the backed up items. containerName is +// container name associated with the backed up items. protectedItemName is backed up item to be restored. +// recoveryPointID is recovery point ID which represents the backed up data to be restored. parameters is resource +// restore request func (client RestoresClient) Trigger(vaultName string, resourceGroupName string, fabricName string, containerName string, protectedItemName string, recoveryPointID string, parameters RestoreRequestResource) (result autorest.Response, err error) { req, err := client.TriggerPreparer(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointID, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/securitypins.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/securitypins.go index 78d89bdc9..aff952860 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/securitypins.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/securitypins.go @@ -14,9 +14,8 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// SecurityPINsClient is the client for the SecurityPINs methods of the -// Recoveryservicesbackup service. +// SecurityPINsClient is the open API 2.0 Specs for Azure RecoveryServices Backup service type SecurityPINsClient struct { ManagementClient } @@ -35,16 +33,15 @@ func NewSecurityPINsClient(subscriptionID string) SecurityPINsClient { return NewSecurityPINsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSecurityPINsClientWithBaseURI creates an instance of the -// SecurityPINsClient client. +// NewSecurityPINsClientWithBaseURI creates an instance of the SecurityPINsClient client. func NewSecurityPINsClientWithBaseURI(baseURI string, subscriptionID string) SecurityPINsClient { return SecurityPINsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get get the security PIN. // -// vaultName is the name of the recovery services vault. resourceGroupName is -// the name of the resource group where the recovery services vault is present. +// vaultName is the name of the recovery services vault. resourceGroupName is the name of the resource group where the +// recovery services vault is present. func (client SecurityPINsClient) Get(vaultName string, resourceGroupName string) (result TokenInformation, err error) { req, err := client.GetPreparer(vaultName, resourceGroupName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go index 8c3fd58c0..9dcf492df 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicesbackup/version.go @@ -14,15 +14,15 @@ package recoveryservicesbackup // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicesbackup/" + return "Azure-SDK-For-Go/v11.0.0-beta arm-recoveryservicesbackup/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/client.go index 306afcc27..5208481e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/client.go @@ -18,7 +18,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/models.go index 20115820e..9ea47ea72 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/models.go @@ -14,10 +14,12 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" @@ -80,12 +82,24 @@ const ( ResourceManager FailoverDeploymentModel = "ResourceManager" ) +// HealthErrorCategory enumerates the values for health error category. +type HealthErrorCategory string + +const ( + // Configuration specifies the configuration state for health error category. + Configuration HealthErrorCategory = "Configuration" + // Replication specifies the replication state for health error category. + Replication HealthErrorCategory = "Replication" + // TestFailover specifies the test failover state for health error category. + TestFailover HealthErrorCategory = "TestFailover" +) + // HyperVReplicaAzureRpRecoveryPointType enumerates the values for hyper v replica azure rp recovery point type. type HyperVReplicaAzureRpRecoveryPointType string const ( - // HyperVReplicaAzureRpRecoveryPointTypeLatest specifies the hyper v replica azure rp recovery point type latest - // state for hyper v replica azure rp recovery point type. + // HyperVReplicaAzureRpRecoveryPointTypeLatest specifies the hyper v replica azure rp recovery point type latest state + // for hyper v replica azure rp recovery point type. HyperVReplicaAzureRpRecoveryPointTypeLatest HyperVReplicaAzureRpRecoveryPointType = "Latest" // HyperVReplicaAzureRpRecoveryPointTypeLatestApplicationConsistent specifies the hyper v replica azure rp recovery // point type latest application consistent state for hyper v replica azure rp recovery point type. @@ -95,6 +109,16 @@ const ( HyperVReplicaAzureRpRecoveryPointTypeLatestProcessed HyperVReplicaAzureRpRecoveryPointType = "LatestProcessed" ) +// IdentityProviderType enumerates the values for identity provider type. +type IdentityProviderType string + +const ( + // CustomerActiveDirectory specifies the customer active directory state for identity provider type. + CustomerActiveDirectory IdentityProviderType = "CustomerActiveDirectory" + // RecoveryServicesActiveDirectory specifies the recovery services active directory state for identity provider type. + RecoveryServicesActiveDirectory IdentityProviderType = "RecoveryServicesActiveDirectory" +) + // InMageV2RpRecoveryPointType enumerates the values for in mage v2 rp recovery point type. type InMageV2RpRecoveryPointType string @@ -108,11 +132,415 @@ const ( // InMageV2RpRecoveryPointTypeLatestCrashConsistent specifies the in mage v2 rp recovery point type latest crash // consistent state for in mage v2 rp recovery point type. InMageV2RpRecoveryPointTypeLatestCrashConsistent InMageV2RpRecoveryPointType = "LatestCrashConsistent" - // InMageV2RpRecoveryPointTypeLatestProcessed specifies the in mage v2 rp recovery point type latest processed - // state for in mage v2 rp recovery point type. + // InMageV2RpRecoveryPointTypeLatestProcessed specifies the in mage v2 rp recovery point type latest processed state + // for in mage v2 rp recovery point type. InMageV2RpRecoveryPointTypeLatestProcessed InMageV2RpRecoveryPointType = "LatestProcessed" ) +// InstanceType enumerates the values for instance type. +type InstanceType string + +const ( + // InstanceTypeA2A specifies the instance type a2a state for instance type. + InstanceTypeA2A InstanceType = "A2A" + // InstanceTypeHyperVReplica2012 specifies the instance type hyper v replica 2012 state for instance type. + InstanceTypeHyperVReplica2012 InstanceType = "HyperVReplica2012" + // InstanceTypeHyperVReplica2012R2 specifies the instance type hyper v replica 2012r2 state for instance type. + InstanceTypeHyperVReplica2012R2 InstanceType = "HyperVReplica2012R2" + // InstanceTypeHyperVReplicaAzure specifies the instance type hyper v replica azure state for instance type. + InstanceTypeHyperVReplicaAzure InstanceType = "HyperVReplicaAzure" + // InstanceTypeHyperVReplicaBaseEventDetails specifies the instance type hyper v replica base event details state for + // instance type. + InstanceTypeHyperVReplicaBaseEventDetails InstanceType = "HyperVReplicaBaseEventDetails" + // InstanceTypeInMageAzureV2 specifies the instance type in mage azure v2 state for instance type. + InstanceTypeInMageAzureV2 InstanceType = "InMageAzureV2" +) + +// InstanceTypeConfigurationSettings enumerates the values for instance type configuration settings. +type InstanceTypeConfigurationSettings string + +const ( + // InstanceTypeHyperVVirtualMachine specifies the instance type hyper v virtual machine state for instance type + // configuration settings. + InstanceTypeHyperVVirtualMachine InstanceTypeConfigurationSettings = "HyperVVirtualMachine" + // InstanceTypeReplicationGroupDetails specifies the instance type replication group details state for instance type + // configuration settings. + InstanceTypeReplicationGroupDetails InstanceTypeConfigurationSettings = "ReplicationGroupDetails" + // InstanceTypeVMwareVirtualMachine specifies the instance type v mware virtual machine state for instance type + // configuration settings. + InstanceTypeVMwareVirtualMachine InstanceTypeConfigurationSettings = "VMwareVirtualMachine" +) + +// InstanceTypeDisableProtectionProviderSpecificInput enumerates the values for instance type disable protection +// provider specific input. +type InstanceTypeDisableProtectionProviderSpecificInput string + +const ( + // InstanceTypeInMage specifies the instance type in mage state for instance type disable protection provider specific + // input. + InstanceTypeInMage InstanceTypeDisableProtectionProviderSpecificInput = "InMage" +) + +// InstanceTypeEnableProtectionProviderSpecificInput enumerates the values for instance type enable protection provider +// specific input. +type InstanceTypeEnableProtectionProviderSpecificInput string + +const ( + // InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeA2A specifies the instance type enable protection + // provider specific input instance type a2a state for instance type enable protection provider specific input. + InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeA2A InstanceTypeEnableProtectionProviderSpecificInput = "A2A" + // InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure specifies the instance type enable + // protection provider specific input instance type hyper v replica azure state for instance type enable protection + // provider specific input. + InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeEnableProtectionProviderSpecificInput = "HyperVReplicaAzure" + // InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMage specifies the instance type enable protection + // provider specific input instance type in mage state for instance type enable protection provider specific input. + InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMage InstanceTypeEnableProtectionProviderSpecificInput = "InMage" + // InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 specifies the instance type enable + // protection provider specific input instance type in mage azure v2 state for instance type enable protection provider + // specific input. + InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeEnableProtectionProviderSpecificInput = "InMageAzureV2" + // InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeSan specifies the instance type enable protection + // provider specific input instance type san state for instance type enable protection provider specific input. + InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeSan InstanceTypeEnableProtectionProviderSpecificInput = "San" +) + +// InstanceTypeEventSpecificDetails enumerates the values for instance type event specific details. +type InstanceTypeEventSpecificDetails string + +const ( + // InstanceTypeJobStatus specifies the instance type job status state for instance type event specific details. + InstanceTypeJobStatus InstanceTypeEventSpecificDetails = "JobStatus" +) + +// InstanceTypeFabricSpecificCreateNetworkMappingInput enumerates the values for instance type fabric specific create +// network mapping input. +type InstanceTypeFabricSpecificCreateNetworkMappingInput string + +const ( + // InstanceTypeAzureToAzure specifies the instance type azure to azure state for instance type fabric specific create + // network mapping input. + InstanceTypeAzureToAzure InstanceTypeFabricSpecificCreateNetworkMappingInput = "AzureToAzure" + // InstanceTypeVmmToAzure specifies the instance type vmm to azure state for instance type fabric specific create + // network mapping input. + InstanceTypeVmmToAzure InstanceTypeFabricSpecificCreateNetworkMappingInput = "VmmToAzure" + // InstanceTypeVmmToVmm specifies the instance type vmm to vmm state for instance type fabric specific create network + // mapping input. + InstanceTypeVmmToVmm InstanceTypeFabricSpecificCreateNetworkMappingInput = "VmmToVmm" +) + +// InstanceTypeFabricSpecificCreationInput enumerates the values for instance type fabric specific creation input. +type InstanceTypeFabricSpecificCreationInput string + +const ( + // InstanceTypeFabricSpecificCreationInputInstanceTypeA2A specifies the instance type fabric specific creation input + // instance type a2a state for instance type fabric specific creation input. + InstanceTypeFabricSpecificCreationInputInstanceTypeA2A InstanceTypeFabricSpecificCreationInput = "A2A" + // InstanceTypeFabricSpecificCreationInputInstanceTypeVMwareV2 specifies the instance type fabric specific creation + // input instance type v mware v2 state for instance type fabric specific creation input. + InstanceTypeFabricSpecificCreationInputInstanceTypeVMwareV2 InstanceTypeFabricSpecificCreationInput = "VMwareV2" +) + +// InstanceTypeFabricSpecificDetails enumerates the values for instance type fabric specific details. +type InstanceTypeFabricSpecificDetails string + +const ( + // InstanceTypeAzure specifies the instance type azure state for instance type fabric specific details. + InstanceTypeAzure InstanceTypeFabricSpecificDetails = "Azure" + // InstanceTypeHyperVSite specifies the instance type hyper v site state for instance type fabric specific details. + InstanceTypeHyperVSite InstanceTypeFabricSpecificDetails = "HyperVSite" + // InstanceTypeVMM specifies the instance type vmm state for instance type fabric specific details. + InstanceTypeVMM InstanceTypeFabricSpecificDetails = "VMM" + // InstanceTypeVMware specifies the instance type v mware state for instance type fabric specific details. + InstanceTypeVMware InstanceTypeFabricSpecificDetails = "VMware" + // InstanceTypeVMwareV2 specifies the instance type v mware v2 state for instance type fabric specific details. + InstanceTypeVMwareV2 InstanceTypeFabricSpecificDetails = "VMwareV2" +) + +// InstanceTypeFabricSpecificUpdateNetworkMappingInput enumerates the values for instance type fabric specific update +// network mapping input. +type InstanceTypeFabricSpecificUpdateNetworkMappingInput string + +const ( + // InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure specifies the instance type fabric + // specific update network mapping input instance type azure to azure state for instance type fabric specific update + // network mapping input. + InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure InstanceTypeFabricSpecificUpdateNetworkMappingInput = "AzureToAzure" + // InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure specifies the instance type fabric + // specific update network mapping input instance type vmm to azure state for instance type fabric specific update + // network mapping input. + InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure InstanceTypeFabricSpecificUpdateNetworkMappingInput = "VmmToAzure" + // InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm specifies the instance type fabric specific + // update network mapping input instance type vmm to vmm state for instance type fabric specific update network mapping + // input. + InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm InstanceTypeFabricSpecificUpdateNetworkMappingInput = "VmmToVmm" +) + +// InstanceTypeGroupTaskDetails enumerates the values for instance type group task details. +type InstanceTypeGroupTaskDetails string + +const ( + // InstanceTypeInlineWorkflowTaskDetails specifies the instance type inline workflow task details state for instance + // type group task details. + InstanceTypeInlineWorkflowTaskDetails InstanceTypeGroupTaskDetails = "InlineWorkflowTaskDetails" + // InstanceTypeRecoveryPlanGroupTaskDetails specifies the instance type recovery plan group task details state for + // instance type group task details. + InstanceTypeRecoveryPlanGroupTaskDetails InstanceTypeGroupTaskDetails = "RecoveryPlanGroupTaskDetails" + // InstanceTypeRecoveryPlanShutdownGroupTaskDetails specifies the instance type recovery plan shutdown group task + // details state for instance type group task details. + InstanceTypeRecoveryPlanShutdownGroupTaskDetails InstanceTypeGroupTaskDetails = "RecoveryPlanShutdownGroupTaskDetails" +) + +// InstanceTypeJobDetails enumerates the values for instance type job details. +type InstanceTypeJobDetails string + +const ( + // InstanceTypeAsrJobDetails specifies the instance type asr job details state for instance type job details. + InstanceTypeAsrJobDetails InstanceTypeJobDetails = "AsrJobDetails" + // InstanceTypeExportJobDetails specifies the instance type export job details state for instance type job details. + InstanceTypeExportJobDetails InstanceTypeJobDetails = "ExportJobDetails" + // InstanceTypeFailoverJobDetails specifies the instance type failover job details state for instance type job details. + InstanceTypeFailoverJobDetails InstanceTypeJobDetails = "FailoverJobDetails" + // InstanceTypeSwitchProtectionJobDetails specifies the instance type switch protection job details state for instance + // type job details. + InstanceTypeSwitchProtectionJobDetails InstanceTypeJobDetails = "SwitchProtectionJobDetails" + // InstanceTypeTestFailoverJobDetails specifies the instance type test failover job details state for instance type job + // details. + InstanceTypeTestFailoverJobDetails InstanceTypeJobDetails = "TestFailoverJobDetails" +) + +// InstanceTypeNetworkMappingFabricSpecificSettings enumerates the values for instance type network mapping fabric +// specific settings. +type InstanceTypeNetworkMappingFabricSpecificSettings string + +const ( + // InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure specifies the instance type network mapping + // fabric specific settings instance type azure to azure state for instance type network mapping fabric specific + // settings. + InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure InstanceTypeNetworkMappingFabricSpecificSettings = "AzureToAzure" + // InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure specifies the instance type network mapping + // fabric specific settings instance type vmm to azure state for instance type network mapping fabric specific + // settings. + InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure InstanceTypeNetworkMappingFabricSpecificSettings = "VmmToAzure" + // InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm specifies the instance type network mapping + // fabric specific settings instance type vmm to vmm state for instance type network mapping fabric specific settings. + InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm InstanceTypeNetworkMappingFabricSpecificSettings = "VmmToVmm" +) + +// InstanceTypePolicyProviderSpecificDetails enumerates the values for instance type policy provider specific details. +type InstanceTypePolicyProviderSpecificDetails string + +const ( + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeA2A specifies the instance type policy provider specific + // details instance type a2a state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeA2A InstanceTypePolicyProviderSpecificDetails = "A2A" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 specifies the instance type policy provider + // specific details instance type hyper v replica 2012 state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 InstanceTypePolicyProviderSpecificDetails = "HyperVReplica2012" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 specifies the instance type policy provider + // specific details instance type hyper v replica 2012r2 state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 InstanceTypePolicyProviderSpecificDetails = "HyperVReplica2012R2" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure specifies the instance type policy provider + // specific details instance type hyper v replica azure state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure InstanceTypePolicyProviderSpecificDetails = "HyperVReplicaAzure" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails specifies the instance type + // policy provider specific details instance type hyper v replica base policy details state for instance type policy + // provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails InstanceTypePolicyProviderSpecificDetails = "HyperVReplicaBasePolicyDetails" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMage specifies the instance type policy provider specific + // details instance type in mage state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMage InstanceTypePolicyProviderSpecificDetails = "InMage" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 specifies the instance type policy provider + // specific details instance type in mage azure v2 state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 InstanceTypePolicyProviderSpecificDetails = "InMageAzureV2" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails specifies the instance type policy + // provider specific details instance type in mage base policy details state for instance type policy provider specific + // details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails InstanceTypePolicyProviderSpecificDetails = "InMageBasePolicyDetails" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration specifies the instance type policy provider + // specific details instance type rcm azure migration state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration InstanceTypePolicyProviderSpecificDetails = "RcmAzureMigration" + // InstanceTypePolicyProviderSpecificDetailsInstanceTypeVMwareCbt specifies the instance type policy provider specific + // details instance type v mware cbt state for instance type policy provider specific details. + InstanceTypePolicyProviderSpecificDetailsInstanceTypeVMwareCbt InstanceTypePolicyProviderSpecificDetails = "VMwareCbt" +) + +// InstanceTypePolicyProviderSpecificInput enumerates the values for instance type policy provider specific input. +type InstanceTypePolicyProviderSpecificInput string + +const ( + // InstanceTypePolicyProviderSpecificInputInstanceTypeA2A specifies the instance type policy provider specific input + // instance type a2a state for instance type policy provider specific input. + InstanceTypePolicyProviderSpecificInputInstanceTypeA2A InstanceTypePolicyProviderSpecificInput = "A2A" + // InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012 specifies the instance type policy provider + // specific input instance type hyper v replica 2012 state for instance type policy provider specific input. + InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012 InstanceTypePolicyProviderSpecificInput = "HyperVReplica2012" + // InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 specifies the instance type policy provider + // specific input instance type hyper v replica 2012r2 state for instance type policy provider specific input. + InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 InstanceTypePolicyProviderSpecificInput = "HyperVReplica2012R2" + // InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure specifies the instance type policy provider + // specific input instance type hyper v replica azure state for instance type policy provider specific input. + InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypePolicyProviderSpecificInput = "HyperVReplicaAzure" + // InstanceTypePolicyProviderSpecificInputInstanceTypeInMage specifies the instance type policy provider specific input + // instance type in mage state for instance type policy provider specific input. + InstanceTypePolicyProviderSpecificInputInstanceTypeInMage InstanceTypePolicyProviderSpecificInput = "InMage" + // InstanceTypePolicyProviderSpecificInputInstanceTypeInMageAzureV2 specifies the instance type policy provider + // specific input instance type in mage azure v2 state for instance type policy provider specific input. + InstanceTypePolicyProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypePolicyProviderSpecificInput = "InMageAzureV2" + // InstanceTypePolicyProviderSpecificInputInstanceTypeVMwareCbt specifies the instance type policy provider specific + // input instance type v mware cbt state for instance type policy provider specific input. + InstanceTypePolicyProviderSpecificInputInstanceTypeVMwareCbt InstanceTypePolicyProviderSpecificInput = "VMwareCbt" +) + +// InstanceTypeProviderSpecificFailoverInput enumerates the values for instance type provider specific failover input. +type InstanceTypeProviderSpecificFailoverInput string + +const ( + // InstanceTypeProviderSpecificFailoverInputInstanceTypeA2A specifies the instance type provider specific failover + // input instance type a2a state for instance type provider specific failover input. + InstanceTypeProviderSpecificFailoverInputInstanceTypeA2A InstanceTypeProviderSpecificFailoverInput = "A2A" + // InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure specifies the instance type provider + // specific failover input instance type hyper v replica azure state for instance type provider specific failover + // input. + InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure InstanceTypeProviderSpecificFailoverInput = "HyperVReplicaAzure" + // InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback specifies the instance type provider + // specific failover input instance type hyper v replica azure failback state for instance type provider specific + // failover input. + InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback InstanceTypeProviderSpecificFailoverInput = "HyperVReplicaAzureFailback" + // InstanceTypeProviderSpecificFailoverInputInstanceTypeInMage specifies the instance type provider specific failover + // input instance type in mage state for instance type provider specific failover input. + InstanceTypeProviderSpecificFailoverInputInstanceTypeInMage InstanceTypeProviderSpecificFailoverInput = "InMage" + // InstanceTypeProviderSpecificFailoverInputInstanceTypeInMageAzureV2 specifies the instance type provider specific + // failover input instance type in mage azure v2 state for instance type provider specific failover input. + InstanceTypeProviderSpecificFailoverInputInstanceTypeInMageAzureV2 InstanceTypeProviderSpecificFailoverInput = "InMageAzureV2" +) + +// InstanceTypeRecoveryPlanActionDetails enumerates the values for instance type recovery plan action details. +type InstanceTypeRecoveryPlanActionDetails string + +const ( + // InstanceTypeAutomationRunbookActionDetails specifies the instance type automation runbook action details state for + // instance type recovery plan action details. + InstanceTypeAutomationRunbookActionDetails InstanceTypeRecoveryPlanActionDetails = "AutomationRunbookActionDetails" + // InstanceTypeManualActionDetails specifies the instance type manual action details state for instance type recovery + // plan action details. + InstanceTypeManualActionDetails InstanceTypeRecoveryPlanActionDetails = "ManualActionDetails" + // InstanceTypeScriptActionDetails specifies the instance type script action details state for instance type recovery + // plan action details. + InstanceTypeScriptActionDetails InstanceTypeRecoveryPlanActionDetails = "ScriptActionDetails" +) + +// InstanceTypeRecoveryPlanProviderSpecificFailoverInput enumerates the values for instance type recovery plan provider +// specific failover input. +type InstanceTypeRecoveryPlanProviderSpecificFailoverInput string + +const ( + // InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A specifies the instance type recovery plan + // provider specific failover input instance type a2a state for instance type recovery plan provider specific failover + // input. + InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A InstanceTypeRecoveryPlanProviderSpecificFailoverInput = "A2A" + // InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure specifies the instance type + // recovery plan provider specific failover input instance type hyper v replica azure state for instance type recovery + // plan provider specific failover input. + InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure InstanceTypeRecoveryPlanProviderSpecificFailoverInput = "HyperVReplicaAzure" + // InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback specifies the instance + // type recovery plan provider specific failover input instance type hyper v replica azure failback state for instance + // type recovery plan provider specific failover input. + InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback InstanceTypeRecoveryPlanProviderSpecificFailoverInput = "HyperVReplicaAzureFailback" + // InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage specifies the instance type recovery plan + // provider specific failover input instance type in mage state for instance type recovery plan provider specific + // failover input. + InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage InstanceTypeRecoveryPlanProviderSpecificFailoverInput = "InMage" + // InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 specifies the instance type recovery + // plan provider specific failover input instance type in mage azure v2 state for instance type recovery plan provider + // specific failover input. + InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 InstanceTypeRecoveryPlanProviderSpecificFailoverInput = "InMageAzureV2" +) + +// InstanceTypeReplicationProviderSpecificSettings enumerates the values for instance type replication provider +// specific settings. +type InstanceTypeReplicationProviderSpecificSettings string + +const ( + // InstanceTypeReplicationProviderSpecificSettingsInstanceTypeA2A specifies the instance type replication provider + // specific settings instance type a2a state for instance type replication provider specific settings. + InstanceTypeReplicationProviderSpecificSettingsInstanceTypeA2A InstanceTypeReplicationProviderSpecificSettings = "A2A" + // InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 specifies the instance type replication + // provider specific settings instance type hyper v replica 2012 state for instance type replication provider specific + // settings. + InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 InstanceTypeReplicationProviderSpecificSettings = "HyperVReplica2012" + // InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 specifies the instance type + // replication provider specific settings instance type hyper v replica 2012r2 state for instance type replication + // provider specific settings. + InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 InstanceTypeReplicationProviderSpecificSettings = "HyperVReplica2012R2" + // InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure specifies the instance type + // replication provider specific settings instance type hyper v replica azure state for instance type replication + // provider specific settings. + InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure InstanceTypeReplicationProviderSpecificSettings = "HyperVReplicaAzure" + // InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails specifies the + // instance type replication provider specific settings instance type hyper v replica base replication details state + // for instance type replication provider specific settings. + InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails InstanceTypeReplicationProviderSpecificSettings = "HyperVReplicaBaseReplicationDetails" + // InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMage specifies the instance type replication provider + // specific settings instance type in mage state for instance type replication provider specific settings. + InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMage InstanceTypeReplicationProviderSpecificSettings = "InMage" + // InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 specifies the instance type replication + // provider specific settings instance type in mage azure v2 state for instance type replication provider specific + // settings. + InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 InstanceTypeReplicationProviderSpecificSettings = "InMageAzureV2" +) + +// InstanceTypeReverseReplicationProviderSpecificInput enumerates the values for instance type reverse replication +// provider specific input. +type InstanceTypeReverseReplicationProviderSpecificInput string + +const ( + // InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeA2A specifies the instance type reverse replication + // provider specific input instance type a2a state for instance type reverse replication provider specific input. + InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeA2A InstanceTypeReverseReplicationProviderSpecificInput = "A2A" + // InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure specifies the instance type + // reverse replication provider specific input instance type hyper v replica azure state for instance type reverse + // replication provider specific input. + InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure InstanceTypeReverseReplicationProviderSpecificInput = "HyperVReplicaAzure" + // InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMage specifies the instance type reverse + // replication provider specific input instance type in mage state for instance type reverse replication provider + // specific input. + InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMage InstanceTypeReverseReplicationProviderSpecificInput = "InMage" + // InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 specifies the instance type reverse + // replication provider specific input instance type in mage azure v2 state for instance type reverse replication + // provider specific input. + InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 InstanceTypeReverseReplicationProviderSpecificInput = "InMageAzureV2" +) + +// InstanceTypeTaskTypeDetails enumerates the values for instance type task type details. +type InstanceTypeTaskTypeDetails string + +const ( + // InstanceTypeAutomationRunbookTaskDetails specifies the instance type automation runbook task details state for + // instance type task type details. + InstanceTypeAutomationRunbookTaskDetails InstanceTypeTaskTypeDetails = "AutomationRunbookTaskDetails" + // InstanceTypeConsistencyCheckTaskDetails specifies the instance type consistency check task details state for + // instance type task type details. + InstanceTypeConsistencyCheckTaskDetails InstanceTypeTaskTypeDetails = "ConsistencyCheckTaskDetails" + // InstanceTypeFabricReplicationGroupTaskDetails specifies the instance type fabric replication group task details + // state for instance type task type details. + InstanceTypeFabricReplicationGroupTaskDetails InstanceTypeTaskTypeDetails = "FabricReplicationGroupTaskDetails" + // InstanceTypeJobTaskDetails specifies the instance type job task details state for instance type task type details. + InstanceTypeJobTaskDetails InstanceTypeTaskTypeDetails = "JobTaskDetails" + // InstanceTypeManualActionTaskDetails specifies the instance type manual action task details state for instance type + // task type details. + InstanceTypeManualActionTaskDetails InstanceTypeTaskTypeDetails = "ManualActionTaskDetails" + // InstanceTypeScriptActionTaskDetails specifies the instance type script action task details state for instance type + // task type details. + InstanceTypeScriptActionTaskDetails InstanceTypeTaskTypeDetails = "ScriptActionTaskDetails" + // InstanceTypeVirtualMachineTaskDetails specifies the instance type virtual machine task details state for instance + // type task type details. + InstanceTypeVirtualMachineTaskDetails InstanceTypeTaskTypeDetails = "VirtualMachineTaskDetails" + // InstanceTypeVMNicUpdatesTaskDetails specifies the instance type vm nic updates task details state for instance type + // task type details. + InstanceTypeVMNicUpdatesTaskDetails InstanceTypeTaskTypeDetails = "VmNicUpdatesTaskDetails" +) + // LicenseType enumerates the values for license type. type LicenseType string @@ -125,6 +553,16 @@ const ( LicenseTypeWindowsServer LicenseType = "WindowsServer" ) +// MultiVMSyncStatus enumerates the values for multi vm sync status. +type MultiVMSyncStatus string + +const ( + // Disabled specifies the disabled state for multi vm sync status. + Disabled MultiVMSyncStatus = "Disabled" + // Enabled specifies the enabled state for multi vm sync status. + Enabled MultiVMSyncStatus = "Enabled" +) + // PossibleOperationsDirections enumerates the values for possible operations directions. type PossibleOperationsDirections string @@ -157,48 +595,76 @@ const ( Shutdown RecoveryPlanGroupType = "Shutdown" ) +// RecoveryPointType enumerates the values for recovery point type. +type RecoveryPointType string + +const ( + // Custom specifies the custom state for recovery point type. + Custom RecoveryPointType = "Custom" + // LatestTag specifies the latest tag state for recovery point type. + LatestTag RecoveryPointType = "LatestTag" + // LatestTime specifies the latest time state for recovery point type. + LatestTime RecoveryPointType = "LatestTime" +) + // ReplicationProtectedItemOperation enumerates the values for replication protected item operation. type ReplicationProtectedItemOperation string const ( - // ChangePit specifies the change pit state for replication protected item operation. - ChangePit ReplicationProtectedItemOperation = "ChangePit" - // Commit specifies the commit state for replication protected item operation. - Commit ReplicationProtectedItemOperation = "Commit" - // CompleteMigration specifies the complete migration state for replication protected item operation. - CompleteMigration ReplicationProtectedItemOperation = "CompleteMigration" - // DisableProtection specifies the disable protection state for replication protected item operation. - DisableProtection ReplicationProtectedItemOperation = "DisableProtection" - // Failback specifies the failback state for replication protected item operation. - Failback ReplicationProtectedItemOperation = "Failback" - // FinalizeFailback specifies the finalize failback state for replication protected item operation. - FinalizeFailback ReplicationProtectedItemOperation = "FinalizeFailback" - // PlannedFailover specifies the planned failover state for replication protected item operation. - PlannedFailover ReplicationProtectedItemOperation = "PlannedFailover" - // RepairReplication specifies the repair replication state for replication protected item operation. - RepairReplication ReplicationProtectedItemOperation = "RepairReplication" - // ReverseReplicate specifies the reverse replicate state for replication protected item operation. - ReverseReplicate ReplicationProtectedItemOperation = "ReverseReplicate" - // SwitchProtection specifies the switch protection state for replication protected item operation. - SwitchProtection ReplicationProtectedItemOperation = "SwitchProtection" - // TestFailover specifies the test failover state for replication protected item operation. - TestFailover ReplicationProtectedItemOperation = "TestFailover" - // TestFailoverCleanup specifies the test failover cleanup state for replication protected item operation. - TestFailoverCleanup ReplicationProtectedItemOperation = "TestFailoverCleanup" - // UnplannedFailover specifies the unplanned failover state for replication protected item operation. - UnplannedFailover ReplicationProtectedItemOperation = "UnplannedFailover" + // ReplicationProtectedItemOperationChangePit specifies the replication protected item operation change pit state for + // replication protected item operation. + ReplicationProtectedItemOperationChangePit ReplicationProtectedItemOperation = "ChangePit" + // ReplicationProtectedItemOperationCommit specifies the replication protected item operation commit state for + // replication protected item operation. + ReplicationProtectedItemOperationCommit ReplicationProtectedItemOperation = "Commit" + // ReplicationProtectedItemOperationCompleteMigration specifies the replication protected item operation complete + // migration state for replication protected item operation. + ReplicationProtectedItemOperationCompleteMigration ReplicationProtectedItemOperation = "CompleteMigration" + // ReplicationProtectedItemOperationDisableProtection specifies the replication protected item operation disable + // protection state for replication protected item operation. + ReplicationProtectedItemOperationDisableProtection ReplicationProtectedItemOperation = "DisableProtection" + // ReplicationProtectedItemOperationFailback specifies the replication protected item operation failback state for + // replication protected item operation. + ReplicationProtectedItemOperationFailback ReplicationProtectedItemOperation = "Failback" + // ReplicationProtectedItemOperationFinalizeFailback specifies the replication protected item operation finalize + // failback state for replication protected item operation. + ReplicationProtectedItemOperationFinalizeFailback ReplicationProtectedItemOperation = "FinalizeFailback" + // ReplicationProtectedItemOperationPlannedFailover specifies the replication protected item operation planned failover + // state for replication protected item operation. + ReplicationProtectedItemOperationPlannedFailover ReplicationProtectedItemOperation = "PlannedFailover" + // ReplicationProtectedItemOperationRepairReplication specifies the replication protected item operation repair + // replication state for replication protected item operation. + ReplicationProtectedItemOperationRepairReplication ReplicationProtectedItemOperation = "RepairReplication" + // ReplicationProtectedItemOperationReverseReplicate specifies the replication protected item operation reverse + // replicate state for replication protected item operation. + ReplicationProtectedItemOperationReverseReplicate ReplicationProtectedItemOperation = "ReverseReplicate" + // ReplicationProtectedItemOperationSwitchProtection specifies the replication protected item operation switch + // protection state for replication protected item operation. + ReplicationProtectedItemOperationSwitchProtection ReplicationProtectedItemOperation = "SwitchProtection" + // ReplicationProtectedItemOperationTestFailover specifies the replication protected item operation test failover state + // for replication protected item operation. + ReplicationProtectedItemOperationTestFailover ReplicationProtectedItemOperation = "TestFailover" + // ReplicationProtectedItemOperationTestFailoverCleanup specifies the replication protected item operation test + // failover cleanup state for replication protected item operation. + ReplicationProtectedItemOperationTestFailoverCleanup ReplicationProtectedItemOperation = "TestFailoverCleanup" + // ReplicationProtectedItemOperationUnplannedFailover specifies the replication protected item operation unplanned + // failover state for replication protected item operation. + ReplicationProtectedItemOperationUnplannedFailover ReplicationProtectedItemOperation = "UnplannedFailover" ) // RpInMageRecoveryPointType enumerates the values for rp in mage recovery point type. type RpInMageRecoveryPointType string const ( - // Custom specifies the custom state for rp in mage recovery point type. - Custom RpInMageRecoveryPointType = "Custom" - // LatestTag specifies the latest tag state for rp in mage recovery point type. - LatestTag RpInMageRecoveryPointType = "LatestTag" - // LatestTime specifies the latest time state for rp in mage recovery point type. - LatestTime RpInMageRecoveryPointType = "LatestTime" + // RpInMageRecoveryPointTypeCustom specifies the rp in mage recovery point type custom state for rp in mage recovery + // point type. + RpInMageRecoveryPointTypeCustom RpInMageRecoveryPointType = "Custom" + // RpInMageRecoveryPointTypeLatestTag specifies the rp in mage recovery point type latest tag state for rp in mage + // recovery point type. + RpInMageRecoveryPointTypeLatestTag RpInMageRecoveryPointType = "LatestTag" + // RpInMageRecoveryPointTypeLatestTime specifies the rp in mage recovery point type latest time state for rp in mage + // recovery point type. + RpInMageRecoveryPointTypeLatestTime RpInMageRecoveryPointType = "LatestTime" ) // SetMultiVMSyncStatus enumerates the values for set multi vm sync status. @@ -211,6 +677,20 @@ const ( Enable SetMultiVMSyncStatus = "Enable" ) +// Severity enumerates the values for severity. +type Severity string + +const ( + // Error specifies the error state for severity. + Error Severity = "Error" + // Info specifies the info state for severity. + Info Severity = "Info" + // NONE specifies the none state for severity. + NONE Severity = "NONE" + // Warning specifies the warning state for severity. + Warning Severity = "Warning" +) + // SourceSiteOperations enumerates the values for source site operations. type SourceSiteOperations string @@ -223,64 +703,350 @@ const ( // A2AApplyRecoveryPointInput is applyRecoveryPoint input specific to A2A provider. type A2AApplyRecoveryPointInput struct { + InstanceType InstanceType `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + aarpi.InstanceType = InstanceTypeA2A + type Alias A2AApplyRecoveryPointInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aarpi), + }) +} + +// AsHyperVReplicaAzureApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsInMageAzureV2ApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsA2AApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for A2AApplyRecoveryPointInput. +func (aarpi A2AApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { + return &aarpi, true } // A2AContainerCreationInput is a2A cloud creation input. type A2AContainerCreationInput struct { + InstanceType InstanceType `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AContainerCreationInput. +func (acci A2AContainerCreationInput) MarshalJSON() ([]byte, error) { + acci.InstanceType = InstanceTypeA2A + type Alias A2AContainerCreationInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(acci), + }) +} + +// AsA2AContainerCreationInput is the ReplicationProviderSpecificContainerCreationInput implementation for A2AContainerCreationInput. +func (acci A2AContainerCreationInput) AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) { + return &acci, true } // A2AEnableProtectionInput is a2A enable protection input. type A2AEnableProtectionInput struct { - FabricObjectID *string `json:"fabricObjectId,omitempty"` - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + InstanceType InstanceTypeEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` + FabricObjectID *string `json:"fabricObjectId,omitempty"` + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) MarshalJSON() ([]byte, error) { + aepi.InstanceType = InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeA2A + type Alias A2AEnableProtectionInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aepi), + }) +} + +// AsHyperVReplicaAzureEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsA2AEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for A2AEnableProtectionInput. +func (aepi A2AEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return &aepi, true } // A2AEventDetails is model class for event details of a A2A event. type A2AEventDetails struct { - ProtectedItemName *string `json:"protectedItemName,omitempty"` - FabricObjectID *string `json:"fabricObjectId,omitempty"` - FabricName *string `json:"fabricName,omitempty"` - FabricLocation *string `json:"fabricLocation,omitempty"` - RemoteFabricName *string `json:"remoteFabricName,omitempty"` - RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + ProtectedItemName *string `json:"protectedItemName,omitempty"` + FabricObjectID *string `json:"fabricObjectId,omitempty"` + FabricName *string `json:"fabricName,omitempty"` + FabricLocation *string `json:"fabricLocation,omitempty"` + RemoteFabricName *string `json:"remoteFabricName,omitempty"` + RemoteFabricLocation *string `json:"remoteFabricLocation,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AEventDetails. +func (aed A2AEventDetails) MarshalJSON() ([]byte, error) { + aed.InstanceType = InstanceTypeA2A + type Alias A2AEventDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aed), + }) +} + +// AsHyperVReplicaBaseEventDetails is the EventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the EventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the EventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the EventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsA2AEventDetails is the EventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return &aed, true +} + +// AsInMageAzureV2EventDetails is the EventProviderSpecificDetails implementation for A2AEventDetails. +func (aed A2AEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false } // A2AFailoverProviderInput is a2A provider specific input for failover. type A2AFailoverProviderInput struct { - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` + InstanceType InstanceTypeProviderSpecificFailoverInput `json:"instanceType,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) MarshalJSON() ([]byte, error) { + afpi.InstanceType = InstanceTypeProviderSpecificFailoverInputInstanceTypeA2A + type Alias A2AFailoverProviderInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(afpi), + }) +} + +// AsHyperVReplicaAzureFailoverProviderInput is the ProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the ProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the ProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the ProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsA2AFailoverProviderInput is the ProviderSpecificFailoverInput implementation for A2AFailoverProviderInput. +func (afpi A2AFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return &afpi, true } // A2APolicyCreationInput is a2A Policy creation input. type A2APolicyCreationInput struct { - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificInput `json:"instanceType,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) MarshalJSON() ([]byte, error) { + apci.InstanceType = InstanceTypePolicyProviderSpecificInputInstanceTypeA2A + type Alias A2APolicyCreationInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(apci), + }) +} + +// AsHyperVReplicaAzurePolicyInput is the PolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the PolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the PolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the PolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the PolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsA2APolicyCreationInput is the PolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return &apci, true +} + +// AsVMwareCbtPolicyCreationInput is the PolicyProviderSpecificInput implementation for A2APolicyCreationInput. +func (apci A2APolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false } // A2APolicyDetails is a2A specific policy details. type A2APolicyDetails struct { - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2APolicyDetails. +func (apd A2APolicyDetails) MarshalJSON() ([]byte, error) { + apd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeA2A + type Alias A2APolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(apd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return &apd, true +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for A2APolicyDetails. +func (apd A2APolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // A2AProtectedDiskDetails is a2A protected disk details. type A2AProtectedDiskDetails struct { DiskURI *string `json:"diskUri,omitempty"` - DiskName *string `json:"diskName,omitempty"` - DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` RecoveryAzureStorageAccountID *string `json:"recoveryAzureStorageAccountId,omitempty"` - PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` PrimaryDiskAzureStorageAccountID *string `json:"primaryDiskAzureStorageAccountId,omitempty"` RecoveryDiskURI *string `json:"recoveryDiskUri,omitempty"` + DiskName *string `json:"diskName,omitempty"` + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` + DiskType *string `json:"diskType,omitempty"` + ResyncRequired *bool `json:"resyncRequired,omitempty"` + MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` + MonitoringJobType *string `json:"monitoringJobType,omitempty"` + DataPendingInStagingStorageAccountInMB *float64 `json:"dataPendingInStagingStorageAccountInMB,omitempty"` + DataPendingAtSourceAgentInMB *float64 `json:"dataPendingAtSourceAgentInMB,omitempty"` +} + +// A2AProtectedManagedDiskDetails is a2A protected managed disk details. +type A2AProtectedManagedDiskDetails struct { + DiskID *string `json:"diskId,omitempty"` + RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` + RecoveryDiskID *string `json:"recoveryDiskId,omitempty"` + DiskName *string `json:"diskName,omitempty"` + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` DiskType *string `json:"diskType,omitempty"` ResyncRequired *bool `json:"resyncRequired,omitempty"` MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` @@ -291,57 +1057,185 @@ type A2AProtectedDiskDetails struct { // A2AReplicationDetails is a2A provider specific settings. type A2AReplicationDetails struct { - FabricObjectID *string `json:"fabricObjectId,omitempty"` - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - ManagementID *string `json:"managementId,omitempty"` - ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"` - PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` - RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` - OsType *string `json:"osType,omitempty"` - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` - RecoveryCloudService *string `json:"recoveryCloudService,omitempty"` - RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` - MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` - MonitoringJobType *string `json:"monitoringJobType,omitempty"` - LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` - AgentVersion *string `json:"agentVersion,omitempty"` - IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"` - RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - LifecycleID *string `json:"lifecycleId,omitempty"` + InstanceType InstanceTypeReplicationProviderSpecificSettings `json:"instanceType,omitempty"` + FabricObjectID *string `json:"fabricObjectId,omitempty"` + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + ManagementID *string `json:"managementId,omitempty"` + ProtectedDisks *[]A2AProtectedDiskDetails `json:"protectedDisks,omitempty"` + ProtectedManagedDisks *[]A2AProtectedManagedDiskDetails `json:"protectedManagedDisks,omitempty"` + PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` + RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` + OsType *string `json:"osType,omitempty"` + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` + RecoveryCloudService *string `json:"recoveryCloudService,omitempty"` + RecoveryAvailabilitySet *string `json:"recoveryAvailabilitySet,omitempty"` + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + VMSyncedConfigDetails *AzureToAzureVMSyncedConfigDetails `json:"vmSyncedConfigDetails,omitempty"` + MonitoringPercentageCompletion *int32 `json:"monitoringPercentageCompletion,omitempty"` + MonitoringJobType *string `json:"monitoringJobType,omitempty"` + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + AgentVersion *string `json:"agentVersion,omitempty"` + IsReplicationAgentUpdateRequired *bool `json:"isReplicationAgentUpdateRequired,omitempty"` + RecoveryFabricObjectID *string `json:"recoveryFabricObjectId,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + LifecycleID *string `json:"lifecycleId,omitempty"` + TestFailoverRecoveryFabricObjectID *string `json:"testFailoverRecoveryFabricObjectId,omitempty"` + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AReplicationDetails. +func (ard A2AReplicationDetails) MarshalJSON() ([]byte, error) { + ard.InstanceType = InstanceTypeReplicationProviderSpecificSettingsInstanceTypeA2A + type Alias A2AReplicationDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ard), + }) +} + +// AsHyperVReplicaBaseReplicationDetails is the ReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the ReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the ReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the ReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the ReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the ReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsA2AReplicationDetails is the ReplicationProviderSpecificSettings implementation for A2AReplicationDetails. +func (ard A2AReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return &ard, true } // A2AReprotectInput is azure specific reprotect input. type A2AReprotectInput struct { - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` - VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - PolicyID *string `json:"policyId,omitempty"` + InstanceType InstanceTypeReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` + VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + PolicyID *string `json:"policyId,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AReprotectInput. +func (ari A2AReprotectInput) MarshalJSON() ([]byte, error) { + ari.InstanceType = InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeA2A + type Alias A2AReprotectInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ari), + }) +} + +// AsHyperVReplicaAzureReprotectInput is the ReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return nil, false +} + +// AsInMageAzureV2ReprotectInput is the ReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return nil, false +} + +// AsInMageReprotectInput is the ReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return nil, false +} + +// AsA2AReprotectInput is the ReverseReplicationProviderSpecificInput implementation for A2AReprotectInput. +func (ari A2AReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return &ari, true } // A2ASwitchProtectionInput is a2A specific switch protection input. type A2ASwitchProtectionInput struct { - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` - VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - PolicyID *string `json:"policyId,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` + VMDisks *[]A2AVMDiskInputDetails `json:"vmDisks,omitempty"` + VMManagedDisks *[]A2AVMManagedDiskInputDetails `json:"vmManagedDisks,omitempty"` + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + PolicyID *string `json:"policyId,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2ASwitchProtectionInput. +func (aspi A2ASwitchProtectionInput) MarshalJSON() ([]byte, error) { + aspi.InstanceType = InstanceTypeA2A + type Alias A2ASwitchProtectionInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aspi), + }) +} + +// AsA2ASwitchProtectionInput is the SwitchProtectionProviderSpecificInput implementation for A2ASwitchProtectionInput. +func (aspi A2ASwitchProtectionInput) AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) { + return &aspi, true } // A2AUpdateReplicationProtectedItemInput is inMage Azure V2 input to update replication protected item. type A2AUpdateReplicationProtectedItemInput struct { - RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` - RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + RecoveryCloudServiceID *string `json:"recoveryCloudServiceId,omitempty"` + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` +} + +// MarshalJSON is the custom marshaler for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + aurpii.InstanceType = InstanceTypeA2A + type Alias A2AUpdateReplicationProtectedItemInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aurpii), + }) +} + +// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsInMageAzureV2UpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsA2AUpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for A2AUpdateReplicationProtectedItemInput. +func (aurpii A2AUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { + return &aurpii, true } // A2AVMDiskInputDetails is azure VM disk input details. @@ -351,6 +1245,13 @@ type A2AVMDiskInputDetails struct { PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` } +// A2AVMManagedDiskInputDetails is azure VM managed disk input details. +type A2AVMManagedDiskInputDetails struct { + DiskID *string `json:"diskId,omitempty"` + PrimaryStagingAzureStorageAccountID *string `json:"primaryStagingAzureStorageAccountId,omitempty"` + RecoveryResourceGroupID *string `json:"recoveryResourceGroupId,omitempty"` +} + // AddVCenterRequest is input required to add vCenter. type AddVCenterRequest struct { Properties *AddVCenterRequestProperties `json:"properties,omitempty"` @@ -408,12 +1309,89 @@ type ApplyRecoveryPointInput struct { // ApplyRecoveryPointInputProperties is input properties to apply recovery point. type ApplyRecoveryPointInputProperties struct { - RecoveryPointID *string `json:"recoveryPointId,omitempty"` - ProviderSpecificDetails *ApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + ProviderSpecificDetails ApplyRecoveryPointProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ApplyRecoveryPointInputProperties struct. +func (arpip *ApplyRecoveryPointInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["recoveryPointId"] + if v != nil { + var recoveryPointID string + err = json.Unmarshal(*m["recoveryPointId"], &recoveryPointID) + if err != nil { + return err + } + arpip.RecoveryPointID = &recoveryPointID + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalApplyRecoveryPointProviderSpecificInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + arpip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // ApplyRecoveryPointProviderSpecificInput is provider specific input for apply recovery point. -type ApplyRecoveryPointProviderSpecificInput struct { +type ApplyRecoveryPointProviderSpecificInput interface { + AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) + AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) + AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) +} + +func unmarshalApplyRecoveryPointProviderSpecificInput(body []byte) (ApplyRecoveryPointProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeHyperVReplicaAzure): + var hvraarpi HyperVReplicaAzureApplyRecoveryPointInput + err := json.Unmarshal(body, &hvraarpi) + return hvraarpi, err + case string(InstanceTypeInMageAzureV2): + var imavarpi InMageAzureV2ApplyRecoveryPointInput + err := json.Unmarshal(body, &imavarpi) + return imavarpi, err + case string(InstanceTypeA2A): + var aarpi A2AApplyRecoveryPointInput + err := json.Unmarshal(body, &aarpi) + return aarpi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalApplyRecoveryPointProviderSpecificInputArray(body []byte) ([]ApplyRecoveryPointProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + arppsiArray := make([]ApplyRecoveryPointProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + arppsi, err := unmarshalApplyRecoveryPointProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + arppsiArray[index] = arppsi + } + return arppsiArray, nil } // ARMException is ARM inner exception class. @@ -457,7 +1435,44 @@ type ARMInnerError struct { // AsrJobDetails is this class represents job details based on specific job type. type AsrJobDetails struct { - AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` + AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` + InstanceType InstanceTypeJobDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for AsrJobDetails. +func (ajd AsrJobDetails) MarshalJSON() ([]byte, error) { + ajd.InstanceType = InstanceTypeAsrJobDetails + type Alias AsrJobDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ajd), + }) +} + +// AsAsrJobDetails is the JobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return &ajd, true +} + +// AsTestFailoverJobDetails is the JobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the JobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the JobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the JobDetails implementation for AsrJobDetails. +func (ajd AsrJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false } // ASRTask is task of the Job. @@ -471,50 +1486,372 @@ type ASRTask struct { State *string `json:"state,omitempty"` StateDescription *string `json:"stateDescription,omitempty"` TaskType *string `json:"taskType,omitempty"` - CustomDetails *TaskTypeDetails `json:"customDetails,omitempty"` - GroupTaskCustomDetails *GroupTaskDetails `json:"groupTaskCustomDetails,omitempty"` + CustomDetails TaskTypeDetails `json:"customDetails,omitempty"` + GroupTaskCustomDetails GroupTaskDetails `json:"groupTaskCustomDetails,omitempty"` Errors *[]JobErrorDetails `json:"errors,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for ASRTask struct. +func (at *ASRTask) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["taskId"] + if v != nil { + var taskID string + err = json.Unmarshal(*m["taskId"], &taskID) + if err != nil { + return err + } + at.TaskID = &taskID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + at.Name = &name + } + + v = m["startTime"] + if v != nil { + var startTime date.Time + err = json.Unmarshal(*m["startTime"], &startTime) + if err != nil { + return err + } + at.StartTime = &startTime + } + + v = m["endTime"] + if v != nil { + var endTime date.Time + err = json.Unmarshal(*m["endTime"], &endTime) + if err != nil { + return err + } + at.EndTime = &endTime + } + + v = m["allowedActions"] + if v != nil { + var allowedActions []string + err = json.Unmarshal(*m["allowedActions"], &allowedActions) + if err != nil { + return err + } + at.AllowedActions = &allowedActions + } + + v = m["friendlyName"] + if v != nil { + var friendlyName string + err = json.Unmarshal(*m["friendlyName"], &friendlyName) + if err != nil { + return err + } + at.FriendlyName = &friendlyName + } + + v = m["state"] + if v != nil { + var state string + err = json.Unmarshal(*m["state"], &state) + if err != nil { + return err + } + at.State = &state + } + + v = m["stateDescription"] + if v != nil { + var stateDescription string + err = json.Unmarshal(*m["stateDescription"], &stateDescription) + if err != nil { + return err + } + at.StateDescription = &stateDescription + } + + v = m["taskType"] + if v != nil { + var taskType string + err = json.Unmarshal(*m["taskType"], &taskType) + if err != nil { + return err + } + at.TaskType = &taskType + } + + v = m["customDetails"] + if v != nil { + customDetails, err := unmarshalTaskTypeDetails(*m["customDetails"]) + if err != nil { + return err + } + at.CustomDetails = customDetails + } + + v = m["groupTaskCustomDetails"] + if v != nil { + groupTaskCustomDetails, err := unmarshalGroupTaskDetails(*m["groupTaskCustomDetails"]) + if err != nil { + return err + } + at.GroupTaskCustomDetails = groupTaskCustomDetails + } + + v = m["errors"] + if v != nil { + var errorsVar []JobErrorDetails + err = json.Unmarshal(*m["errors"], &errorsVar) + if err != nil { + return err + } + at.Errors = &errorsVar + } + + return nil +} + // AutomationRunbookTaskDetails is this class represents the task details for an automation runbook. type AutomationRunbookTaskDetails struct { - Name *string `json:"name,omitempty"` - CloudServiceName *string `json:"cloudServiceName,omitempty"` - SubscriptionID *string `json:"subscriptionId,omitempty"` - AccountName *string `json:"accountName,omitempty"` - RunbookID *string `json:"runbookId,omitempty"` - RunbookName *string `json:"runbookName,omitempty"` - JobID *string `json:"jobId,omitempty"` - JobOutput *string `json:"jobOutput,omitempty"` - IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + Name *string `json:"name,omitempty"` + CloudServiceName *string `json:"cloudServiceName,omitempty"` + SubscriptionID *string `json:"subscriptionId,omitempty"` + AccountName *string `json:"accountName,omitempty"` + RunbookID *string `json:"runbookId,omitempty"` + RunbookName *string `json:"runbookName,omitempty"` + JobID *string `json:"jobId,omitempty"` + JobOutput *string `json:"jobOutput,omitempty"` + IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` +} + +// MarshalJSON is the custom marshaler for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) MarshalJSON() ([]byte, error) { + artd.InstanceType = InstanceTypeAutomationRunbookTaskDetails + type Alias AutomationRunbookTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(artd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for AutomationRunbookTaskDetails. +func (artd AutomationRunbookTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return &artd, true } // AzureFabricCreationInput is fabric provider specific settings. type AzureFabricCreationInput struct { - Location *string `json:"location,omitempty"` + InstanceType InstanceTypeFabricSpecificCreationInput `json:"instanceType,omitempty"` + Location *string `json:"location,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) MarshalJSON() ([]byte, error) { + afci.InstanceType = InstanceTypeFabricSpecificCreationInputInstanceTypeA2A + type Alias AzureFabricCreationInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(afci), + }) +} + +// AsAzureFabricCreationInput is the FabricSpecificCreationInput implementation for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { + return &afci, true +} + +// AsVMwareV2FabricCreationInput is the FabricSpecificCreationInput implementation for AzureFabricCreationInput. +func (afci AzureFabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { + return nil, false } // AzureFabricSpecificDetails is azure Fabric Specific Details. type AzureFabricSpecificDetails struct { - Location *string `json:"location,omitempty"` - ContainerIds *[]string `json:"containerIds,omitempty"` + InstanceType InstanceTypeFabricSpecificDetails `json:"instanceType,omitempty"` + Location *string `json:"location,omitempty"` + ContainerIds *[]string `json:"containerIds,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) MarshalJSON() ([]byte, error) { + afsd.InstanceType = InstanceTypeAzure + type Alias AzureFabricSpecificDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(afsd), + }) +} + +// AsAzureFabricSpecificDetails is the FabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return &afsd, true +} + +// AsVmmDetails is the FabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the FabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the FabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the FabricSpecificDetails implementation for AzureFabricSpecificDetails. +func (afsd AzureFabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false } // AzureToAzureCreateNetworkMappingInput is create network mappings input properties/behaviour specific to Azure to // Azure Network mapping. type AzureToAzureCreateNetworkMappingInput struct { - PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` + InstanceType InstanceTypeFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` + PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` } -// AzureToAzureNetworkMappingSettings is a2A Network Mapping fabric specific settings. +// MarshalJSON is the custom marshaler for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + atacnmi.InstanceType = InstanceTypeAzureToAzure + type Alias AzureToAzureCreateNetworkMappingInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(atacnmi), + }) +} + +// AsAzureToAzureCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { + return &atacnmi, true +} + +// AsVmmToAzureCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for AzureToAzureCreateNetworkMappingInput. +func (atacnmi AzureToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { + return nil, false +} + +// AzureToAzureNetworkMappingSettings is a2A Network Mapping fabric specific settings. type AzureToAzureNetworkMappingSettings struct { - PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` - RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` + InstanceType InstanceTypeNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` + PrimaryFabricLocation *string `json:"primaryFabricLocation,omitempty"` + RecoveryFabricLocation *string `json:"recoveryFabricLocation,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { + atanms.InstanceType = InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure + type Alias AzureToAzureNetworkMappingSettings + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(atanms), + }) +} + +// AsAzureToAzureNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { + return &atanms, true +} + +// AsVmmToAzureNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToVmmNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for AzureToAzureNetworkMappingSettings. +func (atanms AzureToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { + return nil, false } // AzureToAzureUpdateNetworkMappingInput is updates network mappings input. type AzureToAzureUpdateNetworkMappingInput struct { - PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` + InstanceType InstanceTypeFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` + PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + ataunmi.InstanceType = InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure + type Alias AzureToAzureUpdateNetworkMappingInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ataunmi), + }) +} + +// AsAzureToAzureUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { + return &ataunmi, true +} + +// AsVmmToAzureUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for AzureToAzureUpdateNetworkMappingInput. +func (ataunmi AzureToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { + return nil, false } // AzureToAzureVMSyncedConfigDetails is azure to Azure VM synced configuration details. @@ -536,7 +1873,53 @@ type AzureVMDiskDetails struct { } // ConfigurationSettings is replication provider specific settings. -type ConfigurationSettings struct { +type ConfigurationSettings interface { + AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) + AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) + AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) +} + +func unmarshalConfigurationSettings(body []byte) (ConfigurationSettings, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeHyperVVirtualMachine): + var hvvmd HyperVVirtualMachineDetails + err := json.Unmarshal(body, &hvvmd) + return hvvmd, err + case string(InstanceTypeVMwareVirtualMachine): + var vmvmd VMwareVirtualMachineDetails + err := json.Unmarshal(body, &vmvmd) + return vmvmd, err + case string(InstanceTypeReplicationGroupDetails): + var rgd ReplicationGroupDetails + err := json.Unmarshal(body, &rgd) + return rgd, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalConfigurationSettingsArray(body []byte) ([]ConfigurationSettings, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + csArray := make([]ConfigurationSettings, len(rawMessages)) + + for index, rawMessage := range rawMessages { + cs, err := unmarshalConfigurationSettings(*rawMessage) + if err != nil { + return nil, err + } + csArray[index] = cs + } + return csArray, nil } // ConfigureAlertRequest is request to configure alerts for the system. @@ -554,7 +1937,59 @@ type ConfigureAlertRequestProperties struct { // ConsistencyCheckTaskDetails is this class contains monitoring details of all the inconsistent Protected Entites in // Vmm. type ConsistencyCheckTaskDetails struct { - VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + VMDetails *[]InconsistentVMDetails `json:"vmDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) MarshalJSON() ([]byte, error) { + cctd.InstanceType = InstanceTypeConsistencyCheckTaskDetails + type Alias ConsistencyCheckTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(cctd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return &cctd, true +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for ConsistencyCheckTaskDetails. +func (cctd ConsistencyCheckTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false } // CreateNetworkMappingInput is create network mappings input. @@ -564,9 +1999,50 @@ type CreateNetworkMappingInput struct { // CreateNetworkMappingInputProperties is common input details for network mapping operation. type CreateNetworkMappingInputProperties struct { - RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` - RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` - FabricSpecificDetails *FabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` + RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` + RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` + FabricSpecificDetails FabricSpecificCreateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CreateNetworkMappingInputProperties struct. +func (cnmip *CreateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["recoveryFabricName"] + if v != nil { + var recoveryFabricName string + err = json.Unmarshal(*m["recoveryFabricName"], &recoveryFabricName) + if err != nil { + return err + } + cnmip.RecoveryFabricName = &recoveryFabricName + } + + v = m["recoveryNetworkId"] + if v != nil { + var recoveryNetworkID string + err = json.Unmarshal(*m["recoveryNetworkId"], &recoveryNetworkID) + if err != nil { + return err + } + cnmip.RecoveryNetworkID = &recoveryNetworkID + } + + v = m["fabricSpecificDetails"] + if v != nil { + fabricSpecificDetails, err := unmarshalFabricSpecificCreateNetworkMappingInput(*m["fabricSpecificDetails"]) + if err != nil { + return err + } + cnmip.FabricSpecificDetails = fabricSpecificDetails + } + + return nil } // CreatePolicyInput is protection profile input. @@ -576,7 +2052,28 @@ type CreatePolicyInput struct { // CreatePolicyInputProperties is policy creation properties. type CreatePolicyInputProperties struct { - ProviderSpecificInput *PolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"` + ProviderSpecificInput PolicyProviderSpecificInput `json:"providerSpecificInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for CreatePolicyInputProperties struct. +func (cpip *CreatePolicyInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["providerSpecificInput"] + if v != nil { + providerSpecificInput, err := unmarshalPolicyProviderSpecificInput(*m["providerSpecificInput"]) + if err != nil { + return err + } + cpip.ProviderSpecificInput = providerSpecificInput + } + + return nil } // CreateProtectionContainerInput is create protection container input. @@ -589,6 +2086,27 @@ type CreateProtectionContainerInputProperties struct { ProviderSpecificInput *[]ReplicationProviderSpecificContainerCreationInput `json:"providerSpecificInput,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for CreateProtectionContainerInputProperties struct. +func (cpcip *CreateProtectionContainerInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["providerSpecificInput"] + if v != nil { + providerSpecificInput, err := unmarshalReplicationProviderSpecificContainerCreationInputArray(*m["providerSpecificInput"]) + if err != nil { + return err + } + cpcip.ProviderSpecificInput = &providerSpecificInput + } + + return nil +} + // CreateProtectionContainerMappingInput is configure pairing input. type CreateProtectionContainerMappingInput struct { Properties *CreateProtectionContainerMappingInputProperties `json:"properties,omitempty"` @@ -637,12 +2155,79 @@ type DisableProtectionInput struct { // DisableProtectionInputProperties is disable protection input properties. type DisableProtectionInputProperties struct { - DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"` - ReplicationProviderInput *DisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"` + DisableProtectionReason DisableProtectionReason `json:"disableProtectionReason,omitempty"` + ReplicationProviderInput DisableProtectionProviderSpecificInput `json:"replicationProviderInput,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for DisableProtectionInputProperties struct. +func (dpip *DisableProtectionInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["disableProtectionReason"] + if v != nil { + var disableProtectionReason DisableProtectionReason + err = json.Unmarshal(*m["disableProtectionReason"], &disableProtectionReason) + if err != nil { + return err + } + dpip.DisableProtectionReason = disableProtectionReason + } + + v = m["replicationProviderInput"] + if v != nil { + replicationProviderInput, err := unmarshalDisableProtectionProviderSpecificInput(*m["replicationProviderInput"]) + if err != nil { + return err + } + dpip.ReplicationProviderInput = replicationProviderInput + } + + return nil } // DisableProtectionProviderSpecificInput is disable protection provider specific input. -type DisableProtectionProviderSpecificInput struct { +type DisableProtectionProviderSpecificInput interface { + AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) +} + +func unmarshalDisableProtectionProviderSpecificInput(body []byte) (DisableProtectionProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeInMage): + var imdppsi InMageDisableProtectionProviderSpecificInput + err := json.Unmarshal(body, &imdppsi) + return imdppsi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalDisableProtectionProviderSpecificInputArray(body []byte) ([]DisableProtectionProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + dppsiArray := make([]DisableProtectionProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + dppsi, err := unmarshalDisableProtectionProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + dppsiArray[index] = dppsi + } + return dppsiArray, nil } // DiscoverProtectableItemRequest is request to add a physical machine as a protectable item in a container. @@ -688,13 +2273,110 @@ type EnableProtectionInput struct { // EnableProtectionInputProperties is enable protection input properties. type EnableProtectionInputProperties struct { - PolicyID *string `json:"policyId,omitempty"` - ProtectableItemID *string `json:"protectableItemId,omitempty"` - ProviderSpecificDetails *EnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` + PolicyID *string `json:"policyId,omitempty"` + ProtectableItemID *string `json:"protectableItemId,omitempty"` + ProviderSpecificDetails EnableProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for EnableProtectionInputProperties struct. +func (epip *EnableProtectionInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["policyId"] + if v != nil { + var policyID string + err = json.Unmarshal(*m["policyId"], &policyID) + if err != nil { + return err + } + epip.PolicyID = &policyID + } + + v = m["protectableItemId"] + if v != nil { + var protectableItemID string + err = json.Unmarshal(*m["protectableItemId"], &protectableItemID) + if err != nil { + return err + } + epip.ProtectableItemID = &protectableItemID + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalEnableProtectionProviderSpecificInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + epip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // EnableProtectionProviderSpecificInput is enable protection provider specific input. -type EnableProtectionProviderSpecificInput struct { +type EnableProtectionProviderSpecificInput interface { + AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) + AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) + AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) + AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) + AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) +} + +func unmarshalEnableProtectionProviderSpecificInput(body []byte) (EnableProtectionProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure): + var hvraepi HyperVReplicaAzureEnableProtectionInput + err := json.Unmarshal(body, &hvraepi) + return hvraepi, err + case string(InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeSan): + var sepi SanEnableProtectionInput + err := json.Unmarshal(body, &sepi) + return sepi, err + case string(InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2): + var imavepi InMageAzureV2EnableProtectionInput + err := json.Unmarshal(body, &imavepi) + return imavepi, err + case string(InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMage): + var imepi InMageEnableProtectionInput + err := json.Unmarshal(body, &imepi) + return imepi, err + case string(InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeA2A): + var aepi A2AEnableProtectionInput + err := json.Unmarshal(body, &aepi) + return aepi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalEnableProtectionProviderSpecificInputArray(body []byte) ([]EnableProtectionProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + eppsiArray := make([]EnableProtectionProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + eppsi, err := unmarshalEnableProtectionProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + eppsiArray[index] = eppsi + } + return eppsiArray, nil } // EncryptionDetails is encryption details for the fabric. @@ -735,31 +2417,286 @@ func (client EventCollection) EventCollectionPreparer() (*http.Request, error) { // EventProperties is the properties of a monitoring event. type EventProperties struct { - EventCode *string `json:"eventCode,omitempty"` - Description *string `json:"description,omitempty"` - EventType *string `json:"eventType,omitempty"` - AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` - Severity *string `json:"severity,omitempty"` - TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"` - FabricID *string `json:"fabricId,omitempty"` - ProviderSpecificDetails *EventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` - EventSpecificDetails *EventSpecificDetails `json:"eventSpecificDetails,omitempty"` - HealthErrors *[]HealthError `json:"healthErrors,omitempty"` + EventCode *string `json:"eventCode,omitempty"` + Description *string `json:"description,omitempty"` + EventType *string `json:"eventType,omitempty"` + AffectedObjectFriendlyName *string `json:"affectedObjectFriendlyName,omitempty"` + Severity *string `json:"severity,omitempty"` + TimeOfOccurrence *date.Time `json:"timeOfOccurrence,omitempty"` + FabricID *string `json:"fabricId,omitempty"` + ProviderSpecificDetails EventProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` + EventSpecificDetails EventSpecificDetails `json:"eventSpecificDetails,omitempty"` + HealthErrors *[]HealthError `json:"healthErrors,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for EventProperties struct. +func (ep *EventProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["eventCode"] + if v != nil { + var eventCode string + err = json.Unmarshal(*m["eventCode"], &eventCode) + if err != nil { + return err + } + ep.EventCode = &eventCode + } + + v = m["description"] + if v != nil { + var description string + err = json.Unmarshal(*m["description"], &description) + if err != nil { + return err + } + ep.Description = &description + } + + v = m["eventType"] + if v != nil { + var eventType string + err = json.Unmarshal(*m["eventType"], &eventType) + if err != nil { + return err + } + ep.EventType = &eventType + } + + v = m["affectedObjectFriendlyName"] + if v != nil { + var affectedObjectFriendlyName string + err = json.Unmarshal(*m["affectedObjectFriendlyName"], &affectedObjectFriendlyName) + if err != nil { + return err + } + ep.AffectedObjectFriendlyName = &affectedObjectFriendlyName + } + + v = m["severity"] + if v != nil { + var severity string + err = json.Unmarshal(*m["severity"], &severity) + if err != nil { + return err + } + ep.Severity = &severity + } + + v = m["timeOfOccurrence"] + if v != nil { + var timeOfOccurrence date.Time + err = json.Unmarshal(*m["timeOfOccurrence"], &timeOfOccurrence) + if err != nil { + return err + } + ep.TimeOfOccurrence = &timeOfOccurrence + } + + v = m["fabricId"] + if v != nil { + var fabricID string + err = json.Unmarshal(*m["fabricId"], &fabricID) + if err != nil { + return err + } + ep.FabricID = &fabricID + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalEventProviderSpecificDetails(*m["providerSpecificDetails"]) + if err != nil { + return err + } + ep.ProviderSpecificDetails = providerSpecificDetails + } + + v = m["eventSpecificDetails"] + if v != nil { + eventSpecificDetails, err := unmarshalEventSpecificDetails(*m["eventSpecificDetails"]) + if err != nil { + return err + } + ep.EventSpecificDetails = eventSpecificDetails + } + + v = m["healthErrors"] + if v != nil { + var healthErrors []HealthError + err = json.Unmarshal(*m["healthErrors"], &healthErrors) + if err != nil { + return err + } + ep.HealthErrors = &healthErrors + } + + return nil } // EventProviderSpecificDetails is model class for provider specific details for an event. -type EventProviderSpecificDetails struct { +type EventProviderSpecificDetails interface { + AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) + AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) + AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) + AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) + AsA2AEventDetails() (*A2AEventDetails, bool) + AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) +} + +func unmarshalEventProviderSpecificDetails(body []byte) (EventProviderSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeHyperVReplicaBaseEventDetails): + var hvrbed HyperVReplicaBaseEventDetails + err := json.Unmarshal(body, &hvrbed) + return hvrbed, err + case string(InstanceTypeHyperVReplica2012): + var hvr2ed HyperVReplica2012EventDetails + err := json.Unmarshal(body, &hvr2ed) + return hvr2ed, err + case string(InstanceTypeHyperVReplica2012R2): + var hvr2ed HyperVReplica2012R2EventDetails + err := json.Unmarshal(body, &hvr2ed) + return hvr2ed, err + case string(InstanceTypeHyperVReplicaAzure): + var hvraed HyperVReplicaAzureEventDetails + err := json.Unmarshal(body, &hvraed) + return hvraed, err + case string(InstanceTypeA2A): + var aed A2AEventDetails + err := json.Unmarshal(body, &aed) + return aed, err + case string(InstanceTypeInMageAzureV2): + var imaved InMageAzureV2EventDetails + err := json.Unmarshal(body, &imaved) + return imaved, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalEventProviderSpecificDetailsArray(body []byte) ([]EventProviderSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + epsdArray := make([]EventProviderSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + epsd, err := unmarshalEventProviderSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + epsdArray[index] = epsd + } + return epsdArray, nil +} + +// EventQueryParameter is implements the event query parameter. +type EventQueryParameter struct { + EventCode *string `json:"EventCode,omitempty"` + Severity *string `json:"Severity,omitempty"` + EventType *string `json:"EventType,omitempty"` + FabricName *string `json:"FabricName,omitempty"` + AffectedObjectFriendlyName *string `json:"AffectedObjectFriendlyName,omitempty"` + StartTime *date.Time `json:"StartTime,omitempty"` + EndTime *date.Time `json:"EndTime,omitempty"` } // EventSpecificDetails is model class for event specific details for an event. -type EventSpecificDetails struct { +type EventSpecificDetails interface { + AsJobStatusEventDetails() (*JobStatusEventDetails, bool) +} + +func unmarshalEventSpecificDetails(body []byte) (EventSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeJobStatus): + var jsed JobStatusEventDetails + err := json.Unmarshal(body, &jsed) + return jsed, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalEventSpecificDetailsArray(body []byte) ([]EventSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + esdArray := make([]EventSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + esd, err := unmarshalEventSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + esdArray[index] = esd + } + return esdArray, nil } // ExportJobDetails is this class represents details for export jobs workflow. type ExportJobDetails struct { - AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` - BlobURI *string `json:"blobUri,omitempty"` - SasToken *string `json:"sasToken,omitempty"` + AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` + InstanceType InstanceTypeJobDetails `json:"instanceType,omitempty"` + BlobURI *string `json:"blobUri,omitempty"` + SasToken *string `json:"sasToken,omitempty"` +} + +// MarshalJSON is the custom marshaler for ExportJobDetails. +func (ejd ExportJobDetails) MarshalJSON() ([]byte, error) { + ejd.InstanceType = InstanceTypeExportJobDetails + type Alias ExportJobDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ejd), + }) +} + +// AsAsrJobDetails is the JobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the JobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the JobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the JobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return &ejd, true +} + +// AsSwitchProtectionJobDetails is the JobDetails implementation for ExportJobDetails. +func (ejd ExportJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false } // Fabric is fabric definition. @@ -798,42 +2735,438 @@ type FabricCreationInput struct { // FabricCreationInputProperties is properties of site details provided during the time of site creation type FabricCreationInputProperties struct { - CustomDetails *FabricSpecificCreationInput `json:"customDetails,omitempty"` + CustomDetails FabricSpecificCreationInput `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for FabricCreationInputProperties struct. +func (fcip *FabricCreationInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["customDetails"] + if v != nil { + customDetails, err := unmarshalFabricSpecificCreationInput(*m["customDetails"]) + if err != nil { + return err + } + fcip.CustomDetails = customDetails + } + + return nil } // FabricProperties is fabric properties. type FabricProperties struct { - FriendlyName *string `json:"friendlyName,omitempty"` - EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` - RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"` - InternalIdentifier *string `json:"internalIdentifier,omitempty"` - BcdrState *string `json:"bcdrState,omitempty"` - CustomDetails *FabricSpecificDetails `json:"customDetails,omitempty"` - HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` - Health *string `json:"health,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + EncryptionDetails *EncryptionDetails `json:"encryptionDetails,omitempty"` + RolloverEncryptionDetails *EncryptionDetails `json:"rolloverEncryptionDetails,omitempty"` + InternalIdentifier *string `json:"internalIdentifier,omitempty"` + BcdrState *string `json:"bcdrState,omitempty"` + CustomDetails FabricSpecificDetails `json:"customDetails,omitempty"` + HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` + Health *string `json:"health,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for FabricProperties struct. +func (fp *FabricProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["friendlyName"] + if v != nil { + var friendlyName string + err = json.Unmarshal(*m["friendlyName"], &friendlyName) + if err != nil { + return err + } + fp.FriendlyName = &friendlyName + } + + v = m["encryptionDetails"] + if v != nil { + var encryptionDetails EncryptionDetails + err = json.Unmarshal(*m["encryptionDetails"], &encryptionDetails) + if err != nil { + return err + } + fp.EncryptionDetails = &encryptionDetails + } + + v = m["rolloverEncryptionDetails"] + if v != nil { + var rolloverEncryptionDetails EncryptionDetails + err = json.Unmarshal(*m["rolloverEncryptionDetails"], &rolloverEncryptionDetails) + if err != nil { + return err + } + fp.RolloverEncryptionDetails = &rolloverEncryptionDetails + } + + v = m["internalIdentifier"] + if v != nil { + var internalIdentifier string + err = json.Unmarshal(*m["internalIdentifier"], &internalIdentifier) + if err != nil { + return err + } + fp.InternalIdentifier = &internalIdentifier + } + + v = m["bcdrState"] + if v != nil { + var bcdrState string + err = json.Unmarshal(*m["bcdrState"], &bcdrState) + if err != nil { + return err + } + fp.BcdrState = &bcdrState + } + + v = m["customDetails"] + if v != nil { + customDetails, err := unmarshalFabricSpecificDetails(*m["customDetails"]) + if err != nil { + return err + } + fp.CustomDetails = customDetails + } + + v = m["healthErrorDetails"] + if v != nil { + var healthErrorDetails []HealthError + err = json.Unmarshal(*m["healthErrorDetails"], &healthErrorDetails) + if err != nil { + return err + } + fp.HealthErrorDetails = &healthErrorDetails + } + + v = m["health"] + if v != nil { + var health string + err = json.Unmarshal(*m["health"], &health) + if err != nil { + return err + } + fp.Health = &health + } + + return nil } // FabricReplicationGroupTaskDetails is this class represents the fabric replication group task details. type FabricReplicationGroupTaskDetails struct { - SkippedReason *string `json:"skippedReason,omitempty"` - SkippedReasonString *string `json:"skippedReasonString,omitempty"` - JobTask *JobEntity `json:"jobTask,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + SkippedReason *string `json:"skippedReason,omitempty"` + SkippedReasonString *string `json:"skippedReasonString,omitempty"` + JobTask *JobEntity `json:"jobTask,omitempty"` +} + +// MarshalJSON is the custom marshaler for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) MarshalJSON() ([]byte, error) { + frgtd.InstanceType = InstanceTypeFabricReplicationGroupTaskDetails + type Alias FabricReplicationGroupTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(frgtd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return &frgtd, true +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for FabricReplicationGroupTaskDetails. +func (frgtd FabricReplicationGroupTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false } // FabricSpecificCreateNetworkMappingInput is input details specific to fabrics during Network Mapping. -type FabricSpecificCreateNetworkMappingInput struct { +type FabricSpecificCreateNetworkMappingInput interface { + AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) + AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) + AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) +} + +func unmarshalFabricSpecificCreateNetworkMappingInput(body []byte) (FabricSpecificCreateNetworkMappingInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAzureToAzure): + var atacnmi AzureToAzureCreateNetworkMappingInput + err := json.Unmarshal(body, &atacnmi) + return atacnmi, err + case string(InstanceTypeVmmToAzure): + var vtacnmi VmmToAzureCreateNetworkMappingInput + err := json.Unmarshal(body, &vtacnmi) + return vtacnmi, err + case string(InstanceTypeVmmToVmm): + var vtvcnmi VmmToVmmCreateNetworkMappingInput + err := json.Unmarshal(body, &vtvcnmi) + return vtvcnmi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFabricSpecificCreateNetworkMappingInputArray(body []byte) ([]FabricSpecificCreateNetworkMappingInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fscnmiArray := make([]FabricSpecificCreateNetworkMappingInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fscnmi, err := unmarshalFabricSpecificCreateNetworkMappingInput(*rawMessage) + if err != nil { + return nil, err + } + fscnmiArray[index] = fscnmi + } + return fscnmiArray, nil } // FabricSpecificCreationInput is fabric provider specific settings. -type FabricSpecificCreationInput struct { +type FabricSpecificCreationInput interface { + AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) + AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) +} + +func unmarshalFabricSpecificCreationInput(body []byte) (FabricSpecificCreationInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeFabricSpecificCreationInputInstanceTypeA2A): + var afci AzureFabricCreationInput + err := json.Unmarshal(body, &afci) + return afci, err + case string(InstanceTypeFabricSpecificCreationInputInstanceTypeVMwareV2): + var vmvfci VMwareV2FabricCreationInput + err := json.Unmarshal(body, &vmvfci) + return vmvfci, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFabricSpecificCreationInputArray(body []byte) ([]FabricSpecificCreationInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsciArray := make([]FabricSpecificCreationInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsci, err := unmarshalFabricSpecificCreationInput(*rawMessage) + if err != nil { + return nil, err + } + fsciArray[index] = fsci + } + return fsciArray, nil } // FabricSpecificDetails is fabric specific details. -type FabricSpecificDetails struct { +type FabricSpecificDetails interface { + AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) + AsVmmDetails() (*VmmDetails, bool) + AsHyperVSiteDetails() (*HyperVSiteDetails, bool) + AsVMwareDetails() (*VMwareDetails, bool) + AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) +} + +func unmarshalFabricSpecificDetails(body []byte) (FabricSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAzure): + var afsd AzureFabricSpecificDetails + err := json.Unmarshal(body, &afsd) + return afsd, err + case string(InstanceTypeVMM): + var vd VmmDetails + err := json.Unmarshal(body, &vd) + return vd, err + case string(InstanceTypeHyperVSite): + var hvsd HyperVSiteDetails + err := json.Unmarshal(body, &hvsd) + return hvsd, err + case string(InstanceTypeVMware): + var vmd VMwareDetails + err := json.Unmarshal(body, &vmd) + return vmd, err + case string(InstanceTypeVMwareV2): + var vmvfsd VMwareV2FabricSpecificDetails + err := json.Unmarshal(body, &vmvfsd) + return vmvfsd, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFabricSpecificDetailsArray(body []byte) ([]FabricSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsdArray := make([]FabricSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsd, err := unmarshalFabricSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + fsdArray[index] = fsd + } + return fsdArray, nil } // FabricSpecificUpdateNetworkMappingInput is input details specific to fabrics during Network Mapping. -type FabricSpecificUpdateNetworkMappingInput struct { +type FabricSpecificUpdateNetworkMappingInput interface { + AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) + AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) + AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) +} + +func unmarshalFabricSpecificUpdateNetworkMappingInput(body []byte) (FabricSpecificUpdateNetworkMappingInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeAzureToAzure): + var ataunmi AzureToAzureUpdateNetworkMappingInput + err := json.Unmarshal(body, &ataunmi) + return ataunmi, err + case string(InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure): + var vtaunmi VmmToAzureUpdateNetworkMappingInput + err := json.Unmarshal(body, &vtaunmi) + return vtaunmi, err + case string(InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm): + var vtvunmi VmmToVmmUpdateNetworkMappingInput + err := json.Unmarshal(body, &vtvunmi) + return vtvunmi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFabricSpecificUpdateNetworkMappingInputArray(body []byte) ([]FabricSpecificUpdateNetworkMappingInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fsunmiArray := make([]FabricSpecificUpdateNetworkMappingInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fsunmi, err := unmarshalFabricSpecificUpdateNetworkMappingInput(*rawMessage) + if err != nil { + return nil, err + } + fsunmiArray[index] = fsunmi + } + return fsunmiArray, nil +} + +// FailoverJobDetails is this class represents the details for a failover job. +type FailoverJobDetails struct { + AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` + InstanceType InstanceTypeJobDetails `json:"instanceType,omitempty"` + ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for FailoverJobDetails. +func (fjd FailoverJobDetails) MarshalJSON() ([]byte, error) { + fjd.InstanceType = InstanceTypeFailoverJobDetails + type Alias FailoverJobDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(fjd), + }) +} + +// AsAsrJobDetails is the JobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the JobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the JobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return &fjd, true +} + +// AsExportJobDetails is the JobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the JobDetails implementation for FailoverJobDetails. +func (fjd FailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false } // FailoverProcessServerRequest is request to failover a process server. @@ -850,273 +3183,1362 @@ type FailoverProcessServerRequestProperties struct { UpdateType *string `json:"updateType,omitempty"` } -// GroupTaskDetails is this class represents the group task details when parent child relationship exists in the drill -// down. -type GroupTaskDetails struct { - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` +// FailoverReplicationProtectedItemDetails is failover details for a replication protected item. +type FailoverReplicationProtectedItemDetails struct { + Name *string `json:"name,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + TestVMName *string `json:"testVmName,omitempty"` + TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"` + NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"` + NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` + Subnet *string `json:"subnet,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` } -// HealthError is the health error class. +// GroupTaskDetails is this class represents the group task details when parent child relationship exists in the drill +// down. +type GroupTaskDetails interface { + AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) + AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) + AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) +} + +func unmarshalGroupTaskDetails(body []byte) (GroupTaskDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeInlineWorkflowTaskDetails): + var iwtd InlineWorkflowTaskDetails + err := json.Unmarshal(body, &iwtd) + return iwtd, err + case string(InstanceTypeRecoveryPlanGroupTaskDetails): + var rpgtd RecoveryPlanGroupTaskDetails + err := json.Unmarshal(body, &rpgtd) + return rpgtd, err + case string(InstanceTypeRecoveryPlanShutdownGroupTaskDetails): + var rpsgtd RecoveryPlanShutdownGroupTaskDetails + err := json.Unmarshal(body, &rpsgtd) + return rpsgtd, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalGroupTaskDetailsArray(body []byte) ([]GroupTaskDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + gtdArray := make([]GroupTaskDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + gtd, err := unmarshalGroupTaskDetails(*rawMessage) + if err != nil { + return nil, err + } + gtdArray[index] = gtd + } + return gtdArray, nil +} + +// HealthError is health Error type HealthError struct { - ErrorLevel *string `json:"errorLevel,omitempty"` - ErrorCode *string `json:"errorCode,omitempty"` - ErrorMessage *string `json:"errorMessage,omitempty"` - PossibleCauses *string `json:"possibleCauses,omitempty"` - RecommendedAction *string `json:"recommendedAction,omitempty"` - CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"` - RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` - EntityID *string `json:"entityId,omitempty"` + ErrorSource *string `json:"errorSource,omitempty"` + ErrorType *string `json:"errorType,omitempty"` + ErrorLevel *string `json:"errorLevel,omitempty"` + ErrorCode *string `json:"errorCode,omitempty"` + ErrorMessage *string `json:"errorMessage,omitempty"` + PossibleCauses *string `json:"possibleCauses,omitempty"` + RecommendedAction *string `json:"recommendedAction,omitempty"` + CreationTimeUtc *date.Time `json:"creationTimeUtc,omitempty"` + RecoveryProviderErrorMessage *string `json:"recoveryProviderErrorMessage,omitempty"` + EntityID *string `json:"entityId,omitempty"` + ChildErrors *[]HealthError `json:"childErrors,omitempty"` +} + +// HealthErrorSummary is class to define the summary of the health error details. +type HealthErrorSummary struct { + SummaryCode *string `json:"summaryCode,omitempty"` + Category HealthErrorCategory `json:"category,omitempty"` + Severity Severity `json:"severity,omitempty"` + SummaryMessage *string `json:"summaryMessage,omitempty"` + AffectedResourceType *string `json:"affectedResourceType,omitempty"` + AffectedResourceSubtype *string `json:"affectedResourceSubtype,omitempty"` + AffectedResourceCorrelationIds *[]string `json:"affectedResourceCorrelationIds,omitempty"` } // HyperVReplica2012EventDetails is model class for event details of a HyperVReplica E2E event. type HyperVReplica2012EventDetails struct { - ContainerName *string `json:"containerName,omitempty"` - FabricName *string `json:"fabricName,omitempty"` - RemoteContainerName *string `json:"remoteContainerName,omitempty"` - RemoteFabricName *string `json:"remoteFabricName,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + FabricName *string `json:"fabricName,omitempty"` + RemoteContainerName *string `json:"remoteContainerName,omitempty"` + RemoteFabricName *string `json:"remoteFabricName,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) MarshalJSON() ([]byte, error) { + hvr2ed.InstanceType = InstanceTypeHyperVReplica2012 + type Alias HyperVReplica2012EventDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvr2ed), + }) +} + +// AsHyperVReplicaBaseEventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return &hvr2ed, true +} + +// AsHyperVReplica2012R2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsA2AEventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012EventDetails. +func (hvr2ed HyperVReplica2012EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false } // HyperVReplica2012R2EventDetails is model class for event details of a HyperVReplica blue E2E event. type HyperVReplica2012R2EventDetails struct { - ContainerName *string `json:"containerName,omitempty"` - FabricName *string `json:"fabricName,omitempty"` - RemoteContainerName *string `json:"remoteContainerName,omitempty"` - RemoteFabricName *string `json:"remoteFabricName,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + FabricName *string `json:"fabricName,omitempty"` + RemoteContainerName *string `json:"remoteContainerName,omitempty"` + RemoteFabricName *string `json:"remoteFabricName,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) MarshalJSON() ([]byte, error) { + hvr2ed.InstanceType = InstanceTypeHyperVReplica2012R2 + type Alias HyperVReplica2012R2EventDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvr2ed), + }) +} + +// AsHyperVReplicaBaseEventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return &hvr2ed, true +} + +// AsHyperVReplicaAzureEventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsA2AEventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplica2012R2EventDetails. +func (hvr2ed HyperVReplica2012R2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false } // HyperVReplicaAzureApplyRecoveryPointInput is applyRecoveryPoint input specific to HyperVReplicaAzure provider. type HyperVReplicaAzureApplyRecoveryPointInput struct { - VaultLocation *string `json:"vaultLocation,omitempty"` - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + VaultLocation *string `json:"vaultLocation,omitempty"` + PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` + SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + hvraarpi.InstanceType = InstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzureApplyRecoveryPointInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvraarpi), + }) +} + +// AsHyperVReplicaAzureApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { + return &hvraarpi, true +} + +// AsInMageAzureV2ApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsA2AApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for HyperVReplicaAzureApplyRecoveryPointInput. +func (hvraarpi HyperVReplicaAzureApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { + return nil, false } // HyperVReplicaAzureEnableProtectionInput is azure specific enable protection input. type HyperVReplicaAzureEnableProtectionInput struct { - HvHostVMID *string `json:"hvHostVmId,omitempty"` - VMName *string `json:"vmName,omitempty"` - OsType *string `json:"osType,omitempty"` - VhdID *string `json:"vhdId,omitempty"` - TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"` - TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` - TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` - EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` - TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - DisksToInclude *[]string `json:"disksToInclude,omitempty"` - TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` - TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` + InstanceType InstanceTypeEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` + HvHostVMID *string `json:"hvHostVmId,omitempty"` + VMName *string `json:"vmName,omitempty"` + OsType *string `json:"osType,omitempty"` + VhdID *string `json:"vhdId,omitempty"` + TargetStorageAccountID *string `json:"targetStorageAccountId,omitempty"` + TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` + TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` + EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` + TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + DisksToInclude *[]string `json:"disksToInclude,omitempty"` + TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` + TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) MarshalJSON() ([]byte, error) { + hvraepi.InstanceType = InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzureEnableProtectionInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvraepi), + }) +} + +// AsHyperVReplicaAzureEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return &hvraepi, true +} + +// AsSanEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsA2AEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for HyperVReplicaAzureEnableProtectionInput. +func (hvraepi HyperVReplicaAzureEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false } // HyperVReplicaAzureEventDetails is model class for event details of a HyperVReplica E2A event. type HyperVReplicaAzureEventDetails struct { - ContainerName *string `json:"containerName,omitempty"` - FabricName *string `json:"fabricName,omitempty"` - RemoteContainerName *string `json:"remoteContainerName,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + FabricName *string `json:"fabricName,omitempty"` + RemoteContainerName *string `json:"remoteContainerName,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) MarshalJSON() ([]byte, error) { + hvraed.InstanceType = InstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzureEventDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvraed), + }) +} + +// AsHyperVReplicaBaseEventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return &hvraed, true +} + +// AsA2AEventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaAzureEventDetails. +func (hvraed HyperVReplicaAzureEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false } // HyperVReplicaAzureFailbackProviderInput is hvrA provider specific input for failback. type HyperVReplicaAzureFailbackProviderInput struct { - DataSyncOption *string `json:"dataSyncOption,omitempty"` - RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` - ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"` + InstanceType InstanceTypeProviderSpecificFailoverInput `json:"instanceType,omitempty"` + DataSyncOption *string `json:"dataSyncOption,omitempty"` + RecoveryVMCreationOption *string `json:"recoveryVmCreationOption,omitempty"` + ProviderIDForAlternateRecovery *string `json:"providerIdForAlternateRecovery,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) MarshalJSON() ([]byte, error) { + hvrafpi.InstanceType = InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback + type Alias HyperVReplicaAzureFailbackProviderInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrafpi), + }) +} + +// AsHyperVReplicaAzureFailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return &hvrafpi, true +} + +// AsInMageAzureV2FailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsA2AFailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailbackProviderInput. +func (hvrafpi HyperVReplicaAzureFailbackProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false } // HyperVReplicaAzureFailoverProviderInput is hvrA provider specific input for failover. type HyperVReplicaAzureFailoverProviderInput struct { - VaultLocation *string `json:"vaultLocation,omitempty"` - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` - RecoveryPointID *string `json:"recoveryPointId,omitempty"` + InstanceType InstanceTypeProviderSpecificFailoverInput `json:"instanceType,omitempty"` + VaultLocation *string `json:"vaultLocation,omitempty"` + PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` + SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) MarshalJSON() ([]byte, error) { + hvrafpi.InstanceType = InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzureFailoverProviderInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrafpi), + }) +} + +// AsHyperVReplicaAzureFailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return &hvrafpi, true +} + +// AsHyperVReplicaAzureFailbackProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsA2AFailoverProviderInput is the ProviderSpecificFailoverInput implementation for HyperVReplicaAzureFailoverProviderInput. +func (hvrafpi HyperVReplicaAzureFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false } // HyperVReplicaAzurePolicyDetails is hyper-V Replica Azure specific protection profile details. type HyperVReplicaAzurePolicyDetails struct { - RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - ReplicationInterval *int32 `json:"replicationInterval,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - Encryption *string `json:"encryption,omitempty"` - ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPointHistoryDurationInHours *int32 `json:"recoveryPointHistoryDurationInHours,omitempty"` + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + ReplicationInterval *int32 `json:"replicationInterval,omitempty"` + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + Encryption *string `json:"encryption,omitempty"` + ActiveStorageAccountID *string `json:"activeStorageAccountId,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) MarshalJSON() ([]byte, error) { + hvrapd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzurePolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrapd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return &hvrapd, true +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaAzurePolicyDetails. +func (hvrapd HyperVReplicaAzurePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // HyperVReplicaAzurePolicyInput is hyper-V Replica Azure specific input for creating a protection profile. type HyperVReplicaAzurePolicyInput struct { - RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - ReplicationInterval *int32 `json:"replicationInterval,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - Encryption *string `json:"encryption,omitempty"` - StorageAccounts *[]string `json:"storageAccounts,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificInput `json:"instanceType,omitempty"` + RecoveryPointHistoryDuration *int32 `json:"recoveryPointHistoryDuration,omitempty"` + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + ReplicationInterval *int32 `json:"replicationInterval,omitempty"` + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + Encryption *string `json:"encryption,omitempty"` + StorageAccounts *[]string `json:"storageAccounts,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) MarshalJSON() ([]byte, error) { + hvrapi.InstanceType = InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzurePolicyInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrapi), + }) +} + +// AsHyperVReplicaAzurePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return &hvrapi, true +} + +// AsHyperVReplicaPolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsA2APolicyCreationInput is the PolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the PolicyProviderSpecificInput implementation for HyperVReplicaAzurePolicyInput. +func (hvrapi HyperVReplicaAzurePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false } // HyperVReplicaAzureReplicationDetails is hyper V Replica Azure provider specific settings. type HyperVReplicaAzureReplicationDetails struct { - AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` - RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` - LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` - VMID *string `json:"vmId,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - Encryption *string `json:"encryption,omitempty"` - OSDetails *OSDetails `json:"oSDetails,omitempty"` - SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` - SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` - EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` - RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - LicenseType *string `json:"licenseType,omitempty"` + InstanceType InstanceTypeReplicationProviderSpecificSettings `json:"instanceType,omitempty"` + AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` + RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + VMID *string `json:"vmId,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + Encryption *string `json:"encryption,omitempty"` + OSDetails *OSDetails `json:"oSDetails,omitempty"` + SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` + SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` + EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` + RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + LicenseType *string `json:"licenseType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) MarshalJSON() ([]byte, error) { + hvrard.InstanceType = InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzureReplicationDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrard), + }) +} + +// AsHyperVReplicaBaseReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return &hvrard, true +} + +// AsInMageAzureV2ReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsA2AReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaAzureReplicationDetails. +func (hvrard HyperVReplicaAzureReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false } // HyperVReplicaAzureReprotectInput is azure specific reprotect input. type HyperVReplicaAzureReprotectInput struct { - HvHostVMID *string `json:"hvHostVmId,omitempty"` - VMName *string `json:"vmName,omitempty"` - OsType *string `json:"osType,omitempty"` - VHDID *string `json:"vHDId,omitempty"` - StorageAccountID *string `json:"storageAccountId,omitempty"` - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + InstanceType InstanceTypeReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` + HvHostVMID *string `json:"hvHostVmId,omitempty"` + VMName *string `json:"vmName,omitempty"` + OsType *string `json:"osType,omitempty"` + VHDID *string `json:"vHDId,omitempty"` + StorageAccountID *string `json:"storageAccountId,omitempty"` + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) MarshalJSON() ([]byte, error) { + hvrari.InstanceType = InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzureReprotectInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrari), + }) +} + +// AsHyperVReplicaAzureReprotectInput is the ReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return &hvrari, true +} + +// AsInMageAzureV2ReprotectInput is the ReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return nil, false +} + +// AsInMageReprotectInput is the ReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return nil, false +} + +// AsA2AReprotectInput is the ReverseReplicationProviderSpecificInput implementation for HyperVReplicaAzureReprotectInput. +func (hvrari HyperVReplicaAzureReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return nil, false } // HyperVReplicaAzureUpdateReplicationProtectedItemInput is hyperV replica Azure input to update replication protected // item. type HyperVReplicaAzureUpdateReplicationProtectedItemInput struct { - RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` - RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` + RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + hvraurpii.InstanceType = InstanceTypeHyperVReplicaAzure + type Alias HyperVReplicaAzureUpdateReplicationProtectedItemInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvraurpii), + }) +} + +// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { + return &hvraurpii, true +} + +// AsInMageAzureV2UpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsA2AUpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for HyperVReplicaAzureUpdateReplicationProtectedItemInput. +func (hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { + return nil, false } // HyperVReplicaBaseEventDetails is abstract model class for event details of a HyperVReplica E2E event. type HyperVReplicaBaseEventDetails struct { - ContainerName *string `json:"containerName,omitempty"` - FabricName *string `json:"fabricName,omitempty"` - RemoteContainerName *string `json:"remoteContainerName,omitempty"` - RemoteFabricName *string `json:"remoteFabricName,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + ContainerName *string `json:"containerName,omitempty"` + FabricName *string `json:"fabricName,omitempty"` + RemoteContainerName *string `json:"remoteContainerName,omitempty"` + RemoteFabricName *string `json:"remoteFabricName,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) MarshalJSON() ([]byte, error) { + hvrbed.InstanceType = InstanceTypeHyperVReplicaBaseEventDetails + type Alias HyperVReplicaBaseEventDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrbed), + }) +} + +// AsHyperVReplicaBaseEventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return &hvrbed, true +} + +// AsHyperVReplica2012EventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsA2AEventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the EventProviderSpecificDetails implementation for HyperVReplicaBaseEventDetails. +func (hvrbed HyperVReplicaBaseEventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return nil, false } // HyperVReplicaBasePolicyDetails is base class for HyperVReplica policy details. type HyperVReplicaBasePolicyDetails struct { - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - ReplicationPort *int32 `json:"replicationPort,omitempty"` - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + Compression *string `json:"compression,omitempty"` + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + ReplicationPort *int32 `json:"replicationPort,omitempty"` + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) MarshalJSON() ([]byte, error) { + hvrbpd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails + type Alias HyperVReplicaBasePolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrbpd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return &hvrbpd, true +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBasePolicyDetails. +func (hvrbpd HyperVReplicaBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // HyperVReplicaBaseReplicationDetails is hyper V replica provider specific settings base class. type HyperVReplicaBaseReplicationDetails struct { - LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - VMID *string `json:"vmId,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` + InstanceType InstanceTypeReplicationProviderSpecificSettings `json:"instanceType,omitempty"` + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + VMID *string `json:"vmId,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) MarshalJSON() ([]byte, error) { + hvrbrd.InstanceType = InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails + type Alias HyperVReplicaBaseReplicationDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrbrd), + }) +} + +// AsHyperVReplicaBaseReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return &hvrbrd, true +} + +// AsHyperVReplicaReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsA2AReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBaseReplicationDetails. +func (hvrbrd HyperVReplicaBaseReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false } // HyperVReplicaBluePolicyDetails is hyper-V Replica Blue specific protection profile details. type HyperVReplicaBluePolicyDetails struct { - ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - ReplicationPort *int32 `json:"replicationPort,omitempty"` - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + Compression *string `json:"compression,omitempty"` + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + ReplicationPort *int32 `json:"replicationPort,omitempty"` + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) MarshalJSON() ([]byte, error) { + hvrbpd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2 + type Alias HyperVReplicaBluePolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrbpd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return &hvrbpd, true +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaBluePolicyDetails. +func (hvrbpd HyperVReplicaBluePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // HyperVReplicaBluePolicyInput is hyperV Replica Blue policy input. type HyperVReplicaBluePolicyInput struct { - ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - ReplicationPort *int32 `json:"replicationPort,omitempty"` - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificInput `json:"instanceType,omitempty"` + ReplicationFrequencyInSeconds *int32 `json:"replicationFrequencyInSeconds,omitempty"` + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + Compression *string `json:"compression,omitempty"` + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + ReplicationPort *int32 `json:"replicationPort,omitempty"` + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + ReplicaDeletion *string `json:"replicaDeletion,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) MarshalJSON() ([]byte, error) { + hvrbpi.InstanceType = InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2 + type Alias HyperVReplicaBluePolicyInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrbpi), + }) +} + +// AsHyperVReplicaAzurePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return &hvrbpi, true +} + +// AsInMageAzureV2PolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsA2APolicyCreationInput is the PolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the PolicyProviderSpecificInput implementation for HyperVReplicaBluePolicyInput. +func (hvrbpi HyperVReplicaBluePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false } // HyperVReplicaBlueReplicationDetails is hyperV replica 2012 R2 (Blue) replication details. type HyperVReplicaBlueReplicationDetails struct { - LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - VMID *string `json:"vmId,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` + InstanceType InstanceTypeReplicationProviderSpecificSettings `json:"instanceType,omitempty"` + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + VMID *string `json:"vmId,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) MarshalJSON() ([]byte, error) { + hvrbrd.InstanceType = InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2 + type Alias HyperVReplicaBlueReplicationDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrbrd), + }) +} + +// AsHyperVReplicaBaseReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return &hvrbrd, true +} + +// AsHyperVReplicaAzureReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsA2AReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaBlueReplicationDetails. +func (hvrbrd HyperVReplicaBlueReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false } // HyperVReplicaPolicyDetails is hyper-V Replica Blue specific protection profile details. type HyperVReplicaPolicyDetails struct { - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - ReplicationPort *int32 `json:"replicationPort,omitempty"` - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + Compression *string `json:"compression,omitempty"` + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + ReplicationPort *int32 `json:"replicationPort,omitempty"` + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + ReplicaDeletionOption *string `json:"replicaDeletionOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) MarshalJSON() ([]byte, error) { + hvrpd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012 + type Alias HyperVReplicaPolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrpd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return &hvrpd, true +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for HyperVReplicaPolicyDetails. +func (hvrpd HyperVReplicaPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // HyperVReplicaPolicyInput is hyper-V Replica specific protection profile Input. type HyperVReplicaPolicyInput struct { - RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` - ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` - Compression *string `json:"compression,omitempty"` - InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` - OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` - OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` - OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` - ReplicationPort *int32 `json:"replicationPort,omitempty"` - AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` - ReplicaDeletion *string `json:"replicaDeletion,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificInput `json:"instanceType,omitempty"` + RecoveryPoints *int32 `json:"recoveryPoints,omitempty"` + ApplicationConsistentSnapshotFrequencyInHours *int32 `json:"applicationConsistentSnapshotFrequencyInHours,omitempty"` + Compression *string `json:"compression,omitempty"` + InitialReplicationMethod *string `json:"initialReplicationMethod,omitempty"` + OnlineReplicationStartTime *string `json:"onlineReplicationStartTime,omitempty"` + OfflineReplicationImportPath *string `json:"offlineReplicationImportPath,omitempty"` + OfflineReplicationExportPath *string `json:"offlineReplicationExportPath,omitempty"` + ReplicationPort *int32 `json:"replicationPort,omitempty"` + AllowedAuthenticationType *int32 `json:"allowedAuthenticationType,omitempty"` + ReplicaDeletion *string `json:"replicaDeletion,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) MarshalJSON() ([]byte, error) { + hvrpi.InstanceType = InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012 + type Alias HyperVReplicaPolicyInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrpi), + }) +} + +// AsHyperVReplicaAzurePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return &hvrpi, true +} + +// AsHyperVReplicaBluePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the PolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsA2APolicyCreationInput is the PolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the PolicyProviderSpecificInput implementation for HyperVReplicaPolicyInput. +func (hvrpi HyperVReplicaPolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false } // HyperVReplicaReplicationDetails is hyperV replica 2012 replication details. type HyperVReplicaReplicationDetails struct { - LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - VMID *string `json:"vmId,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` - VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` + InstanceType InstanceTypeReplicationProviderSpecificSettings `json:"instanceType,omitempty"` + LastReplicatedTime *date.Time `json:"lastReplicatedTime,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + VMID *string `json:"vmId,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + InitialReplicationDetails *InitialReplicationDetails `json:"initialReplicationDetails,omitempty"` + VMDiskDetails *[]DiskDetails `json:"vMDiskDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) MarshalJSON() ([]byte, error) { + hvrrd.InstanceType = InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012 + type Alias HyperVReplicaReplicationDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvrrd), + }) +} + +// AsHyperVReplicaBaseReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return &hvrrd, true +} + +// AsHyperVReplicaBlueReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsA2AReplicationDetails is the ReplicationProviderSpecificSettings implementation for HyperVReplicaReplicationDetails. +func (hvrrd HyperVReplicaReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false } // HyperVSiteDetails is hyperVSite fabric specific details. type HyperVSiteDetails struct { + InstanceType InstanceTypeFabricSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) MarshalJSON() ([]byte, error) { + hvsd.InstanceType = InstanceTypeHyperVSite + type Alias HyperVSiteDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvsd), + }) +} + +// AsAzureFabricSpecificDetails is the FabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsVmmDetails is the FabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the FabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return &hvsd, true +} + +// AsVMwareDetails is the FabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the FabricSpecificDetails implementation for HyperVSiteDetails. +func (hvsd HyperVSiteDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false } // HyperVVirtualMachineDetails is hyper V replica provider specific settings type HyperVVirtualMachineDetails struct { - SourceItemID *string `json:"sourceItemId,omitempty"` - Generation *string `json:"generation,omitempty"` - OsDetails *OSDetails `json:"osDetails,omitempty"` - DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` + InstanceType InstanceTypeConfigurationSettings `json:"instanceType,omitempty"` + SourceItemID *string `json:"sourceItemId,omitempty"` + Generation *string `json:"generation,omitempty"` + OsDetails *OSDetails `json:"osDetails,omitempty"` + DiskDetails *[]DiskDetails `json:"diskDetails,omitempty"` +} + +// MarshalJSON is the custom marshaler for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) MarshalJSON() ([]byte, error) { + hvvmd.InstanceType = InstanceTypeHyperVVirtualMachine + type Alias HyperVVirtualMachineDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(hvvmd), + }) +} + +// AsHyperVVirtualMachineDetails is the ConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return &hvvmd, true +} + +// AsVMwareVirtualMachineDetails is the ConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return nil, false +} + +// AsReplicationGroupDetails is the ConfigurationSettings implementation for HyperVVirtualMachineDetails. +func (hvvmd HyperVVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return nil, false +} + +// IdentityInformation is identity details. +type IdentityInformation struct { + IdentityProviderType IdentityProviderType `json:"identityProviderType,omitempty"` + TenantID *string `json:"tenantId,omitempty"` + ApplicationID *string `json:"applicationId,omitempty"` + ObjectID *string `json:"objectId,omitempty"` + Audience *string `json:"audience,omitempty"` + AadAuthority *string `json:"aadAuthority,omitempty"` + CertificateThumbprint *string `json:"certificateThumbprint,omitempty"` } // InconsistentVMDetails is this class stores the monitoring details for consistency check of inconsistent Protected @@ -1136,8 +4558,35 @@ type InitialReplicationDetails struct { // InlineWorkflowTaskDetails is this class represents the inline workflow task details. type InlineWorkflowTaskDetails struct { - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` - WorkflowIds *[]string `json:"workflowIds,omitempty"` + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType InstanceTypeGroupTaskDetails `json:"instanceType,omitempty"` + WorkflowIds *[]string `json:"workflowIds,omitempty"` +} + +// MarshalJSON is the custom marshaler for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) MarshalJSON() ([]byte, error) { + iwtd.InstanceType = InstanceTypeInlineWorkflowTaskDetails + type Alias InlineWorkflowTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(iwtd), + }) +} + +// AsInlineWorkflowTaskDetails is the GroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { + return &iwtd, true +} + +// AsRecoveryPlanGroupTaskDetails is the GroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanShutdownGroupTaskDetails is the GroupTaskDetails implementation for InlineWorkflowTaskDetails. +func (iwtd InlineWorkflowTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { + return nil, false } // InMageAgentDetails is the details of the InMage agent. @@ -1149,157 +4598,606 @@ type InMageAgentDetails struct { // InMageAzureV2ApplyRecoveryPointInput is applyRecoveryPoint input specific to InMageAzureV2 provider. type InMageAzureV2ApplyRecoveryPointInput struct { - VaultLocation *string `json:"vaultLocation,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + VaultLocation *string `json:"vaultLocation,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) MarshalJSON() ([]byte, error) { + imavarpi.InstanceType = InstanceTypeInMageAzureV2 + type Alias InMageAzureV2ApplyRecoveryPointInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavarpi), + }) +} + +// AsHyperVReplicaAzureApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsHyperVReplicaAzureApplyRecoveryPointInput() (*HyperVReplicaAzureApplyRecoveryPointInput, bool) { + return nil, false +} + +// AsInMageAzureV2ApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsInMageAzureV2ApplyRecoveryPointInput() (*InMageAzureV2ApplyRecoveryPointInput, bool) { + return &imavarpi, true +} + +// AsA2AApplyRecoveryPointInput is the ApplyRecoveryPointProviderSpecificInput implementation for InMageAzureV2ApplyRecoveryPointInput. +func (imavarpi InMageAzureV2ApplyRecoveryPointInput) AsA2AApplyRecoveryPointInput() (*A2AApplyRecoveryPointInput, bool) { + return nil, false } // InMageAzureV2EnableProtectionInput is vMware Azure specific enable protection input. type InMageAzureV2EnableProtectionInput struct { - MasterTargetID *string `json:"masterTargetId,omitempty"` - ProcessServerID *string `json:"processServerId,omitempty"` - StorageAccountID *string `json:"storageAccountId,omitempty"` - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - DisksToInclude *[]string `json:"disksToInclude,omitempty"` - TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` - TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` - EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` - TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` - TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` + InstanceType InstanceTypeEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` + MasterTargetID *string `json:"masterTargetId,omitempty"` + ProcessServerID *string `json:"processServerId,omitempty"` + StorageAccountID *string `json:"storageAccountId,omitempty"` + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + DisksToInclude *[]string `json:"disksToInclude,omitempty"` + TargetAzureNetworkID *string `json:"targetAzureNetworkId,omitempty"` + TargetAzureSubnetID *string `json:"targetAzureSubnetId,omitempty"` + EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` + TargetAzureVMName *string `json:"targetAzureVmName,omitempty"` + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + TargetAzureV1ResourceGroupID *string `json:"targetAzureV1ResourceGroupId,omitempty"` + TargetAzureV2ResourceGroupID *string `json:"targetAzureV2ResourceGroupId,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) MarshalJSON() ([]byte, error) { + imavepi.InstanceType = InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMageAzureV2 + type Alias InMageAzureV2EnableProtectionInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavepi), + }) +} + +// AsHyperVReplicaAzureEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return &imavepi, true +} + +// AsInMageEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsA2AEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageAzureV2EnableProtectionInput. +func (imavepi InMageAzureV2EnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false } // InMageAzureV2EventDetails is model class for event details of a VMwareAzureV2 event. type InMageAzureV2EventDetails struct { - EventType *string `json:"eventType,omitempty"` - Category *string `json:"category,omitempty"` - Component *string `json:"component,omitempty"` - CorrectiveAction *string `json:"correctiveAction,omitempty"` - Details *string `json:"details,omitempty"` - Summary *string `json:"summary,omitempty"` - SiteName *string `json:"siteName,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + EventType *string `json:"eventType,omitempty"` + Category *string `json:"category,omitempty"` + Component *string `json:"component,omitempty"` + CorrectiveAction *string `json:"correctiveAction,omitempty"` + Details *string `json:"details,omitempty"` + Summary *string `json:"summary,omitempty"` + SiteName *string `json:"siteName,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) MarshalJSON() ([]byte, error) { + imaved.InstanceType = InstanceTypeInMageAzureV2 + type Alias InMageAzureV2EventDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imaved), + }) +} + +// AsHyperVReplicaBaseEventDetails is the EventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplicaBaseEventDetails() (*HyperVReplicaBaseEventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012EventDetails is the EventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012EventDetails() (*HyperVReplica2012EventDetails, bool) { + return nil, false +} + +// AsHyperVReplica2012R2EventDetails is the EventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplica2012R2EventDetails() (*HyperVReplica2012R2EventDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureEventDetails is the EventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsHyperVReplicaAzureEventDetails() (*HyperVReplicaAzureEventDetails, bool) { + return nil, false +} + +// AsA2AEventDetails is the EventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsA2AEventDetails() (*A2AEventDetails, bool) { + return nil, false +} + +// AsInMageAzureV2EventDetails is the EventProviderSpecificDetails implementation for InMageAzureV2EventDetails. +func (imaved InMageAzureV2EventDetails) AsInMageAzureV2EventDetails() (*InMageAzureV2EventDetails, bool) { + return &imaved, true } // InMageAzureV2FailoverProviderInput is inMageAzureV2 provider specific input for failover. type InMageAzureV2FailoverProviderInput struct { - VaultLocation *string `json:"vaultLocation,omitempty"` - RecoveryPointID *string `json:"recoveryPointId,omitempty"` + InstanceType InstanceTypeProviderSpecificFailoverInput `json:"instanceType,omitempty"` + VaultLocation *string `json:"vaultLocation,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) MarshalJSON() ([]byte, error) { + imavfpi.InstanceType = InstanceTypeProviderSpecificFailoverInputInstanceTypeInMageAzureV2 + type Alias InMageAzureV2FailoverProviderInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavfpi), + }) +} + +// AsHyperVReplicaAzureFailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the ProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return &imavfpi, true +} + +// AsInMageFailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return nil, false +} + +// AsA2AFailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageAzureV2FailoverProviderInput. +func (imavfpi InMageAzureV2FailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false } // InMageAzureV2PolicyDetails is inMage Azure v2 specific protection profile details. type InMageAzureV2PolicyDetails struct { - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) MarshalJSON() ([]byte, error) { + imavpd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageAzureV2 + type Alias InMageAzureV2PolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavpd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return &imavpd, true +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for InMageAzureV2PolicyDetails. +func (imavpd InMageAzureV2PolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // InMageAzureV2PolicyInput is vMWare Azure specific protection profile Input. type InMageAzureV2PolicyInput struct { - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificInput `json:"instanceType,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) MarshalJSON() ([]byte, error) { + imavpi.InstanceType = InstanceTypePolicyProviderSpecificInputInstanceTypeInMageAzureV2 + type Alias InMageAzureV2PolicyInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavpi), + }) +} + +// AsHyperVReplicaAzurePolicyInput is the PolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the PolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the PolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the PolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return &imavpi, true +} + +// AsInMagePolicyInput is the PolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsA2APolicyCreationInput is the PolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the PolicyProviderSpecificInput implementation for InMageAzureV2PolicyInput. +func (imavpi InMageAzureV2PolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false } // InMageAzureV2ProtectedDiskDetails is inMageAzureV2 protected disk details. type InMageAzureV2ProtectedDiskDetails struct { - DiskID *string `json:"diskId,omitempty"` - DiskName *string `json:"diskName,omitempty"` - ProtectionStage *string `json:"protectionStage,omitempty"` - HealthErrorCode *string `json:"healthErrorCode,omitempty"` - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - ResyncRequired *string `json:"resyncRequired,omitempty"` - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` - ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` - DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` - FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` - SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"` - PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"` - TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"` - DiskResized *string `json:"diskResized,omitempty"` + DiskID *string `json:"diskId,omitempty"` + DiskName *string `json:"diskName,omitempty"` + ProtectionStage *string `json:"protectionStage,omitempty"` + HealthErrorCode *string `json:"healthErrorCode,omitempty"` + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + ResyncRequired *string `json:"resyncRequired,omitempty"` + ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` + ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` + SourceDataInMegaBytes *float64 `json:"sourceDataInMegaBytes,omitempty"` + PsDataInMegaBytes *float64 `json:"psDataInMegaBytes,omitempty"` + TargetDataInMegaBytes *float64 `json:"targetDataInMegaBytes,omitempty"` + DiskResized *string `json:"diskResized,omitempty"` + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` +} + +// InMageAzureV2RecoveryPointDetails is inMage Azure V2 provider specific recovery point details. +type InMageAzureV2RecoveryPointDetails struct { + Type *string `json:"Type,omitempty"` + InstanceType *string `json:"instanceType,omitempty"` + IsMultiVMSyncPoint *string `json:"isMultiVmSyncPoint,omitempty"` } // InMageAzureV2ReplicationDetails is inMageAzureV2 provider specific settings type InMageAzureV2ReplicationDetails struct { - InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` - VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` - ProtectionStage *string `json:"protectionStage,omitempty"` - VMID *string `json:"vmId,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` - UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - AgentVersion *string `json:"agentVersion,omitempty"` - IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` - IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` - LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` - ProcessServerID *string `json:"processServerId,omitempty"` - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` - DiskResized *string `json:"diskResized,omitempty"` - MasterTargetID *string `json:"masterTargetId,omitempty"` - SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` - SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` - OsType *string `json:"osType,omitempty"` - VhdName *string `json:"vhdName,omitempty"` - OsDiskID *string `json:"osDiskId,omitempty"` - AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` - RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - DiscoveryType *string `json:"discoveryType,omitempty"` - EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` - Datastores *[]string `json:"datastores,omitempty"` - TargetVMID *string `json:"targetVmId,omitempty"` - RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` - LicenseType *string `json:"licenseType,omitempty"` - ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + InstanceType InstanceTypeReplicationProviderSpecificSettings `json:"instanceType,omitempty"` + InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` + VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` + ProtectionStage *string `json:"protectionStage,omitempty"` + VMID *string `json:"vmId,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` + UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + AgentVersion *string `json:"agentVersion,omitempty"` + IsAgentUpdateRequired *string `json:"isAgentUpdateRequired,omitempty"` + IsRebootAfterUpdateRequired *string `json:"isRebootAfterUpdateRequired,omitempty"` + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + ProcessServerID *string `json:"processServerId,omitempty"` + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + ProtectedDisks *[]InMageAzureV2ProtectedDiskDetails `json:"protectedDisks,omitempty"` + DiskResized *string `json:"diskResized,omitempty"` + MasterTargetID *string `json:"masterTargetId,omitempty"` + SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` + SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` + OsType *string `json:"osType,omitempty"` + VhdName *string `json:"vhdName,omitempty"` + OsDiskID *string `json:"osDiskId,omitempty"` + AzureVMDiskDetails *[]AzureVMDiskDetails `json:"azureVMDiskDetails,omitempty"` + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + RecoveryAzureStorageAccount *string `json:"recoveryAzureStorageAccount,omitempty"` + RecoveryAzureLogStorageAccountID *string `json:"recoveryAzureLogStorageAccountId,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + DiscoveryType *string `json:"discoveryType,omitempty"` + EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` + Datastores *[]string `json:"datastores,omitempty"` + TargetVMID *string `json:"targetVmId,omitempty"` + RecoveryAzureResourceGroupID *string `json:"recoveryAzureResourceGroupId,omitempty"` + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` + LicenseType *string `json:"licenseType,omitempty"` + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` + LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` + ReplicaID *string `json:"replicaId,omitempty"` + OsVersion *string `json:"osVersion,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) MarshalJSON() ([]byte, error) { + imavrd.InstanceType = InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2 + type Alias InMageAzureV2ReplicationDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavrd), + }) +} + +// AsHyperVReplicaBaseReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return &imavrd, true +} + +// AsInMageReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return nil, false +} + +// AsA2AReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageAzureV2ReplicationDetails. +func (imavrd InMageAzureV2ReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false } // InMageAzureV2ReprotectInput is inMageAzureV2 specific provider input. type InMageAzureV2ReprotectInput struct { - MasterTargetID *string `json:"masterTargetId,omitempty"` - ProcessServerID *string `json:"processServerId,omitempty"` - StorageAccountID *string `json:"storageAccountId,omitempty"` - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - PolicyID *string `json:"policyId,omitempty"` - LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` - DisksToInclude *[]string `json:"disksToInclude,omitempty"` + InstanceType InstanceTypeReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` + MasterTargetID *string `json:"masterTargetId,omitempty"` + ProcessServerID *string `json:"processServerId,omitempty"` + StorageAccountID *string `json:"storageAccountId,omitempty"` + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + PolicyID *string `json:"policyId,omitempty"` + LogStorageAccountID *string `json:"logStorageAccountId,omitempty"` + DisksToInclude *[]string `json:"disksToInclude,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) MarshalJSON() ([]byte, error) { + imavri.InstanceType = InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2 + type Alias InMageAzureV2ReprotectInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavri), + }) +} + +// AsHyperVReplicaAzureReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return nil, false +} + +// AsInMageAzureV2ReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return &imavri, true +} + +// AsInMageReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return nil, false +} + +// AsA2AReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageAzureV2ReprotectInput. +func (imavri InMageAzureV2ReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return nil, false } // InMageAzureV2UpdateReplicationProtectedItemInput is inMage Azure V2 input to update replication protected item. type InMageAzureV2UpdateReplicationProtectedItemInput struct { - RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` - RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` - UseManagedDisks *string `json:"useManagedDisks,omitempty"` + InstanceType InstanceType `json:"instanceType,omitempty"` + RecoveryAzureV1ResourceGroupID *string `json:"recoveryAzureV1ResourceGroupId,omitempty"` + RecoveryAzureV2ResourceGroupID *string `json:"recoveryAzureV2ResourceGroupId,omitempty"` + UseManagedDisks *string `json:"useManagedDisks,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) MarshalJSON() ([]byte, error) { + imavurpii.InstanceType = InstanceTypeInMageAzureV2 + type Alias InMageAzureV2UpdateReplicationProtectedItemInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imavurpii), + }) +} + +// AsHyperVReplicaAzureUpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) { + return nil, false +} + +// AsInMageAzureV2UpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) { + return &imavurpii, true +} + +// AsA2AUpdateReplicationProtectedItemInput is the UpdateReplicationProtectedItemProviderInput implementation for InMageAzureV2UpdateReplicationProtectedItemInput. +func (imavurpii InMageAzureV2UpdateReplicationProtectedItemInput) AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) { + return nil, false } // InMageBasePolicyDetails is base class for the policies of providers using InMage replication. type InMageBasePolicyDetails struct { - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) MarshalJSON() ([]byte, error) { + imbpd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails + type Alias InMageBasePolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imbpd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return &imbpd, true +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for InMageBasePolicyDetails. +func (imbpd InMageBasePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // InMageDisableProtectionProviderSpecificInput is inMage disable protection provider specific input. type InMageDisableProtectionProviderSpecificInput struct { - ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` + InstanceType InstanceTypeDisableProtectionProviderSpecificInput `json:"instanceType,omitempty"` + ReplicaVMDeletionStatus *string `json:"replicaVmDeletionStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageDisableProtectionProviderSpecificInput. +func (imdppsi InMageDisableProtectionProviderSpecificInput) MarshalJSON() ([]byte, error) { + imdppsi.InstanceType = InstanceTypeInMage + type Alias InMageDisableProtectionProviderSpecificInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imdppsi), + }) +} + +// AsInMageDisableProtectionProviderSpecificInput is the DisableProtectionProviderSpecificInput implementation for InMageDisableProtectionProviderSpecificInput. +func (imdppsi InMageDisableProtectionProviderSpecificInput) AsInMageDisableProtectionProviderSpecificInput() (*InMageDisableProtectionProviderSpecificInput, bool) { + return &imdppsi, true } // InMageDiskDetails is vMware/Physical specific Disk Details @@ -1326,105 +5224,372 @@ type InMageDiskSignatureExclusionOptions struct { // InMageEnableProtectionInput is vMware Azure specific enable protection input. type InMageEnableProtectionInput struct { - VMFriendlyName *string `json:"vmFriendlyName,omitempty"` - MasterTargetID *string `json:"masterTargetId,omitempty"` - ProcessServerID *string `json:"processServerId,omitempty"` - RetentionDrive *string `json:"retentionDrive,omitempty"` - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - DatastoreName *string `json:"datastoreName,omitempty"` - DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` - DisksToInclude *[]string `json:"disksToInclude,omitempty"` + InstanceType InstanceTypeEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` + VMFriendlyName *string `json:"vmFriendlyName,omitempty"` + MasterTargetID *string `json:"masterTargetId,omitempty"` + ProcessServerID *string `json:"processServerId,omitempty"` + RetentionDrive *string `json:"retentionDrive,omitempty"` + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + DatastoreName *string `json:"datastoreName,omitempty"` + DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` + DisksToInclude *[]string `json:"disksToInclude,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) MarshalJSON() ([]byte, error) { + imepi.InstanceType = InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeInMage + type Alias InMageEnableProtectionInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imepi), + }) +} + +// AsHyperVReplicaAzureEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return nil, false +} + +// AsInMageAzureV2EnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return &imepi, true +} + +// AsA2AEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for InMageEnableProtectionInput. +func (imepi InMageEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false } // InMageFailoverProviderInput is provider specific input for InMage failover. type InMageFailoverProviderInput struct { - RecoveryPointType *string `json:"recoveryPointType,omitempty"` - RecoveryPointID *string `json:"recoveryPointId,omitempty"` + InstanceType InstanceTypeProviderSpecificFailoverInput `json:"instanceType,omitempty"` + RecoveryPointType RecoveryPointType `json:"recoveryPointType,omitempty"` + RecoveryPointID *string `json:"recoveryPointId,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) MarshalJSON() ([]byte, error) { + imfpi.InstanceType = InstanceTypeProviderSpecificFailoverInputInstanceTypeInMage + type Alias InMageFailoverProviderInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imfpi), + }) +} + +// AsHyperVReplicaAzureFailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) { + return nil, false +} + +// AsHyperVReplicaAzureFailbackProviderInput is the ProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) { + return nil, false +} + +// AsInMageAzureV2FailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) { + return nil, false +} + +// AsInMageFailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) { + return &imfpi, true +} + +// AsA2AFailoverProviderInput is the ProviderSpecificFailoverInput implementation for InMageFailoverProviderInput. +func (imfpi InMageFailoverProviderInput) AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) { + return nil, false } // InMagePolicyDetails is inMage specific protection profile details. type InMagePolicyDetails struct { - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMagePolicyDetails. +func (impd InMagePolicyDetails) MarshalJSON() ([]byte, error) { + impd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMage + type Alias InMagePolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(impd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return &impd, true +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for InMagePolicyDetails. +func (impd InMagePolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // InMagePolicyInput is vMWare Azure specific protection profile Input. type InMagePolicyInput struct { - RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` - RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` - AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` - MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + InstanceType InstanceTypePolicyProviderSpecificInput `json:"instanceType,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus SetMultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMagePolicyInput. +func (impi InMagePolicyInput) MarshalJSON() ([]byte, error) { + impi.InstanceType = InstanceTypePolicyProviderSpecificInputInstanceTypeInMage + type Alias InMagePolicyInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(impi), + }) +} + +// AsHyperVReplicaAzurePolicyInput is the PolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the PolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the PolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the PolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the PolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return &impi, true +} + +// AsA2APolicyCreationInput is the PolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the PolicyProviderSpecificInput implementation for InMagePolicyInput. +func (impi InMagePolicyInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return nil, false } // InMageProtectedDiskDetails is inMage protected disk details. type InMageProtectedDiskDetails struct { - DiskID *string `json:"diskId,omitempty"` - DiskName *string `json:"diskName,omitempty"` - ProtectionStage *string `json:"protectionStage,omitempty"` - HealthErrorCode *string `json:"healthErrorCode,omitempty"` - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - ResyncRequired *string `json:"resyncRequired,omitempty"` - ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` - ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` - DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` - FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` - SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"` - PsDataInMB *float64 `json:"psDataInMB,omitempty"` - TargetDataInMB *float64 `json:"targetDataInMB,omitempty"` - DiskResized *string `json:"diskResized,omitempty"` + DiskID *string `json:"diskId,omitempty"` + DiskName *string `json:"diskName,omitempty"` + ProtectionStage *string `json:"protectionStage,omitempty"` + HealthErrorCode *string `json:"healthErrorCode,omitempty"` + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + ResyncRequired *string `json:"resyncRequired,omitempty"` + ResyncProgressPercentage *int32 `json:"resyncProgressPercentage,omitempty"` + ResyncDurationInSeconds *int64 `json:"resyncDurationInSeconds,omitempty"` + DiskCapacityInBytes *int64 `json:"diskCapacityInBytes,omitempty"` + FileSystemCapacityInBytes *int64 `json:"fileSystemCapacityInBytes,omitempty"` + SourceDataInMB *float64 `json:"sourceDataInMB,omitempty"` + PsDataInMB *float64 `json:"psDataInMB,omitempty"` + TargetDataInMB *float64 `json:"targetDataInMB,omitempty"` + DiskResized *string `json:"diskResized,omitempty"` + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` } // InMageReplicationDetails is inMage provider specific settings type InMageReplicationDetails struct { - ActiveSiteType *string `json:"activeSiteType,omitempty"` - SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` - SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` - OsDetails *OSDiskDetails `json:"osDetails,omitempty"` - ProtectionStage *string `json:"protectionStage,omitempty"` - VMID *string `json:"vmId,omitempty"` - VMProtectionState *string `json:"vmProtectionState,omitempty"` - VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` - ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"` - RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"` - RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"` - CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` - UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` - RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` - ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` - ProcessServerID *string `json:"processServerId,omitempty"` - MasterTargetID *string `json:"masterTargetId,omitempty"` - ConsistencyPoints *map[string]*date.Time `json:"consistencyPoints,omitempty"` - DiskResized *string `json:"diskResized,omitempty"` - RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"` - MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` - MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` - MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` - AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"` - VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` - InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` - VMNics *[]VMNicDetails `json:"vmNics,omitempty"` - DiscoveryType *string `json:"discoveryType,omitempty"` - AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"` - Datastores *[]string `json:"datastores,omitempty"` - ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + InstanceType InstanceTypeReplicationProviderSpecificSettings `json:"instanceType,omitempty"` + ActiveSiteType *string `json:"activeSiteType,omitempty"` + SourceVMCPUCount *int32 `json:"sourceVmCPUCount,omitempty"` + SourceVMRAMSizeInMB *int32 `json:"sourceVmRAMSizeInMB,omitempty"` + OsDetails *OSDiskDetails `json:"osDetails,omitempty"` + ProtectionStage *string `json:"protectionStage,omitempty"` + VMID *string `json:"vmId,omitempty"` + VMProtectionState *string `json:"vmProtectionState,omitempty"` + VMProtectionStateDescription *string `json:"vmProtectionStateDescription,omitempty"` + ResyncDetails *InitialReplicationDetails `json:"resyncDetails,omitempty"` + RetentionWindowStart *date.Time `json:"retentionWindowStart,omitempty"` + RetentionWindowEnd *date.Time `json:"retentionWindowEnd,omitempty"` + CompressedDataRateInMB *float64 `json:"compressedDataRateInMB,omitempty"` + UncompressedDataRateInMB *float64 `json:"uncompressedDataRateInMB,omitempty"` + RpoInSeconds *int64 `json:"rpoInSeconds,omitempty"` + ProtectedDisks *[]InMageProtectedDiskDetails `json:"protectedDisks,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + ProcessServerID *string `json:"processServerId,omitempty"` + MasterTargetID *string `json:"masterTargetId,omitempty"` + ConsistencyPoints *map[string]*date.Time `json:"consistencyPoints,omitempty"` + DiskResized *string `json:"diskResized,omitempty"` + RebootAfterUpdateStatus *string `json:"rebootAfterUpdateStatus,omitempty"` + MultiVMGroupID *string `json:"multiVmGroupId,omitempty"` + MultiVMGroupName *string `json:"multiVmGroupName,omitempty"` + MultiVMSyncStatus *string `json:"multiVmSyncStatus,omitempty"` + AgentDetails *InMageAgentDetails `json:"agentDetails,omitempty"` + VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` + InfrastructureVMID *string `json:"infrastructureVmId,omitempty"` + VMNics *[]VMNicDetails `json:"vmNics,omitempty"` + DiscoveryType *string `json:"discoveryType,omitempty"` + AzureStorageAccountID *string `json:"azureStorageAccountId,omitempty"` + Datastores *[]string `json:"datastores,omitempty"` + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + LastRpoCalculatedTime *date.Time `json:"lastRpoCalculatedTime,omitempty"` + LastUpdateReceivedTime *date.Time `json:"lastUpdateReceivedTime,omitempty"` + ReplicaID *string `json:"replicaId,omitempty"` + OsVersion *string `json:"osVersion,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageReplicationDetails. +func (imrd InMageReplicationDetails) MarshalJSON() ([]byte, error) { + imrd.InstanceType = InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMage + type Alias InMageReplicationDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imrd), + }) +} + +// AsHyperVReplicaBaseReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBlueReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) { + return nil, false +} + +// AsHyperVReplicaAzureReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) { + return nil, false +} + +// AsInMageAzureV2ReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) { + return nil, false +} + +// AsInMageReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsInMageReplicationDetails() (*InMageReplicationDetails, bool) { + return &imrd, true +} + +// AsA2AReplicationDetails is the ReplicationProviderSpecificSettings implementation for InMageReplicationDetails. +func (imrd InMageReplicationDetails) AsA2AReplicationDetails() (*A2AReplicationDetails, bool) { + return nil, false } // InMageReprotectInput is inMageAzureV2 specific provider input. type InMageReprotectInput struct { - MasterTargetID *string `json:"masterTargetId,omitempty"` - ProcessServerID *string `json:"processServerId,omitempty"` - RetentionDrive *string `json:"retentionDrive,omitempty"` - RunAsAccountID *string `json:"runAsAccountId,omitempty"` - DatastoreName *string `json:"datastoreName,omitempty"` - DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` - ProfileID *string `json:"profileId,omitempty"` - DisksToInclude *[]string `json:"disksToInclude,omitempty"` + InstanceType InstanceTypeReverseReplicationProviderSpecificInput `json:"instanceType,omitempty"` + MasterTargetID *string `json:"masterTargetId,omitempty"` + ProcessServerID *string `json:"processServerId,omitempty"` + RetentionDrive *string `json:"retentionDrive,omitempty"` + RunAsAccountID *string `json:"runAsAccountId,omitempty"` + DatastoreName *string `json:"datastoreName,omitempty"` + DiskExclusionInput *InMageDiskExclusionInput `json:"diskExclusionInput,omitempty"` + ProfileID *string `json:"profileId,omitempty"` + DisksToInclude *[]string `json:"disksToInclude,omitempty"` +} + +// MarshalJSON is the custom marshaler for InMageReprotectInput. +func (imri InMageReprotectInput) MarshalJSON() ([]byte, error) { + imri.InstanceType = InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMage + type Alias InMageReprotectInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(imri), + }) +} + +// AsHyperVReplicaAzureReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) { + return nil, false +} + +// AsInMageAzureV2ReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) { + return nil, false +} + +// AsInMageReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsInMageReprotectInput() (*InMageReprotectInput, bool) { + return &imri, true +} + +// AsA2AReprotectInput is the ReverseReplicationProviderSpecificInput implementation for InMageReprotectInput. +func (imri InMageReprotectInput) AsA2AReprotectInput() (*A2AReprotectInput, bool) { + return nil, false } // InMageVolumeExclusionOptions is guest disk signature based disk exclusion option when doing enable protection of @@ -1476,8 +5641,63 @@ func (client JobCollection) JobCollectionPreparer() (*http.Request, error) { } // JobDetails is job details based on specific job type. -type JobDetails struct { - AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` +type JobDetails interface { + AsAsrJobDetails() (*AsrJobDetails, bool) + AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) + AsFailoverJobDetails() (*FailoverJobDetails, bool) + AsExportJobDetails() (*ExportJobDetails, bool) + AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) +} + +func unmarshalJobDetails(body []byte) (JobDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeAsrJobDetails): + var ajd AsrJobDetails + err := json.Unmarshal(body, &ajd) + return ajd, err + case string(InstanceTypeTestFailoverJobDetails): + var tfjd TestFailoverJobDetails + err := json.Unmarshal(body, &tfjd) + return tfjd, err + case string(InstanceTypeFailoverJobDetails): + var fjd FailoverJobDetails + err := json.Unmarshal(body, &fjd) + return fjd, err + case string(InstanceTypeExportJobDetails): + var ejd ExportJobDetails + err := json.Unmarshal(body, &ejd) + return ejd, err + case string(InstanceTypeSwitchProtectionJobDetails): + var spjd SwitchProtectionJobDetails + err := json.Unmarshal(body, &spjd) + return spjd, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalJobDetailsArray(body []byte) ([]JobDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + jdArray := make([]JobDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + jd, err := unmarshalJobDetails(*rawMessage) + if err != nil { + return nil, err + } + jdArray[index] = jd + } + return jdArray, nil } // JobEntity is this class contains the minimal job details required to navigate to the desired drill down. @@ -1514,7 +5734,158 @@ type JobProperties struct { TargetObjectID *string `json:"targetObjectId,omitempty"` TargetObjectName *string `json:"targetObjectName,omitempty"` TargetInstanceType *string `json:"targetInstanceType,omitempty"` - CustomDetails *JobDetails `json:"customDetails,omitempty"` + CustomDetails JobDetails `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for JobProperties struct. +func (jp *JobProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["activityId"] + if v != nil { + var activityID string + err = json.Unmarshal(*m["activityId"], &activityID) + if err != nil { + return err + } + jp.ActivityID = &activityID + } + + v = m["scenarioName"] + if v != nil { + var scenarioName string + err = json.Unmarshal(*m["scenarioName"], &scenarioName) + if err != nil { + return err + } + jp.ScenarioName = &scenarioName + } + + v = m["friendlyName"] + if v != nil { + var friendlyName string + err = json.Unmarshal(*m["friendlyName"], &friendlyName) + if err != nil { + return err + } + jp.FriendlyName = &friendlyName + } + + v = m["state"] + if v != nil { + var state string + err = json.Unmarshal(*m["state"], &state) + if err != nil { + return err + } + jp.State = &state + } + + v = m["stateDescription"] + if v != nil { + var stateDescription string + err = json.Unmarshal(*m["stateDescription"], &stateDescription) + if err != nil { + return err + } + jp.StateDescription = &stateDescription + } + + v = m["tasks"] + if v != nil { + var tasks []ASRTask + err = json.Unmarshal(*m["tasks"], &tasks) + if err != nil { + return err + } + jp.Tasks = &tasks + } + + v = m["errors"] + if v != nil { + var errorsVar []JobErrorDetails + err = json.Unmarshal(*m["errors"], &errorsVar) + if err != nil { + return err + } + jp.Errors = &errorsVar + } + + v = m["startTime"] + if v != nil { + var startTime date.Time + err = json.Unmarshal(*m["startTime"], &startTime) + if err != nil { + return err + } + jp.StartTime = &startTime + } + + v = m["endTime"] + if v != nil { + var endTime date.Time + err = json.Unmarshal(*m["endTime"], &endTime) + if err != nil { + return err + } + jp.EndTime = &endTime + } + + v = m["allowedActions"] + if v != nil { + var allowedActions []string + err = json.Unmarshal(*m["allowedActions"], &allowedActions) + if err != nil { + return err + } + jp.AllowedActions = &allowedActions + } + + v = m["targetObjectId"] + if v != nil { + var targetObjectID string + err = json.Unmarshal(*m["targetObjectId"], &targetObjectID) + if err != nil { + return err + } + jp.TargetObjectID = &targetObjectID + } + + v = m["targetObjectName"] + if v != nil { + var targetObjectName string + err = json.Unmarshal(*m["targetObjectName"], &targetObjectName) + if err != nil { + return err + } + jp.TargetObjectName = &targetObjectName + } + + v = m["targetInstanceType"] + if v != nil { + var targetInstanceType string + err = json.Unmarshal(*m["targetInstanceType"], &targetInstanceType) + if err != nil { + return err + } + jp.TargetInstanceType = &targetInstanceType + } + + v = m["customDetails"] + if v != nil { + customDetails, err := unmarshalJobDetails(*m["customDetails"]) + if err != nil { + return err + } + jp.CustomDetails = customDetails + } + + return nil } // JobQueryParameter is query parameter to enumerate jobs. @@ -1528,16 +5899,85 @@ type JobQueryParameter struct { // JobStatusEventDetails is model class for event details of a job status event. type JobStatusEventDetails struct { - JobID *string `json:"jobId,omitempty"` - JobFriendlyName *string `json:"jobFriendlyName,omitempty"` - JobStatus *string `json:"jobStatus,omitempty"` - AffectedObjectType *string `json:"affectedObjectType,omitempty"` + InstanceType InstanceTypeEventSpecificDetails `json:"instanceType,omitempty"` + JobID *string `json:"jobId,omitempty"` + JobFriendlyName *string `json:"jobFriendlyName,omitempty"` + JobStatus *string `json:"jobStatus,omitempty"` + AffectedObjectType *string `json:"affectedObjectType,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobStatusEventDetails. +func (jsed JobStatusEventDetails) MarshalJSON() ([]byte, error) { + jsed.InstanceType = InstanceTypeJobStatus + type Alias JobStatusEventDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(jsed), + }) +} + +// AsJobStatusEventDetails is the EventSpecificDetails implementation for JobStatusEventDetails. +func (jsed JobStatusEventDetails) AsJobStatusEventDetails() (*JobStatusEventDetails, bool) { + return &jsed, true } // JobTaskDetails is this class represents a task which is actually a workflow so that one can navigate to its // individual drill down. type JobTaskDetails struct { - JobTask *JobEntity `json:"jobTask,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + JobTask *JobEntity `json:"jobTask,omitempty"` +} + +// MarshalJSON is the custom marshaler for JobTaskDetails. +func (jtd JobTaskDetails) MarshalJSON() ([]byte, error) { + jtd.InstanceType = InstanceTypeJobTaskDetails + type Alias JobTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(jtd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return &jtd, true +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for JobTaskDetails. +func (jtd JobTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false } // LogicalNetwork is logical network data model. @@ -1579,9 +6019,61 @@ type LogicalNetworkProperties struct { // ManualActionTaskDetails is this class represents the manual action task details. type ManualActionTaskDetails struct { - Name *string `json:"name,omitempty"` - Instructions *string `json:"instructions,omitempty"` - Observation *string `json:"observation,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + Name *string `json:"name,omitempty"` + Instructions *string `json:"instructions,omitempty"` + Observation *string `json:"observation,omitempty"` +} + +// MarshalJSON is the custom marshaler for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) MarshalJSON() ([]byte, error) { + matd.InstanceType = InstanceTypeManualActionTaskDetails + type Alias ManualActionTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(matd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return &matd, true +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for ManualActionTaskDetails. +func (matd ManualActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false } // MasterTargetServer is details of a Master Target Server. @@ -1596,6 +6088,8 @@ type MasterTargetServer struct { RetentionVolumes *[]RetentionVolume `json:"retentionVolumes,omitempty"` DataStores *[]DataStore `json:"dataStores,omitempty"` ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + DiskCount *int32 `json:"diskCount,omitempty"` + OsVersion *string `json:"osVersion,omitempty"` } // MethodCallStatus is reports method status where exception was raised. @@ -1678,20 +6172,167 @@ func (client NetworkMappingCollection) NetworkMappingCollectionPreparer() (*http } // NetworkMappingFabricSpecificSettings is network Mapping fabric specific settings. -type NetworkMappingFabricSpecificSettings struct { +type NetworkMappingFabricSpecificSettings interface { + AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) + AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) + AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) +} + +func unmarshalNetworkMappingFabricSpecificSettings(body []byte) (NetworkMappingFabricSpecificSettings, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeAzureToAzure): + var atanms AzureToAzureNetworkMappingSettings + err := json.Unmarshal(body, &atanms) + return atanms, err + case string(InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure): + var vtanms VmmToAzureNetworkMappingSettings + err := json.Unmarshal(body, &vtanms) + return vtanms, err + case string(InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm): + var vtvnms VmmToVmmNetworkMappingSettings + err := json.Unmarshal(body, &vtvnms) + return vtvnms, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalNetworkMappingFabricSpecificSettingsArray(body []byte) ([]NetworkMappingFabricSpecificSettings, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + nmfssArray := make([]NetworkMappingFabricSpecificSettings, len(rawMessages)) + + for index, rawMessage := range rawMessages { + nmfss, err := unmarshalNetworkMappingFabricSpecificSettings(*rawMessage) + if err != nil { + return nil, err + } + nmfssArray[index] = nmfss + } + return nmfssArray, nil } // NetworkMappingProperties is network Mapping Properties. type NetworkMappingProperties struct { - State *string `json:"state,omitempty"` - PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"` - PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` - PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` - RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"` - RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` - RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"` - RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` - FabricSpecificSettings *NetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"` + State *string `json:"state,omitempty"` + PrimaryNetworkFriendlyName *string `json:"primaryNetworkFriendlyName,omitempty"` + PrimaryNetworkID *string `json:"primaryNetworkId,omitempty"` + PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` + RecoveryNetworkFriendlyName *string `json:"recoveryNetworkFriendlyName,omitempty"` + RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` + RecoveryFabricArmID *string `json:"recoveryFabricArmId,omitempty"` + RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` + FabricSpecificSettings NetworkMappingFabricSpecificSettings `json:"fabricSpecificSettings,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for NetworkMappingProperties struct. +func (nmp *NetworkMappingProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["state"] + if v != nil { + var state string + err = json.Unmarshal(*m["state"], &state) + if err != nil { + return err + } + nmp.State = &state + } + + v = m["primaryNetworkFriendlyName"] + if v != nil { + var primaryNetworkFriendlyName string + err = json.Unmarshal(*m["primaryNetworkFriendlyName"], &primaryNetworkFriendlyName) + if err != nil { + return err + } + nmp.PrimaryNetworkFriendlyName = &primaryNetworkFriendlyName + } + + v = m["primaryNetworkId"] + if v != nil { + var primaryNetworkID string + err = json.Unmarshal(*m["primaryNetworkId"], &primaryNetworkID) + if err != nil { + return err + } + nmp.PrimaryNetworkID = &primaryNetworkID + } + + v = m["primaryFabricFriendlyName"] + if v != nil { + var primaryFabricFriendlyName string + err = json.Unmarshal(*m["primaryFabricFriendlyName"], &primaryFabricFriendlyName) + if err != nil { + return err + } + nmp.PrimaryFabricFriendlyName = &primaryFabricFriendlyName + } + + v = m["recoveryNetworkFriendlyName"] + if v != nil { + var recoveryNetworkFriendlyName string + err = json.Unmarshal(*m["recoveryNetworkFriendlyName"], &recoveryNetworkFriendlyName) + if err != nil { + return err + } + nmp.RecoveryNetworkFriendlyName = &recoveryNetworkFriendlyName + } + + v = m["recoveryNetworkId"] + if v != nil { + var recoveryNetworkID string + err = json.Unmarshal(*m["recoveryNetworkId"], &recoveryNetworkID) + if err != nil { + return err + } + nmp.RecoveryNetworkID = &recoveryNetworkID + } + + v = m["recoveryFabricArmId"] + if v != nil { + var recoveryFabricArmID string + err = json.Unmarshal(*m["recoveryFabricArmId"], &recoveryFabricArmID) + if err != nil { + return err + } + nmp.RecoveryFabricArmID = &recoveryFabricArmID + } + + v = m["recoveryFabricFriendlyName"] + if v != nil { + var recoveryFabricFriendlyName string + err = json.Unmarshal(*m["recoveryFabricFriendlyName"], &recoveryFabricFriendlyName) + if err != nil { + return err + } + nmp.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName + } + + v = m["fabricSpecificSettings"] + if v != nil { + fabricSpecificSettings, err := unmarshalNetworkMappingFabricSpecificSettings(*m["fabricSpecificSettings"]) + if err != nil { + return err + } + nmp.FabricSpecificSettings = fabricSpecificSettings + } + + return nil } // NetworkProperties is network Properties @@ -1753,8 +6394,39 @@ type PlannedFailoverInput struct { // PlannedFailoverInputProperties is input definition for planned failover input properties. type PlannedFailoverInputProperties struct { - FailoverDirection *string `json:"failoverDirection,omitempty"` - ProviderSpecificDetails *ProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` + FailoverDirection *string `json:"failoverDirection,omitempty"` + ProviderSpecificDetails ProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PlannedFailoverInputProperties struct. +func (pfip *PlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["failoverDirection"] + if v != nil { + var failoverDirection string + err = json.Unmarshal(*m["failoverDirection"], &failoverDirection) + if err != nil { + return err + } + pfip.FailoverDirection = &failoverDirection + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalProviderSpecificFailoverInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + pfip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // Policy is protection profile details. @@ -1788,16 +6460,194 @@ func (client PolicyCollection) PolicyCollectionPreparer() (*http.Request, error) // PolicyProperties is protection profile custom data details. type PolicyProperties struct { - FriendlyName *string `json:"friendlyName,omitempty"` - ProviderSpecificDetails *PolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProviderSpecificDetails PolicyProviderSpecificDetails `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PolicyProperties struct. +func (pp *PolicyProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["friendlyName"] + if v != nil { + var friendlyName string + err = json.Unmarshal(*m["friendlyName"], &friendlyName) + if err != nil { + return err + } + pp.FriendlyName = &friendlyName + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalPolicyProviderSpecificDetails(*m["providerSpecificDetails"]) + if err != nil { + return err + } + pp.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // PolicyProviderSpecificDetails is base class for Provider specific details for policies. -type PolicyProviderSpecificDetails struct { +type PolicyProviderSpecificDetails interface { + AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) + AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) + AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) + AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) + AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) + AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) + AsInMagePolicyDetails() (*InMagePolicyDetails, bool) + AsA2APolicyDetails() (*A2APolicyDetails, bool) + AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) + AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) +} + +func unmarshalPolicyProviderSpecificDetails(body []byte) (PolicyProviderSpecificDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaAzure): + var hvrapd HyperVReplicaAzurePolicyDetails + err := json.Unmarshal(body, &hvrapd) + return hvrapd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplicaBasePolicyDetails): + var hvrbpd HyperVReplicaBasePolicyDetails + err := json.Unmarshal(body, &hvrbpd) + return hvrbpd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012): + var hvrpd HyperVReplicaPolicyDetails + err := json.Unmarshal(body, &hvrpd) + return hvrpd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeHyperVReplica2012R2): + var hvrbpd HyperVReplicaBluePolicyDetails + err := json.Unmarshal(body, &hvrbpd) + return hvrbpd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageBasePolicyDetails): + var imbpd InMageBasePolicyDetails + err := json.Unmarshal(body, &imbpd) + return imbpd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMageAzureV2): + var imavpd InMageAzureV2PolicyDetails + err := json.Unmarshal(body, &imavpd) + return imavpd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeInMage): + var impd InMagePolicyDetails + err := json.Unmarshal(body, &impd) + return impd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeA2A): + var apd A2APolicyDetails + err := json.Unmarshal(body, &apd) + return apd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration): + var rampd RcmAzureMigrationPolicyDetails + err := json.Unmarshal(body, &rampd) + return rampd, err + case string(InstanceTypePolicyProviderSpecificDetailsInstanceTypeVMwareCbt): + var vcpd VmwareCbtPolicyDetails + err := json.Unmarshal(body, &vcpd) + return vcpd, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalPolicyProviderSpecificDetailsArray(body []byte) ([]PolicyProviderSpecificDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ppsdArray := make([]PolicyProviderSpecificDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ppsd, err := unmarshalPolicyProviderSpecificDetails(*rawMessage) + if err != nil { + return nil, err + } + ppsdArray[index] = ppsd + } + return ppsdArray, nil } // PolicyProviderSpecificInput is base class for provider specific input -type PolicyProviderSpecificInput struct { +type PolicyProviderSpecificInput interface { + AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) + AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) + AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) + AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) + AsInMagePolicyInput() (*InMagePolicyInput, bool) + AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) + AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) +} + +func unmarshalPolicyProviderSpecificInput(body []byte) (PolicyProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplicaAzure): + var hvrapi HyperVReplicaAzurePolicyInput + err := json.Unmarshal(body, &hvrapi) + return hvrapi, err + case string(InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012): + var hvrpi HyperVReplicaPolicyInput + err := json.Unmarshal(body, &hvrpi) + return hvrpi, err + case string(InstanceTypePolicyProviderSpecificInputInstanceTypeHyperVReplica2012R2): + var hvrbpi HyperVReplicaBluePolicyInput + err := json.Unmarshal(body, &hvrbpi) + return hvrbpi, err + case string(InstanceTypePolicyProviderSpecificInputInstanceTypeInMageAzureV2): + var imavpi InMageAzureV2PolicyInput + err := json.Unmarshal(body, &imavpi) + return imavpi, err + case string(InstanceTypePolicyProviderSpecificInputInstanceTypeInMage): + var impi InMagePolicyInput + err := json.Unmarshal(body, &impi) + return impi, err + case string(InstanceTypePolicyProviderSpecificInputInstanceTypeA2A): + var apci A2APolicyCreationInput + err := json.Unmarshal(body, &apci) + return apci, err + case string(InstanceTypePolicyProviderSpecificInputInstanceTypeVMwareCbt): + var vmcpci VMwareCbtPolicyCreationInput + err := json.Unmarshal(body, &vmcpci) + return vmcpci, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalPolicyProviderSpecificInputArray(body []byte) ([]PolicyProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ppsiArray := make([]PolicyProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ppsi, err := unmarshalPolicyProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + ppsiArray[index] = ppsi + } + return ppsiArray, nil } // ProcessServer is details of the Process Server. @@ -1826,6 +6676,7 @@ type ProcessServer struct { PsServiceStatus *string `json:"psServiceStatus,omitempty"` SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` + OsVersion *string `json:"osVersion,omitempty"` } // ProtectableItem is replication protected item @@ -1859,19 +6710,101 @@ func (client ProtectableItemCollection) ProtectableItemCollectionPreparer() (*ht // ProtectableItemProperties is replication protected item custom data details. type ProtectableItemProperties struct { - FriendlyName *string `json:"friendlyName,omitempty"` - ProtectionStatus *string `json:"protectionStatus,omitempty"` - ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"` - RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` - ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"` - SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"` - CustomDetails *ConfigurationSettings `json:"customDetails,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectionStatus *string `json:"protectionStatus,omitempty"` + ReplicationProtectedItemID *string `json:"replicationProtectedItemId,omitempty"` + RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` + ProtectionReadinessErrors *[]string `json:"protectionReadinessErrors,omitempty"` + SupportedReplicationProviders *[]string `json:"supportedReplicationProviders,omitempty"` + CustomDetails ConfigurationSettings `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProtectableItemProperties struct. +func (pip *ProtectableItemProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["friendlyName"] + if v != nil { + var friendlyName string + err = json.Unmarshal(*m["friendlyName"], &friendlyName) + if err != nil { + return err + } + pip.FriendlyName = &friendlyName + } + + v = m["protectionStatus"] + if v != nil { + var protectionStatus string + err = json.Unmarshal(*m["protectionStatus"], &protectionStatus) + if err != nil { + return err + } + pip.ProtectionStatus = &protectionStatus + } + + v = m["replicationProtectedItemId"] + if v != nil { + var replicationProtectedItemID string + err = json.Unmarshal(*m["replicationProtectedItemId"], &replicationProtectedItemID) + if err != nil { + return err + } + pip.ReplicationProtectedItemID = &replicationProtectedItemID + } + + v = m["recoveryServicesProviderId"] + if v != nil { + var recoveryServicesProviderID string + err = json.Unmarshal(*m["recoveryServicesProviderId"], &recoveryServicesProviderID) + if err != nil { + return err + } + pip.RecoveryServicesProviderID = &recoveryServicesProviderID + } + + v = m["protectionReadinessErrors"] + if v != nil { + var protectionReadinessErrors []string + err = json.Unmarshal(*m["protectionReadinessErrors"], &protectionReadinessErrors) + if err != nil { + return err + } + pip.ProtectionReadinessErrors = &protectionReadinessErrors + } + + v = m["supportedReplicationProviders"] + if v != nil { + var supportedReplicationProviders []string + err = json.Unmarshal(*m["supportedReplicationProviders"], &supportedReplicationProviders) + if err != nil { + return err + } + pip.SupportedReplicationProviders = &supportedReplicationProviders + } + + v = m["customDetails"] + if v != nil { + customDetails, err := unmarshalConfigurationSettings(*m["customDetails"]) + if err != nil { + return err + } + pip.CustomDetails = customDetails + } + + return nil } // ProtectedItemsQueryParameter is query parameter to enumerate protected items. type ProtectedItemsQueryParameter struct { SourceFabricName *string `json:"sourceFabricName,omitempty"` RecoveryPlanName *string `json:"recoveryPlanName,omitempty"` + VCenterName *string `json:"vCenterName,omitempty"` } // ProtectionContainer is protection container details. @@ -1978,7 +6911,139 @@ type ProviderError struct { } // ProviderSpecificFailoverInput is provider specific failover input. -type ProviderSpecificFailoverInput struct { +type ProviderSpecificFailoverInput interface { + AsHyperVReplicaAzureFailoverProviderInput() (*HyperVReplicaAzureFailoverProviderInput, bool) + AsHyperVReplicaAzureFailbackProviderInput() (*HyperVReplicaAzureFailbackProviderInput, bool) + AsInMageAzureV2FailoverProviderInput() (*InMageAzureV2FailoverProviderInput, bool) + AsInMageFailoverProviderInput() (*InMageFailoverProviderInput, bool) + AsA2AFailoverProviderInput() (*A2AFailoverProviderInput, bool) +} + +func unmarshalProviderSpecificFailoverInput(body []byte) (ProviderSpecificFailoverInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): + var hvrafpi HyperVReplicaAzureFailoverProviderInput + err := json.Unmarshal(body, &hvrafpi) + return hvrafpi, err + case string(InstanceTypeProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): + var hvrafpi HyperVReplicaAzureFailbackProviderInput + err := json.Unmarshal(body, &hvrafpi) + return hvrafpi, err + case string(InstanceTypeProviderSpecificFailoverInputInstanceTypeInMageAzureV2): + var imavfpi InMageAzureV2FailoverProviderInput + err := json.Unmarshal(body, &imavfpi) + return imavfpi, err + case string(InstanceTypeProviderSpecificFailoverInputInstanceTypeInMage): + var imfpi InMageFailoverProviderInput + err := json.Unmarshal(body, &imfpi) + return imfpi, err + case string(InstanceTypeProviderSpecificFailoverInputInstanceTypeA2A): + var afpi A2AFailoverProviderInput + err := json.Unmarshal(body, &afpi) + return afpi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalProviderSpecificFailoverInputArray(body []byte) ([]ProviderSpecificFailoverInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + psfiArray := make([]ProviderSpecificFailoverInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + psfi, err := unmarshalProviderSpecificFailoverInput(*rawMessage) + if err != nil { + return nil, err + } + psfiArray[index] = psfi + } + return psfiArray, nil +} + +// ProviderSpecificRecoveryPointDetails is replication provider specific recovery point details. +type ProviderSpecificRecoveryPointDetails struct { + Type *string `json:"Type,omitempty"` +} + +// RcmAzureMigrationPolicyDetails is RCM based Azure migration specific policy details. +type RcmAzureMigrationPolicyDetails struct { + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + MultiVMSyncStatus MultiVMSyncStatus `json:"multiVmSyncStatus,omitempty"` + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` +} + +// MarshalJSON is the custom marshaler for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) MarshalJSON() ([]byte, error) { + rampd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeRcmAzureMigration + type Alias RcmAzureMigrationPolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rampd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return &rampd, true +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for RcmAzureMigrationPolicyDetails. +func (rampd RcmAzureMigrationPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return nil, false } // RecoveryPlan is recovery plan details. @@ -1993,8 +7058,45 @@ type RecoveryPlan struct { // RecoveryPlanA2AFailoverInput is recovery plan A2A failover input. type RecoveryPlanA2AFailoverInput struct { - RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"` - CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` + InstanceType InstanceTypeRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` + RecoveryPointType A2ARpRecoveryPointType `json:"recoveryPointType,omitempty"` + CloudServiceCreationOption *string `json:"cloudServiceCreationOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) MarshalJSON() ([]byte, error) { + rpafi.InstanceType = InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A + type Alias RecoveryPlanA2AFailoverInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rpafi), + }) +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanA2AFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanA2AFailoverInput. +func (rpafi RecoveryPlanA2AFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return &rpafi, true } // RecoveryPlanAction is recovery plan action details. @@ -2002,18 +7104,142 @@ type RecoveryPlanAction struct { ActionName *string `json:"actionName,omitempty"` FailoverTypes *[]ReplicationProtectedItemOperation `json:"failoverTypes,omitempty"` FailoverDirections *[]PossibleOperationsDirections `json:"failoverDirections,omitempty"` - CustomDetails *RecoveryPlanActionDetails `json:"customDetails,omitempty"` + CustomDetails RecoveryPlanActionDetails `json:"customDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanAction struct. +func (rpa *RecoveryPlanAction) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["actionName"] + if v != nil { + var actionName string + err = json.Unmarshal(*m["actionName"], &actionName) + if err != nil { + return err + } + rpa.ActionName = &actionName + } + + v = m["failoverTypes"] + if v != nil { + var failoverTypes []ReplicationProtectedItemOperation + err = json.Unmarshal(*m["failoverTypes"], &failoverTypes) + if err != nil { + return err + } + rpa.FailoverTypes = &failoverTypes + } + + v = m["failoverDirections"] + if v != nil { + var failoverDirections []PossibleOperationsDirections + err = json.Unmarshal(*m["failoverDirections"], &failoverDirections) + if err != nil { + return err + } + rpa.FailoverDirections = &failoverDirections + } + + v = m["customDetails"] + if v != nil { + customDetails, err := unmarshalRecoveryPlanActionDetails(*m["customDetails"]) + if err != nil { + return err + } + rpa.CustomDetails = customDetails + } + + return nil } // RecoveryPlanActionDetails is recovery plan action custom details. -type RecoveryPlanActionDetails struct { +type RecoveryPlanActionDetails interface { + AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) + AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) + AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) +} + +func unmarshalRecoveryPlanActionDetails(body []byte) (RecoveryPlanActionDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeScriptActionDetails): + var rpsad RecoveryPlanScriptActionDetails + err := json.Unmarshal(body, &rpsad) + return rpsad, err + case string(InstanceTypeAutomationRunbookActionDetails): + var rparad RecoveryPlanAutomationRunbookActionDetails + err := json.Unmarshal(body, &rparad) + return rparad, err + case string(InstanceTypeManualActionDetails): + var rpmad RecoveryPlanManualActionDetails + err := json.Unmarshal(body, &rpmad) + return rpmad, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRecoveryPlanActionDetailsArray(body []byte) ([]RecoveryPlanActionDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpadArray := make([]RecoveryPlanActionDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpad, err := unmarshalRecoveryPlanActionDetails(*rawMessage) + if err != nil { + return nil, err + } + rpadArray[index] = rpad + } + return rpadArray, nil } // RecoveryPlanAutomationRunbookActionDetails is recovery plan Automation runbook action details. type RecoveryPlanAutomationRunbookActionDetails struct { - RunbookID *string `json:"runbookId,omitempty"` - Timeout *string `json:"timeout,omitempty"` - FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` + InstanceType InstanceTypeRecoveryPlanActionDetails `json:"instanceType,omitempty"` + RunbookID *string `json:"runbookId,omitempty"` + Timeout *string `json:"timeout,omitempty"` + FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) MarshalJSON() ([]byte, error) { + rparad.InstanceType = InstanceTypeAutomationRunbookActionDetails + type Alias RecoveryPlanAutomationRunbookActionDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rparad), + }) +} + +// AsRecoveryPlanScriptActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanAutomationRunbookActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { + return &rparad, true +} + +// AsRecoveryPlanManualActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanAutomationRunbookActionDetails. +func (rparad RecoveryPlanAutomationRunbookActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { + return nil, false } // RecoveryPlanCollection is recovery plan collection details. @@ -2045,40 +7271,243 @@ type RecoveryPlanGroup struct { // RecoveryPlanGroupTaskDetails is this class represents the recovery plan group task. type RecoveryPlanGroupTaskDetails struct { - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` - Name *string `json:"name,omitempty"` - GroupID *string `json:"groupId,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType InstanceTypeGroupTaskDetails `json:"instanceType,omitempty"` + Name *string `json:"name,omitempty"` + GroupID *string `json:"groupId,omitempty"` + RpGroupType *string `json:"rpGroupType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) MarshalJSON() ([]byte, error) { + rpgtd.InstanceType = InstanceTypeRecoveryPlanGroupTaskDetails + type Alias RecoveryPlanGroupTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rpgtd), + }) +} + +// AsInlineWorkflowTaskDetails is the GroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanGroupTaskDetails is the GroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { + return &rpgtd, true +} + +// AsRecoveryPlanShutdownGroupTaskDetails is the GroupTaskDetails implementation for RecoveryPlanGroupTaskDetails. +func (rpgtd RecoveryPlanGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { + return nil, false } // RecoveryPlanHyperVReplicaAzureFailbackInput is recovery plan HVR Azure failback input. type RecoveryPlanHyperVReplicaAzureFailbackInput struct { - DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"` - RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"` + InstanceType InstanceTypeRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` + DataSyncOption DataSyncStatus `json:"dataSyncOption,omitempty"` + RecoveryVMCreationOption AlternateLocationRecoveryOption `json:"recoveryVmCreationOption,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) MarshalJSON() ([]byte, error) { + rphvrafi.InstanceType = InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback + type Alias RecoveryPlanHyperVReplicaAzureFailbackInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rphvrafi), + }) +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return &rphvrafi, true +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanA2AFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailbackInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false } // RecoveryPlanHyperVReplicaAzureFailoverInput is recovery plan HVR Azure failover input. type RecoveryPlanHyperVReplicaAzureFailoverInput struct { - VaultLocation *string `json:"vaultLocation,omitempty"` - PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` - SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` - RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"` + InstanceType InstanceTypeRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` + VaultLocation *string `json:"vaultLocation,omitempty"` + PrimaryKekCertificatePfx *string `json:"primaryKekCertificatePfx,omitempty"` + SecondaryKekCertificatePfx *string `json:"secondaryKekCertificatePfx,omitempty"` + RecoveryPointType HyperVReplicaAzureRpRecoveryPointType `json:"recoveryPointType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) MarshalJSON() ([]byte, error) { + rphvrafi.InstanceType = InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure + type Alias RecoveryPlanHyperVReplicaAzureFailoverInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rphvrafi), + }) +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return &rphvrafi, true +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanA2AFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanHyperVReplicaAzureFailoverInput. +func (rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false } // RecoveryPlanInMageAzureV2FailoverInput is recovery plan InMageAzureV2 failover input. type RecoveryPlanInMageAzureV2FailoverInput struct { - VaultLocation *string `json:"vaultLocation,omitempty"` - RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"` + InstanceType InstanceTypeRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` + VaultLocation *string `json:"vaultLocation,omitempty"` + RecoveryPointType InMageV2RpRecoveryPointType `json:"recoveryPointType,omitempty"` + UseMultiVMSyncPoint *string `json:"useMultiVmSyncPoint,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) MarshalJSON() ([]byte, error) { + rpimavfi.InstanceType = InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2 + type Alias RecoveryPlanInMageAzureV2FailoverInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rpimavfi), + }) +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return &rpimavfi, true +} + +// AsRecoveryPlanInMageFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanA2AFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageAzureV2FailoverInput. +func (rpimavfi RecoveryPlanInMageAzureV2FailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false } // RecoveryPlanInMageFailoverInput is recovery plan InMage failover input. type RecoveryPlanInMageFailoverInput struct { - RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"` + InstanceType InstanceTypeRecoveryPlanProviderSpecificFailoverInput `json:"instanceType,omitempty"` + RecoveryPointType RpInMageRecoveryPointType `json:"recoveryPointType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) MarshalJSON() ([]byte, error) { + rpimfi.InstanceType = InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage + type Alias RecoveryPlanInMageFailoverInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rpimfi), + }) +} + +// AsRecoveryPlanHyperVReplicaAzureFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanHyperVReplicaAzureFailbackInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageAzureV2FailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) { + return nil, false +} + +// AsRecoveryPlanInMageFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) { + return &rpimfi, true +} + +// AsRecoveryPlanA2AFailoverInput is the RecoveryPlanProviderSpecificFailoverInput implementation for RecoveryPlanInMageFailoverInput. +func (rpimfi RecoveryPlanInMageFailoverInput) AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) { + return nil, false } // RecoveryPlanManualActionDetails is recovery plan manual action details. type RecoveryPlanManualActionDetails struct { - Description *string `json:"description,omitempty"` + InstanceType InstanceTypeRecoveryPlanActionDetails `json:"instanceType,omitempty"` + Description *string `json:"description,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) MarshalJSON() ([]byte, error) { + rpmad.InstanceType = InstanceTypeManualActionDetails + type Alias RecoveryPlanManualActionDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rpmad), + }) +} + +// AsRecoveryPlanScriptActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanAutomationRunbookActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanManualActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanManualActionDetails. +func (rpmad RecoveryPlanManualActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { + return &rpmad, true } // RecoveryPlanPlannedFailoverInput is recovery plan planned failover input. @@ -2092,6 +7521,37 @@ type RecoveryPlanPlannedFailoverInputProperties struct { ProviderSpecificDetails *[]RecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanPlannedFailoverInputProperties struct. +func (rppfip *RecoveryPlanPlannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["failoverDirection"] + if v != nil { + var failoverDirection PossibleOperationsDirections + err = json.Unmarshal(*m["failoverDirection"], &failoverDirection) + if err != nil { + return err + } + rppfip.FailoverDirection = failoverDirection + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalRecoveryPlanProviderSpecificFailoverInputArray(*m["providerSpecificDetails"]) + if err != nil { + return err + } + rppfip.ProviderSpecificDetails = &providerSpecificDetails + } + + return nil +} + // RecoveryPlanProperties is recovery plan custom details. type RecoveryPlanProperties struct { FriendlyName *string `json:"friendlyName,omitempty"` @@ -2103,6 +7563,7 @@ type RecoveryPlanProperties struct { ReplicationProviders *[]string `json:"replicationProviders,omitempty"` AllowedOperations *[]string `json:"allowedOperations,omitempty"` LastPlannedFailoverTime *date.Time `json:"lastPlannedFailoverTime,omitempty"` + LastUnplannedFailoverTime *date.Time `json:"lastUnplannedFailoverTime,omitempty"` LastTestFailoverTime *date.Time `json:"lastTestFailoverTime,omitempty"` CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` CurrentScenarioStatus *string `json:"currentScenarioStatus,omitempty"` @@ -2117,22 +7578,132 @@ type RecoveryPlanProtectedItem struct { } // RecoveryPlanProviderSpecificFailoverInput is recovery plan provider specific failover input base class. -type RecoveryPlanProviderSpecificFailoverInput struct { +type RecoveryPlanProviderSpecificFailoverInput interface { + AsRecoveryPlanHyperVReplicaAzureFailoverInput() (*RecoveryPlanHyperVReplicaAzureFailoverInput, bool) + AsRecoveryPlanHyperVReplicaAzureFailbackInput() (*RecoveryPlanHyperVReplicaAzureFailbackInput, bool) + AsRecoveryPlanInMageAzureV2FailoverInput() (*RecoveryPlanInMageAzureV2FailoverInput, bool) + AsRecoveryPlanInMageFailoverInput() (*RecoveryPlanInMageFailoverInput, bool) + AsRecoveryPlanA2AFailoverInput() (*RecoveryPlanA2AFailoverInput, bool) +} + +func unmarshalRecoveryPlanProviderSpecificFailoverInput(body []byte) (RecoveryPlanProviderSpecificFailoverInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzure): + var rphvrafi RecoveryPlanHyperVReplicaAzureFailoverInput + err := json.Unmarshal(body, &rphvrafi) + return rphvrafi, err + case string(InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeHyperVReplicaAzureFailback): + var rphvrafi RecoveryPlanHyperVReplicaAzureFailbackInput + err := json.Unmarshal(body, &rphvrafi) + return rphvrafi, err + case string(InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMageAzureV2): + var rpimavfi RecoveryPlanInMageAzureV2FailoverInput + err := json.Unmarshal(body, &rpimavfi) + return rpimavfi, err + case string(InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeInMage): + var rpimfi RecoveryPlanInMageFailoverInput + err := json.Unmarshal(body, &rpimfi) + return rpimfi, err + case string(InstanceTypeRecoveryPlanProviderSpecificFailoverInputInstanceTypeA2A): + var rpafi RecoveryPlanA2AFailoverInput + err := json.Unmarshal(body, &rpafi) + return rpafi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRecoveryPlanProviderSpecificFailoverInputArray(body []byte) ([]RecoveryPlanProviderSpecificFailoverInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rppsfiArray := make([]RecoveryPlanProviderSpecificFailoverInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rppsfi, err := unmarshalRecoveryPlanProviderSpecificFailoverInput(*rawMessage) + if err != nil { + return nil, err + } + rppsfiArray[index] = rppsfi + } + return rppsfiArray, nil } // RecoveryPlanScriptActionDetails is recovery plan script action details. type RecoveryPlanScriptActionDetails struct { - Path *string `json:"path,omitempty"` - Timeout *string `json:"timeout,omitempty"` - FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` + InstanceType InstanceTypeRecoveryPlanActionDetails `json:"instanceType,omitempty"` + Path *string `json:"path,omitempty"` + Timeout *string `json:"timeout,omitempty"` + FabricLocation RecoveryPlanActionLocation `json:"fabricLocation,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) MarshalJSON() ([]byte, error) { + rpsad.InstanceType = InstanceTypeScriptActionDetails + type Alias RecoveryPlanScriptActionDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rpsad), + }) +} + +// AsRecoveryPlanScriptActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanScriptActionDetails() (*RecoveryPlanScriptActionDetails, bool) { + return &rpsad, true +} + +// AsRecoveryPlanAutomationRunbookActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanAutomationRunbookActionDetails() (*RecoveryPlanAutomationRunbookActionDetails, bool) { + return nil, false +} + +// AsRecoveryPlanManualActionDetails is the RecoveryPlanActionDetails implementation for RecoveryPlanScriptActionDetails. +func (rpsad RecoveryPlanScriptActionDetails) AsRecoveryPlanManualActionDetails() (*RecoveryPlanManualActionDetails, bool) { + return nil, false } // RecoveryPlanShutdownGroupTaskDetails is this class represents the recovery plan shutdown group task details. type RecoveryPlanShutdownGroupTaskDetails struct { - ChildTasks *[]ASRTask `json:"childTasks,omitempty"` - Name *string `json:"name,omitempty"` - GroupID *string `json:"groupId,omitempty"` - RpGroupType *string `json:"rpGroupType,omitempty"` + ChildTasks *[]ASRTask `json:"childTasks,omitempty"` + InstanceType InstanceTypeGroupTaskDetails `json:"instanceType,omitempty"` + Name *string `json:"name,omitempty"` + GroupID *string `json:"groupId,omitempty"` + RpGroupType *string `json:"rpGroupType,omitempty"` +} + +// MarshalJSON is the custom marshaler for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) MarshalJSON() ([]byte, error) { + rpsgtd.InstanceType = InstanceTypeRecoveryPlanShutdownGroupTaskDetails + type Alias RecoveryPlanShutdownGroupTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rpsgtd), + }) +} + +// AsInlineWorkflowTaskDetails is the GroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsInlineWorkflowTaskDetails() (*InlineWorkflowTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanGroupTaskDetails is the GroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanGroupTaskDetails() (*RecoveryPlanGroupTaskDetails, bool) { + return nil, false +} + +// AsRecoveryPlanShutdownGroupTaskDetails is the GroupTaskDetails implementation for RecoveryPlanShutdownGroupTaskDetails. +func (rpsgtd RecoveryPlanShutdownGroupTaskDetails) AsRecoveryPlanShutdownGroupTaskDetails() (*RecoveryPlanShutdownGroupTaskDetails, bool) { + return &rpsgtd, true } // RecoveryPlanTestFailoverCleanupInput is recovery plan test failover cleanup input. @@ -2159,6 +7730,67 @@ type RecoveryPlanTestFailoverInputProperties struct { ProviderSpecificDetails *[]RecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanTestFailoverInputProperties struct. +func (rptfip *RecoveryPlanTestFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["failoverDirection"] + if v != nil { + var failoverDirection PossibleOperationsDirections + err = json.Unmarshal(*m["failoverDirection"], &failoverDirection) + if err != nil { + return err + } + rptfip.FailoverDirection = failoverDirection + } + + v = m["networkType"] + if v != nil { + var networkType string + err = json.Unmarshal(*m["networkType"], &networkType) + if err != nil { + return err + } + rptfip.NetworkType = &networkType + } + + v = m["networkId"] + if v != nil { + var networkID string + err = json.Unmarshal(*m["networkId"], &networkID) + if err != nil { + return err + } + rptfip.NetworkID = &networkID + } + + v = m["skipTestFailoverCleanup"] + if v != nil { + var skipTestFailoverCleanup string + err = json.Unmarshal(*m["skipTestFailoverCleanup"], &skipTestFailoverCleanup) + if err != nil { + return err + } + rptfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalRecoveryPlanProviderSpecificFailoverInputArray(*m["providerSpecificDetails"]) + if err != nil { + return err + } + rptfip.ProviderSpecificDetails = &providerSpecificDetails + } + + return nil +} + // RecoveryPlanUnplannedFailoverInput is recovery plan unplanned failover input. type RecoveryPlanUnplannedFailoverInput struct { Properties *RecoveryPlanUnplannedFailoverInputProperties `json:"properties,omitempty"` @@ -2171,6 +7803,47 @@ type RecoveryPlanUnplannedFailoverInputProperties struct { ProviderSpecificDetails *[]RecoveryPlanProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for RecoveryPlanUnplannedFailoverInputProperties struct. +func (rpufip *RecoveryPlanUnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["failoverDirection"] + if v != nil { + var failoverDirection PossibleOperationsDirections + err = json.Unmarshal(*m["failoverDirection"], &failoverDirection) + if err != nil { + return err + } + rpufip.FailoverDirection = failoverDirection + } + + v = m["sourceSiteOperations"] + if v != nil { + var sourceSiteOperations SourceSiteOperations + err = json.Unmarshal(*m["sourceSiteOperations"], &sourceSiteOperations) + if err != nil { + return err + } + rpufip.SourceSiteOperations = sourceSiteOperations + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalRecoveryPlanProviderSpecificFailoverInputArray(*m["providerSpecificDetails"]) + if err != nil { + return err + } + rpufip.ProviderSpecificDetails = &providerSpecificDetails + } + + return nil +} + // RecoveryPoint is base class representing a recovery point. type RecoveryPoint struct { autorest.Response `json:"-"` @@ -2202,8 +7875,9 @@ func (client RecoveryPointCollection) RecoveryPointCollectionPreparer() (*http.R // RecoveryPointProperties is recovery point properties. type RecoveryPointProperties struct { - RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` - RecoveryPointType *string `json:"recoveryPointType,omitempty"` + RecoveryPointTime *date.Time `json:"recoveryPointTime,omitempty"` + RecoveryPointType *string `json:"recoveryPointType,omitempty"` + ProviderSpecificDetails *ProviderSpecificRecoveryPointDetails `json:"providerSpecificDetails,omitempty"` } // RecoveryServicesProvider is provider details. @@ -2237,18 +7911,20 @@ func (client RecoveryServicesProviderCollection) RecoveryServicesProviderCollect // RecoveryServicesProviderProperties is recovery services provider properties. type RecoveryServicesProviderProperties struct { - FabricType *string `json:"fabricType,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - ProviderVersion *string `json:"providerVersion,omitempty"` - ServerVersion *string `json:"serverVersion,omitempty"` - ProviderVersionState *string `json:"providerVersionState,omitempty"` - ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"` - FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` - LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"` - ConnectionStatus *string `json:"connectionStatus,omitempty"` - ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` - AllowedScenarios *[]string `json:"allowedScenarios,omitempty"` - HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` + FabricType *string `json:"fabricType,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProviderVersion *string `json:"providerVersion,omitempty"` + ServerVersion *string `json:"serverVersion,omitempty"` + ProviderVersionState *string `json:"providerVersionState,omitempty"` + ProviderVersionExpiryDate *date.Time `json:"providerVersionExpiryDate,omitempty"` + FabricFriendlyName *string `json:"fabricFriendlyName,omitempty"` + LastHeartBeat *date.Time `json:"lastHeartBeat,omitempty"` + ConnectionStatus *string `json:"connectionStatus,omitempty"` + ProtectedItemCount *int32 `json:"protectedItemCount,omitempty"` + AllowedScenarios *[]string `json:"allowedScenarios,omitempty"` + HealthErrorDetails *[]HealthError `json:"healthErrorDetails,omitempty"` + DraIdentifier *string `json:"draIdentifier,omitempty"` + IdentityDetails *IdentityInformation `json:"identityDetails,omitempty"` } // RemoveProtectionContainerMappingInput is container unpairing input. @@ -2273,6 +7949,33 @@ type RenewCertificateInputProperties struct { // ReplicationGroupDetails is replication group details. This will be used in case of San and Wvr. type ReplicationGroupDetails struct { + InstanceType InstanceTypeConfigurationSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) MarshalJSON() ([]byte, error) { + rgd.InstanceType = InstanceTypeReplicationGroupDetails + type Alias ReplicationGroupDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rgd), + }) +} + +// AsHyperVVirtualMachineDetails is the ConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return nil, false +} + +// AsVMwareVirtualMachineDetails is the ConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return nil, false +} + +// AsReplicationGroupDetails is the ConfigurationSettings implementation for ReplicationGroupDetails. +func (rgd ReplicationGroupDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return &rgd, true } // ReplicationProtectedItem is replication protected item. @@ -2306,31 +8009,314 @@ func (client ReplicationProtectedItemCollection) ReplicationProtectedItemCollect // ReplicationProtectedItemProperties is replication protected item custom data details. type ReplicationProtectedItemProperties struct { - FriendlyName *string `json:"friendlyName,omitempty"` - ProtectedItemType *string `json:"protectedItemType,omitempty"` - ProtectableItemID *string `json:"protectableItemId,omitempty"` - RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` - PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` - RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` - RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` - PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"` - RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"` - ProtectionState *string `json:"protectionState,omitempty"` - ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"` - ActiveLocation *string `json:"activeLocation,omitempty"` - TestFailoverState *string `json:"testFailoverState,omitempty"` - TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"` - AllowedOperations *[]string `json:"allowedOperations,omitempty"` - ReplicationHealth *string `json:"replicationHealth,omitempty"` - ReplicationHealthErrors *[]HealthError `json:"replicationHealthErrors,omitempty"` - PolicyID *string `json:"policyId,omitempty"` - PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` - LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"` - LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"` - CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` - FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"` - ProviderSpecificDetails *ReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` - RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` + FriendlyName *string `json:"friendlyName,omitempty"` + ProtectedItemType *string `json:"protectedItemType,omitempty"` + ProtectableItemID *string `json:"protectableItemId,omitempty"` + RecoveryServicesProviderID *string `json:"recoveryServicesProviderId,omitempty"` + PrimaryFabricFriendlyName *string `json:"primaryFabricFriendlyName,omitempty"` + RecoveryFabricFriendlyName *string `json:"recoveryFabricFriendlyName,omitempty"` + RecoveryFabricID *string `json:"recoveryFabricId,omitempty"` + PrimaryProtectionContainerFriendlyName *string `json:"primaryProtectionContainerFriendlyName,omitempty"` + RecoveryProtectionContainerFriendlyName *string `json:"recoveryProtectionContainerFriendlyName,omitempty"` + ProtectionState *string `json:"protectionState,omitempty"` + ProtectionStateDescription *string `json:"protectionStateDescription,omitempty"` + ActiveLocation *string `json:"activeLocation,omitempty"` + TestFailoverState *string `json:"testFailoverState,omitempty"` + TestFailoverStateDescription *string `json:"testFailoverStateDescription,omitempty"` + AllowedOperations *[]string `json:"allowedOperations,omitempty"` + ReplicationHealth *string `json:"replicationHealth,omitempty"` + FailoverHealth *string `json:"failoverHealth,omitempty"` + ReplicationHealthErrors *[]HealthError `json:"replicationHealthErrors,omitempty"` + FailoverHealthErrors *[]HealthError `json:"failoverHealthErrors,omitempty"` + PolicyID *string `json:"policyId,omitempty"` + PolicyFriendlyName *string `json:"policyFriendlyName,omitempty"` + LastSuccessfulFailoverTime *date.Time `json:"lastSuccessfulFailoverTime,omitempty"` + LastSuccessfulTestFailoverTime *date.Time `json:"lastSuccessfulTestFailoverTime,omitempty"` + CurrentScenario *CurrentScenarioDetails `json:"currentScenario,omitempty"` + FailoverRecoveryPointID *string `json:"failoverRecoveryPointId,omitempty"` + ProviderSpecificDetails ReplicationProviderSpecificSettings `json:"providerSpecificDetails,omitempty"` + RecoveryContainerID *string `json:"recoveryContainerId,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ReplicationProtectedItemProperties struct. +func (rpip *ReplicationProtectedItemProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["friendlyName"] + if v != nil { + var friendlyName string + err = json.Unmarshal(*m["friendlyName"], &friendlyName) + if err != nil { + return err + } + rpip.FriendlyName = &friendlyName + } + + v = m["protectedItemType"] + if v != nil { + var protectedItemType string + err = json.Unmarshal(*m["protectedItemType"], &protectedItemType) + if err != nil { + return err + } + rpip.ProtectedItemType = &protectedItemType + } + + v = m["protectableItemId"] + if v != nil { + var protectableItemID string + err = json.Unmarshal(*m["protectableItemId"], &protectableItemID) + if err != nil { + return err + } + rpip.ProtectableItemID = &protectableItemID + } + + v = m["recoveryServicesProviderId"] + if v != nil { + var recoveryServicesProviderID string + err = json.Unmarshal(*m["recoveryServicesProviderId"], &recoveryServicesProviderID) + if err != nil { + return err + } + rpip.RecoveryServicesProviderID = &recoveryServicesProviderID + } + + v = m["primaryFabricFriendlyName"] + if v != nil { + var primaryFabricFriendlyName string + err = json.Unmarshal(*m["primaryFabricFriendlyName"], &primaryFabricFriendlyName) + if err != nil { + return err + } + rpip.PrimaryFabricFriendlyName = &primaryFabricFriendlyName + } + + v = m["recoveryFabricFriendlyName"] + if v != nil { + var recoveryFabricFriendlyName string + err = json.Unmarshal(*m["recoveryFabricFriendlyName"], &recoveryFabricFriendlyName) + if err != nil { + return err + } + rpip.RecoveryFabricFriendlyName = &recoveryFabricFriendlyName + } + + v = m["recoveryFabricId"] + if v != nil { + var recoveryFabricID string + err = json.Unmarshal(*m["recoveryFabricId"], &recoveryFabricID) + if err != nil { + return err + } + rpip.RecoveryFabricID = &recoveryFabricID + } + + v = m["primaryProtectionContainerFriendlyName"] + if v != nil { + var primaryProtectionContainerFriendlyName string + err = json.Unmarshal(*m["primaryProtectionContainerFriendlyName"], &primaryProtectionContainerFriendlyName) + if err != nil { + return err + } + rpip.PrimaryProtectionContainerFriendlyName = &primaryProtectionContainerFriendlyName + } + + v = m["recoveryProtectionContainerFriendlyName"] + if v != nil { + var recoveryProtectionContainerFriendlyName string + err = json.Unmarshal(*m["recoveryProtectionContainerFriendlyName"], &recoveryProtectionContainerFriendlyName) + if err != nil { + return err + } + rpip.RecoveryProtectionContainerFriendlyName = &recoveryProtectionContainerFriendlyName + } + + v = m["protectionState"] + if v != nil { + var protectionState string + err = json.Unmarshal(*m["protectionState"], &protectionState) + if err != nil { + return err + } + rpip.ProtectionState = &protectionState + } + + v = m["protectionStateDescription"] + if v != nil { + var protectionStateDescription string + err = json.Unmarshal(*m["protectionStateDescription"], &protectionStateDescription) + if err != nil { + return err + } + rpip.ProtectionStateDescription = &protectionStateDescription + } + + v = m["activeLocation"] + if v != nil { + var activeLocation string + err = json.Unmarshal(*m["activeLocation"], &activeLocation) + if err != nil { + return err + } + rpip.ActiveLocation = &activeLocation + } + + v = m["testFailoverState"] + if v != nil { + var testFailoverState string + err = json.Unmarshal(*m["testFailoverState"], &testFailoverState) + if err != nil { + return err + } + rpip.TestFailoverState = &testFailoverState + } + + v = m["testFailoverStateDescription"] + if v != nil { + var testFailoverStateDescription string + err = json.Unmarshal(*m["testFailoverStateDescription"], &testFailoverStateDescription) + if err != nil { + return err + } + rpip.TestFailoverStateDescription = &testFailoverStateDescription + } + + v = m["allowedOperations"] + if v != nil { + var allowedOperations []string + err = json.Unmarshal(*m["allowedOperations"], &allowedOperations) + if err != nil { + return err + } + rpip.AllowedOperations = &allowedOperations + } + + v = m["replicationHealth"] + if v != nil { + var replicationHealth string + err = json.Unmarshal(*m["replicationHealth"], &replicationHealth) + if err != nil { + return err + } + rpip.ReplicationHealth = &replicationHealth + } + + v = m["failoverHealth"] + if v != nil { + var failoverHealth string + err = json.Unmarshal(*m["failoverHealth"], &failoverHealth) + if err != nil { + return err + } + rpip.FailoverHealth = &failoverHealth + } + + v = m["replicationHealthErrors"] + if v != nil { + var replicationHealthErrors []HealthError + err = json.Unmarshal(*m["replicationHealthErrors"], &replicationHealthErrors) + if err != nil { + return err + } + rpip.ReplicationHealthErrors = &replicationHealthErrors + } + + v = m["failoverHealthErrors"] + if v != nil { + var failoverHealthErrors []HealthError + err = json.Unmarshal(*m["failoverHealthErrors"], &failoverHealthErrors) + if err != nil { + return err + } + rpip.FailoverHealthErrors = &failoverHealthErrors + } + + v = m["policyId"] + if v != nil { + var policyID string + err = json.Unmarshal(*m["policyId"], &policyID) + if err != nil { + return err + } + rpip.PolicyID = &policyID + } + + v = m["policyFriendlyName"] + if v != nil { + var policyFriendlyName string + err = json.Unmarshal(*m["policyFriendlyName"], &policyFriendlyName) + if err != nil { + return err + } + rpip.PolicyFriendlyName = &policyFriendlyName + } + + v = m["lastSuccessfulFailoverTime"] + if v != nil { + var lastSuccessfulFailoverTime date.Time + err = json.Unmarshal(*m["lastSuccessfulFailoverTime"], &lastSuccessfulFailoverTime) + if err != nil { + return err + } + rpip.LastSuccessfulFailoverTime = &lastSuccessfulFailoverTime + } + + v = m["lastSuccessfulTestFailoverTime"] + if v != nil { + var lastSuccessfulTestFailoverTime date.Time + err = json.Unmarshal(*m["lastSuccessfulTestFailoverTime"], &lastSuccessfulTestFailoverTime) + if err != nil { + return err + } + rpip.LastSuccessfulTestFailoverTime = &lastSuccessfulTestFailoverTime + } + + v = m["currentScenario"] + if v != nil { + var currentScenario CurrentScenarioDetails + err = json.Unmarshal(*m["currentScenario"], ¤tScenario) + if err != nil { + return err + } + rpip.CurrentScenario = ¤tScenario + } + + v = m["failoverRecoveryPointId"] + if v != nil { + var failoverRecoveryPointID string + err = json.Unmarshal(*m["failoverRecoveryPointId"], &failoverRecoveryPointID) + if err != nil { + return err + } + rpip.FailoverRecoveryPointID = &failoverRecoveryPointID + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalReplicationProviderSpecificSettings(*m["providerSpecificDetails"]) + if err != nil { + return err + } + rpip.ProviderSpecificDetails = providerSpecificDetails + } + + v = m["recoveryContainerId"] + if v != nil { + var recoveryContainerID string + err = json.Unmarshal(*m["recoveryContainerId"], &recoveryContainerID) + if err != nil { + return err + } + rpip.RecoveryContainerID = &recoveryContainerID + } + + return nil } // ReplicationProviderContainerUnmappingInput is provider specific input for unpairing operations. @@ -2339,7 +8325,43 @@ type ReplicationProviderContainerUnmappingInput struct { } // ReplicationProviderSpecificContainerCreationInput is provider specific input for container creation operation. -type ReplicationProviderSpecificContainerCreationInput struct { +type ReplicationProviderSpecificContainerCreationInput interface { + AsA2AContainerCreationInput() (*A2AContainerCreationInput, bool) +} + +func unmarshalReplicationProviderSpecificContainerCreationInput(body []byte) (ReplicationProviderSpecificContainerCreationInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeA2A): + var acci A2AContainerCreationInput + err := json.Unmarshal(body, &acci) + return acci, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalReplicationProviderSpecificContainerCreationInputArray(body []byte) ([]ReplicationProviderSpecificContainerCreationInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpscciArray := make([]ReplicationProviderSpecificContainerCreationInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpscci, err := unmarshalReplicationProviderSpecificContainerCreationInput(*rawMessage) + if err != nil { + return nil, err + } + rpscciArray[index] = rpscci + } + return rpscciArray, nil } // ReplicationProviderSpecificContainerMappingInput is provider specific input for pairing operations. @@ -2348,7 +8370,73 @@ type ReplicationProviderSpecificContainerMappingInput struct { } // ReplicationProviderSpecificSettings is replication provider specific settings. -type ReplicationProviderSpecificSettings struct { +type ReplicationProviderSpecificSettings interface { + AsHyperVReplicaBaseReplicationDetails() (*HyperVReplicaBaseReplicationDetails, bool) + AsHyperVReplicaReplicationDetails() (*HyperVReplicaReplicationDetails, bool) + AsHyperVReplicaBlueReplicationDetails() (*HyperVReplicaBlueReplicationDetails, bool) + AsHyperVReplicaAzureReplicationDetails() (*HyperVReplicaAzureReplicationDetails, bool) + AsInMageAzureV2ReplicationDetails() (*InMageAzureV2ReplicationDetails, bool) + AsInMageReplicationDetails() (*InMageReplicationDetails, bool) + AsA2AReplicationDetails() (*A2AReplicationDetails, bool) +} + +func unmarshalReplicationProviderSpecificSettings(body []byte) (ReplicationProviderSpecificSettings, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaBaseReplicationDetails): + var hvrbrd HyperVReplicaBaseReplicationDetails + err := json.Unmarshal(body, &hvrbrd) + return hvrbrd, err + case string(InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012): + var hvrrd HyperVReplicaReplicationDetails + err := json.Unmarshal(body, &hvrrd) + return hvrrd, err + case string(InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplica2012R2): + var hvrbrd HyperVReplicaBlueReplicationDetails + err := json.Unmarshal(body, &hvrbrd) + return hvrbrd, err + case string(InstanceTypeReplicationProviderSpecificSettingsInstanceTypeHyperVReplicaAzure): + var hvrard HyperVReplicaAzureReplicationDetails + err := json.Unmarshal(body, &hvrard) + return hvrard, err + case string(InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMageAzureV2): + var imavrd InMageAzureV2ReplicationDetails + err := json.Unmarshal(body, &imavrd) + return imavrd, err + case string(InstanceTypeReplicationProviderSpecificSettingsInstanceTypeInMage): + var imrd InMageReplicationDetails + err := json.Unmarshal(body, &imrd) + return imrd, err + case string(InstanceTypeReplicationProviderSpecificSettingsInstanceTypeA2A): + var ard A2AReplicationDetails + err := json.Unmarshal(body, &ard) + return ard, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalReplicationProviderSpecificSettingsArray(body []byte) ([]ReplicationProviderSpecificSettings, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rpssArray := make([]ReplicationProviderSpecificSettings, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rpss, err := unmarshalReplicationProviderSpecificSettings(*rawMessage) + if err != nil { + return nil, err + } + rpssArray[index] = rpss + } + return rpssArray, nil } // Resource is azure resource. @@ -2359,6 +8447,12 @@ type Resource struct { Location *string `json:"location,omitempty"` } +// ResourceHealthSummary is base class to define the health summary of the resources contained under an Arm resource. +type ResourceHealthSummary struct { + ResourceCount *int32 `json:"resourceCount,omitempty"` + Issues *[]HealthErrorSummary `json:"issues,omitempty"` +} + // ResumeJobParams is resume job params. type ResumeJobParams struct { Properties *ResumeJobParamsProperties `json:"properties,omitempty"` @@ -2384,12 +8478,94 @@ type ReverseReplicationInput struct { // ReverseReplicationInputProperties is reverse replication input properties. type ReverseReplicationInputProperties struct { - FailoverDirection *string `json:"failoverDirection,omitempty"` - ProviderSpecificDetails *ReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"` + FailoverDirection *string `json:"failoverDirection,omitempty"` + ProviderSpecificDetails ReverseReplicationProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ReverseReplicationInputProperties struct. +func (rrip *ReverseReplicationInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["failoverDirection"] + if v != nil { + var failoverDirection string + err = json.Unmarshal(*m["failoverDirection"], &failoverDirection) + if err != nil { + return err + } + rrip.FailoverDirection = &failoverDirection + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalReverseReplicationProviderSpecificInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + rrip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // ReverseReplicationProviderSpecificInput is provider specific reverse replication input. -type ReverseReplicationProviderSpecificInput struct { +type ReverseReplicationProviderSpecificInput interface { + AsHyperVReplicaAzureReprotectInput() (*HyperVReplicaAzureReprotectInput, bool) + AsInMageAzureV2ReprotectInput() (*InMageAzureV2ReprotectInput, bool) + AsInMageReprotectInput() (*InMageReprotectInput, bool) + AsA2AReprotectInput() (*A2AReprotectInput, bool) +} + +func unmarshalReverseReplicationProviderSpecificInput(body []byte) (ReverseReplicationProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeHyperVReplicaAzure): + var hvrari HyperVReplicaAzureReprotectInput + err := json.Unmarshal(body, &hvrari) + return hvrari, err + case string(InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMageAzureV2): + var imavri InMageAzureV2ReprotectInput + err := json.Unmarshal(body, &imavri) + return imavri, err + case string(InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeInMage): + var imri InMageReprotectInput + err := json.Unmarshal(body, &imri) + return imri, err + case string(InstanceTypeReverseReplicationProviderSpecificInputInstanceTypeA2A): + var ari A2AReprotectInput + err := json.Unmarshal(body, &ari) + return ari, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalReverseReplicationProviderSpecificInputArray(body []byte) ([]ReverseReplicationProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rrpsiArray := make([]ReverseReplicationProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rrpsi, err := unmarshalReverseReplicationProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + rrpsiArray[index] = rrpsi + } + return rrpsiArray, nil } // RoleAssignment is azure role assignment details. @@ -2409,14 +8585,103 @@ type RunAsAccount struct { // SanEnableProtectionInput is san enable protection provider specific input. type SanEnableProtectionInput struct { + InstanceType InstanceTypeEnableProtectionProviderSpecificInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) MarshalJSON() ([]byte, error) { + sepi.InstanceType = InstanceTypeEnableProtectionProviderSpecificInputInstanceTypeSan + type Alias SanEnableProtectionInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(sepi), + }) +} + +// AsHyperVReplicaAzureEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsHyperVReplicaAzureEnableProtectionInput() (*HyperVReplicaAzureEnableProtectionInput, bool) { + return nil, false +} + +// AsSanEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsSanEnableProtectionInput() (*SanEnableProtectionInput, bool) { + return &sepi, true +} + +// AsInMageAzureV2EnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsInMageAzureV2EnableProtectionInput() (*InMageAzureV2EnableProtectionInput, bool) { + return nil, false +} + +// AsInMageEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsInMageEnableProtectionInput() (*InMageEnableProtectionInput, bool) { + return nil, false +} + +// AsA2AEnableProtectionInput is the EnableProtectionProviderSpecificInput implementation for SanEnableProtectionInput. +func (sepi SanEnableProtectionInput) AsA2AEnableProtectionInput() (*A2AEnableProtectionInput, bool) { + return nil, false } // ScriptActionTaskDetails is this class represents the script action task details. type ScriptActionTaskDetails struct { - Name *string `json:"name,omitempty"` - Path *string `json:"path,omitempty"` - Output *string `json:"output,omitempty"` - IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + Name *string `json:"name,omitempty"` + Path *string `json:"path,omitempty"` + Output *string `json:"output,omitempty"` + IsPrimarySideScript *bool `json:"isPrimarySideScript,omitempty"` +} + +// MarshalJSON is the custom marshaler for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) MarshalJSON() ([]byte, error) { + satd.InstanceType = InstanceTypeScriptActionTaskDetails + type Alias ScriptActionTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(satd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return &satd, true +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for ScriptActionTaskDetails. +func (satd ScriptActionTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false } // ServiceError is ASR error model @@ -2520,22 +8785,197 @@ type SwitchProtectionInput struct { // SwitchProtectionInputProperties is switch protection input properties. type SwitchProtectionInputProperties struct { - ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"` - ProviderSpecificDetails *SwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` + ReplicationProtectedItemName *string `json:"replicationProtectedItemName,omitempty"` + ProviderSpecificDetails SwitchProtectionProviderSpecificInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for SwitchProtectionInputProperties struct. +func (spip *SwitchProtectionInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["replicationProtectedItemName"] + if v != nil { + var replicationProtectedItemName string + err = json.Unmarshal(*m["replicationProtectedItemName"], &replicationProtectedItemName) + if err != nil { + return err + } + spip.ReplicationProtectedItemName = &replicationProtectedItemName + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalSwitchProtectionProviderSpecificInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + spip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // SwitchProtectionJobDetails is this class represents details for switch protection job. type SwitchProtectionJobDetails struct { - AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` - NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"` + AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` + InstanceType InstanceTypeJobDetails `json:"instanceType,omitempty"` + NewReplicationProtectedItemID *string `json:"newReplicationProtectedItemId,omitempty"` +} + +// MarshalJSON is the custom marshaler for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) MarshalJSON() ([]byte, error) { + spjd.InstanceType = InstanceTypeSwitchProtectionJobDetails + type Alias SwitchProtectionJobDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(spjd), + }) +} + +// AsAsrJobDetails is the JobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the JobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return nil, false +} + +// AsFailoverJobDetails is the JobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the JobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the JobDetails implementation for SwitchProtectionJobDetails. +func (spjd SwitchProtectionJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return &spjd, true } // SwitchProtectionProviderSpecificInput is provider specific switch protection input. -type SwitchProtectionProviderSpecificInput struct { +type SwitchProtectionProviderSpecificInput interface { + AsA2ASwitchProtectionInput() (*A2ASwitchProtectionInput, bool) +} + +func unmarshalSwitchProtectionProviderSpecificInput(body []byte) (SwitchProtectionProviderSpecificInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeA2A): + var aspi A2ASwitchProtectionInput + err := json.Unmarshal(body, &aspi) + return aspi, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalSwitchProtectionProviderSpecificInputArray(body []byte) ([]SwitchProtectionProviderSpecificInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sppsiArray := make([]SwitchProtectionProviderSpecificInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sppsi, err := unmarshalSwitchProtectionProviderSpecificInput(*rawMessage) + if err != nil { + return nil, err + } + sppsiArray[index] = sppsi + } + return sppsiArray, nil } // TaskTypeDetails is task details based on specific task type. -type TaskTypeDetails struct { +type TaskTypeDetails interface { + AsJobTaskDetails() (*JobTaskDetails, bool) + AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) + AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) + AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) + AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) + AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) + AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) + AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) +} + +func unmarshalTaskTypeDetails(body []byte) (TaskTypeDetails, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeJobTaskDetails): + var jtd JobTaskDetails + err := json.Unmarshal(body, &jtd) + return jtd, err + case string(InstanceTypeVirtualMachineTaskDetails): + var vmtd VirtualMachineTaskDetails + err := json.Unmarshal(body, &vmtd) + return vmtd, err + case string(InstanceTypeFabricReplicationGroupTaskDetails): + var frgtd FabricReplicationGroupTaskDetails + err := json.Unmarshal(body, &frgtd) + return frgtd, err + case string(InstanceTypeManualActionTaskDetails): + var matd ManualActionTaskDetails + err := json.Unmarshal(body, &matd) + return matd, err + case string(InstanceTypeScriptActionTaskDetails): + var satd ScriptActionTaskDetails + err := json.Unmarshal(body, &satd) + return satd, err + case string(InstanceTypeVMNicUpdatesTaskDetails): + var vnutd VMNicUpdatesTaskDetails + err := json.Unmarshal(body, &vnutd) + return vnutd, err + case string(InstanceTypeConsistencyCheckTaskDetails): + var cctd ConsistencyCheckTaskDetails + err := json.Unmarshal(body, &cctd) + return cctd, err + case string(InstanceTypeAutomationRunbookTaskDetails): + var artd AutomationRunbookTaskDetails + err := json.Unmarshal(body, &artd) + return artd, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalTaskTypeDetailsArray(body []byte) ([]TaskTypeDetails, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ttdArray := make([]TaskTypeDetails, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ttd, err := unmarshalTaskTypeDetails(*rawMessage) + if err != nil { + return nil, err + } + ttdArray[index] = ttd + } + return ttdArray, nil } // TestFailoverCleanupInput is input definition for test failover cleanup. @@ -2555,33 +8995,120 @@ type TestFailoverInput struct { // TestFailoverInputProperties is input definition for planned failover input properties. type TestFailoverInputProperties struct { - FailoverDirection *string `json:"failoverDirection,omitempty"` - NetworkType *string `json:"networkType,omitempty"` - NetworkID *string `json:"networkId,omitempty"` - SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` - ProviderSpecificDetails *ProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` + FailoverDirection *string `json:"failoverDirection,omitempty"` + NetworkType *string `json:"networkType,omitempty"` + NetworkID *string `json:"networkId,omitempty"` + SkipTestFailoverCleanup *string `json:"skipTestFailoverCleanup,omitempty"` + ProviderSpecificDetails ProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for TestFailoverInputProperties struct. +func (tfip *TestFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["failoverDirection"] + if v != nil { + var failoverDirection string + err = json.Unmarshal(*m["failoverDirection"], &failoverDirection) + if err != nil { + return err + } + tfip.FailoverDirection = &failoverDirection + } + + v = m["networkType"] + if v != nil { + var networkType string + err = json.Unmarshal(*m["networkType"], &networkType) + if err != nil { + return err + } + tfip.NetworkType = &networkType + } + + v = m["networkId"] + if v != nil { + var networkID string + err = json.Unmarshal(*m["networkId"], &networkID) + if err != nil { + return err + } + tfip.NetworkID = &networkID + } + + v = m["skipTestFailoverCleanup"] + if v != nil { + var skipTestFailoverCleanup string + err = json.Unmarshal(*m["skipTestFailoverCleanup"], &skipTestFailoverCleanup) + if err != nil { + return err + } + tfip.SkipTestFailoverCleanup = &skipTestFailoverCleanup + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalProviderSpecificFailoverInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + tfip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // TestFailoverJobDetails is this class represents the details for a test failover job. type TestFailoverJobDetails struct { - AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` - TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` - Comments *string `json:"comments,omitempty"` - NetworkName *string `json:"networkName,omitempty"` - NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` - NetworkType *string `json:"networkType,omitempty"` - ProtectedItemDetails *[]TestFailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` + AffectedObjectDetails *map[string]*string `json:"affectedObjectDetails,omitempty"` + InstanceType InstanceTypeJobDetails `json:"instanceType,omitempty"` + TestFailoverStatus *string `json:"testFailoverStatus,omitempty"` + Comments *string `json:"comments,omitempty"` + NetworkName *string `json:"networkName,omitempty"` + NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` + NetworkType *string `json:"networkType,omitempty"` + ProtectedItemDetails *[]FailoverReplicationProtectedItemDetails `json:"protectedItemDetails,omitempty"` } -// TestFailoverReplicationProtectedItemDetails is test failover details for a replication protected item. -type TestFailoverReplicationProtectedItemDetails struct { - Name *string `json:"name,omitempty"` - FriendlyName *string `json:"friendlyName,omitempty"` - TestVMName *string `json:"testVmName,omitempty"` - TestVMFriendlyName *string `json:"testVmFriendlyName,omitempty"` - NetworkConnectionStatus *string `json:"networkConnectionStatus,omitempty"` - NetworkFriendlyName *string `json:"networkFriendlyName,omitempty"` - Subnet *string `json:"subnet,omitempty"` +// MarshalJSON is the custom marshaler for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) MarshalJSON() ([]byte, error) { + tfjd.InstanceType = InstanceTypeTestFailoverJobDetails + type Alias TestFailoverJobDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(tfjd), + }) +} + +// AsAsrJobDetails is the JobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsAsrJobDetails() (*AsrJobDetails, bool) { + return nil, false +} + +// AsTestFailoverJobDetails is the JobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsTestFailoverJobDetails() (*TestFailoverJobDetails, bool) { + return &tfjd, true +} + +// AsFailoverJobDetails is the JobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsFailoverJobDetails() (*FailoverJobDetails, bool) { + return nil, false +} + +// AsExportJobDetails is the JobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsExportJobDetails() (*ExportJobDetails, bool) { + return nil, false +} + +// AsSwitchProtectionJobDetails is the JobDetails implementation for TestFailoverJobDetails. +func (tfjd TestFailoverJobDetails) AsSwitchProtectionJobDetails() (*SwitchProtectionJobDetails, bool) { + return nil, false } // UnplannedFailoverInput is input definition for planned failover. @@ -2591,9 +9118,50 @@ type UnplannedFailoverInput struct { // UnplannedFailoverInputProperties is input definition for planned failover input properties. type UnplannedFailoverInputProperties struct { - FailoverDirection *string `json:"failoverDirection,omitempty"` - SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"` - ProviderSpecificDetails *ProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` + FailoverDirection *string `json:"failoverDirection,omitempty"` + SourceSiteOperations *string `json:"sourceSiteOperations,omitempty"` + ProviderSpecificDetails ProviderSpecificFailoverInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UnplannedFailoverInputProperties struct. +func (ufip *UnplannedFailoverInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["failoverDirection"] + if v != nil { + var failoverDirection string + err = json.Unmarshal(*m["failoverDirection"], &failoverDirection) + if err != nil { + return err + } + ufip.FailoverDirection = &failoverDirection + } + + v = m["sourceSiteOperations"] + if v != nil { + var sourceSiteOperations string + err = json.Unmarshal(*m["sourceSiteOperations"], &sourceSiteOperations) + if err != nil { + return err + } + ufip.SourceSiteOperations = &sourceSiteOperations + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalProviderSpecificFailoverInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + ufip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // UpdateMobilityServiceRequest is request to update the mobility service on a protected item. @@ -2613,9 +9181,50 @@ type UpdateNetworkMappingInput struct { // UpdateNetworkMappingInputProperties is common input details for network mapping operation. type UpdateNetworkMappingInputProperties struct { - RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` - RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` - FabricSpecificDetails *FabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` + RecoveryFabricName *string `json:"recoveryFabricName,omitempty"` + RecoveryNetworkID *string `json:"recoveryNetworkId,omitempty"` + FabricSpecificDetails FabricSpecificUpdateNetworkMappingInput `json:"fabricSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdateNetworkMappingInputProperties struct. +func (unmip *UpdateNetworkMappingInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["recoveryFabricName"] + if v != nil { + var recoveryFabricName string + err = json.Unmarshal(*m["recoveryFabricName"], &recoveryFabricName) + if err != nil { + return err + } + unmip.RecoveryFabricName = &recoveryFabricName + } + + v = m["recoveryNetworkId"] + if v != nil { + var recoveryNetworkID string + err = json.Unmarshal(*m["recoveryNetworkId"], &recoveryNetworkID) + if err != nil { + return err + } + unmip.RecoveryNetworkID = &recoveryNetworkID + } + + v = m["fabricSpecificDetails"] + if v != nil { + fabricSpecificDetails, err := unmarshalFabricSpecificUpdateNetworkMappingInput(*m["fabricSpecificDetails"]) + if err != nil { + return err + } + unmip.FabricSpecificDetails = fabricSpecificDetails + } + + return nil } // UpdatePolicyInput is update protection profile input. @@ -2625,7 +9234,28 @@ type UpdatePolicyInput struct { // UpdatePolicyInputProperties is policy update properties. type UpdatePolicyInputProperties struct { - ReplicationProviderSettings *PolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"` + ReplicationProviderSettings PolicyProviderSpecificInput `json:"replicationProviderSettings,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdatePolicyInputProperties struct. +func (upip *UpdatePolicyInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["replicationProviderSettings"] + if v != nil { + replicationProviderSettings, err := unmarshalPolicyProviderSpecificInput(*m["replicationProviderSettings"]) + if err != nil { + return err + } + upip.ReplicationProviderSettings = replicationProviderSettings + } + + return nil } // UpdateRecoveryPlanInput is update recovery plan input class. @@ -2645,18 +9275,155 @@ type UpdateReplicationProtectedItemInput struct { // UpdateReplicationProtectedItemInputProperties is update protected item input properties. type UpdateReplicationProtectedItemInputProperties struct { - RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` - RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` - SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` - EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` - VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"` - LicenseType LicenseType `json:"licenseType,omitempty"` - RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` - ProviderSpecificDetails *UpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"` + RecoveryAzureVMName *string `json:"recoveryAzureVMName,omitempty"` + RecoveryAzureVMSize *string `json:"recoveryAzureVMSize,omitempty"` + SelectedRecoveryAzureNetworkID *string `json:"selectedRecoveryAzureNetworkId,omitempty"` + EnableRDPOnTargetOption *string `json:"enableRDPOnTargetOption,omitempty"` + VMNics *[]VMNicInputDetails `json:"vmNics,omitempty"` + LicenseType LicenseType `json:"licenseType,omitempty"` + RecoveryAvailabilitySetID *string `json:"recoveryAvailabilitySetId,omitempty"` + ProviderSpecificDetails UpdateReplicationProtectedItemProviderInput `json:"providerSpecificDetails,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for UpdateReplicationProtectedItemInputProperties struct. +func (urpiip *UpdateReplicationProtectedItemInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["recoveryAzureVMName"] + if v != nil { + var recoveryAzureVMName string + err = json.Unmarshal(*m["recoveryAzureVMName"], &recoveryAzureVMName) + if err != nil { + return err + } + urpiip.RecoveryAzureVMName = &recoveryAzureVMName + } + + v = m["recoveryAzureVMSize"] + if v != nil { + var recoveryAzureVMSize string + err = json.Unmarshal(*m["recoveryAzureVMSize"], &recoveryAzureVMSize) + if err != nil { + return err + } + urpiip.RecoveryAzureVMSize = &recoveryAzureVMSize + } + + v = m["selectedRecoveryAzureNetworkId"] + if v != nil { + var selectedRecoveryAzureNetworkID string + err = json.Unmarshal(*m["selectedRecoveryAzureNetworkId"], &selectedRecoveryAzureNetworkID) + if err != nil { + return err + } + urpiip.SelectedRecoveryAzureNetworkID = &selectedRecoveryAzureNetworkID + } + + v = m["enableRDPOnTargetOption"] + if v != nil { + var enableRDPOnTargetOption string + err = json.Unmarshal(*m["enableRDPOnTargetOption"], &enableRDPOnTargetOption) + if err != nil { + return err + } + urpiip.EnableRDPOnTargetOption = &enableRDPOnTargetOption + } + + v = m["vmNics"] + if v != nil { + var VMNics []VMNicInputDetails + err = json.Unmarshal(*m["vmNics"], &VMNics) + if err != nil { + return err + } + urpiip.VMNics = &VMNics + } + + v = m["licenseType"] + if v != nil { + var licenseType LicenseType + err = json.Unmarshal(*m["licenseType"], &licenseType) + if err != nil { + return err + } + urpiip.LicenseType = licenseType + } + + v = m["recoveryAvailabilitySetId"] + if v != nil { + var recoveryAvailabilitySetID string + err = json.Unmarshal(*m["recoveryAvailabilitySetId"], &recoveryAvailabilitySetID) + if err != nil { + return err + } + urpiip.RecoveryAvailabilitySetID = &recoveryAvailabilitySetID + } + + v = m["providerSpecificDetails"] + if v != nil { + providerSpecificDetails, err := unmarshalUpdateReplicationProtectedItemProviderInput(*m["providerSpecificDetails"]) + if err != nil { + return err + } + urpiip.ProviderSpecificDetails = providerSpecificDetails + } + + return nil } // UpdateReplicationProtectedItemProviderInput is update replication protected item provider specific input. -type UpdateReplicationProtectedItemProviderInput struct { +type UpdateReplicationProtectedItemProviderInput interface { + AsHyperVReplicaAzureUpdateReplicationProtectedItemInput() (*HyperVReplicaAzureUpdateReplicationProtectedItemInput, bool) + AsInMageAzureV2UpdateReplicationProtectedItemInput() (*InMageAzureV2UpdateReplicationProtectedItemInput, bool) + AsA2AUpdateReplicationProtectedItemInput() (*A2AUpdateReplicationProtectedItemInput, bool) +} + +func unmarshalUpdateReplicationProtectedItemProviderInput(body []byte) (UpdateReplicationProtectedItemProviderInput, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["instanceType"] { + case string(InstanceTypeHyperVReplicaAzure): + var hvraurpii HyperVReplicaAzureUpdateReplicationProtectedItemInput + err := json.Unmarshal(body, &hvraurpii) + return hvraurpii, err + case string(InstanceTypeInMageAzureV2): + var imavurpii InMageAzureV2UpdateReplicationProtectedItemInput + err := json.Unmarshal(body, &imavurpii) + return imavurpii, err + case string(InstanceTypeA2A): + var aurpii A2AUpdateReplicationProtectedItemInput + err := json.Unmarshal(body, &aurpii) + return aurpii, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalUpdateReplicationProtectedItemProviderInputArray(body []byte) ([]UpdateReplicationProtectedItemProviderInput, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + urpipiArray := make([]UpdateReplicationProtectedItemProviderInput, len(rawMessages)) + + for index, rawMessage := range rawMessages { + urpipi, err := unmarshalUpdateReplicationProtectedItemProviderInput(*rawMessage) + if err != nil { + return nil, err + } + urpipiArray[index] = urpipi + } + return urpipiArray, nil } // UpdateVCenterRequest is input required to update vCenter. @@ -2673,6 +9440,23 @@ type UpdateVCenterRequestProperties struct { RunAsAccountID *string `json:"runAsAccountId,omitempty"` } +// VaultHealthDetails is vault health details definition. +type VaultHealthDetails struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Properties *VaultHealthProperties `json:"properties,omitempty"` +} + +// VaultHealthProperties is class to define the health summary of the Vault. +type VaultHealthProperties struct { + VaultErrors *[]HealthError `json:"vaultErrors,omitempty"` + ProtectedItemsHealth *ResourceHealthSummary `json:"protectedItemsHealth,omitempty"` + FabricsHealth *ResourceHealthSummary `json:"fabricsHealth,omitempty"` +} + // VCenter is vCenter definition. type VCenter struct { autorest.Response `json:"-"` @@ -2718,39 +9502,290 @@ type VCenterProperties struct { // VirtualMachineTaskDetails is this class represents the virtual machine task details. type VirtualMachineTaskDetails struct { - SkippedReason *string `json:"skippedReason,omitempty"` - SkippedReasonString *string `json:"skippedReasonString,omitempty"` - JobTask *JobEntity `json:"jobTask,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + SkippedReason *string `json:"skippedReason,omitempty"` + SkippedReasonString *string `json:"skippedReasonString,omitempty"` + JobTask *JobEntity `json:"jobTask,omitempty"` +} + +// MarshalJSON is the custom marshaler for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) MarshalJSON() ([]byte, error) { + vmtd.InstanceType = InstanceTypeVirtualMachineTaskDetails + type Alias VirtualMachineTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vmtd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return &vmtd, true +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return nil, false +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for VirtualMachineTaskDetails. +func (vmtd VirtualMachineTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false } // VmmDetails is VMM fabric specific details. type VmmDetails struct { + InstanceType InstanceTypeFabricSpecificDetails `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmDetails. +func (vd VmmDetails) MarshalJSON() ([]byte, error) { + vd.InstanceType = InstanceTypeVMM + type Alias VmmDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vd), + }) +} + +// AsAzureFabricSpecificDetails is the FabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsVmmDetails is the FabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsVmmDetails() (*VmmDetails, bool) { + return &vd, true +} + +// AsHyperVSiteDetails is the FabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the FabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the FabricSpecificDetails implementation for VmmDetails. +func (vd VmmDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false } // VmmToAzureCreateNetworkMappingInput is create network mappings input properties/behaviour specific to Vmm to Azure // Network mapping. type VmmToAzureCreateNetworkMappingInput struct { + InstanceType InstanceTypeFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` } -// VmmToAzureNetworkMappingSettings is e2A Network Mapping fabric specific settings. +// MarshalJSON is the custom marshaler for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtacnmi.InstanceType = InstanceTypeVmmToAzure + type Alias VmmToAzureCreateNetworkMappingInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vtacnmi), + }) +} + +// AsAzureToAzureCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { + return &vtacnmi, true +} + +// AsVmmToVmmCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for VmmToAzureCreateNetworkMappingInput. +func (vtacnmi VmmToAzureCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { + return nil, false +} + +// VmmToAzureNetworkMappingSettings is e2A Network Mapping fabric specific settings. type VmmToAzureNetworkMappingSettings struct { + InstanceType InstanceTypeNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) MarshalJSON() ([]byte, error) { + vtanms.InstanceType = InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToAzure + type Alias VmmToAzureNetworkMappingSettings + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vtanms), + }) +} + +// AsAzureToAzureNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToAzureNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { + return &vtanms, true +} + +// AsVmmToVmmNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for VmmToAzureNetworkMappingSettings. +func (vtanms VmmToAzureNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { + return nil, false } // VmmToAzureUpdateNetworkMappingInput is update network mappings input properties/behaviour specific to vmm to azure. type VmmToAzureUpdateNetworkMappingInput struct { + InstanceType InstanceTypeFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtaunmi.InstanceType = InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToAzure + type Alias VmmToAzureUpdateNetworkMappingInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vtaunmi), + }) +} + +// AsAzureToAzureUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { + return &vtaunmi, true +} + +// AsVmmToVmmUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for VmmToAzureUpdateNetworkMappingInput. +func (vtaunmi VmmToAzureUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { + return nil, false } // VmmToVmmCreateNetworkMappingInput is create network mappings input properties/behaviour specific to vmm to vmm // Network mapping. type VmmToVmmCreateNetworkMappingInput struct { + InstanceType InstanceTypeFabricSpecificCreateNetworkMappingInput `json:"instanceType,omitempty"` } -// VmmToVmmNetworkMappingSettings is e2E Network Mapping fabric specific settings. +// MarshalJSON is the custom marshaler for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtvcnmi.InstanceType = InstanceTypeVmmToVmm + type Alias VmmToVmmCreateNetworkMappingInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vtvcnmi), + }) +} + +// AsAzureToAzureCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsAzureToAzureCreateNetworkMappingInput() (*AzureToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToAzureCreateNetworkMappingInput() (*VmmToAzureCreateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmCreateNetworkMappingInput is the FabricSpecificCreateNetworkMappingInput implementation for VmmToVmmCreateNetworkMappingInput. +func (vtvcnmi VmmToVmmCreateNetworkMappingInput) AsVmmToVmmCreateNetworkMappingInput() (*VmmToVmmCreateNetworkMappingInput, bool) { + return &vtvcnmi, true +} + +// VmmToVmmNetworkMappingSettings is e2E Network Mapping fabric specific settings. type VmmToVmmNetworkMappingSettings struct { + InstanceType InstanceTypeNetworkMappingFabricSpecificSettings `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) MarshalJSON() ([]byte, error) { + vtvnms.InstanceType = InstanceTypeNetworkMappingFabricSpecificSettingsInstanceTypeVmmToVmm + type Alias VmmToVmmNetworkMappingSettings + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vtvnms), + }) +} + +// AsAzureToAzureNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsAzureToAzureNetworkMappingSettings() (*AzureToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToAzureNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToAzureNetworkMappingSettings() (*VmmToAzureNetworkMappingSettings, bool) { + return nil, false +} + +// AsVmmToVmmNetworkMappingSettings is the NetworkMappingFabricSpecificSettings implementation for VmmToVmmNetworkMappingSettings. +func (vtvnms VmmToVmmNetworkMappingSettings) AsVmmToVmmNetworkMappingSettings() (*VmmToVmmNetworkMappingSettings, bool) { + return &vtvnms, true } // VmmToVmmUpdateNetworkMappingInput is update network mappings input properties/behaviour specific to vmm to vmm. type VmmToVmmUpdateNetworkMappingInput struct { + InstanceType InstanceTypeFabricSpecificUpdateNetworkMappingInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) MarshalJSON() ([]byte, error) { + vtvunmi.InstanceType = InstanceTypeFabricSpecificUpdateNetworkMappingInputInstanceTypeVmmToVmm + type Alias VmmToVmmUpdateNetworkMappingInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vtvunmi), + }) +} + +// AsAzureToAzureUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsAzureToAzureUpdateNetworkMappingInput() (*AzureToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToAzureUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToAzureUpdateNetworkMappingInput() (*VmmToAzureUpdateNetworkMappingInput, bool) { + return nil, false +} + +// AsVmmToVmmUpdateNetworkMappingInput is the FabricSpecificUpdateNetworkMappingInput implementation for VmmToVmmUpdateNetworkMappingInput. +func (vtvunmi VmmToVmmUpdateNetworkMappingInput) AsVmmToVmmUpdateNetworkMappingInput() (*VmmToVmmUpdateNetworkMappingInput, bool) { + return &vtvunmi, true } // VMNicDetails is hyper V VM network details. @@ -2766,6 +9801,7 @@ type VMNicDetails struct { PrimaryNicStaticIPAddress *string `json:"primaryNicStaticIPAddress,omitempty"` ReplicaNicStaticIPAddress *string `json:"replicaNicStaticIPAddress,omitempty"` SelectionType *string `json:"selectionType,omitempty"` + RecoveryNicIPAddressType *string `json:"recoveryNicIpAddressType,omitempty"` } // VMNicInputDetails is hyper V VM network input details. @@ -2778,55 +9814,364 @@ type VMNicInputDetails struct { // VMNicUpdatesTaskDetails is this class represents the vm NicUpdates task details. type VMNicUpdatesTaskDetails struct { - VMID *string `json:"vmId,omitempty"` - NicID *string `json:"nicId,omitempty"` - Name *string `json:"name,omitempty"` + InstanceType InstanceTypeTaskTypeDetails `json:"instanceType,omitempty"` + VMID *string `json:"vmId,omitempty"` + NicID *string `json:"nicId,omitempty"` + Name *string `json:"name,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) MarshalJSON() ([]byte, error) { + vnutd.InstanceType = InstanceTypeVMNicUpdatesTaskDetails + type Alias VMNicUpdatesTaskDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vnutd), + }) +} + +// AsJobTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsJobTaskDetails() (*JobTaskDetails, bool) { + return nil, false +} + +// AsVirtualMachineTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsVirtualMachineTaskDetails() (*VirtualMachineTaskDetails, bool) { + return nil, false +} + +// AsFabricReplicationGroupTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsFabricReplicationGroupTaskDetails() (*FabricReplicationGroupTaskDetails, bool) { + return nil, false +} + +// AsManualActionTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsManualActionTaskDetails() (*ManualActionTaskDetails, bool) { + return nil, false +} + +// AsScriptActionTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsScriptActionTaskDetails() (*ScriptActionTaskDetails, bool) { + return nil, false +} + +// AsVMNicUpdatesTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsVMNicUpdatesTaskDetails() (*VMNicUpdatesTaskDetails, bool) { + return &vnutd, true +} + +// AsConsistencyCheckTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsConsistencyCheckTaskDetails() (*ConsistencyCheckTaskDetails, bool) { + return nil, false +} + +// AsAutomationRunbookTaskDetails is the TaskTypeDetails implementation for VMNicUpdatesTaskDetails. +func (vnutd VMNicUpdatesTaskDetails) AsAutomationRunbookTaskDetails() (*AutomationRunbookTaskDetails, bool) { + return nil, false +} + +// VMwareCbtPolicyCreationInput is vMware Cbt Policy creation input. +type VMwareCbtPolicyCreationInput struct { + InstanceType InstanceTypePolicyProviderSpecificInput `json:"instanceType,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) MarshalJSON() ([]byte, error) { + vmcpci.InstanceType = InstanceTypePolicyProviderSpecificInputInstanceTypeVMwareCbt + type Alias VMwareCbtPolicyCreationInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vmcpci), + }) +} + +// AsHyperVReplicaAzurePolicyInput is the PolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaAzurePolicyInput() (*HyperVReplicaAzurePolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyInput is the PolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaPolicyInput() (*HyperVReplicaPolicyInput, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyInput is the PolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsHyperVReplicaBluePolicyInput() (*HyperVReplicaBluePolicyInput, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyInput is the PolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsInMageAzureV2PolicyInput() (*InMageAzureV2PolicyInput, bool) { + return nil, false +} + +// AsInMagePolicyInput is the PolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsInMagePolicyInput() (*InMagePolicyInput, bool) { + return nil, false +} + +// AsA2APolicyCreationInput is the PolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsA2APolicyCreationInput() (*A2APolicyCreationInput, bool) { + return nil, false +} + +// AsVMwareCbtPolicyCreationInput is the PolicyProviderSpecificInput implementation for VMwareCbtPolicyCreationInput. +func (vmcpci VMwareCbtPolicyCreationInput) AsVMwareCbtPolicyCreationInput() (*VMwareCbtPolicyCreationInput, bool) { + return &vmcpci, true +} + +// VmwareCbtPolicyDetails is vMware Cbt specific policy details. +type VmwareCbtPolicyDetails struct { + InstanceType InstanceTypePolicyProviderSpecificDetails `json:"instanceType,omitempty"` + RecoveryPointThresholdInMinutes *int32 `json:"recoveryPointThresholdInMinutes,omitempty"` + RecoveryPointHistory *int32 `json:"recoveryPointHistory,omitempty"` + AppConsistentFrequencyInMinutes *int32 `json:"appConsistentFrequencyInMinutes,omitempty"` + CrashConsistentFrequencyInMinutes *int32 `json:"crashConsistentFrequencyInMinutes,omitempty"` +} + +// MarshalJSON is the custom marshaler for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) MarshalJSON() ([]byte, error) { + vcpd.InstanceType = InstanceTypePolicyProviderSpecificDetailsInstanceTypeVMwareCbt + type Alias VmwareCbtPolicyDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vcpd), + }) +} + +// AsHyperVReplicaAzurePolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaAzurePolicyDetails() (*HyperVReplicaAzurePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBasePolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBasePolicyDetails() (*HyperVReplicaBasePolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaPolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaPolicyDetails() (*HyperVReplicaPolicyDetails, bool) { + return nil, false +} + +// AsHyperVReplicaBluePolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsHyperVReplicaBluePolicyDetails() (*HyperVReplicaBluePolicyDetails, bool) { + return nil, false +} + +// AsInMageBasePolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsInMageBasePolicyDetails() (*InMageBasePolicyDetails, bool) { + return nil, false +} + +// AsInMageAzureV2PolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsInMageAzureV2PolicyDetails() (*InMageAzureV2PolicyDetails, bool) { + return nil, false +} + +// AsInMagePolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsInMagePolicyDetails() (*InMagePolicyDetails, bool) { + return nil, false +} + +// AsA2APolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsA2APolicyDetails() (*A2APolicyDetails, bool) { + return nil, false +} + +// AsRcmAzureMigrationPolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsRcmAzureMigrationPolicyDetails() (*RcmAzureMigrationPolicyDetails, bool) { + return nil, false +} + +// AsVmwareCbtPolicyDetails is the PolicyProviderSpecificDetails implementation for VmwareCbtPolicyDetails. +func (vcpd VmwareCbtPolicyDetails) AsVmwareCbtPolicyDetails() (*VmwareCbtPolicyDetails, bool) { + return &vcpd, true } // VMwareDetails is store the fabric details specific to the VMware fabric. type VMwareDetails struct { - ProcessServers *[]ProcessServer `json:"processServers,omitempty"` - MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"` - RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"` - ReplicationPairCount *string `json:"replicationPairCount,omitempty"` - ProcessServerCount *string `json:"processServerCount,omitempty"` - AgentCount *string `json:"agentCount,omitempty"` - ProtectedServers *string `json:"protectedServers,omitempty"` - SystemLoad *string `json:"systemLoad,omitempty"` - SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` - CPULoad *string `json:"cpuLoad,omitempty"` - CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` - TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` - AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` - MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` - TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` - AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` - SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` - WebLoad *string `json:"webLoad,omitempty"` - WebLoadStatus *string `json:"webLoadStatus,omitempty"` - DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"` - DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"` - CsServiceStatus *string `json:"csServiceStatus,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - AgentVersion *string `json:"agentVersion,omitempty"` - HostName *string `json:"hostName,omitempty"` - LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` - VersionStatus *string `json:"versionStatus,omitempty"` - SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` - SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` - PsTemplateVersion *string `json:"psTemplateVersion,omitempty"` + InstanceType InstanceTypeFabricSpecificDetails `json:"instanceType,omitempty"` + ProcessServers *[]ProcessServer `json:"processServers,omitempty"` + MasterTargetServers *[]MasterTargetServer `json:"masterTargetServers,omitempty"` + RunAsAccounts *[]RunAsAccount `json:"runAsAccounts,omitempty"` + ReplicationPairCount *string `json:"replicationPairCount,omitempty"` + ProcessServerCount *string `json:"processServerCount,omitempty"` + AgentCount *string `json:"agentCount,omitempty"` + ProtectedServers *string `json:"protectedServers,omitempty"` + SystemLoad *string `json:"systemLoad,omitempty"` + SystemLoadStatus *string `json:"systemLoadStatus,omitempty"` + CPULoad *string `json:"cpuLoad,omitempty"` + CPULoadStatus *string `json:"cpuLoadStatus,omitempty"` + TotalMemoryInBytes *int64 `json:"totalMemoryInBytes,omitempty"` + AvailableMemoryInBytes *int64 `json:"availableMemoryInBytes,omitempty"` + MemoryUsageStatus *string `json:"memoryUsageStatus,omitempty"` + TotalSpaceInBytes *int64 `json:"totalSpaceInBytes,omitempty"` + AvailableSpaceInBytes *int64 `json:"availableSpaceInBytes,omitempty"` + SpaceUsageStatus *string `json:"spaceUsageStatus,omitempty"` + WebLoad *string `json:"webLoad,omitempty"` + WebLoadStatus *string `json:"webLoadStatus,omitempty"` + DatabaseServerLoad *string `json:"databaseServerLoad,omitempty"` + DatabaseServerLoadStatus *string `json:"databaseServerLoadStatus,omitempty"` + CsServiceStatus *string `json:"csServiceStatus,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + AgentVersion *string `json:"agentVersion,omitempty"` + HostName *string `json:"hostName,omitempty"` + LastHeartbeat *date.Time `json:"lastHeartbeat,omitempty"` + VersionStatus *string `json:"versionStatus,omitempty"` + SslCertExpiryDate *date.Time `json:"sslCertExpiryDate,omitempty"` + SslCertExpiryRemainingDays *int32 `json:"sslCertExpiryRemainingDays,omitempty"` + PsTemplateVersion *string `json:"psTemplateVersion,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareDetails. +func (vmd VMwareDetails) MarshalJSON() ([]byte, error) { + vmd.InstanceType = InstanceTypeVMware + type Alias VMwareDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vmd), + }) +} + +// AsAzureFabricSpecificDetails is the FabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsVmmDetails is the FabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the FabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the FabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return &vmd, true +} + +// AsVMwareV2FabricSpecificDetails is the FabricSpecificDetails implementation for VMwareDetails. +func (vmd VMwareDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return nil, false +} + +// VMwareV2FabricCreationInput is fabric provider specific settings. +type VMwareV2FabricCreationInput struct { + InstanceType InstanceTypeFabricSpecificCreationInput `json:"instanceType,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) MarshalJSON() ([]byte, error) { + vmvfci.InstanceType = InstanceTypeFabricSpecificCreationInputInstanceTypeVMwareV2 + type Alias VMwareV2FabricCreationInput + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vmvfci), + }) +} + +// AsAzureFabricCreationInput is the FabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) AsAzureFabricCreationInput() (*AzureFabricCreationInput, bool) { + return nil, false +} + +// AsVMwareV2FabricCreationInput is the FabricSpecificCreationInput implementation for VMwareV2FabricCreationInput. +func (vmvfci VMwareV2FabricCreationInput) AsVMwareV2FabricCreationInput() (*VMwareV2FabricCreationInput, bool) { + return &vmvfci, true +} + +// VMwareV2FabricSpecificDetails is vMwareV2 fabric Specific Details. +type VMwareV2FabricSpecificDetails struct { + InstanceType InstanceTypeFabricSpecificDetails `json:"instanceType,omitempty"` + SrsServiceEndpoint *string `json:"srsServiceEndpoint,omitempty"` + RcmServiceEndpoint *string `json:"rcmServiceEndpoint,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) MarshalJSON() ([]byte, error) { + vmvfsd.InstanceType = InstanceTypeVMwareV2 + type Alias VMwareV2FabricSpecificDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vmvfsd), + }) +} + +// AsAzureFabricSpecificDetails is the FabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsAzureFabricSpecificDetails() (*AzureFabricSpecificDetails, bool) { + return nil, false +} + +// AsVmmDetails is the FabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsVmmDetails() (*VmmDetails, bool) { + return nil, false +} + +// AsHyperVSiteDetails is the FabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsHyperVSiteDetails() (*HyperVSiteDetails, bool) { + return nil, false +} + +// AsVMwareDetails is the FabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareDetails() (*VMwareDetails, bool) { + return nil, false +} + +// AsVMwareV2FabricSpecificDetails is the FabricSpecificDetails implementation for VMwareV2FabricSpecificDetails. +func (vmvfsd VMwareV2FabricSpecificDetails) AsVMwareV2FabricSpecificDetails() (*VMwareV2FabricSpecificDetails, bool) { + return &vmvfsd, true } // VMwareVirtualMachineDetails is vMware provider specific settings type VMwareVirtualMachineDetails struct { - AgentGeneratedID *string `json:"agentGeneratedId,omitempty"` - AgentInstalled *string `json:"agentInstalled,omitempty"` - OsType *string `json:"osType,omitempty"` - AgentVersion *string `json:"agentVersion,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - PoweredOn *string `json:"poweredOn,omitempty"` - VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` - DiscoveryType *string `json:"discoveryType,omitempty"` - DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"` - ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` + InstanceType InstanceTypeConfigurationSettings `json:"instanceType,omitempty"` + AgentGeneratedID *string `json:"agentGeneratedId,omitempty"` + AgentInstalled *string `json:"agentInstalled,omitempty"` + OsType *string `json:"osType,omitempty"` + AgentVersion *string `json:"agentVersion,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + PoweredOn *string `json:"poweredOn,omitempty"` + VCenterInfrastructureID *string `json:"vCenterInfrastructureId,omitempty"` + DiscoveryType *string `json:"discoveryType,omitempty"` + DiskDetails *[]InMageDiskDetails `json:"diskDetails,omitempty"` + ValidationErrors *[]HealthError `json:"validationErrors,omitempty"` +} + +// MarshalJSON is the custom marshaler for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) MarshalJSON() ([]byte, error) { + vmvmd.InstanceType = InstanceTypeVMwareVirtualMachine + type Alias VMwareVirtualMachineDetails + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(vmvmd), + }) +} + +// AsHyperVVirtualMachineDetails is the ConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsHyperVVirtualMachineDetails() (*HyperVVirtualMachineDetails, bool) { + return nil, false +} + +// AsVMwareVirtualMachineDetails is the ConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsVMwareVirtualMachineDetails() (*VMwareVirtualMachineDetails, bool) { + return &vmvmd, true +} + +// AsReplicationGroupDetails is the ConfigurationSettings implementation for VMwareVirtualMachineDetails. +func (vmvmd VMwareVirtualMachineDetails) AsReplicationGroupDetails() (*ReplicationGroupDetails, bool) { + return nil, false } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/operations.go index 50e58e1ea..3a2fe8c05 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/operations.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/recoverypoints.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/recoverypoints.go index b279e5c47..eecf44e37 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/recoverypoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/recoverypoints.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationalertsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationalertsettings.go index 62c6cd0a6..4ad2b5968 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationalertsettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationalertsettings.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -174,7 +174,7 @@ func (client ReplicationAlertSettingsClient) GetResponder(resp *http.Response) ( return } -// List gets the list of email notification(alert) configurations for the vault. . +// List gets the list of email notification(alert) configurations for the vault. func (client ReplicationAlertSettingsClient) List() (result AlertCollection, err error) { req, err := client.ListPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationevents.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationevents.go index 976f445be..629430475 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationevents.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationevents.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -105,8 +105,10 @@ func (client ReplicationEventsClient) GetResponder(resp *http.Response) (result } // List gets the list of Azure Site Recovery events for the vault. -func (client ReplicationEventsClient) List() (result EventCollection, err error) { - req, err := client.ListPreparer() +// +// filter is oData filter options. +func (client ReplicationEventsClient) List(filter string) (result EventCollection, err error) { + req, err := client.ListPreparer(filter) if err != nil { err = autorest.NewErrorWithError(err, "recoveryservicessiterecovery.ReplicationEventsClient", "List", nil, "Failure preparing request") return @@ -128,7 +130,7 @@ func (client ReplicationEventsClient) List() (result EventCollection, err error) } // ListPreparer prepares the List request. -func (client ReplicationEventsClient) ListPreparer() (*http.Request, error) { +func (client ReplicationEventsClient) ListPreparer(filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), "resourceName": autorest.Encode("path", client.ResourceName), @@ -139,6 +141,9 @@ func (client ReplicationEventsClient) ListPreparer() (*http.Request, error) { queryParameters := map[string]interface{}{ "api-version": APIVersion, } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } preparer := autorest.CreatePreparer( autorest.AsGet(), @@ -192,7 +197,7 @@ func (client ReplicationEventsClient) ListNextResults(lastResults EventCollectio } // ListComplete gets all elements from the list without paging. -func (client ReplicationEventsClient) ListComplete(cancel <-chan struct{}) (<-chan Event, <-chan error) { +func (client ReplicationEventsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan Event, <-chan error) { resultChan := make(chan Event) errChan := make(chan error, 1) go func() { @@ -200,7 +205,7 @@ func (client ReplicationEventsClient) ListComplete(cancel <-chan struct{}) (<-ch close(resultChan) close(errChan) }() - list, err := client.List() + list, err := client.List(filter) if err != nil { errChan <- err return diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationfabrics.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationfabrics.go index 1a83fd344..ad9e1047d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationfabrics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationfabrics.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( @@ -487,6 +487,88 @@ func (client ReplicationFabricsClient) ListComplete(cancel <-chan struct{}) (<-c return resultChan, errChan } +// MigrateToAad the operation to migrate an Azure Site Recovery fabric to AAD. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. +// +// fabricName is ASR fabric to migrate. +func (client ReplicationFabricsClient) MigrateToAad(fabricName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.MigrateToAadPreparer(fabricName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservicessiterecovery.ReplicationFabricsClient", "MigrateToAad", nil, "Failure preparing request") + return + } + + resp, err := client.MigrateToAadSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "recoveryservicessiterecovery.ReplicationFabricsClient", "MigrateToAad", resp, "Failure sending request") + return + } + + result, err = client.MigrateToAadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservicessiterecovery.ReplicationFabricsClient", "MigrateToAad", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// MigrateToAadPreparer prepares the MigrateToAad request. +func (client ReplicationFabricsClient) MigrateToAadPreparer(fabricName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "fabricName": autorest.Encode("path", fabricName), + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/migratetoaad", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// MigrateToAadSender sends the MigrateToAad request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationFabricsClient) MigrateToAadSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// MigrateToAadResponder handles the response to the MigrateToAad request. The method always +// closes the http.Response Body. +func (client ReplicationFabricsClient) MigrateToAadResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // Purge the operation to purge(force delete) an Azure Site Recovery fabric. This method may poll for completion. // Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationjobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationjobs.go index d1c955b44..916cd735a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationjobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationjobs.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationlogicalnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationlogicalnetworks.go index 9868e505b..817ace063 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationlogicalnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationlogicalnetworks.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworkmappings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworkmappings.go index d1c87d7a4..eeba59544 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworkmappings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworkmappings.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworks.go index c98903712..834e33224 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationnetworks.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationpolicies.go index 65c33e160..08041965d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationpolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationpolicies.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectableitems.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectableitems.go index 4542935bb..6f25176bb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectableitems.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectableitems.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotecteditems.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotecteditems.go index 178768b99..d753e5b27 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotecteditems.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotecteditems.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainermappings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainermappings.go index 39dcbab45..2ffac2337 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainermappings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainermappings.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainers.go index 2d52e9ef3..7cc644724 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationprotectioncontainers.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryplans.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryplans.go index c7cc11506..801edbb87 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryplans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryplans.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryservicesproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryservicesproviders.go index c6c73402d..94db3c3ba 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryservicesproviders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationrecoveryservicesproviders.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassificationmappings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassificationmappings.go index 5a0224947..8989f9a3a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassificationmappings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassificationmappings.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassifications.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassifications.go index 58a8340cb..4604411cb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassifications.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationstorageclassifications.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvaulthealth.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvaulthealth.go new file mode 100644 index 000000000..36f59cb7d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvaulthealth.go @@ -0,0 +1,103 @@ +package recoveryservicessiterecovery + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ReplicationVaultHealthClient is the client for the ReplicationVaultHealth methods of the +// Recoveryservicessiterecovery service. +type ReplicationVaultHealthClient struct { + ManagementClient +} + +// NewReplicationVaultHealthClient creates an instance of the ReplicationVaultHealthClient client. +func NewReplicationVaultHealthClient(subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { + return NewReplicationVaultHealthClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceGroupName, resourceName) +} + +// NewReplicationVaultHealthClientWithBaseURI creates an instance of the ReplicationVaultHealthClient client. +func NewReplicationVaultHealthClientWithBaseURI(baseURI string, subscriptionID string, resourceGroupName string, resourceName string) ReplicationVaultHealthClient { + return ReplicationVaultHealthClient{NewWithBaseURI(baseURI, subscriptionID, resourceGroupName, resourceName)} +} + +// Get gets the health details of the vault. +func (client ReplicationVaultHealthClient) Get() (result VaultHealthDetails, err error) { + req, err := client.GetPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservicessiterecovery.ReplicationVaultHealthClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "recoveryservicessiterecovery.ReplicationVaultHealthClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "recoveryservicessiterecovery.ReplicationVaultHealthClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationVaultHealthClient) GetPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", client.ResourceGroupName), + "resourceName": autorest.Encode("path", client.ResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationVaultHealth", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationVaultHealthClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationVaultHealthClient) GetResponder(resp *http.Response) (result VaultHealthDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvcenters.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvcenters.go index 5c73f978c..21438b5e0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvcenters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/replicationvcenters.go @@ -14,7 +14,7 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go index 940d76574..210d959b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/recoveryservicessiterecovery/version.go @@ -14,15 +14,15 @@ package recoveryservicessiterecovery // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-recoveryservicessiterecovery/2016-08-10" + return "Azure-SDK-For-Go/v11.0.0-beta arm-recoveryservicessiterecovery/2016-08-10" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/client.go index a2fe3a6d6..eca26b9b2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/client.go @@ -17,9 +17,8 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrule.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrule.go old mode 100755 new mode 100644 index b1db86584..aa21f17d3 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrule.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrule.go @@ -14,9 +14,8 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// FirewallRuleClient is the rEST API for Azure Redis Cache Service. +// FirewallRuleClient is the REST API for Azure Redis Cache Service. type FirewallRuleClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewFirewallRuleClient(subscriptionID string) FirewallRuleClient { return NewFirewallRuleClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRuleClientWithBaseURI creates an instance of the -// FirewallRuleClient client. +// NewFirewallRuleClientWithBaseURI creates an instance of the FirewallRuleClient client. func NewFirewallRuleClientWithBaseURI(baseURI string, subscriptionID string) FirewallRuleClient { return FirewallRuleClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a redis cache firewall rule // -// resourceGroupName is the name of the resource group. cacheName is the name -// of the Redis cache. ruleName is the name of the firewall rule. parameters is -// parameters supplied to the create or update redis firewall rule operation. +// resourceGroupName is the name of the resource group. cacheName is the name of the Redis cache. ruleName is the name +// of the firewall rule. parameters is parameters supplied to the create or update redis firewall rule operation. func (client FirewallRuleClient) CreateOrUpdate(resourceGroupName string, cacheName string, ruleName string, parameters FirewallRule) (result FirewallRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -122,8 +119,8 @@ func (client FirewallRuleClient) CreateOrUpdateResponder(resp *http.Response) (r // Delete deletes a single firewall rule in a specified redis cache. // -// resourceGroupName is the name of the resource group. cacheName is the name -// of the Redis cache. ruleName is the name of the firewall rule. +// resourceGroupName is the name of the resource group. cacheName is the name of the Redis cache. ruleName is the name +// of the firewall rule. func (client FirewallRuleClient) Delete(resourceGroupName string, cacheName string, ruleName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, cacheName, ruleName) if err != nil { @@ -188,8 +185,8 @@ func (client FirewallRuleClient) DeleteResponder(resp *http.Response) (result au // Get gets a single firewall rule in a specified redis cache. // -// resourceGroupName is the name of the resource group. cacheName is the name -// of the Redis cache. ruleName is the name of the firewall rule. +// resourceGroupName is the name of the resource group. cacheName is the name of the Redis cache. ruleName is the name +// of the firewall rule. func (client FirewallRuleClient) Get(resourceGroupName string, cacheName string, ruleName string) (result FirewallRule, err error) { req, err := client.GetPreparer(resourceGroupName, cacheName, ruleName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrules.go old mode 100755 new mode 100644 index 571d96bc7..d46bcbfde --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/firewallrules.go @@ -14,9 +14,8 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,27 +23,24 @@ import ( "net/http" ) -// FirewallRulesClient is the rEST API for Azure Redis Cache Service. +// FirewallRulesClient is the REST API for Azure Redis Cache Service. type FirewallRulesClient struct { ManagementClient } -// NewFirewallRulesClient creates an instance of the FirewallRulesClient -// client. +// NewFirewallRulesClient creates an instance of the FirewallRulesClient client. func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the -// FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // List gets all firewall rules in the specified redis cache. // -// resourceGroupName is the name of the resource group. cacheName is the name -// of the Redis cache. +// resourceGroupName is the name of the resource group. cacheName is the name of the Redis cache. func (client FirewallRulesClient) List(resourceGroupName string, cacheName string) (result FirewallRuleListResult, err error) { req, err := client.ListPreparer(resourceGroupName, cacheName) if err != nil { @@ -130,3 +126,48 @@ func (client FirewallRulesClient) ListNextResults(lastResults FirewallRuleListRe return } + +// ListComplete gets all elements from the list without paging. +func (client FirewallRulesClient) ListComplete(resourceGroupName string, cacheName string, cancel <-chan struct{}) (<-chan FirewallRule, <-chan error) { + resultChan := make(chan FirewallRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, cacheName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/redisgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/group.go old mode 100755 new mode 100644 similarity index 90% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/redis/redisgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/redis/group.go index af411bfaa..e3c1cbf1f --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/redisgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/group.go @@ -14,9 +14,8 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// GroupClient is the rEST API for Azure Redis Cache Service. +// GroupClient is the REST API for Azure Redis Cache Service. type GroupClient struct { ManagementClient } @@ -40,14 +39,12 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien return GroupClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create create or replace (overwrite/recreate, with potential downtime) an -// existing Redis cache. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// Create create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. This method may poll +// for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. parameters is parameters supplied to the Create Redis -// operation. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. parameters is parameters +// supplied to the Create Redis operation. func (client GroupClient) Create(resourceGroupName string, name string, parameters CreateParameters, cancel <-chan struct{}) (<-chan ResourceType, <-chan error) { resultChan := make(chan ResourceType, 1) errChan := make(chan error, 1) @@ -67,8 +64,10 @@ func (client GroupClient) Create(resourceGroupName string, name string, paramete var err error var result ResourceType defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -137,12 +136,10 @@ func (client GroupClient) CreateResponder(resp *http.Response) (result ResourceT return } -// Delete deletes a Redis cache. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Delete deletes a Redis cache. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. func (client GroupClient) Delete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -150,8 +147,10 @@ func (client GroupClient) Delete(resourceGroupName string, name string, cancel < var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -217,13 +216,12 @@ func (client GroupClient) DeleteResponder(resp *http.Response) (result autorest. return } -// ExportData export data from the redis cache to blobs in a container. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ExportData export data from the redis cache to blobs in a container. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. parameters is parameters for Redis export operation. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. parameters is parameters +// for Redis export operation. func (client GroupClient) ExportData(resourceGroupName string, name string, parameters ExportRDBParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -241,8 +239,10 @@ func (client GroupClient) ExportData(resourceGroupName string, name string, para var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -310,11 +310,11 @@ func (client GroupClient) ExportDataResponder(resp *http.Response) (result autor return } -// ForceReboot reboot specified Redis node(s). This operation requires write -// permission to the cache resource. There can be potential data loss. +// ForceReboot reboot specified Redis node(s). This operation requires write permission to the cache resource. There +// can be potential data loss. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. parameters is specifies which Redis node(s) to reboot. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. parameters is specifies +// which Redis node(s) to reboot. func (client GroupClient) ForceReboot(resourceGroupName string, name string, parameters RebootParameters) (result ForceRebootResponse, err error) { req, err := client.ForceRebootPreparer(resourceGroupName, name, parameters) if err != nil { @@ -381,8 +381,7 @@ func (client GroupClient) ForceRebootResponder(resp *http.Response) (result Forc // Get gets a Redis cache (resource description). // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. func (client GroupClient) Get(resourceGroupName string, name string) (result ResourceType, err error) { req, err := client.GetPreparer(resourceGroupName, name) if err != nil { @@ -445,13 +444,11 @@ func (client GroupClient) GetResponder(resp *http.Response) (result ResourceType return } -// ImportData import data into Redis cache. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ImportData import data into Redis cache. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. parameters is parameters for Redis import operation. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. parameters is parameters +// for Redis import operation. func (client GroupClient) ImportData(resourceGroupName string, name string, parameters ImportRDBParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -468,8 +465,10 @@ func (client GroupClient) ImportData(resourceGroupName string, name string, para var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -622,6 +621,51 @@ func (client GroupClient) ListNextResults(lastResults ListResult) (result ListRe return } +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(cancel <-chan struct{}) (<-chan ResourceType, <-chan error) { + resultChan := make(chan ResourceType) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup lists all Redis caches in a resource group. // // resourceGroupName is the name of the resource group. @@ -710,11 +754,54 @@ func (client GroupClient) ListByResourceGroupNextResults(lastResults ListResult) return } -// ListKeys retrieve a Redis cache's access keys. This operation requires write -// permission to the cache resource. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client GroupClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan ResourceType, <-chan error) { + resultChan := make(chan ResourceType) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeys retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. func (client GroupClient) ListKeys(resourceGroupName string, name string) (result AccessKeys, err error) { req, err := client.ListKeysPreparer(resourceGroupName, name) if err != nil { @@ -777,11 +864,10 @@ func (client GroupClient) ListKeysResponder(resp *http.Response) (result AccessK return } -// RegenerateKey regenerate Redis cache's access keys. This operation requires -// write permission to the cache resource. +// RegenerateKey regenerate Redis cache's access keys. This operation requires write permission to the cache resource. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. parameters is specifies which key to regenerate. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. parameters is specifies +// which key to regenerate. func (client GroupClient) RegenerateKey(resourceGroupName string, name string, parameters RegenerateKeyParameters) (result AccessKeys, err error) { req, err := client.RegenerateKeyPreparer(resourceGroupName, name, parameters) if err != nil { @@ -848,9 +934,8 @@ func (client GroupClient) RegenerateKeyResponder(resp *http.Response) (result Ac // Update update an existing Redis cache. // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. parameters is parameters supplied to the Update Redis -// operation. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. parameters is parameters +// supplied to the Update Redis operation. func (client GroupClient) Update(resourceGroupName string, name string, parameters UpdateParameters) (result ResourceType, err error) { req, err := client.UpdatePreparer(resourceGroupName, name, parameters) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/models.go index f4ef80cc5..61282f7cc 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/models.go @@ -14,9 +14,8 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -127,8 +126,8 @@ type ExportRDBParameters struct { Container *string `json:"container,omitempty"` } -// FirewallRule is a firewall rule on a redis cache has a name, and describes a -// contiguous range of IP addresses permitted to connect +// FirewallRule is a firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses +// permitted to connect type FirewallRule struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -137,8 +136,7 @@ type FirewallRule struct { *FirewallRuleProperties `json:"properties,omitempty"` } -// FirewallRuleListResult is the response of list firewall rules Redis -// operation. +// FirewallRuleListResult is the response of list firewall rules Redis operation. type FirewallRuleListResult struct { autorest.Response `json:"-"` Value *[]FirewallRule `json:"value,omitempty"` @@ -157,8 +155,7 @@ func (client FirewallRuleListResult) FirewallRuleListResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// FirewallRuleProperties is specifies a range of IP addresses permitted to -// connect to the cache +// FirewallRuleProperties is specifies a range of IP addresses permitted to connect to the cache type FirewallRuleProperties struct { StartIP *string `json:"startIP,omitempty"` EndIP *string `json:"endIP,omitempty"` @@ -195,7 +192,7 @@ func (client ListResult) ListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// Operation is rEST API operation +// Operation is REST API operation type Operation struct { Name *string `json:"name,omitempty"` Display *OperationDisplay `json:"display,omitempty"` @@ -209,9 +206,8 @@ type OperationDisplay struct { Description *string `json:"description,omitempty"` } -// OperationListResult is result of the request to list REST API operations. It -// contains a list of operations and a URL nextLink to get the next set of -// results. +// OperationListResult is result of the request to list REST API operations. It contains a list of operations and a URL +// nextLink to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -310,7 +306,7 @@ type ScheduleEntry struct { MaintenanceWindow *string `json:"maintenanceWindow,omitempty"` } -// Sku is sKU parameters supplied to the create Redis operation. +// Sku is SKU parameters supplied to the create Redis operation. type Sku struct { Name SkuName `json:"name,omitempty"` Family SkuFamily `json:"family,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/operations.go old mode 100755 new mode 100644 index f0e825dd1..897382b75 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/operations.go @@ -14,9 +14,8 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// OperationsClient is the rEST API for Azure Redis Cache Service. +// OperationsClient is the REST API for Azure Redis Cache Service. type OperationsClient struct { ManagementClient } @@ -34,14 +33,12 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all of the available REST API operations of the Microsoft.Cache -// provider. +// List lists all of the available REST API operations of the Microsoft.Cache provider. func (client OperationsClient) List() (result OperationListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -121,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/patchschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/patchschedules.go index 44661ec9a..760585c91 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/patchschedules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/patchschedules.go @@ -14,9 +14,8 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,29 +24,25 @@ import ( "net/http" ) -// PatchSchedulesClient is the rEST API for Azure Redis Cache Service. +// PatchSchedulesClient is the REST API for Azure Redis Cache Service. type PatchSchedulesClient struct { ManagementClient } -// NewPatchSchedulesClient creates an instance of the PatchSchedulesClient -// client. +// NewPatchSchedulesClient creates an instance of the PatchSchedulesClient client. func NewPatchSchedulesClient(subscriptionID string) PatchSchedulesClient { return NewPatchSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPatchSchedulesClientWithBaseURI creates an instance of the -// PatchSchedulesClient client. +// NewPatchSchedulesClientWithBaseURI creates an instance of the PatchSchedulesClient client. func NewPatchSchedulesClientWithBaseURI(baseURI string, subscriptionID string) PatchSchedulesClient { return PatchSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or replace the patching schedule for Redis cache -// (requires Premium SKU). +// CreateOrUpdate create or replace the patching schedule for Redis cache (requires Premium SKU). // -// resourceGroupName is the name of the resource group. name is the name of the -// Redis cache. parameters is parameters to set the patching schedule for Redis -// cache. +// resourceGroupName is the name of the resource group. name is the name of the Redis cache. parameters is parameters +// to set the patching schedule for Redis cache. func (client PatchSchedulesClient) CreateOrUpdate(resourceGroupName string, name string, parameters PatchSchedule) (result PatchSchedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -119,11 +114,9 @@ func (client PatchSchedulesClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes the patching schedule of a redis cache (requires Premium -// SKU). +// Delete deletes the patching schedule of a redis cache (requires Premium SKU). // -// resourceGroupName is the name of the resource group. name is the name of the -// redis cache. +// resourceGroupName is the name of the resource group. name is the name of the redis cache. func (client PatchSchedulesClient) Delete(resourceGroupName string, name string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, name) if err != nil { @@ -187,8 +180,7 @@ func (client PatchSchedulesClient) DeleteResponder(resp *http.Response) (result // Get gets the patching schedule of a redis cache (requires Premium SKU). // -// resourceGroupName is the name of the resource group. name is the name of the -// redis cache. +// resourceGroupName is the name of the resource group. name is the name of the redis cache. func (client PatchSchedulesClient) Get(resourceGroupName string, name string) (result PatchSchedule, err error) { req, err := client.GetPreparer(resourceGroupName, name) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go index be0f08bd6..a5d8e1427 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/redis/version.go @@ -14,15 +14,15 @@ package redis // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-redis/2017-02-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-redis/2016-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/client.go index ea5cfe545..9c70f1bd4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/client.go @@ -1,7 +1,6 @@ -// Package relay implements the Azure ARM Relay service API version 2016-07-01. +// Package relay implements the Azure ARM Relay service API version 2017-04-01. // -// Use these API to manage Azure Relay resources through Azure Resources -// Manager. +// Use these API to manage Azure Relay resources through Azure Resource Manager. package relay // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/hybridconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/hybridconnections.go index 8812f0072..b86cf63a8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/hybridconnections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/hybridconnections.go @@ -14,9 +14,8 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,25 @@ import ( "net/http" ) -// HybridConnectionsClient is the use these API to manage Azure Relay resources -// through Azure Resources Manager. +// HybridConnectionsClient is the use these API to manage Azure Relay resources through Azure Resource Manager. type HybridConnectionsClient struct { ManagementClient } -// NewHybridConnectionsClient creates an instance of the -// HybridConnectionsClient client. +// NewHybridConnectionsClient creates an instance of the HybridConnectionsClient client. func NewHybridConnectionsClient(subscriptionID string) HybridConnectionsClient { return NewHybridConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHybridConnectionsClientWithBaseURI creates an instance of the -// HybridConnectionsClient client. +// NewHybridConnectionsClientWithBaseURI creates an instance of the HybridConnectionsClient client. func NewHybridConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HybridConnectionsClient { return HybridConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or Updates a service HybridConnection. This operation -// is idempotent. +// CreateOrUpdate creates or updates a service hybrid connection. This operation is idempotent. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. parameters is parameters supplied to create a -// HybridConnection. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. parameters is parameters supplied to create a hybrid connection. func (client HybridConnectionsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, hybridConnectionName string, parameters HybridConnection) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -59,13 +52,12 @@ func (client HybridConnectionsClient) CreateOrUpdate(resourceGroupName string, n Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.HybridConnectionProperties", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, - {Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + {Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, }}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "CreateOrUpdate") @@ -101,7 +93,7 @@ func (client HybridConnectionsClient) CreateOrUpdatePreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -110,7 +102,7 @@ func (client HybridConnectionsClient) CreateOrUpdatePreparer(resourceGroupName s autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -135,13 +127,11 @@ func (client HybridConnectionsClient) CreateOrUpdateResponder(resp *http.Respons return } -// CreateOrUpdateAuthorizationRule creates or Updates an authorization rule for -// a HybridConnection +// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for a hybrid connection. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. authorizationRuleName is the authorizationRule -// name. parameters is the authorization rule parameters +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name. parameters +// is the authorization rule parameters. func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -151,14 +141,12 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRule(resourceGr Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.UniqueItems, Rule: true, Chain: nil}}}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "CreateOrUpdateAuthorizationRule") @@ -195,7 +183,7 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRulePreparer(re "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -204,7 +192,7 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRulePreparer(re autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -229,11 +217,10 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRuleResponder(r return } -// Delete deletes a HybridConnection . +// Delete deletes a hybrid connection. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. func (client HybridConnectionsClient) Delete(resourceGroupName string, namespaceName string, hybridConnectionName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -243,8 +230,7 @@ func (client HybridConnectionsClient) Delete(resourceGroupName string, namespace Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "Delete") } @@ -278,7 +264,7 @@ func (client HybridConnectionsClient) DeletePreparer(resourceGroupName string, n "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -286,7 +272,7 @@ func (client HybridConnectionsClient) DeletePreparer(resourceGroupName string, n preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -309,12 +295,10 @@ func (client HybridConnectionsClient) DeleteResponder(resp *http.Response) (resu return } -// DeleteAuthorizationRule deletes a HybridConnection authorization rule +// DeleteAuthorizationRule deletes a hybrid connection authorization rule. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. authorizationRuleName is the authorizationRule -// name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name. func (client HybridConnectionsClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -324,11 +308,9 @@ func (client HybridConnectionsClient) DeleteAuthorizationRule(resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "DeleteAuthorizationRule") } @@ -363,7 +345,7 @@ func (client HybridConnectionsClient) DeleteAuthorizationRulePreparer(resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -371,7 +353,7 @@ func (client HybridConnectionsClient) DeleteAuthorizationRulePreparer(resourceGr preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -394,11 +376,10 @@ func (client HybridConnectionsClient) DeleteAuthorizationRuleResponder(resp *htt return } -// Get returns the description for the specified HybridConnection. +// Get returns the description for the specified hybrid connection. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. func (client HybridConnectionsClient) Get(resourceGroupName string, namespaceName string, hybridConnectionName string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -408,8 +389,7 @@ func (client HybridConnectionsClient) Get(resourceGroupName string, namespaceNam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "Get") } @@ -443,7 +423,7 @@ func (client HybridConnectionsClient) GetPreparer(resourceGroupName string, name "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -451,7 +431,7 @@ func (client HybridConnectionsClient) GetPreparer(resourceGroupName string, name preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -475,13 +455,10 @@ func (client HybridConnectionsClient) GetResponder(resp *http.Response) (result return } -// GetAuthorizationRule hybridConnection authorizationRule for a -// HybridConnection by name. +// GetAuthorizationRule hybrid connection authorization rule for a hybrid connection by name. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. authorizationRuleName is the authorizationRule -// name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name. func (client HybridConnectionsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -491,11 +468,9 @@ func (client HybridConnectionsClient) GetAuthorizationRule(resourceGroupName str Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "GetAuthorizationRule") } @@ -530,7 +505,7 @@ func (client HybridConnectionsClient) GetAuthorizationRulePreparer(resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -538,7 +513,7 @@ func (client HybridConnectionsClient) GetAuthorizationRulePreparer(resourceGroup preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -562,11 +537,10 @@ func (client HybridConnectionsClient) GetAuthorizationRuleResponder(resp *http.R return } -// ListAuthorizationRules authorization rules for a HybridConnection. +// ListAuthorizationRules authorization rules for a hybrid connection. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. func (client HybridConnectionsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, hybridConnectionName string) (result AuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -576,8 +550,7 @@ func (client HybridConnectionsClient) ListAuthorizationRules(resourceGroupName s Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "ListAuthorizationRules") } @@ -611,7 +584,7 @@ func (client HybridConnectionsClient) ListAuthorizationRulesPreparer(resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -619,7 +592,7 @@ func (client HybridConnectionsClient) ListAuthorizationRulesPreparer(resourceGro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -667,10 +640,54 @@ func (client HybridConnectionsClient) ListAuthorizationRulesNextResults(lastResu return } -// ListByNamespace lists the HybridConnection within the namespace. +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client HybridConnectionsClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, hybridConnectionName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) { + resultChan := make(chan AuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, hybridConnectionName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByNamespace lists the hybrid connection within the namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name func (client HybridConnectionsClient) ListByNamespace(resourceGroupName string, namespaceName string) (result HybridConnectionListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -711,7 +728,7 @@ func (client HybridConnectionsClient) ListByNamespacePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -719,7 +736,7 @@ func (client HybridConnectionsClient) ListByNamespacePreparer(resourceGroupName preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -767,13 +784,56 @@ func (client HybridConnectionsClient) ListByNamespaceNextResults(lastResults Hyb return } -// ListKeys primary and Secondary ConnectionStrings to the HybridConnection. +// ListByNamespaceComplete gets all elements from the list without paging. +func (client HybridConnectionsClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan HybridConnection, <-chan error) { + resultChan := make(chan HybridConnection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByNamespace(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByNamespaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeys primary and secondary connection strings to the hybrid connection. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. authorizationRuleName is the authorizationRule -// name. -func (client HybridConnectionsClient) ListKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result AuthorizationRuleKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name. +func (client HybridConnectionsClient) ListKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -782,11 +842,9 @@ func (client HybridConnectionsClient) ListKeys(resourceGroupName string, namespa Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "ListKeys") } @@ -821,7 +879,7 @@ func (client HybridConnectionsClient) ListKeysPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -829,7 +887,7 @@ func (client HybridConnectionsClient) ListKeysPreparer(resourceGroupName string, preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/ListKeys", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/listKeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -842,7 +900,7 @@ func (client HybridConnectionsClient) ListKeysSender(req *http.Request) (*http.R // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client HybridConnectionsClient) ListKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) { +func (client HybridConnectionsClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -853,14 +911,12 @@ func (client HybridConnectionsClient) ListKeysResponder(resp *http.Response) (re return } -// RegenerateKeys regenerates the Primary or Secondary ConnectionStrings to the -// HybridConnection +// RegenerateKeys regenerates the primary or secondary connection strings to the hybrid connection. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name hybridConnectionName is -// the hybrid connection name. authorizationRuleName is the authorizationRule -// name. parameters is parameters supplied to regenerate Auth Rule. -func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result AuthorizationRuleKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name. parameters +// is parameters supplied to regenerate authorization rule. +func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -869,11 +925,9 @@ func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, n Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: hybridConnectionName, - Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "RegenerateKeys") } @@ -899,7 +953,7 @@ func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, n } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "hybridConnectionName": autorest.Encode("path", hybridConnectionName), @@ -908,7 +962,7 @@ func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -917,7 +971,7 @@ func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName s autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -931,7 +985,7 @@ func (client HybridConnectionsClient) RegenerateKeysSender(req *http.Request) (* // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client HybridConnectionsClient) RegenerateKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) { +func (client HybridConnectionsClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/models.go index fb724b6ee..ea6d0a5b7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/models.go @@ -14,9 +14,8 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -37,14 +36,32 @@ const ( Send AccessRights = "Send" ) -// PolicyKey enumerates the values for policy key. -type PolicyKey string +// KeyType enumerates the values for key type. +type KeyType string const ( - // PrimaryKey specifies the primary key state for policy key. - PrimaryKey PolicyKey = "PrimaryKey" - // SecondaryKey specifies the secondary key state for policy key. - SecondaryKey PolicyKey = "SecondaryKey" + // PrimaryKey specifies the primary key state for key type. + PrimaryKey KeyType = "PrimaryKey" + // SecondaryKey specifies the secondary key state for key type. + SecondaryKey KeyType = "SecondaryKey" +) + +// ProvisioningStateEnum enumerates the values for provisioning state enum. +type ProvisioningStateEnum string + +const ( + // Created specifies the created state for provisioning state enum. + Created ProvisioningStateEnum = "Created" + // Deleted specifies the deleted state for provisioning state enum. + Deleted ProvisioningStateEnum = "Deleted" + // Failed specifies the failed state for provisioning state enum. + Failed ProvisioningStateEnum = "Failed" + // Succeeded specifies the succeeded state for provisioning state enum. + Succeeded ProvisioningStateEnum = "Succeeded" + // Unknown specifies the unknown state for provisioning state enum. + Unknown ProvisioningStateEnum = "Unknown" + // Updating specifies the updating state for provisioning state enum. + Updating ProvisioningStateEnum = "Updating" ) // RelaytypeEnum enumerates the values for relaytype enum. @@ -57,38 +74,35 @@ const ( NetTCP RelaytypeEnum = "NetTcp" ) +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // Standard specifies the standard state for sku tier. + Standard SkuTier = "Standard" +) + // UnavailableReason enumerates the values for unavailable reason. type UnavailableReason string const ( // InvalidName specifies the invalid name state for unavailable reason. InvalidName UnavailableReason = "InvalidName" - // NameInLockdown specifies the name in lockdown state for unavailable - // reason. + // NameInLockdown specifies the name in lockdown state for unavailable reason. NameInLockdown UnavailableReason = "NameInLockdown" // NameInUse specifies the name in use state for unavailable reason. NameInUse UnavailableReason = "NameInUse" // None specifies the none state for unavailable reason. None UnavailableReason = "None" - // SubscriptionIsDisabled specifies the subscription is disabled state for - // unavailable reason. + // SubscriptionIsDisabled specifies the subscription is disabled state for unavailable reason. SubscriptionIsDisabled UnavailableReason = "SubscriptionIsDisabled" - // TooManyNamespaceInCurrentSubscription specifies the too many namespace - // in current subscription state for unavailable reason. + // TooManyNamespaceInCurrentSubscription specifies the too many namespace in current subscription state for unavailable + // reason. TooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription" ) -// AuthorizationRule is description of a Namespace AuthorizationRules. -type AuthorizationRule struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - *AuthorizationRuleProperties `json:"properties,omitempty"` -} - -// AuthorizationRuleKeys is namespace/Relay Connection String -type AuthorizationRuleKeys struct { +// AccessKeys is namespace/Relay Connection String +type AccessKeys struct { autorest.Response `json:"-"` PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"` SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` @@ -97,7 +111,21 @@ type AuthorizationRuleKeys struct { KeyName *string `json:"keyName,omitempty"` } -// AuthorizationRuleListResult is the response of the List Namespace operation. +// AuthorizationRule is description of a namespace authorization rule. +type AuthorizationRule struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *AuthorizationRuleProperties `json:"properties,omitempty"` +} + +// AuthorizationRuleProperties is authorization rule properties. +type AuthorizationRuleProperties struct { + Rights *[]AccessRights `json:"rights,omitempty"` +} + +// AuthorizationRuleListResult is the response from the list namespace operation. type AuthorizationRuleListResult struct { autorest.Response `json:"-"` Value *[]AuthorizationRule `json:"value,omitempty"` @@ -116,34 +144,27 @@ func (client AuthorizationRuleListResult) AuthorizationRuleListResultPreparer() autorest.WithBaseURL(to.String(client.NextLink))) } -// AuthorizationRuleProperties is authorizationRule properties. -type AuthorizationRuleProperties struct { - Rights *[]AccessRights `json:"rights,omitempty"` -} - -// CheckNameAvailability is description of a Check Name availability request -// properties. +// CheckNameAvailability is description of the check name availability request properties. type CheckNameAvailability struct { Name *string `json:"name,omitempty"` } -// CheckNameAvailabilityResult is description of a Check Name availability -// request properties. +// CheckNameAvailabilityResult is description of the check name availability request properties. type CheckNameAvailabilityResult struct { autorest.Response `json:"-"` + Message *string `json:"message,omitempty"` NameAvailable *bool `json:"nameAvailable,omitempty"` Reason UnavailableReason `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` } -// ErrorResponse is error reponse indicates Relay service is not able to -// process the incoming request. The reason is provided in the error message. +// ErrorResponse is error reponse indicates Relay service is not able to process the incoming request. The reason is +// provided in the error message. type ErrorResponse struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } -// HybridConnection is description of HybridConnection Resource. +// HybridConnection is description of hybrid connection resource. type HybridConnection struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -152,8 +173,16 @@ type HybridConnection struct { *HybridConnectionProperties `json:"properties,omitempty"` } -// HybridConnectionListResult is the response of the List HybridConnection -// operation. +// HybridConnectionProperties is properties of the HybridConnection. +type HybridConnectionProperties struct { + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + ListenerCount *int32 `json:"listenerCount,omitempty"` + RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"` + UserMetadata *string `json:"userMetadata,omitempty"` +} + +// HybridConnectionListResult is the response of the list hybrid connection operation. type HybridConnectionListResult struct { autorest.Response `json:"-"` Value *[]HybridConnection `json:"value,omitempty"` @@ -172,16 +201,7 @@ func (client HybridConnectionListResult) HybridConnectionListResultPreparer() (* autorest.WithBaseURL(to.String(client.NextLink))) } -// HybridConnectionProperties is properties of the HybridConnection. -type HybridConnectionProperties struct { - CreatedAt *date.Time `json:"createdAt,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` - ListenerCount *int32 `json:"listenerCount,omitempty"` - RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"` - UserMetadata *string `json:"userMetadata,omitempty"` -} - -// Namespace is description of a Namespace resource. +// Namespace is description of a namespace resource. type Namespace struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -193,7 +213,7 @@ type Namespace struct { *NamespaceProperties `json:"properties,omitempty"` } -// NamespaceListResult is the response of the List Namespace operation. +// NamespaceListResult is the response from the list namespace operation. type NamespaceListResult struct { autorest.Response `json:"-"` Value *[]Namespace `json:"value,omitempty"` @@ -212,23 +232,16 @@ func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// NamespaceProperties is properties of the Namespace. +// NamespaceProperties is properties of the namespace. type NamespaceProperties struct { - ProvisioningState *string `json:"provisioningState,omitempty"` - CreatedAt *date.Time `json:"createdAt,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` - ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` - MetricID *string `json:"metricId,omitempty"` + ProvisioningState ProvisioningStateEnum `json:"provisioningState,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` + MetricID *string `json:"metricId,omitempty"` } -// NamespaceUpdateParameter is parameters supplied to the Patch Namespace -// operation. -type NamespaceUpdateParameter struct { - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` -} - -// Operation is a EventHub REST API operation +// Operation is a Relay REST API operation. type Operation struct { Name *string `json:"name,omitempty"` Display *OperationDisplay `json:"display,omitempty"` @@ -241,8 +254,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of the request to list EventHub operations. It -// contains a list of operations and a URL link to get the next set of results. +// OperationListResult is result of the request to list Relay operations. It contains a list of operations and a URL +// link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -261,26 +274,35 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// RegenerateKeysParameters is parameters supplied to the Regenerate -// Authorization Rule operation. -type RegenerateKeysParameters struct { - PolicyKey PolicyKey `json:"policyKey,omitempty"` +// RegenerateAccessKeyParameters is parameters supplied to the regenerate authorization rule operation, specifies which +// key neeeds to be reset. +type RegenerateAccessKeyParameters struct { + KeyType KeyType `json:"keyType,omitempty"` + Key *string `json:"key,omitempty"` } -// Resource is the Resource definition +// Resource is the resource definition. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } -// Sku is sku of the Namespace. -type Sku struct { - Name *string `json:"name,omitempty"` - Tier *string `json:"tier,omitempty"` +// ResourceNamespacePatch is definition of resource. +type ResourceNamespacePatch struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` } -// TrackedResource is definition of Resource +// Sku is SKU of the namespace. +type Sku struct { + Name *string `json:"name,omitempty"` + Tier SkuTier `json:"tier,omitempty"` +} + +// TrackedResource is definition of resource. type TrackedResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -289,7 +311,17 @@ type TrackedResource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// WcfRelay is description of WcfRelays Resource. +// UpdateParameters is description of a namespace resource. +type UpdateParameters struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *Sku `json:"sku,omitempty"` + *NamespaceProperties `json:"properties,omitempty"` +} + +// WcfRelay is description of the WCF relay resource. type WcfRelay struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -298,19 +330,19 @@ type WcfRelay struct { *WcfRelayProperties `json:"properties,omitempty"` } -// WcfRelayProperties is properties of the WcfRelay Properties. +// WcfRelayProperties is properties of the WCF relay. type WcfRelayProperties struct { - RelayType RelaytypeEnum `json:"relayType,omitempty"` + IsDynamic *bool `json:"isDynamic,omitempty"` CreatedAt *date.Time `json:"createdAt,omitempty"` UpdatedAt *date.Time `json:"updatedAt,omitempty"` ListenerCount *int32 `json:"listenerCount,omitempty"` + RelayType RelaytypeEnum `json:"relayType,omitempty"` RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"` RequiresTransportSecurity *bool `json:"requiresTransportSecurity,omitempty"` - IsDynamic *bool `json:"isDynamic,omitempty"` UserMetadata *string `json:"userMetadata,omitempty"` } -// WcfRelaysListResult is the response of the List WcfRelays operation. +// WcfRelaysListResult is the response of the list WCF relay operation. type WcfRelaysListResult struct { autorest.Response `json:"-"` Value *[]WcfRelay `json:"value,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/namespaces.go index 1f3b4f05f..1a39ffa69 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/namespaces.go @@ -14,9 +14,8 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// NamespacesClient is the use these API to manage Azure Relay resources -// through Azure Resources Manager. +// NamespacesClient is the use these API to manage Azure Relay resources through Azure Resource Manager. type NamespacesClient struct { ManagementClient } @@ -36,15 +34,14 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient -// client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailabilityMethod check the give namespace name availability. +// CheckNameAvailabilityMethod check the specified namespace name availability. // -// parameters is parameters to check availability of the given namespace name +// parameters is parameters to check availability of the specified namespace name. func (client NamespacesClient) CheckNameAvailabilityMethod(parameters CheckNameAvailability) (result CheckNameAvailabilityResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -79,7 +76,7 @@ func (client NamespacesClient) CheckNameAvailabilityMethodPreparer(parameters Ch "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -88,7 +85,7 @@ func (client NamespacesClient) CheckNameAvailabilityMethodPreparer(parameters Ch autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/CheckNameAvailability", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/checkNameAvailability", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -113,14 +110,11 @@ func (client NamespacesClient) CheckNameAvailabilityMethodResponder(resp *http.R return } -// CreateOrUpdate create Azure Relay namespace. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate create Azure Relay namespace. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name parameters is parameters -// supplied to create a Namespace Resource. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// parameters is parameters supplied to create a namespace resource. func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters Namespace, cancel <-chan struct{}) (<-chan Namespace, <-chan error) { resultChan := make(chan Namespace, 1) errChan := make(chan error, 1) @@ -133,9 +127,7 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "parameters.Sku.Tier", Name: validation.Null, Rule: true, Chain: nil}, - }}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "CreateOrUpdate") close(errChan) close(resultChan) @@ -146,8 +138,10 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac var err error var result Namespace defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -180,7 +174,7 @@ func (client NamespacesClient) CreateOrUpdatePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -209,19 +203,17 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdateAuthorizationRule creates or Updates an authorization rule for -// a namespace +// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for a namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name authorizationRuleName is -// the authorizationRule name. parameters is the authorization rule parameters +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorization rule name. parameters is the authorization rule parameters. func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -231,11 +223,10 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.UniqueItems, Rule: true, Chain: nil}}}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "CreateOrUpdateAuthorizationRule") @@ -271,7 +262,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -280,7 +271,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceG autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -305,14 +296,11 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht return } -// Delete deletes an existing namespace. This operation also removes all -// associated resources under the namespace. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes an existing namespace. This operation also removes all associated resources under the namespace. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name func (client NamespacesClient) Delete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -333,8 +321,10 @@ func (client NamespacesClient) Delete(resourceGroupName string, namespaceName st var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -367,7 +357,7 @@ func (client NamespacesClient) DeletePreparer(resourceGroupName string, namespac "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -400,11 +390,10 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto return } -// DeleteAuthorizationRule deletes a namespace authorization rule +// DeleteAuthorizationRule deletes a namespace authorization rule. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name authorizationRuleName is -// the authorizationRule name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorization rule name. func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -414,8 +403,7 @@ func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "DeleteAuthorizationRule") } @@ -449,7 +437,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -457,7 +445,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(resourceGroupName preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -482,8 +470,7 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo // Get returns the description for the specified namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result Namespace, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -524,7 +511,7 @@ func (client NamespacesClient) GetPreparer(resourceGroupName string, namespaceNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -558,9 +545,8 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa // GetAuthorizationRule authorization rule for a namespace by name. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name authorizationRuleName is -// the authorizationRule name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorization rule name. func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -570,8 +556,7 @@ func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, na Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "GetAuthorizationRule") } @@ -605,7 +590,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -613,7 +598,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(resourceGroupName st preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -637,8 +622,7 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response return } -// List lists all the available namespaces within the subscription irrespective -// of the resourceGroups. +// List lists all the available namespaces within the subscription regardless of the resourceGroups. func (client NamespacesClient) List() (result NamespaceListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -667,7 +651,7 @@ func (client NamespacesClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -675,7 +659,7 @@ func (client NamespacesClient) ListPreparer() (*http.Request, error) { preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/Namespaces", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/namespaces", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -723,10 +707,54 @@ func (client NamespacesClient) ListNextResults(lastResults NamespaceListResult) return } +// ListComplete gets all elements from the list without paging. +func (client NamespacesClient) ListComplete(cancel <-chan struct{}) (<-chan Namespace, <-chan error) { + resultChan := make(chan Namespace) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAuthorizationRules authorization rules for a namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result AuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -767,7 +795,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -775,7 +803,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(resourceGroupName preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -823,11 +851,54 @@ func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults Aut return } -// ListByResourceGroup lists all the available namespaces within the -// ResourceGroup. +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client NamespacesClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) { + resultChan := make(chan AuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup lists all the available namespaces within the ResourceGroup. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. +// resourceGroupName is name of the Resource group within the Azure subscription. func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result NamespaceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -864,7 +935,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -872,7 +943,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(resourceGroupName str preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/Namespaces", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -920,12 +991,56 @@ func (client NamespacesClient) ListByResourceGroupNextResults(lastResults Namesp return } -// ListKeys primary and Secondary ConnectionStrings to the namespace +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client NamespacesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Namespace, <-chan error) { + resultChan := make(chan Namespace) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeys primary and secondary connection strings to the namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name authorizationRuleName is -// the authorizationRule name. -func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AuthorizationRuleKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorization rule name. +func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -934,8 +1049,7 @@ func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "ListKeys") } @@ -969,7 +1083,7 @@ func (client NamespacesClient) ListKeysPreparer(resourceGroupName string, namesp "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -977,7 +1091,7 @@ func (client NamespacesClient) ListKeysPreparer(resourceGroupName string, namesp preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -990,7 +1104,7 @@ func (client NamespacesClient) ListKeysSender(req *http.Request) (*http.Response // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) { +func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1001,14 +1115,12 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Au return } -// RegenerateKeys regenerates the Primary or Secondary ConnectionStrings to the -// namespace +// RegenerateKeys regenerates the primary or secondary connection strings to the namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name authorizationRuleName is -// the authorizationRule name. parameters is parameters supplied to regenerate -// Auth Rule. -func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result AuthorizationRuleKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorization rule name. parameters is parameters supplied to regenerate authorization +// rule. +func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -1017,8 +1129,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "RegenerateKeys") } @@ -1044,7 +1155,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -1052,7 +1163,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1061,7 +1172,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -1075,7 +1186,7 @@ func (client NamespacesClient) RegenerateKeysSender(req *http.Request) (*http.Re // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) { +func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1086,13 +1197,12 @@ func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (res return } -// Update creates or updates a namespace. Once created, this namespace's -// resource manifest is immutable. This operation is idempotent. +// Update creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation +// is idempotent. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name parameters is parameters -// for updating a namespace resource. -func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameter) (result Namespace, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// parameters is parameters for updating a namespace resource. +func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters UpdateParameters) (result Namespace, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -1125,14 +1235,14 @@ func (client NamespacesClient) Update(resourceGroupName string, namespaceName st } // UpdatePreparer prepares the Update request. -func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameter) (*http.Request, error) { +func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters UpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1159,7 +1269,7 @@ func (client NamespacesClient) UpdateResponder(resp *http.Response) (result Name err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/operations.go index d1273efe2..c88fd4a97 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/operations.go @@ -14,9 +14,8 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// OperationsClient is the use these API to manage Azure Relay resources -// through Azure Resources Manager. +// OperationsClient is the use these API to manage Azure Relay resources through Azure Resource Manager. type OperationsClient struct { ManagementClient } @@ -35,13 +33,12 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all of the available Relay REST API operations. +// List lists all available Relay REST API operations. func (client OperationsClient) List() (result OperationListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -66,7 +63,7 @@ func (client OperationsClient) List() (result OperationListResult, err error) { // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -121,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go index de4fd8b7d..cf4d1a58c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/version.go @@ -14,15 +14,15 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-relay/2017-04-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-relay/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/wcfrelays.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/wcfrelays.go index eb1a57661..78177d514 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/wcfrelays.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/relay/wcfrelays.go @@ -14,9 +14,8 @@ package relay // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// WCFRelaysClient is the use these API to manage Azure Relay resources through -// Azure Resources Manager. +// WCFRelaysClient is the use these API to manage Azure Relay resources through Azure Resource Manager. type WCFRelaysClient struct { ManagementClient } @@ -36,17 +34,15 @@ func NewWCFRelaysClient(subscriptionID string) WCFRelaysClient { return NewWCFRelaysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient -// client. +// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient client. func NewWCFRelaysClientWithBaseURI(baseURI string, subscriptionID string) WCFRelaysClient { return WCFRelaysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or Updates a WCFRelay. This operation is idempotent. +// CreateOrUpdate creates or updates a WCF relay. This operation is idempotent. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name parameters is parameters supplied to create a WCFRelays. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. parameters is parameters supplied to create a WCF relay. func (client WCFRelaysClient) CreateOrUpdate(resourceGroupName string, namespaceName string, relayName string, parameters WcfRelay) (result WcfRelay, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -56,8 +52,14 @@ func (client WCFRelaysClient) CreateOrUpdate(resourceGroupName string, namespace Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.WcfRelayProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + {Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}, + }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "CreateOrUpdate") } @@ -91,7 +93,7 @@ func (client WCFRelaysClient) CreateOrUpdatePreparer(resourceGroupName string, n "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -100,7 +102,7 @@ func (client WCFRelaysClient) CreateOrUpdatePreparer(resourceGroupName string, n autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -125,13 +127,11 @@ func (client WCFRelaysClient) CreateOrUpdateResponder(resp *http.Response) (resu return } -// CreateOrUpdateAuthorizationRule creates or Updates an authorization rule for -// a WCFRelays +// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for a WCF relay. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name authorizationRuleName is the authorizationRule name. parameters is the -// authorization rule parameters. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. authorizationRuleName is the authorization rule name. parameters is the authorization +// rule parameters. func (client WCFRelaysClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -141,14 +141,12 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRule(resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.UniqueItems, Rule: true, Chain: nil}}}, }}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "CreateOrUpdateAuthorizationRule") @@ -185,7 +183,7 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRulePreparer(resourceGr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -194,7 +192,7 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRulePreparer(resourceGr autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -219,11 +217,10 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRuleResponder(resp *htt return } -// Delete deletes a WCFRelays . +// Delete deletes a WCF relay. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. func (client WCFRelaysClient) Delete(resourceGroupName string, namespaceName string, relayName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -233,8 +230,7 @@ func (client WCFRelaysClient) Delete(resourceGroupName string, namespaceName str Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "Delete") } @@ -268,7 +264,7 @@ func (client WCFRelaysClient) DeletePreparer(resourceGroupName string, namespace "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -276,7 +272,7 @@ func (client WCFRelaysClient) DeletePreparer(resourceGroupName string, namespace preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -299,11 +295,10 @@ func (client WCFRelaysClient) DeleteResponder(resp *http.Response) (result autor return } -// DeleteAuthorizationRule deletes a WCFRelays authorization rule +// DeleteAuthorizationRule deletes a WCF relay authorization rule. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name authorizationRuleName is the authorizationRule name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. authorizationRuleName is the authorization rule name. func (client WCFRelaysClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -313,11 +308,9 @@ func (client WCFRelaysClient) DeleteAuthorizationRule(resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "DeleteAuthorizationRule") } @@ -352,7 +345,7 @@ func (client WCFRelaysClient) DeleteAuthorizationRulePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -360,7 +353,7 @@ func (client WCFRelaysClient) DeleteAuthorizationRulePreparer(resourceGroupName preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -383,11 +376,10 @@ func (client WCFRelaysClient) DeleteAuthorizationRuleResponder(resp *http.Respon return } -// Get returns the description for the specified WCFRelays. +// Get returns the description for the specified WCF relay. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. func (client WCFRelaysClient) Get(resourceGroupName string, namespaceName string, relayName string) (result WcfRelay, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -397,8 +389,7 @@ func (client WCFRelaysClient) Get(resourceGroupName string, namespaceName string Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "Get") } @@ -432,7 +423,7 @@ func (client WCFRelaysClient) GetPreparer(resourceGroupName string, namespaceNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -440,7 +431,7 @@ func (client WCFRelaysClient) GetPreparer(resourceGroupName string, namespaceNam preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -464,11 +455,10 @@ func (client WCFRelaysClient) GetResponder(resp *http.Response) (result WcfRelay return } -// GetAuthorizationRule get authorizationRule for a WCFRelays by name. +// GetAuthorizationRule get authorizationRule for a WCF relay by name. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name authorizationRuleName is the authorizationRule name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. authorizationRuleName is the authorization rule name. func (client WCFRelaysClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result AuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -478,11 +468,9 @@ func (client WCFRelaysClient) GetAuthorizationRule(resourceGroupName string, nam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "GetAuthorizationRule") } @@ -517,7 +505,7 @@ func (client WCFRelaysClient) GetAuthorizationRulePreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -525,7 +513,7 @@ func (client WCFRelaysClient) GetAuthorizationRulePreparer(resourceGroupName str preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -549,11 +537,10 @@ func (client WCFRelaysClient) GetAuthorizationRuleResponder(resp *http.Response) return } -// ListAuthorizationRules authorization rules for a WCFRelays. +// ListAuthorizationRules authorization rules for a WCF relay. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. func (client WCFRelaysClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, relayName string) (result AuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -563,8 +550,7 @@ func (client WCFRelaysClient) ListAuthorizationRules(resourceGroupName string, n Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "ListAuthorizationRules") } @@ -598,7 +584,7 @@ func (client WCFRelaysClient) ListAuthorizationRulesPreparer(resourceGroupName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -606,7 +592,7 @@ func (client WCFRelaysClient) ListAuthorizationRulesPreparer(resourceGroupName s preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -654,10 +640,54 @@ func (client WCFRelaysClient) ListAuthorizationRulesNextResults(lastResults Auth return } -// ListByNamespace lists the WCFRelays within the namespace. +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client WCFRelaysClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, relayName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) { + resultChan := make(chan AuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, relayName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByNamespace lists the WCF relays within the namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name func (client WCFRelaysClient) ListByNamespace(resourceGroupName string, namespaceName string) (result WcfRelaysListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -698,7 +728,7 @@ func (client WCFRelaysClient) ListByNamespacePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -706,7 +736,7 @@ func (client WCFRelaysClient) ListByNamespacePreparer(resourceGroupName string, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -754,12 +784,56 @@ func (client WCFRelaysClient) ListByNamespaceNextResults(lastResults WcfRelaysLi return } -// ListKeys primary and Secondary ConnectionStrings to the WCFRelays. +// ListByNamespaceComplete gets all elements from the list without paging. +func (client WCFRelaysClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan WcfRelay, <-chan error) { + resultChan := make(chan WcfRelay) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByNamespace(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByNamespaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListKeys primary and secondary connection strings to the WCF relay. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name authorizationRuleName is the authorizationRule name. -func (client WCFRelaysClient) ListKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result AuthorizationRuleKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. authorizationRuleName is the authorization rule name. +func (client WCFRelaysClient) ListKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -768,11 +842,9 @@ func (client WCFRelaysClient) ListKeys(resourceGroupName string, namespaceName s Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "ListKeys") } @@ -807,7 +879,7 @@ func (client WCFRelaysClient) ListKeysPreparer(resourceGroupName string, namespa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -815,7 +887,7 @@ func (client WCFRelaysClient) ListKeysPreparer(resourceGroupName string, namespa preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/ListKeys", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/listKeys", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -828,7 +900,7 @@ func (client WCFRelaysClient) ListKeysSender(req *http.Request) (*http.Response, // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client WCFRelaysClient) ListKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) { +func (client WCFRelaysClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -839,14 +911,12 @@ func (client WCFRelaysClient) ListKeysResponder(resp *http.Response) (result Aut return } -// RegenerateKeys regenerates the Primary or Secondary ConnectionStrings to the -// WCFRelays +// RegenerateKeys regenerates the primary or secondary connection strings to the WCF relay. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the Namespace Name relayName is the relay -// name authorizationRuleName is the authorizationRule name. parameters is -// parameters supplied to regenerate Auth Rule. -func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result AuthorizationRuleKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// relayName is the relay name. authorizationRuleName is the authorization rule name. parameters is parameters supplied +// to regenerate authorization rule. +func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -855,11 +925,9 @@ func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespace Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: relayName, - Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "RegenerateKeys") } @@ -885,7 +953,7 @@ func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespace } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -894,7 +962,7 @@ func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, n "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-07-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -903,7 +971,7 @@ func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, n autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -917,7 +985,7 @@ func (client WCFRelaysClient) RegenerateKeysSender(req *http.Request) (*http.Res // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client WCFRelaysClient) RegenerateKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) { +func (client WCFRelaysClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/availabilitystatuses.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/availabilitystatuses.go index b8c8b7e01..d34b065b1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/availabilitystatuses.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/availabilitystatuses.go @@ -14,9 +14,8 @@ package resourcehealth // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,31 +28,26 @@ type AvailabilityStatusesClient struct { ManagementClient } -// NewAvailabilityStatusesClient creates an instance of the -// AvailabilityStatusesClient client. +// NewAvailabilityStatusesClient creates an instance of the AvailabilityStatusesClient client. func NewAvailabilityStatusesClient(subscriptionID string, resourceType string) AvailabilityStatusesClient { return NewAvailabilityStatusesClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceType) } -// NewAvailabilityStatusesClientWithBaseURI creates an instance of the -// AvailabilityStatusesClient client. +// NewAvailabilityStatusesClientWithBaseURI creates an instance of the AvailabilityStatusesClient client. func NewAvailabilityStatusesClientWithBaseURI(baseURI string, subscriptionID string, resourceType string) AvailabilityStatusesClient { return AvailabilityStatusesClient{NewWithBaseURI(baseURI, subscriptionID, resourceType)} } // GetByResource gets current availability status for a single resource // -// resourceURI is the fully qualified ID of the resource, including the -// resource name and resource type. Currently the API support not nested and -// one nesting level resource types : +// resourceURI is the fully qualified ID of the resource, including the resource name and resource type. Currently the +// API support not nested and one nesting level resource types : // /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} // and // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} -// filter is the filter to apply on the operation. For more information please -// see -// https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN -// expand is setting $expand=recommendedactions in url query expands the -// recommendedactions in the response. +// filter is the filter to apply on the operation. For more information please see +// https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN expand is setting +// $expand=recommendedactions in url query expands the recommendedactions in the response. func (client AvailabilityStatusesClient) GetByResource(resourceURI string, filter string, expand string) (result AvailabilityStatus, err error) { req, err := client.GetByResourcePreparer(resourceURI, filter, expand) if err != nil { @@ -82,7 +76,7 @@ func (client AvailabilityStatusesClient) GetByResourcePreparer(resourceURI strin "resourceUri": resourceURI, } - const APIVersion = "2015-01-01" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -120,21 +114,17 @@ func (client AvailabilityStatusesClient) GetByResourceResponder(resp *http.Respo return } -// List lists the historical availability statuses for a single resource. Use -// the nextLink property in the response to get the next page of availability -// status +// List lists all historical availability transitions and impacting events for a single resource. Use the nextLink +// property in the response to get the next page of availability status // -// resourceURI is the fully qualified ID of the resource, including the -// resource name and resource type. Currently the API support not nested and -// one nesting level resource types : +// resourceURI is the fully qualified ID of the resource, including the resource name and resource type. Currently the +// API support not nested and one nesting level resource types : // /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} // and // /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName} -// filter is the filter to apply on the operation. For more information please -// see -// https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN -// expand is setting $expand=recommendedactions in url query expands the -// recommendedactions in the response. +// filter is the filter to apply on the operation. For more information please see +// https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN expand is setting +// $expand=recommendedactions in url query expands the recommendedactions in the response. func (client AvailabilityStatusesClient) List(resourceURI string, filter string, expand string) (result AvailabilityStatusListResult, err error) { req, err := client.ListPreparer(resourceURI, filter, expand) if err != nil { @@ -163,7 +153,7 @@ func (client AvailabilityStatusesClient) ListPreparer(resourceURI string, filter "resourceUri": resourceURI, } - const APIVersion = "2015-01-01" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -225,15 +215,57 @@ func (client AvailabilityStatusesClient) ListNextResults(lastResults Availabilit return } -// ListByResourceGroup lists the current availability status for all the -// resources in the resource group. Use the nextLink property in the response -// to get the next page of availability statuses. +// ListComplete gets all elements from the list without paging. +func (client AvailabilityStatusesClient) ListComplete(resourceURI string, filter string, expand string, cancel <-chan struct{}) (<-chan AvailabilityStatus, <-chan error) { + resultChan := make(chan AvailabilityStatus) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceURI, filter, expand) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup lists the current availability status for all the resources in the resource group. Use the +// nextLink property in the response to get the next page of availability statuses. // -// resourceGroupName is the name of the resource group. filter is the filter to -// apply on the operation. For more information please see -// https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN -// expand is setting $expand=recommendedactions in url query expands the -// recommendedactions in the response. +// resourceGroupName is the name of the resource group. filter is the filter to apply on the operation. For more +// information please see https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN expand is +// setting $expand=recommendedactions in url query expands the recommendedactions in the response. func (client AvailabilityStatusesClient) ListByResourceGroup(resourceGroupName string, filter string, expand string) (result AvailabilityStatusListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, filter, expand) if err != nil { @@ -263,7 +295,7 @@ func (client AvailabilityStatusesClient) ListByResourceGroupPreparer(resourceGro "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-01-01" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -325,15 +357,57 @@ func (client AvailabilityStatusesClient) ListByResourceGroupNextResults(lastResu return } -// ListBySubscriptionID lists the current availability status for all the -// resources in the subscription. Use the nextLink property in the response to -// get the next page of availability statuses. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AvailabilityStatusesClient) ListByResourceGroupComplete(resourceGroupName string, filter string, expand string, cancel <-chan struct{}) (<-chan AvailabilityStatus, <-chan error) { + resultChan := make(chan AvailabilityStatus) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, filter, expand) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListBySubscriptionID lists the current availability status for all the resources in the subscription. Use the +// nextLink property in the response to get the next page of availability statuses. // -// filter is the filter to apply on the operation. For more information please -// see -// https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN -// expand is setting $expand=recommendedactions in url query expands the -// recommendedactions in the response. +// filter is the filter to apply on the operation. For more information please see +// https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN expand is setting +// $expand=recommendedactions in url query expands the recommendedactions in the response. func (client AvailabilityStatusesClient) ListBySubscriptionID(filter string, expand string) (result AvailabilityStatusListResult, err error) { req, err := client.ListBySubscriptionIDPreparer(filter, expand) if err != nil { @@ -362,7 +436,7 @@ func (client AvailabilityStatusesClient) ListBySubscriptionIDPreparer(filter str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-01-01" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -423,3 +497,48 @@ func (client AvailabilityStatusesClient) ListBySubscriptionIDNextResults(lastRes return } + +// ListBySubscriptionIDComplete gets all elements from the list without paging. +func (client AvailabilityStatusesClient) ListBySubscriptionIDComplete(filter string, expand string, cancel <-chan struct{}) (<-chan AvailabilityStatus, <-chan error) { + resultChan := make(chan AvailabilityStatus) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscriptionID(filter, expand) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionIDNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/client.go index a5a18afe8..8062561cc 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/client.go @@ -1,5 +1,4 @@ -// Package resourcehealth implements the Azure ARM Resourcehealth service API -// version 2015-01-01. +// Package resourcehealth implements the Azure ARM Resourcehealth service API version 2017-07-01. // // The Resource Health Client. package resourcehealth @@ -18,9 +17,8 @@ package resourcehealth // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/models.go index 25183369c..1cabcf38f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/models.go @@ -14,9 +14,8 @@ package resourcehealth // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -31,8 +30,7 @@ type AvailabilityStateValues string const ( // Available specifies the available state for availability state values. Available AvailabilityStateValues = "Available" - // Unavailable specifies the unavailable state for availability state - // values. + // Unavailable specifies the unavailable state for availability state values. Unavailable AvailabilityStateValues = "Unavailable" // Unknown specifies the unknown state for availability state values. Unknown AvailabilityStateValues = "Unknown" @@ -65,6 +63,10 @@ type AvailabilityStatusProperties struct { DetailedStatus *string `json:"detailedStatus,omitempty"` ReasonType *string `json:"reasonType,omitempty"` RootCauseAttributionTime *date.Time `json:"rootCauseAttributionTime,omitempty"` + HealthEventType *string `json:"healthEventType,omitempty"` + HealthEventCause *string `json:"healthEventCause,omitempty"` + HealthEventCategory *string `json:"healthEventCategory,omitempty"` + HealthEventID *string `json:"healthEventId,omitempty"` ResolutionETA *date.Time `json:"resolutionETA,omitempty"` OccuredTime *date.Time `json:"occuredTime,omitempty"` ReasonChronicity ReasonChronicityTypes `json:"reasonChronicity,omitempty"` @@ -74,17 +76,15 @@ type AvailabilityStatusProperties struct { ServiceImpactingEvents *[]ServiceImpactingEvent `json:"serviceImpactingEvents,omitempty"` } -// AvailabilityStatusPropertiesRecentlyResolvedState is an annotation -// describing a change in the availabilityState to Available from Unavailable -// with a reasonType of type Unplanned +// AvailabilityStatusPropertiesRecentlyResolvedState is an annotation describing a change in the availabilityState to +// Available from Unavailable with a reasonType of type Unplanned type AvailabilityStatusPropertiesRecentlyResolvedState struct { UnavailableOccurredTime *date.Time `json:"unavailableOccurredTime,omitempty"` ResolvedTime *date.Time `json:"resolvedTime,omitempty"` UnavailabilitySummary *string `json:"unavailabilitySummary,omitempty"` } -// AvailabilityStatusListResult is the List availabilityStatus operation -// response. +// AvailabilityStatusListResult is the List availabilityStatus operation response. type AvailabilityStatusListResult struct { autorest.Response `json:"-"` Value *[]AvailabilityStatus `json:"value,omitempty"` @@ -130,16 +130,14 @@ type OperationListResult struct { Value *[]Operation `json:"value,omitempty"` } -// RecommendedAction is lists actions the user can take based on the current -// availabilityState of the resource. +// RecommendedAction is lists actions the user can take based on the current availabilityState of the resource. type RecommendedAction struct { Action *string `json:"action,omitempty"` ActionURL *string `json:"actionUrl,omitempty"` ActionURLText *string `json:"actionUrlText,omitempty"` } -// ServiceImpactingEvent is lists the service impacting events that may be -// affecting the health of the resource. +// ServiceImpactingEvent is lists the service impacting events that may be affecting the health of the resource. type ServiceImpactingEvent struct { EventStartTime *date.Time `json:"eventStartTime,omitempty"` EventStatusLastModifiedTime *date.Time `json:"eventStatusLastModifiedTime,omitempty"` @@ -148,8 +146,7 @@ type ServiceImpactingEvent struct { IncidentProperties *ServiceImpactingEventIncidentProperties `json:"incidentProperties,omitempty"` } -// ServiceImpactingEventIncidentProperties is properties of the service -// impacting event. +// ServiceImpactingEventIncidentProperties is properties of the service impacting event. type ServiceImpactingEventIncidentProperties struct { Title *string `json:"title,omitempty"` Service *string `json:"service,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/operations.go index e103cf0fa..52c7d4f8b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/operations.go @@ -14,9 +14,8 @@ package resourcehealth // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string, resourceType string) OperationsC return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID, resourceType) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, resourceType string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID, resourceType)} } @@ -65,7 +63,7 @@ func (client OperationsClient) List() (result OperationListResult, err error) { // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2015-01-01" + const APIVersion = "2017-07-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go index 35d43907e..91d9a212b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resourcehealth/version.go @@ -14,15 +14,15 @@ package resourcehealth // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-resourcehealth/2017-07-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-resourcehealth/2017-07-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/client.go index 87d1267c3..3a357355e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/client.go @@ -1,11 +1,9 @@ -// Package features implements the Azure ARM Features service API version -// 2015-12-01. +// Package features implements the Azure ARM Features service API version 2015-12-01. // -// Azure Feature Exposure Control (AFEC) provides a mechanism for the resource -// providers to control feature exposure to users. Resource providers typically -// use this mechanism to provide public/private preview for new features prior -// to making them generally available. Users need to explicitly register for -// AFEC features to get access to such functionality. +// Azure Feature Exposure Control (AFEC) provides a mechanism for the resource providers to control feature exposure to +// users. Resource providers typically use this mechanism to provide public/private preview for new features prior to +// making them generally available. Users need to explicitly register for AFEC features to get access to such +// functionality. package features // Copyright (c) Microsoft and contributors. All rights reserved. @@ -22,9 +20,8 @@ package features // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/featuresgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/group.go old mode 100755 new mode 100644 similarity index 82% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/featuresgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/group.go index 8a12ca237..4beb5f48c --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/featuresgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/group.go @@ -14,9 +14,8 @@ package features // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,12 +23,10 @@ import ( "net/http" ) -// GroupClient is the azure Feature Exposure Control (AFEC) provides a -// mechanism for the resource providers to control feature exposure to users. -// Resource providers typically use this mechanism to provide public/private -// preview for new features prior to making them generally available. Users -// need to explicitly register for AFEC features to get access to such -// functionality. +// GroupClient is the azure Feature Exposure Control (AFEC) provides a mechanism for the resource providers to control +// feature exposure to users. Resource providers typically use this mechanism to provide public/private preview for new +// features prior to making them generally available. Users need to explicitly register for AFEC features to get access +// to such functionality. type GroupClient struct { ManagementClient } @@ -46,8 +43,8 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien // Get gets the preview feature with the specified name. // -// resourceProviderNamespace is the resource provider namespace for the -// feature. featureName is the name of the feature to get. +// resourceProviderNamespace is the resource provider namespace for the feature. featureName is the name of the feature +// to get. func (client GroupClient) Get(resourceProviderNamespace string, featureName string) (result Result, err error) { req, err := client.GetPreparer(resourceProviderNamespace, featureName) if err != nil { @@ -110,11 +107,9 @@ func (client GroupClient) GetResponder(resp *http.Response) (result Result, err return } -// List gets all the preview features in a provider namespace that are -// available through AFEC for the subscription. +// List gets all the preview features in a provider namespace that are available through AFEC for the subscription. // -// resourceProviderNamespace is the namespace of the resource provider for -// getting features. +// resourceProviderNamespace is the namespace of the resource provider for getting features. func (client GroupClient) List(resourceProviderNamespace string) (result OperationsListResult, err error) { req, err := client.ListPreparer(resourceProviderNamespace) if err != nil { @@ -200,8 +195,52 @@ func (client GroupClient) ListNextResults(lastResults OperationsListResult) (res return } -// ListAll gets all the preview features that are available through AFEC for -// the subscription. +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(resourceProviderNamespace string, cancel <-chan struct{}) (<-chan Result, <-chan error) { + resultChan := make(chan Result) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceProviderNamespace) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAll gets all the preview features that are available through AFEC for the subscription. func (client GroupClient) ListAll() (result OperationsListResult, err error) { req, err := client.ListAllPreparer() if err != nil { @@ -286,10 +325,55 @@ func (client GroupClient) ListAllNextResults(lastResults OperationsListResult) ( return } +// ListAllComplete gets all elements from the list without paging. +func (client GroupClient) ListAllComplete(cancel <-chan struct{}) (<-chan Result, <-chan error) { + resultChan := make(chan Result) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAll() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAllNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Register registers the preview feature for the subscription. // -// resourceProviderNamespace is the namespace of the resource provider. -// featureName is the name of the feature to register. +// resourceProviderNamespace is the namespace of the resource provider. featureName is the name of the feature to +// register. func (client GroupClient) Register(resourceProviderNamespace string, featureName string) (result Result, err error) { req, err := client.RegisterPreparer(resourceProviderNamespace, featureName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/models.go index 18f4f5671..a93dffe19 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/models.go @@ -14,9 +14,8 @@ package features // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go index 07d8c9c7a..30cefd422 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/features/version.go @@ -14,15 +14,15 @@ package features // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-features/2015-12-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-features/2015-12-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/client.go index 7810b5bae..e6c4bf4e1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/client.go @@ -1,11 +1,9 @@ // Package links implements the Azure ARM Links service API version 2016-09-01. // -// Azure resources can be linked together to form logical relationships. You -// can establish links between resources belonging to different resource -// groups. However, all the linked resources must belong to the same -// subscription. Each resource can be linked to 50 other resources. If any of -// the linked resources are deleted or moved, the link owner must clean up the -// remaining link. +// Azure resources can be linked together to form logical relationships. You can establish links between resources +// belonging to different resource groups. However, all the linked resources must belong to the same subscription. Each +// resource can be linked to 50 other resources. If any of the linked resources are deleted or moved, the link owner +// must clean up the remaining link. package links // Copyright (c) Microsoft and contributors. All rights reserved. @@ -22,9 +20,8 @@ package links // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/models.go index 2da9fd32e..a3685b14f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/models.go @@ -14,9 +14,8 @@ package links // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/resourcelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/resourcelinks.go index 0e2e9359d..cfb2991b2 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/resourcelinks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/resourcelinks.go @@ -14,9 +14,8 @@ package links // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,30 +24,25 @@ import ( "net/http" ) -// ResourceLinksClient is the azure resources can be linked together to form -// logical relationships. You can establish links between resources belonging -// to different resource groups. However, all the linked resources must belong -// to the same subscription. Each resource can be linked to 50 other resources. -// If any of the linked resources are deleted or moved, the link owner must -// clean up the remaining link. +// ResourceLinksClient is the azure resources can be linked together to form logical relationships. You can establish +// links between resources belonging to different resource groups. However, all the linked resources must belong to the +// same subscription. Each resource can be linked to 50 other resources. If any of the linked resources are deleted or +// moved, the link owner must clean up the remaining link. type ResourceLinksClient struct { ManagementClient } -// NewResourceLinksClient creates an instance of the ResourceLinksClient -// client. +// NewResourceLinksClient creates an instance of the ResourceLinksClient client. func NewResourceLinksClient(subscriptionID string) ResourceLinksClient { return NewResourceLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewResourceLinksClientWithBaseURI creates an instance of the -// ResourceLinksClient client. +// NewResourceLinksClientWithBaseURI creates an instance of the ResourceLinksClient client. func NewResourceLinksClientWithBaseURI(baseURI string, subscriptionID string) ResourceLinksClient { return ResourceLinksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a resource link between the specified -// resources. +// CreateOrUpdate creates or updates a resource link between the specified resources. // // linkID is the fully qualified ID of the resource link. Use the format, // /subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/{provider-namespace}/{resource-type}/{resource-name}/Microsoft.Resources/links/{link-name}. @@ -253,15 +247,12 @@ func (client ResourceLinksClient) GetResponder(resp *http.Response) (result Reso return } -// ListAtSourceScope gets a list of resource links at and below the specified -// source scope. +// ListAtSourceScope gets a list of resource links at and below the specified source scope. // -// scope is the fully qualified ID of the scope for getting the resource links. -// For example, to list resource links at and under a resource group, set the -// scope to -// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. -// filter is the filter to apply when getting resource links. To get links only -// at the specified scope (not below the scope), use Filter.atScope(). +// scope is the fully qualified ID of the scope for getting the resource links. For example, to list resource links at +// and under a resource group, set the scope to +// /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myGroup. filter is the filter to apply when +// getting resource links. To get links only at the specified scope (not below the scope), use Filter.atScope(). func (client ResourceLinksClient) ListAtSourceScope(scope string, filter Filter) (result ResourceLinkResult, err error) { req, err := client.ListAtSourceScopePreparer(scope, filter) if err != nil { @@ -349,11 +340,55 @@ func (client ResourceLinksClient) ListAtSourceScopeNextResults(lastResults Resou return } +// ListAtSourceScopeComplete gets all elements from the list without paging. +func (client ResourceLinksClient) ListAtSourceScopeComplete(scope string, filter Filter, cancel <-chan struct{}) (<-chan ResourceLink, <-chan error) { + resultChan := make(chan ResourceLink) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAtSourceScope(scope, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAtSourceScopeNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAtSubscription gets all the linked resources for the subscription. // -// filter is the filter to apply on the list resource links operation. The -// supported filter for list resource links is targetid. For example, -// $filter=targetid eq {value} +// filter is the filter to apply on the list resource links operation. The supported filter for list resource links is +// targetid. For example, $filter=targetid eq {value} func (client ResourceLinksClient) ListAtSubscription(filter string) (result ResourceLinkResult, err error) { req, err := client.ListAtSubscriptionPreparer(filter) if err != nil { @@ -440,3 +475,48 @@ func (client ResourceLinksClient) ListAtSubscriptionNextResults(lastResults Reso return } + +// ListAtSubscriptionComplete gets all elements from the list without paging. +func (client ResourceLinksClient) ListAtSubscriptionComplete(filter string, cancel <-chan struct{}) (<-chan ResourceLink, <-chan error) { + resultChan := make(chan ResourceLink) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAtSubscription(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAtSubscriptionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go index e798fa478..32e65b426 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/links/version.go @@ -14,15 +14,15 @@ package links // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-links/2016-09-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-links/2016-09-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/client.go index fdcf88219..0b70ea01f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/client.go @@ -1,7 +1,6 @@ // Package locks implements the Azure ARM Locks service API version 2016-09-01. // -// Azure resources can be locked to prevent other users in your organization -// from deleting or modifying resources. +// Azure resources can be locked to prevent other users in your organization from deleting or modifying resources. package locks // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package locks // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/managementlocks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/managementlocks.go index 5fef907fa..6f4699dc5 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/managementlocks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/managementlocks.go @@ -14,9 +14,8 @@ package locks // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,29 @@ import ( "net/http" ) -// ManagementLocksClient is the azure resources can be locked to prevent other -// users in your organization from deleting or modifying resources. +// ManagementLocksClient is the azure resources can be locked to prevent other users in your organization from deleting +// or modifying resources. type ManagementLocksClient struct { ManagementClient } -// NewManagementLocksClient creates an instance of the ManagementLocksClient -// client. +// NewManagementLocksClient creates an instance of the ManagementLocksClient client. func NewManagementLocksClient(subscriptionID string) ManagementLocksClient { return NewManagementLocksClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagementLocksClientWithBaseURI creates an instance of the -// ManagementLocksClient client. +// NewManagementLocksClientWithBaseURI creates an instance of the ManagementLocksClient client. func NewManagementLocksClientWithBaseURI(baseURI string, subscriptionID string) ManagementLocksClient { return ManagementLocksClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdateAtResourceGroupLevel when you apply a lock at a parent scope, -// all child resources inherit the same lock. To create management locks, you -// must have access to Microsoft.Authorization/* or -// Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner -// and User Access Administrator are granted those actions. +// CreateOrUpdateAtResourceGroupLevel when you apply a lock at a parent scope, all child resources inherit the same +// lock. To create management locks, you must have access to Microsoft.Authorization/* or +// Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted +// those actions. // -// resourceGroupName is the name of the resource group to lock. lockName is the -// lock name. The lock name can be a maximum of 260 characters. It cannot -// contain <, > %, &, :, \, ?, /, or any control characters. parameters is the +// resourceGroupName is the name of the resource group to lock. lockName is the lock name. The lock name can be a +// maximum of 260 characters. It cannot contain <, > %, &, :, \, ?, /, or any control characters. parameters is the // management lock parameters. func (client ManagementLocksClient) CreateOrUpdateAtResourceGroupLevel(resourceGroupName string, lockName string, parameters ManagementLockObject) (result ManagementLockObject, err error) { if err := validation.Validate([]validation.Validation{ @@ -127,20 +122,15 @@ func (client ManagementLocksClient) CreateOrUpdateAtResourceGroupLevelResponder( return } -// CreateOrUpdateAtResourceLevel when you apply a lock at a parent scope, all -// child resources inherit the same lock. To create management locks, you must -// have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* -// actions. Of the built-in roles, only Owner and User Access Administrator are -// granted those actions. +// CreateOrUpdateAtResourceLevel when you apply a lock at a parent scope, all child resources inherit the same lock. To +// create management locks, you must have access to Microsoft.Authorization/* or Microsoft.Authorization/locks/* +// actions. Of the built-in roles, only Owner and User Access Administrator are granted those actions. // -// resourceGroupName is the name of the resource group containing the resource -// to lock. resourceProviderNamespace is the resource provider namespace of the -// resource to lock. parentResourcePath is the parent resource identity. -// resourceType is the resource type of the resource to lock. resourceName is -// the name of the resource to lock. lockName is the name of lock. The lock -// name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \, -// ?, /, or any control characters. parameters is parameters for creating or -// updating a management lock. +// resourceGroupName is the name of the resource group containing the resource to lock. resourceProviderNamespace is +// the resource provider namespace of the resource to lock. parentResourcePath is the parent resource identity. +// resourceType is the resource type of the resource to lock. resourceName is the name of the resource to lock. +// lockName is the name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \, +// ?, /, or any control characters. parameters is parameters for creating or updating a management lock. func (client ManagementLocksClient) CreateOrUpdateAtResourceLevel(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, lockName string, parameters ManagementLockObject) (result ManagementLockObject, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -219,15 +209,13 @@ func (client ManagementLocksClient) CreateOrUpdateAtResourceLevelResponder(resp return } -// CreateOrUpdateAtSubscriptionLevel when you apply a lock at a parent scope, -// all child resources inherit the same lock. To create management locks, you -// must have access to Microsoft.Authorization/* or -// Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner -// and User Access Administrator are granted those actions. +// CreateOrUpdateAtSubscriptionLevel when you apply a lock at a parent scope, all child resources inherit the same +// lock. To create management locks, you must have access to Microsoft.Authorization/* or +// Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted +// those actions. // -// lockName is the name of lock. The lock name can be a maximum of 260 -// characters. It cannot contain <, > %, &, :, \, ?, /, or any control -// characters. parameters is the management lock parameters. +// lockName is the name of lock. The lock name can be a maximum of 260 characters. It cannot contain <, > %, &, :, \, +// ?, /, or any control characters. parameters is the management lock parameters. func (client ManagementLocksClient) CreateOrUpdateAtSubscriptionLevel(lockName string, parameters ManagementLockObject) (result ManagementLockObject, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -299,13 +287,10 @@ func (client ManagementLocksClient) CreateOrUpdateAtSubscriptionLevelResponder(r // CreateOrUpdateByScope create or update a management lock by scope. // -// scope is the scope for the lock. When providing a scope for the assignment, -// use '/subscriptions/{subscriptionId}' for subscriptions, -// '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for -// resource groups, and +// scope is the scope for the lock. When providing a scope for the assignment, use '/subscriptions/{subscriptionId}' +// for subscriptions, '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups, and // '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePathIfPresent}/{resourceType}/{resourceName}' -// for resources. lockName is the name of lock. parameters is create or update -// management lock parameters. +// for resources. lockName is the name of lock. parameters is create or update management lock parameters. func (client ManagementLocksClient) CreateOrUpdateByScope(scope string, lockName string, parameters ManagementLockObject) (result ManagementLockObject, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -375,13 +360,11 @@ func (client ManagementLocksClient) CreateOrUpdateByScopeResponder(resp *http.Re return } -// DeleteAtResourceGroupLevel to delete management locks, you must have access -// to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of -// the built-in roles, only Owner and User Access Administrator are granted +// DeleteAtResourceGroupLevel to delete management locks, you must have access to Microsoft.Authorization/* or +// Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted // those actions. // -// resourceGroupName is the name of the resource group containing the lock. -// lockName is the name of lock to delete. +// resourceGroupName is the name of the resource group containing the lock. lockName is the name of lock to delete. func (client ManagementLocksClient) DeleteAtResourceGroupLevel(resourceGroupName string, lockName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -451,17 +434,15 @@ func (client ManagementLocksClient) DeleteAtResourceGroupLevelResponder(resp *ht return } -// DeleteAtResourceLevel to delete management locks, you must have access to -// Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of the -// built-in roles, only Owner and User Access Administrator are granted those -// actions. +// DeleteAtResourceLevel to delete management locks, you must have access to Microsoft.Authorization/* or +// Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted +// those actions. // -// resourceGroupName is the name of the resource group containing the resource -// with the lock to delete. resourceProviderNamespace is the resource provider -// namespace of the resource with the lock to delete. parentResourcePath is the -// parent resource identity. resourceType is the resource type of the resource -// with the lock to delete. resourceName is the name of the resource with the -// lock to delete. lockName is the name of the lock to delete. +// resourceGroupName is the name of the resource group containing the resource with the lock to delete. +// resourceProviderNamespace is the resource provider namespace of the resource with the lock to delete. +// parentResourcePath is the parent resource identity. resourceType is the resource type of the resource with the lock +// to delete. resourceName is the name of the resource with the lock to delete. lockName is the name of the lock to +// delete. func (client ManagementLocksClient) DeleteAtResourceLevel(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, lockName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -535,9 +516,8 @@ func (client ManagementLocksClient) DeleteAtResourceLevelResponder(resp *http.Re return } -// DeleteAtSubscriptionLevel to delete management locks, you must have access -// to Microsoft.Authorization/* or Microsoft.Authorization/locks/* actions. Of -// the built-in roles, only Owner and User Access Administrator are granted +// DeleteAtSubscriptionLevel to delete management locks, you must have access to Microsoft.Authorization/* or +// Microsoft.Authorization/locks/* actions. Of the built-in roles, only Owner and User Access Administrator are granted // those actions. // // lockName is the name of lock to delete. @@ -666,8 +646,7 @@ func (client ManagementLocksClient) DeleteByScopeResponder(resp *http.Response) // GetAtResourceGroupLevel gets a management lock at the resource group level. // -// resourceGroupName is the name of the locked resource group. lockName is the -// name of the lock to get. +// resourceGroupName is the name of the locked resource group. lockName is the name of the lock to get. func (client ManagementLocksClient) GetAtResourceGroupLevel(resourceGroupName string, lockName string) (result ManagementLockObject, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -738,14 +717,11 @@ func (client ManagementLocksClient) GetAtResourceGroupLevelResponder(resp *http. return } -// GetAtResourceLevel get the management lock of a resource or any level below -// resource. +// GetAtResourceLevel get the management lock of a resource or any level below resource. // -// resourceGroupName is the name of the resource group. -// resourceProviderNamespace is the namespace of the resource provider. -// parentResourcePath is an extra path parameter needed in some services, like -// SQL Databases. resourceType is the type of the resource. resourceName is the -// name of the resource. lockName is the name of lock. +// resourceGroupName is the name of the resource group. resourceProviderNamespace is the namespace of the resource +// provider. parentResourcePath is an extra path parameter needed in some services, like SQL Databases. resourceType is +// the type of the resource. resourceName is the name of the resource. lockName is the name of lock. func (client ManagementLocksClient) GetAtResourceLevel(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, lockName string) (result ManagementLockObject, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -950,8 +926,8 @@ func (client ManagementLocksClient) GetByScopeResponder(resp *http.Response) (re // ListAtResourceGroupLevel gets all the management locks for a resource group. // -// resourceGroupName is the name of the resource group containing the locks to -// get. filter is the filter to apply on the operation. +// resourceGroupName is the name of the resource group containing the locks to get. filter is the filter to apply on +// the operation. func (client ManagementLocksClient) ListAtResourceGroupLevel(resourceGroupName string, filter string) (result ManagementLockListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1048,15 +1024,57 @@ func (client ManagementLocksClient) ListAtResourceGroupLevelNextResults(lastResu return } -// ListAtResourceLevel gets all the management locks for a resource or any -// level below resource. +// ListAtResourceGroupLevelComplete gets all elements from the list without paging. +func (client ManagementLocksClient) ListAtResourceGroupLevelComplete(resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan ManagementLockObject, <-chan error) { + resultChan := make(chan ManagementLockObject) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAtResourceGroupLevel(resourceGroupName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAtResourceGroupLevelNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAtResourceLevel gets all the management locks for a resource or any level below resource. // -// resourceGroupName is the name of the resource group containing the locked -// resource. The name is case insensitive. resourceProviderNamespace is the -// namespace of the resource provider. parentResourcePath is the parent -// resource identity. resourceType is the resource type of the locked resource. -// resourceName is the name of the locked resource. filter is the filter to -// apply on the operation. +// resourceGroupName is the name of the resource group containing the locked resource. The name is case insensitive. +// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource +// identity. resourceType is the resource type of the locked resource. resourceName is the name of the locked resource. +// filter is the filter to apply on the operation. func (client ManagementLocksClient) ListAtResourceLevel(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result ManagementLockListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1157,6 +1175,51 @@ func (client ManagementLocksClient) ListAtResourceLevelNextResults(lastResults M return } +// ListAtResourceLevelComplete gets all elements from the list without paging. +func (client ManagementLocksClient) ListAtResourceLevelComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, cancel <-chan struct{}) (<-chan ManagementLockObject, <-chan error) { + resultChan := make(chan ManagementLockObject) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAtResourceLevel(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAtResourceLevelNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAtSubscriptionLevel gets all the management locks for a subscription. // // filter is the filter to apply on the operation. @@ -1246,3 +1309,48 @@ func (client ManagementLocksClient) ListAtSubscriptionLevelNextResults(lastResul return } + +// ListAtSubscriptionLevelComplete gets all elements from the list without paging. +func (client ManagementLocksClient) ListAtSubscriptionLevelComplete(filter string, cancel <-chan struct{}) (<-chan ManagementLockObject, <-chan error) { + resultChan := make(chan ManagementLockObject) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAtSubscriptionLevel(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAtSubscriptionLevelNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/models.go index ec9d5be39..8373b88d7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/models.go @@ -14,9 +14,8 @@ package locks // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go index 34e611e50..52819ed90 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/locks/version.go @@ -14,15 +14,15 @@ package locks // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-locks/2016-09-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-locks/2016-09-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliancedefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliancedefinitions.go index 216ce25c5..aa1b24249 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliancedefinitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliancedefinitions.go @@ -14,9 +14,8 @@ package managedapplications // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,27 +29,21 @@ type ApplianceDefinitionsClient struct { ManagementClient } -// NewApplianceDefinitionsClient creates an instance of the -// ApplianceDefinitionsClient client. +// NewApplianceDefinitionsClient creates an instance of the ApplianceDefinitionsClient client. func NewApplianceDefinitionsClient(subscriptionID string) ApplianceDefinitionsClient { return NewApplianceDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewApplianceDefinitionsClientWithBaseURI creates an instance of the -// ApplianceDefinitionsClient client. +// NewApplianceDefinitionsClientWithBaseURI creates an instance of the ApplianceDefinitionsClient client. func NewApplianceDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) ApplianceDefinitionsClient { return ApplianceDefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a new appliance definition. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate creates a new appliance definition. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. applianceDefinitionName is the name of the appliance -// definition. parameters is parameters supplied to the create or update an -// appliance definition. +// resourceGroupName is the name of the resource group. The name is case insensitive. applianceDefinitionName is the +// name of the appliance definition. parameters is parameters supplied to the create or update an appliance definition. func (client ApplianceDefinitionsClient) CreateOrUpdate(resourceGroupName string, applianceDefinitionName string, parameters ApplianceDefinition, cancel <-chan struct{}) (<-chan ApplianceDefinition, <-chan error) { resultChan := make(chan ApplianceDefinition, 1) errChan := make(chan error, 1) @@ -149,17 +142,14 @@ func (client ApplianceDefinitionsClient) CreateOrUpdateResponder(resp *http.Resp return } -// CreateOrUpdateByID creates a new appliance definition. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdateByID creates a new appliance definition. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// applianceDefinitionID is the fully qualified ID of the appliance definition, -// including the appliance name and the appliance definition resource type. Use -// the format, +// applianceDefinitionID is the fully qualified ID of the appliance definition, including the appliance name and the +// appliance definition resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} -// parameters is parameters supplied to the create or update an appliance -// definition. +// parameters is parameters supplied to the create or update an appliance definition. func (client ApplianceDefinitionsClient) CreateOrUpdateByID(applianceDefinitionID string, parameters ApplianceDefinition, cancel <-chan struct{}) (<-chan ApplianceDefinition, <-chan error) { resultChan := make(chan ApplianceDefinition, 1) errChan := make(chan error, 1) @@ -211,7 +201,6 @@ func (client ApplianceDefinitionsClient) CreateOrUpdateByID(applianceDefinitionI func (client ApplianceDefinitionsClient) CreateOrUpdateByIDPreparer(applianceDefinitionID string, parameters ApplianceDefinition, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "applianceDefinitionId": applianceDefinitionID, - "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2016-09-01-preview" @@ -250,14 +239,11 @@ func (client ApplianceDefinitionsClient) CreateOrUpdateByIDResponder(resp *http. return } -// Delete deletes the appliance definition. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the appliance definition. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. applianceDefinitionName is the name of the appliance definition -// to delete. +// resourceGroupName is the name of the resource group. The name is case insensitive. applianceDefinitionName is the +// name of the appliance definition to delete. func (client ApplianceDefinitionsClient) Delete(resourceGroupName string, applianceDefinitionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -348,14 +334,11 @@ func (client ApplianceDefinitionsClient) DeleteResponder(resp *http.Response) (r return } -// DeleteByID deletes the appliance definition. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// DeleteByID deletes the appliance definition. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// applianceDefinitionID is the fully qualified ID of the appliance definition, -// including the appliance name and the appliance definition resource type. Use -// the format, +// applianceDefinitionID is the fully qualified ID of the appliance definition, including the appliance name and the +// appliance definition resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} func (client ApplianceDefinitionsClient) DeleteByID(applianceDefinitionID string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) @@ -396,7 +379,6 @@ func (client ApplianceDefinitionsClient) DeleteByID(applianceDefinitionID string func (client ApplianceDefinitionsClient) DeleteByIDPreparer(applianceDefinitionID string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "applianceDefinitionId": applianceDefinitionID, - "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2016-09-01-preview" @@ -434,9 +416,8 @@ func (client ApplianceDefinitionsClient) DeleteByIDResponder(resp *http.Response // Get gets the appliance definition. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. applianceDefinitionName is the name of the appliance -// definition. +// resourceGroupName is the name of the resource group. The name is case insensitive. applianceDefinitionName is the +// name of the appliance definition. func (client ApplianceDefinitionsClient) Get(resourceGroupName string, applianceDefinitionName string) (result ApplianceDefinition, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -512,9 +493,8 @@ func (client ApplianceDefinitionsClient) GetResponder(resp *http.Response) (resu // GetByID gets the appliance definition. // -// applianceDefinitionID is the fully qualified ID of the appliance definition, -// including the appliance name and the appliance definition resource type. Use -// the format, +// applianceDefinitionID is the fully qualified ID of the appliance definition, including the appliance name and the +// appliance definition resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/applianceDefinitions/{applianceDefinition-name} func (client ApplianceDefinitionsClient) GetByID(applianceDefinitionID string) (result ApplianceDefinition, err error) { req, err := client.GetByIDPreparer(applianceDefinitionID) @@ -542,7 +522,6 @@ func (client ApplianceDefinitionsClient) GetByID(applianceDefinitionID string) ( func (client ApplianceDefinitionsClient) GetByIDPreparer(applianceDefinitionID string) (*http.Request, error) { pathParameters := map[string]interface{}{ "applianceDefinitionId": applianceDefinitionID, - "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2016-09-01-preview" @@ -579,8 +558,7 @@ func (client ApplianceDefinitionsClient) GetByIDResponder(resp *http.Response) ( // ListByResourceGroup lists the appliance definitions in a resource group. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. +// resourceGroupName is the name of the resource group. The name is case insensitive. func (client ApplianceDefinitionsClient) ListByResourceGroup(resourceGroupName string) (result ApplianceDefinitionListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliances.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliances.go index ca3737c77..7ee959b83 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliances.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/appliances.go @@ -14,9 +14,8 @@ package managedapplications // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,19 +34,16 @@ func NewAppliancesClient(subscriptionID string) AppliancesClient { return NewAppliancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppliancesClientWithBaseURI creates an instance of the AppliancesClient -// client. +// NewAppliancesClientWithBaseURI creates an instance of the AppliancesClient client. func NewAppliancesClientWithBaseURI(baseURI string, subscriptionID string) AppliancesClient { return AppliancesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a new appliance. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates a new appliance. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. applianceName is the name of the appliance. parameters is -// parameters supplied to the create or update an appliance. +// resourceGroupName is the name of the resource group. The name is case insensitive. applianceName is the name of the +// appliance. parameters is parameters supplied to the create or update an appliance. func (client AppliancesClient) CreateOrUpdate(resourceGroupName string, applianceName string, parameters Appliance, cancel <-chan struct{}) (<-chan Appliance, <-chan error) { resultChan := make(chan Appliance, 1) errChan := make(chan error, 1) @@ -152,13 +148,11 @@ func (client AppliancesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// CreateOrUpdateByID creates a new appliance. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdateByID creates a new appliance. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// applianceID is the fully qualified ID of the appliance, including the -// appliance name and the appliance resource type. Use the format, +// applianceID is the fully qualified ID of the appliance, including the appliance name and the appliance resource +// type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} // parameters is parameters supplied to the create or update an appliance. func (client AppliancesClient) CreateOrUpdateByID(applianceID string, parameters Appliance, cancel <-chan struct{}) (<-chan Appliance, <-chan error) { @@ -217,8 +211,7 @@ func (client AppliancesClient) CreateOrUpdateByID(applianceID string, parameters // CreateOrUpdateByIDPreparer prepares the CreateOrUpdateByID request. func (client AppliancesClient) CreateOrUpdateByIDPreparer(applianceID string, parameters Appliance, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ - "applianceId": applianceID, - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "applianceId": applianceID, } const APIVersion = "2016-09-01-preview" @@ -257,12 +250,11 @@ func (client AppliancesClient) CreateOrUpdateByIDResponder(resp *http.Response) return } -// Delete deletes the appliance. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Delete deletes the appliance. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. applianceName is the name of the appliance. +// resourceGroupName is the name of the resource group. The name is case insensitive. applianceName is the name of the +// appliance. func (client AppliancesClient) Delete(resourceGroupName string, applianceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -353,12 +345,11 @@ func (client AppliancesClient) DeleteResponder(resp *http.Response) (result auto return } -// DeleteByID deletes the appliance. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// DeleteByID deletes the appliance. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// applianceID is the fully qualified ID of the appliance, including the -// appliance name and the appliance resource type. Use the format, +// applianceID is the fully qualified ID of the appliance, including the appliance name and the appliance resource +// type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} func (client AppliancesClient) DeleteByID(applianceID string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) @@ -398,8 +389,7 @@ func (client AppliancesClient) DeleteByID(applianceID string, cancel <-chan stru // DeleteByIDPreparer prepares the DeleteByID request. func (client AppliancesClient) DeleteByIDPreparer(applianceID string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ - "applianceId": applianceID, - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "applianceId": applianceID, } const APIVersion = "2016-09-01-preview" @@ -437,8 +427,8 @@ func (client AppliancesClient) DeleteByIDResponder(resp *http.Response) (result // Get gets the appliance. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. applianceName is the name of the appliance. +// resourceGroupName is the name of the resource group. The name is case insensitive. applianceName is the name of the +// appliance. func (client AppliancesClient) Get(resourceGroupName string, applianceName string) (result Appliance, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -514,8 +504,8 @@ func (client AppliancesClient) GetResponder(resp *http.Response) (result Applian // GetByID gets the appliance. // -// applianceID is the fully qualified ID of the appliance, including the -// appliance name and the appliance resource type. Use the format, +// applianceID is the fully qualified ID of the appliance, including the appliance name and the appliance resource +// type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} func (client AppliancesClient) GetByID(applianceID string) (result Appliance, err error) { req, err := client.GetByIDPreparer(applianceID) @@ -542,8 +532,7 @@ func (client AppliancesClient) GetByID(applianceID string) (result Appliance, er // GetByIDPreparer prepares the GetByID request. func (client AppliancesClient) GetByIDPreparer(applianceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "applianceId": applianceID, - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "applianceId": applianceID, } const APIVersion = "2016-09-01-preview" @@ -580,8 +569,7 @@ func (client AppliancesClient) GetByIDResponder(resp *http.Response) (result App // ListByResourceGroup gets all the appliances within a resource group. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. +// resourceGroupName is the name of the resource group. The name is case insensitive. func (client AppliancesClient) ListByResourceGroup(resourceGroupName string) (result ApplianceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -850,12 +838,10 @@ func (client AppliancesClient) ListBySubscriptionComplete(cancel <-chan struct{} return resultChan, errChan } -// Update updates an existing appliance. The only value that can be updated via -// PATCH currently is the tags. +// Update updates an existing appliance. The only value that can be updated via PATCH currently is the tags. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. applianceName is the name of the appliance. parameters is -// parameters supplied to update an existing appliance. +// resourceGroupName is the name of the resource group. The name is case insensitive. applianceName is the name of the +// appliance. parameters is parameters supplied to update an existing appliance. func (client AppliancesClient) Update(resourceGroupName string, applianceName string, parameters *Appliance) (result Appliance, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -934,11 +920,10 @@ func (client AppliancesClient) UpdateResponder(resp *http.Response) (result Appl return } -// UpdateByID updates an existing appliance. The only value that can be updated -// via PATCH currently is the tags. +// UpdateByID updates an existing appliance. The only value that can be updated via PATCH currently is the tags. // -// applianceID is the fully qualified ID of the appliance, including the -// appliance name and the appliance resource type. Use the format, +// applianceID is the fully qualified ID of the appliance, including the appliance name and the appliance resource +// type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.Solutions/appliances/{appliance-name} // parameters is parameters supplied to update an existing appliance. func (client AppliancesClient) UpdateByID(applianceID string, parameters *Appliance) (result Appliance, err error) { @@ -966,8 +951,7 @@ func (client AppliancesClient) UpdateByID(applianceID string, parameters *Applia // UpdateByIDPreparer prepares the UpdateByID request. func (client AppliancesClient) UpdateByIDPreparer(applianceID string, parameters *Appliance) (*http.Request, error) { pathParameters := map[string]interface{}{ - "applianceId": applianceID, - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "applianceId": applianceID, } const APIVersion = "2016-09-01-preview" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/client.go index 0176ab2c7..395cd570f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/client.go @@ -1,5 +1,4 @@ -// Package managedapplications implements the Azure ARM Managedapplications -// service API version 2016-09-01-preview. +// Package managedapplications implements the Azure ARM Managedapplications service API version 2016-09-01-preview. // // ARM managed applications (appliances) package managedapplications @@ -18,9 +17,8 @@ package managedapplications // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/models.go index 4819f0c11..b647a5840 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/models.go @@ -14,9 +14,8 @@ package managedapplications // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -38,8 +37,7 @@ const ( type ApplianceLockLevel string const ( - // CanNotDelete specifies the can not delete state for appliance lock - // level. + // CanNotDelete specifies the can not delete state for appliance lock level. CanNotDelete ApplianceLockLevel = "CanNotDelete" // None specifies the none state for appliance lock level. None ApplianceLockLevel = "None" @@ -79,8 +77,7 @@ const ( type ResourceIdentityType string const ( - // SystemAssigned specifies the system assigned state for resource identity - // type. + // SystemAssigned specifies the system assigned state for resource identity type. SystemAssigned ResourceIdentityType = "SystemAssigned" ) @@ -210,8 +207,8 @@ type ApplianceProviderAuthorization struct { RoleDefinitionID *string `json:"roleDefinitionId,omitempty"` } -// ErrorResponse is error reponse indicates ARM appliance is not able to -// process the incoming request. The reason is provided in the error message. +// ErrorResponse is error reponse indicates ARM appliance is not able to process the incoming request. The reason is +// provided in the error message. type ErrorResponse struct { HTTPStatus *string `json:"httpStatus,omitempty"` ErrorCode *string `json:"errorCode,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go index 4e6118575..47d8ecd3b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/managedapplications/version.go @@ -14,15 +14,15 @@ package managedapplications // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-managedapplications/2016-09-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-managedapplications/2016-09-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/assignments.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/assignments.go index bf9ccc3f8..229194fdf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/assignments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/assignments.go @@ -14,9 +14,8 @@ package policy // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,8 @@ import ( "net/http" ) -// AssignmentsClient is the to manage and control access to your resources, you -// can define customized policies and assign them at a scope. +// AssignmentsClient is the to manage and control access to your resources, you can define customized policies and +// assign them at a scope. type AssignmentsClient struct { ManagementClient } @@ -36,19 +35,16 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient { return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient -// client. +// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client. func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient { return AssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create policy assignments are inherited by child resources. For example, -// when you apply a policy to a resource group that policy is assigned to all -// resources in the group. +// Create policy assignments are inherited by child resources. For example, when you apply a policy to a resource group +// that policy is assigned to all resources in the group. // -// scope is the scope of the policy assignment. policyAssignmentName is the -// name of the policy assignment. parameters is parameters for the policy -// assignment. +// scope is the scope of the policy assignment. policyAssignmentName is the name of the policy assignment. parameters +// is parameters for the policy assignment. func (client AssignmentsClient) Create(scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error) { req, err := client.CreatePreparer(scope, policyAssignmentName, parameters) if err != nil { @@ -87,7 +83,7 @@ func (client AssignmentsClient) CreatePreparer(scope string, policyAssignmentNam autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}", pathParameters), + autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -112,19 +108,16 @@ func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Ass return } -// CreateByID policy assignments are inherited by child resources. For example, -// when you apply a policy to a resource group that policy is assigned to all -// resources in the group. When providing a scope for the assigment, use +// CreateByID policy assignments are inherited by child resources. For example, when you apply a policy to a resource +// group that policy is assigned to all resources in the group. When providing a scope for the assigment, use // '/subscriptions/{subscription-id}/' for subscriptions, -// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for -// resource groups, and +// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and // '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' // for resources. // -// policyAssignmentID is the ID of the policy assignment to create. Use the -// format -// '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. -// parameters is parameters for policy assignment. +// policyAssignmentID is the ID of the policy assignment to create. Use the format +// '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. parameters is parameters +// for policy assignment. func (client AssignmentsClient) CreateByID(policyAssignmentID string, parameters Assignment) (result Assignment, err error) { req, err := client.CreateByIDPreparer(policyAssignmentID, parameters) if err != nil { @@ -189,8 +182,7 @@ func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result // Delete deletes a policy assignment. // -// scope is the scope of the policy assignment. policyAssignmentName is the -// name of the policy assignment to delete. +// scope is the scope of the policy assignment. policyAssignmentName is the name of the policy assignment to delete. func (client AssignmentsClient) Delete(scope string, policyAssignmentName string) (result Assignment, err error) { req, err := client.DeletePreparer(scope, policyAssignmentName) if err != nil { @@ -228,7 +220,7 @@ func (client AssignmentsClient) DeletePreparer(scope string, policyAssignmentNam preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}", pathParameters), + autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -245,22 +237,19 @@ func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Ass err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// DeleteByID when providing a scope for the assigment, use -// '/subscriptions/{subscription-id}/' for subscriptions, -// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for -// resource groups, and +// DeleteByID when providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, +// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and // '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' // for resources. // -// policyAssignmentID is the ID of the policy assignment to delete. Use the -// format +// policyAssignmentID is the ID of the policy assignment to delete. Use the format // '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. func (client AssignmentsClient) DeleteByID(policyAssignmentID string) (result Assignment, err error) { req, err := client.DeleteByIDPreparer(policyAssignmentID) @@ -324,8 +313,7 @@ func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result // Get gets a policy assignment. // -// scope is the scope of the policy assignment. policyAssignmentName is the -// name of the policy assignment to get. +// scope is the scope of the policy assignment. policyAssignmentName is the name of the policy assignment to get. func (client AssignmentsClient) Get(scope string, policyAssignmentName string) (result Assignment, err error) { req, err := client.GetPreparer(scope, policyAssignmentName) if err != nil { @@ -363,7 +351,7 @@ func (client AssignmentsClient) GetPreparer(scope string, policyAssignmentName s preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}", pathParameters), + autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -387,10 +375,8 @@ func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assign return } -// GetByID when providing a scope for the assigment, use -// '/subscriptions/{subscription-id}/' for subscriptions, -// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for -// resource groups, and +// GetByID when providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions, +// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and // '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}' // for resources. // @@ -498,7 +484,7 @@ func (client AssignmentsClient) ListPreparer(filter string) (*http.Request, erro preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -546,13 +532,57 @@ func (client AssignmentsClient) ListNextResults(lastResults AssignmentListResult return } +// ListComplete gets all elements from the list without paging. +func (client AssignmentsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan Assignment, <-chan error) { + resultChan := make(chan Assignment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListForResource gets policy assignments for a resource. // -// resourceGroupName is the name of the resource group containing the resource. -// The name is case insensitive. resourceProviderNamespace is the namespace of -// the resource provider. parentResourcePath is the parent resource path. -// resourceType is the resource type. resourceName is the name of the resource -// with policy assignments. filter is the filter to apply on the operation. +// resourceGroupName is the name of the resource group containing the resource. The name is case insensitive. +// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource path. +// resourceType is the resource type. resourceName is the name of the resource with policy assignments. filter is the +// filter to apply on the operation. func (client AssignmentsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -605,7 +635,7 @@ func (client AssignmentsClient) ListForResourcePreparer(resourceGroupName string preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -653,10 +683,55 @@ func (client AssignmentsClient) ListForResourceNextResults(lastResults Assignmen return } +// ListForResourceComplete gets all elements from the list without paging. +func (client AssignmentsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, cancel <-chan struct{}) (<-chan Assignment, <-chan error) { + resultChan := make(chan Assignment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListForResourceGroup gets policy assignments for the resource group. // -// resourceGroupName is the name of the resource group that contains policy -// assignments. filter is the filter to apply on the operation. +// resourceGroupName is the name of the resource group that contains policy assignments. filter is the filter to apply +// on the operation. func (client AssignmentsClient) ListForResourceGroup(resourceGroupName string, filter string) (result AssignmentListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -752,3 +827,48 @@ func (client AssignmentsClient) ListForResourceGroupNextResults(lastResults Assi return } + +// ListForResourceGroupComplete gets all elements from the list without paging. +func (client AssignmentsClient) ListForResourceGroupComplete(resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan Assignment, <-chan error) { + resultChan := make(chan Assignment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResourceGroup(resourceGroupName, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/client.go index e3338811d..5b444340b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/client.go @@ -1,8 +1,6 @@ -// Package policy implements the Azure ARM Policy service API version -// 2016-12-01. +// Package policy implements the Azure ARM Policy service API version 2016-12-01. // -// To manage and control access to your resources, you can define customized -// policies and assign them at a scope. +// To manage and control access to your resources, you can define customized policies and assign them at a scope. package policy // Copyright (c) Microsoft and contributors. All rights reserved. @@ -19,9 +17,8 @@ package policy // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/definitions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/definitions.go index 2a808a63d..ef17af7d0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/definitions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/definitions.go @@ -14,9 +14,8 @@ package policy // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,8 @@ import ( "net/http" ) -// DefinitionsClient is the to manage and control access to your resources, you -// can define customized policies and assign them at a scope. +// DefinitionsClient is the to manage and control access to your resources, you can define customized policies and +// assign them at a scope. type DefinitionsClient struct { ManagementClient } @@ -35,16 +34,14 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient { return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient -// client. +// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client. func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient { return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a policy definition. // -// policyDefinitionName is the name of the policy definition to create. -// parameters is the policy definition properties. +// policyDefinitionName is the name of the policy definition to create. parameters is the policy definition properties. func (client DefinitionsClient) CreateOrUpdate(policyDefinitionName string, parameters Definition) (result Definition, err error) { req, err := client.CreateOrUpdatePreparer(policyDefinitionName, parameters) if err != nil { @@ -324,3 +321,48 @@ func (client DefinitionsClient) ListNextResults(lastResults DefinitionListResult return } + +// ListComplete gets all elements from the list without paging. +func (client DefinitionsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan Definition, <-chan error) { + resultChan := make(chan Definition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/models.go index 69cd973b4..aecf4669c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/models.go @@ -14,9 +14,8 @@ package policy // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,19 +23,31 @@ import ( "net/http" ) +// Mode enumerates the values for mode. +type Mode string + +const ( + // All specifies the all state for mode. + All Mode = "All" + // Indexed specifies the indexed state for mode. + Indexed Mode = "Indexed" + // NotSpecified specifies the not specified state for mode. + NotSpecified Mode = "NotSpecified" +) + // Type enumerates the values for type. type Type string const ( - // BuiltIn specifies the built in state for type. - BuiltIn Type = "BuiltIn" - // Custom specifies the custom state for type. - Custom Type = "Custom" - // NotSpecified specifies the not specified state for type. - NotSpecified Type = "NotSpecified" + // TypeBuiltIn specifies the type built in state for type. + TypeBuiltIn Type = "BuiltIn" + // TypeCustom specifies the type custom state for type. + TypeCustom Type = "Custom" + // TypeNotSpecified specifies the type not specified state for type. + TypeNotSpecified Type = "NotSpecified" ) -// Assignment is the policy definition. +// Assignment is the policy assignment. type Assignment struct { autorest.Response `json:"-"` *AssignmentProperties `json:"properties,omitempty"` @@ -103,8 +114,10 @@ func (client DefinitionListResult) DefinitionListResultPreparer() (*http.Request // DefinitionProperties is the policy definition properties. type DefinitionProperties struct { PolicyType Type `json:"policyType,omitempty"` + Mode Mode `json:"mode,omitempty"` DisplayName *string `json:"displayName,omitempty"` Description *string `json:"description,omitempty"` PolicyRule *map[string]interface{} `json:"policyRule,omitempty"` + Metadata *map[string]interface{} `json:"metadata,omitempty"` Parameters *map[string]interface{} `json:"parameters,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go index 8f6442a76..f0beeaaeb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/policy/version.go @@ -14,15 +14,15 @@ package policy // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-policy/2016-12-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-policy/2016-12-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go index 3e13c72f9..348e0cf16 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/client.go @@ -1,5 +1,4 @@ -// Package resources implements the Azure ARM Resources service API version -// 2016-09-01. +// Package resources implements the Azure ARM Resources service API version 2017-05-10. // // Provides operations for working with resources and resource groups. package resources @@ -18,9 +17,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go index 34d12aac6..116c8b728 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deploymentoperations.go @@ -14,9 +14,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,29 +24,25 @@ import ( "net/http" ) -// DeploymentOperationsClient is the provides operations for working with -// resources and resource groups. +// DeploymentOperationsClient is the provides operations for working with resources and resource groups. type DeploymentOperationsClient struct { ManagementClient } -// NewDeploymentOperationsClient creates an instance of the -// DeploymentOperationsClient client. +// NewDeploymentOperationsClient creates an instance of the DeploymentOperationsClient client. func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsClient { return NewDeploymentOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentOperationsClientWithBaseURI creates an instance of the -// DeploymentOperationsClient client. +// NewDeploymentOperationsClientWithBaseURI creates an instance of the DeploymentOperationsClient client. func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient { return DeploymentOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a deployments operation. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment. operationID is -// the ID of the operation to get. +// resourceGroupName is the name of the resource group. The name is case insensitive. deploymentName is the name of the +// deployment. operationID is the ID of the operation to get. func (client DeploymentOperationsClient) Get(resourceGroupName string, deploymentName string, operationID string) (result DeploymentOperation, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -91,7 +86,7 @@ func (client DeploymentOperationsClient) GetPreparer(resourceGroupName string, d "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -125,9 +120,8 @@ func (client DeploymentOperationsClient) GetResponder(resp *http.Response) (resu // List gets all deployments operations for a deployment. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment with the operation -// to get. top is the number of results to return. +// resourceGroupName is the name of the resource group. The name is case insensitive. deploymentName is the name of the +// deployment with the operation to get. top is the number of results to return. func (client DeploymentOperationsClient) List(resourceGroupName string, deploymentName string, top *int32) (result DeploymentOperationsListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -170,7 +164,7 @@ func (client DeploymentOperationsClient) ListPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -228,3 +222,48 @@ func (client DeploymentOperationsClient) ListNextResults(lastResults DeploymentO return } + +// ListComplete gets all elements from the list without paging. +func (client DeploymentOperationsClient) ListComplete(resourceGroupName string, deploymentName string, top *int32, cancel <-chan struct{}) (<-chan DeploymentOperation, <-chan error) { + resultChan := make(chan DeploymentOperation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, deploymentName, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go index 7c3e19288..9941f6096 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/deployments.go @@ -14,9 +14,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// DeploymentsClient is the provides operations for working with resources and -// resource groups. +// DeploymentsClient is the provides operations for working with resources and resource groups. type DeploymentsClient struct { ManagementClient } @@ -36,19 +34,17 @@ func NewDeploymentsClient(subscriptionID string) DeploymentsClient { return NewDeploymentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient -// client. +// NewDeploymentsClientWithBaseURI creates an instance of the DeploymentsClient client. func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient { return DeploymentsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Cancel you can cancel a deployment only if the provisioningState is Accepted -// or Running. After the deployment is canceled, the provisioningState is set -// to Canceled. Canceling a template deployment stops the currently running +// Cancel you can cancel a deployment only if the provisioningState is Accepted or Running. After the deployment is +// canceled, the provisioningState is set to Canceled. Canceling a template deployment stops the currently running // template deployment and leaves the resource group partially deployed. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment to cancel. +// resourceGroupName is the name of the resource group. The name is case insensitive. deploymentName is the name of the +// deployment to cancel. func (client DeploymentsClient) Cancel(resourceGroupName string, deploymentName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -91,7 +87,7 @@ func (client DeploymentsClient) CancelPreparer(resourceGroupName string, deploym "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -124,9 +120,8 @@ func (client DeploymentsClient) CancelResponder(resp *http.Response) (result aut // CheckExistence checks whether the deployment exists. // -// resourceGroupName is the name of the resource group with the deployment to -// check. The name is case insensitive. deploymentName is the name of the -// deployment to check. +// resourceGroupName is the name of the resource group with the deployment to check. The name is case insensitive. +// deploymentName is the name of the deployment to check. func (client DeploymentsClient) CheckExistence(resourceGroupName string, deploymentName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -169,7 +164,7 @@ func (client DeploymentsClient) CheckExistencePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -200,15 +195,13 @@ func (client DeploymentsClient) CheckExistenceResponder(resp *http.Response) (re return } -// CreateOrUpdate you can provide the template and parameters directly in the -// request or link to JSON files. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be +// CreateOrUpdate you can provide the template and parameters directly in the request or link to JSON files. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be // used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group to deploy the resources -// to. The name is case insensitive. The resource group must already exist. -// deploymentName is the name of the deployment. parameters is additional -// parameters supplied to the operation. +// resourceGroupName is the name of the resource group to deploy the resources to. The name is case insensitive. The +// resource group must already exist. deploymentName is the name of the deployment. parameters is additional parameters +// supplied to the operation. func (client DeploymentsClient) CreateOrUpdate(resourceGroupName string, deploymentName string, parameters Deployment, cancel <-chan struct{}) (<-chan DeploymentExtended, <-chan error) { resultChan := make(chan DeploymentExtended, 1) errChan := make(chan error, 1) @@ -238,8 +231,10 @@ func (client DeploymentsClient) CreateOrUpdate(resourceGroupName string, deploym var err error var result DeploymentExtended defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -272,7 +267,7 @@ func (client DeploymentsClient) CreateOrUpdatePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -308,23 +303,17 @@ func (client DeploymentsClient) CreateOrUpdateResponder(resp *http.Response) (re return } -// Delete a template deployment that is currently running cannot be deleted. -// Deleting a template deployment removes the associated deployment operations. -// Deleting a template deployment does not affect the state of the resource -// group. This is an asynchronous operation that returns a status of 202 until -// the template deployment is successfully deleted. The Location response -// header contains the URI that is used to obtain the status of the process. -// While the process is running, a call to the URI in the Location header -// returns a status of 202. When the process finishes, the URI in the Location -// header returns a status of 204 on success. If the asynchronous request -// failed, the URI in the Location header returns an error-level status code. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Delete a template deployment that is currently running cannot be deleted. Deleting a template deployment removes the +// associated deployment operations. Deleting a template deployment does not affect the state of the resource group. +// This is an asynchronous operation that returns a status of 202 until the template deployment is successfully +// deleted. The Location response header contains the URI that is used to obtain the status of the process. While the +// process is running, a call to the URI in the Location header returns a status of 202. When the process finishes, the +// URI in the Location header returns a status of 204 on success. If the asynchronous request failed, the URI in the +// Location header returns an error-level status code. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group with the deployment to -// delete. The name is case insensitive. deploymentName is the name of the -// deployment to delete. +// resourceGroupName is the name of the resource group with the deployment to delete. The name is case insensitive. +// deploymentName is the name of the deployment to delete. func (client DeploymentsClient) Delete(resourceGroupName string, deploymentName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -347,8 +336,10 @@ func (client DeploymentsClient) Delete(resourceGroupName string, deploymentName var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -381,7 +372,7 @@ func (client DeploymentsClient) DeletePreparer(resourceGroupName string, deploym "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -416,9 +407,8 @@ func (client DeploymentsClient) DeleteResponder(resp *http.Response) (result aut // ExportTemplate exports the template used for specified deployment. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment from which to get -// the template. +// resourceGroupName is the name of the resource group. The name is case insensitive. deploymentName is the name of the +// deployment from which to get the template. func (client DeploymentsClient) ExportTemplate(resourceGroupName string, deploymentName string) (result DeploymentExportResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -461,7 +451,7 @@ func (client DeploymentsClient) ExportTemplatePreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -495,8 +485,8 @@ func (client DeploymentsClient) ExportTemplateResponder(resp *http.Response) (re // Get gets a deployment. // -// resourceGroupName is the name of the resource group. The name is case -// insensitive. deploymentName is the name of the deployment to get. +// resourceGroupName is the name of the resource group. The name is case insensitive. deploymentName is the name of the +// deployment to get. func (client DeploymentsClient) Get(resourceGroupName string, deploymentName string) (result DeploymentExtended, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -539,7 +529,7 @@ func (client DeploymentsClient) GetPreparer(resourceGroupName string, deployment "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -571,51 +561,49 @@ func (client DeploymentsClient) GetResponder(resp *http.Response) (result Deploy return } -// List get all the deployments for a resource group. +// ListByResourceGroup get all the deployments for a resource group. // -// resourceGroupName is the name of the resource group with the deployments to -// get. The name is case insensitive. filter is the filter to apply on the -// operation. For example, you can use $filter=provisioningState eq '{state}'. -// top is the number of results to get. If null is passed, returns all -// deployments. -func (client DeploymentsClient) List(resourceGroupName string, filter string, top *int32) (result DeploymentListResult, err error) { +// resourceGroupName is the name of the resource group with the deployments to get. The name is case insensitive. +// filter is the filter to apply on the operation. For example, you can use $filter=provisioningState eq '{state}'. top +// is the number of results to get. If null is passed, returns all deployments. +func (client DeploymentsClient) ListByResourceGroup(resourceGroupName string, filter string, top *int32) (result DeploymentListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "resources.DeploymentsClient", "List") + return result, validation.NewErrorWithValidationError(err, "resources.DeploymentsClient", "ListByResourceGroup") } - req, err := client.ListPreparer(resourceGroupName, filter, top) + req, err := client.ListByResourceGroupPreparer(resourceGroupName, filter, top) if err != nil { - err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "List", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", nil, "Failure preparing request") return } - resp, err := client.ListSender(req) + resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "List", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure sending request") return } - result, err = client.ListResponder(resp) + result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "List", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to request") } return } -// ListPreparer prepares the List request. -func (client DeploymentsClient) ListPreparer(resourceGroupName string, filter string, top *int32) (*http.Request, error) { +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client DeploymentsClient) ListByResourceGroupPreparer(resourceGroupName string, filter string, top *int32) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -634,15 +622,15 @@ func (client DeploymentsClient) ListPreparer(resourceGroupName string, filter st return preparer.Prepare(&http.Request{}) } -// ListSender sends the List request. The method will close the +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client DeploymentsClient) ListSender(req *http.Request) (*http.Response, error) { +func (client DeploymentsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListResponder handles the response to the List request. The method always +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client DeploymentsClient) ListResponder(resp *http.Response) (result DeploymentListResult, err error) { +func (client DeploymentsClient) ListByResourceGroupResponder(resp *http.Response) (result DeploymentListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -653,36 +641,80 @@ func (client DeploymentsClient) ListResponder(resp *http.Response) (result Deplo return } -// ListNextResults retrieves the next set of results, if any. -func (client DeploymentsClient) ListNextResults(lastResults DeploymentListResult) (result DeploymentListResult, err error) { +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client DeploymentsClient) ListByResourceGroupNextResults(lastResults DeploymentListResult) (result DeploymentListResult, err error) { req, err := lastResults.DeploymentListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "List", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListSender(req) + resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "List", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure sending next results request") } - result, err = client.ListResponder(resp) + result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "List", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "resources.DeploymentsClient", "ListByResourceGroup", resp, "Failure responding to next results request") } return } -// Validate validates whether the specified template is syntactically correct -// and will be accepted by Azure Resource Manager.. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client DeploymentsClient) ListByResourceGroupComplete(resourceGroupName string, filter string, top *int32, cancel <-chan struct{}) (<-chan DeploymentExtended, <-chan error) { + resultChan := make(chan DeploymentExtended) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, filter, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Validate validates whether the specified template is syntactically correct and will be accepted by Azure Resource +// Manager.. // -// resourceGroupName is the name of the resource group the template will be -// deployed to. The name is case insensitive. deploymentName is the name of the -// deployment. parameters is parameters to validate. +// resourceGroupName is the name of the resource group the template will be deployed to. The name is case insensitive. +// deploymentName is the name of the deployment. parameters is parameters to validate. func (client DeploymentsClient) Validate(resourceGroupName string, deploymentName string, parameters Deployment) (result DeploymentValidateResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -732,7 +764,7 @@ func (client DeploymentsClient) ValidatePreparer(resourceGroupName string, deplo "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/resourcesgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/group.go old mode 100755 new mode 100644 similarity index 70% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/resourcesgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/group.go index a7179dda8..2eac7ac35 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/resourcesgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/group.go @@ -14,9 +14,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// GroupClient is the provides operations for working with resources and -// resource groups. +// GroupClient is the provides operations for working with resources and resource groups. type GroupClient struct { ManagementClient } @@ -43,11 +41,10 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien // CheckExistence checks whether a resource exists. // -// resourceGroupName is the name of the resource group containing the resource -// to check. The name is case insensitive. resourceProviderNamespace is the -// resource provider of the resource to check. parentResourcePath is the parent -// resource identity. resourceType is the resource type. resourceName is the -// name of the resource to check whether it exists. +// resourceGroupName is the name of the resource group containing the resource to check. The name is case insensitive. +// resourceProviderNamespace is the resource provider of the resource to check. parentResourcePath is the parent +// resource identity. resourceType is the resource type. resourceName is the name of the resource to check whether it +// exists. func (client GroupClient) CheckExistence(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -89,7 +86,7 @@ func (client GroupClient) CheckExistencePreparer(resourceGroupName string, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -122,8 +119,7 @@ func (client GroupClient) CheckExistenceResponder(resp *http.Response) (result a // CheckExistenceByID checks by ID whether a resource exists. // -// resourceID is the fully qualified ID of the resource, including the resource -// name and resource type. Use the format, +// resourceID is the fully qualified ID of the resource, including the resource name and resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} func (client GroupClient) CheckExistenceByID(resourceID string) (result autorest.Response, err error) { req, err := client.CheckExistenceByIDPreparer(resourceID) @@ -153,7 +149,7 @@ func (client GroupClient) CheckExistenceByIDPreparer(resourceID string) (*http.R "resourceId": resourceID, } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -184,16 +180,13 @@ func (client GroupClient) CheckExistenceByIDResponder(resp *http.Response) (resu return } -// CreateOrUpdate creates a resource. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates a resource. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group for the resource. The -// name is case insensitive. resourceProviderNamespace is the namespace of the -// resource provider. parentResourcePath is the parent resource identity. -// resourceType is the resource type of the resource to create. resourceName is -// the name of the resource to create. parameters is parameters for creating or -// updating the resource. +// resourceGroupName is the name of the resource group for the resource. The name is case insensitive. +// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource +// identity. resourceType is the resource type of the resource to create. resourceName is the name of the resource to +// create. parameters is parameters for creating or updating the resource. func (client GroupClient) CreateOrUpdate(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, parameters GenericResource, cancel <-chan struct{}) (<-chan GenericResource, <-chan error) { resultChan := make(chan GenericResource, 1) errChan := make(chan error, 1) @@ -215,8 +208,10 @@ func (client GroupClient) CreateOrUpdate(resourceGroupName string, resourceProvi var err error var result GenericResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -252,7 +247,7 @@ func (client GroupClient) CreateOrUpdatePreparer(resourceGroupName string, resou "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -288,13 +283,10 @@ func (client GroupClient) CreateOrUpdateResponder(resp *http.Response) (result G return } -// CreateOrUpdateByID create a resource by ID. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdateByID create a resource by ID. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceID is the fully qualified ID of the resource, including the resource -// name and resource type. Use the format, +// resourceID is the fully qualified ID of the resource, including the resource name and resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} // parameters is create or update resource parameters. func (client GroupClient) CreateOrUpdateByID(resourceID string, parameters GenericResource, cancel <-chan struct{}) (<-chan GenericResource, <-chan error) { @@ -314,8 +306,10 @@ func (client GroupClient) CreateOrUpdateByID(resourceID string, parameters Gener var err error var result GenericResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -346,7 +340,7 @@ func (client GroupClient) CreateOrUpdateByIDPreparer(resourceID string, paramete "resourceId": resourceID, } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -382,15 +376,12 @@ func (client GroupClient) CreateOrUpdateByIDResponder(resp *http.Response) (resu return } -// Delete deletes a resource. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes a resource. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource to delete. The name is case insensitive. resourceProviderNamespace -// is the namespace of the resource provider. parentResourcePath is the parent -// resource identity. resourceType is the resource type. resourceName is the -// name of the resource to delete. +// resourceGroupName is the name of the resource group that contains the resource to delete. The name is case +// insensitive. resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent +// resource identity. resourceType is the resource type. resourceName is the name of the resource to delete. func (client GroupClient) Delete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -409,8 +400,10 @@ func (client GroupClient) Delete(resourceGroupName string, resourceProviderNames var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -446,7 +439,7 @@ func (client GroupClient) DeletePreparer(resourceGroupName string, resourceProvi "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -479,12 +472,10 @@ func (client GroupClient) DeleteResponder(resp *http.Response) (result autorest. return } -// DeleteByID deletes a resource by ID. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// DeleteByID deletes a resource by ID. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceID is the fully qualified ID of the resource, including the resource -// name and resource type. Use the format, +// resourceID is the fully qualified ID of the resource, including the resource name and resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} func (client GroupClient) DeleteByID(resourceID string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) @@ -493,8 +484,10 @@ func (client GroupClient) DeleteByID(resourceID string, cancel <-chan struct{}) var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -525,7 +518,7 @@ func (client GroupClient) DeleteByIDPreparer(resourceID string, cancel <-chan st "resourceId": resourceID, } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -560,11 +553,9 @@ func (client GroupClient) DeleteByIDResponder(resp *http.Response) (result autor // Get gets a resource. // -// resourceGroupName is the name of the resource group containing the resource -// to get. The name is case insensitive. resourceProviderNamespace is the -// namespace of the resource provider. parentResourcePath is the parent -// resource identity. resourceType is the resource type of the resource. -// resourceName is the name of the resource to get. +// resourceGroupName is the name of the resource group containing the resource to get. The name is case insensitive. +// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource +// identity. resourceType is the resource type of the resource. resourceName is the name of the resource to get. func (client GroupClient) Get(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result GenericResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -606,7 +597,7 @@ func (client GroupClient) GetPreparer(resourceGroupName string, resourceProvider "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -640,8 +631,7 @@ func (client GroupClient) GetResponder(resp *http.Response) (result GenericResou // GetByID gets a resource by ID. // -// resourceID is the fully qualified ID of the resource, including the resource -// name and resource type. Use the format, +// resourceID is the fully qualified ID of the resource, including the resource name and resource type. Use the format, // /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name} func (client GroupClient) GetByID(resourceID string) (result GenericResource, err error) { req, err := client.GetByIDPreparer(resourceID) @@ -671,7 +661,7 @@ func (client GroupClient) GetByIDPreparer(resourceID string) (*http.Request, err "resourceId": resourceID, } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -705,9 +695,8 @@ func (client GroupClient) GetByIDResponder(resp *http.Response) (result GenericR // List get all the resources in a subscription. // -// filter is the filter to apply on the operation. expand is the $expand query -// parameter. top is the number of results to return. If null is passed, -// returns all resource groups. +// filter is the filter to apply on the operation. expand is the $expand query parameter. top is the number of results +// to return. If null is passed, returns all resource groups. func (client GroupClient) List(filter string, expand string, top *int32) (result ListResult, err error) { req, err := client.ListPreparer(filter, expand, top) if err != nil { @@ -736,7 +725,7 @@ func (client GroupClient) ListPreparer(filter string, expand string, top *int32) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -801,16 +790,211 @@ func (client GroupClient) ListNextResults(lastResults ListResult) (result ListRe return } -// MoveResources the resources to move must be in the same source resource -// group. The target resource group may be in a different subscription. When -// moving resources, both the source group and the target group are locked for -// the duration of the operation. Write and delete operations are blocked on -// the groups until the move completes. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(filter string, expand string, top *int32, cancel <-chan struct{}) (<-chan GenericResource, <-chan error) { + resultChan := make(chan GenericResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter, expand, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup get all the resources for a resource group. // -// sourceResourceGroupName is the name of the resource group containing the -// rsources to move. parameters is parameters for moving resources. +// resourceGroupName is the resource group with the resources to get. filter is the filter to apply on the operation. +// expand is the $expand query parameter top is the number of results to return. If null is passed, returns all +// resources. +func (client GroupClient) ListByResourceGroup(resourceGroupName string, filter string, expand string, top *int32) (result ListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "resources.GroupClient", "ListByResourceGroup") + } + + req, err := client.ListByResourceGroupPreparer(resourceGroupName, filter, expand, top) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "resources.GroupClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client GroupClient) ListByResourceGroupPreparer(resourceGroupName string, filter string, expand string, top *int32) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(filter) > 0 { + queryParameters["$filter"] = autorest.Encode("query", filter) + } + if len(expand) > 0 { + queryParameters["$expand"] = autorest.Encode("query", expand) + } + if top != nil { + queryParameters["$top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client GroupClient) ListByResourceGroupResponder(resp *http.Response) (result ListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client GroupClient) ListByResourceGroupNextResults(lastResults ListResult) (result ListResult, err error) { + req, err := lastResults.ListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "resources.GroupClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "resources.GroupClient", "ListByResourceGroup", resp, "Failure sending next results request") + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupClient", "ListByResourceGroup", resp, "Failure responding to next results request") + } + + return +} + +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client GroupClient) ListByResourceGroupComplete(resourceGroupName string, filter string, expand string, top *int32, cancel <-chan struct{}) (<-chan GenericResource, <-chan error) { + resultChan := make(chan GenericResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, filter, expand, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// MoveResources the resources to move must be in the same source resource group. The target resource group may be in a +// different subscription. When moving resources, both the source group and the target group are locked for the +// duration of the operation. Write and delete operations are blocked on the groups until the move completes. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. +// +// sourceResourceGroupName is the name of the resource group containing the resources to move. parameters is parameters +// for moving resources. func (client GroupClient) MoveResources(sourceResourceGroupName string, parameters MoveInfo, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -829,8 +1013,10 @@ func (client GroupClient) MoveResources(sourceResourceGroupName string, paramete var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -862,7 +1048,7 @@ func (client GroupClient) MoveResourcesPreparer(sourceResourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -896,3 +1082,100 @@ func (client GroupClient) MoveResourcesResponder(resp *http.Response) (result au result.Response = resp return } + +// ValidateMoveResources this operation checks whether the specified resources can be moved to the target. The +// resources to move must be in the same source resource group. The target resource group may be in a different +// subscription. If validation succeeds, it returns HTTP response code 204 (no content). If validation fails, it +// returns HTTP response code 409 (Conflict) with an error message. Retrieve the URL in the Location header value to +// check the result of the long-running operation. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// sourceResourceGroupName is the name of the resource group containing the resources to validate for move. parameters +// is parameters for moving resources. +func (client GroupClient) ValidateMoveResources(sourceResourceGroupName string, parameters MoveInfo, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: sourceResourceGroupName, + Constraints: []validation.Constraint{{Target: "sourceResourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "sourceResourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "sourceResourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "resources.GroupClient", "ValidateMoveResources") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.ValidateMoveResourcesPreparer(sourceResourceGroupName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupClient", "ValidateMoveResources", nil, "Failure preparing request") + return + } + + resp, err := client.ValidateMoveResourcesSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "resources.GroupClient", "ValidateMoveResources", resp, "Failure sending request") + return + } + + result, err = client.ValidateMoveResourcesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "resources.GroupClient", "ValidateMoveResources", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// ValidateMoveResourcesPreparer prepares the ValidateMoveResources request. +func (client GroupClient) ValidateMoveResourcesPreparer(sourceResourceGroupName string, parameters MoveInfo, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "sourceResourceGroupName": autorest.Encode("path", sourceResourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-05-10" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{sourceResourceGroupName}/validateMoveResources", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// ValidateMoveResourcesSender sends the ValidateMoveResources request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) ValidateMoveResourcesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// ValidateMoveResourcesResponder handles the response to the ValidateMoveResources request. The method always +// closes the http.Response Body. +func (client GroupClient) ValidateMoveResourcesResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusConflict), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go index 13244a9ea..3eae2eab7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/groups.go @@ -14,9 +14,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// GroupsClient is the provides operations for working with resources and -// resource groups. +// GroupsClient is the provides operations for working with resources and resource groups. type GroupsClient struct { ManagementClient } @@ -43,8 +41,7 @@ func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsCli // CheckExistence checks whether a resource group exists. // -// resourceGroupName is the name of the resource group to check. The name is -// case insensitive. +// resourceGroupName is the name of the resource group to check. The name is case insensitive. func (client GroupsClient) CheckExistence(resourceGroupName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -82,7 +79,7 @@ func (client GroupsClient) CheckExistencePreparer(resourceGroupName string) (*ht "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -113,10 +110,10 @@ func (client GroupsClient) CheckExistenceResponder(resp *http.Response) (result return } -// CreateOrUpdate creates a resource group. +// CreateOrUpdate creates or updates a resource group. // -// resourceGroupName is the name of the resource group to create or update. -// parameters is parameters supplied to the create or update a resource group. +// resourceGroupName is the name of the resource group to create or update. parameters is parameters supplied to the +// create or update a resource group. func (client GroupsClient) CreateOrUpdate(resourceGroupName string, parameters Group) (result Group, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -156,7 +153,7 @@ func (client GroupsClient) CreateOrUpdatePreparer(resourceGroupName string, para "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -190,14 +187,12 @@ func (client GroupsClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete when you delete a resource group, all of its resources are also -// deleted. Deleting a resource group deletes all of its template deployments -// and currently stored operations. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete when you delete a resource group, all of its resources are also deleted. Deleting a resource group deletes +// all of its template deployments and currently stored operations. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group to delete. The name is -// case insensitive. +// resourceGroupName is the name of the resource group to delete. The name is case insensitive. func (client GroupsClient) Delete(resourceGroupName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -216,8 +211,10 @@ func (client GroupsClient) Delete(resourceGroupName string, cancel <-chan struct var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -249,7 +246,7 @@ func (client GroupsClient) DeletePreparer(resourceGroupName string, cancel <-cha "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -284,8 +281,8 @@ func (client GroupsClient) DeleteResponder(resp *http.Response) (result autorest // ExportTemplate captures the specified resource group as a template. // -// resourceGroupName is the name of the resource group to export as a template. -// parameters is parameters for exporting the template. +// resourceGroupName is the name of the resource group to export as a template. parameters is parameters for exporting +// the template. func (client GroupsClient) ExportTemplate(resourceGroupName string, parameters ExportTemplateRequest) (result GroupExportResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -323,7 +320,7 @@ func (client GroupsClient) ExportTemplatePreparer(resourceGroupName string, para "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -359,8 +356,7 @@ func (client GroupsClient) ExportTemplateResponder(resp *http.Response) (result // Get gets a resource group. // -// resourceGroupName is the name of the resource group to get. The name is case -// insensitive. +// resourceGroupName is the name of the resource group to get. The name is case insensitive. func (client GroupsClient) Get(resourceGroupName string) (result Group, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -398,7 +394,7 @@ func (client GroupsClient) GetPreparer(resourceGroupName string) (*http.Request, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -432,8 +428,8 @@ func (client GroupsClient) GetResponder(resp *http.Response) (result Group, err // List gets all the resource groups for a subscription. // -// filter is the filter to apply on the operation. top is the number of results -// to return. If null is passed, returns all resource groups. +// filter is the filter to apply on the operation. top is the number of results to return. If null is passed, returns +// all resource groups. func (client GroupsClient) List(filter string, top *int32) (result GroupListResult, err error) { req, err := client.ListPreparer(filter, top) if err != nil { @@ -462,7 +458,7 @@ func (client GroupsClient) ListPreparer(filter string, top *int32) (*http.Reques "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -524,159 +520,94 @@ func (client GroupsClient) ListNextResults(lastResults GroupListResult) (result return } -// ListResources get all the resources for a resource group. +// ListComplete gets all elements from the list without paging. +func (client GroupsClient) ListComplete(filter string, top *int32, cancel <-chan struct{}) (<-chan Group, <-chan error) { + resultChan := make(chan Group) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(filter, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update resource groups can be updated through a simple PATCH operation to a group address. The format of the request +// is the same as that for creating a resource group. If a field is unspecified, the current value is retained. // -// resourceGroupName is the resource group with the resources to get. filter is -// the filter to apply on the operation. expand is the $expand query parameter -// top is the number of results to return. If null is passed, returns all -// resources. -func (client GroupsClient) ListResources(resourceGroupName string, filter string, expand string, top *int32) (result ListResult, err error) { +// resourceGroupName is the name of the resource group to update. The name is case insensitive. parameters is +// parameters supplied to update a resource group. +func (client GroupsClient) Update(resourceGroupName string, parameters GroupPatchable) (result Group, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "resources.GroupsClient", "ListResources") + return result, validation.NewErrorWithValidationError(err, "resources.GroupsClient", "Update") } - req, err := client.ListResourcesPreparer(resourceGroupName, filter, expand, top) + req, err := client.UpdatePreparer(resourceGroupName, parameters) if err != nil { - err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ListResources", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", nil, "Failure preparing request") return } - resp, err := client.ListResourcesSender(req) + resp, err := client.UpdateSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ListResources", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure sending request") return } - result, err = client.ListResourcesResponder(resp) + result, err = client.UpdateResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ListResources", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Update", resp, "Failure responding to request") } return } -// ListResourcesPreparer prepares the ListResources request. -func (client GroupsClient) ListResourcesPreparer(resourceGroupName string, filter string, expand string, top *int32) (*http.Request, error) { +// UpdatePreparer prepares the Update request. +func (client GroupsClient) UpdatePreparer(resourceGroupName string, parameters GroupPatchable) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if len(filter) > 0 { - queryParameters["$filter"] = autorest.Encode("query", filter) - } - if len(expand) > 0 { - queryParameters["$expand"] = autorest.Encode("query", expand) - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListResourcesSender sends the ListResources request. The method will close the -// http.Response Body if it receives an error. -func (client GroupsClient) ListResourcesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListResourcesResponder handles the response to the ListResources request. The method always -// closes the http.Response Body. -func (client GroupsClient) ListResourcesResponder(resp *http.Response) (result ListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListResourcesNextResults retrieves the next set of results, if any. -func (client GroupsClient) ListResourcesNextResults(lastResults ListResult) (result ListResult, err error) { - req, err := lastResults.ListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "resources.GroupsClient", "ListResources", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListResourcesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "resources.GroupsClient", "ListResources", resp, "Failure sending next results request") - } - - result, err = client.ListResourcesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "resources.GroupsClient", "ListResources", resp, "Failure responding to next results request") - } - - return -} - -// Patch resource groups can be updated through a simple PATCH operation to a -// group address. The format of the request is the same as that for creating a -// resource group. If a field is unspecified, the current value is retained. -// -// resourceGroupName is the name of the resource group to update. The name is -// case insensitive. parameters is parameters supplied to update a resource -// group. -func (client GroupsClient) Patch(resourceGroupName string, parameters Group) (result Group, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "resources.GroupsClient", "Patch") - } - - req, err := client.PatchPreparer(resourceGroupName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Patch", nil, "Failure preparing request") - return - } - - resp, err := client.PatchSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Patch", resp, "Failure sending request") - return - } - - result, err = client.PatchResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "resources.GroupsClient", "Patch", resp, "Failure responding to request") - } - - return -} - -// PatchPreparer prepares the Patch request. -func (client GroupsClient) PatchPreparer(resourceGroupName string, parameters Group) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -691,15 +622,15 @@ func (client GroupsClient) PatchPreparer(resourceGroupName string, parameters Gr return preparer.Prepare(&http.Request{}) } -// PatchSender sends the Patch request. The method will close the +// UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. -func (client GroupsClient) PatchSender(req *http.Request) (*http.Response, error) { +func (client GroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// PatchResponder handles the response to the Patch request. The method always +// UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client GroupsClient) PatchResponder(resp *http.Response) (result Group, err error) { +func (client GroupsClient) UpdateResponder(resp *http.Response) (result Group, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go index dd0f06f5f..70bd4c1b3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/models.go @@ -14,9 +14,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -39,8 +38,7 @@ const ( type ResourceIdentityType string const ( - // SystemAssigned specifies the system assigned state for resource identity - // type. + // SystemAssigned specifies the system assigned state for resource identity type. SystemAssigned ResourceIdentityType = "SystemAssigned" ) @@ -168,8 +166,7 @@ type DeploymentProperties struct { DebugSetting *DebugSetting `json:"debugSetting,omitempty"` } -// DeploymentPropertiesExtended is deployment properties with additional -// details. +// DeploymentPropertiesExtended is deployment properties with additional details. type DeploymentPropertiesExtended struct { ProvisioningState *string `json:"provisioningState,omitempty"` CorrelationID *string `json:"correlationId,omitempty"` @@ -185,8 +182,7 @@ type DeploymentPropertiesExtended struct { DebugSetting *DebugSetting `json:"debugSetting,omitempty"` } -// DeploymentValidateResult is information from validate template deployment -// response. +// DeploymentValidateResult is information from validate template deployment response. type DeploymentValidateResult struct { autorest.Response `json:"-"` Error *ManagementErrorWithDetails `json:"error,omitempty"` @@ -233,7 +229,7 @@ type Group struct { Tags *map[string]*string `json:"tags,omitempty"` } -// GroupExportResult is +// GroupExportResult is resource group export result. type GroupExportResult struct { autorest.Response `json:"-"` Template *map[string]interface{} `json:"template,omitempty"` @@ -265,12 +261,20 @@ func (client GroupListResult) GroupListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } +// GroupPatchable is resource group information. +type GroupPatchable struct { + Name *string `json:"name,omitempty"` + Properties *GroupProperties `json:"properties,omitempty"` + ManagedBy *string `json:"managedBy,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + // GroupProperties is the resource group properties. type GroupProperties struct { ProvisioningState *string `json:"provisioningState,omitempty"` } -// HTTPMessage is +// HTTPMessage is HTTP message. type HTTPMessage struct { Content *map[string]interface{} `json:"content,omitempty"` } @@ -301,7 +305,7 @@ func (client ListResult) ListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// ManagementErrorWithDetails is +// ManagementErrorWithDetails is the detailed error message of resource management. type ManagementErrorWithDetails struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` @@ -315,8 +319,7 @@ type MoveInfo struct { TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` } -// ParametersLink is entity representing the reference to the deployment -// paramaters. +// ParametersLink is entity representing the reference to the deployment paramaters. type ParametersLink struct { URI *string `json:"uri,omitempty"` ContentVersion *string `json:"contentVersion,omitempty"` @@ -358,8 +361,7 @@ func (client ProviderListResult) ProviderListResultPreparer() (*http.Request, er autorest.WithBaseURL(to.String(client.NextLink))) } -// ProviderOperationDisplayProperties is resource provider operation's display -// properties. +// ProviderOperationDisplayProperties is resource provider operation's display properties. type ProviderOperationDisplayProperties struct { Publisher *string `json:"publisher,omitempty"` Provider *string `json:"provider,omitempty"` @@ -377,7 +379,7 @@ type ProviderResourceType struct { Properties *map[string]*string `json:"properties,omitempty"` } -// Resource is +// Resource is resource. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -386,7 +388,7 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// Sku is sKU for the resource. +// Sku is SKU for the resource. type Sku struct { Name *string `json:"name,omitempty"` Tier *string `json:"tier,omitempty"` @@ -396,7 +398,7 @@ type Sku struct { Capacity *int32 `json:"capacity,omitempty"` } -// SubResource is +// SubResource is sub-resource. type SubResource struct { ID *string `json:"id,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go index 7fd6dc158..173b4626b 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/providers.go @@ -14,9 +14,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// ProvidersClient is the provides operations for working with resources and -// resource groups. +// ProvidersClient is the provides operations for working with resources and resource groups. type ProvidersClient struct { ManagementClient } @@ -35,17 +33,15 @@ func NewProvidersClient(subscriptionID string) ProvidersClient { return NewProvidersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient -// client. +// NewProvidersClientWithBaseURI creates an instance of the ProvidersClient client. func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient { return ProvidersClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets the specified resource provider. // -// resourceProviderNamespace is the namespace of the resource provider. expand -// is the $expand query parameter. For example, to include property aliases in -// response, use $expand=resourceTypes/aliases. +// resourceProviderNamespace is the namespace of the resource provider. expand is the $expand query parameter. For +// example, to include property aliases in response, use $expand=resourceTypes/aliases. func (client ProvidersClient) Get(resourceProviderNamespace string, expand string) (result Provider, err error) { req, err := client.GetPreparer(resourceProviderNamespace, expand) if err != nil { @@ -75,7 +71,7 @@ func (client ProvidersClient) GetPreparer(resourceProviderNamespace string, expa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,11 +108,9 @@ func (client ProvidersClient) GetResponder(resp *http.Response) (result Provider // List gets all resource providers for a subscription. // -// top is the number of results to return. If null is passed returns all -// deployments. expand is the properties to include in the results. For -// example, use &$expand=metadata in the query string to retrieve resource -// provider metadata. To include property aliases in response, use -// $expand=resourceTypes/aliases. +// top is the number of results to return. If null is passed returns all deployments. expand is the properties to +// include in the results. For example, use &$expand=metadata in the query string to retrieve resource provider +// metadata. To include property aliases in response, use $expand=resourceTypes/aliases. func (client ProvidersClient) List(top *int32, expand string) (result ProviderListResult, err error) { req, err := client.ListPreparer(top, expand) if err != nil { @@ -145,7 +139,7 @@ func (client ProvidersClient) ListPreparer(top *int32, expand string) (*http.Req "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -207,10 +201,54 @@ func (client ProvidersClient) ListNextResults(lastResults ProviderListResult) (r return } +// ListComplete gets all elements from the list without paging. +func (client ProvidersClient) ListComplete(top *int32, expand string, cancel <-chan struct{}) (<-chan Provider, <-chan error) { + resultChan := make(chan Provider) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(top, expand) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Register registers a subscription with a resource provider. // -// resourceProviderNamespace is the namespace of the resource provider to -// register. +// resourceProviderNamespace is the namespace of the resource provider to register. func (client ProvidersClient) Register(resourceProviderNamespace string) (result Provider, err error) { req, err := client.RegisterPreparer(resourceProviderNamespace) if err != nil { @@ -240,7 +278,7 @@ func (client ProvidersClient) RegisterPreparer(resourceProviderNamespace string) "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -274,8 +312,7 @@ func (client ProvidersClient) RegisterResponder(resp *http.Response) (result Pro // Unregister unregisters a subscription from a resource provider. // -// resourceProviderNamespace is the namespace of the resource provider to -// unregister. +// resourceProviderNamespace is the namespace of the resource provider to unregister. func (client ProvidersClient) Unregister(resourceProviderNamespace string) (result Provider, err error) { req, err := client.UnregisterPreparer(resourceProviderNamespace) if err != nil { @@ -305,7 +342,7 @@ func (client ProvidersClient) UnregisterPreparer(resourceProviderNamespace strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go index 445fccf62..a90b390af 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/tags.go @@ -14,9 +14,8 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// TagsClient is the provides operations for working with resources and -// resource groups. +// TagsClient is the provides operations for working with resources and resource groups. type TagsClient struct { ManagementClient } @@ -40,9 +38,8 @@ func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient return TagsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate the tag name can have a maximum of 512 characters and is case -// insensitive. Tag names created by Azure have prefixes of microsoft, azure, -// or windows. You cannot create tags with one of these prefixes. +// CreateOrUpdate the tag name can have a maximum of 512 characters and is case insensitive. Tag names created by Azure +// have prefixes of microsoft, azure, or windows. You cannot create tags with one of these prefixes. // // tagName is the name of the tag to create. func (client TagsClient) CreateOrUpdate(tagName string) (result TagDetails, err error) { @@ -74,7 +71,7 @@ func (client TagsClient) CreateOrUpdatePreparer(tagName string) (*http.Request, "tagName": autorest.Encode("path", tagName), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -106,8 +103,7 @@ func (client TagsClient) CreateOrUpdateResponder(resp *http.Response) (result Ta return } -// CreateOrUpdateValue creates a tag value. The name of the tag must already -// exist. +// CreateOrUpdateValue creates a tag value. The name of the tag must already exist. // // tagName is the name of the tag. tagValue is the value of the tag to create. func (client TagsClient) CreateOrUpdateValue(tagName string, tagValue string) (result TagValue, err error) { @@ -140,7 +136,7 @@ func (client TagsClient) CreateOrUpdateValuePreparer(tagName string, tagValue st "tagValue": autorest.Encode("path", tagValue), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -172,8 +168,7 @@ func (client TagsClient) CreateOrUpdateValueResponder(resp *http.Response) (resu return } -// Delete you must remove all values from a resource tag before you can delete -// it. +// Delete you must remove all values from a resource tag before you can delete it. // // tagName is the name of the tag. func (client TagsClient) Delete(tagName string) (result autorest.Response, err error) { @@ -205,7 +200,7 @@ func (client TagsClient) DeletePreparer(tagName string) (*http.Request, error) { "tagName": autorest.Encode("path", tagName), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -269,7 +264,7 @@ func (client TagsClient) DeleteValuePreparer(tagName string, tagValue string) (* "tagValue": autorest.Encode("path", tagValue), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -300,8 +295,7 @@ func (client TagsClient) DeleteValueResponder(resp *http.Response) (result autor return } -// List gets the names and values of all resource tags that are defined in a -// subscription. +// List gets the names and values of all resource tags that are defined in a subscription. func (client TagsClient) List() (result TagsListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -330,7 +324,7 @@ func (client TagsClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-09-01" + const APIVersion = "2017-05-10" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -385,3 +379,48 @@ func (client TagsClient) ListNextResults(lastResults TagsListResult) (result Tag return } + +// ListComplete gets all elements from the list without paging. +func (client TagsClient) ListComplete(cancel <-chan struct{}) (<-chan TagDetails, <-chan error) { + resultChan := make(chan TagDetails) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go index e8ef96bd5..f1ff686a7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/resources/version.go @@ -14,15 +14,15 @@ package resources // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-resources/2017-05-10" + return "Azure-SDK-For-Go/v11.0.0-beta arm-resources/2017-05-10" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/client.go index 31a609091..be46092b9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/client.go @@ -1,9 +1,7 @@ -// Package subscriptions implements the Azure ARM Subscriptions service API -// version 2016-06-01. +// Package subscriptions implements the Azure ARM Subscriptions service API version 2016-06-01. // -// All resource groups and resources exist within subscriptions. These -// operation enable you get information about your subscriptions and tenants. A -// tenant is a dedicated instance of Azure Active Directory (Azure AD) for your +// All resource groups and resources exist within subscriptions. These operation enable you get information about your +// subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your // organization. package subscriptions @@ -21,9 +19,8 @@ package subscriptions // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/subscriptionsgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/group.go old mode 100755 new mode 100644 similarity index 86% rename from vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/subscriptionsgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/group.go index b8042f65d..77000f7ee --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/subscriptionsgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/group.go @@ -14,9 +14,8 @@ package subscriptions // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,10 +23,9 @@ import ( "net/http" ) -// GroupClient is the all resource groups and resources exist within -// subscriptions. These operation enable you get information about your -// subscriptions and tenants. A tenant is a dedicated instance of Azure Active -// Directory (Azure AD) for your organization. +// GroupClient is the all resource groups and resources exist within subscriptions. These operation enable you get +// information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure +// AD) for your organization. type GroupClient struct { ManagementClient } @@ -186,9 +184,53 @@ func (client GroupClient) ListNextResults(lastResults ListResult) (result ListRe return } -// ListLocations this operation provides all the locations that are available -// for resource providers; however, each resource provider may support a subset -// of this list. +// ListComplete gets all elements from the list without paging. +func (client GroupClient) ListComplete(cancel <-chan struct{}) (<-chan Subscription, <-chan error) { + resultChan := make(chan Subscription) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListLocations this operation provides all the locations that are available for resource providers; however, each +// resource provider may support a subset of this list. // // subscriptionID is the ID of the target subscription. func (client GroupClient) ListLocations(subscriptionID string) (result LocationListResult, err error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/models.go index e2cf1743f..107c5b366 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/models.go @@ -14,9 +14,8 @@ package subscriptions // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -28,8 +27,7 @@ import ( type SpendingLimit string const ( - // CurrentPeriodOff specifies the current period off state for spending - // limit. + // CurrentPeriodOff specifies the current period off state for spending limit. CurrentPeriodOff SpendingLimit = "CurrentPeriodOff" // Off specifies the off state for spending limit. Off SpendingLimit = "Off" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/tenants.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/tenants.go index 35b2cd26d..2cd34657e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/tenants.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/tenants.go @@ -14,9 +14,8 @@ package subscriptions // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,10 +23,9 @@ import ( "net/http" ) -// TenantsClient is the all resource groups and resources exist within -// subscriptions. These operation enable you get information about your -// subscriptions and tenants. A tenant is a dedicated instance of Azure Active -// Directory (Azure AD) for your organization. +// TenantsClient is the all resource groups and resources exist within subscriptions. These operation enable you get +// information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure +// AD) for your organization. type TenantsClient struct { ManagementClient } @@ -122,3 +120,48 @@ func (client TenantsClient) ListNextResults(lastResults TenantListResult) (resul return } + +// ListComplete gets all elements from the list without paging. +func (client TenantsClient) ListComplete(cancel <-chan struct{}) (<-chan TenantIDDescription, <-chan error) { + resultChan := make(chan TenantIDDescription) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go index 423a732ef..4413c7b90 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/resources/subscriptions/version.go @@ -14,15 +14,15 @@ package subscriptions // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-subscriptions/2016-06-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-subscriptions/2016-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/client.go index 4d99f6f11..113dc5553 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/client.go @@ -1,5 +1,4 @@ -// Package scheduler implements the Azure ARM Scheduler service API version -// 2016-03-01. +// Package scheduler implements the Azure ARM Scheduler service API version 2016-03-01. // // package scheduler @@ -18,9 +17,8 @@ package scheduler // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobcollections.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobcollections.go index 9e192dad7..47acfe050 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobcollections.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobcollections.go @@ -14,9 +14,8 @@ package scheduler // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,29 +23,25 @@ import ( "net/http" ) -// JobCollectionsClient is the client for the JobCollections methods of the -// Scheduler service. +// JobCollectionsClient is the client for the JobCollections methods of the Scheduler service. type JobCollectionsClient struct { ManagementClient } -// NewJobCollectionsClient creates an instance of the JobCollectionsClient -// client. +// NewJobCollectionsClient creates an instance of the JobCollectionsClient client. func NewJobCollectionsClient(subscriptionID string) JobCollectionsClient { return NewJobCollectionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewJobCollectionsClientWithBaseURI creates an instance of the -// JobCollectionsClient client. +// NewJobCollectionsClientWithBaseURI creates an instance of the JobCollectionsClient client. func NewJobCollectionsClientWithBaseURI(baseURI string, subscriptionID string) JobCollectionsClient { return JobCollectionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate provisions a new job collection or updates an existing job -// collection. +// CreateOrUpdate provisions a new job collection or updates an existing job collection. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobCollection is the job collection definition. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobCollection is the job +// collection definition. func (client JobCollectionsClient) CreateOrUpdate(resourceGroupName string, jobCollectionName string, jobCollection JobCollectionDefinition) (result JobCollectionDefinition, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, jobCollectionName, jobCollection) if err != nil { @@ -111,12 +106,10 @@ func (client JobCollectionsClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes a job collection. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes a job collection. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. func (client JobCollectionsClient) Delete(resourceGroupName string, jobCollectionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -124,8 +117,10 @@ func (client JobCollectionsClient) Delete(resourceGroupName string, jobCollectio var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -191,13 +186,11 @@ func (client JobCollectionsClient) DeleteResponder(resp *http.Response) (result return } -// Disable disables all of the jobs in the job collection. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Disable disables all of the jobs in the job collection. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. func (client JobCollectionsClient) Disable(resourceGroupName string, jobCollectionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -205,8 +198,10 @@ func (client JobCollectionsClient) Disable(resourceGroupName string, jobCollecti var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -272,13 +267,11 @@ func (client JobCollectionsClient) DisableResponder(resp *http.Response) (result return } -// Enable enables all of the jobs in the job collection. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Enable enables all of the jobs in the job collection. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. func (client JobCollectionsClient) Enable(resourceGroupName string, jobCollectionName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -286,8 +279,10 @@ func (client JobCollectionsClient) Enable(resourceGroupName string, jobCollectio var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -355,8 +350,7 @@ func (client JobCollectionsClient) EnableResponder(resp *http.Response) (result // Get gets a job collection. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. func (client JobCollectionsClient) Get(resourceGroupName string, jobCollectionName string) (result JobCollectionDefinition, err error) { req, err := client.GetPreparer(resourceGroupName, jobCollectionName) if err != nil { @@ -507,6 +501,51 @@ func (client JobCollectionsClient) ListByResourceGroupNextResults(lastResults Jo return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client JobCollectionsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan JobCollectionDefinition, <-chan error) { + resultChan := make(chan JobCollectionDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBySubscription gets all job collections under specified subscription. func (client JobCollectionsClient) ListBySubscription() (result JobCollectionListResult, err error) { req, err := client.ListBySubscriptionPreparer() @@ -592,10 +631,55 @@ func (client JobCollectionsClient) ListBySubscriptionNextResults(lastResults Job return } +// ListBySubscriptionComplete gets all elements from the list without paging. +func (client JobCollectionsClient) ListBySubscriptionComplete(cancel <-chan struct{}) (<-chan JobCollectionDefinition, <-chan error) { + resultChan := make(chan JobCollectionDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscription() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Patch patches an existing job collection. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobCollection is the job collection definition. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobCollection is the job +// collection definition. func (client JobCollectionsClient) Patch(resourceGroupName string, jobCollectionName string, jobCollection JobCollectionDefinition) (result JobCollectionDefinition, err error) { req, err := client.PatchPreparer(resourceGroupName, jobCollectionName, jobCollection) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go index 64eab66c5..86300a7ac 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/jobs.go @@ -14,9 +14,8 @@ package scheduler // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -42,8 +41,8 @@ func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient // CreateOrUpdate provisions a new job or updates an existing job. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobName is the job name. job is the job definition. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobName is the job name. +// job is the job definition. func (client JobsClient) CreateOrUpdate(resourceGroupName string, jobCollectionName string, jobName string, job JobDefinition) (result JobDefinition, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, jobCollectionName, jobName, job) if err != nil { @@ -111,8 +110,7 @@ func (client JobsClient) CreateOrUpdateResponder(resp *http.Response) (result Jo // Delete deletes a job. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobName is the job name. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobName is the job name. func (client JobsClient) Delete(resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, jobCollectionName, jobName) if err != nil { @@ -177,8 +175,7 @@ func (client JobsClient) DeleteResponder(resp *http.Response) (result autorest.R // Get gets a job. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobName is the job name. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobName is the job name. func (client JobsClient) Get(resourceGroupName string, jobCollectionName string, jobName string) (result JobDefinition, err error) { req, err := client.GetPreparer(resourceGroupName, jobCollectionName, jobName) if err != nil { @@ -244,9 +241,8 @@ func (client JobsClient) GetResponder(resp *http.Response) (result JobDefinition // List lists all jobs under the specified job collection. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. top is the number of jobs to request, in the of range of -// [1..100]. skip is the (0-based) index of the job history list from which to +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. top is the number of +// jobs to request, in the of range of [1..100]. skip is the (0-based) index of the job history list from which to // begin requesting entries. filter is the filter to apply on the job state. func (client JobsClient) List(resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string) (result JobListResult, err error) { if err := validation.Validate([]validation.Validation{ @@ -352,13 +348,56 @@ func (client JobsClient) ListNextResults(lastResults JobListResult) (result JobL return } +// ListComplete gets all elements from the list without paging. +func (client JobsClient) ListComplete(resourceGroupName string, jobCollectionName string, top *int32, skip *int32, filter string, cancel <-chan struct{}) (<-chan JobDefinition, <-chan error) { + resultChan := make(chan JobDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(resourceGroupName, jobCollectionName, top, skip, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListJobHistory lists job history. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobName is the job name. top is the number of job history -// to request, in the of range of [1..100]. skip is the (0-based) index of the -// job history list from which to begin requesting entries. filter is the -// filter to apply on the job state. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobName is the job name. +// top is the number of job history to request, in the of range of [1..100]. skip is the (0-based) index of the job +// history list from which to begin requesting entries. filter is the filter to apply on the job state. func (client JobsClient) ListJobHistory(resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string) (result JobHistoryListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -464,10 +503,55 @@ func (client JobsClient) ListJobHistoryNextResults(lastResults JobHistoryListRes return } +// ListJobHistoryComplete gets all elements from the list without paging. +func (client JobsClient) ListJobHistoryComplete(resourceGroupName string, jobCollectionName string, jobName string, top *int32, skip *int32, filter string, cancel <-chan struct{}) (<-chan JobHistoryDefinition, <-chan error) { + resultChan := make(chan JobHistoryDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListJobHistory(resourceGroupName, jobCollectionName, jobName, top, skip, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListJobHistoryNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Patch patches an existing job. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobName is the job name. job is the job definition. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobName is the job name. +// job is the job definition. func (client JobsClient) Patch(resourceGroupName string, jobCollectionName string, jobName string, job JobDefinition) (result JobDefinition, err error) { req, err := client.PatchPreparer(resourceGroupName, jobCollectionName, jobName, job) if err != nil { @@ -535,8 +619,7 @@ func (client JobsClient) PatchResponder(resp *http.Response) (result JobDefiniti // Run runs a job. // -// resourceGroupName is the resource group name. jobCollectionName is the job -// collection name. jobName is the job name. +// resourceGroupName is the resource group name. jobCollectionName is the job collection name. jobName is the job name. func (client JobsClient) Run(resourceGroupName string, jobCollectionName string, jobName string) (result autorest.Response, err error) { req, err := client.RunPreparer(resourceGroupName, jobCollectionName, jobName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/models.go index d465de3bc..4f0eec127 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/models.go @@ -14,9 +14,8 @@ package scheduler // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -49,16 +48,13 @@ const ( type HTTPAuthenticationType string const ( - // ActiveDirectoryOAuth specifies the active directory o auth state for - // http authentication type. + // ActiveDirectoryOAuth specifies the active directory o auth state for http authentication type. ActiveDirectoryOAuth HTTPAuthenticationType = "ActiveDirectoryOAuth" // Basic specifies the basic state for http authentication type. Basic HTTPAuthenticationType = "Basic" - // ClientCertificate specifies the client certificate state for http - // authentication type. + // ClientCertificate specifies the client certificate state for http authentication type. ClientCertificate HTTPAuthenticationType = "ClientCertificate" - // NotSpecified specifies the not specified state for http authentication - // type. + // NotSpecified specifies the not specified state for http authentication type. NotSpecified HTTPAuthenticationType = "NotSpecified" ) @@ -70,11 +66,9 @@ const ( HTTP JobActionType = "Http" // HTTPS specifies the https state for job action type. HTTPS JobActionType = "Https" - // ServiceBusQueue specifies the service bus queue state for job action - // type. + // ServiceBusQueue specifies the service bus queue state for job action type. ServiceBusQueue JobActionType = "ServiceBusQueue" - // ServiceBusTopic specifies the service bus topic state for job action - // type. + // ServiceBusTopic specifies the service bus topic state for job action type. ServiceBusTopic JobActionType = "ServiceBusTopic" // StorageQueue specifies the storage queue state for job action type. StorageQueue JobActionType = "StorageQueue" @@ -110,8 +104,7 @@ const ( type JobHistoryActionName string const ( - // ErrorAction specifies the error action state for job history action - // name. + // ErrorAction specifies the error action state for job history action name. ErrorAction JobHistoryActionName = "ErrorAction" // MainAction specifies the main action state for job history action name. MainAction JobHistoryActionName = "MainAction" @@ -121,26 +114,19 @@ const ( type JobScheduleDay string const ( - // JobScheduleDayFriday specifies the job schedule day friday state for job - // schedule day. + // JobScheduleDayFriday specifies the job schedule day friday state for job schedule day. JobScheduleDayFriday JobScheduleDay = "Friday" - // JobScheduleDayMonday specifies the job schedule day monday state for job - // schedule day. + // JobScheduleDayMonday specifies the job schedule day monday state for job schedule day. JobScheduleDayMonday JobScheduleDay = "Monday" - // JobScheduleDaySaturday specifies the job schedule day saturday state for - // job schedule day. + // JobScheduleDaySaturday specifies the job schedule day saturday state for job schedule day. JobScheduleDaySaturday JobScheduleDay = "Saturday" - // JobScheduleDaySunday specifies the job schedule day sunday state for job - // schedule day. + // JobScheduleDaySunday specifies the job schedule day sunday state for job schedule day. JobScheduleDaySunday JobScheduleDay = "Sunday" - // JobScheduleDayThursday specifies the job schedule day thursday state for - // job schedule day. + // JobScheduleDayThursday specifies the job schedule day thursday state for job schedule day. JobScheduleDayThursday JobScheduleDay = "Thursday" - // JobScheduleDayTuesday specifies the job schedule day tuesday state for - // job schedule day. + // JobScheduleDayTuesday specifies the job schedule day tuesday state for job schedule day. JobScheduleDayTuesday JobScheduleDay = "Tuesday" - // JobScheduleDayWednesday specifies the job schedule day wednesday state - // for job schedule day. + // JobScheduleDayWednesday specifies the job schedule day wednesday state for job schedule day. JobScheduleDayWednesday JobScheduleDay = "Wednesday" ) @@ -184,34 +170,29 @@ const ( None RetryType = "None" ) -// ServiceBusAuthenticationType enumerates the values for service bus -// authentication type. +// ServiceBusAuthenticationType enumerates the values for service bus authentication type. type ServiceBusAuthenticationType string const ( - // ServiceBusAuthenticationTypeNotSpecified specifies the service bus - // authentication type not specified state for service bus authentication - // type. + // ServiceBusAuthenticationTypeNotSpecified specifies the service bus authentication type not specified state for + // service bus authentication type. ServiceBusAuthenticationTypeNotSpecified ServiceBusAuthenticationType = "NotSpecified" - // ServiceBusAuthenticationTypeSharedAccessKey specifies the service bus - // authentication type shared access key state for service bus - // authentication type. + // ServiceBusAuthenticationTypeSharedAccessKey specifies the service bus authentication type shared access key state + // for service bus authentication type. ServiceBusAuthenticationTypeSharedAccessKey ServiceBusAuthenticationType = "SharedAccessKey" ) -// ServiceBusTransportType enumerates the values for service bus transport -// type. +// ServiceBusTransportType enumerates the values for service bus transport type. type ServiceBusTransportType string const ( - // ServiceBusTransportTypeAMQP specifies the service bus transport type - // amqp state for service bus transport type. + // ServiceBusTransportTypeAMQP specifies the service bus transport type amqp state for service bus transport type. ServiceBusTransportTypeAMQP ServiceBusTransportType = "AMQP" - // ServiceBusTransportTypeNetMessaging specifies the service bus transport - // type net messaging state for service bus transport type. + // ServiceBusTransportTypeNetMessaging specifies the service bus transport type net messaging state for service bus + // transport type. ServiceBusTransportTypeNetMessaging ServiceBusTransportType = "NetMessaging" - // ServiceBusTransportTypeNotSpecified specifies the service bus transport - // type not specified state for service bus transport type. + // ServiceBusTransportTypeNotSpecified specifies the service bus transport type not specified state for service bus + // transport type. ServiceBusTransportTypeNotSpecified ServiceBusTransportType = "NotSpecified" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go index 2c1287818..211ca2e00 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/scheduler/version.go @@ -14,15 +14,15 @@ package scheduler // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-scheduler/2016-03-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-scheduler/2016-03-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/adminkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/adminkeys.go index 1f53128ee..5cfa9c79a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/adminkeys.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/adminkeys.go @@ -14,19 +14,17 @@ package search // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// AdminKeysClient is the client that can be used to manage Azure Search -// services and API keys. +// AdminKeysClient is the client that can be used to manage Azure Search services and API keys. type AdminKeysClient struct { ManagementClient } @@ -36,21 +34,17 @@ func NewAdminKeysClient(subscriptionID string) AdminKeysClient { return NewAdminKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAdminKeysClientWithBaseURI creates an instance of the AdminKeysClient -// client. +// NewAdminKeysClientWithBaseURI creates an instance of the AdminKeysClient client. func NewAdminKeysClientWithBaseURI(baseURI string, subscriptionID string) AdminKeysClient { return AdminKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get gets the primary and secondary admin API keys for the specified Azure -// Search service. +// Get gets the primary and secondary admin API keys for the specified Azure Search service. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service -// associated with the specified resource group. clientRequestID is a -// client-generated GUID value that identifies this request. If specified, this -// will be included in response information as a way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated +// with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If +// specified, this will be included in response information as a way to track the request. func (client AdminKeysClient) Get(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result AdminKeyResult, err error) { req, err := client.GetPreparer(resourceGroupName, searchServiceName, clientRequestID) if err != nil { @@ -117,17 +111,13 @@ func (client AdminKeysClient) GetResponder(resp *http.Response) (result AdminKey return } -// Regenerate regenerates either the primary or secondary admin API key. You -// can only regenerate one key at a time. +// Regenerate regenerates either the primary or secondary admin API key. You can only regenerate one key at a time. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service -// associated with the specified resource group. keyKind is specifies which key -// to regenerate. Valid values include 'primary' and 'secondary'. -// clientRequestID is a client-generated GUID value that identifies this -// request. If specified, this will be included in response information as a -// way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated +// with the specified resource group. keyKind is specifies which key to regenerate. Valid values include 'primary' and +// 'secondary'. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will +// be included in response information as a way to track the request. func (client AdminKeysClient) Regenerate(resourceGroupName string, searchServiceName string, keyKind AdminKeyKind, clientRequestID *uuid.UUID) (result AdminKeyResult, err error) { req, err := client.RegeneratePreparer(resourceGroupName, searchServiceName, keyKind, clientRequestID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/client.go index 06993d493..dee6991e0 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/client.go @@ -1,5 +1,4 @@ -// Package search implements the Azure ARM Search service API version -// 2015-08-19. +// Package search implements the Azure ARM Search service API version 2015-08-19. // // Client that can be used to manage Azure Search services and API keys. package search @@ -18,9 +17,8 @@ package search // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/models.go index 7716a21f7..eae8e7e57 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/models.go @@ -14,9 +14,8 @@ package search // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -58,23 +57,17 @@ const ( type ServiceStatus string const ( - // ServiceStatusDegraded specifies the service status degraded state for - // service status. + // ServiceStatusDegraded specifies the service status degraded state for service status. ServiceStatusDegraded ServiceStatus = "degraded" - // ServiceStatusDeleting specifies the service status deleting state for - // service status. + // ServiceStatusDeleting specifies the service status deleting state for service status. ServiceStatusDeleting ServiceStatus = "deleting" - // ServiceStatusDisabled specifies the service status disabled state for - // service status. + // ServiceStatusDisabled specifies the service status disabled state for service status. ServiceStatusDisabled ServiceStatus = "disabled" - // ServiceStatusError specifies the service status error state for service - // status. + // ServiceStatusError specifies the service status error state for service status. ServiceStatusError ServiceStatus = "error" - // ServiceStatusProvisioning specifies the service status provisioning - // state for service status. + // ServiceStatusProvisioning specifies the service status provisioning state for service status. ServiceStatusProvisioning ServiceStatus = "provisioning" - // ServiceStatusRunning specifies the service status running state for - // service status. + // ServiceStatusRunning specifies the service status running state for service status. ServiceStatusRunning ServiceStatus = "running" ) @@ -98,15 +91,13 @@ const ( type UnavailableNameReason string const ( - // AlreadyExists specifies the already exists state for unavailable name - // reason. + // AlreadyExists specifies the already exists state for unavailable name reason. AlreadyExists UnavailableNameReason = "AlreadyExists" // Invalid specifies the invalid state for unavailable name reason. Invalid UnavailableNameReason = "Invalid" ) -// AdminKeyResult is response containing the primary and secondary admin API -// keys for a given Azure Search service. +// AdminKeyResult is response containing the primary and secondary admin API keys for a given Azure Search service. type AdminKeyResult struct { autorest.Response `json:"-"` PrimaryKey *string `json:"primaryKey,omitempty"` @@ -132,8 +123,7 @@ type CloudError struct { Error *CloudErrorBody `json:"error,omitempty"` } -// CloudErrorBody is describes a particular API error with an error code and a -// message. +// CloudErrorBody is describes a particular API error with an error code and a message. type CloudErrorBody struct { Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` @@ -141,15 +131,13 @@ type CloudErrorBody struct { Details *[]CloudErrorBody `json:"details,omitempty"` } -// ListQueryKeysResult is response containing the query API keys for a given -// Azure Search service. +// ListQueryKeysResult is response containing the query API keys for a given Azure Search service. type ListQueryKeysResult struct { autorest.Response `json:"-"` Value *[]QueryKey `json:"value,omitempty"` } -// QueryKey is describes an API key for a given Azure Search service that has -// permissions for query operations only. +// QueryKey is describes an API key for a given Azure Search service that has permissions for query operations only. type QueryKey struct { autorest.Response `json:"-"` Name *string `json:"name,omitempty"` @@ -193,8 +181,7 @@ type ServiceProperties struct { ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` } -// Sku is defines the SKU of an Azure Search Service, which determines price -// tier and capacity limits. +// Sku is defines the SKU of an Azure Search Service, which determines price tier and capacity limits. type Sku struct { Name SkuName `json:"name,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/querykeys.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/querykeys.go index 087fd21db..b96f9fbca 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/querykeys.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/querykeys.go @@ -14,19 +14,17 @@ package search // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// QueryKeysClient is the client that can be used to manage Azure Search -// services and API keys. +// QueryKeysClient is the client that can be used to manage Azure Search services and API keys. type QueryKeysClient struct { ManagementClient } @@ -36,22 +34,18 @@ func NewQueryKeysClient(subscriptionID string) QueryKeysClient { return NewQueryKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewQueryKeysClientWithBaseURI creates an instance of the QueryKeysClient -// client. +// NewQueryKeysClientWithBaseURI creates an instance of the QueryKeysClient client. func NewQueryKeysClientWithBaseURI(baseURI string, subscriptionID string) QueryKeysClient { return QueryKeysClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create generates a new query key for the specified Search service. You can -// create up to 50 query keys per service. +// Create generates a new query key for the specified Search service. You can create up to 50 query keys per service. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service -// associated with the specified resource group. name is the name of the new -// query API key. clientRequestID is a client-generated GUID value that -// identifies this request. If specified, this will be included in response -// information as a way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated +// with the specified resource group. name is the name of the new query API key. clientRequestID is a client-generated +// GUID value that identifies this request. If specified, this will be included in response information as a way to +// track the request. func (client QueryKeysClient) Create(resourceGroupName string, searchServiceName string, name string, clientRequestID *uuid.UUID) (result QueryKey, err error) { req, err := client.CreatePreparer(resourceGroupName, searchServiceName, name, clientRequestID) if err != nil { @@ -119,17 +113,14 @@ func (client QueryKeysClient) CreateResponder(resp *http.Response) (result Query return } -// Delete deletes the specified query key. Unlike admin keys, query keys are -// not regenerated. The process for regenerating a query key is to delete and -// then recreate it. +// Delete deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for +// regenerating a query key is to delete and then recreate it. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service -// associated with the specified resource group. key is the query key to be -// deleted. Query keys are identified by value, not by name. clientRequestID is -// a client-generated GUID value that identifies this request. If specified, -// this will be included in response information as a way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated +// with the specified resource group. key is the query key to be deleted. Query keys are identified by value, not by +// name. clientRequestID is a client-generated GUID value that identifies this request. If specified, this will be +// included in response information as a way to track the request. func (client QueryKeysClient) Delete(resourceGroupName string, searchServiceName string, key string, clientRequestID *uuid.UUID) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, searchServiceName, key, clientRequestID) if err != nil { @@ -196,15 +187,12 @@ func (client QueryKeysClient) DeleteResponder(resp *http.Response) (result autor return } -// ListBySearchService returns the list of query API keys for the given Azure -// Search service. +// ListBySearchService returns the list of query API keys for the given Azure Search service. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service -// associated with the specified resource group. clientRequestID is a -// client-generated GUID value that identifies this request. If specified, this -// will be included in response information as a way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated +// with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If +// specified, this will be included in response information as a way to track the request. func (client QueryKeysClient) ListBySearchService(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result ListQueryKeysResult, err error) { req, err := client.ListBySearchServicePreparer(resourceGroupName, searchServiceName, clientRequestID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/services.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/services.go index eaa4896b9..bdcb5e070 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/services.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/services.go @@ -14,20 +14,18 @@ package search // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "net/http" ) -// ServicesClient is the client that can be used to manage Azure Search -// services and API keys. +// ServicesClient is the client that can be used to manage Azure Search services and API keys. type ServicesClient struct { ManagementClient } @@ -37,20 +35,17 @@ func NewServicesClient(subscriptionID string) ServicesClient { return NewServicesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewServicesClientWithBaseURI creates an instance of the ServicesClient -// client. +// NewServicesClientWithBaseURI creates an instance of the ServicesClient client. func NewServicesClientWithBaseURI(baseURI string, subscriptionID string) ServicesClient { return ServicesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailability checks whether or not the given Search service name is -// available for use. Search service names must be globally unique since they -// are part of the service URI (https://.search.windows.net). +// CheckNameAvailability checks whether or not the given Search service name is available for use. Search service names +// must be globally unique since they are part of the service URI (https://.search.windows.net). // -// checkNameAvailabilityInput is the resource name and type to check. -// clientRequestID is a client-generated GUID value that identifies this -// request. If specified, this will be included in response information as a -// way to track the request. +// checkNameAvailabilityInput is the resource name and type to check. clientRequestID is a client-generated GUID value +// that identifies this request. If specified, this will be included in response information as a way to track the +// request. func (client ServicesClient) CheckNameAvailability(checkNameAvailabilityInput CheckNameAvailabilityInput, clientRequestID *uuid.UUID) (result CheckNameAvailabilityOutput, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: checkNameAvailabilityInput, @@ -124,23 +119,22 @@ func (client ServicesClient) CheckNameAvailabilityResponder(resp *http.Response) return } -// CreateOrUpdate creates or updates a Search service in the given resource -// group. If the Search service already exists, all properties will be updated -// with the given values. +// CreateOrUpdate creates or updates a Search service in the given resource group. If the Search service already +// exists, all properties will be updated with the given values. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service to -// create or update. Search service names must only contain lowercase letters, -// digits or dashes, cannot use dash as the first two or last one characters, -// cannot contain consecutive dashes, and must be between 2 and 60 characters -// in length. Search service names must be globally unique since they are part -// of the service URI (https://.search.windows.net). You cannot change -// the service name after the service is created. service is the definition of -// the Search service to create or update. clientRequestID is a -// client-generated GUID value that identifies this request. If specified, this +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service to create or +// update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two +// or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search +// service names must be globally unique since they are part of the service URI (https://.search.windows.net). +// You cannot change the service name after the service is created. service is the definition of the Search service to +// create or update. clientRequestID is a client-generated GUID value that identifies this request. If specified, this // will be included in response information as a way to track the request. -func (client ServicesClient) CreateOrUpdate(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID) (result Service, err error) { +func (client ServicesClient) CreateOrUpdate(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID, cancel <-chan struct{}) (<-chan Service, <-chan error) { + resultChan := make(chan Service, 1) + errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: service, Constraints: []validation.Constraint{{Target: "service.ServiceProperties", Name: validation.Null, Rule: false, @@ -154,32 +148,46 @@ func (client ServicesClient) CreateOrUpdate(resourceGroupName string, searchServ }}, }}, {Target: "service.Sku", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "search.ServicesClient", "CreateOrUpdate") + errChan <- validation.NewErrorWithValidationError(err, "search.ServicesClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan } - req, err := client.CreateOrUpdatePreparer(resourceGroupName, searchServiceName, service, clientRequestID) - if err != nil { - err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } + go func() { + var err error + var result Service + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, searchServiceName, service, clientRequestID, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure responding to request") - } - - return + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "search.ServicesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServicesClient) CreateOrUpdatePreparer(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID) (*http.Request, error) { +func (client ServicesClient) CreateOrUpdatePreparer(resourceGroupName string, searchServiceName string, service Service, clientRequestID *uuid.UUID, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "searchServiceName": autorest.Encode("path", searchServiceName), @@ -202,13 +210,15 @@ func (client ServicesClient) CreateOrUpdatePreparer(resourceGroupName string, se preparer = autorest.DecoratePreparer(preparer, autorest.WithHeader("x-ms-client-request-id", autorest.String(clientRequestID))) } - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ServicesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -224,15 +234,12 @@ func (client ServicesClient) CreateOrUpdateResponder(resp *http.Response) (resul return } -// Delete deletes a Search service in the given resource group, along with its -// associated resources. +// Delete deletes a Search service in the given resource group, along with its associated resources. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service -// associated with the specified resource group. clientRequestID is a -// client-generated GUID value that identifies this request. If specified, this -// will be included in response information as a way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated +// with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If +// specified, this will be included in response information as a way to track the request. func (client ServicesClient) Delete(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, searchServiceName, clientRequestID) if err != nil { @@ -300,12 +307,10 @@ func (client ServicesClient) DeleteResponder(resp *http.Response) (result autore // Get gets the Search service with the given name in the given resource group. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. searchServiceName is the name of the Azure Search service -// associated with the specified resource group. clientRequestID is a -// client-generated GUID value that identifies this request. If specified, this -// will be included in response information as a way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. searchServiceName is the name of the Azure Search service associated +// with the specified resource group. clientRequestID is a client-generated GUID value that identifies this request. If +// specified, this will be included in response information as a way to track the request. func (client ServicesClient) Get(resourceGroupName string, searchServiceName string, clientRequestID *uuid.UUID) (result Service, err error) { req, err := client.GetPreparer(resourceGroupName, searchServiceName, clientRequestID) if err != nil { @@ -372,14 +377,11 @@ func (client ServicesClient) GetResponder(resp *http.Response) (result Service, return } -// ListByResourceGroup gets a list of all Search services in the given resource -// group. +// ListByResourceGroup gets a list of all Search services in the given resource group. // -// resourceGroupName is the name of the resource group within the current -// subscription. You can obtain this value from the Azure Resource Manager API -// or the portal. clientRequestID is a client-generated GUID value that -// identifies this request. If specified, this will be included in response -// information as a way to track the request. +// resourceGroupName is the name of the resource group within the current subscription. You can obtain this value from +// the Azure Resource Manager API or the portal. clientRequestID is a client-generated GUID value that identifies this +// request. If specified, this will be included in response information as a way to track the request. func (client ServicesClient) ListByResourceGroup(resourceGroupName string, clientRequestID *uuid.UUID) (result ServiceListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, clientRequestID) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go index a32a80b47..69a89c403 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/search/version.go @@ -14,15 +14,15 @@ package search // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-search/2015-08-19" + return "Azure-SDK-For-Go/v11.0.0-beta arm-search/2015-08-19" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/client.go index ab6f67d75..bd1d28ed8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/client.go @@ -1,5 +1,4 @@ -// Package servermanagement implements the Azure ARM Servermanagement service -// API version 2016-07-01-preview. +// Package servermanagement implements the Azure ARM Servermanagement service API version 2016-07-01-preview. // // REST API for Azure Server Management Service. package servermanagement @@ -18,9 +17,8 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/gateway.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/gateway.go index 4219f1bb5..b6cffa258 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/gateway.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/gateway.go @@ -14,9 +14,8 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// GatewayClient is the rEST API for Azure Server Management Service. +// GatewayClient is the REST API for Azure Server Management Service. type GatewayClient struct { ManagementClient } @@ -40,15 +39,13 @@ func NewGatewayClientWithBaseURI(baseURI string, subscriptionID string) GatewayC return GatewayClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates or updates a ManagementService gateway. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Create creates or updates a ManagementService gateway. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. gatewayName is the gateway -// name (256 characters maximum). gatewayParameters is parameters supplied to -// the CreateOrUpdate operation. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// gatewayName is the gateway name (256 characters maximum). gatewayParameters is parameters supplied to the +// CreateOrUpdate operation. func (client GatewayClient) Create(resourceGroupName string, gatewayName string, gatewayParameters GatewayParameters, cancel <-chan struct{}) (<-chan GatewayResource, <-chan error) { resultChan := make(chan GatewayResource, 1) errChan := make(chan error, 1) @@ -70,8 +67,10 @@ func (client GatewayClient) Create(resourceGroupName string, gatewayName string, var err error var result GatewayResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -142,9 +141,8 @@ func (client GatewayClient) CreateResponder(resp *http.Response) (result Gateway // Delete deletes a gateway from a resource group. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. gatewayName is the gateway -// name (256 characters maximum). +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// gatewayName is the gateway name (256 characters maximum). func (client GatewayClient) Delete(resourceGroupName string, gatewayName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -219,11 +217,9 @@ func (client GatewayClient) DeleteResponder(resp *http.Response) (result autores // Get gets a gateway. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. gatewayName is the gateway -// name (256 characters maximum) expand is gets subscription credentials which -// uniquely identify Microsoft Azure subscription. The subscription ID forms -// part of the URI for every service call. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// gatewayName is the gateway name (256 characters maximum) expand is gets subscription credentials which uniquely +// identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. func (client GatewayClient) Get(resourceGroupName string, gatewayName string, expand GatewayExpandOption) (result GatewayResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -300,13 +296,11 @@ func (client GatewayClient) GetResponder(resp *http.Response) (result GatewayRes return } -// GetProfile gets a gateway profile. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// GetProfile gets a gateway profile. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. gatewayName is the gateway -// name (256 characters maximum). +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// gatewayName is the gateway name (256 characters maximum). func (client GatewayClient) GetProfile(resourceGroupName string, gatewayName string, cancel <-chan struct{}) (<-chan GatewayProfile, <-chan error) { resultChan := make(chan GatewayProfile, 1) errChan := make(chan error, 1) @@ -328,8 +322,10 @@ func (client GatewayClient) GetProfile(resourceGroupName string, gatewayName str var err error var result GatewayProfile defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -481,10 +477,54 @@ func (client GatewayClient) ListNextResults(lastResults GatewayResources) (resul return } +// ListComplete gets all elements from the list without paging. +func (client GatewayClient) ListComplete(cancel <-chan struct{}) (<-chan GatewayResource, <-chan error) { + resultChan := make(chan GatewayResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListForResourceGroup returns gateways in a resource group. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. func (client GatewayClient) ListForResourceGroup(resourceGroupName string) (result GatewayResources, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -577,14 +617,56 @@ func (client GatewayClient) ListForResourceGroupNextResults(lastResults GatewayR return } -// RegenerateProfile regenerate a gateway's profile This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ListForResourceGroupComplete gets all elements from the list without paging. +func (client GatewayClient) ListForResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan GatewayResource, <-chan error) { + resultChan := make(chan GatewayResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// RegenerateProfile regenerate a gateway's profile This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. gatewayName is the gateway -// name (256 characters maximum). +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// gatewayName is the gateway name (256 characters maximum). func (client GatewayClient) RegenerateProfile(resourceGroupName string, gatewayName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -606,8 +688,10 @@ func (client GatewayClient) RegenerateProfile(resourceGroupName string, gatewayN var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -673,15 +757,13 @@ func (client GatewayClient) RegenerateProfileResponder(resp *http.Response) (res return } -// Update updates a gateway belonging to a resource group. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Update updates a gateway belonging to a resource group. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. gatewayName is the gateway -// name (256 characters maximum). gatewayParameters is parameters supplied to -// the Update operation. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// gatewayName is the gateway name (256 characters maximum). gatewayParameters is parameters supplied to the Update +// operation. func (client GatewayClient) Update(resourceGroupName string, gatewayName string, gatewayParameters GatewayParameters, cancel <-chan struct{}) (<-chan GatewayResource, <-chan error) { resultChan := make(chan GatewayResource, 1) errChan := make(chan error, 1) @@ -703,8 +785,10 @@ func (client GatewayClient) Update(resourceGroupName string, gatewayName string, var err error var result GatewayResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -773,13 +857,11 @@ func (client GatewayClient) UpdateResponder(resp *http.Response) (result Gateway return } -// Upgrade upgrades a gateway. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Upgrade upgrades a gateway. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. gatewayName is the gateway -// name (256 characters maximum). +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// gatewayName is the gateway name (256 characters maximum). func (client GatewayClient) Upgrade(resourceGroupName string, gatewayName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -801,8 +883,10 @@ func (client GatewayClient) Upgrade(resourceGroupName string, gatewayName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/models.go index 8c91d39b3..704599704 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/models.go @@ -14,9 +14,8 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -29,8 +28,7 @@ import ( type CredentialDataFormat string const ( - // RsaEncrypted specifies the rsa encrypted state for credential data - // format. + // RsaEncrypted specifies the rsa encrypted state for credential data format. RsaEncrypted CredentialDataFormat = "RsaEncrypted" ) @@ -99,8 +97,7 @@ type Error struct { Fields *string `json:"fields,omitempty"` } -// GatewayParameters is collection of parameters for operations on a gateway -// resource. +// GatewayParameters is collection of parameters for operations on a gateway resource. type GatewayParameters struct { Location *string `json:"location,omitempty"` Tags *map[string]interface{} `json:"tags,omitempty"` @@ -112,8 +109,7 @@ type GatewayParametersProperties struct { UpgradeMode UpgradeMode `json:"upgradeMode,omitempty"` } -// GatewayProfile is jSON properties that the gateway service uses know how to -// communicate with the resource. +// GatewayProfile is JSON properties that the gateway service uses know how to communicate with the resource. type GatewayProfile struct { autorest.Response `json:"-"` DataPlaneServiceBaseAddress *string `json:"dataPlaneServiceBaseAddress,omitempty"` @@ -252,8 +248,7 @@ func (client NodeResources) NodeResourcesPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// PowerShellCommandParameters is the parameters to a PowerShell script -// execution command. +// PowerShellCommandParameters is the parameters to a PowerShell script execution command. type PowerShellCommandParameters struct { *PowerShellCommandParametersProperties `json:"properties,omitempty"` } @@ -277,8 +272,7 @@ type PowerShellCommandResult struct { Descriptions *[]PromptFieldDescription `json:"descriptions,omitempty"` } -// PowerShellCommandResults is a collection of results from a PowerShell -// command. +// PowerShellCommandResults is a collection of results from a PowerShell command. type PowerShellCommandResults struct { autorest.Response `json:"-"` Results *[]PowerShellCommandResult `json:"results,omitempty"` @@ -299,8 +293,7 @@ type PowerShellCommandStatus struct { *PowerShellCommandResults `json:"properties,omitempty"` } -// PowerShellSessionResource is a PowerShell session resource (practically -// equivalent to a runspace instance). +// PowerShellSessionResource is a PowerShell session resource (practically equivalent to a runspace instance). type PowerShellSessionResource struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -330,21 +323,19 @@ type PowerShellSessionResources struct { NextLink *string `json:"nextLink,omitempty"` } -// PowerShellTabCompletionParameters is collection of parameters for PowerShell -// tab completion. +// PowerShellTabCompletionParameters is collection of parameters for PowerShell tab completion. type PowerShellTabCompletionParameters struct { Command *string `json:"command,omitempty"` } -// PowerShellTabCompletionResults is an array of strings representing the -// different values that can be selected through. +// PowerShellTabCompletionResults is an array of strings representing the different values that can be selected +// through. type PowerShellTabCompletionResults struct { autorest.Response `json:"-"` Results *[]string `json:"results,omitempty"` } -// PromptFieldDescription is field description for the implementation of -// PSHostUserInterface.Prompt +// PromptFieldDescription is field description for the implementation of PSHostUserInterface.Prompt type PromptFieldDescription struct { Name *string `json:"name,omitempty"` Label *string `json:"label,omitempty"` @@ -368,8 +359,7 @@ type Resource struct { Etag *string `json:"etag,omitempty"` } -// SessionParameters is parameter collection for creation and other operations -// on sessions. +// SessionParameters is parameter collection for creation and other operations on sessions. type SessionParameters struct { *SessionParametersProperties `json:"properties,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/node.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/node.go index 7970bb70a..cb181e311 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/node.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/node.go @@ -14,9 +14,8 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// NodeClient is the rEST API for Azure Server Management Service. +// NodeClient is the REST API for Azure Server Management Service. type NodeClient struct { ManagementClient } @@ -40,15 +39,12 @@ func NewNodeClientWithBaseURI(baseURI string, subscriptionID string) NodeClient return NodeClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates or updates a management node. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Create creates or updates a management node. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). gatewayParameters is parameters supplied to the -// CreateOrUpdate operation. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). gatewayParameters is parameters supplied to the CreateOrUpdate +// operation. func (client NodeClient) Create(resourceGroupName string, nodeName string, gatewayParameters NodeParameters, cancel <-chan struct{}) (<-chan NodeResource, <-chan error) { resultChan := make(chan NodeResource, 1) errChan := make(chan error, 1) @@ -70,8 +66,10 @@ func (client NodeClient) Create(resourceGroupName string, nodeName string, gatew var err error var result NodeResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -142,9 +140,8 @@ func (client NodeClient) CreateResponder(resp *http.Response) (result NodeResour // Delete deletes a management node // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). func (client NodeClient) Delete(resourceGroupName string, nodeName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -219,9 +216,8 @@ func (client NodeClient) DeleteResponder(resp *http.Response) (result autorest.R // Get gets a management node. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). func (client NodeClient) Get(resourceGroupName string, nodeName string) (result NodeResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -380,10 +376,54 @@ func (client NodeClient) ListNextResults(lastResults NodeResources) (result Node return } +// ListComplete gets all elements from the list without paging. +func (client NodeClient) ListComplete(cancel <-chan struct{}) (<-chan NodeResource, <-chan error) { + resultChan := make(chan NodeResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListForResourceGroup lists nodes in a resource group. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. func (client NodeClient) ListForResourceGroup(resourceGroupName string) (result NodeResources, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -476,14 +516,57 @@ func (client NodeClient) ListForResourceGroupNextResults(lastResults NodeResourc return } -// Update updates a management node. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// ListForResourceGroupComplete gets all elements from the list without paging. +func (client NodeClient) ListForResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan NodeResource, <-chan error) { + resultChan := make(chan NodeResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListForResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListForResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates a management node. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). nodeParameters is parameters supplied to the -// CreateOrUpdate operation. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). nodeParameters is parameters supplied to the CreateOrUpdate +// operation. func (client NodeClient) Update(resourceGroupName string, nodeName string, nodeParameters NodeParameters, cancel <-chan struct{}) (<-chan NodeResource, <-chan error) { resultChan := make(chan NodeResource, 1) errChan := make(chan error, 1) @@ -505,8 +588,10 @@ func (client NodeClient) Update(resourceGroupName string, nodeName string, nodeP var err error var result NodeResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/powershell.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/powershell.go index f9653b15d..23efcea11 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/powershell.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/powershell.go @@ -14,9 +14,8 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// PowerShellClient is the rEST API for Azure Server Management Service. +// PowerShellClient is the REST API for Azure Server Management Service. type PowerShellClient struct { ManagementClient } @@ -35,21 +34,17 @@ func NewPowerShellClient(subscriptionID string) PowerShellClient { return NewPowerShellClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewPowerShellClientWithBaseURI creates an instance of the PowerShellClient -// client. +// NewPowerShellClientWithBaseURI creates an instance of the PowerShellClient client. func NewPowerShellClientWithBaseURI(baseURI string, subscriptionID string) PowerShellClient { return PowerShellClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CancelCommand cancels a PowerShell command. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CancelCommand cancels a PowerShell command. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. pssession -// is the PowerShell sessionId from the user. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. pssession is the +// PowerShell sessionId from the user. func (client PowerShellClient) CancelCommand(resourceGroupName string, nodeName string, session string, pssession string, cancel <-chan struct{}) (<-chan PowerShellCommandResults, <-chan error) { resultChan := make(chan PowerShellCommandResults, 1) errChan := make(chan error, 1) @@ -71,8 +66,10 @@ func (client PowerShellClient) CancelCommand(resourceGroupName string, nodeName var err error var result PowerShellCommandResults defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -141,15 +138,12 @@ func (client PowerShellClient) CancelCommandResponder(resp *http.Response) (resu return } -// CreateSession creates a PowerShell session. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateSession creates a PowerShell session. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. pssession -// is the PowerShell sessionId from the user. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. pssession is the +// PowerShell sessionId from the user. func (client PowerShellClient) CreateSession(resourceGroupName string, nodeName string, session string, pssession string, cancel <-chan struct{}) (<-chan PowerShellSessionResource, <-chan error) { resultChan := make(chan PowerShellSessionResource, 1) errChan := make(chan error, 1) @@ -171,8 +165,10 @@ func (client PowerShellClient) CreateSession(resourceGroupName string, nodeName var err error var result PowerShellSessionResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -243,11 +239,9 @@ func (client PowerShellClient) CreateSessionResponder(resp *http.Response) (resu // GetCommandStatus gets the status of a command. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. pssession -// is the PowerShell sessionId from the user. expand is gets current output -// from an ongoing call. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. pssession is the +// PowerShell sessionId from the user. expand is gets current output from an ongoing call. func (client PowerShellClient) GetCommandStatus(resourceGroupName string, nodeName string, session string, pssession string, expand PowerShellExpandOption) (result PowerShellCommandStatus, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -326,16 +320,14 @@ func (client PowerShellClient) GetCommandStatusResponder(resp *http.Response) (r return } -// InvokeCommand creates a PowerShell script and invokes it. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// InvokeCommand creates a PowerShell script and invokes it. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. pssession -// is the PowerShell sessionId from the user. powerShellCommandParameters is -// parameters supplied to the Invoke PowerShell Command operation. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. pssession is the +// PowerShell sessionId from the user. powerShellCommandParameters is parameters supplied to the Invoke PowerShell +// Command operation. func (client PowerShellClient) InvokeCommand(resourceGroupName string, nodeName string, session string, pssession string, powerShellCommandParameters PowerShellCommandParameters, cancel <-chan struct{}) (<-chan PowerShellCommandResults, <-chan error) { resultChan := make(chan PowerShellCommandResults, 1) errChan := make(chan error, 1) @@ -357,8 +349,10 @@ func (client PowerShellClient) InvokeCommand(resourceGroupName string, nodeName var err error var result PowerShellCommandResults defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -431,9 +425,8 @@ func (client PowerShellClient) InvokeCommandResponder(resp *http.Response) (resu // ListSession gets a list of the active sessions. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. func (client PowerShellClient) ListSession(resourceGroupName string, nodeName string, session string) (result PowerShellSessionResources, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -510,11 +503,10 @@ func (client PowerShellClient) ListSessionResponder(resp *http.Response) (result // TabCompletion gets tab completion values for a command. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. pssession -// is the PowerShell sessionId from the user. powerShellTabCompletionParamters -// is parameters supplied to the tab completion call. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. pssession is the +// PowerShell sessionId from the user. powerShellTabCompletionParamters is parameters supplied to the tab completion +// call. func (client PowerShellClient) TabCompletion(resourceGroupName string, nodeName string, session string, pssession string, powerShellTabCompletionParamters PowerShellTabCompletionParameters) (result PowerShellTabCompletionResults, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -592,15 +584,13 @@ func (client PowerShellClient) TabCompletionResponder(resp *http.Response) (resu return } -// UpdateCommand updates a running PowerShell command with more data. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// UpdateCommand updates a running PowerShell command with more data. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. pssession -// is the PowerShell sessionId from the user. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. pssession is the +// PowerShell sessionId from the user. func (client PowerShellClient) UpdateCommand(resourceGroupName string, nodeName string, session string, pssession string, cancel <-chan struct{}) (<-chan PowerShellCommandResults, <-chan error) { resultChan := make(chan PowerShellCommandResults, 1) errChan := make(chan error, 1) @@ -622,8 +612,10 @@ func (client PowerShellClient) UpdateCommand(resourceGroupName string, nodeName var err error var result PowerShellCommandResults defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/session.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/session.go index 9c825e67a..ef7356fd1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/session.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/session.go @@ -14,9 +14,8 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// SessionClient is the rEST API for Azure Server Management Service. +// SessionClient is the REST API for Azure Server Management Service. type SessionClient struct { ManagementClient } @@ -40,14 +39,12 @@ func NewSessionClientWithBaseURI(baseURI string, subscriptionID string) SessionC return SessionClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create creates a session for a node. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Create creates a session for a node. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. -// sessionParameters is parameters supplied to the CreateOrUpdate operation. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. sessionParameters is +// parameters supplied to the CreateOrUpdate operation. func (client SessionClient) Create(resourceGroupName string, nodeName string, session string, sessionParameters SessionParameters, cancel <-chan struct{}) (<-chan SessionResource, <-chan error) { resultChan := make(chan SessionResource, 1) errChan := make(chan error, 1) @@ -69,8 +66,10 @@ func (client SessionClient) Create(resourceGroupName string, nodeName string, se var err error var result SessionResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -142,9 +141,8 @@ func (client SessionClient) CreateResponder(resp *http.Response) (result Session // Delete deletes a session for a node. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. func (client SessionClient) Delete(resourceGroupName string, nodeName string, session string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -220,9 +218,8 @@ func (client SessionClient) DeleteResponder(resp *http.Response) (result autores // Get gets a session for a node. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscriptionId. nodeName is the node name -// (256 characters maximum). session is the sessionId from the user. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscriptionId. +// nodeName is the node name (256 characters maximum). session is the sessionId from the user. func (client SessionClient) Get(resourceGroupName string, nodeName string, session string) (result SessionResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go index 5f4fa506b..3b9faa607 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servermanagement/version.go @@ -14,15 +14,15 @@ package servermanagement // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-servermanagement/2016-07-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-servermanagement/2016-07-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/client.go index 040182d51..2aa5127f7 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/client.go @@ -1,5 +1,4 @@ -// Package servicemap implements the Azure ARM Servicemap service API version -// 2015-11-01-preview. +// Package servicemap implements the Azure ARM Servicemap service API version 2015-11-01-preview. // // Service Map API Reference package servicemap @@ -18,9 +17,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/clientgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/clientgroups.go index ffaaabf29..140944aa3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/clientgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/clientgroups.go @@ -14,9 +14,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -36,21 +35,17 @@ func NewClientGroupsClient(subscriptionID string) ClientGroupsClient { return NewClientGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClientGroupsClientWithBaseURI creates an instance of the -// ClientGroupsClient client. +// NewClientGroupsClientWithBaseURI creates an instance of the ClientGroupsClient client. func NewClientGroupsClientWithBaseURI(baseURI string, subscriptionID string) ClientGroupsClient { return ClientGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get retrieves the specified client group // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. clientGroupName is client Group resource name. startTime is uTC -// date and time specifying the start time of an interval. When not specified -// the service uses DateTime.UtcNow - 10m endTime is uTC date and time -// specifying the end time of an interval. When not specified the service uses -// DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. clientGroupName is client Group resource name. startTime is UTC date and time +// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC +// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow func (client ClientGroupsClient) Get(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time) (result ClientGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -135,16 +130,12 @@ func (client ClientGroupsClient) GetResponder(resp *http.Response) (result Clien return } -// GetMembersCount returns the approximate number of members in the client -// group. +// GetMembersCount returns the approximate number of members in the client group. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. clientGroupName is client Group resource name. startTime is uTC -// date and time specifying the start time of an interval. When not specified -// the service uses DateTime.UtcNow - 10m endTime is uTC date and time -// specifying the end time of an interval. When not specified the service uses -// DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. clientGroupName is client Group resource name. startTime is UTC date and time +// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC +// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow func (client ClientGroupsClient) GetMembersCount(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time) (result ClientGroupMembersCount, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -229,17 +220,13 @@ func (client ClientGroupsClient) GetMembersCountResponder(resp *http.Response) ( return } -// ListMembers returns the members of the client group during the specified -// time interval. +// ListMembers returns the members of the client group during the specified time interval. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. clientGroupName is client Group resource name. startTime is uTC -// date and time specifying the start time of an interval. When not specified -// the service uses DateTime.UtcNow - 10m endTime is uTC date and time -// specifying the end time of an interval. When not specified the service uses -// DateTime.UtcNow top is page size to use. When not specified, the default -// page size is 100 records. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. clientGroupName is client Group resource name. startTime is UTC date and time +// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC +// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow top is +// page size to use. When not specified, the default page size is 100 records. func (client ClientGroupsClient) ListMembers(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time, top *int32) (result ClientGroupMembersCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -355,3 +342,48 @@ func (client ClientGroupsClient) ListMembersNextResults(lastResults ClientGroupM return } + +// ListMembersComplete gets all elements from the list without paging. +func (client ClientGroupsClient) ListMembersComplete(resourceGroupName string, workspaceName string, clientGroupName string, startTime *date.Time, endTime *date.Time, top *int32, cancel <-chan struct{}) (<-chan ClientGroupMember, <-chan error) { + resultChan := make(chan ClientGroupMember) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMembers(resourceGroupName, workspaceName, clientGroupName, startTime, endTime, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMembersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machinegroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machinegroups.go index 9ed8c12cc..928acd4ef 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machinegroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machinegroups.go @@ -14,9 +14,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,23 +29,20 @@ type MachineGroupsClient struct { ManagementClient } -// NewMachineGroupsClient creates an instance of the MachineGroupsClient -// client. +// NewMachineGroupsClient creates an instance of the MachineGroupsClient client. func NewMachineGroupsClient(subscriptionID string) MachineGroupsClient { return NewMachineGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachineGroupsClientWithBaseURI creates an instance of the -// MachineGroupsClient client. +// NewMachineGroupsClientWithBaseURI creates an instance of the MachineGroupsClient client. func NewMachineGroupsClientWithBaseURI(baseURI string, subscriptionID string) MachineGroupsClient { return MachineGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Create creates a new machine group. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineGroup is machine Group resource to create. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineGroup is machine Group resource to create. func (client MachineGroupsClient) Create(resourceGroupName string, workspaceName string, machineGroup MachineGroup) (result MachineGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -132,9 +128,8 @@ func (client MachineGroupsClient) CreateResponder(resp *http.Response) (result M // Delete deletes the specified Machine Group. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineGroupName is machine Group resource name. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineGroupName is machine Group resource name. func (client MachineGroupsClient) Delete(resourceGroupName string, workspaceName string, machineGroupName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -214,9 +209,8 @@ func (client MachineGroupsClient) DeleteResponder(resp *http.Response) (result a // Get returns the specified machine group. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineGroupName is machine Group resource name. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineGroupName is machine Group resource name. func (client MachineGroupsClient) Get(resourceGroupName string, workspaceName string, machineGroupName string) (result MachineGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -297,9 +291,8 @@ func (client MachineGroupsClient) GetResponder(resp *http.Response) (result Mach // ListByWorkspace returns all machine groups. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. func (client MachineGroupsClient) ListByWorkspace(resourceGroupName string, workspaceName string) (result MachineGroupCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -398,12 +391,56 @@ func (client MachineGroupsClient) ListByWorkspaceNextResults(lastResults Machine return } +// ListByWorkspaceComplete gets all elements from the list without paging. +func (client MachineGroupsClient) ListByWorkspaceComplete(resourceGroupName string, workspaceName string, cancel <-chan struct{}) (<-chan MachineGroup, <-chan error) { + resultChan := make(chan MachineGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByWorkspace(resourceGroupName, workspaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByWorkspaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update updates a machine group. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineGroupName is machine Group resource name. machineGroup is -// machine Group resource to update. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineGroupName is machine Group resource name. machineGroup is machine Group +// resource to update. func (client MachineGroupsClient) Update(resourceGroupName string, workspaceName string, machineGroupName string, machineGroup MachineGroup) (result MachineGroup, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machines.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machines.go index ca1fa113f..870f464cd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machines.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/machines.go @@ -14,9 +14,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -36,19 +35,17 @@ func NewMachinesClient(subscriptionID string) MachinesClient { return NewMachinesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewMachinesClientWithBaseURI creates an instance of the MachinesClient -// client. +// NewMachinesClientWithBaseURI creates an instance of the MachinesClient client. func NewMachinesClientWithBaseURI(baseURI string, subscriptionID string) MachinesClient { return MachinesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get returns the specified machine. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. timestamp is uTC date and -// time specifying a time instance relative to which to evaluate the machine -// resource. When not specified, the service uses DateTime.UtcNow. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. timestamp is UTC date and time +// specifying a time instance relative to which to evaluate the machine resource. When not specified, the service uses +// DateTime.UtcNow. func (client MachinesClient) Get(resourceGroupName string, workspaceName string, machineName string, timestamp *date.Time) (result Machine, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -130,16 +127,12 @@ func (client MachinesClient) GetResponder(resp *http.Response) (result Machine, return } -// GetLiveness obtains the liveness status of the machine during the specified -// time interval. +// GetLiveness obtains the liveness status of the machine during the specified time interval. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. startTime is uTC date and -// time specifying the start time of an interval. When not specified the -// service uses DateTime.UtcNow - 10m endTime is uTC date and time specifying -// the end time of an interval. When not specified the service uses -// DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. startTime is UTC date and time +// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC +// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow func (client MachinesClient) GetLiveness(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result Liveness, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -224,29 +217,21 @@ func (client MachinesClient) GetLivenessResponder(resp *http.Response) (result L return } -// ListByWorkspace returns a collection of machines matching the specified -// conditions. The returned collection represents either machines that are -// active/live during the specified interval of time (`live=true` and -// `startTime`/`endTime` are specified) or that are known to have existed at or -// some time prior to the specified point in time (`live=false` and `timestamp` -// is specified). +// ListByWorkspace returns a collection of machines matching the specified conditions. The returned collection +// represents either machines that are active/live during the specified interval of time (`live=true` and +// `startTime`/`endTime` are specified) or that are known to have existed at or some time prior to the specified point +// in time (`live=false` and `timestamp` is specified). // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. live is specifies whether to return live resources (true) or -// inventory resources (false). Defaults to **true**. When retrieving live -// resources, the start time (`startTime`) and end time (`endTime`) of the -// desired interval should be included. When retrieving inventory resources, an -// optional timestamp (`timestamp`) parameter can be specified to return the -// version of each resource closest (not-after) that timestamp. startTime is -// uTC date and time specifying the start time of an interval. When not -// specified the service uses DateTime.UtcNow - 10m endTime is uTC date and -// time specifying the end time of an interval. When not specified the service -// uses DateTime.UtcNow timestamp is uTC date and time specifying a time -// instance relative to which to evaluate each machine resource. Only applies -// when `live=false`. When not specified, the service uses DateTime.UtcNow. top -// is page size to use. When not specified, the default page size is 100 -// records. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. live is specifies whether to return live resources (true) or inventory +// resources (false). Defaults to **true**. When retrieving live resources, the start time (`startTime`) and end time +// (`endTime`) of the desired interval should be included. When retrieving inventory resources, an optional timestamp +// (`timestamp`) parameter can be specified to return the version of each resource closest (not-after) that timestamp. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow timestamp is UTC date and time specifying a time instance relative to which to evaluate +// each machine resource. Only applies when `live=false`. When not specified, the service uses DateTime.UtcNow. top is +// page size to use. When not specified, the default page size is 100 records. func (client MachinesClient) ListByWorkspace(resourceGroupName string, workspaceName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, top *int32) (result MachineCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -365,16 +350,57 @@ func (client MachinesClient) ListByWorkspaceNextResults(lastResults MachineColle return } -// ListConnections returns a collection of connections terminating or -// originating at the specified machine +// ListByWorkspaceComplete gets all elements from the list without paging. +func (client MachinesClient) ListByWorkspaceComplete(resourceGroupName string, workspaceName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, top *int32, cancel <-chan struct{}) (<-chan Machine, <-chan error) { + resultChan := make(chan Machine) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByWorkspace(resourceGroupName, workspaceName, live, startTime, endTime, timestamp, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByWorkspaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListConnections returns a collection of connections terminating or originating at the specified machine // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. startTime is uTC date and -// time specifying the start time of an interval. When not specified the -// service uses DateTime.UtcNow - 10m endTime is uTC date and time specifying -// the end time of an interval. When not specified the service uses -// DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. startTime is UTC date and time +// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC +// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow func (client MachinesClient) ListConnections(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result ConnectionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -483,12 +509,55 @@ func (client MachinesClient) ListConnectionsNextResults(lastResults ConnectionCo return } -// ListMachineGroupMembership returns a collection of machine groups this -// machine belongs to. +// ListConnectionsComplete gets all elements from the list without paging. +func (client MachinesClient) ListConnectionsComplete(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Connection, <-chan error) { + resultChan := make(chan Connection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListConnections(resourceGroupName, workspaceName, machineName, startTime, endTime) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListConnectionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMachineGroupMembership returns a collection of machine groups this machine belongs to. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. func (client MachinesClient) ListMachineGroupMembership(resourceGroupName string, workspaceName string, machineName string) (result MachineGroupCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -591,16 +660,57 @@ func (client MachinesClient) ListMachineGroupMembershipNextResults(lastResults M return } -// ListPorts returns a collection of live ports on the specified machine during -// the specified time interval. +// ListMachineGroupMembershipComplete gets all elements from the list without paging. +func (client MachinesClient) ListMachineGroupMembershipComplete(resourceGroupName string, workspaceName string, machineName string, cancel <-chan struct{}) (<-chan MachineGroup, <-chan error) { + resultChan := make(chan MachineGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMachineGroupMembership(resourceGroupName, workspaceName, machineName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMachineGroupMembershipNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListPorts returns a collection of live ports on the specified machine during the specified time interval. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. startTime is uTC date and -// time specifying the start time of an interval. When not specified the -// service uses DateTime.UtcNow - 10m endTime is uTC date and time specifying -// the end time of an interval. When not specified the service uses -// DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. startTime is UTC date and time +// specifying the start time of an interval. When not specified the service uses DateTime.UtcNow - 10m endTime is UTC +// date and time specifying the end time of an interval. When not specified the service uses DateTime.UtcNow func (client MachinesClient) ListPorts(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time) (result PortCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -709,28 +819,66 @@ func (client MachinesClient) ListPortsNextResults(lastResults PortCollection) (r return } -// ListProcesses returns a collection of processes on the specified machine -// matching the specified conditions. The returned collection represents either -// processes that are active/live during the specified interval of time -// (`live=true` and `startTime`/`endTime` are specified) or that are known to -// have existed at or some time prior to the specified point in time -// (`live=false` and `timestamp` is specified). +// ListPortsComplete gets all elements from the list without paging. +func (client MachinesClient) ListPortsComplete(resourceGroupName string, workspaceName string, machineName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Port, <-chan error) { + resultChan := make(chan Port) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListPorts(resourceGroupName, workspaceName, machineName, startTime, endTime) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListPortsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListProcesses returns a collection of processes on the specified machine matching the specified conditions. The +// returned collection represents either processes that are active/live during the specified interval of time +// (`live=true` and `startTime`/`endTime` are specified) or that are known to have existed at or some time prior to +// the specified point in time (`live=false` and `timestamp` is specified). // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. live is specifies whether to -// return live resources (true) or inventory resources (false). Defaults to -// **true**. When retrieving live resources, the start time (`startTime`) and -// end time (`endTime`) of the desired interval should be included. When -// retrieving inventory resources, an optional timestamp (`timestamp`) -// parameter can be specified to return the version of each resource closest -// (not-after) that timestamp. startTime is uTC date and time specifying the -// start time of an interval. When not specified the service uses -// DateTime.UtcNow - 10m endTime is uTC date and time specifying the end time -// of an interval. When not specified the service uses DateTime.UtcNow -// timestamp is uTC date and time specifying a time instance relative to which -// to evaluate all process resource. Only applies when `live=false`. When not -// specified, the service uses DateTime.UtcNow. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. live is specifies whether to return live +// resources (true) or inventory resources (false). Defaults to **true**. When retrieving live resources, the start +// time (`startTime`) and end time (`endTime`) of the desired interval should be included. When retrieving inventory +// resources, an optional timestamp (`timestamp`) parameter can be specified to return the version of each resource +// closest (not-after) that timestamp. startTime is UTC date and time specifying the start time of an interval. When +// not specified the service uses DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an +// interval. When not specified the service uses DateTime.UtcNow timestamp is UTC date and time specifying a time +// instance relative to which to evaluate all process resource. Only applies when `live=false`. When not specified, the +// service uses DateTime.UtcNow. func (client MachinesClient) ListProcesses(resourceGroupName string, workspaceName string, machineName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time) (result ProcessCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -844,3 +992,48 @@ func (client MachinesClient) ListProcessesNextResults(lastResults ProcessCollect return } + +// ListProcessesComplete gets all elements from the list without paging. +func (client MachinesClient) ListProcessesComplete(resourceGroupName string, workspaceName string, machineName string, live *bool, startTime *date.Time, endTime *date.Time, timestamp *date.Time, cancel <-chan struct{}) (<-chan Process, <-chan error) { + resultChan := make(chan Process) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListProcesses(resourceGroupName, workspaceName, machineName, live, startTime, endTime, timestamp) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListProcessesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/maps.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/maps.go index 1b5844b59..75f8ffc80 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/maps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/maps.go @@ -14,9 +14,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -42,9 +41,8 @@ func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient // Generate generates the specified map. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. request is request options. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. request is request options. func (client MapsClient) Generate(resourceGroupName string, workspaceName string, request MapRequest) (result MapResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/models.go index 0b72e45b8..23300b679 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/models.go @@ -14,11 +14,12 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" @@ -67,18 +68,65 @@ const ( Unknown HypervisorType = "unknown" ) +// Kind enumerates the values for kind. +type Kind string + +const ( + // KindRefmachine specifies the kind refmachine state for kind. + KindRefmachine Kind = "ref:machine" + // KindRefmachinewithhints specifies the kind refmachinewithhints state for kind. + KindRefmachinewithhints Kind = "ref:machinewithhints" + // KindRefport specifies the kind refport state for kind. + KindRefport Kind = "ref:port" + // KindRefprocess specifies the kind refprocess state for kind. + KindRefprocess Kind = "ref:process" +) + +// KindCoreResource enumerates the values for kind core resource. +type KindCoreResource string + +const ( + // KindClientGroup specifies the kind client group state for kind core resource. + KindClientGroup KindCoreResource = "clientGroup" + // KindMachine specifies the kind machine state for kind core resource. + KindMachine KindCoreResource = "machine" + // KindMachineGroup specifies the kind machine group state for kind core resource. + KindMachineGroup KindCoreResource = "machineGroup" + // KindPort specifies the kind port state for kind core resource. + KindPort KindCoreResource = "port" + // KindProcess specifies the kind process state for kind core resource. + KindProcess KindCoreResource = "process" +) + +// KindMapRequest enumerates the values for kind map request. +type KindMapRequest string + +const ( + // KindMapmachineGroupDependency specifies the kind mapmachine group dependency state for kind map request. + KindMapmachineGroupDependency KindMapRequest = "map:machine-group-dependency" + // KindMapsingleMachineDependency specifies the kind mapsingle machine dependency state for kind map request. + KindMapsingleMachineDependency KindMapRequest = "map:single-machine-dependency" +) + +// KindRelationship enumerates the values for kind relationship. +type KindRelationship string + +const ( + // KindRelacceptor specifies the kind relacceptor state for kind relationship. + KindRelacceptor KindRelationship = "rel:acceptor" + // KindRelconnection specifies the kind relconnection state for kind relationship. + KindRelconnection KindRelationship = "rel:connection" +) + // MachineRebootStatus enumerates the values for machine reboot status. type MachineRebootStatus string const ( - // MachineRebootStatusNotRebooted specifies the machine reboot status not - // rebooted state for machine reboot status. + // MachineRebootStatusNotRebooted specifies the machine reboot status not rebooted state for machine reboot status. MachineRebootStatusNotRebooted MachineRebootStatus = "notRebooted" - // MachineRebootStatusRebooted specifies the machine reboot status rebooted - // state for machine reboot status. + // MachineRebootStatusRebooted specifies the machine reboot status rebooted state for machine reboot status. MachineRebootStatusRebooted MachineRebootStatus = "rebooted" - // MachineRebootStatusUnknown specifies the machine reboot status unknown - // state for machine reboot status. + // MachineRebootStatusUnknown specifies the machine reboot status unknown state for machine reboot status. MachineRebootStatusUnknown MachineRebootStatus = "unknown" ) @@ -96,20 +144,15 @@ const ( type OperatingSystemFamily string const ( - // OperatingSystemFamilyAix specifies the operating system family aix state - // for operating system family. + // OperatingSystemFamilyAix specifies the operating system family aix state for operating system family. OperatingSystemFamilyAix OperatingSystemFamily = "aix" - // OperatingSystemFamilyLinux specifies the operating system family linux - // state for operating system family. + // OperatingSystemFamilyLinux specifies the operating system family linux state for operating system family. OperatingSystemFamilyLinux OperatingSystemFamily = "linux" - // OperatingSystemFamilySolaris specifies the operating system family - // solaris state for operating system family. + // OperatingSystemFamilySolaris specifies the operating system family solaris state for operating system family. OperatingSystemFamilySolaris OperatingSystemFamily = "solaris" - // OperatingSystemFamilyUnknown specifies the operating system family - // unknown state for operating system family. + // OperatingSystemFamilyUnknown specifies the operating system family unknown state for operating system family. OperatingSystemFamilyUnknown OperatingSystemFamily = "unknown" - // OperatingSystemFamilyWindows specifies the operating system family - // windows state for operating system family. + // OperatingSystemFamilyWindows specifies the operating system family windows state for operating system family. OperatingSystemFamilyWindows OperatingSystemFamily = "windows" ) @@ -133,17 +176,13 @@ const ( type VirtualizationState string const ( - // VirtualizationStateHypervisor specifies the virtualization state - // hypervisor state for virtualization state. + // VirtualizationStateHypervisor specifies the virtualization state hypervisor state for virtualization state. VirtualizationStateHypervisor VirtualizationState = "hypervisor" - // VirtualizationStatePhysical specifies the virtualization state physical - // state for virtualization state. + // VirtualizationStatePhysical specifies the virtualization state physical state for virtualization state. VirtualizationStatePhysical VirtualizationState = "physical" - // VirtualizationStateUnknown specifies the virtualization state unknown - // state for virtualization state. + // VirtualizationStateUnknown specifies the virtualization state unknown state for virtualization state. VirtualizationStateUnknown VirtualizationState = "unknown" - // VirtualizationStateVirtual specifies the virtualization state virtual - // state for virtualization state. + // VirtualizationStateVirtual specifies the virtualization state virtual state for virtualization state. VirtualizationStateVirtual VirtualizationState = "virtual" ) @@ -151,37 +190,52 @@ const ( type VirtualMachineType string const ( - // VirtualMachineTypeHyperv specifies the virtual machine type hyperv state - // for virtual machine type. + // VirtualMachineTypeHyperv specifies the virtual machine type hyperv state for virtual machine type. VirtualMachineTypeHyperv VirtualMachineType = "hyperv" - // VirtualMachineTypeLdom specifies the virtual machine type ldom state for - // virtual machine type. + // VirtualMachineTypeLdom specifies the virtual machine type ldom state for virtual machine type. VirtualMachineTypeLdom VirtualMachineType = "ldom" - // VirtualMachineTypeLpar specifies the virtual machine type lpar state for - // virtual machine type. + // VirtualMachineTypeLpar specifies the virtual machine type lpar state for virtual machine type. VirtualMachineTypeLpar VirtualMachineType = "lpar" - // VirtualMachineTypeUnknown specifies the virtual machine type unknown - // state for virtual machine type. + // VirtualMachineTypeUnknown specifies the virtual machine type unknown state for virtual machine type. VirtualMachineTypeUnknown VirtualMachineType = "unknown" - // VirtualMachineTypeVirtualPc specifies the virtual machine type virtual - // pc state for virtual machine type. + // VirtualMachineTypeVirtualPc specifies the virtual machine type virtual pc state for virtual machine type. VirtualMachineTypeVirtualPc VirtualMachineType = "virtualPc" - // VirtualMachineTypeVmware specifies the virtual machine type vmware state - // for virtual machine type. + // VirtualMachineTypeVmware specifies the virtual machine type vmware state for virtual machine type. VirtualMachineTypeVmware VirtualMachineType = "vmware" - // VirtualMachineTypeXen specifies the virtual machine type xen state for - // virtual machine type. + // VirtualMachineTypeXen specifies the virtual machine type xen state for virtual machine type. VirtualMachineTypeXen VirtualMachineType = "xen" ) // Acceptor is a process accepting on a port. type Acceptor struct { - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Kind KindRelationship `json:"kind,omitempty"` *AcceptorProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for Acceptor. +func (a Acceptor) MarshalJSON() ([]byte, error) { + a.Kind = KindRelacceptor + type Alias Acceptor + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(a), + }) +} + +// AsConnection is the Relationship implementation for Acceptor. +func (a Acceptor) AsConnection() (*Connection, bool) { + return nil, false +} + +// AsAcceptor is the Relationship implementation for Acceptor. +func (a Acceptor) AsAcceptor() (*Acceptor, bool) { + return &a, true +} + // AcceptorProperties is properties for an acceptor relationship. type AcceptorProperties struct { Source *PortReference `json:"source,omitempty"` @@ -190,8 +244,7 @@ type AcceptorProperties struct { EndTime *date.Time `json:"endTime,omitempty"` } -// AgentConfiguration is describes the configuration of the Dependency Agent -// installed on a machine. +// AgentConfiguration is describes the configuration of the Dependency Agent installed on a machine. type AgentConfiguration struct { AgentID *string `json:"agentId,omitempty"` DependencyAgentID *string `json:"dependencyAgentId,omitempty"` @@ -201,20 +254,78 @@ type AgentConfiguration struct { ClockGranularity *int32 `json:"clockGranularity,omitempty"` } -// ClientGroup is represents a collection of clients of a resource. A client -// group can represent the clients of a port, process, or a machine. +// ClientGroup is represents a collection of clients of a resource. A client group can represent the clients of a port, +// process, or a machine. type ClientGroup struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` + Kind KindCoreResource `json:"kind,omitempty"` *ClientGroupProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for ClientGroup. +func (cg ClientGroup) MarshalJSON() ([]byte, error) { + cg.Kind = KindClientGroup + type Alias ClientGroup + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(cg), + }) +} + +// AsMachine is the CoreResource implementation for ClientGroup. +func (cg ClientGroup) AsMachine() (*Machine, bool) { + return nil, false +} + +// AsProcess is the CoreResource implementation for ClientGroup. +func (cg ClientGroup) AsProcess() (*Process, bool) { + return nil, false +} + +// AsPort is the CoreResource implementation for ClientGroup. +func (cg ClientGroup) AsPort() (*Port, bool) { + return nil, false +} + +// AsClientGroup is the CoreResource implementation for ClientGroup. +func (cg ClientGroup) AsClientGroup() (*ClientGroup, bool) { + return &cg, true +} + +// AsMachineGroup is the CoreResource implementation for ClientGroup. +func (cg ClientGroup) AsMachineGroup() (*MachineGroup, bool) { + return nil, false +} + // ClientGroupProperties is resource properties. type ClientGroupProperties struct { - ClientsOf *ResourceReference `json:"clientsOf,omitempty"` + ClientsOf ResourceReference `json:"clientsOf,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ClientGroupProperties struct. +func (cg *ClientGroupProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["clientsOf"] + if v != nil { + clientsOf, err := unmarshalResourceReference(*m["clientsOf"]) + if err != nil { + return err + } + cg.ClientsOf = clientsOf + } + + return nil } // ClientGroupMember is represents a member of a client group @@ -251,8 +362,7 @@ func (client ClientGroupMembersCollection) ClientGroupMembersCollectionPreparer( autorest.WithBaseURL(to.String(client.NextLink))) } -// ClientGroupMembersCount is specifies the number of members in a client -// group. +// ClientGroupMembersCount is specifies the number of members in a client group. type ClientGroupMembersCount struct { autorest.Response `json:"-"` StartTime *date.Time `json:"startTime,omitempty"` @@ -264,12 +374,34 @@ type ClientGroupMembersCount struct { // Connection is a network connection. type Connection struct { - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Kind KindRelationship `json:"kind,omitempty"` *ConnectionProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for Connection. +func (c Connection) MarshalJSON() ([]byte, error) { + c.Kind = KindRelconnection + type Alias Connection + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(c), + }) +} + +// AsConnection is the Relationship implementation for Connection. +func (c Connection) AsConnection() (*Connection, bool) { + return &c, true +} + +// AsAcceptor is the Relationship implementation for Connection. +func (c Connection) AsAcceptor() (*Acceptor, bool) { + return nil, false +} + // ConnectionCollection is collection of Connection resources. type ConnectionCollection struct { autorest.Response `json:"-"` @@ -291,20 +423,142 @@ func (client ConnectionCollection) ConnectionCollectionPreparer() (*http.Request // ConnectionProperties is properties for a connection resource. type ConnectionProperties struct { - Source *ResourceReference `json:"source,omitempty"` - Destination *ResourceReference `json:"destination,omitempty"` + Source ResourceReference `json:"source,omitempty"` + Destination ResourceReference `json:"destination,omitempty"` StartTime *date.Time `json:"startTime,omitempty"` EndTime *date.Time `json:"endTime,omitempty"` ServerPort *PortReference `json:"serverPort,omitempty"` FailureState ConnectionFailureState `json:"failureState,omitempty"` } +// UnmarshalJSON is the custom unmarshaler for ConnectionProperties struct. +func (cp *ConnectionProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["serverPort"] + if v != nil { + var serverPort PortReference + err = json.Unmarshal(*m["serverPort"], &serverPort) + if err != nil { + return err + } + cp.ServerPort = &serverPort + } + + v = m["failureState"] + if v != nil { + var failureState ConnectionFailureState + err = json.Unmarshal(*m["failureState"], &failureState) + if err != nil { + return err + } + cp.FailureState = failureState + } + + v = m["source"] + if v != nil { + source, err := unmarshalResourceReference(*m["source"]) + if err != nil { + return err + } + cp.Source = source + } + + v = m["destination"] + if v != nil { + destination, err := unmarshalResourceReference(*m["destination"]) + if err != nil { + return err + } + cp.Destination = destination + } + + v = m["startTime"] + if v != nil { + var startTime date.Time + err = json.Unmarshal(*m["startTime"], &startTime) + if err != nil { + return err + } + cp.StartTime = &startTime + } + + v = m["endTime"] + if v != nil { + var endTime date.Time + err = json.Unmarshal(*m["endTime"], &endTime) + if err != nil { + return err + } + cp.EndTime = &endTime + } + + return nil +} + // CoreResource is marker resource for the core Service Map resources -type CoreResource struct { - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` +type CoreResource interface { + AsMachine() (*Machine, bool) + AsProcess() (*Process, bool) + AsPort() (*Port, bool) + AsClientGroup() (*ClientGroup, bool) + AsMachineGroup() (*MachineGroup, bool) +} + +func unmarshalCoreResource(body []byte) (CoreResource, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindMachine): + var m Machine + err := json.Unmarshal(body, &m) + return m, err + case string(KindProcess): + var p Process + err := json.Unmarshal(body, &p) + return p, err + case string(KindPort): + var p Port + err := json.Unmarshal(body, &p) + return p, err + case string(KindClientGroup): + var cg ClientGroup + err := json.Unmarshal(body, &cg) + return cg, err + case string(KindMachineGroup): + var mg MachineGroup + err := json.Unmarshal(body, &mg) + return mg, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalCoreResourceArray(body []byte) ([]CoreResource, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + crArray := make([]CoreResource, len(rawMessages)) + + for index, rawMessage := range rawMessages { + cr, err := unmarshalCoreResource(*rawMessage) + if err != nil { + return nil, err + } + crArray[index] = cr + } + return crArray, nil } // Error is error details. @@ -318,8 +572,7 @@ type ErrorResponse struct { Error *Error `json:"error,omitempty"` } -// HypervisorConfiguration is describes the hypervisor configuration of a -// machine. +// HypervisorConfiguration is describes the hypervisor configuration of a machine. type HypervisorConfiguration struct { HypervisorType HypervisorType `json:"hypervisorType,omitempty"` NativeHostMachineID *string `json:"nativeHostMachineId,omitempty"` @@ -344,23 +597,58 @@ type Liveness struct { Live *bool `json:"live,omitempty"` } -// Machine is a machine resource represents a discovered computer system. It -// can be *monitored*, i.e., a Dependency Agent is running on it, or -// *discovered*, i.e., its existence was inferred by observing the data stream -// from monitored machines. As machines change, prior versions of the machine -// resource are preserved and available for access. A machine is live during an -// interval of time, if either its Dependency Agent has reported data during -// (parts) of that interval, or a Dependency agent running on other machines -// has reported activity associated with the machine. +// Machine is a machine resource represents a discovered computer system. It can be *monitored*, i.e., a Dependency +// Agent is running on it, or *discovered*, i.e., its existence was inferred by observing the data stream from +// monitored machines. As machines change, prior versions of the machine resource are preserved and available for +// access. A machine is live during an interval of time, if either its Dependency Agent has reported data during +// (parts) of that interval, or a Dependency agent running on other machines has reported activity associated with the +// machine. type Machine struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` + Kind KindCoreResource `json:"kind,omitempty"` *MachineProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for Machine. +func (m Machine) MarshalJSON() ([]byte, error) { + m.Kind = KindMachine + type Alias Machine + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(m), + }) +} + +// AsMachine is the CoreResource implementation for Machine. +func (m Machine) AsMachine() (*Machine, bool) { + return &m, true +} + +// AsProcess is the CoreResource implementation for Machine. +func (m Machine) AsProcess() (*Process, bool) { + return nil, false +} + +// AsPort is the CoreResource implementation for Machine. +func (m Machine) AsPort() (*Port, bool) { + return nil, false +} + +// AsClientGroup is the CoreResource implementation for Machine. +func (m Machine) AsClientGroup() (*ClientGroup, bool) { + return nil, false +} + +// AsMachineGroup is the CoreResource implementation for Machine. +func (m Machine) AsMachineGroup() (*MachineGroup, bool) { + return nil, false +} + // MachineProperties is resource properties. type MachineProperties struct { Timestamp *date.Time `json:"timestamp,omitempty"` @@ -407,13 +695,50 @@ type MachineCountsByOperatingSystem struct { // MachineGroup is a user-defined logical grouping of machines. type MachineGroup struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` + Kind KindCoreResource `json:"kind,omitempty"` *MachineGroupProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for MachineGroup. +func (mg MachineGroup) MarshalJSON() ([]byte, error) { + mg.Kind = KindMachineGroup + type Alias MachineGroup + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mg), + }) +} + +// AsMachine is the CoreResource implementation for MachineGroup. +func (mg MachineGroup) AsMachine() (*Machine, bool) { + return nil, false +} + +// AsProcess is the CoreResource implementation for MachineGroup. +func (mg MachineGroup) AsProcess() (*Process, bool) { + return nil, false +} + +// AsPort is the CoreResource implementation for MachineGroup. +func (mg MachineGroup) AsPort() (*Port, bool) { + return nil, false +} + +// AsClientGroup is the CoreResource implementation for MachineGroup. +func (mg MachineGroup) AsClientGroup() (*ClientGroup, bool) { + return nil, false +} + +// AsMachineGroup is the CoreResource implementation for MachineGroup. +func (mg MachineGroup) AsMachineGroup() (*MachineGroup, bool) { + return &mg, true +} + // MachineGroupProperties is resource properties. type MachineGroupProperties struct { DisplayName *string `json:"displayName,omitempty"` @@ -439,14 +764,35 @@ func (client MachineGroupCollection) MachineGroupCollectionPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// MachineGroupMapRequest is specifies the computation of a machine group -// dependency map. A machine group dependency map includes all direct -// dependencies of a group of machines. +// MachineGroupMapRequest is specifies the computation of a machine group dependency map. A machine group dependency +// map includes all direct dependencies of a group of machines. type MachineGroupMapRequest struct { - StartTime *date.Time `json:"startTime,omitempty"` - EndTime *date.Time `json:"endTime,omitempty"` - MachineGroupID *string `json:"machineGroupId,omitempty"` - FilterProcesses *bool `json:"filterProcesses,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + Kind KindMapRequest `json:"kind,omitempty"` + MachineGroupID *string `json:"machineGroupId,omitempty"` + FilterProcesses *bool `json:"filterProcesses,omitempty"` +} + +// MarshalJSON is the custom marshaler for MachineGroupMapRequest. +func (mgmr MachineGroupMapRequest) MarshalJSON() ([]byte, error) { + mgmr.Kind = KindMapmachineGroupDependency + type Alias MachineGroupMapRequest + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mgmr), + }) +} + +// AsSingleMachineDependencyMapRequest is the MapRequest implementation for MachineGroupMapRequest. +func (mgmr MachineGroupMapRequest) AsSingleMachineDependencyMapRequest() (*SingleMachineDependencyMapRequest, bool) { + return nil, false +} + +// AsMachineGroupMapRequest is the MapRequest implementation for MachineGroupMapRequest. +func (mgmr MachineGroupMapRequest) AsMachineGroupMapRequest() (*MachineGroupMapRequest, bool) { + return &mgmr, true } // MachineReference is reference to a machine. @@ -454,19 +800,81 @@ type MachineReference struct { ID *string `json:"id,omitempty"` Type *string `json:"type,omitempty"` Name *string `json:"name,omitempty"` + Kind Kind `json:"kind,omitempty"` } -// MachineReferenceWithHints is a machine reference with a hint of the -// machine's name and operating system. +// MarshalJSON is the custom marshaler for MachineReference. +func (mr MachineReference) MarshalJSON() ([]byte, error) { + mr.Kind = KindRefmachine + type Alias MachineReference + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mr), + }) +} + +// AsMachineReference is the ResourceReference implementation for MachineReference. +func (mr MachineReference) AsMachineReference() (*MachineReference, bool) { + return &mr, true +} + +// AsProcessReference is the ResourceReference implementation for MachineReference. +func (mr MachineReference) AsProcessReference() (*ProcessReference, bool) { + return nil, false +} + +// AsPortReference is the ResourceReference implementation for MachineReference. +func (mr MachineReference) AsPortReference() (*PortReference, bool) { + return nil, false +} + +// AsMachineReferenceWithHints is the ResourceReference implementation for MachineReference. +func (mr MachineReference) AsMachineReferenceWithHints() (*MachineReferenceWithHints, bool) { + return nil, false +} + +// MachineReferenceWithHints is a machine reference with a hint of the machine's name and operating system. type MachineReferenceWithHints struct { ID *string `json:"id,omitempty"` Type *string `json:"type,omitempty"` Name *string `json:"name,omitempty"` + Kind Kind `json:"kind,omitempty"` *MachineReferenceWithHintsProperties `json:"properties,omitempty"` } -// MachineReferenceWithHintsProperties is machine reference with name and os -// hints. +// MarshalJSON is the custom marshaler for MachineReferenceWithHints. +func (mrwh MachineReferenceWithHints) MarshalJSON() ([]byte, error) { + mrwh.Kind = KindRefmachinewithhints + type Alias MachineReferenceWithHints + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(mrwh), + }) +} + +// AsMachineReference is the ResourceReference implementation for MachineReferenceWithHints. +func (mrwh MachineReferenceWithHints) AsMachineReference() (*MachineReference, bool) { + return nil, false +} + +// AsProcessReference is the ResourceReference implementation for MachineReferenceWithHints. +func (mrwh MachineReferenceWithHints) AsProcessReference() (*ProcessReference, bool) { + return nil, false +} + +// AsPortReference is the ResourceReference implementation for MachineReferenceWithHints. +func (mrwh MachineReferenceWithHints) AsPortReference() (*PortReference, bool) { + return nil, false +} + +// AsMachineReferenceWithHints is the ResourceReference implementation for MachineReferenceWithHints. +func (mrwh MachineReferenceWithHints) AsMachineReferenceWithHints() (*MachineReferenceWithHints, bool) { + return &mrwh, true +} + +// MachineReferenceWithHintsProperties is machine reference with name and os hints. type MachineReferenceWithHintsProperties struct { DisplayNameHint *string `json:"displayNameHint,omitempty"` OsFamilyHint OperatingSystemFamily `json:"osFamilyHint,omitempty"` @@ -519,9 +927,48 @@ type MapNodes struct { } // MapRequest is specifies the contents of request to generate a map. -type MapRequest struct { - StartTime *date.Time `json:"startTime,omitempty"` - EndTime *date.Time `json:"endTime,omitempty"` +type MapRequest interface { + AsSingleMachineDependencyMapRequest() (*SingleMachineDependencyMapRequest, bool) + AsMachineGroupMapRequest() (*MachineGroupMapRequest, bool) +} + +func unmarshalMapRequest(body []byte) (MapRequest, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindMapsingleMachineDependency): + var smdmr SingleMachineDependencyMapRequest + err := json.Unmarshal(body, &smdmr) + return smdmr, err + case string(KindMapmachineGroupDependency): + var mgmr MachineGroupMapRequest + err := json.Unmarshal(body, &mgmr) + return mgmr, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalMapRequestArray(body []byte) ([]MapRequest, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + mrArray := make([]MapRequest, len(rawMessages)) + + for index, rawMessage := range rawMessages { + mr, err := unmarshalMapRequest(*rawMessage) + if err != nil { + return nil, err + } + mrArray[index] = mr + } + return mrArray, nil } // MapResponse is specified the contents of a map response. @@ -541,35 +988,131 @@ type NetworkConfiguration struct { DNSNames *[]string `json:"dnsNames,omitempty"` } -// OperatingSystemConfiguration is describes the configuration of the operating -// system of a machine. +// OperatingSystemConfiguration is describes the configuration of the operating system of a machine. type OperatingSystemConfiguration struct { Family OperatingSystemFamily `json:"family,omitempty"` FullName *string `json:"fullName,omitempty"` Bitness Bitness `json:"bitness,omitempty"` } -// Port is a port resource represents a server port on a machine. The port may -// be actively *monitored*, i.e., a Dependency Agent is running on its machine, -// or *discovered*, i.e., its existence was inferred by observing the data -// stream from monitored machines. A port is live during an interval of time, -// if that port had associated activity during (parts) of that interval. +// Port is a port resource represents a server port on a machine. The port may be actively *monitored*, i.e., a +// Dependency Agent is running on its machine, or *discovered*, i.e., its existence was inferred by observing the data +// stream from monitored machines. A port is live during an interval of time, if that port had associated activity +// during (parts) of that interval. type Port struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` + Kind KindCoreResource `json:"kind,omitempty"` *PortProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for Port. +func (p Port) MarshalJSON() ([]byte, error) { + p.Kind = KindPort + type Alias Port + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(p), + }) +} + +// AsMachine is the CoreResource implementation for Port. +func (p Port) AsMachine() (*Machine, bool) { + return nil, false +} + +// AsProcess is the CoreResource implementation for Port. +func (p Port) AsProcess() (*Process, bool) { + return nil, false +} + +// AsPort is the CoreResource implementation for Port. +func (p Port) AsPort() (*Port, bool) { + return &p, true +} + +// AsClientGroup is the CoreResource implementation for Port. +func (p Port) AsClientGroup() (*ClientGroup, bool) { + return nil, false +} + +// AsMachineGroup is the CoreResource implementation for Port. +func (p Port) AsMachineGroup() (*MachineGroup, bool) { + return nil, false +} + // PortProperties is resource properties. type PortProperties struct { - MonitoringState MonitoringState `json:"monitoringState,omitempty"` - Machine *ResourceReference `json:"machine,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - IPAddress *string `json:"ipAddress,omitempty"` - PortNumber *int32 `json:"portNumber,omitempty"` + MonitoringState MonitoringState `json:"monitoringState,omitempty"` + Machine ResourceReference `json:"machine,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + IPAddress *string `json:"ipAddress,omitempty"` + PortNumber *int32 `json:"portNumber,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for PortProperties struct. +func (p *PortProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["monitoringState"] + if v != nil { + var monitoringState MonitoringState + err = json.Unmarshal(*m["monitoringState"], &monitoringState) + if err != nil { + return err + } + p.MonitoringState = monitoringState + } + + v = m["machine"] + if v != nil { + machine, err := unmarshalResourceReference(*m["machine"]) + if err != nil { + return err + } + p.Machine = machine + } + + v = m["displayName"] + if v != nil { + var displayName string + err = json.Unmarshal(*m["displayName"], &displayName) + if err != nil { + return err + } + p.DisplayName = &displayName + } + + v = m["ipAddress"] + if v != nil { + var IPAddress string + err = json.Unmarshal(*m["ipAddress"], &IPAddress) + if err != nil { + return err + } + p.IPAddress = &IPAddress + } + + v = m["portNumber"] + if v != nil { + var portNumber int32 + err = json.Unmarshal(*m["portNumber"], &portNumber) + if err != nil { + return err + } + p.PortNumber = &portNumber + } + + return nil } // PortCollection is collection of Port resources. @@ -596,9 +1139,41 @@ type PortReference struct { ID *string `json:"id,omitempty"` Type *string `json:"type,omitempty"` Name *string `json:"name,omitempty"` + Kind Kind `json:"kind,omitempty"` *PortReferenceProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for PortReference. +func (pr PortReference) MarshalJSON() ([]byte, error) { + pr.Kind = KindRefport + type Alias PortReference + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(pr), + }) +} + +// AsMachineReference is the ResourceReference implementation for PortReference. +func (pr PortReference) AsMachineReference() (*MachineReference, bool) { + return nil, false +} + +// AsProcessReference is the ResourceReference implementation for PortReference. +func (pr PortReference) AsProcessReference() (*ProcessReference, bool) { + return nil, false +} + +// AsPortReference is the ResourceReference implementation for PortReference. +func (pr PortReference) AsPortReference() (*PortReference, bool) { + return &pr, true +} + +// AsMachineReferenceWithHints is the ResourceReference implementation for PortReference. +func (pr PortReference) AsMachineReferenceWithHints() (*MachineReferenceWithHints, bool) { + return nil, false +} + // PortReferenceProperties is resource properties. type PortReferenceProperties struct { Machine *MachineReference `json:"machine,omitempty"` @@ -606,37 +1181,190 @@ type PortReferenceProperties struct { PortNumber *int32 `json:"portNumber,omitempty"` } -// Process is a process resource represents a process running on a machine. The -// process may be actively *monitored*, i.e., a Dependency Agent is running on -// its machine, or *discovered*, i.e., its existence was inferred by observing -// the data stream from monitored machines. A process resource represents a -// pool of actual operating system resources that share command lines and -// metadata. As the process pool evolves over time, prior versions of the -// process resource are preserved and available for access. A process is live -// during an interval of time, if that process is executing during (parts) of -// that interval +// Process is a process resource represents a process running on a machine. The process may be actively *monitored*, +// i.e., a Dependency Agent is running on its machine, or *discovered*, i.e., its existence was inferred by observing +// the data stream from monitored machines. A process resource represents a pool of actual operating system resources +// that share command lines and metadata. As the process pool evolves over time, prior versions of the process resource +// are preserved and available for access. A process is live during an interval of time, if that process is executing +// during (parts) of that interval type Process struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` - Etag *string `json:"etag,omitempty"` + ID *string `json:"id,omitempty"` + Type *string `json:"type,omitempty"` + Name *string `json:"name,omitempty"` + Etag *string `json:"etag,omitempty"` + Kind KindCoreResource `json:"kind,omitempty"` *ProcessProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for Process. +func (p Process) MarshalJSON() ([]byte, error) { + p.Kind = KindProcess + type Alias Process + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(p), + }) +} + +// AsMachine is the CoreResource implementation for Process. +func (p Process) AsMachine() (*Machine, bool) { + return nil, false +} + +// AsProcess is the CoreResource implementation for Process. +func (p Process) AsProcess() (*Process, bool) { + return &p, true +} + +// AsPort is the CoreResource implementation for Process. +func (p Process) AsPort() (*Port, bool) { + return nil, false +} + +// AsClientGroup is the CoreResource implementation for Process. +func (p Process) AsClientGroup() (*ClientGroup, bool) { + return nil, false +} + +// AsMachineGroup is the CoreResource implementation for Process. +func (p Process) AsMachineGroup() (*MachineGroup, bool) { + return nil, false +} + // ProcessProperties is resource properties. type ProcessProperties struct { - Timestamp *date.Time `json:"timestamp,omitempty"` - MonitoringState MonitoringState `json:"monitoringState,omitempty"` - Machine *ResourceReference `json:"machine,omitempty"` - ExecutableName *string `json:"executableName,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - StartTime *date.Time `json:"startTime,omitempty"` - Role ProcessRole `json:"role,omitempty"` - Details *ProcessDetails `json:"details,omitempty"` - User *ProcessUser `json:"user,omitempty"` - ClientOf *ResourceReference `json:"clientOf,omitempty"` - AcceptorOf *ResourceReference `json:"acceptorOf,omitempty"` + Timestamp *date.Time `json:"timestamp,omitempty"` + MonitoringState MonitoringState `json:"monitoringState,omitempty"` + Machine ResourceReference `json:"machine,omitempty"` + ExecutableName *string `json:"executableName,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + Role ProcessRole `json:"role,omitempty"` + Details *ProcessDetails `json:"details,omitempty"` + User *ProcessUser `json:"user,omitempty"` + ClientOf ResourceReference `json:"clientOf,omitempty"` + AcceptorOf ResourceReference `json:"acceptorOf,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for ProcessProperties struct. +func (p *ProcessProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["timestamp"] + if v != nil { + var timestamp date.Time + err = json.Unmarshal(*m["timestamp"], ×tamp) + if err != nil { + return err + } + p.Timestamp = ×tamp + } + + v = m["monitoringState"] + if v != nil { + var monitoringState MonitoringState + err = json.Unmarshal(*m["monitoringState"], &monitoringState) + if err != nil { + return err + } + p.MonitoringState = monitoringState + } + + v = m["machine"] + if v != nil { + machine, err := unmarshalResourceReference(*m["machine"]) + if err != nil { + return err + } + p.Machine = machine + } + + v = m["executableName"] + if v != nil { + var executableName string + err = json.Unmarshal(*m["executableName"], &executableName) + if err != nil { + return err + } + p.ExecutableName = &executableName + } + + v = m["displayName"] + if v != nil { + var displayName string + err = json.Unmarshal(*m["displayName"], &displayName) + if err != nil { + return err + } + p.DisplayName = &displayName + } + + v = m["startTime"] + if v != nil { + var startTime date.Time + err = json.Unmarshal(*m["startTime"], &startTime) + if err != nil { + return err + } + p.StartTime = &startTime + } + + v = m["role"] + if v != nil { + var role ProcessRole + err = json.Unmarshal(*m["role"], &role) + if err != nil { + return err + } + p.Role = role + } + + v = m["details"] + if v != nil { + var details ProcessDetails + err = json.Unmarshal(*m["details"], &details) + if err != nil { + return err + } + p.Details = &details + } + + v = m["user"] + if v != nil { + var userVar ProcessUser + err = json.Unmarshal(*m["user"], &userVar) + if err != nil { + return err + } + p.User = &userVar + } + + v = m["clientOf"] + if v != nil { + clientOf, err := unmarshalResourceReference(*m["clientOf"]) + if err != nil { + return err + } + p.ClientOf = clientOf + } + + v = m["acceptorOf"] + if v != nil { + acceptorOf, err := unmarshalResourceReference(*m["acceptorOf"]) + if err != nil { + return err + } + p.AcceptorOf = acceptorOf + } + + return nil } // ProcessCollection is collection of Process resources. @@ -679,9 +1407,41 @@ type ProcessReference struct { ID *string `json:"id,omitempty"` Type *string `json:"type,omitempty"` Name *string `json:"name,omitempty"` + Kind Kind `json:"kind,omitempty"` *ProcessReferenceProperties `json:"properties,omitempty"` } +// MarshalJSON is the custom marshaler for ProcessReference. +func (pr ProcessReference) MarshalJSON() ([]byte, error) { + pr.Kind = KindRefprocess + type Alias ProcessReference + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(pr), + }) +} + +// AsMachineReference is the ResourceReference implementation for ProcessReference. +func (pr ProcessReference) AsMachineReference() (*MachineReference, bool) { + return nil, false +} + +// AsProcessReference is the ResourceReference implementation for ProcessReference. +func (pr ProcessReference) AsProcessReference() (*ProcessReference, bool) { + return &pr, true +} + +// AsPortReference is the ResourceReference implementation for ProcessReference. +func (pr ProcessReference) AsPortReference() (*PortReference, bool) { + return nil, false +} + +// AsMachineReferenceWithHints is the ResourceReference implementation for ProcessReference. +func (pr ProcessReference) AsMachineReferenceWithHints() (*MachineReferenceWithHints, bool) { + return nil, false +} + // ProcessReferenceProperties is resource properties. type ProcessReferenceProperties struct { Machine *MachineReference `json:"machine,omitempty"` @@ -694,18 +1454,106 @@ type ProcessUser struct { } // Relationship is a typed relationship between two entities. -type Relationship struct { - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` +type Relationship interface { + AsConnection() (*Connection, bool) + AsAcceptor() (*Acceptor, bool) +} + +func unmarshalRelationship(body []byte) (Relationship, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindRelconnection): + var c Connection + err := json.Unmarshal(body, &c) + return c, err + case string(KindRelacceptor): + var a Acceptor + err := json.Unmarshal(body, &a) + return a, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalRelationshipArray(body []byte) ([]Relationship, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rArray := make([]Relationship, len(rawMessages)) + + for index, rawMessage := range rawMessages { + r, err := unmarshalRelationship(*rawMessage) + if err != nil { + return nil, err + } + rArray[index] = r + } + return rArray, nil } // RelationshipProperties is relationship properties. type RelationshipProperties struct { - Source *ResourceReference `json:"source,omitempty"` - Destination *ResourceReference `json:"destination,omitempty"` - StartTime *date.Time `json:"startTime,omitempty"` - EndTime *date.Time `json:"endTime,omitempty"` + Source ResourceReference `json:"source,omitempty"` + Destination ResourceReference `json:"destination,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for RelationshipProperties struct. +func (rp *RelationshipProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["source"] + if v != nil { + source, err := unmarshalResourceReference(*m["source"]) + if err != nil { + return err + } + rp.Source = source + } + + v = m["destination"] + if v != nil { + destination, err := unmarshalResourceReference(*m["destination"]) + if err != nil { + return err + } + rp.Destination = destination + } + + v = m["startTime"] + if v != nil { + var startTime date.Time + err = json.Unmarshal(*m["startTime"], &startTime) + if err != nil { + return err + } + rp.StartTime = &startTime + } + + v = m["endTime"] + if v != nil { + var endTime date.Time + err = json.Unmarshal(*m["endTime"], &endTime) + if err != nil { + return err + } + rp.EndTime = &endTime + } + + return nil } // Resource is resource model definition. @@ -716,19 +1564,88 @@ type Resource struct { } // ResourceReference is represents a reference to another resource. -type ResourceReference struct { - ID *string `json:"id,omitempty"` - Type *string `json:"type,omitempty"` - Name *string `json:"name,omitempty"` +type ResourceReference interface { + AsMachineReference() (*MachineReference, bool) + AsProcessReference() (*ProcessReference, bool) + AsPortReference() (*PortReference, bool) + AsMachineReferenceWithHints() (*MachineReferenceWithHints, bool) } -// SingleMachineDependencyMapRequest is specifies the computation of a single -// server dependency map. A single server dependency map includes all direct -// dependencies of a given machine. +func unmarshalResourceReference(body []byte) (ResourceReference, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["kind"] { + case string(KindRefmachine): + var mr MachineReference + err := json.Unmarshal(body, &mr) + return mr, err + case string(KindRefprocess): + var pr ProcessReference + err := json.Unmarshal(body, &pr) + return pr, err + case string(KindRefport): + var pr PortReference + err := json.Unmarshal(body, &pr) + return pr, err + case string(KindRefmachinewithhints): + var mrwh MachineReferenceWithHints + err := json.Unmarshal(body, &mrwh) + return mrwh, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalResourceReferenceArray(body []byte) ([]ResourceReference, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + rrArray := make([]ResourceReference, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rr, err := unmarshalResourceReference(*rawMessage) + if err != nil { + return nil, err + } + rrArray[index] = rr + } + return rrArray, nil +} + +// SingleMachineDependencyMapRequest is specifies the computation of a single server dependency map. A single server +// dependency map includes all direct dependencies of a given machine. type SingleMachineDependencyMapRequest struct { - StartTime *date.Time `json:"startTime,omitempty"` - EndTime *date.Time `json:"endTime,omitempty"` - MachineID *string `json:"machineId,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + Kind KindMapRequest `json:"kind,omitempty"` + MachineID *string `json:"machineId,omitempty"` +} + +// MarshalJSON is the custom marshaler for SingleMachineDependencyMapRequest. +func (smdmr SingleMachineDependencyMapRequest) MarshalJSON() ([]byte, error) { + smdmr.Kind = KindMapsingleMachineDependency + type Alias SingleMachineDependencyMapRequest + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(smdmr), + }) +} + +// AsSingleMachineDependencyMapRequest is the MapRequest implementation for SingleMachineDependencyMapRequest. +func (smdmr SingleMachineDependencyMapRequest) AsSingleMachineDependencyMapRequest() (*SingleMachineDependencyMapRequest, bool) { + return &smdmr, true +} + +// AsMachineGroupMapRequest is the MapRequest implementation for SingleMachineDependencyMapRequest. +func (smdmr SingleMachineDependencyMapRequest) AsMachineGroupMapRequest() (*MachineGroupMapRequest, bool) { + return nil, false } // Summary is base for all resource summaries. @@ -749,8 +1666,7 @@ type Timezone struct { FullName *string `json:"fullName,omitempty"` } -// VirtualMachineConfiguration is describes the virtualizaton-related -// configuration of a machine. +// VirtualMachineConfiguration is describes the virtualizaton-related configuration of a machine. type VirtualMachineConfiguration struct { VirtualMachineType VirtualMachineType `json:"virtualMachineType,omitempty"` NativeMachineID *string `json:"nativeMachineId,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/ports.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/ports.go index 3834e2f9c..89a410409 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/ports.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/ports.go @@ -14,9 +14,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -41,17 +40,14 @@ func NewPortsClientWithBaseURI(baseURI string, subscriptionID string) PortsClien return PortsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Get returns the specified port. The port must be live during the specified -// time interval. If the port is not live during the interval, status 404 (Not -// Found) is returned. +// Get returns the specified port. The port must be live during the specified time interval. If the port is not live +// during the interval, status 404 (Not Found) is returned. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. portName is port resource -// name. startTime is uTC date and time specifying the start time of an -// interval. When not specified the service uses DateTime.UtcNow - 10m endTime -// is uTC date and time specifying the end time of an interval. When not -// specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. portName is port resource name. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow func (client PortsClient) Get(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result Port, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -140,16 +136,13 @@ func (client PortsClient) GetResponder(resp *http.Response) (result Port, err er return } -// GetLiveness obtains the liveness status of the port during the specified -// time interval. +// GetLiveness obtains the liveness status of the port during the specified time interval. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. portName is port resource -// name. startTime is uTC date and time specifying the start time of an -// interval. When not specified the service uses DateTime.UtcNow - 10m endTime -// is uTC date and time specifying the end time of an interval. When not -// specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. portName is port resource name. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow func (client PortsClient) GetLiveness(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result Liveness, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -238,16 +231,13 @@ func (client PortsClient) GetLivenessResponder(resp *http.Response) (result Live return } -// ListAcceptingProcesses returns a collection of processes accepting on the -// specified port +// ListAcceptingProcesses returns a collection of processes accepting on the specified port // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. portName is port resource -// name. startTime is uTC date and time specifying the start time of an -// interval. When not specified the service uses DateTime.UtcNow - 10m endTime -// is uTC date and time specifying the end time of an interval. When not -// specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. portName is port resource name. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow func (client PortsClient) ListAcceptingProcesses(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result ProcessCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -360,16 +350,58 @@ func (client PortsClient) ListAcceptingProcessesNextResults(lastResults ProcessC return } -// ListConnections returns a collection of connections established via the -// specified port. +// ListAcceptingProcessesComplete gets all elements from the list without paging. +func (client PortsClient) ListAcceptingProcessesComplete(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Process, <-chan error) { + resultChan := make(chan Process) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAcceptingProcesses(resourceGroupName, workspaceName, machineName, portName, startTime, endTime) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAcceptingProcessesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListConnections returns a collection of connections established via the specified port. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. portName is port resource -// name. startTime is uTC date and time specifying the start time of an -// interval. When not specified the service uses DateTime.UtcNow - 10m endTime -// is uTC date and time specifying the end time of an interval. When not -// specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. portName is port resource name. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow func (client PortsClient) ListConnections(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time) (result ConnectionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -481,3 +513,48 @@ func (client PortsClient) ListConnectionsNextResults(lastResults ConnectionColle return } + +// ListConnectionsComplete gets all elements from the list without paging. +func (client PortsClient) ListConnectionsComplete(resourceGroupName string, workspaceName string, machineName string, portName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Connection, <-chan error) { + resultChan := make(chan Connection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListConnections(resourceGroupName, workspaceName, machineName, portName, startTime, endTime) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListConnectionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/processes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/processes.go index f36e4b888..44778e4df 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/processes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/processes.go @@ -14,9 +14,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -36,20 +35,17 @@ func NewProcessesClient(subscriptionID string) ProcessesClient { return NewProcessesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProcessesClientWithBaseURI creates an instance of the ProcessesClient -// client. +// NewProcessesClientWithBaseURI creates an instance of the ProcessesClient client. func NewProcessesClientWithBaseURI(baseURI string, subscriptionID string) ProcessesClient { return ProcessesClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get returns the specified process. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. processName is process -// resource name. timestamp is uTC date and time specifying a time instance -// relative to which to evaluate a resource. When not specified, the service -// uses DateTime.UtcNow. +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. processName is process resource name. +// timestamp is UTC date and time specifying a time instance relative to which to evaluate a resource. When not +// specified, the service uses DateTime.UtcNow. func (client ProcessesClient) Get(resourceGroupName string, workspaceName string, machineName string, processName string, timestamp *date.Time) (result Process, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -135,16 +131,13 @@ func (client ProcessesClient) GetResponder(resp *http.Response) (result Process, return } -// GetLiveness obtains the liveness status of the process during the specified -// time interval. +// GetLiveness obtains the liveness status of the process during the specified time interval. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. processName is process -// resource name. startTime is uTC date and time specifying the start time of -// an interval. When not specified the service uses DateTime.UtcNow - 10m -// endTime is uTC date and time specifying the end time of an interval. When -// not specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. processName is process resource name. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow func (client ProcessesClient) GetLiveness(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result Liveness, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -233,16 +226,13 @@ func (client ProcessesClient) GetLivenessResponder(resp *http.Response) (result return } -// ListAcceptingPorts returns a collection of ports on which this process is -// accepting +// ListAcceptingPorts returns a collection of ports on which this process is accepting // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. processName is process -// resource name. startTime is uTC date and time specifying the start time of -// an interval. When not specified the service uses DateTime.UtcNow - 10m -// endTime is uTC date and time specifying the end time of an interval. When -// not specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. processName is process resource name. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow func (client ProcessesClient) ListAcceptingPorts(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result PortCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -355,16 +345,58 @@ func (client ProcessesClient) ListAcceptingPortsNextResults(lastResults PortColl return } -// ListConnections returns a collection of connections terminating or -// originating at the specified process +// ListAcceptingPortsComplete gets all elements from the list without paging. +func (client ProcessesClient) ListAcceptingPortsComplete(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Port, <-chan error) { + resultChan := make(chan Port) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAcceptingPorts(resourceGroupName, workspaceName, machineName, processName, startTime, endTime) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAcceptingPortsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListConnections returns a collection of connections terminating or originating at the specified process // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. machineName is machine resource name. processName is process -// resource name. startTime is uTC date and time specifying the start time of -// an interval. When not specified the service uses DateTime.UtcNow - 10m -// endTime is uTC date and time specifying the end time of an interval. When -// not specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. machineName is machine resource name. processName is process resource name. +// startTime is UTC date and time specifying the start time of an interval. When not specified the service uses +// DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an interval. When not specified the +// service uses DateTime.UtcNow func (client ProcessesClient) ListConnections(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time) (result ConnectionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -476,3 +508,48 @@ func (client ProcessesClient) ListConnectionsNextResults(lastResults ConnectionC return } + +// ListConnectionsComplete gets all elements from the list without paging. +func (client ProcessesClient) ListConnectionsComplete(resourceGroupName string, workspaceName string, machineName string, processName string, startTime *date.Time, endTime *date.Time, cancel <-chan struct{}) (<-chan Connection, <-chan error) { + resultChan := make(chan Connection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListConnections(resourceGroupName, workspaceName, machineName, processName, startTime, endTime) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListConnectionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/summaries.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/summaries.go index fa099ea9b..6bd08414c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/summaries.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/summaries.go @@ -14,9 +14,8 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -36,20 +35,17 @@ func NewSummariesClient(subscriptionID string) SummariesClient { return NewSummariesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSummariesClientWithBaseURI creates an instance of the SummariesClient -// client. +// NewSummariesClientWithBaseURI creates an instance of the SummariesClient client. func NewSummariesClientWithBaseURI(baseURI string, subscriptionID string) SummariesClient { return SummariesClient{NewWithBaseURI(baseURI, subscriptionID)} } // GetMachines returns summary information about the machines in the workspace. // -// resourceGroupName is resource group name within the specified -// subscriptionId. workspaceName is oMS workspace containing the resources of -// interest. startTime is uTC date and time specifying the start time of an -// interval. When not specified the service uses DateTime.UtcNow - 10m endTime -// is uTC date and time specifying the end time of an interval. When not -// specified the service uses DateTime.UtcNow +// resourceGroupName is resource group name within the specified subscriptionId. workspaceName is OMS workspace +// containing the resources of interest. startTime is UTC date and time specifying the start time of an interval. When +// not specified the service uses DateTime.UtcNow - 10m endTime is UTC date and time specifying the end time of an +// interval. When not specified the service uses DateTime.UtcNow func (client SummariesClient) GetMachines(resourceGroupName string, workspaceName string, startTime *date.Time, endTime *date.Time) (result MachinesSummary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go index ffa81dc74..160eb3094 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/service-map/version.go @@ -14,15 +14,15 @@ package servicemap // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-servicemap/2015-11-01-preview" + return "Azure-SDK-For-Go/v11.0.0-beta arm-servicemap/2015-11-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/client.go index 446baff17..9ea063a73 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/client.go @@ -1,5 +1,4 @@ -// Package servicebus implements the Azure ARM Servicebus service API version -// 2015-08-01. +// Package servicebus implements the Azure ARM Servicebus service API version 2017-04-01. // // Azure Service Bus client package servicebus @@ -18,9 +17,8 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/eventhubs.go new file mode 100644 index 000000000..23b6487b0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/eventhubs.go @@ -0,0 +1,184 @@ +package servicebus + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// EventHubsClient is the azure Service Bus client +type EventHubsClient struct { + ManagementClient +} + +// NewEventHubsClient creates an instance of the EventHubsClient client. +func NewEventHubsClient(subscriptionID string) EventHubsClient { + return NewEventHubsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEventHubsClientWithBaseURI creates an instance of the EventHubsClient client. +func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventHubsClient { + return EventHubsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByNamespace gets all the Event Hubs in a service bus Namespace. +// +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +func (client EventHubsClient) ListByNamespace(resourceGroupName string, namespaceName string) (result EventHubListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.EventHubsClient", "ListByNamespace") + } + + req, err := client.ListByNamespacePreparer(resourceGroupName, namespaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", resp, "Failure sending request") + return + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", resp, "Failure responding to request") + } + + return +} + +// ListByNamespacePreparer prepares the ListByNamespace request. +func (client EventHubsClient) ListByNamespacePreparer(resourceGroupName string, namespaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/eventhubs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByNamespaceSender sends the ListByNamespace request. The method will close the +// http.Response Body if it receives an error. +func (client EventHubsClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByNamespaceResponder handles the response to the ListByNamespace request. The method always +// closes the http.Response Body. +func (client EventHubsClient) ListByNamespaceResponder(resp *http.Response) (result EventHubListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByNamespaceNextResults retrieves the next set of results, if any. +func (client EventHubsClient) ListByNamespaceNextResults(lastResults EventHubListResult) (result EventHubListResult, err error) { + req, err := lastResults.EventHubListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", resp, "Failure sending next results request") + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.EventHubsClient", "ListByNamespace", resp, "Failure responding to next results request") + } + + return +} + +// ListByNamespaceComplete gets all elements from the list without paging. +func (client EventHubsClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan Eventhub, <-chan error) { + resultChan := make(chan Eventhub) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByNamespace(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByNamespaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go index 1cb4882ff..a2a7db653 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/models.go @@ -14,9 +14,8 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -37,109 +36,58 @@ const ( Send AccessRights = "Send" ) -// EntityAvailabilityStatus enumerates the values for entity availability -// status. -type EntityAvailabilityStatus string +// EncodingCaptureDescription enumerates the values for encoding capture description. +type EncodingCaptureDescription string const ( - // Available specifies the available state for entity availability status. - Available EntityAvailabilityStatus = "Available" - // Limited specifies the limited state for entity availability status. - Limited EntityAvailabilityStatus = "Limited" - // Renaming specifies the renaming state for entity availability status. - Renaming EntityAvailabilityStatus = "Renaming" - // Restoring specifies the restoring state for entity availability status. - Restoring EntityAvailabilityStatus = "Restoring" - // Unknown specifies the unknown state for entity availability status. - Unknown EntityAvailabilityStatus = "Unknown" + // Avro specifies the avro state for encoding capture description. + Avro EncodingCaptureDescription = "Avro" + // AvroDeflate specifies the avro deflate state for encoding capture description. + AvroDeflate EncodingCaptureDescription = "AvroDeflate" ) // EntityStatus enumerates the values for entity status. type EntityStatus string const ( - // EntityStatusActive specifies the entity status active state for entity - // status. - EntityStatusActive EntityStatus = "Active" - // EntityStatusCreating specifies the entity status creating state for - // entity status. - EntityStatusCreating EntityStatus = "Creating" - // EntityStatusDeleting specifies the entity status deleting state for - // entity status. - EntityStatusDeleting EntityStatus = "Deleting" - // EntityStatusDisabled specifies the entity status disabled state for - // entity status. - EntityStatusDisabled EntityStatus = "Disabled" - // EntityStatusReceiveDisabled specifies the entity status receive disabled - // state for entity status. - EntityStatusReceiveDisabled EntityStatus = "ReceiveDisabled" - // EntityStatusRenaming specifies the entity status renaming state for - // entity status. - EntityStatusRenaming EntityStatus = "Renaming" - // EntityStatusRestoring specifies the entity status restoring state for - // entity status. - EntityStatusRestoring EntityStatus = "Restoring" - // EntityStatusSendDisabled specifies the entity status send disabled state - // for entity status. - EntityStatusSendDisabled EntityStatus = "SendDisabled" - // EntityStatusUnknown specifies the entity status unknown state for entity - // status. - EntityStatusUnknown EntityStatus = "Unknown" + // Active specifies the active state for entity status. + Active EntityStatus = "Active" + // Creating specifies the creating state for entity status. + Creating EntityStatus = "Creating" + // Deleting specifies the deleting state for entity status. + Deleting EntityStatus = "Deleting" + // Disabled specifies the disabled state for entity status. + Disabled EntityStatus = "Disabled" + // ReceiveDisabled specifies the receive disabled state for entity status. + ReceiveDisabled EntityStatus = "ReceiveDisabled" + // Renaming specifies the renaming state for entity status. + Renaming EntityStatus = "Renaming" + // Restoring specifies the restoring state for entity status. + Restoring EntityStatus = "Restoring" + // SendDisabled specifies the send disabled state for entity status. + SendDisabled EntityStatus = "SendDisabled" + // Unknown specifies the unknown state for entity status. + Unknown EntityStatus = "Unknown" ) -// NamespaceState enumerates the values for namespace state. -type NamespaceState string +// FilterType enumerates the values for filter type. +type FilterType string const ( - // NamespaceStateActivating specifies the namespace state activating state - // for namespace state. - NamespaceStateActivating NamespaceState = "Activating" - // NamespaceStateActive specifies the namespace state active state for - // namespace state. - NamespaceStateActive NamespaceState = "Active" - // NamespaceStateCreated specifies the namespace state created state for - // namespace state. - NamespaceStateCreated NamespaceState = "Created" - // NamespaceStateCreating specifies the namespace state creating state for - // namespace state. - NamespaceStateCreating NamespaceState = "Creating" - // NamespaceStateDisabled specifies the namespace state disabled state for - // namespace state. - NamespaceStateDisabled NamespaceState = "Disabled" - // NamespaceStateDisabling specifies the namespace state disabling state - // for namespace state. - NamespaceStateDisabling NamespaceState = "Disabling" - // NamespaceStateEnabling specifies the namespace state enabling state for - // namespace state. - NamespaceStateEnabling NamespaceState = "Enabling" - // NamespaceStateFailed specifies the namespace state failed state for - // namespace state. - NamespaceStateFailed NamespaceState = "Failed" - // NamespaceStateRemoved specifies the namespace state removed state for - // namespace state. - NamespaceStateRemoved NamespaceState = "Removed" - // NamespaceStateRemoving specifies the namespace state removing state for - // namespace state. - NamespaceStateRemoving NamespaceState = "Removing" - // NamespaceStateSoftDeleted specifies the namespace state soft deleted - // state for namespace state. - NamespaceStateSoftDeleted NamespaceState = "SoftDeleted" - // NamespaceStateSoftDeleting specifies the namespace state soft deleting - // state for namespace state. - NamespaceStateSoftDeleting NamespaceState = "SoftDeleting" - // NamespaceStateUnknown specifies the namespace state unknown state for - // namespace state. - NamespaceStateUnknown NamespaceState = "Unknown" + // FilterTypeCorrelationFilter specifies the filter type correlation filter state for filter type. + FilterTypeCorrelationFilter FilterType = "CorrelationFilter" + // FilterTypeSQLFilter specifies the filter type sql filter state for filter type. + FilterTypeSQLFilter FilterType = "SqlFilter" ) -// Policykey enumerates the values for policykey. -type Policykey string +// KeyType enumerates the values for key type. +type KeyType string const ( - // PrimaryKey specifies the primary key state for policykey. - PrimaryKey Policykey = "PrimaryKey" - // SecondaryKey specifies the secondary key state for policykey. - SecondaryKey Policykey = "SecondaryKey" + // PrimaryKey specifies the primary key state for key type. + PrimaryKey KeyType = "PrimaryKey" + // SecondaryKey specifies the secondary key state for key type. + SecondaryKey KeyType = "SecondaryKey" ) // SkuName enumerates the values for sku name. @@ -172,64 +120,127 @@ type UnavailableReason string const ( // InvalidName specifies the invalid name state for unavailable reason. InvalidName UnavailableReason = "InvalidName" - // NameInLockdown specifies the name in lockdown state for unavailable - // reason. + // NameInLockdown specifies the name in lockdown state for unavailable reason. NameInLockdown UnavailableReason = "NameInLockdown" // NameInUse specifies the name in use state for unavailable reason. NameInUse UnavailableReason = "NameInUse" // None specifies the none state for unavailable reason. None UnavailableReason = "None" - // SubscriptionIsDisabled specifies the subscription is disabled state for - // unavailable reason. + // SubscriptionIsDisabled specifies the subscription is disabled state for unavailable reason. SubscriptionIsDisabled UnavailableReason = "SubscriptionIsDisabled" - // TooManyNamespaceInCurrentSubscription specifies the too many namespace - // in current subscription state for unavailable reason. + // TooManyNamespaceInCurrentSubscription specifies the too many namespace in current subscription state for unavailable + // reason. TooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription" ) -// CheckNameAvailability is description of a Check Name availability request -// properties. +// AccessKeys is namespace/ServiceBus Connection String +type AccessKeys struct { + autorest.Response `json:"-"` + PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"` + SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` + PrimaryKey *string `json:"primaryKey,omitempty"` + SecondaryKey *string `json:"secondaryKey,omitempty"` + KeyName *string `json:"keyName,omitempty"` +} + +// Action is represents the filter actions which are allowed for the transformation of a message that have been matched +// by a filter expression. +type Action struct { + SQLExpression *string `json:"sqlExpression,omitempty"` + CompatibilityLevel *int32 `json:"compatibilityLevel,omitempty"` + RequiresPreprocessing *bool `json:"requiresPreprocessing,omitempty"` +} + +// AuthorizationRuleProperties is authorizationRule properties. +type AuthorizationRuleProperties struct { + Rights *[]AccessRights `json:"rights,omitempty"` +} + +// CaptureDescription is properties to configure capture description for eventhub +type CaptureDescription struct { + Enabled *bool `json:"enabled,omitempty"` + Encoding EncodingCaptureDescription `json:"encoding,omitempty"` + IntervalInSeconds *int32 `json:"intervalInSeconds,omitempty"` + SizeLimitInBytes *int32 `json:"sizeLimitInBytes,omitempty"` + Destination *Destination `json:"destination,omitempty"` +} + +// CheckNameAvailability is description of a Check Name availability request properties. type CheckNameAvailability struct { Name *string `json:"name,omitempty"` } -// CheckNameAvailabilityResult is description of a Check Name availability -// request properties. +// CheckNameAvailabilityResult is description of a Check Name availability request properties. type CheckNameAvailabilityResult struct { autorest.Response `json:"-"` + Message *string `json:"message,omitempty"` NameAvailable *bool `json:"nameAvailable,omitempty"` Reason UnavailableReason `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` } -// MessageCountDetails is message Count Details. -type MessageCountDetails struct { - ActiveMessageCount *int64 `json:"activeMessageCount,omitempty"` - DeadLetterMessageCount *int64 `json:"deadLetterMessageCount,omitempty"` - ScheduledMessageCount *int64 `json:"scheduledMessageCount,omitempty"` - TransferDeadLetterMessageCount *int64 `json:"transferDeadLetterMessageCount,omitempty"` - TransferMessageCount *int64 `json:"transferMessageCount,omitempty"` +// CorrelationFilter is represents the correlation filter expression. +type CorrelationFilter struct { + CorrelationID *string `json:"correlationId,omitempty"` + MessageID *string `json:"messageId,omitempty"` + To *string `json:"to,omitempty"` + ReplyTo *string `json:"replyTo,omitempty"` + Label *string `json:"label,omitempty"` + SessionID *string `json:"sessionId,omitempty"` + ReplyToSessionID *string `json:"replyToSessionId,omitempty"` + ContentType *string `json:"contentType,omitempty"` + RequiresPreprocessing *bool `json:"requiresPreprocessing,omitempty"` } -// NamespaceCreateOrUpdateParameters is parameters supplied to the Create Or -// Update Namespace operation. -type NamespaceCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Sku *Sku `json:"sku,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *NamespaceProperties `json:"properties,omitempty"` +// Destination is capture storage details for capture description +type Destination struct { + Name *string `json:"name,omitempty"` + *DestinationProperties `json:"properties,omitempty"` } -// NamespaceListResult is the response of the List Namespace operation. -type NamespaceListResult struct { +// DestinationProperties is properties describing the storage account, blob container and acrchive name format for +// capture destination +type DestinationProperties struct { + StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"` + BlobContainer *string `json:"blobContainer,omitempty"` + ArchiveNameFormat *string `json:"archiveNameFormat,omitempty"` +} + +// ErrorResponse is error reponse indicates ServiceBus service is not able to process the incoming request. The reason +// is provided in the error message. +type ErrorResponse struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// Eventhub is single item in List or Get Event Hub operation +type Eventhub struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *EventhubProperties `json:"properties,omitempty"` +} + +// EventhubProperties is properties supplied to the Create Or Update Event Hub operation. +type EventhubProperties struct { + PartitionIds *[]string `json:"partitionIds,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + MessageRetentionInDays *int64 `json:"messageRetentionInDays,omitempty"` + PartitionCount *int64 `json:"partitionCount,omitempty"` + Status EntityStatus `json:"status,omitempty"` + CaptureDescription *CaptureDescription `json:"captureDescription,omitempty"` +} + +// EventHubListResult is the result of the List EventHubs operation. +type EventHubListResult struct { autorest.Response `json:"-"` - Value *[]NamespaceResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]Eventhub `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// NamespaceListResultPreparer prepares a request to retrieve the next set of results. It returns +// EventHubListResultPreparer prepares a request to retrieve the next set of results. It returns // nil if no more results exist. -func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, error) { +func (client EventHubListResult) EventHubListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } @@ -239,34 +250,13 @@ func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// NamespaceProperties is properties of the namespace. -type NamespaceProperties struct { - ProvisioningState *string `json:"provisioningState,omitempty"` - Status NamespaceState `json:"status,omitempty"` - CreatedAt *date.Time `json:"createdAt,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` - ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` - CreateACSNamespace *bool `json:"createACSNamespace,omitempty"` - Enabled *bool `json:"enabled,omitempty"` -} - -// NamespaceResource is description of a namespace resource. -type NamespaceResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` - *NamespaceProperties `json:"properties,omitempty"` -} - -// NamespaceUpdateParameters is parameters supplied to the Patch Namespace -// operation. -type NamespaceUpdateParameters struct { - Tags *map[string]*string `json:"tags,omitempty"` - Sku *Sku `json:"sku,omitempty"` +// MessageCountDetails is message Count Details. +type MessageCountDetails struct { + ActiveMessageCount *int64 `json:"activeMessageCount,omitempty"` + DeadLetterMessageCount *int64 `json:"deadLetterMessageCount,omitempty"` + ScheduledMessageCount *int64 `json:"scheduledMessageCount,omitempty"` + TransferMessageCount *int64 `json:"transferMessageCount,omitempty"` + TransferDeadLetterMessageCount *int64 `json:"transferDeadLetterMessageCount,omitempty"` } // Operation is a ServiceBus REST API operation @@ -282,9 +272,8 @@ type OperationDisplay struct { Operation *string `json:"operation,omitempty"` } -// OperationListResult is result of the request to list ServiceBus operations. -// It contains a list of operations and a URL link to get the next set of -// results. +// OperationListResult is result of the request to list ServiceBus operations. It contains a list of operations and a +// URL link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -303,24 +292,32 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// QueueCreateOrUpdateParameters is parameters supplied to the Create Or Update -// Queue operation. -type QueueCreateOrUpdateParameters struct { - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - *QueueProperties `json:"properties,omitempty"` +// PremiumMessagingRegions is premium Messaging Region +type PremiumMessagingRegions struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Properties *PremiumMessagingRegionsProperties `json:"properties,omitempty"` } -// QueueListResult is the response to the List Queues operation. -type QueueListResult struct { +// PremiumMessagingRegionsProperties is +type PremiumMessagingRegionsProperties struct { + Code *string `json:"code,omitempty"` + FullName *string `json:"fullName,omitempty"` +} + +// PremiumMessagingRegionsListResult is the response of the List PremiumMessagingRegions operation. +type PremiumMessagingRegionsListResult struct { autorest.Response `json:"-"` - Value *[]QueueResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]PremiumMessagingRegions `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// QueueListResultPreparer prepares a request to retrieve the next set of results. It returns +// PremiumMessagingRegionsListResultPreparer prepares a request to retrieve the next set of results. It returns // nil if no more results exist. -func (client QueueListResult) QueueListResultPreparer() (*http.Request, error) { +func (client PremiumMessagingRegionsListResult) PremiumMessagingRegionsListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } @@ -330,85 +327,48 @@ func (client QueueListResult) QueueListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// QueueProperties is the Queue Properties definition. -type QueueProperties struct { - LockDuration *string `json:"lockDuration,omitempty"` - AccessedAt *date.Time `json:"accessedAt,omitempty"` - AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - EntityAvailabilityStatus EntityAvailabilityStatus `json:"entityAvailabilityStatus,omitempty"` - CreatedAt *date.Time `json:"createdAt,omitempty"` - DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"` - DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` - EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` - DeadLetteringOnMessageExpiration *bool `json:"deadLetteringOnMessageExpiration,omitempty"` - EnableExpress *bool `json:"enableExpress,omitempty"` - EnablePartitioning *bool `json:"enablePartitioning,omitempty"` - IsAnonymousAccessible *bool `json:"isAnonymousAccessible,omitempty"` - MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` - MaxSizeInMegabytes *int64 `json:"maxSizeInMegabytes,omitempty"` - MessageCount *int64 `json:"messageCount,omitempty"` - CountDetails *MessageCountDetails `json:"countDetails,omitempty"` - RequiresDuplicateDetection *bool `json:"requiresDuplicateDetection,omitempty"` - RequiresSession *bool `json:"requiresSession,omitempty"` - SizeInBytes *int64 `json:"sizeInBytes,omitempty"` - Status EntityStatus `json:"status,omitempty"` - SupportOrdering *bool `json:"supportOrdering,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` -} - -// QueueResource is description of queue Resource. -type QueueResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *QueueProperties `json:"properties,omitempty"` -} - -// RegenerateKeysParameters is parameters supplied to the Regenerate -// Authorization Rule operation. -type RegenerateKeysParameters struct { - Policykey Policykey `json:"Policykey,omitempty"` +// RegenerateAccessKeyParameters is parameters supplied to the Regenerate Authorization Rule operation, specifies which +// key neeeds to be reset. +type RegenerateAccessKeyParameters struct { + KeyType KeyType `json:"keyType,omitempty"` + Key *string `json:"key,omitempty"` } // Resource is the Resource definition for other than namespace. type Resource struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` } -// ResourceListKeys is namespace/ServiceBus Connection String -type ResourceListKeys struct { - autorest.Response `json:"-"` - PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"` - SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"` - PrimaryKey *string `json:"primaryKey,omitempty"` - SecondaryKey *string `json:"secondaryKey,omitempty"` - KeyName *string `json:"keyName,omitempty"` +// ResourceNamespacePatch is the Resource definition. +type ResourceNamespacePatch struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` } -// SharedAccessAuthorizationRuleCreateOrUpdateParameters is parameters supplied -// to the Create Or Update Authorization Rules operation. -type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Name *string `json:"name,omitempty"` - *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` -} - -// SharedAccessAuthorizationRuleListResult is the response to the List -// Namespace operation. -type SharedAccessAuthorizationRuleListResult struct { +// Rule is description of Rule Resource. +type Rule struct { autorest.Response `json:"-"` - Value *[]SharedAccessAuthorizationRuleResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *Ruleproperties `json:"properties,omitempty"` } -// SharedAccessAuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results. It returns +// RuleListResult is the response of the List rule operation. +type RuleListResult struct { + autorest.Response `json:"-"` + Value *[]Rule `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// RuleListResultPreparer prepares a request to retrieve the next set of results. It returns // nil if no more results exist. -func (client SharedAccessAuthorizationRuleListResult) SharedAccessAuthorizationRuleListResultPreparer() (*http.Request, error) { +func (client RuleListResult) RuleListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } @@ -418,48 +378,174 @@ func (client SharedAccessAuthorizationRuleListResult) SharedAccessAuthorizationR autorest.WithBaseURL(to.String(client.NextLink))) } -// SharedAccessAuthorizationRuleProperties is sharedAccessAuthorizationRule -// properties. -type SharedAccessAuthorizationRuleProperties struct { +// Ruleproperties is description of Rule Resource. +type Ruleproperties struct { + Action *Action `json:"action,omitempty"` + FilterType FilterType `json:"filterType,omitempty"` + SQLFilter *SQLFilter `json:"sqlFilter,omitempty"` + CorrelationFilter *CorrelationFilter `json:"correlationFilter,omitempty"` +} + +// SBAuthorizationRule is description of a namespace authorization rule. +type SBAuthorizationRule struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SBAuthorizationRuleProperties `json:"properties,omitempty"` +} + +// SBAuthorizationRuleProperties is authorizationRule properties. +type SBAuthorizationRuleProperties struct { Rights *[]AccessRights `json:"rights,omitempty"` } -// SharedAccessAuthorizationRuleResource is description of a namespace -// authorization rule. -type SharedAccessAuthorizationRuleResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"` +// SBAuthorizationRuleListResult is the response to the List Namespace operation. +type SBAuthorizationRuleListResult struct { + autorest.Response `json:"-"` + Value *[]SBAuthorizationRule `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// Sku is sKU of the namespace. -type Sku struct { +// SBAuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SBAuthorizationRuleListResult) SBAuthorizationRuleListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SBNamespace is description of a namespace resource. +type SBNamespace struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *SBSku `json:"sku,omitempty"` + *SBNamespaceProperties `json:"properties,omitempty"` +} + +// SBNamespaceListResult is the response of the List Namespace operation. +type SBNamespaceListResult struct { + autorest.Response `json:"-"` + Value *[]SBNamespace `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SBNamespaceListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SBNamespaceListResult) SBNamespaceListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SBNamespaceProperties is properties of the namespace. +type SBNamespaceProperties struct { + ProvisioningState *string `json:"provisioningState,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"` + MetricID *string `json:"metricId,omitempty"` +} + +// SBNamespaceUpdateParameters is description of a namespace resource. +type SBNamespaceUpdateParameters struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Sku *SBSku `json:"sku,omitempty"` + *SBNamespaceProperties `json:"properties,omitempty"` +} + +// SBQueue is description of queue Resource. +type SBQueue struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SBQueueProperties `json:"properties,omitempty"` +} + +// SBQueueListResult is the response to the List Queues operation. +type SBQueueListResult struct { + autorest.Response `json:"-"` + Value *[]SBQueue `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SBQueueListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SBQueueListResult) SBQueueListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SBQueueProperties is the Queue Properties definition. +type SBQueueProperties struct { + CountDetails *MessageCountDetails `json:"countDetails,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + AccessedAt *date.Time `json:"accessedAt,omitempty"` + SizeInBytes *int64 `json:"sizeInBytes,omitempty"` + MessageCount *int64 `json:"messageCount,omitempty"` + LockDuration *string `json:"lockDuration,omitempty"` + MaxSizeInMegabytes *int32 `json:"maxSizeInMegabytes,omitempty"` + RequiresDuplicateDetection *bool `json:"requiresDuplicateDetection,omitempty"` + RequiresSession *bool `json:"requiresSession,omitempty"` + DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"` + DeadLetteringOnMessageExpiration *bool `json:"deadLetteringOnMessageExpiration,omitempty"` + DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` + MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` + Status EntityStatus `json:"status,omitempty"` + AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` + EnablePartitioning *bool `json:"enablePartitioning,omitempty"` + EnableExpress *bool `json:"enableExpress,omitempty"` +} + +// SBSku is SKU of the namespace. +type SBSku struct { Name SkuName `json:"name,omitempty"` Tier SkuTier `json:"tier,omitempty"` Capacity *int32 `json:"capacity,omitempty"` } -// SubscriptionCreateOrUpdateParameters is parameters supplied to the Create Or -// Update Subscription operation. -type SubscriptionCreateOrUpdateParameters struct { - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *SubscriptionProperties `json:"properties,omitempty"` +// SBSubscription is description of subscription resource. +type SBSubscription struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SBSubscriptionProperties `json:"properties,omitempty"` } -// SubscriptionListResult is the response to the List Subscriptions operation. -type SubscriptionListResult struct { +// SBSubscriptionListResult is the response to the List Subscriptions operation. +type SBSubscriptionListResult struct { autorest.Response `json:"-"` - Value *[]SubscriptionResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]SBSubscription `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// SubscriptionListResultPreparer prepares a request to retrieve the next set of results. It returns +// SBSubscriptionListResultPreparer prepares a request to retrieve the next set of results. It returns // nil if no more results exist. -func (client SubscriptionListResult) SubscriptionListResultPreparer() (*http.Request, error) { +func (client SBSubscriptionListResult) SBSubscriptionListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } @@ -469,54 +555,43 @@ func (client SubscriptionListResult) SubscriptionListResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// SubscriptionProperties is description of Subscription Resource. -type SubscriptionProperties struct { - AccessedAt *date.Time `json:"accessedAt,omitempty"` - AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - CountDetails *MessageCountDetails `json:"countDetails,omitempty"` - CreatedAt *date.Time `json:"createdAt,omitempty"` - DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"` - DeadLetteringOnFilterEvaluationExceptions *bool `json:"deadLetteringOnFilterEvaluationExceptions,omitempty"` - DeadLetteringOnMessageExpiration *bool `json:"deadLetteringOnMessageExpiration,omitempty"` - EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` - EntityAvailabilityStatus EntityAvailabilityStatus `json:"entityAvailabilityStatus,omitempty"` - IsReadOnly *bool `json:"isReadOnly,omitempty"` - LockDuration *string `json:"lockDuration,omitempty"` - MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` - MessageCount *int64 `json:"messageCount,omitempty"` - RequiresSession *bool `json:"requiresSession,omitempty"` - Status EntityStatus `json:"status,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` +// SBSubscriptionProperties is description of Subscription Resource. +type SBSubscriptionProperties struct { + MessageCount *int64 `json:"messageCount,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + AccessedAt *date.Time `json:"accessedAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + CountDetails *MessageCountDetails `json:"countDetails,omitempty"` + LockDuration *string `json:"lockDuration,omitempty"` + RequiresSession *bool `json:"requiresSession,omitempty"` + DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"` + DeadLetteringOnMessageExpiration *bool `json:"deadLetteringOnMessageExpiration,omitempty"` + DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` + MaxDeliveryCount *int32 `json:"maxDeliveryCount,omitempty"` + Status EntityStatus `json:"status,omitempty"` + EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` + AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` } -// SubscriptionResource is description of subscription resource. -type SubscriptionResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *SubscriptionProperties `json:"properties,omitempty"` +// SBTopic is description of topic resource. +type SBTopic struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SBTopicProperties `json:"properties,omitempty"` } -// TopicCreateOrUpdateParameters is parameters supplied to the Create Or Update -// Topic operation. -type TopicCreateOrUpdateParameters struct { - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - *TopicProperties `json:"properties,omitempty"` -} - -// TopicListResult is the response to the List Topics operation. -type TopicListResult struct { +// SBTopicListResult is the response to the List Topics operation. +type SBTopicListResult struct { autorest.Response `json:"-"` - Value *[]TopicResource `json:"value,omitempty"` - NextLink *string `json:"nextLink,omitempty"` + Value *[]SBTopic `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// TopicListResultPreparer prepares a request to retrieve the next set of results. It returns +// SBTopicListResultPreparer prepares a request to retrieve the next set of results. It returns // nil if no more results exist. -func (client TopicListResult) TopicListResultPreparer() (*http.Request, error) { +func (client SBTopicListResult) SBTopicListResultPreparer() (*http.Request, error) { if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { return nil, nil } @@ -526,46 +601,47 @@ func (client TopicListResult) TopicListResultPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// TopicProperties is the Tpoic Properties definition. -type TopicProperties struct { - AccessedAt *date.Time `json:"accessedAt,omitempty"` - AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` - EntityAvailabilityStatus EntityAvailabilityStatus `json:"entityAvailabilityStatus,omitempty"` - CreatedAt *date.Time `json:"createdAt,omitempty"` - CountDetails *MessageCountDetails `json:"countDetails,omitempty"` - DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"` - DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` - EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` - EnableExpress *bool `json:"enableExpress,omitempty"` - EnablePartitioning *bool `json:"enablePartitioning,omitempty"` - EnableSubscriptionPartitioning *bool `json:"enableSubscriptionPartitioning,omitempty"` - FilteringMessagesBeforePublishing *bool `json:"filteringMessagesBeforePublishing,omitempty"` - IsAnonymousAccessible *bool `json:"isAnonymousAccessible,omitempty"` - IsExpress *bool `json:"isExpress,omitempty"` - MaxSizeInMegabytes *int64 `json:"maxSizeInMegabytes,omitempty"` - RequiresDuplicateDetection *bool `json:"requiresDuplicateDetection,omitempty"` - SizeInBytes *int64 `json:"sizeInBytes,omitempty"` - Status EntityStatus `json:"status,omitempty"` - SubscriptionCount *int32 `json:"subscriptionCount,omitempty"` - SupportOrdering *bool `json:"supportOrdering,omitempty"` - UpdatedAt *date.Time `json:"updatedAt,omitempty"` +// SBTopicProperties is the Tpoic Properties definition. +type SBTopicProperties struct { + SizeInBytes *int64 `json:"sizeInBytes,omitempty"` + CreatedAt *date.Time `json:"createdAt,omitempty"` + UpdatedAt *date.Time `json:"updatedAt,omitempty"` + AccessedAt *date.Time `json:"accessedAt,omitempty"` + SubscriptionCount *int32 `json:"subscriptionCount,omitempty"` + CountDetails *MessageCountDetails `json:"countDetails,omitempty"` + DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"` + MaxSizeInMegabytes *int32 `json:"maxSizeInMegabytes,omitempty"` + RequiresDuplicateDetection *bool `json:"requiresDuplicateDetection,omitempty"` + DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"` + EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"` + Status EntityStatus `json:"status,omitempty"` + SupportOrdering *bool `json:"supportOrdering,omitempty"` + AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"` + EnablePartitioning *bool `json:"enablePartitioning,omitempty"` + EnableExpress *bool `json:"enableExpress,omitempty"` } -// TopicResource is description of topic resource. -type TopicResource struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - *TopicProperties `json:"properties,omitempty"` +// SQLFilter is represents a filter which is a composition of an expression and an action that is executed in the +// pub/sub pipeline. +type SQLFilter struct { + SQLExpression *string `json:"sqlExpression,omitempty"` + CompatibilityLevel *int32 `json:"compatibilityLevel,omitempty"` + RequiresPreprocessing *bool `json:"requiresPreprocessing,omitempty"` +} + +// SQLRuleAction is represents set of actions written in SQL language-based syntax that is performed against a +// ServiceBus.Messaging.BrokeredMessage +type SQLRuleAction struct { + SQLExpression *string `json:"sqlExpression,omitempty"` + CompatibilityLevel *int32 `json:"compatibilityLevel,omitempty"` + RequiresPreprocessing *bool `json:"requiresPreprocessing,omitempty"` } // TrackedResource is the Resource definition. type TrackedResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` - Location *string `json:"location,omitempty"` Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go index efdf329f1..932fd0b01 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/namespaces.go @@ -14,9 +14,8 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,8 +34,7 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient { return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient -// client. +// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client. func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient { return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -78,7 +76,7 @@ func (client NamespacesClient) CheckNameAvailabilityMethodPreparer(parameters Ch "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -112,24 +110,19 @@ func (client NamespacesClient) CheckNameAvailabilityMethodResponder(resp *http.R return } -// CreateOrUpdate creates or updates a service namespace. Once created, this -// namespace's resource manifest is immutable. This operation is idempotent. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate creates or updates a service namespace. Once created, this namespace's resource manifest is +// immutable. This operation is idempotent. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name. parameters is parameters -// supplied to create a namespace resource. -func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters, cancel <-chan struct{}) (<-chan NamespaceResource, <-chan error) { - resultChan := make(chan NamespaceResource, 1) +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name. +// parameters is parameters supplied to create a namespace resource. +func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters SBNamespace, cancel <-chan struct{}) (<-chan SBNamespace, <-chan error) { + resultChan := make(chan SBNamespace, 1) errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "servicebus.NamespacesClient", "CreateOrUpdate") close(errChan) close(resultChan) @@ -138,10 +131,12 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac go func() { var err error - var result NamespaceResource + var result SBNamespace defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -167,14 +162,14 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client NamespacesClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters, cancel <-chan struct{}) (*http.Request, error) { +func (client NamespacesClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, parameters SBNamespace, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -199,7 +194,7 @@ func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (*http.Re // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (result NamespaceResource, err error) { +func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (result SBNamespace, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -210,14 +205,11 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res return } -// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for -// a namespace. +// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for a namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name authorizationRuleName is -// the authorizationrule name. parameters is the shared access authorization -// rule. -func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorizationrule name. parameters is the shared access authorization rule. +func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SBAuthorizationRule) (result SBAuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -226,11 +218,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.NamespacesClient", "CreateOrUpdateAuthorizationRule") } @@ -256,7 +244,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName } // CreateOrUpdateAuthorizationRulePreparer prepares the CreateOrUpdateAuthorizationRule request. -func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (*http.Request, error) { +func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SBAuthorizationRule) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -264,7 +252,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceG "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -287,7 +275,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleSender(req *http.R // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always // closes the http.Response Body. -func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -298,14 +286,11 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht return } -// Delete deletes an existing namespace. This operation also removes all -// associated resources under the namespace. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes an existing namespace. This operation also removes all associated resources under the namespace. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name func (client NamespacesClient) Delete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -326,8 +311,10 @@ func (client NamespacesClient) Delete(resourceGroupName string, namespaceName st var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -360,7 +347,7 @@ func (client NamespacesClient) DeletePreparer(resourceGroupName string, namespac "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -395,9 +382,8 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto // DeleteAuthorizationRule deletes a namespace authorization rule. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name authorizationRuleName is -// the authorizationrule name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorizationrule name. func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -407,8 +393,7 @@ func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.NamespacesClient", "DeleteAuthorizationRule") } @@ -442,7 +427,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -475,9 +460,8 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo // Get gets a description for the specified namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name -func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result NamespaceResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result SBNamespace, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -517,7 +501,7 @@ func (client NamespacesClient) GetPreparer(resourceGroupName string, namespaceNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -538,7 +522,7 @@ func (client NamespacesClient) GetSender(req *http.Request) (*http.Response, err // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client NamespacesClient) GetResponder(resp *http.Response) (result NamespaceResource, err error) { +func (client NamespacesClient) GetResponder(resp *http.Response) (result SBNamespace, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -549,13 +533,11 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa return } -// GetAuthorizationRule gets an authorization rule for a namespace by rule -// name. +// GetAuthorizationRule gets an authorization rule for a namespace by rule name. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name authorizationRuleName is -// the authorizationrule name. -func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorizationrule name. +func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result SBAuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -564,8 +546,7 @@ func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, na Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.NamespacesClient", "GetAuthorizationRule") } @@ -599,7 +580,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(resourceGroupName st "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -620,7 +601,7 @@ func (client NamespacesClient) GetAuthorizationRuleSender(req *http.Request) (*h // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always // closes the http.Response Body. -func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -631,11 +612,140 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response return } +// List gets all the available namespaces within the subscription, irrespective of the resource groups. +func (client NamespacesClient) List() (result SBNamespaceListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client NamespacesClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client NamespacesClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client NamespacesClient) ListResponder(resp *http.Response) (result SBNamespaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client NamespacesClient) ListNextResults(lastResults SBNamespaceListResult) (result SBNamespaceListResult, err error) { + req, err := lastResults.SBNamespaceListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client NamespacesClient) ListComplete(cancel <-chan struct{}) (<-chan SBNamespace, <-chan error) { + resultChan := make(chan SBNamespace) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAuthorizationRules gets the authorization rules for a namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name -func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result SharedAccessAuthorizationRuleListResult, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result SBAuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -675,7 +785,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(resourceGroupName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -696,7 +806,7 @@ func (client NamespacesClient) ListAuthorizationRulesSender(req *http.Request) ( // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always // closes the http.Response Body. -func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Response) (result SharedAccessAuthorizationRuleListResult, err error) { +func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Response) (result SBAuthorizationRuleListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -708,8 +818,8 @@ func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Respon } // ListAuthorizationRulesNextResults retrieves the next set of results, if any. -func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) { - req, err := lastResults.SharedAccessAuthorizationRuleListResultPreparer() +func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults SBAuthorizationRuleListResult) (result SBAuthorizationRuleListResult, err error) { + req, err := lastResults.SBAuthorizationRuleListResultPreparer() if err != nil { return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListAuthorizationRules", nil, "Failure preparing next results request") } @@ -731,11 +841,55 @@ func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults Sha return } +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client NamespacesClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan SBAuthorizationRule, <-chan error) { + resultChan := make(chan SBAuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup gets the available namespaces within a resource group. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. -func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result NamespaceListResult, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. +func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result SBNamespaceListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -771,7 +925,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -792,7 +946,7 @@ func (client NamespacesClient) ListByResourceGroupSender(req *http.Request) (*ht // ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client NamespacesClient) ListByResourceGroupResponder(resp *http.Response) (result NamespaceListResult, err error) { +func (client NamespacesClient) ListByResourceGroupResponder(resp *http.Response) (result SBNamespaceListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -804,8 +958,8 @@ func (client NamespacesClient) ListByResourceGroupResponder(resp *http.Response) } // ListByResourceGroupNextResults retrieves the next set of results, if any. -func (client NamespacesClient) ListByResourceGroupNextResults(lastResults NamespaceListResult) (result NamespaceListResult, err error) { - req, err := lastResults.NamespaceListResultPreparer() +func (client NamespacesClient) ListByResourceGroupNextResults(lastResults SBNamespaceListResult) (result SBNamespaceListResult, err error) { + req, err := lastResults.SBNamespaceListResultPreparer() if err != nil { return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListByResourceGroup", nil, "Failure preparing next results request") } @@ -827,99 +981,56 @@ func (client NamespacesClient) ListByResourceGroupNextResults(lastResults Namesp return } -// ListBySubscription gets all the available namespaces within the -// subscription, irrespective of the resource groups. -func (client NamespacesClient) ListBySubscription() (result NamespaceListResult, err error) { - req, err := client.ListBySubscriptionPreparer() - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListBySubscription", nil, "Failure preparing request") - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListBySubscription", resp, "Failure sending request") - return - } - - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListBySubscription", resp, "Failure responding to request") - } - - return +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client NamespacesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan SBNamespace, <-chan error) { + resultChan := make(chan SBNamespace) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan } -// ListBySubscriptionPreparer prepares the ListBySubscription request. -func (client NamespacesClient) ListBySubscriptionPreparer() (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/namespaces", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListBySubscriptionSender sends the ListBySubscription request. The method will close the -// http.Response Body if it receives an error. -func (client NamespacesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always -// closes the http.Response Body. -func (client NamespacesClient) ListBySubscriptionResponder(resp *http.Response) (result NamespaceListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListBySubscriptionNextResults retrieves the next set of results, if any. -func (client NamespacesClient) ListBySubscriptionNextResults(lastResults NamespaceListResult) (result NamespaceListResult, err error) { - req, err := lastResults.NamespaceListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListBySubscription", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListBySubscriptionSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListBySubscription", resp, "Failure sending next results request") - } - - result, err = client.ListBySubscriptionResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.NamespacesClient", "ListBySubscription", resp, "Failure responding to next results request") - } - - return -} - -// ListKeys gets the primary and secondary connection strings for the -// namespace. +// ListKeys gets the primary and secondary connection strings for the namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name authorizationRuleName is -// the authorizationrule name. -func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result ResourceListKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorizationrule name. +func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -928,8 +1039,7 @@ func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.NamespacesClient", "ListKeys") } @@ -963,7 +1073,7 @@ func (client NamespacesClient) ListKeysPreparer(resourceGroupName string, namesp "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -984,7 +1094,7 @@ func (client NamespacesClient) ListKeysSender(req *http.Request) (*http.Response // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -995,14 +1105,12 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Re return } -// RegenerateKeys regenerates the primary or secondary connection strings for -// the namespace. +// RegenerateKeys regenerates the primary or secondary connection strings for the namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name authorizationRuleName is -// the authorizationrule name. parameters is parameters supplied to regenerate -// the authorization rule. -func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// authorizationRuleName is the authorizationrule name. parameters is parameters supplied to regenerate the +// authorization rule. +func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -1011,8 +1119,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.NamespacesClient", "RegenerateKeys") } @@ -1038,7 +1145,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -1046,7 +1153,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1069,7 +1176,7 @@ func (client NamespacesClient) RegenerateKeysSender(req *http.Request) (*http.Re // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1080,13 +1187,12 @@ func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (res return } -// Update updates a service namespace. Once created, this namespace's resource -// manifest is immutable. This operation is idempotent. +// Update updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is +// idempotent. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name parameters is parameters -// supplied to update a namespace resource. -func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameters) (result NamespaceResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// parameters is parameters supplied to update a namespace resource. +func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters SBNamespaceUpdateParameters) (result SBNamespace, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -1119,14 +1225,14 @@ func (client NamespacesClient) Update(resourceGroupName string, namespaceName st } // UpdatePreparer prepares the Update request. -func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameters) (*http.Request, error) { +func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters SBNamespaceUpdateParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -1149,7 +1255,7 @@ func (client NamespacesClient) UpdateSender(req *http.Request) (*http.Response, // UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client NamespacesClient) UpdateResponder(resp *http.Response) (result NamespaceResource, err error) { +func (client NamespacesClient) UpdateResponder(resp *http.Response) (result SBNamespace, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/operations.go index 3f7b127e5..415089e53 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/operations.go @@ -14,9 +14,8 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -65,7 +63,7 @@ func (client OperationsClient) List() (result OperationListResult, err error) { // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -120,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/premiummessagingregions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/premiummessagingregions.go new file mode 100644 index 000000000..94c4296ee --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/premiummessagingregions.go @@ -0,0 +1,169 @@ +package servicebus + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// PremiumMessagingRegionsClient is the azure Service Bus client +type PremiumMessagingRegionsClient struct { + ManagementClient +} + +// NewPremiumMessagingRegionsClient creates an instance of the PremiumMessagingRegionsClient client. +func NewPremiumMessagingRegionsClient(subscriptionID string) PremiumMessagingRegionsClient { + return NewPremiumMessagingRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewPremiumMessagingRegionsClientWithBaseURI creates an instance of the PremiumMessagingRegionsClient client. +func NewPremiumMessagingRegionsClientWithBaseURI(baseURI string, subscriptionID string) PremiumMessagingRegionsClient { + return PremiumMessagingRegionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets the available premium messaging regions for servicebus +func (client PremiumMessagingRegionsClient) List() (result PremiumMessagingRegionsListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PremiumMessagingRegionsClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/premiumMessagingRegions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PremiumMessagingRegionsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PremiumMessagingRegionsClient) ListResponder(resp *http.Response) (result PremiumMessagingRegionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListNextResults retrieves the next set of results, if any. +func (client PremiumMessagingRegionsClient) ListNextResults(lastResults PremiumMessagingRegionsListResult) (result PremiumMessagingRegionsListResult, err error) { + req, err := lastResults.PremiumMessagingRegionsListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.PremiumMessagingRegionsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client PremiumMessagingRegionsClient) ListComplete(cancel <-chan struct{}) (<-chan PremiumMessagingRegions, <-chan error) { + resultChan := make(chan PremiumMessagingRegions) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go index 9d52011dd..9c62f023f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/queues.go @@ -14,9 +14,8 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -40,14 +39,11 @@ func NewQueuesClientWithBaseURI(baseURI string, subscriptionID string) QueuesCli return QueuesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a Service Bus queue. This operation is -// idempotent. +// CreateOrUpdate creates or updates a Service Bus queue. This operation is idempotent. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. parameters is parameters supplied to create or update a queue -// resource. -func (client QueuesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, queueName string, parameters QueueCreateOrUpdateParameters) (result QueueResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. parameters is parameters supplied to create or update a queue resource. +func (client QueuesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, queueName string, parameters SBQueue) (result SBQueue, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -56,10 +52,7 @@ func (client QueuesClient) CreateOrUpdate(resourceGroupName string, namespaceNam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "CreateOrUpdate") } @@ -85,7 +78,7 @@ func (client QueuesClient) CreateOrUpdate(resourceGroupName string, namespaceNam } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client QueuesClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, queueName string, parameters QueueCreateOrUpdateParameters) (*http.Request, error) { +func (client QueuesClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, queueName string, parameters SBQueue) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "queueName": autorest.Encode("path", queueName), @@ -93,7 +86,7 @@ func (client QueuesClient) CreateOrUpdatePreparer(resourceGroupName string, name "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -116,7 +109,7 @@ func (client QueuesClient) CreateOrUpdateSender(req *http.Request) (*http.Respon // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client QueuesClient) CreateOrUpdateResponder(resp *http.Response) (result QueueResource, err error) { +func (client QueuesClient) CreateOrUpdateResponder(resp *http.Response) (result SBQueue, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -129,11 +122,10 @@ func (client QueuesClient) CreateOrUpdateResponder(resp *http.Response) (result // CreateOrUpdateAuthorizationRule creates an authorization rule for a queue. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. authorizationRuleName is the authorizationrule name. parameters is the -// shared access authorization rule. -func (client QueuesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. authorizationRuleName is the authorizationrule name. parameters is the shared access +// authorization rule. +func (client QueuesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SBAuthorizationRule) (result SBAuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -142,14 +134,9 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRule(resourceGroupName str Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "CreateOrUpdateAuthorizationRule") } @@ -175,7 +162,7 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRule(resourceGroupName str } // CreateOrUpdateAuthorizationRulePreparer prepares the CreateOrUpdateAuthorizationRule request. -func (client QueuesClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (*http.Request, error) { +func (client QueuesClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters SBAuthorizationRule) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -184,7 +171,7 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroup "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -207,7 +194,7 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRuleSender(req *http.Reque // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always // closes the http.Response Body. -func (client QueuesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client QueuesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -220,9 +207,8 @@ func (client QueuesClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.R // Delete deletes a queue from the specified namespace in a resource group. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. func (client QueuesClient) Delete(resourceGroupName string, namespaceName string, queueName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -232,8 +218,7 @@ func (client QueuesClient) Delete(resourceGroupName string, namespaceName string Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "Delete") } @@ -267,7 +252,7 @@ func (client QueuesClient) DeletePreparer(resourceGroupName string, namespaceNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -300,9 +285,8 @@ func (client QueuesClient) DeleteResponder(resp *http.Response) (result autorest // DeleteAuthorizationRule deletes a queue authorization rule. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. authorizationRuleName is the authorizationrule name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. authorizationRuleName is the authorizationrule name. func (client QueuesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -312,11 +296,9 @@ func (client QueuesClient) DeleteAuthorizationRule(resourceGroupName string, nam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "DeleteAuthorizationRule") } @@ -351,7 +333,7 @@ func (client QueuesClient) DeleteAuthorizationRulePreparer(resourceGroupName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -384,10 +366,9 @@ func (client QueuesClient) DeleteAuthorizationRuleResponder(resp *http.Response) // Get returns a description for the specified queue. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. -func (client QueuesClient) Get(resourceGroupName string, namespaceName string, queueName string) (result QueueResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. +func (client QueuesClient) Get(resourceGroupName string, namespaceName string, queueName string) (result SBQueue, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -396,8 +377,7 @@ func (client QueuesClient) Get(resourceGroupName string, namespaceName string, q Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "Get") } @@ -431,7 +411,7 @@ func (client QueuesClient) GetPreparer(resourceGroupName string, namespaceName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -452,7 +432,7 @@ func (client QueuesClient) GetSender(req *http.Request) (*http.Response, error) // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client QueuesClient) GetResponder(resp *http.Response) (result QueueResource, err error) { +func (client QueuesClient) GetResponder(resp *http.Response) (result SBQueue, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -465,10 +445,9 @@ func (client QueuesClient) GetResponder(resp *http.Response) (result QueueResour // GetAuthorizationRule gets an authorization rule for a queue by rule name. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. authorizationRuleName is the authorizationrule name. -func (client QueuesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. authorizationRuleName is the authorizationrule name. +func (client QueuesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result SBAuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -477,11 +456,9 @@ func (client QueuesClient) GetAuthorizationRule(resourceGroupName string, namesp Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "GetAuthorizationRule") } @@ -516,7 +493,7 @@ func (client QueuesClient) GetAuthorizationRulePreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -537,7 +514,7 @@ func (client QueuesClient) GetAuthorizationRuleSender(req *http.Request) (*http. // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always // closes the http.Response Body. -func (client QueuesClient) GetAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client QueuesClient) GetAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -548,112 +525,11 @@ func (client QueuesClient) GetAuthorizationRuleResponder(resp *http.Response) (r return } -// ListAll gets the queues within a namespace. -// -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name -func (client QueuesClient) ListAll(resourceGroupName string, namespaceName string) (result QueueListResult, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: namespaceName, - Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "ListAll") - } - - req, err := client.ListAllPreparer(resourceGroupName, namespaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAll", resp, "Failure sending request") - return - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAll", resp, "Failure responding to request") - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client QueuesClient) ListAllPreparer(resourceGroupName string, namespaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "namespaceName": autorest.Encode("path", namespaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client QueuesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client QueuesClient) ListAllResponder(resp *http.Response) (result QueueListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAllNextResults retrieves the next set of results, if any. -func (client QueuesClient) ListAllNextResults(lastResults QueueListResult) (result QueueListResult, err error) { - req, err := lastResults.QueueListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAll", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAll", resp, "Failure sending next results request") - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAll", resp, "Failure responding to next results request") - } - - return -} - // ListAuthorizationRules gets all authorization rules for a queue. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. -func (client QueuesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, queueName string) (result SharedAccessAuthorizationRuleListResult, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. +func (client QueuesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, queueName string) (result SBAuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -662,8 +538,7 @@ func (client QueuesClient) ListAuthorizationRules(resourceGroupName string, name Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "ListAuthorizationRules") } @@ -697,7 +572,7 @@ func (client QueuesClient) ListAuthorizationRulesPreparer(resourceGroupName stri "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -718,7 +593,7 @@ func (client QueuesClient) ListAuthorizationRulesSender(req *http.Request) (*htt // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always // closes the http.Response Body. -func (client QueuesClient) ListAuthorizationRulesResponder(resp *http.Response) (result SharedAccessAuthorizationRuleListResult, err error) { +func (client QueuesClient) ListAuthorizationRulesResponder(resp *http.Response) (result SBAuthorizationRuleListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -730,8 +605,8 @@ func (client QueuesClient) ListAuthorizationRulesResponder(resp *http.Response) } // ListAuthorizationRulesNextResults retrieves the next set of results, if any. -func (client QueuesClient) ListAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) { - req, err := lastResults.SharedAccessAuthorizationRuleListResultPreparer() +func (client QueuesClient) ListAuthorizationRulesNextResults(lastResults SBAuthorizationRuleListResult) (result SBAuthorizationRuleListResult, err error) { + req, err := lastResults.SBAuthorizationRuleListResultPreparer() if err != nil { return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListAuthorizationRules", nil, "Failure preparing next results request") } @@ -753,12 +628,200 @@ func (client QueuesClient) ListAuthorizationRulesNextResults(lastResults SharedA return } +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client QueuesClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, queueName string, cancel <-chan struct{}) (<-chan SBAuthorizationRule, <-chan error) { + resultChan := make(chan SBAuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, queueName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByNamespace gets the queues within a namespace. +// +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +func (client QueuesClient) ListByNamespace(resourceGroupName string, namespaceName string) (result SBQueueListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "ListByNamespace") + } + + req, err := client.ListByNamespacePreparer(resourceGroupName, namespaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", resp, "Failure sending request") + return + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", resp, "Failure responding to request") + } + + return +} + +// ListByNamespacePreparer prepares the ListByNamespace request. +func (client QueuesClient) ListByNamespacePreparer(resourceGroupName string, namespaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/queues", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByNamespaceSender sends the ListByNamespace request. The method will close the +// http.Response Body if it receives an error. +func (client QueuesClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByNamespaceResponder handles the response to the ListByNamespace request. The method always +// closes the http.Response Body. +func (client QueuesClient) ListByNamespaceResponder(resp *http.Response) (result SBQueueListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByNamespaceNextResults retrieves the next set of results, if any. +func (client QueuesClient) ListByNamespaceNextResults(lastResults SBQueueListResult) (result SBQueueListResult, err error) { + req, err := lastResults.SBQueueListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", resp, "Failure sending next results request") + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.QueuesClient", "ListByNamespace", resp, "Failure responding to next results request") + } + + return +} + +// ListByNamespaceComplete gets all elements from the list without paging. +func (client QueuesClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan SBQueue, <-chan error) { + resultChan := make(chan SBQueue) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByNamespace(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByNamespaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListKeys primary and secondary connection strings to the queue. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. authorizationRuleName is the authorizationrule name. -func (client QueuesClient) ListKeys(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result ResourceListKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. authorizationRuleName is the authorizationrule name. +func (client QueuesClient) ListKeys(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -767,11 +830,9 @@ func (client QueuesClient) ListKeys(resourceGroupName string, namespaceName stri Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "ListKeys") } @@ -806,7 +867,7 @@ func (client QueuesClient) ListKeysPreparer(resourceGroupName string, namespaceN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -827,7 +888,7 @@ func (client QueuesClient) ListKeysSender(req *http.Request) (*http.Response, er // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client QueuesClient) ListKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client QueuesClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -838,14 +899,12 @@ func (client QueuesClient) ListKeysResponder(resp *http.Response) (result Resour return } -// RegenerateKeys regenerates the primary or secondary connection strings to -// the queue. +// RegenerateKeys regenerates the primary or secondary connection strings to the queue. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name queueName is the queue -// name. authorizationRuleName is the authorizationrule name. parameters is -// parameters supplied to regenerate the authorization rule. -func (client QueuesClient) RegenerateKeys(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// queueName is the queue name. authorizationRuleName is the authorizationrule name. parameters is parameters supplied +// to regenerate the authorization rule. +func (client QueuesClient) RegenerateKeys(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -854,11 +913,9 @@ func (client QueuesClient) RegenerateKeys(resourceGroupName string, namespaceNam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: queueName, - Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "queueName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.QueuesClient", "RegenerateKeys") } @@ -884,7 +941,7 @@ func (client QueuesClient) RegenerateKeys(resourceGroupName string, namespaceNam } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client QueuesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client QueuesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, queueName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -893,7 +950,7 @@ func (client QueuesClient) RegenerateKeysPreparer(resourceGroupName string, name "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -916,7 +973,7 @@ func (client QueuesClient) RegenerateKeysSender(req *http.Request) (*http.Respon // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client QueuesClient) RegenerateKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client QueuesClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/regions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/regions.go new file mode 100644 index 000000000..a3ee88beb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/regions.go @@ -0,0 +1,179 @@ +package servicebus + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// RegionsClient is the azure Service Bus client +type RegionsClient struct { + ManagementClient +} + +// NewRegionsClient creates an instance of the RegionsClient client. +func NewRegionsClient(subscriptionID string) RegionsClient { + return NewRegionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRegionsClientWithBaseURI creates an instance of the RegionsClient client. +func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsClient { + return RegionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListBySku gets the available Regions for a given sku +// +// sku is the sku type. +func (client RegionsClient) ListBySku(sku string) (result PremiumMessagingRegionsListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: sku, + Constraints: []validation.Constraint{{Target: "sku", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.RegionsClient", "ListBySku") + } + + req, err := client.ListBySkuPreparer(sku) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySkuSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", resp, "Failure sending request") + return + } + + result, err = client.ListBySkuResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", resp, "Failure responding to request") + } + + return +} + +// ListBySkuPreparer prepares the ListBySku request. +func (client RegionsClient) ListBySkuPreparer(sku string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "sku": autorest.Encode("path", sku), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/sku/{sku}/regions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListBySkuSender sends the ListBySku request. The method will close the +// http.Response Body if it receives an error. +func (client RegionsClient) ListBySkuSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListBySkuResponder handles the response to the ListBySku request. The method always +// closes the http.Response Body. +func (client RegionsClient) ListBySkuResponder(resp *http.Response) (result PremiumMessagingRegionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySkuNextResults retrieves the next set of results, if any. +func (client RegionsClient) ListBySkuNextResults(lastResults PremiumMessagingRegionsListResult) (result PremiumMessagingRegionsListResult, err error) { + req, err := lastResults.PremiumMessagingRegionsListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListBySkuSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", resp, "Failure sending next results request") + } + + result, err = client.ListBySkuResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RegionsClient", "ListBySku", resp, "Failure responding to next results request") + } + + return +} + +// ListBySkuComplete gets all elements from the list without paging. +func (client RegionsClient) ListBySkuComplete(sku string, cancel <-chan struct{}) (<-chan PremiumMessagingRegions, <-chan error) { + resultChan := make(chan PremiumMessagingRegions) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySku(sku) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySkuNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/rules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/rules.go new file mode 100644 index 000000000..b00e8e3f9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/rules.go @@ -0,0 +1,448 @@ +package servicebus + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// RulesClient is the azure Service Bus client +type RulesClient struct { + ManagementClient +} + +// NewRulesClient creates an instance of the RulesClient client. +func NewRulesClient(subscriptionID string) RulesClient { + return NewRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRulesClientWithBaseURI creates an instance of the RulesClient client. +func NewRulesClientWithBaseURI(baseURI string, subscriptionID string) RulesClient { + return RulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a new rule and updates an existing rule +// +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. subscriptionName is the subscription name. ruleName is the rule name. parameters is +// parameters supplied to create a rule. +func (client RulesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string, parameters Rule) (result Rule, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, + {TargetValue: topicName, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: subscriptionName, + Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: ruleName, + Constraints: []validation.Constraint{{Target: "ruleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.RulesClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client RulesClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string, parameters Rule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "subscriptionName": autorest.Encode("path", subscriptionName), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client RulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client RulesClient) CreateOrUpdateResponder(resp *http.Response) (result Rule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an existing rule. +// +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. subscriptionName is the subscription name. ruleName is the rule name. +func (client RulesClient) Delete(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, + {TargetValue: topicName, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: subscriptionName, + Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: ruleName, + Constraints: []validation.Constraint{{Target: "ruleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.RulesClient", "Delete") + } + + req, err := client.DeletePreparer(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client RulesClient) DeletePreparer(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "subscriptionName": autorest.Encode("path", subscriptionName), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client RulesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client RulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusNoContent, http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieves the description for the specified rule. +// +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. subscriptionName is the subscription name. ruleName is the rule name. +func (client RulesClient) Get(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) (result Rule, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, + {TargetValue: topicName, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: subscriptionName, + Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: ruleName, + Constraints: []validation.Constraint{{Target: "ruleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.RulesClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, namespaceName, topicName, subscriptionName, ruleName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RulesClient) GetPreparer(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, ruleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "ruleName": autorest.Encode("path", ruleName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "subscriptionName": autorest.Encode("path", subscriptionName), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules/{ruleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RulesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RulesClient) GetResponder(resp *http.Response) (result Rule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscriptions list all the rules within given topic-subscription +// +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. subscriptionName is the subscription name. +func (client RulesClient) ListBySubscriptions(resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result RuleListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, + {TargetValue: topicName, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: subscriptionName, + Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.RulesClient", "ListBySubscriptions") + } + + req, err := client.ListBySubscriptionsPreparer(resourceGroupName, namespaceName, topicName, subscriptionName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "ListBySubscriptions", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "ListBySubscriptions", resp, "Failure sending request") + return + } + + result, err = client.ListBySubscriptionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "ListBySubscriptions", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionsPreparer prepares the ListBySubscriptions request. +func (client RulesClient) ListBySubscriptionsPreparer(resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "subscriptionName": autorest.Encode("path", subscriptionName), + "topicName": autorest.Encode("path", topicName), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics/{topicName}/subscriptions/{subscriptionName}/rules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListBySubscriptionsSender sends the ListBySubscriptions request. The method will close the +// http.Response Body if it receives an error. +func (client RulesClient) ListBySubscriptionsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListBySubscriptionsResponder handles the response to the ListBySubscriptions request. The method always +// closes the http.Response Body. +func (client RulesClient) ListBySubscriptionsResponder(resp *http.Response) (result RuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscriptionsNextResults retrieves the next set of results, if any. +func (client RulesClient) ListBySubscriptionsNextResults(lastResults RuleListResult) (result RuleListResult, err error) { + req, err := lastResults.RuleListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.RulesClient", "ListBySubscriptions", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListBySubscriptionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.RulesClient", "ListBySubscriptions", resp, "Failure sending next results request") + } + + result, err = client.ListBySubscriptionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.RulesClient", "ListBySubscriptions", resp, "Failure responding to next results request") + } + + return +} + +// ListBySubscriptionsComplete gets all elements from the list without paging. +func (client RulesClient) ListBySubscriptionsComplete(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, cancel <-chan struct{}) (<-chan Rule, <-chan error) { + resultChan := make(chan Rule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySubscriptions(resourceGroupName, namespaceName, topicName, subscriptionName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySubscriptionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go index 83799ec0b..4ec7658e4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/subscriptions.go @@ -14,9 +14,8 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,25 +29,22 @@ type SubscriptionsClient struct { ManagementClient } -// NewSubscriptionsClient creates an instance of the SubscriptionsClient -// client. +// NewSubscriptionsClient creates an instance of the SubscriptionsClient client. func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the -// SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates a topic subscription. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. subscriptionName is the subscription name. parameters is parameters -// supplied to create a subscription resource. -func (client SubscriptionsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, parameters SubscriptionCreateOrUpdateParameters) (result SubscriptionResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. subscriptionName is the subscription name. parameters is parameters supplied to create +// a subscription resource. +func (client SubscriptionsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, parameters SBSubscription) (result SBSubscription, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -57,13 +53,9 @@ func (client SubscriptionsClient) CreateOrUpdate(resourceGroupName string, names Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: subscriptionName, - Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.SubscriptionsClient", "CreateOrUpdate") } @@ -89,7 +81,7 @@ func (client SubscriptionsClient) CreateOrUpdate(resourceGroupName string, names } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client SubscriptionsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, parameters SubscriptionCreateOrUpdateParameters) (*http.Request, error) { +func (client SubscriptionsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, topicName string, subscriptionName string, parameters SBSubscription) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -98,7 +90,7 @@ func (client SubscriptionsClient) CreateOrUpdatePreparer(resourceGroupName strin "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -121,7 +113,7 @@ func (client SubscriptionsClient) CreateOrUpdateSender(req *http.Request) (*http // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client SubscriptionsClient) CreateOrUpdateResponder(resp *http.Response) (result SubscriptionResource, err error) { +func (client SubscriptionsClient) CreateOrUpdateResponder(resp *http.Response) (result SBSubscription, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -134,9 +126,8 @@ func (client SubscriptionsClient) CreateOrUpdateResponder(resp *http.Response) ( // Delete deletes a subscription from the specified topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. subscriptionName is the subscription name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. subscriptionName is the subscription name. func (client SubscriptionsClient) Delete(resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -146,11 +137,9 @@ func (client SubscriptionsClient) Delete(resourceGroupName string, namespaceName Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: subscriptionName, - Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.SubscriptionsClient", "Delete") } @@ -185,7 +174,7 @@ func (client SubscriptionsClient) DeletePreparer(resourceGroupName string, names "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -218,10 +207,9 @@ func (client SubscriptionsClient) DeleteResponder(resp *http.Response) (result a // Get returns a subscription description for the specified topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. subscriptionName is the subscription name. -func (client SubscriptionsClient) Get(resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result SubscriptionResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. subscriptionName is the subscription name. +func (client SubscriptionsClient) Get(resourceGroupName string, namespaceName string, topicName string, subscriptionName string) (result SBSubscription, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -230,11 +218,9 @@ func (client SubscriptionsClient) Get(resourceGroupName string, namespaceName st Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: subscriptionName, - Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "subscriptionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.SubscriptionsClient", "Get") } @@ -269,7 +255,7 @@ func (client SubscriptionsClient) GetPreparer(resourceGroupName string, namespac "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -290,7 +276,7 @@ func (client SubscriptionsClient) GetSender(req *http.Request) (*http.Response, // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client SubscriptionsClient) GetResponder(resp *http.Response) (result SubscriptionResource, err error) { +func (client SubscriptionsClient) GetResponder(resp *http.Response) (result SBSubscription, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -301,12 +287,11 @@ func (client SubscriptionsClient) GetResponder(resp *http.Response) (result Subs return } -// ListAll list all the subscriptions under a specified topic. +// ListByTopic list all the subscriptions under a specified topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. -func (client SubscriptionsClient) ListAll(resourceGroupName string, namespaceName string, topicName string) (result SubscriptionListResult, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. +func (client SubscriptionsClient) ListByTopic(resourceGroupName string, namespaceName string, topicName string) (result SBSubscriptionListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -315,34 +300,33 @@ func (client SubscriptionsClient) ListAll(resourceGroupName string, namespaceNam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "servicebus.SubscriptionsClient", "ListAll") + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.SubscriptionsClient", "ListByTopic") } - req, err := client.ListAllPreparer(resourceGroupName, namespaceName, topicName) + req, err := client.ListByTopicPreparer(resourceGroupName, namespaceName, topicName) if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListAll", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListByTopic", nil, "Failure preparing request") return } - resp, err := client.ListAllSender(req) + resp, err := client.ListByTopicSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListAll", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListByTopic", resp, "Failure sending request") return } - result, err = client.ListAllResponder(resp) + result, err = client.ListByTopicResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListAll", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListByTopic", resp, "Failure responding to request") } return } -// ListAllPreparer prepares the ListAll request. -func (client SubscriptionsClient) ListAllPreparer(resourceGroupName string, namespaceName string, topicName string) (*http.Request, error) { +// ListByTopicPreparer prepares the ListByTopic request. +func (client SubscriptionsClient) ListByTopicPreparer(resourceGroupName string, namespaceName string, topicName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -350,7 +334,7 @@ func (client SubscriptionsClient) ListAllPreparer(resourceGroupName string, name "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -363,15 +347,15 @@ func (client SubscriptionsClient) ListAllPreparer(resourceGroupName string, name return preparer.Prepare(&http.Request{}) } -// ListAllSender sends the ListAll request. The method will close the +// ListByTopicSender sends the ListByTopic request. The method will close the // http.Response Body if it receives an error. -func (client SubscriptionsClient) ListAllSender(req *http.Request) (*http.Response, error) { +func (client SubscriptionsClient) ListByTopicSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListAllResponder handles the response to the ListAll request. The method always +// ListByTopicResponder handles the response to the ListByTopic request. The method always // closes the http.Response Body. -func (client SubscriptionsClient) ListAllResponder(resp *http.Response) (result SubscriptionListResult, err error) { +func (client SubscriptionsClient) ListByTopicResponder(resp *http.Response) (result SBSubscriptionListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -382,26 +366,71 @@ func (client SubscriptionsClient) ListAllResponder(resp *http.Response) (result return } -// ListAllNextResults retrieves the next set of results, if any. -func (client SubscriptionsClient) ListAllNextResults(lastResults SubscriptionListResult) (result SubscriptionListResult, err error) { - req, err := lastResults.SubscriptionListResultPreparer() +// ListByTopicNextResults retrieves the next set of results, if any. +func (client SubscriptionsClient) ListByTopicNextResults(lastResults SBSubscriptionListResult) (result SBSubscriptionListResult, err error) { + req, err := lastResults.SBSubscriptionListResultPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListAll", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListByTopic", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListAllSender(req) + resp, err := client.ListByTopicSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListAll", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListByTopic", resp, "Failure sending next results request") } - result, err = client.ListAllResponder(resp) + result, err = client.ListByTopicResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListAll", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "servicebus.SubscriptionsClient", "ListByTopic", resp, "Failure responding to next results request") } return } + +// ListByTopicComplete gets all elements from the list without paging. +func (client SubscriptionsClient) ListByTopicComplete(resourceGroupName string, namespaceName string, topicName string, cancel <-chan struct{}) (<-chan SBSubscription, <-chan error) { + resultChan := make(chan SBSubscription) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByTopic(resourceGroupName, namespaceName, topicName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByTopicNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go index 02938927e..5fb582f66 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/topics.go @@ -14,9 +14,8 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -42,10 +41,9 @@ func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsCli // CreateOrUpdate creates a topic in the specified namespace. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. parameters is parameters supplied to create a topic resource. -func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, parameters TopicCreateOrUpdateParameters) (result TopicResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. parameters is parameters supplied to create a topic resource. +func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, topicName string, parameters SBTopic) (result SBTopic, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -54,10 +52,7 @@ func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceNam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "CreateOrUpdate") } @@ -83,7 +78,7 @@ func (client TopicsClient) CreateOrUpdate(resourceGroupName string, namespaceNam } // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, topicName string, parameters TopicCreateOrUpdateParameters) (*http.Request, error) { +func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, namespaceName string, topicName string, parameters SBTopic) (*http.Request, error) { pathParameters := map[string]interface{}{ "namespaceName": autorest.Encode("path", namespaceName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -91,7 +86,7 @@ func (client TopicsClient) CreateOrUpdatePreparer(resourceGroupName string, name "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -114,7 +109,7 @@ func (client TopicsClient) CreateOrUpdateSender(req *http.Request) (*http.Respon // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always // closes the http.Response Body. -func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result TopicResource, err error) { +func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result SBTopic, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -125,14 +120,12 @@ func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// CreateOrUpdateAuthorizationRule creates an authorizatio rule for the -// specified topic. +// CreateOrUpdateAuthorizationRule creates an authorizatio rule for the specified topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. authorizationRuleName is the authorizationrule name. parameters is the -// shared access authorization rule. -func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. authorizationRuleName is the authorizationrule name. parameters is the shared access +// authorization rule. +func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SBAuthorizationRule) (result SBAuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -141,14 +134,9 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName str Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: parameters, - Constraints: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.SharedAccessAuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "CreateOrUpdateAuthorizationRule") } @@ -174,7 +162,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRule(resourceGroupName str } // CreateOrUpdateAuthorizationRulePreparer prepares the CreateOrUpdateAuthorizationRule request. -func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (*http.Request, error) { +func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters SBAuthorizationRule) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -183,7 +171,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRulePreparer(resourceGroup "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -206,7 +194,7 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRuleSender(req *http.Reque // CreateOrUpdateAuthorizationRuleResponder handles the response to the CreateOrUpdateAuthorizationRule request. The method always // closes the http.Response Body. -func (client TopicsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client TopicsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -219,9 +207,8 @@ func (client TopicsClient) CreateOrUpdateAuthorizationRuleResponder(resp *http.R // Delete deletes a topic from the specified namespace and resource group. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. func (client TopicsClient) Delete(resourceGroupName string, namespaceName string, topicName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -231,8 +218,7 @@ func (client TopicsClient) Delete(resourceGroupName string, namespaceName string Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "Delete") } @@ -266,7 +252,7 @@ func (client TopicsClient) DeletePreparer(resourceGroupName string, namespaceNam "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -299,9 +285,8 @@ func (client TopicsClient) DeleteResponder(resp *http.Response) (result autorest // DeleteAuthorizationRule deletes a topic authorization rule. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. authorizationRuleName is the authorizationrule name. +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. authorizationRuleName is the authorizationrule name. func (client TopicsClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -311,11 +296,9 @@ func (client TopicsClient) DeleteAuthorizationRule(resourceGroupName string, nam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "DeleteAuthorizationRule") } @@ -350,7 +333,7 @@ func (client TopicsClient) DeleteAuthorizationRulePreparer(resourceGroupName str "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -383,10 +366,9 @@ func (client TopicsClient) DeleteAuthorizationRuleResponder(resp *http.Response) // Get returns a description for the specified topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. -func (client TopicsClient) Get(resourceGroupName string, namespaceName string, topicName string) (result TopicResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. +func (client TopicsClient) Get(resourceGroupName string, namespaceName string, topicName string) (result SBTopic, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -395,8 +377,7 @@ func (client TopicsClient) Get(resourceGroupName string, namespaceName string, t Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "Get") } @@ -430,7 +411,7 @@ func (client TopicsClient) GetPreparer(resourceGroupName string, namespaceName s "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -451,7 +432,7 @@ func (client TopicsClient) GetSender(req *http.Request) (*http.Response, error) // GetResponder handles the response to the Get request. The method always // closes the http.Response Body. -func (client TopicsClient) GetResponder(resp *http.Response) (result TopicResource, err error) { +func (client TopicsClient) GetResponder(resp *http.Response) (result SBTopic, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -464,10 +445,9 @@ func (client TopicsClient) GetResponder(resp *http.Response) (result TopicResour // GetAuthorizationRule returns the specified authorization rule. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. authorizationRuleName is the authorizationrule name. -func (client TopicsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. authorizationRuleName is the authorizationrule name. +func (client TopicsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result SBAuthorizationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -476,11 +456,9 @@ func (client TopicsClient) GetAuthorizationRule(resourceGroupName string, namesp Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "GetAuthorizationRule") } @@ -515,7 +493,7 @@ func (client TopicsClient) GetAuthorizationRulePreparer(resourceGroupName string "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -536,7 +514,7 @@ func (client TopicsClient) GetAuthorizationRuleSender(req *http.Request) (*http. // GetAuthorizationRuleResponder handles the response to the GetAuthorizationRule request. The method always // closes the http.Response Body. -func (client TopicsClient) GetAuthorizationRuleResponder(resp *http.Response) (result SharedAccessAuthorizationRuleResource, err error) { +func (client TopicsClient) GetAuthorizationRuleResponder(resp *http.Response) (result SBAuthorizationRule, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -547,112 +525,11 @@ func (client TopicsClient) GetAuthorizationRuleResponder(resp *http.Response) (r return } -// ListAll gets all the topics in a namespace. -// -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name -func (client TopicsClient) ListAll(resourceGroupName string, namespaceName string) (result TopicListResult, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, - {TargetValue: namespaceName, - Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListAll") - } - - req, err := client.ListAllPreparer(resourceGroupName, namespaceName) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure sending request") - return - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure responding to request") - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client TopicsClient) ListAllPreparer(resourceGroupName string, namespaceName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "namespaceName": autorest.Encode("path", namespaceName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client TopicsClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client TopicsClient) ListAllResponder(resp *http.Response) (result TopicListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAllNextResults retrieves the next set of results, if any. -func (client TopicsClient) ListAllNextResults(lastResults TopicListResult) (result TopicListResult, err error) { - req, err := lastResults.TopicListResultPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure sending next results request") - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAll", resp, "Failure responding to next results request") - } - - return -} - // ListAuthorizationRules gets authorization rules for a topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. -func (client TopicsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, topicName string) (result SharedAccessAuthorizationRuleListResult, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. +func (client TopicsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, topicName string) (result SBAuthorizationRuleListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -661,8 +538,7 @@ func (client TopicsClient) ListAuthorizationRules(resourceGroupName string, name Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListAuthorizationRules") } @@ -696,7 +572,7 @@ func (client TopicsClient) ListAuthorizationRulesPreparer(resourceGroupName stri "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -717,7 +593,7 @@ func (client TopicsClient) ListAuthorizationRulesSender(req *http.Request) (*htt // ListAuthorizationRulesResponder handles the response to the ListAuthorizationRules request. The method always // closes the http.Response Body. -func (client TopicsClient) ListAuthorizationRulesResponder(resp *http.Response) (result SharedAccessAuthorizationRuleListResult, err error) { +func (client TopicsClient) ListAuthorizationRulesResponder(resp *http.Response) (result SBAuthorizationRuleListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -729,8 +605,8 @@ func (client TopicsClient) ListAuthorizationRulesResponder(resp *http.Response) } // ListAuthorizationRulesNextResults retrieves the next set of results, if any. -func (client TopicsClient) ListAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) { - req, err := lastResults.SharedAccessAuthorizationRuleListResultPreparer() +func (client TopicsClient) ListAuthorizationRulesNextResults(lastResults SBAuthorizationRuleListResult) (result SBAuthorizationRuleListResult, err error) { + req, err := lastResults.SBAuthorizationRuleListResultPreparer() if err != nil { return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListAuthorizationRules", nil, "Failure preparing next results request") } @@ -752,12 +628,200 @@ func (client TopicsClient) ListAuthorizationRulesNextResults(lastResults SharedA return } +// ListAuthorizationRulesComplete gets all elements from the list without paging. +func (client TopicsClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, topicName string, cancel <-chan struct{}) (<-chan SBAuthorizationRule, <-chan error) { + resultChan := make(chan SBAuthorizationRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, topicName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAuthorizationRulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByNamespace gets all the topics in a namespace. +// +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +func (client TopicsClient) ListByNamespace(resourceGroupName string, namespaceName string) (result SBTopicListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + {TargetValue: namespaceName, + Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, + {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListByNamespace") + } + + req, err := client.ListByNamespacePreparer(resourceGroupName, namespaceName) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", nil, "Failure preparing request") + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure sending request") + return + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure responding to request") + } + + return +} + +// ListByNamespacePreparer prepares the ListByNamespace request. +func (client TopicsClient) ListByNamespacePreparer(resourceGroupName string, namespaceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "namespaceName": autorest.Encode("path", namespaceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}/topics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByNamespaceSender sends the ListByNamespace request. The method will close the +// http.Response Body if it receives an error. +func (client TopicsClient) ListByNamespaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByNamespaceResponder handles the response to the ListByNamespace request. The method always +// closes the http.Response Body. +func (client TopicsClient) ListByNamespaceResponder(resp *http.Response) (result SBTopicListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByNamespaceNextResults retrieves the next set of results, if any. +func (client TopicsClient) ListByNamespaceNextResults(lastResults SBTopicListResult) (result SBTopicListResult, err error) { + req, err := lastResults.SBTopicListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByNamespaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure sending next results request") + } + + result, err = client.ListByNamespaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicebus.TopicsClient", "ListByNamespace", resp, "Failure responding to next results request") + } + + return +} + +// ListByNamespaceComplete gets all elements from the list without paging. +func (client TopicsClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan SBTopic, <-chan error) { + resultChan := make(chan SBTopic) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByNamespace(resourceGroupName, namespaceName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByNamespaceNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListKeys gets the primary and secondary connection strings for the topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. authorizationRuleName is the authorizationrule name. -func (client TopicsClient) ListKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result ResourceListKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. authorizationRuleName is the authorizationrule name. +func (client TopicsClient) ListKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -766,11 +830,9 @@ func (client TopicsClient) ListKeys(resourceGroupName string, namespaceName stri Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "ListKeys") } @@ -805,7 +867,7 @@ func (client TopicsClient) ListKeysPreparer(resourceGroupName string, namespaceN "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -826,7 +888,7 @@ func (client TopicsClient) ListKeysSender(req *http.Request) (*http.Response, er // ListKeysResponder handles the response to the ListKeys request. The method always // closes the http.Response Body. -func (client TopicsClient) ListKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client TopicsClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -837,14 +899,12 @@ func (client TopicsClient) ListKeysResponder(resp *http.Response) (result Resour return } -// RegenerateKeys regenerates primary or secondary connection strings for the -// topic. +// RegenerateKeys regenerates primary or secondary connection strings for the topic. // -// resourceGroupName is name of the Resource group within the Azure -// subscription. namespaceName is the namespace name topicName is the topic -// name. authorizationRuleName is the authorizationrule name. parameters is -// parameters supplied to regenerate the authorization rule. -func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result ResourceListKeys, err error) { +// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name +// topicName is the topic name. authorizationRuleName is the authorizationrule name. parameters is parameters supplied +// to regenerate the authorization rule. +func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, @@ -853,11 +913,9 @@ func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceNam Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}}, {TargetValue: topicName, - Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, + Constraints: []validation.Constraint{{Target: "topicName", Name: validation.MinLength, Rule: 1, Chain: nil}}}, {TargetValue: authorizationRuleName, - Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil}, - {Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { + Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "servicebus.TopicsClient", "RegenerateKeys") } @@ -883,7 +941,7 @@ func (client TopicsClient) RegenerateKeys(resourceGroupName string, namespaceNam } // RegenerateKeysPreparer prepares the RegenerateKeys request. -func (client TopicsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) { +func (client TopicsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, topicName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) { pathParameters := map[string]interface{}{ "authorizationRuleName": autorest.Encode("path", authorizationRuleName), "namespaceName": autorest.Encode("path", namespaceName), @@ -892,7 +950,7 @@ func (client TopicsClient) RegenerateKeysPreparer(resourceGroupName string, name "topicName": autorest.Encode("path", topicName), } - const APIVersion = "2015-08-01" + const APIVersion = "2017-04-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -915,7 +973,7 @@ func (client TopicsClient) RegenerateKeysSender(req *http.Request) (*http.Respon // RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always // closes the http.Response Body. -func (client TopicsClient) RegenerateKeysResponder(resp *http.Response) (result ResourceListKeys, err error) { +func (client TopicsClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) { err = autorest.Respond( resp, client.ByInspecting(), diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go index 49ea4cf44..1d881d275 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicebus/version.go @@ -14,15 +14,15 @@ package servicebus // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-servicebus/2017-04-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-servicebus/2017-04-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/client.go index 271143e26..9374223eb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/client.go @@ -1,5 +1,4 @@ -// Package servicefabric implements the Azure ARM Servicefabric service API -// version 2016-09-01. +// Package servicefabric implements the Azure ARM Servicefabric service API version 2016-09-01. // // package servicefabric @@ -18,9 +17,8 @@ package servicefabric // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusters.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusters.go index fda64c301..3e704e7b4 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusters.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusters.go @@ -14,9 +14,8 @@ package servicefabric // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// ClustersClient is the client for the Clusters methods of the Servicefabric -// service. +// ClustersClient is the client for the Clusters methods of the Servicefabric service. type ClustersClient struct { ManagementClient } @@ -36,19 +34,16 @@ func NewClustersClient(subscriptionID string) ClustersClient { return NewClustersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClustersClientWithBaseURI creates an instance of the ClustersClient -// client. +// NewClustersClientWithBaseURI creates an instance of the ClustersClient client. func NewClustersClientWithBaseURI(baseURI string, subscriptionID string) ClustersClient { return ClustersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Create create cluster resource This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Create create cluster resource This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group to which the resource -// belongs or get created clusterName is the name of the cluster resource -// parameters is put Request +// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the +// name of the cluster resource parameters is put Request func (client ClustersClient) Create(resourceGroupName string, clusterName string, parameters Cluster, cancel <-chan struct{}) (<-chan Cluster, <-chan error) { resultChan := make(chan Cluster, 1) errChan := make(chan error, 1) @@ -111,8 +106,10 @@ func (client ClustersClient) Create(resourceGroupName string, clusterName string var err error var result Cluster defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -183,8 +180,8 @@ func (client ClustersClient) CreateResponder(resp *http.Response) (result Cluste // Delete delete cluster resource // -// resourceGroupName is the name of the resource group to which the resource -// belongs or get created clusterName is the name of the cluster resource +// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the +// name of the cluster resource func (client ClustersClient) Delete(resourceGroupName string, clusterName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, clusterName) if err != nil { @@ -248,8 +245,8 @@ func (client ClustersClient) DeleteResponder(resp *http.Response) (result autore // Get get cluster resource // -// resourceGroupName is the name of the resource group to which the resource -// belongs or get created clusterName is the name of the cluster resource +// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the +// name of the cluster resource func (client ClustersClient) Get(resourceGroupName string, clusterName string) (result Cluster, err error) { req, err := client.GetPreparer(resourceGroupName, clusterName) if err != nil { @@ -397,10 +394,54 @@ func (client ClustersClient) ListNextResults(lastResults ClusterListResult) (res return } +// ListComplete gets all elements from the list without paging. +func (client ClustersClient) ListComplete(cancel <-chan struct{}) (<-chan Cluster, <-chan error) { + resultChan := make(chan Cluster) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup list cluster resource by resource group // -// resourceGroupName is the name of the resource group to which the resource -// belongs or get created +// resourceGroupName is the name of the resource group to which the resource belongs or get created func (client ClustersClient) ListByResourceGroup(resourceGroupName string) (result ClusterListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { @@ -486,14 +527,57 @@ func (client ClustersClient) ListByResourceGroupNextResults(lastResults ClusterL return } -// Update update cluster configuration This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ClustersClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Cluster, <-chan error) { + resultChan := make(chan Cluster) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update update cluster configuration This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group to which the resource -// belongs or get created clusterName is the name of the cluster resource -// parameters is the parameters which contains the property value and property -// name which used to update the cluster configuration +// resourceGroupName is the name of the resource group to which the resource belongs or get created clusterName is the +// name of the cluster resource parameters is the parameters which contains the property value and property name which +// used to update the cluster configuration func (client ClustersClient) Update(resourceGroupName string, clusterName string, parameters ClusterUpdateParameters, cancel <-chan struct{}) (<-chan Cluster, <-chan error) { resultChan := make(chan Cluster, 1) errChan := make(chan error, 1) @@ -501,8 +585,10 @@ func (client ClustersClient) Update(resourceGroupName string, clusterName string var err error var result Cluster defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusterversions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusterversions.go index 496d6f89b..aee8d09b1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusterversions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/clusterversions.go @@ -14,9 +14,8 @@ package servicefabric // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,31 +23,93 @@ import ( "net/http" ) -// ClusterVersionsClient is the client for the ClusterVersions methods of the -// Servicefabric service. +// ClusterVersionsClient is the client for the ClusterVersions methods of the Servicefabric service. type ClusterVersionsClient struct { ManagementClient } -// NewClusterVersionsClient creates an instance of the ClusterVersionsClient -// client. +// NewClusterVersionsClient creates an instance of the ClusterVersionsClient client. func NewClusterVersionsClient(subscriptionID string) ClusterVersionsClient { return NewClusterVersionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewClusterVersionsClientWithBaseURI creates an instance of the -// ClusterVersionsClient client. +// NewClusterVersionsClientWithBaseURI creates an instance of the ClusterVersionsClient client. func NewClusterVersionsClientWithBaseURI(baseURI string, subscriptionID string) ClusterVersionsClient { return ClusterVersionsClient{NewWithBaseURI(baseURI, subscriptionID)} } +// Get get cluster code versions by environment and version +// +// location is the location for the cluster code versions, this is different from cluster location environment is +// cluster operating system, the default means all clusterVersion is the cluster code version +func (client ClusterVersionsClient) Get(location string, environment string, clusterVersion string) (result ClusterCodeVersionsResult, err error) { + req, err := client.GetPreparer(location, environment, clusterVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ClusterVersionsClient) GetPreparer(location string, environment string, clusterVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterVersion": autorest.Encode("path", clusterVersion), + "environment": autorest.Encode("path", environment), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions/{clusterVersion}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ClusterVersionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ClusterVersionsClient) GetResponder(resp *http.Response) (result ClusterCodeVersionsResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // List list cluster code versions by location // -// location is the location for the cluster code versions, this is different -// from cluster location environment is cluster operating system, the default -// means all -func (client ClusterVersionsClient) List(location string, environment string) (result ClusterCodeVersionsListResult, err error) { - req, err := client.ListPreparer(location, environment) +// location is the location for the cluster code versions, this is different from cluster location +func (client ClusterVersionsClient) List(location string) (result ClusterCodeVersionsListResult, err error) { + req, err := client.ListPreparer(location) if err != nil { err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "List", nil, "Failure preparing request") return @@ -70,9 +131,8 @@ func (client ClusterVersionsClient) List(location string, environment string) (r } // ListPreparer prepares the List request. -func (client ClusterVersionsClient) ListPreparer(location string, environment string) (*http.Request, error) { +func (client ClusterVersionsClient) ListPreparer(location string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "environment": autorest.Encode("path", environment), "location": autorest.Encode("path", location), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } @@ -85,7 +145,7 @@ func (client ClusterVersionsClient) ListPreparer(location string, environment st preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -132,3 +192,318 @@ func (client ClusterVersionsClient) ListNextResults(lastResults ClusterCodeVersi return } + +// ListComplete gets all elements from the list without paging. +func (client ClusterVersionsClient) ListComplete(location string, cancel <-chan struct{}) (<-chan ClusterCodeVersionsResult, <-chan error) { + resultChan := make(chan ClusterCodeVersionsResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(location) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByEnvironment list cluster code versions by environment +// +// location is the location for the cluster code versions, this is different from cluster location environment is +// cluster operating system, the default means all +func (client ClusterVersionsClient) ListByEnvironment(location string, environment string) (result ClusterCodeVersionsListResult, err error) { + req, err := client.ListByEnvironmentPreparer(location, environment) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", nil, "Failure preparing request") + return + } + + resp, err := client.ListByEnvironmentSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure sending request") + return + } + + result, err = client.ListByEnvironmentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure responding to request") + } + + return +} + +// ListByEnvironmentPreparer prepares the ListByEnvironment request. +func (client ClusterVersionsClient) ListByEnvironmentPreparer(location string, environment string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "environment": autorest.Encode("path", environment), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/clusterVersions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByEnvironmentSender sends the ListByEnvironment request. The method will close the +// http.Response Body if it receives an error. +func (client ClusterVersionsClient) ListByEnvironmentSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByEnvironmentResponder handles the response to the ListByEnvironment request. The method always +// closes the http.Response Body. +func (client ClusterVersionsClient) ListByEnvironmentResponder(resp *http.Response) (result ClusterCodeVersionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByEnvironmentNextResults retrieves the next set of results, if any. +func (client ClusterVersionsClient) ListByEnvironmentNextResults(lastResults ClusterCodeVersionsListResult) (result ClusterCodeVersionsListResult, err error) { + req, err := lastResults.ClusterCodeVersionsListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByEnvironmentSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure sending next results request") + } + + result, err = client.ListByEnvironmentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByEnvironment", resp, "Failure responding to next results request") + } + + return +} + +// ListByEnvironmentComplete gets all elements from the list without paging. +func (client ClusterVersionsClient) ListByEnvironmentComplete(location string, environment string, cancel <-chan struct{}) (<-chan ClusterCodeVersionsResult, <-chan error) { + resultChan := make(chan ClusterCodeVersionsResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByEnvironment(location, environment) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByEnvironmentNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByVersion list cluster code versions by version +// +// location is the location for the cluster code versions, this is different from cluster location clusterVersion is +// the cluster code version +func (client ClusterVersionsClient) ListByVersion(location string, clusterVersion string) (result ClusterCodeVersionsListResult, err error) { + req, err := client.ListByVersionPreparer(location, clusterVersion) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", nil, "Failure preparing request") + return + } + + resp, err := client.ListByVersionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure sending request") + return + } + + result, err = client.ListByVersionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure responding to request") + } + + return +} + +// ListByVersionPreparer prepares the ListByVersion request. +func (client ClusterVersionsClient) ListByVersionPreparer(location string, clusterVersion string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "clusterVersion": autorest.Encode("path", clusterVersion), + "location": autorest.Encode("path", location), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-09-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/clusterVersions/{clusterVersion}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByVersionSender sends the ListByVersion request. The method will close the +// http.Response Body if it receives an error. +func (client ClusterVersionsClient) ListByVersionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByVersionResponder handles the response to the ListByVersion request. The method always +// closes the http.Response Body. +func (client ClusterVersionsClient) ListByVersionResponder(resp *http.Response) (result ClusterCodeVersionsListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByVersionNextResults retrieves the next set of results, if any. +func (client ClusterVersionsClient) ListByVersionNextResults(lastResults ClusterCodeVersionsListResult) (result ClusterCodeVersionsListResult, err error) { + req, err := lastResults.ClusterCodeVersionsListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByVersionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure sending next results request") + } + + result, err = client.ListByVersionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "servicefabric.ClusterVersionsClient", "ListByVersion", resp, "Failure responding to next results request") + } + + return +} + +// ListByVersionComplete gets all elements from the list without paging. +func (client ClusterVersionsClient) ListByVersionComplete(location string, clusterVersion string, cancel <-chan struct{}) (<-chan ClusterCodeVersionsResult, <-chan error) { + resultChan := make(chan ClusterCodeVersionsResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByVersion(location, clusterVersion) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByVersionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/models.go index 044756515..a48b9a843 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/models.go @@ -14,9 +14,8 @@ package servicefabric // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -34,22 +33,17 @@ const ( BaselineUpgrade ClusterState = "BaselineUpgrade" // Deploying specifies the deploying state for cluster state. Deploying ClusterState = "Deploying" - // EnforcingClusterVersion specifies the enforcing cluster version state - // for cluster state. + // EnforcingClusterVersion specifies the enforcing cluster version state for cluster state. EnforcingClusterVersion ClusterState = "EnforcingClusterVersion" // Ready specifies the ready state for cluster state. Ready ClusterState = "Ready" - // UpdatingInfrastructure specifies the updating infrastructure state for - // cluster state. + // UpdatingInfrastructure specifies the updating infrastructure state for cluster state. UpdatingInfrastructure ClusterState = "UpdatingInfrastructure" - // UpdatingUserCertificate specifies the updating user certificate state - // for cluster state. + // UpdatingUserCertificate specifies the updating user certificate state for cluster state. UpdatingUserCertificate ClusterState = "UpdatingUserCertificate" - // UpdatingUserConfiguration specifies the updating user configuration - // state for cluster state. + // UpdatingUserConfiguration specifies the updating user configuration state for cluster state. UpdatingUserConfiguration ClusterState = "UpdatingUserConfiguration" - // UpgradeServiceUnreachable specifies the upgrade service unreachable - // state for cluster state. + // UpgradeServiceUnreachable specifies the upgrade service unreachable state for cluster state. UpgradeServiceUnreachable ClusterState = "UpgradeServiceUnreachable" // WaitingForNodes specifies the waiting for nodes state for cluster state. WaitingForNodes ClusterState = "WaitingForNodes" @@ -95,14 +89,11 @@ const ( type ReliabilityLevel string const ( - // ReliabilityLevelBronze specifies the reliability level bronze state for - // reliability level. + // ReliabilityLevelBronze specifies the reliability level bronze state for reliability level. ReliabilityLevelBronze ReliabilityLevel = "Bronze" - // ReliabilityLevelGold specifies the reliability level gold state for - // reliability level. + // ReliabilityLevelGold specifies the reliability level gold state for reliability level. ReliabilityLevelGold ReliabilityLevel = "Gold" - // ReliabilityLevelSilver specifies the reliability level silver state for - // reliability level. + // ReliabilityLevelSilver specifies the reliability level silver state for reliability level. ReliabilityLevelSilver ReliabilityLevel = "Silver" ) @@ -110,17 +101,13 @@ const ( type ReliabilityLevel1 string const ( - // ReliabilityLevel1Bronze specifies the reliability level 1 bronze state - // for reliability level 1. + // ReliabilityLevel1Bronze specifies the reliability level 1 bronze state for reliability level 1. ReliabilityLevel1Bronze ReliabilityLevel1 = "Bronze" - // ReliabilityLevel1Gold specifies the reliability level 1 gold state for - // reliability level 1. + // ReliabilityLevel1Gold specifies the reliability level 1 gold state for reliability level 1. ReliabilityLevel1Gold ReliabilityLevel1 = "Gold" - // ReliabilityLevel1Platinum specifies the reliability level 1 platinum - // state for reliability level 1. + // ReliabilityLevel1Platinum specifies the reliability level 1 platinum state for reliability level 1. ReliabilityLevel1Platinum ReliabilityLevel1 = "Platinum" - // ReliabilityLevel1Silver specifies the reliability level 1 silver state - // for reliability level 1. + // ReliabilityLevel1Silver specifies the reliability level 1 silver state for reliability level 1. ReliabilityLevel1Silver ReliabilityLevel1 = "Silver" ) @@ -138,11 +125,9 @@ const ( type UpgradeMode1 string const ( - // UpgradeMode1Automatic specifies the upgrade mode 1 automatic state for - // upgrade mode 1. + // UpgradeMode1Automatic specifies the upgrade mode 1 automatic state for upgrade mode 1. UpgradeMode1Automatic UpgradeMode1 = "Automatic" - // UpgradeMode1Manual specifies the upgrade mode 1 manual state for upgrade - // mode 1. + // UpgradeMode1Manual specifies the upgrade mode 1 manual state for upgrade mode 1. UpgradeMode1Manual UpgradeMode1 = "Manual" ) @@ -154,8 +139,7 @@ const ( AddressBook X509StoreName = "AddressBook" // AuthRoot specifies the auth root state for x509 store name. AuthRoot X509StoreName = "AuthRoot" - // CertificateAuthority specifies the certificate authority state for x509 - // store name. + // CertificateAuthority specifies the certificate authority state for x509 store name. CertificateAuthority X509StoreName = "CertificateAuthority" // Disallowed specifies the disallowed state for x509 store name. Disallowed X509StoreName = "Disallowed" @@ -165,13 +149,11 @@ const ( Root X509StoreName = "Root" // TrustedPeople specifies the trusted people state for x509 store name. TrustedPeople X509StoreName = "TrustedPeople" - // TrustedPublisher specifies the trusted publisher state for x509 store - // name. + // TrustedPublisher specifies the trusted publisher state for x509 store name. TrustedPublisher X509StoreName = "TrustedPublisher" ) -// AvailableOperationDisplay is operation supported by ServiceFabric resource -// provider +// AvailableOperationDisplay is operation supported by ServiceFabric resource provider type AvailableOperationDisplay struct { Provider *string `json:"provider,omitempty"` Resource *string `json:"resource,omitempty"` @@ -179,8 +161,7 @@ type AvailableOperationDisplay struct { Description *string `json:"description,omitempty"` } -// AzureActiveDirectory is the settings to enable AAD authentication on the -// cluster +// AzureActiveDirectory is the settings to enable AAD authentication on the cluster type AzureActiveDirectory struct { TenantID *string `json:"tenantId,omitempty"` ClusterApplication *string `json:"clusterApplication,omitempty"` @@ -218,8 +199,7 @@ type Cluster struct { *ClusterProperties `json:"properties,omitempty"` } -// ClusterCodeVersionsListResult is the list results of the ServiceFabric -// runtime versions +// ClusterCodeVersionsListResult is the list results of the ServiceFabric runtime versions type ClusterCodeVersionsListResult struct { autorest.Response `json:"-"` Value *[]ClusterCodeVersionsResult `json:"value,omitempty"` @@ -238,17 +218,16 @@ func (client ClusterCodeVersionsListResult) ClusterCodeVersionsListResultPrepare autorest.WithBaseURL(to.String(client.NextLink))) } -// ClusterCodeVersionsResult is the result of the ServiceFabric runtime -// versions +// ClusterCodeVersionsResult is the result of the ServiceFabric runtime versions type ClusterCodeVersionsResult struct { + autorest.Response `json:"-"` ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` *ClusterVersionDetails `json:"properties,omitempty"` } -// ClusterHealthPolicy is defines a health policy used to evaluate the health -// of the cluster or of a cluster node. +// ClusterHealthPolicy is defines a health policy used to evaluate the health of the cluster or of a cluster node. type ClusterHealthPolicy struct { MaxPercentUnhealthyNodes *int32 `json:"maxPercentUnhealthyNodes,omitempty"` MaxPercentUnhealthyApplications *int32 `json:"maxPercentUnhealthyApplications,omitempty"` @@ -296,8 +275,7 @@ type ClusterProperties struct { UpgradeDescription *ClusterUpgradePolicy `json:"upgradeDescription,omitempty"` } -// ClusterPropertiesUpdateParameters is the cluster resource properties can be -// updated +// ClusterPropertiesUpdateParameters is the cluster resource properties can be updated type ClusterPropertiesUpdateParameters struct { ReliabilityLevel ReliabilityLevel `json:"reliabilityLevel,omitempty"` UpgradeMode UpgradeMode `json:"upgradeMode,omitempty"` @@ -338,8 +316,7 @@ type ClusterUpgradePolicy struct { DeltaHealthPolicy *ClusterUpgradeDeltaHealthPolicy `json:"deltaHealthPolicy,omitempty"` } -// ClusterVersionDetails is the detail of the ServiceFabric runtime version -// result +// ClusterVersionDetails is the detail of the ServiceFabric runtime version result type ClusterVersionDetails struct { CodeVersion *string `json:"codeVersion,omitempty"` SupportExpiryUtc *string `json:"supportExpiryUtc,omitempty"` @@ -372,8 +349,8 @@ type ErrorModelError struct { Message *string `json:"message,omitempty"` } -// NodeTypeDescription is describes a node type in the cluster, each node type -// represents sub set of nodes in the cluster +// NodeTypeDescription is describes a node type in the cluster, each node type represents sub set of nodes in the +// cluster type NodeTypeDescription struct { Name *string `json:"name,omitempty"` PlacementProperties *map[string]*string `json:"placementProperties,omitempty"` @@ -388,9 +365,8 @@ type NodeTypeDescription struct { ReverseProxyEndpointPort *int32 `json:"reverseProxyEndpointPort,omitempty"` } -// OperationListResult is result of the request to list ServiceFabric -// operations. It contains a list of operations and a URL link to get the next -// set of results. +// OperationListResult is result of the request to list ServiceFabric operations. It contains a list of operations and +// a URL link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]OperationResult `json:"value,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/operations.go index 5024912b7..3a6fa494f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/operations.go @@ -14,9 +14,8 @@ package servicefabric // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// OperationsClient is the client for the Operations methods of the -// Servicefabric service. +// OperationsClient is the client for the Operations methods of the Servicefabric service. type OperationsClient struct { ManagementClient } @@ -35,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -121,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult) return } + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan OperationResult, <-chan error) { + resultChan := make(chan OperationResult) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go index fc934accf..56b697cbf 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/servicefabric/version.go @@ -14,15 +14,15 @@ package servicefabric // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-servicefabric/2016-09-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-servicefabric/2016-09-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionpolicies.go new file mode 100644 index 000000000..cd301e146 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionpolicies.go @@ -0,0 +1,211 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// BackupLongTermRetentionPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type BackupLongTermRetentionPoliciesClient struct { + ManagementClient +} + +// NewBackupLongTermRetentionPoliciesClient creates an instance of the BackupLongTermRetentionPoliciesClient client. +func NewBackupLongTermRetentionPoliciesClient(subscriptionID string) BackupLongTermRetentionPoliciesClient { + return NewBackupLongTermRetentionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupLongTermRetentionPoliciesClientWithBaseURI creates an instance of the BackupLongTermRetentionPoliciesClient +// client. +func NewBackupLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionPoliciesClient { + return BackupLongTermRetentionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a database backup long term retention policy This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database backupLongTermRetentionPolicyName is the name of the backup long term retention policy parameters is the +// required parameters to update a backup long term retention policy +func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, backupLongTermRetentionPolicyName string, parameters BackupLongTermRetentionPolicy, cancel <-chan struct{}) (<-chan BackupLongTermRetentionPolicy, <-chan error) { + resultChan := make(chan BackupLongTermRetentionPolicy, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionPolicyProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionPolicyProperties.RecoveryServicesBackupPolicyResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "sql.BackupLongTermRetentionPoliciesClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result BackupLongTermRetentionPolicy + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, backupLongTermRetentionPolicyName string, parameters BackupLongTermRetentionPolicy, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupLongTermRetentionPolicyName": autorest.Encode("path", backupLongTermRetentionPolicyName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result BackupLongTermRetentionPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get returns a database backup long term retention policy +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. backupLongTermRetentionPolicyName is the name of the backup long term retention policy +func (client BackupLongTermRetentionPoliciesClient) Get(resourceGroupName string, serverName string, databaseName string, backupLongTermRetentionPolicyName string) (result BackupLongTermRetentionPolicy, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, backupLongTermRetentionPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupLongTermRetentionPoliciesClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, backupLongTermRetentionPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupLongTermRetentionPolicyName": autorest.Encode("path", backupLongTermRetentionPolicyName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{backupLongTermRetentionPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client BackupLongTermRetentionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupLongTermRetentionPoliciesClient) GetResponder(resp *http.Response) (result BackupLongTermRetentionPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionvaults.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionvaults.go new file mode 100644 index 000000000..400b0b3ca --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/backuplongtermretentionvaults.go @@ -0,0 +1,209 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// BackupLongTermRetentionVaultsClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type BackupLongTermRetentionVaultsClient struct { + ManagementClient +} + +// NewBackupLongTermRetentionVaultsClient creates an instance of the BackupLongTermRetentionVaultsClient client. +func NewBackupLongTermRetentionVaultsClient(subscriptionID string) BackupLongTermRetentionVaultsClient { + return NewBackupLongTermRetentionVaultsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewBackupLongTermRetentionVaultsClientWithBaseURI creates an instance of the BackupLongTermRetentionVaultsClient +// client. +func NewBackupLongTermRetentionVaultsClientWithBaseURI(baseURI string, subscriptionID string) BackupLongTermRetentionVaultsClient { + return BackupLongTermRetentionVaultsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate updates a server backup long term retention vault This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. backupLongTermRetentionVaultName is +// the name of the backup long term retention vault parameters is the required parameters to update a backup long term +// retention vault +func (client BackupLongTermRetentionVaultsClient) CreateOrUpdate(resourceGroupName string, serverName string, backupLongTermRetentionVaultName string, parameters BackupLongTermRetentionVault, cancel <-chan struct{}) (<-chan BackupLongTermRetentionVault, <-chan error) { + resultChan := make(chan BackupLongTermRetentionVault, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionVaultProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionVaultProperties.RecoveryServicesVaultResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "sql.BackupLongTermRetentionVaultsClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result BackupLongTermRetentionVault + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, backupLongTermRetentionVaultName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client BackupLongTermRetentionVaultsClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, backupLongTermRetentionVaultName string, parameters BackupLongTermRetentionVault, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupLongTermRetentionVaultName": autorest.Encode("path", backupLongTermRetentionVaultName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client BackupLongTermRetentionVaultsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client BackupLongTermRetentionVaultsClient) CreateOrUpdateResponder(resp *http.Response) (result BackupLongTermRetentionVault, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a server backup long term retention vault +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. backupLongTermRetentionVaultName is +// the name of the Azure SQL Server backup LongTermRetention vault +func (client BackupLongTermRetentionVaultsClient) Get(resourceGroupName string, serverName string, backupLongTermRetentionVaultName string) (result BackupLongTermRetentionVault, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, backupLongTermRetentionVaultName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client BackupLongTermRetentionVaultsClient) GetPreparer(resourceGroupName string, serverName string, backupLongTermRetentionVaultName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "backupLongTermRetentionVaultName": autorest.Encode("path", backupLongTermRetentionVaultName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/backupLongTermRetentionVaults/{backupLongTermRetentionVaultName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client BackupLongTermRetentionVaultsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client BackupLongTermRetentionVaultsClient) GetResponder(resp *http.Response) (result BackupLongTermRetentionVault, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/capabilities.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/capabilities.go index ec8aca224..d52f57b6c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/capabilities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/capabilities.go @@ -14,9 +14,8 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,10 +23,9 @@ import ( "net/http" ) -// CapabilitiesClient is the the Azure SQL Database management API provides a -// RESTful set of web services that interact with Azure SQL Database services -// to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. +// CapabilitiesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. type CapabilitiesClient struct { ManagementClient } @@ -37,8 +35,7 @@ func NewCapabilitiesClient(subscriptionID string) CapabilitiesClient { return NewCapabilitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCapabilitiesClientWithBaseURI creates an instance of the -// CapabilitiesClient client. +// NewCapabilitiesClientWithBaseURI creates an instance of the CapabilitiesClient client. func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) CapabilitiesClient { return CapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/client.go index dbc1dfaa2..5970ecf74 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/client.go @@ -1,8 +1,7 @@ // Package sql implements the Azure ARM Sql service API version . // -// The Azure SQL Database management API provides a RESTful set of web services -// that interact with Azure SQL Database services to manage your databases. The -// API enables you to create, retrieve, update, and delete databases. +// The Azure SQL Database management API provides a RESTful set of web services that interact with Azure SQL Database +// services to manage your databases. The API enables you to create, retrieve, update, and delete databases. package sql // Copyright (c) Microsoft and contributors. All rights reserved. @@ -19,9 +18,8 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseblobauditingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseblobauditingpolicies.go new file mode 100644 index 000000000..8f9274f57 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseblobauditingpolicies.go @@ -0,0 +1,183 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DatabaseBlobAuditingPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type DatabaseBlobAuditingPoliciesClient struct { + ManagementClient +} + +// NewDatabaseBlobAuditingPoliciesClient creates an instance of the DatabaseBlobAuditingPoliciesClient client. +func NewDatabaseBlobAuditingPoliciesClient(subscriptionID string) DatabaseBlobAuditingPoliciesClient { + return NewDatabaseBlobAuditingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDatabaseBlobAuditingPoliciesClientWithBaseURI creates an instance of the DatabaseBlobAuditingPoliciesClient +// client. +func NewDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseBlobAuditingPoliciesClient { + return DatabaseBlobAuditingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a database's blob auditing policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database for which the blob auditing policy will be defined. blobAuditingPolicyName is the name of the blob auditing +// policy. parameters is the database blob auditing policy. +func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, blobAuditingPolicyName string, parameters DatabaseBlobAuditingPolicy) (result DatabaseBlobAuditingPolicy, err error) { + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, blobAuditingPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, blobAuditingPolicyName string, parameters DatabaseBlobAuditingPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", blobAuditingPolicyName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a database's blob auditing policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database for which the blob audit policy is defined. blobAuditingPolicyName is the name of the blob auditing policy. +func (client DatabaseBlobAuditingPoliciesClient) Get(resourceGroupName string, serverName string, databaseName string, blobAuditingPolicyName string) (result DatabaseBlobAuditingPolicy, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, blobAuditingPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DatabaseBlobAuditingPoliciesClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, blobAuditingPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "blobAuditingPolicyName": autorest.Encode("path", blobAuditingPolicyName), + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseBlobAuditingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DatabaseBlobAuditingPoliciesClient) GetResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseoperations.go new file mode 100644 index 000000000..d0cfc625d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseoperations.go @@ -0,0 +1,247 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + uuid "github.com/satori/go.uuid" + "net/http" +) + +// DatabaseOperationsClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type DatabaseOperationsClient struct { + ManagementClient +} + +// NewDatabaseOperationsClient creates an instance of the DatabaseOperationsClient client. +func NewDatabaseOperationsClient(subscriptionID string) DatabaseOperationsClient { + return NewDatabaseOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDatabaseOperationsClientWithBaseURI creates an instance of the DatabaseOperationsClient client. +func NewDatabaseOperationsClientWithBaseURI(baseURI string, subscriptionID string) DatabaseOperationsClient { + return DatabaseOperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Cancel cancels the asynchronous operation on the database. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. operationID is the operation identifier. +func (client DatabaseOperationsClient) Cancel(resourceGroupName string, serverName string, databaseName string, operationID uuid.UUID) (result autorest.Response, err error) { + req, err := client.CancelPreparer(resourceGroupName, serverName, databaseName, operationID) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "Cancel", nil, "Failure preparing request") + return + } + + resp, err := client.CancelSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "Cancel", resp, "Failure sending request") + return + } + + result, err = client.CancelResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "Cancel", resp, "Failure responding to request") + } + + return +} + +// CancelPreparer prepares the Cancel request. +func (client DatabaseOperationsClient) CancelPreparer(resourceGroupName string, serverName string, databaseName string, operationID uuid.UUID) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "operationId": autorest.Encode("path", operationID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CancelSender sends the Cancel request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseOperationsClient) CancelSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CancelResponder handles the response to the Cancel request. The method always +// closes the http.Response Body. +func (client DatabaseOperationsClient) CancelResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// ListByDatabase gets a list of operations performed on the database. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. +func (client DatabaseOperationsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string) (result DatabaseOperationListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client DatabaseOperationsClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-03-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseOperationsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client DatabaseOperationsClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseOperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabaseNextResults retrieves the next set of results, if any. +func (client DatabaseOperationsClient) ListByDatabaseNextResults(lastResults DatabaseOperationListResult) (result DatabaseOperationListResult, err error) { + req, err := lastResults.DatabaseOperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", resp, "Failure sending next results request") + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseOperationsClient", "ListByDatabase", resp, "Failure responding to next results request") + } + + return +} + +// ListByDatabaseComplete gets all elements from the list without paging. +func (client DatabaseOperationsClient) ListByDatabaseComplete(resourceGroupName string, serverName string, databaseName string, cancel <-chan struct{}) (<-chan DatabaseOperation, <-chan error) { + resultChan := make(chan DatabaseOperation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByDatabase(resourceGroupName, serverName, databaseName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByDatabaseNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databases.go index c0d36034f..39a186f6f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databases.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databases.go @@ -14,9 +14,8 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,10 +24,9 @@ import ( "net/http" ) -// DatabasesClient is the the Azure SQL Database management API provides a -// RESTful set of web services that interact with Azure SQL Database services -// to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. +// DatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. type DatabasesClient struct { ManagementClient } @@ -38,24 +36,20 @@ func NewDatabasesClient(subscriptionID string) DatabasesClient { return NewDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient -// client. +// NewDatabasesClientWithBaseURI creates an instance of the DatabasesClient client. func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) DatabasesClient { return DatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateImportOperation creates an import operation that imports a bacpac into -// an existing database. The existing database must be empty. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateImportOperation creates an import operation that imports a bacpac into an existing database. The existing +// database must be empty. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database to import into parameters is the required parameters for -// importing a Bacpac into a database. -func (client DatabasesClient) CreateImportOperation(resourceGroupName string, serverName string, databaseName string, parameters ImportExtensionRequest, cancel <-chan struct{}) (<-chan ImportExportResponse, <-chan error) { +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to import into extensionName is the name of the operation to perform parameters is the required parameters +// for importing a Bacpac into a database. +func (client DatabasesClient) CreateImportOperation(resourceGroupName string, serverName string, databaseName string, extensionName string, parameters ImportExtensionRequest, cancel <-chan struct{}) (<-chan ImportExportResponse, <-chan error) { resultChan := make(chan ImportExportResponse, 1) errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ @@ -72,12 +66,14 @@ func (client DatabasesClient) CreateImportOperation(resourceGroupName string, se var err error var result ImportExportResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() - req, err := client.CreateImportOperationPreparer(resourceGroupName, serverName, databaseName, parameters, cancel) + req, err := client.CreateImportOperationPreparer(resourceGroupName, serverName, databaseName, extensionName, parameters, cancel) if err != nil { err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateImportOperation", nil, "Failure preparing request") return @@ -99,9 +95,10 @@ func (client DatabasesClient) CreateImportOperation(resourceGroupName string, se } // CreateImportOperationPreparer prepares the CreateImportOperation request. -func (client DatabasesClient) CreateImportOperationPreparer(resourceGroupName string, serverName string, databaseName string, parameters ImportExtensionRequest, cancel <-chan struct{}) (*http.Request, error) { +func (client DatabasesClient) CreateImportOperationPreparer(resourceGroupName string, serverName string, databaseName string, extensionName string, parameters ImportExtensionRequest, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "databaseName": autorest.Encode("path", databaseName), + "extensionName": autorest.Encode("path", extensionName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -116,7 +113,7 @@ func (client DatabasesClient) CreateImportOperationPreparer(resourceGroupName st autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/import", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{Cancel: cancel}) @@ -143,17 +140,14 @@ func (client DatabasesClient) CreateImportOperationResponder(resp *http.Response return } -// CreateOrUpdate creates a new database or updates an existing database. -// Location is a required property in the request body, and it must be the same -// as the location of the SQL server. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// CreateOrUpdate creates a new database or updates an existing database. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database to be operated on (updated or created). parameters is the -// required parameters for creating or updating a database. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to be operated on (updated or created). parameters is the required parameters for creating or updating a +// database. func (client DatabasesClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, parameters Database, cancel <-chan struct{}) (<-chan Database, <-chan error) { resultChan := make(chan Database, 1) errChan := make(chan error, 1) @@ -161,8 +155,10 @@ func (client DatabasesClient) CreateOrUpdate(resourceGroupName string, serverNam var err error var result Database defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -232,232 +228,11 @@ func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (resu return } -// CreateOrUpdateBlobAuditingPolicy creates or updates a database's blob -// auditing policy. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database for which database blob audit policy will be defined. -// parameters is the database blob auditing policy. -func (client DatabasesClient) CreateOrUpdateBlobAuditingPolicy(resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy) (result DatabaseBlobAuditingPolicy, err error) { - req, err := client.CreateOrUpdateBlobAuditingPolicyPreparer(resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateBlobAuditingPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateBlobAuditingPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateBlobAuditingPolicy", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateBlobAuditingPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateBlobAuditingPolicy", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdateBlobAuditingPolicyPreparer prepares the CreateOrUpdateBlobAuditingPolicy request. -func (client DatabasesClient) CreateOrUpdateBlobAuditingPolicyPreparer(resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/default", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// CreateOrUpdateBlobAuditingPolicySender sends the CreateOrUpdateBlobAuditingPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) CreateOrUpdateBlobAuditingPolicySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// CreateOrUpdateBlobAuditingPolicyResponder handles the response to the CreateOrUpdateBlobAuditingPolicy request. The method always -// closes the http.Response Body. -func (client DatabasesClient) CreateOrUpdateBlobAuditingPolicyResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdateThreatDetectionPolicy creates or updates a database's threat -// detection policy. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database for which database Threat Detection policy is defined. -// parameters is the database Threat Detection policy. -func (client DatabasesClient) CreateOrUpdateThreatDetectionPolicy(resourceGroupName string, serverName string, databaseName string, parameters DatabaseSecurityAlertPolicy) (result DatabaseSecurityAlertPolicy, err error) { - req, err := client.CreateOrUpdateThreatDetectionPolicyPreparer(resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateThreatDetectionPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateThreatDetectionPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateThreatDetectionPolicy", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateThreatDetectionPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateThreatDetectionPolicy", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdateThreatDetectionPolicyPreparer prepares the CreateOrUpdateThreatDetectionPolicy request. -func (client DatabasesClient) CreateOrUpdateThreatDetectionPolicyPreparer(resourceGroupName string, serverName string, databaseName string, parameters DatabaseSecurityAlertPolicy) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/default", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// CreateOrUpdateThreatDetectionPolicySender sends the CreateOrUpdateThreatDetectionPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) CreateOrUpdateThreatDetectionPolicySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// CreateOrUpdateThreatDetectionPolicyResponder handles the response to the CreateOrUpdateThreatDetectionPolicy request. The method always -// closes the http.Response Body. -func (client DatabasesClient) CreateOrUpdateThreatDetectionPolicyResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// CreateOrUpdateTransparentDataEncryptionConfiguration creates or updates a -// database's transparent data encryption configuration. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database for which setting the transparent data encryption applies. -// parameters is the required parameters for creating or updating transparent -// data encryption. -func (client DatabasesClient) CreateOrUpdateTransparentDataEncryptionConfiguration(resourceGroupName string, serverName string, databaseName string, parameters TransparentDataEncryption) (result TransparentDataEncryption, err error) { - req, err := client.CreateOrUpdateTransparentDataEncryptionConfigurationPreparer(resourceGroupName, serverName, databaseName, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateTransparentDataEncryptionConfiguration", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateTransparentDataEncryptionConfigurationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateTransparentDataEncryptionConfiguration", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateTransparentDataEncryptionConfigurationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdateTransparentDataEncryptionConfiguration", resp, "Failure responding to request") - } - - return -} - -// CreateOrUpdateTransparentDataEncryptionConfigurationPreparer prepares the CreateOrUpdateTransparentDataEncryptionConfiguration request. -func (client DatabasesClient) CreateOrUpdateTransparentDataEncryptionConfigurationPreparer(resourceGroupName string, serverName string, databaseName string, parameters TransparentDataEncryption) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsJSON(), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/current", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// CreateOrUpdateTransparentDataEncryptionConfigurationSender sends the CreateOrUpdateTransparentDataEncryptionConfiguration request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) CreateOrUpdateTransparentDataEncryptionConfigurationSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// CreateOrUpdateTransparentDataEncryptionConfigurationResponder handles the response to the CreateOrUpdateTransparentDataEncryptionConfiguration request. The method always -// closes the http.Response Body. -func (client DatabasesClient) CreateOrUpdateTransparentDataEncryptionConfigurationResponder(resp *http.Response) (result TransparentDataEncryption, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - // Delete deletes a database. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database to be deleted. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to be deleted. func (client DatabasesClient) Delete(resourceGroupName string, serverName string, databaseName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, serverName, databaseName) if err != nil { @@ -520,86 +295,12 @@ func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autor return } -// DeleteReplicationLink deletes a database replication link. Cannot be done -// during failover. +// Export exports a database to a bacpac. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database that has the replication link to be dropped. linkID is the -// ID of the replication link to be deleted. -func (client DatabasesClient) DeleteReplicationLink(resourceGroupName string, serverName string, databaseName string, linkID string) (result autorest.Response, err error) { - req, err := client.DeleteReplicationLinkPreparer(resourceGroupName, serverName, databaseName, linkID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "DeleteReplicationLink", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteReplicationLinkSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "DeleteReplicationLink", resp, "Failure sending request") - return - } - - result, err = client.DeleteReplicationLinkResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "DeleteReplicationLink", resp, "Failure responding to request") - } - - return -} - -// DeleteReplicationLinkPreparer prepares the DeleteReplicationLink request. -func (client DatabasesClient) DeleteReplicationLinkPreparer(resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// DeleteReplicationLinkSender sends the DeleteReplicationLink request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) DeleteReplicationLinkSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// DeleteReplicationLinkResponder handles the response to the DeleteReplicationLink request. The method always -// closes the http.Response Body. -func (client DatabasesClient) DeleteReplicationLinkResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Export exports a database to a bacpac. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database to be exported. parameters is the required parameters for -// exporting a database. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to be exported. parameters is the required parameters for exporting a database. func (client DatabasesClient) Export(resourceGroupName string, serverName string, databaseName string, parameters ExportRequest, cancel <-chan struct{}) (<-chan ImportExportResponse, <-chan error) { resultChan := make(chan ImportExportResponse, 1) errChan := make(chan error, 1) @@ -619,8 +320,10 @@ func (client DatabasesClient) Export(resourceGroupName string, serverName string var err error var result ImportExportResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -690,188 +393,12 @@ func (client DatabasesClient) ExportResponder(resp *http.Response) (result Impor return } -// FailoverReplicationLink sets which replica database is primary by failing -// over from the current primary replica database. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database that has the replication link to be failed over. linkID is -// the ID of the replication link to be failed over. -func (client DatabasesClient) FailoverReplicationLink(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { - resultChan := make(chan autorest.Response, 1) - errChan := make(chan error, 1) - go func() { - var err error - var result autorest.Response - defer func() { - resultChan <- result - errChan <- err - close(resultChan) - close(errChan) - }() - req, err := client.FailoverReplicationLinkPreparer(resourceGroupName, serverName, databaseName, linkID, cancel) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "FailoverReplicationLink", nil, "Failure preparing request") - return - } - - resp, err := client.FailoverReplicationLinkSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "FailoverReplicationLink", resp, "Failure sending request") - return - } - - result, err = client.FailoverReplicationLinkResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "FailoverReplicationLink", resp, "Failure responding to request") - } - }() - return resultChan, errChan -} - -// FailoverReplicationLinkPreparer prepares the FailoverReplicationLink request. -func (client DatabasesClient) FailoverReplicationLinkPreparer(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{Cancel: cancel}) -} - -// FailoverReplicationLinkSender sends the FailoverReplicationLink request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) FailoverReplicationLinkSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, - req, - azure.DoPollForAsynchronous(client.PollingDelay)) -} - -// FailoverReplicationLinkResponder handles the response to the FailoverReplicationLink request. The method always -// closes the http.Response Body. -func (client DatabasesClient) FailoverReplicationLinkResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - -// FailoverReplicationLinkAllowDataLoss sets which replica database is primary -// by failing over from the current primary replica database. This operation -// might result in data loss. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database that has the replication link to be failed over. linkID is -// the ID of the replication link to be failed over. -func (client DatabasesClient) FailoverReplicationLinkAllowDataLoss(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { - resultChan := make(chan autorest.Response, 1) - errChan := make(chan error, 1) - go func() { - var err error - var result autorest.Response - defer func() { - resultChan <- result - errChan <- err - close(resultChan) - close(errChan) - }() - req, err := client.FailoverReplicationLinkAllowDataLossPreparer(resourceGroupName, serverName, databaseName, linkID, cancel) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "FailoverReplicationLinkAllowDataLoss", nil, "Failure preparing request") - return - } - - resp, err := client.FailoverReplicationLinkAllowDataLossSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "FailoverReplicationLinkAllowDataLoss", resp, "Failure sending request") - return - } - - result, err = client.FailoverReplicationLinkAllowDataLossResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "FailoverReplicationLinkAllowDataLoss", resp, "Failure responding to request") - } - }() - return resultChan, errChan -} - -// FailoverReplicationLinkAllowDataLossPreparer prepares the FailoverReplicationLinkAllowDataLoss request. -func (client DatabasesClient) FailoverReplicationLinkAllowDataLossPreparer(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{Cancel: cancel}) -} - -// FailoverReplicationLinkAllowDataLossSender sends the FailoverReplicationLinkAllowDataLoss request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) FailoverReplicationLinkAllowDataLossSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, - req, - azure.DoPollForAsynchronous(client.PollingDelay)) -} - -// FailoverReplicationLinkAllowDataLossResponder handles the response to the FailoverReplicationLinkAllowDataLoss request. The method always -// closes the http.Response Body. -func (client DatabasesClient) FailoverReplicationLinkAllowDataLossResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusAccepted), - autorest.ByClosing()) - result.Response = resp - return -} - // Get gets a database. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database to be retrieved. expand is a comma separated list of child -// objects to expand in the response. Possible properties: serviceTierAdvisors, -// transparentDataEncryption. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to be retrieved. expand is a comma separated list of child objects to expand in the response. Possible +// properties: serviceTierAdvisors, transparentDataEncryption. func (client DatabasesClient) Get(resourceGroupName string, serverName string, databaseName string, expand string) (result Database, err error) { req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, expand) if err != nil { @@ -938,109 +465,38 @@ func (client DatabasesClient) GetResponder(resp *http.Response) (result Database return } -// GetBlobAuditingPolicy gets a database's blob auditing policy. +// GetByElasticPool gets a database inside of an elastic pool. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database for which database blob audit policy is defined. -func (client DatabasesClient) GetBlobAuditingPolicy(resourceGroupName string, serverName string, databaseName string) (result DatabaseBlobAuditingPolicy, err error) { - req, err := client.GetBlobAuditingPolicyPreparer(resourceGroupName, serverName, databaseName) +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool to be retrieved. databaseName is the name of the database to be retrieved. +func (client DatabasesClient) GetByElasticPool(resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (result Database, err error) { + req, err := client.GetByElasticPoolPreparer(resourceGroupName, serverName, elasticPoolName, databaseName) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetBlobAuditingPolicy", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByElasticPool", nil, "Failure preparing request") return } - resp, err := client.GetBlobAuditingPolicySender(req) + resp, err := client.GetByElasticPoolSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetBlobAuditingPolicy", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByElasticPool", resp, "Failure sending request") return } - result, err = client.GetBlobAuditingPolicyResponder(resp) + result, err = client.GetByElasticPoolResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetBlobAuditingPolicy", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByElasticPool", resp, "Failure responding to request") } return } -// GetBlobAuditingPolicyPreparer prepares the GetBlobAuditingPolicy request. -func (client DatabasesClient) GetBlobAuditingPolicyPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { +// GetByElasticPoolPreparer prepares the GetByElasticPool request. +func (client DatabasesClient) GetByElasticPoolPreparer(resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-05-01-preview" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// GetBlobAuditingPolicySender sends the GetBlobAuditingPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) GetBlobAuditingPolicySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// GetBlobAuditingPolicyResponder handles the response to the GetBlobAuditingPolicy request. The method always -// closes the http.Response Body. -func (client DatabasesClient) GetBlobAuditingPolicyResponder(resp *http.Response) (result DatabaseBlobAuditingPolicy, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetReplicationLink gets a database replication link. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database to get the link for. linkID is the replication link ID to be -// retrieved. -func (client DatabasesClient) GetReplicationLink(resourceGroupName string, serverName string, databaseName string, linkID string) (result ReplicationLink, err error) { - req, err := client.GetReplicationLinkPreparer(resourceGroupName, serverName, databaseName, linkID) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetReplicationLink", nil, "Failure preparing request") - return - } - - resp, err := client.GetReplicationLinkSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetReplicationLink", resp, "Failure sending request") - return - } - - result, err = client.GetReplicationLinkResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetReplicationLink", resp, "Failure responding to request") - } - - return -} - -// GetReplicationLinkPreparer prepares the GetReplicationLink request. -func (client DatabasesClient) GetReplicationLinkPreparer(resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "linkId": autorest.Encode("path", linkID), + "elasticPoolName": autorest.Encode("path", elasticPoolName), "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -1054,20 +510,20 @@ func (client DatabasesClient) GetReplicationLinkPreparer(resourceGroupName strin preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// GetReplicationLinkSender sends the GetReplicationLink request. The method will close the +// GetByElasticPoolSender sends the GetByElasticPool request. The method will close the // http.Response Body if it receives an error. -func (client DatabasesClient) GetReplicationLinkSender(req *http.Request) (*http.Response, error) { +func (client DatabasesClient) GetByElasticPoolSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// GetReplicationLinkResponder handles the response to the GetReplicationLink request. The method always +// GetByElasticPoolResponder handles the response to the GetByElasticPool request. The method always // closes the http.Response Body. -func (client DatabasesClient) GetReplicationLinkResponder(resp *http.Response) (result ReplicationLink, err error) { +func (client DatabasesClient) GetByElasticPoolResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1078,42 +534,41 @@ func (client DatabasesClient) GetReplicationLinkResponder(resp *http.Response) ( return } -// GetServiceTierAdvisor gets a service tier advisor. +// GetByRecommendedElasticPool gets a database inside of a recommented elastic pool. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of database. serviceTierAdvisorName is the name of service tier advisor. -func (client DatabasesClient) GetServiceTierAdvisor(resourceGroupName string, serverName string, databaseName string, serviceTierAdvisorName string) (result ServiceTierAdvisor, err error) { - req, err := client.GetServiceTierAdvisorPreparer(resourceGroupName, serverName, databaseName, serviceTierAdvisorName) +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. recommendedElasticPoolName is the +// name of the elastic pool to be retrieved. databaseName is the name of the database to be retrieved. +func (client DatabasesClient) GetByRecommendedElasticPool(resourceGroupName string, serverName string, recommendedElasticPoolName string, databaseName string) (result Database, err error) { + req, err := client.GetByRecommendedElasticPoolPreparer(resourceGroupName, serverName, recommendedElasticPoolName, databaseName) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetServiceTierAdvisor", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByRecommendedElasticPool", nil, "Failure preparing request") return } - resp, err := client.GetServiceTierAdvisorSender(req) + resp, err := client.GetByRecommendedElasticPoolSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetServiceTierAdvisor", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByRecommendedElasticPool", resp, "Failure sending request") return } - result, err = client.GetServiceTierAdvisorResponder(resp) + result, err = client.GetByRecommendedElasticPoolResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetServiceTierAdvisor", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByRecommendedElasticPool", resp, "Failure responding to request") } return } -// GetServiceTierAdvisorPreparer prepares the GetServiceTierAdvisor request. -func (client DatabasesClient) GetServiceTierAdvisorPreparer(resourceGroupName string, serverName string, databaseName string, serviceTierAdvisorName string) (*http.Request, error) { +// GetByRecommendedElasticPoolPreparer prepares the GetByRecommendedElasticPool request. +func (client DatabasesClient) GetByRecommendedElasticPoolPreparer(resourceGroupName string, serverName string, recommendedElasticPoolName string, databaseName string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "serviceTierAdvisorName": autorest.Encode("path", serviceTierAdvisorName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "databaseName": autorest.Encode("path", databaseName), + "recommendedElasticPoolName": autorest.Encode("path", recommendedElasticPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } const APIVersion = "2014-04-01" @@ -1124,20 +579,20 @@ func (client DatabasesClient) GetServiceTierAdvisorPreparer(resourceGroupName st preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors/{serviceTierAdvisorName}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// GetServiceTierAdvisorSender sends the GetServiceTierAdvisor request. The method will close the +// GetByRecommendedElasticPoolSender sends the GetByRecommendedElasticPool request. The method will close the // http.Response Body if it receives an error. -func (client DatabasesClient) GetServiceTierAdvisorSender(req *http.Request) (*http.Response, error) { +func (client DatabasesClient) GetByRecommendedElasticPoolSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// GetServiceTierAdvisorResponder handles the response to the GetServiceTierAdvisor request. The method always +// GetByRecommendedElasticPoolResponder handles the response to the GetByRecommendedElasticPool request. The method always // closes the http.Response Body. -func (client DatabasesClient) GetServiceTierAdvisorResponder(resp *http.Response) (result ServiceTierAdvisor, err error) { +func (client DatabasesClient) GetByRecommendedElasticPoolResponder(resp *http.Response) (result Database, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1148,153 +603,11 @@ func (client DatabasesClient) GetServiceTierAdvisorResponder(resp *http.Response return } -// GetThreatDetectionPolicy gets a database's threat detection policy. +// Import imports a bacpac into a new database. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database for which database Threat Detection policy is defined. -func (client DatabasesClient) GetThreatDetectionPolicy(resourceGroupName string, serverName string, databaseName string) (result DatabaseSecurityAlertPolicy, err error) { - req, err := client.GetThreatDetectionPolicyPreparer(resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetThreatDetectionPolicy", nil, "Failure preparing request") - return - } - - resp, err := client.GetThreatDetectionPolicySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetThreatDetectionPolicy", resp, "Failure sending request") - return - } - - result, err = client.GetThreatDetectionPolicyResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetThreatDetectionPolicy", resp, "Failure responding to request") - } - - return -} - -// GetThreatDetectionPolicyPreparer prepares the GetThreatDetectionPolicy request. -func (client DatabasesClient) GetThreatDetectionPolicyPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/default", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// GetThreatDetectionPolicySender sends the GetThreatDetectionPolicy request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) GetThreatDetectionPolicySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// GetThreatDetectionPolicyResponder handles the response to the GetThreatDetectionPolicy request. The method always -// closes the http.Response Body. -func (client DatabasesClient) GetThreatDetectionPolicyResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// GetTransparentDataEncryptionConfiguration gets a database's transparent data -// encryption configuration. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database for which the transparent data encryption applies. -func (client DatabasesClient) GetTransparentDataEncryptionConfiguration(resourceGroupName string, serverName string, databaseName string) (result TransparentDataEncryption, err error) { - req, err := client.GetTransparentDataEncryptionConfigurationPreparer(resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetTransparentDataEncryptionConfiguration", nil, "Failure preparing request") - return - } - - resp, err := client.GetTransparentDataEncryptionConfigurationSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetTransparentDataEncryptionConfiguration", resp, "Failure sending request") - return - } - - result, err = client.GetTransparentDataEncryptionConfigurationResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetTransparentDataEncryptionConfiguration", resp, "Failure responding to request") - } - - return -} - -// GetTransparentDataEncryptionConfigurationPreparer prepares the GetTransparentDataEncryptionConfiguration request. -func (client DatabasesClient) GetTransparentDataEncryptionConfigurationPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/current", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// GetTransparentDataEncryptionConfigurationSender sends the GetTransparentDataEncryptionConfiguration request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) GetTransparentDataEncryptionConfigurationSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// GetTransparentDataEncryptionConfigurationResponder handles the response to the GetTransparentDataEncryptionConfiguration request. The method always -// closes the http.Response Body. -func (client DatabasesClient) GetTransparentDataEncryptionConfigurationResponder(resp *http.Response) (result TransparentDataEncryption, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Import imports a bacpac into a new database. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. parameters is the required +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. parameters is the required // parameters for importing a Bacpac into a database. func (client DatabasesClient) Import(resourceGroupName string, serverName string, parameters ImportRequest, cancel <-chan struct{}) (<-chan ImportExportResponse, <-chan error) { resultChan := make(chan ImportExportResponse, 1) @@ -1313,8 +626,10 @@ func (client DatabasesClient) Import(resourceGroupName string, serverName string var err error var result ImportExportResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1376,7 +691,143 @@ func (client DatabasesClient) ImportResponder(resp *http.Response) (result Impor err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByElasticPool returns a list of databases in an elastic pool. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool to be retrieved. +func (client DatabasesClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string) (result DatabaseListResult, err error) { + req, err := client.ListByElasticPoolPreparer(resourceGroupName, serverName, elasticPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByElasticPool", nil, "Failure preparing request") + return + } + + resp, err := client.ListByElasticPoolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByElasticPool", resp, "Failure sending request") + return + } + + result, err = client.ListByElasticPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByElasticPool", resp, "Failure responding to request") + } + + return +} + +// ListByElasticPoolPreparer prepares the ListByElasticPool request. +func (client DatabasesClient) ListByElasticPoolPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "elasticPoolName": autorest.Encode("path", elasticPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByElasticPoolSender sends the ListByElasticPool request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) ListByElasticPoolSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByElasticPoolResponder handles the response to the ListByElasticPool request. The method always +// closes the http.Response Body. +func (client DatabasesClient) ListByElasticPoolResponder(resp *http.Response) (result DatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByRecommendedElasticPool returns a list of databases inside a recommented elastic pool. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. recommendedElasticPoolName is the +// name of the recommended elastic pool to be retrieved. +func (client DatabasesClient) ListByRecommendedElasticPool(resourceGroupName string, serverName string, recommendedElasticPoolName string) (result DatabaseListResult, err error) { + req, err := client.ListByRecommendedElasticPoolPreparer(resourceGroupName, serverName, recommendedElasticPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByRecommendedElasticPool", nil, "Failure preparing request") + return + } + + resp, err := client.ListByRecommendedElasticPoolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByRecommendedElasticPool", resp, "Failure sending request") + return + } + + result, err = client.ListByRecommendedElasticPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByRecommendedElasticPool", resp, "Failure responding to request") + } + + return +} + +// ListByRecommendedElasticPoolPreparer prepares the ListByRecommendedElasticPool request. +func (client DatabasesClient) ListByRecommendedElasticPoolPreparer(resourceGroupName string, serverName string, recommendedElasticPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "recommendedElasticPoolName": autorest.Encode("path", recommendedElasticPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByRecommendedElasticPoolSender sends the ListByRecommendedElasticPool request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) ListByRecommendedElasticPoolSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByRecommendedElasticPoolResponder handles the response to the ListByRecommendedElasticPool request. The method always +// closes the http.Response Body. +func (client DatabasesClient) ListByRecommendedElasticPoolResponder(resp *http.Response) (result DatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -1385,12 +836,10 @@ func (client DatabasesClient) ImportResponder(resp *http.Response) (result Impor // ListByServer returns a list of databases in a server. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. expand is a comma -// separated list of child objects to expand in the response. Possible -// properties: serviceTierAdvisors, transparentDataEncryption. filter is an -// OData filter expression that describes a subset of databases to return. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. expand is a comma separated list of +// child objects to expand in the response. Possible properties: serviceTierAdvisors, transparentDataEncryption. filter +// is an OData filter expression that describes a subset of databases to return. func (client DatabasesClient) ListByServer(resourceGroupName string, serverName string, expand string, filter string) (result DatabaseListResult, err error) { req, err := client.ListByServerPreparer(resourceGroupName, serverName, expand, filter) if err != nil { @@ -1459,175 +908,35 @@ func (client DatabasesClient) ListByServerResponder(resp *http.Response) (result return } -// ListReplicationLinks lists a database's replication links. +// ListMetricDefinitions returns database metric definitions. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database to retrieve links for. -func (client DatabasesClient) ListReplicationLinks(resourceGroupName string, serverName string, databaseName string) (result ReplicationLinkListResult, err error) { - req, err := client.ListReplicationLinksPreparer(resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListReplicationLinks", nil, "Failure preparing request") - return - } - - resp, err := client.ListReplicationLinksSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListReplicationLinks", resp, "Failure sending request") - return - } - - result, err = client.ListReplicationLinksResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListReplicationLinks", resp, "Failure responding to request") - } - - return -} - -// ListReplicationLinksPreparer prepares the ListReplicationLinks request. -func (client DatabasesClient) ListReplicationLinksPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListReplicationLinksSender sends the ListReplicationLinks request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListReplicationLinksSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListReplicationLinksResponder handles the response to the ListReplicationLinks request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListReplicationLinksResponder(resp *http.Response) (result ReplicationLinkListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListRestorePoints returns a list of database restore points. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database from which to retrieve available restore points. -func (client DatabasesClient) ListRestorePoints(resourceGroupName string, serverName string, databaseName string) (result RestorePointListResult, err error) { - req, err := client.ListRestorePointsPreparer(resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListRestorePoints", nil, "Failure preparing request") - return - } - - resp, err := client.ListRestorePointsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListRestorePoints", resp, "Failure sending request") - return - } - - result, err = client.ListRestorePointsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListRestorePoints", resp, "Failure responding to request") - } - - return -} - -// ListRestorePointsPreparer prepares the ListRestorePoints request. -func (client DatabasesClient) ListRestorePointsPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListRestorePointsSender sends the ListRestorePoints request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListRestorePointsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListRestorePointsResponder handles the response to the ListRestorePoints request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListRestorePointsResponder(resp *http.Response) (result RestorePointListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListServiceTierAdvisors returns service tier advisors for specified +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the // database. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of database. -func (client DatabasesClient) ListServiceTierAdvisors(resourceGroupName string, serverName string, databaseName string) (result ServiceTierAdvisorListResult, err error) { - req, err := client.ListServiceTierAdvisorsPreparer(resourceGroupName, serverName, databaseName) +func (client DatabasesClient) ListMetricDefinitions(resourceGroupName string, serverName string, databaseName string) (result MetricDefinitionListResult, err error) { + req, err := client.ListMetricDefinitionsPreparer(resourceGroupName, serverName, databaseName) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListServiceTierAdvisors", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetricDefinitions", nil, "Failure preparing request") return } - resp, err := client.ListServiceTierAdvisorsSender(req) + resp, err := client.ListMetricDefinitionsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListServiceTierAdvisors", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetricDefinitions", resp, "Failure sending request") return } - result, err = client.ListServiceTierAdvisorsResponder(resp) + result, err = client.ListMetricDefinitionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListServiceTierAdvisors", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetricDefinitions", resp, "Failure responding to request") } return } -// ListServiceTierAdvisorsPreparer prepares the ListServiceTierAdvisors request. -func (client DatabasesClient) ListServiceTierAdvisorsPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { +// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request. +func (client DatabasesClient) ListMetricDefinitionsPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "databaseName": autorest.Encode("path", databaseName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1643,20 +952,20 @@ func (client DatabasesClient) ListServiceTierAdvisorsPreparer(resourceGroupName preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// ListServiceTierAdvisorsSender sends the ListServiceTierAdvisors request. The method will close the +// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the // http.Response Body if it receives an error. -func (client DatabasesClient) ListServiceTierAdvisorsSender(req *http.Request) (*http.Response, error) { +func (client DatabasesClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListServiceTierAdvisorsResponder handles the response to the ListServiceTierAdvisors request. The method always +// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always // closes the http.Response Body. -func (client DatabasesClient) ListServiceTierAdvisorsResponder(resp *http.Response) (result ServiceTierAdvisorListResult, err error) { +func (client DatabasesClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1667,37 +976,35 @@ func (client DatabasesClient) ListServiceTierAdvisorsResponder(resp *http.Respon return } -// ListTransparentDataEncryptionActivity returns a database's transparent data -// encryption operation result. +// ListMetrics returns database metrics. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database for which the transparent data encryption applies. -func (client DatabasesClient) ListTransparentDataEncryptionActivity(resourceGroupName string, serverName string, databaseName string) (result TransparentDataEncryptionActivityListResult, err error) { - req, err := client.ListTransparentDataEncryptionActivityPreparer(resourceGroupName, serverName, databaseName) +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. filter is an OData filter expression that describes a subset of metrics to return. +func (client DatabasesClient) ListMetrics(resourceGroupName string, serverName string, databaseName string, filter string) (result MetricListResult, err error) { + req, err := client.ListMetricsPreparer(resourceGroupName, serverName, databaseName, filter) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListTransparentDataEncryptionActivity", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetrics", nil, "Failure preparing request") return } - resp, err := client.ListTransparentDataEncryptionActivitySender(req) + resp, err := client.ListMetricsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListTransparentDataEncryptionActivity", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetrics", resp, "Failure sending request") return } - result, err = client.ListTransparentDataEncryptionActivityResponder(resp) + result, err = client.ListMetricsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListTransparentDataEncryptionActivity", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetrics", resp, "Failure responding to request") } return } -// ListTransparentDataEncryptionActivityPreparer prepares the ListTransparentDataEncryptionActivity request. -func (client DatabasesClient) ListTransparentDataEncryptionActivityPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { +// ListMetricsPreparer prepares the ListMetrics request. +func (client DatabasesClient) ListMetricsPreparer(resourceGroupName string, serverName string, databaseName string, filter string) (*http.Request, error) { pathParameters := map[string]interface{}{ "databaseName": autorest.Encode("path", databaseName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -1707,26 +1014,27 @@ func (client DatabasesClient) ListTransparentDataEncryptionActivityPreparer(reso const APIVersion = "2014-04-01" queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), "api-version": APIVersion, } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/current/operationResults", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// ListTransparentDataEncryptionActivitySender sends the ListTransparentDataEncryptionActivity request. The method will close the +// ListMetricsSender sends the ListMetrics request. The method will close the // http.Response Body if it receives an error. -func (client DatabasesClient) ListTransparentDataEncryptionActivitySender(req *http.Request) (*http.Response, error) { +func (client DatabasesClient) ListMetricsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListTransparentDataEncryptionActivityResponder handles the response to the ListTransparentDataEncryptionActivity request. The method always +// ListMetricsResponder handles the response to the ListMetrics request. The method always // closes the http.Response Body. -func (client DatabasesClient) ListTransparentDataEncryptionActivityResponder(resp *http.Response) (result TransparentDataEncryptionActivityListResult, err error) { +func (client DatabasesClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -1737,83 +1045,12 @@ func (client DatabasesClient) ListTransparentDataEncryptionActivityResponder(res return } -// ListUsages returns database usages. +// Pause pauses a data warehouse. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the database. -func (client DatabasesClient) ListUsages(resourceGroupName string, serverName string, databaseName string) (result DatabaseMetricListResult, err error) { - req, err := client.ListUsagesPreparer(resourceGroupName, serverName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListUsages", nil, "Failure preparing request") - return - } - - resp, err := client.ListUsagesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListUsages", resp, "Failure sending request") - return - } - - result, err = client.ListUsagesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListUsages", resp, "Failure responding to request") - } - - return -} - -// ListUsagesPreparer prepares the ListUsages request. -func (client DatabasesClient) ListUsagesPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListUsagesSender sends the ListUsages request. The method will close the -// http.Response Body if it receives an error. -func (client DatabasesClient) ListUsagesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListUsagesResponder handles the response to the ListUsages request. The method always -// closes the http.Response Body. -func (client DatabasesClient) ListUsagesResponder(resp *http.Response) (result DatabaseMetricListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Pause pauses a data warehouse. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the data warehouse to pause. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the data +// warehouse to pause. func (client DatabasesClient) Pause(resourceGroupName string, serverName string, databaseName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -1821,8 +1058,10 @@ func (client DatabasesClient) Pause(resourceGroupName string, serverName string, var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1889,14 +1128,12 @@ func (client DatabasesClient) PauseResponder(resp *http.Response) (result autore return } -// Resume resumes a data warehouse. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Resume resumes a data warehouse. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. databaseName is the name -// of the data warehouse to resume. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the data +// warehouse to resume. func (client DatabasesClient) Resume(resourceGroupName string, serverName string, databaseName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -1904,8 +1141,10 @@ func (client DatabasesClient) Resume(resourceGroupName string, serverName string var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1971,3 +1210,89 @@ func (client DatabasesClient) ResumeResponder(resp *http.Response) (result autor result.Response = resp return } + +// Update updates an existing database. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to be updated. parameters is the required parameters for updating a database. +func (client DatabasesClient) Update(resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate, cancel <-chan struct{}) (<-chan Database, <-chan error) { + resultChan := make(chan Database, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result Database + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, serverName, databaseName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client DatabasesClient) UpdatePreparer(resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client DatabasesClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client DatabasesClient) UpdateResponder(resp *http.Response) (result Database, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databasethreatdetectionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databasethreatdetectionpolicies.go new file mode 100644 index 000000000..740496449 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databasethreatdetectionpolicies.go @@ -0,0 +1,184 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DatabaseThreatDetectionPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type DatabaseThreatDetectionPoliciesClient struct { + ManagementClient +} + +// NewDatabaseThreatDetectionPoliciesClient creates an instance of the DatabaseThreatDetectionPoliciesClient client. +func NewDatabaseThreatDetectionPoliciesClient(subscriptionID string) DatabaseThreatDetectionPoliciesClient { + return NewDatabaseThreatDetectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDatabaseThreatDetectionPoliciesClientWithBaseURI creates an instance of the DatabaseThreatDetectionPoliciesClient +// client. +func NewDatabaseThreatDetectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseThreatDetectionPoliciesClient { + return DatabaseThreatDetectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a database's threat detection policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database for which database Threat Detection policy is defined. securityAlertPolicyName is the name of the security +// alert policy. parameters is the database Threat Detection policy. +func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName string, parameters DatabaseSecurityAlertPolicy) (result DatabaseSecurityAlertPolicy, err error) { + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, securityAlertPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName string, parameters DatabaseSecurityAlertPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityAlertPolicyName": autorest.Encode("path", securityAlertPolicyName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a database's threat detection policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database for which database Threat Detection policy is defined. securityAlertPolicyName is the name of the security +// alert policy. +func (client DatabaseThreatDetectionPoliciesClient) Get(resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName string) (result DatabaseSecurityAlertPolicy, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, securityAlertPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DatabaseThreatDetectionPoliciesClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, securityAlertPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "securityAlertPolicyName": autorest.Encode("path", securityAlertPolicyName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseThreatDetectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DatabaseThreatDetectionPoliciesClient) GetResponder(resp *http.Response) (result DatabaseSecurityAlertPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseusages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseusages.go new file mode 100644 index 000000000..291743404 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/databaseusages.go @@ -0,0 +1,109 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DatabaseUsagesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type DatabaseUsagesClient struct { + ManagementClient +} + +// NewDatabaseUsagesClient creates an instance of the DatabaseUsagesClient client. +func NewDatabaseUsagesClient(subscriptionID string) DatabaseUsagesClient { + return NewDatabaseUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDatabaseUsagesClientWithBaseURI creates an instance of the DatabaseUsagesClient client. +func NewDatabaseUsagesClientWithBaseURI(baseURI string, subscriptionID string) DatabaseUsagesClient { + return DatabaseUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByDatabase returns database usages. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. +func (client DatabaseUsagesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string) (result DatabaseUsageListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseUsagesClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DatabaseUsagesClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DatabaseUsagesClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client DatabaseUsagesClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client DatabaseUsagesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client DatabaseUsagesClient) ListByDatabaseResponder(resp *http.Response) (result DatabaseUsageListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingpolicies.go new file mode 100644 index 000000000..bbc49c66a --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingpolicies.go @@ -0,0 +1,182 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// DataMaskingPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type DataMaskingPoliciesClient struct { + ManagementClient +} + +// NewDataMaskingPoliciesClient creates an instance of the DataMaskingPoliciesClient client. +func NewDataMaskingPoliciesClient(subscriptionID string) DataMaskingPoliciesClient { + return NewDataMaskingPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDataMaskingPoliciesClientWithBaseURI creates an instance of the DataMaskingPoliciesClient client. +func NewDataMaskingPoliciesClientWithBaseURI(baseURI string, subscriptionID string) DataMaskingPoliciesClient { + return DataMaskingPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a database data masking policy +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. dataMaskingPolicyName is the name of the database for which the data masking rule applies. parameters is +// parameters for creating or updating a data masking policy. +func (client DataMaskingPoliciesClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string, parameters DataMaskingPolicy) (result DataMaskingPolicy, err error) { + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DataMaskingPoliciesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string, parameters DataMaskingPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "dataMaskingPolicyName": autorest.Encode("path", dataMaskingPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DataMaskingPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DataMaskingPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a database data masking policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. dataMaskingPolicyName is the name of the database for which the data masking rule applies. +func (client DataMaskingPoliciesClient) Get(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string) (result DataMaskingPolicy, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, dataMaskingPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client DataMaskingPoliciesClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "dataMaskingPolicyName": autorest.Encode("path", dataMaskingPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client DataMaskingPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client DataMaskingPoliciesClient) GetResponder(resp *http.Response) (result DataMaskingPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingrules.go new file mode 100644 index 000000000..c04dff8de --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/datamaskingrules.go @@ -0,0 +1,195 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// DataMaskingRulesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type DataMaskingRulesClient struct { + ManagementClient +} + +// NewDataMaskingRulesClient creates an instance of the DataMaskingRulesClient client. +func NewDataMaskingRulesClient(subscriptionID string) DataMaskingRulesClient { + return NewDataMaskingRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewDataMaskingRulesClientWithBaseURI creates an instance of the DataMaskingRulesClient client. +func NewDataMaskingRulesClientWithBaseURI(baseURI string, subscriptionID string) DataMaskingRulesClient { + return DataMaskingRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a database data masking rule. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. dataMaskingPolicyName is the name of the database for which the data masking rule applies. +// dataMaskingRuleName is the name of the data masking rule. parameters is the required parameters for creating or +// updating a data masking rule. +func (client DataMaskingRulesClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string, dataMaskingRuleName string, parameters DataMaskingRule) (result DataMaskingRule, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.DataMaskingRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.DataMaskingRuleProperties.SchemaName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DataMaskingRuleProperties.TableName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.DataMaskingRuleProperties.ColumnName", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "sql.DataMaskingRulesClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, dataMaskingPolicyName, dataMaskingRuleName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client DataMaskingRulesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string, dataMaskingRuleName string, parameters DataMaskingRule) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "dataMaskingPolicyName": autorest.Encode("path", dataMaskingPolicyName), + "dataMaskingRuleName": autorest.Encode("path", dataMaskingRuleName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client DataMaskingRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client DataMaskingRulesClient) CreateOrUpdateResponder(resp *http.Response) (result DataMaskingRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabase gets a list of database data masking rules. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. dataMaskingPolicyName is the name of the database for which the data masking rule applies. +func (client DataMaskingRulesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string) (result DataMaskingRuleListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName, dataMaskingPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client DataMaskingRulesClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string, dataMaskingPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "dataMaskingPolicyName": autorest.Encode("path", dataMaskingPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client DataMaskingRulesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client DataMaskingRulesClient) ListByDatabaseResponder(resp *http.Response) (result DataMaskingRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpoolactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpoolactivities.go new file mode 100644 index 000000000..ef21f85fc --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpoolactivities.go @@ -0,0 +1,109 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ElasticPoolActivitiesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type ElasticPoolActivitiesClient struct { + ManagementClient +} + +// NewElasticPoolActivitiesClient creates an instance of the ElasticPoolActivitiesClient client. +func NewElasticPoolActivitiesClient(subscriptionID string) ElasticPoolActivitiesClient { + return NewElasticPoolActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewElasticPoolActivitiesClientWithBaseURI creates an instance of the ElasticPoolActivitiesClient client. +func NewElasticPoolActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolActivitiesClient { + return ElasticPoolActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByElasticPool returns elastic pool activities. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool for which to get the current activity. +func (client ElasticPoolActivitiesClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolActivityListResult, err error) { + req, err := client.ListByElasticPoolPreparer(resourceGroupName, serverName, elasticPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ElasticPoolActivitiesClient", "ListByElasticPool", nil, "Failure preparing request") + return + } + + resp, err := client.ListByElasticPoolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ElasticPoolActivitiesClient", "ListByElasticPool", resp, "Failure sending request") + return + } + + result, err = client.ListByElasticPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ElasticPoolActivitiesClient", "ListByElasticPool", resp, "Failure responding to request") + } + + return +} + +// ListByElasticPoolPreparer prepares the ListByElasticPool request. +func (client ElasticPoolActivitiesClient) ListByElasticPoolPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "elasticPoolName": autorest.Encode("path", elasticPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByElasticPoolSender sends the ListByElasticPool request. The method will close the +// http.Response Body if it receives an error. +func (client ElasticPoolActivitiesClient) ListByElasticPoolSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByElasticPoolResponder handles the response to the ListByElasticPool request. The method always +// closes the http.Response Body. +func (client ElasticPoolActivitiesClient) ListByElasticPoolResponder(resp *http.Response) (result ElasticPoolActivityListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpooldatabaseactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpooldatabaseactivities.go new file mode 100644 index 000000000..534a3b8d5 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpooldatabaseactivities.go @@ -0,0 +1,110 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ElasticPoolDatabaseActivitiesClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type ElasticPoolDatabaseActivitiesClient struct { + ManagementClient +} + +// NewElasticPoolDatabaseActivitiesClient creates an instance of the ElasticPoolDatabaseActivitiesClient client. +func NewElasticPoolDatabaseActivitiesClient(subscriptionID string) ElasticPoolDatabaseActivitiesClient { + return NewElasticPoolDatabaseActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewElasticPoolDatabaseActivitiesClientWithBaseURI creates an instance of the ElasticPoolDatabaseActivitiesClient +// client. +func NewElasticPoolDatabaseActivitiesClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolDatabaseActivitiesClient { + return ElasticPoolDatabaseActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByElasticPool returns activity on databases inside of an elastic pool. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool. +func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPool(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolDatabaseActivityListResult, err error) { + req, err := client.ListByElasticPoolPreparer(resourceGroupName, serverName, elasticPoolName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ElasticPoolDatabaseActivitiesClient", "ListByElasticPool", nil, "Failure preparing request") + return + } + + resp, err := client.ListByElasticPoolSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ElasticPoolDatabaseActivitiesClient", "ListByElasticPool", resp, "Failure sending request") + return + } + + result, err = client.ListByElasticPoolResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ElasticPoolDatabaseActivitiesClient", "ListByElasticPool", resp, "Failure responding to request") + } + + return +} + +// ListByElasticPoolPreparer prepares the ListByElasticPool request. +func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "elasticPoolName": autorest.Encode("path", elasticPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByElasticPoolSender sends the ListByElasticPool request. The method will close the +// http.Response Body if it receives an error. +func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByElasticPoolResponder handles the response to the ListByElasticPool request. The method always +// closes the http.Response Body. +func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPoolResponder(resp *http.Response) (result ElasticPoolDatabaseActivityListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpools.go index e195ada6b..f000afdf3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpools.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/elasticpools.go @@ -14,9 +14,8 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,10 +23,9 @@ import ( "net/http" ) -// ElasticPoolsClient is the the Azure SQL Database management API provides a -// RESTful set of web services that interact with Azure SQL Database services -// to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. +// ElasticPoolsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. type ElasticPoolsClient struct { ManagementClient } @@ -37,22 +35,19 @@ func NewElasticPoolsClient(subscriptionID string) ElasticPoolsClient { return NewElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewElasticPoolsClientWithBaseURI creates an instance of the -// ElasticPoolsClient client. +// NewElasticPoolsClientWithBaseURI creates an instance of the ElasticPoolsClient client. func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) ElasticPoolsClient { return ElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a new elastic pool or updates an existing elastic -// pool. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// CreateOrUpdate creates a new elastic pool or updates an existing elastic pool. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. elasticPoolName is the -// name of the elastic pool to be operated on (updated or created). parameters -// is the required parameters for creating or updating an elastic pool. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool to be operated on (updated or created). parameters is the required parameters for creating or updating +// an elastic pool. func (client ElasticPoolsClient) CreateOrUpdate(resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool, cancel <-chan struct{}) (<-chan ElasticPool, <-chan error) { resultChan := make(chan ElasticPool, 1) errChan := make(chan error, 1) @@ -60,8 +55,10 @@ func (client ElasticPoolsClient) CreateOrUpdate(resourceGroupName string, server var err error var result ElasticPool defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -133,10 +130,9 @@ func (client ElasticPoolsClient) CreateOrUpdateResponder(resp *http.Response) (r // Delete deletes the elastic pool. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. elasticPoolName is the -// name of the elastic pool to be deleted. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool to be deleted. func (client ElasticPoolsClient) Delete(resourceGroupName string, serverName string, elasticPoolName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, serverName, elasticPoolName) if err != nil { @@ -201,10 +197,9 @@ func (client ElasticPoolsClient) DeleteResponder(resp *http.Response) (result au // Get gets an elastic pool. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. elasticPoolName is the -// name of the elastic pool to be retrieved. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool to be retrieved. func (client ElasticPoolsClient) Get(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPool, err error) { req, err := client.GetPreparer(resourceGroupName, serverName, elasticPoolName) if err != nil { @@ -268,151 +263,10 @@ func (client ElasticPoolsClient) GetResponder(resp *http.Response) (result Elast return } -// GetDatabase gets a database inside of an elastic pool. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. elasticPoolName is the -// name of the elastic pool to be retrieved. databaseName is the name of the -// database to be retrieved. -func (client ElasticPoolsClient) GetDatabase(resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (result Database, err error) { - req, err := client.GetDatabasePreparer(resourceGroupName, serverName, elasticPoolName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "GetDatabase", nil, "Failure preparing request") - return - } - - resp, err := client.GetDatabaseSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "GetDatabase", resp, "Failure sending request") - return - } - - result, err = client.GetDatabaseResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "GetDatabase", resp, "Failure responding to request") - } - - return -} - -// GetDatabasePreparer prepares the GetDatabase request. -func (client ElasticPoolsClient) GetDatabasePreparer(resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// GetDatabaseSender sends the GetDatabase request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) GetDatabaseSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// GetDatabaseResponder handles the response to the GetDatabase request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) GetDatabaseResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListActivity returns elastic pool activities. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. elasticPoolName is the -// name of the elastic pool for which to get the current activity. -func (client ElasticPoolsClient) ListActivity(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolActivityListResult, err error) { - req, err := client.ListActivityPreparer(resourceGroupName, serverName, elasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListActivity", nil, "Failure preparing request") - return - } - - resp, err := client.ListActivitySender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListActivity", resp, "Failure sending request") - return - } - - result, err = client.ListActivityResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListActivity", resp, "Failure responding to request") - } - - return -} - -// ListActivityPreparer prepares the ListActivity request. -func (client ElasticPoolsClient) ListActivityPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "elasticPoolName": autorest.Encode("path", elasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListActivitySender sends the ListActivity request. The method will close the -// http.Response Body if it receives an error. -func (client ElasticPoolsClient) ListActivitySender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListActivityResponder handles the response to the ListActivity request. The method always -// closes the http.Response Body. -func (client ElasticPoolsClient) ListActivityResponder(resp *http.Response) (result ElasticPoolActivityListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - // ListByServer returns a list of elastic pools in a server. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. func (client ElasticPoolsClient) ListByServer(resourceGroupName string, serverName string) (result ElasticPoolListResult, err error) { req, err := client.ListByServerPreparer(resourceGroupName, serverName) if err != nil { @@ -475,37 +329,35 @@ func (client ElasticPoolsClient) ListByServerResponder(resp *http.Response) (res return } -// ListDatabaseActivity returns activity on databases inside of an elastic -// pool. +// ListMetricDefinitions returns elastic pool metric definitions. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. elasticPoolName is the -// name of the elastic pool. -func (client ElasticPoolsClient) ListDatabaseActivity(resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolDatabaseActivityListResult, err error) { - req, err := client.ListDatabaseActivityPreparer(resourceGroupName, serverName, elasticPoolName) +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool. +func (client ElasticPoolsClient) ListMetricDefinitions(resourceGroupName string, serverName string, elasticPoolName string) (result MetricDefinitionListResult, err error) { + req, err := client.ListMetricDefinitionsPreparer(resourceGroupName, serverName, elasticPoolName) if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabaseActivity", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", nil, "Failure preparing request") return } - resp, err := client.ListDatabaseActivitySender(req) + resp, err := client.ListMetricDefinitionsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabaseActivity", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", resp, "Failure sending request") return } - result, err = client.ListDatabaseActivityResponder(resp) + result, err = client.ListMetricDefinitionsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabaseActivity", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", resp, "Failure responding to request") } return } -// ListDatabaseActivityPreparer prepares the ListDatabaseActivity request. -func (client ElasticPoolsClient) ListDatabaseActivityPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { +// ListMetricDefinitionsPreparer prepares the ListMetricDefinitions request. +func (client ElasticPoolsClient) ListMetricDefinitionsPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "elasticPoolName": autorest.Encode("path", elasticPoolName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -521,20 +373,20 @@ func (client ElasticPoolsClient) ListDatabaseActivityPreparer(resourceGroupName preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// ListDatabaseActivitySender sends the ListDatabaseActivity request. The method will close the +// ListMetricDefinitionsSender sends the ListMetricDefinitions request. The method will close the // http.Response Body if it receives an error. -func (client ElasticPoolsClient) ListDatabaseActivitySender(req *http.Request) (*http.Response, error) { +func (client ElasticPoolsClient) ListMetricDefinitionsSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListDatabaseActivityResponder handles the response to the ListDatabaseActivity request. The method always +// ListMetricDefinitionsResponder handles the response to the ListMetricDefinitions request. The method always // closes the http.Response Body. -func (client ElasticPoolsClient) ListDatabaseActivityResponder(resp *http.Response) (result ElasticPoolDatabaseActivityListResult, err error) { +func (client ElasticPoolsClient) ListMetricDefinitionsResponder(resp *http.Response) (result MetricDefinitionListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -545,36 +397,118 @@ func (client ElasticPoolsClient) ListDatabaseActivityResponder(resp *http.Respon return } -// ListDatabases returns a list of databases in an elastic pool. +// ListMetrics returns elastic pool metrics. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. elasticPoolName is the -// name of the elastic pool to be retrieved. -func (client ElasticPoolsClient) ListDatabases(resourceGroupName string, serverName string, elasticPoolName string) (result DatabaseListResult, err error) { - req, err := client.ListDatabasesPreparer(resourceGroupName, serverName, elasticPoolName) +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool. filter is an OData filter expression that describes a subset of metrics to return. +func (client ElasticPoolsClient) ListMetrics(resourceGroupName string, serverName string, elasticPoolName string, filter string) (result MetricListResult, err error) { + req, err := client.ListMetricsPreparer(resourceGroupName, serverName, elasticPoolName, filter) if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabases", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", nil, "Failure preparing request") return } - resp, err := client.ListDatabasesSender(req) + resp, err := client.ListMetricsSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabases", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", resp, "Failure sending request") return } - result, err = client.ListDatabasesResponder(resp) + result, err = client.ListMetricsResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListDatabases", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", resp, "Failure responding to request") } return } -// ListDatabasesPreparer prepares the ListDatabases request. -func (client ElasticPoolsClient) ListDatabasesPreparer(resourceGroupName string, serverName string, elasticPoolName string) (*http.Request, error) { +// ListMetricsPreparer prepares the ListMetrics request. +func (client ElasticPoolsClient) ListMetricsPreparer(resourceGroupName string, serverName string, elasticPoolName string, filter string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "elasticPoolName": autorest.Encode("path", elasticPoolName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "$filter": autorest.Encode("query", filter), + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListMetricsSender sends the ListMetrics request. The method will close the +// http.Response Body if it receives an error. +func (client ElasticPoolsClient) ListMetricsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListMetricsResponder handles the response to the ListMetrics request. The method always +// closes the http.Response Body. +func (client ElasticPoolsClient) ListMetricsResponder(resp *http.Response) (result MetricListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates an existing elastic pool. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. elasticPoolName is the name of the +// elastic pool to be updated. parameters is the required parameters for updating an elastic pool. +func (client ElasticPoolsClient) Update(resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, cancel <-chan struct{}) (<-chan ElasticPool, <-chan error) { + resultChan := make(chan ElasticPool, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result ElasticPool + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, serverName, elasticPoolName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client ElasticPoolsClient) UpdatePreparer(resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "elasticPoolName": autorest.Encode("path", elasticPoolName), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -588,26 +522,30 @@ func (client ElasticPoolsClient) ListDatabasesPreparer(resourceGroupName string, } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsJSON(), + autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", pathParameters), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } -// ListDatabasesSender sends the ListDatabases request. The method will close the +// UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. -func (client ElasticPoolsClient) ListDatabasesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) +func (client ElasticPoolsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } -// ListDatabasesResponder handles the response to the ListDatabases request. The method always +// UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client ElasticPoolsClient) ListDatabasesResponder(resp *http.Response) (result DatabaseListResult, err error) { +func (client ElasticPoolsClient) UpdateResponder(resp *http.Response) (result ElasticPool, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/encryptionprotectors.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/encryptionprotectors.go new file mode 100644 index 000000000..dc3a0686c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/encryptionprotectors.go @@ -0,0 +1,331 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// EncryptionProtectorsClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type EncryptionProtectorsClient struct { + ManagementClient +} + +// NewEncryptionProtectorsClient creates an instance of the EncryptionProtectorsClient client. +func NewEncryptionProtectorsClient(subscriptionID string) EncryptionProtectorsClient { + return NewEncryptionProtectorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewEncryptionProtectorsClientWithBaseURI creates an instance of the EncryptionProtectorsClient client. +func NewEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID string) EncryptionProtectorsClient { + return EncryptionProtectorsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate updates an existing encryption protector. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. encryptionProtectorName is the name +// of the encryption protector to be updated. parameters is the requested encryption protector resource state. +func (client EncryptionProtectorsClient) CreateOrUpdate(resourceGroupName string, serverName string, encryptionProtectorName string, parameters EncryptionProtector, cancel <-chan struct{}) (<-chan EncryptionProtector, <-chan error) { + resultChan := make(chan EncryptionProtector, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result EncryptionProtector + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, encryptionProtectorName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client EncryptionProtectorsClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, encryptionProtectorName string, parameters EncryptionProtector, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "encryptionProtectorName": autorest.Encode("path", encryptionProtectorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client EncryptionProtectorsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client EncryptionProtectorsClient) CreateOrUpdateResponder(resp *http.Response) (result EncryptionProtector, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a server encryption protector. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. encryptionProtectorName is the name +// of the encryption protector to be retrieved. +func (client EncryptionProtectorsClient) Get(resourceGroupName string, serverName string, encryptionProtectorName string) (result EncryptionProtector, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, encryptionProtectorName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client EncryptionProtectorsClient) GetPreparer(resourceGroupName string, serverName string, encryptionProtectorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "encryptionProtectorName": autorest.Encode("path", encryptionProtectorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client EncryptionProtectorsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client EncryptionProtectorsClient) GetResponder(resp *http.Response) (result EncryptionProtector, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets a list of server encryption protectors +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client EncryptionProtectorsClient) ListByServer(resourceGroupName string, serverName string) (result EncryptionProtectorListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client EncryptionProtectorsClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client EncryptionProtectorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client EncryptionProtectorsClient) ListByServerResponder(resp *http.Response) (result EncryptionProtectorListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServerNextResults retrieves the next set of results, if any. +func (client EncryptionProtectorsClient) ListByServerNextResults(lastResults EncryptionProtectorListResult) (result EncryptionProtectorListResult, err error) { + req, err := lastResults.EncryptionProtectorListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", resp, "Failure sending next results request") + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "ListByServer", resp, "Failure responding to next results request") + } + + return +} + +// ListByServerComplete gets all elements from the list without paging. +func (client EncryptionProtectorsClient) ListByServerComplete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan EncryptionProtector, <-chan error) { + resultChan := make(chan EncryptionProtector) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByServer(resourceGroupName, serverName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByServerNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/failovergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/failovergroups.go new file mode 100644 index 000000000..13c28fd8f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/failovergroups.go @@ -0,0 +1,682 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// FailoverGroupsClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type FailoverGroupsClient struct { + ManagementClient +} + +// NewFailoverGroupsClient creates an instance of the FailoverGroupsClient client. +func NewFailoverGroupsClient(subscriptionID string) FailoverGroupsClient { + return NewFailoverGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewFailoverGroupsClientWithBaseURI creates an instance of the FailoverGroupsClient client. +func NewFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) FailoverGroupsClient { + return FailoverGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a failover group. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server containing the failover group. +// failoverGroupName is the name of the failover group. parameters is the failover group parameters. +func (client FailoverGroupsClient) CreateOrUpdate(resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup, cancel <-chan struct{}) (<-chan FailoverGroup, <-chan error) { + resultChan := make(chan FailoverGroup, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.FailoverGroupProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.FailoverGroupProperties.ReadWriteEndpoint", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.FailoverGroupProperties.PartnerServers", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "sql.FailoverGroupsClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result FailoverGroup + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, failoverGroupName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client FailoverGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "failoverGroupName": autorest.Encode("path", failoverGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client FailoverGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client FailoverGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result FailoverGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a failover group. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server containing the failover group. +// failoverGroupName is the name of the failover group. +func (client FailoverGroupsClient) Delete(resourceGroupName string, serverName string, failoverGroupName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, failoverGroupName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client FailoverGroupsClient) DeletePreparer(resourceGroupName string, serverName string, failoverGroupName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "failoverGroupName": autorest.Encode("path", failoverGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client FailoverGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client FailoverGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Failover fails over from the current primary server to this server. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server containing the failover group. +// failoverGroupName is the name of the failover group. +func (client FailoverGroupsClient) Failover(resourceGroupName string, serverName string, failoverGroupName string, cancel <-chan struct{}) (<-chan FailoverGroup, <-chan error) { + resultChan := make(chan FailoverGroup, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result FailoverGroup + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.FailoverPreparer(resourceGroupName, serverName, failoverGroupName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Failover", nil, "Failure preparing request") + return + } + + resp, err := client.FailoverSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Failover", resp, "Failure sending request") + return + } + + result, err = client.FailoverResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Failover", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// FailoverPreparer prepares the Failover request. +func (client FailoverGroupsClient) FailoverPreparer(resourceGroupName string, serverName string, failoverGroupName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "failoverGroupName": autorest.Encode("path", failoverGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// FailoverSender sends the Failover request. The method will close the +// http.Response Body if it receives an error. +func (client FailoverGroupsClient) FailoverSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// FailoverResponder handles the response to the Failover request. The method always +// closes the http.Response Body. +func (client FailoverGroupsClient) FailoverResponder(resp *http.Response) (result FailoverGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ForceFailoverAllowDataLoss fails over from the current primary server to this server. This operation might result in +// data loss. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The +// channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server containing the failover group. +// failoverGroupName is the name of the failover group. +func (client FailoverGroupsClient) ForceFailoverAllowDataLoss(resourceGroupName string, serverName string, failoverGroupName string, cancel <-chan struct{}) (<-chan FailoverGroup, <-chan error) { + resultChan := make(chan FailoverGroup, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result FailoverGroup + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.ForceFailoverAllowDataLossPreparer(resourceGroupName, serverName, failoverGroupName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ForceFailoverAllowDataLoss", nil, "Failure preparing request") + return + } + + resp, err := client.ForceFailoverAllowDataLossSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ForceFailoverAllowDataLoss", resp, "Failure sending request") + return + } + + result, err = client.ForceFailoverAllowDataLossResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ForceFailoverAllowDataLoss", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// ForceFailoverAllowDataLossPreparer prepares the ForceFailoverAllowDataLoss request. +func (client FailoverGroupsClient) ForceFailoverAllowDataLossPreparer(resourceGroupName string, serverName string, failoverGroupName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "failoverGroupName": autorest.Encode("path", failoverGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/forceFailoverAllowDataLoss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// ForceFailoverAllowDataLossSender sends the ForceFailoverAllowDataLoss request. The method will close the +// http.Response Body if it receives an error. +func (client FailoverGroupsClient) ForceFailoverAllowDataLossSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// ForceFailoverAllowDataLossResponder handles the response to the ForceFailoverAllowDataLoss request. The method always +// closes the http.Response Body. +func (client FailoverGroupsClient) ForceFailoverAllowDataLossResponder(resp *http.Response) (result FailoverGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a failover group. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server containing the failover group. +// failoverGroupName is the name of the failover group. +func (client FailoverGroupsClient) Get(resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroup, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, failoverGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client FailoverGroupsClient) GetPreparer(resourceGroupName string, serverName string, failoverGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "failoverGroupName": autorest.Encode("path", failoverGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client FailoverGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client FailoverGroupsClient) GetResponder(resp *http.Response) (result FailoverGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer lists the failover groups in a server. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server containing the failover group. +func (client FailoverGroupsClient) ListByServer(resourceGroupName string, serverName string) (result FailoverGroupListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client FailoverGroupsClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client FailoverGroupsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client FailoverGroupsClient) ListByServerResponder(resp *http.Response) (result FailoverGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServerNextResults retrieves the next set of results, if any. +func (client FailoverGroupsClient) ListByServerNextResults(lastResults FailoverGroupListResult) (result FailoverGroupListResult, err error) { + req, err := lastResults.FailoverGroupListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", resp, "Failure sending next results request") + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ListByServer", resp, "Failure responding to next results request") + } + + return +} + +// ListByServerComplete gets all elements from the list without paging. +func (client FailoverGroupsClient) ListByServerComplete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan FailoverGroup, <-chan error) { + resultChan := make(chan FailoverGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByServer(resourceGroupName, serverName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByServerNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates a failover group. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server containing the failover group. +// failoverGroupName is the name of the failover group. parameters is the failover group parameters. +func (client FailoverGroupsClient) Update(resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate, cancel <-chan struct{}) (<-chan FailoverGroup, <-chan error) { + resultChan := make(chan FailoverGroup, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result FailoverGroup + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, serverName, failoverGroupName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client FailoverGroupsClient) UpdatePreparer(resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "failoverGroupName": autorest.Encode("path", failoverGroupName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client FailoverGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client FailoverGroupsClient) UpdateResponder(resp *http.Response) (result FailoverGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/firewallrules.go index e4f3fa4c0..e59dd2551 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/firewallrules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/firewallrules.go @@ -14,9 +14,8 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,28 @@ import ( "net/http" ) -// FirewallRulesClient is the the Azure SQL Database management API provides a -// RESTful set of web services that interact with Azure SQL Database services -// to manage your databases. The API enables you to create, retrieve, update, +// FirewallRulesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, // and delete databases. type FirewallRulesClient struct { ManagementClient } -// NewFirewallRulesClient creates an instance of the FirewallRulesClient -// client. +// NewFirewallRulesClient creates an instance of the FirewallRulesClient client. func NewFirewallRulesClient(subscriptionID string) FirewallRulesClient { return NewFirewallRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFirewallRulesClientWithBaseURI creates an instance of the -// FirewallRulesClient client. +// NewFirewallRulesClientWithBaseURI creates an instance of the FirewallRulesClient client. func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) FirewallRulesClient { return FirewallRulesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate creates or updates a firewall rule. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. firewallRuleName is the -// name of the firewall rule. parameters is the required parameters for -// creating or updating a firewall rule. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. firewallRuleName is the name of the +// firewall rule. parameters is the required parameters for creating or updating a firewall rule. func (client FirewallRulesClient) CreateOrUpdate(resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (result FirewallRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -128,10 +122,9 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) ( // Delete deletes a firewall rule. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. firewallRuleName is the -// name of the firewall rule. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. firewallRuleName is the name of the +// firewall rule. func (client FirewallRulesClient) Delete(resourceGroupName string, serverName string, firewallRuleName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, serverName, firewallRuleName) if err != nil { @@ -196,10 +189,9 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a // Get gets a firewall rule. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. firewallRuleName is the -// name of the firewall rule. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. firewallRuleName is the name of the +// firewall rule. func (client FirewallRulesClient) Get(resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) { req, err := client.GetPreparer(resourceGroupName, serverName, firewallRuleName) if err != nil { @@ -265,9 +257,8 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire // ListByServer returns a list of firewall rules. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. func (client FirewallRulesClient) ListByServer(resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) { req, err := client.ListByServerPreparer(resourceGroupName, serverName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/geobackuppolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/geobackuppolicies.go new file mode 100644 index 000000000..b841e2d73 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/geobackuppolicies.go @@ -0,0 +1,257 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// GeoBackupPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type GeoBackupPoliciesClient struct { + ManagementClient +} + +// NewGeoBackupPoliciesClient creates an instance of the GeoBackupPoliciesClient client. +func NewGeoBackupPoliciesClient(subscriptionID string) GeoBackupPoliciesClient { + return NewGeoBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGeoBackupPoliciesClientWithBaseURI creates an instance of the GeoBackupPoliciesClient client. +func NewGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) GeoBackupPoliciesClient { + return GeoBackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate updates a database geo backup policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. geoBackupPolicyName is the name of the geo backup policy. parameters is the required parameters for +// creating or updating the geo backup policy. +func (client GeoBackupPoliciesClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName string, parameters GeoBackupPolicy) (result GeoBackupPolicy, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.GeoBackupPolicyProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "sql.GeoBackupPoliciesClient", "CreateOrUpdate") + } + + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, geoBackupPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client GeoBackupPoliciesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName string, parameters GeoBackupPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "geoBackupPolicyName": autorest.Encode("path", geoBackupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client GeoBackupPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client GeoBackupPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result GeoBackupPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a geo backup policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. geoBackupPolicyName is the name of the geo backup policy. +func (client GeoBackupPoliciesClient) Get(resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName string) (result GeoBackupPolicy, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, geoBackupPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client GeoBackupPoliciesClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, geoBackupPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "geoBackupPolicyName": autorest.Encode("path", geoBackupPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client GeoBackupPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client GeoBackupPoliciesClient) GetResponder(resp *http.Response) (result GeoBackupPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabase returns a list of geo backup policies. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database. +func (client GeoBackupPoliciesClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string) (result GeoBackupPolicyListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client GeoBackupPoliciesClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client GeoBackupPoliciesClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client GeoBackupPoliciesClient) ListByDatabaseResponder(resp *http.Response) (result GeoBackupPolicyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/models.go index 6f42dca75..f0636cce9 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/models.go @@ -14,14 +14,15 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" - "github.com/satori/uuid" + "github.com/Azure/go-autorest/autorest/to" + uuid "github.com/satori/go.uuid" + "net/http" ) // AuthenticationType enumerates the values for authentication type. @@ -34,35 +35,52 @@ const ( SQL AuthenticationType = "SQL" ) -// BlobAuditingPolicyState enumerates the values for blob auditing policy -// state. +// BackupLongTermRetentionPolicyState enumerates the values for backup long term retention policy state. +type BackupLongTermRetentionPolicyState string + +const ( + // Disabled specifies the disabled state for backup long term retention policy state. + Disabled BackupLongTermRetentionPolicyState = "Disabled" + // Enabled specifies the enabled state for backup long term retention policy state. + Enabled BackupLongTermRetentionPolicyState = "Enabled" +) + +// BlobAuditingPolicyState enumerates the values for blob auditing policy state. type BlobAuditingPolicyState string const ( - // Disabled specifies the disabled state for blob auditing policy state. - Disabled BlobAuditingPolicyState = "Disabled" - // Enabled specifies the enabled state for blob auditing policy state. - Enabled BlobAuditingPolicyState = "Enabled" + // BlobAuditingPolicyStateDisabled specifies the blob auditing policy state disabled state for blob auditing policy + // state. + BlobAuditingPolicyStateDisabled BlobAuditingPolicyState = "Disabled" + // BlobAuditingPolicyStateEnabled specifies the blob auditing policy state enabled state for blob auditing policy + // state. + BlobAuditingPolicyStateEnabled BlobAuditingPolicyState = "Enabled" ) // CapabilityStatus enumerates the values for capability status. type CapabilityStatus string const ( - // CapabilityStatusAvailable specifies the capability status available - // state for capability status. + // CapabilityStatusAvailable specifies the capability status available state for capability status. CapabilityStatusAvailable CapabilityStatus = "Available" - // CapabilityStatusDefault specifies the capability status default state - // for capability status. + // CapabilityStatusDefault specifies the capability status default state for capability status. CapabilityStatusDefault CapabilityStatus = "Default" - // CapabilityStatusDisabled specifies the capability status disabled state - // for capability status. + // CapabilityStatusDisabled specifies the capability status disabled state for capability status. CapabilityStatusDisabled CapabilityStatus = "Disabled" - // CapabilityStatusVisible specifies the capability status visible state - // for capability status. + // CapabilityStatusVisible specifies the capability status visible state for capability status. CapabilityStatusVisible CapabilityStatus = "Visible" ) +// CheckNameAvailabilityReason enumerates the values for check name availability reason. +type CheckNameAvailabilityReason string + +const ( + // AlreadyExists specifies the already exists state for check name availability reason. + AlreadyExists CheckNameAvailabilityReason = "AlreadyExists" + // Invalid specifies the invalid state for check name availability reason. + Invalid CheckNameAvailabilityReason = "Invalid" +) + // CreateMode enumerates the values for create mode. type CreateMode string @@ -71,20 +89,17 @@ const ( Copy CreateMode = "Copy" // Default specifies the default state for create mode. Default CreateMode = "Default" - // NonReadableSecondary specifies the non readable secondary state for - // create mode. + // NonReadableSecondary specifies the non readable secondary state for create mode. NonReadableSecondary CreateMode = "NonReadableSecondary" // OnlineSecondary specifies the online secondary state for create mode. OnlineSecondary CreateMode = "OnlineSecondary" - // PointInTimeRestore specifies the point in time restore state for create - // mode. + // PointInTimeRestore specifies the point in time restore state for create mode. PointInTimeRestore CreateMode = "PointInTimeRestore" // Recovery specifies the recovery state for create mode. Recovery CreateMode = "Recovery" // Restore specifies the restore state for create mode. Restore CreateMode = "Restore" - // RestoreLongTermRetentionBackup specifies the restore long term retention - // backup state for create mode. + // RestoreLongTermRetentionBackup specifies the restore long term retention backup state for create mode. RestoreLongTermRetentionBackup CreateMode = "RestoreLongTermRetentionBackup" ) @@ -114,18 +129,53 @@ const ( Web DatabaseEdition = "Web" ) +// DataMaskingFunction enumerates the values for data masking function. +type DataMaskingFunction string + +const ( + // DataMaskingFunctionCCN specifies the data masking function ccn state for data masking function. + DataMaskingFunctionCCN DataMaskingFunction = "CCN" + // DataMaskingFunctionDefault specifies the data masking function default state for data masking function. + DataMaskingFunctionDefault DataMaskingFunction = "Default" + // DataMaskingFunctionEmail specifies the data masking function email state for data masking function. + DataMaskingFunctionEmail DataMaskingFunction = "Email" + // DataMaskingFunctionNumber specifies the data masking function number state for data masking function. + DataMaskingFunctionNumber DataMaskingFunction = "Number" + // DataMaskingFunctionSSN specifies the data masking function ssn state for data masking function. + DataMaskingFunctionSSN DataMaskingFunction = "SSN" + // DataMaskingFunctionText specifies the data masking function text state for data masking function. + DataMaskingFunctionText DataMaskingFunction = "Text" +) + +// DataMaskingRuleState enumerates the values for data masking rule state. +type DataMaskingRuleState string + +const ( + // DataMaskingRuleStateDisabled specifies the data masking rule state disabled state for data masking rule state. + DataMaskingRuleStateDisabled DataMaskingRuleState = "Disabled" + // DataMaskingRuleStateEnabled specifies the data masking rule state enabled state for data masking rule state. + DataMaskingRuleStateEnabled DataMaskingRuleState = "Enabled" +) + +// DataMaskingState enumerates the values for data masking state. +type DataMaskingState string + +const ( + // DataMaskingStateDisabled specifies the data masking state disabled state for data masking state. + DataMaskingStateDisabled DataMaskingState = "Disabled" + // DataMaskingStateEnabled specifies the data masking state enabled state for data masking state. + DataMaskingStateEnabled DataMaskingState = "Enabled" +) + // ElasticPoolEdition enumerates the values for elastic pool edition. type ElasticPoolEdition string const ( - // ElasticPoolEditionBasic specifies the elastic pool edition basic state - // for elastic pool edition. + // ElasticPoolEditionBasic specifies the elastic pool edition basic state for elastic pool edition. ElasticPoolEditionBasic ElasticPoolEdition = "Basic" - // ElasticPoolEditionPremium specifies the elastic pool edition premium - // state for elastic pool edition. + // ElasticPoolEditionPremium specifies the elastic pool edition premium state for elastic pool edition. ElasticPoolEditionPremium ElasticPoolEdition = "Premium" - // ElasticPoolEditionStandard specifies the elastic pool edition standard - // state for elastic pool edition. + // ElasticPoolEditionStandard specifies the elastic pool edition standard state for elastic pool edition. ElasticPoolEditionStandard ElasticPoolEdition = "Standard" ) @@ -133,17 +183,60 @@ const ( type ElasticPoolState string const ( - // ElasticPoolStateCreating specifies the elastic pool state creating state - // for elastic pool state. + // ElasticPoolStateCreating specifies the elastic pool state creating state for elastic pool state. ElasticPoolStateCreating ElasticPoolState = "Creating" - // ElasticPoolStateDisabled specifies the elastic pool state disabled state - // for elastic pool state. + // ElasticPoolStateDisabled specifies the elastic pool state disabled state for elastic pool state. ElasticPoolStateDisabled ElasticPoolState = "Disabled" - // ElasticPoolStateReady specifies the elastic pool state ready state for - // elastic pool state. + // ElasticPoolStateReady specifies the elastic pool state ready state for elastic pool state. ElasticPoolStateReady ElasticPoolState = "Ready" ) +// FailoverGroupReplicationRole enumerates the values for failover group replication role. +type FailoverGroupReplicationRole string + +const ( + // Primary specifies the primary state for failover group replication role. + Primary FailoverGroupReplicationRole = "Primary" + // Secondary specifies the secondary state for failover group replication role. + Secondary FailoverGroupReplicationRole = "Secondary" +) + +// GeoBackupPolicyState enumerates the values for geo backup policy state. +type GeoBackupPolicyState string + +const ( + // GeoBackupPolicyStateDisabled specifies the geo backup policy state disabled state for geo backup policy state. + GeoBackupPolicyStateDisabled GeoBackupPolicyState = "Disabled" + // GeoBackupPolicyStateEnabled specifies the geo backup policy state enabled state for geo backup policy state. + GeoBackupPolicyStateEnabled GeoBackupPolicyState = "Enabled" +) + +// IdentityType enumerates the values for identity type. +type IdentityType string + +const ( + // SystemAssigned specifies the system assigned state for identity type. + SystemAssigned IdentityType = "SystemAssigned" +) + +// ManagementOperationState enumerates the values for management operation state. +type ManagementOperationState string + +const ( + // CancelInProgress specifies the cancel in progress state for management operation state. + CancelInProgress ManagementOperationState = "CancelInProgress" + // Cancelled specifies the cancelled state for management operation state. + Cancelled ManagementOperationState = "Cancelled" + // Failed specifies the failed state for management operation state. + Failed ManagementOperationState = "Failed" + // InProgress specifies the in progress state for management operation state. + InProgress ManagementOperationState = "InProgress" + // Pending specifies the pending state for management operation state. + Pending ManagementOperationState = "Pending" + // Succeeded specifies the succeeded state for management operation state. + Succeeded ManagementOperationState = "Succeeded" +) + // MaxSizeUnits enumerates the values for max size units. type MaxSizeUnits string @@ -158,6 +251,16 @@ const ( Terabytes MaxSizeUnits = "Terabytes" ) +// OperationOrigin enumerates the values for operation origin. +type OperationOrigin string + +const ( + // OperationOriginSystem specifies the operation origin system state for operation origin. + OperationOriginSystem OperationOrigin = "system" + // OperationOriginUser specifies the operation origin user state for operation origin. + OperationOriginUser OperationOrigin = "user" +) + // PerformanceLevelUnit enumerates the values for performance level unit. type PerformanceLevelUnit string @@ -166,17 +269,56 @@ const ( DTU PerformanceLevelUnit = "DTU" ) +// PrimaryAggregationType enumerates the values for primary aggregation type. +type PrimaryAggregationType string + +const ( + // Average specifies the average state for primary aggregation type. + Average PrimaryAggregationType = "Average" + // Count specifies the count state for primary aggregation type. + Count PrimaryAggregationType = "Count" + // Maximum specifies the maximum state for primary aggregation type. + Maximum PrimaryAggregationType = "Maximum" + // Minimum specifies the minimum state for primary aggregation type. + Minimum PrimaryAggregationType = "Minimum" + // None specifies the none state for primary aggregation type. + None PrimaryAggregationType = "None" + // Total specifies the total state for primary aggregation type. + Total PrimaryAggregationType = "Total" +) + +// ReadOnlyEndpointFailoverPolicy enumerates the values for read only endpoint failover policy. +type ReadOnlyEndpointFailoverPolicy string + +const ( + // ReadOnlyEndpointFailoverPolicyDisabled specifies the read only endpoint failover policy disabled state for read only + // endpoint failover policy. + ReadOnlyEndpointFailoverPolicyDisabled ReadOnlyEndpointFailoverPolicy = "Disabled" + // ReadOnlyEndpointFailoverPolicyEnabled specifies the read only endpoint failover policy enabled state for read only + // endpoint failover policy. + ReadOnlyEndpointFailoverPolicyEnabled ReadOnlyEndpointFailoverPolicy = "Enabled" +) + // ReadScale enumerates the values for read scale. type ReadScale string const ( - // ReadScaleDisabled specifies the read scale disabled state for read - // scale. + // ReadScaleDisabled specifies the read scale disabled state for read scale. ReadScaleDisabled ReadScale = "Disabled" // ReadScaleEnabled specifies the read scale enabled state for read scale. ReadScaleEnabled ReadScale = "Enabled" ) +// ReadWriteEndpointFailoverPolicy enumerates the values for read write endpoint failover policy. +type ReadWriteEndpointFailoverPolicy string + +const ( + // Automatic specifies the automatic state for read write endpoint failover policy. + Automatic ReadWriteEndpointFailoverPolicy = "Automatic" + // Manual specifies the manual state for read write endpoint failover policy. + Manual ReadWriteEndpointFailoverPolicy = "Manual" +) + // RecommendedIndexAction enumerates the values for recommended index action. type RecommendedIndexAction string @@ -193,29 +335,29 @@ const ( type RecommendedIndexState string const ( - // Active specifies the active state for recommended index state. - Active RecommendedIndexState = "Active" - // Blocked specifies the blocked state for recommended index state. - Blocked RecommendedIndexState = "Blocked" - // Executing specifies the executing state for recommended index state. - Executing RecommendedIndexState = "Executing" - // Expired specifies the expired state for recommended index state. - Expired RecommendedIndexState = "Expired" - // Ignored specifies the ignored state for recommended index state. - Ignored RecommendedIndexState = "Ignored" - // Pending specifies the pending state for recommended index state. - Pending RecommendedIndexState = "Pending" - // PendingRevert specifies the pending revert state for recommended index + // RecommendedIndexStateActive specifies the recommended index state active state for recommended index state. + RecommendedIndexStateActive RecommendedIndexState = "Active" + // RecommendedIndexStateBlocked specifies the recommended index state blocked state for recommended index state. + RecommendedIndexStateBlocked RecommendedIndexState = "Blocked" + // RecommendedIndexStateExecuting specifies the recommended index state executing state for recommended index state. + RecommendedIndexStateExecuting RecommendedIndexState = "Executing" + // RecommendedIndexStateExpired specifies the recommended index state expired state for recommended index state. + RecommendedIndexStateExpired RecommendedIndexState = "Expired" + // RecommendedIndexStateIgnored specifies the recommended index state ignored state for recommended index state. + RecommendedIndexStateIgnored RecommendedIndexState = "Ignored" + // RecommendedIndexStatePending specifies the recommended index state pending state for recommended index state. + RecommendedIndexStatePending RecommendedIndexState = "Pending" + // RecommendedIndexStatePendingRevert specifies the recommended index state pending revert state for recommended index // state. - PendingRevert RecommendedIndexState = "Pending Revert" - // Reverted specifies the reverted state for recommended index state. - Reverted RecommendedIndexState = "Reverted" - // Reverting specifies the reverting state for recommended index state. - Reverting RecommendedIndexState = "Reverting" - // Success specifies the success state for recommended index state. - Success RecommendedIndexState = "Success" - // Verifying specifies the verifying state for recommended index state. - Verifying RecommendedIndexState = "Verifying" + RecommendedIndexStatePendingRevert RecommendedIndexState = "Pending Revert" + // RecommendedIndexStateReverted specifies the recommended index state reverted state for recommended index state. + RecommendedIndexStateReverted RecommendedIndexState = "Reverted" + // RecommendedIndexStateReverting specifies the recommended index state reverting state for recommended index state. + RecommendedIndexStateReverting RecommendedIndexState = "Reverting" + // RecommendedIndexStateSuccess specifies the recommended index state success state for recommended index state. + RecommendedIndexStateSuccess RecommendedIndexState = "Success" + // RecommendedIndexStateVerifying specifies the recommended index state verifying state for recommended index state. + RecommendedIndexStateVerifying RecommendedIndexState = "Verifying" ) // RecommendedIndexType enumerates the values for recommended index type. @@ -224,13 +366,11 @@ type RecommendedIndexType string const ( // CLUSTERED specifies the clustered state for recommended index type. CLUSTERED RecommendedIndexType = "CLUSTERED" - // CLUSTEREDCOLUMNSTORE specifies the clusteredcolumnstore state for - // recommended index type. + // CLUSTEREDCOLUMNSTORE specifies the clusteredcolumnstore state for recommended index type. CLUSTEREDCOLUMNSTORE RecommendedIndexType = "CLUSTERED COLUMNSTORE" // COLUMNSTORE specifies the columnstore state for recommended index type. COLUMNSTORE RecommendedIndexType = "COLUMNSTORE" - // NONCLUSTERED specifies the nonclustered state for recommended index - // type. + // NONCLUSTERED specifies the nonclustered state for recommended index type. NONCLUSTERED RecommendedIndexType = "NONCLUSTERED" ) @@ -238,20 +378,16 @@ const ( type ReplicationRole string const ( - // ReplicationRoleCopy specifies the replication role copy state for - // replication role. + // ReplicationRoleCopy specifies the replication role copy state for replication role. ReplicationRoleCopy ReplicationRole = "Copy" - // ReplicationRoleNonReadableSecondary specifies the replication role non - // readable secondary state for replication role. + // ReplicationRoleNonReadableSecondary specifies the replication role non readable secondary state for replication + // role. ReplicationRoleNonReadableSecondary ReplicationRole = "NonReadableSecondary" - // ReplicationRolePrimary specifies the replication role primary state for - // replication role. + // ReplicationRolePrimary specifies the replication role primary state for replication role. ReplicationRolePrimary ReplicationRole = "Primary" - // ReplicationRoleSecondary specifies the replication role secondary state - // for replication role. + // ReplicationRoleSecondary specifies the replication role secondary state for replication role. ReplicationRoleSecondary ReplicationRole = "Secondary" - // ReplicationRoleSource specifies the replication role source state for - // replication role. + // ReplicationRoleSource specifies the replication role source state for replication role. ReplicationRoleSource ReplicationRole = "Source" ) @@ -269,14 +405,14 @@ const ( SUSPENDED ReplicationState = "SUSPENDED" ) -// RestorePointTypes enumerates the values for restore point types. -type RestorePointTypes string +// RestorePointType enumerates the values for restore point type. +type RestorePointType string const ( - // CONTINUOUS specifies the continuous state for restore point types. - CONTINUOUS RestorePointTypes = "CONTINUOUS" - // DISCRETE specifies the discrete state for restore point types. - DISCRETE RestorePointTypes = "DISCRETE" + // CONTINUOUS specifies the continuous state for restore point type. + CONTINUOUS RestorePointType = "CONTINUOUS" + // DISCRETE specifies the discrete state for restore point type. + DISCRETE RestorePointType = "DISCRETE" ) // SampleName enumerates the values for sample name. @@ -287,124 +423,99 @@ const ( AdventureWorksLT SampleName = "AdventureWorksLT" ) -// SecurityAlertPolicyEmailAccountAdmins enumerates the values for security -// alert policy email account admins. +// SecurityAlertPolicyEmailAccountAdmins enumerates the values for security alert policy email account admins. type SecurityAlertPolicyEmailAccountAdmins string const ( - // SecurityAlertPolicyEmailAccountAdminsDisabled specifies the security - // alert policy email account admins disabled state for security alert - // policy email account admins. + // SecurityAlertPolicyEmailAccountAdminsDisabled specifies the security alert policy email account admins disabled + // state for security alert policy email account admins. SecurityAlertPolicyEmailAccountAdminsDisabled SecurityAlertPolicyEmailAccountAdmins = "Disabled" - // SecurityAlertPolicyEmailAccountAdminsEnabled specifies the security - // alert policy email account admins enabled state for security alert - // policy email account admins. + // SecurityAlertPolicyEmailAccountAdminsEnabled specifies the security alert policy email account admins enabled state + // for security alert policy email account admins. SecurityAlertPolicyEmailAccountAdminsEnabled SecurityAlertPolicyEmailAccountAdmins = "Enabled" ) -// SecurityAlertPolicyState enumerates the values for security alert policy -// state. +// SecurityAlertPolicyState enumerates the values for security alert policy state. type SecurityAlertPolicyState string const ( - // SecurityAlertPolicyStateDisabled specifies the security alert policy - // state disabled state for security alert policy state. + // SecurityAlertPolicyStateDisabled specifies the security alert policy state disabled state for security alert policy + // state. SecurityAlertPolicyStateDisabled SecurityAlertPolicyState = "Disabled" - // SecurityAlertPolicyStateEnabled specifies the security alert policy - // state enabled state for security alert policy state. + // SecurityAlertPolicyStateEnabled specifies the security alert policy state enabled state for security alert policy + // state. SecurityAlertPolicyStateEnabled SecurityAlertPolicyState = "Enabled" - // SecurityAlertPolicyStateNew specifies the security alert policy state - // new state for security alert policy state. + // SecurityAlertPolicyStateNew specifies the security alert policy state new state for security alert policy state. SecurityAlertPolicyStateNew SecurityAlertPolicyState = "New" ) -// SecurityAlertPolicyUseServerDefault enumerates the values for security alert -// policy use server default. +// SecurityAlertPolicyUseServerDefault enumerates the values for security alert policy use server default. type SecurityAlertPolicyUseServerDefault string const ( - // SecurityAlertPolicyUseServerDefaultDisabled specifies the security alert - // policy use server default disabled state for security alert policy use - // server default. + // SecurityAlertPolicyUseServerDefaultDisabled specifies the security alert policy use server default disabled state + // for security alert policy use server default. SecurityAlertPolicyUseServerDefaultDisabled SecurityAlertPolicyUseServerDefault = "Disabled" - // SecurityAlertPolicyUseServerDefaultEnabled specifies the security alert - // policy use server default enabled state for security alert policy use - // server default. + // SecurityAlertPolicyUseServerDefaultEnabled specifies the security alert policy use server default enabled state for + // security alert policy use server default. SecurityAlertPolicyUseServerDefaultEnabled SecurityAlertPolicyUseServerDefault = "Enabled" ) -// ServerState enumerates the values for server state. -type ServerState string +// ServerConnectionType enumerates the values for server connection type. +type ServerConnectionType string const ( - // ServerStateDisabled specifies the server state disabled state for server - // state. - ServerStateDisabled ServerState = "Disabled" - // ServerStateReady specifies the server state ready state for server - // state. - ServerStateReady ServerState = "Ready" + // ServerConnectionTypeDefault specifies the server connection type default state for server connection type. + ServerConnectionTypeDefault ServerConnectionType = "Default" + // ServerConnectionTypeProxy specifies the server connection type proxy state for server connection type. + ServerConnectionTypeProxy ServerConnectionType = "Proxy" + // ServerConnectionTypeRedirect specifies the server connection type redirect state for server connection type. + ServerConnectionTypeRedirect ServerConnectionType = "Redirect" ) -// ServerVersion enumerates the values for server version. -type ServerVersion string +// ServerKeyType enumerates the values for server key type. +type ServerKeyType string const ( - // OneTwoFullStopZero specifies the one two full stop zero state for server - // version. - OneTwoFullStopZero ServerVersion = "12.0" - // TwoFullStopZero specifies the two full stop zero state for server - // version. - TwoFullStopZero ServerVersion = "2.0" + // AzureKeyVault specifies the azure key vault state for server key type. + AzureKeyVault ServerKeyType = "AzureKeyVault" + // ServiceManaged specifies the service managed state for server key type. + ServiceManaged ServerKeyType = "ServiceManaged" ) // ServiceObjectiveName enumerates the values for service objective name. type ServiceObjectiveName string const ( - // ServiceObjectiveNameBasic specifies the service objective name basic - // state for service objective name. + // ServiceObjectiveNameBasic specifies the service objective name basic state for service objective name. ServiceObjectiveNameBasic ServiceObjectiveName = "Basic" - // ServiceObjectiveNameElasticPool specifies the service objective name - // elastic pool state for service objective name. + // ServiceObjectiveNameElasticPool specifies the service objective name elastic pool state for service objective name. ServiceObjectiveNameElasticPool ServiceObjectiveName = "ElasticPool" - // ServiceObjectiveNameP1 specifies the service objective name p1 state for - // service objective name. + // ServiceObjectiveNameP1 specifies the service objective name p1 state for service objective name. ServiceObjectiveNameP1 ServiceObjectiveName = "P1" - // ServiceObjectiveNameP11 specifies the service objective name p11 state - // for service objective name. + // ServiceObjectiveNameP11 specifies the service objective name p11 state for service objective name. ServiceObjectiveNameP11 ServiceObjectiveName = "P11" - // ServiceObjectiveNameP15 specifies the service objective name p15 state - // for service objective name. + // ServiceObjectiveNameP15 specifies the service objective name p15 state for service objective name. ServiceObjectiveNameP15 ServiceObjectiveName = "P15" - // ServiceObjectiveNameP2 specifies the service objective name p2 state for - // service objective name. + // ServiceObjectiveNameP2 specifies the service objective name p2 state for service objective name. ServiceObjectiveNameP2 ServiceObjectiveName = "P2" - // ServiceObjectiveNameP3 specifies the service objective name p3 state for - // service objective name. + // ServiceObjectiveNameP3 specifies the service objective name p3 state for service objective name. ServiceObjectiveNameP3 ServiceObjectiveName = "P3" - // ServiceObjectiveNameP4 specifies the service objective name p4 state for - // service objective name. + // ServiceObjectiveNameP4 specifies the service objective name p4 state for service objective name. ServiceObjectiveNameP4 ServiceObjectiveName = "P4" - // ServiceObjectiveNameP6 specifies the service objective name p6 state for - // service objective name. + // ServiceObjectiveNameP6 specifies the service objective name p6 state for service objective name. ServiceObjectiveNameP6 ServiceObjectiveName = "P6" - // ServiceObjectiveNameS0 specifies the service objective name s0 state for - // service objective name. + // ServiceObjectiveNameS0 specifies the service objective name s0 state for service objective name. ServiceObjectiveNameS0 ServiceObjectiveName = "S0" - // ServiceObjectiveNameS1 specifies the service objective name s1 state for - // service objective name. + // ServiceObjectiveNameS1 specifies the service objective name s1 state for service objective name. ServiceObjectiveNameS1 ServiceObjectiveName = "S1" - // ServiceObjectiveNameS2 specifies the service objective name s2 state for - // service objective name. + // ServiceObjectiveNameS2 specifies the service objective name s2 state for service objective name. ServiceObjectiveNameS2 ServiceObjectiveName = "S2" - // ServiceObjectiveNameS3 specifies the service objective name s3 state for - // service objective name. + // ServiceObjectiveNameS3 specifies the service objective name s3 state for service objective name. ServiceObjectiveNameS3 ServiceObjectiveName = "S3" - // ServiceObjectiveNameSystem specifies the service objective name system - // state for service objective name. + // ServiceObjectiveNameSystem specifies the service objective name system state for service objective name. ServiceObjectiveNameSystem ServiceObjectiveName = "System" - // ServiceObjectiveNameSystem2 specifies the service objective name system - // 2 state for service objective name. + // ServiceObjectiveNameSystem2 specifies the service objective name system 2 state for service objective name. ServiceObjectiveNameSystem2 ServiceObjectiveName = "System2" ) @@ -412,40 +523,252 @@ const ( type StorageKeyType string const ( - // SharedAccessKey specifies the shared access key state for storage key - // type. + // SharedAccessKey specifies the shared access key state for storage key type. SharedAccessKey StorageKeyType = "SharedAccessKey" - // StorageAccessKey specifies the storage access key state for storage key - // type. + // StorageAccessKey specifies the storage access key state for storage key type. StorageAccessKey StorageKeyType = "StorageAccessKey" ) -// TransparentDataEncryptionActivityStatus enumerates the values for -// transparent data encryption activity status. +// SyncAgentState enumerates the values for sync agent state. +type SyncAgentState string + +const ( + // NeverConnected specifies the never connected state for sync agent state. + NeverConnected SyncAgentState = "NeverConnected" + // Offline specifies the offline state for sync agent state. + Offline SyncAgentState = "Offline" + // Online specifies the online state for sync agent state. + Online SyncAgentState = "Online" +) + +// SyncConflictResolutionPolicy enumerates the values for sync conflict resolution policy. +type SyncConflictResolutionPolicy string + +const ( + // HubWin specifies the hub win state for sync conflict resolution policy. + HubWin SyncConflictResolutionPolicy = "HubWin" + // MemberWin specifies the member win state for sync conflict resolution policy. + MemberWin SyncConflictResolutionPolicy = "MemberWin" +) + +// SyncDirection enumerates the values for sync direction. +type SyncDirection string + +const ( + // Bidirectional specifies the bidirectional state for sync direction. + Bidirectional SyncDirection = "Bidirectional" + // OneWayHubToMember specifies the one way hub to member state for sync direction. + OneWayHubToMember SyncDirection = "OneWayHubToMember" + // OneWayMemberToHub specifies the one way member to hub state for sync direction. + OneWayMemberToHub SyncDirection = "OneWayMemberToHub" +) + +// SyncGroupLogType enumerates the values for sync group log type. +type SyncGroupLogType string + +const ( + // All specifies the all state for sync group log type. + All SyncGroupLogType = "All" + // Error specifies the error state for sync group log type. + Error SyncGroupLogType = "Error" + // Success specifies the success state for sync group log type. + Success SyncGroupLogType = "Success" + // Warning specifies the warning state for sync group log type. + Warning SyncGroupLogType = "Warning" +) + +// SyncGroupState enumerates the values for sync group state. +type SyncGroupState string + +const ( + // SyncGroupStateError specifies the sync group state error state for sync group state. + SyncGroupStateError SyncGroupState = "Error" + // SyncGroupStateGood specifies the sync group state good state for sync group state. + SyncGroupStateGood SyncGroupState = "Good" + // SyncGroupStateNotReady specifies the sync group state not ready state for sync group state. + SyncGroupStateNotReady SyncGroupState = "NotReady" + // SyncGroupStateProgressing specifies the sync group state progressing state for sync group state. + SyncGroupStateProgressing SyncGroupState = "Progressing" + // SyncGroupStateWarning specifies the sync group state warning state for sync group state. + SyncGroupStateWarning SyncGroupState = "Warning" +) + +// SyncMemberDbType enumerates the values for sync member db type. +type SyncMemberDbType string + +const ( + // AzureSQLDatabase specifies the azure sql database state for sync member db type. + AzureSQLDatabase SyncMemberDbType = "AzureSqlDatabase" + // SQLServerDatabase specifies the sql server database state for sync member db type. + SQLServerDatabase SyncMemberDbType = "SqlServerDatabase" +) + +// SyncMemberState enumerates the values for sync member state. +type SyncMemberState string + +const ( + // DeProvisioned specifies the de provisioned state for sync member state. + DeProvisioned SyncMemberState = "DeProvisioned" + // DeProvisionFailed specifies the de provision failed state for sync member state. + DeProvisionFailed SyncMemberState = "DeProvisionFailed" + // DeProvisioning specifies the de provisioning state for sync member state. + DeProvisioning SyncMemberState = "DeProvisioning" + // DisabledBackupRestore specifies the disabled backup restore state for sync member state. + DisabledBackupRestore SyncMemberState = "DisabledBackupRestore" + // DisabledTombstoneCleanup specifies the disabled tombstone cleanup state for sync member state. + DisabledTombstoneCleanup SyncMemberState = "DisabledTombstoneCleanup" + // Provisioned specifies the provisioned state for sync member state. + Provisioned SyncMemberState = "Provisioned" + // ProvisionFailed specifies the provision failed state for sync member state. + ProvisionFailed SyncMemberState = "ProvisionFailed" + // Provisioning specifies the provisioning state for sync member state. + Provisioning SyncMemberState = "Provisioning" + // ReprovisionFailed specifies the reprovision failed state for sync member state. + ReprovisionFailed SyncMemberState = "ReprovisionFailed" + // Reprovisioning specifies the reprovisioning state for sync member state. + Reprovisioning SyncMemberState = "Reprovisioning" + // SyncCancelled specifies the sync cancelled state for sync member state. + SyncCancelled SyncMemberState = "SyncCancelled" + // SyncCancelling specifies the sync cancelling state for sync member state. + SyncCancelling SyncMemberState = "SyncCancelling" + // SyncFailed specifies the sync failed state for sync member state. + SyncFailed SyncMemberState = "SyncFailed" + // SyncInProgress specifies the sync in progress state for sync member state. + SyncInProgress SyncMemberState = "SyncInProgress" + // SyncSucceeded specifies the sync succeeded state for sync member state. + SyncSucceeded SyncMemberState = "SyncSucceeded" + // SyncSucceededWithWarnings specifies the sync succeeded with warnings state for sync member state. + SyncSucceededWithWarnings SyncMemberState = "SyncSucceededWithWarnings" + // UnProvisioned specifies the un provisioned state for sync member state. + UnProvisioned SyncMemberState = "UnProvisioned" + // UnReprovisioned specifies the un reprovisioned state for sync member state. + UnReprovisioned SyncMemberState = "UnReprovisioned" +) + +// TransparentDataEncryptionActivityStatus enumerates the values for transparent data encryption activity status. type TransparentDataEncryptionActivityStatus string const ( - // Decrypting specifies the decrypting state for transparent data - // encryption activity status. + // Decrypting specifies the decrypting state for transparent data encryption activity status. Decrypting TransparentDataEncryptionActivityStatus = "Decrypting" - // Encrypting specifies the encrypting state for transparent data - // encryption activity status. + // Encrypting specifies the encrypting state for transparent data encryption activity status. Encrypting TransparentDataEncryptionActivityStatus = "Encrypting" ) -// TransparentDataEncryptionStatus enumerates the values for transparent data -// encryption status. +// TransparentDataEncryptionStatus enumerates the values for transparent data encryption status. type TransparentDataEncryptionStatus string const ( - // TransparentDataEncryptionStatusDisabled specifies the transparent data - // encryption status disabled state for transparent data encryption status. + // TransparentDataEncryptionStatusDisabled specifies the transparent data encryption status disabled state for + // transparent data encryption status. TransparentDataEncryptionStatusDisabled TransparentDataEncryptionStatus = "Disabled" - // TransparentDataEncryptionStatusEnabled specifies the transparent data - // encryption status enabled state for transparent data encryption status. + // TransparentDataEncryptionStatusEnabled specifies the transparent data encryption status enabled state for + // transparent data encryption status. TransparentDataEncryptionStatusEnabled TransparentDataEncryptionStatus = "Enabled" ) +// UnitDefinitionType enumerates the values for unit definition type. +type UnitDefinitionType string + +const ( + // UnitDefinitionTypeBytes specifies the unit definition type bytes state for unit definition type. + UnitDefinitionTypeBytes UnitDefinitionType = "Bytes" + // UnitDefinitionTypeBytesPerSecond specifies the unit definition type bytes per second state for unit definition type. + UnitDefinitionTypeBytesPerSecond UnitDefinitionType = "BytesPerSecond" + // UnitDefinitionTypeCount specifies the unit definition type count state for unit definition type. + UnitDefinitionTypeCount UnitDefinitionType = "Count" + // UnitDefinitionTypeCountPerSecond specifies the unit definition type count per second state for unit definition type. + UnitDefinitionTypeCountPerSecond UnitDefinitionType = "CountPerSecond" + // UnitDefinitionTypePercent specifies the unit definition type percent state for unit definition type. + UnitDefinitionTypePercent UnitDefinitionType = "Percent" + // UnitDefinitionTypeSeconds specifies the unit definition type seconds state for unit definition type. + UnitDefinitionTypeSeconds UnitDefinitionType = "Seconds" +) + +// UnitType enumerates the values for unit type. +type UnitType string + +const ( + // UnitTypeBytes specifies the unit type bytes state for unit type. + UnitTypeBytes UnitType = "bytes" + // UnitTypeBytesPerSecond specifies the unit type bytes per second state for unit type. + UnitTypeBytesPerSecond UnitType = "bytesPerSecond" + // UnitTypeCount specifies the unit type count state for unit type. + UnitTypeCount UnitType = "count" + // UnitTypeCountPerSecond specifies the unit type count per second state for unit type. + UnitTypeCountPerSecond UnitType = "countPerSecond" + // UnitTypePercent specifies the unit type percent state for unit type. + UnitTypePercent UnitType = "percent" + // UnitTypeSeconds specifies the unit type seconds state for unit type. + UnitTypeSeconds UnitType = "seconds" +) + +// VirtualNetworkRuleState enumerates the values for virtual network rule state. +type VirtualNetworkRuleState string + +const ( + // VirtualNetworkRuleStateDeleting specifies the virtual network rule state deleting state for virtual network rule + // state. + VirtualNetworkRuleStateDeleting VirtualNetworkRuleState = "Deleting" + // VirtualNetworkRuleStateInitializing specifies the virtual network rule state initializing state for virtual network + // rule state. + VirtualNetworkRuleStateInitializing VirtualNetworkRuleState = "Initializing" + // VirtualNetworkRuleStateInProgress specifies the virtual network rule state in progress state for virtual network + // rule state. + VirtualNetworkRuleStateInProgress VirtualNetworkRuleState = "InProgress" + // VirtualNetworkRuleStateReady specifies the virtual network rule state ready state for virtual network rule state. + VirtualNetworkRuleStateReady VirtualNetworkRuleState = "Ready" + // VirtualNetworkRuleStateUnknown specifies the virtual network rule state unknown state for virtual network rule + // state. + VirtualNetworkRuleStateUnknown VirtualNetworkRuleState = "Unknown" +) + +// BackupLongTermRetentionPolicy is a backup long term retention policy +type BackupLongTermRetentionPolicy struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + *BackupLongTermRetentionPolicyProperties `json:"properties,omitempty"` +} + +// BackupLongTermRetentionPolicyProperties is the properties of a backup long term retention policy +type BackupLongTermRetentionPolicyProperties struct { + State BackupLongTermRetentionPolicyState `json:"state,omitempty"` + RecoveryServicesBackupPolicyResourceID *string `json:"recoveryServicesBackupPolicyResourceId,omitempty"` +} + +// BackupLongTermRetentionVault is a backup long term retention vault +type BackupLongTermRetentionVault struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + *BackupLongTermRetentionVaultProperties `json:"properties,omitempty"` +} + +// BackupLongTermRetentionVaultProperties is the properties of a backup long term retention vault. +type BackupLongTermRetentionVaultProperties struct { + RecoveryServicesVaultResourceID *string `json:"recoveryServicesVaultResourceId,omitempty"` +} + +// CheckNameAvailabilityRequest is a request to check whether the specified name for a resource is available. +type CheckNameAvailabilityRequest struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// CheckNameAvailabilityResponse is a response indicating whether the specified name for a resource is available. +type CheckNameAvailabilityResponse struct { + autorest.Response `json:"-"` + Available *bool `json:"available,omitempty"` + Message *string `json:"message,omitempty"` + Name *string `json:"name,omitempty"` + Reason CheckNameAvailabilityReason `json:"reason,omitempty"` +} + // Database is represents a database. type Database struct { autorest.Response `json:"-"` @@ -458,27 +781,24 @@ type Database struct { *DatabaseProperties `json:"properties,omitempty"` } -// DatabaseBlobAuditingPolicy is contains information about a database Blob -// Auditing policy. +// DatabaseBlobAuditingPolicy is a database blob auditing policy. type DatabaseBlobAuditingPolicy struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` Kind *string `json:"kind,omitempty"` *DatabaseBlobAuditingPolicyProperties `json:"properties,omitempty"` } -// DatabaseBlobAuditingPolicyProperties is properties for a database Blob -// Auditing policy. +// DatabaseBlobAuditingPolicyProperties is properties of a database blob auditing policy. type DatabaseBlobAuditingPolicyProperties struct { State BlobAuditingPolicyState `json:"state,omitempty"` StorageEndpoint *string `json:"storageEndpoint,omitempty"` StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"` RetentionDays *int32 `json:"retentionDays,omitempty"` AuditActionsAndGroups *[]string `json:"auditActionsAndGroups,omitempty"` - StorageAccountSubscriptionID *string `json:"storageAccountSubscriptionId,omitempty"` + StorageAccountSubscriptionID *uuid.UUID `json:"storageAccountSubscriptionId,omitempty"` IsStorageSecondaryKeyInUse *bool `json:"isStorageSecondaryKeyInUse,omitempty"` } @@ -488,23 +808,46 @@ type DatabaseListResult struct { Value *[]Database `json:"value,omitempty"` } -// DatabaseMetric is represents database metrics. -type DatabaseMetric struct { - Name *string `json:"name,omitempty"` - ID *string `json:"id,omitempty"` - ResourceName *string `json:"resourceName,omitempty"` - DisplayName *string `json:"displayName,omitempty"` - CurrentValue *float64 `json:"currentValue,omitempty"` - Limit *float64 `json:"limit,omitempty"` - Unit *string `json:"unit,omitempty"` - NextResetTime *date.Time `json:"nextResetTime,omitempty"` +// DatabaseOperation is a database operation. +type DatabaseOperation struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *DatabaseOperationProperties `json:"properties,omitempty"` } -// DatabaseMetricListResult is represents the response to a list database -// metrics request. -type DatabaseMetricListResult struct { +// DatabaseOperationListResult is the response to a list database operations request +type DatabaseOperationListResult struct { autorest.Response `json:"-"` - Value *[]DatabaseMetric `json:"value,omitempty"` + Value *[]DatabaseOperation `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// DatabaseOperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client DatabaseOperationListResult) DatabaseOperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// DatabaseOperationProperties is the properties of a database operation. +type DatabaseOperationProperties struct { + DatabaseName *string `json:"databaseName,omitempty"` + Operation *string `json:"operation,omitempty"` + OperationFriendlyName *string `json:"operationFriendlyName,omitempty"` + PercentComplete *int32 `json:"percentComplete,omitempty"` + ServerName *string `json:"serverName,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + State ManagementOperationState `json:"state,omitempty"` + ErrorCode *int32 `json:"errorCode,omitempty"` + ErrorDescription *string `json:"errorDescription,omitempty"` + ErrorSeverity *int32 `json:"errorSeverity,omitempty"` + IsUserError *bool `json:"isUserError,omitempty"` } // DatabaseProperties is represents the properties of a database. @@ -531,13 +874,12 @@ type DatabaseProperties struct { ServiceTierAdvisors *[]ServiceTierAdvisor `json:"serviceTierAdvisors,omitempty"` TransparentDataEncryption *[]TransparentDataEncryption `json:"transparentDataEncryption,omitempty"` RecommendedIndex *[]RecommendedIndex `json:"recommendedIndex,omitempty"` - FailoverGroupID *uuid.UUID `json:"failoverGroupId,omitempty"` + FailoverGroupID *string `json:"failoverGroupId,omitempty"` ReadScale ReadScale `json:"readScale,omitempty"` SampleName SampleName `json:"sampleName,omitempty"` } -// DatabaseSecurityAlertPolicy is contains information about a database Threat -// Detection policy. +// DatabaseSecurityAlertPolicy is contains information about a database Threat Detection policy. type DatabaseSecurityAlertPolicy struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -548,8 +890,7 @@ type DatabaseSecurityAlertPolicy struct { *DatabaseSecurityAlertPolicyProperties `json:"properties,omitempty"` } -// DatabaseSecurityAlertPolicyProperties is properties for a database Threat -// Detection policy. +// DatabaseSecurityAlertPolicyProperties is properties for a database Threat Detection policy. type DatabaseSecurityAlertPolicyProperties struct { State SecurityAlertPolicyState `json:"state,omitempty"` DisabledAlerts *string `json:"disabledAlerts,omitempty"` @@ -561,6 +902,84 @@ type DatabaseSecurityAlertPolicyProperties struct { UseServerDefault SecurityAlertPolicyUseServerDefault `json:"useServerDefault,omitempty"` } +// DatabaseUpdate is represents a database update. +type DatabaseUpdate struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *DatabaseProperties `json:"properties,omitempty"` +} + +// DatabaseUsage is the database usages. +type DatabaseUsage struct { + Name *string `json:"name,omitempty"` + ResourceName *string `json:"resourceName,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + CurrentValue *float64 `json:"currentValue,omitempty"` + Limit *float64 `json:"limit,omitempty"` + Unit *string `json:"unit,omitempty"` + NextResetTime *date.Time `json:"nextResetTime,omitempty"` +} + +// DatabaseUsageListResult is the response to a list database metrics request. +type DatabaseUsageListResult struct { + autorest.Response `json:"-"` + Value *[]DatabaseUsage `json:"value,omitempty"` +} + +// DataMaskingPolicy is represents a database data masking policy. +type DataMaskingPolicy struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *DataMaskingPolicyProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Kind *string `json:"kind,omitempty"` +} + +// DataMaskingPolicyProperties is the properties of a database data masking policy. +type DataMaskingPolicyProperties struct { + DataMaskingState DataMaskingState `json:"dataMaskingState,omitempty"` + ExemptPrincipals *string `json:"exemptPrincipals,omitempty"` + ApplicationPrincipals *string `json:"applicationPrincipals,omitempty"` + MaskingLevel *string `json:"maskingLevel,omitempty"` +} + +// DataMaskingRule is represents a database data masking rule. +type DataMaskingRule struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *DataMaskingRuleProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Kind *string `json:"kind,omitempty"` +} + +// DataMaskingRuleListResult is the response to a list data masking rules request. +type DataMaskingRuleListResult struct { + autorest.Response `json:"-"` + Value *[]DataMaskingRule `json:"value,omitempty"` +} + +// DataMaskingRuleProperties is the properties of a database data masking rule. +type DataMaskingRuleProperties struct { + ID *string `json:"id,omitempty"` + AliasName *string `json:"aliasName,omitempty"` + RuleState DataMaskingRuleState `json:"ruleState,omitempty"` + SchemaName *string `json:"schemaName,omitempty"` + TableName *string `json:"tableName,omitempty"` + ColumnName *string `json:"columnName,omitempty"` + MaskingFunction DataMaskingFunction `json:"maskingFunction,omitempty"` + NumberFrom *string `json:"numberFrom,omitempty"` + NumberTo *string `json:"numberTo,omitempty"` + PrefixSize *string `json:"prefixSize,omitempty"` + SuffixSize *string `json:"suffixSize,omitempty"` + ReplacementString *string `json:"replacementString,omitempty"` +} + // EditionCapability is the database edition capabilities. type EditionCapability struct { Name *string `json:"name,omitempty"` @@ -589,15 +1008,13 @@ type ElasticPoolActivity struct { *ElasticPoolActivityProperties `json:"properties,omitempty"` } -// ElasticPoolActivityListResult is represents the response to a list elastic -// pool activity request. +// ElasticPoolActivityListResult is represents the response to a list elastic pool activity request. type ElasticPoolActivityListResult struct { autorest.Response `json:"-"` Value *[]ElasticPoolActivity `json:"value,omitempty"` } -// ElasticPoolActivityProperties is represents the properties of an elastic -// pool. +// ElasticPoolActivityProperties is represents the properties of an elastic pool. type ElasticPoolActivityProperties struct { EndTime *date.Time `json:"endTime,omitempty"` ErrorCode *int32 `json:"errorCode,omitempty"` @@ -630,15 +1047,13 @@ type ElasticPoolDatabaseActivity struct { *ElasticPoolDatabaseActivityProperties `json:"properties,omitempty"` } -// ElasticPoolDatabaseActivityListResult is represents the response to a list -// elastic pool database activity request. +// ElasticPoolDatabaseActivityListResult is represents the response to a list elastic pool database activity request. type ElasticPoolDatabaseActivityListResult struct { autorest.Response `json:"-"` Value *[]ElasticPoolDatabaseActivity `json:"value,omitempty"` } -// ElasticPoolDatabaseActivityProperties is represents the properties of an -// elastic pool database activity. +// ElasticPoolDatabaseActivityProperties is represents the properties of an elastic pool database activity. type ElasticPoolDatabaseActivityProperties struct { DatabaseName *string `json:"databaseName,omitempty"` EndTime *date.Time `json:"endTime,omitempty"` @@ -675,23 +1090,20 @@ type ElasticPoolEditionCapability struct { SupportedElasticPoolDtus *[]ElasticPoolDtuCapability `json:"supportedElasticPoolDtus,omitempty"` } -// ElasticPoolListResult is represents the response to a list elastic pool -// request. +// ElasticPoolListResult is represents the response to a list elastic pool request. type ElasticPoolListResult struct { autorest.Response `json:"-"` Value *[]ElasticPool `json:"value,omitempty"` } -// ElasticPoolPerDatabaseMaxDtuCapability is the max per-database DTU -// capability. +// ElasticPoolPerDatabaseMaxDtuCapability is the max per-database DTU capability. type ElasticPoolPerDatabaseMaxDtuCapability struct { Limit *int64 `json:"limit,omitempty"` Status CapabilityStatus `json:"status,omitempty"` SupportedPerDatabaseMinDtus *[]ElasticPoolPerDatabaseMinDtuCapability `json:"supportedPerDatabaseMinDtus,omitempty"` } -// ElasticPoolPerDatabaseMinDtuCapability is the minimum per-database DTU -// capability. +// ElasticPoolPerDatabaseMinDtuCapability is the minimum per-database DTU capability. type ElasticPoolPerDatabaseMinDtuCapability struct { Limit *int64 `json:"limit,omitempty"` Status CapabilityStatus `json:"status,omitempty"` @@ -708,6 +1120,54 @@ type ElasticPoolProperties struct { StorageMB *int32 `json:"storageMB,omitempty"` } +// ElasticPoolUpdate is represents an elastic pool update. +type ElasticPoolUpdate struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *ElasticPoolProperties `json:"properties,omitempty"` +} + +// EncryptionProtector is the server encryption protector. +type EncryptionProtector struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + *EncryptionProtectorProperties `json:"properties,omitempty"` +} + +// EncryptionProtectorListResult is a list of server encryption protectors. +type EncryptionProtectorListResult struct { + autorest.Response `json:"-"` + Value *[]EncryptionProtector `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// EncryptionProtectorListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client EncryptionProtectorListResult) EncryptionProtectorListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// EncryptionProtectorProperties is properties for an encryption protector execution. +type EncryptionProtectorProperties struct { + Subregion *string `json:"subregion,omitempty"` + ServerKeyName *string `json:"serverKeyName,omitempty"` + ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"` + URI *string `json:"uri,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` +} + // ExportRequest is export database parameters. type ExportRequest struct { StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"` @@ -718,31 +1178,116 @@ type ExportRequest struct { AuthenticationType AuthenticationType `json:"authenticationType,omitempty"` } +// FailoverGroup is a failover group. +type FailoverGroup struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + *FailoverGroupProperties `json:"properties,omitempty"` +} + +// FailoverGroupListResult is a list of failover groups. +type FailoverGroupListResult struct { + autorest.Response `json:"-"` + Value *[]FailoverGroup `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// FailoverGroupListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client FailoverGroupListResult) FailoverGroupListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// FailoverGroupProperties is properties of a failover group. +type FailoverGroupProperties struct { + ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` + ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` + ReplicationRole FailoverGroupReplicationRole `json:"replicationRole,omitempty"` + ReplicationState *string `json:"replicationState,omitempty"` + PartnerServers *[]PartnerInfo `json:"partnerServers,omitempty"` + Databases *[]string `json:"databases,omitempty"` +} + +// FailoverGroupReadOnlyEndpoint is read-only endpoint of the failover group instance. +type FailoverGroupReadOnlyEndpoint struct { + FailoverPolicy ReadOnlyEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` +} + +// FailoverGroupReadWriteEndpoint is read-write endpoint of the failover group instance. +type FailoverGroupReadWriteEndpoint struct { + FailoverPolicy ReadWriteEndpointFailoverPolicy `json:"failoverPolicy,omitempty"` + FailoverWithDataLossGracePeriodMinutes *int32 `json:"failoverWithDataLossGracePeriodMinutes,omitempty"` +} + +// FailoverGroupUpdate is a failover group update request. +type FailoverGroupUpdate struct { + *FailoverGroupUpdateProperties `json:"properties,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// FailoverGroupUpdateProperties is properties of a failover group update. +type FailoverGroupUpdateProperties struct { + ReadWriteEndpoint *FailoverGroupReadWriteEndpoint `json:"readWriteEndpoint,omitempty"` + ReadOnlyEndpoint *FailoverGroupReadOnlyEndpoint `json:"readOnlyEndpoint,omitempty"` + Databases *[]string `json:"databases,omitempty"` +} + // FirewallRule is represents a server firewall rule. type FirewallRule struct { autorest.Response `json:"-"` - Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` Kind *string `json:"kind,omitempty"` Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` *FirewallRuleProperties `json:"properties,omitempty"` } -// FirewallRuleListResult is represents the response to a List Firewall Rules -// request. +// FirewallRuleListResult is represents the response to a List Firewall Rules request. type FirewallRuleListResult struct { autorest.Response `json:"-"` Value *[]FirewallRule `json:"value,omitempty"` } -// FirewallRuleProperties is represents the properties of a server firewall -// rule. +// FirewallRuleProperties is represents the properties of a server firewall rule. type FirewallRuleProperties struct { StartIPAddress *string `json:"startIpAddress,omitempty"` EndIPAddress *string `json:"endIpAddress,omitempty"` } +// GeoBackupPolicy is a database geo backup policy. +type GeoBackupPolicy struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *GeoBackupPolicyProperties `json:"properties,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` +} + +// GeoBackupPolicyListResult is the response to a list geo backup policies request. +type GeoBackupPolicyListResult struct { + autorest.Response `json:"-"` + Value *[]GeoBackupPolicy `json:"value,omitempty"` +} + +// GeoBackupPolicyProperties is the properties of the geo backup policy. +type GeoBackupPolicyProperties struct { + State GeoBackupPolicyState `json:"state,omitempty"` + StorageType *string `json:"storageType,omitempty"` +} + // ImportExportResponse is response for Import/Export Get operation. type ImportExportResponse struct { autorest.Response `json:"-"` @@ -752,8 +1297,7 @@ type ImportExportResponse struct { *ImportExportResponseProperties `json:"properties,omitempty"` } -// ImportExportResponseProperties is response for Import/Export Status -// operation. +// ImportExportResponseProperties is response for Import/Export Status operation. type ImportExportResponseProperties struct { RequestType *string `json:"requestType,omitempty"` RequestID *uuid.UUID `json:"requestId,omitempty"` @@ -766,8 +1310,7 @@ type ImportExportResponseProperties struct { ErrorMessage *string `json:"errorMessage,omitempty"` } -// ImportExtensionProperties is represents the properties for an import -// operation +// ImportExtensionProperties is represents the properties for an import operation type ImportExtensionProperties struct { StorageKeyType StorageKeyType `json:"storageKeyType,omitempty"` StorageKey *string `json:"storageKey,omitempty"` @@ -814,21 +1357,76 @@ type MaxSizeCapability struct { Status CapabilityStatus `json:"status,omitempty"` } -// Operation is sQL REST API operation definition. +// Metric is database metrics. +type Metric struct { + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + TimeGrain *string `json:"timeGrain,omitempty"` + Unit UnitType `json:"unit,omitempty"` + Name *MetricName `json:"name,omitempty"` + MetricValues *[]MetricValue `json:"metricValues,omitempty"` +} + +// MetricAvailability is a metric availability value. +type MetricAvailability struct { + Retention *string `json:"retention,omitempty"` + TimeGrain *string `json:"timeGrain,omitempty"` +} + +// MetricDefinition is a database metric definition. +type MetricDefinition struct { + Name *MetricName `json:"name,omitempty"` + PrimaryAggregationType PrimaryAggregationType `json:"primaryAggregationType,omitempty"` + ResourceURI *string `json:"resourceUri,omitempty"` + Unit UnitDefinitionType `json:"unit,omitempty"` + MetricAvailabilities *[]MetricAvailability `json:"metricAvailabilities,omitempty"` +} + +// MetricDefinitionListResult is the response to a list database metric definitions request. +type MetricDefinitionListResult struct { + autorest.Response `json:"-"` + Value *[]MetricDefinition `json:"value,omitempty"` +} + +// MetricListResult is the response to a list database metrics request. +type MetricListResult struct { + autorest.Response `json:"-"` + Value *[]Metric `json:"value,omitempty"` +} + +// MetricName is a database metric name. +type MetricName struct { + Value *string `json:"value,omitempty"` + LocalizedValue *string `json:"localizedValue,omitempty"` +} + +// MetricValue is represents database metrics. +type MetricValue struct { + Count *float64 `json:"count,omitempty"` + Average *float64 `json:"average,omitempty"` + Maximum *float64 `json:"maximum,omitempty"` + Minimum *float64 `json:"minimum,omitempty"` + Timestamp *date.Time `json:"timestamp,omitempty"` + Total *float64 `json:"total,omitempty"` +} + +// Operation is SQL REST API operation definition. type Operation struct { - Name *string `json:"name,omitempty"` - Display *OperationDisplay `json:"display,omitempty"` + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` + Origin OperationOrigin `json:"origin,omitempty"` + Properties *map[string]*map[string]interface{} `json:"properties,omitempty"` } // OperationDisplay is display metadata associated with the operation. type OperationDisplay struct { - Provider *string `json:"provider,omitempty"` - Resource *string `json:"resource,omitempty"` - Operation *string `json:"operation,omitempty"` + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` + Description *string `json:"description,omitempty"` } -// OperationImpact is represents impact of an operation, both in absolute and -// relative terms. +// OperationImpact is the impact of an operation, both in absolute and relative terms. type OperationImpact struct { Name *string `json:"name,omitempty"` Unit *string `json:"unit,omitempty"` @@ -836,22 +1434,39 @@ type OperationImpact struct { ChangeValueRelative *float64 `json:"changeValueRelative,omitempty"` } -// OperationListResult is result of the request to list SQL operations. It -// contains a list of operations and a URL link to get the next set of results. +// OperationListResult is result of the request to list SQL operations. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` } -// PerformanceLevel is a possible performance level of a service objective -// capability. +// OperationListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client OperationListResult) OperationListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// PartnerInfo is partner server information for the failover group. +type PartnerInfo struct { + ID *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + ReplicationRole FailoverGroupReplicationRole `json:"replicationRole,omitempty"` +} + +// PerformanceLevel is a possible performance level of a service objective capability. type PerformanceLevel struct { Unit PerformanceLevelUnit `json:"unit,omitempty"` Value *int32 `json:"value,omitempty"` } -// ProxyResource is aRM proxy resource. +// ProxyResource is ARM proxy resource. type ProxyResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -867,15 +1482,14 @@ type RecommendedElasticPool struct { *RecommendedElasticPoolProperties `json:"properties,omitempty"` } -// RecommendedElasticPoolListMetricsResult is represents the response to a list -// recommended elastic pool metrics request. +// RecommendedElasticPoolListMetricsResult is represents the response to a list recommended elastic pool metrics +// request. type RecommendedElasticPoolListMetricsResult struct { autorest.Response `json:"-"` Value *[]RecommendedElasticPoolMetric `json:"value,omitempty"` } -// RecommendedElasticPoolListResult is represents the response to a list -// recommended elastic pool request. +// RecommendedElasticPoolListResult is represents the response to a list recommended elastic pool request. type RecommendedElasticPoolListResult struct { autorest.Response `json:"-"` Value *[]RecommendedElasticPool `json:"value,omitempty"` @@ -888,8 +1502,7 @@ type RecommendedElasticPoolMetric struct { SizeGB *float64 `json:"sizeGB,omitempty"` } -// RecommendedElasticPoolProperties is represents the properties of a -// recommented elastic pool. +// RecommendedElasticPoolProperties is represents the properties of a recommented elastic pool. type RecommendedElasticPoolProperties struct { DatabaseEdition ElasticPoolEdition `json:"databaseEdition,omitempty"` Dtu *float64 `json:"dtu,omitempty"` @@ -912,8 +1525,7 @@ type RecommendedIndex struct { *RecommendedIndexProperties `json:"properties,omitempty"` } -// RecommendedIndexProperties is represents the properties of a database -// recommended index. +// RecommendedIndexProperties is represents the properties of a database recommended index. type RecommendedIndexProperties struct { Action RecommendedIndexAction `json:"action,omitempty"` State RecommendedIndexState `json:"state,omitempty"` @@ -929,25 +1541,46 @@ type RecommendedIndexProperties struct { ReportedImpact *[]OperationImpact `json:"reportedImpact,omitempty"` } +// RecoverableDatabase is a recoverable database +type RecoverableDatabase struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *RecoverableDatabaseProperties `json:"properties,omitempty"` +} + +// RecoverableDatabaseListResult is the response to a list recoverable databases request +type RecoverableDatabaseListResult struct { + autorest.Response `json:"-"` + Value *[]RecoverableDatabase `json:"value,omitempty"` +} + +// RecoverableDatabaseProperties is the properties of a recoverable database +type RecoverableDatabaseProperties struct { + Edition *string `json:"edition,omitempty"` + ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` + ElasticPoolName *string `json:"elasticPoolName,omitempty"` + LastAvailableBackupDate *date.Time `json:"lastAvailableBackupDate,omitempty"` +} + // ReplicationLink is represents a database replication link. type ReplicationLink struct { autorest.Response `json:"-"` - Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` - Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` *ReplicationLinkProperties `json:"properties,omitempty"` } -// ReplicationLinkListResult is represents the response to a List database -// replication link request. +// ReplicationLinkListResult is represents the response to a List database replication link request. type ReplicationLinkListResult struct { autorest.Response `json:"-"` Value *[]ReplicationLink `json:"value,omitempty"` } -// ReplicationLinkProperties is represents the properties of a database -// replication link. +// ReplicationLinkProperties is represents the properties of a database replication link. type ReplicationLinkProperties struct { IsTerminationAllowed *bool `json:"isTerminationAllowed,omitempty"` ReplicationMode *string `json:"replicationMode,omitempty"` @@ -961,14 +1594,49 @@ type ReplicationLinkProperties struct { ReplicationState ReplicationState `json:"replicationState,omitempty"` } -// Resource is aRM resource. +// Resource is ARM resource. type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } -// RestorePoint is represents a database restore point. +// ResourceIdentity is azure Active Directory identity configuration for a resource. +type ResourceIdentity struct { + PrincipalID *uuid.UUID `json:"principalId,omitempty"` + Type IdentityType `json:"type,omitempty"` + TenantID *uuid.UUID `json:"tenantId,omitempty"` +} + +// RestorableDroppedDatabase is a restorable dropped database +type RestorableDroppedDatabase struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` + *RestorableDroppedDatabaseProperties `json:"properties,omitempty"` +} + +// RestorableDroppedDatabaseListResult is the response to a list restorable dropped databases request +type RestorableDroppedDatabaseListResult struct { + autorest.Response `json:"-"` + Value *[]RestorableDroppedDatabase `json:"value,omitempty"` +} + +// RestorableDroppedDatabaseProperties is the properties of a restorable dropped database +type RestorableDroppedDatabaseProperties struct { + DatabaseName *string `json:"databaseName,omitempty"` + Edition *string `json:"edition,omitempty"` + MaxSizeBytes *string `json:"maxSizeBytes,omitempty"` + ServiceLevelObjective *string `json:"serviceLevelObjective,omitempty"` + ElasticPoolName *string `json:"elasticPoolName,omitempty"` + CreationDate *date.Time `json:"creationDate,omitempty"` + DeletionDate *date.Time `json:"deletionDate,omitempty"` + EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` +} + +// RestorePoint is a database restore point. type RestorePoint struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -976,22 +1644,20 @@ type RestorePoint struct { *RestorePointProperties `json:"properties,omitempty"` } -// RestorePointListResult is represents the response to a list database restore -// points request. +// RestorePointListResult is the response to a list database restore points request. type RestorePointListResult struct { autorest.Response `json:"-"` Value *[]RestorePoint `json:"value,omitempty"` } -// RestorePointProperties is represents the properties of a database restore -// point. +// RestorePointProperties is represents the properties of a database restore point. type RestorePointProperties struct { - RestorePointType RestorePointTypes `json:"restorePointType,omitempty"` - RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"` - EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` + RestorePointType RestorePointType `json:"restorePointType,omitempty"` + RestorePointCreationDate *date.Time `json:"restorePointCreationDate,omitempty"` + EarliestRestoreDate *date.Time `json:"earliestRestoreDate,omitempty"` } -// Server is represents a server. +// Server is an Azure SQL Database server. type Server struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -999,18 +1665,148 @@ type Server struct { Type *string `json:"type,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` Location *string `json:"location,omitempty"` + Identity *ResourceIdentity `json:"identity,omitempty"` Kind *string `json:"kind,omitempty"` *ServerProperties `json:"properties,omitempty"` } -// ServerListResult is represents the response to a get server request. +// ServerAdministratorListResult is the response to a list Active Directory Administrators request. +type ServerAdministratorListResult struct { + autorest.Response `json:"-"` + Value *[]ServerAzureADAdministrator `json:"value,omitempty"` +} + +// ServerAdministratorProperties is the properties of an server Administrator. +type ServerAdministratorProperties struct { + AdministratorType *string `json:"administratorType,omitempty"` + Login *string `json:"login,omitempty"` + Sid *uuid.UUID `json:"sid,omitempty"` + TenantID *uuid.UUID `json:"tenantId,omitempty"` +} + +// ServerAzureADAdministrator is an server Active Directory Administrator. +type ServerAzureADAdministrator struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *ServerAdministratorProperties `json:"properties,omitempty"` +} + +// ServerCommunicationLink is server communication link. +type ServerCommunicationLink struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *ServerCommunicationLinkProperties `json:"properties,omitempty"` + Location *string `json:"location,omitempty"` + Kind *string `json:"kind,omitempty"` +} + +// ServerCommunicationLinkListResult is a list of server communication links. +type ServerCommunicationLinkListResult struct { + autorest.Response `json:"-"` + Value *[]ServerCommunicationLink `json:"value,omitempty"` +} + +// ServerCommunicationLinkProperties is the properties of a server communication link. +type ServerCommunicationLinkProperties struct { + State *string `json:"state,omitempty"` + PartnerServer *string `json:"partnerServer,omitempty"` +} + +// ServerConnectionPolicy is a server secure connection policy. +type ServerConnectionPolicy struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + *ServerConnectionPolicyProperties `json:"properties,omitempty"` +} + +// ServerConnectionPolicyProperties is the properties of a server secure connection policy. +type ServerConnectionPolicyProperties struct { + ConnectionType ServerConnectionType `json:"connectionType,omitempty"` +} + +// ServerKey is a server key. +type ServerKey struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Kind *string `json:"kind,omitempty"` + Location *string `json:"location,omitempty"` + *ServerKeyProperties `json:"properties,omitempty"` +} + +// ServerKeyListResult is a list of server keys. +type ServerKeyListResult struct { + autorest.Response `json:"-"` + Value *[]ServerKey `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ServerKeyListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ServerKeyListResult) ServerKeyListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ServerKeyProperties is properties for a server key execution. +type ServerKeyProperties struct { + Subregion *string `json:"subregion,omitempty"` + ServerKeyType ServerKeyType `json:"serverKeyType,omitempty"` + URI *string `json:"uri,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` + CreationDate *date.Time `json:"creationDate,omitempty"` +} + +// ServerListResult is a list of servers. type ServerListResult struct { autorest.Response `json:"-"` Value *[]Server `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` } -// ServerMetric is represents server metrics. -type ServerMetric struct { +// ServerListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ServerListResult) ServerListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ServerProperties is the properties of a server. +type ServerProperties struct { + AdministratorLogin *string `json:"administratorLogin,omitempty"` + AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` + Version *string `json:"version,omitempty"` + State *string `json:"state,omitempty"` + FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` +} + +// ServerUpdate is an update request for an Azure SQL Database server. +type ServerUpdate struct { + *ServerProperties `json:"properties,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// ServerUsage is represents server metrics. +type ServerUsage struct { Name *string `json:"name,omitempty"` ResourceName *string `json:"resourceName,omitempty"` DisplayName *string `json:"displayName,omitempty"` @@ -1020,22 +1816,10 @@ type ServerMetric struct { NextResetTime *date.Time `json:"nextResetTime,omitempty"` } -// ServerMetricListResult is represents the response to a list server metrics -// request. -type ServerMetricListResult struct { +// ServerUsageListResult is represents the response to a list server metrics request. +type ServerUsageListResult struct { autorest.Response `json:"-"` - Value *[]ServerMetric `json:"value,omitempty"` -} - -// ServerProperties is represents the properties of a server. -type ServerProperties struct { - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty"` - Version ServerVersion `json:"version,omitempty"` - AdministratorLogin *string `json:"administratorLogin,omitempty"` - AdministratorLoginPassword *string `json:"administratorLoginPassword,omitempty"` - ExternalAdministratorSid *uuid.UUID `json:"externalAdministratorSid,omitempty"` - ExternalAdministratorLogin *string `json:"externalAdministratorLogin,omitempty"` - State ServerState `json:"state,omitempty"` + Value *[]ServerUsage `json:"value,omitempty"` } // ServerVersionCapability is the server capabilities. @@ -1049,8 +1833,9 @@ type ServerVersionCapability struct { // ServiceObjective is represents a database service objective. type ServiceObjective struct { autorest.Response `json:"-"` - Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` *ServiceObjectiveProperties `json:"properties,omitempty"` } @@ -1064,15 +1849,13 @@ type ServiceObjectiveCapability struct { IncludedMaxSize *MaxSizeCapability `json:"includedMaxSize,omitempty"` } -// ServiceObjectiveListResult is represents the response to a get database -// service objectives request. +// ServiceObjectiveListResult is represents the response to a get database service objectives request. type ServiceObjectiveListResult struct { autorest.Response `json:"-"` Value *[]ServiceObjective `json:"value,omitempty"` } -// ServiceObjectiveProperties is represents the properties of a database -// service objective. +// ServiceObjectiveProperties is represents the properties of a database service objective. type ServiceObjectiveProperties struct { ServiceObjectiveName *string `json:"serviceObjectiveName,omitempty"` IsDefault *bool `json:"isDefault,omitempty"` @@ -1084,20 +1867,19 @@ type ServiceObjectiveProperties struct { // ServiceTierAdvisor is represents a Service Tier Advisor. type ServiceTierAdvisor struct { autorest.Response `json:"-"` - Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` *ServiceTierAdvisorProperties `json:"properties,omitempty"` } -// ServiceTierAdvisorListResult is represents the response to a list service -// tier advisor request. +// ServiceTierAdvisorListResult is represents the response to a list service tier advisor request. type ServiceTierAdvisorListResult struct { autorest.Response `json:"-"` Value *[]ServiceTierAdvisor `json:"value,omitempty"` } -// ServiceTierAdvisorProperties is represents the properties of a Service Tier -// Advisor. +// ServiceTierAdvisorProperties is represents the properties of a Service Tier Advisor. type ServiceTierAdvisorProperties struct { ObservationPeriodStart *date.Time `json:"observationPeriodStart,omitempty"` ObservationPeriodEnd *date.Time `json:"observationPeriodEnd,omitempty"` @@ -1120,20 +1902,294 @@ type ServiceTierAdvisorProperties struct { Confidence *float64 `json:"confidence,omitempty"` } -// SloUsageMetric is represents a Slo Usage Metric. +// SloUsageMetric is a Slo Usage Metric. type SloUsageMetric struct { ServiceLevelObjective ServiceObjectiveName `json:"serviceLevelObjective,omitempty"` ServiceLevelObjectiveID *uuid.UUID `json:"serviceLevelObjectiveId,omitempty"` InRangeTimeRatio *float64 `json:"inRangeTimeRatio,omitempty"` } -// SubResource is subresource properties -type SubResource struct { - Name *string `json:"name,omitempty"` - ID *string `json:"id,omitempty"` +// SyncAgent is an Azure SQL Database sync agent. +type SyncAgent struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SyncAgentProperties `json:"properties,omitempty"` } -// TrackedResource is aRM tracked top level resource. +// SyncAgentKeyProperties is properties of an Azure SQL Database sync agent key. +type SyncAgentKeyProperties struct { + autorest.Response `json:"-"` + SyncAgentKey *string `json:"syncAgentKey,omitempty"` +} + +// SyncAgentLinkedDatabase is an Azure SQL Database sync agent linked database. +type SyncAgentLinkedDatabase struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SyncAgentLinkedDatabaseProperties `json:"properties,omitempty"` +} + +// SyncAgentLinkedDatabaseListResult is a list of sync agent linked databases. +type SyncAgentLinkedDatabaseListResult struct { + autorest.Response `json:"-"` + Value *[]SyncAgentLinkedDatabase `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SyncAgentLinkedDatabaseListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SyncAgentLinkedDatabaseListResult) SyncAgentLinkedDatabaseListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SyncAgentLinkedDatabaseProperties is properties of an Azure SQL Database sync agent linked database. +type SyncAgentLinkedDatabaseProperties struct { + DatabaseType SyncMemberDbType `json:"databaseType,omitempty"` + DatabaseID *string `json:"databaseId,omitempty"` + Description *string `json:"description,omitempty"` + ServerName *string `json:"serverName,omitempty"` + DatabaseName *string `json:"databaseName,omitempty"` + UserName *string `json:"userName,omitempty"` +} + +// SyncAgentListResult is a list of sync agents. +type SyncAgentListResult struct { + autorest.Response `json:"-"` + Value *[]SyncAgent `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SyncAgentListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SyncAgentListResult) SyncAgentListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SyncAgentProperties is properties of an Azure SQL Database sync agent. +type SyncAgentProperties struct { + Name *string `json:"name,omitempty"` + SyncDatabaseID *string `json:"syncDatabaseId,omitempty"` + LastAliveTime *date.Time `json:"lastAliveTime,omitempty"` + State SyncAgentState `json:"state,omitempty"` + IsUpToDate *bool `json:"isUpToDate,omitempty"` + ExpiryTime *date.Time `json:"expiryTime,omitempty"` + Version *string `json:"version,omitempty"` +} + +// SyncDatabaseIDListResult is a list of sync database ID properties. +type SyncDatabaseIDListResult struct { + autorest.Response `json:"-"` + Value *[]SyncDatabaseIDProperties `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SyncDatabaseIDListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SyncDatabaseIDListResult) SyncDatabaseIDListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SyncDatabaseIDProperties is properties of the sync database id. +type SyncDatabaseIDProperties struct { + ID *string `json:"id,omitempty"` +} + +// SyncFullSchemaProperties is properties of the database full schema. +type SyncFullSchemaProperties struct { + Tables *[]SyncFullSchemaTable `json:"tables,omitempty"` + LastUpdateTime *date.Time `json:"lastUpdateTime,omitempty"` +} + +// SyncFullSchemaPropertiesListResult is a list of sync schema properties. +type SyncFullSchemaPropertiesListResult struct { + autorest.Response `json:"-"` + Value *[]SyncFullSchemaProperties `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SyncFullSchemaPropertiesListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SyncFullSchemaPropertiesListResult) SyncFullSchemaPropertiesListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SyncFullSchemaTable is properties of the table in the database full schema. +type SyncFullSchemaTable struct { + Columns *[]SyncFullSchemaTableColumn `json:"columns,omitempty"` + ErrorID *string `json:"errorId,omitempty"` + HasError *bool `json:"hasError,omitempty"` + Name *string `json:"name,omitempty"` + QuotedName *string `json:"quotedName,omitempty"` +} + +// SyncFullSchemaTableColumn is properties of the column in the table of database full schema. +type SyncFullSchemaTableColumn struct { + DataSize *string `json:"dataSize,omitempty"` + DataType *string `json:"dataType,omitempty"` + ErrorID *string `json:"errorId,omitempty"` + HasError *bool `json:"hasError,omitempty"` + IsPrimaryKey *bool `json:"isPrimaryKey,omitempty"` + Name *string `json:"name,omitempty"` + QuotedName *string `json:"quotedName,omitempty"` +} + +// SyncGroup is an Azure SQL Database sync group. +type SyncGroup struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SyncGroupProperties `json:"properties,omitempty"` +} + +// SyncGroupListResult is a list of sync groups. +type SyncGroupListResult struct { + autorest.Response `json:"-"` + Value *[]SyncGroup `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SyncGroupListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SyncGroupListResult) SyncGroupListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SyncGroupLogListResult is a list of sync group log properties. +type SyncGroupLogListResult struct { + autorest.Response `json:"-"` + Value *[]SyncGroupLogProperties `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SyncGroupLogListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SyncGroupLogListResult) SyncGroupLogListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SyncGroupLogProperties is properties of an Azure SQL Database sync group log. +type SyncGroupLogProperties struct { + Timestamp *date.Time `json:"timestamp,omitempty"` + Type SyncGroupLogType `json:"type,omitempty"` + Source *string `json:"source,omitempty"` + Details *string `json:"details,omitempty"` + TracingID *uuid.UUID `json:"tracingId,omitempty"` + OperationStatus *string `json:"operationStatus,omitempty"` +} + +// SyncGroupProperties is properties of a sync group. +type SyncGroupProperties struct { + Interval *int32 `json:"interval,omitempty"` + LastSyncTime *date.Time `json:"lastSyncTime,omitempty"` + ConflictResolutionPolicy SyncConflictResolutionPolicy `json:"conflictResolutionPolicy,omitempty"` + SyncDatabaseID *string `json:"syncDatabaseId,omitempty"` + HubDatabaseUserName *string `json:"hubDatabaseUserName,omitempty"` + HubDatabasePassword *string `json:"hubDatabasePassword,omitempty"` + SyncState SyncGroupState `json:"syncState,omitempty"` + Schema *SyncGroupSchema `json:"schema,omitempty"` +} + +// SyncGroupSchema is properties of sync group schema. +type SyncGroupSchema struct { + Tables *[]SyncGroupSchemaTable `json:"tables,omitempty"` + MasterSyncMemberName *string `json:"masterSyncMemberName,omitempty"` +} + +// SyncGroupSchemaTable is properties of table in sync group schema. +type SyncGroupSchemaTable struct { + Columns *[]SyncGroupSchemaTableColumn `json:"columns,omitempty"` + QuotedName *string `json:"quotedName,omitempty"` +} + +// SyncGroupSchemaTableColumn is properties of column in sync group table. +type SyncGroupSchemaTableColumn struct { + QuotedName *string `json:"quotedName,omitempty"` + DataSize *string `json:"dataSize,omitempty"` + DataType *string `json:"dataType,omitempty"` +} + +// SyncMember is an Azure SQL Database sync member. +type SyncMember struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *SyncMemberProperties `json:"properties,omitempty"` +} + +// SyncMemberListResult is a list of Azure SQL Database sync members. +type SyncMemberListResult struct { + autorest.Response `json:"-"` + Value *[]SyncMember `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SyncMemberListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SyncMemberListResult) SyncMemberListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SyncMemberProperties is properties of a sync member. +type SyncMemberProperties struct { + DatabaseType SyncMemberDbType `json:"databaseType,omitempty"` + SyncAgentID *string `json:"syncAgentId,omitempty"` + SQLServerDatabaseID *uuid.UUID `json:"sqlServerDatabaseId,omitempty"` + ServerName *string `json:"serverName,omitempty"` + DatabaseName *string `json:"databaseName,omitempty"` + UserName *string `json:"userName,omitempty"` + Password *string `json:"password,omitempty"` + SyncDirection SyncDirection `json:"syncDirection,omitempty"` + SyncState SyncMemberState `json:"syncState,omitempty"` +} + +// TrackedResource is ARM tracked top level resource. type TrackedResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -1142,39 +2198,75 @@ type TrackedResource struct { Location *string `json:"location,omitempty"` } -// TransparentDataEncryption is represents a database transparent data -// encryption . +// TransparentDataEncryption is represents a database transparent data encryption configuration. type TransparentDataEncryption struct { autorest.Response `json:"-"` - Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` *TransparentDataEncryptionProperties `json:"properties,omitempty"` } -// TransparentDataEncryptionActivity is represents a database transparent data -// encryption Scan. +// TransparentDataEncryptionActivity is represents a database transparent data encryption Scan. type TransparentDataEncryptionActivity struct { - Name *string `json:"name,omitempty"` ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Location *string `json:"location,omitempty"` *TransparentDataEncryptionActivityProperties `json:"properties,omitempty"` } -// TransparentDataEncryptionActivityListResult is represents the response to a -// list database transparent data encryption activity request. +// TransparentDataEncryptionActivityListResult is represents the response to a list database transparent data +// encryption activity request. type TransparentDataEncryptionActivityListResult struct { autorest.Response `json:"-"` Value *[]TransparentDataEncryptionActivity `json:"value,omitempty"` } -// TransparentDataEncryptionActivityProperties is represents the properties of -// a database transparent data encryption Scan. +// TransparentDataEncryptionActivityProperties is represents the properties of a database transparent data encryption +// Scan. type TransparentDataEncryptionActivityProperties struct { Status TransparentDataEncryptionActivityStatus `json:"status,omitempty"` PercentComplete *float64 `json:"percentComplete,omitempty"` } -// TransparentDataEncryptionProperties is represents the properties of a -// database transparent data encryption. +// TransparentDataEncryptionProperties is represents the properties of a database transparent data encryption. type TransparentDataEncryptionProperties struct { Status TransparentDataEncryptionStatus `json:"status,omitempty"` } + +// VirtualNetworkRule is a virtual network rule. +type VirtualNetworkRule struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *VirtualNetworkRuleProperties `json:"properties,omitempty"` +} + +// VirtualNetworkRuleListResult is a list of virtual network rules. +type VirtualNetworkRuleListResult struct { + autorest.Response `json:"-"` + Value *[]VirtualNetworkRule `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// VirtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client VirtualNetworkRuleListResult) VirtualNetworkRuleListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// VirtualNetworkRuleProperties is properties of a virtual network rule. +type VirtualNetworkRuleProperties struct { + VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"` + IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"` + State VirtualNetworkRuleState `json:"state,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/operations.go index 510869b74..f1ec16293 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/operations.go @@ -14,9 +14,8 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,10 +23,9 @@ import ( "net/http" ) -// OperationsClient is the the Azure SQL Database management API provides a -// RESTful set of web services that interact with Azure SQL Database services -// to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. +// OperationsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. type OperationsClient struct { ManagementClient } @@ -37,8 +35,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -68,7 +65,7 @@ func (client OperationsClient) List() (result OperationListResult, err error) { // ListPreparer prepares the List request. func (client OperationsClient) ListPreparer() (*http.Request, error) { - const APIVersion = "2014-04-01" + const APIVersion = "2015-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -99,3 +96,72 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat result.Response = autorest.Response{Response: resp} return } + +// ListNextResults retrieves the next set of results, if any. +func (client OperationsClient) ListNextResults(lastResults OperationListResult) (result OperationListResult, err error) { + req, err := lastResults.OperationListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.OperationsClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.OperationsClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.OperationsClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) { + resultChan := make(chan Operation) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recommendedelasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recommendedelasticpools.go index 6beccb801..99f39eb88 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recommendedelasticpools.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recommendedelasticpools.go @@ -14,9 +14,8 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,32 +23,28 @@ import ( "net/http" ) -// RecommendedElasticPoolsClient is the the Azure SQL Database management API -// provides a RESTful set of web services that interact with Azure SQL Database -// services to manage your databases. The API enables you to create, retrieve, +// RecommendedElasticPoolsClient is the the Azure SQL Database management API provides a RESTful set of web services +// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, // update, and delete databases. type RecommendedElasticPoolsClient struct { ManagementClient } -// NewRecommendedElasticPoolsClient creates an instance of the -// RecommendedElasticPoolsClient client. +// NewRecommendedElasticPoolsClient creates an instance of the RecommendedElasticPoolsClient client. func NewRecommendedElasticPoolsClient(subscriptionID string) RecommendedElasticPoolsClient { return NewRecommendedElasticPoolsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendedElasticPoolsClientWithBaseURI creates an instance of the -// RecommendedElasticPoolsClient client. +// NewRecommendedElasticPoolsClientWithBaseURI creates an instance of the RecommendedElasticPoolsClient client. func NewRecommendedElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) RecommendedElasticPoolsClient { return RecommendedElasticPoolsClient{NewWithBaseURI(baseURI, subscriptionID)} } // Get gets a recommented elastic pool. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. recommendedElasticPoolName -// is the name of the recommended elastic pool to be retrieved. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. recommendedElasticPoolName is the +// name of the recommended elastic pool to be retrieved. func (client RecommendedElasticPoolsClient) Get(resourceGroupName string, serverName string, recommendedElasticPoolName string) (result RecommendedElasticPool, err error) { req, err := client.GetPreparer(resourceGroupName, serverName, recommendedElasticPoolName) if err != nil { @@ -113,82 +108,10 @@ func (client RecommendedElasticPoolsClient) GetResponder(resp *http.Response) (r return } -// GetDatabases gets a database inside of a recommented elastic pool. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. recommendedElasticPoolName -// is the name of the elastic pool to be retrieved. databaseName is the name of -// the database to be retrieved. -func (client RecommendedElasticPoolsClient) GetDatabases(resourceGroupName string, serverName string, recommendedElasticPoolName string, databaseName string) (result Database, err error) { - req, err := client.GetDatabasesPreparer(resourceGroupName, serverName, recommendedElasticPoolName, databaseName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecommendedElasticPoolsClient", "GetDatabases", nil, "Failure preparing request") - return - } - - resp, err := client.GetDatabasesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RecommendedElasticPoolsClient", "GetDatabases", resp, "Failure sending request") - return - } - - result, err = client.GetDatabasesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecommendedElasticPoolsClient", "GetDatabases", resp, "Failure responding to request") - } - - return -} - -// GetDatabasesPreparer prepares the GetDatabases request. -func (client RecommendedElasticPoolsClient) GetDatabasesPreparer(resourceGroupName string, serverName string, recommendedElasticPoolName string, databaseName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "databaseName": autorest.Encode("path", databaseName), - "recommendedElasticPoolName": autorest.Encode("path", recommendedElasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases/{databaseName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// GetDatabasesSender sends the GetDatabases request. The method will close the -// http.Response Body if it receives an error. -func (client RecommendedElasticPoolsClient) GetDatabasesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// GetDatabasesResponder handles the response to the GetDatabases request. The method always -// closes the http.Response Body. -func (client RecommendedElasticPoolsClient) GetDatabasesResponder(resp *http.Response) (result Database, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - // ListByServer returns recommended elastic pools. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. func (client RecommendedElasticPoolsClient) ListByServer(resourceGroupName string, serverName string) (result RecommendedElasticPoolListResult, err error) { req, err := client.ListByServerPreparer(resourceGroupName, serverName) if err != nil { @@ -251,81 +174,11 @@ func (client RecommendedElasticPoolsClient) ListByServerResponder(resp *http.Res return } -// ListDatabases returns a list of databases inside a recommented elastic pool. +// ListMetrics returns recommented elastic pool metrics. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. recommendedElasticPoolName -// is the name of the recommended elastic pool to be retrieved. -func (client RecommendedElasticPoolsClient) ListDatabases(resourceGroupName string, serverName string, recommendedElasticPoolName string) (result DatabaseListResult, err error) { - req, err := client.ListDatabasesPreparer(resourceGroupName, serverName, recommendedElasticPoolName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecommendedElasticPoolsClient", "ListDatabases", nil, "Failure preparing request") - return - } - - resp, err := client.ListDatabasesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.RecommendedElasticPoolsClient", "ListDatabases", resp, "Failure sending request") - return - } - - result, err = client.ListDatabasesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.RecommendedElasticPoolsClient", "ListDatabases", resp, "Failure responding to request") - } - - return -} - -// ListDatabasesPreparer prepares the ListDatabases request. -func (client RecommendedElasticPoolsClient) ListDatabasesPreparer(resourceGroupName string, serverName string, recommendedElasticPoolName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "recommendedElasticPoolName": autorest.Encode("path", recommendedElasticPoolName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recommendedElasticPools/{recommendedElasticPoolName}/databases", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListDatabasesSender sends the ListDatabases request. The method will close the -// http.Response Body if it receives an error. -func (client RecommendedElasticPoolsClient) ListDatabasesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListDatabasesResponder handles the response to the ListDatabases request. The method always -// closes the http.Response Body. -func (client RecommendedElasticPoolsClient) ListDatabasesResponder(resp *http.Response) (result DatabaseListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListMetrics returns a recommented elastic pool metrics. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. recommendedElasticPoolName -// is the name of the recommended elastic pool to be retrieved. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. recommendedElasticPoolName is the +// name of the recommended elastic pool to be retrieved. func (client RecommendedElasticPoolsClient) ListMetrics(resourceGroupName string, serverName string, recommendedElasticPoolName string) (result RecommendedElasticPoolListMetricsResult, err error) { req, err := client.ListMetricsPreparer(resourceGroupName, serverName, recommendedElasticPoolName) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recoverabledatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recoverabledatabases.go new file mode 100644 index 000000000..ffc44c53b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/recoverabledatabases.go @@ -0,0 +1,175 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// RecoverableDatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type RecoverableDatabasesClient struct { + ManagementClient +} + +// NewRecoverableDatabasesClient creates an instance of the RecoverableDatabasesClient client. +func NewRecoverableDatabasesClient(subscriptionID string) RecoverableDatabasesClient { + return NewRecoverableDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRecoverableDatabasesClientWithBaseURI creates an instance of the RecoverableDatabasesClient client. +func NewRecoverableDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RecoverableDatabasesClient { + return RecoverableDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a recoverable database, which is a resource representing a database's geo backup +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database +func (client RecoverableDatabasesClient) Get(resourceGroupName string, serverName string, databaseName string) (result RecoverableDatabase, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RecoverableDatabasesClient) GetPreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RecoverableDatabasesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RecoverableDatabasesClient) GetResponder(resp *http.Response) (result RecoverableDatabase, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets a list of recoverable databases +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client RecoverableDatabasesClient) ListByServer(resourceGroupName string, serverName string) (result RecoverableDatabaseListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RecoverableDatabasesClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client RecoverableDatabasesClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client RecoverableDatabasesClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client RecoverableDatabasesClient) ListByServerResponder(resp *http.Response) (result RecoverableDatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/replicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/replicationlinks.go new file mode 100644 index 000000000..62127b8a2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/replicationlinks.go @@ -0,0 +1,418 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ReplicationLinksClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type ReplicationLinksClient struct { + ManagementClient +} + +// NewReplicationLinksClient creates an instance of the ReplicationLinksClient client. +func NewReplicationLinksClient(subscriptionID string) ReplicationLinksClient { + return NewReplicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewReplicationLinksClientWithBaseURI creates an instance of the ReplicationLinksClient client. +func NewReplicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ReplicationLinksClient { + return ReplicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Delete deletes a database replication link. Cannot be done during failover. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database that has the replication link to be dropped. linkID is the ID of the replication link to be deleted. +func (client ReplicationLinksClient) Delete(resourceGroupName string, serverName string, databaseName string, linkID string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceGroupName, serverName, databaseName, linkID) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ReplicationLinksClient) DeletePreparer(resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "linkId": autorest.Encode("path", linkID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLinksClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ReplicationLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Failover sets which replica database is primary by failing over from the current primary replica database. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database that has the replication link to be failed over. linkID is the ID of the replication link to be failed +// over. +func (client ReplicationLinksClient) Failover(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.FailoverPreparer(resourceGroupName, serverName, databaseName, linkID, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Failover", nil, "Failure preparing request") + return + } + + resp, err := client.FailoverSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Failover", resp, "Failure sending request") + return + } + + result, err = client.FailoverResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Failover", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// FailoverPreparer prepares the Failover request. +func (client ReplicationLinksClient) FailoverPreparer(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "linkId": autorest.Encode("path", linkID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// FailoverSender sends the Failover request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLinksClient) FailoverSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// FailoverResponder handles the response to the Failover request. The method always +// closes the http.Response Body. +func (client ReplicationLinksClient) FailoverResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// FailoverAllowDataLoss sets which replica database is primary by failing over from the current primary replica +// database. This operation might result in data loss. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database that has the replication link to be failed over. linkID is the ID of the replication link to be failed +// over. +func (client ReplicationLinksClient) FailoverAllowDataLoss(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.FailoverAllowDataLossPreparer(resourceGroupName, serverName, databaseName, linkID, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "FailoverAllowDataLoss", nil, "Failure preparing request") + return + } + + resp, err := client.FailoverAllowDataLossSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "FailoverAllowDataLoss", resp, "Failure sending request") + return + } + + result, err = client.FailoverAllowDataLossResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "FailoverAllowDataLoss", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// FailoverAllowDataLossPreparer prepares the FailoverAllowDataLoss request. +func (client ReplicationLinksClient) FailoverAllowDataLossPreparer(resourceGroupName string, serverName string, databaseName string, linkID string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "linkId": autorest.Encode("path", linkID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// FailoverAllowDataLossSender sends the FailoverAllowDataLoss request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLinksClient) FailoverAllowDataLossSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// FailoverAllowDataLossResponder handles the response to the FailoverAllowDataLoss request. The method always +// closes the http.Response Body. +func (client ReplicationLinksClient) FailoverAllowDataLossResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a database replication link. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to get the link for. linkID is the replication link ID to be retrieved. +func (client ReplicationLinksClient) Get(resourceGroupName string, serverName string, databaseName string, linkID string) (result ReplicationLink, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, linkID) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ReplicationLinksClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, linkID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "linkId": autorest.Encode("path", linkID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLinksClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ReplicationLinksClient) GetResponder(resp *http.Response) (result ReplicationLink, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabase lists a database's replication links. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to retrieve links for. +func (client ReplicationLinksClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string) (result ReplicationLinkListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ReplicationLinksClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client ReplicationLinksClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client ReplicationLinksClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client ReplicationLinksClient) ListByDatabaseResponder(resp *http.Response) (result ReplicationLinkListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorabledroppeddatabases.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorabledroppeddatabases.go new file mode 100644 index 000000000..cf49b0a48 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorabledroppeddatabases.go @@ -0,0 +1,175 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// RestorableDroppedDatabasesClient is the the Azure SQL Database management API provides a RESTful set of web services +// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, +// update, and delete databases. +type RestorableDroppedDatabasesClient struct { + ManagementClient +} + +// NewRestorableDroppedDatabasesClient creates an instance of the RestorableDroppedDatabasesClient client. +func NewRestorableDroppedDatabasesClient(subscriptionID string) RestorableDroppedDatabasesClient { + return NewRestorableDroppedDatabasesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRestorableDroppedDatabasesClientWithBaseURI creates an instance of the RestorableDroppedDatabasesClient client. +func NewRestorableDroppedDatabasesClientWithBaseURI(baseURI string, subscriptionID string) RestorableDroppedDatabasesClient { + return RestorableDroppedDatabasesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a deleted database that can be restored +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. restorableDroppededDatabaseID is the +// id of the deleted database in the form of databaseName,deletionTimeInFileTimeFormat +func (client RestorableDroppedDatabasesClient) Get(resourceGroupName string, serverName string, restorableDroppededDatabaseID string) (result RestorableDroppedDatabase, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, restorableDroppededDatabaseID) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client RestorableDroppedDatabasesClient) GetPreparer(resourceGroupName string, serverName string, restorableDroppededDatabaseID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "restorableDroppededDatabaseId": autorest.Encode("path", restorableDroppededDatabaseID), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases/{restorableDroppededDatabaseId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client RestorableDroppedDatabasesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client RestorableDroppedDatabasesClient) GetResponder(resp *http.Response) (result RestorableDroppedDatabase, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets a list of deleted databases that can be restored +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client RestorableDroppedDatabasesClient) ListByServer(resourceGroupName string, serverName string) (result RestorableDroppedDatabaseListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RestorableDroppedDatabasesClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client RestorableDroppedDatabasesClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/restorableDroppedDatabases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client RestorableDroppedDatabasesClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client RestorableDroppedDatabasesClient) ListByServerResponder(resp *http.Response) (result RestorableDroppedDatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorepoints.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorepoints.go new file mode 100644 index 000000000..6f3db13d9 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/restorepoints.go @@ -0,0 +1,109 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// RestorePointsClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type RestorePointsClient struct { + ManagementClient +} + +// NewRestorePointsClient creates an instance of the RestorePointsClient client. +func NewRestorePointsClient(subscriptionID string) RestorePointsClient { + return NewRestorePointsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewRestorePointsClientWithBaseURI creates an instance of the RestorePointsClient client. +func NewRestorePointsClientWithBaseURI(baseURI string, subscriptionID string) RestorePointsClient { + return RestorePointsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByDatabase gets a list of database restore points. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database to get available restore points. +func (client RestorePointsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string) (result RestorePointListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.RestorePointsClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client RestorePointsClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client RestorePointsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client RestorePointsClient) ListByDatabaseResponder(resp *http.Response) (result RestorePointListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverazureadadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverazureadadministrators.go new file mode 100644 index 000000000..5371fa653 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverazureadadministrators.go @@ -0,0 +1,363 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ServerAzureADAdministratorsClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type ServerAzureADAdministratorsClient struct { + ManagementClient +} + +// NewServerAzureADAdministratorsClient creates an instance of the ServerAzureADAdministratorsClient client. +func NewServerAzureADAdministratorsClient(subscriptionID string) ServerAzureADAdministratorsClient { + return NewServerAzureADAdministratorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServerAzureADAdministratorsClientWithBaseURI creates an instance of the ServerAzureADAdministratorsClient client. +func NewServerAzureADAdministratorsClientWithBaseURI(baseURI string, subscriptionID string) ServerAzureADAdministratorsClient { + return ServerAzureADAdministratorsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a new Server Active Directory Administrator or updates an existing server Active Directory +// Administrator. This method may poll for completion. Polling can be canceled by passing the cancel channel argument. +// The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. administratorName is name of the +// server administrator resource. properties is the required parameters for creating or updating an Active Directory +// Administrator. +func (client ServerAzureADAdministratorsClient) CreateOrUpdate(resourceGroupName string, serverName string, administratorName string, properties ServerAzureADAdministrator, cancel <-chan struct{}) (<-chan ServerAzureADAdministrator, <-chan error) { + resultChan := make(chan ServerAzureADAdministrator, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: properties, + Constraints: []validation.Constraint{{Target: "properties.ServerAdministratorProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "properties.ServerAdministratorProperties.AdministratorType", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "properties.ServerAdministratorProperties.Login", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "properties.ServerAdministratorProperties.Sid", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "properties.ServerAdministratorProperties.TenantID", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result ServerAzureADAdministrator + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, administratorName, properties, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ServerAzureADAdministratorsClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, administratorName string, properties ServerAzureADAdministrator, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "administratorName": autorest.Encode("path", administratorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), + autorest.WithJSON(properties), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) CreateOrUpdateResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes an existing server Active Directory Administrator. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. administratorName is name of the +// server administrator resource. +func (client ServerAzureADAdministratorsClient) Delete(resourceGroupName string, serverName string, administratorName string, cancel <-chan struct{}) (<-chan ServerAzureADAdministrator, <-chan error) { + resultChan := make(chan ServerAzureADAdministrator, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result ServerAzureADAdministrator + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, administratorName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client ServerAzureADAdministratorsClient) DeletePreparer(resourceGroupName string, serverName string, administratorName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "administratorName": autorest.Encode("path", administratorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) DeleteResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusNoContent, http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get returns an server Administrator. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. administratorName is name of the +// server administrator resource. +func (client ServerAzureADAdministratorsClient) Get(resourceGroupName string, serverName string, administratorName string) (result ServerAzureADAdministrator, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, administratorName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServerAzureADAdministratorsClient) GetPreparer(resourceGroupName string, serverName string, administratorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "administratorName": autorest.Encode("path", administratorName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) GetResponder(resp *http.Response) (result ServerAzureADAdministrator, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer returns a list of server Administrators. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client ServerAzureADAdministratorsClient) ListByServer(resourceGroupName string, serverName string) (result ServerAdministratorListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerAzureADAdministratorsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client ServerAzureADAdministratorsClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client ServerAzureADAdministratorsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client ServerAzureADAdministratorsClient) ListByServerResponder(resp *http.Response) (result ServerAdministratorListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servercommunicationlinks.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servercommunicationlinks.go new file mode 100644 index 000000000..a74de33d1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servercommunicationlinks.go @@ -0,0 +1,339 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ServerCommunicationLinksClient is the the Azure SQL Database management API provides a RESTful set of web services +// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, +// update, and delete databases. +type ServerCommunicationLinksClient struct { + ManagementClient +} + +// NewServerCommunicationLinksClient creates an instance of the ServerCommunicationLinksClient client. +func NewServerCommunicationLinksClient(subscriptionID string) ServerCommunicationLinksClient { + return NewServerCommunicationLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServerCommunicationLinksClientWithBaseURI creates an instance of the ServerCommunicationLinksClient client. +func NewServerCommunicationLinksClientWithBaseURI(baseURI string, subscriptionID string) ServerCommunicationLinksClient { + return ServerCommunicationLinksClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates a server communication link. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. communicationLinkName is the name of +// the server communication link. parameters is the required parameters for creating a server communication link. +func (client ServerCommunicationLinksClient) CreateOrUpdate(resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink, cancel <-chan struct{}) (<-chan ServerCommunicationLink, <-chan error) { + resultChan := make(chan ServerCommunicationLink, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ServerCommunicationLinkProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.ServerCommunicationLinkProperties.PartnerServer", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "sql.ServerCommunicationLinksClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result ServerCommunicationLink + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, communicationLinkName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ServerCommunicationLinksClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, communicationLinkName string, parameters ServerCommunicationLink, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "communicationLinkName": autorest.Encode("path", communicationLinkName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ServerCommunicationLinksClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServerCommunicationLinksClient) CreateOrUpdateResponder(resp *http.Response) (result ServerCommunicationLink, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a server communication link. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. communicationLinkName is the name of +// the server communication link. +func (client ServerCommunicationLinksClient) Delete(resourceGroupName string, serverName string, communicationLinkName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceGroupName, serverName, communicationLinkName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ServerCommunicationLinksClient) DeletePreparer(resourceGroupName string, serverName string, communicationLinkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "communicationLinkName": autorest.Encode("path", communicationLinkName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ServerCommunicationLinksClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServerCommunicationLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get returns a server communication link. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. communicationLinkName is the name of +// the server communication link. +func (client ServerCommunicationLinksClient) Get(resourceGroupName string, serverName string, communicationLinkName string) (result ServerCommunicationLink, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, communicationLinkName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServerCommunicationLinksClient) GetPreparer(resourceGroupName string, serverName string, communicationLinkName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "communicationLinkName": autorest.Encode("path", communicationLinkName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServerCommunicationLinksClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServerCommunicationLinksClient) GetResponder(resp *http.Response) (result ServerCommunicationLink, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets a list of server communication links. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client ServerCommunicationLinksClient) ListByServer(resourceGroupName string, serverName string) (result ServerCommunicationLinkListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerCommunicationLinksClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client ServerCommunicationLinksClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client ServerCommunicationLinksClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client ServerCommunicationLinksClient) ListByServerResponder(resp *http.Response) (result ServerCommunicationLinkListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverconnectionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverconnectionpolicies.go new file mode 100644 index 000000000..70493592f --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverconnectionpolicies.go @@ -0,0 +1,179 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ServerConnectionPoliciesClient is the the Azure SQL Database management API provides a RESTful set of web services +// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, +// update, and delete databases. +type ServerConnectionPoliciesClient struct { + ManagementClient +} + +// NewServerConnectionPoliciesClient creates an instance of the ServerConnectionPoliciesClient client. +func NewServerConnectionPoliciesClient(subscriptionID string) ServerConnectionPoliciesClient { + return NewServerConnectionPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServerConnectionPoliciesClientWithBaseURI creates an instance of the ServerConnectionPoliciesClient client. +func NewServerConnectionPoliciesClientWithBaseURI(baseURI string, subscriptionID string) ServerConnectionPoliciesClient { + return ServerConnectionPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates the server's connection policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. connectionPolicyName is the name of +// the connection policy. parameters is the required parameters for updating a secure connection policy. +func (client ServerConnectionPoliciesClient) CreateOrUpdate(resourceGroupName string, serverName string, connectionPolicyName string, parameters ServerConnectionPolicy) (result ServerConnectionPolicy, err error) { + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, connectionPolicyName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ServerConnectionPoliciesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, connectionPolicyName string, parameters ServerConnectionPolicy) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionPolicyName": autorest.Encode("path", connectionPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ServerConnectionPoliciesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServerConnectionPoliciesClient) CreateOrUpdateResponder(resp *http.Response) (result ServerConnectionPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the server's secure connection policy. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. connectionPolicyName is the name of +// the connection policy. +func (client ServerConnectionPoliciesClient) Get(resourceGroupName string, serverName string, connectionPolicyName string) (result ServerConnectionPolicy, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, connectionPolicyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerConnectionPoliciesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServerConnectionPoliciesClient) GetPreparer(resourceGroupName string, serverName string, connectionPolicyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "connectionPolicyName": autorest.Encode("path", connectionPolicyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServerConnectionPoliciesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServerConnectionPoliciesClient) GetResponder(resp *http.Response) (result ServerConnectionPolicy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverkeys.go new file mode 100644 index 000000000..953427188 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverkeys.go @@ -0,0 +1,416 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ServerKeysClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. +type ServerKeysClient struct { + ManagementClient +} + +// NewServerKeysClient creates an instance of the ServerKeysClient client. +func NewServerKeysClient(subscriptionID string) ServerKeysClient { + return NewServerKeysClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServerKeysClientWithBaseURI creates an instance of the ServerKeysClient client. +func NewServerKeysClientWithBaseURI(baseURI string, subscriptionID string) ServerKeysClient { + return ServerKeysClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a server key. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. keyName is the name of the server +// key to be operated on (updated or created). The key name is required to be in the format of 'vault_key_version'. For +// example, if the keyId is https://YourVaultName.vault.azure.net/keys/YourKeyName/01234567890123456789012345678901, +// then the server key name should be formatted as: YourVaultName_YourKeyName_01234567890123456789012345678901 +// parameters is the requested server key resource state. +func (client ServerKeysClient) CreateOrUpdate(resourceGroupName string, serverName string, keyName string, parameters ServerKey, cancel <-chan struct{}) (<-chan ServerKey, <-chan error) { + resultChan := make(chan ServerKey, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result ServerKey + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, keyName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client ServerKeysClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, keyName string, parameters ServerKey, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client ServerKeysClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client ServerKeysClient) CreateOrUpdateResponder(resp *http.Response) (result ServerKey, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the server key with the given name. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. keyName is the name of the server +// key to be deleted. +func (client ServerKeysClient) Delete(resourceGroupName string, serverName string, keyName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, keyName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client ServerKeysClient) DeletePreparer(resourceGroupName string, serverName string, keyName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ServerKeysClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ServerKeysClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a server key. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. keyName is the name of the server +// key to be retrieved. +func (client ServerKeysClient) Get(resourceGroupName string, serverName string, keyName string) (result ServerKey, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, keyName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServerKeysClient) GetPreparer(resourceGroupName string, serverName string, keyName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "keyName": autorest.Encode("path", keyName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServerKeysClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServerKeysClient) GetResponder(resp *http.Response) (result ServerKey, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets a list of server keys. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client ServerKeysClient) ListByServer(resourceGroupName string, serverName string) (result ServerKeyListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client ServerKeysClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client ServerKeysClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client ServerKeysClient) ListByServerResponder(resp *http.Response) (result ServerKeyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServerNextResults retrieves the next set of results, if any. +func (client ServerKeysClient) ListByServerNextResults(lastResults ServerKeyListResult) (result ServerKeyListResult, err error) { + req, err := lastResults.ServerKeyListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", resp, "Failure sending next results request") + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerKeysClient", "ListByServer", resp, "Failure responding to next results request") + } + + return +} + +// ListByServerComplete gets all elements from the list without paging. +func (client ServerKeysClient) ListByServerComplete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan ServerKey, <-chan error) { + resultChan := make(chan ServerKey) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByServer(resourceGroupName, serverName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByServerNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servers.go index 83290fa93..98205b7a3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servers.go @@ -14,20 +14,19 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" "net/http" ) -// ServersClient is the the Azure SQL Database management API provides a -// RESTful set of web services that interact with Azure SQL Database services -// to manage your databases. The API enables you to create, retrieve, update, -// and delete databases. +// ServersClient is the the Azure SQL Database management API provides a RESTful set of web services that interact with +// Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and delete +// databases. type ServersClient struct { ManagementClient } @@ -42,43 +41,128 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC return ServersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates a new server. +// CheckNameAvailability determines whether a resource can be created with the specified name. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. parameters is the required -// parameters for creating or updating a server. -func (client ServersClient) CreateOrUpdate(resourceGroupName string, serverName string, parameters Server) (result Server, err error) { - req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, parameters) +// parameters is the parameters to request for name availability. +func (client ServersClient) CheckNameAvailability(parameters CheckNameAvailabilityRequest) (result CheckNameAvailabilityResponse, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "sql.ServersClient", "CheckNameAvailability") + } + + req, err := client.CheckNameAvailabilityPreparer(parameters) if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "sql.ServersClient", "CheckNameAvailability", nil, "Failure preparing request") return } - resp, err := client.CreateOrUpdateSender(req) + resp, err := client.CheckNameAvailabilitySender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "sql.ServersClient", "CheckNameAvailability", resp, "Failure sending request") return } - result, err = client.CreateOrUpdateResponder(resp) + result, err = client.CheckNameAvailabilityResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.ServersClient", "CheckNameAvailability", resp, "Failure responding to request") } return } +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client ServersClient) CheckNameAvailabilityPreparer(parameters CheckNameAvailabilityRequest) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client ServersClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client ServersClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a server. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. parameters is the requested server +// resource state. +func (client ServersClient) CreateOrUpdate(resourceGroupName string, serverName string, parameters Server, cancel <-chan struct{}) (<-chan Server, <-chan error) { + resultChan := make(chan Server, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result Server + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServersClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + // CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ServersClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, parameters Server) (*http.Request, error) { +func (client ServersClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, parameters Server, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2015-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -90,13 +174,15 @@ func (client ServersClient) CreateOrUpdatePreparer(resourceGroupName string, ser autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", pathParameters), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } // CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the // http.Response Body if it receives an error. func (client ServersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } // CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always @@ -105,49 +191,62 @@ func (client ServersClient) CreateOrUpdateResponder(resp *http.Response) (result err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusCreated), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// Delete deletes a SQL server. +// Delete deletes a server. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. -func (client ServersClient) Delete(resourceGroupName string, serverName string) (result autorest.Response, err error) { - req, err := client.DeletePreparer(resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", nil, "Failure preparing request") - return - } +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client ServersClient) Delete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", nil, "Failure preparing request") + return + } - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", resp, "Failure sending request") - return - } + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", resp, "Failure sending request") + return + } - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", resp, "Failure responding to request") - } - - return + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServersClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan } // DeletePreparer prepares the Delete request. -func (client ServersClient) DeletePreparer(resourceGroupName string, serverName string) (*http.Request, error) { +func (client ServersClient) DeletePreparer(resourceGroupName string, serverName string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2015-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -157,13 +256,15 @@ func (client ServersClient) DeletePreparer(resourceGroupName string, serverName autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", pathParameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } // DeleteSender sends the Delete request. The method will close the // http.Response Body if it receives an error. func (client ServersClient) DeleteSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } // DeleteResponder handles the response to the Delete request. The method always @@ -172,7 +273,7 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), autorest.ByClosing()) result.Response = resp return @@ -180,9 +281,8 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores // Get gets a server. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. func (client ServersClient) Get(resourceGroupName string, serverName string) (result Server, err error) { req, err := client.GetPreparer(resourceGroupName, serverName) if err != nil { @@ -213,7 +313,7 @@ func (client ServersClient) GetPreparer(resourceGroupName string, serverName str "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2015-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -245,76 +345,7 @@ func (client ServersClient) GetResponder(resp *http.Response) (result Server, er return } -// GetServiceObjective gets a database service objective. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. serviceObjectiveName is -// the name of the service objective to retrieve. -func (client ServersClient) GetServiceObjective(resourceGroupName string, serverName string, serviceObjectiveName string) (result ServiceObjective, err error) { - req, err := client.GetServiceObjectivePreparer(resourceGroupName, serverName, serviceObjectiveName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "GetServiceObjective", nil, "Failure preparing request") - return - } - - resp, err := client.GetServiceObjectiveSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "GetServiceObjective", resp, "Failure sending request") - return - } - - result, err = client.GetServiceObjectiveResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "GetServiceObjective", resp, "Failure responding to request") - } - - return -} - -// GetServiceObjectivePreparer prepares the GetServiceObjective request. -func (client ServersClient) GetServiceObjectivePreparer(resourceGroupName string, serverName string, serviceObjectiveName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "serviceObjectiveName": autorest.Encode("path", serviceObjectiveName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// GetServiceObjectiveSender sends the GetServiceObjective request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) GetServiceObjectiveSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// GetServiceObjectiveResponder handles the response to the GetServiceObjective request. The method always -// closes the http.Response Body. -func (client ServersClient) GetServiceObjectiveResponder(resp *http.Response) (result ServiceObjective, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List returns a list of servers. +// List gets a list of all servers in the subscription. func (client ServersClient) List() (result ServerListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -343,7 +374,7 @@ func (client ServersClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2015-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -375,11 +406,79 @@ func (client ServersClient) ListResponder(resp *http.Response) (result ServerLis return } -// ListByResourceGroup returns a list of servers in a resource group. +// ListNextResults retrieves the next set of results, if any. +func (client ServersClient) ListNextResults(lastResults ServerListResult) (result ServerListResult, err error) { + req, err := lastResults.ServerListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.ServersClient", "List", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.ServersClient", "List", resp, "Failure sending next results request") + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServersClient", "List", resp, "Failure responding to next results request") + } + + return +} + +// ListComplete gets all elements from the list without paging. +func (client ServersClient) ListComplete(cancel <-chan struct{}) (<-chan Server, <-chan error) { + resultChan := make(chan Server) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListByResourceGroup gets a list of servers in a resource groups. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. func (client ServersClient) ListByResourceGroup(resourceGroupName string) (result ServerListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { @@ -409,7 +508,7 @@ func (client ServersClient) ListByResourceGroupPreparer(resourceGroupName string "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2015-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -441,134 +540,154 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r return } -// ListServiceObjectives returns database service objectives. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. -func (client ServersClient) ListServiceObjectives(resourceGroupName string, serverName string) (result ServiceObjectiveListResult, err error) { - req, err := client.ListServiceObjectivesPreparer(resourceGroupName, serverName) +// ListByResourceGroupNextResults retrieves the next set of results, if any. +func (client ServersClient) ListByResourceGroupNextResults(lastResults ServerListResult) (result ServerListResult, err error) { + req, err := lastResults.ServerListResultPreparer() if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListServiceObjectives", nil, "Failure preparing request") + return result, autorest.NewErrorWithError(err, "sql.ServersClient", "ListByResourceGroup", nil, "Failure preparing next results request") + } + if req == nil { return } - resp, err := client.ListServiceObjectivesSender(req) + resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListServiceObjectives", resp, "Failure sending request") - return + return result, autorest.NewErrorWithError(err, "sql.ServersClient", "ListByResourceGroup", resp, "Failure sending next results request") } - result, err = client.ListServiceObjectivesResponder(resp) + result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListServiceObjectives", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListByResourceGroup", resp, "Failure responding to next results request") } return } -// ListServiceObjectivesPreparer prepares the ListServiceObjectives request. -func (client ServersClient) ListServiceObjectivesPreparer(resourceGroupName string, serverName string) (*http.Request, error) { +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client ServersClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Server, <-chan error) { + resultChan := make(chan Server) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Update updates a server. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. parameters is the requested server +// resource state. +func (client ServersClient) Update(resourceGroupName string, serverName string, parameters ServerUpdate, cancel <-chan struct{}) (<-chan Server, <-chan error) { + resultChan := make(chan Server, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result Server + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, serverName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServersClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServersClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServersClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client ServersClient) UpdatePreparer(resourceGroupName string, serverName string, parameters ServerUpdate, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "serverName": autorest.Encode("path", serverName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2014-04-01" + const APIVersion = "2015-05-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } preparer := autorest.CreatePreparer( - autorest.AsGet(), + autorest.AsJSON(), + autorest.AsPatch(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", pathParameters), + autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } -// ListServiceObjectivesSender sends the ListServiceObjectives request. The method will close the +// UpdateSender sends the Update request. The method will close the // http.Response Body if it receives an error. -func (client ServersClient) ListServiceObjectivesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) +func (client ServersClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } -// ListServiceObjectivesResponder handles the response to the ListServiceObjectives request. The method always +// UpdateResponder handles the response to the Update request. The method always // closes the http.Response Body. -func (client ServersClient) ListServiceObjectivesResponder(resp *http.Response) (result ServiceObjectiveListResult, err error) { +func (client ServersClient) UpdateResponder(resp *http.Response) (result Server, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListUsages returns server usages. -// -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. serverName is the name of the server. -func (client ServersClient) ListUsages(resourceGroupName string, serverName string) (result ServerMetricListResult, err error) { - req, err := client.ListUsagesPreparer(resourceGroupName, serverName) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListUsages", nil, "Failure preparing request") - return - } - - resp, err := client.ListUsagesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListUsages", resp, "Failure sending request") - return - } - - result, err = client.ListUsagesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "sql.ServersClient", "ListUsages", resp, "Failure responding to request") - } - - return -} - -// ListUsagesPreparer prepares the ListUsages request. -func (client ServersClient) ListUsagesPreparer(resourceGroupName string, serverName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "serverName": autorest.Encode("path", serverName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2014-04-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListUsagesSender sends the ListUsages request. The method will close the -// http.Response Body if it receives an error. -func (client ServersClient) ListUsagesSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListUsagesResponder handles the response to the ListUsages request. The method always -// closes the http.Response Body. -func (client ServersClient) ListUsagesResponder(resp *http.Response) (result ServerMetricListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverusages.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverusages.go new file mode 100644 index 000000000..5c9cb9162 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serverusages.go @@ -0,0 +1,107 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ServerUsagesClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. +type ServerUsagesClient struct { + ManagementClient +} + +// NewServerUsagesClient creates an instance of the ServerUsagesClient client. +func NewServerUsagesClient(subscriptionID string) ServerUsagesClient { + return NewServerUsagesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServerUsagesClientWithBaseURI creates an instance of the ServerUsagesClient client. +func NewServerUsagesClientWithBaseURI(baseURI string, subscriptionID string) ServerUsagesClient { + return ServerUsagesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByServer returns server usages. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client ServerUsagesClient) ListByServer(resourceGroupName string, serverName string) (result ServerUsageListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerUsagesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServerUsagesClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServerUsagesClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client ServerUsagesClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/usages", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client ServerUsagesClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client ServerUsagesClient) ListByServerResponder(resp *http.Response) (result ServerUsageListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serviceobjectives.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serviceobjectives.go new file mode 100644 index 000000000..5fc89b0df --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/serviceobjectives.go @@ -0,0 +1,175 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ServiceObjectivesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type ServiceObjectivesClient struct { + ManagementClient +} + +// NewServiceObjectivesClient creates an instance of the ServiceObjectivesClient client. +func NewServiceObjectivesClient(subscriptionID string) ServiceObjectivesClient { + return NewServiceObjectivesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceObjectivesClientWithBaseURI creates an instance of the ServiceObjectivesClient client. +func NewServiceObjectivesClientWithBaseURI(baseURI string, subscriptionID string) ServiceObjectivesClient { + return ServiceObjectivesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a database service objective. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. serviceObjectiveName is the name of +// the service objective to retrieve. +func (client ServiceObjectivesClient) Get(resourceGroupName string, serverName string, serviceObjectiveName string) (result ServiceObjective, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, serviceObjectiveName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServiceObjectivesClient) GetPreparer(resourceGroupName string, serverName string, serviceObjectiveName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "serviceObjectiveName": autorest.Encode("path", serviceObjectiveName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceObjectivesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServiceObjectivesClient) GetResponder(resp *http.Response) (result ServiceObjective, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer returns database service objectives. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client ServiceObjectivesClient) ListByServer(resourceGroupName string, serverName string) (result ServiceObjectiveListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceObjectivesClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client ServiceObjectivesClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceObjectivesClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client ServiceObjectivesClient) ListByServerResponder(resp *http.Response) (result ServiceObjectiveListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servicetieradvisors.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servicetieradvisors.go new file mode 100644 index 000000000..26ffa1467 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/servicetieradvisors.go @@ -0,0 +1,178 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ServiceTierAdvisorsClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type ServiceTierAdvisorsClient struct { + ManagementClient +} + +// NewServiceTierAdvisorsClient creates an instance of the ServiceTierAdvisorsClient client. +func NewServiceTierAdvisorsClient(subscriptionID string) ServiceTierAdvisorsClient { + return NewServiceTierAdvisorsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewServiceTierAdvisorsClientWithBaseURI creates an instance of the ServiceTierAdvisorsClient client. +func NewServiceTierAdvisorsClientWithBaseURI(baseURI string, subscriptionID string) ServiceTierAdvisorsClient { + return ServiceTierAdvisorsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets a service tier advisor. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of +// database. serviceTierAdvisorName is the name of service tier advisor. +func (client ServiceTierAdvisorsClient) Get(resourceGroupName string, serverName string, databaseName string, serviceTierAdvisorName string) (result ServiceTierAdvisor, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, serviceTierAdvisorName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ServiceTierAdvisorsClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, serviceTierAdvisorName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "serviceTierAdvisorName": autorest.Encode("path", serviceTierAdvisorName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors/{serviceTierAdvisorName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceTierAdvisorsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ServiceTierAdvisorsClient) GetResponder(resp *http.Response) (result ServiceTierAdvisor, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabase returns service tier advisors for specified database. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of +// database. +func (client ServiceTierAdvisorsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string) (result ServiceTierAdvisorListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.ServiceTierAdvisorsClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client ServiceTierAdvisorsClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/serviceTierAdvisors", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client ServiceTierAdvisorsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client ServiceTierAdvisorsClient) ListByDatabaseResponder(resp *http.Response) (result ServiceTierAdvisorListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncagents.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncagents.go new file mode 100644 index 000000000..c3aae13ee --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncagents.go @@ -0,0 +1,618 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// SyncAgentsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. +type SyncAgentsClient struct { + ManagementClient +} + +// NewSyncAgentsClient creates an instance of the SyncAgentsClient client. +func NewSyncAgentsClient(subscriptionID string) SyncAgentsClient { + return NewSyncAgentsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSyncAgentsClientWithBaseURI creates an instance of the SyncAgentsClient client. +func NewSyncAgentsClientWithBaseURI(baseURI string, subscriptionID string) SyncAgentsClient { + return SyncAgentsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a sync agent. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server on which the sync agent is hosted. +// syncAgentName is the name of the sync agent. parameters is the requested sync agent resource state. +func (client SyncAgentsClient) CreateOrUpdate(resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent, cancel <-chan struct{}) (<-chan SyncAgent, <-chan error) { + resultChan := make(chan SyncAgent, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result SyncAgent + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, syncAgentName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SyncAgentsClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, syncAgentName string, parameters SyncAgent, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncAgentName": autorest.Encode("path", syncAgentName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SyncAgentsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SyncAgentsClient) CreateOrUpdateResponder(resp *http.Response) (result SyncAgent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a sync agent. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server on which the sync agent is hosted. +// syncAgentName is the name of the sync agent. +func (client SyncAgentsClient) Delete(resourceGroupName string, serverName string, syncAgentName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, syncAgentName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client SyncAgentsClient) DeletePreparer(resourceGroupName string, serverName string, syncAgentName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncAgentName": autorest.Encode("path", syncAgentName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SyncAgentsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SyncAgentsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// GenerateKey generates a sync agent key. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server on which the sync agent is hosted. +// syncAgentName is the name of the sync agent. +func (client SyncAgentsClient) GenerateKey(resourceGroupName string, serverName string, syncAgentName string) (result SyncAgentKeyProperties, err error) { + req, err := client.GenerateKeyPreparer(resourceGroupName, serverName, syncAgentName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "GenerateKey", nil, "Failure preparing request") + return + } + + resp, err := client.GenerateKeySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "GenerateKey", resp, "Failure sending request") + return + } + + result, err = client.GenerateKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "GenerateKey", resp, "Failure responding to request") + } + + return +} + +// GenerateKeyPreparer prepares the GenerateKey request. +func (client SyncAgentsClient) GenerateKeyPreparer(resourceGroupName string, serverName string, syncAgentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncAgentName": autorest.Encode("path", syncAgentName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/generateKey", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GenerateKeySender sends the GenerateKey request. The method will close the +// http.Response Body if it receives an error. +func (client SyncAgentsClient) GenerateKeySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GenerateKeyResponder handles the response to the GenerateKey request. The method always +// closes the http.Response Body. +func (client SyncAgentsClient) GenerateKeyResponder(resp *http.Response) (result SyncAgentKeyProperties, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a sync agent. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server on which the sync agent is hosted. +// syncAgentName is the name of the sync agent. +func (client SyncAgentsClient) Get(resourceGroupName string, serverName string, syncAgentName string) (result SyncAgent, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, syncAgentName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SyncAgentsClient) GetPreparer(resourceGroupName string, serverName string, syncAgentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncAgentName": autorest.Encode("path", syncAgentName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SyncAgentsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SyncAgentsClient) GetResponder(resp *http.Response) (result SyncAgent, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer lists sync agents in a server. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server on which the sync agent is hosted. +func (client SyncAgentsClient) ListByServer(resourceGroupName string, serverName string) (result SyncAgentListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client SyncAgentsClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client SyncAgentsClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client SyncAgentsClient) ListByServerResponder(resp *http.Response) (result SyncAgentListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServerNextResults retrieves the next set of results, if any. +func (client SyncAgentsClient) ListByServerNextResults(lastResults SyncAgentListResult) (result SyncAgentListResult, err error) { + req, err := lastResults.SyncAgentListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", resp, "Failure sending next results request") + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListByServer", resp, "Failure responding to next results request") + } + + return +} + +// ListByServerComplete gets all elements from the list without paging. +func (client SyncAgentsClient) ListByServerComplete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan SyncAgent, <-chan error) { + resultChan := make(chan SyncAgent) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByServer(resourceGroupName, serverName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByServerNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListLinkedDatabases lists databases linked to a sync agent. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server on which the sync agent is hosted. +// syncAgentName is the name of the sync agent. +func (client SyncAgentsClient) ListLinkedDatabases(resourceGroupName string, serverName string, syncAgentName string) (result SyncAgentLinkedDatabaseListResult, err error) { + req, err := client.ListLinkedDatabasesPreparer(resourceGroupName, serverName, syncAgentName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", nil, "Failure preparing request") + return + } + + resp, err := client.ListLinkedDatabasesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", resp, "Failure sending request") + return + } + + result, err = client.ListLinkedDatabasesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", resp, "Failure responding to request") + } + + return +} + +// ListLinkedDatabasesPreparer prepares the ListLinkedDatabases request. +func (client SyncAgentsClient) ListLinkedDatabasesPreparer(resourceGroupName string, serverName string, syncAgentName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncAgentName": autorest.Encode("path", syncAgentName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListLinkedDatabasesSender sends the ListLinkedDatabases request. The method will close the +// http.Response Body if it receives an error. +func (client SyncAgentsClient) ListLinkedDatabasesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListLinkedDatabasesResponder handles the response to the ListLinkedDatabases request. The method always +// closes the http.Response Body. +func (client SyncAgentsClient) ListLinkedDatabasesResponder(resp *http.Response) (result SyncAgentLinkedDatabaseListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListLinkedDatabasesNextResults retrieves the next set of results, if any. +func (client SyncAgentsClient) ListLinkedDatabasesNextResults(lastResults SyncAgentLinkedDatabaseListResult) (result SyncAgentLinkedDatabaseListResult, err error) { + req, err := lastResults.SyncAgentLinkedDatabaseListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListLinkedDatabasesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", resp, "Failure sending next results request") + } + + result, err = client.ListLinkedDatabasesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncAgentsClient", "ListLinkedDatabases", resp, "Failure responding to next results request") + } + + return +} + +// ListLinkedDatabasesComplete gets all elements from the list without paging. +func (client SyncAgentsClient) ListLinkedDatabasesComplete(resourceGroupName string, serverName string, syncAgentName string, cancel <-chan struct{}) (<-chan SyncAgentLinkedDatabase, <-chan error) { + resultChan := make(chan SyncAgentLinkedDatabase) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListLinkedDatabases(resourceGroupName, serverName, syncAgentName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListLinkedDatabasesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncgroups.go new file mode 100644 index 000000000..9cc7af60e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncgroups.go @@ -0,0 +1,1144 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// SyncGroupsClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. +type SyncGroupsClient struct { + ManagementClient +} + +// NewSyncGroupsClient creates an instance of the SyncGroupsClient client. +func NewSyncGroupsClient(subscriptionID string) SyncGroupsClient { + return NewSyncGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSyncGroupsClientWithBaseURI creates an instance of the SyncGroupsClient client. +func NewSyncGroupsClientWithBaseURI(baseURI string, subscriptionID string) SyncGroupsClient { + return SyncGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CancelSync cancels a sync group synchronization. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. +func (client SyncGroupsClient) CancelSync(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) { + req, err := client.CancelSyncPreparer(resourceGroupName, serverName, databaseName, syncGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CancelSync", nil, "Failure preparing request") + return + } + + resp, err := client.CancelSyncSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CancelSync", resp, "Failure sending request") + return + } + + result, err = client.CancelSyncResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CancelSync", resp, "Failure responding to request") + } + + return +} + +// CancelSyncPreparer prepares the CancelSync request. +func (client SyncGroupsClient) CancelSyncPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CancelSyncSender sends the CancelSync request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) CancelSyncSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CancelSyncResponder handles the response to the CancelSync request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) CancelSyncResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// CreateOrUpdate creates or updates a sync group. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. parameters is the requested +// sync group resource state. +func (client SyncGroupsClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, cancel <-chan struct{}) (<-chan SyncGroup, <-chan error) { + resultChan := make(chan SyncGroup, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result SyncGroup + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, syncGroupName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SyncGroupsClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) CreateOrUpdateResponder(resp *http.Response) (result SyncGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a sync group. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. +func (client SyncGroupsClient) Delete(resourceGroupName string, serverName string, databaseName string, syncGroupName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, databaseName, syncGroupName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client SyncGroupsClient) DeletePreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a sync group. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. +func (client SyncGroupsClient) Get(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncGroup, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, syncGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SyncGroupsClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) GetResponder(resp *http.Response) (result SyncGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabase lists sync groups under a hub database. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. +func (client SyncGroupsClient) ListByDatabase(resourceGroupName string, serverName string, databaseName string) (result SyncGroupListResult, err error) { + req, err := client.ListByDatabasePreparer(resourceGroupName, serverName, databaseName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", nil, "Failure preparing request") + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", resp, "Failure sending request") + return + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", resp, "Failure responding to request") + } + + return +} + +// ListByDatabasePreparer prepares the ListByDatabase request. +func (client SyncGroupsClient) ListByDatabasePreparer(resourceGroupName string, serverName string, databaseName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByDatabaseSender sends the ListByDatabase request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) ListByDatabaseSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByDatabaseResponder handles the response to the ListByDatabase request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) ListByDatabaseResponder(resp *http.Response) (result SyncGroupListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByDatabaseNextResults retrieves the next set of results, if any. +func (client SyncGroupsClient) ListByDatabaseNextResults(lastResults SyncGroupListResult) (result SyncGroupListResult, err error) { + req, err := lastResults.SyncGroupListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByDatabaseSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", resp, "Failure sending next results request") + } + + result, err = client.ListByDatabaseResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListByDatabase", resp, "Failure responding to next results request") + } + + return +} + +// ListByDatabaseComplete gets all elements from the list without paging. +func (client SyncGroupsClient) ListByDatabaseComplete(resourceGroupName string, serverName string, databaseName string, cancel <-chan struct{}) (<-chan SyncGroup, <-chan error) { + resultChan := make(chan SyncGroup) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByDatabase(resourceGroupName, serverName, databaseName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByDatabaseNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListHubSchemas gets a collection of hub database schemas. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. +func (client SyncGroupsClient) ListHubSchemas(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncFullSchemaPropertiesListResult, err error) { + req, err := client.ListHubSchemasPreparer(resourceGroupName, serverName, databaseName, syncGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", nil, "Failure preparing request") + return + } + + resp, err := client.ListHubSchemasSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", resp, "Failure sending request") + return + } + + result, err = client.ListHubSchemasResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", resp, "Failure responding to request") + } + + return +} + +// ListHubSchemasPreparer prepares the ListHubSchemas request. +func (client SyncGroupsClient) ListHubSchemasPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListHubSchemasSender sends the ListHubSchemas request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) ListHubSchemasSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListHubSchemasResponder handles the response to the ListHubSchemas request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) ListHubSchemasResponder(resp *http.Response) (result SyncFullSchemaPropertiesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListHubSchemasNextResults retrieves the next set of results, if any. +func (client SyncGroupsClient) ListHubSchemasNextResults(lastResults SyncFullSchemaPropertiesListResult) (result SyncFullSchemaPropertiesListResult, err error) { + req, err := lastResults.SyncFullSchemaPropertiesListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListHubSchemasSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", resp, "Failure sending next results request") + } + + result, err = client.ListHubSchemasResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListHubSchemas", resp, "Failure responding to next results request") + } + + return +} + +// ListHubSchemasComplete gets all elements from the list without paging. +func (client SyncGroupsClient) ListHubSchemasComplete(resourceGroupName string, serverName string, databaseName string, syncGroupName string, cancel <-chan struct{}) (<-chan SyncFullSchemaProperties, <-chan error) { + resultChan := make(chan SyncFullSchemaProperties) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListHubSchemas(resourceGroupName, serverName, databaseName, syncGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListHubSchemasNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListLogs gets a collection of sync group logs. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. startTime is get logs +// generated after this time. endTime is get logs generated before this time. typeParameter is the types of logs to +// retrieve. continuationToken is the continuation token for this operation. +func (client SyncGroupsClient) ListLogs(resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (result SyncGroupLogListResult, err error) { + req, err := client.ListLogsPreparer(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, typeParameter, continuationToken) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", nil, "Failure preparing request") + return + } + + resp, err := client.ListLogsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", resp, "Failure sending request") + return + } + + result, err = client.ListLogsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", resp, "Failure responding to request") + } + + return +} + +// ListLogsPreparer prepares the ListLogs request. +func (client SyncGroupsClient) ListLogsPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "endTime": autorest.Encode("query", endTime), + "startTime": autorest.Encode("query", startTime), + "type": autorest.Encode("query", typeParameter), + } + if len(continuationToken) > 0 { + queryParameters["continuationToken"] = autorest.Encode("query", continuationToken) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListLogsSender sends the ListLogs request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) ListLogsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListLogsResponder handles the response to the ListLogs request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) ListLogsResponder(resp *http.Response) (result SyncGroupLogListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListLogsNextResults retrieves the next set of results, if any. +func (client SyncGroupsClient) ListLogsNextResults(lastResults SyncGroupLogListResult) (result SyncGroupLogListResult, err error) { + req, err := lastResults.SyncGroupLogListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListLogsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", resp, "Failure sending next results request") + } + + result, err = client.ListLogsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListLogs", resp, "Failure responding to next results request") + } + + return +} + +// ListLogsComplete gets all elements from the list without paging. +func (client SyncGroupsClient) ListLogsComplete(resourceGroupName string, serverName string, databaseName string, syncGroupName string, startTime string, endTime string, typeParameter string, continuationToken string, cancel <-chan struct{}) (<-chan SyncGroupLogProperties, <-chan error) { + resultChan := make(chan SyncGroupLogProperties) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListLogs(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, typeParameter, continuationToken) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListLogsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListSyncDatabaseIds gets a collection of sync database ids. +// +// locationName is the name of the region where the resource is located. +func (client SyncGroupsClient) ListSyncDatabaseIds(locationName string) (result SyncDatabaseIDListResult, err error) { + req, err := client.ListSyncDatabaseIdsPreparer(locationName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", nil, "Failure preparing request") + return + } + + resp, err := client.ListSyncDatabaseIdsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", resp, "Failure sending request") + return + } + + result, err = client.ListSyncDatabaseIdsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", resp, "Failure responding to request") + } + + return +} + +// ListSyncDatabaseIdsPreparer prepares the ListSyncDatabaseIds request. +func (client SyncGroupsClient) ListSyncDatabaseIdsPreparer(locationName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "locationName": autorest.Encode("path", locationName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/syncDatabaseIds", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSyncDatabaseIdsSender sends the ListSyncDatabaseIds request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) ListSyncDatabaseIdsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSyncDatabaseIdsResponder handles the response to the ListSyncDatabaseIds request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) ListSyncDatabaseIdsResponder(resp *http.Response) (result SyncDatabaseIDListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSyncDatabaseIdsNextResults retrieves the next set of results, if any. +func (client SyncGroupsClient) ListSyncDatabaseIdsNextResults(lastResults SyncDatabaseIDListResult) (result SyncDatabaseIDListResult, err error) { + req, err := lastResults.SyncDatabaseIDListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSyncDatabaseIdsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", resp, "Failure sending next results request") + } + + result, err = client.ListSyncDatabaseIdsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "ListSyncDatabaseIds", resp, "Failure responding to next results request") + } + + return +} + +// ListSyncDatabaseIdsComplete gets all elements from the list without paging. +func (client SyncGroupsClient) ListSyncDatabaseIdsComplete(locationName string, cancel <-chan struct{}) (<-chan SyncDatabaseIDProperties, <-chan error) { + resultChan := make(chan SyncDatabaseIDProperties) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSyncDatabaseIds(locationName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSyncDatabaseIdsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// RefreshHubSchema refreshes a hub database schema. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. +func (client SyncGroupsClient) RefreshHubSchema(resourceGroupName string, serverName string, databaseName string, syncGroupName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.RefreshHubSchemaPreparer(resourceGroupName, serverName, databaseName, syncGroupName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "RefreshHubSchema", nil, "Failure preparing request") + return + } + + resp, err := client.RefreshHubSchemaSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "RefreshHubSchema", resp, "Failure sending request") + return + } + + result, err = client.RefreshHubSchemaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "RefreshHubSchema", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// RefreshHubSchemaPreparer prepares the RefreshHubSchema request. +func (client SyncGroupsClient) RefreshHubSchemaPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// RefreshHubSchemaSender sends the RefreshHubSchema request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) RefreshHubSchemaSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// RefreshHubSchemaResponder handles the response to the RefreshHubSchema request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) RefreshHubSchemaResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// TriggerSync triggers a sync group synchronization. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. +func (client SyncGroupsClient) TriggerSync(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result autorest.Response, err error) { + req, err := client.TriggerSyncPreparer(resourceGroupName, serverName, databaseName, syncGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "TriggerSync", nil, "Failure preparing request") + return + } + + resp, err := client.TriggerSyncSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "TriggerSync", resp, "Failure sending request") + return + } + + result, err = client.TriggerSyncResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "TriggerSync", resp, "Failure responding to request") + } + + return +} + +// TriggerSyncPreparer prepares the TriggerSync request. +func (client SyncGroupsClient) TriggerSyncPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// TriggerSyncSender sends the TriggerSync request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) TriggerSyncSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// TriggerSyncResponder handles the response to the TriggerSync request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) TriggerSyncResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates a sync group. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. parameters is the requested +// sync group resource state. +func (client SyncGroupsClient) Update(resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, cancel <-chan struct{}) (<-chan SyncGroup, <-chan error) { + resultChan := make(chan SyncGroup, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result SyncGroup + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, serverName, databaseName, syncGroupName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncGroupsClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client SyncGroupsClient) UpdatePreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, parameters SyncGroup, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client SyncGroupsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SyncGroupsClient) UpdateResponder(resp *http.Response) (result SyncGroup, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncmembers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncmembers.go new file mode 100644 index 000000000..fe9c9cb1e --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/syncmembers.go @@ -0,0 +1,741 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// SyncMembersClient is the the Azure SQL Database management API provides a RESTful set of web services that interact +// with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, and +// delete databases. +type SyncMembersClient struct { + ManagementClient +} + +// NewSyncMembersClient creates an instance of the SyncMembersClient client. +func NewSyncMembersClient(subscriptionID string) SyncMembersClient { + return NewSyncMembersClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSyncMembersClientWithBaseURI creates an instance of the SyncMembersClient client. +func NewSyncMembersClientWithBaseURI(baseURI string, subscriptionID string) SyncMembersClient { + return SyncMembersClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a sync member. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group on which the sync member is +// hosted. syncMemberName is the name of the sync member. parameters is the requested sync member resource state. +func (client SyncMembersClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, cancel <-chan struct{}) (<-chan SyncMember, <-chan error) { + resultChan := make(chan SyncMember, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result SyncMember + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client SyncMembersClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + "syncMemberName": autorest.Encode("path", syncMemberName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client SyncMembersClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client SyncMembersClient) CreateOrUpdateResponder(resp *http.Response) (result SyncMember, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a sync member. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group on which the sync member is +// hosted. syncMemberName is the name of the sync member. +func (client SyncMembersClient) Delete(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client SyncMembersClient) DeletePreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + "syncMemberName": autorest.Encode("path", syncMemberName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client SyncMembersClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client SyncMembersClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a sync member. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group on which the sync member is +// hosted. syncMemberName is the name of the sync member. +func (client SyncMembersClient) Get(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result SyncMember, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client SyncMembersClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + "syncMemberName": autorest.Encode("path", syncMemberName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client SyncMembersClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client SyncMembersClient) GetResponder(resp *http.Response) (result SyncMember, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySyncGroup lists sync members in the given sync group. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group. +func (client SyncMembersClient) ListBySyncGroup(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (result SyncMemberListResult, err error) { + req, err := client.ListBySyncGroupPreparer(resourceGroupName, serverName, databaseName, syncGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySyncGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", resp, "Failure sending request") + return + } + + result, err = client.ListBySyncGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", resp, "Failure responding to request") + } + + return +} + +// ListBySyncGroupPreparer prepares the ListBySyncGroup request. +func (client SyncMembersClient) ListBySyncGroupPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListBySyncGroupSender sends the ListBySyncGroup request. The method will close the +// http.Response Body if it receives an error. +func (client SyncMembersClient) ListBySyncGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListBySyncGroupResponder handles the response to the ListBySyncGroup request. The method always +// closes the http.Response Body. +func (client SyncMembersClient) ListBySyncGroupResponder(resp *http.Response) (result SyncMemberListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySyncGroupNextResults retrieves the next set of results, if any. +func (client SyncMembersClient) ListBySyncGroupNextResults(lastResults SyncMemberListResult) (result SyncMemberListResult, err error) { + req, err := lastResults.SyncMemberListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListBySyncGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", resp, "Failure sending next results request") + } + + result, err = client.ListBySyncGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListBySyncGroup", resp, "Failure responding to next results request") + } + + return +} + +// ListBySyncGroupComplete gets all elements from the list without paging. +func (client SyncMembersClient) ListBySyncGroupComplete(resourceGroupName string, serverName string, databaseName string, syncGroupName string, cancel <-chan struct{}) (<-chan SyncMember, <-chan error) { + resultChan := make(chan SyncMember) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBySyncGroup(resourceGroupName, serverName, databaseName, syncGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBySyncGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMemberSchemas gets a sync member database schema. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group on which the sync member is +// hosted. syncMemberName is the name of the sync member. +func (client SyncMembersClient) ListMemberSchemas(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (result SyncFullSchemaPropertiesListResult, err error) { + req, err := client.ListMemberSchemasPreparer(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", nil, "Failure preparing request") + return + } + + resp, err := client.ListMemberSchemasSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", resp, "Failure sending request") + return + } + + result, err = client.ListMemberSchemasResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", resp, "Failure responding to request") + } + + return +} + +// ListMemberSchemasPreparer prepares the ListMemberSchemas request. +func (client SyncMembersClient) ListMemberSchemasPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + "syncMemberName": autorest.Encode("path", syncMemberName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/schemas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListMemberSchemasSender sends the ListMemberSchemas request. The method will close the +// http.Response Body if it receives an error. +func (client SyncMembersClient) ListMemberSchemasSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListMemberSchemasResponder handles the response to the ListMemberSchemas request. The method always +// closes the http.Response Body. +func (client SyncMembersClient) ListMemberSchemasResponder(resp *http.Response) (result SyncFullSchemaPropertiesListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListMemberSchemasNextResults retrieves the next set of results, if any. +func (client SyncMembersClient) ListMemberSchemasNextResults(lastResults SyncFullSchemaPropertiesListResult) (result SyncFullSchemaPropertiesListResult, err error) { + req, err := lastResults.SyncFullSchemaPropertiesListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListMemberSchemasSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", resp, "Failure sending next results request") + } + + result, err = client.ListMemberSchemasResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "ListMemberSchemas", resp, "Failure responding to next results request") + } + + return +} + +// ListMemberSchemasComplete gets all elements from the list without paging. +func (client SyncMembersClient) ListMemberSchemasComplete(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, cancel <-chan struct{}) (<-chan SyncFullSchemaProperties, <-chan error) { + resultChan := make(chan SyncFullSchemaProperties) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMemberSchemas(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMemberSchemasNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// RefreshMemberSchema refreshes a sync member database schema. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group on which the sync member is +// hosted. syncMemberName is the name of the sync member. +func (client SyncMembersClient) RefreshMemberSchema(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.RefreshMemberSchemaPreparer(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "RefreshMemberSchema", nil, "Failure preparing request") + return + } + + resp, err := client.RefreshMemberSchemaSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "RefreshMemberSchema", resp, "Failure sending request") + return + } + + result, err = client.RefreshMemberSchemaResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "RefreshMemberSchema", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// RefreshMemberSchemaPreparer prepares the RefreshMemberSchema request. +func (client SyncMembersClient) RefreshMemberSchemaPreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + "syncMemberName": autorest.Encode("path", syncMemberName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// RefreshMemberSchemaSender sends the RefreshMemberSchema request. The method will close the +// http.Response Body if it receives an error. +func (client SyncMembersClient) RefreshMemberSchemaSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// RefreshMemberSchemaResponder handles the response to the RefreshMemberSchema request. The method always +// closes the http.Response Body. +func (client SyncMembersClient) RefreshMemberSchemaResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update updates an existing sync member. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database on which the sync group is hosted. syncGroupName is the name of the sync group on which the sync member is +// hosted. syncMemberName is the name of the sync member. parameters is the requested sync member resource state. +func (client SyncMembersClient) Update(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, cancel <-chan struct{}) (<-chan SyncMember, <-chan error) { + resultChan := make(chan SyncMember, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result SyncMember + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.UpdatePreparer(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.SyncMembersClient", "Update", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// UpdatePreparer prepares the Update request. +func (client SyncMembersClient) UpdatePreparer(resourceGroupName string, serverName string, databaseName string, syncGroupName string, syncMemberName string, parameters SyncMember, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "syncGroupName": autorest.Encode("path", syncGroupName), + "syncMemberName": autorest.Encode("path", syncMemberName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client SyncMembersClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client SyncMembersClient) UpdateResponder(resp *http.Response) (result SyncMember, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptionactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptionactivities.go new file mode 100644 index 000000000..3f78c2255 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptionactivities.go @@ -0,0 +1,113 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// TransparentDataEncryptionActivitiesClient is the the Azure SQL Database management API provides a RESTful set of web +// services that interact with Azure SQL Database services to manage your databases. The API enables you to create, +// retrieve, update, and delete databases. +type TransparentDataEncryptionActivitiesClient struct { + ManagementClient +} + +// NewTransparentDataEncryptionActivitiesClient creates an instance of the TransparentDataEncryptionActivitiesClient +// client. +func NewTransparentDataEncryptionActivitiesClient(subscriptionID string) TransparentDataEncryptionActivitiesClient { + return NewTransparentDataEncryptionActivitiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTransparentDataEncryptionActivitiesClientWithBaseURI creates an instance of the +// TransparentDataEncryptionActivitiesClient client. +func NewTransparentDataEncryptionActivitiesClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionActivitiesClient { + return TransparentDataEncryptionActivitiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// ListByConfiguration returns a database's transparent data encryption operation result. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database for which the transparent data encryption applies. transparentDataEncryptionName is the name of the +// transparent data encryption configuration. +func (client TransparentDataEncryptionActivitiesClient) ListByConfiguration(resourceGroupName string, serverName string, databaseName string, transparentDataEncryptionName string) (result TransparentDataEncryptionActivityListResult, err error) { + req, err := client.ListByConfigurationPreparer(resourceGroupName, serverName, databaseName, transparentDataEncryptionName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionActivitiesClient", "ListByConfiguration", nil, "Failure preparing request") + return + } + + resp, err := client.ListByConfigurationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionActivitiesClient", "ListByConfiguration", resp, "Failure sending request") + return + } + + result, err = client.ListByConfigurationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionActivitiesClient", "ListByConfiguration", resp, "Failure responding to request") + } + + return +} + +// ListByConfigurationPreparer prepares the ListByConfiguration request. +func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationPreparer(resourceGroupName string, serverName string, databaseName string, transparentDataEncryptionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "transparentDataEncryptionName": autorest.Encode("path", transparentDataEncryptionName), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}/operationResults", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByConfigurationSender sends the ListByConfiguration request. The method will close the +// http.Response Body if it receives an error. +func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByConfigurationResponder handles the response to the ListByConfiguration request. The method always +// closes the http.Response Body. +func (client TransparentDataEncryptionActivitiesClient) ListByConfigurationResponder(resp *http.Response) (result TransparentDataEncryptionActivityListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptions.go new file mode 100644 index 000000000..4f603942b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/transparentdataencryptions.go @@ -0,0 +1,184 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// TransparentDataEncryptionsClient is the the Azure SQL Database management API provides a RESTful set of web services +// that interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, +// update, and delete databases. +type TransparentDataEncryptionsClient struct { + ManagementClient +} + +// NewTransparentDataEncryptionsClient creates an instance of the TransparentDataEncryptionsClient client. +func NewTransparentDataEncryptionsClient(subscriptionID string) TransparentDataEncryptionsClient { + return NewTransparentDataEncryptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewTransparentDataEncryptionsClientWithBaseURI creates an instance of the TransparentDataEncryptionsClient client. +func NewTransparentDataEncryptionsClientWithBaseURI(baseURI string, subscriptionID string) TransparentDataEncryptionsClient { + return TransparentDataEncryptionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates a database's transparent data encryption configuration. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database for which setting the transparent data encryption applies. transparentDataEncryptionName is the name of the +// transparent data encryption configuration. parameters is the required parameters for creating or updating +// transparent data encryption. +func (client TransparentDataEncryptionsClient) CreateOrUpdate(resourceGroupName string, serverName string, databaseName string, transparentDataEncryptionName string, parameters TransparentDataEncryption) (result TransparentDataEncryption, err error) { + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, databaseName, transparentDataEncryptionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client TransparentDataEncryptionsClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, databaseName string, transparentDataEncryptionName string, parameters TransparentDataEncryption) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "transparentDataEncryptionName": autorest.Encode("path", transparentDataEncryptionName), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client TransparentDataEncryptionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client TransparentDataEncryptionsClient) CreateOrUpdateResponder(resp *http.Response) (result TransparentDataEncryption, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets a database's transparent data encryption configuration. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. databaseName is the name of the +// database for which the transparent data encryption applies. transparentDataEncryptionName is the name of the +// transparent data encryption configuration. +func (client TransparentDataEncryptionsClient) Get(resourceGroupName string, serverName string, databaseName string, transparentDataEncryptionName string) (result TransparentDataEncryption, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, databaseName, transparentDataEncryptionName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.TransparentDataEncryptionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client TransparentDataEncryptionsClient) GetPreparer(resourceGroupName string, serverName string, databaseName string, transparentDataEncryptionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "databaseName": autorest.Encode("path", databaseName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "transparentDataEncryptionName": autorest.Encode("path", transparentDataEncryptionName), + } + + const APIVersion = "2014-04-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{transparentDataEncryptionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client TransparentDataEncryptionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client TransparentDataEncryptionsClient) GetResponder(resp *http.Response) (result TransparentDataEncryption, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go index 9e3acd97d..cd5df84b1 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/version.go @@ -14,15 +14,15 @@ package sql // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-sql/" + return "Azure-SDK-For-Go/v11.0.0-beta arm-sql/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/virtualnetworkrules.go new file mode 100644 index 000000000..12c001600 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/sql/virtualnetworkrules.go @@ -0,0 +1,426 @@ +package sql + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// VirtualNetworkRulesClient is the the Azure SQL Database management API provides a RESTful set of web services that +// interact with Azure SQL Database services to manage your databases. The API enables you to create, retrieve, update, +// and delete databases. +type VirtualNetworkRulesClient struct { + ManagementClient +} + +// NewVirtualNetworkRulesClient creates an instance of the VirtualNetworkRulesClient client. +func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient { + return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client. +func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient { + return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CreateOrUpdate creates or updates an existing virtual network rule. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. virtualNetworkRuleName is the name +// of the virtual network rule. parameters is the requested virtual Network Rule Resource state. +func (client VirtualNetworkRulesClient) CreateOrUpdate(resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, cancel <-chan struct{}) (<-chan VirtualNetworkRule, <-chan error) { + resultChan := make(chan VirtualNetworkRule, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties.VirtualNetworkSubnetID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "sql.VirtualNetworkRulesClient", "CreateOrUpdate") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result VirtualNetworkRule + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateOrUpdatePreparer(resourceGroupName, serverName, virtualNetworkRuleName, parameters, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "CreateOrUpdate", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkRulesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes the virtual network rule with the given name. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. virtualNetworkRuleName is the name +// of the virtual network rule. +func (client VirtualNetworkRulesClient) Delete(resourceGroupName string, serverName string, virtualNetworkRuleName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result autorest.Response + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.DeletePreparer(resourceGroupName, serverName, virtualNetworkRuleName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Delete", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// DeletePreparer prepares the Delete request. +func (client VirtualNetworkRulesClient) DeletePreparer(resourceGroupName string, serverName string, virtualNetworkRuleName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkRulesClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets a virtual network rule. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. virtualNetworkRuleName is the name +// of the virtual network rule. +func (client VirtualNetworkRulesClient) Get(resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) { + req, err := client.GetPreparer(resourceGroupName, serverName, virtualNetworkRuleName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client VirtualNetworkRulesClient) GetPreparer(resourceGroupName string, serverName string, virtualNetworkRuleName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkRulesClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (result VirtualNetworkRule, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServer gets a list of virtual network rules in a server. +// +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. serverName is the name of the server. +func (client VirtualNetworkRulesClient) ListByServer(resourceGroupName string, serverName string) (result VirtualNetworkRuleListResult, err error) { + req, err := client.ListByServerPreparer(resourceGroupName, serverName) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request") + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure sending request") + return + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure responding to request") + } + + return +} + +// ListByServerPreparer prepares the ListByServer request. +func (client VirtualNetworkRulesClient) ListByServerPreparer(resourceGroupName string, serverName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "serverName": autorest.Encode("path", serverName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2015-05-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByServerSender sends the ListByServer request. The method will close the +// http.Response Body if it receives an error. +func (client VirtualNetworkRulesClient) ListByServerSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByServerResponder handles the response to the ListByServer request. The method always +// closes the http.Response Body. +func (client VirtualNetworkRulesClient) ListByServerResponder(resp *http.Response) (result VirtualNetworkRuleListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByServerNextResults retrieves the next set of results, if any. +func (client VirtualNetworkRulesClient) ListByServerNextResults(lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) { + req, err := lastResults.VirtualNetworkRuleListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListByServerSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure sending next results request") + } + + result, err = client.ListByServerResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "sql.VirtualNetworkRulesClient", "ListByServer", resp, "Failure responding to next results request") + } + + return +} + +// ListByServerComplete gets all elements from the list without paging. +func (client VirtualNetworkRulesClient) ListByServerComplete(resourceGroupName string, serverName string, cancel <-chan struct{}) (<-chan VirtualNetworkRule, <-chan error) { + resultChan := make(chan VirtualNetworkRule) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByServer(resourceGroupName, serverName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByServerNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go index f0606ac13..0870a03de 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/accounts.go @@ -14,9 +14,8 @@ package storage // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,18 +34,15 @@ func NewAccountsClient(subscriptionID string) AccountsClient { return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccountsClientWithBaseURI creates an instance of the AccountsClient -// client. +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckNameAvailability checks that the storage account name is valid and is -// not already in use. +// CheckNameAvailability checks that the storage account name is valid and is not already in use. // -// accountName is the name of the storage account within the specified resource -// group. Storage account names must be between 3 and 24 characters in length -// and use numbers and lower-case letters only. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. func (client AccountsClient) CheckNameAvailability(accountName AccountCheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: accountName, @@ -82,7 +78,7 @@ func (client AccountsClient) CheckNameAvailabilityPreparer(accountName AccountCh "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -116,21 +112,16 @@ func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response) return } -// Create asynchronously creates a new storage account with the specified -// parameters. If an account is already created and a subsequent create request -// is issued with different properties, the account properties will be updated. -// If an account is already created and a subsequent create or update request -// is issued with the exact same set of properties, the request will succeed. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Create asynchronously creates a new storage account with the specified parameters. If an account is already created +// and a subsequent create request is issued with different properties, the account properties will be updated. If an +// account is already created and a subsequent create or update request is issued with the exact same set of +// properties, the request will succeed. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. parameters is the parameters to provide for the created -// account. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. parameters is the parameters to +// provide for the created account. func (client AccountsClient) Create(resourceGroupName string, accountName string, parameters AccountCreateParameters, cancel <-chan struct{}) (<-chan Account, <-chan error) { resultChan := make(chan Account, 1) errChan := make(chan error, 1) @@ -145,11 +136,11 @@ func (client AccountsClient) Create(resourceGroupName string, accountName string {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil}, {Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.Identity", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Identity.Type", Name: validation.Null, Rule: true, Chain: nil}}}, {Target: "parameters.AccountPropertiesCreateParameters", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.CustomDomain.Name", Name: validation.Null, Rule: true, Chain: nil}}}, - {Target: "parameters.AccountPropertiesCreateParameters.Encryption", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "parameters.AccountPropertiesCreateParameters.Encryption.KeySource", Name: validation.Null, Rule: true, Chain: nil}}}, }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "storage.AccountsClient", "Create") close(errChan) @@ -161,8 +152,10 @@ func (client AccountsClient) Create(resourceGroupName string, accountName string var err error var result Account defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -195,7 +188,7 @@ func (client AccountsClient) CreatePreparer(resourceGroupName string, accountNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -233,11 +226,9 @@ func (client AccountsClient) CreateResponder(resp *http.Response) (result Accoun // Delete deletes a storage account in Microsoft Azure. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. func (client AccountsClient) Delete(resourceGroupName string, accountName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -279,7 +270,7 @@ func (client AccountsClient) DeletePreparer(resourceGroupName string, accountNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -310,15 +301,12 @@ func (client AccountsClient) DeleteResponder(resp *http.Response) (result autore return } -// GetProperties returns the properties for the specified storage account -// including but not limited to name, SKU name, location, and account status. -// The ListKeys operation should be used to retrieve storage keys. +// GetProperties returns the properties for the specified storage account including but not limited to name, SKU name, +// location, and account status. The ListKeys operation should be used to retrieve storage keys. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. func (client AccountsClient) GetProperties(resourceGroupName string, accountName string) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -360,7 +348,7 @@ func (client AccountsClient) GetPropertiesPreparer(resourceGroupName string, acc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -392,8 +380,8 @@ func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result return } -// List lists all the storage accounts available under the subscription. Note -// that storage keys are not returned; use the ListKeys operation for this. +// List lists all the storage accounts available under the subscription. Note that storage keys are not returned; use +// the ListKeys operation for this. func (client AccountsClient) List() (result AccountListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -422,7 +410,7 @@ func (client AccountsClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -456,12 +444,10 @@ func (client AccountsClient) ListResponder(resp *http.Response) (result AccountL // ListAccountSAS list SAS credentials of a storage account. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. parameters is the parameters to provide to list SAS -// credentials for the storage account. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. parameters is the parameters to +// provide to list SAS credentials for the storage account. func (client AccountsClient) ListAccountSAS(resourceGroupName string, accountName string, parameters AccountSasParameters) (result ListAccountSasResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -505,7 +491,7 @@ func (client AccountsClient) ListAccountSASPreparer(resourceGroupName string, ac "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -539,12 +525,10 @@ func (client AccountsClient) ListAccountSASResponder(resp *http.Response) (resul return } -// ListByResourceGroup lists all the storage accounts available under the given -// resource group. Note that storage keys are not returned; use the ListKeys -// operation for this. +// ListByResourceGroup lists all the storage accounts available under the given resource group. Note that storage keys +// are not returned; use the ListKeys operation for this. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. func (client AccountsClient) ListByResourceGroup(resourceGroupName string) (result AccountListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -582,7 +566,7 @@ func (client AccountsClient) ListByResourceGroupPreparer(resourceGroupName strin "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -616,11 +600,9 @@ func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) ( // ListKeys lists the access keys for the specified storage account. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. func (client AccountsClient) ListKeys(resourceGroupName string, accountName string) (result AccountListKeysResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -662,7 +644,7 @@ func (client AccountsClient) ListKeysPreparer(resourceGroupName string, accountN "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -696,12 +678,10 @@ func (client AccountsClient) ListKeysResponder(resp *http.Response) (result Acco // ListServiceSAS list service SAS credentials of a specific resource. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. parameters is the parameters to provide to list service SAS -// credentials. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. parameters is the parameters to +// provide to list service SAS credentials. func (client AccountsClient) ListServiceSAS(resourceGroupName string, accountName string, parameters ServiceSasParameters) (result ListServiceSasResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -747,7 +727,7 @@ func (client AccountsClient) ListServiceSASPreparer(resourceGroupName string, ac "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -781,15 +761,12 @@ func (client AccountsClient) ListServiceSASResponder(resp *http.Response) (resul return } -// RegenerateKey regenerates one of the access keys for the specified storage -// account. +// RegenerateKey regenerates one of the access keys for the specified storage account. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. regenerateKey is specifies name of the key which should be -// regenerated -- key1 or key2. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. regenerateKey is specifies name +// of the key which should be regenerated -- key1 or key2. func (client AccountsClient) RegenerateKey(resourceGroupName string, accountName string, regenerateKey AccountRegenerateKeyParameters) (result AccountListKeysResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -833,7 +810,7 @@ func (client AccountsClient) RegenerateKeyPreparer(resourceGroupName string, acc "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -867,23 +844,17 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result return } -// Update the update operation can be used to update the SKU, encryption, -// access tier, or tags for a storage account. It can also be used to map the -// account to a custom domain. Only one custom domain is supported per storage -// account; the replacement/change of custom domain is not supported. In order -// to replace an old custom domain, the old value must be cleared/unregistered -// before a new value can be set. The update of multiple properties is -// supported. This call does not change the storage keys for the account. If -// you want to change the storage account keys, use the regenerate keys -// operation. The location and name of the storage account cannot be changed -// after creation. +// Update the update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. +// It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; +// the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value +// must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This +// call does not change the storage keys for the account. If you want to change the storage account keys, use the +// regenerate keys operation. The location and name of the storage account cannot be changed after creation. // -// resourceGroupName is the name of the resource group within the user's -// subscription. The name is case insensitive. accountName is the name of the -// storage account within the specified resource group. Storage account names -// must be between 3 and 24 characters in length and use numbers and lower-case -// letters only. parameters is the parameters to provide for the updated -// account. +// resourceGroupName is the name of the resource group within the user's subscription. The name is case insensitive. +// accountName is the name of the storage account within the specified resource group. Storage account names must be +// between 3 and 24 characters in length and use numbers and lower-case letters only. parameters is the parameters to +// provide for the updated account. func (client AccountsClient) Update(resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -925,7 +896,7 @@ func (client AccountsClient) UpdatePreparer(resourceGroupName string, accountNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/client.go index a537bdd25..133386ddb 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/client.go @@ -1,5 +1,4 @@ -// Package storage implements the Azure ARM Storage service API version -// 2016-12-01. +// Package storage implements the Azure ARM Storage service API version 2017-06-01. // // The Azure Storage Management API. package storage @@ -18,9 +17,8 @@ package storage // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go index 2e2030184..37c1679ee 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/models.go @@ -14,9 +14,8 @@ package storage // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -43,6 +42,38 @@ const ( Unavailable AccountStatus = "unavailable" ) +// Action enumerates the values for action. +type Action string + +const ( + // Allow specifies the allow state for action. + Allow Action = "Allow" +) + +// Bypass enumerates the values for bypass. +type Bypass string + +const ( + // AzureServices specifies the azure services state for bypass. + AzureServices Bypass = "AzureServices" + // Logging specifies the logging state for bypass. + Logging Bypass = "Logging" + // Metrics specifies the metrics state for bypass. + Metrics Bypass = "Metrics" + // None specifies the none state for bypass. + None Bypass = "None" +) + +// DefaultAction enumerates the values for default action. +type DefaultAction string + +const ( + // DefaultActionAllow specifies the default action allow state for default action. + DefaultActionAllow DefaultAction = "Allow" + // DefaultActionDeny specifies the default action deny state for default action. + DefaultActionDeny DefaultAction = "Deny" +) + // HTTPProtocol enumerates the values for http protocol. type HTTPProtocol string @@ -63,6 +94,16 @@ const ( Read KeyPermission = "Read" ) +// KeySource enumerates the values for key source. +type KeySource string + +const ( + // MicrosoftKeyvault specifies the microsoft keyvault state for key source. + MicrosoftKeyvault KeySource = "Microsoft.Keyvault" + // MicrosoftStorage specifies the microsoft storage state for key source. + MicrosoftStorage KeySource = "Microsoft.Storage" +) + // Kind enumerates the values for kind. type Kind string @@ -95,28 +136,6 @@ const ( W Permissions = "w" ) -// Permissions1 enumerates the values for permissions 1. -type Permissions1 string - -const ( - // Permissions1A specifies the permissions 1a state for permissions 1. - Permissions1A Permissions1 = "a" - // Permissions1C specifies the permissions 1c state for permissions 1. - Permissions1C Permissions1 = "c" - // Permissions1D specifies the permissions 1d state for permissions 1. - Permissions1D Permissions1 = "d" - // Permissions1L specifies the permissions 1l state for permissions 1. - Permissions1L Permissions1 = "l" - // Permissions1P specifies the permissions 1p state for permissions 1. - Permissions1P Permissions1 = "p" - // Permissions1R specifies the permissions 1r state for permissions 1. - Permissions1R Permissions1 = "r" - // Permissions1U specifies the permissions 1u state for permissions 1. - Permissions1U Permissions1 = "u" - // Permissions1W specifies the permissions 1w state for permissions 1. - Permissions1W Permissions1 = "w" -) - // ProvisioningState enumerates the values for provisioning state. type ProvisioningState string @@ -139,30 +158,14 @@ const ( AlreadyExists Reason = "AlreadyExists" ) -// ResourceEnum enumerates the values for resource enum. -type ResourceEnum string +// ReasonCode enumerates the values for reason code. +type ReasonCode string const ( - // ResourceEnumB specifies the resource enum b state for resource enum. - ResourceEnumB ResourceEnum = "b" - // ResourceEnumC specifies the resource enum c state for resource enum. - ResourceEnumC ResourceEnum = "c" - // ResourceEnumF specifies the resource enum f state for resource enum. - ResourceEnumF ResourceEnum = "f" - // ResourceEnumS specifies the resource enum s state for resource enum. - ResourceEnumS ResourceEnum = "s" -) - -// ResourceTypes enumerates the values for resource types. -type ResourceTypes string - -const ( - // ResourceTypesC specifies the resource types c state for resource types. - ResourceTypesC ResourceTypes = "c" - // ResourceTypesO specifies the resource types o state for resource types. - ResourceTypesO ResourceTypes = "o" - // ResourceTypesS specifies the resource types s state for resource types. - ResourceTypesS ResourceTypes = "s" + // NotAvailableForSubscription specifies the not available for subscription state for reason code. + NotAvailableForSubscription ReasonCode = "NotAvailableForSubscription" + // QuotaID specifies the quota id state for reason code. + QuotaID ReasonCode = "QuotaId" ) // Services enumerates the values for services. @@ -179,6 +182,32 @@ const ( T Services = "t" ) +// SignedResource enumerates the values for signed resource. +type SignedResource string + +const ( + // SignedResourceB specifies the signed resource b state for signed resource. + SignedResourceB SignedResource = "b" + // SignedResourceC specifies the signed resource c state for signed resource. + SignedResourceC SignedResource = "c" + // SignedResourceF specifies the signed resource f state for signed resource. + SignedResourceF SignedResource = "f" + // SignedResourceS specifies the signed resource s state for signed resource. + SignedResourceS SignedResource = "s" +) + +// SignedResourceTypes enumerates the values for signed resource types. +type SignedResourceTypes string + +const ( + // SignedResourceTypesC specifies the signed resource types c state for signed resource types. + SignedResourceTypesC SignedResourceTypes = "c" + // SignedResourceTypesO specifies the signed resource types o state for signed resource types. + SignedResourceTypesO SignedResourceTypes = "o" + // SignedResourceTypesS specifies the signed resource types s state for signed resource types. + SignedResourceTypesS SignedResourceTypes = "s" +) + // SkuName enumerates the values for sku name. type SkuName string @@ -205,6 +234,22 @@ const ( Standard SkuTier = "Standard" ) +// State enumerates the values for state. +type State string + +const ( + // StateDeprovisioning specifies the state deprovisioning state for state. + StateDeprovisioning State = "deprovisioning" + // StateFailed specifies the state failed state for state. + StateFailed State = "failed" + // StateNetworkSourceDeleted specifies the state network source deleted state for state. + StateNetworkSourceDeleted State = "networkSourceDeleted" + // StateProvisioning specifies the state provisioning state for state. + StateProvisioning State = "provisioning" + // StateSucceeded specifies the state succeeded state for state. + StateSucceeded State = "succeeded" +) + // UsageUnit enumerates the values for usage unit. type UsageUnit string @@ -233,23 +278,23 @@ type Account struct { Tags *map[string]*string `json:"tags,omitempty"` Sku *Sku `json:"sku,omitempty"` Kind Kind `json:"kind,omitempty"` + Identity *Identity `json:"identity,omitempty"` *AccountProperties `json:"properties,omitempty"` } -// AccountCheckNameAvailabilityParameters is the parameters used to check the -// availabity of the storage account name. +// AccountCheckNameAvailabilityParameters is the parameters used to check the availabity of the storage account name. type AccountCheckNameAvailabilityParameters struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } -// AccountCreateParameters is the parameters used when creating a storage -// account. +// AccountCreateParameters is the parameters used when creating a storage account. type AccountCreateParameters struct { Sku *Sku `json:"sku,omitempty"` Kind Kind `json:"kind,omitempty"` Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` + Identity *Identity `json:"identity,omitempty"` *AccountPropertiesCreateParameters `json:"properties,omitempty"` } @@ -287,50 +332,49 @@ type AccountProperties struct { Encryption *Encryption `json:"encryption,omitempty"` AccessTier AccessTier `json:"accessTier,omitempty"` EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` } -// AccountPropertiesCreateParameters is the parameters used to create the -// storage account. +// AccountPropertiesCreateParameters is the parameters used to create the storage account. type AccountPropertiesCreateParameters struct { - CustomDomain *CustomDomain `json:"customDomain,omitempty"` - Encryption *Encryption `json:"encryption,omitempty"` - AccessTier AccessTier `json:"accessTier,omitempty"` - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + CustomDomain *CustomDomain `json:"customDomain,omitempty"` + Encryption *Encryption `json:"encryption,omitempty"` + NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` + AccessTier AccessTier `json:"accessTier,omitempty"` + EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` } -// AccountPropertiesUpdateParameters is the parameters used when updating a -// storage account. +// AccountPropertiesUpdateParameters is the parameters used when updating a storage account. type AccountPropertiesUpdateParameters struct { - CustomDomain *CustomDomain `json:"customDomain,omitempty"` - Encryption *Encryption `json:"encryption,omitempty"` - AccessTier AccessTier `json:"accessTier,omitempty"` - EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + CustomDomain *CustomDomain `json:"customDomain,omitempty"` + Encryption *Encryption `json:"encryption,omitempty"` + AccessTier AccessTier `json:"accessTier,omitempty"` + EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` + NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` } -// AccountRegenerateKeyParameters is the parameters used to regenerate the -// storage account key. +// AccountRegenerateKeyParameters is the parameters used to regenerate the storage account key. type AccountRegenerateKeyParameters struct { KeyName *string `json:"keyName,omitempty"` } -// AccountSasParameters is the parameters to list SAS credentials of a storage -// account. +// AccountSasParameters is the parameters to list SAS credentials of a storage account. type AccountSasParameters struct { - Services Services `json:"signedServices,omitempty"` - ResourceTypes ResourceTypes `json:"signedResourceTypes,omitempty"` - Permissions Permissions `json:"signedPermission,omitempty"` - IPAddressOrRange *string `json:"signedIp,omitempty"` - Protocols HTTPProtocol `json:"signedProtocol,omitempty"` - SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` - SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` - KeyToSign *string `json:"keyToSign,omitempty"` + Services Services `json:"signedServices,omitempty"` + ResourceTypes SignedResourceTypes `json:"signedResourceTypes,omitempty"` + Permissions Permissions `json:"signedPermission,omitempty"` + IPAddressOrRange *string `json:"signedIp,omitempty"` + Protocols HTTPProtocol `json:"signedProtocol,omitempty"` + SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` + SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` + KeyToSign *string `json:"keyToSign,omitempty"` } -// AccountUpdateParameters is the parameters that can be provided when updating -// the storage account properties. +// AccountUpdateParameters is the parameters that can be provided when updating the storage account properties. type AccountUpdateParameters struct { Sku *Sku `json:"sku,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` + Identity *Identity `json:"identity,omitempty"` *AccountPropertiesUpdateParameters `json:"properties,omitempty"` } @@ -342,21 +386,26 @@ type CheckNameAvailabilityResult struct { Message *string `json:"message,omitempty"` } -// CustomDomain is the custom domain assigned to this storage account. This can -// be set via Update. +// CustomDomain is the custom domain assigned to this storage account. This can be set via Update. type CustomDomain struct { Name *string `json:"name,omitempty"` UseSubDomain *bool `json:"useSubDomain,omitempty"` } -// Encryption is the encryption settings on the storage account. -type Encryption struct { - Services *EncryptionServices `json:"services,omitempty"` - KeySource *string `json:"keySource,omitempty"` +// Dimension is dimension of blobs, possiblly be blob type or access tier. +type Dimension struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` } -// EncryptionService is a service that allows server-side encryption to be -// used. +// Encryption is the encryption settings on the storage account. +type Encryption struct { + Services *EncryptionServices `json:"services,omitempty"` + KeySource KeySource `json:"keySource,omitempty"` + KeyVaultProperties *KeyVaultProperties `json:"keyvaultproperties,omitempty"` +} + +// EncryptionService is a service that allows server-side encryption to be used. type EncryptionService struct { Enabled *bool `json:"enabled,omitempty"` LastEnabledTime *date.Time `json:"lastEnabledTime,omitempty"` @@ -370,8 +419,7 @@ type EncryptionServices struct { Queue *EncryptionService `json:"queue,omitempty"` } -// Endpoints is the URIs that are used to perform a retrieval of a public blob, -// queue, or table object. +// Endpoints is the URIs that are used to perform a retrieval of a public blob, queue, or table object. type Endpoints struct { Blob *string `json:"blob,omitempty"` Queue *string `json:"queue,omitempty"` @@ -379,19 +427,86 @@ type Endpoints struct { File *string `json:"file,omitempty"` } +// Identity is identity for the resource. +type Identity struct { + PrincipalID *string `json:"principalId,omitempty"` + TenantID *string `json:"tenantId,omitempty"` + Type *string `json:"type,omitempty"` +} + +// IPRule is IP rule with specific IP or IP range in CIDR format. +type IPRule struct { + IPAddressOrRange *string `json:"value,omitempty"` + Action Action `json:"action,omitempty"` +} + +// KeyVaultProperties is properties of key vault. +type KeyVaultProperties struct { + KeyName *string `json:"keyname,omitempty"` + KeyVersion *string `json:"keyversion,omitempty"` + KeyVaultURI *string `json:"keyvaulturi,omitempty"` +} + // ListAccountSasResponse is the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` AccountSasToken *string `json:"accountSasToken,omitempty"` } -// ListServiceSasResponse is the List service SAS credentials operation -// response. +// ListServiceSasResponse is the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` ServiceSasToken *string `json:"serviceSasToken,omitempty"` } +// MetricSpecification is metric specification of operation. +type MetricSpecification struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + DisplayDescription *string `json:"displayDescription,omitempty"` + Unit *string `json:"unit,omitempty"` + Dimensions *[]Dimension `json:"dimensions,omitempty"` + AggregationType *string `json:"aggregationType,omitempty"` + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + Category *string `json:"category,omitempty"` + ResourceIDDimensionNameOverride *string `json:"resourceIdDimensionNameOverride,omitempty"` +} + +// NetworkRuleSet is network rule set +type NetworkRuleSet struct { + Bypass Bypass `json:"bypass,omitempty"` + VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"` + IPRules *[]IPRule `json:"ipRules,omitempty"` + DefaultAction DefaultAction `json:"defaultAction,omitempty"` +} + +// Operation is storage REST API operation definition. +type Operation struct { + Name *string `json:"name,omitempty"` + Display *OperationDisplay `json:"display,omitempty"` + Origin *string `json:"origin,omitempty"` + *OperationProperties `json:"properties,omitempty"` +} + +// OperationDisplay is display metadata associated with the operation. +type OperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` +} + +// OperationListResult is result of the request to list Storage operations. It contains a list of operations and a URL +// link to get the next set of results. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` +} + +// OperationProperties is properties of operation, include metric specifications. +type OperationProperties struct { + ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` +} + // Resource is describes a storage resource. type Resource struct { ID *string `json:"id,omitempty"` @@ -401,33 +516,62 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ServiceSasParameters is the parameters to list service SAS credentials of a -// speicific resource. +// Restriction is the restriction because of which SKU cannot be used. +type Restriction struct { + Type *string `json:"type,omitempty"` + Values *[]string `json:"values,omitempty"` + ReasonCode ReasonCode `json:"reasonCode,omitempty"` +} + +// ServiceSasParameters is the parameters to list service SAS credentials of a speicific resource. type ServiceSasParameters struct { - CanonicalizedResource *string `json:"canonicalizedResource,omitempty"` - Resource Resource `json:"signedResource,omitempty"` - Permissions Permissions `json:"signedPermission,omitempty"` - IPAddressOrRange *string `json:"signedIp,omitempty"` - Protocols HTTPProtocol `json:"signedProtocol,omitempty"` - SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` - SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` - Identifier *string `json:"signedIdentifier,omitempty"` - PartitionKeyStart *string `json:"startPk,omitempty"` - PartitionKeyEnd *string `json:"endPk,omitempty"` - RowKeyStart *string `json:"startRk,omitempty"` - RowKeyEnd *string `json:"endRk,omitempty"` - KeyToSign *string `json:"keyToSign,omitempty"` - CacheControl *string `json:"rscc,omitempty"` - ContentDisposition *string `json:"rscd,omitempty"` - ContentEncoding *string `json:"rsce,omitempty"` - ContentLanguage *string `json:"rscl,omitempty"` - ContentType *string `json:"rsct,omitempty"` + CanonicalizedResource *string `json:"canonicalizedResource,omitempty"` + Resource SignedResource `json:"signedResource,omitempty"` + Permissions Permissions `json:"signedPermission,omitempty"` + IPAddressOrRange *string `json:"signedIp,omitempty"` + Protocols HTTPProtocol `json:"signedProtocol,omitempty"` + SharedAccessStartTime *date.Time `json:"signedStart,omitempty"` + SharedAccessExpiryTime *date.Time `json:"signedExpiry,omitempty"` + Identifier *string `json:"signedIdentifier,omitempty"` + PartitionKeyStart *string `json:"startPk,omitempty"` + PartitionKeyEnd *string `json:"endPk,omitempty"` + RowKeyStart *string `json:"startRk,omitempty"` + RowKeyEnd *string `json:"endRk,omitempty"` + KeyToSign *string `json:"keyToSign,omitempty"` + CacheControl *string `json:"rscc,omitempty"` + ContentDisposition *string `json:"rscd,omitempty"` + ContentEncoding *string `json:"rsce,omitempty"` + ContentLanguage *string `json:"rscl,omitempty"` + ContentType *string `json:"rsct,omitempty"` +} + +// ServiceSpecification is one property of operation, include metric specifications. +type ServiceSpecification struct { + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` } // Sku is the SKU of the storage account. type Sku struct { - Name SkuName `json:"name,omitempty"` - Tier SkuTier `json:"tier,omitempty"` + Name SkuName `json:"name,omitempty"` + Tier SkuTier `json:"tier,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` + Kind Kind `json:"kind,omitempty"` + Locations *[]string `json:"locations,omitempty"` + Capabilities *[]SKUCapability `json:"capabilities,omitempty"` + Restrictions *[]Restriction `json:"restrictions,omitempty"` +} + +// SKUCapability is the capability information in the specified sku, including file encryption, network acls, change +// notification, etc. +type SKUCapability struct { + Name *string `json:"name,omitempty"` + Value *string `json:"value,omitempty"` +} + +// SkuListResult is the response from the List Storage SKUs operation. +type SkuListResult struct { + autorest.Response `json:"-"` + Value *[]Sku `json:"value,omitempty"` } // Usage is describes Storage Resource Usage. @@ -444,9 +588,15 @@ type UsageListResult struct { Value *[]Usage `json:"value,omitempty"` } -// UsageName is the usage names that can be used; currently limited to -// StorageAccount. +// UsageName is the usage names that can be used; currently limited to StorageAccount. type UsageName struct { Value *string `json:"value,omitempty"` LocalizedValue *string `json:"localizedValue,omitempty"` } + +// VirtualNetworkRule is virtual Network rule. +type VirtualNetworkRule struct { + VirtualNetworkResourceID *string `json:"id,omitempty"` + Action Action `json:"action,omitempty"` + State State `json:"state,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/operations.go new file mode 100644 index 000000000..cc46c6997 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/operations.go @@ -0,0 +1,96 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the the Azure Storage Management API. +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists all of the available Storage Rest API operations. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "storage.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + const APIVersion = "2017-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Storage/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/skus.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/skus.go new file mode 100644 index 000000000..94d4d6f83 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/skus.go @@ -0,0 +1,100 @@ +package storage + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// SkusClient is the the Azure Storage Management API. +type SkusClient struct { + ManagementClient +} + +// NewSkusClient creates an instance of the SkusClient client. +func NewSkusClient(subscriptionID string) SkusClient { + return NewSkusClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewSkusClientWithBaseURI creates an instance of the SkusClient client. +func NewSkusClientWithBaseURI(baseURI string, subscriptionID string) SkusClient { + return SkusClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List lists the available SKUs supported by Microsoft.Storage for given subscription. +func (client SkusClient) List() (result SkuListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "storage.SkusClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "storage.SkusClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "storage.SkusClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client SkusClient) ListPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-06-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Storage/skus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client SkusClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client SkusClient) ListResponder(resp *http.Response) (result SkuListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/usage.go index b12a6d315..682e5c16c 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/usage.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/usage.go @@ -14,9 +14,8 @@ package storage // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -39,8 +38,7 @@ func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClien return UsageClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List gets the current usage count and the limit for the resources under the -// subscription. +// List gets the current usage count and the limit for the resources under the subscription. func (client UsageClient) List() (result UsageListResult, err error) { req, err := client.ListPreparer() if err != nil { @@ -69,7 +67,7 @@ func (client UsageClient) ListPreparer() (*http.Request, error) { "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2016-12-01" + const APIVersion = "2017-06-01" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go index faf07633b..467102d59 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storage/version.go @@ -14,15 +14,15 @@ package storage // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-storage/2017-06-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-storage/2017-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/client.go index b5de7c2e6..fc5eb8c1e 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/client.go @@ -1,5 +1,4 @@ -// Package storageimportexport implements the Azure ARM Storageimportexport -// service API version 2016-11-01. +// Package storageimportexport implements the Azure ARM Storageimportexport service API version 2016-11-01. // // The Microsoft Azure Storage Import/Export Resource Provider API. package storageimportexport @@ -18,9 +17,8 @@ package storageimportexport // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -58,11 +56,10 @@ func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { } } -// GetLocation gets a location to which you can ship the disks associated with -// an import or export job. A location is an Azure region. +// GetLocation gets a location to which you can ship the disks associated with an import or export job. A location is +// an Azure region. // -// locationName is the name of the location. For example, 'West US' or -// 'westus'. +// locationName is the name of the location. For example, 'West US' or 'westus'. func (client ManagementClient) GetLocation(locationName string) (result Location, err error) { req, err := client.GetLocationPreparer(locationName) if err != nil { @@ -124,9 +121,8 @@ func (client ManagementClient) GetLocationResponder(resp *http.Response) (result return } -// ListLocations returns a list of locations to which you can ship the disks -// associated with an import or export job. A location is a Microsoft data -// center region. +// ListLocations returns a list of locations to which you can ship the disks associated with an import or export job. A +// location is a Microsoft data center region. func (client ManagementClient) ListLocations() (result LocationsListResult, err error) { req, err := client.ListLocationsPreparer() if err != nil { @@ -184,8 +180,7 @@ func (client ManagementClient) ListLocationsResponder(resp *http.Response) (resu return } -// ListSupportedOperations returns the list of operations supported by the -// import/export resource provider. +// ListSupportedOperations returns the list of operations supported by the import/export resource provider. func (client ManagementClient) ListSupportedOperations() (result SupportedOperationsListResult, err error) { req, err := client.ListSupportedOperationsPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/jobs.go index a7a845033..2dbd5f2bc 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/jobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/jobs.go @@ -14,9 +14,8 @@ package storageimportexport // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// JobsClient is the the Microsoft Azure Storage Import/Export Resource -// Provider API. +// JobsClient is the the Microsoft Azure Storage Import/Export Resource Provider API. type JobsClient struct { ManagementClient } @@ -41,13 +39,12 @@ func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient return JobsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates a new import/export job or updates an existing -// import/export job in the specified subscription. +// CreateOrUpdate creates a new import/export job or updates an existing import/export job in the specified +// subscription. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscription. jobName is the name of the -// import/export job. jobProperties is properties of the import/export job that -// need to be specified during creation. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscription. +// jobName is the name of the import/export job. jobProperties is properties of the import/export job that need to be +// specified during creation. func (client JobsClient) CreateOrUpdate(resourceGroupName string, jobName string, jobProperties Job) (result Job, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: jobProperties, @@ -155,12 +152,11 @@ func (client JobsClient) CreateOrUpdateResponder(resp *http.Response) (result Jo return } -// Delete deletes an existing import/export job. Only import/export jobs in the -// Creating or Completed states can be deleted. +// Delete deletes an existing import/export job. Only import/export jobs in the Creating or Completed states can be +// deleted. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscription. jobName is the name of the -// import/export job. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscription. +// jobName is the name of the import/export job. func (client JobsClient) Delete(resourceGroupName string, jobName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, jobName) if err != nil { @@ -225,9 +221,8 @@ func (client JobsClient) DeleteResponder(resp *http.Response) (result autorest.R // Get gets information about an existing import/export job. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscription. jobName is the name of the -// import/export job. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscription. +// jobName is the name of the import/export job. func (client JobsClient) Get(resourceGroupName string, jobName string) (result Job, err error) { req, err := client.GetPreparer(resourceGroupName, jobName) if err != nil { @@ -293,15 +288,12 @@ func (client JobsClient) GetResponder(resp *http.Response) (result Job, err erro // List gets all the active and completed import/export jobs in a subscription. // -// top is an integer value that specifies how many jobs at most should be -// returned. The value cannot exceed 100. filter is can be used to restrict the -// results to certain conditions. The following possible values can be used -// with $filter: 1) $filter=type eq '{type}'; 2) $filter=trackingnumber eq -// '{trackingnumber}'; 3) $filter=state eq '{state}'; 4) Logical and -// combination of the above, for example: $filter=type eq 'Import' and state eq -// 'Transferring'. Valid values for type are Import and Export. Valid values -// for state are Creating, Shipping, Received, Transferring, Packaging, Closed, -// and Completed. +// top is an integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. filter +// is can be used to restrict the results to certain conditions. The following possible values can be used with +// $filter: 1) $filter=type eq '{type}'; 2) $filter=trackingnumber eq '{trackingnumber}'; 3) $filter=state eq +// '{state}'; 4) Logical and combination of the above, for example: $filter=type eq 'Import' and state eq +// 'Transferring'. Valid values for type are Import and Export. Valid values for state are Creating, Shipping, +// Received, Transferring, Packaging, Closed, and Completed. func (client JobsClient) List(top *int32, filter string) (result JobListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: top, @@ -402,12 +394,55 @@ func (client JobsClient) ListNextResults(lastResults JobListResult) (result JobL return } -// ListBitLockerKeys lists the BitLocker keys for all drives in the specified -// import/export job. +// ListComplete gets all elements from the list without paging. +func (client JobsClient) ListComplete(top *int32, filter string, cancel <-chan struct{}) (<-chan Job, <-chan error) { + resultChan := make(chan Job) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListBitLockerKeys lists the BitLocker keys for all drives in the specified import/export job. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscription. jobName is the name of the -// import/export job. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscription. +// jobName is the name of the import/export job. func (client JobsClient) ListBitLockerKeys(resourceGroupName string, jobName string) (result BitLockerKeysListResult, err error) { req, err := client.ListBitLockerKeysPreparer(resourceGroupName, jobName) if err != nil { @@ -471,18 +506,14 @@ func (client JobsClient) ListBitLockerKeysResponder(resp *http.Response) (result return } -// ListByResourceGroup returns all active and completed import/export jobs in a -// resource group. +// ListByResourceGroup returns all active and completed import/export jobs in a resource group. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscription. top is an integer value that -// specifies how many jobs at most should be returned. The value cannot exceed -// 100. filter is can be used to restrict the results to certain conditions. -// The following possible values can be used with $filter: 1) $filter=type eq -// '{type}'; 2) $filter=trackingnumber eq '{trackingnumber}'; 3) $filter=state -// eq '{state}'; 4) Logical and combination of the above, for example: -// $filter=type eq 'Import' and state eq 'Transferring'. Valid values for type -// are Import and Export. Valid values for state are Creating, Shipping, +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscription. +// top is an integer value that specifies how many jobs at most should be returned. The value cannot exceed 100. filter +// is can be used to restrict the results to certain conditions. The following possible values can be used with +// $filter: 1) $filter=type eq '{type}'; 2) $filter=trackingnumber eq '{trackingnumber}'; 3) $filter=state eq +// '{state}'; 4) Logical and combination of the above, for example: $filter=type eq 'Import' and state eq +// 'Transferring'. Valid values for type are Import and Export. Valid values for state are Creating, Shipping, // Received, Transferring, Packaging, Closed, and Completed. func (client JobsClient) ListByResourceGroup(resourceGroupName string, top *int32, filter string) (result JobListResult, err error) { if err := validation.Validate([]validation.Validation{ @@ -585,13 +616,56 @@ func (client JobsClient) ListByResourceGroupNextResults(lastResults JobListResul return } -// Move moves the specified import/export jobs from the resource group to a -// target resource group. The target resource group may be in a different -// subscription. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client JobsClient) ListByResourceGroupComplete(resourceGroupName string, top *int32, filter string, cancel <-chan struct{}) (<-chan Job, <-chan error) { + resultChan := make(chan Job) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, top, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Move moves the specified import/export jobs from the resource group to a target resource group. The target resource +// group may be in a different subscription. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscription. moveJobsParameters is -// parameters to be provided to move a job from one resource group to another. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscription. +// moveJobsParameters is parameters to be provided to move a job from one resource group to another. func (client JobsClient) Move(resourceGroupName string, moveJobsParameters MoveJobParameters) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: moveJobsParameters, @@ -662,15 +736,12 @@ func (client JobsClient) MoveResponder(resp *http.Response) (result autorest.Res return } -// Update updates specific properties of the import/export job. You can call -// this operation to notify the Import/Export service that the hard drives -// comprising the import or export job have been shipped to the Microsoft data -// center. It can also be used to cancel an existing job. +// Update updates specific properties of the import/export job. You can call this operation to notify the Import/Export +// service that the hard drives comprising the import or export job have been shipped to the Microsoft data center. It +// can also be used to cancel an existing job. // -// resourceGroupName is the resource group name uniquely identifies the -// resource group within the user subscription. jobName is the name of the -// import/export job. jobProperties is import/export job properties that need -// to be updated. +// resourceGroupName is the resource group name uniquely identifies the resource group within the user subscription. +// jobName is the name of the import/export job. jobProperties is import/export job properties that need to be updated. func (client JobsClient) Update(resourceGroupName string, jobName string, jobProperties MutableJob) (result Job, err error) { req, err := client.UpdatePreparer(resourceGroupName, jobName, jobProperties) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/models.go index 6df5d0ed1..4d46a5da3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/models.go @@ -14,9 +14,8 @@ package storageimportexport // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -30,8 +29,7 @@ type DriveState string const ( // Completed specifies the completed state for drive state. Completed DriveState = "Completed" - // CompletedMoreInfo specifies the completed more info state for drive - // state. + // CompletedMoreInfo specifies the completed more info state for drive state. CompletedMoreInfo DriveState = "CompletedMoreInfo" // NeverReceived specifies the never received state for drive state. NeverReceived DriveState = "NeverReceived" @@ -61,8 +59,7 @@ const ( JobStateReceived JobState = "Received" // JobStateShipping specifies the job state shipping state for job state. JobStateShipping JobState = "Shipping" - // JobStateTransferring specifies the job state transferring state for job - // state. + // JobStateTransferring specifies the job state transferring state for job state. JobStateTransferring JobState = "Transferring" ) @@ -94,15 +91,13 @@ const ( Shipping MutableJobState = "Shipping" ) -// BitLockerKeysListResult is list of BitLocker keys for the specified -// import/export job. +// BitLockerKeysListResult is list of BitLocker keys for the specified import/export job. type BitLockerKeysListResult struct { autorest.Response `json:"-"` Value *[]DriveStatus `json:"value,omitempty"` } -// Drive is provides information about the drive that contains information -// about the import/export jobs. +// Drive is provides information about the drive that contains information about the import/export jobs. type Drive struct { DriveID *string `json:"driveId,omitempty"` BitLockerKey *string `json:"bitLockerKey,omitempty"` @@ -144,9 +139,8 @@ type ErrorResponse struct { Error *ErrorInfo `json:"error,omitempty"` } -// Export is a property containing information about the blobs to be exported -// for an export job. This property is required for export jobs, but must not -// be specified for import jobs. +// Export is a property containing information about the blobs to be exported for an export job. This property is +// required for export jobs, but must not be specified for import jobs. type Export struct { *ExportBlobList `json:"blobList,omitempty"` BlobListblobPath *string `json:"blobListblobPath,omitempty"` @@ -239,8 +233,8 @@ type LocationsListResult struct { Value *[]Location `json:"value,omitempty"` } -// MoveJobParameters is defines the parameters that need to be provided for -// moving an import/export job from one reesource group to another. +// MoveJobParameters is defines the parameters that need to be provided for moving an import/export job from one +// reesource group to another. type MoveJobParameters struct { TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` Resources *[]string `json:"resources,omitempty"` @@ -263,8 +257,7 @@ type MutableJobProperties struct { BackupDriveManifest *bool `json:"backupDriveManifest,omitempty"` } -// Operation is describes a supported operation by the Storage Import/Export -// job API. +// Operation is describes a supported operation by the Storage Import/Export job API. type Operation struct { Name *string `json:"name,omitempty"` *OperationDisplayInformation `json:"display,omitempty"` @@ -278,8 +271,8 @@ type OperationDisplayInformation struct { Description *string `json:"description,omitempty"` } -// PackageInfomation is provides information about the package being shipped by -// the customer to the Microsoft data center. +// PackageInfomation is provides information about the package being shipped by the customer to the Microsoft data +// center. type PackageInfomation struct { CarrierName *string `json:"carrierName,omitempty"` TrackingNumber *string `json:"trackingNumber,omitempty"` @@ -309,22 +302,19 @@ type ReturnAddress struct { Email *string `json:"email,omitempty"` } -// ReturnShipping is specifies the return carrier and customer's account with -// the carrier. +// ReturnShipping is specifies the return carrier and customer's account with the carrier. type ReturnShipping struct { CarrierName *string `json:"carrierName,omitempty"` CarrierAccountNumber *string `json:"carrierAccountNumber,omitempty"` } -// ShippingInformation is provides information about the Microsoft datacenter -// to which the drives should be shipped. +// ShippingInformation is provides information about the Microsoft datacenter to which the drives should be shipped. type ShippingInformation struct { Name *string `json:"name,omitempty"` Address *string `json:"address,omitempty"` } -// SupportedOperationsListResult is list of supported operations by the -// import/export resource provider. +// SupportedOperationsListResult is list of supported operations by the import/export resource provider. type SupportedOperationsListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go index 54da4e7f0..7ae7e2d20 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storageimportexport/version.go @@ -14,15 +14,15 @@ package storageimportexport // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-storageimportexport/2016-11-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-storageimportexport/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/accesscontrolrecords.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/accesscontrolrecords.go index a24d9f87c..c48e881b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/accesscontrolrecords.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/accesscontrolrecords.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,27 @@ import ( "net/http" ) -// AccessControlRecordsClient is the client for the AccessControlRecords -// methods of the Storsimple8000series service. +// AccessControlRecordsClient is the client for the AccessControlRecords methods of the Storsimple8000series service. type AccessControlRecordsClient struct { ManagementClient } -// NewAccessControlRecordsClient creates an instance of the -// AccessControlRecordsClient client. +// NewAccessControlRecordsClient creates an instance of the AccessControlRecordsClient client. func NewAccessControlRecordsClient(subscriptionID string) AccessControlRecordsClient { return NewAccessControlRecordsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAccessControlRecordsClientWithBaseURI creates an instance of the -// AccessControlRecordsClient client. +// NewAccessControlRecordsClientWithBaseURI creates an instance of the AccessControlRecordsClient client. func NewAccessControlRecordsClientWithBaseURI(baseURI string, subscriptionID string) AccessControlRecordsClient { return AccessControlRecordsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or Updates an access control record. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or Updates an access control record. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// accessControlRecordName is the name of the access control record. parameters -// is the access control record to be added or updated. resourceGroupName is -// the resource group name managerName is the manager name +// accessControlRecordName is the name of the access control record. parameters is the access control record to be +// added or updated. resourceGroupName is the resource group name managerName is the manager name func (client AccessControlRecordsClient) CreateOrUpdate(accessControlRecordName string, parameters AccessControlRecord, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan AccessControlRecord, <-chan error) { resultChan := make(chan AccessControlRecord, 1) errChan := make(chan error, 1) @@ -144,13 +138,11 @@ func (client AccessControlRecordsClient) CreateOrUpdateResponder(resp *http.Resp return } -// Delete deletes the access control record. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the access control record. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// accessControlRecordName is the name of the access control record to delete. -// resourceGroupName is the resource group name managerName is the manager name +// accessControlRecordName is the name of the access control record to delete. resourceGroupName is the resource group +// name managerName is the manager name func (client AccessControlRecordsClient) Delete(accessControlRecordName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -240,8 +232,8 @@ func (client AccessControlRecordsClient) DeleteResponder(resp *http.Response) (r // Get returns the properties of the specified access control record name. // -// accessControlRecordName is name of access control record to be fetched. -// resourceGroupName is the resource group name managerName is the manager name +// accessControlRecordName is name of access control record to be fetched. resourceGroupName is the resource group name +// managerName is the manager name func (client AccessControlRecordsClient) Get(accessControlRecordName string, resourceGroupName string, managerName string) (result AccessControlRecord, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/alerts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/alerts.go index 1cc671db2..c31f76726 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/alerts.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/alerts.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// AlertsClient is the client for the Alerts methods of the -// Storsimple8000series service. +// AlertsClient is the client for the Alerts methods of the Storsimple8000series service. type AlertsClient struct { ManagementClient } @@ -43,8 +41,7 @@ func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string) AlertsCli // Clear clear the alerts. // -// parameters is the clear alert request. resourceGroupName is the resource -// group name managerName is the manager name +// parameters is the clear alert request. resourceGroupName is the resource group name managerName is the manager name func (client AlertsClient) Clear(parameters ClearAlertRequest, resourceGroupName string, managerName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -119,8 +116,7 @@ func (client AlertsClient) ClearResponder(resp *http.Response) (result autorest. // ListByManager retrieves all the alerts in a manager. // -// resourceGroupName is the resource group name managerName is the manager name -// filter is oData Filter options +// resourceGroupName is the resource group name managerName is the manager name filter is oData Filter options func (client AlertsClient) ListByManager(resourceGroupName string, managerName string, filter string) (result AlertList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -264,9 +260,8 @@ func (client AlertsClient) ListByManagerComplete(resourceGroupName string, manag // SendTestEmail sends a test alert email. // -// deviceName is the device name parameters is the send test alert email -// request. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name parameters is the send test alert email request. resourceGroupName is the resource +// group name managerName is the manager name func (client AlertsClient) SendTestEmail(deviceName string, parameters SendTestAlertEmailRequest, resourceGroupName string, managerName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backuppolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backuppolicies.go index caebc2855..f5343b4f5 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backuppolicies.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backuppolicies.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,26 @@ import ( "net/http" ) -// BackupPoliciesClient is the client for the BackupPolicies methods of the -// Storsimple8000series service. +// BackupPoliciesClient is the client for the BackupPolicies methods of the Storsimple8000series service. type BackupPoliciesClient struct { ManagementClient } -// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient -// client. +// NewBackupPoliciesClient creates an instance of the BackupPoliciesClient client. func NewBackupPoliciesClient(subscriptionID string) BackupPoliciesClient { return NewBackupPoliciesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupPoliciesClientWithBaseURI creates an instance of the -// BackupPoliciesClient client. +// NewBackupPoliciesClientWithBaseURI creates an instance of the BackupPoliciesClient client. func NewBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string) BackupPoliciesClient { return BackupPoliciesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// BackupNow backup the backup policy now. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// BackupNow backup the backup policy now. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name backupPolicyName is the backup policy name. -// backupType is the backup Type. This can be cloudSnapshot or localSnapshot. -// resourceGroupName is the resource group name managerName is the manager name +// deviceName is the device name backupPolicyName is the backup policy name. backupType is the backup Type. This can be +// cloudSnapshot or localSnapshot. resourceGroupName is the resource group name managerName is the manager name func (client BackupPoliciesClient) BackupNow(deviceName string, backupPolicyName string, backupType string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -139,14 +133,11 @@ func (client BackupPoliciesClient) BackupNowResponder(resp *http.Response) (resu return } -// CreateOrUpdate creates or updates the backup policy. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates the backup policy. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name backupPolicyName is the name of the backup -// policy to be created/updated. parameters is the backup policy. -// resourceGroupName is the resource group name managerName is the manager name +// deviceName is the device name backupPolicyName is the name of the backup policy to be created/updated. parameters is +// the backup policy. resourceGroupName is the resource group name managerName is the manager name func (client BackupPoliciesClient) CreateOrUpdate(deviceName string, backupPolicyName string, parameters BackupPolicy, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan BackupPolicy, <-chan error) { resultChan := make(chan BackupPolicy, 1) errChan := make(chan error, 1) @@ -241,13 +232,11 @@ func (client BackupPoliciesClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes the backup policy. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes the backup policy. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name backupPolicyName is the name of the backup -// policy. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name backupPolicyName is the name of the backup policy. resourceGroupName is the resource +// group name managerName is the manager name func (client BackupPoliciesClient) Delete(deviceName string, backupPolicyName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -338,9 +327,8 @@ func (client BackupPoliciesClient) DeleteResponder(resp *http.Response) (result // Get gets the properties of the specified backup policy name. // -// deviceName is the device name backupPolicyName is the name of backup policy -// to be fetched. resourceGroupName is the resource group name managerName is -// the manager name +// deviceName is the device name backupPolicyName is the name of backup policy to be fetched. resourceGroupName is the +// resource group name managerName is the manager name func (client BackupPoliciesClient) Get(deviceName string, backupPolicyName string, resourceGroupName string, managerName string) (result BackupPolicy, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -414,8 +402,7 @@ func (client BackupPoliciesClient) GetResponder(resp *http.Response) (result Bac // ListByDevice gets all the backup policies in a device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client BackupPoliciesClient) ListByDevice(deviceName string, resourceGroupName string, managerName string) (result BackupPolicyList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backups.go index d4ef8f2af..f6f386530 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backups.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// BackupsClient is the client for the Backups methods of the -// Storsimple8000series service. +// BackupsClient is the client for the Backups methods of the Storsimple8000series service. type BackupsClient struct { ManagementClient } @@ -41,15 +39,11 @@ func NewBackupsClientWithBaseURI(baseURI string, subscriptionID string) BackupsC return BackupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Clone clones the backup element as a new volume. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Clone clones the backup element as a new volume. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name backupName is the backup name. -// backupElementName is the backup element name. parameters is the clone -// request object. resourceGroupName is the resource group name managerName is -// the manager name +// deviceName is the device name backupName is the backup name. backupElementName is the backup element name. +// parameters is the clone request object. resourceGroupName is the resource group name managerName is the manager name func (client BackupsClient) Clone(deviceName string, backupName string, backupElementName string, parameters CloneRequest, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -153,12 +147,11 @@ func (client BackupsClient) CloneResponder(resp *http.Response) (result autorest return } -// Delete deletes the backup. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the backup. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name backupName is the backup name. -// resourceGroupName is the resource group name managerName is the manager name +// deviceName is the device name backupName is the backup name. resourceGroupName is the resource group name +// managerName is the manager name func (client BackupsClient) Delete(deviceName string, backupName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -249,8 +242,8 @@ func (client BackupsClient) DeleteResponder(resp *http.Response) (result autores // ListByDevice retrieves all the backups in a device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name filter is oData Filter options +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name filter is +// oData Filter options func (client BackupsClient) ListByDevice(deviceName string, resourceGroupName string, managerName string, filter string) (result BackupList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -393,13 +386,11 @@ func (client BackupsClient) ListByDeviceComplete(deviceName string, resourceGrou return resultChan, errChan } -// Restore restores the backup on the device. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Restore restores the backup on the device. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name backupName is the backupSet name -// resourceGroupName is the resource group name managerName is the manager name +// deviceName is the device name backupName is the backupSet name resourceGroupName is the resource group name +// managerName is the manager name func (client BackupsClient) Restore(deviceName string, backupName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backupschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backupschedules.go index d68c9d2f9..8e295946f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backupschedules.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/backupschedules.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,28 @@ import ( "net/http" ) -// BackupSchedulesClient is the client for the BackupSchedules methods of the -// Storsimple8000series service. +// BackupSchedulesClient is the client for the BackupSchedules methods of the Storsimple8000series service. type BackupSchedulesClient struct { ManagementClient } -// NewBackupSchedulesClient creates an instance of the BackupSchedulesClient -// client. +// NewBackupSchedulesClient creates an instance of the BackupSchedulesClient client. func NewBackupSchedulesClient(subscriptionID string) BackupSchedulesClient { return NewBackupSchedulesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBackupSchedulesClientWithBaseURI creates an instance of the -// BackupSchedulesClient client. +// NewBackupSchedulesClientWithBaseURI creates an instance of the BackupSchedulesClient client. func NewBackupSchedulesClientWithBaseURI(baseURI string, subscriptionID string) BackupSchedulesClient { return BackupSchedulesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the backup schedule. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates the backup schedule. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// deviceName is the device name backupPolicyName is the backup policy name. -// backupScheduleName is the backup schedule name. parameters is the backup -// schedule. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name backupPolicyName is the backup policy name. backupScheduleName is the backup schedule +// name. parameters is the backup schedule. resourceGroupName is the resource group name managerName is the manager +// name func (client BackupSchedulesClient) CreateOrUpdate(deviceName string, backupPolicyName string, backupScheduleName string, parameters BackupSchedule, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan BackupSchedule, <-chan error) { resultChan := make(chan BackupSchedule, 1) errChan := make(chan error, 1) @@ -151,13 +145,11 @@ func (client BackupSchedulesClient) CreateOrUpdateResponder(resp *http.Response) return } -// Delete deletes the backup schedule. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes the backup schedule. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name backupPolicyName is the backup policy name. -// backupScheduleName is the name the backup schedule. resourceGroupName is the -// resource group name managerName is the manager name +// deviceName is the device name backupPolicyName is the backup policy name. backupScheduleName is the name the backup +// schedule. resourceGroupName is the resource group name managerName is the manager name func (client BackupSchedulesClient) Delete(deviceName string, backupPolicyName string, backupScheduleName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -249,9 +241,8 @@ func (client BackupSchedulesClient) DeleteResponder(resp *http.Response) (result // Get gets the properties of the specified backup schedule name. // -// deviceName is the device name backupPolicyName is the backup policy name. -// backupScheduleName is the name of the backup schedule to be fetched -// resourceGroupName is the resource group name managerName is the manager name +// deviceName is the device name backupPolicyName is the backup policy name. backupScheduleName is the name of the +// backup schedule to be fetched resourceGroupName is the resource group name managerName is the manager name func (client BackupSchedulesClient) Get(deviceName string, backupPolicyName string, backupScheduleName string, resourceGroupName string, managerName string) (result BackupSchedule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -326,8 +317,8 @@ func (client BackupSchedulesClient) GetResponder(resp *http.Response) (result Ba // ListByBackupPolicy gets all the backup schedules in a backup policy. // -// deviceName is the device name backupPolicyName is the backup policy name. -// resourceGroupName is the resource group name managerName is the manager name +// deviceName is the device name backupPolicyName is the backup policy name. resourceGroupName is the resource group +// name managerName is the manager name func (client BackupSchedulesClient) ListByBackupPolicy(deviceName string, backupPolicyName string, resourceGroupName string, managerName string) (result BackupScheduleList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/bandwidthsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/bandwidthsettings.go index ca266176f..aa1c2dfaf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/bandwidthsettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/bandwidthsettings.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,27 @@ import ( "net/http" ) -// BandwidthSettingsClient is the client for the BandwidthSettings methods of -// the Storsimple8000series service. +// BandwidthSettingsClient is the client for the BandwidthSettings methods of the Storsimple8000series service. type BandwidthSettingsClient struct { ManagementClient } -// NewBandwidthSettingsClient creates an instance of the -// BandwidthSettingsClient client. +// NewBandwidthSettingsClient creates an instance of the BandwidthSettingsClient client. func NewBandwidthSettingsClient(subscriptionID string) BandwidthSettingsClient { return NewBandwidthSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewBandwidthSettingsClientWithBaseURI creates an instance of the -// BandwidthSettingsClient client. +// NewBandwidthSettingsClientWithBaseURI creates an instance of the BandwidthSettingsClient client. func NewBandwidthSettingsClientWithBaseURI(baseURI string, subscriptionID string) BandwidthSettingsClient { return BandwidthSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the bandwidth setting This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates the bandwidth setting This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// bandwidthSettingName is the bandwidth setting name. parameters is the -// bandwidth setting to be added or updated. resourceGroupName is the resource -// group name managerName is the manager name +// bandwidthSettingName is the bandwidth setting name. parameters is the bandwidth setting to be added or updated. +// resourceGroupName is the resource group name managerName is the manager name func (client BandwidthSettingsClient) CreateOrUpdate(bandwidthSettingName string, parameters BandwidthSetting, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan BandwidthSetting, <-chan error) { resultChan := make(chan BandwidthSetting, 1) errChan := make(chan error, 1) @@ -144,12 +138,11 @@ func (client BandwidthSettingsClient) CreateOrUpdateResponder(resp *http.Respons return } -// Delete deletes the bandwidth setting This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes the bandwidth setting This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// bandwidthSettingName is the name of the bandwidth setting. resourceGroupName -// is the resource group name managerName is the manager name +// bandwidthSettingName is the name of the bandwidth setting. resourceGroupName is the resource group name managerName +// is the manager name func (client BandwidthSettingsClient) Delete(bandwidthSettingName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -239,8 +232,8 @@ func (client BandwidthSettingsClient) DeleteResponder(resp *http.Response) (resu // Get returns the properties of the specified bandwidth setting name. // -// bandwidthSettingName is the name of bandwidth setting to be fetched. -// resourceGroupName is the resource group name managerName is the manager name +// bandwidthSettingName is the name of bandwidth setting to be fetched. resourceGroupName is the resource group name +// managerName is the manager name func (client BandwidthSettingsClient) Get(bandwidthSettingName string, resourceGroupName string, managerName string) (result BandwidthSetting, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/client.go index 5a2d2648a..512248cd8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/client.go @@ -1,5 +1,4 @@ -// Package storsimple8000series implements the Azure ARM Storsimple8000series -// service API version 2017-06-01. +// Package storsimple8000series implements the Azure ARM Storsimple8000series service API version 2017-06-01. // // package storsimple8000series @@ -18,9 +17,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/cloudappliances.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/cloudappliances.go index 8f364a1a1..b48de5ec1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/cloudappliances.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/cloudappliances.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,26 +24,22 @@ import ( "net/http" ) -// CloudAppliancesClient is the client for the CloudAppliances methods of the -// Storsimple8000series service. +// CloudAppliancesClient is the client for the CloudAppliances methods of the Storsimple8000series service. type CloudAppliancesClient struct { ManagementClient } -// NewCloudAppliancesClient creates an instance of the CloudAppliancesClient -// client. +// NewCloudAppliancesClient creates an instance of the CloudAppliancesClient client. func NewCloudAppliancesClient(subscriptionID string) CloudAppliancesClient { return NewCloudAppliancesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCloudAppliancesClientWithBaseURI creates an instance of the -// CloudAppliancesClient client. +// NewCloudAppliancesClientWithBaseURI creates an instance of the CloudAppliancesClient client. func NewCloudAppliancesClientWithBaseURI(baseURI string, subscriptionID string) CloudAppliancesClient { return CloudAppliancesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// ListSupportedConfigurations lists supported cloud appliance models and -// supported configurations. +// ListSupportedConfigurations lists supported cloud appliance models and supported configurations. // // resourceGroupName is the resource group name managerName is the manager name func (client CloudAppliancesClient) ListSupportedConfigurations(resourceGroupName string, managerName string) (result CloudApplianceConfigurationList, err error) { @@ -116,12 +111,10 @@ func (client CloudAppliancesClient) ListSupportedConfigurationsResponder(resp *h return } -// Provision provisions cloud appliance. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Provision provisions cloud appliance. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// parameters is the cloud appliance resourceGroupName is the resource group -// name managerName is the manager name +// parameters is the cloud appliance resourceGroupName is the resource group name managerName is the manager name func (client CloudAppliancesClient) Provision(parameters CloudAppliance, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devices.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devices.go index 1e4d25823..bf732ab2e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devices.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devices.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// DevicesClient is the client for the Devices methods of the -// Storsimple8000series service. +// DevicesClient is the client for the Devices methods of the Storsimple8000series service. type DevicesClient struct { ManagementClient } @@ -41,11 +39,9 @@ func NewDevicesClientWithBaseURI(baseURI string, subscriptionID string) DevicesC return DevicesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// AuthorizeForServiceEncryptionKeyRollover authorizes the specified device for -// service data encryption key rollover. +// AuthorizeForServiceEncryptionKeyRollover authorizes the specified device for service data encryption key rollover. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) AuthorizeForServiceEncryptionKeyRollover(deviceName string, resourceGroupName string, managerName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -115,13 +111,12 @@ func (client DevicesClient) AuthorizeForServiceEncryptionKeyRolloverResponder(re return } -// Configure complete minimal setup before using the device. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Configure complete minimal setup before using the device. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// parameters is the minimal properties to configure a device. -// resourceGroupName is the resource group name managerName is the manager name +// parameters is the minimal properties to configure a device. resourceGroupName is the resource group name managerName +// is the manager name func (client DevicesClient) Configure(parameters ConfigureDeviceRequest, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -216,12 +211,10 @@ func (client DevicesClient) ConfigureResponder(resp *http.Response) (result auto return } -// Deactivate deactivates the device. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Deactivate deactivates the device. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) Deactivate(deviceName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -309,12 +302,10 @@ func (client DevicesClient) DeactivateResponder(resp *http.Response) (result aut return } -// Delete deletes the device. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the device. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) Delete(deviceName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -402,15 +393,13 @@ func (client DevicesClient) DeleteResponder(resp *http.Response) (result autores return } -// Failover failovers a set of volume containers from a specified source device -// to a target device. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to +// Failover failovers a set of volume containers from a specified source device to a target device. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to // cancel polling and any outstanding HTTP requests. // -// sourceDeviceName is the source device name on which failover is performed. -// parameters is failoverRequest containing the source device and the list of -// volume containers to be failed over. resourceGroupName is the resource group -// name managerName is the manager name +// sourceDeviceName is the source device name on which failover is performed. parameters is failoverRequest containing +// the source device and the list of volume containers to be failed over. resourceGroupName is the resource group name +// managerName is the manager name func (client DevicesClient) Failover(sourceDeviceName string, parameters FailoverRequest, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -502,11 +491,9 @@ func (client DevicesClient) FailoverResponder(resp *http.Response) (result autor // Get returns the properties of the specified device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name expand is specify $expand=details to -// populate additional fields related to the device or $expand=rolloverdetails -// to populate additional fields related to the service data encryption key -// rollover on device +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name expand is +// specify $expand=details to populate additional fields related to the device or $expand=rolloverdetails to populate +// additional fields related to the service data encryption key rollover on device func (client DevicesClient) Get(deviceName string, resourceGroupName string, managerName string, expand string) (result Device, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -582,8 +569,7 @@ func (client DevicesClient) GetResponder(resp *http.Response) (result Device, er // GetUpdateSummary returns the update summary of the specified device name. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) GetUpdateSummary(deviceName string, resourceGroupName string, managerName string) (result Updates, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -654,13 +640,11 @@ func (client DevicesClient) GetUpdateSummaryResponder(resp *http.Response) (resu return } -// InstallUpdates downloads and installs the updates on the device. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// InstallUpdates downloads and installs the updates on the device. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) InstallUpdates(deviceName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -750,10 +734,9 @@ func (client DevicesClient) InstallUpdatesResponder(resp *http.Response) (result // ListByManager returns the list of devices for the specified manager. // -// resourceGroupName is the resource group name managerName is the manager name -// expand is specify $expand=details to populate additional fields related to -// the device or $expand=rolloverdetails to populate additional fields related -// to the service data encryption key rollover on device +// resourceGroupName is the resource group name managerName is the manager name expand is specify $expand=details to +// populate additional fields related to the device or $expand=rolloverdetails to populate additional fields related to +// the service data encryption key rollover on device func (client DevicesClient) ListByManager(resourceGroupName string, managerName string, expand string) (result DeviceList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -826,13 +809,11 @@ func (client DevicesClient) ListByManagerResponder(resp *http.Response) (result return } -// ListFailoverSets returns all failover sets for a given device and their -// eligibility for participating in a failover. A failover set refers to a set -// of volume containers that need to be failed-over as a single unit to -// maintain data integrity. +// ListFailoverSets returns all failover sets for a given device and their eligibility for participating in a failover. +// A failover set refers to a set of volume containers that need to be failed-over as a single unit to maintain data +// integrity. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) ListFailoverSets(deviceName string, resourceGroupName string, managerName string) (result FailoverSetsList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -903,14 +884,12 @@ func (client DevicesClient) ListFailoverSetsResponder(resp *http.Response) (resu return } -// ListFailoverTargets given a list of volume containers to be failed over from -// a source device, this method returns the eligibility result, as a failover -// target, for all devices under that resource. +// ListFailoverTargets given a list of volume containers to be failed over from a source device, this method returns +// the eligibility result, as a failover target, for all devices under that resource. // -// sourceDeviceName is the source device name on which failover is performed. -// parameters is listFailoverTargetsRequest containing the list of volume -// containers to be failed over. resourceGroupName is the resource group name -// managerName is the manager name +// sourceDeviceName is the source device name on which failover is performed. parameters is listFailoverTargetsRequest +// containing the list of volume containers to be failed over. resourceGroupName is the resource group name managerName +// is the manager name func (client DevicesClient) ListFailoverTargets(sourceDeviceName string, parameters ListFailoverTargetsRequest, resourceGroupName string, managerName string) (result FailoverTargetsList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -985,8 +964,7 @@ func (client DevicesClient) ListFailoverTargetsResponder(resp *http.Response) (r // ListMetricDefinition gets the metric definitions for the specified device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) ListMetricDefinition(deviceName string, resourceGroupName string, managerName string) (result MetricDefinitionList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -1059,8 +1037,8 @@ func (client DevicesClient) ListMetricDefinitionResponder(resp *http.Response) ( // ListMetrics gets the metrics for the specified device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name filter is oData Filter options +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name filter is +// oData Filter options func (client DevicesClient) ListMetrics(deviceName string, resourceGroupName string, managerName string, filter string) (result MetricList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -1132,13 +1110,10 @@ func (client DevicesClient) ListMetricsResponder(resp *http.Response) (result Me return } -// ScanForUpdates scans for updates on the device. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ScanForUpdates scans for updates on the device. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DevicesClient) ScanForUpdates(deviceName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -1228,9 +1203,8 @@ func (client DevicesClient) ScanForUpdatesResponder(resp *http.Response) (result // Update patches the device. // -// deviceName is the device name parameters is patch representation of the -// device. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name parameters is patch representation of the device. resourceGroupName is the resource +// group name managerName is the manager name func (client DevicesClient) Update(deviceName string, parameters DevicePatch, resourceGroupName string, managerName string) (result Device, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devicesettings.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devicesettings.go index 68bc6b031..ce6e3dcde 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devicesettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/devicesettings.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,27 @@ import ( "net/http" ) -// DeviceSettingsClient is the client for the DeviceSettings methods of the -// Storsimple8000series service. +// DeviceSettingsClient is the client for the DeviceSettings methods of the Storsimple8000series service. type DeviceSettingsClient struct { ManagementClient } -// NewDeviceSettingsClient creates an instance of the DeviceSettingsClient -// client. +// NewDeviceSettingsClient creates an instance of the DeviceSettingsClient client. func NewDeviceSettingsClient(subscriptionID string) DeviceSettingsClient { return NewDeviceSettingsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeviceSettingsClientWithBaseURI creates an instance of the -// DeviceSettingsClient client. +// NewDeviceSettingsClientWithBaseURI creates an instance of the DeviceSettingsClient client. func NewDeviceSettingsClientWithBaseURI(baseURI string, subscriptionID string) DeviceSettingsClient { return DeviceSettingsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdateAlertSettings creates or updates the alert settings of the -// specified device. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// CreateOrUpdateAlertSettings creates or updates the alert settings of the specified device. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// deviceName is the device name parameters is the alert settings to be added -// or updated. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name parameters is the alert settings to be added or updated. resourceGroupName is the +// resource group name managerName is the manager name func (client DeviceSettingsClient) CreateOrUpdateAlertSettings(deviceName string, parameters AlertSettings, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan AlertSettings, <-chan error) { resultChan := make(chan AlertSettings, 1) errChan := make(chan error, 1) @@ -143,14 +137,12 @@ func (client DeviceSettingsClient) CreateOrUpdateAlertSettingsResponder(resp *ht return } -// CreateOrUpdateTimeSettings creates or updates the time settings of the -// specified device. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to -// cancel polling and any outstanding HTTP requests. +// CreateOrUpdateTimeSettings creates or updates the time settings of the specified device. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// deviceName is the device name parameters is the time settings to be added or -// updated. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name parameters is the time settings to be added or updated. resourceGroupName is the +// resource group name managerName is the manager name func (client DeviceSettingsClient) CreateOrUpdateTimeSettings(deviceName string, parameters TimeSettings, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan TimeSettings, <-chan error) { resultChan := make(chan TimeSettings, 1) errChan := make(chan error, 1) @@ -246,8 +238,7 @@ func (client DeviceSettingsClient) CreateOrUpdateTimeSettingsResponder(resp *htt // GetAlertSettings gets the alert settings of the specified device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DeviceSettingsClient) GetAlertSettings(deviceName string, resourceGroupName string, managerName string) (result AlertSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -320,8 +311,7 @@ func (client DeviceSettingsClient) GetAlertSettingsResponder(resp *http.Response // GetNetworkSettings gets the network settings of the specified device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DeviceSettingsClient) GetNetworkSettings(deviceName string, resourceGroupName string, managerName string) (result NetworkSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -392,11 +382,9 @@ func (client DeviceSettingsClient) GetNetworkSettingsResponder(resp *http.Respon return } -// GetSecuritySettings returns the Security properties of the specified device -// name. +// GetSecuritySettings returns the Security properties of the specified device name. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DeviceSettingsClient) GetSecuritySettings(deviceName string, resourceGroupName string, managerName string) (result SecuritySettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -469,8 +457,7 @@ func (client DeviceSettingsClient) GetSecuritySettingsResponder(resp *http.Respo // GetTimeSettings gets the time settings of the specified device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DeviceSettingsClient) GetTimeSettings(deviceName string, resourceGroupName string, managerName string) (result TimeSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -541,13 +528,11 @@ func (client DeviceSettingsClient) GetTimeSettingsResponder(resp *http.Response) return } -// SyncRemotemanagementCertificate sync Remote management Certificate between -// appliance and Service This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to +// SyncRemotemanagementCertificate sync Remote management Certificate between appliance and Service This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to // cancel polling and any outstanding HTTP requests. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client DeviceSettingsClient) SyncRemotemanagementCertificate(deviceName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -635,14 +620,12 @@ func (client DeviceSettingsClient) SyncRemotemanagementCertificateResponder(resp return } -// UpdateNetworkSettings updates the network settings on the specified device. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// UpdateNetworkSettings updates the network settings on the specified device. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// deviceName is the device name parameters is the network settings to be -// updated. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name parameters is the network settings to be updated. resourceGroupName is the resource +// group name managerName is the manager name func (client DeviceSettingsClient) UpdateNetworkSettings(deviceName string, parameters NetworkSettingsPatch, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan NetworkSettings, <-chan error) { resultChan := make(chan NetworkSettings, 1) errChan := make(chan error, 1) @@ -733,14 +716,12 @@ func (client DeviceSettingsClient) UpdateNetworkSettingsResponder(resp *http.Res return } -// UpdateSecuritySettings patch Security properties of the specified device -// name. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel -// polling and any outstanding HTTP requests. +// UpdateSecuritySettings patch Security properties of the specified device name. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// deviceName is the device name parameters is the security settings properties -// to be patched. resourceGroupName is the resource group name managerName is -// the manager name +// deviceName is the device name parameters is the security settings properties to be patched. resourceGroupName is the +// resource group name managerName is the manager name func (client DeviceSettingsClient) UpdateSecuritySettings(deviceName string, parameters SecuritySettingsPatch, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan SecuritySettings, <-chan error) { resultChan := make(chan SecuritySettings, 1) errChan := make(chan error, 1) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/hardwarecomponentgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/hardwarecomponentgroups.go index bce206034..08365d552 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/hardwarecomponentgroups.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/hardwarecomponentgroups.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,28 @@ import ( "net/http" ) -// HardwareComponentGroupsClient is the client for the HardwareComponentGroups -// methods of the Storsimple8000series service. +// HardwareComponentGroupsClient is the client for the HardwareComponentGroups methods of the Storsimple8000series +// service. type HardwareComponentGroupsClient struct { ManagementClient } -// NewHardwareComponentGroupsClient creates an instance of the -// HardwareComponentGroupsClient client. +// NewHardwareComponentGroupsClient creates an instance of the HardwareComponentGroupsClient client. func NewHardwareComponentGroupsClient(subscriptionID string) HardwareComponentGroupsClient { return NewHardwareComponentGroupsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewHardwareComponentGroupsClientWithBaseURI creates an instance of the -// HardwareComponentGroupsClient client. +// NewHardwareComponentGroupsClientWithBaseURI creates an instance of the HardwareComponentGroupsClient client. func NewHardwareComponentGroupsClientWithBaseURI(baseURI string, subscriptionID string) HardwareComponentGroupsClient { return HardwareComponentGroupsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// ChangeControllerPowerState changes the power state of the controller. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ChangeControllerPowerState changes the power state of the controller. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// deviceName is the device name hardwareComponentGroupName is the hardware -// component group name. parameters is the controller power state change -// request. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name hardwareComponentGroupName is the hardware component group name. parameters is the +// controller power state change request. resourceGroupName is the resource group name managerName is the manager name func (client HardwareComponentGroupsClient) ChangeControllerPowerState(deviceName string, hardwareComponentGroupName string, parameters ControllerPowerStateChangeRequest, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -146,8 +140,7 @@ func (client HardwareComponentGroupsClient) ChangeControllerPowerStateResponder( // ListByDevice lists the hardware component groups at device-level. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client HardwareComponentGroupsClient) ListByDevice(deviceName string, resourceGroupName string, managerName string) (result HardwareComponentGroupList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/jobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/jobs.go index 5ab8a346b..1e97743dd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/jobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/jobs.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// JobsClient is the client for the Jobs methods of the Storsimple8000series -// service. +// JobsClient is the client for the Jobs methods of the Storsimple8000series service. type JobsClient struct { ManagementClient } @@ -41,12 +39,11 @@ func NewJobsClientWithBaseURI(baseURI string, subscriptionID string) JobsClient return JobsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// Cancel cancels a job on the device. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Cancel cancels a job on the device. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name jobName is the jobName. resourceGroupName is -// the resource group name managerName is the manager name +// deviceName is the device name jobName is the jobName. resourceGroupName is the resource group name managerName is +// the manager name func (client JobsClient) Cancel(deviceName string, jobName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -137,8 +134,8 @@ func (client JobsClient) CancelResponder(resp *http.Response) (result autorest.R // Get gets the details of the specified job name. // -// deviceName is the device name jobName is the job Name. resourceGroupName is -// the resource group name managerName is the manager name +// deviceName is the device name jobName is the job Name. resourceGroupName is the resource group name managerName is +// the manager name func (client JobsClient) Get(deviceName string, jobName string, resourceGroupName string, managerName string) (result Job, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -210,11 +207,11 @@ func (client JobsClient) GetResponder(resp *http.Response) (result Job, err erro return } -// ListByDevice gets all the jobs for specified device. With optional OData -// query parameters, a filtered set of jobs is returned. +// ListByDevice gets all the jobs for specified device. With optional OData query parameters, a filtered set of jobs is +// returned. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name filter is oData Filter options +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name filter is +// oData Filter options func (client JobsClient) ListByDevice(deviceName string, resourceGroupName string, managerName string, filter string) (result JobList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -357,11 +354,10 @@ func (client JobsClient) ListByDeviceComplete(deviceName string, resourceGroupNa return resultChan, errChan } -// ListByManager gets all the jobs for the specified manager. With optional -// OData query parameters, a filtered set of jobs is returned. +// ListByManager gets all the jobs for the specified manager. With optional OData query parameters, a filtered set of +// jobs is returned. // -// resourceGroupName is the resource group name managerName is the manager name -// filter is oData Filter options +// resourceGroupName is the resource group name managerName is the manager name filter is oData Filter options func (client JobsClient) ListByManager(resourceGroupName string, managerName string, filter string) (result JobList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/managers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/managers.go index 825668e47..9ec3bbc16 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/managers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/managers.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// ManagersClient is the client for the Managers methods of the -// Storsimple8000series service. +// ManagersClient is the client for the Managers methods of the Storsimple8000series service. type ManagersClient struct { ManagementClient } @@ -36,16 +34,15 @@ func NewManagersClient(subscriptionID string) ManagersClient { return NewManagersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewManagersClientWithBaseURI creates an instance of the ManagersClient -// client. +// NewManagersClientWithBaseURI creates an instance of the ManagersClient client. func NewManagersClientWithBaseURI(baseURI string, subscriptionID string) ManagersClient { return ManagersClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateExtendedInfo creates the extended info of the manager. // -// parameters is the manager extended information. resourceGroupName is the -// resource group name managerName is the manager name +// parameters is the manager extended information. resourceGroupName is the resource group name managerName is the +// manager name func (client ManagersClient) CreateExtendedInfo(parameters ManagerExtendedInfo, resourceGroupName string, managerName string) (result ManagerExtendedInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -124,8 +121,7 @@ func (client ManagersClient) CreateExtendedInfoResponder(resp *http.Response) (r // CreateOrUpdate creates or updates the manager. // -// parameters is the manager. resourceGroupName is the resource group name -// managerName is the manager name +// parameters is the manager. resourceGroupName is the resource group name managerName is the manager name func (client ManagersClient) CreateOrUpdate(parameters Manager, resourceGroupName string, managerName string) (result Manager, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -488,11 +484,9 @@ func (client ManagersClient) GetActivationKeyResponder(resp *http.Response) (res return } -// GetDevicePublicEncryptionKey returns the public encryption key of the -// device. +// GetDevicePublicEncryptionKey returns the public encryption key of the device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client ManagersClient) GetDevicePublicEncryptionKey(deviceName string, resourceGroupName string, managerName string) (result PublicKey, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -635,8 +629,7 @@ func (client ManagersClient) GetEncryptionSettingsResponder(resp *http.Response) return } -// GetExtendedInfo returns the extended information of the specified manager -// name. +// GetExtendedInfo returns the extended information of the specified manager name. // // resourceGroupName is the resource group name managerName is the manager name func (client ManagersClient) GetExtendedInfo(resourceGroupName string, managerName string) (result ManagerExtendedInfo, err error) { @@ -708,8 +701,7 @@ func (client ManagersClient) GetExtendedInfoResponder(resp *http.Response) (resu return } -// GetPublicEncryptionKey returns the symmetric encrypted public encryption key -// of the manager. +// GetPublicEncryptionKey returns the symmetric encrypted public encryption key of the manager. // // resourceGroupName is the resource group name managerName is the manager name func (client ManagersClient) GetPublicEncryptionKey(resourceGroupName string, managerName string) (result SymmetricEncryptedSecret, err error) { @@ -908,8 +900,7 @@ func (client ManagersClient) ListByResourceGroupResponder(resp *http.Response) ( // ListFeatureSupportStatus lists the features and their support status // -// resourceGroupName is the resource group name managerName is the manager name -// filter is oData Filter options +// resourceGroupName is the resource group name managerName is the manager name filter is oData Filter options func (client ManagersClient) ListFeatureSupportStatus(resourceGroupName string, managerName string, filter string) (result FeatureList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -1056,8 +1047,7 @@ func (client ManagersClient) ListMetricDefinitionResponder(resp *http.Response) // ListMetrics gets the metrics for the specified manager. // -// resourceGroupName is the resource group name managerName is the manager name -// filter is oData Filter options +// resourceGroupName is the resource group name managerName is the manager name filter is oData Filter options func (client ManagersClient) ListMetrics(resourceGroupName string, managerName string, filter string) (result MetricList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -1128,8 +1118,7 @@ func (client ManagersClient) ListMetricsResponder(resp *http.Response) (result M return } -// RegenerateActivationKey re-generates and returns the activation key of the -// manager. +// RegenerateActivationKey re-generates and returns the activation key of the manager. // // resourceGroupName is the resource group name managerName is the manager name func (client ManagersClient) RegenerateActivationKey(resourceGroupName string, managerName string) (result Key, err error) { @@ -1203,8 +1192,8 @@ func (client ManagersClient) RegenerateActivationKeyResponder(resp *http.Respons // Update updates the StorSimple Manager. // -// parameters is the manager update parameters. resourceGroupName is the -// resource group name managerName is the manager name +// parameters is the manager update parameters. resourceGroupName is the resource group name managerName is the manager +// name func (client ManagersClient) Update(parameters ManagerPatch, resourceGroupName string, managerName string) (result Manager, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -1278,9 +1267,8 @@ func (client ManagersClient) UpdateResponder(resp *http.Response) (result Manage // UpdateExtendedInfo updates the extended info of the manager. // -// parameters is the manager extended information. resourceGroupName is the -// resource group name managerName is the manager name ifMatch is pass the ETag -// of ExtendedInfo fetched from GET call +// parameters is the manager extended information. resourceGroupName is the resource group name managerName is the +// manager name ifMatch is pass the ETag of ExtendedInfo fetched from GET call func (client ManagersClient) UpdateExtendedInfo(parameters ManagerExtendedInfo, resourceGroupName string, managerName string, ifMatch string) (result ManagerExtendedInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/models.go index 98caf1bb4..57c11e21f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/models.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,13 +24,11 @@ import ( "net/http" ) -// AlertEmailNotificationStatus enumerates the values for alert email -// notification status. +// AlertEmailNotificationStatus enumerates the values for alert email notification status. type AlertEmailNotificationStatus string const ( - // Disabled specifies the disabled state for alert email notification - // status. + // Disabled specifies the disabled state for alert email notification status. Disabled AlertEmailNotificationStatus = "Disabled" // Enabled specifies the enabled state for alert email notification status. Enabled AlertEmailNotificationStatus = "Enabled" @@ -43,8 +40,7 @@ type AlertScope string const ( // AlertScopeDevice specifies the alert scope device state for alert scope. AlertScopeDevice AlertScope = "Device" - // AlertScopeResource specifies the alert scope resource state for alert - // scope. + // AlertScopeResource specifies the alert scope resource state for alert scope. AlertScopeResource AlertScope = "Resource" ) @@ -64,11 +60,9 @@ const ( type AlertSourceType string const ( - // AlertSourceTypeDevice specifies the alert source type device state for - // alert source type. + // AlertSourceTypeDevice specifies the alert source type device state for alert source type. AlertSourceTypeDevice AlertSourceType = "Device" - // AlertSourceTypeResource specifies the alert source type resource state - // for alert source type. + // AlertSourceTypeResource specifies the alert source type resource state for alert source type. AlertSourceTypeResource AlertSourceType = "Resource" ) @@ -96,15 +90,13 @@ const ( NTLM AuthenticationType = "NTLM" ) -// AuthorizationEligibility enumerates the values for authorization -// eligibility. +// AuthorizationEligibility enumerates the values for authorization eligibility. type AuthorizationEligibility string const ( // Eligible specifies the eligible state for authorization eligibility. Eligible AuthorizationEligibility = "Eligible" - // InEligible specifies the in eligible state for authorization - // eligibility. + // InEligible specifies the in eligible state for authorization eligibility. InEligible AuthorizationEligibility = "InEligible" ) @@ -112,11 +104,9 @@ const ( type AuthorizationStatus string const ( - // AuthorizationStatusDisabled specifies the authorization status disabled - // state for authorization status. + // AuthorizationStatusDisabled specifies the authorization status disabled state for authorization status. AuthorizationStatusDisabled AuthorizationStatus = "Disabled" - // AuthorizationStatusEnabled specifies the authorization status enabled - // state for authorization status. + // AuthorizationStatusEnabled specifies the authorization status enabled state for authorization status. AuthorizationStatusEnabled AuthorizationStatus = "Enabled" ) @@ -132,16 +122,15 @@ const ( BySSM BackupJobCreationType = "BySSM" ) -// BackupPolicyCreationType enumerates the values for backup policy creation -// type. +// BackupPolicyCreationType enumerates the values for backup policy creation type. type BackupPolicyCreationType string const ( - // BackupPolicyCreationTypeBySaaS specifies the backup policy creation type - // by saa s state for backup policy creation type. + // BackupPolicyCreationTypeBySaaS specifies the backup policy creation type by saa s state for backup policy creation + // type. BackupPolicyCreationTypeBySaaS BackupPolicyCreationType = "BySaaS" - // BackupPolicyCreationTypeBySSM specifies the backup policy creation type - // by ssm state for backup policy creation type. + // BackupPolicyCreationTypeBySSM specifies the backup policy creation type by ssm state for backup policy creation + // type. BackupPolicyCreationTypeBySSM BackupPolicyCreationType = "BySSM" ) @@ -149,11 +138,9 @@ const ( type BackupStatus string const ( - // BackupStatusDisabled specifies the backup status disabled state for - // backup status. + // BackupStatusDisabled specifies the backup status disabled state for backup status. BackupStatusDisabled BackupStatus = "Disabled" - // BackupStatusEnabled specifies the backup status enabled state for backup - // status. + // BackupStatusEnabled specifies the backup status enabled state for backup status. BackupStatusEnabled BackupStatus = "Enabled" ) @@ -171,22 +158,17 @@ const ( type ControllerID string const ( - // ControllerIDController0 specifies the controller id controller 0 state - // for controller id. + // ControllerIDController0 specifies the controller id controller 0 state for controller id. ControllerIDController0 ControllerID = "Controller0" - // ControllerIDController1 specifies the controller id controller 1 state - // for controller id. + // ControllerIDController1 specifies the controller id controller 1 state for controller id. ControllerIDController1 ControllerID = "Controller1" - // ControllerIDNone specifies the controller id none state for controller - // id. + // ControllerIDNone specifies the controller id none state for controller id. ControllerIDNone ControllerID = "None" - // ControllerIDUnknown specifies the controller id unknown state for - // controller id. + // ControllerIDUnknown specifies the controller id unknown state for controller id. ControllerIDUnknown ControllerID = "Unknown" ) -// ControllerPowerStateAction enumerates the values for controller power state -// action. +// ControllerPowerStateAction enumerates the values for controller power state action. type ControllerPowerStateAction string const ( @@ -202,23 +184,17 @@ const ( type ControllerStatus string const ( - // ControllerStatusFailure specifies the controller status failure state - // for controller status. + // ControllerStatusFailure specifies the controller status failure state for controller status. ControllerStatusFailure ControllerStatus = "Failure" - // ControllerStatusNotPresent specifies the controller status not present - // state for controller status. + // ControllerStatusNotPresent specifies the controller status not present state for controller status. ControllerStatusNotPresent ControllerStatus = "NotPresent" - // ControllerStatusOk specifies the controller status ok state for - // controller status. + // ControllerStatusOk specifies the controller status ok state for controller status. ControllerStatusOk ControllerStatus = "Ok" - // ControllerStatusPoweredOff specifies the controller status powered off - // state for controller status. + // ControllerStatusPoweredOff specifies the controller status powered off state for controller status. ControllerStatusPoweredOff ControllerStatus = "PoweredOff" - // ControllerStatusRecovering specifies the controller status recovering - // state for controller status. + // ControllerStatusRecovering specifies the controller status recovering state for controller status. ControllerStatusRecovering ControllerStatus = "Recovering" - // ControllerStatusWarning specifies the controller status warning state - // for controller status. + // ControllerStatusWarning specifies the controller status warning state for controller status. ControllerStatusWarning ControllerStatus = "Warning" ) @@ -242,8 +218,7 @@ const ( Wednesday DayOfWeek = "Wednesday" ) -// DeviceConfigurationStatus enumerates the values for device configuration -// status. +// DeviceConfigurationStatus enumerates the values for device configuration status. type DeviceConfigurationStatus string const ( @@ -275,8 +250,7 @@ const ( Provisioning DeviceStatus = "Provisioning" // ReadyToSetup specifies the ready to setup state for device status. ReadyToSetup DeviceStatus = "ReadyToSetup" - // RequiresAttention specifies the requires attention state for device - // status. + // RequiresAttention specifies the requires attention state for device status. RequiresAttention DeviceStatus = "RequiresAttention" // Unknown specifies the unknown state for device status. Unknown DeviceStatus = "Unknown" @@ -286,14 +260,12 @@ const ( type DeviceType string const ( - // DeviceTypeInvalid specifies the device type invalid state for device - // type. + // DeviceTypeInvalid specifies the device type invalid state for device type. DeviceTypeInvalid DeviceType = "Invalid" - // DeviceTypeSeries8000PhysicalAppliance specifies the device type series - // 8000 physical appliance state for device type. + // DeviceTypeSeries8000PhysicalAppliance specifies the device type series 8000 physical appliance state for device + // type. DeviceTypeSeries8000PhysicalAppliance DeviceType = "Series8000PhysicalAppliance" - // DeviceTypeSeries8000VirtualAppliance specifies the device type series - // 8000 virtual appliance state for device type. + // DeviceTypeSeries8000VirtualAppliance specifies the device type series 8000 virtual appliance state for device type. DeviceTypeSeries8000VirtualAppliance DeviceType = "Series8000VirtualAppliance" ) @@ -301,14 +273,11 @@ const ( type EncryptionAlgorithm string const ( - // EncryptionAlgorithmAES256 specifies the encryption algorithm aes256 - // state for encryption algorithm. + // EncryptionAlgorithmAES256 specifies the encryption algorithm aes256 state for encryption algorithm. EncryptionAlgorithmAES256 EncryptionAlgorithm = "AES256" - // EncryptionAlgorithmNone specifies the encryption algorithm none state - // for encryption algorithm. + // EncryptionAlgorithmNone specifies the encryption algorithm none state for encryption algorithm. EncryptionAlgorithmNone EncryptionAlgorithm = "None" - // EncryptionAlgorithmRSAESPKCS1V15 specifies the encryption algorithm - // rsaespkcs1v15 state for encryption algorithm. + // EncryptionAlgorithmRSAESPKCS1V15 specifies the encryption algorithm rsaespkcs1v15 state for encryption algorithm. EncryptionAlgorithmRSAESPKCS1V15 EncryptionAlgorithm = "RSAES_PKCS1_v_1_5" ) @@ -316,11 +285,9 @@ const ( type EncryptionStatus string const ( - // EncryptionStatusDisabled specifies the encryption status disabled state - // for encryption status. + // EncryptionStatusDisabled specifies the encryption status disabled state for encryption status. EncryptionStatusDisabled EncryptionStatus = "Disabled" - // EncryptionStatusEnabled specifies the encryption status enabled state - // for encryption status. + // EncryptionStatusEnabled specifies the encryption status enabled state for encryption status. EncryptionStatusEnabled EncryptionStatus = "Enabled" ) @@ -328,13 +295,11 @@ const ( type FeatureSupportStatus string const ( - // NotAvailable specifies the not available state for feature support - // status. + // NotAvailable specifies the not available state for feature support status. NotAvailable FeatureSupportStatus = "NotAvailable" // Supported specifies the supported state for feature support status. Supported FeatureSupportStatus = "Supported" - // UnsupportedDeviceVersion specifies the unsupported device version state - // for feature support status. + // UnsupportedDeviceVersion specifies the unsupported device version state for feature support status. UnsupportedDeviceVersion FeatureSupportStatus = "UnsupportedDeviceVersion" ) @@ -342,26 +307,22 @@ const ( type HardwareComponentStatus string const ( - // HardwareComponentStatusFailure specifies the hardware component status - // failure state for hardware component status. + // HardwareComponentStatusFailure specifies the hardware component status failure state for hardware component status. HardwareComponentStatusFailure HardwareComponentStatus = "Failure" - // HardwareComponentStatusNotPresent specifies the hardware component - // status not present state for hardware component status. + // HardwareComponentStatusNotPresent specifies the hardware component status not present state for hardware component + // status. HardwareComponentStatusNotPresent HardwareComponentStatus = "NotPresent" - // HardwareComponentStatusOk specifies the hardware component status ok - // state for hardware component status. + // HardwareComponentStatusOk specifies the hardware component status ok state for hardware component status. HardwareComponentStatusOk HardwareComponentStatus = "Ok" - // HardwareComponentStatusPoweredOff specifies the hardware component - // status powered off state for hardware component status. + // HardwareComponentStatusPoweredOff specifies the hardware component status powered off state for hardware component + // status. HardwareComponentStatusPoweredOff HardwareComponentStatus = "PoweredOff" - // HardwareComponentStatusRecovering specifies the hardware component - // status recovering state for hardware component status. + // HardwareComponentStatusRecovering specifies the hardware component status recovering state for hardware component + // status. HardwareComponentStatusRecovering HardwareComponentStatus = "Recovering" - // HardwareComponentStatusUnknown specifies the hardware component status - // unknown state for hardware component status. + // HardwareComponentStatusUnknown specifies the hardware component status unknown state for hardware component status. HardwareComponentStatusUnknown HardwareComponentStatus = "Unknown" - // HardwareComponentStatusWarning specifies the hardware component status - // warning state for hardware component status. + // HardwareComponentStatusWarning specifies the hardware component status warning state for hardware component status. HardwareComponentStatusWarning HardwareComponentStatus = "Warning" ) @@ -369,14 +330,11 @@ const ( type InEligibilityCategory string const ( - // DeviceNotOnline specifies the device not online state for in eligibility - // category. + // DeviceNotOnline specifies the device not online state for in eligibility category. DeviceNotOnline InEligibilityCategory = "DeviceNotOnline" - // NotSupportedAppliance specifies the not supported appliance state for in - // eligibility category. + // NotSupportedAppliance specifies the not supported appliance state for in eligibility category. NotSupportedAppliance InEligibilityCategory = "NotSupportedAppliance" - // RolloverPending specifies the rollover pending state for in eligibility - // category. + // RolloverPending specifies the rollover pending state for in eligibility category. RolloverPending InEligibilityCategory = "RolloverPending" ) @@ -384,17 +342,14 @@ const ( type ISCSIAndCloudStatus string const ( - // ISCSIAndCloudStatusCloudEnabled specifies the iscsi and cloud status - // cloud enabled state for iscsi and cloud status. + // ISCSIAndCloudStatusCloudEnabled specifies the iscsi and cloud status cloud enabled state for iscsi and cloud status. ISCSIAndCloudStatusCloudEnabled ISCSIAndCloudStatus = "CloudEnabled" - // ISCSIAndCloudStatusDisabled specifies the iscsi and cloud status - // disabled state for iscsi and cloud status. + // ISCSIAndCloudStatusDisabled specifies the iscsi and cloud status disabled state for iscsi and cloud status. ISCSIAndCloudStatusDisabled ISCSIAndCloudStatus = "Disabled" - // ISCSIAndCloudStatusIscsiAndCloudEnabled specifies the iscsi and cloud - // status iscsi and cloud enabled state for iscsi and cloud status. + // ISCSIAndCloudStatusIscsiAndCloudEnabled specifies the iscsi and cloud status iscsi and cloud enabled state for iscsi + // and cloud status. ISCSIAndCloudStatusIscsiAndCloudEnabled ISCSIAndCloudStatus = "IscsiAndCloudEnabled" - // ISCSIAndCloudStatusIscsiEnabled specifies the iscsi and cloud status - // iscsi enabled state for iscsi and cloud status. + // ISCSIAndCloudStatusIscsiEnabled specifies the iscsi and cloud status iscsi enabled state for iscsi and cloud status. ISCSIAndCloudStatusIscsiEnabled ISCSIAndCloudStatus = "IscsiEnabled" ) @@ -418,14 +373,11 @@ type JobType string const ( // CloneVolume specifies the clone volume state for job type. CloneVolume JobType = "CloneVolume" - // CreateCloudAppliance specifies the create cloud appliance state for job - // type. + // CreateCloudAppliance specifies the create cloud appliance state for job type. CreateCloudAppliance JobType = "CreateCloudAppliance" - // CreateLocallyPinnedVolume specifies the create locally pinned volume - // state for job type. + // CreateLocallyPinnedVolume specifies the create locally pinned volume state for job type. CreateLocallyPinnedVolume JobType = "CreateLocallyPinnedVolume" - // FailoverVolumeContainers specifies the failover volume containers state - // for job type. + // FailoverVolumeContainers specifies the failover volume containers state for job type. FailoverVolumeContainers JobType = "FailoverVolumeContainers" // InstallUpdates specifies the install updates state for job type. InstallUpdates JobType = "InstallUpdates" @@ -437,8 +389,7 @@ const ( RestoreBackup JobType = "RestoreBackup" // ScheduledBackup specifies the scheduled backup state for job type. ScheduledBackup JobType = "ScheduledBackup" - // SupportPackageLogs specifies the support package logs state for job - // type. + // SupportPackageLogs specifies the support package logs state for job type. SupportPackageLogs JobType = "SupportPackageLogs" ) @@ -474,23 +425,17 @@ const ( type MetricAggregationType string const ( - // MetricAggregationTypeAverage specifies the metric aggregation type - // average state for metric aggregation type. + // MetricAggregationTypeAverage specifies the metric aggregation type average state for metric aggregation type. MetricAggregationTypeAverage MetricAggregationType = "Average" - // MetricAggregationTypeLast specifies the metric aggregation type last - // state for metric aggregation type. + // MetricAggregationTypeLast specifies the metric aggregation type last state for metric aggregation type. MetricAggregationTypeLast MetricAggregationType = "Last" - // MetricAggregationTypeMaximum specifies the metric aggregation type - // maximum state for metric aggregation type. + // MetricAggregationTypeMaximum specifies the metric aggregation type maximum state for metric aggregation type. MetricAggregationTypeMaximum MetricAggregationType = "Maximum" - // MetricAggregationTypeMinimum specifies the metric aggregation type - // minimum state for metric aggregation type. + // MetricAggregationTypeMinimum specifies the metric aggregation type minimum state for metric aggregation type. MetricAggregationTypeMinimum MetricAggregationType = "Minimum" - // MetricAggregationTypeNone specifies the metric aggregation type none - // state for metric aggregation type. + // MetricAggregationTypeNone specifies the metric aggregation type none state for metric aggregation type. MetricAggregationTypeNone MetricAggregationType = "None" - // MetricAggregationTypeTotal specifies the metric aggregation type total - // state for metric aggregation type. + // MetricAggregationTypeTotal specifies the metric aggregation type total state for metric aggregation type. MetricAggregationTypeTotal MetricAggregationType = "Total" ) @@ -516,11 +461,9 @@ const ( type MonitoringStatus string const ( - // MonitoringStatusDisabled specifies the monitoring status disabled state - // for monitoring status. + // MonitoringStatusDisabled specifies the monitoring status disabled state for monitoring status. MonitoringStatusDisabled MonitoringStatus = "Disabled" - // MonitoringStatusEnabled specifies the monitoring status enabled state - // for monitoring status. + // MonitoringStatusEnabled specifies the monitoring status enabled state for monitoring status. MonitoringStatusEnabled MonitoringStatus = "Enabled" ) @@ -528,26 +471,19 @@ const ( type NetInterfaceID string const ( - // NetInterfaceIDData0 specifies the net interface id data 0 state for net - // interface id. + // NetInterfaceIDData0 specifies the net interface id data 0 state for net interface id. NetInterfaceIDData0 NetInterfaceID = "Data0" - // NetInterfaceIDData1 specifies the net interface id data 1 state for net - // interface id. + // NetInterfaceIDData1 specifies the net interface id data 1 state for net interface id. NetInterfaceIDData1 NetInterfaceID = "Data1" - // NetInterfaceIDData2 specifies the net interface id data 2 state for net - // interface id. + // NetInterfaceIDData2 specifies the net interface id data 2 state for net interface id. NetInterfaceIDData2 NetInterfaceID = "Data2" - // NetInterfaceIDData3 specifies the net interface id data 3 state for net - // interface id. + // NetInterfaceIDData3 specifies the net interface id data 3 state for net interface id. NetInterfaceIDData3 NetInterfaceID = "Data3" - // NetInterfaceIDData4 specifies the net interface id data 4 state for net - // interface id. + // NetInterfaceIDData4 specifies the net interface id data 4 state for net interface id. NetInterfaceIDData4 NetInterfaceID = "Data4" - // NetInterfaceIDData5 specifies the net interface id data 5 state for net - // interface id. + // NetInterfaceIDData5 specifies the net interface id data 5 state for net interface id. NetInterfaceIDData5 NetInterfaceID = "Data5" - // NetInterfaceIDInvalid specifies the net interface id invalid state for - // net interface id. + // NetInterfaceIDInvalid specifies the net interface id invalid state for net interface id. NetInterfaceIDInvalid NetInterfaceID = "Invalid" ) @@ -555,11 +491,9 @@ const ( type NetInterfaceStatus string const ( - // NetInterfaceStatusDisabled specifies the net interface status disabled - // state for net interface status. + // NetInterfaceStatusDisabled specifies the net interface status disabled state for net interface status. NetInterfaceStatusDisabled NetInterfaceStatus = "Disabled" - // NetInterfaceStatusEnabled specifies the net interface status enabled - // state for net interface status. + // NetInterfaceStatusEnabled specifies the net interface status enabled state for net interface status. NetInterfaceStatusEnabled NetInterfaceStatus = "Enabled" ) @@ -569,8 +503,7 @@ type NetworkMode string const ( // NetworkModeBOTH specifies the network mode both state for network mode. NetworkModeBOTH NetworkMode = "BOTH" - // NetworkModeInvalid specifies the network mode invalid state for network - // mode. + // NetworkModeInvalid specifies the network mode invalid state for network mode. NetworkModeInvalid NetworkMode = "Invalid" // NetworkModeIPV4 specifies the network mode ipv4 state for network mode. NetworkModeIPV4 NetworkMode = "IPV4" @@ -582,17 +515,13 @@ const ( type OperationStatus string const ( - // OperationStatusDeleting specifies the operation status deleting state - // for operation status. + // OperationStatusDeleting specifies the operation status deleting state for operation status. OperationStatusDeleting OperationStatus = "Deleting" - // OperationStatusNone specifies the operation status none state for - // operation status. + // OperationStatusNone specifies the operation status none state for operation status. OperationStatusNone OperationStatus = "None" - // OperationStatusRestoring specifies the operation status restoring state - // for operation status. + // OperationStatusRestoring specifies the operation status restoring state for operation status. OperationStatusRestoring OperationStatus = "Restoring" - // OperationStatusUpdating specifies the operation status updating state - // for operation status. + // OperationStatusUpdating specifies the operation status updating state for operation status. OperationStatusUpdating OperationStatus = "Updating" ) @@ -620,26 +549,21 @@ const ( Weekly RecurrenceType = "Weekly" ) -// RemoteManagementModeConfiguration enumerates the values for remote -// management mode configuration. +// RemoteManagementModeConfiguration enumerates the values for remote management mode configuration. type RemoteManagementModeConfiguration string const ( - // RemoteManagementModeConfigurationDisabled specifies the remote - // management mode configuration disabled state for remote management mode - // configuration. - RemoteManagementModeConfigurationDisabled RemoteManagementModeConfiguration = "Disabled" - // RemoteManagementModeConfigurationHTTPSAndHTTPEnabled specifies the - // remote management mode configuration https and http enabled state for + // RemoteManagementModeConfigurationDisabled specifies the remote management mode configuration disabled state for // remote management mode configuration. + RemoteManagementModeConfigurationDisabled RemoteManagementModeConfiguration = "Disabled" + // RemoteManagementModeConfigurationHTTPSAndHTTPEnabled specifies the remote management mode configuration https and + // http enabled state for remote management mode configuration. RemoteManagementModeConfigurationHTTPSAndHTTPEnabled RemoteManagementModeConfiguration = "HttpsAndHttpEnabled" - // RemoteManagementModeConfigurationHTTPSEnabled specifies the remote - // management mode configuration https enabled state for remote management - // mode configuration. + // RemoteManagementModeConfigurationHTTPSEnabled specifies the remote management mode configuration https enabled state + // for remote management mode configuration. RemoteManagementModeConfigurationHTTPSEnabled RemoteManagementModeConfiguration = "HttpsEnabled" - // RemoteManagementModeConfigurationUnknown specifies the remote management - // mode configuration unknown state for remote management mode - // configuration. + // RemoteManagementModeConfigurationUnknown specifies the remote management mode configuration unknown state for remote + // management mode configuration. RemoteManagementModeConfigurationUnknown RemoteManagementModeConfiguration = "Unknown" ) @@ -647,11 +571,9 @@ const ( type ScheduledBackupStatus string const ( - // ScheduledBackupStatusDisabled specifies the scheduled backup status - // disabled state for scheduled backup status. + // ScheduledBackupStatusDisabled specifies the scheduled backup status disabled state for scheduled backup status. ScheduledBackupStatusDisabled ScheduledBackupStatus = "Disabled" - // ScheduledBackupStatusEnabled specifies the scheduled backup status - // enabled state for scheduled backup status. + // ScheduledBackupStatusEnabled specifies the scheduled backup status enabled state for scheduled backup status. ScheduledBackupStatusEnabled ScheduledBackupStatus = "Enabled" ) @@ -659,11 +581,9 @@ const ( type ScheduleStatus string const ( - // ScheduleStatusDisabled specifies the schedule status disabled state for - // schedule status. + // ScheduleStatusDisabled specifies the schedule status disabled state for schedule status. ScheduleStatusDisabled ScheduleStatus = "Disabled" - // ScheduleStatusEnabled specifies the schedule status enabled state for - // schedule status. + // ScheduleStatusEnabled specifies the schedule status enabled state for schedule status. ScheduleStatusEnabled ScheduleStatus = "Enabled" ) @@ -671,40 +591,35 @@ const ( type SslStatus string const ( - // SslStatusDisabled specifies the ssl status disabled state for ssl - // status. + // SslStatusDisabled specifies the ssl status disabled state for ssl status. SslStatusDisabled SslStatus = "Disabled" // SslStatusEnabled specifies the ssl status enabled state for ssl status. SslStatusEnabled SslStatus = "Enabled" ) -// TargetEligibilityResultCode enumerates the values for target eligibility -// result code. +// TargetEligibilityResultCode enumerates the values for target eligibility result code. type TargetEligibilityResultCode string const ( - // LocalToTieredVolumesConversionWarning specifies the local to tiered - // volumes conversion warning state for target eligibility result code. + // LocalToTieredVolumesConversionWarning specifies the local to tiered volumes conversion warning state for target + // eligibility result code. LocalToTieredVolumesConversionWarning TargetEligibilityResultCode = "LocalToTieredVolumesConversionWarning" - // TargetAndSourceCannotBeSameError specifies the target and source cannot - // be same error state for target eligibility result code. + // TargetAndSourceCannotBeSameError specifies the target and source cannot be same error state for target eligibility + // result code. TargetAndSourceCannotBeSameError TargetEligibilityResultCode = "TargetAndSourceCannotBeSameError" - // TargetInsufficientCapacityError specifies the target insufficient - // capacity error state for target eligibility result code. + // TargetInsufficientCapacityError specifies the target insufficient capacity error state for target eligibility result + // code. TargetInsufficientCapacityError TargetEligibilityResultCode = "TargetInsufficientCapacityError" - // TargetInsufficientLocalVolumeMemoryError specifies the target - // insufficient local volume memory error state for target eligibility - // result code. + // TargetInsufficientLocalVolumeMemoryError specifies the target insufficient local volume memory error state for + // target eligibility result code. TargetInsufficientLocalVolumeMemoryError TargetEligibilityResultCode = "TargetInsufficientLocalVolumeMemoryError" - // TargetInsufficientTieredVolumeMemoryError specifies the target - // insufficient tiered volume memory error state for target eligibility - // result code. + // TargetInsufficientTieredVolumeMemoryError specifies the target insufficient tiered volume memory error state for + // target eligibility result code. TargetInsufficientTieredVolumeMemoryError TargetEligibilityResultCode = "TargetInsufficientTieredVolumeMemoryError" - // TargetIsNotOnlineError specifies the target is not online error state - // for target eligibility result code. + // TargetIsNotOnlineError specifies the target is not online error state for target eligibility result code. TargetIsNotOnlineError TargetEligibilityResultCode = "TargetIsNotOnlineError" - // TargetSourceIncompatibleVersionError specifies the target source - // incompatible version error state for target eligibility result code. + // TargetSourceIncompatibleVersionError specifies the target source incompatible version error state for target + // eligibility result code. TargetSourceIncompatibleVersionError TargetEligibilityResultCode = "TargetSourceIncompatibleVersionError" ) @@ -712,11 +627,11 @@ const ( type TargetEligibilityStatus string const ( - // TargetEligibilityStatusEligible specifies the target eligibility status - // eligible state for target eligibility status. + // TargetEligibilityStatusEligible specifies the target eligibility status eligible state for target eligibility + // status. TargetEligibilityStatusEligible TargetEligibilityStatus = "Eligible" - // TargetEligibilityStatusNotEligible specifies the target eligibility - // status not eligible state for target eligibility status. + // TargetEligibilityStatusNotEligible specifies the target eligibility status not eligible state for target eligibility + // status. TargetEligibilityStatusNotEligible TargetEligibilityStatus = "NotEligible" ) @@ -734,11 +649,9 @@ const ( type VolumeStatus string const ( - // VolumeStatusOffline specifies the volume status offline state for volume - // status. + // VolumeStatusOffline specifies the volume status offline state for volume status. VolumeStatusOffline VolumeStatus = "Offline" - // VolumeStatusOnline specifies the volume status online state for volume - // status. + // VolumeStatusOnline specifies the volume status online state for volume status. VolumeStatusOnline VolumeStatus = "Online" ) @@ -827,8 +740,7 @@ func (client AlertList) AlertListPreparer() (*http.Request, error) { autorest.WithBaseURL(to.String(client.NextLink))) } -// AlertNotificationProperties is the properties of the alert notification -// settings. +// AlertNotificationProperties is the properties of the alert notification settings. type AlertNotificationProperties struct { EmailNotification AlertEmailNotificationStatus `json:"emailNotification,omitempty"` AlertNotificationCulture *string `json:"alertNotificationCulture,omitempty"` @@ -871,8 +783,7 @@ type AlertSource struct { AlertSourceType AlertSourceType `json:"alertSourceType,omitempty"` } -// AsymmetricEncryptedSecret is represent the secrets intended for encryption -// with asymmetric key pair. +// AsymmetricEncryptedSecret is represent the secrets intended for encryption with asymmetric key pair. type AsymmetricEncryptedSecret struct { Value *string `json:"value,omitempty"` EncryptionCertThumbprint *string `json:"encryptionCertThumbprint,omitempty"` @@ -887,11 +798,9 @@ type AvailableProviderOperation struct { Properties *map[string]interface{} `json:"properties,omitempty"` } -// AvailableProviderOperationDisplay is contains the localized display -// information for this particular operation/action. These value will be used -// by several clients for (a) custom role definitions for RBAC, (b) complex -// query filters for the event service and (c) audit history/records for -// management operations. +// AvailableProviderOperationDisplay is contains the localized display information for this particular +// operation/action. These value will be used by several clients for (a) custom role definitions for RBAC, (b) complex +// query filters for the event service and (c) audit history/records for management operations. type AvailableProviderOperationDisplay struct { Provider *string `json:"provider,omitempty"` Resource *string `json:"resource,omitempty"` @@ -1066,8 +975,7 @@ type BaseModel struct { Kind Kind `json:"kind,omitempty"` } -// ChapSettings is the Challenge-Handshake Authentication Protocol (CHAP) -// settings. +// ChapSettings is the Challenge-Handshake Authentication Protocol (CHAP) settings. type ChapSettings struct { InitiatorUser *string `json:"initiatorUser,omitempty"` InitiatorSecret *AsymmetricEncryptedSecret `json:"initiatorSecret,omitempty"` @@ -1119,8 +1027,7 @@ type CloudApplianceConfigurationList struct { Value *[]CloudApplianceConfiguration `json:"value,omitempty"` } -// CloudApplianceConfigurationProperties is the properties of cloud appliance -// configuration. +// CloudApplianceConfigurationProperties is the properties of cloud appliance configuration. type CloudApplianceConfigurationProperties struct { ModelNumber *string `json:"modelNumber,omitempty"` CloudPlatform *string `json:"cloudPlatform,omitempty"` @@ -1146,8 +1053,7 @@ type ConfigureDeviceRequest struct { *ConfigureDeviceRequestProperties `json:"properties,omitempty"` } -// ConfigureDeviceRequestProperties is the properties of the configure device -// request. +// ConfigureDeviceRequestProperties is the properties of the configure device request. type ConfigureDeviceRequestProperties struct { FriendlyName *string `json:"friendlyName,omitempty"` CurrentDeviceName *string `json:"currentDeviceName,omitempty"` @@ -1156,8 +1062,7 @@ type ConfigureDeviceRequestProperties struct { NetworkInterfaceData0Settings *NetworkInterfaceData0Settings `json:"networkInterfaceData0Settings,omitempty"` } -// ControllerPowerStateChangeRequest is the controller power state change -// request. +// ControllerPowerStateChangeRequest is the controller power state change request. type ControllerPowerStateChangeRequest struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -1166,8 +1071,7 @@ type ControllerPowerStateChangeRequest struct { *ControllerPowerStateChangeRequestProperties `json:"properties,omitempty"` } -// ControllerPowerStateChangeRequestProperties is the properties of the -// controller power state change request. +// ControllerPowerStateChangeRequestProperties is the properties of the controller power state change request. type ControllerPowerStateChangeRequestProperties struct { Action ControllerPowerStateAction `json:"action,omitempty"` ActiveController ControllerID `json:"activeController,omitempty"` @@ -1175,9 +1079,8 @@ type ControllerPowerStateChangeRequestProperties struct { Controller1State ControllerStatus `json:"controller1State,omitempty"` } -// DataStatistics is the additional details related to the data related -// statistics of a job. Currently applicable only for Backup, Clone and Restore -// jobs. +// DataStatistics is the additional details related to the data related statistics of a job. Currently applicable only +// for Backup, Clone and Restore jobs. type DataStatistics struct { TotalData *int64 `json:"totalData,omitempty"` ProcessedData *int64 `json:"processedData,omitempty"` @@ -1195,8 +1098,7 @@ type Device struct { *DeviceProperties `json:"properties,omitempty"` } -// DeviceDetails is the additional device details regarding the end point count -// and volume container count. +// DeviceDetails is the additional device details regarding the end point count and volume container count. type DeviceDetails struct { EndpointCount *int32 `json:"endpointCount,omitempty"` VolumeContainerCount *int32 `json:"volumeContainerCount,omitempty"` @@ -1249,8 +1151,7 @@ type DeviceProperties struct { RolloverDetails *DeviceRolloverDetails `json:"rolloverDetails,omitempty"` } -// DeviceRolloverDetails is the additional device details for the service data -// encryption key rollover. +// DeviceRolloverDetails is the additional device details for the service data encryption key rollover. type DeviceRolloverDetails struct { AuthorizationEligibility AuthorizationEligibility `json:"authorizationEligibility,omitempty"` AuthorizationStatus AuthorizationStatus `json:"authorizationStatus,omitempty"` @@ -1287,8 +1188,8 @@ type EncryptionSettingsProperties struct { KeyRolloverStatus KeyRolloverStatus `json:"keyRolloverStatus,omitempty"` } -// FailoverRequest is the request object for triggering a failover of volume -// containers, from a source device to a target device. +// FailoverRequest is the request object for triggering a failover of volume containers, from a source device to a +// target device. type FailoverRequest struct { TargetDeviceID *string `json:"targetDeviceId,omitempty"` VolumeContainers *[]string `json:"volumeContainers,omitempty"` @@ -1300,8 +1201,7 @@ type FailoverSet struct { EligibilityResult *FailoverSetEligibilityResult `json:"eligibilityResult,omitempty"` } -// FailoverSetEligibilityResult is the eligibility result of failover set, for -// failover. +// FailoverSetEligibilityResult is the eligibility result of failover set, for failover. type FailoverSetEligibilityResult struct { IsEligibleForFailover *bool `json:"isEligibleForFailover,omitempty"` ErrorMessage *string `json:"errorMessage,omitempty"` @@ -1313,8 +1213,7 @@ type FailoverSetsList struct { Value *[]FailoverSet `json:"value,omitempty"` } -// FailoverTarget is represents the eligibility of a device as a failover -// target device. +// FailoverTarget is represents the eligibility of a device as a failover target device. type FailoverTarget struct { DeviceID *string `json:"deviceId,omitempty"` DeviceStatus DeviceStatus `json:"deviceStatus,omitempty"` @@ -1329,8 +1228,8 @@ type FailoverTarget struct { EligibilityResult *TargetEligibilityResult `json:"eligibilityResult,omitempty"` } -// FailoverTargetsList is the list of all devices in a resource and their -// eligibility status as a failover target device. +// FailoverTargetsList is the list of all devices in a resource and their eligibility status as a failover target +// device. type FailoverTargetsList struct { autorest.Response `json:"-"` Value *[]FailoverTarget `json:"value,omitempty"` @@ -1376,8 +1275,7 @@ type HardwareComponentGroupList struct { Value *[]HardwareComponentGroup `json:"value,omitempty"` } -// HardwareComponentGroupProperties is the properties of hardware component -// group. +// HardwareComponentGroupProperties is the properties of hardware component group. type HardwareComponentGroupProperties struct { DisplayName *string `json:"displayName,omitempty"` LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"` @@ -1467,8 +1365,8 @@ type Key struct { ActivationKey *string `json:"activationKey,omitempty"` } -// ListFailoverTargetsRequest is the request object for fetching the list of -// failover targets (eligible devices for failover). +// ListFailoverTargetsRequest is the request object for fetching the list of failover targets (eligible devices for +// failover). type ListFailoverTargetsRequest struct { VolumeContainers *[]string `json:"volumeContainers,omitempty"` } @@ -1496,8 +1394,7 @@ type ManagerExtendedInfo struct { Etag *string `json:"etag,omitempty"` } -// ManagerExtendedInfoProperties is the properties of the manager extended -// info. +// ManagerExtendedInfoProperties is the properties of the manager extended info. type ManagerExtendedInfoProperties struct { Version *string `json:"version,omitempty"` IntegrityKey *string `json:"integrityKey,omitempty"` @@ -1507,8 +1404,7 @@ type ManagerExtendedInfoProperties struct { Algorithm *string `json:"algorithm,omitempty"` } -// ManagerIntrinsicSettings is intrinsic settings which refers to the type of -// the Storsimple Manager. +// ManagerIntrinsicSettings is intrinsic settings which refers to the type of the Storsimple Manager. type ManagerIntrinsicSettings struct { Type ManagerType `json:"type,omitempty"` } @@ -1570,8 +1466,7 @@ type MetricDefinitionList struct { Value *[]MetricDefinition `json:"value,omitempty"` } -// MetricDimension is the metric dimension. It indicates the source of the -// metric. +// MetricDimension is the metric dimension. It indicates the source of the metric. type MetricDimension struct { Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` @@ -1599,8 +1494,7 @@ type MetricName struct { LocalizedValue *string `json:"localizedValue,omitempty"` } -// MetricNameFilter is the metric name filter, specifying the name of the -// metric to be filtered on. +// MetricNameFilter is the metric name filter, specifying the name of the metric to be filtered on. type MetricNameFilter struct { Value *string `json:"value,omitempty"` } @@ -1636,8 +1530,7 @@ type NetworkAdapters struct { NicIpv6Settings *NicIPv6 `json:"nicIpv6Settings,omitempty"` } -// NetworkInterfaceData0Settings is the 'Data 0' network interface card -// settings. +// NetworkInterfaceData0Settings is the 'Data 0' network interface card settings. type NetworkInterfaceData0Settings struct { ControllerZeroIP *string `json:"controllerZeroIp,omitempty"` ControllerOneIP *string `json:"controllerOneIp,omitempty"` @@ -1653,21 +1546,18 @@ type NetworkSettings struct { *NetworkSettingsProperties `json:"properties,omitempty"` } -// NetworkSettingsPatch is represents the patch request for the network -// settings of a device. +// NetworkSettingsPatch is represents the patch request for the network settings of a device. type NetworkSettingsPatch struct { *NetworkSettingsPatchProperties `json:"properties,omitempty"` } -// NetworkSettingsPatchProperties is the properties of the network settings -// patch. +// NetworkSettingsPatchProperties is the properties of the network settings patch. type NetworkSettingsPatchProperties struct { DNSSettings *DNSSettings `json:"dnsSettings,omitempty"` NetworkAdapters *NetworkAdapterList `json:"networkAdapters,omitempty"` } -// NetworkSettingsProperties is the properties of the network settings of -// device. +// NetworkSettingsProperties is the properties of the network settings of device. type NetworkSettingsProperties struct { DNSSettings *DNSSettings `json:"dnsSettings,omitempty"` NetworkAdapters *NetworkAdapterList `json:"networkAdapters,omitempty"` @@ -1704,8 +1594,7 @@ type RemoteManagementSettings struct { RemoteManagementCertificate *string `json:"remoteManagementCertificate,omitempty"` } -// RemoteManagementSettingsPatch is the settings for updating remote management -// mode of the device. +// RemoteManagementSettingsPatch is the settings for updating remote management mode of the device. type RemoteManagementSettingsPatch struct { RemoteManagementMode RemoteManagementModeConfiguration `json:"remoteManagementMode,omitempty"` } @@ -1741,14 +1630,12 @@ type SecuritySettings struct { *SecuritySettingsProperties `json:"properties,omitempty"` } -// SecuritySettingsPatch is represents the patch request for the security -// settings of a device. +// SecuritySettingsPatch is represents the patch request for the security settings of a device. type SecuritySettingsPatch struct { *SecuritySettingsPatchProperties `json:"properties,omitempty"` } -// SecuritySettingsPatchProperties is the properties of the security settings -// patch. +// SecuritySettingsPatchProperties is the properties of the security settings patch. type SecuritySettingsPatchProperties struct { RemoteManagementSettings *RemoteManagementSettingsPatch `json:"remoteManagementSettings,omitempty"` DeviceAdminPassword *AsymmetricEncryptedSecret `json:"deviceAdminPassword,omitempty"` @@ -1757,8 +1644,7 @@ type SecuritySettingsPatchProperties struct { CloudApplianceSettings *CloudApplianceSettings `json:"cloudApplianceSettings,omitempty"` } -// SecuritySettingsProperties is the properties of security settings of a -// device. +// SecuritySettingsProperties is the properties of security settings of a device. type SecuritySettingsProperties struct { RemoteManagementSettings *RemoteManagementSettings `json:"remoteManagementSettings,omitempty"` ChapSettings *ChapSettings `json:"chapSettings,omitempty"` @@ -1779,15 +1665,13 @@ type StorageAccountCredential struct { *StorageAccountCredentialProperties `json:"properties,omitempty"` } -// StorageAccountCredentialList is the collection of storage account credential -// entities. +// StorageAccountCredentialList is the collection of storage account credential entities. type StorageAccountCredentialList struct { autorest.Response `json:"-"` Value *[]StorageAccountCredential `json:"value,omitempty"` } -// StorageAccountCredentialProperties is the storage account credential -// properties. +// StorageAccountCredentialProperties is the storage account credential properties. type StorageAccountCredentialProperties struct { EndPoint *string `json:"endPoint,omitempty"` SslStatus SslStatus `json:"sslStatus,omitempty"` @@ -1795,8 +1679,7 @@ type StorageAccountCredentialProperties struct { VolumesCount *int32 `json:"volumesCount,omitempty"` } -// SymmetricEncryptedSecret is represents the secrets encrypted using Symmetric -// Encryption Key. +// SymmetricEncryptedSecret is represents the secrets encrypted using Symmetric Encryption Key. type SymmetricEncryptedSecret struct { autorest.Response `json:"-"` Value *string `json:"value,omitempty"` @@ -1804,16 +1687,15 @@ type SymmetricEncryptedSecret struct { EncryptionAlgorithm EncryptionAlgorithm `json:"encryptionAlgorithm,omitempty"` } -// TargetEligibilityErrorMessage is the error/warning message due to which the -// device is ineligible as a failover target device. +// TargetEligibilityErrorMessage is the error/warning message due to which the device is ineligible as a failover +// target device. type TargetEligibilityErrorMessage struct { Message *string `json:"message,omitempty"` Resolution *string `json:"resolution,omitempty"` ResultCode TargetEligibilityResultCode `json:"resultCode,omitempty"` } -// TargetEligibilityResult is the eligibility result of device, as a failover -// target device. +// TargetEligibilityResult is the eligibility result of device, as a failover target device. type TargetEligibilityResult struct { EligibilityStatus TargetEligibilityStatus `json:"eligibilityStatus,omitempty"` Messages *[]TargetEligibilityErrorMessage `json:"messages,omitempty"` @@ -1890,8 +1772,8 @@ type VolumeContainer struct { *VolumeContainerProperties `json:"properties,omitempty"` } -// VolumeContainerFailoverMetadata is the metadata of the volume container, -// that is being considered as part of a failover set. +// VolumeContainerFailoverMetadata is the metadata of the volume container, that is being considered as part of a +// failover set. type VolumeContainerFailoverMetadata struct { VolumeContainerID *string `json:"volumeContainerId,omitempty"` Volumes *[]VolumeFailoverMetadata `json:"volumes,omitempty"` @@ -1915,8 +1797,7 @@ type VolumeContainerProperties struct { TotalCloudStorageUsageInBytes *int64 `json:"totalCloudStorageUsageInBytes,omitempty"` } -// VolumeFailoverMetadata is the metadata of a volume that has valid cloud -// snapshot. +// VolumeFailoverMetadata is the metadata of a volume that has valid cloud snapshot. type VolumeFailoverMetadata struct { VolumeID *string `json:"volumeId,omitempty"` VolumeType VolumeType `json:"volumeType,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/operations.go index 0fa27df73..1b525f834 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/operations.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// OperationsClient is the client for the Operations methods of the -// Storsimple8000series service. +// OperationsClient is the client for the Operations methods of the Storsimple8000series service. type OperationsClient struct { ManagementClient } @@ -35,14 +33,12 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// List lists all of the available REST API operations of the -// Microsoft.Storsimple provider +// List lists all of the available REST API operations of the Microsoft.Storsimple provider func (client OperationsClient) List() (result AvailableProviderOperationList, err error) { req, err := client.ListPreparer() if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/storageaccountcredentials.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/storageaccountcredentials.go index 97f50a486..5c98c59e7 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/storageaccountcredentials.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/storageaccountcredentials.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,28 @@ import ( "net/http" ) -// StorageAccountCredentialsClient is the client for the -// StorageAccountCredentials methods of the Storsimple8000series service. +// StorageAccountCredentialsClient is the client for the StorageAccountCredentials methods of the Storsimple8000series +// service. type StorageAccountCredentialsClient struct { ManagementClient } -// NewStorageAccountCredentialsClient creates an instance of the -// StorageAccountCredentialsClient client. +// NewStorageAccountCredentialsClient creates an instance of the StorageAccountCredentialsClient client. func NewStorageAccountCredentialsClient(subscriptionID string) StorageAccountCredentialsClient { return NewStorageAccountCredentialsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the -// StorageAccountCredentialsClient client. +// NewStorageAccountCredentialsClientWithBaseURI creates an instance of the StorageAccountCredentialsClient client. func NewStorageAccountCredentialsClientWithBaseURI(baseURI string, subscriptionID string) StorageAccountCredentialsClient { return StorageAccountCredentialsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the storage account credential. This -// method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate creates or updates the storage account credential. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// storageAccountCredentialName is the storage account credential name. -// parameters is the storage account credential to be added or updated. -// resourceGroupName is the resource group name managerName is the manager name +// storageAccountCredentialName is the storage account credential name. parameters is the storage account credential to +// be added or updated. resourceGroupName is the resource group name managerName is the manager name func (client StorageAccountCredentialsClient) CreateOrUpdate(storageAccountCredentialName string, parameters StorageAccountCredential, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan StorageAccountCredential, <-chan error) { resultChan := make(chan StorageAccountCredential, 1) errChan := make(chan error, 1) @@ -147,13 +142,11 @@ func (client StorageAccountCredentialsClient) CreateOrUpdateResponder(resp *http return } -// Delete deletes the storage account credential. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete deletes the storage account credential. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// storageAccountCredentialName is the name of the storage account credential. -// resourceGroupName is the resource group name managerName is the manager name +// storageAccountCredentialName is the name of the storage account credential. resourceGroupName is the resource group +// name managerName is the manager name func (client StorageAccountCredentialsClient) Delete(storageAccountCredentialName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -243,9 +236,8 @@ func (client StorageAccountCredentialsClient) DeleteResponder(resp *http.Respons // Get gets the properties of the specified storage account credential name. // -// storageAccountCredentialName is the name of storage account credential to be -// fetched. resourceGroupName is the resource group name managerName is the -// manager name +// storageAccountCredentialName is the name of storage account credential to be fetched. resourceGroupName is the +// resource group name managerName is the manager name func (client StorageAccountCredentialsClient) Get(storageAccountCredentialName string, resourceGroupName string, managerName string) (result StorageAccountCredential, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go index c649bbe8a..5feaef2f1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/version.go @@ -14,15 +14,15 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-storsimple8000series/2017-06-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-storsimple8000series/2017-06-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumecontainers.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumecontainers.go index 6a5fee0ce..33a83abd1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumecontainers.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumecontainers.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,32 +24,27 @@ import ( "net/http" ) -// VolumeContainersClient is the client for the VolumeContainers methods of the -// Storsimple8000series service. +// VolumeContainersClient is the client for the VolumeContainers methods of the Storsimple8000series service. type VolumeContainersClient struct { ManagementClient } -// NewVolumeContainersClient creates an instance of the VolumeContainersClient -// client. +// NewVolumeContainersClient creates an instance of the VolumeContainersClient client. func NewVolumeContainersClient(subscriptionID string) VolumeContainersClient { return NewVolumeContainersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewVolumeContainersClientWithBaseURI creates an instance of the -// VolumeContainersClient client. +// NewVolumeContainersClientWithBaseURI creates an instance of the VolumeContainersClient client. func NewVolumeContainersClientWithBaseURI(baseURI string, subscriptionID string) VolumeContainersClient { return VolumeContainersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the volume container. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates the volume container. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// deviceName is the device name volumeContainerName is the name of the volume -// container. parameters is the volume container to be added or updated. -// resourceGroupName is the resource group name managerName is the manager name +// deviceName is the device name volumeContainerName is the name of the volume container. parameters is the volume +// container to be added or updated. resourceGroupName is the resource group name managerName is the manager name func (client VolumeContainersClient) CreateOrUpdate(deviceName string, volumeContainerName string, parameters VolumeContainer, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan VolumeContainer, <-chan error) { resultChan := make(chan VolumeContainer, 1) errChan := make(chan error, 1) @@ -148,13 +142,11 @@ func (client VolumeContainersClient) CreateOrUpdateResponder(resp *http.Response return } -// Delete deletes the volume container. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Delete deletes the volume container. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name volumeContainerName is the name of the volume -// container. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name volumeContainerName is the name of the volume container. resourceGroupName is the +// resource group name managerName is the manager name func (client VolumeContainersClient) Delete(deviceName string, volumeContainerName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -245,9 +237,8 @@ func (client VolumeContainersClient) DeleteResponder(resp *http.Response) (resul // Get gets the properties of the specified volume container name. // -// deviceName is the device name volumeContainerName is the name of the volume -// container. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name volumeContainerName is the name of the volume container. resourceGroupName is the +// resource group name managerName is the manager name func (client VolumeContainersClient) Get(deviceName string, volumeContainerName string, resourceGroupName string, managerName string) (result VolumeContainer, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -321,8 +312,7 @@ func (client VolumeContainersClient) GetResponder(resp *http.Response) (result V // ListByDevice gets all the volume containers in a device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client VolumeContainersClient) ListByDevice(deviceName string, resourceGroupName string, managerName string) (result VolumeContainerList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -393,12 +383,10 @@ func (client VolumeContainersClient) ListByDeviceResponder(resp *http.Response) return } -// ListMetricDefinition gets the metric definitions for the specified volume -// container. +// ListMetricDefinition gets the metric definitions for the specified volume container. // -// deviceName is the device name volumeContainerName is the volume container -// name. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name volumeContainerName is the volume container name. resourceGroupName is the resource +// group name managerName is the manager name func (client VolumeContainersClient) ListMetricDefinition(deviceName string, volumeContainerName string, resourceGroupName string, managerName string) (result MetricDefinitionList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -472,9 +460,8 @@ func (client VolumeContainersClient) ListMetricDefinitionResponder(resp *http.Re // ListMetrics gets the metrics for the specified volume container. // -// deviceName is the device name volumeContainerName is the volume container -// name. resourceGroupName is the resource group name managerName is the -// manager name filter is oData Filter options +// deviceName is the device name volumeContainerName is the volume container name. resourceGroupName is the resource +// group name managerName is the manager name filter is oData Filter options func (client VolumeContainersClient) ListMetrics(deviceName string, volumeContainerName string, resourceGroupName string, managerName string, filter string) (result MetricList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumes.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumes.go index f6d438faa..21c437e2f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumes.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/storsimple8000series/volumes.go @@ -14,9 +14,8 @@ package storsimple8000series // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,8 +24,7 @@ import ( "net/http" ) -// VolumesClient is the client for the Volumes methods of the -// Storsimple8000series service. +// VolumesClient is the client for the Volumes methods of the Storsimple8000series service. type VolumesClient struct { ManagementClient } @@ -41,14 +39,11 @@ func NewVolumesClientWithBaseURI(baseURI string, subscriptionID string) VolumesC return VolumesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates the volume. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate creates or updates the volume. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name volumeContainerName is the volume container -// name. volumeName is the volume name. parameters is volume to be created or -// updated. resourceGroupName is the resource group name managerName is the +// deviceName is the device name volumeContainerName is the volume container name. volumeName is the volume name. +// parameters is volume to be created or updated. resourceGroupName is the resource group name managerName is the // manager name func (client VolumesClient) CreateOrUpdate(deviceName string, volumeContainerName string, volumeName string, parameters Volume, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan Volume, <-chan error) { resultChan := make(chan Volume, 1) @@ -147,13 +142,11 @@ func (client VolumesClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// Delete deletes the volume. This method may poll for completion. Polling can -// be canceled by passing the cancel channel argument. The channel will be used -// to cancel polling and any outstanding HTTP requests. +// Delete deletes the volume. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// deviceName is the device name volumeContainerName is the volume container -// name. volumeName is the volume name. resourceGroupName is the resource group -// name managerName is the manager name +// deviceName is the device name volumeContainerName is the volume container name. volumeName is the volume name. +// resourceGroupName is the resource group name managerName is the manager name func (client VolumesClient) Delete(deviceName string, volumeContainerName string, volumeName string, resourceGroupName string, managerName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -245,9 +238,8 @@ func (client VolumesClient) DeleteResponder(resp *http.Response) (result autores // Get returns the properties of the specified volume name. // -// deviceName is the device name volumeContainerName is the volume container -// name. volumeName is the volume name. resourceGroupName is the resource group -// name managerName is the manager name +// deviceName is the device name volumeContainerName is the volume container name. volumeName is the volume name. +// resourceGroupName is the resource group name managerName is the manager name func (client VolumesClient) Get(deviceName string, volumeContainerName string, volumeName string, resourceGroupName string, managerName string) (result Volume, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -322,8 +314,7 @@ func (client VolumesClient) GetResponder(resp *http.Response) (result Volume, er // ListByDevice retrieves all the volumes in a device. // -// deviceName is the device name resourceGroupName is the resource group name -// managerName is the manager name +// deviceName is the device name resourceGroupName is the resource group name managerName is the manager name func (client VolumesClient) ListByDevice(deviceName string, resourceGroupName string, managerName string) (result VolumeList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -396,9 +387,8 @@ func (client VolumesClient) ListByDeviceResponder(resp *http.Response) (result V // ListByVolumeContainer retrieves all the volumes in a volume container. // -// deviceName is the device name volumeContainerName is the volume container -// name. resourceGroupName is the resource group name managerName is the -// manager name +// deviceName is the device name volumeContainerName is the volume container name. resourceGroupName is the resource +// group name managerName is the manager name func (client VolumesClient) ListByVolumeContainer(deviceName string, volumeContainerName string, resourceGroupName string, managerName string) (result VolumeList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -472,9 +462,8 @@ func (client VolumesClient) ListByVolumeContainerResponder(resp *http.Response) // ListMetricDefinition gets the metric definitions for the specified volume. // -// deviceName is the device name volumeContainerName is the volume container -// name. volumeName is the volume name. resourceGroupName is the resource group -// name managerName is the manager name +// deviceName is the device name volumeContainerName is the volume container name. volumeName is the volume name. +// resourceGroupName is the resource group name managerName is the manager name func (client VolumesClient) ListMetricDefinition(deviceName string, volumeContainerName string, volumeName string, resourceGroupName string, managerName string) (result MetricDefinitionList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, @@ -549,9 +538,8 @@ func (client VolumesClient) ListMetricDefinitionResponder(resp *http.Response) ( // ListMetrics gets the metrics for the specified volume. // -// deviceName is the device name volumeContainerName is the volume container -// name. volumeName is the volume name. resourceGroupName is the resource group -// name managerName is the manager name filter is oData Filter options +// deviceName is the device name volumeContainerName is the volume container name. volumeName is the volume name. +// resourceGroupName is the resource group name managerName is the manager name filter is oData Filter options func (client VolumesClient) ListMetrics(deviceName string, volumeContainerName string, volumeName string, resourceGroupName string, managerName string, filter string) (result MetricList, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: managerName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/client.go index 78ba4ee72..d7be401fa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/client.go @@ -1,7 +1,6 @@ -// Package streamanalytics implements the Azure ARM Streamanalytics service API -// version . +// Package streamanalytics implements the Azure ARM Streamanalytics service API version 2016-03-01. // -// Composite Swagger for Stream Analytics Client +// Stream Analytics Client package streamanalytics // Copyright (c) Microsoft and contributors. All rights reserved. @@ -18,9 +17,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/functions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/functions.go index 34cdce08f..966760815 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/functions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/functions.go @@ -14,9 +14,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// FunctionsClient is the composite Swagger for Stream Analytics Client +// FunctionsClient is the stream Analytics Client type FunctionsClient struct { ManagementClient } @@ -34,26 +33,20 @@ func NewFunctionsClient(subscriptionID string) FunctionsClient { return NewFunctionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewFunctionsClientWithBaseURI creates an instance of the FunctionsClient -// client. +// NewFunctionsClientWithBaseURI creates an instance of the FunctionsClient client. func NewFunctionsClientWithBaseURI(baseURI string, subscriptionID string) FunctionsClient { return FunctionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrReplace creates a function or replaces an already existing function -// under an existing streaming job. +// CreateOrReplace creates a function or replaces an already existing function under an existing streaming job. // -// function is the definition of the function that will be used to create a new -// function or replace the existing one under the streaming job. -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. functionName is the -// name of the function. ifMatch is the ETag of the function. Omit this value -// to always overwrite the current function. Specify the last-seen ETag value -// to prevent accidentally overwritting concurrent changes. ifNoneMatch is set -// to '*' to allow a new function to be created, but to prevent updating an -// existing function. Other values will result in a 412 Pre-condition Failed -// response. +// function is the definition of the function that will be used to create a new function or replace the existing one +// under the streaming job. resourceGroupName is the name of the resource group that contains the resource. You can +// obtain this value from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. +// functionName is the name of the function. ifMatch is the ETag of the function. Omit this value to always overwrite +// the current function. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. +// ifNoneMatch is set to '*' to allow a new function to be created, but to prevent updating an existing function. Other +// values will result in a 412 Pre-condition Failed response. func (client FunctionsClient) CreateOrReplace(function Function, resourceGroupName string, jobName string, functionName string, ifMatch string, ifNoneMatch string) (result Function, err error) { req, err := client.CreateOrReplacePreparer(function, resourceGroupName, jobName, functionName, ifMatch, ifNoneMatch) if err != nil { @@ -129,10 +122,9 @@ func (client FunctionsClient) CreateOrReplaceResponder(resp *http.Response) (res // Delete deletes a function from the streaming job. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. functionName is the -// name of the function. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. functionName is the name of the +// function. func (client FunctionsClient) Delete(resourceGroupName string, jobName string, functionName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, jobName, functionName) if err != nil { @@ -197,10 +189,9 @@ func (client FunctionsClient) DeleteResponder(resp *http.Response) (result autor // Get gets details about the specified function. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. functionName is the -// name of the function. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. functionName is the name of the +// function. func (client FunctionsClient) Get(resourceGroupName string, jobName string, functionName string) (result Function, err error) { req, err := client.GetPreparer(resourceGroupName, jobName, functionName) if err != nil { @@ -264,16 +255,13 @@ func (client FunctionsClient) GetResponder(resp *http.Response) (result Function return } -// ListByStreamingJob lists all of the functions under the specified streaming -// job. +// ListByStreamingJob lists all of the functions under the specified streaming job. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. selectParameter is the -// $select OData query parameter. This is a comma-separated list of structural -// properties to include in the response, or “*” to include all properties. By -// default, all properties are returned except diagnostics. Currently only -// accepts '*' as a valid value. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. selectParameter is the $select +// OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to +// include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a +// valid value. func (client FunctionsClient) ListByStreamingJob(resourceGroupName string, jobName string, selectParameter string) (result FunctionListResult, err error) { req, err := client.ListByStreamingJobPreparer(resourceGroupName, jobName, selectParameter) if err != nil { @@ -408,15 +396,12 @@ func (client FunctionsClient) ListByStreamingJobComplete(resourceGroupName strin return resultChan, errChan } -// RetrieveDefaultDefinition retrieves the default definition of a function -// based on the parameters specified. +// RetrieveDefaultDefinition retrieves the default definition of a function based on the parameters specified. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. functionName is the -// name of the function. functionRetrieveDefaultDefinitionParameters is -// parameters used to specify the type of function to retrieve the default -// definition for. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. functionName is the name of the +// function. functionRetrieveDefaultDefinitionParameters is parameters used to specify the type of function to retrieve +// the default definition for. func (client FunctionsClient) RetrieveDefaultDefinition(resourceGroupName string, jobName string, functionName string, functionRetrieveDefaultDefinitionParameters *FunctionRetrieveDefaultDefinitionParameters) (result Function, err error) { req, err := client.RetrieveDefaultDefinitionPreparer(resourceGroupName, jobName, functionName, functionRetrieveDefaultDefinitionParameters) if err != nil { @@ -485,23 +470,17 @@ func (client FunctionsClient) RetrieveDefaultDefinitionResponder(resp *http.Resp return } -// Test tests if the information provided for a function is valid. This can -// range from testing the connection to the underlying web service behind the -// function or making sure the function code provided is syntactically correct. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// Test tests if the information provided for a function is valid. This can range from testing the connection to the +// underlying web service behind the function or making sure the function code provided is syntactically correct. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. functionName is the -// name of the function. function is if the function specified does not already -// exist, this parameter must contain the full function definition intended to -// be tested. If the function specified already exists, this parameter can be -// left null to test the existing function as is or if specified, the -// properties specified will overwrite the corresponding properties in the -// existing function (exactly like a PATCH operation) and the resulting -// function will be tested. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. functionName is the name of the +// function. function is if the function specified does not already exist, this parameter must contain the full +// function definition intended to be tested. If the function specified already exists, this parameter can be left null +// to test the existing function as is or if specified, the properties specified will overwrite the corresponding +// properties in the existing function (exactly like a PATCH operation) and the resulting function will be tested. func (client FunctionsClient) Test(resourceGroupName string, jobName string, functionName string, function *Function, cancel <-chan struct{}) (<-chan ResourceTestStatus, <-chan error) { resultChan := make(chan ResourceTestStatus, 1) errChan := make(chan error, 1) @@ -585,21 +564,16 @@ func (client FunctionsClient) TestResponder(resp *http.Response) (result Resourc return } -// Update updates an existing function under an existing streaming job. This -// can be used to partially update (ie. update one or two properties) a -// function without affecting the rest the job or function definition. +// Update updates an existing function under an existing streaming job. This can be used to partially update (ie. +// update one or two properties) a function without affecting the rest the job or function definition. // -// function is a function object. The properties specified here will overwrite -// the corresponding properties in the existing function (ie. Those properties -// will be updated). Any properties that are set to null here will mean that -// the corresponding property in the existing function will remain the same and -// not change as a result of this PATCH operation. resourceGroupName is the -// name of the resource group that contains the resource. You can obtain this -// value from the Azure Resource Manager API or the portal. jobName is the name -// of the streaming job. functionName is the name of the function. ifMatch is -// the ETag of the function. Omit this value to always overwrite the current -// function. Specify the last-seen ETag value to prevent accidentally -// overwritting concurrent changes. +// function is a function object. The properties specified here will overwrite the corresponding properties in the +// existing function (ie. Those properties will be updated). Any properties that are set to null here will mean that +// the corresponding property in the existing function will remain the same and not change as a result of this PATCH +// operation. resourceGroupName is the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. functionName is the +// name of the function. ifMatch is the ETag of the function. Omit this value to always overwrite the current function. +// Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. func (client FunctionsClient) Update(function Function, resourceGroupName string, jobName string, functionName string, ifMatch string) (result Function, err error) { req, err := client.UpdatePreparer(function, resourceGroupName, jobName, functionName, ifMatch) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/inputs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/inputs.go index 5a224d670..f4ebbb3cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/inputs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/inputs.go @@ -14,9 +14,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// InputsClient is the composite Swagger for Stream Analytics Client +// InputsClient is the stream Analytics Client type InputsClient struct { ManagementClient } @@ -39,19 +38,15 @@ func NewInputsClientWithBaseURI(baseURI string, subscriptionID string) InputsCli return InputsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrReplace creates an input or replaces an already existing input under -// an existing streaming job. +// CreateOrReplace creates an input or replaces an already existing input under an existing streaming job. // -// input is the definition of the input that will be used to create a new input -// or replace the existing one under the streaming job. resourceGroupName is -// the name of the resource group that contains the resource. You can obtain -// this value from the Azure Resource Manager API or the portal. jobName is the -// name of the streaming job. inputName is the name of the input. ifMatch is -// the ETag of the input. Omit this value to always overwrite the current -// input. Specify the last-seen ETag value to prevent accidentally overwritting -// concurrent changes. ifNoneMatch is set to '*' to allow a new input to be -// created, but to prevent updating an existing input. Other values will result -// in a 412 Pre-condition Failed response. +// input is the definition of the input that will be used to create a new input or replace the existing one under the +// streaming job. resourceGroupName is the name of the resource group that contains the resource. You can obtain this +// value from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. inputName is the +// name of the input. ifMatch is the ETag of the input. Omit this value to always overwrite the current input. Specify +// the last-seen ETag value to prevent accidentally overwritting concurrent changes. ifNoneMatch is set to '*' to allow +// a new input to be created, but to prevent updating an existing input. Other values will result in a 412 +// Pre-condition Failed response. func (client InputsClient) CreateOrReplace(input Input, resourceGroupName string, jobName string, inputName string, ifMatch string, ifNoneMatch string) (result Input, err error) { req, err := client.CreateOrReplacePreparer(input, resourceGroupName, jobName, inputName, ifMatch, ifNoneMatch) if err != nil { @@ -127,10 +122,9 @@ func (client InputsClient) CreateOrReplaceResponder(resp *http.Response) (result // Delete deletes an input from the streaming job. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. inputName is the name -// of the input. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. inputName is the name of the +// input. func (client InputsClient) Delete(resourceGroupName string, jobName string, inputName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, jobName, inputName) if err != nil { @@ -195,10 +189,9 @@ func (client InputsClient) DeleteResponder(resp *http.Response) (result autorest // Get gets details about the specified input. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. inputName is the name -// of the input. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. inputName is the name of the +// input. func (client InputsClient) Get(resourceGroupName string, jobName string, inputName string) (result Input, err error) { req, err := client.GetPreparer(resourceGroupName, jobName, inputName) if err != nil { @@ -262,16 +255,13 @@ func (client InputsClient) GetResponder(resp *http.Response) (result Input, err return } -// ListByStreamingJob lists all of the inputs under the specified streaming -// job. +// ListByStreamingJob lists all of the inputs under the specified streaming job. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. selectParameter is the -// $select OData query parameter. This is a comma-separated list of structural -// properties to include in the response, or “*” to include all properties. By -// default, all properties are returned except diagnostics. Currently only -// accepts '*' as a valid value. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. selectParameter is the $select +// OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to +// include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a +// valid value. func (client InputsClient) ListByStreamingJob(resourceGroupName string, jobName string, selectParameter string) (result InputListResult, err error) { req, err := client.ListByStreamingJobPreparer(resourceGroupName, jobName, selectParameter) if err != nil { @@ -406,20 +396,16 @@ func (client InputsClient) ListByStreamingJobComplete(resourceGroupName string, return resultChan, errChan } -// Test tests whether an input’s datasource is reachable and usable by the -// Azure Stream Analytics service. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Test tests whether an input’s datasource is reachable and usable by the Azure Stream Analytics service. This method +// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. inputName is the name -// of the input. input is if the input specified does not already exist, this -// parameter must contain the full input definition intended to be tested. If -// the input specified already exists, this parameter can be left null to test -// the existing input as is or if specified, the properties specified will -// overwrite the corresponding properties in the existing input (exactly like a -// PATCH operation) and the resulting input will be tested. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. inputName is the name of the +// input. input is if the input specified does not already exist, this parameter must contain the full input definition +// intended to be tested. If the input specified already exists, this parameter can be left null to test the existing +// input as is or if specified, the properties specified will overwrite the corresponding properties in the existing +// input (exactly like a PATCH operation) and the resulting input will be tested. func (client InputsClient) Test(resourceGroupName string, jobName string, inputName string, input *Input, cancel <-chan struct{}) (<-chan ResourceTestStatus, <-chan error) { resultChan := make(chan ResourceTestStatus, 1) errChan := make(chan error, 1) @@ -503,21 +489,16 @@ func (client InputsClient) TestResponder(resp *http.Response) (result ResourceTe return } -// Update updates an existing input under an existing streaming job. This can -// be used to partially update (ie. update one or two properties) an input -// without affecting the rest the job or input definition. +// Update updates an existing input under an existing streaming job. This can be used to partially update (ie. update +// one or two properties) an input without affecting the rest the job or input definition. // -// input is an Input object. The properties specified here will overwrite the -// corresponding properties in the existing input (ie. Those properties will be -// updated). Any properties that are set to null here will mean that the -// corresponding property in the existing input will remain the same and not -// change as a result of this PATCH operation. resourceGroupName is the name of -// the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. jobName is the name of -// the streaming job. inputName is the name of the input. ifMatch is the ETag -// of the input. Omit this value to always overwrite the current input. Specify -// the last-seen ETag value to prevent accidentally overwritting concurrent -// changes. +// input is an Input object. The properties specified here will overwrite the corresponding properties in the existing +// input (ie. Those properties will be updated). Any properties that are set to null here will mean that the +// corresponding property in the existing input will remain the same and not change as a result of this PATCH +// operation. resourceGroupName is the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. inputName is the name +// of the input. ifMatch is the ETag of the input. Omit this value to always overwrite the current input. Specify the +// last-seen ETag value to prevent accidentally overwritting concurrent changes. func (client InputsClient) Update(input Input, resourceGroupName string, jobName string, inputName string, ifMatch string) (result Input, err error) { req, err := client.UpdatePreparer(input, resourceGroupName, jobName, inputName, ifMatch) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/models.go index bb3d04b6c..e2d469afa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/models.go @@ -14,23 +14,35 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "net/http" ) +// BindingType enumerates the values for binding type. +type BindingType string + +const ( + // BindingTypeMicrosoftMachineLearningWebService specifies the binding type microsoft machine learning web service + // state for binding type. + BindingTypeMicrosoftMachineLearningWebService BindingType = "Microsoft.MachineLearning/WebService" + // BindingTypeMicrosoftStreamAnalyticsJavascriptUdf specifies the binding type microsoft stream analytics javascript + // udf state for binding type. + BindingTypeMicrosoftStreamAnalyticsJavascriptUdf BindingType = "Microsoft.StreamAnalytics/JavascriptUdf" +) + // CompatibilityLevel enumerates the values for compatibility level. type CompatibilityLevel string const ( - // OneFullStopZero specifies the one full stop zero state for compatibility - // level. + // OneFullStopZero specifies the one full stop zero state for compatibility level. OneFullStopZero CompatibilityLevel = "1.0" ) @@ -52,15 +64,13 @@ const ( Drop EventsOutOfOrderPolicy = "Drop" ) -// JSONOutputSerializationFormat enumerates the values for json output -// serialization format. +// JSONOutputSerializationFormat enumerates the values for json output serialization format. type JSONOutputSerializationFormat string const ( // Array specifies the array state for json output serialization format. Array JSONOutputSerializationFormat = "Array" - // LineSeparated specifies the line separated state for json output - // serialization format. + // LineSeparated specifies the line separated state for json output serialization format. LineSeparated JSONOutputSerializationFormat = "LineSeparated" ) @@ -68,11 +78,9 @@ const ( type OutputErrorPolicy string const ( - // OutputErrorPolicyDrop specifies the output error policy drop state for - // output error policy. + // OutputErrorPolicyDrop specifies the output error policy drop state for output error policy. OutputErrorPolicyDrop OutputErrorPolicy = "Drop" - // OutputErrorPolicyStop specifies the output error policy stop state for - // output error policy. + // OutputErrorPolicyStop specifies the output error policy stop state for output error policy. OutputErrorPolicyStop OutputErrorPolicy = "Stop" ) @@ -84,8 +92,7 @@ const ( CustomTime OutputStartMode = "CustomTime" // JobStartTime specifies the job start time state for output start mode. JobStartTime OutputStartMode = "JobStartTime" - // LastOutputEventTime specifies the last output event time state for - // output start mode. + // LastOutputEventTime specifies the last output event time state for output start mode. LastOutputEventTime OutputStartMode = "LastOutputEventTime" ) @@ -97,6 +104,97 @@ const ( Standard SkuName = "Standard" ) +// Type enumerates the values for type. +type Type string + +const ( + // TypeAvro specifies the type avro state for type. + TypeAvro Type = "Avro" + // TypeCsv specifies the type csv state for type. + TypeCsv Type = "Csv" + // TypeJSON specifies the type json state for type. + TypeJSON Type = "Json" +) + +// TypeFunctionBinding enumerates the values for type function binding. +type TypeFunctionBinding string + +const ( + // TypeMicrosoftMachineLearningWebService specifies the type microsoft machine learning web service state for type + // function binding. + TypeMicrosoftMachineLearningWebService TypeFunctionBinding = "Microsoft.MachineLearning/WebService" + // TypeMicrosoftStreamAnalyticsJavascriptUdf specifies the type microsoft stream analytics javascript udf state for + // type function binding. + TypeMicrosoftStreamAnalyticsJavascriptUdf TypeFunctionBinding = "Microsoft.StreamAnalytics/JavascriptUdf" +) + +// TypeFunctionProperties enumerates the values for type function properties. +type TypeFunctionProperties string + +const ( + // TypeScalar specifies the type scalar state for type function properties. + TypeScalar TypeFunctionProperties = "Scalar" +) + +// TypeInputProperties enumerates the values for type input properties. +type TypeInputProperties string + +const ( + // TypeReference specifies the type reference state for type input properties. + TypeReference TypeInputProperties = "Reference" + // TypeStream specifies the type stream state for type input properties. + TypeStream TypeInputProperties = "Stream" +) + +// TypeOutputDataSource enumerates the values for type output data source. +type TypeOutputDataSource string + +const ( + // TypeMicrosoftDataLakeAccounts specifies the type microsoft data lake accounts state for type output data source. + TypeMicrosoftDataLakeAccounts TypeOutputDataSource = "Microsoft.DataLake/Accounts" + // TypeMicrosoftServiceBusEventHub specifies the type microsoft service bus event hub state for type output data + // source. + TypeMicrosoftServiceBusEventHub TypeOutputDataSource = "Microsoft.ServiceBus/EventHub" + // TypeMicrosoftServiceBusQueue specifies the type microsoft service bus queue state for type output data source. + TypeMicrosoftServiceBusQueue TypeOutputDataSource = "Microsoft.ServiceBus/Queue" + // TypeMicrosoftServiceBusTopic specifies the type microsoft service bus topic state for type output data source. + TypeMicrosoftServiceBusTopic TypeOutputDataSource = "Microsoft.ServiceBus/Topic" + // TypeMicrosoftSQLServerDatabase specifies the type microsoft sql server database state for type output data source. + TypeMicrosoftSQLServerDatabase TypeOutputDataSource = "Microsoft.Sql/Server/Database" + // TypeMicrosoftStorageBlob specifies the type microsoft storage blob state for type output data source. + TypeMicrosoftStorageBlob TypeOutputDataSource = "Microsoft.Storage/Blob" + // TypeMicrosoftStorageDocumentDB specifies the type microsoft storage document db state for type output data source. + TypeMicrosoftStorageDocumentDB TypeOutputDataSource = "Microsoft.Storage/DocumentDB" + // TypeMicrosoftStorageTable specifies the type microsoft storage table state for type output data source. + TypeMicrosoftStorageTable TypeOutputDataSource = "Microsoft.Storage/Table" + // TypePowerBI specifies the type power bi state for type output data source. + TypePowerBI TypeOutputDataSource = "PowerBI" +) + +// TypeReferenceInputDataSource enumerates the values for type reference input data source. +type TypeReferenceInputDataSource string + +const ( + // TypeReferenceInputDataSourceTypeMicrosoftStorageBlob specifies the type reference input data source type microsoft + // storage blob state for type reference input data source. + TypeReferenceInputDataSourceTypeMicrosoftStorageBlob TypeReferenceInputDataSource = "Microsoft.Storage/Blob" +) + +// TypeStreamInputDataSource enumerates the values for type stream input data source. +type TypeStreamInputDataSource string + +const ( + // TypeStreamInputDataSourceTypeMicrosoftDevicesIotHubs specifies the type stream input data source type microsoft + // devices iot hubs state for type stream input data source. + TypeStreamInputDataSourceTypeMicrosoftDevicesIotHubs TypeStreamInputDataSource = "Microsoft.Devices/IotHubs" + // TypeStreamInputDataSourceTypeMicrosoftServiceBusEventHub specifies the type stream input data source type microsoft + // service bus event hub state for type stream input data source. + TypeStreamInputDataSourceTypeMicrosoftServiceBusEventHub TypeStreamInputDataSource = "Microsoft.ServiceBus/EventHub" + // TypeStreamInputDataSourceTypeMicrosoftStorageBlob specifies the type stream input data source type microsoft storage + // blob state for type stream input data source. + TypeStreamInputDataSourceTypeMicrosoftStorageBlob TypeStreamInputDataSource = "Microsoft.Storage/Blob" +) + // UdfType enumerates the values for udf type. type UdfType string @@ -105,20 +203,142 @@ const ( Scalar UdfType = "Scalar" ) -// AvroSerialization is describes how data from an input is serialized or how -// data is serialized when written to an output in Avro format. +// AvroSerialization is describes how data from an input is serialized or how data is serialized when written to an +// output in Avro format. type AvroSerialization struct { + Type Type `json:"type,omitempty"` Properties *map[string]interface{} `json:"properties,omitempty"` } -// AzureMachineLearningWebServiceFunctionBinding is the binding to an Azure -// Machine Learning web service. +// MarshalJSON is the custom marshaler for AvroSerialization. +func (as AvroSerialization) MarshalJSON() ([]byte, error) { + as.Type = TypeAvro + type Alias AvroSerialization + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(as), + }) +} + +// AsAvroSerialization is the Serialization implementation for AvroSerialization. +func (as AvroSerialization) AsAvroSerialization() (*AvroSerialization, bool) { + return &as, true +} + +// AsJSONSerialization is the Serialization implementation for AvroSerialization. +func (as AvroSerialization) AsJSONSerialization() (*JSONSerialization, bool) { + return nil, false +} + +// AsCsvSerialization is the Serialization implementation for AvroSerialization. +func (as AvroSerialization) AsCsvSerialization() (*CsvSerialization, bool) { + return nil, false +} + +// AzureDataLakeStoreOutputDataSource is describes an Azure Data Lake Store output data source. +type AzureDataLakeStoreOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` + *AzureDataLakeStoreOutputDataSourceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) MarshalJSON() ([]byte, error) { + adlsods.Type = TypeMicrosoftDataLakeAccounts + type Alias AzureDataLakeStoreOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(adlsods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return &adlsods, true +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for AzureDataLakeStoreOutputDataSource. +func (adlsods AzureDataLakeStoreOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// AzureDataLakeStoreOutputDataSourceProperties is the properties that are associated with an Azure Data Lake Store. +type AzureDataLakeStoreOutputDataSourceProperties struct { + RefreshToken *string `json:"refreshToken,omitempty"` + TokenUserPrincipalName *string `json:"tokenUserPrincipalName,omitempty"` + TokenUserDisplayName *string `json:"tokenUserDisplayName,omitempty"` + AccountName *string `json:"accountName,omitempty"` + TenantID *string `json:"tenantId,omitempty"` + FilePathPrefix *string `json:"filePathPrefix,omitempty"` + DateFormat *string `json:"dateFormat,omitempty"` + TimeFormat *string `json:"timeFormat,omitempty"` +} + +// AzureMachineLearningWebServiceFunctionBinding is the binding to an Azure Machine Learning web service. type AzureMachineLearningWebServiceFunctionBinding struct { + Type TypeFunctionBinding `json:"type,omitempty"` *AzureMachineLearningWebServiceFunctionBindingProperties `json:"properties,omitempty"` } -// AzureMachineLearningWebServiceFunctionBindingProperties is the binding -// properties associated with an Azure Machine learning web service. +// MarshalJSON is the custom marshaler for AzureMachineLearningWebServiceFunctionBinding. +func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) MarshalJSON() ([]byte, error) { + amlwsfb.Type = TypeMicrosoftMachineLearningWebService + type Alias AzureMachineLearningWebServiceFunctionBinding + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(amlwsfb), + }) +} + +// AsJavaScriptFunctionBinding is the FunctionBinding implementation for AzureMachineLearningWebServiceFunctionBinding. +func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) AsJavaScriptFunctionBinding() (*JavaScriptFunctionBinding, bool) { + return nil, false +} + +// AsAzureMachineLearningWebServiceFunctionBinding is the FunctionBinding implementation for AzureMachineLearningWebServiceFunctionBinding. +func (amlwsfb AzureMachineLearningWebServiceFunctionBinding) AsAzureMachineLearningWebServiceFunctionBinding() (*AzureMachineLearningWebServiceFunctionBinding, bool) { + return &amlwsfb, true +} + +// AzureMachineLearningWebServiceFunctionBindingProperties is the binding properties associated with an Azure Machine +// learning web service. type AzureMachineLearningWebServiceFunctionBindingProperties struct { Endpoint *string `json:"endpoint,omitempty"` APIKey *string `json:"apiKey,omitempty"` @@ -127,45 +347,63 @@ type AzureMachineLearningWebServiceFunctionBindingProperties struct { BatchSize *int32 `json:"batchSize,omitempty"` } -// AzureMachineLearningWebServiceFunctionBindingRetrievalProperties is the -// binding retrieval properties associated with an Azure Machine learning web -// service. +// AzureMachineLearningWebServiceFunctionBindingRetrievalProperties is the binding retrieval properties associated with +// an Azure Machine learning web service. type AzureMachineLearningWebServiceFunctionBindingRetrievalProperties struct { ExecuteEndpoint *string `json:"executeEndpoint,omitempty"` UdfType UdfType `json:"udfType,omitempty"` } -// AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters is -// the parameters needed to retrieve the default function definition for an -// Azure Machine Learning web service function. +// AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters is the parameters needed to retrieve the +// default function definition for an Azure Machine Learning web service function. type AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters struct { + BindingType BindingType `json:"bindingType,omitempty"` *AzureMachineLearningWebServiceFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` } -// AzureMachineLearningWebServiceInputColumn is describes an input column for -// the Azure Machine Learning web service endpoint. +// MarshalJSON is the custom marshaler for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters. +func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) MarshalJSON() ([]byte, error) { + amlwsfrddp.BindingType = BindingTypeMicrosoftMachineLearningWebService + type Alias AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(amlwsfrddp), + }) +} + +// AsJavaScriptFunctionRetrieveDefaultDefinitionParameters is the FunctionRetrieveDefaultDefinitionParameters implementation for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters. +func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) AsJavaScriptFunctionRetrieveDefaultDefinitionParameters() (*JavaScriptFunctionRetrieveDefaultDefinitionParameters, bool) { + return nil, false +} + +// AsAzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters is the FunctionRetrieveDefaultDefinitionParameters implementation for AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters. +func (amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters) AsAzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters() (*AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, bool) { + return &amlwsfrddp, true +} + +// AzureMachineLearningWebServiceInputColumn is describes an input column for the Azure Machine Learning web service +// endpoint. type AzureMachineLearningWebServiceInputColumn struct { Name *string `json:"name,omitempty"` DataType *string `json:"dataType,omitempty"` MapTo *int32 `json:"mapTo,omitempty"` } -// AzureMachineLearningWebServiceInputs is the inputs for the Azure Machine -// Learning web service endpoint. +// AzureMachineLearningWebServiceInputs is the inputs for the Azure Machine Learning web service endpoint. type AzureMachineLearningWebServiceInputs struct { Name *string `json:"name,omitempty"` ColumnNames *[]AzureMachineLearningWebServiceInputColumn `json:"columnNames,omitempty"` } -// AzureMachineLearningWebServiceOutputColumn is describes an output column for -// the Azure Machine Learning web service endpoint. +// AzureMachineLearningWebServiceOutputColumn is describes an output column for the Azure Machine Learning web service +// endpoint. type AzureMachineLearningWebServiceOutputColumn struct { Name *string `json:"name,omitempty"` DataType *string `json:"dataType,omitempty"` } -// AzureSQLDatabaseDataSourceProperties is the properties that are associated -// with an Azure SQL database data source. +// AzureSQLDatabaseDataSourceProperties is the properties that are associated with an Azure SQL database data source. type AzureSQLDatabaseDataSourceProperties struct { Server *string `json:"server,omitempty"` Database *string `json:"database,omitempty"` @@ -174,14 +412,69 @@ type AzureSQLDatabaseDataSourceProperties struct { Table *string `json:"table,omitempty"` } -// AzureSQLDatabaseOutputDataSource is describes an Azure SQL database output -// data source. +// AzureSQLDatabaseOutputDataSource is describes an Azure SQL database output data source. type AzureSQLDatabaseOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` *AzureSQLDatabaseOutputDataSourceProperties `json:"properties,omitempty"` } -// AzureSQLDatabaseOutputDataSourceProperties is the properties that are -// associated with an Azure SQL database output. +// MarshalJSON is the custom marshaler for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) MarshalJSON() ([]byte, error) { + asdods.Type = TypeMicrosoftSQLServerDatabase + type Alias AzureSQLDatabaseOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(asdods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return &asdods, true +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for AzureSQLDatabaseOutputDataSource. +func (asdods AzureSQLDatabaseOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// AzureSQLDatabaseOutputDataSourceProperties is the properties that are associated with an Azure SQL database output. type AzureSQLDatabaseOutputDataSourceProperties struct { Server *string `json:"server,omitempty"` Database *string `json:"database,omitempty"` @@ -190,13 +483,69 @@ type AzureSQLDatabaseOutputDataSourceProperties struct { Table *string `json:"table,omitempty"` } -// AzureTableOutputDataSource is describes an Azure Table data source. +// AzureTableOutputDataSource is describes an Azure Table output data source. type AzureTableOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` *AzureTableOutputDataSourceProperties `json:"properties,omitempty"` } -// AzureTableOutputDataSourceProperties is the properties that are associated -// with an Azure Table output. +// MarshalJSON is the custom marshaler for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) MarshalJSON() ([]byte, error) { + atods.Type = TypeMicrosoftStorageTable + type Alias AzureTableOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(atods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return &atods, true +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for AzureTableOutputDataSource. +func (atods AzureTableOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// AzureTableOutputDataSourceProperties is the properties that are associated with an Azure Table output. type AzureTableOutputDataSourceProperties struct { AccountName *string `json:"accountName,omitempty"` AccountKey *string `json:"accountKey,omitempty"` @@ -207,8 +556,7 @@ type AzureTableOutputDataSourceProperties struct { BatchSize *int32 `json:"batchSize,omitempty"` } -// BlobDataSourceProperties is the properties that are associated with a blob -// data source. +// BlobDataSourceProperties is the properties that are associated with a blob data source. type BlobDataSourceProperties struct { StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` Container *string `json:"container,omitempty"` @@ -219,11 +567,67 @@ type BlobDataSourceProperties struct { // BlobOutputDataSource is describes a blob output data source. type BlobOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` *BlobOutputDataSourceProperties `json:"properties,omitempty"` } -// BlobOutputDataSourceProperties is the properties that are associated with a -// blob output. +// MarshalJSON is the custom marshaler for BlobOutputDataSource. +func (bods BlobOutputDataSource) MarshalJSON() ([]byte, error) { + bods.Type = TypeMicrosoftStorageBlob + type Alias BlobOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(bods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for BlobOutputDataSource. +func (bods BlobOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return &bods, true +} + +// BlobOutputDataSourceProperties is the properties that are associated with a blob output. type BlobOutputDataSourceProperties struct { StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` Container *string `json:"container,omitempty"` @@ -232,14 +636,30 @@ type BlobOutputDataSourceProperties struct { TimeFormat *string `json:"timeFormat,omitempty"` } -// BlobReferenceInputDataSource is describes a blob input data source that -// contains reference data. +// BlobReferenceInputDataSource is describes a blob input data source that contains reference data. type BlobReferenceInputDataSource struct { + Type TypeReferenceInputDataSource `json:"type,omitempty"` *BlobReferenceInputDataSourceProperties `json:"properties,omitempty"` } -// BlobReferenceInputDataSourceProperties is the properties that are associated -// with a blob input containing reference data. +// MarshalJSON is the custom marshaler for BlobReferenceInputDataSource. +func (brids BlobReferenceInputDataSource) MarshalJSON() ([]byte, error) { + brids.Type = TypeReferenceInputDataSourceTypeMicrosoftStorageBlob + type Alias BlobReferenceInputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(brids), + }) +} + +// AsBlobReferenceInputDataSource is the ReferenceInputDataSource implementation for BlobReferenceInputDataSource. +func (brids BlobReferenceInputDataSource) AsBlobReferenceInputDataSource() (*BlobReferenceInputDataSource, bool) { + return &brids, true +} + +// BlobReferenceInputDataSourceProperties is the properties that are associated with a blob input containing reference +// data. type BlobReferenceInputDataSourceProperties struct { StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` Container *string `json:"container,omitempty"` @@ -248,14 +668,39 @@ type BlobReferenceInputDataSourceProperties struct { TimeFormat *string `json:"timeFormat,omitempty"` } -// BlobStreamInputDataSource is describes a blob input data source that -// contains stream data. +// BlobStreamInputDataSource is describes a blob input data source that contains stream data. type BlobStreamInputDataSource struct { + Type TypeStreamInputDataSource `json:"type,omitempty"` *BlobStreamInputDataSourceProperties `json:"properties,omitempty"` } -// BlobStreamInputDataSourceProperties is the properties that are associated -// with a blob input containing stream data. +// MarshalJSON is the custom marshaler for BlobStreamInputDataSource. +func (bsids BlobStreamInputDataSource) MarshalJSON() ([]byte, error) { + bsids.Type = TypeStreamInputDataSourceTypeMicrosoftStorageBlob + type Alias BlobStreamInputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(bsids), + }) +} + +// AsIoTHubStreamInputDataSource is the StreamInputDataSource implementation for BlobStreamInputDataSource. +func (bsids BlobStreamInputDataSource) AsIoTHubStreamInputDataSource() (*IoTHubStreamInputDataSource, bool) { + return nil, false +} + +// AsEventHubStreamInputDataSource is the StreamInputDataSource implementation for BlobStreamInputDataSource. +func (bsids BlobStreamInputDataSource) AsEventHubStreamInputDataSource() (*EventHubStreamInputDataSource, bool) { + return nil, false +} + +// AsBlobStreamInputDataSource is the StreamInputDataSource implementation for BlobStreamInputDataSource. +func (bsids BlobStreamInputDataSource) AsBlobStreamInputDataSource() (*BlobStreamInputDataSource, bool) { + return &bsids, true +} + +// BlobStreamInputDataSourceProperties is the properties that are associated with a blob input containing stream data. type BlobStreamInputDataSourceProperties struct { StorageAccounts *[]StorageAccount `json:"storageAccounts,omitempty"` Container *string `json:"container,omitempty"` @@ -265,40 +710,121 @@ type BlobStreamInputDataSourceProperties struct { SourcePartitionCount *int32 `json:"sourcePartitionCount,omitempty"` } -// CsvSerialization is describes how data from an input is serialized or how -// data is serialized when written to an output in CSV format. +// CsvSerialization is describes how data from an input is serialized or how data is serialized when written to an +// output in CSV format. type CsvSerialization struct { + Type Type `json:"type,omitempty"` *CsvSerializationProperties `json:"properties,omitempty"` } -// CsvSerializationProperties is the properties that are associated with the -// CSV serialization type. +// MarshalJSON is the custom marshaler for CsvSerialization. +func (cs CsvSerialization) MarshalJSON() ([]byte, error) { + cs.Type = TypeCsv + type Alias CsvSerialization + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(cs), + }) +} + +// AsAvroSerialization is the Serialization implementation for CsvSerialization. +func (cs CsvSerialization) AsAvroSerialization() (*AvroSerialization, bool) { + return nil, false +} + +// AsJSONSerialization is the Serialization implementation for CsvSerialization. +func (cs CsvSerialization) AsJSONSerialization() (*JSONSerialization, bool) { + return nil, false +} + +// AsCsvSerialization is the Serialization implementation for CsvSerialization. +func (cs CsvSerialization) AsCsvSerialization() (*CsvSerialization, bool) { + return &cs, true +} + +// CsvSerializationProperties is the properties that are associated with the CSV serialization type. type CsvSerializationProperties struct { FieldDelimiter *string `json:"fieldDelimiter,omitempty"` Encoding Encoding `json:"encoding,omitempty"` } -// DiagnosticCondition is condition applicable to the resource, or to the job -// overall, that warrant customer attention. +// DiagnosticCondition is condition applicable to the resource, or to the job overall, that warrant customer attention. type DiagnosticCondition struct { Since *string `json:"since,omitempty"` Code *string `json:"code,omitempty"` Message *string `json:"message,omitempty"` } -// Diagnostics is describes conditions applicable to the Input, Output, or the -// job overall, that warrant customer attention. +// Diagnostics is describes conditions applicable to the Input, Output, or the job overall, that warrant customer +// attention. type Diagnostics struct { Conditions *[]DiagnosticCondition `json:"conditions,omitempty"` } -// DocumentDbOutputDataSource is describes a DocumentDB data source. +// DocumentDbOutputDataSource is describes a DocumentDB output data source. type DocumentDbOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` *DocumentDbOutputDataSourceProperties `json:"properties,omitempty"` } -// DocumentDbOutputDataSourceProperties is the properties that are associated -// with a DocumentDB output. +// MarshalJSON is the custom marshaler for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) MarshalJSON() ([]byte, error) { + ddods.Type = TypeMicrosoftStorageDocumentDB + type Alias DocumentDbOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ddods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return &ddods, true +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for DocumentDbOutputDataSource. +func (ddods DocumentDbOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// DocumentDbOutputDataSourceProperties is the properties that are associated with a DocumentDB output. type DocumentDbOutputDataSourceProperties struct { AccountID *string `json:"accountId,omitempty"` AccountKey *string `json:"accountKey,omitempty"` @@ -314,8 +840,7 @@ type ErrorResponse struct { Message *string `json:"message,omitempty"` } -// EventHubDataSourceProperties is the common properties that are associated -// with Event Hub data sources. +// EventHubDataSourceProperties is the common properties that are associated with Event Hub data sources. type EventHubDataSourceProperties struct { ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` @@ -325,11 +850,67 @@ type EventHubDataSourceProperties struct { // EventHubOutputDataSource is describes an Event Hub output data source. type EventHubOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` *EventHubOutputDataSourceProperties `json:"properties,omitempty"` } -// EventHubOutputDataSourceProperties is the properties that are associated -// with an Event Hub output. +// MarshalJSON is the custom marshaler for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) MarshalJSON() ([]byte, error) { + ehods.Type = TypeMicrosoftServiceBusEventHub + type Alias EventHubOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ehods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return &ehods, true +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for EventHubOutputDataSource. +func (ehods EventHubOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// EventHubOutputDataSourceProperties is the properties that are associated with an Event Hub output. type EventHubOutputDataSourceProperties struct { ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` @@ -338,14 +919,40 @@ type EventHubOutputDataSourceProperties struct { PartitionKey *string `json:"partitionKey,omitempty"` } -// EventHubStreamInputDataSource is describes an Event Hub input data source -// that contains stream data. +// EventHubStreamInputDataSource is describes an Event Hub input data source that contains stream data. type EventHubStreamInputDataSource struct { + Type TypeStreamInputDataSource `json:"type,omitempty"` *EventHubStreamInputDataSourceProperties `json:"properties,omitempty"` } -// EventHubStreamInputDataSourceProperties is the properties that are -// associated with a Event Hub input containing stream data. +// MarshalJSON is the custom marshaler for EventHubStreamInputDataSource. +func (ehsids EventHubStreamInputDataSource) MarshalJSON() ([]byte, error) { + ehsids.Type = TypeStreamInputDataSourceTypeMicrosoftServiceBusEventHub + type Alias EventHubStreamInputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ehsids), + }) +} + +// AsIoTHubStreamInputDataSource is the StreamInputDataSource implementation for EventHubStreamInputDataSource. +func (ehsids EventHubStreamInputDataSource) AsIoTHubStreamInputDataSource() (*IoTHubStreamInputDataSource, bool) { + return nil, false +} + +// AsEventHubStreamInputDataSource is the StreamInputDataSource implementation for EventHubStreamInputDataSource. +func (ehsids EventHubStreamInputDataSource) AsEventHubStreamInputDataSource() (*EventHubStreamInputDataSource, bool) { + return &ehsids, true +} + +// AsBlobStreamInputDataSource is the StreamInputDataSource implementation for EventHubStreamInputDataSource. +func (ehsids EventHubStreamInputDataSource) AsBlobStreamInputDataSource() (*BlobStreamInputDataSource, bool) { + return nil, false +} + +// EventHubStreamInputDataSourceProperties is the properties that are associated with a Event Hub input containing +// stream data. type EventHubStreamInputDataSourceProperties struct { ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` @@ -354,19 +961,111 @@ type EventHubStreamInputDataSourceProperties struct { ConsumerGroupName *string `json:"consumerGroupName,omitempty"` } -// Function is a function object, containing all information associated with -// the named function. All functions are contained under a streaming job. +// Function is a function object, containing all information associated with the named function. All functions are +// contained under a streaming job. type Function struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Properties *FunctionProperties `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Properties FunctionProperties `json:"properties,omitempty"` } -// FunctionBinding is the physical binding of the function. For example, in the -// Azure Machine Learning web service’s case, this describes the endpoint. -type FunctionBinding struct { +// UnmarshalJSON is the custom unmarshaler for Function struct. +func (f *Function) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalFunctionProperties(*m["properties"]) + if err != nil { + return err + } + f.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + f.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + f.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + f.Type = &typeVar + } + + return nil +} + +// FunctionBinding is the physical binding of the function. For example, in the Azure Machine Learning web service’s +// case, this describes the endpoint. +type FunctionBinding interface { + AsJavaScriptFunctionBinding() (*JavaScriptFunctionBinding, bool) + AsAzureMachineLearningWebServiceFunctionBinding() (*AzureMachineLearningWebServiceFunctionBinding, bool) +} + +func unmarshalFunctionBinding(body []byte) (FunctionBinding, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeMicrosoftStreamAnalyticsJavascriptUdf): + var jsfb JavaScriptFunctionBinding + err := json.Unmarshal(body, &jsfb) + return jsfb, err + case string(TypeMicrosoftMachineLearningWebService): + var amlwsfb AzureMachineLearningWebServiceFunctionBinding + err := json.Unmarshal(body, &amlwsfb) + return amlwsfb, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFunctionBindingArray(body []byte) ([]FunctionBinding, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fbArray := make([]FunctionBinding, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fb, err := unmarshalFunctionBinding(*rawMessage) + if err != nil { + return nil, err + } + fbArray[index] = fb + } + return fbArray, nil } // FunctionInput is describes one input parameter of a function. @@ -375,8 +1074,7 @@ type FunctionInput struct { IsConfigurationParameter *bool `json:"isConfigurationParameter,omitempty"` } -// FunctionListResult is object containing a list of functions under a -// streaming job. +// FunctionListResult is object containing a list of functions under a streaming job. type FunctionListResult struct { autorest.Response `json:"-"` Value *[]Function `json:"value,omitempty"` @@ -401,23 +1099,150 @@ type FunctionOutput struct { } // FunctionProperties is the properties that are associated with a function. -type FunctionProperties struct { - Etag *string `json:"etag,omitempty"` +type FunctionProperties interface { + AsScalarFunctionProperties() (*ScalarFunctionProperties, bool) } -// FunctionRetrieveDefaultDefinitionParameters is parameters used to specify -// the type of function to retrieve the default definition for. -type FunctionRetrieveDefaultDefinitionParameters struct { +func unmarshalFunctionProperties(body []byte) (FunctionProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeScalar): + var sfp ScalarFunctionProperties + err := json.Unmarshal(body, &sfp) + return sfp, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFunctionPropertiesArray(body []byte) ([]FunctionProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + fpArray := make([]FunctionProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + fp, err := unmarshalFunctionProperties(*rawMessage) + if err != nil { + return nil, err + } + fpArray[index] = fp + } + return fpArray, nil } -// Input is an input object, containing all information associated with the -// named input. All inputs are contained under a streaming job. +// FunctionRetrieveDefaultDefinitionParameters is parameters used to specify the type of function to retrieve the +// default definition for. +type FunctionRetrieveDefaultDefinitionParameters interface { + AsJavaScriptFunctionRetrieveDefaultDefinitionParameters() (*JavaScriptFunctionRetrieveDefaultDefinitionParameters, bool) + AsAzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters() (*AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, bool) +} + +func unmarshalFunctionRetrieveDefaultDefinitionParameters(body []byte) (FunctionRetrieveDefaultDefinitionParameters, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["bindingType"] { + case string(BindingTypeMicrosoftStreamAnalyticsJavascriptUdf): + var jsfrddp JavaScriptFunctionRetrieveDefaultDefinitionParameters + err := json.Unmarshal(body, &jsfrddp) + return jsfrddp, err + case string(BindingTypeMicrosoftMachineLearningWebService): + var amlwsfrddp AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters + err := json.Unmarshal(body, &amlwsfrddp) + return amlwsfrddp, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalFunctionRetrieveDefaultDefinitionParametersArray(body []byte) ([]FunctionRetrieveDefaultDefinitionParameters, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + frddpArray := make([]FunctionRetrieveDefaultDefinitionParameters, len(rawMessages)) + + for index, rawMessage := range rawMessages { + frddp, err := unmarshalFunctionRetrieveDefaultDefinitionParameters(*rawMessage) + if err != nil { + return nil, err + } + frddpArray[index] = frddp + } + return frddpArray, nil +} + +// Input is an input object, containing all information associated with the named input. All inputs are contained under +// a streaming job. type Input struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` - Properties *InputProperties `json:"properties,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + Properties InputProperties `json:"properties,omitempty"` +} + +// UnmarshalJSON is the custom unmarshaler for Input struct. +func (i *Input) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["properties"] + if v != nil { + properties, err := unmarshalInputProperties(*m["properties"]) + if err != nil { + return err + } + i.Properties = properties + } + + v = m["id"] + if v != nil { + var ID string + err = json.Unmarshal(*m["id"], &ID) + if err != nil { + return err + } + i.ID = &ID + } + + v = m["name"] + if v != nil { + var name string + err = json.Unmarshal(*m["name"], &name) + if err != nil { + return err + } + i.Name = &name + } + + v = m["type"] + if v != nil { + var typeVar string + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + i.Type = &typeVar + } + + return nil } // InputListResult is object containing a list of inputs under a streaming job. @@ -440,20 +1265,84 @@ func (client InputListResult) InputListResultPreparer() (*http.Request, error) { } // InputProperties is the properties that are associated with an input. -type InputProperties struct { - Serialization *Serialization `json:"serialization,omitempty"` - Diagnostics *Diagnostics `json:"diagnostics,omitempty"` - Etag *string `json:"etag,omitempty"` +type InputProperties interface { + AsReferenceInputProperties() (*ReferenceInputProperties, bool) + AsStreamInputProperties() (*StreamInputProperties, bool) } -// IoTHubStreamInputDataSource is describes an IoT Hub input data source that -// contains stream data. +func unmarshalInputProperties(body []byte) (InputProperties, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeReference): + var rip ReferenceInputProperties + err := json.Unmarshal(body, &rip) + return rip, err + case string(TypeStream): + var sip StreamInputProperties + err := json.Unmarshal(body, &sip) + return sip, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalInputPropertiesArray(body []byte) ([]InputProperties, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + IPArray := make([]InputProperties, len(rawMessages)) + + for index, rawMessage := range rawMessages { + IP, err := unmarshalInputProperties(*rawMessage) + if err != nil { + return nil, err + } + IPArray[index] = IP + } + return IPArray, nil +} + +// IoTHubStreamInputDataSource is describes an IoT Hub input data source that contains stream data. type IoTHubStreamInputDataSource struct { + Type TypeStreamInputDataSource `json:"type,omitempty"` *IoTHubStreamInputDataSourceProperties `json:"properties,omitempty"` } -// IoTHubStreamInputDataSourceProperties is the properties that are associated -// with a IoT Hub input containing stream data. +// MarshalJSON is the custom marshaler for IoTHubStreamInputDataSource. +func (ithsids IoTHubStreamInputDataSource) MarshalJSON() ([]byte, error) { + ithsids.Type = TypeStreamInputDataSourceTypeMicrosoftDevicesIotHubs + type Alias IoTHubStreamInputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ithsids), + }) +} + +// AsIoTHubStreamInputDataSource is the StreamInputDataSource implementation for IoTHubStreamInputDataSource. +func (ithsids IoTHubStreamInputDataSource) AsIoTHubStreamInputDataSource() (*IoTHubStreamInputDataSource, bool) { + return &ithsids, true +} + +// AsEventHubStreamInputDataSource is the StreamInputDataSource implementation for IoTHubStreamInputDataSource. +func (ithsids IoTHubStreamInputDataSource) AsEventHubStreamInputDataSource() (*EventHubStreamInputDataSource, bool) { + return nil, false +} + +// AsBlobStreamInputDataSource is the StreamInputDataSource implementation for IoTHubStreamInputDataSource. +func (ithsids IoTHubStreamInputDataSource) AsBlobStreamInputDataSource() (*BlobStreamInputDataSource, bool) { + return nil, false +} + +// IoTHubStreamInputDataSourceProperties is the properties that are associated with a IoT Hub input containing stream +// data. type IoTHubStreamInputDataSourceProperties struct { IotHubNamespace *string `json:"iotHubNamespace,omitempty"` SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` @@ -464,50 +1353,125 @@ type IoTHubStreamInputDataSourceProperties struct { // JavaScriptFunctionBinding is the binding to a JavaScript function. type JavaScriptFunctionBinding struct { + Type TypeFunctionBinding `json:"type,omitempty"` *JavaScriptFunctionBindingProperties `json:"properties,omitempty"` } -// JavaScriptFunctionBindingProperties is the binding properties associated -// with a JavaScript function. +// MarshalJSON is the custom marshaler for JavaScriptFunctionBinding. +func (jsfb JavaScriptFunctionBinding) MarshalJSON() ([]byte, error) { + jsfb.Type = TypeMicrosoftStreamAnalyticsJavascriptUdf + type Alias JavaScriptFunctionBinding + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(jsfb), + }) +} + +// AsJavaScriptFunctionBinding is the FunctionBinding implementation for JavaScriptFunctionBinding. +func (jsfb JavaScriptFunctionBinding) AsJavaScriptFunctionBinding() (*JavaScriptFunctionBinding, bool) { + return &jsfb, true +} + +// AsAzureMachineLearningWebServiceFunctionBinding is the FunctionBinding implementation for JavaScriptFunctionBinding. +func (jsfb JavaScriptFunctionBinding) AsAzureMachineLearningWebServiceFunctionBinding() (*AzureMachineLearningWebServiceFunctionBinding, bool) { + return nil, false +} + +// JavaScriptFunctionBindingProperties is the binding properties associated with a JavaScript function. type JavaScriptFunctionBindingProperties struct { Script *string `json:"script,omitempty"` } -// JavaScriptFunctionBindingRetrievalProperties is the binding retrieval -// properties associated with a JavaScript function. +// JavaScriptFunctionBindingRetrievalProperties is the binding retrieval properties associated with a JavaScript +// function. type JavaScriptFunctionBindingRetrievalProperties struct { Script *string `json:"script,omitempty"` UdfType UdfType `json:"udfType,omitempty"` } -// JavaScriptFunctionRetrieveDefaultDefinitionParameters is the parameters -// needed to retrieve the default function definition for a JavaScript -// function. +// JavaScriptFunctionRetrieveDefaultDefinitionParameters is the parameters needed to retrieve the default function +// definition for a JavaScript function. type JavaScriptFunctionRetrieveDefaultDefinitionParameters struct { + BindingType BindingType `json:"bindingType,omitempty"` *JavaScriptFunctionBindingRetrievalProperties `json:"bindingRetrievalProperties,omitempty"` } -// JSONSerialization is describes how data from an input is serialized or how -// data is serialized when written to an output in JSON format. +// MarshalJSON is the custom marshaler for JavaScriptFunctionRetrieveDefaultDefinitionParameters. +func (jsfrddp JavaScriptFunctionRetrieveDefaultDefinitionParameters) MarshalJSON() ([]byte, error) { + jsfrddp.BindingType = BindingTypeMicrosoftStreamAnalyticsJavascriptUdf + type Alias JavaScriptFunctionRetrieveDefaultDefinitionParameters + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(jsfrddp), + }) +} + +// AsJavaScriptFunctionRetrieveDefaultDefinitionParameters is the FunctionRetrieveDefaultDefinitionParameters implementation for JavaScriptFunctionRetrieveDefaultDefinitionParameters. +func (jsfrddp JavaScriptFunctionRetrieveDefaultDefinitionParameters) AsJavaScriptFunctionRetrieveDefaultDefinitionParameters() (*JavaScriptFunctionRetrieveDefaultDefinitionParameters, bool) { + return &jsfrddp, true +} + +// AsAzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters is the FunctionRetrieveDefaultDefinitionParameters implementation for JavaScriptFunctionRetrieveDefaultDefinitionParameters. +func (jsfrddp JavaScriptFunctionRetrieveDefaultDefinitionParameters) AsAzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters() (*AzureMachineLearningWebServiceFunctionRetrieveDefaultDefinitionParameters, bool) { + return nil, false +} + +// JSONSerialization is describes how data from an input is serialized or how data is serialized when written to an +// output in JSON format. type JSONSerialization struct { + Type Type `json:"type,omitempty"` *JSONSerializationProperties `json:"properties,omitempty"` } -// JSONSerializationProperties is the properties that are associated with the -// JSON serialization type. +// MarshalJSON is the custom marshaler for JSONSerialization. +func (js JSONSerialization) MarshalJSON() ([]byte, error) { + js.Type = TypeJSON + type Alias JSONSerialization + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(js), + }) +} + +// AsAvroSerialization is the Serialization implementation for JSONSerialization. +func (js JSONSerialization) AsAvroSerialization() (*AvroSerialization, bool) { + return nil, false +} + +// AsJSONSerialization is the Serialization implementation for JSONSerialization. +func (js JSONSerialization) AsJSONSerialization() (*JSONSerialization, bool) { + return &js, true +} + +// AsCsvSerialization is the Serialization implementation for JSONSerialization. +func (js JSONSerialization) AsCsvSerialization() (*CsvSerialization, bool) { + return nil, false +} + +// JSONSerializationProperties is the properties that are associated with the JSON serialization type. type JSONSerializationProperties struct { Encoding Encoding `json:"encoding,omitempty"` Format JSONOutputSerializationFormat `json:"format,omitempty"` } +// OAuthBasedDataSourceProperties is the properties that are associated with data sources that use OAuth as their +// authentication model. +type OAuthBasedDataSourceProperties struct { + RefreshToken *string `json:"refreshToken,omitempty"` + TokenUserPrincipalName *string `json:"tokenUserPrincipalName,omitempty"` + TokenUserDisplayName *string `json:"tokenUserDisplayName,omitempty"` +} + // Operation is a Stream Analytics REST API operation type Operation struct { Name *string `json:"name,omitempty"` Display *OperationDisplay `json:"display,omitempty"` } -// OperationDisplay is contains the localized display information for this -// particular operation / action. +// OperationDisplay is contains the localized display information for this particular operation / action. type OperationDisplay struct { Provider *string `json:"provider,omitempty"` Resource *string `json:"resource,omitempty"` @@ -515,9 +1479,8 @@ type OperationDisplay struct { Description *string `json:"description,omitempty"` } -// OperationListResult is result of the request to list Stream Analytics -// operations. It contains a list of operations and a URL link to get the next -// set of results. +// OperationListResult is result of the request to list Stream Analytics operations. It contains a list of operations +// and a URL link to get the next set of results. type OperationListResult struct { autorest.Response `json:"-"` Value *[]Operation `json:"value,omitempty"` @@ -536,8 +1499,8 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request, autorest.WithBaseURL(to.String(client.NextLink))) } -// Output is an output object, containing all information associated with the -// named output. All outputs are contained under a streaming job. +// Output is an output object, containing all information associated with the named output. All outputs are contained +// under a streaming job. type Output struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -546,13 +1509,87 @@ type Output struct { *OutputProperties `json:"properties,omitempty"` } -// OutputDataSource is describes the data source that output will be written -// to. -type OutputDataSource struct { +// OutputDataSource is describes the data source that output will be written to. +type OutputDataSource interface { + AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) + AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) + AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) + AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) + AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) + AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) + AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) + AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) + AsBlobOutputDataSource() (*BlobOutputDataSource, bool) } -// OutputListResult is object containing a list of outputs under a streaming -// job. +func unmarshalOutputDataSource(body []byte) (OutputDataSource, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeMicrosoftDataLakeAccounts): + var adlsods AzureDataLakeStoreOutputDataSource + err := json.Unmarshal(body, &adlsods) + return adlsods, err + case string(TypePowerBI): + var pbods PowerBIOutputDataSource + err := json.Unmarshal(body, &pbods) + return pbods, err + case string(TypeMicrosoftServiceBusTopic): + var sbtods ServiceBusTopicOutputDataSource + err := json.Unmarshal(body, &sbtods) + return sbtods, err + case string(TypeMicrosoftServiceBusQueue): + var sbqods ServiceBusQueueOutputDataSource + err := json.Unmarshal(body, &sbqods) + return sbqods, err + case string(TypeMicrosoftStorageDocumentDB): + var ddods DocumentDbOutputDataSource + err := json.Unmarshal(body, &ddods) + return ddods, err + case string(TypeMicrosoftSQLServerDatabase): + var asdods AzureSQLDatabaseOutputDataSource + err := json.Unmarshal(body, &asdods) + return asdods, err + case string(TypeMicrosoftServiceBusEventHub): + var ehods EventHubOutputDataSource + err := json.Unmarshal(body, &ehods) + return ehods, err + case string(TypeMicrosoftStorageTable): + var atods AzureTableOutputDataSource + err := json.Unmarshal(body, &atods) + return atods, err + case string(TypeMicrosoftStorageBlob): + var bods BlobOutputDataSource + err := json.Unmarshal(body, &bods) + return bods, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalOutputDataSourceArray(body []byte) ([]OutputDataSource, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + odsArray := make([]OutputDataSource, len(rawMessages)) + + for index, rawMessage := range rawMessages { + ods, err := unmarshalOutputDataSource(*rawMessage) + if err != nil { + return nil, err + } + odsArray[index] = ods + } + return odsArray, nil +} + +// OutputListResult is object containing a list of outputs under a streaming job. type OutputListResult struct { autorest.Response `json:"-"` Value *[]Output `json:"value,omitempty"` @@ -573,24 +1610,263 @@ func (client OutputListResult) OutputListResultPreparer() (*http.Request, error) // OutputProperties is the properties that are associated with an output. type OutputProperties struct { - Datasource *OutputDataSource `json:"datasource,omitempty"` - Serialization *Serialization `json:"serialization,omitempty"` - Diagnostics *Diagnostics `json:"diagnostics,omitempty"` - Etag *string `json:"etag,omitempty"` + Datasource OutputDataSource `json:"datasource,omitempty"` + Serialization Serialization `json:"serialization,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` } -// ReferenceInputDataSource is describes an input data source that contains -// reference data. -type ReferenceInputDataSource struct { +// UnmarshalJSON is the custom unmarshaler for OutputProperties struct. +func (op *OutputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["datasource"] + if v != nil { + datasource, err := unmarshalOutputDataSource(*m["datasource"]) + if err != nil { + return err + } + op.Datasource = datasource + } + + v = m["serialization"] + if v != nil { + serialization, err := unmarshalSerialization(*m["serialization"]) + if err != nil { + return err + } + op.Serialization = serialization + } + + v = m["diagnostics"] + if v != nil { + var diagnostics Diagnostics + err = json.Unmarshal(*m["diagnostics"], &diagnostics) + if err != nil { + return err + } + op.Diagnostics = &diagnostics + } + + v = m["etag"] + if v != nil { + var etag string + err = json.Unmarshal(*m["etag"], &etag) + if err != nil { + return err + } + op.Etag = &etag + } + + return nil } -// ReferenceInputProperties is the properties that are associated with an input -// containing reference data. +// PowerBIOutputDataSource is describes a Power BI output data source. +type PowerBIOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` + *PowerBIOutputDataSourceProperties `json:"properties,omitempty"` +} + +// MarshalJSON is the custom marshaler for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) MarshalJSON() ([]byte, error) { + pbods.Type = TypePowerBI + type Alias PowerBIOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(pbods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return &pbods, true +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for PowerBIOutputDataSource. +func (pbods PowerBIOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// PowerBIOutputDataSourceProperties is the properties that are associated with a Power BI output. +type PowerBIOutputDataSourceProperties struct { + RefreshToken *string `json:"refreshToken,omitempty"` + TokenUserPrincipalName *string `json:"tokenUserPrincipalName,omitempty"` + TokenUserDisplayName *string `json:"tokenUserDisplayName,omitempty"` + Dataset *string `json:"dataset,omitempty"` + Table *string `json:"table,omitempty"` + GroupID *string `json:"groupId,omitempty"` + GroupName *string `json:"groupName,omitempty"` +} + +// ReferenceInputDataSource is describes an input data source that contains reference data. +type ReferenceInputDataSource interface { + AsBlobReferenceInputDataSource() (*BlobReferenceInputDataSource, bool) +} + +func unmarshalReferenceInputDataSource(body []byte) (ReferenceInputDataSource, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeReferenceInputDataSourceTypeMicrosoftStorageBlob): + var brids BlobReferenceInputDataSource + err := json.Unmarshal(body, &brids) + return brids, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalReferenceInputDataSourceArray(body []byte) ([]ReferenceInputDataSource, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + ridsArray := make([]ReferenceInputDataSource, len(rawMessages)) + + for index, rawMessage := range rawMessages { + rids, err := unmarshalReferenceInputDataSource(*rawMessage) + if err != nil { + return nil, err + } + ridsArray[index] = rids + } + return ridsArray, nil +} + +// ReferenceInputProperties is the properties that are associated with an input containing reference data. type ReferenceInputProperties struct { - Serialization *Serialization `json:"serialization,omitempty"` - Diagnostics *Diagnostics `json:"diagnostics,omitempty"` - Etag *string `json:"etag,omitempty"` - Datasource *ReferenceInputDataSource `json:"datasource,omitempty"` + Serialization Serialization `json:"serialization,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + Type TypeInputProperties `json:"type,omitempty"` + Datasource ReferenceInputDataSource `json:"datasource,omitempty"` +} + +// MarshalJSON is the custom marshaler for ReferenceInputProperties. +func (rip ReferenceInputProperties) MarshalJSON() ([]byte, error) { + rip.Type = TypeReference + type Alias ReferenceInputProperties + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(rip), + }) +} + +// AsReferenceInputProperties is the InputProperties implementation for ReferenceInputProperties. +func (rip ReferenceInputProperties) AsReferenceInputProperties() (*ReferenceInputProperties, bool) { + return &rip, true +} + +// AsStreamInputProperties is the InputProperties implementation for ReferenceInputProperties. +func (rip ReferenceInputProperties) AsStreamInputProperties() (*StreamInputProperties, bool) { + return nil, false +} + +// UnmarshalJSON is the custom unmarshaler for ReferenceInputProperties struct. +func (rip *ReferenceInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["datasource"] + if v != nil { + datasource, err := unmarshalReferenceInputDataSource(*m["datasource"]) + if err != nil { + return err + } + rip.Datasource = datasource + } + + v = m["serialization"] + if v != nil { + serialization, err := unmarshalSerialization(*m["serialization"]) + if err != nil { + return err + } + rip.Serialization = serialization + } + + v = m["diagnostics"] + if v != nil { + var diagnostics Diagnostics + err = json.Unmarshal(*m["diagnostics"], &diagnostics) + if err != nil { + return err + } + rip.Diagnostics = &diagnostics + } + + v = m["etag"] + if v != nil { + var etag string + err = json.Unmarshal(*m["etag"], &etag) + if err != nil { + return err + } + rip.Etag = &etag + } + + v = m["type"] + if v != nil { + var typeVar TypeInputProperties + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + rip.Type = typeVar + } + + return nil } // Resource is the base resource model definition. @@ -602,50 +1878,205 @@ type Resource struct { Tags *map[string]*string `json:"tags,omitempty"` } -// ResourceTestStatus is describes the status of the test operation along with -// error information, if applicable. +// ResourceTestStatus is describes the status of the test operation along with error information, if applicable. type ResourceTestStatus struct { autorest.Response `json:"-"` Status *string `json:"status,omitempty"` Error *ErrorResponse `json:"error,omitempty"` } -// ScalarFunctionConfiguration is describes the configuration of the scalar -// function. +// ScalarFunctionConfiguration is describes the configuration of the scalar function. type ScalarFunctionConfiguration struct { Inputs *[]FunctionInput `json:"inputs,omitempty"` Output *FunctionOutput `json:"output,omitempty"` - Binding *FunctionBinding `json:"binding,omitempty"` + Binding FunctionBinding `json:"binding,omitempty"` } -// ScalarFunctionProperties is the properties that are associated with a scalar -// function. +// UnmarshalJSON is the custom unmarshaler for ScalarFunctionConfiguration struct. +func (sfc *ScalarFunctionConfiguration) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["inputs"] + if v != nil { + var inputs []FunctionInput + err = json.Unmarshal(*m["inputs"], &inputs) + if err != nil { + return err + } + sfc.Inputs = &inputs + } + + v = m["output"] + if v != nil { + var output FunctionOutput + err = json.Unmarshal(*m["output"], &output) + if err != nil { + return err + } + sfc.Output = &output + } + + v = m["binding"] + if v != nil { + binding, err := unmarshalFunctionBinding(*m["binding"]) + if err != nil { + return err + } + sfc.Binding = binding + } + + return nil +} + +// ScalarFunctionProperties is the properties that are associated with a scalar function. type ScalarFunctionProperties struct { - Etag *string `json:"etag,omitempty"` + Etag *string `json:"etag,omitempty"` + Type TypeFunctionProperties `json:"type,omitempty"` *ScalarFunctionConfiguration `json:"properties,omitempty"` } -// Serialization is describes how data from an input is serialized or how data -// is serialized when written to an output. -type Serialization struct { +// MarshalJSON is the custom marshaler for ScalarFunctionProperties. +func (sfp ScalarFunctionProperties) MarshalJSON() ([]byte, error) { + sfp.Type = TypeScalar + type Alias ScalarFunctionProperties + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(sfp), + }) } -// ServiceBusDataSourceProperties is the common properties that are associated -// with Service Bus data sources (Queues, Topics, Event Hubs, etc.). +// AsScalarFunctionProperties is the FunctionProperties implementation for ScalarFunctionProperties. +func (sfp ScalarFunctionProperties) AsScalarFunctionProperties() (*ScalarFunctionProperties, bool) { + return &sfp, true +} + +// Serialization is describes how data from an input is serialized or how data is serialized when written to an output. +type Serialization interface { + AsAvroSerialization() (*AvroSerialization, bool) + AsJSONSerialization() (*JSONSerialization, bool) + AsCsvSerialization() (*CsvSerialization, bool) +} + +func unmarshalSerialization(body []byte) (Serialization, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeAvro): + var as AvroSerialization + err := json.Unmarshal(body, &as) + return as, err + case string(TypeJSON): + var js JSONSerialization + err := json.Unmarshal(body, &js) + return js, err + case string(TypeCsv): + var cs CsvSerialization + err := json.Unmarshal(body, &cs) + return cs, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalSerializationArray(body []byte) ([]Serialization, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sArray := make([]Serialization, len(rawMessages)) + + for index, rawMessage := range rawMessages { + s, err := unmarshalSerialization(*rawMessage) + if err != nil { + return nil, err + } + sArray[index] = s + } + return sArray, nil +} + +// ServiceBusDataSourceProperties is the common properties that are associated with Service Bus data sources (Queues, +// Topics, Event Hubs, etc.). type ServiceBusDataSourceProperties struct { ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` SharedAccessPolicyKey *string `json:"sharedAccessPolicyKey,omitempty"` } -// ServiceBusQueueOutputDataSource is describes a Service Bus Queue data -// source. +// ServiceBusQueueOutputDataSource is describes a Service Bus Queue output data source. type ServiceBusQueueOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` *ServiceBusQueueOutputDataSourceProperties `json:"properties,omitempty"` } -// ServiceBusQueueOutputDataSourceProperties is the properties that are -// associated with a Service Bus Queue output. +// MarshalJSON is the custom marshaler for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) MarshalJSON() ([]byte, error) { + sbqods.Type = TypeMicrosoftServiceBusQueue + type Alias ServiceBusQueueOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(sbqods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return &sbqods, true +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for ServiceBusQueueOutputDataSource. +func (sbqods ServiceBusQueueOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// ServiceBusQueueOutputDataSourceProperties is the properties that are associated with a Service Bus Queue output. type ServiceBusQueueOutputDataSourceProperties struct { ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` @@ -654,14 +2085,69 @@ type ServiceBusQueueOutputDataSourceProperties struct { PropertyColumns *[]string `json:"propertyColumns,omitempty"` } -// ServiceBusTopicOutputDataSource is describes a Service Bus Topic data -// source. +// ServiceBusTopicOutputDataSource is describes a Service Bus Topic output data source. type ServiceBusTopicOutputDataSource struct { + Type TypeOutputDataSource `json:"type,omitempty"` *ServiceBusTopicOutputDataSourceProperties `json:"properties,omitempty"` } -// ServiceBusTopicOutputDataSourceProperties is the properties that are -// associated with a Service Bus Topic output. +// MarshalJSON is the custom marshaler for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) MarshalJSON() ([]byte, error) { + sbtods.Type = TypeMicrosoftServiceBusTopic + type Alias ServiceBusTopicOutputDataSource + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(sbtods), + }) +} + +// AsAzureDataLakeStoreOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsAzureDataLakeStoreOutputDataSource() (*AzureDataLakeStoreOutputDataSource, bool) { + return nil, false +} + +// AsPowerBIOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsPowerBIOutputDataSource() (*PowerBIOutputDataSource, bool) { + return nil, false +} + +// AsServiceBusTopicOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsServiceBusTopicOutputDataSource() (*ServiceBusTopicOutputDataSource, bool) { + return &sbtods, true +} + +// AsServiceBusQueueOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsServiceBusQueueOutputDataSource() (*ServiceBusQueueOutputDataSource, bool) { + return nil, false +} + +// AsDocumentDbOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsDocumentDbOutputDataSource() (*DocumentDbOutputDataSource, bool) { + return nil, false +} + +// AsAzureSQLDatabaseOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsAzureSQLDatabaseOutputDataSource() (*AzureSQLDatabaseOutputDataSource, bool) { + return nil, false +} + +// AsEventHubOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsEventHubOutputDataSource() (*EventHubOutputDataSource, bool) { + return nil, false +} + +// AsAzureTableOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsAzureTableOutputDataSource() (*AzureTableOutputDataSource, bool) { + return nil, false +} + +// AsBlobOutputDataSource is the OutputDataSource implementation for ServiceBusTopicOutputDataSource. +func (sbtods ServiceBusTopicOutputDataSource) AsBlobOutputDataSource() (*BlobOutputDataSource, bool) { + return nil, false +} + +// ServiceBusTopicOutputDataSourceProperties is the properties that are associated with a Service Bus Topic output. type ServiceBusTopicOutputDataSourceProperties struct { ServiceBusNamespace *string `json:"serviceBusNamespace,omitempty"` SharedAccessPolicyName *string `json:"sharedAccessPolicyName,omitempty"` @@ -675,22 +2161,19 @@ type Sku struct { Name SkuName `json:"name,omitempty"` } -// StartStreamingJobParameters is parameters supplied to the Start Streaming -// Job operation. +// StartStreamingJobParameters is parameters supplied to the Start Streaming Job operation. type StartStreamingJobParameters struct { OutputStartMode OutputStartMode `json:"outputStartMode,omitempty"` OutputStartTime *date.Time `json:"outputStartTime,omitempty"` } -// StorageAccount is the properties that are associated with an Azure Storage -// account +// StorageAccount is the properties that are associated with an Azure Storage account type StorageAccount struct { AccountName *string `json:"accountName,omitempty"` AccountKey *string `json:"accountKey,omitempty"` } -// StreamingJob is a streamng job object, containing all information associated -// with the named streaming job. +// StreamingJob is a streamng job object, containing all information associated with the named streaming job. type StreamingJob struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -720,8 +2203,7 @@ func (client StreamingJobListResult) StreamingJobListResultPreparer() (*http.Req autorest.WithBaseURL(to.String(client.NextLink))) } -// StreamingJobProperties is the properties that are associated with a -// streaming job. +// StreamingJobProperties is the properties that are associated with a streaming job. type StreamingJobProperties struct { Sku *Sku `json:"sku,omitempty"` JobID *string `json:"jobId,omitempty"` @@ -744,18 +2226,144 @@ type StreamingJobProperties struct { Etag *string `json:"etag,omitempty"` } -// StreamInputDataSource is describes an input data source that contains stream -// data. -type StreamInputDataSource struct { +// StreamInputDataSource is describes an input data source that contains stream data. +type StreamInputDataSource interface { + AsIoTHubStreamInputDataSource() (*IoTHubStreamInputDataSource, bool) + AsEventHubStreamInputDataSource() (*EventHubStreamInputDataSource, bool) + AsBlobStreamInputDataSource() (*BlobStreamInputDataSource, bool) } -// StreamInputProperties is the properties that are associated with an input -// containing stream data. +func unmarshalStreamInputDataSource(body []byte) (StreamInputDataSource, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["type"] { + case string(TypeStreamInputDataSourceTypeMicrosoftDevicesIotHubs): + var ithsids IoTHubStreamInputDataSource + err := json.Unmarshal(body, &ithsids) + return ithsids, err + case string(TypeStreamInputDataSourceTypeMicrosoftServiceBusEventHub): + var ehsids EventHubStreamInputDataSource + err := json.Unmarshal(body, &ehsids) + return ehsids, err + case string(TypeStreamInputDataSourceTypeMicrosoftStorageBlob): + var bsids BlobStreamInputDataSource + err := json.Unmarshal(body, &bsids) + return bsids, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalStreamInputDataSourceArray(body []byte) ([]StreamInputDataSource, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + sidsArray := make([]StreamInputDataSource, len(rawMessages)) + + for index, rawMessage := range rawMessages { + sids, err := unmarshalStreamInputDataSource(*rawMessage) + if err != nil { + return nil, err + } + sidsArray[index] = sids + } + return sidsArray, nil +} + +// StreamInputProperties is the properties that are associated with an input containing stream data. type StreamInputProperties struct { - Serialization *Serialization `json:"serialization,omitempty"` - Diagnostics *Diagnostics `json:"diagnostics,omitempty"` - Etag *string `json:"etag,omitempty"` - Datasource *StreamInputDataSource `json:"datasource,omitempty"` + Serialization Serialization `json:"serialization,omitempty"` + Diagnostics *Diagnostics `json:"diagnostics,omitempty"` + Etag *string `json:"etag,omitempty"` + Type TypeInputProperties `json:"type,omitempty"` + Datasource StreamInputDataSource `json:"datasource,omitempty"` +} + +// MarshalJSON is the custom marshaler for StreamInputProperties. +func (sip StreamInputProperties) MarshalJSON() ([]byte, error) { + sip.Type = TypeStream + type Alias StreamInputProperties + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(sip), + }) +} + +// AsReferenceInputProperties is the InputProperties implementation for StreamInputProperties. +func (sip StreamInputProperties) AsReferenceInputProperties() (*ReferenceInputProperties, bool) { + return nil, false +} + +// AsStreamInputProperties is the InputProperties implementation for StreamInputProperties. +func (sip StreamInputProperties) AsStreamInputProperties() (*StreamInputProperties, bool) { + return &sip, true +} + +// UnmarshalJSON is the custom unmarshaler for StreamInputProperties struct. +func (sip *StreamInputProperties) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["datasource"] + if v != nil { + datasource, err := unmarshalStreamInputDataSource(*m["datasource"]) + if err != nil { + return err + } + sip.Datasource = datasource + } + + v = m["serialization"] + if v != nil { + serialization, err := unmarshalSerialization(*m["serialization"]) + if err != nil { + return err + } + sip.Serialization = serialization + } + + v = m["diagnostics"] + if v != nil { + var diagnostics Diagnostics + err = json.Unmarshal(*m["diagnostics"], &diagnostics) + if err != nil { + return err + } + sip.Diagnostics = &diagnostics + } + + v = m["etag"] + if v != nil { + var etag string + err = json.Unmarshal(*m["etag"], &etag) + if err != nil { + return err + } + sip.Etag = &etag + } + + v = m["type"] + if v != nil { + var typeVar TypeInputProperties + err = json.Unmarshal(*m["type"], &typeVar) + if err != nil { + return err + } + sip.Type = typeVar + } + + return nil } // SubResource is the base sub-resource model definition. @@ -779,16 +2387,15 @@ type SubscriptionQuotaProperties struct { CurrentCount *int32 `json:"currentCount,omitempty"` } -// SubscriptionQuotasListResult is result of the GetQuotas operation. It -// contains a list of quotas for the subscription in a particular region. +// SubscriptionQuotasListResult is result of the GetQuotas operation. It contains a list of quotas for the subscription +// in a particular region. type SubscriptionQuotasListResult struct { autorest.Response `json:"-"` Value *[]SubscriptionQuota `json:"value,omitempty"` } -// Transformation is a transformation object, containing all information -// associated with the named transformation. All transformations are contained -// under a streaming job. +// Transformation is a transformation object, containing all information associated with the named transformation. All +// transformations are contained under a streaming job. type Transformation struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -797,8 +2404,7 @@ type Transformation struct { *TransformationProperties `json:"properties,omitempty"` } -// TransformationProperties is the properties that are associated with a -// transformation. +// TransformationProperties is the properties that are associated with a transformation. type TransformationProperties struct { StreamingUnits *int32 `json:"streamingUnits,omitempty"` Query *string `json:"query,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/operations.go index dc0c7814d..36e6324bd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/operations.go @@ -14,9 +14,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// OperationsClient is the composite Swagger for Stream Analytics Client +// OperationsClient is the stream Analytics Client type OperationsClient struct { ManagementClient } @@ -34,8 +33,7 @@ func NewOperationsClient(subscriptionID string) OperationsClient { return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewOperationsClientWithBaseURI creates an instance of the OperationsClient -// client. +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/outputs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/outputs.go index e26a22c93..4a53330cc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/outputs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/outputs.go @@ -14,9 +14,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// OutputsClient is the composite Swagger for Stream Analytics Client +// OutputsClient is the stream Analytics Client type OutputsClient struct { ManagementClient } @@ -39,19 +38,15 @@ func NewOutputsClientWithBaseURI(baseURI string, subscriptionID string) OutputsC return OutputsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrReplace creates an output or replaces an already existing output -// under an existing streaming job. +// CreateOrReplace creates an output or replaces an already existing output under an existing streaming job. // -// output is the definition of the output that will be used to create a new -// output or replace the existing one under the streaming job. -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. outputName is the name -// of the output. ifMatch is the ETag of the output. Omit this value to always -// overwrite the current output. Specify the last-seen ETag value to prevent -// accidentally overwritting concurrent changes. ifNoneMatch is set to '*' to -// allow a new output to be created, but to prevent updating an existing -// output. Other values will result in a 412 Pre-condition Failed response. +// output is the definition of the output that will be used to create a new output or replace the existing one under +// the streaming job. resourceGroupName is the name of the resource group that contains the resource. You can obtain +// this value from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. outputName +// is the name of the output. ifMatch is the ETag of the output. Omit this value to always overwrite the current +// output. Specify the last-seen ETag value to prevent accidentally overwritting concurrent changes. ifNoneMatch is set +// to '*' to allow a new output to be created, but to prevent updating an existing output. Other values will result in +// a 412 Pre-condition Failed response. func (client OutputsClient) CreateOrReplace(output Output, resourceGroupName string, jobName string, outputName string, ifMatch string, ifNoneMatch string) (result Output, err error) { req, err := client.CreateOrReplacePreparer(output, resourceGroupName, jobName, outputName, ifMatch, ifNoneMatch) if err != nil { @@ -127,10 +122,9 @@ func (client OutputsClient) CreateOrReplaceResponder(resp *http.Response) (resul // Delete deletes an output from the streaming job. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. outputName is the name -// of the output. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. outputName is the name of the +// output. func (client OutputsClient) Delete(resourceGroupName string, jobName string, outputName string) (result autorest.Response, err error) { req, err := client.DeletePreparer(resourceGroupName, jobName, outputName) if err != nil { @@ -195,10 +189,9 @@ func (client OutputsClient) DeleteResponder(resp *http.Response) (result autores // Get gets details about the specified output. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. outputName is the name -// of the output. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. outputName is the name of the +// output. func (client OutputsClient) Get(resourceGroupName string, jobName string, outputName string) (result Output, err error) { req, err := client.GetPreparer(resourceGroupName, jobName, outputName) if err != nil { @@ -262,16 +255,13 @@ func (client OutputsClient) GetResponder(resp *http.Response) (result Output, er return } -// ListByStreamingJob lists all of the outputs under the specified streaming -// job. +// ListByStreamingJob lists all of the outputs under the specified streaming job. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. selectParameter is the -// $select OData query parameter. This is a comma-separated list of structural -// properties to include in the response, or “*” to include all properties. By -// default, all properties are returned except diagnostics. Currently only -// accepts '*' as a valid value. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. selectParameter is the $select +// OData query parameter. This is a comma-separated list of structural properties to include in the response, or “*” to +// include all properties. By default, all properties are returned except diagnostics. Currently only accepts '*' as a +// valid value. func (client OutputsClient) ListByStreamingJob(resourceGroupName string, jobName string, selectParameter string) (result OutputListResult, err error) { req, err := client.ListByStreamingJobPreparer(resourceGroupName, jobName, selectParameter) if err != nil { @@ -406,20 +396,16 @@ func (client OutputsClient) ListByStreamingJobComplete(resourceGroupName string, return resultChan, errChan } -// Test tests whether an output’s datasource is reachable and usable by the -// Azure Stream Analytics service. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Test tests whether an output’s datasource is reachable and usable by the Azure Stream Analytics service. This method +// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. outputName is the name -// of the output. output is if the output specified does not already exist, -// this parameter must contain the full output definition intended to be -// tested. If the output specified already exists, this parameter can be left -// null to test the existing output as is or if specified, the properties -// specified will overwrite the corresponding properties in the existing output -// (exactly like a PATCH operation) and the resulting output will be tested. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. outputName is the name of the +// output. output is if the output specified does not already exist, this parameter must contain the full output +// definition intended to be tested. If the output specified already exists, this parameter can be left null to test +// the existing output as is or if specified, the properties specified will overwrite the corresponding properties in +// the existing output (exactly like a PATCH operation) and the resulting output will be tested. func (client OutputsClient) Test(resourceGroupName string, jobName string, outputName string, output *Output, cancel <-chan struct{}) (<-chan ResourceTestStatus, <-chan error) { resultChan := make(chan ResourceTestStatus, 1) errChan := make(chan error, 1) @@ -503,21 +489,16 @@ func (client OutputsClient) TestResponder(resp *http.Response) (result ResourceT return } -// Update updates an existing output under an existing streaming job. This can -// be used to partially update (ie. update one or two properties) an output -// without affecting the rest the job or output definition. +// Update updates an existing output under an existing streaming job. This can be used to partially update (ie. update +// one or two properties) an output without affecting the rest the job or output definition. // -// output is an Output object. The properties specified here will overwrite the -// corresponding properties in the existing output (ie. Those properties will -// be updated). Any properties that are set to null here will mean that the -// corresponding property in the existing output will remain the same and not -// change as a result of this PATCH operation. resourceGroupName is the name of -// the resource group that contains the resource. You can obtain this value -// from the Azure Resource Manager API or the portal. jobName is the name of -// the streaming job. outputName is the name of the output. ifMatch is the ETag -// of the output. Omit this value to always overwrite the current output. -// Specify the last-seen ETag value to prevent accidentally overwritting -// concurrent changes. +// output is an Output object. The properties specified here will overwrite the corresponding properties in the +// existing output (ie. Those properties will be updated). Any properties that are set to null here will mean that the +// corresponding property in the existing output will remain the same and not change as a result of this PATCH +// operation. resourceGroupName is the name of the resource group that contains the resource. You can obtain this value +// from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. outputName is the name +// of the output. ifMatch is the ETag of the output. Omit this value to always overwrite the current output. Specify +// the last-seen ETag value to prevent accidentally overwritting concurrent changes. func (client OutputsClient) Update(output Output, resourceGroupName string, jobName string, outputName string, ifMatch string) (result Output, err error) { req, err := client.UpdatePreparer(output, resourceGroupName, jobName, outputName, ifMatch) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/streamingjobs.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/streamingjobs.go index 1c6c2addc..45f30d101 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/streamingjobs.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/streamingjobs.go @@ -14,9 +14,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,38 +23,32 @@ import ( "net/http" ) -// StreamingJobsClient is the composite Swagger for Stream Analytics Client +// StreamingJobsClient is the stream Analytics Client type StreamingJobsClient struct { ManagementClient } -// NewStreamingJobsClient creates an instance of the StreamingJobsClient -// client. +// NewStreamingJobsClient creates an instance of the StreamingJobsClient client. func NewStreamingJobsClient(subscriptionID string) StreamingJobsClient { return NewStreamingJobsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewStreamingJobsClientWithBaseURI creates an instance of the -// StreamingJobsClient client. +// NewStreamingJobsClientWithBaseURI creates an instance of the StreamingJobsClient client. func NewStreamingJobsClientWithBaseURI(baseURI string, subscriptionID string) StreamingJobsClient { return StreamingJobsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrReplace creates a streaming job or replaces an already existing -// streaming job. This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// CreateOrReplace creates a streaming job or replaces an already existing streaming job. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// streamingJob is the definition of the streaming job that will be used to -// create a new streaming job or replace the existing one. resourceGroupName is -// the name of the resource group that contains the resource. You can obtain -// this value from the Azure Resource Manager API or the portal. jobName is the -// name of the streaming job. ifMatch is the ETag of the streaming job. Omit -// this value to always overwrite the current record set. Specify the last-seen -// ETag value to prevent accidentally overwritting concurrent changes. -// ifNoneMatch is set to '*' to allow a new streaming job to be created, but to -// prevent updating an existing record set. Other values will result in a 412 -// Pre-condition Failed response. +// streamingJob is the definition of the streaming job that will be used to create a new streaming job or replace the +// existing one. resourceGroupName is the name of the resource group that contains the resource. You can obtain this +// value from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. ifMatch is the +// ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag +// value to prevent accidentally overwritting concurrent changes. ifNoneMatch is set to '*' to allow a new streaming +// job to be created, but to prevent updating an existing record set. Other values will result in a 412 Pre-condition +// Failed response. func (client StreamingJobsClient) CreateOrReplace(streamingJob StreamingJob, resourceGroupName string, jobName string, ifMatch string, ifNoneMatch string, cancel <-chan struct{}) (<-chan StreamingJob, <-chan error) { resultChan := make(chan StreamingJob, 1) errChan := make(chan error, 1) @@ -143,13 +136,11 @@ func (client StreamingJobsClient) CreateOrReplaceResponder(resp *http.Response) return } -// Delete deletes a streaming job. This method may poll for completion. Polling -// can be canceled by passing the cancel channel argument. The channel will be -// used to cancel polling and any outstanding HTTP requests. +// Delete deletes a streaming job. This method may poll for completion. Polling can be canceled by passing the cancel +// channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. func (client StreamingJobsClient) Delete(resourceGroupName string, jobName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -228,14 +219,11 @@ func (client StreamingJobsClient) DeleteResponder(resp *http.Response) (result a // Get gets details about the specified streaming job. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. expand is the $expand -// OData query parameter. This is a comma-separated list of additional -// streaming job properties to include in the response, beyond the default set -// returned when this parameter is absent. The default set is all streaming job -// properties other than 'inputs', 'transformation', 'outputs', and -// 'functions'. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. expand is the $expand OData +// query parameter. This is a comma-separated list of additional streaming job properties to include in the response, +// beyond the default set returned when this parameter is absent. The default set is all streaming job properties other +// than 'inputs', 'transformation', 'outputs', and 'functions'. func (client StreamingJobsClient) Get(resourceGroupName string, jobName string, expand string) (result StreamingJob, err error) { req, err := client.GetPreparer(resourceGroupName, jobName, expand) if err != nil { @@ -303,11 +291,9 @@ func (client StreamingJobsClient) GetResponder(resp *http.Response) (result Stre // List lists all of the streaming jobs in the given subscription. // -// expand is the $expand OData query parameter. This is a comma-separated list -// of additional streaming job properties to include in the response, beyond -// the default set returned when this parameter is absent. The default set is -// all streaming job properties other than 'inputs', 'transformation', -// 'outputs', and 'functions'. +// expand is the $expand OData query parameter. This is a comma-separated list of additional streaming job properties +// to include in the response, beyond the default set returned when this parameter is absent. The default set is all +// streaming job properties other than 'inputs', 'transformation', 'outputs', and 'functions'. func (client StreamingJobsClient) List(expand string) (result StreamingJobListResult, err error) { req, err := client.ListPreparer(expand) if err != nil { @@ -440,16 +426,13 @@ func (client StreamingJobsClient) ListComplete(expand string, cancel <-chan stru return resultChan, errChan } -// ListByResourceGroup lists all of the streaming jobs in the specified -// resource group. +// ListByResourceGroup lists all of the streaming jobs in the specified resource group. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. expand is the $expand OData query parameter. This is a -// comma-separated list of additional streaming job properties to include in -// the response, beyond the default set returned when this parameter is absent. -// The default set is all streaming job properties other than 'inputs', -// 'transformation', 'outputs', and 'functions'. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. expand is the $expand OData query parameter. This is a comma-separated +// list of additional streaming job properties to include in the response, beyond the default set returned when this +// parameter is absent. The default set is all streaming job properties other than 'inputs', 'transformation', +// 'outputs', and 'functions'. func (client StreamingJobsClient) ListByResourceGroup(resourceGroupName string, expand string) (result StreamingJobListResult, err error) { req, err := client.ListByResourceGroupPreparer(resourceGroupName, expand) if err != nil { @@ -583,15 +566,13 @@ func (client StreamingJobsClient) ListByResourceGroupComplete(resourceGroupName return resultChan, errChan } -// Start starts a streaming job. Once a job is started it will start processing -// input events and produce output. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Start starts a streaming job. Once a job is started it will start processing input events and produce output. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. startJobParameters is -// parameters applicable to a start streaming job operation. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. startJobParameters is parameters +// applicable to a start streaming job operation. func (client StreamingJobsClient) Start(resourceGroupName string, jobName string, startJobParameters *StartStreamingJobParameters, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -673,15 +654,12 @@ func (client StreamingJobsClient) StartResponder(resp *http.Response) (result au return } -// Stop stops a running streaming job. This will cause a running streaming job -// to stop processing input events and producing output. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// Stop stops a running streaming job. This will cause a running streaming job to stop processing input events and +// producing output. This method may poll for completion. Polling can be canceled by passing the cancel channel +// argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. func (client StreamingJobsClient) Stop(resourceGroupName string, jobName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -758,21 +736,16 @@ func (client StreamingJobsClient) StopResponder(resp *http.Response) (result aut return } -// Update updates an existing streaming job. This can be used to partially -// update (ie. update one or two properties) a streaming job without affecting -// the rest the job definition. +// Update updates an existing streaming job. This can be used to partially update (ie. update one or two properties) a +// streaming job without affecting the rest the job definition. // -// streamingJob is a streaming job object. The properties specified here will -// overwrite the corresponding properties in the existing streaming job (ie. -// Those properties will be updated). Any properties that are set to null here -// will mean that the corresponding property in the existing input will remain -// the same and not change as a result of this PATCH operation. -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. ifMatch is the ETag of -// the streaming job. Omit this value to always overwrite the current record -// set. Specify the last-seen ETag value to prevent accidentally overwritting -// concurrent changes. +// streamingJob is a streaming job object. The properties specified here will overwrite the corresponding properties in +// the existing streaming job (ie. Those properties will be updated). Any properties that are set to null here will +// mean that the corresponding property in the existing input will remain the same and not change as a result of this +// PATCH operation. resourceGroupName is the name of the resource group that contains the resource. You can obtain this +// value from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. ifMatch is the +// ETag of the streaming job. Omit this value to always overwrite the current record set. Specify the last-seen ETag +// value to prevent accidentally overwritting concurrent changes. func (client StreamingJobsClient) Update(streamingJob StreamingJob, resourceGroupName string, jobName string, ifMatch string) (result StreamingJob, err error) { req, err := client.UpdatePreparer(streamingJob, resourceGroupName, jobName, ifMatch) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/subscriptions.go index 4bde29076..e45ee75cb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/subscriptions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/subscriptions.go @@ -14,9 +14,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,29 +23,25 @@ import ( "net/http" ) -// SubscriptionsClient is the composite Swagger for Stream Analytics Client +// SubscriptionsClient is the stream Analytics Client type SubscriptionsClient struct { ManagementClient } -// NewSubscriptionsClient creates an instance of the SubscriptionsClient -// client. +// NewSubscriptionsClient creates an instance of the SubscriptionsClient client. func NewSubscriptionsClient(subscriptionID string) SubscriptionsClient { return NewSubscriptionsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewSubscriptionsClientWithBaseURI creates an instance of the -// SubscriptionsClient client. +// NewSubscriptionsClientWithBaseURI creates an instance of the SubscriptionsClient client. func NewSubscriptionsClientWithBaseURI(baseURI string, subscriptionID string) SubscriptionsClient { return SubscriptionsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// ListQuotas retrieves the subscription's current quota information in a -// particular region. +// ListQuotas retrieves the subscription's current quota information in a particular region. // -// location is the region in which to retrieve the subscription's quota -// information. You can find out which regions Azure Stream Analytics is -// supported in here: https://azure.microsoft.com/en-us/regions/ +// location is the region in which to retrieve the subscription's quota information. You can find out which regions +// Azure Stream Analytics is supported in here: https://azure.microsoft.com/en-us/regions/ func (client SubscriptionsClient) ListQuotas(location string) (result SubscriptionQuotasListResult, err error) { req, err := client.ListQuotasPreparer(location) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/transformations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/transformations.go index 67b8d858b..84d686833 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/transformations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/transformations.go @@ -14,9 +14,8 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,37 +23,31 @@ import ( "net/http" ) -// TransformationsClient is the composite Swagger for Stream Analytics Client +// TransformationsClient is the stream Analytics Client type TransformationsClient struct { ManagementClient } -// NewTransformationsClient creates an instance of the TransformationsClient -// client. +// NewTransformationsClient creates an instance of the TransformationsClient client. func NewTransformationsClient(subscriptionID string) TransformationsClient { return NewTransformationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTransformationsClientWithBaseURI creates an instance of the -// TransformationsClient client. +// NewTransformationsClientWithBaseURI creates an instance of the TransformationsClient client. func NewTransformationsClientWithBaseURI(baseURI string, subscriptionID string) TransformationsClient { return TransformationsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrReplace creates a transformation or replaces an already existing -// transformation under an existing streaming job. +// CreateOrReplace creates a transformation or replaces an already existing transformation under an existing streaming +// job. // -// transformation is the definition of the transformation that will be used to -// create a new transformation or replace the existing one under the streaming -// job. resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. transformationName is -// the name of the transformation. ifMatch is the ETag of the transformation. -// Omit this value to always overwrite the current transformation. Specify the -// last-seen ETag value to prevent accidentally overwritting concurrent -// changes. ifNoneMatch is set to '*' to allow a new transformation to be -// created, but to prevent updating an existing transformation. Other values -// will result in a 412 Pre-condition Failed response. +// transformation is the definition of the transformation that will be used to create a new transformation or replace +// the existing one under the streaming job. resourceGroupName is the name of the resource group that contains the +// resource. You can obtain this value from the Azure Resource Manager API or the portal. jobName is the name of the +// streaming job. transformationName is the name of the transformation. ifMatch is the ETag of the transformation. Omit +// this value to always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally +// overwritting concurrent changes. ifNoneMatch is set to '*' to allow a new transformation to be created, but to +// prevent updating an existing transformation. Other values will result in a 412 Pre-condition Failed response. func (client TransformationsClient) CreateOrReplace(transformation Transformation, resourceGroupName string, jobName string, transformationName string, ifMatch string, ifNoneMatch string) (result Transformation, err error) { req, err := client.CreateOrReplacePreparer(transformation, resourceGroupName, jobName, transformationName, ifMatch, ifNoneMatch) if err != nil { @@ -130,10 +123,9 @@ func (client TransformationsClient) CreateOrReplaceResponder(resp *http.Response // Get gets details about the specified transformation. // -// resourceGroupName is the name of the resource group that contains the -// resource. You can obtain this value from the Azure Resource Manager API or -// the portal. jobName is the name of the streaming job. transformationName is -// the name of the transformation. +// resourceGroupName is the name of the resource group that contains the resource. You can obtain this value from the +// Azure Resource Manager API or the portal. jobName is the name of the streaming job. transformationName is the name +// of the transformation. func (client TransformationsClient) Get(resourceGroupName string, jobName string, transformationName string) (result Transformation, err error) { req, err := client.GetPreparer(resourceGroupName, jobName, transformationName) if err != nil { @@ -197,23 +189,17 @@ func (client TransformationsClient) GetResponder(resp *http.Response) (result Tr return } -// Update updates an existing transformation under an existing streaming job. -// This can be used to partially update (ie. update one or two properties) a -// transformation without affecting the rest the job or transformation -// definition. +// Update updates an existing transformation under an existing streaming job. This can be used to partially update (ie. +// update one or two properties) a transformation without affecting the rest the job or transformation definition. // -// transformation is a Transformation object. The properties specified here -// will overwrite the corresponding properties in the existing transformation -// (ie. Those properties will be updated). Any properties that are set to null -// here will mean that the corresponding property in the existing -// transformation will remain the same and not change as a result of this PATCH -// operation. resourceGroupName is the name of the resource group that contains -// the resource. You can obtain this value from the Azure Resource Manager API -// or the portal. jobName is the name of the streaming job. transformationName -// is the name of the transformation. ifMatch is the ETag of the -// transformation. Omit this value to always overwrite the current -// transformation. Specify the last-seen ETag value to prevent accidentally -// overwritting concurrent changes. +// transformation is a Transformation object. The properties specified here will overwrite the corresponding properties +// in the existing transformation (ie. Those properties will be updated). Any properties that are set to null here will +// mean that the corresponding property in the existing transformation will remain the same and not change as a result +// of this PATCH operation. resourceGroupName is the name of the resource group that contains the resource. You can +// obtain this value from the Azure Resource Manager API or the portal. jobName is the name of the streaming job. +// transformationName is the name of the transformation. ifMatch is the ETag of the transformation. Omit this value to +// always overwrite the current transformation. Specify the last-seen ETag value to prevent accidentally overwritting +// concurrent changes. func (client TransformationsClient) Update(transformation Transformation, resourceGroupName string, jobName string, transformationName string, ifMatch string) (result Transformation, err error) { req, err := client.UpdatePreparer(transformation, resourceGroupName, jobName, transformationName, ifMatch) if err != nil { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go index 5e607a098..902ad8f68 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/streamanalytics/version.go @@ -14,15 +14,15 @@ package streamanalytics // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-streamanalytics/2016-03-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-streamanalytics/2016-03-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/client.go index 332f0addc..247958697 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/client.go @@ -1,5 +1,4 @@ -// Package trafficmanager implements the Azure ARM Trafficmanager service API -// version 2015-11-01. +// Package trafficmanager implements the Azure ARM Trafficmanager service API version 2017-09-01-preview. // // package trafficmanager @@ -18,9 +17,8 @@ package trafficmanager // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/endpoints.go index cb88fa57c..2c4c33069 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/endpoints.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/endpoints.go @@ -14,9 +14,8 @@ package trafficmanager // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// EndpointsClient is the client for the Endpoints methods of the -// Trafficmanager service. +// EndpointsClient is the client for the Endpoints methods of the Trafficmanager service. type EndpointsClient struct { ManagementClient } @@ -35,20 +33,17 @@ func NewEndpointsClient(subscriptionID string) EndpointsClient { return NewEndpointsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient -// client. +// NewEndpointsClientWithBaseURI creates an instance of the EndpointsClient client. func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) EndpointsClient { return EndpointsClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a Traffic Manager endpoint. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager endpoint to be created or updated. profileName is the name of the -// Traffic Manager profile. endpointType is the type of the Traffic Manager -// endpoint to be created or updated. endpointName is the name of the Traffic -// Manager endpoint to be created or updated. parameters is the Traffic Manager -// endpoint parameters supplied to the CreateOrUpdate operation. +// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint to be created or +// updated. profileName is the name of the Traffic Manager profile. endpointType is the type of the Traffic Manager +// endpoint to be created or updated. endpointName is the name of the Traffic Manager endpoint to be created or +// updated. parameters is the Traffic Manager endpoint parameters supplied to the CreateOrUpdate operation. func (client EndpointsClient) CreateOrUpdate(resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (result Endpoint, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, profileName, endpointType, endpointName, parameters) if err != nil { @@ -81,7 +76,7 @@ func (client EndpointsClient) CreateOrUpdatePreparer(resourceGroupName string, p "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -117,12 +112,10 @@ func (client EndpointsClient) CreateOrUpdateResponder(resp *http.Response) (resu // Delete deletes a Traffic Manager endpoint. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager endpoint to be deleted. profileName is the name of the Traffic -// Manager profile. endpointType is the type of the Traffic Manager endpoint to -// be deleted. endpointName is the name of the Traffic Manager endpoint to be -// deleted. -func (client EndpointsClient) Delete(resourceGroupName string, profileName string, endpointType string, endpointName string) (result autorest.Response, err error) { +// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint to be deleted. +// profileName is the name of the Traffic Manager profile. endpointType is the type of the Traffic Manager endpoint to +// be deleted. endpointName is the name of the Traffic Manager endpoint to be deleted. +func (client EndpointsClient) Delete(resourceGroupName string, profileName string, endpointType string, endpointName string) (result DeleteOperationResult, err error) { req, err := client.DeletePreparer(resourceGroupName, profileName, endpointType, endpointName) if err != nil { err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Delete", nil, "Failure preparing request") @@ -131,7 +124,7 @@ func (client EndpointsClient) Delete(resourceGroupName string, profileName strin resp, err := client.DeleteSender(req) if err != nil { - result.Response = resp + result.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "trafficmanager.EndpointsClient", "Delete", resp, "Failure sending request") return } @@ -154,7 +147,7 @@ func (client EndpointsClient) DeletePreparer(resourceGroupName string, profileNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -175,22 +168,22 @@ func (client EndpointsClient) DeleteSender(req *http.Request) (*http.Response, e // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client EndpointsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client EndpointsClient) DeleteResponder(resp *http.Response) (result DeleteOperationResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } // Get gets a Traffic Manager endpoint. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager endpoint. profileName is the name of the Traffic Manager profile. -// endpointType is the type of the Traffic Manager endpoint. endpointName is -// the name of the Traffic Manager endpoint. +// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint. profileName is the name +// of the Traffic Manager profile. endpointType is the type of the Traffic Manager endpoint. endpointName is the name +// of the Traffic Manager endpoint. func (client EndpointsClient) Get(resourceGroupName string, profileName string, endpointType string, endpointName string) (result Endpoint, err error) { req, err := client.GetPreparer(resourceGroupName, profileName, endpointType, endpointName) if err != nil { @@ -223,7 +216,7 @@ func (client EndpointsClient) GetPreparer(resourceGroupName string, profileName "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -257,12 +250,10 @@ func (client EndpointsClient) GetResponder(resp *http.Response) (result Endpoint // Update update a Traffic Manager endpoint. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager endpoint to be updated. profileName is the name of the Traffic -// Manager profile. endpointType is the type of the Traffic Manager endpoint to -// be updated. endpointName is the name of the Traffic Manager endpoint to be -// updated. parameters is the Traffic Manager endpoint parameters supplied to -// the Update operation. +// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint to be updated. +// profileName is the name of the Traffic Manager profile. endpointType is the type of the Traffic Manager endpoint to +// be updated. endpointName is the name of the Traffic Manager endpoint to be updated. parameters is the Traffic +// Manager endpoint parameters supplied to the Update operation. func (client EndpointsClient) Update(resourceGroupName string, profileName string, endpointType string, endpointName string, parameters Endpoint) (result Endpoint, err error) { req, err := client.UpdatePreparer(resourceGroupName, profileName, endpointType, endpointName, parameters) if err != nil { @@ -295,7 +286,7 @@ func (client EndpointsClient) UpdatePreparer(resourceGroupName string, profileNa "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/geographichierarchies.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/geographichierarchies.go new file mode 100644 index 000000000..4ca5d0d8c --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/geographichierarchies.go @@ -0,0 +1,96 @@ +package trafficmanager + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// GeographicHierarchiesClient is the client for the GeographicHierarchies methods of the Trafficmanager service. +type GeographicHierarchiesClient struct { + ManagementClient +} + +// NewGeographicHierarchiesClient creates an instance of the GeographicHierarchiesClient client. +func NewGeographicHierarchiesClient(subscriptionID string) GeographicHierarchiesClient { + return NewGeographicHierarchiesClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewGeographicHierarchiesClientWithBaseURI creates an instance of the GeographicHierarchiesClient client. +func NewGeographicHierarchiesClientWithBaseURI(baseURI string, subscriptionID string) GeographicHierarchiesClient { + return GeographicHierarchiesClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// GetDefault gets the default Geographic Hierarchy used by the Geographic traffic routing method. +func (client GeographicHierarchiesClient) GetDefault() (result GeographicHierarchy, err error) { + req, err := client.GetDefaultPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.GeographicHierarchiesClient", "GetDefault", nil, "Failure preparing request") + return + } + + resp, err := client.GetDefaultSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "trafficmanager.GeographicHierarchiesClient", "GetDefault", resp, "Failure sending request") + return + } + + result, err = client.GetDefaultResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.GeographicHierarchiesClient", "GetDefault", resp, "Failure responding to request") + } + + return +} + +// GetDefaultPreparer prepares the GetDefault request. +func (client GeographicHierarchiesClient) GetDefaultPreparer() (*http.Request, error) { + const APIVersion = "2017-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Network/trafficManagerGeographicHierarchies/default"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDefaultSender sends the GetDefault request. The method will close the +// http.Response Body if it receives an error. +func (client GeographicHierarchiesClient) GetDefaultSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDefaultResponder handles the response to the GetDefault request. The method always +// closes the http.Response Body. +func (client GeographicHierarchiesClient) GetDefaultResponder(resp *http.Response) (result GeographicHierarchy, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/heatmap.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/heatmap.go new file mode 100644 index 000000000..81c9ca5e2 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/heatmap.go @@ -0,0 +1,129 @@ +package trafficmanager + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// HeatMapClient is the client for the HeatMap methods of the Trafficmanager service. +type HeatMapClient struct { + ManagementClient +} + +// NewHeatMapClient creates an instance of the HeatMapClient client. +func NewHeatMapClient(subscriptionID string) HeatMapClient { + return NewHeatMapClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewHeatMapClientWithBaseURI creates an instance of the HeatMapClient client. +func NewHeatMapClientWithBaseURI(baseURI string, subscriptionID string) HeatMapClient { + return HeatMapClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Get gets latest heatmap for Traffic Manager profile. +// +// resourceGroupName is the name of the resource group containing the Traffic Manager endpoint. profileName is the name +// of the Traffic Manager profile. heatMapType is the type of HeatMap for the Traffic Manager profile. topLeft is the +// top left latitude,longitude pair of the rectangular viewport to query for. botRight is the bottom right +// latitude,longitude pair of the rectangular viewport to query for. +func (client HeatMapClient) Get(resourceGroupName string, profileName string, heatMapType string, topLeft []float64, botRight []float64) (result HeatMapModel, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: topLeft, + Constraints: []validation.Constraint{{Target: "topLeft", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "topLeft", Name: validation.MaxItems, Rule: 2, Chain: nil}, + {Target: "topLeft", Name: validation.MinItems, Rule: 2, Chain: nil}, + }}}}, + {TargetValue: botRight, + Constraints: []validation.Constraint{{Target: "botRight", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "botRight", Name: validation.MaxItems, Rule: 2, Chain: nil}, + {Target: "botRight", Name: validation.MinItems, Rule: 2, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "trafficmanager.HeatMapClient", "Get") + } + + req, err := client.GetPreparer(resourceGroupName, profileName, heatMapType, topLeft, botRight) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.HeatMapClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "trafficmanager.HeatMapClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.HeatMapClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client HeatMapClient) GetPreparer(resourceGroupName string, profileName string, heatMapType string, topLeft []float64, botRight []float64) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "heatMapType": autorest.Encode("path", heatMapType), + "profileName": autorest.Encode("path", profileName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if topLeft != nil && len(topLeft) > 0 { + queryParameters["topLeft"] = autorest.Encode("query", topLeft, ",") + } + if botRight != nil && len(botRight) > 0 { + queryParameters["botRight"] = autorest.Encode("query", botRight, ",") + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName}/heatMaps/{heatMapType}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client HeatMapClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client HeatMapClient) GetResponder(resp *http.Response) (result HeatMapModel, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go index a70d07036..5c5bd2bf3 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/models.go @@ -14,21 +14,121 @@ package trafficmanager // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" ) -// CheckTrafficManagerRelativeDNSNameAvailabilityParameters is parameters -// supplied to check Traffic Manager name operation. +// EndpointMonitorStatus enumerates the values for endpoint monitor status. +type EndpointMonitorStatus string + +const ( + // CheckingEndpoint specifies the checking endpoint state for endpoint monitor status. + CheckingEndpoint EndpointMonitorStatus = "CheckingEndpoint" + // Degraded specifies the degraded state for endpoint monitor status. + Degraded EndpointMonitorStatus = "Degraded" + // Disabled specifies the disabled state for endpoint monitor status. + Disabled EndpointMonitorStatus = "Disabled" + // Inactive specifies the inactive state for endpoint monitor status. + Inactive EndpointMonitorStatus = "Inactive" + // Online specifies the online state for endpoint monitor status. + Online EndpointMonitorStatus = "Online" + // Stopped specifies the stopped state for endpoint monitor status. + Stopped EndpointMonitorStatus = "Stopped" +) + +// EndpointStatus enumerates the values for endpoint status. +type EndpointStatus string + +const ( + // EndpointStatusDisabled specifies the endpoint status disabled state for endpoint status. + EndpointStatusDisabled EndpointStatus = "Disabled" + // EndpointStatusEnabled specifies the endpoint status enabled state for endpoint status. + EndpointStatusEnabled EndpointStatus = "Enabled" +) + +// MonitorProtocol enumerates the values for monitor protocol. +type MonitorProtocol string + +const ( + // HTTP specifies the http state for monitor protocol. + HTTP MonitorProtocol = "HTTP" + // HTTPS specifies the https state for monitor protocol. + HTTPS MonitorProtocol = "HTTPS" + // TCP specifies the tcp state for monitor protocol. + TCP MonitorProtocol = "TCP" +) + +// ProfileMonitorStatus enumerates the values for profile monitor status. +type ProfileMonitorStatus string + +const ( + // ProfileMonitorStatusCheckingEndpoints specifies the profile monitor status checking endpoints state for profile + // monitor status. + ProfileMonitorStatusCheckingEndpoints ProfileMonitorStatus = "CheckingEndpoints" + // ProfileMonitorStatusDegraded specifies the profile monitor status degraded state for profile monitor status. + ProfileMonitorStatusDegraded ProfileMonitorStatus = "Degraded" + // ProfileMonitorStatusDisabled specifies the profile monitor status disabled state for profile monitor status. + ProfileMonitorStatusDisabled ProfileMonitorStatus = "Disabled" + // ProfileMonitorStatusInactive specifies the profile monitor status inactive state for profile monitor status. + ProfileMonitorStatusInactive ProfileMonitorStatus = "Inactive" + // ProfileMonitorStatusOnline specifies the profile monitor status online state for profile monitor status. + ProfileMonitorStatusOnline ProfileMonitorStatus = "Online" +) + +// ProfileStatus enumerates the values for profile status. +type ProfileStatus string + +const ( + // ProfileStatusDisabled specifies the profile status disabled state for profile status. + ProfileStatusDisabled ProfileStatus = "Disabled" + // ProfileStatusEnabled specifies the profile status enabled state for profile status. + ProfileStatusEnabled ProfileStatus = "Enabled" +) + +// TrafficRoutingMethod enumerates the values for traffic routing method. +type TrafficRoutingMethod string + +const ( + // Geographic specifies the geographic state for traffic routing method. + Geographic TrafficRoutingMethod = "Geographic" + // Performance specifies the performance state for traffic routing method. + Performance TrafficRoutingMethod = "Performance" + // Priority specifies the priority state for traffic routing method. + Priority TrafficRoutingMethod = "Priority" + // Weighted specifies the weighted state for traffic routing method. + Weighted TrafficRoutingMethod = "Weighted" +) + +// CheckTrafficManagerRelativeDNSNameAvailabilityParameters is parameters supplied to check Traffic Manager name +// operation. type CheckTrafficManagerRelativeDNSNameAvailabilityParameters struct { Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` } +// CloudError is an error returned by the Azure Resource Manager +type CloudError struct { + Error *CloudErrorBody `json:"error,omitempty"` +} + +// CloudErrorBody is the content of an error returned by the Azure Resource Manager +type CloudErrorBody struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` + Details *[]CloudErrorBody `json:"details,omitempty"` +} + +// DeleteOperationResult is the result of the request or operation. +type DeleteOperationResult struct { + autorest.Response `json:"-"` + OperationResult *bool `json:"boolean,omitempty"` +} + // DNSConfig is class containing DNS settings in a Traffic Manager profile. type DNSConfig struct { RelativeName *string `json:"relativeName,omitempty"` @@ -45,30 +145,69 @@ type Endpoint struct { *EndpointProperties `json:"properties,omitempty"` } -// EndpointProperties is class representing a Traffic Manager endpoint -// properties. +// EndpointProperties is class representing a Traffic Manager endpoint properties. type EndpointProperties struct { - TargetResourceID *string `json:"targetResourceId,omitempty"` - Target *string `json:"target,omitempty"` - EndpointStatus *string `json:"endpointStatus,omitempty"` - Weight *int64 `json:"weight,omitempty"` - Priority *int64 `json:"priority,omitempty"` - EndpointLocation *string `json:"endpointLocation,omitempty"` - EndpointMonitorStatus *string `json:"endpointMonitorStatus,omitempty"` - MinChildEndpoints *int64 `json:"minChildEndpoints,omitempty"` + TargetResourceID *string `json:"targetResourceId,omitempty"` + Target *string `json:"target,omitempty"` + EndpointStatus EndpointStatus `json:"endpointStatus,omitempty"` + Weight *int64 `json:"weight,omitempty"` + Priority *int64 `json:"priority,omitempty"` + EndpointLocation *string `json:"endpointLocation,omitempty"` + EndpointMonitorStatus EndpointMonitorStatus `json:"endpointMonitorStatus,omitempty"` + MinChildEndpoints *int64 `json:"minChildEndpoints,omitempty"` + GeoMapping *[]string `json:"geoMapping,omitempty"` } -// MonitorConfig is class containing endpoint monitoring settings in a Traffic -// Manager profile. +// GeographicHierarchy is class representing the Geographic hierarchy used with the Geographic traffic routing method. +type GeographicHierarchy struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *GeographicHierarchyProperties `json:"properties,omitempty"` +} + +// GeographicHierarchyProperties is class representing the properties of the Geographic hierarchy used with the +// Geographic traffic routing method. +type GeographicHierarchyProperties struct { + GeographicHierarchy *Region `json:"geographicHierarchy,omitempty"` +} + +// HeatMapEndpoint is class which is a sparse representation of a Traffic Manager endpoint. +type HeatMapEndpoint struct { + ResourceID *string `json:"resourceId,omitempty"` + EndpointID *int32 `json:"endpointId,omitempty"` +} + +// HeatMapModel is class representing a Traffic Manager HeatMap. +type HeatMapModel struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` + *HeatMapProperties `json:"properties,omitempty"` +} + +// HeatMapProperties is class representing a Traffic Manager HeatMap properties. +type HeatMapProperties struct { + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + Endpoints *[]HeatMapEndpoint `json:"endpoints,omitempty"` + TrafficFlows *[]TrafficFlow `json:"trafficFlows,omitempty"` +} + +// MonitorConfig is class containing endpoint monitoring settings in a Traffic Manager profile. type MonitorConfig struct { - ProfileMonitorStatus *string `json:"profileMonitorStatus,omitempty"` - Protocol *string `json:"protocol,omitempty"` - Port *int64 `json:"port,omitempty"` - Path *string `json:"path,omitempty"` + ProfileMonitorStatus ProfileMonitorStatus `json:"profileMonitorStatus,omitempty"` + Protocol MonitorProtocol `json:"protocol,omitempty"` + Port *int64 `json:"port,omitempty"` + Path *string `json:"path,omitempty"` + IntervalInSeconds *int64 `json:"intervalInSeconds,omitempty"` + TimeoutInSeconds *int64 `json:"timeoutInSeconds,omitempty"` + ToleratedNumberOfFailures *int64 `json:"toleratedNumberOfFailures,omitempty"` } -// NameAvailability is class representing a Traffic Manager Name Availability -// response. +// NameAvailability is class representing a Traffic Manager Name Availability response. type NameAvailability struct { autorest.Response `json:"-"` Name *string `json:"name,omitempty"` @@ -84,8 +223,8 @@ type Profile struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` + Location *string `json:"location,omitempty"` *ProfileProperties `json:"properties,omitempty"` } @@ -95,26 +234,57 @@ type ProfileListResult struct { Value *[]Profile `json:"value,omitempty"` } -// ProfileProperties is class representing the Traffic Manager profile -// properties. +// ProfileProperties is class representing the Traffic Manager profile properties. type ProfileProperties struct { - ProfileStatus *string `json:"profileStatus,omitempty"` - TrafficRoutingMethod *string `json:"trafficRoutingMethod,omitempty"` - DNSConfig *DNSConfig `json:"dnsConfig,omitempty"` - MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"` - Endpoints *[]Endpoint `json:"endpoints,omitempty"` + ProfileStatus ProfileStatus `json:"profileStatus,omitempty"` + TrafficRoutingMethod TrafficRoutingMethod `json:"trafficRoutingMethod,omitempty"` + DNSConfig *DNSConfig `json:"dnsConfig,omitempty"` + MonitorConfig *MonitorConfig `json:"monitorConfig,omitempty"` + Endpoints *[]Endpoint `json:"endpoints,omitempty"` } -// Resource is +// ProxyResource is the resource model definition for a ARM proxy resource. It will have everything other than required +// location and tags +type ProxyResource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// QueryExperience is class representing a Traffic Manager HeatMap query experience properties. +type QueryExperience struct { + EndpointID *int32 `json:"endpointId,omitempty"` + QueryCount *int32 `json:"queryCount,omitempty"` + Latency *float64 `json:"latency,omitempty"` +} + +// Region is class representing a region in the Geographic hierarchy used with the Geographic traffic routing method. +type Region struct { + Code *string `json:"code,omitempty"` + Name *string `json:"name,omitempty"` + Regions *[]Region `json:"regions,omitempty"` +} + +// Resource is the core properties of ARM resources type Resource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} + +// TrackedResource is the resource model definition for a ARM tracked top level resource +type TrackedResource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Type *string `json:"type,omitempty"` - Location *string `json:"location,omitempty"` Tags *map[string]*string `json:"tags,omitempty"` + Location *string `json:"location,omitempty"` } -// SubResource is -type SubResource struct { - ID *string `json:"id,omitempty"` +// TrafficFlow is class representing a Traffic Manager HeatMap traffic flow properties. +type TrafficFlow struct { + SourceIP *string `json:"sourceIp,omitempty"` + Latitude *float64 `json:"latitude,omitempty"` + Longitude *float64 `json:"longitude,omitempty"` + QueryExperiences *[]QueryExperience `json:"queryExperiences,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/profiles.go index b1e2859d9..b310a18ee 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/profiles.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/profiles.go @@ -14,9 +14,8 @@ package trafficmanager // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,8 +23,7 @@ import ( "net/http" ) -// ProfilesClient is the client for the Profiles methods of the Trafficmanager -// service. +// ProfilesClient is the client for the Profiles methods of the Trafficmanager service. type ProfilesClient struct { ManagementClient } @@ -35,17 +33,14 @@ func NewProfilesClient(subscriptionID string) ProfilesClient { return NewProfilesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient -// client. +// NewProfilesClientWithBaseURI creates an instance of the ProfilesClient client. func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) ProfilesClient { return ProfilesClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CheckTrafficManagerRelativeDNSNameAvailability checks the availability of a -// Traffic Manager Relative DNS name. +// CheckTrafficManagerRelativeDNSNameAvailability checks the availability of a Traffic Manager Relative DNS name. // -// parameters is the Traffic Manager name parameters supplied to the -// CheckTrafficManagerNameAvailability operation. +// parameters is the Traffic Manager name parameters supplied to the CheckTrafficManagerNameAvailability operation. func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailability(parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters) (result NameAvailability, err error) { req, err := client.CheckTrafficManagerRelativeDNSNameAvailabilityPreparer(parameters) if err != nil { @@ -70,11 +65,7 @@ func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailability(para // CheckTrafficManagerRelativeDNSNameAvailabilityPreparer prepares the CheckTrafficManagerRelativeDNSNameAvailability request. func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityPreparer(parameters CheckTrafficManagerRelativeDNSNameAvailabilityParameters) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -83,7 +74,7 @@ func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityPrepa autorest.AsJSON(), autorest.AsPost(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/providers/Microsoft.Network/checkTrafficManagerNameAvailability", pathParameters), + autorest.WithPath("/providers/Microsoft.Network/checkTrafficManagerNameAvailability"), autorest.WithJSON(parameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -110,10 +101,9 @@ func (client ProfilesClient) CheckTrafficManagerRelativeDNSNameAvailabilityRespo // CreateOrUpdate create or update a Traffic Manager profile. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager profile. profileName is the name of the Traffic Manager profile. -// parameters is the Traffic Manager profile parameters supplied to the -// CreateOrUpdate operation. +// resourceGroupName is the name of the resource group containing the Traffic Manager profile. profileName is the name +// of the Traffic Manager profile. parameters is the Traffic Manager profile parameters supplied to the CreateOrUpdate +// operation. func (client ProfilesClient) CreateOrUpdate(resourceGroupName string, profileName string, parameters Profile) (result Profile, err error) { req, err := client.CreateOrUpdatePreparer(resourceGroupName, profileName, parameters) if err != nil { @@ -144,7 +134,7 @@ func (client ProfilesClient) CreateOrUpdatePreparer(resourceGroupName string, pr "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -180,10 +170,9 @@ func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (resul // Delete deletes a Traffic Manager profile. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager profile to be deleted. profileName is the name of the Traffic -// Manager profile to be deleted. -func (client ProfilesClient) Delete(resourceGroupName string, profileName string) (result autorest.Response, err error) { +// resourceGroupName is the name of the resource group containing the Traffic Manager profile to be deleted. +// profileName is the name of the Traffic Manager profile to be deleted. +func (client ProfilesClient) Delete(resourceGroupName string, profileName string) (result DeleteOperationResult, err error) { req, err := client.DeletePreparer(resourceGroupName, profileName) if err != nil { err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", nil, "Failure preparing request") @@ -192,7 +181,7 @@ func (client ProfilesClient) Delete(resourceGroupName string, profileName string resp, err := client.DeleteSender(req) if err != nil { - result.Response = resp + result.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", resp, "Failure sending request") return } @@ -213,7 +202,7 @@ func (client ProfilesClient) DeletePreparer(resourceGroupName string, profileNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -234,20 +223,21 @@ func (client ProfilesClient) DeleteSender(req *http.Request) (*http.Response, er // DeleteResponder handles the response to the Delete request. The method always // closes the http.Response Body. -func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { +func (client ProfilesClient) DeleteResponder(resp *http.Response) (result DeleteOperationResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) - result.Response = resp + result.Response = autorest.Response{Response: resp} return } // Get gets a Traffic Manager profile. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager profile. profileName is the name of the Traffic Manager profile. +// resourceGroupName is the name of the resource group containing the Traffic Manager profile. profileName is the name +// of the Traffic Manager profile. func (client ProfilesClient) Get(resourceGroupName string, profileName string) (result Profile, err error) { req, err := client.GetPreparer(resourceGroupName, profileName) if err != nil { @@ -278,7 +268,7 @@ func (client ProfilesClient) GetPreparer(resourceGroupName string, profileName s "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -310,102 +300,39 @@ func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile, return } -// ListAll lists all Traffic Manager profiles within a subscription. -func (client ProfilesClient) ListAll() (result ProfileListResult, err error) { - req, err := client.ListAllPreparer() - if err != nil { - err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAll", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAll", resp, "Failure sending request") - return - } - - result, err = client.ListAllResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAll", resp, "Failure responding to request") - } - - return -} - -// ListAllPreparer prepares the ListAll request. -func (client ProfilesClient) ListAllPreparer() (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2015-11-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListAllSender sends the ListAll request. The method will close the -// http.Response Body if it receives an error. -func (client ProfilesClient) ListAllSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListAllResponder handles the response to the ListAll request. The method always -// closes the http.Response Body. -func (client ProfilesClient) ListAllResponder(resp *http.Response) (result ProfileListResult, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAllInResourceGroup lists all Traffic Manager profiles within a resource -// group. +// ListByResourceGroup lists all Traffic Manager profiles within a resource group. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager profiles to be listed. -func (client ProfilesClient) ListAllInResourceGroup(resourceGroupName string) (result ProfileListResult, err error) { - req, err := client.ListAllInResourceGroupPreparer(resourceGroupName) +// resourceGroupName is the name of the resource group containing the Traffic Manager profiles to be listed. +func (client ProfilesClient) ListByResourceGroup(resourceGroupName string) (result ProfileListResult, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) if err != nil { - err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAllInResourceGroup", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", nil, "Failure preparing request") return } - resp, err := client.ListAllInResourceGroupSender(req) + resp, err := client.ListByResourceGroupSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAllInResourceGroup", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", resp, "Failure sending request") return } - result, err = client.ListAllInResourceGroupResponder(resp) + result, err = client.ListByResourceGroupResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListAllInResourceGroup", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListByResourceGroup", resp, "Failure responding to request") } return } -// ListAllInResourceGroupPreparer prepares the ListAllInResourceGroup request. -func (client ProfilesClient) ListAllInResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ProfilesClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { pathParameters := map[string]interface{}{ "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } @@ -418,15 +345,76 @@ func (client ProfilesClient) ListAllInResourceGroupPreparer(resourceGroupName st return preparer.Prepare(&http.Request{}) } -// ListAllInResourceGroupSender sends the ListAllInResourceGroup request. The method will close the +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the // http.Response Body if it receives an error. -func (client ProfilesClient) ListAllInResourceGroupSender(req *http.Request) (*http.Response, error) { +func (client ProfilesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListAllInResourceGroupResponder handles the response to the ListAllInResourceGroup request. The method always +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always // closes the http.Response Body. -func (client ProfilesClient) ListAllInResourceGroupResponder(resp *http.Response) (result ProfileListResult, err error) { +func (client ProfilesClient) ListByResourceGroupResponder(resp *http.Response) (result ProfileListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListBySubscription lists all Traffic Manager profiles within a subscription. +func (client ProfilesClient) ListBySubscription() (result ProfileListResult, err error) { + req, err := client.ListBySubscriptionPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListBySubscription", nil, "Failure preparing request") + return + } + + resp, err := client.ListBySubscriptionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListBySubscription", resp, "Failure sending request") + return + } + + result, err = client.ListBySubscriptionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "ListBySubscription", resp, "Failure responding to request") + } + + return +} + +// ListBySubscriptionPreparer prepares the ListBySubscription request. +func (client ProfilesClient) ListBySubscriptionPreparer() (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2017-09-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/trafficmanagerprofiles", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListBySubscriptionSender sends the ListBySubscription request. The method will close the +// http.Response Body if it receives an error. +func (client ProfilesClient) ListBySubscriptionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListBySubscriptionResponder handles the response to the ListBySubscription request. The method always +// closes the http.Response Body. +func (client ProfilesClient) ListBySubscriptionResponder(resp *http.Response) (result ProfileListResult, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -439,9 +427,8 @@ func (client ProfilesClient) ListAllInResourceGroupResponder(resp *http.Response // Update update a Traffic Manager profile. // -// resourceGroupName is the name of the resource group containing the Traffic -// Manager profile. profileName is the name of the Traffic Manager profile. -// parameters is the Traffic Manager profile parameters supplied to the Update +// resourceGroupName is the name of the resource group containing the Traffic Manager profile. profileName is the name +// of the Traffic Manager profile. parameters is the Traffic Manager profile parameters supplied to the Update // operation. func (client ProfilesClient) Update(resourceGroupName string, profileName string, parameters Profile) (result Profile, err error) { req, err := client.UpdatePreparer(resourceGroupName, profileName, parameters) @@ -473,7 +460,7 @@ func (client ProfilesClient) UpdatePreparer(resourceGroupName string, profileNam "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - const APIVersion = "2015-11-01" + const APIVersion = "2017-09-01-preview" queryParameters := map[string]interface{}{ "api-version": APIVersion, } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go index 3e02ab50d..2c13a8f84 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/trafficmanager/version.go @@ -14,15 +14,15 @@ package trafficmanager // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-trafficmanager/2017-05-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-trafficmanager/2017-09-01-preview" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/accounts.go new file mode 100644 index 000000000..3996f5084 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/accounts.go @@ -0,0 +1,370 @@ +package visualstudio + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// AccountsClient is the use these APIs to manage Visual Studio Team Services resources through the Azure Resource +// Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an +// x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests +// made to these resources are secure. For more information, see https://docs.microsoft.com/en-us/rest/api/index. +type AccountsClient struct { + ManagementClient +} + +// NewAccountsClient creates an instance of the AccountsClient client. +func NewAccountsClient(subscriptionID string) AccountsClient { + return NewAccountsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewAccountsClientWithBaseURI creates an instance of the AccountsClient client. +func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) AccountsClient { + return AccountsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// CheckNameAvailability checks if the specified Visual Studio Team Services account name is available. Resource name +// can be either an account name or an account name and PUID. +// +// body is parameters describing the name to check availability for. +func (client AccountsClient) CheckNameAvailability(body CheckNameAvailabilityParameter) (result CheckNameAvailabilityResult, err error) { + req, err := client.CheckNameAvailabilityPreparer(body) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "CheckNameAvailability", nil, "Failure preparing request") + return + } + + resp, err := client.CheckNameAvailabilitySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "CheckNameAvailability", resp, "Failure sending request") + return + } + + result, err = client.CheckNameAvailabilityResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "CheckNameAvailability", resp, "Failure responding to request") + } + + return +} + +// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request. +func (client AccountsClient) CheckNameAvailabilityPreparer(body CheckNameAvailabilityParameter) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/microsoft.visualstudio/checkNameAvailability", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always +// closes the http.Response Body. +func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates or updates a Visual Studio Team Services account resource. +// +// resourceGroupName is name of the resource group within the Azure subscription. body is the request data. +// resourceName is name of the resource. +func (client AccountsClient) CreateOrUpdate(resourceGroupName string, body AccountResourceRequest, resourceName string) (result AccountResource, err error) { + req, err := client.CreateOrUpdatePreparer(resourceGroupName, body, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "CreateOrUpdate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "CreateOrUpdate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "CreateOrUpdate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePreparer prepares the CreateOrUpdate request. +func (client AccountsClient) CreateOrUpdatePreparer(resourceGroupName string, body AccountResourceRequest, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{resourceName}", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always +// closes the http.Response Body. +func (client AccountsClient) CreateOrUpdateResponder(resp *http.Response) (result AccountResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete deletes a Visual Studio Team Services account resource. +// +// resourceGroupName is name of the resource group within the Azure subscription. resourceName is name of the resource. +func (client AccountsClient) Delete(resourceGroupName string, resourceName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client AccountsClient) DeletePreparer(resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client AccountsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the Visual Studio Team Services account resource details. +// +// resourceGroupName is name of the resource group within the Azure subscription. resourceName is name of the resource. +func (client AccountsClient) Get(resourceGroupName string, resourceName string) (result AccountResource, err error) { + req, err := client.GetPreparer(resourceGroupName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client AccountsClient) GetPreparer(resourceGroupName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client AccountsClient) GetResponder(resp *http.Response) (result AccountResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup gets all Visual Studio Team Services account resources under the resource group linked to the +// specified Azure subscription. +// +// resourceGroupName is name of the resource group within the Azure subscription. +func (client AccountsClient) ListByResourceGroup(resourceGroupName string) (result AccountResourceListResult, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.AccountsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client AccountsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client AccountsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (result AccountResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/client.go new file mode 100644 index 000000000..b600ee9b1 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/client.go @@ -0,0 +1,54 @@ +// Package visualstudio implements the Azure ARM Visualstudio service API version 2014-04-01-preview. +// +// Use these APIs to manage Visual Studio Team Services resources through the Azure Resource Manager. All task +// operations conform to the HTTP/1.1 protocol specification and each operation returns an x-ms-request-id header that +// can be used to obtain information about the request. You must make sure that requests made to these resources are +// secure. For more information, see https://docs.microsoft.com/en-us/rest/api/index. +package visualstudio + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const ( + // DefaultBaseURI is the default URI used for the service Visualstudio + DefaultBaseURI = "https://management.azure.com" +) + +// ManagementClient is the base client for Visualstudio. +type ManagementClient struct { + autorest.Client + BaseURI string + SubscriptionID string +} + +// New creates an instance of the ManagementClient client. +func New(subscriptionID string) ManagementClient { + return NewWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewWithBaseURI creates an instance of the ManagementClient client. +func NewWithBaseURI(baseURI string, subscriptionID string) ManagementClient { + return ManagementClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + BaseURI: baseURI, + SubscriptionID: subscriptionID, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/extensions.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/extensions.go new file mode 100644 index 000000000..ff00c8a81 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/extensions.go @@ -0,0 +1,381 @@ +package visualstudio + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// ExtensionsClient is the use these APIs to manage Visual Studio Team Services resources through the Azure Resource +// Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an +// x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests +// made to these resources are secure. For more information, see https://docs.microsoft.com/en-us/rest/api/index. +type ExtensionsClient struct { + ManagementClient +} + +// NewExtensionsClient creates an instance of the ExtensionsClient client. +func NewExtensionsClient(subscriptionID string) ExtensionsClient { + return NewExtensionsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewExtensionsClientWithBaseURI creates an instance of the ExtensionsClient client. +func NewExtensionsClientWithBaseURI(baseURI string, subscriptionID string) ExtensionsClient { + return ExtensionsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create registers the extension with a Visual Studio Team Services account. +// +// resourceGroupName is name of the resource group within the Azure subscription. body is an object containing +// additional information related to the extension request. accountResourceName is the name of the Visual Studio Team +// Services account resource. extensionResourceName is the name of the extension. +func (client ExtensionsClient) Create(resourceGroupName string, body ExtensionResourceRequest, accountResourceName string, extensionResourceName string) (result ExtensionResource, err error) { + req, err := client.CreatePreparer(resourceGroupName, body, accountResourceName, extensionResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ExtensionsClient) CreatePreparer(resourceGroupName string, body ExtensionResourceRequest, accountResourceName string, extensionResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountResourceName": autorest.Encode("path", accountResourceName), + "extensionResourceName": autorest.Encode("path", extensionResourceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{accountResourceName}/extension/{extensionResourceName}", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ExtensionsClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ExtensionsClient) CreateResponder(resp *http.Response) (result ExtensionResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete removes an extension resource registration for a Visual Studio Team Services account. +// +// resourceGroupName is name of the resource group within the Azure subscription. accountResourceName is the name of +// the Visual Studio Team Services account resource. extensionResourceName is the name of the extension. +func (client ExtensionsClient) Delete(resourceGroupName string, accountResourceName string, extensionResourceName string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(resourceGroupName, accountResourceName, extensionResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ExtensionsClient) DeletePreparer(resourceGroupName string, accountResourceName string, extensionResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountResourceName": autorest.Encode("path", accountResourceName), + "extensionResourceName": autorest.Encode("path", extensionResourceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{accountResourceName}/extension/{extensionResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ExtensionsClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ExtensionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get gets the details of an extension associated with a Visual Studio Team Services account resource. +// +// resourceGroupName is name of the resource group within the Azure subscription. accountResourceName is the name of +// the Visual Studio Team Services account resource. extensionResourceName is the name of the extension. +func (client ExtensionsClient) Get(resourceGroupName string, accountResourceName string, extensionResourceName string) (result ExtensionResource, err error) { + req, err := client.GetPreparer(resourceGroupName, accountResourceName, extensionResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ExtensionsClient) GetPreparer(resourceGroupName string, accountResourceName string, extensionResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountResourceName": autorest.Encode("path", accountResourceName), + "extensionResourceName": autorest.Encode("path", extensionResourceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{accountResourceName}/extension/{extensionResourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ExtensionsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ExtensionsClient) GetResponder(resp *http.Response) (result ExtensionResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByAccount gets the details of the extension resources created within the resource group. +// +// resourceGroupName is name of the resource group within the Azure subscription. accountResourceName is the name of +// the Visual Studio Team Services account resource. +func (client ExtensionsClient) ListByAccount(resourceGroupName string, accountResourceName string) (result ExtensionResourceListResult, err error) { + req, err := client.ListByAccountPreparer(resourceGroupName, accountResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "ListByAccount", nil, "Failure preparing request") + return + } + + resp, err := client.ListByAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "ListByAccount", resp, "Failure sending request") + return + } + + result, err = client.ListByAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "ListByAccount", resp, "Failure responding to request") + } + + return +} + +// ListByAccountPreparer prepares the ListByAccount request. +func (client ExtensionsClient) ListByAccountPreparer(resourceGroupName string, accountResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountResourceName": autorest.Encode("path", accountResourceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{accountResourceName}/extension", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByAccountSender sends the ListByAccount request. The method will close the +// http.Response Body if it receives an error. +func (client ExtensionsClient) ListByAccountSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByAccountResponder handles the response to the ListByAccount request. The method always +// closes the http.Response Body. +func (client ExtensionsClient) ListByAccountResponder(resp *http.Response) (result ExtensionResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates an existing extension registration for the Visual Studio Team Services account. +// +// resourceGroupName is name of the resource group within the Azure subscription. body is an object containing +// additional information related to the extension request. accountResourceName is the name of the Visual Studio Team +// Services account resource. extensionResourceName is the name of the extension. +func (client ExtensionsClient) Update(resourceGroupName string, body ExtensionResourceRequest, accountResourceName string, extensionResourceName string) (result ExtensionResource, err error) { + req, err := client.UpdatePreparer(resourceGroupName, body, accountResourceName, extensionResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ExtensionsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ExtensionsClient) UpdatePreparer(resourceGroupName string, body ExtensionResourceRequest, accountResourceName string, extensionResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "accountResourceName": autorest.Encode("path", accountResourceName), + "extensionResourceName": autorest.Encode("path", extensionResourceName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{accountResourceName}/extension/{extensionResourceName}", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ExtensionsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ExtensionsClient) UpdateResponder(resp *http.Response) (result ExtensionResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/models.go new file mode 100644 index 000000000..9b3bcfb9b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/models.go @@ -0,0 +1,143 @@ +package visualstudio + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +// AccountResource is the response to an account resource GET request. +type AccountResource struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Properties *map[string]*string `json:"properties,omitempty"` +} + +// AccountResourceListResult is the response to an account resource list GET request. +type AccountResourceListResult struct { + autorest.Response `json:"-"` + Value *[]AccountResource `json:"value,omitempty"` +} + +// AccountResourceRequest is the body of a PUT request to modify a Visual Studio account resource. +type AccountResourceRequest struct { + AccountName *string `json:"accountName,omitempty"` + Location *string `json:"location,omitempty"` + OperationType *map[string]interface{} `json:"operationType,omitempty"` + Properties *map[string]*string `json:"properties,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// CheckNameAvailabilityParameter is the body of a POST request to check name availability. +type CheckNameAvailabilityParameter struct { + ResourceName *string `json:"resourceName,omitempty"` + ResourceType *string `json:"resourceType,omitempty"` +} + +// CheckNameAvailabilityResult is the response to a name availability request. +type CheckNameAvailabilityResult struct { + autorest.Response `json:"-"` + Message *string `json:"message,omitempty"` + NameAvailable *bool `json:"nameAvailable,omitempty"` +} + +// ExtensionResource is the response to an extension resource GET request. +type ExtensionResource struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Plan *ExtensionResourcePlan `json:"plan,omitempty"` + Properties *map[string]*string `json:"properties,omitempty"` +} + +// ExtensionResourceListResult is the response to an extension resource list GET request. +type ExtensionResourceListResult struct { + autorest.Response `json:"-"` + Value *[]ExtensionResource `json:"value,omitempty"` +} + +// ExtensionResourcePlan is plan data for an extension resource. +type ExtensionResourcePlan struct { + Name *string `json:"name,omitempty"` + Product *string `json:"product,omitempty"` + PromotionCode *string `json:"promotionCode,omitempty"` + Publisher *string `json:"publisher,omitempty"` + Version *string `json:"version,omitempty"` +} + +// ExtensionResourceRequest is the body of an extension resource PUT request. +type ExtensionResourceRequest struct { + Location *string `json:"location,omitempty"` + Plan *ExtensionResourcePlan `json:"plan,omitempty"` + Properties *map[string]*string `json:"properties,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// Operation is properties of an operation supported by the resource provider. +type Operation struct { + Display *OperationProperties `json:"display,omitempty"` + Name *string `json:"name,omitempty"` +} + +// OperationListResult is container for a list of operations supported by a resource provider. +type OperationListResult struct { + autorest.Response `json:"-"` + Value *[]Operation `json:"value,omitempty"` +} + +// OperationProperties is properties of an operation supported by the resource provider. +type OperationProperties struct { + Description *string `json:"description,omitempty"` + Operation *string `json:"operation,omitempty"` + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` +} + +// ProjectResource is a Visual Studio Team Services project resource. +type ProjectResource struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` + Properties *map[string]*string `json:"properties,omitempty"` +} + +// ProjectResourceListResult is the response to a request to list Team Services project resources in a resource +// group/account. +type ProjectResourceListResult struct { + autorest.Response `json:"-"` + Value *[]ProjectResource `json:"value,omitempty"` +} + +// Resource is a generic Azure Resource Manager resource. +type Resource struct { + ID *string `json:"id,omitempty"` + Location *string `json:"location,omitempty"` + Name *string `json:"name,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/operations.go new file mode 100644 index 000000000..c862a194b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/operations.go @@ -0,0 +1,93 @@ +package visualstudio + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +// OperationsClient is the use these APIs to manage Visual Studio Team Services resources through the Azure Resource +// Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an +// x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests +// made to these resources are secure. For more information, see https://docs.microsoft.com/en-us/rest/api/index. +type OperationsClient struct { + ManagementClient +} + +// NewOperationsClient creates an instance of the OperationsClient client. +func NewOperationsClient(subscriptionID string) OperationsClient { + return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client. +func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient { + return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// List gets the details of all operations possible on the Microsoft.VisualStudio resource provider. +func (client OperationsClient) List() (result OperationListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.OperationsClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.OperationsClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.OperationsClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client OperationsClient) ListPreparer() (*http.Request, error) { + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/microsoft.visualstudio/operations")) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/projects.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/projects.go new file mode 100644 index 000000000..9becd6cd4 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/projects.go @@ -0,0 +1,413 @@ +package visualstudio + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + uuid "github.com/satori/go.uuid" + "net/http" +) + +// ProjectsClient is the use these APIs to manage Visual Studio Team Services resources through the Azure Resource +// Manager. All task operations conform to the HTTP/1.1 protocol specification and each operation returns an +// x-ms-request-id header that can be used to obtain information about the request. You must make sure that requests +// made to these resources are secure. For more information, see https://docs.microsoft.com/en-us/rest/api/index. +type ProjectsClient struct { + ManagementClient +} + +// NewProjectsClient creates an instance of the ProjectsClient client. +func NewProjectsClient(subscriptionID string) ProjectsClient { + return NewProjectsClientWithBaseURI(DefaultBaseURI, subscriptionID) +} + +// NewProjectsClientWithBaseURI creates an instance of the ProjectsClient client. +func NewProjectsClientWithBaseURI(baseURI string, subscriptionID string) ProjectsClient { + return ProjectsClient{NewWithBaseURI(baseURI, subscriptionID)} +} + +// Create creates a Team Services project in the collection with the specified name. 'VersionControlOption' and +// 'ProcessTemplateId' must be specified in the resource properties. Valid values for VersionControlOption: Git, Tfvc. +// Valid values for ProcessTemplateId: 6B724908-EF14-45CF-84F8-768B5384DA45, ADCC42AB-9882-485E-A3ED-7678F01F66BC, +// 27450541-8E31-4150-9947-DC59F998FC01 (these IDs correspond to Scrum, Agile, and CMMI process templates). This method +// may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to +// cancel polling and any outstanding HTTP requests. +// +// body is the request data. resourceGroupName is name of the resource group within the Azure subscription. +// rootResourceName is name of the Team Services account. resourceName is name of the Team Services project. validating +// is this parameter is ignored and should be set to an empty string. +func (client ProjectsClient) Create(body ProjectResource, resourceGroupName string, rootResourceName string, resourceName string, validating string, cancel <-chan struct{}) (<-chan ProjectResource, <-chan error) { + resultChan := make(chan ProjectResource, 1) + errChan := make(chan error, 1) + go func() { + var err error + var result ProjectResource + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreatePreparer(body, resourceGroupName, rootResourceName, resourceName, validating, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Create", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreatePreparer prepares the Create request. +func (client ProjectsClient) CreatePreparer(body ProjectResource, resourceGroupName string, rootResourceName string, resourceName string, validating string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "rootResourceName": autorest.Encode("path", rootResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if len(validating) > 0 { + queryParameters["validating"] = autorest.Encode("query", validating) + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ProjectsClient) CreateResponder(resp *http.Response) (result ProjectResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Get gets the details of a Team Services project resource. +// +// resourceGroupName is name of the resource group within the Azure subscription. rootResourceName is name of the Team +// Services account. resourceName is name of the Team Services project. +func (client ProjectsClient) Get(resourceGroupName string, rootResourceName string, resourceName string) (result ProjectResource, err error) { + req, err := client.GetPreparer(resourceGroupName, rootResourceName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ProjectsClient) GetPreparer(resourceGroupName string, rootResourceName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "rootResourceName": autorest.Encode("path", rootResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ProjectsClient) GetResponder(resp *http.Response) (result ProjectResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetJobStatus gets the status of the project resource creation job. +// +// resourceGroupName is name of the resource group within the Azure subscription. rootResourceName is name of the Team +// Services account. resourceName is name of the Team Services project. subContainerName is this parameter should be +// set to the resourceName. operation is the operation type. The only supported value is 'put'. jobID is the job +// identifier. +func (client ProjectsClient) GetJobStatus(resourceGroupName string, rootResourceName string, resourceName string, subContainerName string, operation string, jobID *uuid.UUID) (result ProjectResource, err error) { + req, err := client.GetJobStatusPreparer(resourceGroupName, rootResourceName, resourceName, subContainerName, operation, jobID) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "GetJobStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetJobStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "GetJobStatus", resp, "Failure sending request") + return + } + + result, err = client.GetJobStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "GetJobStatus", resp, "Failure responding to request") + } + + return +} + +// GetJobStatusPreparer prepares the GetJobStatus request. +func (client ProjectsClient) GetJobStatusPreparer(resourceGroupName string, rootResourceName string, resourceName string, subContainerName string, operation string, jobID *uuid.UUID) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "rootResourceName": autorest.Encode("path", rootResourceName), + "subContainerName": autorest.Encode("path", subContainerName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "operation": autorest.Encode("query", operation), + } + if jobID != nil { + queryParameters["jobId"] = autorest.Encode("query", *jobID) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}/subContainers/{subContainerName}/status", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetJobStatusSender sends the GetJobStatus request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) GetJobStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetJobStatusResponder handles the response to the GetJobStatus request. The method always +// closes the http.Response Body. +func (client ProjectsClient) GetJobStatusResponder(resp *http.Response) (result ProjectResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListByResourceGroup gets all Visual Studio Team Services project resources created in the specified Team Services +// account. +// +// resourceGroupName is name of the resource group within the Azure subscription. rootResourceName is name of the Team +// Services account. +func (client ProjectsClient) ListByResourceGroup(resourceGroupName string, rootResourceName string) (result ProjectResourceListResult, err error) { + req, err := client.ListByResourceGroupPreparer(resourceGroupName, rootResourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "ListByResourceGroup", nil, "Failure preparing request") + return + } + + resp, err := client.ListByResourceGroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "ListByResourceGroup", resp, "Failure sending request") + return + } + + result, err = client.ListByResourceGroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "ListByResourceGroup", resp, "Failure responding to request") + } + + return +} + +// ListByResourceGroupPreparer prepares the ListByResourceGroup request. +func (client ProjectsClient) ListByResourceGroupPreparer(resourceGroupName string, rootResourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "rootResourceName": autorest.Encode("path", rootResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always +// closes the http.Response Body. +func (client ProjectsClient) ListByResourceGroupResponder(resp *http.Response) (result ProjectResourceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update updates the tags of the specified Team Services project. +// +// resourceGroupName is name of the resource group within the Azure subscription. body is the request data. +// rootResourceName is name of the Team Services account. resourceName is name of the Team Services project. +func (client ProjectsClient) Update(resourceGroupName string, body ProjectResource, rootResourceName string, resourceName string) (result ProjectResource, err error) { + req, err := client.UpdatePreparer(resourceGroupName, body, rootResourceName, resourceName) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "visualstudio.ProjectsClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ProjectsClient) UpdatePreparer(resourceGroupName string, body ProjectResource, rootResourceName string, resourceName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "resourceName": autorest.Encode("path", resourceName), + "rootResourceName": autorest.Encode("path", rootResourceName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2014-04-01-preview" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.visualstudio/account/{rootResourceName}/project/{resourceName}", pathParameters), + autorest.WithJSON(body), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ProjectsClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ProjectsClient) UpdateResponder(resp *http.Response) (result ProjectResource, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/version.go new file mode 100644 index 000000000..77dbeccb0 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/visualstudio/version.go @@ -0,0 +1,28 @@ +package visualstudio + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/v11.0.0-beta arm-visualstudio/2014-04-01-preview" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return "v11.0.0-beta" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/apps.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/apps.go index 4515b48bc..37d1f6ef8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/apps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/apps.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// AppsClient is the composite Swagger for WebSite Management Client +// AppsClient is the webSite Management Client type AppsClient struct { ManagementClient } @@ -42,9 +41,8 @@ func NewAppsClientWithBaseURI(baseURI string, subscriptionID string) AppsClient // AddPremierAddOn updates a named add-on of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. premierAddOnName is add-on name. -// premierAddOn is a JSON representation of the edited premier add-on. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// premierAddOnName is add-on name. premierAddOn is a JSON representation of the edited premier add-on. func (client AppsClient) AddPremierAddOn(resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn) (result PremierAddOn, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -120,11 +118,9 @@ func (client AppsClient) AddPremierAddOnResponder(resp *http.Response) (result P // AddPremierAddOnSlot updates a named add-on of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. premierAddOnName is add-on name. -// premierAddOn is a JSON representation of the edited premier add-on. slot is -// name of the deployment slot. If a slot is not specified, the API will update -// the named add-on for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// premierAddOnName is add-on name. premierAddOn is a JSON representation of the edited premier add-on. slot is name of +// the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. func (client AppsClient) AddPremierAddOnSlot(resourceGroupName string, name string, premierAddOnName string, premierAddOn PremierAddOn, slot string) (result PremierAddOn, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -201,8 +197,8 @@ func (client AppsClient) AddPremierAddOnSlotResponder(resp *http.Response) (resu // AnalyzeCustomHostname analyze a custom hostname. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app hostName is custom hostname +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. hostName is +// custom hostname. func (client AppsClient) AnalyzeCustomHostname(resourceGroupName string, name string, hostName string) (result CustomHostnameAnalysisResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -278,9 +274,8 @@ func (client AppsClient) AnalyzeCustomHostnameResponder(resp *http.Response) (re // AnalyzeCustomHostnameSlot analyze a custom hostname. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app slot is name of web app slot. If not -// specified then will default to production slot. hostName is custom hostname +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. hostName is custom hostname. func (client AppsClient) AnalyzeCustomHostnameSlot(resourceGroupName string, name string, slot string, hostName string) (result CustomHostnameAnalysisResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -355,12 +350,10 @@ func (client AppsClient) AnalyzeCustomHostnameSlotResponder(resp *http.Response) return } -// ApplySlotConfigToProduction applies the configuration settings from the -// target slot onto the current slot. +// ApplySlotConfigToProduction applies the configuration settings from the target slot onto the current slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slotSwapEntity is jSON object that -// contains the target slot name. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// slotSwapEntity is JSON object that contains the target slot name. See example. func (client AppsClient) ApplySlotConfigToProduction(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -435,13 +428,11 @@ func (client AppsClient) ApplySlotConfigToProductionResponder(resp *http.Respons return } -// ApplySlotConfigurationSlot applies the configuration settings from the -// target slot onto the current slot. +// ApplySlotConfigurationSlot applies the configuration settings from the target slot onto the current slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slotSwapEntity is jSON object that -// contains the target slot name. See example. slot is name of the source slot. -// If a slot is not specified, the production slot is used as the source slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// slotSwapEntity is JSON object that contains the target slot name. See example. slot is name of the source slot. If a +// slot is not specified, the production slot is used as the source slot. func (client AppsClient) ApplySlotConfigurationSlot(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -519,9 +510,8 @@ func (client AppsClient) ApplySlotConfigurationSlotResponder(resp *http.Response // Backup creates a backup of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. request is backup configuration. You can -// use the JSON response from the POST action as input here. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. request is +// backup configuration. You can use the JSON response from the POST action as input here. func (client AppsClient) Backup(resourceGroupName string, name string, request BackupRequest) (result BackupItem, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -604,11 +594,9 @@ func (client AppsClient) BackupResponder(resp *http.Response) (result BackupItem // BackupSlot creates a backup of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. request is backup configuration. You can -// use the JSON response from the POST action as input here. slot is name of -// the deployment slot. If a slot is not specified, the API will create a -// backup for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. request is +// backup configuration. You can use the JSON response from the POST action as input here. slot is name of the +// deployment slot. If a slot is not specified, the API will create a backup for the production slot. func (client AppsClient) BackupSlot(resourceGroupName string, name string, request BackupRequest, slot string) (result BackupItem, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -690,12 +678,10 @@ func (client AppsClient) BackupSlotResponder(resp *http.Response) (result Backup return } -// CreateDeployment create a deployment for an app, a specific deployment slot, -// and/or a specific scaled-out instance. +// CreateDeployment create a deployment for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is iD of an existing deployment. -// deployment is deployment details. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is ID of +// an existing deployment. deployment is deployment details. func (client AppsClient) CreateDeployment(resourceGroupName string, name string, ID string, deployment Deployment) (result Deployment, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -769,13 +755,11 @@ func (client AppsClient) CreateDeploymentResponder(resp *http.Response) (result return } -// CreateDeploymentSlot create a deployment for an app, a specific deployment -// slot, and/or a specific scaled-out instance. +// CreateDeploymentSlot create a deployment for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is iD of an existing deployment. slot -// is name of the deployment slot. If a slot is not specified, the API creates -// a deployment for the production slot. deployment is deployment details. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is ID of +// an existing deployment. slot is name of the deployment slot. If a slot is not specified, the API creates a +// deployment for the production slot. deployment is deployment details. func (client AppsClient) CreateDeploymentSlot(resourceGroupName string, name string, ID string, slot string, deployment Deployment) (result Deployment, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -850,48 +834,257 @@ func (client AppsClient) CreateDeploymentSlotResponder(resp *http.Response) (res return } -// CreateInstanceDeployment create a deployment for an app, a specific -// deployment slot, and/or a specific scaled-out instance. +// CreateFunction create function for web site, or a deployment slot. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is iD of an existing deployment. -// instanceID is iD of a specific scaled-out instance. This is the value of the -// name property in the JSON response from "GET api/sites/{siteName}/instances" -// deployment is deployment details. -func (client AppsClient) CreateInstanceDeployment(resourceGroupName string, name string, ID string, instanceID string, deployment Deployment) (result Deployment, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. functionEnvelope is function details. +func (client AppsClient) CreateFunction(resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, cancel <-chan struct{}) (<-chan FunctionEnvelope, <-chan error) { + resultChan := make(chan FunctionEnvelope, 1) + errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateInstanceDeployment") + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateFunction") + close(errChan) + close(resultChan) + return resultChan, errChan } - req, err := client.CreateInstanceDeploymentPreparer(resourceGroupName, name, ID, instanceID, deployment) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceDeployment", nil, "Failure preparing request") - return + go func() { + var err error + var result FunctionEnvelope + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateFunctionPreparer(resourceGroupName, name, functionName, functionEnvelope, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", nil, "Failure preparing request") + return + } + + resp, err := client.CreateFunctionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", resp, "Failure sending request") + return + } + + result, err = client.CreateFunctionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateFunction", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateFunctionPreparer prepares the CreateFunction request. +func (client AppsClient) CreateFunctionPreparer(resourceGroupName string, name string, functionName string, functionEnvelope FunctionEnvelope, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), } - resp, err := client.CreateInstanceDeploymentSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceDeployment", resp, "Failure sending request") - return + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, } - result, err = client.CreateInstanceDeploymentResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceDeployment", resp, "Failure responding to request") - } + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), + autorest.WithJSON(functionEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} +// CreateFunctionSender sends the CreateFunction request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) CreateFunctionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateFunctionResponder handles the response to the CreateFunction request. The method always +// closes the http.Response Body. +func (client AppsClient) CreateFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} return } -// CreateInstanceDeploymentPreparer prepares the CreateInstanceDeployment request. -func (client AppsClient) CreateInstanceDeploymentPreparer(resourceGroupName string, name string, ID string, instanceID string, deployment Deployment) (*http.Request, error) { +// CreateInstanceFunctionSlot create function for web site, or a deployment slot. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. functionEnvelope is function details. +func (client AppsClient) CreateInstanceFunctionSlot(resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, cancel <-chan struct{}) (<-chan FunctionEnvelope, <-chan error) { + resultChan := make(chan FunctionEnvelope, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateInstanceFunctionSlot") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result FunctionEnvelope + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateInstanceFunctionSlotPreparer(resourceGroupName, name, functionName, slot, functionEnvelope, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", nil, "Failure preparing request") + return + } + + resp, err := client.CreateInstanceFunctionSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", resp, "Failure sending request") + return + } + + result, err = client.CreateInstanceFunctionSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceFunctionSlot", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateInstanceFunctionSlotPreparer prepares the CreateInstanceFunctionSlot request. +func (client AppsClient) CreateInstanceFunctionSlotPreparer(resourceGroupName string, name string, functionName string, slot string, functionEnvelope FunctionEnvelope, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), + autorest.WithJSON(functionEnvelope), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateInstanceFunctionSlotSender sends the CreateInstanceFunctionSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) CreateInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateInstanceFunctionSlotResponder handles the response to the CreateInstanceFunctionSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) CreateInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateInstanceMSDeployOperation invoke the MSDeploy web app extension. This method may poll for completion. Polling +// can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. instanceID +// is ID of web app instance. mSDeploy is details of MSDeploy operation +func (client AppsClient) CreateInstanceMSDeployOperation(resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy, cancel <-chan struct{}) (<-chan MSDeployStatus, <-chan error) { + resultChan := make(chan MSDeployStatus, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateInstanceMSDeployOperation") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result MSDeployStatus + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateInstanceMSDeployOperationPreparer(resourceGroupName, name, instanceID, mSDeploy, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", nil, "Failure preparing request") + return + } + + resp, err := client.CreateInstanceMSDeployOperationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", resp, "Failure sending request") + return + } + + result, err = client.CreateInstanceMSDeployOperationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperation", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateInstanceMSDeployOperationPreparer prepares the CreateInstanceMSDeployOperation request. +func (client AppsClient) CreateInstanceMSDeployOperationPreparer(resourceGroupName string, name string, instanceID string, mSDeploy MSDeploy, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -907,75 +1100,89 @@ func (client AppsClient) CreateInstanceDeploymentPreparer(resourceGroupName stri autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}", pathParameters), - autorest.WithJSON(deployment), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithJSON(mSDeploy), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } -// CreateInstanceDeploymentSender sends the CreateInstanceDeployment request. The method will close the +// CreateInstanceMSDeployOperationSender sends the CreateInstanceMSDeployOperation request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateInstanceDeploymentSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) +func (client AppsClient) CreateInstanceMSDeployOperationSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } -// CreateInstanceDeploymentResponder handles the response to the CreateInstanceDeployment request. The method always +// CreateInstanceMSDeployOperationResponder handles the response to the CreateInstanceMSDeployOperation request. The method always // closes the http.Response Body. -func (client AppsClient) CreateInstanceDeploymentResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) CreateInstanceMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateInstanceDeploymentSlot create a deployment for an app, a specific -// deployment slot, and/or a specific scaled-out instance. +// CreateInstanceMSDeployOperationSlot invoke the MSDeploy web app extension. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is iD of an existing deployment. slot -// is name of the deployment slot. If a slot is not specified, the API creates -// a deployment for the production slot. instanceID is iD of a specific -// scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances" deployment is deployment -// details. -func (client AppsClient) CreateInstanceDeploymentSlot(resourceGroupName string, name string, ID string, slot string, instanceID string, deployment Deployment) (result Deployment, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. instanceID is ID of web app instance. +// mSDeploy is details of MSDeploy operation +func (client AppsClient) CreateInstanceMSDeployOperationSlot(resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy, cancel <-chan struct{}) (<-chan MSDeployStatus, <-chan error) { + resultChan := make(chan MSDeployStatus, 1) + errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateInstanceDeploymentSlot") + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot") + close(errChan) + close(resultChan) + return resultChan, errChan } - req, err := client.CreateInstanceDeploymentSlotPreparer(resourceGroupName, name, ID, slot, instanceID, deployment) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceDeploymentSlot", nil, "Failure preparing request") - return - } + go func() { + var err error + var result MSDeployStatus + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateInstanceMSDeployOperationSlotPreparer(resourceGroupName, name, slot, instanceID, mSDeploy, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", nil, "Failure preparing request") + return + } - resp, err := client.CreateInstanceDeploymentSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceDeploymentSlot", resp, "Failure sending request") - return - } + resp, err := client.CreateInstanceMSDeployOperationSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", resp, "Failure sending request") + return + } - result, err = client.CreateInstanceDeploymentSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceDeploymentSlot", resp, "Failure responding to request") - } - - return + result, err = client.CreateInstanceMSDeployOperationSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateInstanceMSDeployOperationSlot", resp, "Failure responding to request") + } + }() + return resultChan, errChan } -// CreateInstanceDeploymentSlotPreparer prepares the CreateInstanceDeploymentSlot request. -func (client AppsClient) CreateInstanceDeploymentSlotPreparer(resourceGroupName string, name string, ID string, slot string, instanceID string, deployment Deployment) (*http.Request, error) { +// CreateInstanceMSDeployOperationSlotPreparer prepares the CreateInstanceMSDeployOperationSlot request. +func (client AppsClient) CreateInstanceMSDeployOperationSlotPreparer(resourceGroupName string, name string, slot string, instanceID string, mSDeploy MSDeploy, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -992,47 +1199,237 @@ func (client AppsClient) CreateInstanceDeploymentSlotPreparer(resourceGroupName autorest.AsJSON(), autorest.AsPut(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}", pathParameters), - autorest.WithJSON(deployment), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithJSON(mSDeploy), autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) + return preparer.Prepare(&http.Request{Cancel: cancel}) } -// CreateInstanceDeploymentSlotSender sends the CreateInstanceDeploymentSlot request. The method will close the +// CreateInstanceMSDeployOperationSlotSender sends the CreateInstanceMSDeployOperationSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) CreateInstanceDeploymentSlotSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) +func (client AppsClient) CreateInstanceMSDeployOperationSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) } -// CreateInstanceDeploymentSlotResponder handles the response to the CreateInstanceDeploymentSlot request. The method always +// CreateInstanceMSDeployOperationSlotResponder handles the response to the CreateInstanceMSDeployOperationSlot request. The method always // closes the http.Response Body. -func (client AppsClient) CreateInstanceDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) CreateInstanceMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// CreateOrUpdate creates a new web, mobile, or API app in an existing resource -// group, or updates an existing app. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// CreateMSDeployOperation invoke the MSDeploy web app extension. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is unique name of the app to create or update. To create or -// update a deployment slot, use the {slot} parameter. siteEnvelope is a JSON -// representation of the app properties. See example. skipDNSRegistration is if -// true web app hostname is not registered with DNS on creation. This parameter -// is -// only used for app creation skipCustomDomainVerification is if true, custom -// (non *.azurewebsites.net) domains associated with web app are not verified. -// forceDNSRegistration is if true, web app hostname is force registered with -// DNS TTLInSeconds is time to live in seconds for web app's default domain -// name +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. mSDeploy is +// details of MSDeploy operation +func (client AppsClient) CreateMSDeployOperation(resourceGroupName string, name string, mSDeploy MSDeploy, cancel <-chan struct{}) (<-chan MSDeployStatus, <-chan error) { + resultChan := make(chan MSDeployStatus, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateMSDeployOperation") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result MSDeployStatus + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateMSDeployOperationPreparer(resourceGroupName, name, mSDeploy, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", nil, "Failure preparing request") + return + } + + resp, err := client.CreateMSDeployOperationSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", resp, "Failure sending request") + return + } + + result, err = client.CreateMSDeployOperationResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperation", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateMSDeployOperationPreparer prepares the CreateMSDeployOperation request. +func (client AppsClient) CreateMSDeployOperationPreparer(resourceGroupName string, name string, mSDeploy MSDeploy, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters), + autorest.WithJSON(mSDeploy), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateMSDeployOperationSender sends the CreateMSDeployOperation request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) CreateMSDeployOperationSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateMSDeployOperationResponder handles the response to the CreateMSDeployOperation request. The method always +// closes the http.Response Body. +func (client AppsClient) CreateMSDeployOperationResponder(resp *http.Response) (result MSDeployStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateMSDeployOperationSlot invoke the MSDeploy web app extension. This method may poll for completion. Polling can +// be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding +// HTTP requests. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. mSDeploy is details of MSDeploy operation +func (client AppsClient) CreateMSDeployOperationSlot(resourceGroupName string, name string, slot string, mSDeploy MSDeploy, cancel <-chan struct{}) (<-chan MSDeployStatus, <-chan error) { + resultChan := make(chan MSDeployStatus, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateMSDeployOperationSlot") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result MSDeployStatus + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.CreateMSDeployOperationSlotPreparer(resourceGroupName, name, slot, mSDeploy, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", nil, "Failure preparing request") + return + } + + resp, err := client.CreateMSDeployOperationSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", resp, "Failure sending request") + return + } + + result, err = client.CreateMSDeployOperationSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateMSDeployOperationSlot", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// CreateMSDeployOperationSlotPreparer prepares the CreateMSDeployOperationSlot request. +func (client AppsClient) CreateMSDeployOperationSlotPreparer(resourceGroupName string, name string, slot string, mSDeploy MSDeploy, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters), + autorest.WithJSON(mSDeploy), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// CreateMSDeployOperationSlotSender sends the CreateMSDeployOperationSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) CreateMSDeployOperationSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// CreateMSDeployOperationSlotResponder handles the response to the CreateMSDeployOperationSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) CreateMSDeployOperationSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusConflict), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdate creates a new web, mobile, or API app in an existing resource group, or updates an existing app. This +// method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be +// used to cancel polling and any outstanding HTTP requests. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is unique name of the app to +// create or update. To create or update a deployment slot, use the {slot} parameter. siteEnvelope is a JSON +// representation of the app properties. See example. skipDNSRegistration is if true web app hostname is not registered +// with DNS on creation. This parameter is +// only used for app creation. skipCustomDomainVerification is if true, custom (non *.azurewebsites.net) domains +// associated with web app are not verified. forceDNSRegistration is if true, web app hostname is force registered with +// DNS. TTLInSeconds is time to live in seconds for web app's default domain name. func (client AppsClient) CreateOrUpdate(resourceGroupName string, name string, siteEnvelope Site, skipDNSRegistration *bool, skipCustomDomainVerification *bool, forceDNSRegistration *bool, TTLInSeconds string, cancel <-chan struct{}) (<-chan Site, <-chan error) { resultChan := make(chan Site, 1) errChan := make(chan error, 1) @@ -1043,12 +1440,8 @@ func (client AppsClient) CreateOrUpdate(resourceGroupName string, name string, s {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, {TargetValue: siteEnvelope, Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateOrUpdate") close(errChan) @@ -1060,8 +1453,10 @@ func (client AppsClient) CreateOrUpdate(resourceGroupName string, name string, s var err error var result Site defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -1144,20 +1539,14 @@ func (client AppsClient) CreateOrUpdateResponder(resp *http.Response) (result Si // CreateOrUpdateConfiguration updates the configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteConfig is jSON representation of a -// SiteConfig object. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. siteConfig +// is JSON representation of a SiteConfig object. See example. func (client AppsClient) CreateOrUpdateConfiguration(resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, - {TargetValue: siteConfig, - Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateOrUpdateConfiguration") } @@ -1226,22 +1615,15 @@ func (client AppsClient) CreateOrUpdateConfigurationResponder(resp *http.Respons // CreateOrUpdateConfigurationSlot updates the configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteConfig is jSON representation of a -// SiteConfig object. See example. slot is name of the deployment slot. If a -// slot is not specified, the API will update configuration for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. siteConfig +// is JSON representation of a SiteConfig object. See example. slot is name of the deployment slot. If a slot is not +// specified, the API will update configuration for the production slot. func (client AppsClient) CreateOrUpdateConfigurationSlot(resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, - {TargetValue: siteConfig, - Constraints: []validation.Constraint{{Target: "siteConfig.SiteConfig", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteConfig.SiteConfig.Push.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateOrUpdateConfigurationSlot") } @@ -1309,12 +1691,11 @@ func (client AppsClient) CreateOrUpdateConfigurationSlotResponder(resp *http.Res return } -// CreateOrUpdateDomainOwnershipIdentifier creates a domain ownership -// identifier for web app, or updates an existing ownership identifier. +// CreateOrUpdateDomainOwnershipIdentifier creates a domain ownership identifier for web app, or updates an existing +// ownership identifier. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. domainOwnershipIdentifier is a JSON +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. domainOwnershipIdentifier is a JSON // representation of the domain ownership properties. func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifier(resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) { if err := validation.Validate([]validation.Validation{ @@ -1389,15 +1770,13 @@ func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierResponder(resp * return } -// CreateOrUpdateDomainOwnershipIdentifierSlot creates a domain ownership -// identifier for web app, or updates an existing ownership identifier. +// CreateOrUpdateDomainOwnershipIdentifierSlot creates a domain ownership identifier for web app, or updates an +// existing ownership identifier. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. domainOwnershipIdentifier is a JSON -// representation of the domain ownership properties. slot is name of the -// deployment slot. If a slot is not specified, the API will delete the binding -// for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. domainOwnershipIdentifier is a JSON +// representation of the domain ownership properties. slot is name of the deployment slot. If a slot is not specified, +// the API will delete the binding for the production slot. func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlot(resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1474,10 +1853,9 @@ func (client AppsClient) CreateOrUpdateDomainOwnershipIdentifierSlotResponder(re // CreateOrUpdateHostNameBinding creates a hostname binding for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. hostName is hostname in the hostname -// binding. hostNameBinding is binding details. This is the JSON representation -// of a HostNameBinding object. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. hostName is +// hostname in the hostname binding. hostNameBinding is binding details. This is the JSON representation of a +// HostNameBinding object. func (client AppsClient) CreateOrUpdateHostNameBinding(resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding) (result HostNameBinding, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1553,11 +1931,10 @@ func (client AppsClient) CreateOrUpdateHostNameBindingResponder(resp *http.Respo // CreateOrUpdateHostNameBindingSlot creates a hostname binding for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. hostName is hostname in the hostname -// binding. hostNameBinding is binding details. This is the JSON representation -// of a HostNameBinding object. slot is name of the deployment slot. If a slot -// is not specified, the API will create a binding for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. hostName is +// hostname in the hostname binding. hostNameBinding is binding details. This is the JSON representation of a +// HostNameBinding object. slot is name of the deployment slot. If a slot is not specified, the API will create a +// binding for the production slot. func (client AppsClient) CreateOrUpdateHostNameBindingSlot(resourceGroupName string, name string, hostName string, hostNameBinding HostNameBinding, slot string) (result HostNameBinding, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1632,13 +2009,11 @@ func (client AppsClient) CreateOrUpdateHostNameBindingSlotResponder(resp *http.R return } -// CreateOrUpdateHybridConnection creates a new Hybrid Connection using a -// Service Bus relay. +// CreateOrUpdateHybridConnection creates a new Hybrid Connection using a Service Bus relay. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection connectionEnvelope is the details of the hybrid connection +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. +// connectionEnvelope is the details of the hybrid connection. func (client AppsClient) CreateOrUpdateHybridConnection(resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1713,14 +2088,11 @@ func (client AppsClient) CreateOrUpdateHybridConnectionResponder(resp *http.Resp return } -// CreateOrUpdateHybridConnectionSlot creates a new Hybrid Connection using a -// Service Bus relay. +// CreateOrUpdateHybridConnectionSlot creates a new Hybrid Connection using a Service Bus relay. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection connectionEnvelope is the details of the hybrid connection slot -// is the name of the slot for the web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. +// connectionEnvelope is the details of the hybrid connection. slot is the name of the slot for the web app. func (client AppsClient) CreateOrUpdateHybridConnectionSlot(resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1796,13 +2168,170 @@ func (client AppsClient) CreateOrUpdateHybridConnectionSlotResponder(resp *http. return } -// CreateOrUpdateRelayServiceConnection creates a new hybrid connection -// configuration (PUT), or updates an existing one (PATCH). +// CreateOrUpdatePublicCertificate creates a hostname binding for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection configuration. connectionEnvelope is details of the hybrid -// connection configuration. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// publicCertificateName is public certificate name. publicCertificate is public certificate details. This is the JSON +// representation of a PublicCertificate object. +func (client AppsClient) CreateOrUpdatePublicCertificate(resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (result PublicCertificate, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate") + } + + req, err := client.CreateOrUpdatePublicCertificatePreparer(resourceGroupName, name, publicCertificateName, publicCertificate) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdatePublicCertificateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdatePublicCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificate", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePublicCertificatePreparer prepares the CreateOrUpdatePublicCertificate request. +func (client AppsClient) CreateOrUpdatePublicCertificatePreparer(resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithJSON(publicCertificate), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdatePublicCertificateSender sends the CreateOrUpdatePublicCertificate request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) CreateOrUpdatePublicCertificateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdatePublicCertificateResponder handles the response to the CreateOrUpdatePublicCertificate request. The method always +// closes the http.Response Body. +func (client AppsClient) CreateOrUpdatePublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdatePublicCertificateSlot creates a hostname binding for an app. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// publicCertificateName is public certificate name. publicCertificate is public certificate details. This is the JSON +// representation of a PublicCertificate object. slot is name of the deployment slot. If a slot is not specified, the +// API will create a binding for the production slot. +func (client AppsClient) CreateOrUpdatePublicCertificateSlot(resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (result PublicCertificate, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot") + } + + req, err := client.CreateOrUpdatePublicCertificateSlotPreparer(resourceGroupName, name, publicCertificateName, publicCertificate, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", nil, "Failure preparing request") + return + } + + resp, err := client.CreateOrUpdatePublicCertificateSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure sending request") + return + } + + result, err = client.CreateOrUpdatePublicCertificateSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "CreateOrUpdatePublicCertificateSlot", resp, "Failure responding to request") + } + + return +} + +// CreateOrUpdatePublicCertificateSlotPreparer prepares the CreateOrUpdatePublicCertificateSlot request. +func (client AppsClient) CreateOrUpdatePublicCertificateSlotPreparer(resourceGroupName string, name string, publicCertificateName string, publicCertificate PublicCertificate, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithJSON(publicCertificate), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// CreateOrUpdatePublicCertificateSlotSender sends the CreateOrUpdatePublicCertificateSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) CreateOrUpdatePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateOrUpdatePublicCertificateSlotResponder handles the response to the CreateOrUpdatePublicCertificateSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) CreateOrUpdatePublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateOrUpdateRelayServiceConnection creates a new hybrid connection configuration (PUT), or updates an existing one +// (PATCH). +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection configuration. connectionEnvelope is details of the hybrid connection +// configuration. func (client AppsClient) CreateOrUpdateRelayServiceConnection(resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1876,15 +2405,13 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionResponder(resp *htt return } -// CreateOrUpdateRelayServiceConnectionSlot creates a new hybrid connection -// configuration (PUT), or updates an existing one (PATCH). +// CreateOrUpdateRelayServiceConnectionSlot creates a new hybrid connection configuration (PUT), or updates an existing +// one (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection configuration. connectionEnvelope is details of the hybrid -// connection configuration. slot is name of the deployment slot. If a slot is -// not specified, the API will create or update a hybrid connection for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection configuration. connectionEnvelope is details of the hybrid connection +// configuration. slot is name of the deployment slot. If a slot is not specified, the API will create or update a +// hybrid connection for the production slot. func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlot(resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1959,24 +2486,18 @@ func (client AppsClient) CreateOrUpdateRelayServiceConnectionSlotResponder(resp return } -// CreateOrUpdateSlot creates a new web, mobile, or API app in an existing -// resource group, or updates an existing app. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdateSlot creates a new web, mobile, or API app in an existing resource group, or updates an existing app. +// This method may poll for completion. Polling can be canceled by passing the cancel channel argument. The channel +// will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is unique name of the app to create or update. To create or -// update a deployment slot, use the {slot} parameter. siteEnvelope is a JSON -// representation of the app properties. See example. slot is name of the -// deployment slot to create or update. By default, this API attempts to create -// or modify the production slot. skipDNSRegistration is if true web app -// hostname is not registered with DNS on creation. This parameter is -// only used for app creation skipCustomDomainVerification is if true, custom -// (non *.azurewebsites.net) domains associated with web app are not verified. -// forceDNSRegistration is if true, web app hostname is force registered with -// DNS TTLInSeconds is time to live in seconds for web app's default domain -// name +// resourceGroupName is name of the resource group to which the resource belongs. name is unique name of the app to +// create or update. To create or update a deployment slot, use the {slot} parameter. siteEnvelope is a JSON +// representation of the app properties. See example. slot is name of the deployment slot to create or update. By +// default, this API attempts to create or modify the production slot. skipDNSRegistration is if true web app hostname +// is not registered with DNS on creation. This parameter is +// only used for app creation. skipCustomDomainVerification is if true, custom (non *.azurewebsites.net) domains +// associated with web app are not verified. forceDNSRegistration is if true, web app hostname is force registered with +// DNS. TTLInSeconds is time to live in seconds for web app's default domain name. func (client AppsClient) CreateOrUpdateSlot(resourceGroupName string, name string, siteEnvelope Site, slot string, skipDNSRegistration *bool, skipCustomDomainVerification *bool, forceDNSRegistration *bool, TTLInSeconds string, cancel <-chan struct{}) (<-chan Site, <-chan error) { resultChan := make(chan Site, 1) errChan := make(chan error, 1) @@ -1987,12 +2508,8 @@ func (client AppsClient) CreateOrUpdateSlot(resourceGroupName string, name strin {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, {TargetValue: siteEnvelope, Constraints: []validation.Constraint{{Target: "siteEnvelope.SiteProperties", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.SiteConfig.Push.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}, - }}, - {Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "siteEnvelope.SiteProperties.CloningInfo.SourceWebAppID", Name: validation.Null, Rule: true, Chain: nil}}}, }}}}}); err != nil { errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "CreateOrUpdateSlot") close(errChan) @@ -2004,8 +2521,10 @@ func (client AppsClient) CreateOrUpdateSlot(resourceGroupName string, name strin var err error var result Site defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -2087,14 +2606,12 @@ func (client AppsClient) CreateOrUpdateSlotResponder(resp *http.Response) (resul return } -// CreateOrUpdateSourceControl updates the source control configuration of an -// app. This method may poll for completion. Polling can be canceled by passing -// the cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// CreateOrUpdateSourceControl updates the source control configuration of an app. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any +// outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteSourceControl is jSON representation -// of a SiteSourceControl object. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// siteSourceControl is JSON representation of a SiteSourceControl object. See example. func (client AppsClient) CreateOrUpdateSourceControl(resourceGroupName string, name string, siteSourceControl SiteSourceControl, cancel <-chan struct{}) (<-chan SiteSourceControl, <-chan error) { resultChan := make(chan SiteSourceControl, 1) errChan := make(chan error, 1) @@ -2113,8 +2630,10 @@ func (client AppsClient) CreateOrUpdateSourceControl(resourceGroupName string, n var err error var result SiteSourceControl defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -2183,16 +2702,13 @@ func (client AppsClient) CreateOrUpdateSourceControlResponder(resp *http.Respons return } -// CreateOrUpdateSourceControlSlot updates the source control configuration of -// an app. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel +// CreateOrUpdateSourceControlSlot updates the source control configuration of an app. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteSourceControl is jSON representation -// of a SiteSourceControl object. See example. slot is name of the deployment -// slot. If a slot is not specified, the API will update the source control -// configuration for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// siteSourceControl is JSON representation of a SiteSourceControl object. See example. slot is name of the deployment +// slot. If a slot is not specified, the API will update the source control configuration for the production slot. func (client AppsClient) CreateOrUpdateSourceControlSlot(resourceGroupName string, name string, siteSourceControl SiteSourceControl, slot string, cancel <-chan struct{}) (<-chan SiteSourceControl, <-chan error) { resultChan := make(chan SiteSourceControl, 1) errChan := make(chan error, 1) @@ -2211,8 +2727,10 @@ func (client AppsClient) CreateOrUpdateSourceControlSlot(resourceGroupName strin var err error var result SiteSourceControl defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -2282,13 +2800,12 @@ func (client AppsClient) CreateOrUpdateSourceControlSlotResponder(resp *http.Res return } -// CreateOrUpdateVnetConnection adds a Virtual Network connection to an app or -// slot (PUT) or updates the connection properties (PATCH). +// CreateOrUpdateVnetConnection adds a Virtual Network connection to an app or slot (PUT) or updates the connection +// properties (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of an existing Virtual -// Network. connectionEnvelope is properties of the Virtual Network connection. -// See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of an existing Virtual Network. connectionEnvelope is properties of the Virtual Network connection. See +// example. func (client AppsClient) CreateOrUpdateVnetConnection(resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2362,13 +2879,11 @@ func (client AppsClient) CreateOrUpdateVnetConnectionResponder(resp *http.Respon return } -// CreateOrUpdateVnetConnectionGateway adds a gateway to a connected Virtual -// Network (PUT) or updates it (PATCH). +// CreateOrUpdateVnetConnectionGateway adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the Virtual Network. -// gatewayName is name of the gateway. Currently, the only supported string is -// "primary". connectionEnvelope is the properties to update this gateway with. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the Virtual Network. gatewayName is name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope is the properties to update this gateway with. func (client AppsClient) CreateOrUpdateVnetConnectionGateway(resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2443,15 +2958,12 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewayResponder(resp *http return } -// CreateOrUpdateVnetConnectionGatewaySlot adds a gateway to a connected -// Virtual Network (PUT) or updates it (PATCH). +// CreateOrUpdateVnetConnectionGatewaySlot adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the Virtual Network. -// gatewayName is name of the gateway. Currently, the only supported string is -// "primary". connectionEnvelope is the properties to update this gateway with. -// slot is name of the deployment slot. If a slot is not specified, the API -// will add or update a gateway for the production slot's Virtual Network. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the Virtual Network. gatewayName is name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope is the properties to update this gateway with. slot is name of the deployment slot. If a slot is +// not specified, the API will add or update a gateway for the production slot's Virtual Network. func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlot(resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2527,14 +3039,13 @@ func (client AppsClient) CreateOrUpdateVnetConnectionGatewaySlotResponder(resp * return } -// CreateOrUpdateVnetConnectionSlot adds a Virtual Network connection to an app -// or slot (PUT) or updates the connection properties (PATCH). +// CreateOrUpdateVnetConnectionSlot adds a Virtual Network connection to an app or slot (PUT) or updates the connection +// properties (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of an existing Virtual -// Network. connectionEnvelope is properties of the Virtual Network connection. -// See example. slot is name of the deployment slot. If a slot is not -// specified, the API will add or update connections for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of an existing Virtual Network. connectionEnvelope is properties of the Virtual Network connection. See +// example. slot is name of the deployment slot. If a slot is not specified, the API will add or update connections for +// the production slot. func (client AppsClient) CreateOrUpdateVnetConnectionSlot(resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2611,12 +3122,10 @@ func (client AppsClient) CreateOrUpdateVnetConnectionSlotResponder(resp *http.Re // Delete deletes a web, mobile, or API app, or one of the deployment slots. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app to delete. deleteMetrics is if true, web -// app metrics are also deleted deleteEmptyServerFarm is specify true if the -// App Service plan will be empty after app deletion and you want to delete the -// empty App Service plan. By default, the empty App Service plan is not -// deleted. skipDNSRegistration is if true, DNS registration is skipped +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app to delete. +// deleteMetrics is if true, web app metrics are also deleted. deleteEmptyServerFarm is specify true if the App Service +// plan will be empty after app deletion and you want to delete the empty App Service plan. By default, the empty App +// Service plan is not deleted. skipDNSRegistration is if true, DNS registration is skipped. func (client AppsClient) Delete(resourceGroupName string, name string, deleteMetrics *bool, deleteEmptyServerFarm *bool, skipDNSRegistration *bool) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2697,8 +3206,8 @@ func (client AppsClient) DeleteResponder(resp *http.Response) (result autorest.R // DeleteBackup deletes a backup of an app by its ID. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. backupID is iD of the backup. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. backupID is +// ID of the backup. func (client AppsClient) DeleteBackup(resourceGroupName string, name string, backupID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2771,8 +3280,7 @@ func (client AppsClient) DeleteBackupResponder(resp *http.Response) (result auto // DeleteBackupConfiguration deletes the backup configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) DeleteBackupConfiguration(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2844,10 +3352,9 @@ func (client AppsClient) DeleteBackupConfigurationResponder(resp *http.Response) // DeleteBackupConfigurationSlot deletes the backup configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will delete the backup configuration for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will delete the backup configuration for the production +// slot. func (client AppsClient) DeleteBackupConfigurationSlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2920,10 +3427,9 @@ func (client AppsClient) DeleteBackupConfigurationSlotResponder(resp *http.Respo // DeleteBackupSlot deletes a backup of an app by its ID. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. backupID is iD of the backup. slot is name -// of the deployment slot. If a slot is not specified, the API will delete a -// backup of the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. backupID is +// ID of the backup. slot is name of the deployment slot. If a slot is not specified, the API will delete a backup of +// the production slot. func (client AppsClient) DeleteBackupSlot(resourceGroupName string, name string, backupID string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2995,11 +3501,162 @@ func (client AppsClient) DeleteBackupSlotResponder(resp *http.Response) (result return } -// DeleteDeployment delete a deployment by its ID for an app, a specific -// deployment slot, and/or a specific scaled-out instance. +// DeleteContinuousWebJob delete a continuous web job by its ID for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) DeleteContinuousWebJob(resourceGroupName string, name string, webJobID string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteContinuousWebJob") + } + + req, err := client.DeleteContinuousWebJobPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteContinuousWebJobSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure sending request") + return + } + + result, err = client.DeleteContinuousWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJob", resp, "Failure responding to request") + } + + return +} + +// DeleteContinuousWebJobPreparer prepares the DeleteContinuousWebJob request. +func (client AppsClient) DeleteContinuousWebJobPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteContinuousWebJobSender sends the DeleteContinuousWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteContinuousWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteContinuousWebJobResponder handles the response to the DeleteContinuousWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteContinuousWebJobSlot delete a continuous web job by its ID for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) DeleteContinuousWebJobSlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteContinuousWebJobSlot") + } + + req, err := client.DeleteContinuousWebJobSlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteContinuousWebJobSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.DeleteContinuousWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteContinuousWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// DeleteContinuousWebJobSlotPreparer prepares the DeleteContinuousWebJobSlot request. +func (client AppsClient) DeleteContinuousWebJobSlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteContinuousWebJobSlotSender sends the DeleteContinuousWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteContinuousWebJobSlotResponder handles the response to the DeleteContinuousWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteDeployment delete a deployment by its ID for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is +// deployment ID. func (client AppsClient) DeleteDeployment(resourceGroupName string, name string, ID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3070,13 +3727,11 @@ func (client AppsClient) DeleteDeploymentResponder(resp *http.Response) (result return } -// DeleteDeploymentSlot delete a deployment by its ID for an app, a specific -// deployment slot, and/or a specific scaled-out instance. +// DeleteDeploymentSlot delete a deployment by its ID for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. slot is name of the -// deployment slot. If a slot is not specified, the API deletes a deployment -// for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is +// deployment ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. func (client AppsClient) DeleteDeploymentSlot(resourceGroupName string, name string, ID string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3148,12 +3803,10 @@ func (client AppsClient) DeleteDeploymentSlotResponder(resp *http.Response) (res return } -// DeleteDomainOwnershipIdentifier deletes a domain ownership identifier for a -// web app. +// DeleteDomainOwnershipIdentifier deletes a domain ownership identifier for a web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. func (client AppsClient) DeleteDomainOwnershipIdentifier(resourceGroupName string, name string, domainOwnershipIdentifierName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3224,12 +3877,10 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierResponder(resp *http.Res return } -// DeleteDomainOwnershipIdentifierSlot deletes a domain ownership identifier -// for a web app. +// DeleteDomainOwnershipIdentifierSlot deletes a domain ownership identifier for a web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. slot is name of the deployment slot. If a slot +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. slot is name of the deployment slot. If a slot // is not specified, the API will delete the binding for the production slot. func (client AppsClient) DeleteDomainOwnershipIdentifierSlot(resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ @@ -3302,11 +3953,84 @@ func (client AppsClient) DeleteDomainOwnershipIdentifierSlotResponder(resp *http return } +// DeleteFunction delete a function for web site, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. +func (client AppsClient) DeleteFunction(resourceGroupName string, name string, functionName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteFunction") + } + + req, err := client.DeleteFunctionPreparer(resourceGroupName, name, functionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteFunctionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure sending request") + return + } + + result, err = client.DeleteFunctionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteFunction", resp, "Failure responding to request") + } + + return +} + +// DeleteFunctionPreparer prepares the DeleteFunction request. +func (client AppsClient) DeleteFunctionPreparer(resourceGroupName string, name string, functionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteFunctionSender sends the DeleteFunction request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteFunctionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteFunctionResponder handles the response to the DeleteFunction request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteFunctionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + // DeleteHostNameBinding deletes a hostname binding for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. hostName is hostname in the hostname -// binding. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. hostName is +// hostname in the hostname binding. func (client AppsClient) DeleteHostNameBinding(resourceGroupName string, name string, hostName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3379,10 +4103,9 @@ func (client AppsClient) DeleteHostNameBindingResponder(resp *http.Response) (re // DeleteHostNameBindingSlot deletes a hostname binding for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will delete the binding for the production -// slot. hostName is hostname in the hostname binding. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// hostName is hostname in the hostname binding. func (client AppsClient) DeleteHostNameBindingSlot(resourceGroupName string, name string, slot string, hostName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3456,10 +4179,8 @@ func (client AppsClient) DeleteHostNameBindingSlotResponder(resp *http.Response) // DeleteHybridConnection removes a Hybrid Connection from this site. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. func (client AppsClient) DeleteHybridConnection(resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3533,10 +4254,9 @@ func (client AppsClient) DeleteHybridConnectionResponder(resp *http.Response) (r // DeleteHybridConnectionSlot removes a Hybrid Connection from this site. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection slot is the name of the slot for the web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. +// slot is the name of the slot for the web app. func (client AppsClient) DeleteHybridConnectionSlot(resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3609,128 +4329,45 @@ func (client AppsClient) DeleteHybridConnectionSlotResponder(resp *http.Response return } -// DeleteInstanceDeployment delete a deployment by its ID for an app, a -// specific deployment slot, and/or a specific scaled-out instance. +// DeleteInstanceFunctionSlot delete a function for web site, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. instanceID is iD of a -// specific scaled-out instance. This is the value of the name property in the -// JSON response from "GET api/sites/{siteName}/instances" -func (client AppsClient) DeleteInstanceDeployment(resourceGroupName string, name string, ID string, instanceID string) (result autorest.Response, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) DeleteInstanceFunctionSlot(resourceGroupName string, name string, functionName string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteInstanceDeployment") + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteInstanceFunctionSlot") } - req, err := client.DeleteInstanceDeploymentPreparer(resourceGroupName, name, ID, instanceID) + req, err := client.DeleteInstanceFunctionSlotPreparer(resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceDeployment", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", nil, "Failure preparing request") return } - resp, err := client.DeleteInstanceDeploymentSender(req) + resp, err := client.DeleteInstanceFunctionSlotSender(req) if err != nil { result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceDeployment", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure sending request") return } - result, err = client.DeleteInstanceDeploymentResponder(resp) + result, err = client.DeleteInstanceFunctionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceDeployment", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceFunctionSlot", resp, "Failure responding to request") } return } -// DeleteInstanceDeploymentPreparer prepares the DeleteInstanceDeployment request. -func (client AppsClient) DeleteInstanceDeploymentPreparer(resourceGroupName string, name string, ID string, instanceID string) (*http.Request, error) { +// DeleteInstanceFunctionSlotPreparer prepares the DeleteInstanceFunctionSlot request. +func (client AppsClient) DeleteInstanceFunctionSlotPreparer(resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), - "instanceId": autorest.Encode("path", instanceID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2016-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// DeleteInstanceDeploymentSender sends the DeleteInstanceDeployment request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceDeploymentSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// DeleteInstanceDeploymentResponder handles the response to the DeleteInstanceDeployment request. The method always -// closes the http.Response Body. -func (client AppsClient) DeleteInstanceDeploymentResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// DeleteInstanceDeploymentSlot delete a deployment by its ID for an app, a -// specific deployment slot, and/or a specific scaled-out instance. -// -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. slot is name of the -// deployment slot. If a slot is not specified, the API deletes a deployment -// for the production slot. instanceID is iD of a specific scaled-out instance. -// This is the value of the name property in the JSON response from "GET -// api/sites/{siteName}/instances" -func (client AppsClient) DeleteInstanceDeploymentSlot(resourceGroupName string, name string, ID string, slot string, instanceID string) (result autorest.Response, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteInstanceDeploymentSlot") - } - - req, err := client.DeleteInstanceDeploymentSlotPreparer(resourceGroupName, name, ID, slot, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceDeploymentSlot", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteInstanceDeploymentSlotSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceDeploymentSlot", resp, "Failure sending request") - return - } - - result, err = client.DeleteInstanceDeploymentSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceDeploymentSlot", resp, "Failure responding to request") - } - - return -} - -// DeleteInstanceDeploymentSlotPreparer prepares the DeleteInstanceDeploymentSlot request. -func (client AppsClient) DeleteInstanceDeploymentSlotPreparer(resourceGroupName string, name string, ID string, slot string, instanceID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), - "instanceId": autorest.Encode("path", instanceID), + "functionName": autorest.Encode("path", functionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -3745,24 +4382,180 @@ func (client AppsClient) DeleteInstanceDeploymentSlotPreparer(resourceGroupName preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// DeleteInstanceDeploymentSlotSender sends the DeleteInstanceDeploymentSlot request. The method will close the +// DeleteInstanceFunctionSlotSender sends the DeleteInstanceFunctionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) DeleteInstanceDeploymentSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) DeleteInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// DeleteInstanceDeploymentSlotResponder handles the response to the DeleteInstanceDeploymentSlot request. The method always +// DeleteInstanceFunctionSlotResponder handles the response to the DeleteInstanceFunctionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) DeleteInstanceDeploymentSlotResponder(resp *http.Response) (result autorest.Response, err error) { +func (client AppsClient) DeleteInstanceFunctionSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteInstanceProcess terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out +// instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON response from +// "GET api/sites/{siteName}/instances". +func (client AppsClient) DeleteInstanceProcess(resourceGroupName string, name string, processID string, instanceID string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteInstanceProcess") + } + + req, err := client.DeleteInstanceProcessPreparer(resourceGroupName, name, processID, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteInstanceProcessSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure sending request") + return + } + + result, err = client.DeleteInstanceProcessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcess", resp, "Failure responding to request") + } + + return +} + +// DeleteInstanceProcessPreparer prepares the DeleteInstanceProcess request. +func (client AppsClient) DeleteInstanceProcessPreparer(resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteInstanceProcessSender sends the DeleteInstanceProcess request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteInstanceProcessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteInstanceProcessResponder handles the response to the DeleteInstanceProcess request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteInstanceProcessResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteInstanceProcessSlot terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out +// instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) DeleteInstanceProcessSlot(resourceGroupName string, name string, processID string, slot string, instanceID string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteInstanceProcessSlot") + } + + req, err := client.DeleteInstanceProcessSlotPreparer(resourceGroupName, name, processID, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteInstanceProcessSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure sending request") + return + } + + result, err = client.DeleteInstanceProcessSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteInstanceProcessSlot", resp, "Failure responding to request") + } + + return +} + +// DeleteInstanceProcessSlotPreparer prepares the DeleteInstanceProcessSlot request. +func (client AppsClient) DeleteInstanceProcessSlotPreparer(resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteInstanceProcessSlotSender sends the DeleteInstanceProcessSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteInstanceProcessSlotResponder handles the response to the DeleteInstanceProcessSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteInstanceProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), autorest.ByClosing()) result.Response = resp return @@ -3770,8 +4563,8 @@ func (client AppsClient) DeleteInstanceDeploymentSlotResponder(resp *http.Respon // DeletePremierAddOn delete a premier add-on from an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. premierAddOnName is add-on name. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// premierAddOnName is add-on name. func (client AppsClient) DeletePremierAddOn(resourceGroupName string, name string, premierAddOnName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3844,10 +4637,9 @@ func (client AppsClient) DeletePremierAddOnResponder(resp *http.Response) (resul // DeletePremierAddOnSlot delete a premier add-on from an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. premierAddOnName is add-on name. slot is -// name of the deployment slot. If a slot is not specified, the API will delete -// the named add-on for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// premierAddOnName is add-on name. slot is name of the deployment slot. If a slot is not specified, the API will +// delete the named add-on for the production slot. func (client AppsClient) DeletePremierAddOnSlot(resourceGroupName string, name string, premierAddOnName string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3919,11 +4711,311 @@ func (client AppsClient) DeletePremierAddOnSlotResponder(resp *http.Response) (r return } +// DeleteProcess terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out instance in +// a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +func (client AppsClient) DeleteProcess(resourceGroupName string, name string, processID string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteProcess") + } + + req, err := client.DeleteProcessPreparer(resourceGroupName, name, processID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteProcessSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure sending request") + return + } + + result, err = client.DeleteProcessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcess", resp, "Failure responding to request") + } + + return +} + +// DeleteProcessPreparer prepares the DeleteProcess request. +func (client AppsClient) DeleteProcessPreparer(resourceGroupName string, name string, processID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteProcessSender sends the DeleteProcess request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteProcessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteProcessResponder handles the response to the DeleteProcess request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteProcessResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteProcessSlot terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out +// instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. +func (client AppsClient) DeleteProcessSlot(resourceGroupName string, name string, processID string, slot string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteProcessSlot") + } + + req, err := client.DeleteProcessSlotPreparer(resourceGroupName, name, processID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteProcessSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure sending request") + return + } + + result, err = client.DeleteProcessSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteProcessSlot", resp, "Failure responding to request") + } + + return +} + +// DeleteProcessSlotPreparer prepares the DeleteProcessSlot request. +func (client AppsClient) DeleteProcessSlotPreparer(resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteProcessSlotSender sends the DeleteProcessSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteProcessSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteProcessSlotResponder handles the response to the DeleteProcessSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteProcessSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeletePublicCertificate deletes a hostname binding for an app. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// publicCertificateName is public certificate name. +func (client AppsClient) DeletePublicCertificate(resourceGroupName string, name string, publicCertificateName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeletePublicCertificate") + } + + req, err := client.DeletePublicCertificatePreparer(resourceGroupName, name, publicCertificateName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", nil, "Failure preparing request") + return + } + + resp, err := client.DeletePublicCertificateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure sending request") + return + } + + result, err = client.DeletePublicCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificate", resp, "Failure responding to request") + } + + return +} + +// DeletePublicCertificatePreparer prepares the DeletePublicCertificate request. +func (client AppsClient) DeletePublicCertificatePreparer(resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeletePublicCertificateSender sends the DeletePublicCertificate request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeletePublicCertificateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeletePublicCertificateResponder handles the response to the DeletePublicCertificate request. The method always +// closes the http.Response Body. +func (client AppsClient) DeletePublicCertificateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeletePublicCertificateSlot deletes a hostname binding for an app. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. +// publicCertificateName is public certificate name. +func (client AppsClient) DeletePublicCertificateSlot(resourceGroupName string, name string, slot string, publicCertificateName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeletePublicCertificateSlot") + } + + req, err := client.DeletePublicCertificateSlotPreparer(resourceGroupName, name, slot, publicCertificateName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", nil, "Failure preparing request") + return + } + + resp, err := client.DeletePublicCertificateSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure sending request") + return + } + + result, err = client.DeletePublicCertificateSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeletePublicCertificateSlot", resp, "Failure responding to request") + } + + return +} + +// DeletePublicCertificateSlotPreparer prepares the DeletePublicCertificateSlot request. +func (client AppsClient) DeletePublicCertificateSlotPreparer(resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeletePublicCertificateSlotSender sends the DeletePublicCertificateSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeletePublicCertificateSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeletePublicCertificateSlotResponder handles the response to the DeletePublicCertificateSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) DeletePublicCertificateSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + // DeleteRelayServiceConnection deletes a relay service connection by its name. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection configuration. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection configuration. func (client AppsClient) DeleteRelayServiceConnection(resourceGroupName string, name string, entityName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3994,14 +5086,11 @@ func (client AppsClient) DeleteRelayServiceConnectionResponder(resp *http.Respon return } -// DeleteRelayServiceConnectionSlot deletes a relay service connection by its -// name. +// DeleteRelayServiceConnectionSlot deletes a relay service connection by its name. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection configuration. slot is name of the deployment slot. If a slot is -// not specified, the API will delete a hybrid connection for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection configuration. slot is name of the deployment slot. If a slot is not specified, the +// API will delete a hybrid connection for the production slot. func (client AppsClient) DeleteRelayServiceConnectionSlot(resourceGroupName string, name string, entityName string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4073,17 +5162,165 @@ func (client AppsClient) DeleteRelayServiceConnectionSlotResponder(resp *http.Re return } -// DeleteSlot deletes a web, mobile, or API app, or one of the deployment -// slots. +// DeleteSiteExtension remove a site extension from a web site, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app to delete. slot is name of the deployment -// slot to delete. By default, the API deletes the production slot. -// deleteMetrics is if true, web app metrics are also deleted -// deleteEmptyServerFarm is specify true if the App Service plan will be empty -// after app deletion and you want to delete the empty App Service plan. By -// default, the empty App Service plan is not deleted. skipDNSRegistration is -// if true, DNS registration is skipped +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. siteExtensionID is +// site extension name. +func (client AppsClient) DeleteSiteExtension(resourceGroupName string, name string, siteExtensionID string, extensionName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteSiteExtension") + } + + req, err := client.DeleteSiteExtensionPreparer(resourceGroupName, name, siteExtensionID, extensionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSiteExtensionSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure sending request") + return + } + + result, err = client.DeleteSiteExtensionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtension", resp, "Failure responding to request") + } + + return +} + +// DeleteSiteExtensionPreparer prepares the DeleteSiteExtension request. +func (client AppsClient) DeleteSiteExtensionPreparer(resourceGroupName string, name string, siteExtensionID string, extensionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "siteExtensionId": autorest.Encode("query", siteExtensionID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{extensionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSiteExtensionSender sends the DeleteSiteExtension request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteSiteExtensionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteSiteExtensionResponder handles the response to the DeleteSiteExtension request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteSiteExtensionResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteSiteExtensionSlot remove a site extension from a web site, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. siteExtensionID is +// site extension name. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment +// for the production slot. +func (client AppsClient) DeleteSiteExtensionSlot(resourceGroupName string, name string, siteExtensionID string, slot string, extensionName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteSiteExtensionSlot") + } + + req, err := client.DeleteSiteExtensionSlotPreparer(resourceGroupName, name, siteExtensionID, slot, extensionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSiteExtensionSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure sending request") + return + } + + result, err = client.DeleteSiteExtensionSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteSiteExtensionSlot", resp, "Failure responding to request") + } + + return +} + +// DeleteSiteExtensionSlotPreparer prepares the DeleteSiteExtensionSlot request. +func (client AppsClient) DeleteSiteExtensionSlotPreparer(resourceGroupName string, name string, siteExtensionID string, slot string, extensionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "siteExtensionId": autorest.Encode("query", siteExtensionID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{extensionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSiteExtensionSlotSender sends the DeleteSiteExtensionSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteSiteExtensionSlotResponder handles the response to the DeleteSiteExtensionSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteSiteExtensionSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteSlot deletes a web, mobile, or API app, or one of the deployment slots. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app to delete. +// slot is name of the deployment slot to delete. By default, the API deletes the production slot. deleteMetrics is if +// true, web app metrics are also deleted. deleteEmptyServerFarm is specify true if the App Service plan will be empty +// after app deletion and you want to delete the empty App Service plan. By default, the empty App Service plan is not +// deleted. skipDNSRegistration is if true, DNS registration is skipped. func (client AppsClient) DeleteSlot(resourceGroupName string, name string, slot string, deleteMetrics *bool, deleteEmptyServerFarm *bool, skipDNSRegistration *bool) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4165,8 +5402,7 @@ func (client AppsClient) DeleteSlotResponder(resp *http.Response) (result autore // DeleteSourceControl deletes the source control configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) DeleteSourceControl(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4238,10 +5474,9 @@ func (client AppsClient) DeleteSourceControlResponder(resp *http.Response) (resu // DeleteSourceControlSlot deletes the source control configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will delete the source control configuration -// for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will delete the source control configuration for the +// production slot. func (client AppsClient) DeleteSourceControlSlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4312,11 +5547,162 @@ func (client AppsClient) DeleteSourceControlSlotResponder(resp *http.Response) ( return } -// DeleteVnetConnection deletes a connection from an app (or deployment slot to -// a named virtual network. +// DeleteTriggeredWebJob delete a triggered web job by its ID for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the virtual network. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) DeleteTriggeredWebJob(resourceGroupName string, name string, webJobID string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteTriggeredWebJob") + } + + req, err := client.DeleteTriggeredWebJobPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteTriggeredWebJobSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure sending request") + return + } + + result, err = client.DeleteTriggeredWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJob", resp, "Failure responding to request") + } + + return +} + +// DeleteTriggeredWebJobPreparer prepares the DeleteTriggeredWebJob request. +func (client AppsClient) DeleteTriggeredWebJobPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteTriggeredWebJobSender sends the DeleteTriggeredWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteTriggeredWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteTriggeredWebJobResponder handles the response to the DeleteTriggeredWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteTriggeredWebJobSlot delete a triggered web job by its ID for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) DeleteTriggeredWebJobSlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot") + } + + req, err := client.DeleteTriggeredWebJobSlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteTriggeredWebJobSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.DeleteTriggeredWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "DeleteTriggeredWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// DeleteTriggeredWebJobSlotPreparer prepares the DeleteTriggeredWebJobSlot request. +func (client AppsClient) DeleteTriggeredWebJobSlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteTriggeredWebJobSlotSender sends the DeleteTriggeredWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) DeleteTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteTriggeredWebJobSlotResponder handles the response to the DeleteTriggeredWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) DeleteTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteVnetConnection deletes a connection from an app (or deployment slot to a named virtual network. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the virtual network. func (client AppsClient) DeleteVnetConnection(resourceGroupName string, name string, vnetName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4387,13 +5773,11 @@ func (client AppsClient) DeleteVnetConnectionResponder(resp *http.Response) (res return } -// DeleteVnetConnectionSlot deletes a connection from an app (or deployment -// slot to a named virtual network. +// DeleteVnetConnectionSlot deletes a connection from an app (or deployment slot to a named virtual network. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the virtual network. -// slot is name of the deployment slot. If a slot is not specified, the API -// will delete the connection for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the virtual network. slot is name of the deployment slot. If a slot is not specified, the API will delete +// the connection for the production slot. func (client AppsClient) DeleteVnetConnectionSlot(resourceGroupName string, name string, vnetName string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4465,12 +5849,10 @@ func (client AppsClient) DeleteVnetConnectionSlotResponder(resp *http.Response) return } -// DiscoverRestore discovers an existing app backup that can be restored from a -// blob in Azure storage. +// DiscoverRestore discovers an existing app backup that can be restored from a blob in Azure storage. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. request is a RestoreRequest object that -// includes Azure storage URL and blog name for discovery of backup. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. request is a +// RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. func (client AppsClient) DiscoverRestore(resourceGroupName string, name string, request RestoreRequest) (result RestoreRequest, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4543,14 +5925,11 @@ func (client AppsClient) DiscoverRestoreResponder(resp *http.Response) (result R return } -// DiscoverRestoreSlot discovers an existing app backup that can be restored -// from a blob in Azure storage. +// DiscoverRestoreSlot discovers an existing app backup that can be restored from a blob in Azure storage. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. request is a RestoreRequest object that -// includes Azure storage URL and blog name for discovery of backup. slot is -// name of the deployment slot. If a slot is not specified, the API will -// perform discovery for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. request is a +// RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. slot is name of the +// deployment slot. If a slot is not specified, the API will perform discovery for the production slot. func (client AppsClient) DiscoverRestoreSlot(resourceGroupName string, name string, request RestoreRequest, slot string) (result RestoreRequest, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4624,11 +6003,9 @@ func (client AppsClient) DiscoverRestoreSlotResponder(resp *http.Response) (resu return } -// GenerateNewSitePublishingPassword generates a new publishing password for an -// app (or deployment slot, if specified). +// GenerateNewSitePublishingPassword generates a new publishing password for an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) GenerateNewSitePublishingPassword(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4698,13 +6075,12 @@ func (client AppsClient) GenerateNewSitePublishingPasswordResponder(resp *http.R return } -// GenerateNewSitePublishingPasswordSlot generates a new publishing password -// for an app (or deployment slot, if specified). +// GenerateNewSitePublishingPasswordSlot generates a new publishing password for an app (or deployment slot, if +// specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API generate a new publishing password for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API generate a new publishing password for the production +// slot. func (client AppsClient) GenerateNewSitePublishingPasswordSlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4777,8 +6153,7 @@ func (client AppsClient) GenerateNewSitePublishingPasswordSlotResponder(resp *ht // Get gets the details of a web, mobile, or API app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) Get(resourceGroupName string, name string) (result Site, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4851,8 +6226,7 @@ func (client AppsClient) GetResponder(resp *http.Response) (result Site, err err // GetAuthSettings gets the Authentication/Authorization settings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) GetAuthSettings(resourceGroupName string, name string) (result SiteAuthSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -4923,13 +6297,10 @@ func (client AppsClient) GetAuthSettingsResponder(resp *http.Response) (result S return } -// GetAuthSettingsSlot gets the Authentication/Authorization settings of an -// app. +// GetAuthSettingsSlot gets the Authentication/Authorization settings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the settings for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the settings for the production slot. func (client AppsClient) GetAuthSettingsSlot(resourceGroupName string, name string, slot string) (result SiteAuthSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5003,8 +6374,7 @@ func (client AppsClient) GetAuthSettingsSlotResponder(resp *http.Response) (resu // GetBackupConfiguration gets the backup configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) GetBackupConfiguration(resourceGroupName string, name string) (result BackupRequest, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5077,10 +6447,9 @@ func (client AppsClient) GetBackupConfigurationResponder(resp *http.Response) (r // GetBackupConfigurationSlot gets the backup configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the backup configuration for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the backup configuration for the production +// slot. func (client AppsClient) GetBackupConfigurationSlot(resourceGroupName string, name string, slot string) (result BackupRequest, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5154,8 +6523,8 @@ func (client AppsClient) GetBackupConfigurationSlotResponder(resp *http.Response // GetBackupStatus gets a backup of an app by its ID. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. backupID is iD of the backup. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. backupID is +// ID of the backup. func (client AppsClient) GetBackupStatus(resourceGroupName string, name string, backupID string) (result BackupItem, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5229,10 +6598,9 @@ func (client AppsClient) GetBackupStatusResponder(resp *http.Response) (result B // GetBackupStatusSlot gets a backup of an app by its ID. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. backupID is iD of the backup. slot is name -// of the deployment slot. If a slot is not specified, the API will get a -// backup of the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. backupID is +// ID of the backup. slot is name of the deployment slot. If a slot is not specified, the API will get a backup of the +// production slot. func (client AppsClient) GetBackupStatusSlot(resourceGroupName string, name string, backupID string, slot string) (result BackupItem, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5305,11 +6673,10 @@ func (client AppsClient) GetBackupStatusSlotResponder(resp *http.Response) (resu return } -// GetConfiguration gets the configuration of an app, such as platform version -// and bitness, default documents, virtual applications, Always On, etc. +// GetConfiguration gets the configuration of an app, such as platform version and bitness, default documents, virtual +// applications, Always On, etc. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) GetConfiguration(resourceGroupName string, name string) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5380,14 +6747,11 @@ func (client AppsClient) GetConfigurationResponder(resp *http.Response) (result return } -// GetConfigurationSlot gets the configuration of an app, such as platform -// version and bitness, default documents, virtual applications, Always On, -// etc. +// GetConfigurationSlot gets the configuration of an app, such as platform version and bitness, default documents, +// virtual applications, Always On, etc. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will return configuration for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. func (client AppsClient) GetConfigurationSlot(resourceGroupName string, name string, slot string) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5459,12 +6823,10 @@ func (client AppsClient) GetConfigurationSlotResponder(resp *http.Response) (res return } -// GetConfigurationSnapshot gets a snapshot of the configuration of an app at a -// previous point in time. +// GetConfigurationSnapshot gets a snapshot of the configuration of an app at a previous point in time. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. snapshotID is the ID of the snapshot to -// read. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. snapshotID +// is the ID of the snapshot to read. func (client AppsClient) GetConfigurationSnapshot(resourceGroupName string, name string, snapshotID string) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5536,13 +6898,11 @@ func (client AppsClient) GetConfigurationSnapshotResponder(resp *http.Response) return } -// GetConfigurationSnapshotSlot gets a snapshot of the configuration of an app -// at a previous point in time. +// GetConfigurationSnapshotSlot gets a snapshot of the configuration of an app at a previous point in time. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. snapshotID is the ID of the snapshot to -// read. slot is name of the deployment slot. If a slot is not specified, the -// API will return configuration for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. snapshotID +// is the ID of the snapshot to read. slot is name of the deployment slot. If a slot is not specified, the API will +// return configuration for the production slot. func (client AppsClient) GetConfigurationSnapshotSlot(resourceGroupName string, name string, snapshotID string, slot string) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5615,11 +6975,164 @@ func (client AppsClient) GetConfigurationSnapshotSlotResponder(resp *http.Respon return } -// GetDeployment get a deployment by its ID for an app, a specific deployment -// slot, and/or a specific scaled-out instance. +// GetContinuousWebJob gets a continuous web job by its ID for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) GetContinuousWebJob(resourceGroupName string, name string, webJobID string, webJobName string) (result ContinuousWebJob, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetContinuousWebJob") + } + + req, err := client.GetContinuousWebJobPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.GetContinuousWebJobSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure sending request") + return + } + + result, err = client.GetContinuousWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJob", resp, "Failure responding to request") + } + + return +} + +// GetContinuousWebJobPreparer prepares the GetContinuousWebJob request. +func (client AppsClient) GetContinuousWebJobPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetContinuousWebJobSender sends the GetContinuousWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetContinuousWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetContinuousWebJobResponder handles the response to the GetContinuousWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) GetContinuousWebJobResponder(resp *http.Response) (result ContinuousWebJob, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetContinuousWebJobSlot gets a continuous web job by its ID for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) GetContinuousWebJobSlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result ContinuousWebJob, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetContinuousWebJobSlot") + } + + req, err := client.GetContinuousWebJobSlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetContinuousWebJobSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.GetContinuousWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetContinuousWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// GetContinuousWebJobSlotPreparer prepares the GetContinuousWebJobSlot request. +func (client AppsClient) GetContinuousWebJobSlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetContinuousWebJobSlotSender sends the GetContinuousWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetContinuousWebJobSlotResponder handles the response to the GetContinuousWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetContinuousWebJobSlotResponder(resp *http.Response) (result ContinuousWebJob, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeployment get a deployment by its ID for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is +// deployment ID. func (client AppsClient) GetDeployment(resourceGroupName string, name string, ID string) (result Deployment, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5691,13 +7204,11 @@ func (client AppsClient) GetDeploymentResponder(resp *http.Response) (result Dep return } -// GetDeploymentSlot get a deployment by its ID for an app, a specific -// deployment slot, and/or a specific scaled-out instance. +// GetDeploymentSlot get a deployment by its ID for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. slot is name of the -// deployment slot. If a slot is not specified, the API gets a deployment for -// the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is +// deployment ID. slot is name of the deployment slot. If a slot is not specified, the API gets a deployment for the +// production slot. func (client AppsClient) GetDeploymentSlot(resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5772,8 +7283,7 @@ func (client AppsClient) GetDeploymentSlotResponder(resp *http.Response) (result // GetDiagnosticLogsConfiguration gets the logging configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) GetDiagnosticLogsConfiguration(resourceGroupName string, name string) (result SiteLogsConfig, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5846,10 +7356,9 @@ func (client AppsClient) GetDiagnosticLogsConfigurationResponder(resp *http.Resp // GetDiagnosticLogsConfigurationSlot gets the logging configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the logging configuration for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the logging configuration for the production +// slot. func (client AppsClient) GetDiagnosticLogsConfigurationSlot(resourceGroupName string, name string, slot string) (result SiteLogsConfig, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5923,9 +7432,8 @@ func (client AppsClient) GetDiagnosticLogsConfigurationSlotResponder(resp *http. // GetDomainOwnershipIdentifier get domain ownership identifier for web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. func (client AppsClient) GetDomainOwnershipIdentifier(resourceGroupName string, name string, domainOwnershipIdentifierName string) (result Identifier, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -5997,12 +7505,10 @@ func (client AppsClient) GetDomainOwnershipIdentifierResponder(resp *http.Respon return } -// GetDomainOwnershipIdentifierSlot get domain ownership identifier for web -// app. +// GetDomainOwnershipIdentifierSlot get domain ownership identifier for web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. slot is name of the deployment slot. If a slot +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. slot is name of the deployment slot. If a slot // is not specified, the API will delete the binding for the production slot. func (client AppsClient) GetDomainOwnershipIdentifierSlot(resourceGroupName string, name string, domainOwnershipIdentifierName string, slot string) (result Identifier, err error) { if err := validation.Validate([]validation.Validation{ @@ -6076,12 +7582,233 @@ func (client AppsClient) GetDomainOwnershipIdentifierSlotResponder(resp *http.Re return } -// GetHostNameBinding get the named hostname binding for an app (or deployment -// slot, if specified). +// GetFunction get function information by its ID for web site, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. hostName is hostname in the hostname -// binding. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. +func (client AppsClient) GetFunction(resourceGroupName string, name string, functionName string) (result FunctionEnvelope, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetFunction") + } + + req, err := client.GetFunctionPreparer(resourceGroupName, name, functionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", nil, "Failure preparing request") + return + } + + resp, err := client.GetFunctionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure sending request") + return + } + + result, err = client.GetFunctionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunction", resp, "Failure responding to request") + } + + return +} + +// GetFunctionPreparer prepares the GetFunction request. +func (client AppsClient) GetFunctionPreparer(resourceGroupName string, name string, functionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetFunctionSender sends the GetFunction request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetFunctionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetFunctionResponder handles the response to the GetFunction request. The method always +// closes the http.Response Body. +func (client AppsClient) GetFunctionResponder(resp *http.Response) (result FunctionEnvelope, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFunctionsAdminToken fetch a short lived token that can be exchanged for a master key. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +func (client AppsClient) GetFunctionsAdminToken(resourceGroupName string, name string) (result String, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetFunctionsAdminToken") + } + + req, err := client.GetFunctionsAdminTokenPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", nil, "Failure preparing request") + return + } + + resp, err := client.GetFunctionsAdminTokenSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure sending request") + return + } + + result, err = client.GetFunctionsAdminTokenResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminToken", resp, "Failure responding to request") + } + + return +} + +// GetFunctionsAdminTokenPreparer prepares the GetFunctionsAdminToken request. +func (client AppsClient) GetFunctionsAdminTokenPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetFunctionsAdminTokenSender sends the GetFunctionsAdminToken request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetFunctionsAdminTokenSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetFunctionsAdminTokenResponder handles the response to the GetFunctionsAdminToken request. The method always +// closes the http.Response Body. +func (client AppsClient) GetFunctionsAdminTokenResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFunctionsAdminTokenSlot fetch a short lived token that can be exchanged for a master key. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetFunctionsAdminTokenSlot(resourceGroupName string, name string, slot string) (result String, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot") + } + + req, err := client.GetFunctionsAdminTokenSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetFunctionsAdminTokenSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure sending request") + return + } + + result, err = client.GetFunctionsAdminTokenSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetFunctionsAdminTokenSlot", resp, "Failure responding to request") + } + + return +} + +// GetFunctionsAdminTokenSlotPreparer prepares the GetFunctionsAdminTokenSlot request. +func (client AppsClient) GetFunctionsAdminTokenSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetFunctionsAdminTokenSlotSender sends the GetFunctionsAdminTokenSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetFunctionsAdminTokenSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetFunctionsAdminTokenSlotResponder handles the response to the GetFunctionsAdminTokenSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetFunctionsAdminTokenSlotResponder(resp *http.Response) (result String, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetHostNameBinding get the named hostname binding for an app (or deployment slot, if specified). +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. hostName is +// hostname in the hostname binding. func (client AppsClient) GetHostNameBinding(resourceGroupName string, name string, hostName string) (result HostNameBinding, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6153,13 +7880,11 @@ func (client AppsClient) GetHostNameBindingResponder(resp *http.Response) (resul return } -// GetHostNameBindingSlot get the named hostname binding for an app (or -// deployment slot, if specified). +// GetHostNameBindingSlot get the named hostname binding for an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API the named binding for the production slot. -// hostName is hostname in the hostname binding. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API the named binding for the production slot. hostName is +// hostname in the hostname binding. func (client AppsClient) GetHostNameBindingSlot(resourceGroupName string, name string, slot string, hostName string) (result HostNameBinding, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6232,13 +7957,10 @@ func (client AppsClient) GetHostNameBindingSlotResponder(resp *http.Response) (r return } -// GetHybridConnection retrieves a specific Service Bus Hybrid Connection used -// by this Web App. +// GetHybridConnection retrieves a specific Service Bus Hybrid Connection used by this Web App. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. func (client AppsClient) GetHybridConnection(resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6311,13 +8033,11 @@ func (client AppsClient) GetHybridConnectionResponder(resp *http.Response) (resu return } -// GetHybridConnectionSlot retrieves a specific Service Bus Hybrid Connection -// used by this Web App. +// GetHybridConnectionSlot retrieves a specific Service Bus Hybrid Connection used by this Web App. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection slot is the name of the slot for the web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. +// slot is the name of the slot for the web app. func (client AppsClient) GetHybridConnectionSlot(resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6391,47 +8111,120 @@ func (client AppsClient) GetHybridConnectionSlotResponder(resp *http.Response) ( return } -// GetInstanceDeployment get a deployment by its ID for an app, a specific -// deployment slot, and/or a specific scaled-out instance. +// GetInstanceFunctionSlot get function information by its ID for web site, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. instanceID is iD of a -// specific scaled-out instance. This is the value of the name property in the -// JSON response from "GET api/sites/{siteName}/instances" -func (client AppsClient) GetInstanceDeployment(resourceGroupName string, name string, ID string, instanceID string) (result Deployment, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) GetInstanceFunctionSlot(resourceGroupName string, name string, functionName string, slot string) (result FunctionEnvelope, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceDeployment") + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceFunctionSlot") } - req, err := client.GetInstanceDeploymentPreparer(resourceGroupName, name, ID, instanceID) + req, err := client.GetInstanceFunctionSlotPreparer(resourceGroupName, name, functionName, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceDeployment", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceDeploymentSender(req) + resp, err := client.GetInstanceFunctionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceDeployment", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceDeploymentResponder(resp) + result, err = client.GetInstanceFunctionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceDeployment", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceFunctionSlot", resp, "Failure responding to request") } return } -// GetInstanceDeploymentPreparer prepares the GetInstanceDeployment request. -func (client AppsClient) GetInstanceDeploymentPreparer(resourceGroupName string, name string, ID string, instanceID string) (*http.Request, error) { +// GetInstanceFunctionSlotPreparer prepares the GetInstanceFunctionSlot request. +func (client AppsClient) GetInstanceFunctionSlotPreparer(resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceFunctionSlotSender sends the GetInstanceFunctionSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceFunctionSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceFunctionSlotResponder handles the response to the GetInstanceFunctionSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceFunctionSlotResponder(resp *http.Response) (result FunctionEnvelope, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceMSDeployLog get the MSDeploy Log for the last MSDeploy operation. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. instanceID +// is ID of web app instance. +func (client AppsClient) GetInstanceMSDeployLog(resourceGroupName string, name string, instanceID string) (result MSDeployLog, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceMSDeployLog") + } + + req, err := client.GetInstanceMSDeployLogPreparer(resourceGroupName, name, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceMSDeployLogSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceMSDeployLogResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLog", resp, "Failure responding to request") + } + + return +} + +// GetInstanceMSDeployLogPreparer prepares the GetInstanceMSDeployLog request. +func (client AppsClient) GetInstanceMSDeployLogPreparer(resourceGroupName string, name string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -6446,73 +8239,67 @@ func (client AppsClient) GetInstanceDeploymentPreparer(resourceGroupName string, preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// GetInstanceDeploymentSender sends the GetInstanceDeployment request. The method will close the +// GetInstanceMSDeployLogSender sends the GetInstanceMSDeployLog request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceDeploymentSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMSDeployLogSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// GetInstanceDeploymentResponder handles the response to the GetInstanceDeployment request. The method always +// GetInstanceMSDeployLogResponder handles the response to the GetInstanceMSDeployLog request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceDeploymentResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) GetInstanceMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetInstanceDeploymentSlot get a deployment by its ID for an app, a specific -// deployment slot, and/or a specific scaled-out instance. +// GetInstanceMSDeployLogSlot get the MSDeploy Log for the last MSDeploy operation. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. ID is deployment ID. slot is name of the -// deployment slot. If a slot is not specified, the API gets a deployment for -// the production slot. instanceID is iD of a specific scaled-out instance. -// This is the value of the name property in the JSON response from "GET -// api/sites/{siteName}/instances" -func (client AppsClient) GetInstanceDeploymentSlot(resourceGroupName string, name string, ID string, slot string, instanceID string) (result Deployment, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. instanceID is ID of web app instance. +func (client AppsClient) GetInstanceMSDeployLogSlot(resourceGroupName string, name string, slot string, instanceID string) (result MSDeployLog, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceDeploymentSlot") + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot") } - req, err := client.GetInstanceDeploymentSlotPreparer(resourceGroupName, name, ID, slot, instanceID) + req, err := client.GetInstanceMSDeployLogSlotPreparer(resourceGroupName, name, slot, instanceID) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceDeploymentSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", nil, "Failure preparing request") return } - resp, err := client.GetInstanceDeploymentSlotSender(req) + resp, err := client.GetInstanceMSDeployLogSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceDeploymentSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure sending request") return } - result, err = client.GetInstanceDeploymentSlotResponder(resp) + result, err = client.GetInstanceMSDeployLogSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceDeploymentSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMSDeployLogSlot", resp, "Failure responding to request") } return } -// GetInstanceDeploymentSlotPreparer prepares the GetInstanceDeploymentSlot request. -func (client AppsClient) GetInstanceDeploymentSlotPreparer(resourceGroupName string, name string, ID string, slot string, instanceID string) (*http.Request, error) { +// GetInstanceMSDeployLogSlotPreparer prepares the GetInstanceMSDeployLogSlot request. +func (client AppsClient) GetInstanceMSDeployLogSlotPreparer(resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "id": autorest.Encode("path", ID), "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -6528,20 +8315,95 @@ func (client AppsClient) GetInstanceDeploymentSlotPreparer(resourceGroupName str preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// GetInstanceDeploymentSlotSender sends the GetInstanceDeploymentSlot request. The method will close the +// GetInstanceMSDeployLogSlotSender sends the GetInstanceMSDeployLogSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetInstanceDeploymentSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetInstanceMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// GetInstanceDeploymentSlotResponder handles the response to the GetInstanceDeploymentSlot request. The method always +// GetInstanceMSDeployLogSlotResponder handles the response to the GetInstanceMSDeployLogSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetInstanceDeploymentSlotResponder(resp *http.Response) (result Deployment, err error) { +func (client AppsClient) GetInstanceMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceMsDeployStatus get the status of the last MSDeploy operation. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. instanceID +// is ID of web app instance. +func (client AppsClient) GetInstanceMsDeployStatus(resourceGroupName string, name string, instanceID string) (result MSDeployStatus, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceMsDeployStatus") + } + + req, err := client.GetInstanceMsDeployStatusPreparer(resourceGroupName, name, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceMsDeployStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceMsDeployStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatus", resp, "Failure responding to request") + } + + return +} + +// GetInstanceMsDeployStatusPreparer prepares the GetInstanceMsDeployStatus request. +func (client AppsClient) GetInstanceMsDeployStatusPreparer(resourceGroupName string, name string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceMsDeployStatusSender sends the GetInstanceMsDeployStatus request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceMsDeployStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceMsDeployStatusResponder handles the response to the GetInstanceMsDeployStatus request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceMsDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -6552,11 +8414,719 @@ func (client AppsClient) GetInstanceDeploymentSlotResponder(resp *http.Response) return } -// GetMigrateMySQLStatus returns the status of MySql in app migration, if one -// is active, and whether or not MySql in app is enabled +// GetInstanceMsDeployStatusSlot get the status of the last MSDeploy operation. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. instanceID is ID of web app instance. +func (client AppsClient) GetInstanceMsDeployStatusSlot(resourceGroupName string, name string, slot string, instanceID string) (result MSDeployStatus, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot") + } + + req, err := client.GetInstanceMsDeployStatusSlotPreparer(resourceGroupName, name, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceMsDeployStatusSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceMsDeployStatusSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceMsDeployStatusSlot", resp, "Failure responding to request") + } + + return +} + +// GetInstanceMsDeployStatusSlotPreparer prepares the GetInstanceMsDeployStatusSlot request. +func (client AppsClient) GetInstanceMsDeployStatusSlotPreparer(resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceMsDeployStatusSlotSender sends the GetInstanceMsDeployStatusSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceMsDeployStatusSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceMsDeployStatusSlotResponder handles the response to the GetInstanceMsDeployStatusSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceMsDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcess get process information by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON response from +// "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcess(resourceGroupName string, name string, processID string, instanceID string) (result ProcessInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcess") + } + + req, err := client.GetInstanceProcessPreparer(resourceGroupName, name, processID, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcess", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessPreparer prepares the GetInstanceProcess request. +func (client AppsClient) GetInstanceProcessPreparer(resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessSender sends the GetInstanceProcess request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessResponder handles the response to the GetInstanceProcess request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessResponder(resp *http.Response) (result ProcessInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcessDump get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON response from +// "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessDump(resourceGroupName string, name string, processID string, instanceID string) (result SetObject, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcessDump") + } + + req, err := client.GetInstanceProcessDumpPreparer(resourceGroupName, name, processID, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessDumpSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessDumpResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDump", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessDumpPreparer prepares the GetInstanceProcessDump request. +func (client AppsClient) GetInstanceProcessDumpPreparer(resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessDumpSender sends the GetInstanceProcessDump request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessDumpSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessDumpResponder handles the response to the GetInstanceProcessDump request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessDumpResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcessDumpSlot get a memory dump of a process by its ID for a specific scaled-out instance in a web +// site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessDumpSlot(resourceGroupName string, name string, processID string, slot string, instanceID string) (result SetObject, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcessDumpSlot") + } + + req, err := client.GetInstanceProcessDumpSlotPreparer(resourceGroupName, name, processID, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessDumpSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessDumpSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessDumpSlot", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessDumpSlotPreparer prepares the GetInstanceProcessDumpSlot request. +func (client AppsClient) GetInstanceProcessDumpSlotPreparer(resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessDumpSlotSender sends the GetInstanceProcessDumpSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessDumpSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessDumpSlotResponder handles the response to the GetInstanceProcessDumpSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessDumpSlotResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcessModule get process information by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// baseAddress is module base address. instanceID is ID of a specific scaled-out instance. This is the value of the +// name property in the JSON response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessModule(resourceGroupName string, name string, processID string, baseAddress string, instanceID string, baseAddress1 string) (result ProcessModuleInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcessModule") + } + + req, err := client.GetInstanceProcessModulePreparer(resourceGroupName, name, processID, baseAddress, instanceID, baseAddress1) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessModuleSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessModuleResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModule", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessModulePreparer prepares the GetInstanceProcessModule request. +func (client AppsClient) GetInstanceProcessModulePreparer(resourceGroupName string, name string, processID string, baseAddress string, instanceID string, baseAddress1 string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "base_address": autorest.Encode("path", baseAddress1), + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "baseAddress": autorest.Encode("query", baseAddress), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{base_address}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessModuleSender sends the GetInstanceProcessModule request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessModuleSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessModuleResponder handles the response to the GetInstanceProcessModule request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcessModuleSlot get process information by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// baseAddress is module base address. slot is name of the deployment slot. If a slot is not specified, the API returns +// deployments for the production slot. instanceID is ID of a specific scaled-out instance. This is the value of the +// name property in the JSON response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessModuleSlot(resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, baseAddress1 string) (result ProcessModuleInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcessModuleSlot") + } + + req, err := client.GetInstanceProcessModuleSlotPreparer(resourceGroupName, name, processID, baseAddress, slot, instanceID, baseAddress1) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessModuleSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessModuleSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessModuleSlot", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessModuleSlotPreparer prepares the GetInstanceProcessModuleSlot request. +func (client AppsClient) GetInstanceProcessModuleSlotPreparer(resourceGroupName string, name string, processID string, baseAddress string, slot string, instanceID string, baseAddress1 string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "base_address": autorest.Encode("path", baseAddress1), + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "baseAddress": autorest.Encode("query", baseAddress), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{base_address}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessModuleSlotSender sends the GetInstanceProcessModuleSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessModuleSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessModuleSlotResponder handles the response to the GetInstanceProcessModuleSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcessSlot get process information by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessSlot(resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcessSlot") + } + + req, err := client.GetInstanceProcessSlotPreparer(resourceGroupName, name, processID, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessSlot", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessSlotPreparer prepares the GetInstanceProcessSlot request. +func (client AppsClient) GetInstanceProcessSlotPreparer(resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessSlotSender sends the GetInstanceProcessSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessSlotResponder handles the response to the GetInstanceProcessSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcessThread get thread information by Thread ID for a specific process, in a specific scaled-out +// instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// threadID is tID. instanceID is ID of a specific scaled-out instance. This is the value of the name property in the +// JSON response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessThread(resourceGroupName string, name string, processID string, threadID string, instanceID string) (result ProcessThreadInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcessThread") + } + + req, err := client.GetInstanceProcessThreadPreparer(resourceGroupName, name, processID, threadID, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessThreadSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessThreadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThread", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessThreadPreparer prepares the GetInstanceProcessThread request. +func (client AppsClient) GetInstanceProcessThreadPreparer(resourceGroupName string, name string, processID string, threadID string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "threadId": autorest.Encode("path", threadID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads/{threadId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessThreadSender sends the GetInstanceProcessThread request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessThreadSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessThreadResponder handles the response to the GetInstanceProcessThread request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetInstanceProcessThreadSlot get thread information by Thread ID for a specific process, in a specific scaled-out +// instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// threadID is tID. slot is name of the deployment slot. If a slot is not specified, the API returns deployments for +// the production slot. instanceID is ID of a specific scaled-out instance. This is the value of the name property in +// the JSON response from "GET api/sites/{siteName}/instances". +func (client AppsClient) GetInstanceProcessThreadSlot(resourceGroupName string, name string, processID string, threadID string, slot string, instanceID string) (result ProcessThreadInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetInstanceProcessThreadSlot") + } + + req, err := client.GetInstanceProcessThreadSlotPreparer(resourceGroupName, name, processID, threadID, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetInstanceProcessThreadSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", resp, "Failure sending request") + return + } + + result, err = client.GetInstanceProcessThreadSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetInstanceProcessThreadSlot", resp, "Failure responding to request") + } + + return +} + +// GetInstanceProcessThreadSlotPreparer prepares the GetInstanceProcessThreadSlot request. +func (client AppsClient) GetInstanceProcessThreadSlotPreparer(resourceGroupName string, name string, processID string, threadID string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "threadId": autorest.Encode("path", threadID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetInstanceProcessThreadSlotSender sends the GetInstanceProcessThreadSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetInstanceProcessThreadSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetInstanceProcessThreadSlotResponder handles the response to the GetInstanceProcessThreadSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetInstanceProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMigrateMySQLStatus returns the status of MySql in app migration, if one is active, and whether or not MySql in +// app is enabled +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. func (client AppsClient) GetMigrateMySQLStatus(resourceGroupName string, name string) (result MigrateMySQLStatus, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6627,11 +9197,11 @@ func (client AppsClient) GetMigrateMySQLStatusResponder(resp *http.Response) (re return } -// GetMigrateMySQLStatusSlot returns the status of MySql in app migration, if -// one is active, and whether or not MySql in app is enabled +// GetMigrateMySQLStatusSlot returns the status of MySql in app migration, if one is active, and whether or not MySql +// in app is enabled // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app slot is name of the deployment slot +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of the deployment slot. func (client AppsClient) GetMigrateMySQLStatusSlot(resourceGroupName string, name string, slot string) (result MigrateMySQLStatus, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6703,10 +9273,306 @@ func (client AppsClient) GetMigrateMySQLStatusSlotResponder(resp *http.Response) return } +// GetMSDeployLog get the MSDeploy Log for the last MSDeploy operation. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +func (client AppsClient) GetMSDeployLog(resourceGroupName string, name string) (result MSDeployLog, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetMSDeployLog") + } + + req, err := client.GetMSDeployLogPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", nil, "Failure preparing request") + return + } + + resp, err := client.GetMSDeployLogSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure sending request") + return + } + + result, err = client.GetMSDeployLogResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLog", resp, "Failure responding to request") + } + + return +} + +// GetMSDeployLogPreparer prepares the GetMSDeployLog request. +func (client AppsClient) GetMSDeployLogPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetMSDeployLogSender sends the GetMSDeployLog request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetMSDeployLogSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetMSDeployLogResponder handles the response to the GetMSDeployLog request. The method always +// closes the http.Response Body. +func (client AppsClient) GetMSDeployLogResponder(resp *http.Response) (result MSDeployLog, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMSDeployLogSlot get the MSDeploy Log for the last MSDeploy operation. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetMSDeployLogSlot(resourceGroupName string, name string, slot string) (result MSDeployLog, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetMSDeployLogSlot") + } + + req, err := client.GetMSDeployLogSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetMSDeployLogSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure sending request") + return + } + + result, err = client.GetMSDeployLogSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployLogSlot", resp, "Failure responding to request") + } + + return +} + +// GetMSDeployLogSlotPreparer prepares the GetMSDeployLogSlot request. +func (client AppsClient) GetMSDeployLogSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetMSDeployLogSlotSender sends the GetMSDeployLogSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetMSDeployLogSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetMSDeployLogSlotResponder handles the response to the GetMSDeployLogSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetMSDeployLogSlotResponder(resp *http.Response) (result MSDeployLog, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMSDeployStatus get the status of the last MSDeploy operation. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +func (client AppsClient) GetMSDeployStatus(resourceGroupName string, name string) (result MSDeployStatus, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetMSDeployStatus") + } + + req, err := client.GetMSDeployStatusPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetMSDeployStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure sending request") + return + } + + result, err = client.GetMSDeployStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatus", resp, "Failure responding to request") + } + + return +} + +// GetMSDeployStatusPreparer prepares the GetMSDeployStatus request. +func (client AppsClient) GetMSDeployStatusPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetMSDeployStatusSender sends the GetMSDeployStatus request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetMSDeployStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetMSDeployStatusResponder handles the response to the GetMSDeployStatus request. The method always +// closes the http.Response Body. +func (client AppsClient) GetMSDeployStatusResponder(resp *http.Response) (result MSDeployStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetMSDeployStatusSlot get the status of the last MSDeploy operation. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. +func (client AppsClient) GetMSDeployStatusSlot(resourceGroupName string, name string, slot string) (result MSDeployStatus, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetMSDeployStatusSlot") + } + + req, err := client.GetMSDeployStatusSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetMSDeployStatusSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure sending request") + return + } + + result, err = client.GetMSDeployStatusSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetMSDeployStatusSlot", resp, "Failure responding to request") + } + + return +} + +// GetMSDeployStatusSlotPreparer prepares the GetMSDeployStatusSlot request. +func (client AppsClient) GetMSDeployStatusSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetMSDeployStatusSlotSender sends the GetMSDeployStatusSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetMSDeployStatusSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetMSDeployStatusSlotResponder handles the response to the GetMSDeployStatusSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetMSDeployStatusSlotResponder(resp *http.Response) (result MSDeployStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // GetPremierAddOn gets a named add-on of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. premierAddOnName is add-on name. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// premierAddOnName is add-on name. func (client AppsClient) GetPremierAddOn(resourceGroupName string, name string, premierAddOnName string) (result PremierAddOn, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6780,9 +9646,8 @@ func (client AppsClient) GetPremierAddOnResponder(resp *http.Response) (result P // GetPremierAddOnSlot gets a named add-on of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. premierAddOnName is add-on name. slot is -// name of the deployment slot. If a slot is not specified, the API will get +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// premierAddOnName is add-on name. slot is name of the deployment slot. If a slot is not specified, the API will get // the named add-on for the production slot. func (client AppsClient) GetPremierAddOnSlot(resourceGroupName string, name string, premierAddOnName string, slot string) (result PremierAddOn, err error) { if err := validation.Validate([]validation.Validation{ @@ -6856,12 +9721,776 @@ func (client AppsClient) GetPremierAddOnSlotResponder(resp *http.Response) (resu return } -// GetRelayServiceConnection gets a hybrid connection configuration by its -// name. +// GetProcess get process information by its ID for a specific scaled-out instance in a web site. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +func (client AppsClient) GetProcess(resourceGroupName string, name string, processID string) (result ProcessInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcess") + } + + req, err := client.GetProcessPreparer(resourceGroupName, name, processID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure sending request") + return + } + + result, err = client.GetProcessResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcess", resp, "Failure responding to request") + } + + return +} + +// GetProcessPreparer prepares the GetProcess request. +func (client AppsClient) GetProcessPreparer(resourceGroupName string, name string, processID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessSender sends the GetProcess request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessResponder handles the response to the GetProcess request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessResponder(resp *http.Response) (result ProcessInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProcessDump get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +func (client AppsClient) GetProcessDump(resourceGroupName string, name string, processID string) (result SetObject, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcessDump") + } + + req, err := client.GetProcessDumpPreparer(resourceGroupName, name, processID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessDumpSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure sending request") + return + } + + result, err = client.GetProcessDumpResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDump", resp, "Failure responding to request") + } + + return +} + +// GetProcessDumpPreparer prepares the GetProcessDump request. +func (client AppsClient) GetProcessDumpPreparer(resourceGroupName string, name string, processID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessDumpSender sends the GetProcessDump request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessDumpSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessDumpResponder handles the response to the GetProcessDump request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessDumpResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProcessDumpSlot get a memory dump of a process by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. +func (client AppsClient) GetProcessDumpSlot(resourceGroupName string, name string, processID string, slot string) (result SetObject, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcessDumpSlot") + } + + req, err := client.GetProcessDumpSlotPreparer(resourceGroupName, name, processID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessDumpSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure sending request") + return + } + + result, err = client.GetProcessDumpSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessDumpSlot", resp, "Failure responding to request") + } + + return +} + +// GetProcessDumpSlotPreparer prepares the GetProcessDumpSlot request. +func (client AppsClient) GetProcessDumpSlotPreparer(resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/dump", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessDumpSlotSender sends the GetProcessDumpSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessDumpSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessDumpSlotResponder handles the response to the GetProcessDumpSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessDumpSlotResponder(resp *http.Response) (result SetObject, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProcessModule get process information by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// baseAddress is module base address. +func (client AppsClient) GetProcessModule(resourceGroupName string, name string, processID string, baseAddress string, baseAddress1 string) (result ProcessModuleInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcessModule") + } + + req, err := client.GetProcessModulePreparer(resourceGroupName, name, processID, baseAddress, baseAddress1) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessModuleSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure sending request") + return + } + + result, err = client.GetProcessModuleResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModule", resp, "Failure responding to request") + } + + return +} + +// GetProcessModulePreparer prepares the GetProcessModule request. +func (client AppsClient) GetProcessModulePreparer(resourceGroupName string, name string, processID string, baseAddress string, baseAddress1 string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "base_address": autorest.Encode("path", baseAddress1), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "baseAddress": autorest.Encode("query", baseAddress), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{base_address}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessModuleSender sends the GetProcessModule request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessModuleSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessModuleResponder handles the response to the GetProcessModule request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessModuleResponder(resp *http.Response) (result ProcessModuleInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProcessModuleSlot get process information by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// baseAddress is module base address. slot is name of the deployment slot. If a slot is not specified, the API returns +// deployments for the production slot. +func (client AppsClient) GetProcessModuleSlot(resourceGroupName string, name string, processID string, baseAddress string, slot string, baseAddress1 string) (result ProcessModuleInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcessModuleSlot") + } + + req, err := client.GetProcessModuleSlotPreparer(resourceGroupName, name, processID, baseAddress, slot, baseAddress1) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessModuleSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure sending request") + return + } + + result, err = client.GetProcessModuleSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessModuleSlot", resp, "Failure responding to request") + } + + return +} + +// GetProcessModuleSlotPreparer prepares the GetProcessModuleSlot request. +func (client AppsClient) GetProcessModuleSlotPreparer(resourceGroupName string, name string, processID string, baseAddress string, slot string, baseAddress1 string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "base_address": autorest.Encode("path", baseAddress1), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "baseAddress": autorest.Encode("query", baseAddress), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{base_address}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessModuleSlotSender sends the GetProcessModuleSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessModuleSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessModuleSlotResponder handles the response to the GetProcessModuleSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessModuleSlotResponder(resp *http.Response) (result ProcessModuleInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProcessSlot get process information by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. +func (client AppsClient) GetProcessSlot(resourceGroupName string, name string, processID string, slot string) (result ProcessInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcessSlot") + } + + req, err := client.GetProcessSlotPreparer(resourceGroupName, name, processID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure sending request") + return + } + + result, err = client.GetProcessSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessSlot", resp, "Failure responding to request") + } + + return +} + +// GetProcessSlotPreparer prepares the GetProcessSlot request. +func (client AppsClient) GetProcessSlotPreparer(resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessSlotSender sends the GetProcessSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessSlotResponder handles the response to the GetProcessSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessSlotResponder(resp *http.Response) (result ProcessInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProcessThread get thread information by Thread ID for a specific process, in a specific scaled-out instance in a +// web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// threadID is tID. +func (client AppsClient) GetProcessThread(resourceGroupName string, name string, processID string, threadID string) (result ProcessThreadInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcessThread") + } + + req, err := client.GetProcessThreadPreparer(resourceGroupName, name, processID, threadID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessThreadSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", resp, "Failure sending request") + return + } + + result, err = client.GetProcessThreadResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThread", resp, "Failure responding to request") + } + + return +} + +// GetProcessThreadPreparer prepares the GetProcessThread request. +func (client AppsClient) GetProcessThreadPreparer(resourceGroupName string, name string, processID string, threadID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "threadId": autorest.Encode("path", threadID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessThreadSender sends the GetProcessThread request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessThreadSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessThreadResponder handles the response to the GetProcessThread request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessThreadResponder(resp *http.Response) (result ProcessThreadInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetProcessThreadSlot get thread information by Thread ID for a specific process, in a specific scaled-out instance +// in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// threadID is tID. slot is name of the deployment slot. If a slot is not specified, the API returns deployments for +// the production slot. +func (client AppsClient) GetProcessThreadSlot(resourceGroupName string, name string, processID string, threadID string, slot string) (result ProcessThreadInfo, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetProcessThreadSlot") + } + + req, err := client.GetProcessThreadSlotPreparer(resourceGroupName, name, processID, threadID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetProcessThreadSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", resp, "Failure sending request") + return + } + + result, err = client.GetProcessThreadSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetProcessThreadSlot", resp, "Failure responding to request") + } + + return +} + +// GetProcessThreadSlotPreparer prepares the GetProcessThreadSlot request. +func (client AppsClient) GetProcessThreadSlotPreparer(resourceGroupName string, name string, processID string, threadID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "threadId": autorest.Encode("path", threadID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads/{threadId}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetProcessThreadSlotSender sends the GetProcessThreadSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetProcessThreadSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetProcessThreadSlotResponder handles the response to the GetProcessThreadSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetProcessThreadSlotResponder(resp *http.Response) (result ProcessThreadInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPublicCertificate get the named public certificate for an app (or deployment slot, if specified). +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// publicCertificateName is public certificate name. +func (client AppsClient) GetPublicCertificate(resourceGroupName string, name string, publicCertificateName string) (result PublicCertificate, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetPublicCertificate") + } + + req, err := client.GetPublicCertificatePreparer(resourceGroupName, name, publicCertificateName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", nil, "Failure preparing request") + return + } + + resp, err := client.GetPublicCertificateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure sending request") + return + } + + result, err = client.GetPublicCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificate", resp, "Failure responding to request") + } + + return +} + +// GetPublicCertificatePreparer prepares the GetPublicCertificate request. +func (client AppsClient) GetPublicCertificatePreparer(resourceGroupName string, name string, publicCertificateName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetPublicCertificateSender sends the GetPublicCertificate request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetPublicCertificateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetPublicCertificateResponder handles the response to the GetPublicCertificate request. The method always +// closes the http.Response Body. +func (client AppsClient) GetPublicCertificateResponder(resp *http.Response) (result PublicCertificate, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetPublicCertificateSlot get the named public certificate for an app (or deployment slot, if specified). +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API the named binding for the production slot. +// publicCertificateName is public certificate name. +func (client AppsClient) GetPublicCertificateSlot(resourceGroupName string, name string, slot string, publicCertificateName string) (result PublicCertificate, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetPublicCertificateSlot") + } + + req, err := client.GetPublicCertificateSlotPreparer(resourceGroupName, name, slot, publicCertificateName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetPublicCertificateSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure sending request") + return + } + + result, err = client.GetPublicCertificateSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetPublicCertificateSlot", resp, "Failure responding to request") + } + + return +} + +// GetPublicCertificateSlotPreparer prepares the GetPublicCertificateSlot request. +func (client AppsClient) GetPublicCertificateSlotPreparer(resourceGroupName string, name string, slot string, publicCertificateName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "publicCertificateName": autorest.Encode("path", publicCertificateName), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetPublicCertificateSlotSender sends the GetPublicCertificateSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetPublicCertificateSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetPublicCertificateSlotResponder handles the response to the GetPublicCertificateSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetPublicCertificateSlotResponder(resp *http.Response) (result PublicCertificate, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetRelayServiceConnection gets a hybrid connection configuration by its name. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection. func (client AppsClient) GetRelayServiceConnection(resourceGroupName string, name string, entityName string) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -6933,13 +10562,11 @@ func (client AppsClient) GetRelayServiceConnectionResponder(resp *http.Response) return } -// GetRelayServiceConnectionSlot gets a hybrid connection configuration by its -// name. +// GetRelayServiceConnectionSlot gets a hybrid connection configuration by its name. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection. slot is name of the deployment slot. If a slot is not specified, -// the API will get a hybrid connection for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection. slot is name of the deployment slot. If a slot is not specified, the API will get +// a hybrid connection for the production slot. func (client AppsClient) GetRelayServiceConnectionSlot(resourceGroupName string, name string, entityName string, slot string) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7012,44 +10639,44 @@ func (client AppsClient) GetRelayServiceConnectionSlotResponder(resp *http.Respo return } -// GetResourceHealthMetadata gets the category of ResourceHealthMetadata to use -// for the given site +// GetSiteExtension get site extension information by its ID for a web site, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app -func (client AppsClient) GetResourceHealthMetadata(resourceGroupName string, name string) (result ResourceHealthMetadata, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. siteExtensionID is +// site extension name. +func (client AppsClient) GetSiteExtension(resourceGroupName string, name string, siteExtensionID string, extensionName string) (result SiteExtensionInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetResourceHealthMetadata") + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetSiteExtension") } - req, err := client.GetResourceHealthMetadataPreparer(resourceGroupName, name) + req, err := client.GetSiteExtensionPreparer(resourceGroupName, name, siteExtensionID, extensionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetResourceHealthMetadata", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", nil, "Failure preparing request") return } - resp, err := client.GetResourceHealthMetadataSender(req) + resp, err := client.GetSiteExtensionSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetResourceHealthMetadata", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure sending request") return } - result, err = client.GetResourceHealthMetadataResponder(resp) + result, err = client.GetSiteExtensionResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetResourceHealthMetadata", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtension", resp, "Failure responding to request") } return } -// GetResourceHealthMetadataPreparer prepares the GetResourceHealthMetadata request. -func (client AppsClient) GetResourceHealthMetadataPreparer(resourceGroupName string, name string) (*http.Request, error) { +// GetSiteExtensionPreparer prepares the GetSiteExtension request. +func (client AppsClient) GetSiteExtensionPreparer(resourceGroupName string, name string, siteExtensionID string, extensionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "subscriptionId": autorest.Encode("path", client.SubscriptionID), @@ -7057,75 +10684,76 @@ func (client AppsClient) GetResourceHealthMetadataPreparer(resourceGroupName str const APIVersion = "2016-08-01" queryParameters := map[string]interface{}{ - "api-version": APIVersion, + "api-version": APIVersion, + "siteExtensionId": autorest.Encode("query", siteExtensionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{extensionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// GetResourceHealthMetadataSender sends the GetResourceHealthMetadata request. The method will close the +// GetSiteExtensionSender sends the GetSiteExtension request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetResourceHealthMetadataSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSiteExtensionSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// GetResourceHealthMetadataResponder handles the response to the GetResourceHealthMetadata request. The method always +// GetSiteExtensionResponder handles the response to the GetSiteExtension request. The method always // closes the http.Response Body. -func (client AppsClient) GetResourceHealthMetadataResponder(resp *http.Response) (result ResourceHealthMetadata, err error) { +func (client AppsClient) GetSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// GetResourceHealthMetadataSlot gets the category of ResourceHealthMetadata to -// use for the given site +// GetSiteExtensionSlot get site extension information by its ID for a web site, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app slot is name of web app slot. If not -// specified then will default to production slot. -func (client AppsClient) GetResourceHealthMetadataSlot(resourceGroupName string, name string, slot string) (result ResourceHealthMetadata, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. siteExtensionID is +// site extension name. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment +// for the production slot. +func (client AppsClient) GetSiteExtensionSlot(resourceGroupName string, name string, siteExtensionID string, slot string, extensionName string) (result SiteExtensionInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetResourceHealthMetadataSlot") + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetSiteExtensionSlot") } - req, err := client.GetResourceHealthMetadataSlotPreparer(resourceGroupName, name, slot) + req, err := client.GetSiteExtensionSlotPreparer(resourceGroupName, name, siteExtensionID, slot, extensionName) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetResourceHealthMetadataSlot", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", nil, "Failure preparing request") return } - resp, err := client.GetResourceHealthMetadataSlotSender(req) + resp, err := client.GetSiteExtensionSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetResourceHealthMetadataSlot", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure sending request") return } - result, err = client.GetResourceHealthMetadataSlotResponder(resp) + result, err = client.GetSiteExtensionSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "GetResourceHealthMetadataSlot", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetSiteExtensionSlot", resp, "Failure responding to request") } return } -// GetResourceHealthMetadataSlotPreparer prepares the GetResourceHealthMetadataSlot request. -func (client AppsClient) GetResourceHealthMetadataSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { +// GetSiteExtensionSlotPreparer prepares the GetSiteExtensionSlot request. +func (client AppsClient) GetSiteExtensionSlotPreparer(resourceGroupName string, name string, siteExtensionID string, slot string, extensionName string) (*http.Request, error) { pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -7134,30 +10762,31 @@ func (client AppsClient) GetResourceHealthMetadataSlotPreparer(resourceGroupName const APIVersion = "2016-08-01" queryParameters := map[string]interface{}{ - "api-version": APIVersion, + "api-version": APIVersion, + "siteExtensionId": autorest.Encode("query", siteExtensionID), } preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{extensionName}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// GetResourceHealthMetadataSlotSender sends the GetResourceHealthMetadataSlot request. The method will close the +// GetSiteExtensionSlotSender sends the GetSiteExtensionSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) GetResourceHealthMetadataSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) GetSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// GetResourceHealthMetadataSlotResponder handles the response to the GetResourceHealthMetadataSlot request. The method always +// GetSiteExtensionSlotResponder handles the response to the GetSiteExtensionSlot request. The method always // closes the http.Response Body. -func (client AppsClient) GetResourceHealthMetadataSlotResponder(resp *http.Response) (result ResourceHealthMetadata, err error) { +func (client AppsClient) GetSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} @@ -7166,8 +10795,7 @@ func (client AppsClient) GetResourceHealthMetadataSlotResponder(resp *http.Respo // GetSitePhpErrorLogFlag gets web app's event logs. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. func (client AppsClient) GetSitePhpErrorLogFlag(resourceGroupName string, name string) (result SitePhpErrorLogFlag, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7240,9 +10868,8 @@ func (client AppsClient) GetSitePhpErrorLogFlagResponder(resp *http.Response) (r // GetSitePhpErrorLogFlagSlot gets web app's event logs. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app slot is name of web app slot. If not -// specified then will default to production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. func (client AppsClient) GetSitePhpErrorLogFlagSlot(resourceGroupName string, name string, slot string) (result SitePhpErrorLogFlag, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7316,9 +10943,8 @@ func (client AppsClient) GetSitePhpErrorLogFlagSlotResponder(resp *http.Response // GetSlot gets the details of a web, mobile, or API app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. By -// default, this API returns the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. By default, this API returns the production slot. func (client AppsClient) GetSlot(resourceGroupName string, name string, slot string) (result Site, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7392,8 +11018,7 @@ func (client AppsClient) GetSlotResponder(resp *http.Response) (result Site, err // GetSourceControl gets the source control configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) GetSourceControl(resourceGroupName string, name string) (result SiteSourceControl, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7466,10 +11091,9 @@ func (client AppsClient) GetSourceControlResponder(resp *http.Response) (result // GetSourceControlSlot gets the source control configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the source control configuration for -// the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the source control configuration for the +// production slot. func (client AppsClient) GetSourceControlSlot(resourceGroupName string, name string, slot string) (result SiteSourceControl, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7541,11 +11165,320 @@ func (client AppsClient) GetSourceControlSlotResponder(resp *http.Response) (res return } -// GetVnetConnection gets a virtual network the app (or deployment slot) is -// connected to by name. +// GetTriggeredWebJob gets a triggered web job by its ID for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the virtual network. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) GetTriggeredWebJob(resourceGroupName string, name string, webJobID string, webJobName string) (result TriggeredWebJob, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetTriggeredWebJob") + } + + req, err := client.GetTriggeredWebJobPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.GetTriggeredWebJobSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure sending request") + return + } + + result, err = client.GetTriggeredWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJob", resp, "Failure responding to request") + } + + return +} + +// GetTriggeredWebJobPreparer prepares the GetTriggeredWebJob request. +func (client AppsClient) GetTriggeredWebJobPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetTriggeredWebJobSender sends the GetTriggeredWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetTriggeredWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetTriggeredWebJobResponder handles the response to the GetTriggeredWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) GetTriggeredWebJobResponder(resp *http.Response) (result TriggeredWebJob, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTriggeredWebJobHistory gets a triggered web job's history by its ID for an app, , or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. ID is history ID. +func (client AppsClient) GetTriggeredWebJobHistory(resourceGroupName string, name string, webJobID string, ID string, webJobName string) (result TriggeredJobHistory, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetTriggeredWebJobHistory") + } + + req, err := client.GetTriggeredWebJobHistoryPreparer(resourceGroupName, name, webJobID, ID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", nil, "Failure preparing request") + return + } + + resp, err := client.GetTriggeredWebJobHistorySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure sending request") + return + } + + result, err = client.GetTriggeredWebJobHistoryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistory", resp, "Failure responding to request") + } + + return +} + +// GetTriggeredWebJobHistoryPreparer prepares the GetTriggeredWebJobHistory request. +func (client AppsClient) GetTriggeredWebJobHistoryPreparer(resourceGroupName string, name string, webJobID string, ID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetTriggeredWebJobHistorySender sends the GetTriggeredWebJobHistory request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetTriggeredWebJobHistoryResponder handles the response to the GetTriggeredWebJobHistory request. The method always +// closes the http.Response Body. +func (client AppsClient) GetTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistory, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTriggeredWebJobHistorySlot gets a triggered web job's history by its ID for an app, , or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. ID is history ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a +// deployment for the production slot. +func (client AppsClient) GetTriggeredWebJobHistorySlot(resourceGroupName string, name string, webJobID string, ID string, slot string, webJobName string) (result TriggeredJobHistory, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot") + } + + req, err := client.GetTriggeredWebJobHistorySlotPreparer(resourceGroupName, name, webJobID, ID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetTriggeredWebJobHistorySlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure sending request") + return + } + + result, err = client.GetTriggeredWebJobHistorySlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobHistorySlot", resp, "Failure responding to request") + } + + return +} + +// GetTriggeredWebJobHistorySlotPreparer prepares the GetTriggeredWebJobHistorySlot request. +func (client AppsClient) GetTriggeredWebJobHistorySlotPreparer(resourceGroupName string, name string, webJobID string, ID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetTriggeredWebJobHistorySlotSender sends the GetTriggeredWebJobHistorySlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetTriggeredWebJobHistorySlotResponder handles the response to the GetTriggeredWebJobHistorySlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistory, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTriggeredWebJobSlot gets a triggered web job by its ID for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) GetTriggeredWebJobSlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result TriggeredWebJob, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetTriggeredWebJobSlot") + } + + req, err := client.GetTriggeredWebJobSlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetTriggeredWebJobSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.GetTriggeredWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetTriggeredWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// GetTriggeredWebJobSlotPreparer prepares the GetTriggeredWebJobSlot request. +func (client AppsClient) GetTriggeredWebJobSlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetTriggeredWebJobSlotSender sends the GetTriggeredWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetTriggeredWebJobSlotResponder handles the response to the GetTriggeredWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetTriggeredWebJobSlotResponder(resp *http.Response) (result TriggeredWebJob, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetVnetConnection gets a virtual network the app (or deployment slot) is connected to by name. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the virtual network. func (client AppsClient) GetVnetConnection(resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7619,10 +11552,8 @@ func (client AppsClient) GetVnetConnectionResponder(resp *http.Response) (result // GetVnetConnectionGateway gets an app's Virtual Network gateway. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the Virtual Network. -// gatewayName is name of the gateway. Currently, the only supported string is -// "primary". +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the Virtual Network. gatewayName is name of the gateway. Currently, the only supported string is "primary". func (client AppsClient) GetVnetConnectionGateway(resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7697,11 +11628,10 @@ func (client AppsClient) GetVnetConnectionGatewayResponder(resp *http.Response) // GetVnetConnectionGatewaySlot gets an app's Virtual Network gateway. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the Virtual Network. -// gatewayName is name of the gateway. Currently, the only supported string is -// "primary". slot is name of the deployment slot. If a slot is not specified, -// the API will get a gateway for the production slot's Virtual Network. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the Virtual Network. gatewayName is name of the gateway. Currently, the only supported string is "primary". +// slot is name of the deployment slot. If a slot is not specified, the API will get a gateway for the production +// slot's Virtual Network. func (client AppsClient) GetVnetConnectionGatewaySlot(resourceGroupName string, name string, vnetName string, gatewayName string, slot string) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7775,13 +11705,11 @@ func (client AppsClient) GetVnetConnectionGatewaySlotResponder(resp *http.Respon return } -// GetVnetConnectionSlot gets a virtual network the app (or deployment slot) is -// connected to by name. +// GetVnetConnectionSlot gets a virtual network the app (or deployment slot) is connected to by name. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the virtual network. -// slot is name of the deployment slot. If a slot is not specified, the API -// will get the named virtual network for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the virtual network. slot is name of the deployment slot. If a slot is not specified, the API will get the +// named virtual network for the production slot. func (client AppsClient) GetVnetConnectionSlot(resourceGroupName string, name string, vnetName string, slot string) (result VnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7854,11 +11782,355 @@ func (client AppsClient) GetVnetConnectionSlotResponder(resp *http.Response) (re return } -// IsCloneable shows whether an app can be cloned to another resource group or -// subscription. +// GetWebJob get webjob information for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobName is name +// of the web job. +func (client AppsClient) GetWebJob(resourceGroupName string, name string, webJobName string) (result Job, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetWebJob") + } + + req, err := client.GetWebJobPreparer(resourceGroupName, name, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.GetWebJobSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure sending request") + return + } + + result, err = client.GetWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJob", resp, "Failure responding to request") + } + + return +} + +// GetWebJobPreparer prepares the GetWebJob request. +func (client AppsClient) GetWebJobPreparer(resourceGroupName string, name string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetWebJobSender sends the GetWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetWebJobResponder handles the response to the GetWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) GetWebJobResponder(resp *http.Response) (result Job, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetWebJobSlot get webjob information for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobName is name +// of the web job. slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the +// production slot. +func (client AppsClient) GetWebJobSlot(resourceGroupName string, name string, webJobName string, slot string) (result Job, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "GetWebJobSlot") + } + + req, err := client.GetWebJobSlotPreparer(resourceGroupName, name, webJobName, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.GetWebJobSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.GetWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "GetWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// GetWebJobSlotPreparer prepares the GetWebJobSlot request. +func (client AppsClient) GetWebJobSlotPreparer(resourceGroupName string, name string, webJobName string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetWebJobSlotSender sends the GetWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) GetWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetWebJobSlotResponder handles the response to the GetWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) GetWebJobSlotResponder(resp *http.Response) (result Job, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InstallSiteExtension install site extension on a web site, or a deployment slot. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. siteExtensionID is +// site extension name. +func (client AppsClient) InstallSiteExtension(resourceGroupName string, name string, siteExtensionID string, extensionName string, cancel <-chan struct{}) (<-chan SiteExtensionInfo, <-chan error) { + resultChan := make(chan SiteExtensionInfo, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "InstallSiteExtension") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result SiteExtensionInfo + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.InstallSiteExtensionPreparer(resourceGroupName, name, siteExtensionID, extensionName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", nil, "Failure preparing request") + return + } + + resp, err := client.InstallSiteExtensionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", resp, "Failure sending request") + return + } + + result, err = client.InstallSiteExtensionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtension", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// InstallSiteExtensionPreparer prepares the InstallSiteExtension request. +func (client AppsClient) InstallSiteExtensionPreparer(resourceGroupName string, name string, siteExtensionID string, extensionName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "siteExtensionId": autorest.Encode("query", siteExtensionID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{extensionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// InstallSiteExtensionSender sends the InstallSiteExtension request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) InstallSiteExtensionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// InstallSiteExtensionResponder handles the response to the InstallSiteExtension request. The method always +// closes the http.Response Body. +func (client AppsClient) InstallSiteExtensionResponder(resp *http.Response) (result SiteExtensionInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK, http.StatusTooManyRequests), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// InstallSiteExtensionSlot install site extension on a web site, or a deployment slot. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. siteExtensionID is +// site extension name. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment +// for the production slot. +func (client AppsClient) InstallSiteExtensionSlot(resourceGroupName string, name string, siteExtensionID string, slot string, extensionName string, cancel <-chan struct{}) (<-chan SiteExtensionInfo, <-chan error) { + resultChan := make(chan SiteExtensionInfo, 1) + errChan := make(chan error, 1) + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + errChan <- validation.NewErrorWithValidationError(err, "web.AppsClient", "InstallSiteExtensionSlot") + close(errChan) + close(resultChan) + return resultChan, errChan + } + + go func() { + var err error + var result SiteExtensionInfo + defer func() { + if err != nil { + errChan <- err + } + resultChan <- result + close(resultChan) + close(errChan) + }() + req, err := client.InstallSiteExtensionSlotPreparer(resourceGroupName, name, siteExtensionID, slot, extensionName, cancel) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", nil, "Failure preparing request") + return + } + + resp, err := client.InstallSiteExtensionSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", resp, "Failure sending request") + return + } + + result, err = client.InstallSiteExtensionSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "InstallSiteExtensionSlot", resp, "Failure responding to request") + } + }() + return resultChan, errChan +} + +// InstallSiteExtensionSlotPreparer prepares the InstallSiteExtensionSlot request. +func (client AppsClient) InstallSiteExtensionSlotPreparer(resourceGroupName string, name string, siteExtensionID string, slot string, extensionName string, cancel <-chan struct{}) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "extensionName": autorest.Encode("path", extensionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "siteExtensionId": autorest.Encode("query", siteExtensionID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPut(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{extensionName}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{Cancel: cancel}) +} + +// InstallSiteExtensionSlotSender sends the InstallSiteExtensionSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) InstallSiteExtensionSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, + req, + azure.DoPollForAsynchronous(client.PollingDelay)) +} + +// InstallSiteExtensionSlotResponder handles the response to the InstallSiteExtensionSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) InstallSiteExtensionSlotResponder(resp *http.Response) (result SiteExtensionInfo, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusCreated, http.StatusOK, http.StatusTooManyRequests), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// IsCloneable shows whether an app can be cloned to another resource group or subscription. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) IsCloneable(resourceGroupName string, name string) (result SiteCloneability, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -7929,12 +12201,10 @@ func (client AppsClient) IsCloneableResponder(resp *http.Response) (result SiteC return } -// IsCloneableSlot shows whether an app can be cloned to another resource group -// or subscription. +// IsCloneableSlot shows whether an app can be cloned to another resource group or subscription. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. By -// default, this API returns information on the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. By default, this API returns information on the production slot. func (client AppsClient) IsCloneableSlot(resourceGroupName string, name string, slot string) (result SiteCloneability, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8091,10 +12361,54 @@ func (client AppsClient) ListNextResults(lastResults AppCollection) (result AppC return } +// ListComplete gets all elements from the list without paging. +func (client AppsClient) ListComplete(cancel <-chan struct{}) (<-chan Site, <-chan error) { + resultChan := make(chan Site) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListApplicationSettings gets the application settings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListApplicationSettings(resourceGroupName string, name string) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8167,10 +12481,9 @@ func (client AppsClient) ListApplicationSettingsResponder(resp *http.Response) ( // ListApplicationSettingsSlot gets the application settings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the application settings for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the application settings for the production +// slot. func (client AppsClient) ListApplicationSettingsSlot(resourceGroupName string, name string, slot string) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8244,8 +12557,7 @@ func (client AppsClient) ListApplicationSettingsSlotResponder(resp *http.Respons // ListBackups gets existing backups of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListBackups(resourceGroupName string, name string) (result BackupItemCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8340,11 +12652,55 @@ func (client AppsClient) ListBackupsNextResults(lastResults BackupItemCollection return } +// ListBackupsComplete gets all elements from the list without paging. +func (client AppsClient) ListBackupsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan BackupItem, <-chan error) { + resultChan := make(chan BackupItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBackups(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBackupsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListBackupsSlot gets existing backups of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get backups of the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get backups of the production slot. func (client AppsClient) ListBackupsSlot(resourceGroupName string, name string, slot string) (result BackupItemCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8440,14 +12796,57 @@ func (client AppsClient) ListBackupsSlotNextResults(lastResults BackupItemCollec return } -// ListBackupStatusSecrets gets status of a web app backup that may be in -// progress, including secrets associated with the backup, such as the Azure -// Storage SAS URL. Also can be used to update the SAS URL for the backup if a -// new URL is passed in the request body. +// ListBackupsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListBackupsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan BackupItem, <-chan error) { + resultChan := make(chan BackupItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListBackupsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListBackupsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListBackupStatusSecrets gets status of a web app backup that may be in progress, including secrets associated with +// the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is +// passed in the request body. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app backupID is id of backup request is -// information on backup request +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. backupID is +// ID of backup. request is information on backup request. func (client AppsClient) ListBackupStatusSecrets(resourceGroupName string, name string, backupID string, request BackupRequest) (result BackupItem, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8529,15 +12928,13 @@ func (client AppsClient) ListBackupStatusSecretsResponder(resp *http.Response) ( return } -// ListBackupStatusSecretsSlot gets status of a web app backup that may be in -// progress, including secrets associated with the backup, such as the Azure -// Storage SAS URL. Also can be used to update the SAS URL for the backup if a -// new URL is passed in the request body. +// ListBackupStatusSecretsSlot gets status of a web app backup that may be in progress, including secrets associated +// with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new +// URL is passed in the request body. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app backupID is id of backup request is -// information on backup request slot is name of web app slot. If not specified -// then will default to production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. backupID is +// ID of backup. request is information on backup request. slot is name of web app slot. If not specified then will +// default to production slot. func (client AppsClient) ListBackupStatusSecretsSlot(resourceGroupName string, name string, backupID string, request BackupRequest, slot string) (result BackupItem, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8620,13 +13017,11 @@ func (client AppsClient) ListBackupStatusSecretsSlotResponder(resp *http.Respons return } -// ListByResourceGroup gets all web, mobile, and API apps in the specified -// resource group. +// ListByResourceGroup gets all web, mobile, and API apps in the specified resource group. // -// resourceGroupName is name of the resource group to which the resource -// belongs. includeSlots is specify true to include deployment -// slots in results. The default is false, which only gives you the production -// slot of all apps. +// resourceGroupName is name of the resource group to which the resource belongs. includeSlots is specify +// true to include deployment slots in results. The default is false, which only gives you the +// production slot of all apps. func (client AppsClient) ListByResourceGroup(resourceGroupName string, includeSlots *bool) (result AppCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8723,10 +13118,54 @@ func (client AppsClient) ListByResourceGroupNextResults(lastResults AppCollectio return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AppsClient) ListByResourceGroupComplete(resourceGroupName string, includeSlots *bool, cancel <-chan struct{}) (<-chan Site, <-chan error) { + resultChan := make(chan Site) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName, includeSlots) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListConfigurations list the configurations of an app // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListConfigurations(resourceGroupName string, name string) (result SiteConfigResourceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8821,12 +13260,55 @@ func (client AppsClient) ListConfigurationsNextResults(lastResults SiteConfigRes return } -// ListConfigurationSnapshotInfo gets a list of web app configuration snapshots -// identifiers. Each element of the list contains a timestamp and the ID of the -// snapshot. +// ListConfigurationsComplete gets all elements from the list without paging. +func (client AppsClient) ListConfigurationsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan SiteConfigResource, <-chan error) { + resultChan := make(chan SiteConfigResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListConfigurations(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListConfigurationsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListConfigurationSnapshotInfo gets a list of web app configuration snapshots identifiers. Each element of the list +// contains a timestamp and the ID of the snapshot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListConfigurationSnapshotInfo(resourceGroupName string, name string) (result ListSiteConfigurationSnapshotInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8897,14 +13379,11 @@ func (client AppsClient) ListConfigurationSnapshotInfoResponder(resp *http.Respo return } -// ListConfigurationSnapshotInfoSlot gets a list of web app configuration -// snapshots identifiers. Each element of the list contains a timestamp and the -// ID of the snapshot. +// ListConfigurationSnapshotInfoSlot gets a list of web app configuration snapshots identifiers. Each element of the +// list contains a timestamp and the ID of the snapshot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will return configuration for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. func (client AppsClient) ListConfigurationSnapshotInfoSlot(resourceGroupName string, name string, slot string) (result ListSiteConfigurationSnapshotInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -8978,10 +13457,8 @@ func (client AppsClient) ListConfigurationSnapshotInfoSlotResponder(resp *http.R // ListConfigurationsSlot list the configurations of an app // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will return configuration for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. func (client AppsClient) ListConfigurationsSlot(resourceGroupName string, name string, slot string) (result SiteConfigResourceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9077,10 +13554,54 @@ func (client AppsClient) ListConfigurationsSlotNextResults(lastResults SiteConfi return } +// ListConfigurationsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListConfigurationsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan SiteConfigResource, <-chan error) { + resultChan := make(chan SiteConfigResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListConfigurationsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListConfigurationsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListConnectionStrings gets the connection strings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListConnectionStrings(resourceGroupName string, name string) (result ConnectionStringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9153,10 +13674,9 @@ func (client AppsClient) ListConnectionStringsResponder(resp *http.Response) (re // ListConnectionStringsSlot gets the connection strings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the connection settings for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the connection settings for the production +// slot. func (client AppsClient) ListConnectionStringsSlot(resourceGroupName string, name string, slot string) (result ConnectionStringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9228,11 +13748,449 @@ func (client AppsClient) ListConnectionStringsSlotResponder(resp *http.Response) return } -// ListDeployments list deployments for an app, or a deployment slot, or for an -// instance of a scaled-out app. +// ListContinuousWebJobs list continuous web jobs for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. +func (client AppsClient) ListContinuousWebJobs(resourceGroupName string, name string) (result ContinuousWebJobCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListContinuousWebJobs") + } + + req, err := client.ListContinuousWebJobsPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing request") + return + } + + resp, err := client.ListContinuousWebJobsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending request") + return + } + + result, err = client.ListContinuousWebJobsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to request") + } + + return +} + +// ListContinuousWebJobsPreparer prepares the ListContinuousWebJobs request. +func (client AppsClient) ListContinuousWebJobsPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListContinuousWebJobsSender sends the ListContinuousWebJobs request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListContinuousWebJobsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListContinuousWebJobsResponder handles the response to the ListContinuousWebJobs request. The method always +// closes the http.Response Body. +func (client AppsClient) ListContinuousWebJobsResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListContinuousWebJobsNextResults retrieves the next set of results, if any. +func (client AppsClient) ListContinuousWebJobsNextResults(lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { + req, err := lastResults.ContinuousWebJobCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListContinuousWebJobsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure sending next results request") + } + + result, err = client.ListContinuousWebJobsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobs", resp, "Failure responding to next results request") + } + + return +} + +// ListContinuousWebJobsComplete gets all elements from the list without paging. +func (client AppsClient) ListContinuousWebJobsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan ContinuousWebJob, <-chan error) { + resultChan := make(chan ContinuousWebJob) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListContinuousWebJobs(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListContinuousWebJobsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListContinuousWebJobsSlot list continuous web jobs for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. slot is name of +// the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +func (client AppsClient) ListContinuousWebJobsSlot(resourceGroupName string, name string, slot string) (result ContinuousWebJobCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListContinuousWebJobsSlot") + } + + req, err := client.ListContinuousWebJobsSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListContinuousWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListContinuousWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to request") + } + + return +} + +// ListContinuousWebJobsSlotPreparer prepares the ListContinuousWebJobsSlot request. +func (client AppsClient) ListContinuousWebJobsSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListContinuousWebJobsSlotSender sends the ListContinuousWebJobsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListContinuousWebJobsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListContinuousWebJobsSlotResponder handles the response to the ListContinuousWebJobsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListContinuousWebJobsSlotResponder(resp *http.Response) (result ContinuousWebJobCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListContinuousWebJobsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListContinuousWebJobsSlotNextResults(lastResults ContinuousWebJobCollection) (result ContinuousWebJobCollection, err error) { + req, err := lastResults.ContinuousWebJobCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListContinuousWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure sending next results request") + } + + result, err = client.ListContinuousWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListContinuousWebJobsSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListContinuousWebJobsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListContinuousWebJobsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan ContinuousWebJob, <-chan error) { + resultChan := make(chan ContinuousWebJob) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListContinuousWebJobsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListContinuousWebJobsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListDeploymentLog list deployment log for specific deployment for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is the ID +// of a specific deployment. This is the value of the name property in the JSON response from "GET +// /api/sites/{siteName}/deployments". +func (client AppsClient) ListDeploymentLog(resourceGroupName string, name string, ID string) (result Deployment, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListDeploymentLog") + } + + req, err := client.ListDeploymentLogPreparer(resourceGroupName, name, ID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", nil, "Failure preparing request") + return + } + + resp, err := client.ListDeploymentLogSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure sending request") + return + } + + result, err = client.ListDeploymentLogResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLog", resp, "Failure responding to request") + } + + return +} + +// ListDeploymentLogPreparer prepares the ListDeploymentLog request. +func (client AppsClient) ListDeploymentLogPreparer(resourceGroupName string, name string, ID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListDeploymentLogSender sends the ListDeploymentLog request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListDeploymentLogSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListDeploymentLogResponder handles the response to the ListDeploymentLog request. The method always +// closes the http.Response Body. +func (client AppsClient) ListDeploymentLogResponder(resp *http.Response) (result Deployment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListDeploymentLogSlot list deployment log for specific deployment for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. ID is the ID +// of a specific deployment. This is the value of the name property in the JSON response from "GET +// /api/sites/{siteName}/deployments". slot is name of the deployment slot. If a slot is not specified, the API returns +// deployments for the production slot. +func (client AppsClient) ListDeploymentLogSlot(resourceGroupName string, name string, ID string, slot string) (result Deployment, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListDeploymentLogSlot") + } + + req, err := client.ListDeploymentLogSlotPreparer(resourceGroupName, name, ID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListDeploymentLogSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure sending request") + return + } + + result, err = client.ListDeploymentLogSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListDeploymentLogSlot", resp, "Failure responding to request") + } + + return +} + +// ListDeploymentLogSlotPreparer prepares the ListDeploymentLogSlot request. +func (client AppsClient) ListDeploymentLogSlotPreparer(resourceGroupName string, name string, ID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "id": autorest.Encode("path", ID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListDeploymentLogSlotSender sends the ListDeploymentLogSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListDeploymentLogSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListDeploymentLogSlotResponder handles the response to the ListDeploymentLogSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListDeploymentLogSlotResponder(resp *http.Response) (result Deployment, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListDeployments list deployments for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListDeployments(resourceGroupName string, name string) (result DeploymentCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9327,12 +14285,55 @@ func (client AppsClient) ListDeploymentsNextResults(lastResults DeploymentCollec return } -// ListDeploymentsSlot list deployments for an app, or a deployment slot, or -// for an instance of a scaled-out app. +// ListDeploymentsComplete gets all elements from the list without paging. +func (client AppsClient) ListDeploymentsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Deployment, <-chan error) { + resultChan := make(chan Deployment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListDeployments(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListDeploymentsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListDeploymentsSlot list deployments for an app, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API returns deployments for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. func (client AppsClient) ListDeploymentsSlot(resourceGroupName string, name string, slot string) (result DeploymentCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9428,11 +14429,54 @@ func (client AppsClient) ListDeploymentsSlotNextResults(lastResults DeploymentCo return } -// ListDomainOwnershipIdentifiers lists ownership identifiers for domain -// associated with web app. +// ListDeploymentsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListDeploymentsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan Deployment, <-chan error) { + resultChan := make(chan Deployment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListDeploymentsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListDeploymentsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListDomainOwnershipIdentifiers lists ownership identifiers for domain associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListDomainOwnershipIdentifiers(resourceGroupName string, name string) (result IdentifierCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9527,13 +14571,55 @@ func (client AppsClient) ListDomainOwnershipIdentifiersNextResults(lastResults I return } -// ListDomainOwnershipIdentifiersSlot lists ownership identifiers for domain -// associated with web app. +// ListDomainOwnershipIdentifiersComplete gets all elements from the list without paging. +func (client AppsClient) ListDomainOwnershipIdentifiersComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Identifier, <-chan error) { + resultChan := make(chan Identifier) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListDomainOwnershipIdentifiers(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListDomainOwnershipIdentifiersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListDomainOwnershipIdentifiersSlot lists ownership identifiers for domain associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will delete the binding for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. func (client AppsClient) ListDomainOwnershipIdentifiersSlot(resourceGroupName string, name string, slot string) (result IdentifierCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9629,10 +14715,348 @@ func (client AppsClient) ListDomainOwnershipIdentifiersSlotNextResults(lastResul return } +// ListDomainOwnershipIdentifiersSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListDomainOwnershipIdentifiersSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan Identifier, <-chan error) { + resultChan := make(chan Identifier) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListDomainOwnershipIdentifiersSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListDomainOwnershipIdentifiersSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListFunctions list the functions for a web site, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. +func (client AppsClient) ListFunctions(resourceGroupName string, name string) (result FunctionEnvelopeCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListFunctions") + } + + req, err := client.ListFunctionsPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing request") + return + } + + resp, err := client.ListFunctionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending request") + return + } + + result, err = client.ListFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to request") + } + + return +} + +// ListFunctionsPreparer prepares the ListFunctions request. +func (client AppsClient) ListFunctionsPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListFunctionsSender sends the ListFunctions request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListFunctionsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListFunctionsResponder handles the response to the ListFunctions request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionsResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListFunctionsNextResults retrieves the next set of results, if any. +func (client AppsClient) ListFunctionsNextResults(lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { + req, err := lastResults.FunctionEnvelopeCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListFunctionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure sending next results request") + } + + result, err = client.ListFunctionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctions", resp, "Failure responding to next results request") + } + + return +} + +// ListFunctionsComplete gets all elements from the list without paging. +func (client AppsClient) ListFunctionsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan FunctionEnvelope, <-chan error) { + resultChan := make(chan FunctionEnvelope) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListFunctions(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListFunctionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListFunctionSecrets get function secrets for a function in a web site, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. +func (client AppsClient) ListFunctionSecrets(resourceGroupName string, name string, functionName string) (result FunctionSecrets, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListFunctionSecrets") + } + + req, err := client.ListFunctionSecretsPreparer(resourceGroupName, name, functionName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", nil, "Failure preparing request") + return + } + + resp, err := client.ListFunctionSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure sending request") + return + } + + result, err = client.ListFunctionSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecrets", resp, "Failure responding to request") + } + + return +} + +// ListFunctionSecretsPreparer prepares the ListFunctionSecrets request. +func (client AppsClient) ListFunctionSecretsPreparer(resourceGroupName string, name string, functionName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}/listsecrets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListFunctionSecretsSender sends the ListFunctionSecrets request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListFunctionSecretsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListFunctionSecretsResponder handles the response to the ListFunctionSecrets request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionSecretsResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListFunctionSecretsSlot get function secrets for a function in a web site, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. functionName is +// function name. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) ListFunctionSecretsSlot(resourceGroupName string, name string, functionName string, slot string) (result FunctionSecrets, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListFunctionSecretsSlot") + } + + req, err := client.ListFunctionSecretsSlotPreparer(resourceGroupName, name, functionName, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListFunctionSecretsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListFunctionSecretsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListFunctionSecretsSlot", resp, "Failure responding to request") + } + + return +} + +// ListFunctionSecretsSlotPreparer prepares the ListFunctionSecretsSlot request. +func (client AppsClient) ListFunctionSecretsSlotPreparer(resourceGroupName string, name string, functionName string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "functionName": autorest.Encode("path", functionName), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListFunctionSecretsSlotSender sends the ListFunctionSecretsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListFunctionSecretsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListFunctionSecretsSlotResponder handles the response to the ListFunctionSecretsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListFunctionSecretsSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + // ListHostNameBindings get hostname bindings for an app or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListHostNameBindings(resourceGroupName string, name string) (result HostNameBindingCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9727,13 +15151,55 @@ func (client AppsClient) ListHostNameBindingsNextResults(lastResults HostNameBin return } -// ListHostNameBindingsSlot get hostname bindings for an app or a deployment -// slot. +// ListHostNameBindingsComplete gets all elements from the list without paging. +func (client AppsClient) ListHostNameBindingsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan HostNameBinding, <-chan error) { + resultChan := make(chan HostNameBinding) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListHostNameBindings(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListHostNameBindingsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListHostNameBindingsSlot get hostname bindings for an app or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API gets hostname bindings for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. func (client AppsClient) ListHostNameBindingsSlot(resourceGroupName string, name string, slot string) (result HostNameBindingCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9829,13 +15295,55 @@ func (client AppsClient) ListHostNameBindingsSlotNextResults(lastResults HostNam return } -// ListHybridConnectionKeys gets the send key name and value for a Hybrid -// Connection. +// ListHostNameBindingsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListHostNameBindingsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan HostNameBinding, <-chan error) { + resultChan := make(chan HostNameBinding) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListHostNameBindingsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListHostNameBindingsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListHybridConnectionKeys gets the send key name and value for a Hybrid Connection. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. func (client AppsClient) ListHybridConnectionKeys(resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnectionKey, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9908,13 +15416,11 @@ func (client AppsClient) ListHybridConnectionKeysResponder(resp *http.Response) return } -// ListHybridConnectionKeysSlot gets the send key name and value for a Hybrid -// Connection. +// ListHybridConnectionKeysSlot gets the send key name and value for a Hybrid Connection. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection slot is the name of the slot for the web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. +// slot is the name of the slot for the web app. func (client AppsClient) ListHybridConnectionKeysSlot(resourceGroupName string, name string, namespaceName string, relayName string, slot string) (result HybridConnectionKey, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -9988,11 +15494,9 @@ func (client AppsClient) ListHybridConnectionKeysSlotResponder(resp *http.Respon return } -// ListHybridConnections retrieves all Service Bus Hybrid Connections used by -// this Web App. +// ListHybridConnections retrieves all Service Bus Hybrid Connections used by this Web App. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. func (client AppsClient) ListHybridConnections(resourceGroupName string, name string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10063,12 +15567,10 @@ func (client AppsClient) ListHybridConnectionsResponder(resp *http.Response) (re return } -// ListHybridConnectionsSlot retrieves all Service Bus Hybrid Connections used -// by this Web App. +// ListHybridConnectionsSlot retrieves all Service Bus Hybrid Connections used by this Web App. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app slot is the name of the slot for -// the web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. slot +// is the name of the slot for the web app. func (client AppsClient) ListHybridConnectionsSlot(resourceGroupName string, name string, slot string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10140,151 +15642,43 @@ func (client AppsClient) ListHybridConnectionsSlotResponder(resp *http.Response) return } -// ListInstanceDeployments list deployments for an app, or a deployment slot, -// or for an instance of a scaled-out app. +// ListInstanceFunctionsSlot list the functions for a web site, or a deployment slot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. instanceID is the ID of a specific -// scaled-out instance. This is the value of the name property in the JSON -// response from "GET api/sites/{siteName}/instances" -func (client AppsClient) ListInstanceDeployments(resourceGroupName string, name string, instanceID string) (result DeploymentCollection, err error) { +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. slot is name of +// the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +func (client AppsClient) ListInstanceFunctionsSlot(resourceGroupName string, name string, slot string) (result FunctionEnvelopeCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceDeployments") + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceFunctionsSlot") } - req, err := client.ListInstanceDeploymentsPreparer(resourceGroupName, name, instanceID) + req, err := client.ListInstanceFunctionsSlotPreparer(resourceGroupName, name, slot) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeployments", nil, "Failure preparing request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", nil, "Failure preparing request") return } - resp, err := client.ListInstanceDeploymentsSender(req) + resp, err := client.ListInstanceFunctionsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeployments", resp, "Failure sending request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure sending request") return } - result, err = client.ListInstanceDeploymentsResponder(resp) + result, err = client.ListInstanceFunctionsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeployments", resp, "Failure responding to request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure responding to request") } return } -// ListInstanceDeploymentsPreparer prepares the ListInstanceDeployments request. -func (client AppsClient) ListInstanceDeploymentsPreparer(resourceGroupName string, name string, instanceID string) (*http.Request, error) { +// ListInstanceFunctionsSlotPreparer prepares the ListInstanceFunctionsSlot request. +func (client AppsClient) ListInstanceFunctionsSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), - "name": autorest.Encode("path", name), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2016-08-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListInstanceDeploymentsSender sends the ListInstanceDeployments request. The method will close the -// http.Response Body if it receives an error. -func (client AppsClient) ListInstanceDeploymentsSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListInstanceDeploymentsResponder handles the response to the ListInstanceDeployments request. The method always -// closes the http.Response Body. -func (client AppsClient) ListInstanceDeploymentsResponder(resp *http.Response) (result DeploymentCollection, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListInstanceDeploymentsNextResults retrieves the next set of results, if any. -func (client AppsClient) ListInstanceDeploymentsNextResults(lastResults DeploymentCollection) (result DeploymentCollection, err error) { - req, err := lastResults.DeploymentCollectionPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeployments", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListInstanceDeploymentsSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeployments", resp, "Failure sending next results request") - } - - result, err = client.ListInstanceDeploymentsResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeployments", resp, "Failure responding to next results request") - } - - return -} - -// ListInstanceDeploymentsSlot list deployments for an app, or a deployment -// slot, or for an instance of a scaled-out app. -// -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API returns deployments for the production slot. -// instanceID is the ID of a specific scaled-out instance. This is the value of -// the name property in the JSON response from "GET -// api/sites/{siteName}/instances" -func (client AppsClient) ListInstanceDeploymentsSlot(resourceGroupName string, name string, slot string, instanceID string) (result DeploymentCollection, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceDeploymentsSlot") - } - - req, err := client.ListInstanceDeploymentsSlotPreparer(resourceGroupName, name, slot, instanceID) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeploymentsSlot", nil, "Failure preparing request") - return - } - - resp, err := client.ListInstanceDeploymentsSlotSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeploymentsSlot", resp, "Failure sending request") - return - } - - result, err = client.ListInstanceDeploymentsSlotResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeploymentsSlot", resp, "Failure responding to request") - } - - return -} - -// ListInstanceDeploymentsSlotPreparer prepares the ListInstanceDeploymentsSlot request. -func (client AppsClient) ListInstanceDeploymentsSlotPreparer(resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "instanceId": autorest.Encode("path", instanceID), "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), "slot": autorest.Encode("path", slot), @@ -10299,58 +15693,102 @@ func (client AppsClient) ListInstanceDeploymentsSlotPreparer(resourceGroupName s preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments", pathParameters), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } -// ListInstanceDeploymentsSlotSender sends the ListInstanceDeploymentsSlot request. The method will close the +// ListInstanceFunctionsSlotSender sends the ListInstanceFunctionsSlot request. The method will close the // http.Response Body if it receives an error. -func (client AppsClient) ListInstanceDeploymentsSlotSender(req *http.Request) (*http.Response, error) { +func (client AppsClient) ListInstanceFunctionsSlotSender(req *http.Request) (*http.Response, error) { return autorest.SendWithSender(client, req) } -// ListInstanceDeploymentsSlotResponder handles the response to the ListInstanceDeploymentsSlot request. The method always +// ListInstanceFunctionsSlotResponder handles the response to the ListInstanceFunctionsSlot request. The method always // closes the http.Response Body. -func (client AppsClient) ListInstanceDeploymentsSlotResponder(resp *http.Response) (result DeploymentCollection, err error) { +func (client AppsClient) ListInstanceFunctionsSlotResponder(resp *http.Response) (result FunctionEnvelopeCollection, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), autorest.ByUnmarshallingJSON(&result), autorest.ByClosing()) result.Response = autorest.Response{Response: resp} return } -// ListInstanceDeploymentsSlotNextResults retrieves the next set of results, if any. -func (client AppsClient) ListInstanceDeploymentsSlotNextResults(lastResults DeploymentCollection) (result DeploymentCollection, err error) { - req, err := lastResults.DeploymentCollectionPreparer() +// ListInstanceFunctionsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListInstanceFunctionsSlotNextResults(lastResults FunctionEnvelopeCollection) (result FunctionEnvelopeCollection, err error) { + req, err := lastResults.FunctionEnvelopeCollectionPreparer() if err != nil { - return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeploymentsSlot", nil, "Failure preparing next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", nil, "Failure preparing next results request") } if req == nil { return } - resp, err := client.ListInstanceDeploymentsSlotSender(req) + resp, err := client.ListInstanceFunctionsSlotSender(req) if err != nil { result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeploymentsSlot", resp, "Failure sending next results request") + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure sending next results request") } - result, err = client.ListInstanceDeploymentsSlotResponder(resp) + result, err = client.ListInstanceFunctionsSlotResponder(resp) if err != nil { - err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceDeploymentsSlot", resp, "Failure responding to next results request") + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceFunctionsSlot", resp, "Failure responding to next results request") } return } +// ListInstanceFunctionsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceFunctionsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan FunctionEnvelope, <-chan error) { + resultChan := make(chan FunctionEnvelope) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceFunctionsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceFunctionsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListInstanceIdentifiers gets all scale-out instances of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListInstanceIdentifiers(resourceGroupName string, name string) (result AppInstanceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10445,11 +15883,55 @@ func (client AppsClient) ListInstanceIdentifiersNextResults(lastResults AppInsta return } +// ListInstanceIdentifiersComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceIdentifiersComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan SiteInstance, <-chan error) { + resultChan := make(chan SiteInstance) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceIdentifiers(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceIdentifiersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListInstanceIdentifiersSlot gets all scale-out instances of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API gets the production slot instances. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API gets the production slot instances. func (client AppsClient) ListInstanceIdentifiersSlot(resourceGroupName string, name string, slot string) (result AppInstanceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10545,10 +16027,939 @@ func (client AppsClient) ListInstanceIdentifiersSlotNextResults(lastResults AppI return } +// ListInstanceIdentifiersSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceIdentifiersSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan SiteInstance, <-chan error) { + resultChan := make(chan SiteInstance) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceIdentifiersSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceIdentifiersSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListInstanceProcesses get list of processes for a web site, or a deployment slot, or for a specific scaled-out +// instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. instanceID is ID +// of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET +// api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcesses(resourceGroupName string, name string, instanceID string) (result ProcessInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceProcesses") + } + + req, err := client.ListInstanceProcessesPreparer(resourceGroupName, name, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure sending request") + return + } + + result, err = client.ListInstanceProcessesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure responding to request") + } + + return +} + +// ListInstanceProcessesPreparer prepares the ListInstanceProcesses request. +func (client AppsClient) ListInstanceProcessesPreparer(resourceGroupName string, name string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListInstanceProcessesSender sends the ListInstanceProcesses request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListInstanceProcessesResponder handles the response to the ListInstanceProcesses request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListInstanceProcessesNextResults retrieves the next set of results, if any. +func (client AppsClient) ListInstanceProcessesNextResults(lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.ProcessInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListInstanceProcessesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure sending next results request") + } + + result, err = client.ListInstanceProcessesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcesses", resp, "Failure responding to next results request") + } + + return +} + +// ListInstanceProcessesComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceProcessesComplete(resourceGroupName string, name string, instanceID string, cancel <-chan struct{}) (<-chan ProcessInfo, <-chan error) { + resultChan := make(chan ProcessInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceProcesses(resourceGroupName, name, instanceID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceProcessesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListInstanceProcessesSlot get list of processes for a web site, or a deployment slot, or for a specific scaled-out +// instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. slot is name of +// the deployment slot. If a slot is not specified, the API returns deployments for the production slot. instanceID is +// ID of a specific scaled-out instance. This is the value of the name property in the JSON response from "GET +// api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcessesSlot(resourceGroupName string, name string, slot string, instanceID string) (result ProcessInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceProcessesSlot") + } + + req, err := client.ListInstanceProcessesSlotPreparer(resourceGroupName, name, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure sending request") + return + } + + result, err = client.ListInstanceProcessesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure responding to request") + } + + return +} + +// ListInstanceProcessesSlotPreparer prepares the ListInstanceProcessesSlot request. +func (client AppsClient) ListInstanceProcessesSlotPreparer(resourceGroupName string, name string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListInstanceProcessesSlotSender sends the ListInstanceProcessesSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessesSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListInstanceProcessesSlotResponder handles the response to the ListInstanceProcessesSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListInstanceProcessesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListInstanceProcessesSlotNextResults(lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.ProcessInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListInstanceProcessesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure sending next results request") + } + + result, err = client.ListInstanceProcessesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessesSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListInstanceProcessesSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceProcessesSlotComplete(resourceGroupName string, name string, slot string, instanceID string, cancel <-chan struct{}) (<-chan ProcessInfo, <-chan error) { + resultChan := make(chan ProcessInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceProcessesSlot(resourceGroupName, name, slot, instanceID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceProcessesSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListInstanceProcessModules list module information for a process by its ID for a specific scaled-out instance in a +// web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON response from +// "GET api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcessModules(resourceGroupName string, name string, processID string, instanceID string) (result ProcessModuleInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceProcessModules") + } + + req, err := client.ListInstanceProcessModulesPreparer(resourceGroupName, name, processID, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessModulesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure sending request") + return + } + + result, err = client.ListInstanceProcessModulesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure responding to request") + } + + return +} + +// ListInstanceProcessModulesPreparer prepares the ListInstanceProcessModules request. +func (client AppsClient) ListInstanceProcessModulesPreparer(resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListInstanceProcessModulesSender sends the ListInstanceProcessModules request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessModulesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListInstanceProcessModulesResponder handles the response to the ListInstanceProcessModules request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListInstanceProcessModulesNextResults retrieves the next set of results, if any. +func (client AppsClient) ListInstanceProcessModulesNextResults(lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { + req, err := lastResults.ProcessModuleInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListInstanceProcessModulesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure sending next results request") + } + + result, err = client.ListInstanceProcessModulesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModules", resp, "Failure responding to next results request") + } + + return +} + +// ListInstanceProcessModulesComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceProcessModulesComplete(resourceGroupName string, name string, processID string, instanceID string, cancel <-chan struct{}) (<-chan ProcessModuleInfo, <-chan error) { + resultChan := make(chan ProcessModuleInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceProcessModules(resourceGroupName, name, processID, instanceID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceProcessModulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListInstanceProcessModulesSlot list module information for a process by its ID for a specific scaled-out instance in +// a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcessModulesSlot(resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessModuleInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceProcessModulesSlot") + } + + req, err := client.ListInstanceProcessModulesSlotPreparer(resourceGroupName, name, processID, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessModulesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure sending request") + return + } + + result, err = client.ListInstanceProcessModulesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure responding to request") + } + + return +} + +// ListInstanceProcessModulesSlotPreparer prepares the ListInstanceProcessModulesSlot request. +func (client AppsClient) ListInstanceProcessModulesSlotPreparer(resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListInstanceProcessModulesSlotSender sends the ListInstanceProcessModulesSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessModulesSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListInstanceProcessModulesSlotResponder handles the response to the ListInstanceProcessModulesSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListInstanceProcessModulesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListInstanceProcessModulesSlotNextResults(lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { + req, err := lastResults.ProcessModuleInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListInstanceProcessModulesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure sending next results request") + } + + result, err = client.ListInstanceProcessModulesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessModulesSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListInstanceProcessModulesSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceProcessModulesSlotComplete(resourceGroupName string, name string, processID string, slot string, instanceID string, cancel <-chan struct{}) (<-chan ProcessModuleInfo, <-chan error) { + resultChan := make(chan ProcessModuleInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceProcessModulesSlot(resourceGroupName, name, processID, slot, instanceID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceProcessModulesSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListInstanceProcessThreads list the threads in a process by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON response from +// "GET api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcessThreads(resourceGroupName string, name string, processID string, instanceID string) (result ProcessThreadInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceProcessThreads") + } + + req, err := client.ListInstanceProcessThreadsPreparer(resourceGroupName, name, processID, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessThreadsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure sending request") + return + } + + result, err = client.ListInstanceProcessThreadsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure responding to request") + } + + return +} + +// ListInstanceProcessThreadsPreparer prepares the ListInstanceProcessThreads request. +func (client AppsClient) ListInstanceProcessThreadsPreparer(resourceGroupName string, name string, processID string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListInstanceProcessThreadsSender sends the ListInstanceProcessThreads request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessThreadsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListInstanceProcessThreadsResponder handles the response to the ListInstanceProcessThreads request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListInstanceProcessThreadsNextResults retrieves the next set of results, if any. +func (client AppsClient) ListInstanceProcessThreadsNextResults(lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { + req, err := lastResults.ProcessThreadInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListInstanceProcessThreadsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure sending next results request") + } + + result, err = client.ListInstanceProcessThreadsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreads", resp, "Failure responding to next results request") + } + + return +} + +// ListInstanceProcessThreadsComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceProcessThreadsComplete(resourceGroupName string, name string, processID string, instanceID string, cancel <-chan struct{}) (<-chan ProcessThreadInfo, <-chan error) { + resultChan := make(chan ProcessThreadInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceProcessThreads(resourceGroupName, name, processID, instanceID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceProcessThreadsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListInstanceProcessThreadsSlot list the threads in a process by its ID for a specific scaled-out instance in a web +// site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. instanceID is ID of a specific scaled-out instance. This is the value of the name property in the JSON +// response from "GET api/sites/{siteName}/instances". +func (client AppsClient) ListInstanceProcessThreadsSlot(resourceGroupName string, name string, processID string, slot string, instanceID string) (result ProcessThreadInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot") + } + + req, err := client.ListInstanceProcessThreadsSlotPreparer(resourceGroupName, name, processID, slot, instanceID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListInstanceProcessThreadsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListInstanceProcessThreadsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure responding to request") + } + + return +} + +// ListInstanceProcessThreadsSlotPreparer prepares the ListInstanceProcessThreadsSlot request. +func (client AppsClient) ListInstanceProcessThreadsSlotPreparer(resourceGroupName string, name string, processID string, slot string, instanceID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "instanceId": autorest.Encode("path", instanceID), + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListInstanceProcessThreadsSlotSender sends the ListInstanceProcessThreadsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListInstanceProcessThreadsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListInstanceProcessThreadsSlotResponder handles the response to the ListInstanceProcessThreadsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListInstanceProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListInstanceProcessThreadsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListInstanceProcessThreadsSlotNextResults(lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { + req, err := lastResults.ProcessThreadInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListInstanceProcessThreadsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure sending next results request") + } + + result, err = client.ListInstanceProcessThreadsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListInstanceProcessThreadsSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListInstanceProcessThreadsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListInstanceProcessThreadsSlotComplete(resourceGroupName string, name string, processID string, slot string, instanceID string, cancel <-chan struct{}) (<-chan ProcessThreadInfo, <-chan error) { + resultChan := make(chan ProcessThreadInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListInstanceProcessThreadsSlot(resourceGroupName, name, processID, slot, instanceID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListInstanceProcessThreadsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListMetadata gets the metadata of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListMetadata(resourceGroupName string, name string) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10621,10 +17032,8 @@ func (client AppsClient) ListMetadataResponder(resp *http.Response) (result Stri // ListMetadataSlot gets the metadata of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the metadata for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the metadata for the production slot. func (client AppsClient) ListMetadataSlot(resourceGroupName string, name string, slot string) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10696,11 +17105,9 @@ func (client AppsClient) ListMetadataSlotResponder(resp *http.Response) (result return } -// ListMetricDefinitions gets all metric definitions of an app (or deployment -// slot, if specified). +// ListMetricDefinitions gets all metric definitions of an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListMetricDefinitions(resourceGroupName string, name string) (result ResourceMetricDefinitionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10795,13 +17202,55 @@ func (client AppsClient) ListMetricDefinitionsNextResults(lastResults ResourceMe return } -// ListMetricDefinitionsSlot gets all metric definitions of an app (or -// deployment slot, if specified). +// ListMetricDefinitionsComplete gets all elements from the list without paging. +func (client AppsClient) ListMetricDefinitionsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan ResourceMetricDefinition, <-chan error) { + resultChan := make(chan ResourceMetricDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMetricDefinitions(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMetricDefinitionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMetricDefinitionsSlot gets all metric definitions of an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get metric definitions of the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get metric definitions of the production slot. func (client AppsClient) ListMetricDefinitionsSlot(resourceGroupName string, name string, slot string) (result ResourceMetricDefinitionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -10897,16 +17346,58 @@ func (client AppsClient) ListMetricDefinitionsSlotNextResults(lastResults Resour return } -// ListMetrics gets performance metrics of an app (or deployment slot, if -// specified). +// ListMetricDefinitionsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListMetricDefinitionsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan ResourceMetricDefinition, <-chan error) { + resultChan := make(chan ResourceMetricDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMetricDefinitionsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMetricDefinitionsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMetrics gets performance metrics of an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. details is specify "true" to include -// metric details in the response. It is "false" by default. filter is return -// only metrics specified in the filter (using OData syntax). For example: -// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime -// eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and -// timeGrain eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. details is +// specify "true" to include metric details in the response. It is "false" by default. filter is return only metrics +// specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq +// 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq +// duration'[Hour|Minute|Day]'. func (client AppsClient) ListMetrics(resourceGroupName string, name string, details *bool, filter string) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11007,17 +17498,59 @@ func (client AppsClient) ListMetricsNextResults(lastResults ResourceMetricCollec return } -// ListMetricsSlot gets performance metrics of an app (or deployment slot, if -// specified). +// ListMetricsComplete gets all elements from the list without paging. +func (client AppsClient) ListMetricsComplete(resourceGroupName string, name string, details *bool, filter string, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMetrics(resourceGroupName, name, details, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMetricsSlot gets performance metrics of an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get metrics of the production slot. -// details is specify "true" to include metric details in the response. It is -// "false" by default. filter is return only metrics specified in the filter -// (using OData syntax). For example: $filter=(name.value eq 'Metric1' or -// name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime -// eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get metrics of the production slot. details is +// specify "true" to include metric details in the response. It is "false" by default. filter is return only metrics +// specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq +// 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq +// duration'[Hour|Minute|Day]'. func (client AppsClient) ListMetricsSlot(resourceGroupName string, name string, slot string, details *bool, filter string) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11119,12 +17652,55 @@ func (client AppsClient) ListMetricsSlotNextResults(lastResults ResourceMetricCo return } -// ListNetworkFeatures gets all network features used by the app (or deployment -// slot, if specified). +// ListMetricsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListMetricsSlotComplete(resourceGroupName string, name string, slot string, details *bool, filter string, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMetricsSlot(resourceGroupName, name, slot, details, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMetricsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListNetworkFeatures gets all network features used by the app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. view is the type of view. This can either -// be "summary" or "detailed". +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. view is the +// type of view. This can either be "summary" or "detailed". func (client AppsClient) ListNetworkFeatures(resourceGroupName string, name string, view string) (result NetworkFeatures, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11196,13 +17772,11 @@ func (client AppsClient) ListNetworkFeaturesResponder(resp *http.Response) (resu return } -// ListNetworkFeaturesSlot gets all network features used by the app (or -// deployment slot, if specified). +// ListNetworkFeaturesSlot gets all network features used by the app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. view is the type of view. This can either -// be "summary" or "detailed". slot is name of the deployment slot. If a slot -// is not specified, the API will get network features for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. view is the +// type of view. This can either be "summary" or "detailed". slot is name of the deployment slot. If a slot is not +// specified, the API will get network features for the production slot. func (client AppsClient) ListNetworkFeaturesSlot(resourceGroupName string, name string, view string, slot string) (result NetworkFeatures, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11277,11 +17851,9 @@ func (client AppsClient) ListNetworkFeaturesSlotResponder(resp *http.Response) ( // ListPerfMonCounters gets perfmon counters for web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app filter is return only usages/metrics -// specified in the filter. Filter conforms to odata syntax. Example: -// $filter=(startTime eq '2014-01-01T00:00:00Z' and endTime eq -// '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. filter is +// return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq +// '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppsClient) ListPerfMonCounters(resourceGroupName string, name string, filter string) (result PerfMonCounterCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11379,15 +17951,57 @@ func (client AppsClient) ListPerfMonCountersNextResults(lastResults PerfMonCount return } +// ListPerfMonCountersComplete gets all elements from the list without paging. +func (client AppsClient) ListPerfMonCountersComplete(resourceGroupName string, name string, filter string, cancel <-chan struct{}) (<-chan PerfMonResponse, <-chan error) { + resultChan := make(chan PerfMonResponse) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListPerfMonCounters(resourceGroupName, name, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListPerfMonCountersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListPerfMonCountersSlot gets perfmon counters for web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app slot is name of web app slot. If not -// specified then will default to production slot. **** CURRENTLY UNUSED ***** -// filter is return only usages/metrics specified in the filter. Filter -// conforms to odata syntax. Example: $filter=(startTime eq -// '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain -// eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. filter is return only usages/metrics +// specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq '2014-01-01T00:00:00Z' and +// endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppsClient) ListPerfMonCountersSlot(resourceGroupName string, name string, slot string, filter string) (result PerfMonCounterCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11486,10 +18100,54 @@ func (client AppsClient) ListPerfMonCountersSlotNextResults(lastResults PerfMonC return } +// ListPerfMonCountersSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListPerfMonCountersSlotComplete(resourceGroupName string, name string, slot string, filter string, cancel <-chan struct{}) (<-chan PerfMonResponse, <-chan error) { + resultChan := make(chan PerfMonResponse) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListPerfMonCountersSlot(resourceGroupName, name, slot, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListPerfMonCountersSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListPremierAddOns gets the premier add-ons of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListPremierAddOns(resourceGroupName string, name string) (result PremierAddOn, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11562,10 +18220,8 @@ func (client AppsClient) ListPremierAddOnsResponder(resp *http.Response) (result // ListPremierAddOnsSlot gets the premier add-ons of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the premier add-ons for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the production slot. func (client AppsClient) ListPremierAddOnsSlot(resourceGroupName string, name string, slot string) (result PremierAddOn, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11637,13 +18293,1164 @@ func (client AppsClient) ListPremierAddOnsSlotResponder(resp *http.Response) (re return } -// ListPublishingCredentials gets the Git/FTP publishing credentials of an app. -// This method may poll for completion. Polling can be canceled by passing the -// cancel channel argument. The channel will be used to cancel polling and any +// ListProcesses get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance in a +// web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. +func (client AppsClient) ListProcesses(resourceGroupName string, name string) (result ProcessInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListProcesses") + } + + req, err := client.ListProcessesPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", nil, "Failure preparing request") + return + } + + resp, err := client.ListProcessesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure sending request") + return + } + + result, err = client.ListProcessesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure responding to request") + } + + return +} + +// ListProcessesPreparer prepares the ListProcesses request. +func (client AppsClient) ListProcessesPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListProcessesSender sends the ListProcesses request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListProcessesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListProcessesResponder handles the response to the ListProcesses request. The method always +// closes the http.Response Body. +func (client AppsClient) ListProcessesResponder(resp *http.Response) (result ProcessInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListProcessesNextResults retrieves the next set of results, if any. +func (client AppsClient) ListProcessesNextResults(lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.ProcessInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListProcessesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure sending next results request") + } + + result, err = client.ListProcessesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcesses", resp, "Failure responding to next results request") + } + + return +} + +// ListProcessesComplete gets all elements from the list without paging. +func (client AppsClient) ListProcessesComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan ProcessInfo, <-chan error) { + resultChan := make(chan ProcessInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListProcesses(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListProcessesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListProcessesSlot get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance +// in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. slot is name of +// the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +func (client AppsClient) ListProcessesSlot(resourceGroupName string, name string, slot string) (result ProcessInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListProcessesSlot") + } + + req, err := client.ListProcessesSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListProcessesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure sending request") + return + } + + result, err = client.ListProcessesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure responding to request") + } + + return +} + +// ListProcessesSlotPreparer prepares the ListProcessesSlot request. +func (client AppsClient) ListProcessesSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListProcessesSlotSender sends the ListProcessesSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListProcessesSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListProcessesSlotResponder handles the response to the ListProcessesSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListProcessesSlotResponder(resp *http.Response) (result ProcessInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListProcessesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListProcessesSlotNextResults(lastResults ProcessInfoCollection) (result ProcessInfoCollection, err error) { + req, err := lastResults.ProcessInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListProcessesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure sending next results request") + } + + result, err = client.ListProcessesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessesSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListProcessesSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListProcessesSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan ProcessInfo, <-chan error) { + resultChan := make(chan ProcessInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListProcessesSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListProcessesSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListProcessModules list module information for a process by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +func (client AppsClient) ListProcessModules(resourceGroupName string, name string, processID string) (result ProcessModuleInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListProcessModules") + } + + req, err := client.ListProcessModulesPreparer(resourceGroupName, name, processID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", nil, "Failure preparing request") + return + } + + resp, err := client.ListProcessModulesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure sending request") + return + } + + result, err = client.ListProcessModulesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure responding to request") + } + + return +} + +// ListProcessModulesPreparer prepares the ListProcessModules request. +func (client AppsClient) ListProcessModulesPreparer(resourceGroupName string, name string, processID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListProcessModulesSender sends the ListProcessModules request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListProcessModulesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListProcessModulesResponder handles the response to the ListProcessModules request. The method always +// closes the http.Response Body. +func (client AppsClient) ListProcessModulesResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListProcessModulesNextResults retrieves the next set of results, if any. +func (client AppsClient) ListProcessModulesNextResults(lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { + req, err := lastResults.ProcessModuleInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListProcessModulesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure sending next results request") + } + + result, err = client.ListProcessModulesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModules", resp, "Failure responding to next results request") + } + + return +} + +// ListProcessModulesComplete gets all elements from the list without paging. +func (client AppsClient) ListProcessModulesComplete(resourceGroupName string, name string, processID string, cancel <-chan struct{}) (<-chan ProcessModuleInfo, <-chan error) { + resultChan := make(chan ProcessModuleInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListProcessModules(resourceGroupName, name, processID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListProcessModulesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListProcessModulesSlot list module information for a process by its ID for a specific scaled-out instance in a web +// site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. +func (client AppsClient) ListProcessModulesSlot(resourceGroupName string, name string, processID string, slot string) (result ProcessModuleInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListProcessModulesSlot") + } + + req, err := client.ListProcessModulesSlotPreparer(resourceGroupName, name, processID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListProcessModulesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure sending request") + return + } + + result, err = client.ListProcessModulesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure responding to request") + } + + return +} + +// ListProcessModulesSlotPreparer prepares the ListProcessModulesSlot request. +func (client AppsClient) ListProcessModulesSlotPreparer(resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/modules", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListProcessModulesSlotSender sends the ListProcessModulesSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListProcessModulesSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListProcessModulesSlotResponder handles the response to the ListProcessModulesSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListProcessModulesSlotResponder(resp *http.Response) (result ProcessModuleInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListProcessModulesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListProcessModulesSlotNextResults(lastResults ProcessModuleInfoCollection) (result ProcessModuleInfoCollection, err error) { + req, err := lastResults.ProcessModuleInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListProcessModulesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure sending next results request") + } + + result, err = client.ListProcessModulesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessModulesSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListProcessModulesSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListProcessModulesSlotComplete(resourceGroupName string, name string, processID string, slot string, cancel <-chan struct{}) (<-chan ProcessModuleInfo, <-chan error) { + resultChan := make(chan ProcessModuleInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListProcessModulesSlot(resourceGroupName, name, processID, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListProcessModulesSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListProcessThreads list the threads in a process by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +func (client AppsClient) ListProcessThreads(resourceGroupName string, name string, processID string) (result ProcessThreadInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListProcessThreads") + } + + req, err := client.ListProcessThreadsPreparer(resourceGroupName, name, processID) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", nil, "Failure preparing request") + return + } + + resp, err := client.ListProcessThreadsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure sending request") + return + } + + result, err = client.ListProcessThreadsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure responding to request") + } + + return +} + +// ListProcessThreadsPreparer prepares the ListProcessThreads request. +func (client AppsClient) ListProcessThreadsPreparer(resourceGroupName string, name string, processID string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListProcessThreadsSender sends the ListProcessThreads request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListProcessThreadsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListProcessThreadsResponder handles the response to the ListProcessThreads request. The method always +// closes the http.Response Body. +func (client AppsClient) ListProcessThreadsResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListProcessThreadsNextResults retrieves the next set of results, if any. +func (client AppsClient) ListProcessThreadsNextResults(lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { + req, err := lastResults.ProcessThreadInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListProcessThreadsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure sending next results request") + } + + result, err = client.ListProcessThreadsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreads", resp, "Failure responding to next results request") + } + + return +} + +// ListProcessThreadsComplete gets all elements from the list without paging. +func (client AppsClient) ListProcessThreadsComplete(resourceGroupName string, name string, processID string, cancel <-chan struct{}) (<-chan ProcessThreadInfo, <-chan error) { + resultChan := make(chan ProcessThreadInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListProcessThreads(resourceGroupName, name, processID) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListProcessThreadsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListProcessThreadsSlot list the threads in a process by its ID for a specific scaled-out instance in a web site. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. processID is pID. +// slot is name of the deployment slot. If a slot is not specified, the API returns deployments for the production +// slot. +func (client AppsClient) ListProcessThreadsSlot(resourceGroupName string, name string, processID string, slot string) (result ProcessThreadInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListProcessThreadsSlot") + } + + req, err := client.ListProcessThreadsSlotPreparer(resourceGroupName, name, processID, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListProcessThreadsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListProcessThreadsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure responding to request") + } + + return +} + +// ListProcessThreadsSlotPreparer prepares the ListProcessThreadsSlot request. +func (client AppsClient) ListProcessThreadsSlotPreparer(resourceGroupName string, name string, processID string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "processId": autorest.Encode("path", processID), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/processes/{processId}/threads", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListProcessThreadsSlotSender sends the ListProcessThreadsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListProcessThreadsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListProcessThreadsSlotResponder handles the response to the ListProcessThreadsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListProcessThreadsSlotResponder(resp *http.Response) (result ProcessThreadInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListProcessThreadsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListProcessThreadsSlotNextResults(lastResults ProcessThreadInfoCollection) (result ProcessThreadInfoCollection, err error) { + req, err := lastResults.ProcessThreadInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListProcessThreadsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure sending next results request") + } + + result, err = client.ListProcessThreadsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListProcessThreadsSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListProcessThreadsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListProcessThreadsSlotComplete(resourceGroupName string, name string, processID string, slot string, cancel <-chan struct{}) (<-chan ProcessThreadInfo, <-chan error) { + resultChan := make(chan ProcessThreadInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListProcessThreadsSlot(resourceGroupName, name, processID, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListProcessThreadsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListPublicCertificates get public certificates for an app or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +func (client AppsClient) ListPublicCertificates(resourceGroupName string, name string) (result PublicCertificateCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListPublicCertificates") + } + + req, err := client.ListPublicCertificatesPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", nil, "Failure preparing request") + return + } + + resp, err := client.ListPublicCertificatesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure sending request") + return + } + + result, err = client.ListPublicCertificatesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure responding to request") + } + + return +} + +// ListPublicCertificatesPreparer prepares the ListPublicCertificates request. +func (client AppsClient) ListPublicCertificatesPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListPublicCertificatesSender sends the ListPublicCertificates request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListPublicCertificatesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListPublicCertificatesResponder handles the response to the ListPublicCertificates request. The method always +// closes the http.Response Body. +func (client AppsClient) ListPublicCertificatesResponder(resp *http.Response) (result PublicCertificateCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListPublicCertificatesNextResults retrieves the next set of results, if any. +func (client AppsClient) ListPublicCertificatesNextResults(lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) { + req, err := lastResults.PublicCertificateCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListPublicCertificatesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure sending next results request") + } + + result, err = client.ListPublicCertificatesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificates", resp, "Failure responding to next results request") + } + + return +} + +// ListPublicCertificatesComplete gets all elements from the list without paging. +func (client AppsClient) ListPublicCertificatesComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan PublicCertificate, <-chan error) { + resultChan := make(chan PublicCertificate) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListPublicCertificates(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListPublicCertificatesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListPublicCertificatesSlot get public certificates for an app or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API gets hostname bindings for the production slot. +func (client AppsClient) ListPublicCertificatesSlot(resourceGroupName string, name string, slot string) (result PublicCertificateCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListPublicCertificatesSlot") + } + + req, err := client.ListPublicCertificatesSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListPublicCertificatesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure sending request") + return + } + + result, err = client.ListPublicCertificatesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure responding to request") + } + + return +} + +// ListPublicCertificatesSlotPreparer prepares the ListPublicCertificatesSlot request. +func (client AppsClient) ListPublicCertificatesSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListPublicCertificatesSlotSender sends the ListPublicCertificatesSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListPublicCertificatesSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListPublicCertificatesSlotResponder handles the response to the ListPublicCertificatesSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListPublicCertificatesSlotResponder(resp *http.Response) (result PublicCertificateCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListPublicCertificatesSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListPublicCertificatesSlotNextResults(lastResults PublicCertificateCollection) (result PublicCertificateCollection, err error) { + req, err := lastResults.PublicCertificateCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListPublicCertificatesSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure sending next results request") + } + + result, err = client.ListPublicCertificatesSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListPublicCertificatesSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListPublicCertificatesSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListPublicCertificatesSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan PublicCertificate, <-chan error) { + resultChan := make(chan PublicCertificate) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListPublicCertificatesSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListPublicCertificatesSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListPublishingCredentials gets the Git/FTP publishing credentials of an app. This method may poll for completion. +// Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel polling and any // outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListPublishingCredentials(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan User, <-chan error) { resultChan := make(chan User, 1) errChan := make(chan error, 1) @@ -11662,8 +19469,10 @@ func (client AppsClient) ListPublishingCredentials(resourceGroupName string, nam var err error var result User defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -11730,15 +19539,13 @@ func (client AppsClient) ListPublishingCredentialsResponder(resp *http.Response) return } -// ListPublishingCredentialsSlot gets the Git/FTP publishing credentials of an -// app. This method may poll for completion. Polling can be canceled by passing -// the cancel channel argument. The channel will be used to cancel polling and -// any outstanding HTTP requests. +// ListPublishingCredentialsSlot gets the Git/FTP publishing credentials of an app. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel +// polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get the publishing credentials for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get the publishing credentials for the production +// slot. func (client AppsClient) ListPublishingCredentialsSlot(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan User, <-chan error) { resultChan := make(chan User, 1) errChan := make(chan error, 1) @@ -11757,8 +19564,10 @@ func (client AppsClient) ListPublishingCredentialsSlot(resourceGroupName string, var err error var result User defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -11826,12 +19635,10 @@ func (client AppsClient) ListPublishingCredentialsSlotResponder(resp *http.Respo return } -// ListPublishingProfileXMLWithSecrets gets the publishing profile for an app -// (or deployment slot, if specified). +// ListPublishingProfileXMLWithSecrets gets the publishing profile for an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. publishingProfileOptions is specifies -// publishingProfileOptions for publishing profile. For example, use {"format": +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// publishingProfileOptions is specifies publishingProfileOptions for publishing profile. For example, use {"format": // "FileZilla3"} to get a FileZilla publishing profile. func (client AppsClient) ListPublishingProfileXMLWithSecrets(resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ @@ -11904,15 +19711,12 @@ func (client AppsClient) ListPublishingProfileXMLWithSecretsResponder(resp *http return } -// ListPublishingProfileXMLWithSecretsSlot gets the publishing profile for an -// app (or deployment slot, if specified). +// ListPublishingProfileXMLWithSecretsSlot gets the publishing profile for an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. publishingProfileOptions is specifies -// publishingProfileOptions for publishing profile. For example, use {"format": -// "FileZilla3"} to get a FileZilla publishing profile. slot is name of the -// deployment slot. If a slot is not specified, the API will get the publishing -// profile for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// publishingProfileOptions is specifies publishingProfileOptions for publishing profile. For example, use {"format": +// "FileZilla3"} to get a FileZilla publishing profile. slot is name of the deployment slot. If a slot is not +// specified, the API will get the publishing profile for the production slot. func (client AppsClient) ListPublishingProfileXMLWithSecretsSlot(resourceGroupName string, name string, publishingProfileOptions CsmPublishingProfileOptions, slot string) (result ReadCloser, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -11985,11 +19789,9 @@ func (client AppsClient) ListPublishingProfileXMLWithSecretsSlotResponder(resp * return } -// ListRelayServiceConnections gets hybrid connections configured for an app -// (or deployment slot, if specified). +// ListRelayServiceConnections gets hybrid connections configured for an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListRelayServiceConnections(resourceGroupName string, name string) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12060,13 +19862,10 @@ func (client AppsClient) ListRelayServiceConnectionsResponder(resp *http.Respons return } -// ListRelayServiceConnectionsSlot gets hybrid connections configured for an -// app (or deployment slot, if specified). +// ListRelayServiceConnectionsSlot gets hybrid connections configured for an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get hybrid connections for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get hybrid connections for the production slot. func (client AppsClient) ListRelayServiceConnectionsSlot(resourceGroupName string, name string, slot string) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12138,10 +19937,295 @@ func (client AppsClient) ListRelayServiceConnectionsSlotResponder(resp *http.Res return } +// ListSiteExtensions get list of siteextensions for a web site, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. +func (client AppsClient) ListSiteExtensions(resourceGroupName string, name string) (result SiteExtensionInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListSiteExtensions") + } + + req, err := client.ListSiteExtensionsPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", nil, "Failure preparing request") + return + } + + resp, err := client.ListSiteExtensionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure sending request") + return + } + + result, err = client.ListSiteExtensionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure responding to request") + } + + return +} + +// ListSiteExtensionsPreparer prepares the ListSiteExtensions request. +func (client AppsClient) ListSiteExtensionsPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSiteExtensionsSender sends the ListSiteExtensions request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSiteExtensionsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSiteExtensionsResponder handles the response to the ListSiteExtensions request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSiteExtensionsResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSiteExtensionsNextResults retrieves the next set of results, if any. +func (client AppsClient) ListSiteExtensionsNextResults(lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) { + req, err := lastResults.SiteExtensionInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSiteExtensionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure sending next results request") + } + + result, err = client.ListSiteExtensionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensions", resp, "Failure responding to next results request") + } + + return +} + +// ListSiteExtensionsComplete gets all elements from the list without paging. +func (client AppsClient) ListSiteExtensionsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan SiteExtensionInfo, <-chan error) { + resultChan := make(chan SiteExtensionInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSiteExtensions(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSiteExtensionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListSiteExtensionsSlot get list of siteextensions for a web site, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. slot is name of +// the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +func (client AppsClient) ListSiteExtensionsSlot(resourceGroupName string, name string, slot string) (result SiteExtensionInfoCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListSiteExtensionsSlot") + } + + req, err := client.ListSiteExtensionsSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListSiteExtensionsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListSiteExtensionsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure responding to request") + } + + return +} + +// ListSiteExtensionsSlotPreparer prepares the ListSiteExtensionsSlot request. +func (client AppsClient) ListSiteExtensionsSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSiteExtensionsSlotSender sends the ListSiteExtensionsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSiteExtensionsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSiteExtensionsSlotResponder handles the response to the ListSiteExtensionsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSiteExtensionsSlotResponder(resp *http.Response) (result SiteExtensionInfoCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSiteExtensionsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListSiteExtensionsSlotNextResults(lastResults SiteExtensionInfoCollection) (result SiteExtensionInfoCollection, err error) { + req, err := lastResults.SiteExtensionInfoCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListSiteExtensionsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure sending next results request") + } + + result, err = client.ListSiteExtensionsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSiteExtensionsSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListSiteExtensionsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListSiteExtensionsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan SiteExtensionInfo, <-chan error) { + resultChan := make(chan SiteExtensionInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSiteExtensionsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSiteExtensionsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListSitePushSettings gets the Push settings associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. func (client AppsClient) ListSitePushSettings(resourceGroupName string, name string) (result PushSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12214,9 +20298,8 @@ func (client AppsClient) ListSitePushSettingsResponder(resp *http.Response) (res // ListSitePushSettingsSlot gets the Push settings associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app slot is name of web app slot. If not -// specified then will default to production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. func (client AppsClient) ListSitePushSettingsSlot(resourceGroupName string, name string, slot string) (result PushSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12288,11 +20371,10 @@ func (client AppsClient) ListSitePushSettingsSlotResponder(resp *http.Response) return } -// ListSlotConfigurationNames gets the names of app settings and connection -// strings that stick to the slot (not swapped). +// ListSlotConfigurationNames gets the names of app settings and connection strings that stick to the slot (not +// swapped). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListSlotConfigurationNames(resourceGroupName string, name string) (result SlotConfigNamesResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12363,12 +20445,10 @@ func (client AppsClient) ListSlotConfigurationNamesResponder(resp *http.Response return } -// ListSlotDifferencesFromProduction get the difference in configuration -// settings between two web app slots. +// ListSlotDifferencesFromProduction get the difference in configuration settings between two web app slots. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slotSwapEntity is jSON object that -// contains the target slot name. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// slotSwapEntity is JSON object that contains the target slot name. See example. func (client AppsClient) ListSlotDifferencesFromProduction(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity) (result SlotDifferenceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12468,13 +20548,56 @@ func (client AppsClient) ListSlotDifferencesFromProductionNextResults(lastResult return } -// ListSlotDifferencesSlot get the difference in configuration settings between -// two web app slots. +// ListSlotDifferencesFromProductionComplete gets all elements from the list without paging. +func (client AppsClient) ListSlotDifferencesFromProductionComplete(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, cancel <-chan struct{}) (<-chan SlotDifference, <-chan error) { + resultChan := make(chan SlotDifference) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSlotDifferencesFromProduction(resourceGroupName, name, slotSwapEntity) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSlotDifferencesFromProductionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListSlotDifferencesSlot get the difference in configuration settings between two web app slots. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slotSwapEntity is jSON object that -// contains the target slot name. See example. slot is name of the source slot. -// If a slot is not specified, the production slot is used as the source slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// slotSwapEntity is JSON object that contains the target slot name. See example. slot is name of the source slot. If a +// slot is not specified, the production slot is used as the source slot. func (client AppsClient) ListSlotDifferencesSlot(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string) (result SlotDifferenceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12575,10 +20698,54 @@ func (client AppsClient) ListSlotDifferencesSlotNextResults(lastResults SlotDiff return } +// ListSlotDifferencesSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListSlotDifferencesSlotComplete(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string, cancel <-chan struct{}) (<-chan SlotDifference, <-chan error) { + resultChan := make(chan SlotDifference) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSlotDifferencesSlot(resourceGroupName, name, slotSwapEntity, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSlotDifferencesSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListSlots gets an app's deployment slots. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListSlots(resourceGroupName string, name string) (result AppCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12673,10 +20840,54 @@ func (client AppsClient) ListSlotsNextResults(lastResults AppCollection) (result return } +// ListSlotsComplete gets all elements from the list without paging. +func (client AppsClient) ListSlotsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Site, <-chan error) { + resultChan := make(chan Site) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSlots(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSlotsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListSnapshots returns all Snapshots to the user. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is website Name +// resourceGroupName is name of the resource group to which the resource belongs. name is website Name. func (client AppsClient) ListSnapshots(resourceGroupName string, name string) (result SnapshotCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12771,10 +20982,55 @@ func (client AppsClient) ListSnapshotsNextResults(lastResults SnapshotCollection return } +// ListSnapshotsComplete gets all elements from the list without paging. +func (client AppsClient) ListSnapshotsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Snapshot, <-chan error) { + resultChan := make(chan Snapshot) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSnapshots(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSnapshotsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListSnapshotsSlot returns all Snapshots to the user. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is website Name slot is website Slot +// resourceGroupName is name of the resource group to which the resource belongs. name is website Name. slot is website +// Slot. func (client AppsClient) ListSnapshotsSlot(resourceGroupName string, name string, slot string) (result SnapshotCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -12870,14 +21126,782 @@ func (client AppsClient) ListSnapshotsSlotNextResults(lastResults SnapshotCollec return } -// ListUsages gets the quota usage information of an app (or deployment slot, -// if specified). +// ListSnapshotsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListSnapshotsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan Snapshot, <-chan error) { + resultChan := make(chan Snapshot) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSnapshotsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSnapshotsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListSyncFunctionTriggers this is to allow calling via powershell and ARM template. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. filter is return only information -// specified in the filter (using OData syntax). For example: -// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime -// eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +func (client AppsClient) ListSyncFunctionTriggers(resourceGroupName string, name string) (result FunctionSecrets, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListSyncFunctionTriggers") + } + + req, err := client.ListSyncFunctionTriggersPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", nil, "Failure preparing request") + return + } + + resp, err := client.ListSyncFunctionTriggersSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure sending request") + return + } + + result, err = client.ListSyncFunctionTriggersResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggers", resp, "Failure responding to request") + } + + return +} + +// ListSyncFunctionTriggersPreparer prepares the ListSyncFunctionTriggers request. +func (client AppsClient) ListSyncFunctionTriggersPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSyncFunctionTriggersSender sends the ListSyncFunctionTriggers request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSyncFunctionTriggersSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSyncFunctionTriggersResponder handles the response to the ListSyncFunctionTriggers request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSyncFunctionTriggersResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListSyncFunctionTriggersSlot this is to allow calling via powershell and ARM template. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. +func (client AppsClient) ListSyncFunctionTriggersSlot(resourceGroupName string, name string, slot string) (result FunctionSecrets, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot") + } + + req, err := client.ListSyncFunctionTriggersSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListSyncFunctionTriggersSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure sending request") + return + } + + result, err = client.ListSyncFunctionTriggersSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListSyncFunctionTriggersSlot", resp, "Failure responding to request") + } + + return +} + +// ListSyncFunctionTriggersSlotPreparer prepares the ListSyncFunctionTriggersSlot request. +func (client AppsClient) ListSyncFunctionTriggersSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListSyncFunctionTriggersSlotSender sends the ListSyncFunctionTriggersSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListSyncFunctionTriggersSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListSyncFunctionTriggersSlotResponder handles the response to the ListSyncFunctionTriggersSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListSyncFunctionTriggersSlotResponder(resp *http.Response) (result FunctionSecrets, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTriggeredWebJobHistory list a triggered web job's history for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) ListTriggeredWebJobHistory(resourceGroupName string, name string, webJobID string, webJobName string) (result TriggeredJobHistoryCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListTriggeredWebJobHistory") + } + + req, err := client.ListTriggeredWebJobHistoryPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", nil, "Failure preparing request") + return + } + + resp, err := client.ListTriggeredWebJobHistorySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure sending request") + return + } + + result, err = client.ListTriggeredWebJobHistoryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure responding to request") + } + + return +} + +// ListTriggeredWebJobHistoryPreparer prepares the ListTriggeredWebJobHistory request. +func (client AppsClient) ListTriggeredWebJobHistoryPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/history", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListTriggeredWebJobHistorySender sends the ListTriggeredWebJobHistory request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListTriggeredWebJobHistorySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListTriggeredWebJobHistoryResponder handles the response to the ListTriggeredWebJobHistory request. The method always +// closes the http.Response Body. +func (client AppsClient) ListTriggeredWebJobHistoryResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTriggeredWebJobHistoryNextResults retrieves the next set of results, if any. +func (client AppsClient) ListTriggeredWebJobHistoryNextResults(lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) { + req, err := lastResults.TriggeredJobHistoryCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListTriggeredWebJobHistorySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure sending next results request") + } + + result, err = client.ListTriggeredWebJobHistoryResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistory", resp, "Failure responding to next results request") + } + + return +} + +// ListTriggeredWebJobHistoryComplete gets all elements from the list without paging. +func (client AppsClient) ListTriggeredWebJobHistoryComplete(resourceGroupName string, name string, webJobID string, webJobName string, cancel <-chan struct{}) (<-chan TriggeredJobHistory, <-chan error) { + resultChan := make(chan TriggeredJobHistory) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListTriggeredWebJobHistory(resourceGroupName, name, webJobID, webJobName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListTriggeredWebJobHistoryNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListTriggeredWebJobHistorySlot list a triggered web job's history for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) ListTriggeredWebJobHistorySlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result TriggeredJobHistoryCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot") + } + + req, err := client.ListTriggeredWebJobHistorySlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListTriggeredWebJobHistorySlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure sending request") + return + } + + result, err = client.ListTriggeredWebJobHistorySlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure responding to request") + } + + return +} + +// ListTriggeredWebJobHistorySlotPreparer prepares the ListTriggeredWebJobHistorySlot request. +func (client AppsClient) ListTriggeredWebJobHistorySlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListTriggeredWebJobHistorySlotSender sends the ListTriggeredWebJobHistorySlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListTriggeredWebJobHistorySlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListTriggeredWebJobHistorySlotResponder handles the response to the ListTriggeredWebJobHistorySlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListTriggeredWebJobHistorySlotResponder(resp *http.Response) (result TriggeredJobHistoryCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTriggeredWebJobHistorySlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListTriggeredWebJobHistorySlotNextResults(lastResults TriggeredJobHistoryCollection) (result TriggeredJobHistoryCollection, err error) { + req, err := lastResults.TriggeredJobHistoryCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListTriggeredWebJobHistorySlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure sending next results request") + } + + result, err = client.ListTriggeredWebJobHistorySlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobHistorySlot", resp, "Failure responding to next results request") + } + + return +} + +// ListTriggeredWebJobHistorySlotComplete gets all elements from the list without paging. +func (client AppsClient) ListTriggeredWebJobHistorySlotComplete(resourceGroupName string, name string, webJobID string, slot string, webJobName string, cancel <-chan struct{}) (<-chan TriggeredJobHistory, <-chan error) { + resultChan := make(chan TriggeredJobHistory) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListTriggeredWebJobHistorySlot(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListTriggeredWebJobHistorySlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListTriggeredWebJobs list triggered web jobs for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. +func (client AppsClient) ListTriggeredWebJobs(resourceGroupName string, name string) (result TriggeredWebJobCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListTriggeredWebJobs") + } + + req, err := client.ListTriggeredWebJobsPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", nil, "Failure preparing request") + return + } + + resp, err := client.ListTriggeredWebJobsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure sending request") + return + } + + result, err = client.ListTriggeredWebJobsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure responding to request") + } + + return +} + +// ListTriggeredWebJobsPreparer prepares the ListTriggeredWebJobs request. +func (client AppsClient) ListTriggeredWebJobsPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListTriggeredWebJobsSender sends the ListTriggeredWebJobs request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListTriggeredWebJobsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListTriggeredWebJobsResponder handles the response to the ListTriggeredWebJobs request. The method always +// closes the http.Response Body. +func (client AppsClient) ListTriggeredWebJobsResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTriggeredWebJobsNextResults retrieves the next set of results, if any. +func (client AppsClient) ListTriggeredWebJobsNextResults(lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) { + req, err := lastResults.TriggeredWebJobCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListTriggeredWebJobsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure sending next results request") + } + + result, err = client.ListTriggeredWebJobsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobs", resp, "Failure responding to next results request") + } + + return +} + +// ListTriggeredWebJobsComplete gets all elements from the list without paging. +func (client AppsClient) ListTriggeredWebJobsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan TriggeredWebJob, <-chan error) { + resultChan := make(chan TriggeredWebJob) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListTriggeredWebJobs(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListTriggeredWebJobsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListTriggeredWebJobsSlot list triggered web jobs for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. slot is name of +// the deployment slot. If a slot is not specified, the API deletes a deployment for the production slot. +func (client AppsClient) ListTriggeredWebJobsSlot(resourceGroupName string, name string, slot string) (result TriggeredWebJobCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListTriggeredWebJobsSlot") + } + + req, err := client.ListTriggeredWebJobsSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListTriggeredWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListTriggeredWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure responding to request") + } + + return +} + +// ListTriggeredWebJobsSlotPreparer prepares the ListTriggeredWebJobsSlot request. +func (client AppsClient) ListTriggeredWebJobsSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListTriggeredWebJobsSlotSender sends the ListTriggeredWebJobsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListTriggeredWebJobsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListTriggeredWebJobsSlotResponder handles the response to the ListTriggeredWebJobsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListTriggeredWebJobsSlotResponder(resp *http.Response) (result TriggeredWebJobCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListTriggeredWebJobsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListTriggeredWebJobsSlotNextResults(lastResults TriggeredWebJobCollection) (result TriggeredWebJobCollection, err error) { + req, err := lastResults.TriggeredWebJobCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListTriggeredWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure sending next results request") + } + + result, err = client.ListTriggeredWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListTriggeredWebJobsSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListTriggeredWebJobsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListTriggeredWebJobsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan TriggeredWebJob, <-chan error) { + resultChan := make(chan TriggeredWebJob) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListTriggeredWebJobsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListTriggeredWebJobsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListUsages gets the quota usage information of an app (or deployment slot, if specified). +// +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. filter is +// return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq 'Metric1' +// or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and // timeGrain eq duration'[Hour|Minute|Day]'. func (client AppsClient) ListUsages(resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollection, err error) { if err := validation.Validate([]validation.Validation{ @@ -12976,16 +22000,58 @@ func (client AppsClient) ListUsagesNextResults(lastResults CsmUsageQuotaCollecti return } -// ListUsagesSlot gets the quota usage information of an app (or deployment -// slot, if specified). +// ListUsagesComplete gets all elements from the list without paging. +func (client AppsClient) ListUsagesComplete(resourceGroupName string, name string, filter string, cancel <-chan struct{}) (<-chan CsmUsageQuota, <-chan error) { + resultChan := make(chan CsmUsageQuota) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListUsages(resourceGroupName, name, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListUsagesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListUsagesSlot gets the quota usage information of an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get quota information of the production -// slot. filter is return only information specified in the filter (using OData -// syntax). For example: $filter=(name.value eq 'Metric1' or name.value eq -// 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq -// '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get quota information of the production slot. +// filter is return only information specified in the filter (using OData syntax). For example: $filter=(name.value eq +// 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' +// and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppsClient) ListUsagesSlot(resourceGroupName string, name string, slot string, filter string) (result CsmUsageQuotaCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13084,11 +22150,54 @@ func (client AppsClient) ListUsagesSlotNextResults(lastResults CsmUsageQuotaColl return } -// ListVnetConnections gets the virtual networks the app (or deployment slot) -// is connected to. +// ListUsagesSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListUsagesSlotComplete(resourceGroupName string, name string, slot string, filter string, cancel <-chan struct{}) (<-chan CsmUsageQuota, <-chan error) { + resultChan := make(chan CsmUsageQuota) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListUsagesSlot(resourceGroupName, name, slot, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListUsagesSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListVnetConnections gets the virtual networks the app (or deployment slot) is connected to. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ListVnetConnections(resourceGroupName string, name string) (result ListVnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13159,13 +22268,11 @@ func (client AppsClient) ListVnetConnectionsResponder(resp *http.Response) (resu return } -// ListVnetConnectionsSlot gets the virtual networks the app (or deployment -// slot) is connected to. +// ListVnetConnectionsSlot gets the virtual networks the app (or deployment slot) is connected to. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will get virtual network connections for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will get virtual network connections for the production +// slot. func (client AppsClient) ListVnetConnectionsSlot(resourceGroupName string, name string, slot string) (result ListVnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13237,14 +22344,298 @@ func (client AppsClient) ListVnetConnectionsSlotResponder(resp *http.Response) ( return } -// MigrateMySQL migrates a local (in-app) MySql database to a remote MySql -// database. This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel +// ListWebJobs list webjobs for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. +func (client AppsClient) ListWebJobs(resourceGroupName string, name string) (result JobCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListWebJobs") + } + + req, err := client.ListWebJobsPreparer(resourceGroupName, name) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", nil, "Failure preparing request") + return + } + + resp, err := client.ListWebJobsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure sending request") + return + } + + result, err = client.ListWebJobsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure responding to request") + } + + return +} + +// ListWebJobsPreparer prepares the ListWebJobs request. +func (client AppsClient) ListWebJobsPreparer(resourceGroupName string, name string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/webjobs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListWebJobsSender sends the ListWebJobs request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListWebJobsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListWebJobsResponder handles the response to the ListWebJobs request. The method always +// closes the http.Response Body. +func (client AppsClient) ListWebJobsResponder(resp *http.Response) (result JobCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListWebJobsNextResults retrieves the next set of results, if any. +func (client AppsClient) ListWebJobsNextResults(lastResults JobCollection) (result JobCollection, err error) { + req, err := lastResults.JobCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListWebJobsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure sending next results request") + } + + result, err = client.ListWebJobsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobs", resp, "Failure responding to next results request") + } + + return +} + +// ListWebJobsComplete gets all elements from the list without paging. +func (client AppsClient) ListWebJobsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Job, <-chan error) { + resultChan := make(chan Job) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebJobs(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebJobsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListWebJobsSlot list webjobs for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. slot is name of +// the deployment slot. If a slot is not specified, the API returns deployments for the production slot. +func (client AppsClient) ListWebJobsSlot(resourceGroupName string, name string, slot string) (result JobCollection, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "ListWebJobsSlot") + } + + req, err := client.ListWebJobsSlotPreparer(resourceGroupName, name, slot) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", nil, "Failure preparing request") + return + } + + resp, err := client.ListWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure sending request") + return + } + + result, err = client.ListWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure responding to request") + } + + return +} + +// ListWebJobsSlotPreparer prepares the ListWebJobsSlot request. +func (client AppsClient) ListWebJobsSlotPreparer(resourceGroupName string, name string, slot string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/webjobs", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListWebJobsSlotSender sends the ListWebJobsSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) ListWebJobsSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListWebJobsSlotResponder handles the response to the ListWebJobsSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) ListWebJobsSlotResponder(resp *http.Response) (result JobCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListWebJobsSlotNextResults retrieves the next set of results, if any. +func (client AppsClient) ListWebJobsSlotNextResults(lastResults JobCollection) (result JobCollection, err error) { + req, err := lastResults.JobCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListWebJobsSlotSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure sending next results request") + } + + result, err = client.ListWebJobsSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "ListWebJobsSlot", resp, "Failure responding to next results request") + } + + return +} + +// ListWebJobsSlotComplete gets all elements from the list without paging. +func (client AppsClient) ListWebJobsSlotComplete(resourceGroupName string, name string, slot string, cancel <-chan struct{}) (<-chan Job, <-chan error) { + resultChan := make(chan Job) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebJobsSlot(resourceGroupName, name, slot) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebJobsSlotNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// MigrateMySQL migrates a local (in-app) MySql database to a remote MySql database. This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app migrationRequestEnvelope is mySql migration -// options +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +// migrationRequestEnvelope is mySql migration options. func (client AppsClient) MigrateMySQL(resourceGroupName string, name string, migrationRequestEnvelope MigrateMySQLRequest, cancel <-chan struct{}) (<-chan Operation, <-chan error) { resultChan := make(chan Operation, 1) errChan := make(chan error, 1) @@ -13263,8 +22654,10 @@ func (client AppsClient) MigrateMySQL(resourceGroupName string, name string, mig var err error var result Operation defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -13333,13 +22726,11 @@ func (client AppsClient) MigrateMySQLResponder(resp *http.Response) (result Oper return } -// MigrateStorage restores a web app. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// MigrateStorage restores a web app. This method may poll for completion. Polling can be canceled by passing the +// cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// subscriptionName is azure subscription resourceGroupName is name of the -// resource group to which the resource belongs. name is name of web app -// migrationOptions is migration migrationOptions +// subscriptionName is azure subscription. resourceGroupName is name of the resource group to which the resource +// belongs. name is name of web app. migrationOptions is migration migrationOptions. func (client AppsClient) MigrateStorage(subscriptionName string, resourceGroupName string, name string, migrationOptions StorageMigrationOptions, cancel <-chan struct{}) (<-chan StorageMigrationResponse, <-chan error) { resultChan := make(chan StorageMigrationResponse, 1) errChan := make(chan error, 1) @@ -13358,8 +22749,10 @@ func (client AppsClient) MigrateStorage(subscriptionName string, resourceGroupNa var err error var result StorageMigrationResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -13429,16 +22822,14 @@ func (client AppsClient) MigrateStorageResponder(resp *http.Response) (result St return } -// Recover recovers a deleted web app. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// Recover recovers a web app to a previous snapshot. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app recoveryEntity is snapshot data used for -// web app recovery. Snapshot information can be obtained by calling +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +// recoveryEntity is snapshot data used for web app recovery. Snapshot information can be obtained by calling // GetDeletedSites or GetSiteSnapshots API. -func (client AppsClient) Recover(resourceGroupName string, name string, recoveryEntity CsmSiteRecoveryEntity, cancel <-chan struct{}) (<-chan RecoverResponse, <-chan error) { - resultChan := make(chan RecoverResponse, 1) +func (client AppsClient) Recover(resourceGroupName string, name string, recoveryEntity SnapshotRecoveryRequest, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13453,10 +22844,12 @@ func (client AppsClient) Recover(resourceGroupName string, name string, recovery go func() { var err error - var result RecoverResponse + var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -13468,7 +22861,7 @@ func (client AppsClient) Recover(resourceGroupName string, name string, recovery resp, err := client.RecoverSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} + result.Response = resp err = autorest.NewErrorWithError(err, "web.AppsClient", "Recover", resp, "Failure sending request") return } @@ -13482,7 +22875,7 @@ func (client AppsClient) Recover(resourceGroupName string, name string, recovery } // RecoverPreparer prepares the Recover request. -func (client AppsClient) RecoverPreparer(resourceGroupName string, name string, recoveryEntity CsmSiteRecoveryEntity, cancel <-chan struct{}) (*http.Request, error) { +func (client AppsClient) RecoverPreparer(resourceGroupName string, name string, recoveryEntity SnapshotRecoveryRequest, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -13514,23 +22907,20 @@ func (client AppsClient) RecoverSender(req *http.Request) (*http.Response, error // RecoverResponder handles the response to the Recover request. The method always // closes the http.Response Body. -func (client AppsClient) RecoverResponder(resp *http.Response) (result RecoverResponse, err error) { +func (client AppsClient) RecoverResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// RecoverSiteConfigurationSnapshot reverts the configuration of an app to a -// previous snapshot. +// RecoverSiteConfigurationSnapshot reverts the configuration of an app to a previous snapshot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. snapshotID is the ID of the snapshot to -// read. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. snapshotID +// is the ID of the snapshot to read. func (client AppsClient) RecoverSiteConfigurationSnapshot(resourceGroupName string, name string, snapshotID string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13601,13 +22991,11 @@ func (client AppsClient) RecoverSiteConfigurationSnapshotResponder(resp *http.Re return } -// RecoverSiteConfigurationSnapshotSlot reverts the configuration of an app to -// a previous snapshot. +// RecoverSiteConfigurationSnapshotSlot reverts the configuration of an app to a previous snapshot. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. snapshotID is the ID of the snapshot to -// read. slot is name of the deployment slot. If a slot is not specified, the -// API will return configuration for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. snapshotID +// is the ID of the snapshot to read. slot is name of the deployment slot. If a slot is not specified, the API will +// return configuration for the production slot. func (client AppsClient) RecoverSiteConfigurationSnapshotSlot(resourceGroupName string, name string, snapshotID string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13679,17 +23067,16 @@ func (client AppsClient) RecoverSiteConfigurationSnapshotSlotResponder(resp *htt return } -// RecoverSlot recovers a deleted web app. This method may poll for completion. -// Polling can be canceled by passing the cancel channel argument. The channel -// will be used to cancel polling and any outstanding HTTP requests. +// RecoverSlot recovers a web app to a previous snapshot. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app recoveryEntity is snapshot data used for -// web app recovery. Snapshot information can be obtained by calling -// GetDeletedSites or GetSiteSnapshots API. slot is name of web app slot. If -// not specified then will default to production slot. -func (client AppsClient) RecoverSlot(resourceGroupName string, name string, recoveryEntity CsmSiteRecoveryEntity, slot string, cancel <-chan struct{}) (<-chan RecoverResponse, <-chan error) { - resultChan := make(chan RecoverResponse, 1) +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +// recoveryEntity is snapshot data used for web app recovery. Snapshot information can be obtained by calling +// GetDeletedSites or GetSiteSnapshots API. slot is name of web app slot. If not specified then will default to +// production slot. +func (client AppsClient) RecoverSlot(resourceGroupName string, name string, recoveryEntity SnapshotRecoveryRequest, slot string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { + resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13704,10 +23091,12 @@ func (client AppsClient) RecoverSlot(resourceGroupName string, name string, reco go func() { var err error - var result RecoverResponse + var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -13719,7 +23108,7 @@ func (client AppsClient) RecoverSlot(resourceGroupName string, name string, reco resp, err := client.RecoverSlotSender(req) if err != nil { - result.Response = autorest.Response{Response: resp} + result.Response = resp err = autorest.NewErrorWithError(err, "web.AppsClient", "RecoverSlot", resp, "Failure sending request") return } @@ -13733,7 +23122,7 @@ func (client AppsClient) RecoverSlot(resourceGroupName string, name string, reco } // RecoverSlotPreparer prepares the RecoverSlot request. -func (client AppsClient) RecoverSlotPreparer(resourceGroupName string, name string, recoveryEntity CsmSiteRecoveryEntity, slot string, cancel <-chan struct{}) (*http.Request, error) { +func (client AppsClient) RecoverSlotPreparer(resourceGroupName string, name string, recoveryEntity SnapshotRecoveryRequest, slot string, cancel <-chan struct{}) (*http.Request, error) { pathParameters := map[string]interface{}{ "name": autorest.Encode("path", name), "resourceGroupName": autorest.Encode("path", resourceGroupName), @@ -13766,22 +23155,20 @@ func (client AppsClient) RecoverSlotSender(req *http.Request) (*http.Response, e // RecoverSlotResponder handles the response to the RecoverSlot request. The method always // closes the http.Response Body. -func (client AppsClient) RecoverSlotResponder(resp *http.Response) (result RecoverResponse, err error) { +func (client AppsClient) RecoverSlotResponder(resp *http.Response) (result autorest.Response, err error) { err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} + result.Response = resp return } -// ResetProductionSlotConfig resets the configuration settings of the current -// slot if they were previously modified by calling the API with POST. +// ResetProductionSlotConfig resets the configuration settings of the current slot if they were previously modified by +// calling the API with POST. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) ResetProductionSlotConfig(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13851,13 +23238,11 @@ func (client AppsClient) ResetProductionSlotConfigResponder(resp *http.Response) return } -// ResetSlotConfigurationSlot resets the configuration settings of the current -// slot if they were previously modified by calling the API with POST. +// ResetSlotConfigurationSlot resets the configuration settings of the current slot if they were previously modified by +// calling the API with POST. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API resets configuration settings for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API resets configuration settings for the production slot. func (client AppsClient) ResetSlotConfigurationSlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -13930,12 +23315,10 @@ func (client AppsClient) ResetSlotConfigurationSlotResponder(resp *http.Response // Restart restarts an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. softRestart is specify true to apply the -// configuration settings and restarts the app only if necessary. By default, -// the API always restarts and reprovisions the app. synchronous is specify -// true to block until the app is restarted. By default, it is set to false, -// and the API responds immediately (asynchronous). +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. softRestart +// is specify true to apply the configuration settings and restarts the app only if necessary. By default, the API +// always restarts and reprovisions the app. synchronous is specify true to block until the app is restarted. By +// default, it is set to false, and the API responds immediately (asynchronous). func (client AppsClient) Restart(resourceGroupName string, name string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14013,14 +23396,11 @@ func (client AppsClient) RestartResponder(resp *http.Response) (result autorest. // RestartSlot restarts an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will restart the production slot. softRestart -// is specify true to apply the configuration settings and restarts the app -// only if necessary. By default, the API always restarts and reprovisions the -// app. synchronous is specify true to block until the app is restarted. By -// default, it is set to false, and the API responds immediately -// (asynchronous). +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will restart the production slot. softRestart is specify +// true to apply the configuration settings and restarts the app only if necessary. By default, the API always restarts +// and reprovisions the app. synchronous is specify true to block until the app is restarted. By default, it is set to +// false, and the API responds immediately (asynchronous). func (client AppsClient) RestartSlot(resourceGroupName string, name string, slot string, softRestart *bool, synchronous *bool) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14097,14 +23477,12 @@ func (client AppsClient) RestartSlotResponder(resp *http.Response) (result autor return } -// Restore restores a specific backup to another app (or deployment slot, if -// specified). This method may poll for completion. Polling can be canceled by -// passing the cancel channel argument. The channel will be used to cancel +// Restore restores a specific backup to another app (or deployment slot, if specified). This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. backupID is iD of the backup. request is -// information on restore request +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. backupID is +// ID of the backup. request is information on restore request . func (client AppsClient) Restore(resourceGroupName string, name string, backupID string, request RestoreRequest, cancel <-chan struct{}) (<-chan RestoreResponse, <-chan error) { resultChan := make(chan RestoreResponse, 1) errChan := make(chan error, 1) @@ -14123,8 +23501,10 @@ func (client AppsClient) Restore(resourceGroupName string, name string, backupID var err error var result RestoreResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -14194,15 +23574,13 @@ func (client AppsClient) RestoreResponder(resp *http.Response) (result RestoreRe return } -// RestoreSlot restores a specific backup to another app (or deployment slot, -// if specified). This method may poll for completion. Polling can be canceled -// by passing the cancel channel argument. The channel will be used to cancel +// RestoreSlot restores a specific backup to another app (or deployment slot, if specified). This method may poll for +// completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to cancel // polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. backupID is iD of the backup. request is -// information on restore request slot is name of the deployment slot. If a -// slot is not specified, the API will restore a backup of the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. backupID is +// ID of the backup. request is information on restore request . slot is name of the deployment slot. If a slot is not +// specified, the API will restore a backup of the production slot. func (client AppsClient) RestoreSlot(resourceGroupName string, name string, backupID string, request RestoreRequest, slot string, cancel <-chan struct{}) (<-chan RestoreResponse, <-chan error) { resultChan := make(chan RestoreResponse, 1) errChan := make(chan error, 1) @@ -14221,8 +23599,10 @@ func (client AppsClient) RestoreSlot(resourceGroupName string, name string, back var err error var result RestoreResponse defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -14293,10 +23673,161 @@ func (client AppsClient) RestoreSlotResponder(resp *http.Response) (result Resto return } +// RunTriggeredWebJob run a triggered web job for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) RunTriggeredWebJob(resourceGroupName string, name string, webJobID string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "RunTriggeredWebJob") + } + + req, err := client.RunTriggeredWebJobPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.RunTriggeredWebJobSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure sending request") + return + } + + result, err = client.RunTriggeredWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJob", resp, "Failure responding to request") + } + + return +} + +// RunTriggeredWebJobPreparer prepares the RunTriggeredWebJob request. +func (client AppsClient) RunTriggeredWebJobPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/triggeredwebjobs/{webJobName}/run", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RunTriggeredWebJobSender sends the RunTriggeredWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) RunTriggeredWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RunTriggeredWebJobResponder handles the response to the RunTriggeredWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) RunTriggeredWebJobResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// RunTriggeredWebJobSlot run a triggered web job for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) RunTriggeredWebJobSlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "RunTriggeredWebJobSlot") + } + + req, err := client.RunTriggeredWebJobSlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.RunTriggeredWebJobSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.RunTriggeredWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "RunTriggeredWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// RunTriggeredWebJobSlotPreparer prepares the RunTriggeredWebJobSlot request. +func (client AppsClient) RunTriggeredWebJobSlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RunTriggeredWebJobSlotSender sends the RunTriggeredWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) RunTriggeredWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RunTriggeredWebJobSlotResponder handles the response to the RunTriggeredWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) RunTriggeredWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + // Start starts an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) Start(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14366,11 +23897,162 @@ func (client AppsClient) StartResponder(resp *http.Response) (result autorest.Re return } +// StartContinuousWebJob start a continuous web job for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) StartContinuousWebJob(resourceGroupName string, name string, webJobID string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "StartContinuousWebJob") + } + + req, err := client.StartContinuousWebJobPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.StartContinuousWebJobSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure sending request") + return + } + + result, err = client.StartContinuousWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJob", resp, "Failure responding to request") + } + + return +} + +// StartContinuousWebJobPreparer prepares the StartContinuousWebJob request. +func (client AppsClient) StartContinuousWebJobPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// StartContinuousWebJobSender sends the StartContinuousWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) StartContinuousWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// StartContinuousWebJobResponder handles the response to the StartContinuousWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) StartContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// StartContinuousWebJobSlot start a continuous web job for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) StartContinuousWebJobSlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "StartContinuousWebJobSlot") + } + + req, err := client.StartContinuousWebJobSlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.StartContinuousWebJobSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.StartContinuousWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StartContinuousWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// StartContinuousWebJobSlotPreparer prepares the StartContinuousWebJobSlot request. +func (client AppsClient) StartContinuousWebJobSlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// StartContinuousWebJobSlotSender sends the StartContinuousWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) StartContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// StartContinuousWebJobSlotResponder handles the response to the StartContinuousWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) StartContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + // StartSlot starts an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will start the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will start the production slot. func (client AppsClient) StartSlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14443,10 +24125,9 @@ func (client AppsClient) StartSlotResponder(resp *http.Response) (result autores // StartWebSiteNetworkTrace start capturing network packets for the site. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app. durationInSeconds is the duration -// to keep capturing in seconds. maxFrameLength is the maximum frame length in -// bytes (Optional). sasURL is the Blob URL to store capture file. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// durationInSeconds is the duration to keep capturing in seconds. maxFrameLength is the maximum frame length in bytes +// (Optional). sasURL is the Blob URL to store capture file. func (client AppsClient) StartWebSiteNetworkTrace(resourceGroupName string, name string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14528,11 +24209,9 @@ func (client AppsClient) StartWebSiteNetworkTraceResponder(resp *http.Response) // StartWebSiteNetworkTraceSlot start capturing network packets for the site. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app. slot is the name of the slot for -// this web app. durationInSeconds is the duration to keep capturing in -// seconds. maxFrameLength is the maximum frame length in bytes (Optional). -// sasURL is the Blob URL to store capture file. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. slot +// is the name of the slot for this web app. durationInSeconds is the duration to keep capturing in seconds. +// maxFrameLength is the maximum frame length in bytes (Optional). sasURL is the Blob URL to store capture file. func (client AppsClient) StartWebSiteNetworkTraceSlot(resourceGroupName string, name string, slot string, durationInSeconds *int32, maxFrameLength *int32, sasURL string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14615,8 +24294,7 @@ func (client AppsClient) StartWebSiteNetworkTraceSlotResponder(resp *http.Respon // Stop stops an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) Stop(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14686,11 +24364,162 @@ func (client AppsClient) StopResponder(resp *http.Response) (result autorest.Res return } +// StopContinuousWebJob stop a continuous web job for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. +func (client AppsClient) StopContinuousWebJob(resourceGroupName string, name string, webJobID string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "StopContinuousWebJob") + } + + req, err := client.StopContinuousWebJobPreparer(resourceGroupName, name, webJobID, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", nil, "Failure preparing request") + return + } + + resp, err := client.StopContinuousWebJobSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure sending request") + return + } + + result, err = client.StopContinuousWebJobResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJob", resp, "Failure responding to request") + } + + return +} + +// StopContinuousWebJobPreparer prepares the StopContinuousWebJob request. +func (client AppsClient) StopContinuousWebJobPreparer(resourceGroupName string, name string, webJobID string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/continuouswebjobs/{webJobName}/stop", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// StopContinuousWebJobSender sends the StopContinuousWebJob request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) StopContinuousWebJobSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// StopContinuousWebJobResponder handles the response to the StopContinuousWebJob request. The method always +// closes the http.Response Body. +func (client AppsClient) StopContinuousWebJobResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + +// StopContinuousWebJobSlot stop a continuous web job for an app, or a deployment slot. +// +// resourceGroupName is name of the resource group to which the resource belongs. name is site name. webJobID is web +// job ID. slot is name of the deployment slot. If a slot is not specified, the API deletes a deployment for the +// production slot. +func (client AppsClient) StopContinuousWebJobSlot(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: resourceGroupName, + Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, + {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "StopContinuousWebJobSlot") + } + + req, err := client.StopContinuousWebJobSlotPreparer(resourceGroupName, name, webJobID, slot, webJobName) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", nil, "Failure preparing request") + return + } + + resp, err := client.StopContinuousWebJobSlotSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure sending request") + return + } + + result, err = client.StopContinuousWebJobSlotResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.AppsClient", "StopContinuousWebJobSlot", resp, "Failure responding to request") + } + + return +} + +// StopContinuousWebJobSlotPreparer prepares the StopContinuousWebJobSlot request. +func (client AppsClient) StopContinuousWebJobSlotPreparer(resourceGroupName string, name string, webJobID string, slot string, webJobName string) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "name": autorest.Encode("path", name), + "resourceGroupName": autorest.Encode("path", resourceGroupName), + "slot": autorest.Encode("path", slot), + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + "webJobName": autorest.Encode("path", webJobName), + } + + const APIVersion = "2016-08-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + "webJobId": autorest.Encode("query", webJobID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// StopContinuousWebJobSlotSender sends the StopContinuousWebJobSlot request. The method will close the +// http.Response Body if it receives an error. +func (client AppsClient) StopContinuousWebJobSlotSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// StopContinuousWebJobSlotResponder handles the response to the StopContinuousWebJobSlot request. The method always +// closes the http.Response Body. +func (client AppsClient) StopContinuousWebJobSlotResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNotFound), + autorest.ByClosing()) + result.Response = resp + return +} + // StopSlot stops an app (or deployment slot, if specified). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will stop the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will stop the production slot. func (client AppsClient) StopSlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14763,8 +24592,7 @@ func (client AppsClient) StopSlotResponder(resp *http.Response) (result autorest // StopWebSiteNetworkTrace stop ongoing capturing network packets for the site. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. func (client AppsClient) StopWebSiteNetworkTrace(resourceGroupName string, name string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14835,12 +24663,10 @@ func (client AppsClient) StopWebSiteNetworkTraceResponder(resp *http.Response) ( return } -// StopWebSiteNetworkTraceSlot stop ongoing capturing network packets for the -// site. +// StopWebSiteNetworkTraceSlot stop ongoing capturing network packets for the site. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app. slot is the name of the slot for -// this web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. slot +// is the name of the slot for this web app. func (client AppsClient) StopWebSiteNetworkTraceSlot(resourceGroupName string, name string, slot string) (result String, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -14912,15 +24738,12 @@ func (client AppsClient) StopWebSiteNetworkTraceSlotResponder(resp *http.Respons return } -// SwapSlotSlot swaps two deployment slots of an app. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// SwapSlotSlot swaps two deployment slots of an app. This method may poll for completion. Polling can be canceled by +// passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slotSwapEntity is jSON object that -// contains the target slot name. See example. slot is name of the source slot. -// If a slot is not specified, the production slot is used as the source slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// slotSwapEntity is JSON object that contains the target slot name. See example. slot is name of the source slot. If a +// slot is not specified, the production slot is used as the source slot. func (client AppsClient) SwapSlotSlot(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, slot string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -14942,8 +24765,10 @@ func (client AppsClient) SwapSlotSlot(resourceGroupName string, name string, slo var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -15012,14 +24837,12 @@ func (client AppsClient) SwapSlotSlotResponder(resp *http.Response) (result auto return } -// SwapSlotWithProduction swaps two deployment slots of an app. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// SwapSlotWithProduction swaps two deployment slots of an app. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slotSwapEntity is jSON object that -// contains the target slot name. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// slotSwapEntity is JSON object that contains the target slot name. See example. func (client AppsClient) SwapSlotWithProduction(resourceGroupName string, name string, slotSwapEntity CsmSlotEntity, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) errChan := make(chan error, 1) @@ -15041,8 +24864,10 @@ func (client AppsClient) SwapSlotWithProduction(resourceGroupName string, name s var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -15112,8 +24937,7 @@ func (client AppsClient) SwapSlotWithProductionResponder(resp *http.Response) (r // SyncFunctionTriggers syncs function trigger metadata to the scale controller // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. func (client AppsClient) SyncFunctionTriggers(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15183,12 +25007,10 @@ func (client AppsClient) SyncFunctionTriggersResponder(resp *http.Response) (res return } -// SyncFunctionTriggersSlot syncs function trigger metadata to the scale -// controller +// SyncFunctionTriggersSlot syncs function trigger metadata to the scale controller // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slot is name of the deployment slot. If a -// slot is not specified, the API will restore a backup of the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. slot is name +// of the deployment slot. If a slot is not specified, the API will restore a backup of the production slot. func (client AppsClient) SyncFunctionTriggersSlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15261,8 +25083,7 @@ func (client AppsClient) SyncFunctionTriggersSlotResponder(resp *http.Response) // SyncRepository sync web app repository. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. func (client AppsClient) SyncRepository(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15326,7 +25147,7 @@ func (client AppsClient) SyncRepositoryResponder(resp *http.Response) (result au err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return @@ -15334,9 +25155,8 @@ func (client AppsClient) SyncRepositoryResponder(resp *http.Response) (result au // SyncRepositorySlot sync web app repository. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app slot is name of web app slot. If not -// specified then will default to production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. slot is name +// of web app slot. If not specified then will default to production slot. func (client AppsClient) SyncRepositorySlot(resourceGroupName string, name string, slot string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15401,7 +25221,7 @@ func (client AppsClient) SyncRepositorySlotResponder(resp *http.Response) (resul err = autorest.Respond( resp, client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + azure.WithErrorUnlessStatusCode(http.StatusOK), autorest.ByClosing()) result.Response = resp return @@ -15409,9 +25229,8 @@ func (client AppsClient) SyncRepositorySlotResponder(resp *http.Response) (resul // UpdateApplicationSettings replaces the application settings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. appSettings is application settings of the -// app. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. appSettings +// is application settings of the app. func (client AppsClient) UpdateApplicationSettings(resourceGroupName string, name string, appSettings StringDictionary) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15486,10 +25305,9 @@ func (client AppsClient) UpdateApplicationSettingsResponder(resp *http.Response) // UpdateApplicationSettingsSlot replaces the application settings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. appSettings is application settings of the -// app. slot is name of the deployment slot. If a slot is not specified, the -// API will update the application settings for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. appSettings +// is application settings of the app. slot is name of the deployment slot. If a slot is not specified, the API will +// update the application settings for the production slot. func (client AppsClient) UpdateApplicationSettingsSlot(resourceGroupName string, name string, appSettings StringDictionary, slot string) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15563,12 +25381,10 @@ func (client AppsClient) UpdateApplicationSettingsSlotResponder(resp *http.Respo return } -// UpdateAuthSettings updates the Authentication / Authorization settings -// associated with web app. +// UpdateAuthSettings updates the Authentication / Authorization settings associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app siteAuthSettings is auth settings -// associated with web app +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +// siteAuthSettings is auth settings associated with web app. func (client AppsClient) UpdateAuthSettings(resourceGroupName string, name string, siteAuthSettings SiteAuthSettings) (result SiteAuthSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15641,13 +25457,11 @@ func (client AppsClient) UpdateAuthSettingsResponder(resp *http.Response) (resul return } -// UpdateAuthSettingsSlot updates the Authentication / Authorization settings -// associated with web app. +// UpdateAuthSettingsSlot updates the Authentication / Authorization settings associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app siteAuthSettings is auth settings -// associated with web app slot is name of web app slot. If not specified then -// will default to production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. +// siteAuthSettings is auth settings associated with web app. slot is name of web app slot. If not specified then will +// default to production slot. func (client AppsClient) UpdateAuthSettingsSlot(resourceGroupName string, name string, siteAuthSettings SiteAuthSettings, slot string) (result SiteAuthSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15723,8 +25537,8 @@ func (client AppsClient) UpdateAuthSettingsSlotResponder(resp *http.Response) (r // UpdateBackupConfiguration updates the backup configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. request is edited backup configuration. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. request is +// edited backup configuration. func (client AppsClient) UpdateBackupConfiguration(resourceGroupName string, name string, request BackupRequest) (result BackupRequest, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15807,10 +25621,9 @@ func (client AppsClient) UpdateBackupConfigurationResponder(resp *http.Response) // UpdateBackupConfigurationSlot updates the backup configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. request is edited backup configuration. -// slot is name of the deployment slot. If a slot is not specified, the API -// will update the backup configuration for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. request is +// edited backup configuration. slot is name of the deployment slot. If a slot is not specified, the API will update +// the backup configuration for the production slot. func (client AppsClient) UpdateBackupConfigurationSlot(resourceGroupName string, name string, request BackupRequest, slot string) (result BackupRequest, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15894,9 +25707,8 @@ func (client AppsClient) UpdateBackupConfigurationSlotResponder(resp *http.Respo // UpdateConfiguration updates the configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteConfig is jSON representation of a -// SiteConfig object. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. siteConfig +// is JSON representation of a SiteConfig object. See example. func (client AppsClient) UpdateConfiguration(resourceGroupName string, name string, siteConfig SiteConfigResource) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -15971,11 +25783,9 @@ func (client AppsClient) UpdateConfigurationResponder(resp *http.Response) (resu // UpdateConfigurationSlot updates the configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteConfig is jSON representation of a -// SiteConfig object. See example. slot is name of the deployment slot. If a -// slot is not specified, the API will update configuration for the production -// slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. siteConfig +// is JSON representation of a SiteConfig object. See example. slot is name of the deployment slot. If a slot is not +// specified, the API will update configuration for the production slot. func (client AppsClient) UpdateConfigurationSlot(resourceGroupName string, name string, siteConfig SiteConfigResource, slot string) (result SiteConfigResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16051,9 +25861,8 @@ func (client AppsClient) UpdateConfigurationSlotResponder(resp *http.Response) ( // UpdateConnectionStrings replaces the connection strings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. connectionStrings is connection strings of -// the app or deployment slot. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// connectionStrings is connection strings of the app or deployment slot. See example. func (client AppsClient) UpdateConnectionStrings(resourceGroupName string, name string, connectionStrings ConnectionStringDictionary) (result ConnectionStringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16128,11 +25937,9 @@ func (client AppsClient) UpdateConnectionStringsResponder(resp *http.Response) ( // UpdateConnectionStringsSlot replaces the connection strings of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. connectionStrings is connection strings of -// the app or deployment slot. See example. slot is name of the deployment -// slot. If a slot is not specified, the API will update the connection -// settings for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// connectionStrings is connection strings of the app or deployment slot. See example. slot is name of the deployment +// slot. If a slot is not specified, the API will update the connection settings for the production slot. func (client AppsClient) UpdateConnectionStringsSlot(resourceGroupName string, name string, connectionStrings ConnectionStringDictionary, slot string) (result ConnectionStringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16208,9 +26015,8 @@ func (client AppsClient) UpdateConnectionStringsSlotResponder(resp *http.Respons // UpdateDiagnosticLogsConfig updates the logging configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteLogsConfig is a SiteLogsConfig JSON -// object that contains the logging configuration to change in the "properties" +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// siteLogsConfig is a SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" // property. func (client AppsClient) UpdateDiagnosticLogsConfig(resourceGroupName string, name string, siteLogsConfig SiteLogsConfig) (result SiteLogsConfig, err error) { if err := validation.Validate([]validation.Validation{ @@ -16301,11 +26107,10 @@ func (client AppsClient) UpdateDiagnosticLogsConfigResponder(resp *http.Response // UpdateDiagnosticLogsConfigSlot updates the logging configuration of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. siteLogsConfig is a SiteLogsConfig JSON -// object that contains the logging configuration to change in the "properties" -// property. slot is name of the deployment slot. If a slot is not specified, -// the API will update the logging configuration for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// siteLogsConfig is a SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" +// property. slot is name of the deployment slot. If a slot is not specified, the API will update the logging +// configuration for the production slot. func (client AppsClient) UpdateDiagnosticLogsConfigSlot(resourceGroupName string, name string, siteLogsConfig SiteLogsConfig, slot string) (result SiteLogsConfig, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16394,12 +26199,11 @@ func (client AppsClient) UpdateDiagnosticLogsConfigSlotResponder(resp *http.Resp return } -// UpdateDomainOwnershipIdentifier creates a domain ownership identifier for -// web app, or updates an existing ownership identifier. +// UpdateDomainOwnershipIdentifier creates a domain ownership identifier for web app, or updates an existing ownership +// identifier. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. domainOwnershipIdentifier is a JSON +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. domainOwnershipIdentifier is a JSON // representation of the domain ownership properties. func (client AppsClient) UpdateDomainOwnershipIdentifier(resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier) (result Identifier, err error) { if err := validation.Validate([]validation.Validation{ @@ -16474,15 +26278,13 @@ func (client AppsClient) UpdateDomainOwnershipIdentifierResponder(resp *http.Res return } -// UpdateDomainOwnershipIdentifierSlot creates a domain ownership identifier -// for web app, or updates an existing ownership identifier. +// UpdateDomainOwnershipIdentifierSlot creates a domain ownership identifier for web app, or updates an existing +// ownership identifier. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. domainOwnershipIdentifierName is name of -// domain ownership identifier. domainOwnershipIdentifier is a JSON -// representation of the domain ownership properties. slot is name of the -// deployment slot. If a slot is not specified, the API will delete the binding -// for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// domainOwnershipIdentifierName is name of domain ownership identifier. domainOwnershipIdentifier is a JSON +// representation of the domain ownership properties. slot is name of the deployment slot. If a slot is not specified, +// the API will delete the binding for the production slot. func (client AppsClient) UpdateDomainOwnershipIdentifierSlot(resourceGroupName string, name string, domainOwnershipIdentifierName string, domainOwnershipIdentifier Identifier, slot string) (result Identifier, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16557,13 +26359,11 @@ func (client AppsClient) UpdateDomainOwnershipIdentifierSlotResponder(resp *http return } -// UpdateHybridConnection creates a new Hybrid Connection using a Service Bus -// relay. +// UpdateHybridConnection creates a new Hybrid Connection using a Service Bus relay. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection connectionEnvelope is the details of the hybrid connection +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. +// connectionEnvelope is the details of the hybrid connection. func (client AppsClient) UpdateHybridConnection(resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16638,14 +26438,11 @@ func (client AppsClient) UpdateHybridConnectionResponder(resp *http.Response) (r return } -// UpdateHybridConnectionSlot creates a new Hybrid Connection using a Service -// Bus relay. +// UpdateHybridConnectionSlot creates a new Hybrid Connection using a Service Bus relay. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is the name of the web app namespaceName is the namespace for -// this hybrid connection relayName is the relay name for this hybrid -// connection connectionEnvelope is the details of the hybrid connection slot -// is the name of the slot for the web app. +// resourceGroupName is name of the resource group to which the resource belongs. name is the name of the web app. +// namespaceName is the namespace for this hybrid connection. relayName is the relay name for this hybrid connection. +// connectionEnvelope is the details of the hybrid connection. slot is the name of the slot for the web app. func (client AppsClient) UpdateHybridConnectionSlot(resourceGroupName string, name string, namespaceName string, relayName string, connectionEnvelope HybridConnection, slot string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16723,9 +26520,8 @@ func (client AppsClient) UpdateHybridConnectionSlotResponder(resp *http.Response // UpdateMetadata replaces the metadata of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. metadata is edited metadata of the app or -// deployment slot. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. metadata is +// edited metadata of the app or deployment slot. See example. func (client AppsClient) UpdateMetadata(resourceGroupName string, name string, metadata StringDictionary) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16800,10 +26596,9 @@ func (client AppsClient) UpdateMetadataResponder(resp *http.Response) (result St // UpdateMetadataSlot replaces the metadata of an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. metadata is edited metadata of the app or -// deployment slot. See example. slot is name of the deployment slot. If a slot -// is not specified, the API will update the metadata for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. metadata is +// edited metadata of the app or deployment slot. See example. slot is name of the deployment slot. If a slot is not +// specified, the API will update the metadata for the production slot. func (client AppsClient) UpdateMetadataSlot(resourceGroupName string, name string, metadata StringDictionary, slot string) (result StringDictionary, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16877,13 +26672,12 @@ func (client AppsClient) UpdateMetadataSlotResponder(resp *http.Response) (resul return } -// UpdateRelayServiceConnection creates a new hybrid connection configuration -// (PUT), or updates an existing one (PATCH). +// UpdateRelayServiceConnection creates a new hybrid connection configuration (PUT), or updates an existing one +// (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection configuration. connectionEnvelope is details of the hybrid -// connection configuration. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection configuration. connectionEnvelope is details of the hybrid connection +// configuration. func (client AppsClient) UpdateRelayServiceConnection(resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -16957,15 +26751,13 @@ func (client AppsClient) UpdateRelayServiceConnectionResponder(resp *http.Respon return } -// UpdateRelayServiceConnectionSlot creates a new hybrid connection -// configuration (PUT), or updates an existing one (PATCH). +// UpdateRelayServiceConnectionSlot creates a new hybrid connection configuration (PUT), or updates an existing one +// (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. entityName is name of the hybrid -// connection configuration. connectionEnvelope is details of the hybrid -// connection configuration. slot is name of the deployment slot. If a slot is -// not specified, the API will create or update a hybrid connection for the -// production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. entityName +// is name of the hybrid connection configuration. connectionEnvelope is details of the hybrid connection +// configuration. slot is name of the deployment slot. If a slot is not specified, the API will create or update a +// hybrid connection for the production slot. func (client AppsClient) UpdateRelayServiceConnectionSlot(resourceGroupName string, name string, entityName string, connectionEnvelope RelayServiceConnectionEntity, slot string) (result RelayServiceConnectionEntity, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -17042,17 +26834,14 @@ func (client AppsClient) UpdateRelayServiceConnectionSlotResponder(resp *http.Re // UpdateSitePushSettings updates the Push settings associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app pushSettings is push settings associated -// with web app +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. pushSettings +// is push settings associated with web app. func (client AppsClient) UpdateSitePushSettings(resourceGroupName string, name string, pushSettings PushSettings) (result PushSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, - {TargetValue: pushSettings, - Constraints: []validation.Constraint{{Target: "pushSettings.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "UpdateSitePushSettings") } @@ -17119,21 +26908,17 @@ func (client AppsClient) UpdateSitePushSettingsResponder(resp *http.Response) (r return } -// UpdateSitePushSettingsSlot updates the Push settings associated with web -// app. +// UpdateSitePushSettingsSlot updates the Push settings associated with web app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of web app pushSettings is push settings associated -// with web app slot is name of web app slot. If not specified then will -// default to production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of web app. pushSettings +// is push settings associated with web app. slot is name of web app slot. If not specified then will default to +// production slot. func (client AppsClient) UpdateSitePushSettingsSlot(resourceGroupName string, name string, pushSettings PushSettings, slot string) (result PushSettings, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}, - {TargetValue: pushSettings, - Constraints: []validation.Constraint{{Target: "pushSettings.IsPushEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "web.AppsClient", "UpdateSitePushSettingsSlot") } @@ -17201,12 +26986,11 @@ func (client AppsClient) UpdateSitePushSettingsSlotResponder(resp *http.Response return } -// UpdateSlotConfigurationNames updates the names of application settings and -// connection string that remain with the slot during swap operation. +// UpdateSlotConfigurationNames updates the names of application settings and connection string that remain with the +// slot during swap operation. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. slotConfigNames is names of application -// settings and connection strings. See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. +// slotConfigNames is names of application settings and connection strings. See example. func (client AppsClient) UpdateSlotConfigurationNames(resourceGroupName string, name string, slotConfigNames SlotConfigNamesResource) (result SlotConfigNamesResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -17279,13 +27063,12 @@ func (client AppsClient) UpdateSlotConfigurationNamesResponder(resp *http.Respon return } -// UpdateVnetConnection adds a Virtual Network connection to an app or slot -// (PUT) or updates the connection properties (PATCH). +// UpdateVnetConnection adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties +// (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of an existing Virtual -// Network. connectionEnvelope is properties of the Virtual Network connection. -// See example. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of an existing Virtual Network. connectionEnvelope is properties of the Virtual Network connection. See +// example. func (client AppsClient) UpdateVnetConnection(resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo) (result VnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -17359,13 +27142,11 @@ func (client AppsClient) UpdateVnetConnectionResponder(resp *http.Response) (res return } -// UpdateVnetConnectionGateway adds a gateway to a connected Virtual Network -// (PUT) or updates it (PATCH). +// UpdateVnetConnectionGateway adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the Virtual Network. -// gatewayName is name of the gateway. Currently, the only supported string is -// "primary". connectionEnvelope is the properties to update this gateway with. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the Virtual Network. gatewayName is name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope is the properties to update this gateway with. func (client AppsClient) UpdateVnetConnectionGateway(resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -17440,15 +27221,12 @@ func (client AppsClient) UpdateVnetConnectionGatewayResponder(resp *http.Respons return } -// UpdateVnetConnectionGatewaySlot adds a gateway to a connected Virtual -// Network (PUT) or updates it (PATCH). +// UpdateVnetConnectionGatewaySlot adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of the Virtual Network. -// gatewayName is name of the gateway. Currently, the only supported string is -// "primary". connectionEnvelope is the properties to update this gateway with. -// slot is name of the deployment slot. If a slot is not specified, the API -// will add or update a gateway for the production slot's Virtual Network. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of the Virtual Network. gatewayName is name of the gateway. Currently, the only supported string is "primary". +// connectionEnvelope is the properties to update this gateway with. slot is name of the deployment slot. If a slot is +// not specified, the API will add or update a gateway for the production slot's Virtual Network. func (client AppsClient) UpdateVnetConnectionGatewaySlot(resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway, slot string) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -17524,14 +27302,13 @@ func (client AppsClient) UpdateVnetConnectionGatewaySlotResponder(resp *http.Res return } -// UpdateVnetConnectionSlot adds a Virtual Network connection to an app or slot -// (PUT) or updates the connection properties (PATCH). +// UpdateVnetConnectionSlot adds a Virtual Network connection to an app or slot (PUT) or updates the connection +// properties (PATCH). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the app. vnetName is name of an existing Virtual -// Network. connectionEnvelope is properties of the Virtual Network connection. -// See example. slot is name of the deployment slot. If a slot is not -// specified, the API will add or update connections for the production slot. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the app. vnetName is +// name of an existing Virtual Network. connectionEnvelope is properties of the Virtual Network connection. See +// example. slot is name of the deployment slot. If a slot is not specified, the API will add or update connections for +// the production slot. func (client AppsClient) UpdateVnetConnectionSlot(resourceGroupName string, name string, vnetName string, connectionEnvelope VnetInfo, slot string) (result VnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appservicecertificateorders.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appservicecertificateorders.go index c6a681b09..7798b1f5a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appservicecertificateorders.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appservicecertificateorders.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,27 @@ import ( "net/http" ) -// AppServiceCertificateOrdersClient is the composite Swagger for WebSite -// Management Client +// AppServiceCertificateOrdersClient is the webSite Management Client type AppServiceCertificateOrdersClient struct { ManagementClient } -// NewAppServiceCertificateOrdersClient creates an instance of the -// AppServiceCertificateOrdersClient client. +// NewAppServiceCertificateOrdersClient creates an instance of the AppServiceCertificateOrdersClient client. func NewAppServiceCertificateOrdersClient(subscriptionID string) AppServiceCertificateOrdersClient { return NewAppServiceCertificateOrdersClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the -// AppServiceCertificateOrdersClient client. +// NewAppServiceCertificateOrdersClientWithBaseURI creates an instance of the AppServiceCertificateOrdersClient client. func NewAppServiceCertificateOrdersClientWithBaseURI(baseURI string, subscriptionID string) AppServiceCertificateOrdersClient { return AppServiceCertificateOrdersClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or update a certificate purchase order. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdate create or update a certificate purchase order. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. -// certificateDistinguishedName is distinguished name to to use for the -// certificate order. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. certificateDistinguishedName is distinguished name to to use for the certificate order. func (client AppServiceCertificateOrdersClient) CreateOrUpdate(resourceGroupName string, certificateOrderName string, certificateDistinguishedName AppServiceCertificateOrder, cancel <-chan struct{}) (<-chan AppServiceCertificateOrder, <-chan error) { resultChan := make(chan AppServiceCertificateOrder, 1) errChan := make(chan error, 1) @@ -77,8 +70,10 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdate(resourceGroupName var err error var result AppServiceCertificateOrder defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -147,15 +142,12 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdateResponder(resp *ht return } -// CreateOrUpdateCertificate creates or updates a certificate and associates -// with key vault secret. This method may poll for completion. Polling can be -// canceled by passing the cancel channel argument. The channel will be used to +// CreateOrUpdateCertificate creates or updates a certificate and associates with key vault secret. This method may +// poll for completion. Polling can be canceled by passing the cancel channel argument. The channel will be used to // cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. name is name -// of the certificate. keyVaultCertificate is key vault certificate resource -// Id. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. name is name of the certificate. keyVaultCertificate is key vault certificate resource Id. func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificate(resourceGroupName string, certificateOrderName string, name string, keyVaultCertificate AppServiceCertificateResource, cancel <-chan struct{}) (<-chan AppServiceCertificateResource, <-chan error) { resultChan := make(chan AppServiceCertificateResource, 1) errChan := make(chan error, 1) @@ -174,8 +166,10 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificate(resour var err error var result AppServiceCertificateResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -247,8 +241,8 @@ func (client AppServiceCertificateOrdersClient) CreateOrUpdateCertificateRespond // Delete delete an existing certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. func (client AppServiceCertificateOrdersClient) Delete(resourceGroupName string, certificateOrderName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -318,12 +312,10 @@ func (client AppServiceCertificateOrdersClient) DeleteResponder(resp *http.Respo return } -// DeleteCertificate delete the certificate associated with a certificate -// order. +// DeleteCertificate delete the certificate associated with a certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. name is name -// of the certificate. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. name is name of the certificate. func (client AppServiceCertificateOrdersClient) DeleteCertificate(resourceGroupName string, certificateOrderName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -396,8 +388,8 @@ func (client AppServiceCertificateOrdersClient) DeleteCertificateResponder(resp // Get get a certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order.. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order.. func (client AppServiceCertificateOrdersClient) Get(resourceGroupName string, certificateOrderName string) (result AppServiceCertificateOrder, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -470,9 +462,8 @@ func (client AppServiceCertificateOrdersClient) GetResponder(resp *http.Response // GetCertificate get the certificate associated with a certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. name is name -// of the certificate. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. name is name of the certificate. func (client AppServiceCertificateOrdersClient) GetCertificate(resourceGroupName string, certificateOrderName string, name string) (result AppServiceCertificateResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -629,10 +620,54 @@ func (client AppServiceCertificateOrdersClient) ListNextResults(lastResults AppS return } +// ListComplete gets all elements from the list without paging. +func (client AppServiceCertificateOrdersClient) ListComplete(cancel <-chan struct{}) (<-chan AppServiceCertificateOrder, <-chan error) { + resultChan := make(chan AppServiceCertificateOrder) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup get certificate orders in a resource group. // -// resourceGroupName is name of the resource group to which the resource -// belongs. +// resourceGroupName is name of the resource group to which the resource belongs. func (client AppServiceCertificateOrdersClient) ListByResourceGroup(resourceGroupName string) (result AppServiceCertificateOrderCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -726,10 +761,55 @@ func (client AppServiceCertificateOrdersClient) ListByResourceGroupNextResults(l return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AppServiceCertificateOrdersClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan AppServiceCertificateOrder, <-chan error) { + resultChan := make(chan AppServiceCertificateOrder) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListCertificates list all certificates associated with a certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. func (client AppServiceCertificateOrdersClient) ListCertificates(resourceGroupName string, certificateOrderName string) (result AppServiceCertificateCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -824,11 +904,55 @@ func (client AppServiceCertificateOrdersClient) ListCertificatesNextResults(last return } +// ListCertificatesComplete gets all elements from the list without paging. +func (client AppServiceCertificateOrdersClient) ListCertificatesComplete(resourceGroupName string, certificateOrderName string, cancel <-chan struct{}) (<-chan AppServiceCertificateResource, <-chan error) { + resultChan := make(chan AppServiceCertificateResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListCertificates(resourceGroupName, certificateOrderName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListCertificatesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Reissue reissue an existing certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. -// reissueCertificateOrderRequest is parameters for the reissue. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. reissueCertificateOrderRequest is parameters for the reissue. func (client AppServiceCertificateOrdersClient) Reissue(resourceGroupName string, certificateOrderName string, reissueCertificateOrderRequest ReissueCertificateOrderRequest) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -902,9 +1026,8 @@ func (client AppServiceCertificateOrdersClient) ReissueResponder(resp *http.Resp // Renew renew an existing certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. -// renewCertificateOrderRequest is renew parameters +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. renewCertificateOrderRequest is renew parameters func (client AppServiceCertificateOrdersClient) Renew(resourceGroupName string, certificateOrderName string, renewCertificateOrderRequest RenewCertificateOrderRequest) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -978,8 +1101,8 @@ func (client AppServiceCertificateOrdersClient) RenewResponder(resp *http.Respon // ResendEmail resend certificate email. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. func (client AppServiceCertificateOrdersClient) ResendEmail(resourceGroupName string, certificateOrderName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1051,9 +1174,8 @@ func (client AppServiceCertificateOrdersClient) ResendEmailResponder(resp *http. // ResendRequestEmails verify domain ownership for this certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. -// nameIdentifier is email address +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. nameIdentifier is email address func (client AppServiceCertificateOrdersClient) ResendRequestEmails(resourceGroupName string, certificateOrderName string, nameIdentifier NameIdentifier) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1127,8 +1249,8 @@ func (client AppServiceCertificateOrdersClient) ResendRequestEmailsResponder(res // RetrieveCertificateActions retrieve the list of certificate actions. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the certificate order. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the certificate +// order. func (client AppServiceCertificateOrdersClient) RetrieveCertificateActions(resourceGroupName string, name string) (result ListCertificateOrderAction, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1201,8 +1323,8 @@ func (client AppServiceCertificateOrdersClient) RetrieveCertificateActionsRespon // RetrieveCertificateEmailHistory retrieve email history. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the certificate order. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the certificate +// order. func (client AppServiceCertificateOrdersClient) RetrieveCertificateEmailHistory(resourceGroupName string, name string) (result ListCertificateEmail, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1275,9 +1397,8 @@ func (client AppServiceCertificateOrdersClient) RetrieveCertificateEmailHistoryR // RetrieveSiteSeal verify domain ownership for this certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. -// siteSealRequest is site seal request. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. siteSealRequest is site seal request. func (client AppServiceCertificateOrdersClient) RetrieveSiteSeal(resourceGroupName string, certificateOrderName string, siteSealRequest SiteSealRequest) (result SiteSeal, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1427,8 +1548,8 @@ func (client AppServiceCertificateOrdersClient) ValidatePurchaseInformationRespo // VerifyDomainOwnership verify domain ownership for this certificate order. // -// resourceGroupName is name of the resource group to which the resource -// belongs. certificateOrderName is name of the certificate order. +// resourceGroupName is name of the resource group to which the resource belongs. certificateOrderName is name of the +// certificate order. func (client AppServiceCertificateOrdersClient) VerifyDomainOwnership(resourceGroupName string, certificateOrderName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceenvironments.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceenvironments.go index 54f9f9bcb..a2f811338 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceenvironments.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceenvironments.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,33 +24,27 @@ import ( "net/http" ) -// AppServiceEnvironmentsClient is the composite Swagger for WebSite Management -// Client +// AppServiceEnvironmentsClient is the webSite Management Client type AppServiceEnvironmentsClient struct { ManagementClient } -// NewAppServiceEnvironmentsClient creates an instance of the -// AppServiceEnvironmentsClient client. +// NewAppServiceEnvironmentsClient creates an instance of the AppServiceEnvironmentsClient client. func NewAppServiceEnvironmentsClient(subscriptionID string) AppServiceEnvironmentsClient { return NewAppServiceEnvironmentsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the -// AppServiceEnvironmentsClient client. +// NewAppServiceEnvironmentsClientWithBaseURI creates an instance of the AppServiceEnvironmentsClient client. func NewAppServiceEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) AppServiceEnvironmentsClient { return AppServiceEnvironmentsClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate create or update an App Service Environment. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate create or update an App Service Environment. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. -// hostingEnvironmentEnvelope is configuration details of the App Service -// Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. hostingEnvironmentEnvelope is configuration details of the App Service Environment. func (client AppServiceEnvironmentsClient) CreateOrUpdate(resourceGroupName string, name string, hostingEnvironmentEnvelope AppServiceEnvironmentResource, cancel <-chan struct{}) (<-chan AppServiceEnvironmentResource, <-chan error) { resultChan := make(chan AppServiceEnvironmentResource, 1) errChan := make(chan error, 1) @@ -77,8 +70,10 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdate(resourceGroupName stri var err error var result AppServiceEnvironmentResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -147,14 +142,12 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateResponder(resp *http.Re return } -// CreateOrUpdateMultiRolePool create or update a multi-role pool. This method -// may poll for completion. Polling can be canceled by passing the cancel -// channel argument. The channel will be used to cancel polling and any -// outstanding HTTP requests. +// CreateOrUpdateMultiRolePool create or update a multi-role pool. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. multiRolePoolEnvelope -// is properties of the multi-role pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. multiRolePoolEnvelope is properties of the multi-role pool. func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePool(resourceGroupName string, name string, multiRolePoolEnvelope WorkerPoolResource, cancel <-chan struct{}) (<-chan WorkerPoolResource, <-chan error) { resultChan := make(chan WorkerPoolResource, 1) errChan := make(chan error, 1) @@ -173,8 +166,10 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePool(resourceG var err error var result WorkerPoolResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -243,14 +238,12 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateMultiRolePoolResponder( return } -// CreateOrUpdateWorkerPool create or update a worker pool. This method may -// poll for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdateWorkerPool create or update a worker pool. This method may poll for completion. Polling can be +// canceled by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of the worker pool. workerPoolEnvelope is properties of the worker pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of the worker pool. workerPoolEnvelope is properties of the worker pool. func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPool(resourceGroupName string, name string, workerPoolName string, workerPoolEnvelope WorkerPoolResource, cancel <-chan struct{}) (<-chan WorkerPoolResource, <-chan error) { resultChan := make(chan WorkerPoolResource, 1) errChan := make(chan error, 1) @@ -269,8 +262,10 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPool(resourceGrou var err error var result WorkerPoolResource defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -340,14 +335,11 @@ func (client AppServiceEnvironmentsClient) CreateOrUpdateWorkerPoolResponder(res return } -// Delete delete an App Service Environment. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Delete delete an App Service Environment. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. forceDelete is specify -// true to force the deletion even if the App Service Environment +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. forceDelete is specify true to force the deletion even if the App Service Environment // contains resources. The default is false. func (client AppServiceEnvironmentsClient) Delete(resourceGroupName string, name string, forceDelete *bool, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) { resultChan := make(chan autorest.Response, 1) @@ -367,8 +359,10 @@ func (client AppServiceEnvironmentsClient) Delete(resourceGroupName string, name var err error var result autorest.Response defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -439,8 +433,8 @@ func (client AppServiceEnvironmentsClient) DeleteResponder(resp *http.Response) // Get get the properties of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) Get(resourceGroupName string, name string) (result AppServiceEnvironmentResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -513,9 +507,8 @@ func (client AppServiceEnvironmentsClient) GetResponder(resp *http.Response) (re // GetDiagnosticsItem get a diagnostics item for an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. diagnosticsName is -// name of the diagnostics item. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. diagnosticsName is name of the diagnostics item. func (client AppServiceEnvironmentsClient) GetDiagnosticsItem(resourceGroupName string, name string, diagnosticsName string) (result HostingEnvironmentDiagnostics, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -589,8 +582,8 @@ func (client AppServiceEnvironmentsClient) GetDiagnosticsItemResponder(resp *htt // GetMultiRolePool get properties of a multi-role pool. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) GetMultiRolePool(resourceGroupName string, name string) (result WorkerPoolResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -663,9 +656,8 @@ func (client AppServiceEnvironmentsClient) GetMultiRolePoolResponder(resp *http. // GetWorkerPool get properties of a worker pool. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of the worker pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of the worker pool. func (client AppServiceEnvironmentsClient) GetWorkerPool(resourceGroupName string, name string, workerPoolName string) (result WorkerPoolResource, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -822,10 +814,55 @@ func (client AppServiceEnvironmentsClient) ListNextResults(lastResults AppServic return } +// ListComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListComplete(cancel <-chan struct{}) (<-chan AppServiceEnvironment, <-chan error) { + resultChan := make(chan AppServiceEnvironment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListAppServicePlans get all App Service plans in an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListAppServicePlans(resourceGroupName string, name string) (result AppServicePlanCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -920,10 +957,54 @@ func (client AppServiceEnvironmentsClient) ListAppServicePlansNextResults(lastRe return } +// ListAppServicePlansComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListAppServicePlansComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan AppServicePlan, <-chan error) { + resultChan := make(chan AppServicePlan) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAppServicePlans(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAppServicePlansNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup get all App Service Environments in a resource group. // -// resourceGroupName is name of the resource group to which the resource -// belongs. +// resourceGroupName is name of the resource group to which the resource belongs. func (client AppServiceEnvironmentsClient) ListByResourceGroup(resourceGroupName string) (result AppServiceEnvironmentCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1017,11 +1098,55 @@ func (client AppServiceEnvironmentsClient) ListByResourceGroupNextResults(lastRe return } -// ListCapacities get the used, available, and total worker capacity an App -// Service Environment. +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan AppServiceEnvironment, <-chan error) { + resultChan := make(chan AppServiceEnvironment) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListCapacities get the used, available, and total worker capacity an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListCapacities(resourceGroupName string, name string) (result StampCapacityCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1116,10 +1241,55 @@ func (client AppServiceEnvironmentsClient) ListCapacitiesNextResults(lastResults return } +// ListCapacitiesComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListCapacitiesComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan StampCapacity, <-chan error) { + resultChan := make(chan StampCapacity) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListCapacities(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListCapacitiesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListDiagnostics get diagnostic information for an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListDiagnostics(resourceGroupName string, name string) (result ListHostingEnvironmentDiagnostics, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1190,11 +1360,10 @@ func (client AppServiceEnvironmentsClient) ListDiagnosticsResponder(resp *http.R return } -// ListMetricDefinitions get global metric definitions of an App Service -// Environment. +// ListMetricDefinitions get global metric definitions of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListMetricDefinitions(resourceGroupName string, name string) (result MetricDefinition, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1267,14 +1436,11 @@ func (client AppServiceEnvironmentsClient) ListMetricDefinitionsResponder(resp * // ListMetrics get global metrics of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. details is specify -// true to include instance details. The default is -// false. filter is return only usages/metrics specified in the -// filter. Filter conforms to odata syntax. Example: $filter=(name.value eq -// 'Metric1' or name.value eq 'Metric2') and startTime eq -// '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain -// eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. details is specify true to include instance details. The default is false. +// filter is return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: +// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq +// '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppServiceEnvironmentsClient) ListMetrics(resourceGroupName string, name string, details *bool, filter string) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1375,11 +1541,55 @@ func (client AppServiceEnvironmentsClient) ListMetricsNextResults(lastResults Re return } -// ListMultiRoleMetricDefinitions get metric definitions for a multi-role pool -// of an App Service Environment. +// ListMetricsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMetricsComplete(resourceGroupName string, name string, details *bool, filter string, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMetrics(resourceGroupName, name, details, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMultiRoleMetricDefinitions get metric definitions for a multi-role pool of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListMultiRoleMetricDefinitions(resourceGroupName string, name string) (result ResourceMetricDefinitionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1474,19 +1684,59 @@ func (client AppServiceEnvironmentsClient) ListMultiRoleMetricDefinitionsNextRes return } -// ListMultiRoleMetrics get metrics for a multi-role pool of an App Service -// Environment. +// ListMultiRoleMetricDefinitionsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMultiRoleMetricDefinitionsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan ResourceMetricDefinition, <-chan error) { + resultChan := make(chan ResourceMetricDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMultiRoleMetricDefinitions(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMultiRoleMetricDefinitionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMultiRoleMetrics get metrics for a multi-role pool of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. startTime is beginning -// time of the metrics query. endTime is end time of the metrics query. -// timeGrain is time granularity of the metrics query. details is specify -// true to include instance details. The default is -// false. filter is return only usages/metrics specified in the -// filter. Filter conforms to odata syntax. Example: $filter=(name.value eq -// 'Metric1' or name.value eq 'Metric2') and startTime eq -// '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain -// eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. startTime is beginning time of the metrics query. endTime is end time of the metrics query. timeGrain +// is time granularity of the metrics query. details is specify true to include instance details. The +// default is false. filter is return only usages/metrics specified in the filter. Filter conforms to +// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq +// '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppServiceEnvironmentsClient) ListMultiRoleMetrics(resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1596,12 +1846,56 @@ func (client AppServiceEnvironmentsClient) ListMultiRoleMetricsNextResults(lastR return } -// ListMultiRolePoolInstanceMetricDefinitions get metric definitions for a -// specific instance of a multi-role pool of an App Service Environment. +// ListMultiRoleMetricsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMultiRoleMetricsComplete(resourceGroupName string, name string, startTime string, endTime string, timeGrain string, details *bool, filter string, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMultiRoleMetrics(resourceGroupName, name, startTime, endTime, timeGrain, details, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMultiRoleMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMultiRolePoolInstanceMetricDefinitions get metric definitions for a specific instance of a multi-role pool of an +// App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. instance is name of -// the instance in the multi-role pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. instance is name of the instance in the multi-role pool. func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetricDefinitions(resourceGroupName string, name string, instance string) (result ResourceMetricDefinitionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1697,12 +1991,56 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetricDefini return } -// ListMultiRolePoolInstanceMetrics get metrics for a specific instance of a -// multi-role pool of an App Service Environment. +// ListMultiRolePoolInstanceMetricDefinitionsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetricDefinitionsComplete(resourceGroupName string, name string, instance string, cancel <-chan struct{}) (<-chan ResourceMetricDefinition, <-chan error) { + resultChan := make(chan ResourceMetricDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMultiRolePoolInstanceMetricDefinitionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMultiRolePoolInstanceMetrics get metrics for a specific instance of a multi-role pool of an App Service +// Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. instance is name of -// the instance in the multi-role pool. details is specify true to +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. instance is name of the instance in the multi-role pool. details is specify true to // include instance details. The default is false. func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetrics(resourceGroupName string, name string, instance string, details *bool) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ @@ -1802,10 +2140,55 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetricsNextR return } +// ListMultiRolePoolInstanceMetricsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolInstanceMetricsComplete(resourceGroupName string, name string, instance string, details *bool, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMultiRolePoolInstanceMetrics(resourceGroupName, name, instance, details) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMultiRolePoolInstanceMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListMultiRolePools get all multi-role pools. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListMultiRolePools(resourceGroupName string, name string) (result WorkerPoolCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1900,10 +2283,55 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolsNextResults(lastRes return } +// ListMultiRolePoolsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan WorkerPoolResource, <-chan error) { + resultChan := make(chan WorkerPoolResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMultiRolePools(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMultiRolePoolsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListMultiRolePoolSkus get available SKUs for scaling a multi-role pool. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkus(resourceGroupName string, name string) (result SkuInfoCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1998,11 +2426,55 @@ func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusNextResults(last return } -// ListMultiRoleUsages get usage metrics for a multi-role pool of an App -// Service Environment. +// ListMultiRolePoolSkusComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMultiRolePoolSkusComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan SkuInfo, <-chan error) { + resultChan := make(chan SkuInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMultiRolePoolSkus(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMultiRolePoolSkusNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMultiRoleUsages get usage metrics for a multi-role pool of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListMultiRoleUsages(resourceGroupName string, name string) (result UsageCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2097,11 +2569,55 @@ func (client AppServiceEnvironmentsClient) ListMultiRoleUsagesNextResults(lastRe return } -// ListOperations list all currently running operations on the App Service -// Environment. +// ListMultiRoleUsagesComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListMultiRoleUsagesComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Usage, <-chan error) { + resultChan := make(chan Usage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMultiRoleUsages(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMultiRoleUsagesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListOperations list all currently running operations on the App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListOperations(resourceGroupName string, name string) (result ListOperation, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2174,12 +2690,10 @@ func (client AppServiceEnvironmentsClient) ListOperationsResponder(resp *http.Re // ListUsages get global usage metrics of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. filter is return only -// usages/metrics specified in the filter. Filter conforms to odata syntax. -// Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and -// startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' -// and timeGrain eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. filter is return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: +// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq +// '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppServiceEnvironmentsClient) ListUsages(resourceGroupName string, name string, filter string) (result CsmUsageQuotaCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2277,10 +2791,55 @@ func (client AppServiceEnvironmentsClient) ListUsagesNextResults(lastResults Csm return } +// ListUsagesComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListUsagesComplete(resourceGroupName string, name string, filter string, cancel <-chan struct{}) (<-chan CsmUsageQuota, <-chan error) { + resultChan := make(chan CsmUsageQuota) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListUsages(resourceGroupName, name, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListUsagesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListVips get IP addresses assigned to an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListVips(resourceGroupName string, name string) (result AddressResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2353,9 +2912,8 @@ func (client AppServiceEnvironmentsClient) ListVipsResponder(resp *http.Response // ListWebApps get all apps in an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. propertiesToInclude is -// comma separated list of app properties to include. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. propertiesToInclude is comma separated list of app properties to include. func (client AppServiceEnvironmentsClient) ListWebApps(resourceGroupName string, name string, propertiesToInclude string) (result AppCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2453,12 +3011,55 @@ func (client AppServiceEnvironmentsClient) ListWebAppsNextResults(lastResults Ap return } -// ListWebWorkerMetricDefinitions get metric definitions for a worker pool of -// an App Service Environment. +// ListWebAppsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWebAppsComplete(resourceGroupName string, name string, propertiesToInclude string, cancel <-chan struct{}) (<-chan Site, <-chan error) { + resultChan := make(chan Site) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebApps(resourceGroupName, name, propertiesToInclude) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebAppsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListWebWorkerMetricDefinitions get metric definitions for a worker pool of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of the worker pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of the worker pool. func (client AppServiceEnvironmentsClient) ListWebWorkerMetricDefinitions(resourceGroupName string, name string, workerPoolName string) (result ResourceMetricDefinitionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2554,17 +3155,58 @@ func (client AppServiceEnvironmentsClient) ListWebWorkerMetricDefinitionsNextRes return } -// ListWebWorkerMetrics get metrics for a worker pool of a -// AppServiceEnvironment (App Service Environment). +// ListWebWorkerMetricDefinitionsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWebWorkerMetricDefinitionsComplete(resourceGroupName string, name string, workerPoolName string, cancel <-chan struct{}) (<-chan ResourceMetricDefinition, <-chan error) { + resultChan := make(chan ResourceMetricDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebWorkerMetricDefinitionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListWebWorkerMetrics get metrics for a worker pool of a AppServiceEnvironment (App Service Environment). // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of worker pool details is specify true to include instance -// details. The default is false. filter is return only -// usages/metrics specified in the filter. Filter conforms to odata syntax. -// Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and -// startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' -// and timeGrain eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of worker pool details is specify true to include instance details. +// The default is false. filter is return only usages/metrics specified in the filter. Filter conforms to +// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq +// '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppServiceEnvironmentsClient) ListWebWorkerMetrics(resourceGroupName string, name string, workerPoolName string, details *bool, filter string) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2666,12 +3308,55 @@ func (client AppServiceEnvironmentsClient) ListWebWorkerMetricsNextResults(lastR return } -// ListWebWorkerUsages get usage metrics for a worker pool of an App Service -// Environment. +// ListWebWorkerMetricsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWebWorkerMetricsComplete(resourceGroupName string, name string, workerPoolName string, details *bool, filter string, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebWorkerMetrics(resourceGroupName, name, workerPoolName, details, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebWorkerMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListWebWorkerUsages get usage metrics for a worker pool of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of the worker pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of the worker pool. func (client AppServiceEnvironmentsClient) ListWebWorkerUsages(resourceGroupName string, name string, workerPoolName string) (result UsageCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2767,12 +3452,56 @@ func (client AppServiceEnvironmentsClient) ListWebWorkerUsagesNextResults(lastRe return } -// ListWorkerPoolInstanceMetricDefinitions get metric definitions for a -// specific instance of a worker pool of an App Service Environment. +// ListWebWorkerUsagesComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWebWorkerUsagesComplete(resourceGroupName string, name string, workerPoolName string, cancel <-chan struct{}) (<-chan Usage, <-chan error) { + resultChan := make(chan Usage) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebWorkerUsages(resourceGroupName, name, workerPoolName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebWorkerUsagesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListWorkerPoolInstanceMetricDefinitions get metric definitions for a specific instance of a worker pool of an App +// Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of the worker pool. instance is name of the instance in the worker pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of the worker pool. instance is name of the instance in the worker pool. func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetricDefinitions(resourceGroupName string, name string, workerPoolName string, instance string) (result ResourceMetricDefinitionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2869,17 +3598,58 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetricDefinitio return } -// ListWorkerPoolInstanceMetrics get metrics for a specific instance of a -// worker pool of an App Service Environment. +// ListWorkerPoolInstanceMetricDefinitionsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetricDefinitionsComplete(resourceGroupName string, name string, workerPoolName string, instance string, cancel <-chan struct{}) (<-chan ResourceMetricDefinition, <-chan error) { + resultChan := make(chan ResourceMetricDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWorkerPoolInstanceMetricDefinitionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListWorkerPoolInstanceMetrics get metrics for a specific instance of a worker pool of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of the worker pool. instance is name of the instance in the worker pool. -// details is specify true to include instance details. The -// default is false. filter is return only usages/metrics -// specified in the filter. Filter conforms to odata syntax. Example: -// $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime -// eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of the worker pool. instance is name of the instance in the worker pool. details +// is specify true to include instance details. The default is false. filter is return only +// usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' +// or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and // timeGrain eq duration'[Hour|Minute|Day]'. func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetrics(resourceGroupName string, name string, workerPoolName string, instance string, details *bool, filter string) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ @@ -2983,10 +3753,55 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetricsNextResu return } +// ListWorkerPoolInstanceMetricsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWorkerPoolInstanceMetricsComplete(resourceGroupName string, name string, workerPoolName string, instance string, details *bool, filter string, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWorkerPoolInstanceMetrics(resourceGroupName, name, workerPoolName, instance, details, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWorkerPoolInstanceMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListWorkerPools get all worker pools of an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) ListWorkerPools(resourceGroupName string, name string) (result WorkerPoolCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3081,11 +3896,55 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolsNextResults(lastResult return } +// ListWorkerPoolsComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWorkerPoolsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan WorkerPoolResource, <-chan error) { + resultChan := make(chan WorkerPoolResource) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWorkerPools(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWorkerPoolsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListWorkerPoolSkus get available SKUs for scaling a worker pool. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. workerPoolName is name -// of the worker pool. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. workerPoolName is name of the worker pool. func (client AppServiceEnvironmentsClient) ListWorkerPoolSkus(resourceGroupName string, name string, workerPoolName string) (result SkuInfoCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3181,10 +4040,55 @@ func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusNextResults(lastRes return } +// ListWorkerPoolSkusComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ListWorkerPoolSkusComplete(resourceGroupName string, name string, workerPoolName string, cancel <-chan struct{}) (<-chan SkuInfo, <-chan error) { + resultChan := make(chan SkuInfo) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWorkerPoolSkus(resourceGroupName, name, workerPoolName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWorkerPoolSkusNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Reboot reboot all machines in an App Service Environment. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) Reboot(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3254,13 +4158,11 @@ func (client AppServiceEnvironmentsClient) RebootResponder(resp *http.Response) return } -// Resume resume an App Service Environment. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// Resume resume an App Service Environment. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) Resume(resourceGroupName string, name string, cancel <-chan struct{}) (result AppCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3357,13 +4259,56 @@ func (client AppServiceEnvironmentsClient) ResumeNextResults(lastResults AppColl return } -// Suspend suspend an App Service Environment. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// ResumeComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) ResumeComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Site, <-chan error) { + resultChan := make(chan Site) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.Resume(resourceGroupName, name, cancel) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ResumeNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// Suspend suspend an App Service Environment. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service Environment. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service +// Environment. func (client AppServiceEnvironmentsClient) Suspend(resourceGroupName string, name string, cancel <-chan struct{}) (result AppCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -3459,3 +4404,48 @@ func (client AppServiceEnvironmentsClient) SuspendNextResults(lastResults AppCol return } + +// SuspendComplete gets all elements from the list without paging. +func (client AppServiceEnvironmentsClient) SuspendComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan Site, <-chan error) { + resultChan := make(chan Site) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.Suspend(resourceGroupName, name, cancel) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.SuspendNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceplans.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceplans.go index d4e362875..6f0e12f9f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceplans.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/appserviceplans.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,31 +24,27 @@ import ( "net/http" ) -// AppServicePlansClient is the composite Swagger for WebSite Management Client +// AppServicePlansClient is the webSite Management Client type AppServicePlansClient struct { ManagementClient } -// NewAppServicePlansClient creates an instance of the AppServicePlansClient -// client. +// NewAppServicePlansClient creates an instance of the AppServicePlansClient client. func NewAppServicePlansClient(subscriptionID string) AppServicePlansClient { return NewAppServicePlansClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewAppServicePlansClientWithBaseURI creates an instance of the -// AppServicePlansClient client. +// NewAppServicePlansClientWithBaseURI creates an instance of the AppServicePlansClient client. func NewAppServicePlansClientWithBaseURI(baseURI string, subscriptionID string) AppServicePlansClient { return AppServicePlansClient{NewWithBaseURI(baseURI, subscriptionID)} } -// CreateOrUpdate creates or updates an App Service Plan. This method may poll -// for completion. Polling can be canceled by passing the cancel channel -// argument. The channel will be used to cancel polling and any outstanding -// HTTP requests. +// CreateOrUpdate creates or updates an App Service Plan. This method may poll for completion. Polling can be canceled +// by passing the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP +// requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. appServicePlan is details of -// the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// appServicePlan is details of the App Service plan. func (client AppServicePlansClient) CreateOrUpdate(resourceGroupName string, name string, appServicePlan AppServicePlan, cancel <-chan struct{}) (<-chan AppServicePlan, <-chan error) { resultChan := make(chan AppServicePlan, 1) errChan := make(chan error, 1) @@ -68,8 +63,10 @@ func (client AppServicePlansClient) CreateOrUpdate(resourceGroupName string, nam var err error var result AppServicePlan defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -138,13 +135,11 @@ func (client AppServicePlansClient) CreateOrUpdateResponder(resp *http.Response) return } -// CreateOrUpdateVnetRoute create or update a Virtual Network route in an App -// Service plan. +// CreateOrUpdateVnetRoute create or update a Virtual Network route in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. routeName is name of the Virtual Network route. route is -// definition of the Virtual Network route. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. routeName is name of the Virtual Network route. route is definition of the +// Virtual Network route. func (client AppServicePlansClient) CreateOrUpdateVnetRoute(resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute) (result VnetRoute, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -221,8 +216,7 @@ func (client AppServicePlansClient) CreateOrUpdateVnetRouteResponder(resp *http. // Delete delete an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. func (client AppServicePlansClient) Delete(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -292,12 +286,10 @@ func (client AppServicePlansClient) DeleteResponder(resp *http.Response) (result return } -// DeleteHybridConnection delete a Hybrid Connection in use in an App Service -// plan. +// DeleteHybridConnection delete a Hybrid Connection in use in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. namespaceName is name of the -// Service Bus namespace. relayName is name of the Service Bus relay. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// namespaceName is name of the Service Bus namespace. relayName is name of the Service Bus relay. func (client AppServicePlansClient) DeleteHybridConnection(resourceGroupName string, name string, namespaceName string, relayName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -371,9 +363,8 @@ func (client AppServicePlansClient) DeleteHybridConnectionResponder(resp *http.R // DeleteVnetRoute delete a Virtual Network route in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. routeName is name of the Virtual Network route. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. routeName is name of the Virtual Network route. func (client AppServicePlansClient) DeleteVnetRoute(resourceGroupName string, name string, vnetName string, routeName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -447,8 +438,7 @@ func (client AppServicePlansClient) DeleteVnetRouteResponder(resp *http.Response // Get get an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. func (client AppServicePlansClient) Get(resourceGroupName string, name string) (result AppServicePlan, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -519,12 +509,10 @@ func (client AppServicePlansClient) GetResponder(resp *http.Response) (result Ap return } -// GetHybridConnection retrieve a Hybrid Connection in use in an App Service -// plan. +// GetHybridConnection retrieve a Hybrid Connection in use in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. namespaceName is name of the -// Service Bus namespace. relayName is name of the Service Bus relay. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// namespaceName is name of the Service Bus namespace. relayName is name of the Service Bus relay. func (client AppServicePlansClient) GetHybridConnection(resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -597,11 +585,9 @@ func (client AppServicePlansClient) GetHybridConnectionResponder(resp *http.Resp return } -// GetHybridConnectionPlanLimit get the maximum number of Hybrid Connections -// allowed in an App Service plan. +// GetHybridConnectionPlanLimit get the maximum number of Hybrid Connections allowed in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. func (client AppServicePlansClient) GetHybridConnectionPlanLimit(resourceGroupName string, name string) (result HybridConnectionLimits, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -674,9 +660,8 @@ func (client AppServicePlansClient) GetHybridConnectionPlanLimitResponder(resp * // GetRouteForVnet get a Virtual Network route in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. routeName is name of the Virtual Network route. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. routeName is name of the Virtual Network route. func (client AppServicePlansClient) GetRouteForVnet(resourceGroupName string, name string, vnetName string, routeName string) (result ListVnetRoute, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -749,12 +734,10 @@ func (client AppServicePlansClient) GetRouteForVnetResponder(resp *http.Response return } -// GetVnetFromServerFarm get a Virtual Network associated with an App Service -// plan. +// GetVnetFromServerFarm get a Virtual Network associated with an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. func (client AppServicePlansClient) GetVnetFromServerFarm(resourceGroupName string, name string, vnetName string) (result VnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -828,10 +811,9 @@ func (client AppServicePlansClient) GetVnetFromServerFarmResponder(resp *http.Re // GetVnetGateway get a Virtual Network gateway. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. gatewayName is name of the gateway. Only the 'primary' -// gateway is supported. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. gatewayName is name of the gateway. Only the 'primary' gateway is +// supported. func (client AppServicePlansClient) GetVnetGateway(resourceGroupName string, name string, vnetName string, gatewayName string) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -906,9 +888,8 @@ func (client AppServicePlansClient) GetVnetGatewayResponder(resp *http.Response) // List get all App Service plans for a subcription. // -// detailed is specify true to return all App Service plan -// properties. The default is false, which returns a subset of the -// properties. +// detailed is specify true to return all App Service plan properties. The default is false, +// which returns a subset of the properties. // Retrieval of all properties may increase the API latency. func (client AppServicePlansClient) List(detailed *bool) (result AppServicePlanCollection, err error) { req, err := client.ListPreparer(detailed) @@ -997,10 +978,54 @@ func (client AppServicePlansClient) ListNextResults(lastResults AppServicePlanCo return } +// ListComplete gets all elements from the list without paging. +func (client AppServicePlansClient) ListComplete(detailed *bool, cancel <-chan struct{}) (<-chan AppServicePlan, <-chan error) { + resultChan := make(chan AppServicePlan) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List(detailed) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup get all App Service plans in a resource group. // -// resourceGroupName is name of the resource group to which the resource -// belongs. +// resourceGroupName is name of the resource group to which the resource belongs. func (client AppServicePlansClient) ListByResourceGroup(resourceGroupName string) (result AppServicePlanCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1094,10 +1119,54 @@ func (client AppServicePlansClient) ListByResourceGroupNextResults(lastResults A return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client AppServicePlansClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan AppServicePlan, <-chan error) { + resultChan := make(chan AppServicePlan) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListCapabilities list all capabilities of an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. func (client AppServicePlansClient) ListCapabilities(resourceGroupName string, name string) (result ListCapability, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1168,12 +1237,10 @@ func (client AppServicePlansClient) ListCapabilitiesResponder(resp *http.Respons return } -// ListHybridConnectionKeys get the send key name and value of a Hybrid -// Connection. +// ListHybridConnectionKeys get the send key name and value of a Hybrid Connection. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. namespaceName is the name of -// the Service Bus namespace. relayName is the name of the Service Bus relay. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// namespaceName is the name of the Service Bus namespace. relayName is the name of the Service Bus relay. func (client AppServicePlansClient) ListHybridConnectionKeys(resourceGroupName string, name string, namespaceName string, relayName string) (result HybridConnectionKey, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1246,11 +1313,9 @@ func (client AppServicePlansClient) ListHybridConnectionKeysResponder(resp *http return } -// ListHybridConnections retrieve all Hybrid Connections in use in an App -// Service plan. +// ListHybridConnections retrieve all Hybrid Connections in use in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. func (client AppServicePlansClient) ListHybridConnections(resourceGroupName string, name string) (result HybridConnectionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1345,11 +1410,54 @@ func (client AppServicePlansClient) ListHybridConnectionsNextResults(lastResults return } -// ListMetricDefintions get metrics that can be queried for an App Service -// plan, and their definitions. +// ListHybridConnectionsComplete gets all elements from the list without paging. +func (client AppServicePlansClient) ListHybridConnectionsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan HybridConnection, <-chan error) { + resultChan := make(chan HybridConnection) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListHybridConnections(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListHybridConnectionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListMetricDefintions get metrics that can be queried for an App Service plan, and their definitions. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. func (client AppServicePlansClient) ListMetricDefintions(resourceGroupName string, name string) (result ResourceMetricDefinitionCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1444,16 +1552,58 @@ func (client AppServicePlansClient) ListMetricDefintionsNextResults(lastResults return } +// ListMetricDefintionsComplete gets all elements from the list without paging. +func (client AppServicePlansClient) ListMetricDefintionsComplete(resourceGroupName string, name string, cancel <-chan struct{}) (<-chan ResourceMetricDefinition, <-chan error) { + resultChan := make(chan ResourceMetricDefinition) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMetricDefintions(resourceGroupName, name) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMetricDefintionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListMetrics get metrics for an App Serice plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. details is specify -// true to include instance details. The default is -// false. filter is return only usages/metrics specified in the -// filter. Filter conforms to odata syntax. Example: $filter=(name.value eq -// 'Metric1' or name.value eq 'Metric2') and startTime eq -// '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain -// eq duration'[Hour|Minute|Day]'. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// details is specify true to include instance details. The default is false. filter is +// return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq +// 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' +// and timeGrain eq duration'[Hour|Minute|Day]'. func (client AppServicePlansClient) ListMetrics(resourceGroupName string, name string, details *bool, filter string) (result ResourceMetricCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1554,12 +1704,55 @@ func (client AppServicePlansClient) ListMetricsNextResults(lastResults ResourceM return } -// ListRoutesForVnet get all routes that are associated with a Virtual Network -// in an App Service plan. +// ListMetricsComplete gets all elements from the list without paging. +func (client AppServicePlansClient) ListMetricsComplete(resourceGroupName string, name string, details *bool, filter string, cancel <-chan struct{}) (<-chan ResourceMetric, <-chan error) { + resultChan := make(chan ResourceMetric) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListMetrics(resourceGroupName, name, details, filter) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListMetricsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListRoutesForVnet get all routes that are associated with a Virtual Network in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. func (client AppServicePlansClient) ListRoutesForVnet(resourceGroupName string, name string, vnetName string) (result ListVnetRoute, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1633,8 +1826,7 @@ func (client AppServicePlansClient) ListRoutesForVnetResponder(resp *http.Respon // ListVnets get all Virtual Networks associated with an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. func (client AppServicePlansClient) ListVnets(resourceGroupName string, name string) (result ListVnetInfo, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1707,14 +1899,11 @@ func (client AppServicePlansClient) ListVnetsResponder(resp *http.Response) (res // ListWebApps get all apps associated with an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. skipToken is skip to a web -// app in the list of webapps associated with app service plan. If specified, -// the resulting list will contain web apps starting from (including) the -// skipToken. Otherwise, the resulting list contains web apps from the start of -// the list filter is supported filter: $filter=state eq running. Returns only -// web apps that are currently running top is list page size. If specified, -// results are paged. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// skipToken is skip to a web app in the list of webapps associated with app service plan. If specified, the resulting +// list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list contains web apps +// from the start of the list filter is supported filter: $filter=state eq running. Returns only web apps that are +// currently running top is list page size. If specified, results are paged. func (client AppServicePlansClient) ListWebApps(resourceGroupName string, name string, skipToken string, filter string, top string) (result AppCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1818,13 +2007,55 @@ func (client AppServicePlansClient) ListWebAppsNextResults(lastResults AppCollec return } -// ListWebAppsByHybridConnection get all apps that use a Hybrid Connection in -// an App Service Plan. +// ListWebAppsComplete gets all elements from the list without paging. +func (client AppServicePlansClient) ListWebAppsComplete(resourceGroupName string, name string, skipToken string, filter string, top string, cancel <-chan struct{}) (<-chan Site, <-chan error) { + resultChan := make(chan Site) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebApps(resourceGroupName, name, skipToken, filter, top) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebAppsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListWebAppsByHybridConnection get all apps that use a Hybrid Connection in an App Service Plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. namespaceName is name of the -// Hybrid Connection namespace. relayName is name of the Hybrid Connection -// relay. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// namespaceName is name of the Hybrid Connection namespace. relayName is name of the Hybrid Connection relay. func (client AppServicePlansClient) ListWebAppsByHybridConnection(resourceGroupName string, name string, namespaceName string, relayName string) (result ResourceCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1921,11 +2152,55 @@ func (client AppServicePlansClient) ListWebAppsByHybridConnectionNextResults(las return } +// ListWebAppsByHybridConnectionComplete gets all elements from the list without paging. +func (client AppServicePlansClient) ListWebAppsByHybridConnectionComplete(resourceGroupName string, name string, namespaceName string, relayName string, cancel <-chan struct{}) (<-chan string, <-chan error) { + resultChan := make(chan string) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListWebAppsByHybridConnectionNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // RebootWorker reboot a worker machine in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. workerName is name of worker -// machine, which typically starts with RD. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// workerName is name of worker machine, which typically starts with RD. func (client AppServicePlansClient) RebootWorker(resourceGroupName string, name string, workerName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -1998,11 +2273,9 @@ func (client AppServicePlansClient) RebootWorkerResponder(resp *http.Response) ( // RestartWebApps restart all apps in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. softRestart is specify -// true to performa a soft restart, applies the configuration -// settings and restarts the apps if necessary. The default is -// false, which always restarts and reprovisions the apps +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// softRestart is specify true to performa a soft restart, applies the configuration settings and restarts +// the apps if necessary. The default is false, which always restarts and reprovisions the apps func (client AppServicePlansClient) RestartWebApps(resourceGroupName string, name string, softRestart *bool) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2077,10 +2350,9 @@ func (client AppServicePlansClient) RestartWebAppsResponder(resp *http.Response) // UpdateVnetGateway update a Virtual Network gateway. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. gatewayName is name of the gateway. Only the 'primary' -// gateway is supported. connectionEnvelope is definition of the gateway. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. gatewayName is name of the gateway. Only the 'primary' gateway is +// supported. connectionEnvelope is definition of the gateway. func (client AppServicePlansClient) UpdateVnetGateway(resourceGroupName string, name string, vnetName string, gatewayName string, connectionEnvelope VnetGateway) (result VnetGateway, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -2155,13 +2427,11 @@ func (client AppServicePlansClient) UpdateVnetGatewayResponder(resp *http.Respon return } -// UpdateVnetRoute create or update a Virtual Network route in an App Service -// plan. +// UpdateVnetRoute create or update a Virtual Network route in an App Service plan. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the App Service plan. vnetName is name of the -// Virtual Network. routeName is name of the Virtual Network route. route is -// definition of the Virtual Network route. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the App Service plan. +// vnetName is name of the Virtual Network. routeName is name of the Virtual Network route. route is definition of the +// Virtual Network route. func (client AppServicePlansClient) UpdateVnetRoute(resourceGroupName string, name string, vnetName string, routeName string, route VnetRoute) (result VnetRoute, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/certificates.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/certificates.go index 19628ccd8..fc28ebb4d 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/certificates.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/certificates.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// CertificatesClient is the composite Swagger for WebSite Management Client +// CertificatesClient is the webSite Management Client type CertificatesClient struct { ManagementClient } @@ -35,17 +34,15 @@ func NewCertificatesClient(subscriptionID string) CertificatesClient { return NewCertificatesClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewCertificatesClientWithBaseURI creates an instance of the -// CertificatesClient client. +// NewCertificatesClientWithBaseURI creates an instance of the CertificatesClient client. func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) CertificatesClient { return CertificatesClient{NewWithBaseURI(baseURI, subscriptionID)} } // CreateOrUpdate create or update a certificate. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the certificate. certificateEnvelope is details of -// certificate, if it exists already. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the certificate. +// certificateEnvelope is details of certificate, if it exists already. func (client CertificatesClient) CreateOrUpdate(resourceGroupName string, name string, certificateEnvelope Certificate) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -120,8 +117,7 @@ func (client CertificatesClient) CreateOrUpdateResponder(resp *http.Response) (r // Delete delete a certificate. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the certificate. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the certificate. func (client CertificatesClient) Delete(resourceGroupName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -193,8 +189,7 @@ func (client CertificatesClient) DeleteResponder(resp *http.Response) (result au // Get get a certificate. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the certificate. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the certificate. func (client CertificatesClient) Get(resourceGroupName string, name string) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -350,10 +345,54 @@ func (client CertificatesClient) ListNextResults(lastResults CertificateCollecti return } +// ListComplete gets all elements from the list without paging. +func (client CertificatesClient) ListComplete(cancel <-chan struct{}) (<-chan Certificate, <-chan error) { + resultChan := make(chan Certificate) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup get all certificates in a resource group. // -// resourceGroupName is name of the resource group to which the resource -// belongs. +// resourceGroupName is name of the resource group to which the resource belongs. func (client CertificatesClient) ListByResourceGroup(resourceGroupName string) (result CertificateCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -447,11 +486,55 @@ func (client CertificatesClient) ListByResourceGroupNextResults(lastResults Cert return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client CertificatesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Certificate, <-chan error) { + resultChan := make(chan Certificate) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Update create or update a certificate. // -// resourceGroupName is name of the resource group to which the resource -// belongs. name is name of the certificate. certificateEnvelope is details of -// certificate, if it exists already. +// resourceGroupName is name of the resource group to which the resource belongs. name is name of the certificate. +// certificateEnvelope is details of certificate, if it exists already. func (client CertificatesClient) Update(resourceGroupName string, name string, certificateEnvelope Certificate) (result Certificate, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/client.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/client.go index 379919c74..72b9e069a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/client.go @@ -1,6 +1,6 @@ // Package web implements the Azure ARM Web service API version . // -// Composite Swagger for WebSite Management Client +// WebSite Management Client package web // Copyright (c) Microsoft and contributors. All rights reserved. @@ -17,9 +17,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -184,9 +183,8 @@ func (client ManagementClient) GetPublishingUserResponder(resp *http.Response) ( // ListGeoRegions get a list of available geographical regions. // -// sku is name of SKU used to filter the regions. linuxWorkersEnabled is -// specify true if you want to filter to only regions that support -// Linux workers. +// sku is name of SKU used to filter the regions. linuxWorkersEnabled is specify true if you want to +// filter to only regions that support Linux workers. func (client ManagementClient) ListGeoRegions(sku SkuName, linuxWorkersEnabled *bool) (result GeoRegionCollection, err error) { req, err := client.ListGeoRegionsPreparer(sku, linuxWorkersEnabled) if err != nil { @@ -277,6 +275,51 @@ func (client ManagementClient) ListGeoRegionsNextResults(lastResults GeoRegionCo return } +// ListGeoRegionsComplete gets all elements from the list without paging. +func (client ManagementClient) ListGeoRegionsComplete(sku SkuName, linuxWorkersEnabled *bool, cancel <-chan struct{}) (<-chan GeoRegion, <-chan error) { + resultChan := make(chan GeoRegion) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListGeoRegions(sku, linuxWorkersEnabled) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListGeoRegionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListPremierAddOnOffers list all premier add-on offers. func (client ManagementClient) ListPremierAddOnOffers() (result PremierAddOnOfferCollection, err error) { req, err := client.ListPremierAddOnOffersPreparer() @@ -362,6 +405,51 @@ func (client ManagementClient) ListPremierAddOnOffersNextResults(lastResults Pre return } +// ListPremierAddOnOffersComplete gets all elements from the list without paging. +func (client ManagementClient) ListPremierAddOnOffersComplete(cancel <-chan struct{}) (<-chan PremierAddOnOffer, <-chan error) { + resultChan := make(chan PremierAddOnOffer) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListPremierAddOnOffers() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListPremierAddOnOffersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListSkus list all SKUs. func (client ManagementClient) ListSkus() (result SkuInfos, err error) { req, err := client.ListSkusPreparer() @@ -504,11 +592,55 @@ func (client ManagementClient) ListSourceControlsNextResults(lastResults SourceC return } +// ListSourceControlsComplete gets all elements from the list without paging. +func (client ManagementClient) ListSourceControlsComplete(cancel <-chan struct{}) (<-chan SourceControl, <-chan error) { + resultChan := make(chan SourceControl) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListSourceControls() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListSourceControlsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // Move move resources between resource groups. // -// resourceGroupName is name of the resource group to which the resource -// belongs. moveResourceEnvelope is object that represents the resource to -// move. +// resourceGroupName is name of the resource group to which the resource belongs. moveResourceEnvelope is object that +// represents the resource to move. func (client ManagementClient) Move(resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -648,8 +780,7 @@ func (client ManagementClient) UpdatePublishingUserResponder(resp *http.Response // UpdateSourceControl updates source control token // -// sourceControlType is type of source control requestMessage is source control -// token information +// sourceControlType is type of source control requestMessage is source control token information func (client ManagementClient) UpdateSourceControl(sourceControlType string, requestMessage SourceControl) (result SourceControl, err error) { req, err := client.UpdateSourceControlPreparer(sourceControlType, requestMessage) if err != nil { @@ -714,8 +845,8 @@ func (client ManagementClient) UpdateSourceControlResponder(resp *http.Response) // Validate validate if a resource can be created. // -// resourceGroupName is name of the resource group to which the resource -// belongs. validateRequest is request with the resources to validate. +// resourceGroupName is name of the resource group to which the resource belongs. validateRequest is request with the +// resources to validate. func (client ManagementClient) Validate(resourceGroupName string, validateRequest ValidateRequest) (result ValidateResponse, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -796,9 +927,8 @@ func (client ManagementClient) ValidateResponder(resp *http.Response) (result Va // ValidateMove validate whether a resource can be moved. // -// resourceGroupName is name of the resource group to which the resource -// belongs. moveResourceEnvelope is object that represents the resource to -// move. +// resourceGroupName is name of the resource group to which the resource belongs. moveResourceEnvelope is object that +// represents the resource to move. func (client ManagementClient) ValidateMove(resourceGroupName string, moveResourceEnvelope CsmMoveResourceEnvelope) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -874,3 +1004,69 @@ func (client ManagementClient) ValidateMoveResponder(resp *http.Response) (resul result.Response = resp return } + +// VerifyHostingEnvironmentVnet verifies if this VNET is compatible with an App Service Environment by analyzing the +// Network Security Group rules. +// +// parameters is VNET information +func (client ManagementClient) VerifyHostingEnvironmentVnet(parameters VnetParameters) (result VnetValidationFailureDetails, err error) { + req, err := client.VerifyHostingEnvironmentVnetPreparer(parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "web.ManagementClient", "VerifyHostingEnvironmentVnet", nil, "Failure preparing request") + return + } + + resp, err := client.VerifyHostingEnvironmentVnetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.ManagementClient", "VerifyHostingEnvironmentVnet", resp, "Failure sending request") + return + } + + result, err = client.VerifyHostingEnvironmentVnetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.ManagementClient", "VerifyHostingEnvironmentVnet", resp, "Failure responding to request") + } + + return +} + +// VerifyHostingEnvironmentVnetPreparer prepares the VerifyHostingEnvironmentVnet request. +func (client ManagementClient) VerifyHostingEnvironmentVnetPreparer(parameters VnetParameters) (*http.Request, error) { + pathParameters := map[string]interface{}{ + "subscriptionId": autorest.Encode("path", client.SubscriptionID), + } + + const APIVersion = "2016-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// VerifyHostingEnvironmentVnetSender sends the VerifyHostingEnvironmentVnet request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) VerifyHostingEnvironmentVnetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// VerifyHostingEnvironmentVnetResponder handles the response to the VerifyHostingEnvironmentVnet request. The method always +// closes the http.Response Body. +func (client ManagementClient) VerifyHostingEnvironmentVnetResponder(resp *http.Response) (result VnetValidationFailureDetails, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/deletedwebapps.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/deletedwebapps.go index 7ea24e8ab..b9f08518f 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/deletedwebapps.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/deletedwebapps.go @@ -14,30 +14,26 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/validation" "net/http" ) -// DeletedWebAppsClient is the composite Swagger for WebSite Management Client +// DeletedWebAppsClient is the webSite Management Client type DeletedWebAppsClient struct { ManagementClient } -// NewDeletedWebAppsClient creates an instance of the DeletedWebAppsClient -// client. +// NewDeletedWebAppsClient creates an instance of the DeletedWebAppsClient client. func NewDeletedWebAppsClient(subscriptionID string) DeletedWebAppsClient { return NewDeletedWebAppsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewDeletedWebAppsClientWithBaseURI creates an instance of the -// DeletedWebAppsClient client. +// NewDeletedWebAppsClientWithBaseURI creates an instance of the DeletedWebAppsClient client. func NewDeletedWebAppsClientWithBaseURI(baseURI string, subscriptionID string) DeletedWebAppsClient { return DeletedWebAppsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -77,7 +73,7 @@ func (client DeletedWebAppsClient) ListPreparer() (*http.Request, error) { } preparer := autorest.CreatePreparer( - autorest.AsPost(), + autorest.AsGet(), autorest.WithBaseURL(client.BaseURI), autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites", pathParameters), autorest.WithQueryParameters(queryParameters)) @@ -127,99 +123,47 @@ func (client DeletedWebAppsClient) ListNextResults(lastResults DeletedWebAppColl return } -// ListByResourceGroup gets deleted web apps in subscription. -// -// resourceGroupName is name of the resource group to which the resource -// belongs. -func (client DeletedWebAppsClient) ListByResourceGroup(resourceGroupName string) (result DeletedWebAppCollection, err error) { - if err := validation.Validate([]validation.Validation{ - {TargetValue: resourceGroupName, - Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil}, - {Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}, - {Target: "resourceGroupName", Name: validation.Pattern, Rule: `^[-\w\._\(\)]+[^\.]$`, Chain: nil}}}}); err != nil { - return result, validation.NewErrorWithValidationError(err, "web.DeletedWebAppsClient", "ListByResourceGroup") - } - - req, err := client.ListByResourceGroupPreparer(resourceGroupName) - if err != nil { - err = autorest.NewErrorWithError(err, "web.DeletedWebAppsClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "web.DeletedWebAppsClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.DeletedWebAppsClient", "ListByResourceGroup", resp, "Failure responding to request") - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client DeletedWebAppsClient) ListByResourceGroupPreparer(resourceGroupName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2016-03-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/deletedSites", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare(&http.Request{}) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client DeletedWebAppsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return autorest.SendWithSender(client, req) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client DeletedWebAppsClient) ListByResourceGroupResponder(resp *http.Response) (result DeletedWebAppCollection, err error) { - err = autorest.Respond( - resp, - client.ByInspecting(), - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListByResourceGroupNextResults retrieves the next set of results, if any. -func (client DeletedWebAppsClient) ListByResourceGroupNextResults(lastResults DeletedWebAppCollection) (result DeletedWebAppCollection, err error) { - req, err := lastResults.DeletedWebAppCollectionPreparer() - if err != nil { - return result, autorest.NewErrorWithError(err, "web.DeletedWebAppsClient", "ListByResourceGroup", nil, "Failure preparing next results request") - } - if req == nil { - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "web.DeletedWebAppsClient", "ListByResourceGroup", resp, "Failure sending next results request") - } - - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "web.DeletedWebAppsClient", "ListByResourceGroup", resp, "Failure responding to next results request") - } - - return +// ListComplete gets all elements from the list without paging. +func (client DeletedWebAppsClient) ListComplete(cancel <-chan struct{}) (<-chan DeletedSite, <-chan error) { + resultChan := make(chan DeletedSite) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/domains.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/domains.go index fba3c1d1f..63e43b550 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/domains.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/domains.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,7 +24,7 @@ import ( "net/http" ) -// DomainsClient is the composite Swagger for WebSite Management Client +// DomainsClient is the webSite Management Client type DomainsClient struct { ManagementClient } @@ -105,14 +104,11 @@ func (client DomainsClient) CheckAvailabilityResponder(resp *http.Response) (res return } -// CreateOrUpdate creates or updates a domain. This method may poll for -// completion. Polling can be canceled by passing the cancel channel argument. -// The channel will be used to cancel polling and any outstanding HTTP -// requests. +// CreateOrUpdate creates or updates a domain. This method may poll for completion. Polling can be canceled by passing +// the cancel channel argument. The channel will be used to cancel polling and any outstanding HTTP requests. // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of the domain. domain is domain registration -// information. +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of the domain. +// domain is domain registration information. func (client DomainsClient) CreateOrUpdate(resourceGroupName string, domainName string, domain Domain, cancel <-chan struct{}) (<-chan Domain, <-chan error) { resultChan := make(chan Domain, 1) errChan := make(chan error, 1) @@ -188,8 +184,10 @@ func (client DomainsClient) CreateOrUpdate(resourceGroupName string, domainName var err error var result Domain defer func() { + if err != nil { + errChan <- err + } resultChan <- result - errChan <- err close(resultChan) close(errChan) }() @@ -258,13 +256,11 @@ func (client DomainsClient) CreateOrUpdateResponder(resp *http.Response) (result return } -// CreateOrUpdateOwnershipIdentifier creates an ownership identifier for a -// domain or updates identifier details for an existing identifer +// CreateOrUpdateOwnershipIdentifier creates an ownership identifier for a domain or updates identifier details for an +// existing identifer // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of domain. name is name of identifier. -// domainOwnershipIdentifier is a JSON representation of the domain ownership -// properties. +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of domain. name is +// name of identifier. domainOwnershipIdentifier is a JSON representation of the domain ownership properties. func (client DomainsClient) CreateOrUpdateOwnershipIdentifier(resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier) (result DomainOwnershipIdentifier, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -340,9 +336,8 @@ func (client DomainsClient) CreateOrUpdateOwnershipIdentifierResponder(resp *htt // Delete delete a domain. // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of the domain. forceHardDeleteDomain is specify -// true to delete the domain immediately. The default is +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of the domain. +// forceHardDeleteDomain is specify true to delete the domain immediately. The default is // false which deletes the domain after 24 hours. func (client DomainsClient) Delete(resourceGroupName string, domainName string, forceHardDeleteDomain *bool) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ @@ -418,8 +413,8 @@ func (client DomainsClient) DeleteResponder(resp *http.Response) (result autores // DeleteOwnershipIdentifier delete ownership identifier for domain // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of domain. name is name of identifier. +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of domain. name is +// name of identifier. func (client DomainsClient) DeleteOwnershipIdentifier(resourceGroupName string, domainName string, name string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -492,8 +487,7 @@ func (client DomainsClient) DeleteOwnershipIdentifierResponder(resp *http.Respon // Get get a domain. // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of the domain. +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of the domain. func (client DomainsClient) Get(resourceGroupName string, domainName string) (result Domain, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -564,8 +558,7 @@ func (client DomainsClient) GetResponder(resp *http.Response) (result Domain, er return } -// GetControlCenterSsoRequest generate a single sign-on request for the domain -// management portal. +// GetControlCenterSsoRequest generate a single sign-on request for the domain management portal. func (client DomainsClient) GetControlCenterSsoRequest() (result DomainControlCenterSsoRequest, err error) { req, err := client.GetControlCenterSsoRequestPreparer() if err != nil { @@ -628,8 +621,8 @@ func (client DomainsClient) GetControlCenterSsoRequestResponder(resp *http.Respo // GetOwnershipIdentifier get ownership identifier for domain // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of domain. name is name of identifier. +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of domain. name is +// name of identifier. func (client DomainsClient) GetOwnershipIdentifier(resourceGroupName string, domainName string, name string) (result DomainOwnershipIdentifier, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -786,10 +779,54 @@ func (client DomainsClient) ListNextResults(lastResults DomainCollection) (resul return } +// ListComplete gets all elements from the list without paging. +func (client DomainsClient) ListComplete(cancel <-chan struct{}) (<-chan Domain, <-chan error) { + resultChan := make(chan Domain) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListByResourceGroup get all domains in a resource group. // -// resourceGroupName is name of the resource group to which the resource -// belongs. +// resourceGroupName is name of the resource group to which the resource belongs. func (client DomainsClient) ListByResourceGroup(resourceGroupName string) (result DomainCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -883,10 +920,54 @@ func (client DomainsClient) ListByResourceGroupNextResults(lastResults DomainCol return } +// ListByResourceGroupComplete gets all elements from the list without paging. +func (client DomainsClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Domain, <-chan error) { + resultChan := make(chan Domain) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListByResourceGroup(resourceGroupName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListByResourceGroupNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListOwnershipIdentifiers lists domain ownership identifiers. // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of domain. +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of domain. func (client DomainsClient) ListOwnershipIdentifiers(resourceGroupName string, domainName string) (result DomainOwnershipIdentifierCollection, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -981,6 +1062,51 @@ func (client DomainsClient) ListOwnershipIdentifiersNextResults(lastResults Doma return } +// ListOwnershipIdentifiersComplete gets all elements from the list without paging. +func (client DomainsClient) ListOwnershipIdentifiersComplete(resourceGroupName string, domainName string, cancel <-chan struct{}) (<-chan DomainOwnershipIdentifier, <-chan error) { + resultChan := make(chan DomainOwnershipIdentifier) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListOwnershipIdentifiers(resourceGroupName, domainName) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListOwnershipIdentifiersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + // ListRecommendations get domain name recommendations based on keywords. // // parameters is search parameters for domain name recommendations. @@ -1070,13 +1196,56 @@ func (client DomainsClient) ListRecommendationsNextResults(lastResults NameIdent return } -// UpdateOwnershipIdentifier creates an ownership identifier for a domain or -// updates identifier details for an existing identifer +// ListRecommendationsComplete gets all elements from the list without paging. +func (client DomainsClient) ListRecommendationsComplete(parameters DomainRecommendationSearchParameters, cancel <-chan struct{}) (<-chan NameIdentifier, <-chan error) { + resultChan := make(chan NameIdentifier) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListRecommendations(parameters) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListRecommendationsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// UpdateOwnershipIdentifier creates an ownership identifier for a domain or updates identifier details for an existing +// identifer // -// resourceGroupName is name of the resource group to which the resource -// belongs. domainName is name of domain. name is name of identifier. -// domainOwnershipIdentifier is a JSON representation of the domain ownership -// properties. +// resourceGroupName is name of the resource group to which the resource belongs. domainName is name of domain. name is +// name of identifier. domainOwnershipIdentifier is a JSON representation of the domain ownership properties. func (client DomainsClient) UpdateOwnershipIdentifier(resourceGroupName string, domainName string, name string, domainOwnershipIdentifier DomainOwnershipIdentifier) (result DomainOwnershipIdentifier, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/models.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/models.go index 005ade8c6..ff7cf80ee 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/models.go @@ -14,21 +14,19 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "io" "net/http" ) -// AccessControlEntryAction enumerates the values for access control entry -// action. +// AccessControlEntryAction enumerates the values for access control entry action. type AccessControlEntryAction string const ( @@ -38,8 +36,7 @@ const ( Permit AccessControlEntryAction = "Permit" ) -// AppServicePlanRestrictions enumerates the values for app service plan -// restrictions. +// AppServicePlanRestrictions enumerates the values for app service plan restrictions. type AppServicePlanRestrictions string const ( @@ -61,8 +58,7 @@ const ( type AutoHealActionType string const ( - // CustomAction specifies the custom action state for auto heal action - // type. + // CustomAction specifies the custom action state for auto heal action type. CustomAction AutoHealActionType = "CustomAction" // LogEvent specifies the log event state for auto heal action type. LogEvent AutoHealActionType = "LogEvent" @@ -74,8 +70,7 @@ const ( type AzureResourceType string const ( - // TrafficManager specifies the traffic manager state for azure resource - // type. + // TrafficManager specifies the traffic manager state for azure resource type. TrafficManager AzureResourceType = "TrafficManager" // Website specifies the website state for azure resource type. Website AzureResourceType = "Website" @@ -91,15 +86,13 @@ const ( Deleted BackupItemStatus = "Deleted" // DeleteFailed specifies the delete failed state for backup item status. DeleteFailed BackupItemStatus = "DeleteFailed" - // DeleteInProgress specifies the delete in progress state for backup item - // status. + // DeleteInProgress specifies the delete in progress state for backup item status. DeleteInProgress BackupItemStatus = "DeleteInProgress" // Failed specifies the failed state for backup item status. Failed BackupItemStatus = "Failed" // InProgress specifies the in progress state for backup item status. InProgress BackupItemStatus = "InProgress" - // PartiallySucceeded specifies the partially succeeded state for backup - // item status. + // PartiallySucceeded specifies the partially succeeded state for backup item status. PartiallySucceeded BackupItemStatus = "PartiallySucceeded" // Skipped specifies the skipped state for backup item status. Skipped BackupItemStatus = "Skipped" @@ -109,81 +102,67 @@ const ( TimedOut BackupItemStatus = "TimedOut" ) -// BackupRestoreOperationType enumerates the values for backup restore -// operation type. +// BackupRestoreOperationType enumerates the values for backup restore operation type. type BackupRestoreOperationType string const ( - // Clone specifies the clone state for backup restore operation type. - Clone BackupRestoreOperationType = "Clone" - // Default specifies the default state for backup restore operation type. - Default BackupRestoreOperationType = "Default" - // Relocation specifies the relocation state for backup restore operation + // BackupRestoreOperationTypeClone specifies the backup restore operation type clone state for backup restore operation // type. - Relocation BackupRestoreOperationType = "Relocation" + BackupRestoreOperationTypeClone BackupRestoreOperationType = "Clone" + // BackupRestoreOperationTypeDefault specifies the backup restore operation type default state for backup restore + // operation type. + BackupRestoreOperationTypeDefault BackupRestoreOperationType = "Default" + // BackupRestoreOperationTypeRelocation specifies the backup restore operation type relocation state for backup restore + // operation type. + BackupRestoreOperationTypeRelocation BackupRestoreOperationType = "Relocation" + // BackupRestoreOperationTypeSnapshot specifies the backup restore operation type snapshot state for backup restore + // operation type. + BackupRestoreOperationTypeSnapshot BackupRestoreOperationType = "Snapshot" ) -// BuiltInAuthenticationProvider enumerates the values for built in -// authentication provider. +// BuiltInAuthenticationProvider enumerates the values for built in authentication provider. type BuiltInAuthenticationProvider string const ( - // AzureActiveDirectory specifies the azure active directory state for - // built in authentication provider. + // AzureActiveDirectory specifies the azure active directory state for built in authentication provider. AzureActiveDirectory BuiltInAuthenticationProvider = "AzureActiveDirectory" - // Facebook specifies the facebook state for built in authentication - // provider. + // Facebook specifies the facebook state for built in authentication provider. Facebook BuiltInAuthenticationProvider = "Facebook" // Google specifies the google state for built in authentication provider. Google BuiltInAuthenticationProvider = "Google" - // MicrosoftAccount specifies the microsoft account state for built in - // authentication provider. + // MicrosoftAccount specifies the microsoft account state for built in authentication provider. MicrosoftAccount BuiltInAuthenticationProvider = "MicrosoftAccount" - // Twitter specifies the twitter state for built in authentication - // provider. + // Twitter specifies the twitter state for built in authentication provider. Twitter BuiltInAuthenticationProvider = "Twitter" ) -// CertificateOrderActionType enumerates the values for certificate order -// action type. +// CertificateOrderActionType enumerates the values for certificate order action type. type CertificateOrderActionType string const ( - // CertificateExpirationWarning specifies the certificate expiration - // warning state for certificate order action type. + // CertificateExpirationWarning specifies the certificate expiration warning state for certificate order action type. CertificateExpirationWarning CertificateOrderActionType = "CertificateExpirationWarning" - // CertificateExpired specifies the certificate expired state for - // certificate order action type. + // CertificateExpired specifies the certificate expired state for certificate order action type. CertificateExpired CertificateOrderActionType = "CertificateExpired" - // CertificateIssued specifies the certificate issued state for certificate - // order action type. + // CertificateIssued specifies the certificate issued state for certificate order action type. CertificateIssued CertificateOrderActionType = "CertificateIssued" - // CertificateOrderCanceled specifies the certificate order canceled state - // for certificate order action type. + // CertificateOrderCanceled specifies the certificate order canceled state for certificate order action type. CertificateOrderCanceled CertificateOrderActionType = "CertificateOrderCanceled" - // CertificateOrderCreated specifies the certificate order created state - // for certificate order action type. + // CertificateOrderCreated specifies the certificate order created state for certificate order action type. CertificateOrderCreated CertificateOrderActionType = "CertificateOrderCreated" - // CertificateRevoked specifies the certificate revoked state for - // certificate order action type. + // CertificateRevoked specifies the certificate revoked state for certificate order action type. CertificateRevoked CertificateOrderActionType = "CertificateRevoked" - // DomainValidationComplete specifies the domain validation complete state - // for certificate order action type. + // DomainValidationComplete specifies the domain validation complete state for certificate order action type. DomainValidationComplete CertificateOrderActionType = "DomainValidationComplete" - // FraudCleared specifies the fraud cleared state for certificate order - // action type. + // FraudCleared specifies the fraud cleared state for certificate order action type. FraudCleared CertificateOrderActionType = "FraudCleared" - // FraudDetected specifies the fraud detected state for certificate order - // action type. + // FraudDetected specifies the fraud detected state for certificate order action type. FraudDetected CertificateOrderActionType = "FraudDetected" - // FraudDocumentationRequired specifies the fraud documentation required - // state for certificate order action type. + // FraudDocumentationRequired specifies the fraud documentation required state for certificate order action type. FraudDocumentationRequired CertificateOrderActionType = "FraudDocumentationRequired" - // OrgNameChange specifies the org name change state for certificate order - // action type. + // OrgNameChange specifies the org name change state for certificate order action type. OrgNameChange CertificateOrderActionType = "OrgNameChange" - // OrgValidationComplete specifies the org validation complete state for - // certificate order action type. + // OrgValidationComplete specifies the org validation complete state for certificate order action type. OrgValidationComplete CertificateOrderActionType = "OrgValidationComplete" // SanDrop specifies the san drop state for certificate order action type. SanDrop CertificateOrderActionType = "SanDrop" @@ -203,17 +182,13 @@ const ( Expired CertificateOrderStatus = "Expired" // Issued specifies the issued state for certificate order status. Issued CertificateOrderStatus = "Issued" - // NotSubmitted specifies the not submitted state for certificate order - // status. + // NotSubmitted specifies the not submitted state for certificate order status. NotSubmitted CertificateOrderStatus = "NotSubmitted" - // Pendingissuance specifies the pendingissuance state for certificate - // order status. + // Pendingissuance specifies the pendingissuance state for certificate order status. Pendingissuance CertificateOrderStatus = "Pendingissuance" - // PendingRekey specifies the pending rekey state for certificate order - // status. + // PendingRekey specifies the pending rekey state for certificate order status. PendingRekey CertificateOrderStatus = "PendingRekey" - // Pendingrevocation specifies the pendingrevocation state for certificate - // order status. + // Pendingrevocation specifies the pendingrevocation state for certificate order status. Pendingrevocation CertificateOrderStatus = "Pendingrevocation" // Revoked specifies the revoked state for certificate order status. Revoked CertificateOrderStatus = "Revoked" @@ -225,11 +200,10 @@ const ( type CertificateProductType string const ( - // StandardDomainValidatedSsl specifies the standard domain validated ssl - // state for certificate product type. + // StandardDomainValidatedSsl specifies the standard domain validated ssl state for certificate product type. StandardDomainValidatedSsl CertificateProductType = "StandardDomainValidatedSsl" - // StandardDomainValidatedWildCardSsl specifies the standard domain - // validated wild card ssl state for certificate product type. + // StandardDomainValidatedWildCardSsl specifies the standard domain validated wild card ssl state for certificate + // product type. StandardDomainValidatedWildCardSsl CertificateProductType = "StandardDomainValidatedWildCardSsl" ) @@ -253,14 +227,12 @@ const ( type CheckNameResourceTypes string const ( - // CheckNameResourceTypesHostingEnvironment specifies the check name - // resource types hosting environment state for check name resource types. + // CheckNameResourceTypesHostingEnvironment specifies the check name resource types hosting environment state for check + // name resource types. CheckNameResourceTypesHostingEnvironment CheckNameResourceTypes = "HostingEnvironment" - // CheckNameResourceTypesSite specifies the check name resource types site - // state for check name resource types. + // CheckNameResourceTypesSite specifies the check name resource types site state for check name resource types. CheckNameResourceTypesSite CheckNameResourceTypes = "Site" - // CheckNameResourceTypesSlot specifies the check name resource types slot - // state for check name resource types. + // CheckNameResourceTypesSlot specifies the check name resource types slot state for check name resource types. CheckNameResourceTypesSlot CheckNameResourceTypes = "Slot" ) @@ -272,8 +244,7 @@ const ( Cloneable CloneAbilityResult = "Cloneable" // NotCloneable specifies the not cloneable state for clone ability result. NotCloneable CloneAbilityResult = "NotCloneable" - // PartiallyCloneable specifies the partially cloneable state for clone - // ability result. + // PartiallyCloneable specifies the partially cloneable state for clone ability result. PartiallyCloneable CloneAbilityResult = "PartiallyCloneable" ) @@ -281,14 +252,11 @@ const ( type ComputeModeOptions string const ( - // ComputeModeOptionsDedicated specifies the compute mode options dedicated - // state for compute mode options. + // ComputeModeOptionsDedicated specifies the compute mode options dedicated state for compute mode options. ComputeModeOptionsDedicated ComputeModeOptions = "Dedicated" - // ComputeModeOptionsDynamic specifies the compute mode options dynamic - // state for compute mode options. + // ComputeModeOptionsDynamic specifies the compute mode options dynamic state for compute mode options. ComputeModeOptionsDynamic ComputeModeOptions = "Dynamic" - // ComputeModeOptionsShared specifies the compute mode options shared state - // for compute mode options. + // ComputeModeOptionsShared specifies the compute mode options shared state for compute mode options. ComputeModeOptionsShared ComputeModeOptions = "Shared" ) @@ -306,8 +274,7 @@ const ( EventHub ConnectionStringType = "EventHub" // MySQL specifies the my sql state for connection string type. MySQL ConnectionStringType = "MySql" - // NotificationHub specifies the notification hub state for connection - // string type. + // NotificationHub specifies the notification hub state for connection string type. NotificationHub ConnectionStringType = "NotificationHub" // PostgreSQL specifies the postgre sql state for connection string type. PostgreSQL ConnectionStringType = "PostgreSQL" @@ -321,8 +288,23 @@ const ( SQLServer ConnectionStringType = "SQLServer" ) -// CustomHostNameDNSRecordType enumerates the values for custom host name dns -// record type. +// ContinuousWebJobStatus enumerates the values for continuous web job status. +type ContinuousWebJobStatus string + +const ( + // Initializing specifies the initializing state for continuous web job status. + Initializing ContinuousWebJobStatus = "Initializing" + // PendingRestart specifies the pending restart state for continuous web job status. + PendingRestart ContinuousWebJobStatus = "PendingRestart" + // Running specifies the running state for continuous web job status. + Running ContinuousWebJobStatus = "Running" + // Starting specifies the starting state for continuous web job status. + Starting ContinuousWebJobStatus = "Starting" + // Stopped specifies the stopped state for continuous web job status. + Stopped ContinuousWebJobStatus = "Stopped" +) + +// CustomHostNameDNSRecordType enumerates the values for custom host name dns record type. type CustomHostNameDNSRecordType string const ( @@ -336,17 +318,13 @@ const ( type DatabaseType string const ( - // DatabaseTypeLocalMySQL specifies the database type local my sql state - // for database type. + // DatabaseTypeLocalMySQL specifies the database type local my sql state for database type. DatabaseTypeLocalMySQL DatabaseType = "LocalMySql" - // DatabaseTypeMySQL specifies the database type my sql state for database - // type. + // DatabaseTypeMySQL specifies the database type my sql state for database type. DatabaseTypeMySQL DatabaseType = "MySql" - // DatabaseTypePostgreSQL specifies the database type postgre sql state for - // database type. + // DatabaseTypePostgreSQL specifies the database type postgre sql state for database type. DatabaseTypePostgreSQL DatabaseType = "PostgreSql" - // DatabaseTypeSQLAzure specifies the database type sql azure state for - // database type. + // DatabaseTypeSQLAzure specifies the database type sql azure state for database type. DatabaseTypeSQLAzure DatabaseType = "SqlAzure" ) @@ -356,24 +334,22 @@ type DNSType string const ( // AzureDNS specifies the azure dns state for dns type. AzureDNS DNSType = "AzureDns" - // DefaultDomainRegistrarDNS specifies the default domain registrar dns - // state for dns type. + // DefaultDomainRegistrarDNS specifies the default domain registrar dns state for dns type. DefaultDomainRegistrarDNS DNSType = "DefaultDomainRegistrarDns" ) -// DNSVerificationTestResult enumerates the values for dns verification test -// result. +// DNSVerificationTestResult enumerates the values for dns verification test result. type DNSVerificationTestResult string const ( - // DNSVerificationTestResultFailed specifies the dns verification test - // result failed state for dns verification test result. + // DNSVerificationTestResultFailed specifies the dns verification test result failed state for dns verification test + // result. DNSVerificationTestResultFailed DNSVerificationTestResult = "Failed" - // DNSVerificationTestResultPassed specifies the dns verification test - // result passed state for dns verification test result. + // DNSVerificationTestResultPassed specifies the dns verification test result passed state for dns verification test + // result. DNSVerificationTestResultPassed DNSVerificationTestResult = "Passed" - // DNSVerificationTestResultSkipped specifies the dns verification test - // result skipped state for dns verification test result. + // DNSVerificationTestResultSkipped specifies the dns verification test result skipped state for dns verification test + // result. DNSVerificationTestResultSkipped DNSVerificationTestResult = "Skipped" ) @@ -381,68 +357,47 @@ const ( type DomainStatus string const ( - // DomainStatusActive specifies the domain status active state for domain - // status. + // DomainStatusActive specifies the domain status active state for domain status. DomainStatusActive DomainStatus = "Active" - // DomainStatusAwaiting specifies the domain status awaiting state for - // domain status. + // DomainStatusAwaiting specifies the domain status awaiting state for domain status. DomainStatusAwaiting DomainStatus = "Awaiting" - // DomainStatusCancelled specifies the domain status cancelled state for - // domain status. + // DomainStatusCancelled specifies the domain status cancelled state for domain status. DomainStatusCancelled DomainStatus = "Cancelled" - // DomainStatusConfiscated specifies the domain status confiscated state - // for domain status. + // DomainStatusConfiscated specifies the domain status confiscated state for domain status. DomainStatusConfiscated DomainStatus = "Confiscated" - // DomainStatusDisabled specifies the domain status disabled state for - // domain status. + // DomainStatusDisabled specifies the domain status disabled state for domain status. DomainStatusDisabled DomainStatus = "Disabled" - // DomainStatusExcluded specifies the domain status excluded state for - // domain status. + // DomainStatusExcluded specifies the domain status excluded state for domain status. DomainStatusExcluded DomainStatus = "Excluded" - // DomainStatusExpired specifies the domain status expired state for domain - // status. + // DomainStatusExpired specifies the domain status expired state for domain status. DomainStatusExpired DomainStatus = "Expired" - // DomainStatusFailed specifies the domain status failed state for domain - // status. + // DomainStatusFailed specifies the domain status failed state for domain status. DomainStatusFailed DomainStatus = "Failed" - // DomainStatusHeld specifies the domain status held state for domain - // status. + // DomainStatusHeld specifies the domain status held state for domain status. DomainStatusHeld DomainStatus = "Held" - // DomainStatusJSONConverterFailed specifies the domain status json - // converter failed state for domain status. + // DomainStatusJSONConverterFailed specifies the domain status json converter failed state for domain status. DomainStatusJSONConverterFailed DomainStatus = "JsonConverterFailed" - // DomainStatusLocked specifies the domain status locked state for domain - // status. + // DomainStatusLocked specifies the domain status locked state for domain status. DomainStatusLocked DomainStatus = "Locked" - // DomainStatusParked specifies the domain status parked state for domain - // status. + // DomainStatusParked specifies the domain status parked state for domain status. DomainStatusParked DomainStatus = "Parked" - // DomainStatusPending specifies the domain status pending state for domain - // status. + // DomainStatusPending specifies the domain status pending state for domain status. DomainStatusPending DomainStatus = "Pending" - // DomainStatusReserved specifies the domain status reserved state for - // domain status. + // DomainStatusReserved specifies the domain status reserved state for domain status. DomainStatusReserved DomainStatus = "Reserved" - // DomainStatusReverted specifies the domain status reverted state for - // domain status. + // DomainStatusReverted specifies the domain status reverted state for domain status. DomainStatusReverted DomainStatus = "Reverted" - // DomainStatusSuspended specifies the domain status suspended state for - // domain status. + // DomainStatusSuspended specifies the domain status suspended state for domain status. DomainStatusSuspended DomainStatus = "Suspended" - // DomainStatusTransferred specifies the domain status transferred state - // for domain status. + // DomainStatusTransferred specifies the domain status transferred state for domain status. DomainStatusTransferred DomainStatus = "Transferred" - // DomainStatusUnknown specifies the domain status unknown state for domain - // status. + // DomainStatusUnknown specifies the domain status unknown state for domain status. DomainStatusUnknown DomainStatus = "Unknown" - // DomainStatusUnlocked specifies the domain status unlocked state for - // domain status. + // DomainStatusUnlocked specifies the domain status unlocked state for domain status. DomainStatusUnlocked DomainStatus = "Unlocked" - // DomainStatusUnparked specifies the domain status unparked state for - // domain status. + // DomainStatusUnparked specifies the domain status unparked state for domain status. DomainStatusUnparked DomainStatus = "Unparked" - // DomainStatusUpdated specifies the domain status updated state for domain - // status. + // DomainStatusUpdated specifies the domain status updated state for domain status. DomainStatusUpdated DomainStatus = "Updated" ) @@ -466,8 +421,7 @@ const ( Hour FrequencyUnit = "Hour" ) -// HostingEnvironmentStatus enumerates the values for hosting environment -// status. +// HostingEnvironmentStatus enumerates the values for hosting environment status. type HostingEnvironmentStatus string const ( @@ -495,82 +449,79 @@ const ( type HostType string const ( - // HostTypeRepository specifies the host type repository state for host - // type. + // HostTypeRepository specifies the host type repository state for host type. HostTypeRepository HostType = "Repository" // HostTypeStandard specifies the host type standard state for host type. HostTypeStandard HostType = "Standard" ) -// InAvailabilityReasonType enumerates the values for in availability reason -// type. +// InAvailabilityReasonType enumerates the values for in availability reason type. type InAvailabilityReasonType string const ( - // AlreadyExists specifies the already exists state for in availability - // reason type. + // AlreadyExists specifies the already exists state for in availability reason type. AlreadyExists InAvailabilityReasonType = "AlreadyExists" // Invalid specifies the invalid state for in availability reason type. Invalid InAvailabilityReasonType = "Invalid" ) -// InternalLoadBalancingMode enumerates the values for internal load balancing -// mode. +// InternalLoadBalancingMode enumerates the values for internal load balancing mode. type InternalLoadBalancingMode string const ( - // InternalLoadBalancingModeNone specifies the internal load balancing mode - // none state for internal load balancing mode. + // InternalLoadBalancingModeNone specifies the internal load balancing mode none state for internal load balancing + // mode. InternalLoadBalancingModeNone InternalLoadBalancingMode = "None" - // InternalLoadBalancingModePublishing specifies the internal load - // balancing mode publishing state for internal load balancing mode. + // InternalLoadBalancingModePublishing specifies the internal load balancing mode publishing state for internal load + // balancing mode. InternalLoadBalancingModePublishing InternalLoadBalancingMode = "Publishing" - // InternalLoadBalancingModeWeb specifies the internal load balancing mode - // web state for internal load balancing mode. + // InternalLoadBalancingModeWeb specifies the internal load balancing mode web state for internal load balancing mode. InternalLoadBalancingModeWeb InternalLoadBalancingMode = "Web" ) +// JobType enumerates the values for job type. +type JobType string + +const ( + // Continuous specifies the continuous state for job type. + Continuous JobType = "Continuous" + // Triggered specifies the triggered state for job type. + Triggered JobType = "Triggered" +) + // KeyVaultSecretStatus enumerates the values for key vault secret status. type KeyVaultSecretStatus string const ( - // KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault specifies - // the key vault secret status azure service unauthorized to access key - // vault state for key vault secret status. + // KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault specifies the key vault secret status azure service + // unauthorized to access key vault state for key vault secret status. KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault KeyVaultSecretStatus = "AzureServiceUnauthorizedToAccessKeyVault" - // KeyVaultSecretStatusCertificateOrderFailed specifies the key vault - // secret status certificate order failed state for key vault secret - // status. + // KeyVaultSecretStatusCertificateOrderFailed specifies the key vault secret status certificate order failed state for + // key vault secret status. KeyVaultSecretStatusCertificateOrderFailed KeyVaultSecretStatus = "CertificateOrderFailed" - // KeyVaultSecretStatusExternalPrivateKey specifies the key vault secret - // status external private key state for key vault secret status. - KeyVaultSecretStatusExternalPrivateKey KeyVaultSecretStatus = "ExternalPrivateKey" - // KeyVaultSecretStatusInitialized specifies the key vault secret status - // initialized state for key vault secret status. - KeyVaultSecretStatusInitialized KeyVaultSecretStatus = "Initialized" - // KeyVaultSecretStatusKeyVaultDoesNotExist specifies the key vault secret - // status key vault does not exist state for key vault secret status. - KeyVaultSecretStatusKeyVaultDoesNotExist KeyVaultSecretStatus = "KeyVaultDoesNotExist" - // KeyVaultSecretStatusKeyVaultSecretDoesNotExist specifies the key vault - // secret status key vault secret does not exist state for key vault secret - // status. - KeyVaultSecretStatusKeyVaultSecretDoesNotExist KeyVaultSecretStatus = "KeyVaultSecretDoesNotExist" - // KeyVaultSecretStatusOperationNotPermittedOnKeyVault specifies the key - // vault secret status operation not permitted on key vault state for key + // KeyVaultSecretStatusExternalPrivateKey specifies the key vault secret status external private key state for key // vault secret status. + KeyVaultSecretStatusExternalPrivateKey KeyVaultSecretStatus = "ExternalPrivateKey" + // KeyVaultSecretStatusInitialized specifies the key vault secret status initialized state for key vault secret status. + KeyVaultSecretStatusInitialized KeyVaultSecretStatus = "Initialized" + // KeyVaultSecretStatusKeyVaultDoesNotExist specifies the key vault secret status key vault does not exist state for + // key vault secret status. + KeyVaultSecretStatusKeyVaultDoesNotExist KeyVaultSecretStatus = "KeyVaultDoesNotExist" + // KeyVaultSecretStatusKeyVaultSecretDoesNotExist specifies the key vault secret status key vault secret does not exist + // state for key vault secret status. + KeyVaultSecretStatusKeyVaultSecretDoesNotExist KeyVaultSecretStatus = "KeyVaultSecretDoesNotExist" + // KeyVaultSecretStatusOperationNotPermittedOnKeyVault specifies the key vault secret status operation not permitted on + // key vault state for key vault secret status. KeyVaultSecretStatusOperationNotPermittedOnKeyVault KeyVaultSecretStatus = "OperationNotPermittedOnKeyVault" - // KeyVaultSecretStatusSucceeded specifies the key vault secret status - // succeeded state for key vault secret status. + // KeyVaultSecretStatusSucceeded specifies the key vault secret status succeeded state for key vault secret status. KeyVaultSecretStatusSucceeded KeyVaultSecretStatus = "Succeeded" - // KeyVaultSecretStatusUnknown specifies the key vault secret status - // unknown state for key vault secret status. + // KeyVaultSecretStatusUnknown specifies the key vault secret status unknown state for key vault secret status. KeyVaultSecretStatusUnknown KeyVaultSecretStatus = "Unknown" - // KeyVaultSecretStatusUnknownError specifies the key vault secret status - // unknown error state for key vault secret status. - KeyVaultSecretStatusUnknownError KeyVaultSecretStatus = "UnknownError" - // KeyVaultSecretStatusWaitingOnCertificateOrder specifies the key vault - // secret status waiting on certificate order state for key vault secret + // KeyVaultSecretStatusUnknownError specifies the key vault secret status unknown error state for key vault secret // status. + KeyVaultSecretStatusUnknownError KeyVaultSecretStatus = "UnknownError" + // KeyVaultSecretStatusWaitingOnCertificateOrder specifies the key vault secret status waiting on certificate order + // state for key vault secret status. KeyVaultSecretStatusWaitingOnCertificateOrder KeyVaultSecretStatus = "WaitingOnCertificateOrder" ) @@ -600,21 +551,61 @@ const ( Integrated ManagedPipelineMode = "Integrated" ) +// MSDeployLogEntryType enumerates the values for ms deploy log entry type. +type MSDeployLogEntryType string + +const ( + // MSDeployLogEntryTypeError specifies the ms deploy log entry type error state for ms deploy log entry type. + MSDeployLogEntryTypeError MSDeployLogEntryType = "Error" + // MSDeployLogEntryTypeMessage specifies the ms deploy log entry type message state for ms deploy log entry type. + MSDeployLogEntryTypeMessage MSDeployLogEntryType = "Message" + // MSDeployLogEntryTypeWarning specifies the ms deploy log entry type warning state for ms deploy log entry type. + MSDeployLogEntryTypeWarning MSDeployLogEntryType = "Warning" +) + +// MSDeployProvisioningState enumerates the values for ms deploy provisioning state. +type MSDeployProvisioningState string + +const ( + // MSDeployProvisioningStateAccepted specifies the ms deploy provisioning state accepted state for ms deploy + // provisioning state. + MSDeployProvisioningStateAccepted MSDeployProvisioningState = "accepted" + // MSDeployProvisioningStateCanceled specifies the ms deploy provisioning state canceled state for ms deploy + // provisioning state. + MSDeployProvisioningStateCanceled MSDeployProvisioningState = "canceled" + // MSDeployProvisioningStateFailed specifies the ms deploy provisioning state failed state for ms deploy provisioning + // state. + MSDeployProvisioningStateFailed MSDeployProvisioningState = "failed" + // MSDeployProvisioningStateRunning specifies the ms deploy provisioning state running state for ms deploy provisioning + // state. + MSDeployProvisioningStateRunning MSDeployProvisioningState = "running" + // MSDeployProvisioningStateSucceeded specifies the ms deploy provisioning state succeeded state for ms deploy + // provisioning state. + MSDeployProvisioningStateSucceeded MSDeployProvisioningState = "succeeded" +) + +// MySQLMigrationType enumerates the values for my sql migration type. +type MySQLMigrationType string + +const ( + // LocalToRemote specifies the local to remote state for my sql migration type. + LocalToRemote MySQLMigrationType = "LocalToRemote" + // RemoteToLocal specifies the remote to local state for my sql migration type. + RemoteToLocal MySQLMigrationType = "RemoteToLocal" +) + // NotificationLevel enumerates the values for notification level. type NotificationLevel string const ( - // NotificationLevelCritical specifies the notification level critical - // state for notification level. + // NotificationLevelCritical specifies the notification level critical state for notification level. NotificationLevelCritical NotificationLevel = "Critical" - // NotificationLevelInformation specifies the notification level - // information state for notification level. + // NotificationLevelInformation specifies the notification level information state for notification level. NotificationLevelInformation NotificationLevel = "Information" - // NotificationLevelNonUrgentSuggestion specifies the notification level - // non urgent suggestion state for notification level. + // NotificationLevelNonUrgentSuggestion specifies the notification level non urgent suggestion state for notification + // level. NotificationLevelNonUrgentSuggestion NotificationLevel = "NonUrgentSuggestion" - // NotificationLevelWarning specifies the notification level warning state - // for notification level. + // NotificationLevelWarning specifies the notification level warning state for notification level. NotificationLevelWarning NotificationLevel = "Warning" ) @@ -622,20 +613,15 @@ const ( type OperationStatus string const ( - // OperationStatusCreated specifies the operation status created state for - // operation status. + // OperationStatusCreated specifies the operation status created state for operation status. OperationStatusCreated OperationStatus = "Created" - // OperationStatusFailed specifies the operation status failed state for - // operation status. + // OperationStatusFailed specifies the operation status failed state for operation status. OperationStatusFailed OperationStatus = "Failed" - // OperationStatusInProgress specifies the operation status in progress - // state for operation status. + // OperationStatusInProgress specifies the operation status in progress state for operation status. OperationStatusInProgress OperationStatus = "InProgress" - // OperationStatusSucceeded specifies the operation status succeeded state - // for operation status. + // OperationStatusSucceeded specifies the operation status succeeded state for operation status. OperationStatusSucceeded OperationStatus = "Succeeded" - // OperationStatusTimedOut specifies the operation status timed out state - // for operation status. + // OperationStatusTimedOut specifies the operation status timed out state for operation status. OperationStatusTimedOut OperationStatus = "TimedOut" ) @@ -643,29 +629,38 @@ const ( type ProvisioningState string const ( - // ProvisioningStateCanceled specifies the provisioning state canceled - // state for provisioning state. + // ProvisioningStateCanceled specifies the provisioning state canceled state for provisioning state. ProvisioningStateCanceled ProvisioningState = "Canceled" - // ProvisioningStateDeleting specifies the provisioning state deleting - // state for provisioning state. + // ProvisioningStateDeleting specifies the provisioning state deleting state for provisioning state. ProvisioningStateDeleting ProvisioningState = "Deleting" - // ProvisioningStateFailed specifies the provisioning state failed state - // for provisioning state. + // ProvisioningStateFailed specifies the provisioning state failed state for provisioning state. ProvisioningStateFailed ProvisioningState = "Failed" - // ProvisioningStateInProgress specifies the provisioning state in progress - // state for provisioning state. + // ProvisioningStateInProgress specifies the provisioning state in progress state for provisioning state. ProvisioningStateInProgress ProvisioningState = "InProgress" - // ProvisioningStateSucceeded specifies the provisioning state succeeded - // state for provisioning state. + // ProvisioningStateSucceeded specifies the provisioning state succeeded state for provisioning state. ProvisioningStateSucceeded ProvisioningState = "Succeeded" ) +// PublicCertificateLocation enumerates the values for public certificate location. +type PublicCertificateLocation string + +const ( + // PublicCertificateLocationCurrentUserMy specifies the public certificate location current user my state for public + // certificate location. + PublicCertificateLocationCurrentUserMy PublicCertificateLocation = "CurrentUserMy" + // PublicCertificateLocationLocalMachineMy specifies the public certificate location local machine my state for public + // certificate location. + PublicCertificateLocationLocalMachineMy PublicCertificateLocation = "LocalMachineMy" + // PublicCertificateLocationUnknown specifies the public certificate location unknown state for public certificate + // location. + PublicCertificateLocationUnknown PublicCertificateLocation = "Unknown" +) + // PublishingProfileFormat enumerates the values for publishing profile format. type PublishingProfileFormat string const ( - // FileZilla3 specifies the file zilla 3 state for publishing profile - // format. + // FileZilla3 specifies the file zilla 3 state for publishing profile format. FileZilla3 PublishingProfileFormat = "FileZilla3" // Ftp specifies the ftp state for publishing profile format. Ftp PublishingProfileFormat = "Ftp" @@ -701,22 +696,17 @@ const ( type ScmType string const ( - // ScmTypeBitbucketGit specifies the scm type bitbucket git state for scm - // type. + // ScmTypeBitbucketGit specifies the scm type bitbucket git state for scm type. ScmTypeBitbucketGit ScmType = "BitbucketGit" - // ScmTypeBitbucketHg specifies the scm type bitbucket hg state for scm - // type. + // ScmTypeBitbucketHg specifies the scm type bitbucket hg state for scm type. ScmTypeBitbucketHg ScmType = "BitbucketHg" - // ScmTypeCodePlexGit specifies the scm type code plex git state for scm - // type. + // ScmTypeCodePlexGit specifies the scm type code plex git state for scm type. ScmTypeCodePlexGit ScmType = "CodePlexGit" - // ScmTypeCodePlexHg specifies the scm type code plex hg state for scm - // type. + // ScmTypeCodePlexHg specifies the scm type code plex hg state for scm type. ScmTypeCodePlexHg ScmType = "CodePlexHg" // ScmTypeDropbox specifies the scm type dropbox state for scm type. ScmTypeDropbox ScmType = "Dropbox" - // ScmTypeExternalGit specifies the scm type external git state for scm - // type. + // ScmTypeExternalGit specifies the scm type external git state for scm type. ScmTypeExternalGit ScmType = "ExternalGit" // ScmTypeExternalHg specifies the scm type external hg state for scm type. ScmTypeExternalHg ScmType = "ExternalHg" @@ -738,8 +728,7 @@ const ( type SiteAvailabilityState string const ( - // DisasterRecoveryMode specifies the disaster recovery mode state for site - // availability state. + // DisasterRecoveryMode specifies the disaster recovery mode state for site availability state. DisasterRecoveryMode SiteAvailabilityState = "DisasterRecoveryMode" // Limited specifies the limited state for site availability state. Limited SiteAvailabilityState = "Limited" @@ -747,23 +736,29 @@ const ( Normal SiteAvailabilityState = "Normal" ) +// SiteExtensionType enumerates the values for site extension type. +type SiteExtensionType string + +const ( + // Gallery specifies the gallery state for site extension type. + Gallery SiteExtensionType = "Gallery" + // WebRoot specifies the web root state for site extension type. + WebRoot SiteExtensionType = "WebRoot" +) + // SiteLoadBalancing enumerates the values for site load balancing. type SiteLoadBalancing string const ( - // LeastRequests specifies the least requests state for site load - // balancing. + // LeastRequests specifies the least requests state for site load balancing. LeastRequests SiteLoadBalancing = "LeastRequests" - // LeastResponseTime specifies the least response time state for site load - // balancing. + // LeastResponseTime specifies the least response time state for site load balancing. LeastResponseTime SiteLoadBalancing = "LeastResponseTime" // RequestHash specifies the request hash state for site load balancing. RequestHash SiteLoadBalancing = "RequestHash" - // WeightedRoundRobin specifies the weighted round robin state for site - // load balancing. + // WeightedRoundRobin specifies the weighted round robin state for site load balancing. WeightedRoundRobin SiteLoadBalancing = "WeightedRoundRobin" - // WeightedTotalTraffic specifies the weighted total traffic state for site - // load balancing. + // WeightedTotalTraffic specifies the weighted total traffic state for site load balancing. WeightedTotalTraffic SiteLoadBalancing = "WeightedTotalTraffic" ) @@ -781,6 +776,8 @@ const ( SkuNameIsolated SkuName = "Isolated" // SkuNamePremium specifies the sku name premium state for sku name. SkuNamePremium SkuName = "Premium" + // SkuNamePremiumV2 specifies the sku name premium v2 state for sku name. + SkuNamePremiumV2 SkuName = "PremiumV2" // SkuNameShared specifies the sku name shared state for sku name. SkuNameShared SkuName = "Shared" // SkuNameStandard specifies the sku name standard state for sku name. @@ -803,24 +800,31 @@ const ( type StatusOptions string const ( - // StatusOptionsPending specifies the status options pending state for - // status options. + // StatusOptionsPending specifies the status options pending state for status options. StatusOptionsPending StatusOptions = "Pending" - // StatusOptionsReady specifies the status options ready state for status - // options. + // StatusOptionsReady specifies the status options ready state for status options. StatusOptionsReady StatusOptions = "Ready" ) -// UnauthenticatedClientAction enumerates the values for unauthenticated client -// action. +// TriggeredWebJobStatus enumerates the values for triggered web job status. +type TriggeredWebJobStatus string + +const ( + // TriggeredWebJobStatusError specifies the triggered web job status error state for triggered web job status. + TriggeredWebJobStatusError TriggeredWebJobStatus = "Error" + // TriggeredWebJobStatusFailed specifies the triggered web job status failed state for triggered web job status. + TriggeredWebJobStatusFailed TriggeredWebJobStatus = "Failed" + // TriggeredWebJobStatusSuccess specifies the triggered web job status success state for triggered web job status. + TriggeredWebJobStatusSuccess TriggeredWebJobStatus = "Success" +) + +// UnauthenticatedClientAction enumerates the values for unauthenticated client action. type UnauthenticatedClientAction string const ( - // AllowAnonymous specifies the allow anonymous state for unauthenticated - // client action. + // AllowAnonymous specifies the allow anonymous state for unauthenticated client action. AllowAnonymous UnauthenticatedClientAction = "AllowAnonymous" - // RedirectToLoginPage specifies the redirect to login page state for - // unauthenticated client action. + // RedirectToLoginPage specifies the redirect to login page state for unauthenticated client action. RedirectToLoginPage UnauthenticatedClientAction = "RedirectToLoginPage" ) @@ -828,8 +832,7 @@ const ( type UsageState string const ( - // UsageStateExceeded specifies the usage state exceeded state for usage - // state. + // UsageStateExceeded specifies the usage state exceeded state for usage state. UsageStateExceeded UsageState = "Exceeded" // UsageStateNormal specifies the usage state normal state for usage state. UsageStateNormal UsageState = "Normal" @@ -839,11 +842,9 @@ const ( type ValidateResourceTypes string const ( - // ValidateResourceTypesServerFarm specifies the validate resource types - // server farm state for validate resource types. + // ValidateResourceTypesServerFarm specifies the validate resource types server farm state for validate resource types. ValidateResourceTypesServerFarm ValidateResourceTypes = "ServerFarm" - // ValidateResourceTypesSite specifies the validate resource types site - // state for validate resource types. + // ValidateResourceTypesSite specifies the validate resource types site state for validate resource types. ValidateResourceTypesSite ValidateResourceTypes = "Site" ) @@ -851,18 +852,14 @@ const ( type WorkerSizeOptions string const ( - // WorkerSizeOptionsDefault specifies the worker size options default state - // for worker size options. - WorkerSizeOptionsDefault WorkerSizeOptions = "Default" - // WorkerSizeOptionsLarge specifies the worker size options large state for - // worker size options. - WorkerSizeOptionsLarge WorkerSizeOptions = "Large" - // WorkerSizeOptionsMedium specifies the worker size options medium state - // for worker size options. - WorkerSizeOptionsMedium WorkerSizeOptions = "Medium" - // WorkerSizeOptionsSmall specifies the worker size options small state for - // worker size options. - WorkerSizeOptionsSmall WorkerSizeOptions = "Small" + // Default specifies the default state for worker size options. + Default WorkerSizeOptions = "Default" + // Large specifies the large state for worker size options. + Large WorkerSizeOptions = "Large" + // Medium specifies the medium state for worker size options. + Medium WorkerSizeOptions = "Medium" + // Small specifies the small state for worker size options. + Small WorkerSizeOptions = "Small" ) // Address is address information for domain registration. @@ -875,8 +872,7 @@ type Address struct { State *string `json:"state,omitempty"` } -// AddressResponse is describes main public IP address and any extra virtual -// IPs. +// AddressResponse is describes main public IP address and any extra virtual IPs. type AddressResponse struct { autorest.Response `json:"-"` ServiceIPAddress *string `json:"serviceIpAddress,omitempty"` @@ -885,8 +881,7 @@ type AddressResponse struct { VipMappings *[]VirtualIPMapping `json:"vipMappings,omitempty"` } -// APIDefinitionInfo is information about the formal API definition for the -// app. +// APIDefinitionInfo is information about the formal API definition for the app. type APIDefinitionInfo struct { URL *string `json:"url,omitempty"` } @@ -936,16 +931,14 @@ type ApplicationLogsConfig struct { AzureBlobStorage *AzureBlobStorageApplicationLogsConfig `json:"azureBlobStorage,omitempty"` } -// AppServiceCertificate is key Vault container for a certificate that is -// purchased through Azure. +// AppServiceCertificate is key Vault container for a certificate that is purchased through Azure. type AppServiceCertificate struct { KeyVaultID *string `json:"keyVaultId,omitempty"` KeyVaultSecretName *string `json:"keyVaultSecretName,omitempty"` ProvisioningState KeyVaultSecretStatus `json:"provisioningState,omitempty"` } -// AppServiceCertificateCollection is collection of certitificateorder -// certificates. +// AppServiceCertificateCollection is collection of certitificateorder certificates. type AppServiceCertificateCollection struct { autorest.Response `json:"-"` Value *[]AppServiceCertificateResource `json:"value,omitempty"` @@ -964,7 +957,7 @@ func (client AppServiceCertificateCollection) AppServiceCertificateCollectionPre autorest.WithBaseURL(to.String(client.NextLink))) } -// AppServiceCertificateOrder is sSL certificate purchase order. +// AppServiceCertificateOrder is SSL certificate purchase order. type AppServiceCertificateOrder struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -976,8 +969,7 @@ type AppServiceCertificateOrder struct { *AppServiceCertificateOrderProperties `json:"properties,omitempty"` } -// AppServiceCertificateOrderProperties is appServiceCertificateOrder resource -// specific properties +// AppServiceCertificateOrderProperties is appServiceCertificateOrder resource specific properties type AppServiceCertificateOrderProperties struct { Certificates *map[string]*AppServiceCertificate `json:"certificates,omitempty"` DistinguishedName *string `json:"distinguishedName,omitempty"` @@ -1019,8 +1011,7 @@ func (client AppServiceCertificateOrderCollection) AppServiceCertificateOrderCol autorest.WithBaseURL(to.String(client.NextLink))) } -// AppServiceCertificateResource is key Vault container ARM resource for a -// certificate that is purchased through Azure. +// AppServiceCertificateResource is key Vault container ARM resource for a certificate that is purchased through Azure. type AppServiceCertificateResource struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1153,8 +1144,7 @@ func (client AppServicePlanCollection) AppServicePlanCollectionPreparer() (*http autorest.WithBaseURL(to.String(client.NextLink))) } -// AutoHealActions is actions which to take by the auto-heal module when a rule -// is triggered. +// AutoHealActions is actions which to take by the auto-heal module when a rule is triggered. type AutoHealActions struct { ActionType AutoHealActionType `json:"actionType,omitempty"` CustomAction *AutoHealCustomAction `json:"customAction,omitempty"` @@ -1182,24 +1172,21 @@ type AutoHealTriggers struct { SlowRequests *SlowRequestsBasedTrigger `json:"slowRequests,omitempty"` } -// AzureBlobStorageApplicationLogsConfig is application logs azure blob storage -// configuration. +// AzureBlobStorageApplicationLogsConfig is application logs azure blob storage configuration. type AzureBlobStorageApplicationLogsConfig struct { Level LogLevel `json:"level,omitempty"` SasURL *string `json:"sasUrl,omitempty"` RetentionInDays *int32 `json:"retentionInDays,omitempty"` } -// AzureBlobStorageHTTPLogsConfig is http logs to azure blob storage -// configuration. +// AzureBlobStorageHTTPLogsConfig is http logs to azure blob storage configuration. type AzureBlobStorageHTTPLogsConfig struct { SasURL *string `json:"sasUrl,omitempty"` RetentionInDays *int32 `json:"retentionInDays,omitempty"` Enabled *bool `json:"enabled,omitempty"` } -// AzureTableStorageApplicationLogsConfig is application logs to Azure table -// storage configuration. +// AzureTableStorageApplicationLogsConfig is application logs to Azure table storage configuration. type AzureTableStorageApplicationLogsConfig struct { Level LogLevel `json:"level,omitempty"` SasURL *string `json:"sasUrl,omitempty"` @@ -1208,12 +1195,10 @@ type AzureTableStorageApplicationLogsConfig struct { // BackupItem is backup description. type BackupItem struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *BackupItemProperties `json:"properties,omitempty"` } @@ -1257,12 +1242,10 @@ func (client BackupItemCollection) BackupItemCollectionPreparer() (*http.Request // BackupRequest is description of a backup which will be performed. type BackupRequest struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *BackupRequestProperties `json:"properties,omitempty"` } @@ -1276,8 +1259,8 @@ type BackupRequestProperties struct { Type BackupRestoreOperationType `json:"type,omitempty"` } -// BackupSchedule is description of a backup schedule. Describes how often -// should be the backup performed and what should be the retention policy. +// BackupSchedule is description of a backup schedule. Describes how often should be the backup performed and what +// should be the retention policy. type BackupSchedule struct { FrequencyInterval *int32 `json:"frequencyInterval,omitempty"` FrequencyUnit FrequencyUnit `json:"frequencyUnit,omitempty"` @@ -1287,15 +1270,14 @@ type BackupSchedule struct { LastExecutionTime *date.Time `json:"lastExecutionTime,omitempty"` } -// Capability is describes the capabilities/features allowed for a specific -// SKU. +// Capability is describes the capabilities/features allowed for a specific SKU. type Capability struct { Name *string `json:"name,omitempty"` Value *string `json:"value,omitempty"` Reason *string `json:"reason,omitempty"` } -// Certificate is sSL certificate for an app. +// Certificate is SSL certificate for an app. type Certificate struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -1351,7 +1333,7 @@ func (client CertificateCollection) CertificateCollectionPreparer() (*http.Reque autorest.WithBaseURL(to.String(client.NextLink))) } -// CertificateDetails is sSL certificate details. +// CertificateDetails is SSL certificate details. type CertificateDetails struct { Version *int32 `json:"version,omitempty"` SerialNumber *string `json:"serialNumber,omitempty"` @@ -1364,14 +1346,12 @@ type CertificateDetails struct { RawData *string `json:"rawData,omitempty"` } -// CertificateEmail is sSL certificate email. +// CertificateEmail is SSL certificate email. type CertificateEmail struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *CertificateEmailProperties `json:"properties,omitempty"` } @@ -1392,8 +1372,7 @@ type CertificateOrderAction struct { *CertificateOrderActionProperties `json:"properties,omitempty"` } -// CertificateOrderActionProperties is certificateOrderAction resource specific -// properties +// CertificateOrderActionProperties is certificateOrderAction resource specific properties type CertificateOrderActionProperties struct { Type CertificateOrderActionType `json:"type,omitempty"` CreatedAt *date.Time `json:"createdAt,omitempty"` @@ -1420,9 +1399,7 @@ type ConnectionStringDictionary struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` Properties *map[string]*ConnStringValueTypePair `json:"properties,omitempty"` } @@ -1439,9 +1416,8 @@ type ConnStringValueTypePair struct { Type ConnectionStringType `json:"type,omitempty"` } -// Contact is contact information for domain registration. If 'Domain Privacy' -// option is not selected then the contact information is made publicly -// available through the Whois +// Contact is contact information for domain registration. If 'Domain Privacy' option is not selected then the contact +// information is made publicly available through the Whois // directories as per ICANN requirements. type Contact struct { AddressMailing *Address `json:"addressMailing,omitempty"` @@ -1455,30 +1431,107 @@ type Contact struct { Phone *string `json:"phone,omitempty"` } +// ContinuousWebJob is continuous Web Job Information. +type ContinuousWebJob struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *ContinuousWebJobProperties `json:"properties,omitempty"` +} + +// ContinuousWebJobProperties is continuousWebJob resource specific properties +type ContinuousWebJobProperties struct { + Status ContinuousWebJobStatus `json:"status,omitempty"` + DetailedStatus *string `json:"detailedStatus,omitempty"` + LogURL *string `json:"logUrl,omitempty"` + Name *string `json:"name,omitempty"` + RunCommand *string `json:"runCommand,omitempty"` + URL *string `json:"url,omitempty"` + ExtraInfoURL *string `json:"extraInfoUrl,omitempty"` + JobType JobType `json:"jobType,omitempty"` + Error *string `json:"error,omitempty"` + UsingSdk *bool `json:"usingSdk,omitempty"` + Settings *map[string]interface{} `json:"settings,omitempty"` +} + +// ContinuousWebJobCollection is collection of Kudu continuous web job information elements. +type ContinuousWebJobCollection struct { + autorest.Response `json:"-"` + Value *[]ContinuousWebJob `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ContinuousWebJobCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ContinuousWebJobCollection) ContinuousWebJobCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // CorsSettings is cross-Origin Resource Sharing (CORS) settings for the app. type CorsSettings struct { AllowedOrigins *[]string `json:"allowedOrigins,omitempty"` } -// CsmMoveResourceEnvelope is object with a list of the resources that need to -// be moved and the resource group they should be moved to. +// CsmMoveResourceEnvelope is object with a list of the resources that need to be moved and the resource group they +// should be moved to. type CsmMoveResourceEnvelope struct { TargetResourceGroup *string `json:"targetResourceGroup,omitempty"` Resources *[]string `json:"resources,omitempty"` } +// CsmOperationCollection is collection of Azure resource manager operation metadata. +type CsmOperationCollection struct { + autorest.Response `json:"-"` + Value *[]CsmOperationDescription `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// CsmOperationCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client CsmOperationCollection) CsmOperationCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// CsmOperationDescription is +type CsmOperationDescription struct { + Name *string `json:"name,omitempty"` + Display *CsmOperationDisplay `json:"display,omitempty"` + Origin *string `json:"origin,omitempty"` + Properties *CsmOperationDescriptionProperties `json:"properties,omitempty"` +} + +// CsmOperationDescriptionProperties is +type CsmOperationDescriptionProperties struct { + ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"` +} + +// CsmOperationDisplay is +type CsmOperationDisplay struct { + Provider *string `json:"provider,omitempty"` + Resource *string `json:"resource,omitempty"` + Operation *string `json:"operation,omitempty"` + Description *string `json:"description,omitempty"` +} + // CsmPublishingProfileOptions is publishing options for requested profile. type CsmPublishingProfileOptions struct { Format PublishingProfileFormat `json:"format,omitempty"` } -// CsmSiteRecoveryEntity is details about app recovery operation. -type CsmSiteRecoveryEntity struct { - SnapshotTime *date.Time `json:"snapshotTime,omitempty"` - SiteName *string `json:"siteName,omitempty"` - SlotName *string `json:"slotName,omitempty"` -} - // CsmSlotEntity is deployment slot parameters. type CsmSlotEntity struct { TargetSlot *string `json:"targetSlot,omitempty"` @@ -1516,17 +1569,14 @@ func (client CsmUsageQuotaCollection) CsmUsageQuotaCollectionPreparer() (*http.R // CustomHostnameAnalysisResult is custom domain analysis. type CustomHostnameAnalysisResult struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *CustomHostnameAnalysisResultProperties `json:"properties,omitempty"` } -// CustomHostnameAnalysisResultProperties is customHostnameAnalysisResult -// resource specific properties +// CustomHostnameAnalysisResultProperties is customHostnameAnalysisResult resource specific properties type CustomHostnameAnalysisResultProperties struct { IsHostnameAlreadyVerified *bool `json:"isHostnameAlreadyVerified,omitempty"` CustomDomainVerificationTest DNSVerificationTestResult `json:"customDomainVerificationTest,omitempty"` @@ -1551,50 +1601,11 @@ type DatabaseBackupSetting struct { // DeletedSite is a deleted app. type DeletedSite struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *DeletedSiteProperties `json:"properties,omitempty"` -} - -// DeletedSiteProperties is deletedSite resource specific properties -type DeletedSiteProperties struct { - DeletedTimestamp *date.Time `json:"deletedTimestamp,omitempty"` - State *string `json:"state,omitempty"` - HostNames *[]string `json:"hostNames,omitempty"` - RepositorySiteName *string `json:"repositorySiteName,omitempty"` - UsageState UsageState `json:"usageState,omitempty"` - Enabled *bool `json:"enabled,omitempty"` - EnabledHostNames *[]string `json:"enabledHostNames,omitempty"` - AvailabilityState SiteAvailabilityState `json:"availabilityState,omitempty"` - HostNameSslStates *[]HostNameSslState `json:"hostNameSslStates,omitempty"` - ServerFarmID *string `json:"serverFarmId,omitempty"` - Reserved *bool `json:"reserved,omitempty"` - LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` - SiteConfig *SiteConfig `json:"siteConfig,omitempty"` - TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` - PremiumAppDeployed *bool `json:"premiumAppDeployed,omitempty"` - ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` - TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` - HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - MicroService *string `json:"microService,omitempty"` - GatewaySiteName *string `json:"gatewaySiteName,omitempty"` - ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` - ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` - HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` - OutboundIPAddresses *string `json:"outboundIpAddresses,omitempty"` - ContainerSize *int32 `json:"containerSize,omitempty"` - DailyMemoryTimeQuota *int32 `json:"dailyMemoryTimeQuota,omitempty"` - SuspendedTill *date.Time `json:"suspendedTill,omitempty"` - MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` - CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` - ResourceGroup *string `json:"resourceGroup,omitempty"` - IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` - DefaultHostName *string `json:"defaultHostName,omitempty"` - SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` + ID *int32 `json:"id,omitempty"` + DeletedTimestamp *string `json:"deletedTimestamp,omitempty"` + Subscription *string `json:"subscription,omitempty"` + ResourceGroup *string `json:"resourceGroup,omitempty"` + Name *string `json:"name,omitempty"` } // DeletedWebAppCollection is collection of deleted apps. @@ -1619,12 +1630,10 @@ func (client DeletedWebAppCollection) DeletedWebAppCollectionPreparer() (*http.R // Deployment is user crendentials used for publishing activity. type Deployment struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *DeploymentProperties `json:"properties,omitempty"` } @@ -1661,6 +1670,14 @@ func (client DeploymentCollection) DeploymentCollectionPreparer() (*http.Request autorest.WithBaseURL(to.String(client.NextLink))) } +// Dimension is +type Dimension struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + InternalName *string `json:"internalName,omitempty"` + ToBeExportedForShoebox *bool `json:"toBeExportedForShoebox,omitempty"` +} + // Domain is information about a domain. type Domain struct { autorest.Response `json:"-"` @@ -1724,8 +1741,7 @@ func (client DomainCollection) DomainCollectionPreparer() (*http.Request, error) autorest.WithBaseURL(to.String(client.NextLink))) } -// DomainControlCenterSsoRequest is single sign-on request information for -// domain management. +// DomainControlCenterSsoRequest is single sign-on request information for domain management. type DomainControlCenterSsoRequest struct { autorest.Response `json:"-"` URL *string `json:"url,omitempty"` @@ -1745,14 +1761,12 @@ type DomainOwnershipIdentifier struct { *DomainOwnershipIdentifierProperties `json:"properties,omitempty"` } -// DomainOwnershipIdentifierProperties is domainOwnershipIdentifier resource -// specific properties +// DomainOwnershipIdentifierProperties is domainOwnershipIdentifier resource specific properties type DomainOwnershipIdentifierProperties struct { OwnershipID *string `json:"ownershipId,omitempty"` } -// DomainOwnershipIdentifierCollection is collection of domain ownership -// identifiers. +// DomainOwnershipIdentifierCollection is collection of domain ownership identifiers. type DomainOwnershipIdentifierCollection struct { autorest.Response `json:"-"` Value *[]DomainOwnershipIdentifier `json:"value,omitempty"` @@ -1771,16 +1785,14 @@ func (client DomainOwnershipIdentifierCollection) DomainOwnershipIdentifierColle autorest.WithBaseURL(to.String(client.NextLink))) } -// DomainPurchaseConsent is domain purchase consent object, representing -// acceptance of applicable legal agreements. +// DomainPurchaseConsent is domain purchase consent object, representing acceptance of applicable legal agreements. type DomainPurchaseConsent struct { AgreementKeys *[]string `json:"agreementKeys,omitempty"` AgreedBy *string `json:"agreedBy,omitempty"` AgreedAt *date.Time `json:"agreedAt,omitempty"` } -// DomainRecommendationSearchParameters is domain recommendation search -// parameters. +// DomainRecommendationSearchParameters is domain recommendation search parameters. type DomainRecommendationSearchParameters struct { Keywords *string `json:"keywords,omitempty"` MaxDomainRecommendations *int32 `json:"maxDomainRecommendations,omitempty"` @@ -1793,12 +1805,12 @@ type EnabledConfig struct { // ErrorEntity is body of the error response returned from the API. type ErrorEntity struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` ExtendedCode *string `json:"extendedCode,omitempty"` MessageTemplate *string `json:"messageTemplate,omitempty"` Parameters *[]string `json:"parameters,omitempty"` InnerErrors *[]ErrorEntity `json:"innerErrors,omitempty"` - Code *string `json:"code,omitempty"` - Message *string `json:"message,omitempty"` } // Experiments is routing rules in production experiments. @@ -1806,8 +1818,7 @@ type Experiments struct { RampUpRules *[]RampUpRule `json:"rampUpRules,omitempty"` } -// FileSystemApplicationLogsConfig is application logs to file system -// configuration. +// FileSystemApplicationLogsConfig is application logs to file system configuration. type FileSystemApplicationLogsConfig struct { Level LogLevel `json:"level,omitempty"` } @@ -1819,14 +1830,71 @@ type FileSystemHTTPLogsConfig struct { Enabled *bool `json:"enabled,omitempty"` } +// FunctionEnvelope is web Job Information. +type FunctionEnvelope struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *FunctionEnvelopeProperties `json:"properties,omitempty"` +} + +// FunctionEnvelopeProperties is functionEnvelope resource specific properties +type FunctionEnvelopeProperties struct { + Name *string `json:"name,omitempty"` + FunctionAppID *string `json:"functionAppId,omitempty"` + ScriptRootPathHref *string `json:"scriptRootPathHref,omitempty"` + ScriptHref *string `json:"scriptHref,omitempty"` + ConfigHref *string `json:"configHref,omitempty"` + SecretsFileHref *string `json:"secretsFileHref,omitempty"` + Href *string `json:"href,omitempty"` + Config *map[string]interface{} `json:"config,omitempty"` + Files *map[string]*string `json:"files,omitempty"` + TestData *string `json:"testData,omitempty"` +} + +// FunctionEnvelopeCollection is collection of Kudu function information elements. +type FunctionEnvelopeCollection struct { + autorest.Response `json:"-"` + Value *[]FunctionEnvelope `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// FunctionEnvelopeCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client FunctionEnvelopeCollection) FunctionEnvelopeCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// FunctionSecrets is function secrets. +type FunctionSecrets struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *FunctionSecretsProperties `json:"properties,omitempty"` +} + +// FunctionSecretsProperties is functionSecrets resource specific properties +type FunctionSecretsProperties struct { + Key *string `json:"key,omitempty"` + TriggerURL *string `json:"triggerUrl,omitempty"` +} + // GeoRegion is geographical region. type GeoRegion struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *GeoRegionProperties `json:"properties,omitempty"` } @@ -1865,10 +1933,9 @@ type GlobalCsmSkuDescription struct { Capabilities *[]Capability `json:"capabilities,omitempty"` } -// HandlerMapping is the IIS handler mappings used to define which handler -// processes HTTP requests with certain extension. -// For example, it is used to configure php-cgi.exe process to handle all HTTP -// requests with *.php extension. +// HandlerMapping is the IIS handler mappings used to define which handler processes HTTP requests with certain +// extension. +// For example, it is used to configure php-cgi.exe process to handle all HTTP requests with *.php extension. type HandlerMapping struct { Extension *string `json:"extension,omitempty"` ScriptProcessor *string `json:"scriptProcessor,omitempty"` @@ -1882,8 +1949,7 @@ type HostingEnvironmentDiagnostics struct { DiagnosicsOutput *string `json:"diagnosicsOutput,omitempty"` } -// HostingEnvironmentProfile is specification for an App Service Environment to -// use for this resource. +// HostingEnvironmentProfile is specification for an App Service Environment to use for this resource. type HostingEnvironmentProfile struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -1903,12 +1969,10 @@ type HostName struct { // HostNameBinding is a hostname binding object. type HostNameBinding struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *HostNameBindingProperties `json:"properties,omitempty"` } @@ -1945,7 +2009,7 @@ func (client HostNameBindingCollection) HostNameBindingCollectionPreparer() (*ht autorest.WithBaseURL(to.String(client.NextLink))) } -// HostNameSslState is sSL-enabled hostname. +// HostNameSslState is SSL-enabled hostname. type HostNameSslState struct { Name *string `json:"name,omitempty"` SslState SslState `json:"sslState,omitempty"` @@ -1961,16 +2025,13 @@ type HTTPLogsConfig struct { AzureBlobStorage *AzureBlobStorageHTTPLogsConfig `json:"azureBlobStorage,omitempty"` } -// HybridConnection is hybrid Connection contract. This is used to configure a -// Hybrid Connection. +// HybridConnection is hybrid Connection contract. This is used to configure a Hybrid Connection. type HybridConnection struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *HybridConnectionProperties `json:"properties,omitempty"` } @@ -1983,6 +2044,7 @@ type HybridConnectionProperties struct { Port *int32 `json:"port,omitempty"` SendKeyName *string `json:"sendKeyName,omitempty"` SendKeyValue *string `json:"sendKeyValue,omitempty"` + ServiceBusSuffix *string `json:"serviceBusSuffix,omitempty"` } // HybridConnectionCollection is collection of hostname bindings. @@ -2004,41 +2066,34 @@ func (client HybridConnectionCollection) HybridConnectionCollectionPreparer() (* autorest.WithBaseURL(to.String(client.NextLink))) } -// HybridConnectionKey is hybrid Connection key contract. This has the send key -// name and value for a Hybrid Connection. +// HybridConnectionKey is hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. type HybridConnectionKey struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *HybridConnectionKeyProperties `json:"properties,omitempty"` } -// HybridConnectionKeyProperties is hybridConnectionKey resource specific -// properties +// HybridConnectionKeyProperties is hybridConnectionKey resource specific properties type HybridConnectionKeyProperties struct { SendKeyName *string `json:"sendKeyName,omitempty"` SendKeyValue *string `json:"sendKeyValue,omitempty"` } -// HybridConnectionLimits is hybrid Connection limits contract. This is used to -// return the plan limits of Hybrid Connections. +// HybridConnectionLimits is hybrid Connection limits contract. This is used to return the plan limits of Hybrid +// Connections. type HybridConnectionLimits struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *HybridConnectionLimitsProperties `json:"properties,omitempty"` } -// HybridConnectionLimitsProperties is hybridConnectionLimits resource specific -// properties +// HybridConnectionLimitsProperties is hybridConnectionLimits resource specific properties type HybridConnectionLimitsProperties struct { Current *int32 `json:"current,omitempty"` Maximum *int32 `json:"maximum,omitempty"` @@ -2047,12 +2102,10 @@ type HybridConnectionLimitsProperties struct { // Identifier is identifier. type Identifier struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *IdentifierProperties `json:"properties,omitempty"` } @@ -2080,12 +2133,53 @@ func (client IdentifierCollection) IdentifierCollectionPreparer() (*http.Request autorest.WithBaseURL(to.String(client.NextLink))) } -// IPSecurityRestriction is iP security restriction on an app. +// IPSecurityRestriction is IP security restriction on an app. type IPSecurityRestriction struct { IPAddress *string `json:"ipAddress,omitempty"` SubnetMask *string `json:"subnetMask,omitempty"` } +// Job is web Job Information. +type Job struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *JobProperties `json:"properties,omitempty"` +} + +// JobCollection is collection of Kudu web job information elements. +type JobCollection struct { + autorest.Response `json:"-"` + Value *[]Job `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// JobCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client JobCollection) JobCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// JobProperties is webJob resource specific properties +type JobProperties struct { + Name *string `json:"name,omitempty"` + RunCommand *string `json:"runCommand,omitempty"` + URL *string `json:"url,omitempty"` + ExtraInfoURL *string `json:"extraInfoUrl,omitempty"` + JobType JobType `json:"jobType,omitempty"` + Error *string `json:"error,omitempty"` + UsingSdk *bool `json:"usingSdk,omitempty"` + Settings *map[string]interface{} `json:"settings,omitempty"` +} + // ListCapability is type ListCapability struct { autorest.Response `json:"-"` @@ -2140,8 +2234,7 @@ type ListVnetRoute struct { Value *[]VnetRoute `json:"value,omitempty"` } -// LocalizableString is localizable string object containing the name and a -// localized value. +// LocalizableString is localizable string object containing the name and a localized value. type LocalizableString struct { Value *string `json:"value,omitempty"` LocalizedValue *string `json:"localizedValue,omitempty"` @@ -2153,15 +2246,19 @@ type MetricAvailabilily struct { Retention *string `json:"retention,omitempty"` } +// MetricAvailability is +type MetricAvailability struct { + TimeGrain *string `json:"timeGrain,omitempty"` + BlobDuration *string `json:"blobDuration,omitempty"` +} + // MetricDefinition is metadata for a metric. type MetricDefinition struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *MetricDefinitionProperties `json:"properties,omitempty"` } @@ -2174,43 +2271,118 @@ type MetricDefinitionProperties struct { DisplayName *string `json:"displayName,omitempty"` } +// MetricSpecification is +type MetricSpecification struct { + Name *string `json:"name,omitempty"` + DisplayName *string `json:"displayName,omitempty"` + DisplayDescription *string `json:"displayDescription,omitempty"` + Unit *string `json:"unit,omitempty"` + AggregationType *string `json:"aggregationType,omitempty"` + SupportsInstanceLevelAggregation *bool `json:"supportsInstanceLevelAggregation,omitempty"` + EnableRegionalMdmAccount *bool `json:"enableRegionalMdmAccount,omitempty"` + SourceMdmAccount *string `json:"sourceMdmAccount,omitempty"` + SourceMdmNamespace *string `json:"sourceMdmNamespace,omitempty"` + MetricFilterPattern *string `json:"metricFilterPattern,omitempty"` + FillGapWithZero *bool `json:"fillGapWithZero,omitempty"` + IsInternal *bool `json:"isInternal,omitempty"` + Dimensions *[]Dimension `json:"dimensions,omitempty"` + Category *string `json:"category,omitempty"` + Availabilities *[]MetricAvailability `json:"availabilities,omitempty"` +} + // MigrateMySQLRequest is mySQL migration request. type MigrateMySQLRequest struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *MigrateMySQLRequestProperties `json:"properties,omitempty"` } -// MigrateMySQLRequestProperties is migrateMySqlRequest resource specific -// properties +// MigrateMySQLRequestProperties is migrateMySqlRequest resource specific properties type MigrateMySQLRequestProperties struct { - ConnectionString *string `json:"connectionString,omitempty"` + ConnectionString *string `json:"connectionString,omitempty"` + MigrationType MySQLMigrationType `json:"migrationType,omitempty"` } // MigrateMySQLStatus is mySQL migration status. type MigrateMySQLStatus struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *MigrateMySQLStatusProperties `json:"properties,omitempty"` } -// MigrateMySQLStatusProperties is migrateMySqlStatus resource specific -// properties +// MigrateMySQLStatusProperties is migrateMySqlStatus resource specific properties type MigrateMySQLStatusProperties struct { MigrationOperationStatus OperationStatus `json:"migrationOperationStatus,omitempty"` OperationID *string `json:"operationId,omitempty"` LocalMySQLEnabled *bool `json:"localMySqlEnabled,omitempty"` } +// MSDeploy is mSDeploy ARM PUT information +type MSDeploy struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *MSDeployCore `json:"properties,omitempty"` +} + +// MSDeployCore is mSDeploy ARM PUT core information +type MSDeployCore struct { + PackageURI *string `json:"packageUri,omitempty"` + ConnectionString *string `json:"connectionString,omitempty"` + DbType *string `json:"dbType,omitempty"` + SetParametersXMLFileURI *string `json:"setParametersXmlFileUri,omitempty"` + SetParameters *map[string]*string `json:"setParameters,omitempty"` + SkipAppData *bool `json:"skipAppData,omitempty"` + AppOffline *bool `json:"appOffline,omitempty"` +} + +// MSDeployLog is mSDeploy log +type MSDeployLog struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *MSDeployLogProperties `json:"properties,omitempty"` +} + +// MSDeployLogProperties is mSDeployLog resource specific properties +type MSDeployLogProperties struct { + Entries *[]MSDeployLogEntry `json:"entries,omitempty"` +} + +// MSDeployLogEntry is mSDeploy log entry +type MSDeployLogEntry struct { + Time *date.Time `json:"time,omitempty"` + Type MSDeployLogEntryType `json:"type,omitempty"` + Message *string `json:"message,omitempty"` +} + +// MSDeployStatus is mSDeploy ARM response +type MSDeployStatus struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *MSDeployStatusProperties `json:"properties,omitempty"` +} + +// MSDeployStatusProperties is mSDeployStatus resource specific properties +type MSDeployStatusProperties struct { + Deployer *string `json:"deployer,omitempty"` + ProvisioningState MSDeployProvisioningState `json:"provisioningState,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + Complete *bool `json:"complete,omitempty"` +} + // NameIdentifier is identifies an object. type NameIdentifier struct { Name *string `json:"name,omitempty"` @@ -2249,16 +2421,13 @@ type NetworkAccessControlEntry struct { RemoteSubnet *string `json:"remoteSubnet,omitempty"` } -// NetworkFeatures is full view of network features for an app (presently VNET -// integration and Hybrid Connections). +// NetworkFeatures is full view of network features for an app (presently VNET integration and Hybrid Connections). type NetworkFeatures struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *NetworkFeaturesProperties `json:"properties,omitempty"` } @@ -2314,6 +2483,7 @@ type PerfMonSample struct { Time *date.Time `json:"time,omitempty"` InstanceName *string `json:"instanceName,omitempty"` Value *float64 `json:"value,omitempty"` + CoreCount *int32 `json:"coreCount,omitempty"` } // PerfMonSet is metric information. @@ -2351,17 +2521,14 @@ type PremierAddOnProperties struct { // PremierAddOnOffer is premier add-on offer. type PremierAddOnOffer struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *PremierAddOnOfferProperties `json:"properties,omitempty"` } -// PremierAddOnOfferProperties is premierAddOnOffer resource specific -// properties +// PremierAddOnOfferProperties is premierAddOnOffer resource specific properties type PremierAddOnOfferProperties struct { Sku *string `json:"sku,omitempty"` Product *string `json:"product,omitempty"` @@ -2395,18 +2562,229 @@ func (client PremierAddOnOfferCollection) PremierAddOnOfferCollectionPreparer() autorest.WithBaseURL(to.String(client.NextLink))) } +// ProcessInfo is process Information. +type ProcessInfo struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *ProcessInfoProperties `json:"properties,omitempty"` +} + +// ProcessInfoProperties is processInfo resource specific properties +type ProcessInfoProperties struct { + ID *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Href *string `json:"href,omitempty"` + MiniDump *string `json:"miniDump,omitempty"` + IsProfileRunning *bool `json:"isProfileRunning,omitempty"` + IsIisProfileRunning *bool `json:"isIisProfileRunning,omitempty"` + IisProfileTimeoutInSeconds *float64 `json:"iisProfileTimeoutInSeconds,omitempty"` + Parent *string `json:"parent,omitempty"` + Children *[]string `json:"children,omitempty"` + Threads *[]ProcessThreadInfo `json:"threads,omitempty"` + OpenFileHandles *[]string `json:"openFileHandles,omitempty"` + Modules *[]ProcessModuleInfo `json:"modules,omitempty"` + FileName *string `json:"fileName,omitempty"` + CommandLine *string `json:"commandLine,omitempty"` + UserName *string `json:"userName,omitempty"` + HandleCount *int32 `json:"handleCount,omitempty"` + ModuleCount *int32 `json:"moduleCount,omitempty"` + ThreadCount *int32 `json:"threadCount,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + TotalProcessorTime *string `json:"totalProcessorTime,omitempty"` + UserProcessorTime *string `json:"userProcessorTime,omitempty"` + PrivilegedProcessorTime *string `json:"privilegedProcessorTime,omitempty"` + WorkingSet64 *int64 `json:"workingSet64,omitempty"` + PeakWorkingSet64 *int64 `json:"peakWorkingSet64,omitempty"` + PrivateMemorySize64 *int64 `json:"privateMemorySize64,omitempty"` + VirtualMemorySize64 *int64 `json:"virtualMemorySize64,omitempty"` + PeakVirtualMemorySize64 *int64 `json:"peakVirtualMemorySize64,omitempty"` + PagedSystemMemorySize64 *int64 `json:"pagedSystemMemorySize64,omitempty"` + NonpagedSystemMemorySize64 *int64 `json:"nonpagedSystemMemorySize64,omitempty"` + PagedMemorySize64 *int64 `json:"pagedMemorySize64,omitempty"` + PeakPagedMemorySize64 *int64 `json:"peakPagedMemorySize64,omitempty"` + TimeStamp *date.Time `json:"timeStamp,omitempty"` + EnvironmentVariables *map[string]*string `json:"environmentVariables,omitempty"` + IsScmSite *bool `json:"isScmSite,omitempty"` + IsWebJob *bool `json:"isWebJob,omitempty"` + Description *string `json:"description,omitempty"` +} + +// ProcessInfoCollection is collection of Kudu process information elements. +type ProcessInfoCollection struct { + autorest.Response `json:"-"` + Value *[]ProcessInfo `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ProcessInfoCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ProcessInfoCollection) ProcessInfoCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ProcessModuleInfo is process Module Information. +type ProcessModuleInfo struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *ProcessModuleInfoProperties `json:"properties,omitempty"` +} + +// ProcessModuleInfoProperties is processModuleInfo resource specific properties +type ProcessModuleInfoProperties struct { + BaseAddress *string `json:"baseAddress,omitempty"` + FileName *string `json:"fileName,omitempty"` + Href *string `json:"href,omitempty"` + FilePath *string `json:"filePath,omitempty"` + ModuleMemorySize *int32 `json:"moduleMemorySize,omitempty"` + FileVersion *string `json:"fileVersion,omitempty"` + FileDescription *string `json:"fileDescription,omitempty"` + Product *string `json:"product,omitempty"` + ProductVersion *string `json:"productVersion,omitempty"` + IsDebug *bool `json:"isDebug,omitempty"` + Language *string `json:"language,omitempty"` +} + +// ProcessModuleInfoCollection is collection of Kudu thread information elements. +type ProcessModuleInfoCollection struct { + autorest.Response `json:"-"` + Value *[]ProcessModuleInfo `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ProcessModuleInfoCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ProcessModuleInfoCollection) ProcessModuleInfoCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ProcessThreadInfo is process Thread Information. +type ProcessThreadInfo struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *ProcessThreadInfoProperties `json:"properties,omitempty"` +} + +// ProcessThreadInfoProperties is processThreadInfo resource specific properties +type ProcessThreadInfoProperties struct { + ID *int32 `json:"id,omitempty"` + Href *string `json:"href,omitempty"` + Process *string `json:"process,omitempty"` + StartAddress *string `json:"startAddress,omitempty"` + CurrentPriority *int32 `json:"currentPriority,omitempty"` + PriorityLevel *string `json:"priorityLevel,omitempty"` + BasePriority *int32 `json:"basePriority,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + TotalProcessorTime *string `json:"totalProcessorTime,omitempty"` + UserProcessorTime *string `json:"userProcessorTime,omitempty"` + PriviledgedProcessorTime *string `json:"priviledgedProcessorTime,omitempty"` + State *string `json:"state,omitempty"` + WaitReason *string `json:"waitReason,omitempty"` +} + +// ProcessThreadInfoCollection is collection of Kudu thread information elements. +type ProcessThreadInfoCollection struct { + autorest.Response `json:"-"` + Value *[]ProcessThreadInfo `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// ProcessThreadInfoCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client ProcessThreadInfoCollection) ProcessThreadInfoCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// ProxyOnlyResource is azure proxy only resource. This resource is not tracked by Azure Resource Manager. +type ProxyOnlyResource struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` +} + +// PublicCertificate is public certificate object +type PublicCertificate struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *PublicCertificateProperties `json:"properties,omitempty"` +} + +// PublicCertificateProperties is publicCertificate resource specific properties +type PublicCertificateProperties struct { + Blob *string `json:"blob,omitempty"` + PublicCertificateLocation PublicCertificateLocation `json:"publicCertificateLocation,omitempty"` + Thumbprint *string `json:"thumbprint,omitempty"` +} + +// PublicCertificateCollection is collection of public certificates +type PublicCertificateCollection struct { + autorest.Response `json:"-"` + Value *[]PublicCertificate `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// PublicCertificateCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client PublicCertificateCollection) PublicCertificateCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // PushSettings is push settings for the App. type PushSettings struct { - autorest.Response `json:"-"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *PushSettingsProperties `json:"properties,omitempty"` +} + +// PushSettingsProperties is pushSettings resource specific properties +type PushSettingsProperties struct { IsPushEnabled *bool `json:"isPushEnabled,omitempty"` TagWhitelistJSON *string `json:"tagWhitelistJson,omitempty"` TagsRequiringAuth *string `json:"tagsRequiringAuth,omitempty"` DynamicTagsJSON *string `json:"dynamicTagsJson,omitempty"` } -// RampUpRule is routing rules for ramp up testing. This rule allows to -// redirect static traffic % to a slot or to gradually change routing % based -// on performance. +// RampUpRule is routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to +// gradually change routing % based on performance. type RampUpRule struct { ActionHostName *string `json:"actionHostName,omitempty"` ReroutePercentage *float64 `json:"reroutePercentage,omitempty"` @@ -2424,8 +2802,7 @@ type ReadCloser struct { Value *io.ReadCloser `json:"value,omitempty"` } -// Recommendation is represents a recommendation result generated by the -// recommendation engine. +// Recommendation is represents a recommendation result generated by the recommendation engine. type Recommendation struct { CreationTime *date.Time `json:"creationTime,omitempty"` RecommendationID *string `json:"recommendationId,omitempty"` @@ -2450,8 +2827,7 @@ type Recommendation struct { ForwardLink *string `json:"forwardLink,omitempty"` } -// RecommendationRule is represents a recommendation rule that the -// recommendation engine can perform. +// RecommendationRule is represents a recommendation rule that the recommendation engine can perform. type RecommendationRule struct { autorest.Response `json:"-"` Name *string `json:"name,omitempty"` @@ -2469,25 +2845,7 @@ type RecommendationRule struct { ForwardLink *string `json:"forwardLink,omitempty"` } -// RecoverResponse is response for an app recovery request. -type RecoverResponse struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *RecoverResponseProperties `json:"properties,omitempty"` -} - -// RecoverResponseProperties is recoverResponse resource specific properties -type RecoverResponseProperties struct { - OperationID *string `json:"operationId,omitempty"` -} - -// ReissueCertificateOrderRequest is class representing certificate reissue -// request. +// ReissueCertificateOrderRequest is class representing certificate reissue request. type ReissueCertificateOrderRequest struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -2498,8 +2856,7 @@ type ReissueCertificateOrderRequest struct { *ReissueCertificateOrderRequestProperties `json:"properties,omitempty"` } -// ReissueCertificateOrderRequestProperties is reissueCertificateOrderRequest -// resource specific properties +// ReissueCertificateOrderRequestProperties is reissueCertificateOrderRequest resource specific properties type ReissueCertificateOrderRequestProperties struct { KeySize *int32 `json:"keySize,omitempty"` DelayExistingRevokeInHours *int32 `json:"delayExistingRevokeInHours,omitempty"` @@ -2510,17 +2867,14 @@ type ReissueCertificateOrderRequestProperties struct { // RelayServiceConnectionEntity is hybrid Connection for an App Service app. type RelayServiceConnectionEntity struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *RelayServiceConnectionEntityProperties `json:"properties,omitempty"` } -// RelayServiceConnectionEntityProperties is relayServiceConnectionEntity -// resource specific properties +// RelayServiceConnectionEntityProperties is relayServiceConnectionEntity resource specific properties type RelayServiceConnectionEntityProperties struct { EntityName *string `json:"entityName,omitempty"` EntityConnectionString *string `json:"entityConnectionString,omitempty"` @@ -2531,8 +2885,7 @@ type RelayServiceConnectionEntityProperties struct { BiztalkURI *string `json:"biztalkUri,omitempty"` } -// RenewCertificateOrderRequest is class representing certificate renew -// request. +// RenewCertificateOrderRequest is class representing certificate renew request. type RenewCertificateOrderRequest struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -2543,8 +2896,7 @@ type RenewCertificateOrderRequest struct { *RenewCertificateOrderRequestProperties `json:"properties,omitempty"` } -// RenewCertificateOrderRequestProperties is renewCertificateOrderRequest -// resource specific properties +// RenewCertificateOrderRequestProperties is renewCertificateOrderRequest resource specific properties type RenewCertificateOrderRequestProperties struct { KeySize *int32 `json:"keySize,omitempty"` Csr *string `json:"csr,omitempty"` @@ -2557,7 +2909,7 @@ type RequestsBasedTrigger struct { TimeInterval *string `json:"timeInterval,omitempty"` } -// Resource is azure resource. +// Resource is azure resource. This resource is tracked in Azure Resource Manager type Resource struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` @@ -2586,26 +2938,6 @@ func (client ResourceCollection) ResourceCollectionPreparer() (*http.Request, er autorest.WithBaseURL(to.String(client.NextLink))) } -// ResourceHealthMetadata is used for getting ResourceHealthCheck settings. -type ResourceHealthMetadata struct { - autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` - *ResourceHealthMetadataProperties `json:"properties,omitempty"` -} - -// ResourceHealthMetadataProperties is resourceHealthMetadata resource specific -// properties -type ResourceHealthMetadataProperties struct { - ID *string `json:"id,omitempty"` - Category *string `json:"category,omitempty"` - SignalAvailability *bool `json:"signalAvailability,omitempty"` -} - // ResourceMetric is object representing a metric for any resource . type ResourceMetric struct { Name *ResourceMetricName `json:"name,omitempty"` @@ -2646,17 +2978,14 @@ func (client ResourceMetricCollection) ResourceMetricCollectionPreparer() (*http // ResourceMetricDefinition is metadata for the metrics. type ResourceMetricDefinition struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *ResourceMetricDefinitionProperties `json:"properties,omitempty"` } -// ResourceMetricDefinitionProperties is resourceMetricDefinition resource -// specific properties +// ResourceMetricDefinitionProperties is resourceMetricDefinition resource specific properties type ResourceMetricDefinitionProperties struct { Name *ResourceMetricName `json:"name,omitempty"` Unit *string `json:"unit,omitempty"` @@ -2709,8 +3038,7 @@ type ResourceMetricValue struct { Properties *[]ResourceMetricProperty `json:"properties,omitempty"` } -// ResourceNameAvailability is information regarding availbility of a resource -// name. +// ResourceNameAvailability is information regarding availbility of a resource name. type ResourceNameAvailability struct { autorest.Response `json:"-"` NameAvailable *bool `json:"nameAvailable,omitempty"` @@ -2718,8 +3046,7 @@ type ResourceNameAvailability struct { Message *string `json:"message,omitempty"` } -// ResourceNameAvailabilityRequest is resource name availability request -// content. +// ResourceNameAvailabilityRequest is resource name availability request content. type ResourceNameAvailabilityRequest struct { Name *string `json:"name,omitempty"` Type CheckNameResourceTypes `json:"type,omitempty"` @@ -2729,12 +3056,10 @@ type ResourceNameAvailabilityRequest struct { // RestoreRequest is description of a restore request. type RestoreRequest struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *RestoreRequestProperties `json:"properties,omitempty"` } @@ -2746,6 +3071,8 @@ type RestoreRequestProperties struct { SiteName *string `json:"siteName,omitempty"` Databases *[]DatabaseBackupSetting `json:"databases,omitempty"` IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` + IgnoreDatabases *bool `json:"ignoreDatabases,omitempty"` + AppServicePlan *string `json:"appServicePlan,omitempty"` OperationType BackupRestoreOperationType `json:"operationType,omitempty"` AdjustConnectionStrings *bool `json:"adjustConnectionStrings,omitempty"` HostingEnvironment *string `json:"hostingEnvironment,omitempty"` @@ -2754,12 +3081,10 @@ type RestoreRequestProperties struct { // RestoreResponse is response for an app restore request. type RestoreResponse struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *RestoreResponseProperties `json:"properties,omitempty"` } @@ -2768,6 +3093,11 @@ type RestoreResponseProperties struct { OperationID *string `json:"operationId,omitempty"` } +// ServiceSpecification is +type ServiceSpecification struct { + MetricSpecifications *[]MetricSpecification `json:"metricSpecifications,omitempty"` +} + // SetObject is type SetObject struct { autorest.Response `json:"-"` @@ -2801,12 +3131,9 @@ type SiteProperties struct { LastModifiedTimeUtc *date.Time `json:"lastModifiedTimeUtc,omitempty"` SiteConfig *SiteConfig `json:"siteConfig,omitempty"` TrafficManagerHostNames *[]string `json:"trafficManagerHostNames,omitempty"` - PremiumAppDeployed *bool `json:"premiumAppDeployed,omitempty"` ScmSiteAlsoStopped *bool `json:"scmSiteAlsoStopped,omitempty"` TargetSwapSlot *string `json:"targetSwapSlot,omitempty"` HostingEnvironmentProfile *HostingEnvironmentProfile `json:"hostingEnvironmentProfile,omitempty"` - MicroService *string `json:"microService,omitempty"` - GatewaySiteName *string `json:"gatewaySiteName,omitempty"` ClientAffinityEnabled *bool `json:"clientAffinityEnabled,omitempty"` ClientCertEnabled *bool `json:"clientCertEnabled,omitempty"` HostNamesDisabled *bool `json:"hostNamesDisabled,omitempty"` @@ -2816,22 +3143,23 @@ type SiteProperties struct { SuspendedTill *date.Time `json:"suspendedTill,omitempty"` MaxNumberOfWorkers *int32 `json:"maxNumberOfWorkers,omitempty"` CloningInfo *CloningInfo `json:"cloningInfo,omitempty"` + SnapshotInfo *SnapshotRecoveryRequest `json:"snapshotInfo,omitempty"` ResourceGroup *string `json:"resourceGroup,omitempty"` IsDefaultContainer *bool `json:"isDefaultContainer,omitempty"` DefaultHostName *string `json:"defaultHostName,omitempty"` SlotSwapStatus *SlotSwapStatus `json:"slotSwapStatus,omitempty"` + PremiumAppDeployed *bool `json:"premiumAppDeployed,omitempty"` + MicroService *string `json:"microService,omitempty"` + GatewaySiteName *string `json:"gatewaySiteName,omitempty"` } -// SiteAuthSettings is configuration settings for the Azure App Service -// Authentication / Authorization feature. +// SiteAuthSettings is configuration settings for the Azure App Service Authentication / Authorization feature. type SiteAuthSettings struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SiteAuthSettingsProperties `json:"properties,omitempty"` } @@ -2927,12 +3255,10 @@ type SiteConfig struct { // SiteConfigResource is web app configuration ARM resource. type SiteConfigResource struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SiteConfig `json:"properties,omitempty"` } @@ -2957,30 +3283,78 @@ func (client SiteConfigResourceCollection) SiteConfigResourceCollectionPreparer( // SiteConfigurationSnapshotInfo is a snapshot of a web app configuration. type SiteConfigurationSnapshotInfo struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SiteConfigurationSnapshotInfoProperties `json:"properties,omitempty"` } -// SiteConfigurationSnapshotInfoProperties is siteConfigurationSnapshotInfo -// resource specific properties +// SiteConfigurationSnapshotInfoProperties is siteConfigurationSnapshotInfo resource specific properties type SiteConfigurationSnapshotInfoProperties struct { Time *date.Time `json:"time,omitempty"` ID *int32 `json:"id,omitempty"` } +// SiteExtensionInfo is site Extension Information. +type SiteExtensionInfo struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *SiteExtensionInfoProperties `json:"properties,omitempty"` +} + +// SiteExtensionInfoProperties is siteExtensionInfo resource specific properties +type SiteExtensionInfoProperties struct { + ID *string `json:"id,omitempty"` + Title *string `json:"title,omitempty"` + Type SiteExtensionType `json:"type,omitempty"` + Summary *string `json:"summary,omitempty"` + Description *string `json:"description,omitempty"` + Version *string `json:"version,omitempty"` + ExtensionURL *string `json:"extensionUrl,omitempty"` + ProjectURL *string `json:"projectUrl,omitempty"` + IconURL *string `json:"iconUrl,omitempty"` + LicenseURL *string `json:"licenseUrl,omitempty"` + FeedURL *string `json:"feedUrl,omitempty"` + Authors *[]string `json:"authors,omitempty"` + InstallationArgs *string `json:"installationArgs,omitempty"` + PublishedDateTime *date.Time `json:"publishedDateTime,omitempty"` + DownloadCount *int32 `json:"downloadCount,omitempty"` + LocalIsLatestVersion *bool `json:"localIsLatestVersion,omitempty"` + LocalPath *string `json:"localPath,omitempty"` + InstalledDateTime *date.Time `json:"installedDateTime,omitempty"` + ProvisioningState *string `json:"provisioningState,omitempty"` + Comment *string `json:"comment,omitempty"` +} + +// SiteExtensionInfoCollection is collection of Kudu site extension information elements. +type SiteExtensionInfoCollection struct { + autorest.Response `json:"-"` + Value *[]SiteExtensionInfo `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SiteExtensionInfoCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SiteExtensionInfoCollection) SiteExtensionInfoCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // SiteInstance is instance of an app. type SiteInstance struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SiteInstanceProperties `json:"properties,omitempty"` } @@ -2999,12 +3373,10 @@ type SiteLimits struct { // SiteLogsConfig is configuration of App Service site logs. type SiteLogsConfig struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SiteLogsConfigProperties `json:"properties,omitempty"` } @@ -3027,17 +3399,14 @@ type SiteMachineKey struct { // SitePhpErrorLogFlag is used for getting PHP error logging flag. type SitePhpErrorLogFlag struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SitePhpErrorLogFlagProperties `json:"properties,omitempty"` } -// SitePhpErrorLogFlagProperties is sitePhpErrorLogFlag resource specific -// properties +// SitePhpErrorLogFlagProperties is sitePhpErrorLogFlag resource specific properties type SitePhpErrorLogFlagProperties struct { LocalLogErrors *string `json:"localLogErrors,omitempty"` MasterLogErrors *string `json:"masterLogErrors,omitempty"` @@ -3060,17 +3429,14 @@ type SiteSealRequest struct { // SiteSourceControl is source control configuration for an app. type SiteSourceControl struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SiteSourceControlProperties `json:"properties,omitempty"` } -// SiteSourceControlProperties is siteSourceControl resource specific -// properties +// SiteSourceControlProperties is siteSourceControl resource specific properties type SiteSourceControlProperties struct { RepoURL *string `json:"repoUrl,omitempty"` Branch *string `json:"branch,omitempty"` @@ -3099,7 +3465,7 @@ type SkuDescription struct { Capabilities *[]Capability `json:"capabilities,omitempty"` } -// SkuInfo is sKU discovery information. +// SkuInfo is SKU discovery information. type SkuInfo struct { ResourceType *string `json:"resourceType,omitempty"` Sku *SkuDescription `json:"sku,omitempty"` @@ -3132,9 +3498,8 @@ type SkuInfos struct { Skus *[]GlobalCsmSkuDescription `json:"skus,omitempty"` } -// SlotConfigNames is names for connection strings and application settings to -// be marked as sticky to the deployment slot and not moved during a swap -// operation. +// SlotConfigNames is names for connection strings and application settings to be marked as sticky to the deployment +// slot and not moved during a swap operation. // This is valid for all deployment slots in an app. type SlotConfigNames struct { ConnectionStringNames *[]string `json:"connectionStringNames,omitempty"` @@ -3144,24 +3509,19 @@ type SlotConfigNames struct { // SlotConfigNamesResource is slot Config names azure resource. type SlotConfigNamesResource struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SlotConfigNames `json:"properties,omitempty"` } -// SlotDifference is a setting difference between two deployment slots of an -// app. +// SlotDifference is a setting difference between two deployment slots of an app. type SlotDifference struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SlotDifferenceProperties `json:"properties,omitempty"` } @@ -3211,22 +3571,19 @@ type SlowRequestsBasedTrigger struct { // Snapshot is a snapshot of an app. type Snapshot struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SnapshotProperties `json:"properties,omitempty"` } // SnapshotProperties is snapshot resource specific properties type SnapshotProperties struct { - Time *date.Time `json:"time,omitempty"` + Time *string `json:"time,omitempty"` } -// SnapshotCollection is collection of snapshots which can be used to revert an -// app to a previous time. +// SnapshotCollection is collection of snapshots which can be used to revert an app to a previous time. type SnapshotCollection struct { autorest.Response `json:"-"` Value *[]Snapshot `json:"value,omitempty"` @@ -3245,15 +3602,37 @@ func (client SnapshotCollection) SnapshotCollectionPreparer() (*http.Request, er autorest.WithBaseURL(to.String(client.NextLink))) } +// SnapshotRecoveryRequest is details about app recovery operation. +type SnapshotRecoveryRequest struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *SnapshotRecoveryRequestProperties `json:"properties,omitempty"` +} + +// SnapshotRecoveryRequestProperties is snapshotRecoveryRequest resource specific properties +type SnapshotRecoveryRequestProperties struct { + SnapshotTime *string `json:"snapshotTime,omitempty"` + RecoveryTarget *SnapshotRecoveryTarget `json:"recoveryTarget,omitempty"` + Overwrite *bool `json:"overwrite,omitempty"` + RecoverConfiguration *bool `json:"recoverConfiguration,omitempty"` + IgnoreConflictingHostNames *bool `json:"ignoreConflictingHostNames,omitempty"` +} + +// SnapshotRecoveryTarget is specifies the web app that snapshot contents will be written to. +type SnapshotRecoveryTarget struct { + Location *string `json:"location,omitempty"` + ID *string `json:"id,omitempty"` +} + // SourceControl is the source control OAuth token. type SourceControl struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *SourceControlProperties `json:"properties,omitempty"` } @@ -3329,17 +3708,14 @@ type StatusCodesBasedTrigger struct { // StorageMigrationOptions is options for app content migration. type StorageMigrationOptions struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *StorageMigrationOptionsProperties `json:"properties,omitempty"` } -// StorageMigrationOptionsProperties is storageMigrationOptions resource -// specific properties +// StorageMigrationOptionsProperties is storageMigrationOptions resource specific properties type StorageMigrationOptionsProperties struct { AzurefilesConnectionString *string `json:"azurefilesConnectionString,omitempty"` AzurefilesShare *string `json:"azurefilesShare,omitempty"` @@ -3350,17 +3726,14 @@ type StorageMigrationOptionsProperties struct { // StorageMigrationResponse is response for a migration of app content request. type StorageMigrationResponse struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *StorageMigrationResponseProperties `json:"properties,omitempty"` } -// StorageMigrationResponseProperties is storageMigrationResponse resource -// specific properties +// StorageMigrationResponseProperties is storageMigrationResponse resource specific properties type StorageMigrationResponseProperties struct { OperationID *string `json:"operationId,omitempty"` } @@ -3377,9 +3750,7 @@ type StringDictionary struct { ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` Properties *map[string]*string `json:"properties,omitempty"` } @@ -3391,8 +3762,7 @@ type TldLegalAgreement struct { URL *string `json:"url,omitempty"` } -// TldLegalAgreementCollection is collection of top-level domain legal -// agreements. +// TldLegalAgreementCollection is collection of top-level domain legal agreements. type TldLegalAgreementCollection struct { autorest.Response `json:"-"` Value *[]TldLegalAgreement `json:"value,omitempty"` @@ -3414,12 +3784,10 @@ func (client TldLegalAgreementCollection) TldLegalAgreementCollectionPreparer() // TopLevelDomain is a top level domain object. type TopLevelDomain struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *TopLevelDomainProperties `json:"properties,omitempty"` } @@ -3429,8 +3797,7 @@ type TopLevelDomainProperties struct { Privacy *bool `json:"privacy,omitempty"` } -// TopLevelDomainAgreementOption is options for retrieving the list of top -// level domain legal agreements. +// TopLevelDomainAgreementOption is options for retrieving the list of top level domain legal agreements. type TopLevelDomainAgreementOption struct { IncludePrivacy *bool `json:"includePrivacy,omitempty"` ForTransfer *bool `json:"forTransfer,omitempty"` @@ -3455,14 +3822,114 @@ func (client TopLevelDomainCollection) TopLevelDomainCollectionPreparer() (*http autorest.WithBaseURL(to.String(client.NextLink))) } +// TriggeredJobHistory is triggered Web Job History. List of Triggered Web Job Run Information elements. +type TriggeredJobHistory struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *TriggeredJobHistoryProperties `json:"properties,omitempty"` +} + +// TriggeredJobHistoryProperties is triggeredJobHistory resource specific properties +type TriggeredJobHistoryProperties struct { + TriggeredJobRuns *[]TriggeredJobRun `json:"triggeredJobRuns,omitempty"` +} + +// TriggeredJobHistoryCollection is collection of Kudu continuous web job information elements. +type TriggeredJobHistoryCollection struct { + autorest.Response `json:"-"` + Value *[]TriggeredJobHistory `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// TriggeredJobHistoryCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client TriggeredJobHistoryCollection) TriggeredJobHistoryCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// TriggeredJobRun is triggered Web Job Run Information. +type TriggeredJobRun struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *TriggeredJobRunProperties `json:"properties,omitempty"` +} + +// TriggeredJobRunProperties is triggeredJobRun resource specific properties +type TriggeredJobRunProperties struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status TriggeredWebJobStatus `json:"status,omitempty"` + StartTime *date.Time `json:"startTime,omitempty"` + EndTime *date.Time `json:"endTime,omitempty"` + Duration *string `json:"duration,omitempty"` + OutputURL *string `json:"outputUrl,omitempty"` + ErrorURL *string `json:"errorUrl,omitempty"` + URL *string `json:"url,omitempty"` + JobName *string `json:"jobName,omitempty"` + Trigger *string `json:"trigger,omitempty"` +} + +// TriggeredWebJob is triggered Web Job Information. +type TriggeredWebJob struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *TriggeredWebJobProperties `json:"properties,omitempty"` +} + +// TriggeredWebJobProperties is triggeredWebJob resource specific properties +type TriggeredWebJobProperties struct { + LatestRun *TriggeredJobRun `json:"latestRun,omitempty"` + HistoryURL *string `json:"historyUrl,omitempty"` + SchedulerLogsURL *string `json:"schedulerLogsUrl,omitempty"` + Name *string `json:"name,omitempty"` + RunCommand *string `json:"runCommand,omitempty"` + URL *string `json:"url,omitempty"` + ExtraInfoURL *string `json:"extraInfoUrl,omitempty"` + JobType JobType `json:"jobType,omitempty"` + Error *string `json:"error,omitempty"` + UsingSdk *bool `json:"usingSdk,omitempty"` + Settings *map[string]interface{} `json:"settings,omitempty"` +} + +// TriggeredWebJobCollection is collection of Kudu continuous web job information elements. +type TriggeredWebJobCollection struct { + autorest.Response `json:"-"` + Value *[]TriggeredWebJob `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// TriggeredWebJobCollectionPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client TriggeredWebJobCollection) TriggeredWebJobCollectionPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // Usage is usage of the quota resource. type Usage struct { - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *UsageProperties `json:"properties,omitempty"` } @@ -3501,12 +3968,10 @@ func (client UsageCollection) UsageCollectionPreparer() (*http.Request, error) { // User is user crendentials used for publishing activity. type User struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *UserProperties `json:"properties,omitempty"` } @@ -3579,16 +4044,14 @@ type VirtualNetworkProfile struct { Subnet *string `json:"subnet,omitempty"` } -// VnetGateway is the Virtual Network gateway contract. This is used to give -// the Virtual Network gateway access to the VPN package. +// VnetGateway is the Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the +// VPN package. type VnetGateway struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *VnetGatewayProperties `json:"properties,omitempty"` } @@ -3600,25 +4063,47 @@ type VnetGatewayProperties struct { // VnetInfo is virtual Network information contract. type VnetInfo struct { - autorest.Response `json:"-"` - VnetResourceID *string `json:"vnetResourceId,omitempty"` - CertThumbprint *string `json:"certThumbprint,omitempty"` - CertBlob *string `json:"certBlob,omitempty"` - Routes *[]VnetRoute `json:"routes,omitempty"` - ResyncRequired *bool `json:"resyncRequired,omitempty"` - DNSServers *string `json:"dnsServers,omitempty"` + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *VnetInfoProperties `json:"properties,omitempty"` } -// VnetRoute is virtual Network route contract used to pass routing information -// for a Virtual Network. +// VnetInfoProperties is vnetInfo resource specific properties +type VnetInfoProperties struct { + VnetResourceID *string `json:"vnetResourceId,omitempty"` + CertThumbprint *string `json:"certThumbprint,omitempty"` + CertBlob *string `json:"certBlob,omitempty"` + Routes *[]VnetRoute `json:"routes,omitempty"` + ResyncRequired *bool `json:"resyncRequired,omitempty"` + DNSServers *string `json:"dnsServers,omitempty"` +} + +// VnetParameters is the required set of inputs to validate a VNET +type VnetParameters struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *VnetParametersProperties `json:"properties,omitempty"` +} + +// VnetParametersProperties is vnetParameters resource specific properties +type VnetParametersProperties struct { + VnetResourceGroup *string `json:"vnetResourceGroup,omitempty"` + VnetName *string `json:"vnetName,omitempty"` + VnetSubnetName *string `json:"vnetSubnetName,omitempty"` +} + +// VnetRoute is virtual Network route contract used to pass routing information for a Virtual Network. type VnetRoute struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *VnetRouteProperties `json:"properties,omitempty"` } @@ -3630,6 +4115,37 @@ type VnetRouteProperties struct { RouteType RouteType `json:"routeType,omitempty"` } +// VnetValidationFailureDetails is a class that describes the reason for a validation failure. +type VnetValidationFailureDetails struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *VnetValidationFailureDetailsProperties `json:"properties,omitempty"` +} + +// VnetValidationFailureDetailsProperties is vnetValidationFailureDetails resource specific properties +type VnetValidationFailureDetailsProperties struct { + Failed *bool `json:"failed,omitempty"` + FailedTests *[]VnetValidationTestFailure `json:"failedTests,omitempty"` +} + +// VnetValidationTestFailure is a class that describes a test that failed during NSG and UDR validation. +type VnetValidationTestFailure struct { + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` + *VnetValidationTestFailureProperties `json:"properties,omitempty"` +} + +// VnetValidationTestFailureProperties is vnetValidationTestFailure resource specific properties +type VnetValidationTestFailureProperties struct { + TestName *string `json:"testName,omitempty"` + Details *string `json:"details,omitempty"` +} + // WorkerPool is worker pool of an App Service Environment. type WorkerPool struct { WorkerSizeID *int32 `json:"workerSizeId,omitempty"` @@ -3658,16 +4174,13 @@ func (client WorkerPoolCollection) WorkerPoolCollectionPreparer() (*http.Request autorest.WithBaseURL(to.String(client.NextLink))) } -// WorkerPoolResource is worker pool of an App Service Environment ARM -// resource. +// WorkerPoolResource is worker pool of an App Service Environment ARM resource. type WorkerPoolResource struct { autorest.Response `json:"-"` - ID *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Kind *string `json:"kind,omitempty"` - Location *string `json:"location,omitempty"` - Type *string `json:"type,omitempty"` - Tags *map[string]*string `json:"tags,omitempty"` + ID *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Type *string `json:"type,omitempty"` *WorkerPool `json:"properties,omitempty"` Sku *SkuDescription `json:"sku,omitempty"` } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/provider.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/provider.go index b2c75d21f..67d9cb58a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/provider.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/provider.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,7 +23,7 @@ import ( "net/http" ) -// ProviderClient is the composite Swagger for WebSite Management Client +// ProviderClient is the webSite Management Client type ProviderClient struct { ManagementClient } @@ -34,8 +33,7 @@ func NewProviderClient(subscriptionID string) ProviderClient { return NewProviderClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewProviderClientWithBaseURI creates an instance of the ProviderClient -// client. +// NewProviderClientWithBaseURI creates an instance of the ProviderClient client. func NewProviderClientWithBaseURI(baseURI string, subscriptionID string) ProviderClient { return ProviderClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -97,8 +95,7 @@ func (client ProviderClient) GetAvailableStacksResponder(resp *http.Response) (r return } -// GetAvailableStacksOnPrem get available application frameworks and their -// versions +// GetAvailableStacksOnPrem get available application frameworks and their versions func (client ProviderClient) GetAvailableStacksOnPrem() (result SetObject, err error) { req, err := client.GetAvailableStacksOnPremPreparer() if err != nil { @@ -158,3 +155,129 @@ func (client ProviderClient) GetAvailableStacksOnPremResponder(resp *http.Respon result.Response = autorest.Response{Response: resp} return } + +// ListOperations sends the list operations request. +func (client ProviderClient) ListOperations() (result CsmOperationCollection, err error) { + req, err := client.ListOperationsPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "web.ProviderClient", "ListOperations", nil, "Failure preparing request") + return + } + + resp, err := client.ListOperationsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "web.ProviderClient", "ListOperations", resp, "Failure sending request") + return + } + + result, err = client.ListOperationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.ProviderClient", "ListOperations", resp, "Failure responding to request") + } + + return +} + +// ListOperationsPreparer prepares the ListOperations request. +func (client ProviderClient) ListOperationsPreparer() (*http.Request, error) { + const APIVersion = "2016-03-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithBaseURL(client.BaseURI), + autorest.WithPath("/providers/Microsoft.Web/operations"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// ListOperationsSender sends the ListOperations request. The method will close the +// http.Response Body if it receives an error. +func (client ProviderClient) ListOperationsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListOperationsResponder handles the response to the ListOperations request. The method always +// closes the http.Response Body. +func (client ProviderClient) ListOperationsResponder(resp *http.Response) (result CsmOperationCollection, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// ListOperationsNextResults retrieves the next set of results, if any. +func (client ProviderClient) ListOperationsNextResults(lastResults CsmOperationCollection) (result CsmOperationCollection, err error) { + req, err := lastResults.CsmOperationCollectionPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "web.ProviderClient", "ListOperations", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.ListOperationsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "web.ProviderClient", "ListOperations", resp, "Failure sending next results request") + } + + result, err = client.ListOperationsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "web.ProviderClient", "ListOperations", resp, "Failure responding to next results request") + } + + return +} + +// ListOperationsComplete gets all elements from the list without paging. +func (client ProviderClient) ListOperationsComplete(cancel <-chan struct{}) (<-chan CsmOperationDescription, <-chan error) { + resultChan := make(chan CsmOperationDescription) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListOperations() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListOperationsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/recommendations.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/recommendations.go index 3cd70e2f8..33e579ddd 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/recommendations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/recommendations.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -25,27 +24,24 @@ import ( "net/http" ) -// RecommendationsClient is the composite Swagger for WebSite Management Client +// RecommendationsClient is the webSite Management Client type RecommendationsClient struct { ManagementClient } -// NewRecommendationsClient creates an instance of the RecommendationsClient -// client. +// NewRecommendationsClient creates an instance of the RecommendationsClient client. func NewRecommendationsClient(subscriptionID string) RecommendationsClient { return NewRecommendationsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewRecommendationsClientWithBaseURI creates an instance of the -// RecommendationsClient client. +// NewRecommendationsClientWithBaseURI creates an instance of the RecommendationsClient client. func NewRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) RecommendationsClient { return RecommendationsClient{NewWithBaseURI(baseURI, subscriptionID)} } // DisableAllForWebApp disable all recommendations for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. siteName is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. siteName is name of the app. func (client RecommendationsClient) DisableAllForWebApp(resourceGroupName string, siteName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -117,10 +113,9 @@ func (client RecommendationsClient) DisableAllForWebAppResponder(resp *http.Resp // GetRuleDetailsByWebApp get a recommendation rule for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. siteName is name of the app. name is name of the recommendation. -// updateSeen is specify true to update the last-seen timestamp of -// the recommendation object. +// resourceGroupName is name of the resource group to which the resource belongs. siteName is name of the app. name is +// name of the recommendation. updateSeen is specify true to update the last-seen timestamp of the +// recommendation object. func (client RecommendationsClient) GetRuleDetailsByWebApp(resourceGroupName string, siteName string, name string, updateSeen *bool) (result RecommendationRule, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -197,12 +192,10 @@ func (client RecommendationsClient) GetRuleDetailsByWebAppResponder(resp *http.R // List list all recommendations for a subscription. // -// featured is specify true to return only the most critical -// recommendations. The default is false, which returns all -// recommendations. filter is filter is specified by using OData syntax. -// Example: $filter=channels eq 'Api' or channel eq 'Notification' and -// startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' -// and timeGrain eq duration'[PT1H|PT1M|P1D] +// featured is specify true to return only the most critical recommendations. The default is +// false, which returns all recommendations. filter is filter is specified by using OData syntax. Example: +// $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq +// '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] func (client RecommendationsClient) List(featured *bool, filter string) (result ListRecommendation, err error) { req, err := client.ListPreparer(featured, filter) if err != nil { @@ -269,14 +262,11 @@ func (client RecommendationsClient) ListResponder(resp *http.Response) (result L return } -// ListHistoryForWebApp get past recommendations for an app, optionally -// specified by the time range. +// ListHistoryForWebApp get past recommendations for an app, optionally specified by the time range. // -// resourceGroupName is name of the resource group to which the resource -// belongs. siteName is name of the app. filter is filter is specified by using -// OData syntax. Example: $filter=channels eq 'Api' or channel eq -// 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq -// '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] +// resourceGroupName is name of the resource group to which the resource belongs. siteName is name of the app. filter +// is filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and +// startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[PT1H|PT1M|P1D] func (client RecommendationsClient) ListHistoryForWebApp(resourceGroupName string, siteName string, filter string) (result ListRecommendation, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -352,12 +342,10 @@ func (client RecommendationsClient) ListHistoryForWebAppResponder(resp *http.Res // ListRecommendedRulesForWebApp get all recommendations for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. siteName is name of the app. featured is specify true -// to return only the most critical recommendations. The default is -// false, which returns all recommendations. filter is return only -// channels specified in the filter. Filter is specified by using OData syntax. -// Example: $filter=channels eq 'Api' or channel eq 'Notification' +// resourceGroupName is name of the resource group to which the resource belongs. siteName is name of the app. featured +// is specify true to return only the most critical recommendations. The default is false, +// which returns all recommendations. filter is return only channels specified in the filter. Filter is specified by +// using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' func (client RecommendationsClient) ListRecommendedRulesForWebApp(resourceGroupName string, siteName string, featured *bool, filter string) (result ListRecommendation, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, @@ -434,8 +422,7 @@ func (client RecommendationsClient) ListRecommendedRulesForWebAppResponder(resp return } -// ResetAllFilters reset all recommendation opt-out settings for a -// subscription. +// ResetAllFilters reset all recommendation opt-out settings for a subscription. func (client RecommendationsClient) ResetAllFilters() (result autorest.Response, err error) { req, err := client.ResetAllFiltersPreparer() if err != nil { @@ -495,11 +482,9 @@ func (client RecommendationsClient) ResetAllFiltersResponder(resp *http.Response return } -// ResetAllFiltersForWebApp reset all recommendation opt-out settings for an -// app. +// ResetAllFiltersForWebApp reset all recommendation opt-out settings for an app. // -// resourceGroupName is name of the resource group to which the resource -// belongs. siteName is name of the app. +// resourceGroupName is name of the resource group to which the resource belongs. siteName is name of the app. func (client RecommendationsClient) ResetAllFiltersForWebApp(resourceGroupName string, siteName string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: resourceGroupName, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/topleveldomains.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/topleveldomains.go index ea9b2ff91..90961ad25 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/topleveldomains.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/topleveldomains.go @@ -14,9 +14,8 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -24,19 +23,17 @@ import ( "net/http" ) -// TopLevelDomainsClient is the composite Swagger for WebSite Management Client +// TopLevelDomainsClient is the webSite Management Client type TopLevelDomainsClient struct { ManagementClient } -// NewTopLevelDomainsClient creates an instance of the TopLevelDomainsClient -// client. +// NewTopLevelDomainsClient creates an instance of the TopLevelDomainsClient client. func NewTopLevelDomainsClient(subscriptionID string) TopLevelDomainsClient { return NewTopLevelDomainsClientWithBaseURI(DefaultBaseURI, subscriptionID) } -// NewTopLevelDomainsClientWithBaseURI creates an instance of the -// TopLevelDomainsClient client. +// NewTopLevelDomainsClientWithBaseURI creates an instance of the TopLevelDomainsClient client. func NewTopLevelDomainsClientWithBaseURI(baseURI string, subscriptionID string) TopLevelDomainsClient { return TopLevelDomainsClient{NewWithBaseURI(baseURI, subscriptionID)} } @@ -190,11 +187,54 @@ func (client TopLevelDomainsClient) ListNextResults(lastResults TopLevelDomainCo return } -// ListAgreements gets all legal agreements that user needs to accept before -// purchasing a domain. +// ListComplete gets all elements from the list without paging. +func (client TopLevelDomainsClient) ListComplete(cancel <-chan struct{}) (<-chan TopLevelDomain, <-chan error) { + resultChan := make(chan TopLevelDomain) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.List() + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ListAgreements gets all legal agreements that user needs to accept before purchasing a domain. // -// name is name of the top-level domain. agreementOption is domain agreement -// options. +// name is name of the top-level domain. agreementOption is domain agreement options. func (client TopLevelDomainsClient) ListAgreements(name string, agreementOption TopLevelDomainAgreementOption) (result TldLegalAgreementCollection, err error) { req, err := client.ListAgreementsPreparer(name, agreementOption) if err != nil { @@ -281,3 +321,48 @@ func (client TopLevelDomainsClient) ListAgreementsNextResults(lastResults TldLeg return } + +// ListAgreementsComplete gets all elements from the list without paging. +func (client TopLevelDomainsClient) ListAgreementsComplete(name string, agreementOption TopLevelDomainAgreementOption, cancel <-chan struct{}) (<-chan TldLegalAgreement, <-chan error) { + resultChan := make(chan TldLegalAgreement) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.ListAgreements(name, agreementOption) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.ListAgreementsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go index f1398a8b1..664c73556 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/arm/web/version.go @@ -14,15 +14,15 @@ package web // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-web/" + return "Azure-SDK-For-Go/v11.0.0-beta arm-web/" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/client.go b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/client.go index 4648982f0..73dc8a23a 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/client.go @@ -1,5 +1,4 @@ -// Package filesystem implements the Azure ARM Filesystem service API version -// 2016-11-01. +// Package filesystem implements the Azure ARM Filesystem service API version 2016-11-01. // // Creates an Azure Data Lake Store filesystem client. package filesystem @@ -18,9 +17,8 @@ package filesystem // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/filesystemgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/group.go old mode 100755 new mode 100644 similarity index 69% rename from vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/filesystemgroup.go rename to vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/group.go index a7f559c68..7375db295 --- a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/filesystemgroup.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/group.go @@ -14,15 +14,14 @@ package filesystem // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" "github.com/Azure/go-autorest/autorest/validation" - "github.com/satori/uuid" + uuid "github.com/satori/go.uuid" "io" "net/http" ) @@ -37,35 +36,28 @@ func NewGroupClient() GroupClient { return GroupClient{New()} } -// Append used for serial appends to the specified file. NOTE: The target must -// not contain data added by ConcurrentAppend. ConcurrentAppend and Append -// cannot be used interchangeably; once a target file has been modified using -// either of these append options, the other append option cannot be used on -// the target file. +// Append used for serial appends to the specified file. NOTE: The target must not contain data added by +// ConcurrentAppend. ConcurrentAppend and Append cannot be used interchangeably; once a target file has been modified +// using either of these append options, the other append option cannot be used on the target file. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. directFilePath is the Data Lake Store path (starting with -// '/') of the file to which to append. streamContents is the file contents to -// include when appending to the file. streamContents will be closed upon -// successful return. Callers should ensure closure when receiving an error.op -// is the constant value for the operation. appendParameter is flag to skip -// redirection. When append=false or not specified, the request is redirected. -// Submit another HTTP PUT request using the URL in the Location header with -// the file data to be written. When append=true, this redirection is skipped. -// offset is the optional offset in the stream to begin the append operation. -// Default is to append at the end of the stream. syncFlag is optionally -// indicates what to do after completion of the append. DATA indicates more -// data is coming so no sync takes place, METADATA indicates a sync should be -// done to refresh metadata of the file only. CLOSE indicates that both the -// stream and metadata should be refreshed upon append completion. leaseID is -// optional unique GUID per file to ensure single writer semantics, meaning -// that only clients that append to the file with the same leaseId will be -// allowed to do so. fileSessionID is optional unique GUID per file indicating -// all the appends with the same fileSessionId are from the same client and -// same session. This will give a performance benefit when syncFlag is DATA or -// METADATA. -func (client GroupClient) Append(accountName string, directFilePath string, streamContents io.ReadCloser, op string, appendParameter string, offset *int64, syncFlag SyncFlag, leaseID *uuid.UUID, fileSessionID *uuid.UUID) (result autorest.Response, err error) { - req, err := client.AppendPreparer(accountName, directFilePath, streamContents, op, appendParameter, offset, syncFlag, leaseID, fileSessionID) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file to which to append. streamContents is the file contents to include when +// appending to the file. streamContents will be closed upon successful return. Callers should ensure closure when +// receiving an error.appendParameter is flag to skip redirection. When append=false or not specified, the request is +// redirected. Submit another HTTP PUT request using the URL in the Location header with the file data to be written. +// When append=true, this redirection is skipped. op is the constant value for the operation. offset is the optional +// offset in the stream to begin the append operation. Default is to append at the end of the stream. syncFlag is +// optionally indicates what to do after completion of the concurrent append. DATA indicates that more data will be +// sent immediately by the client, the file handle should remain open/locked, and file metadata (including file length, +// last modified time) should NOT get updated. METADATA indicates that more data will be sent immediately by the +// client, the file handle should remain open/locked, and file metadata should get updated. CLOSE indicates that the +// client is done sending data, the file handle should be closed/unlocked, and file metadata should get updated. +// leaseID is optional unique GUID per file to ensure single writer semantics, meaning that only clients that append to +// the file with the same leaseId will be allowed to do so. fileSessionID is optional unique GUID per file indicating +// all the appends with the same fileSessionId are from the same client and same session. This will give a performance +// benefit when syncFlag is DATA or METADATA. +func (client GroupClient) Append(accountName string, pathParameter string, streamContents io.ReadCloser, appendParameter string, op string, offset *int64, syncFlag SyncFlag, leaseID *uuid.UUID, fileSessionID *uuid.UUID) (result autorest.Response, err error) { + req, err := client.AppendPreparer(accountName, pathParameter, streamContents, appendParameter, op, offset, syncFlag, leaseID, fileSessionID) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "Append", nil, "Failure preparing request") return @@ -87,14 +79,14 @@ func (client GroupClient) Append(accountName string, directFilePath string, stre } // AppendPreparer prepares the Append request. -func (client GroupClient) AppendPreparer(accountName string, directFilePath string, streamContents io.ReadCloser, op string, appendParameter string, offset *int64, syncFlag SyncFlag, leaseID *uuid.UUID, fileSessionID *uuid.UUID) (*http.Request, error) { +func (client GroupClient) AppendPreparer(accountName string, pathParameter string, streamContents io.ReadCloser, appendParameter string, op string, offset *int64, syncFlag SyncFlag, leaseID *uuid.UUID, fileSessionID *uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "directFilePath": autorest.Encode("path", directFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -119,7 +111,7 @@ func (client GroupClient) AppendPreparer(accountName string, directFilePath stri preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{directFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithFile(streamContents), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -145,11 +137,9 @@ func (client GroupClient) AppendResponder(resp *http.Response) (result autorest. // CheckAccess checks if the specified access is available at the given path. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. pathParameter is the Data Lake Store path (starting with '/') -// of the file or directory for which to check access. fsaction is file system -// operation read/write/execute in string form, matching regex pattern -// '[rwx-]{3}' op is the constant value for the operation. +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory for which to check access. fsaction is file system operation +// read/write/execute in string form, matching regex pattern '[rwx-]{3}' op is the constant value for the operation. func (client GroupClient) CheckAccess(accountName string, pathParameter string, fsaction string, op string) (result autorest.Response, err error) { req, err := client.CheckAccessPreparer(accountName, pathParameter, fsaction, op) if err != nil { @@ -216,23 +206,20 @@ func (client GroupClient) CheckAccessResponder(resp *http.Response) (result auto return } -// Concat concatenates the list of source files into the destination file, -// removing all source files upon success. +// Concat concatenates the list of source files into the destination file, removing all source files upon success. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. destinationPath is the Data Lake Store path (starting with -// '/') of the destination file resulting from the concatenation. sources is a -// list of comma separated Data Lake Store paths (starting with '/') of the -// files to concatenate, in the order in which they should be concatenated. op -// is the constant value for the operation. -func (client GroupClient) Concat(accountName string, destinationPath string, sources []string, op string) (result autorest.Response, err error) { +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the destination file resulting from the concatenation. sources is a list of comma +// separated Data Lake Store paths (starting with '/') of the files to concatenate, in the order in which they should +// be concatenated. op is the constant value for the operation. +func (client GroupClient) Concat(accountName string, pathParameter string, sources []string, op string) (result autorest.Response, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: sources, Constraints: []validation.Constraint{{Target: "sources", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { return result, validation.NewErrorWithValidationError(err, "filesystem.GroupClient", "Concat") } - req, err := client.ConcatPreparer(accountName, destinationPath, sources, op) + req, err := client.ConcatPreparer(accountName, pathParameter, sources, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "Concat", nil, "Failure preparing request") return @@ -254,14 +241,14 @@ func (client GroupClient) Concat(accountName string, destinationPath string, sou } // ConcatPreparer prepares the Concat request. -func (client GroupClient) ConcatPreparer(accountName string, destinationPath string, sources []string, op string) (*http.Request, error) { +func (client GroupClient) ConcatPreparer(accountName string, pathParameter string, sources []string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "destinationPath": autorest.Encode("path", destinationPath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -274,7 +261,7 @@ func (client GroupClient) ConcatPreparer(accountName string, destinationPath str preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{destinationPath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -297,31 +284,25 @@ func (client GroupClient) ConcatResponder(resp *http.Response) (result autorest. return } -// ConcurrentAppend appends to the specified file, optionally first creating -// the file if it does not yet exist. This method supports multiple concurrent -// appends to the file. NOTE: The target must not contain data added by Create -// or normal (serial) Append. ConcurrentAppend and Append cannot be used -// interchangeably; once a target file has been modified using either of these -// append options, the other append option cannot be used on the target file. -// ConcurrentAppend does not guarantee order and can result in duplicated data -// landing in the target file. +// ConcurrentAppend appends to the specified file, optionally first creating the file if it does not yet exist. This +// method supports multiple concurrent appends to the file. NOTE: The target must not contain data added by Create or +// normal (serial) Append. ConcurrentAppend and Append cannot be used interchangeably; once a target file has been +// modified using either of these append options, the other append option cannot be used on the target file. +// ConcurrentAppend does not guarantee order and can result in duplicated data landing in the target file. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. filePath is the Data Lake Store path (starting with '/') of -// the file to which to append using concurrent append. streamContents is the -// file contents to include when appending to the file. streamContents will be -// closed upon successful return. Callers should ensure closure when receiving -// an error.op is the constant value for the operation. transferEncoding is -// indicates the data being sent to the server is being streamed in chunks. -// appendMode is indicates the concurrent append call should create the file if -// it doesn't exist or just open the existing file for append syncFlag is -// optionally indicates what to do after completion of the concurrent append. -// DATA indicates more data is coming so no sync takes place, METADATA -// indicates a sync should be done to refresh metadata of the file only. CLOSE -// indicates that both the stream and metadata should be refreshed upon append -// completion. -func (client GroupClient) ConcurrentAppend(accountName string, filePath string, streamContents io.ReadCloser, op string, transferEncoding string, appendMode AppendModeType, syncFlag SyncFlag) (result autorest.Response, err error) { - req, err := client.ConcurrentAppendPreparer(accountName, filePath, streamContents, op, transferEncoding, appendMode, syncFlag) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file to which to append using concurrent append. streamContents is the file +// contents to include when appending to the file. streamContents will be closed upon successful return. Callers should +// ensure closure when receiving an error.op is the constant value for the operation. transferEncoding is indicates the +// data being sent to the server is being streamed in chunks. appendMode is indicates the concurrent append call should +// create the file if it doesn't exist or just open the existing file for append syncFlag is optionally indicates what +// to do after completion of the concurrent append. DATA indicates that more data will be sent immediately by the +// client, the file handle should remain open/locked, and file metadata (including file length, last modified time) +// should NOT get updated. METADATA indicates that more data will be sent immediately by the client, the file handle +// should remain open/locked, and file metadata should get updated. CLOSE indicates that the client is done sending +// data, the file handle should be closed/unlocked, and file metadata should get updated. +func (client GroupClient) ConcurrentAppend(accountName string, pathParameter string, streamContents io.ReadCloser, op string, transferEncoding string, appendMode AppendModeType, syncFlag SyncFlag) (result autorest.Response, err error) { + req, err := client.ConcurrentAppendPreparer(accountName, pathParameter, streamContents, op, transferEncoding, appendMode, syncFlag) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "ConcurrentAppend", nil, "Failure preparing request") return @@ -343,14 +324,14 @@ func (client GroupClient) ConcurrentAppend(accountName string, filePath string, } // ConcurrentAppendPreparer prepares the ConcurrentAppend request. -func (client GroupClient) ConcurrentAppendPreparer(accountName string, filePath string, streamContents io.ReadCloser, op string, transferEncoding string, appendMode AppendModeType, syncFlag SyncFlag) (*http.Request, error) { +func (client GroupClient) ConcurrentAppendPreparer(accountName string, pathParameter string, streamContents io.ReadCloser, op string, transferEncoding string, appendMode AppendModeType, syncFlag SyncFlag) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "filePath": autorest.Encode("path", filePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -368,7 +349,7 @@ func (client GroupClient) ConcurrentAppendPreparer(accountName string, filePath preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/WebHdfsExt/{filePath}", pathParameters), + autorest.WithPathParameters("/WebHdfsExt/{path}", pathParameters), autorest.WithFile(streamContents), autorest.WithQueryParameters(queryParameters), autorest.WithHeader("Transfer-Encoding", autorest.String(transferEncoding))) @@ -393,31 +374,26 @@ func (client GroupClient) ConcurrentAppendResponder(resp *http.Response) (result return } -// Create creates a file with optionally specified content. NOTE: If content is -// provided, the resulting file cannot be modified using ConcurrentAppend. +// Create creates a file with optionally specified content. NOTE: If content is provided, the resulting file cannot be +// modified using ConcurrentAppend. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. directFilePath is the Data Lake Store path (starting with -// '/') of the file to create. op is the constant value for the operation. -// write is flag to skip redirection. When write=false or not specified, the -// request is redirected. Submit another HTTP PUT request using the URL in the -// Location header with the file data to be written. When write=true, this -// redirection is skipped. streamContents is the file contents to include when -// creating the file. This parameter is optional, resulting in an empty file if -// not specified. streamContents will be closed upon successful return. Callers -// should ensure closure when receiving an error.overwrite is the indication of -// if the file should be overwritten. syncFlag is optionally indicates what to -// do after completion of the append. DATA indicates more data is coming so no -// sync takes place, METADATA indicates a sync should be done to refresh -// metadata of the file only. CLOSE indicates that both the stream and metadata -// should be refreshed upon create completion. leaseID is optional unique GUID -// per file to ensure single writer semantics, meaning that only clients that -// append to the file with the same leaseId will be allowed to do so. -// permission is the octal representation of the unnamed user, mask and other -// permissions that should be set for the file when created. If not specified, -// it inherits these from the container. -func (client GroupClient) Create(accountName string, directFilePath string, op string, write string, streamContents io.ReadCloser, overwrite *bool, syncFlag SyncFlag, leaseID *uuid.UUID, permission *int32) (result autorest.Response, err error) { - req, err := client.CreatePreparer(accountName, directFilePath, op, write, streamContents, overwrite, syncFlag, leaseID, permission) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file to create. write is flag to skip redirection. When write=false or not +// specified, the request is redirected. Submit another HTTP PUT request using the URL in the Location header with the +// file data to be written. When write=true, this redirection is skipped. op is the constant value for the operation. +// streamContents is the file contents to include when creating the file. This parameter is optional, resulting in an +// empty file if not specified. streamContents will be closed upon successful return. Callers should ensure closure +// when receiving an error.overwrite is the indication of if the file should be overwritten. syncFlag is optionally +// indicates what to do after completion of the create. DATA indicates that more data will be sent immediately by the +// client, the file handle should remain open/locked, and file metadata (including file length, last modified time) +// should NOT get updated. METADATA indicates that more data will be sent immediately by the client, the file handle +// should remain open/locked, and file metadata should get updated. CLOSE indicates that the client is done sending +// data, the file handle should be closed/unlocked, and file metadata should get updated. leaseID is optional unique +// GUID per file to ensure single writer semantics, meaning that only clients that append to the file with the same +// leaseId will be allowed to do so. permission is the octal representation of the unnamed user, mask and other +// permissions that should be set for the file when created. If not specified, it inherits these from the container. +func (client GroupClient) Create(accountName string, pathParameter string, write string, op string, streamContents io.ReadCloser, overwrite *bool, syncFlag SyncFlag, leaseID *uuid.UUID, permission *int32) (result autorest.Response, err error) { + req, err := client.CreatePreparer(accountName, pathParameter, write, op, streamContents, overwrite, syncFlag, leaseID, permission) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "Create", nil, "Failure preparing request") return @@ -439,14 +415,14 @@ func (client GroupClient) Create(accountName string, directFilePath string, op s } // CreatePreparer prepares the Create request. -func (client GroupClient) CreatePreparer(accountName string, directFilePath string, op string, write string, streamContents io.ReadCloser, overwrite *bool, syncFlag SyncFlag, leaseID *uuid.UUID, permission *int32) (*http.Request, error) { +func (client GroupClient) CreatePreparer(accountName string, pathParameter string, write string, op string, streamContents io.ReadCloser, overwrite *bool, syncFlag SyncFlag, leaseID *uuid.UUID, permission *int32) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "directFilePath": autorest.Encode("path", directFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -471,7 +447,7 @@ func (client GroupClient) CreatePreparer(accountName string, directFilePath stri preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{directFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) if streamContents != nil { preparer = autorest.DecoratePreparer(preparer, @@ -500,13 +476,11 @@ func (client GroupClient) CreateResponder(resp *http.Response) (result autorest. // Delete deletes the requested file or directory, optionally recursively. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. filePath is the Data Lake Store path (starting with '/') of -// the file or directory to delete. op is the constant value for the operation. -// recursive is the optional switch indicating if the delete should be -// recursive -func (client GroupClient) Delete(accountName string, filePath string, op string, recursive *bool) (result FileOperationResult, err error) { - req, err := client.DeletePreparer(accountName, filePath, op, recursive) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory to delete. op is the constant value for the operation. +// recursive is the optional switch indicating if the delete should be recursive +func (client GroupClient) Delete(accountName string, pathParameter string, op string, recursive *bool) (result FileOperationResult, err error) { + req, err := client.DeletePreparer(accountName, pathParameter, op, recursive) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "Delete", nil, "Failure preparing request") return @@ -528,14 +502,14 @@ func (client GroupClient) Delete(accountName string, filePath string, op string, } // DeletePreparer prepares the Delete request. -func (client GroupClient) DeletePreparer(accountName string, filePath string, op string, recursive *bool) (*http.Request, error) { +func (client GroupClient) DeletePreparer(accountName string, pathParameter string, op string, recursive *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "filePath": autorest.Encode("path", filePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -550,7 +524,7 @@ func (client GroupClient) DeletePreparer(accountName string, filePath string, op preparer := autorest.CreatePreparer( autorest.AsDelete(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{filePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -574,18 +548,14 @@ func (client GroupClient) DeleteResponder(resp *http.Response) (result FileOpera return } -// GetACLStatus gets Access Control List (ACL) entries for the specified file -// or directory. +// GetACLStatus gets Access Control List (ACL) entries for the specified file or directory. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. ACLFilePath is the Data Lake Store path (starting with '/') -// of the file or directory for which to get the ACL. op is the constant value -// for the operation. tooID is an optional switch to return friendly names in -// place of object ID for ACL entries. tooid=false returns friendly names -// instead of the AAD Object ID. Default value is true, returning AAD object -// IDs. -func (client GroupClient) GetACLStatus(accountName string, ACLFilePath string, op string, tooID *bool) (result ACLStatusResult, err error) { - req, err := client.GetACLStatusPreparer(accountName, ACLFilePath, op, tooID) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory for which to get the ACL. op is the constant value for the +// operation. tooID is an optional switch to return friendly names in place of object ID for ACL entries. tooid=false +// returns friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs. +func (client GroupClient) GetACLStatus(accountName string, pathParameter string, op string, tooID *bool) (result ACLStatusResult, err error) { + req, err := client.GetACLStatusPreparer(accountName, pathParameter, op, tooID) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "GetACLStatus", nil, "Failure preparing request") return @@ -607,14 +577,14 @@ func (client GroupClient) GetACLStatus(accountName string, ACLFilePath string, o } // GetACLStatusPreparer prepares the GetACLStatus request. -func (client GroupClient) GetACLStatusPreparer(accountName string, ACLFilePath string, op string, tooID *bool) (*http.Request, error) { +func (client GroupClient) GetACLStatusPreparer(accountName string, pathParameter string, op string, tooID *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "aclFilePath": autorest.Encode("path", ACLFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -629,7 +599,7 @@ func (client GroupClient) GetACLStatusPreparer(accountName string, ACLFilePath s preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{aclFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -653,15 +623,13 @@ func (client GroupClient) GetACLStatusResponder(resp *http.Response) (result ACL return } -// GetContentSummary gets the file content summary object specified by the file -// path. +// GetContentSummary gets the file content summary object specified by the file path. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. getContentSummaryFilePath is the Data Lake Store path -// (starting with '/') of the file for which to retrieve the summary. op is the -// constant value for the operation. -func (client GroupClient) GetContentSummary(accountName string, getContentSummaryFilePath string, op string) (result ContentSummaryResult, err error) { - req, err := client.GetContentSummaryPreparer(accountName, getContentSummaryFilePath, op) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file for which to retrieve the summary. op is the constant value for the +// operation. +func (client GroupClient) GetContentSummary(accountName string, pathParameter string, op string) (result ContentSummaryResult, err error) { + req, err := client.GetContentSummaryPreparer(accountName, pathParameter, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "GetContentSummary", nil, "Failure preparing request") return @@ -683,14 +651,14 @@ func (client GroupClient) GetContentSummary(accountName string, getContentSummar } // GetContentSummaryPreparer prepares the GetContentSummary request. -func (client GroupClient) GetContentSummaryPreparer(accountName string, getContentSummaryFilePath string, op string) (*http.Request, error) { +func (client GroupClient) GetContentSummaryPreparer(accountName string, pathParameter string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "getContentSummaryFilePath": autorest.Encode("path", getContentSummaryFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -702,7 +670,7 @@ func (client GroupClient) GetContentSummaryPreparer(accountName string, getConte preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{getContentSummaryFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -728,15 +696,12 @@ func (client GroupClient) GetContentSummaryResponder(resp *http.Response) (resul // GetFileStatus get the file status object specified by the file path. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. getFilePath is the Data Lake Store path (starting with '/') -// of the file or directory for which to retrieve the status. op is the -// constant value for the operation. tooID is an optional switch to return -// friendly names in place of owner and group. tooid=false returns friendly -// names instead of the AAD Object ID. Default value is true, returning AAD -// object IDs. -func (client GroupClient) GetFileStatus(accountName string, getFilePath string, op string, tooID *bool) (result FileStatusResult, err error) { - req, err := client.GetFileStatusPreparer(accountName, getFilePath, op, tooID) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory for which to retrieve the status. op is the constant value +// for the operation. tooID is an optional switch to return friendly names in place of owner and group. tooid=false +// returns friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs. +func (client GroupClient) GetFileStatus(accountName string, pathParameter string, op string, tooID *bool) (result FileStatusResult, err error) { + req, err := client.GetFileStatusPreparer(accountName, pathParameter, op, tooID) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "GetFileStatus", nil, "Failure preparing request") return @@ -758,14 +723,14 @@ func (client GroupClient) GetFileStatus(accountName string, getFilePath string, } // GetFileStatusPreparer prepares the GetFileStatus request. -func (client GroupClient) GetFileStatusPreparer(accountName string, getFilePath string, op string, tooID *bool) (*http.Request, error) { +func (client GroupClient) GetFileStatusPreparer(accountName string, pathParameter string, op string, tooID *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "getFilePath": autorest.Encode("path", getFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -780,7 +745,7 @@ func (client GroupClient) GetFileStatusPreparer(accountName string, getFilePath preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{getFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -804,24 +769,19 @@ func (client GroupClient) GetFileStatusResponder(resp *http.Response) (result Fi return } -// ListFileStatus get the list of file status objects specified by the file -// path, with optional pagination parameters +// ListFileStatus get the list of file status objects specified by the file path, with optional pagination parameters // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. listFilePath is the Data Lake Store path (starting with '/') -// of the directory to list. op is the constant value for the operation. -// listSize is gets or sets the number of items to return. Optional. listAfter -// is gets or sets the item or lexographical index after which to begin -// returning results. For example, a file list of 'a','b','d' and listAfter='b' -// will return 'd', and a listAfter='c' will also return 'd'. Optional. -// listBefore is gets or sets the item or lexographical index before which to -// begin returning results. For example, a file list of 'a','b','d' and -// listBefore='d' will return 'a','b', and a listBefore='c' will also return -// 'a','b'. Optional. tooID is an optional switch to return friendly names in -// place of owner and group. tooid=false returns friendly names instead of the -// AAD Object ID. Default value is true, returning AAD object IDs. -func (client GroupClient) ListFileStatus(accountName string, listFilePath string, op string, listSize *int32, listAfter string, listBefore string, tooID *bool) (result FileStatusesResult, err error) { - req, err := client.ListFileStatusPreparer(accountName, listFilePath, op, listSize, listAfter, listBefore, tooID) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the directory to list. op is the constant value for the operation. listSize is +// gets or sets the number of items to return. Optional. listAfter is gets or sets the item or lexographical index +// after which to begin returning results. For example, a file list of 'a','b','d' and listAfter='b' will return 'd', +// and a listAfter='c' will also return 'd'. Optional. listBefore is gets or sets the item or lexographical index +// before which to begin returning results. For example, a file list of 'a','b','d' and listBefore='d' will return +// 'a','b', and a listBefore='c' will also return 'a','b'. Optional. tooID is an optional switch to return friendly +// names in place of owner and group. tooid=false returns friendly names instead of the AAD Object ID. Default value is +// true, returning AAD object IDs. +func (client GroupClient) ListFileStatus(accountName string, pathParameter string, op string, listSize *int32, listAfter string, listBefore string, tooID *bool) (result FileStatusesResult, err error) { + req, err := client.ListFileStatusPreparer(accountName, pathParameter, op, listSize, listAfter, listBefore, tooID) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "ListFileStatus", nil, "Failure preparing request") return @@ -843,14 +803,14 @@ func (client GroupClient) ListFileStatus(accountName string, listFilePath string } // ListFileStatusPreparer prepares the ListFileStatus request. -func (client GroupClient) ListFileStatusPreparer(accountName string, listFilePath string, op string, listSize *int32, listAfter string, listBefore string, tooID *bool) (*http.Request, error) { +func (client GroupClient) ListFileStatusPreparer(accountName string, pathParameter string, op string, listSize *int32, listAfter string, listBefore string, tooID *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "listFilePath": autorest.Encode("path", listFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -874,7 +834,7 @@ func (client GroupClient) ListFileStatusPreparer(accountName string, listFilePat preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{listFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -900,11 +860,9 @@ func (client GroupClient) ListFileStatusResponder(resp *http.Response) (result F // Mkdirs creates a directory. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. pathParameter is the Data Lake Store path (starting with '/') -// of the directory to create. op is the constant value for the operation. -// permission is optional octal permission with which the directory should be -// created. +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the directory to create. op is the constant value for the operation. permission is +// optional octal permission with which the directory should be created. func (client GroupClient) Mkdirs(accountName string, pathParameter string, op string, permission *int32) (result FileOperationResult, err error) { req, err := client.MkdirsPreparer(accountName, pathParameter, op, permission) if err != nil { @@ -974,17 +932,14 @@ func (client GroupClient) MkdirsResponder(resp *http.Response) (result FileOpera return } -// ModifyACLEntries modifies existing Access Control List (ACL) entries on a -// file or folder. +// ModifyACLEntries modifies existing Access Control List (ACL) entries on a file or folder. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. modifyACLFilePath is the Data Lake Store path (starting with -// '/') of the file or directory with the ACL being modified. aclspec is the -// ACL specification included in ACL modification operations in the format -// '[default:]user|group|other::r|-w|-x|-' op is the constant value for the -// operation. -func (client GroupClient) ModifyACLEntries(accountName string, modifyACLFilePath string, aclspec string, op string) (result autorest.Response, err error) { - req, err := client.ModifyACLEntriesPreparer(accountName, modifyACLFilePath, aclspec, op) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory with the ACL being modified. aclspec is the ACL +// specification included in ACL modification operations in the format '[default:]user|group|other::r|-w|-x|-' op is +// the constant value for the operation. +func (client GroupClient) ModifyACLEntries(accountName string, pathParameter string, aclspec string, op string) (result autorest.Response, err error) { + req, err := client.ModifyACLEntriesPreparer(accountName, pathParameter, aclspec, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "ModifyACLEntries", nil, "Failure preparing request") return @@ -1006,14 +961,14 @@ func (client GroupClient) ModifyACLEntries(accountName string, modifyACLFilePath } // ModifyACLEntriesPreparer prepares the ModifyACLEntries request. -func (client GroupClient) ModifyACLEntriesPreparer(accountName string, modifyACLFilePath string, aclspec string, op string) (*http.Request, error) { +func (client GroupClient) ModifyACLEntriesPreparer(accountName string, pathParameter string, aclspec string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "modifyAclFilePath": autorest.Encode("path", modifyACLFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1026,7 +981,7 @@ func (client GroupClient) ModifyACLEntriesPreparer(accountName string, modifyACL preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{modifyAclFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1049,28 +1004,22 @@ func (client GroupClient) ModifyACLEntriesResponder(resp *http.Response) (result return } -// MsConcat concatenates the list of source files into the destination file, -// deleting all source files upon success. This method accepts more source file -// paths than the Concat method. This method and the parameters it accepts are +// MsConcat concatenates the list of source files into the destination file, deleting all source files upon success. +// This method accepts more source file paths than the Concat method. This method and the parameters it accepts are // subject to change for usability in an upcoming version. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. msConcatDestinationPath is the Data Lake Store path (starting -// with '/') of the destination file resulting from the concatenation. -// streamContents is a list of Data Lake Store paths (starting with '/') of the -// source files. Must be a comma-separated path list in the format: -// sources=/file/path/1.txt,/file/path/2.txt,/file/path/lastfile.csv -// streamContents will be closed upon successful return. Callers should ensure -// closure when receiving an error.op is the constant value for the operation. -// deleteSourceDirectory is indicates that as an optimization instead of -// deleting each individual source stream, delete the source stream folder if -// all streams are in the same folder instead. This results in a substantial -// performance improvement when the only streams in the folder are part of the -// concatenation operation. WARNING: This includes the deletion of any other -// files that are not source files. Only set this to true when source files are -// the only files in the source directory. -func (client GroupClient) MsConcat(accountName string, msConcatDestinationPath string, streamContents io.ReadCloser, op string, deleteSourceDirectory *bool) (result autorest.Response, err error) { - req, err := client.MsConcatPreparer(accountName, msConcatDestinationPath, streamContents, op, deleteSourceDirectory) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the destination file resulting from the concatenation. streamContents is a list of +// Data Lake Store paths (starting with '/') of the source files. Must be a comma-separated path list in the format: +// sources=/file/path/1.txt,/file/path/2.txt,/file/path/lastfile.csv streamContents will be closed upon successful +// return. Callers should ensure closure when receiving an error.op is the constant value for the operation. +// deleteSourceDirectory is indicates that as an optimization instead of deleting each individual source stream, delete +// the source stream folder if all streams are in the same folder instead. This results in a substantial performance +// improvement when the only streams in the folder are part of the concatenation operation. WARNING: This includes the +// deletion of any other files that are not source files. Only set this to true when source files are the only files in +// the source directory. +func (client GroupClient) MsConcat(accountName string, pathParameter string, streamContents io.ReadCloser, op string, deleteSourceDirectory *bool) (result autorest.Response, err error) { + req, err := client.MsConcatPreparer(accountName, pathParameter, streamContents, op, deleteSourceDirectory) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "MsConcat", nil, "Failure preparing request") return @@ -1092,14 +1041,14 @@ func (client GroupClient) MsConcat(accountName string, msConcatDestinationPath s } // MsConcatPreparer prepares the MsConcat request. -func (client GroupClient) MsConcatPreparer(accountName string, msConcatDestinationPath string, streamContents io.ReadCloser, op string, deleteSourceDirectory *bool) (*http.Request, error) { +func (client GroupClient) MsConcatPreparer(accountName string, pathParameter string, streamContents io.ReadCloser, op string, deleteSourceDirectory *bool) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "msConcatDestinationPath": autorest.Encode("path", msConcatDestinationPath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1114,7 +1063,7 @@ func (client GroupClient) MsConcatPreparer(accountName string, msConcatDestinati preparer := autorest.CreatePreparer( autorest.AsPost(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{msConcatDestinationPath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithFile(streamContents), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) @@ -1140,19 +1089,15 @@ func (client GroupClient) MsConcatResponder(resp *http.Response) (result autores // Open opens and reads from the specified file. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. directFilePath is the Data Lake Store path (starting with -// '/') of the file to open. op is the constant value for the operation. read -// is flag to skip redirection. When read=false or not specified, the request -// is redirected. Submit another HTTP PUT request using the URL in the Location -// header with the file data to be read. When read=true, this redirection is -// skipped. length is the number of bytes that the server will attempt to -// retrieve. It will retrieve <= length bytes. offset is the byte offset to -// start reading data from. fileSessionID is optional unique GUID per file -// indicating all the reads with the same fileSessionId are from the same -// client and same session. This will give a performance benefit. -func (client GroupClient) Open(accountName string, directFilePath string, op string, read string, length *int64, offset *int64, fileSessionID *uuid.UUID) (result ReadCloser, err error) { - req, err := client.OpenPreparer(accountName, directFilePath, op, read, length, offset, fileSessionID) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file to open. read is flag to skip redirection. When read=false or not +// specified, the request is redirected. Submit another HTTP PUT request using the URL in the Location header with the +// file data to be read. When read=true, this redirection is skipped. op is the constant value for the operation. +// length is the number of bytes that the server will attempt to retrieve. It will retrieve <= length bytes. offset is +// the byte offset to start reading data from. fileSessionID is optional unique GUID per file indicating all the reads +// with the same fileSessionId are from the same client and same session. This will give a performance benefit. +func (client GroupClient) Open(accountName string, pathParameter string, read string, op string, length *int64, offset *int64, fileSessionID *uuid.UUID) (result ReadCloser, err error) { + req, err := client.OpenPreparer(accountName, pathParameter, read, op, length, offset, fileSessionID) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "Open", nil, "Failure preparing request") return @@ -1174,14 +1119,14 @@ func (client GroupClient) Open(accountName string, directFilePath string, op str } // OpenPreparer prepares the Open request. -func (client GroupClient) OpenPreparer(accountName string, directFilePath string, op string, read string, length *int64, offset *int64, fileSessionID *uuid.UUID) (*http.Request, error) { +func (client GroupClient) OpenPreparer(accountName string, pathParameter string, read string, op string, length *int64, offset *int64, fileSessionID *uuid.UUID) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "directFilePath": autorest.Encode("path", directFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1203,7 +1148,7 @@ func (client GroupClient) OpenPreparer(accountName string, directFilePath string preparer := autorest.CreatePreparer( autorest.AsGet(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{directFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1226,15 +1171,13 @@ func (client GroupClient) OpenResponder(resp *http.Response) (result ReadCloser, return } -// RemoveACL removes the existing Access Control List (ACL) of the specified -// file or directory. +// RemoveACL removes the existing Access Control List (ACL) of the specified file or directory. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. ACLFilePath is the Data Lake Store path (starting with '/') -// of the file or directory with the ACL being removed. op is the constant -// value for the operation. -func (client GroupClient) RemoveACL(accountName string, ACLFilePath string, op string) (result autorest.Response, err error) { - req, err := client.RemoveACLPreparer(accountName, ACLFilePath, op) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory with the ACL being removed. op is the constant value for the +// operation. +func (client GroupClient) RemoveACL(accountName string, pathParameter string, op string) (result autorest.Response, err error) { + req, err := client.RemoveACLPreparer(accountName, pathParameter, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "RemoveACL", nil, "Failure preparing request") return @@ -1256,14 +1199,14 @@ func (client GroupClient) RemoveACL(accountName string, ACLFilePath string, op s } // RemoveACLPreparer prepares the RemoveACL request. -func (client GroupClient) RemoveACLPreparer(accountName string, ACLFilePath string, op string) (*http.Request, error) { +func (client GroupClient) RemoveACLPreparer(accountName string, pathParameter string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "aclFilePath": autorest.Encode("path", ACLFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1275,7 +1218,7 @@ func (client GroupClient) RemoveACLPreparer(accountName string, ACLFilePath stri preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{aclFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1298,16 +1241,13 @@ func (client GroupClient) RemoveACLResponder(resp *http.Response) (result autore return } -// RemoveACLEntries removes existing Access Control List (ACL) entries for a -// file or folder. +// RemoveACLEntries removes existing Access Control List (ACL) entries for a file or folder. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. removeACLFilePath is the Data Lake Store path (starting with -// '/') of the file or directory with the ACL being removed. aclspec is the ACL -// spec included in ACL removal operations in the format -// '[default:]user|group|other' op is the constant value for the operation. -func (client GroupClient) RemoveACLEntries(accountName string, removeACLFilePath string, aclspec string, op string) (result autorest.Response, err error) { - req, err := client.RemoveACLEntriesPreparer(accountName, removeACLFilePath, aclspec, op) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory with the ACL being removed. aclspec is the ACL spec included +// in ACL removal operations in the format '[default:]user|group|other' op is the constant value for the operation. +func (client GroupClient) RemoveACLEntries(accountName string, pathParameter string, aclspec string, op string) (result autorest.Response, err error) { + req, err := client.RemoveACLEntriesPreparer(accountName, pathParameter, aclspec, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "RemoveACLEntries", nil, "Failure preparing request") return @@ -1329,14 +1269,14 @@ func (client GroupClient) RemoveACLEntries(accountName string, removeACLFilePath } // RemoveACLEntriesPreparer prepares the RemoveACLEntries request. -func (client GroupClient) RemoveACLEntriesPreparer(accountName string, removeACLFilePath string, aclspec string, op string) (*http.Request, error) { +func (client GroupClient) RemoveACLEntriesPreparer(accountName string, pathParameter string, aclspec string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "removeAclFilePath": autorest.Encode("path", removeACLFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1349,7 +1289,7 @@ func (client GroupClient) RemoveACLEntriesPreparer(accountName string, removeACL preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{removeAclFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1372,15 +1312,13 @@ func (client GroupClient) RemoveACLEntriesResponder(resp *http.Response) (result return } -// RemoveDefaultACL removes the existing Default Access Control List (ACL) of -// the specified directory. +// RemoveDefaultACL removes the existing Default Access Control List (ACL) of the specified directory. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. defaultACLFilePath is the Data Lake Store path (starting with -// '/') of the directory with the default ACL being removed. op is the constant -// value for the operation. -func (client GroupClient) RemoveDefaultACL(accountName string, defaultACLFilePath string, op string) (result autorest.Response, err error) { - req, err := client.RemoveDefaultACLPreparer(accountName, defaultACLFilePath, op) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the directory with the default ACL being removed. op is the constant value for the +// operation. +func (client GroupClient) RemoveDefaultACL(accountName string, pathParameter string, op string) (result autorest.Response, err error) { + req, err := client.RemoveDefaultACLPreparer(accountName, pathParameter, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "RemoveDefaultACL", nil, "Failure preparing request") return @@ -1402,14 +1340,14 @@ func (client GroupClient) RemoveDefaultACL(accountName string, defaultACLFilePat } // RemoveDefaultACLPreparer prepares the RemoveDefaultACL request. -func (client GroupClient) RemoveDefaultACLPreparer(accountName string, defaultACLFilePath string, op string) (*http.Request, error) { +func (client GroupClient) RemoveDefaultACLPreparer(accountName string, pathParameter string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "defaultAclFilePath": autorest.Encode("path", defaultACLFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1421,7 +1359,7 @@ func (client GroupClient) RemoveDefaultACLPreparer(accountName string, defaultAC preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{defaultAclFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1446,13 +1384,11 @@ func (client GroupClient) RemoveDefaultACLResponder(resp *http.Response) (result // Rename rename a file or directory. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. renameFilePath is the Data Lake Store path (starting with -// '/') of the file or directory to move/rename. destination is the path to -// move/rename the file or folder to op is the constant value for the -// operation. -func (client GroupClient) Rename(accountName string, renameFilePath string, destination string, op string) (result FileOperationResult, err error) { - req, err := client.RenamePreparer(accountName, renameFilePath, destination, op) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory to move/rename. destination is the path to move/rename the +// file or folder to op is the constant value for the operation. +func (client GroupClient) Rename(accountName string, pathParameter string, destination string, op string) (result FileOperationResult, err error) { + req, err := client.RenamePreparer(accountName, pathParameter, destination, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "Rename", nil, "Failure preparing request") return @@ -1474,14 +1410,14 @@ func (client GroupClient) Rename(accountName string, renameFilePath string, dest } // RenamePreparer prepares the Rename request. -func (client GroupClient) RenamePreparer(accountName string, renameFilePath string, destination string, op string) (*http.Request, error) { +func (client GroupClient) RenamePreparer(accountName string, pathParameter string, destination string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "renameFilePath": autorest.Encode("path", renameFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1494,7 +1430,7 @@ func (client GroupClient) RenamePreparer(accountName string, renameFilePath stri preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{renameFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1520,14 +1456,12 @@ func (client GroupClient) RenameResponder(resp *http.Response) (result FileOpera // SetACL sets the Access Control List (ACL) for a file or folder. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. setACLFilePath is the Data Lake Store path (starting with -// '/') of the file or directory on which to set the ACL. aclspec is the ACL -// spec included in ACL creation operations in the format -// '[default:]user|group|other::r|-w|-x|-' op is the constant value for the +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory on which to set the ACL. aclspec is the ACL spec included in +// ACL creation operations in the format '[default:]user|group|other::r|-w|-x|-' op is the constant value for the // operation. -func (client GroupClient) SetACL(accountName string, setACLFilePath string, aclspec string, op string) (result autorest.Response, err error) { - req, err := client.SetACLPreparer(accountName, setACLFilePath, aclspec, op) +func (client GroupClient) SetACL(accountName string, pathParameter string, aclspec string, op string) (result autorest.Response, err error) { + req, err := client.SetACLPreparer(accountName, pathParameter, aclspec, op) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "SetACL", nil, "Failure preparing request") return @@ -1549,14 +1483,14 @@ func (client GroupClient) SetACL(accountName string, setACLFilePath string, acls } // SetACLPreparer prepares the SetACL request. -func (client GroupClient) SetACLPreparer(accountName string, setACLFilePath string, aclspec string, op string) (*http.Request, error) { +func (client GroupClient) SetACLPreparer(accountName string, pathParameter string, aclspec string, op string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "setAclFilePath": autorest.Encode("path", setACLFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1569,7 +1503,7 @@ func (client GroupClient) SetACLPreparer(accountName string, setACLFilePath stri preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{setAclFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1592,24 +1526,19 @@ func (client GroupClient) SetACLResponder(resp *http.Response) (result autorest. return } -// SetFileExpiry sets or removes the expiration time on the specified file. -// This operation can only be executed against files. Folders are not -// supported. +// SetFileExpiry sets or removes the expiration time on the specified file. This operation can only be executed against +// files. Folders are not supported. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. filePath is the Data Lake Store path (starting with '/') of -// the file on which to set or remove the expiration time. expiryOption is -// indicates the type of expiration to use for the file: 1. NeverExpire: -// ExpireTime is ignored. 2. RelativeToNow: ExpireTime is an integer in -// milliseconds representing the expiration date relative to when file -// expiration is updated. 3. RelativeToCreationDate: ExpireTime is an integer -// in milliseconds representing the expiration date relative to file creation. -// 4. Absolute: ExpireTime is an integer in milliseconds, as a Unix timestamp -// relative to 1/1/1970 00:00:00. op is the constant value for the operation. -// expireTime is the time that the file will expire, corresponding to the +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file on which to set or remove the expiration time. expiryOption is indicates +// the type of expiration to use for the file: 1. NeverExpire: ExpireTime is ignored. 2. RelativeToNow: ExpireTime is +// an integer in milliseconds representing the expiration date relative to when file expiration is updated. 3. +// RelativeToCreationDate: ExpireTime is an integer in milliseconds representing the expiration date relative to file +// creation. 4. Absolute: ExpireTime is an integer in milliseconds, as a Unix timestamp relative to 1/1/1970 00:00:00. +// op is the constant value for the operation. expireTime is the time that the file will expire, corresponding to the // ExpiryOption that was set. -func (client GroupClient) SetFileExpiry(accountName string, filePath string, expiryOption ExpiryOptionType, op string, expireTime *int64) (result autorest.Response, err error) { - req, err := client.SetFileExpiryPreparer(accountName, filePath, expiryOption, op, expireTime) +func (client GroupClient) SetFileExpiry(accountName string, pathParameter string, expiryOption ExpiryOptionType, op string, expireTime *int64) (result autorest.Response, err error) { + req, err := client.SetFileExpiryPreparer(accountName, pathParameter, expiryOption, op, expireTime) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "SetFileExpiry", nil, "Failure preparing request") return @@ -1631,14 +1560,14 @@ func (client GroupClient) SetFileExpiry(accountName string, filePath string, exp } // SetFileExpiryPreparer prepares the SetFileExpiry request. -func (client GroupClient) SetFileExpiryPreparer(accountName string, filePath string, expiryOption ExpiryOptionType, op string, expireTime *int64) (*http.Request, error) { +func (client GroupClient) SetFileExpiryPreparer(accountName string, pathParameter string, expiryOption ExpiryOptionType, op string, expireTime *int64) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "filePath": autorest.Encode("path", filePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1654,7 +1583,7 @@ func (client GroupClient) SetFileExpiryPreparer(accountName string, filePath str preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/WebHdfsExt/{filePath}", pathParameters), + autorest.WithPathParameters("/WebHdfsExt/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1679,15 +1608,13 @@ func (client GroupClient) SetFileExpiryResponder(resp *http.Response) (result au // SetOwner sets the owner of a file or directory. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. setOwnerFilePath is the Data Lake Store path (starting with -// '/') of the file or directory for which to set the owner. op is the constant -// value for the operation. owner is the AAD Object ID of the user owner of the -// file or directory. If empty, the property will remain unchanged. group is -// the AAD Object ID of the group owner of the file or directory. If empty, the -// property will remain unchanged. -func (client GroupClient) SetOwner(accountName string, setOwnerFilePath string, op string, owner string, group string) (result autorest.Response, err error) { - req, err := client.SetOwnerPreparer(accountName, setOwnerFilePath, op, owner, group) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory for which to set the owner. op is the constant value for the +// operation. owner is the AAD Object ID of the user owner of the file or directory. If empty, the property will remain +// unchanged. group is the AAD Object ID of the group owner of the file or directory. If empty, the property will +// remain unchanged. +func (client GroupClient) SetOwner(accountName string, pathParameter string, op string, owner string, group string) (result autorest.Response, err error) { + req, err := client.SetOwnerPreparer(accountName, pathParameter, op, owner, group) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "SetOwner", nil, "Failure preparing request") return @@ -1709,14 +1636,14 @@ func (client GroupClient) SetOwner(accountName string, setOwnerFilePath string, } // SetOwnerPreparer prepares the SetOwner request. -func (client GroupClient) SetOwnerPreparer(accountName string, setOwnerFilePath string, op string, owner string, group string) (*http.Request, error) { +func (client GroupClient) SetOwnerPreparer(accountName string, pathParameter string, op string, owner string, group string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "setOwnerFilePath": autorest.Encode("path", setOwnerFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1734,7 +1661,7 @@ func (client GroupClient) SetOwnerPreparer(accountName string, setOwnerFilePath preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{setOwnerFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } @@ -1759,13 +1686,12 @@ func (client GroupClient) SetOwnerResponder(resp *http.Response) (result autores // SetPermission sets the permission of the file or folder. // -// accountName is the Azure Data Lake Store account to execute filesystem -// operations on. setPermissionFilePath is the Data Lake Store path (starting -// with '/') of the file or directory for which to set the permission. op is -// the constant value for the operation. permission is a string representation -// of the permission (i.e 'rwx'). If empty, this property remains unchanged. -func (client GroupClient) SetPermission(accountName string, setPermissionFilePath string, op string, permission string) (result autorest.Response, err error) { - req, err := client.SetPermissionPreparer(accountName, setPermissionFilePath, op, permission) +// accountName is the Azure Data Lake Store account to execute filesystem operations on. pathParameter is the Data Lake +// Store path (starting with '/') of the file or directory for which to set the permission. op is the constant value +// for the operation. permission is a string representation of the permission (i.e 'rwx'). If empty, this property +// remains unchanged. +func (client GroupClient) SetPermission(accountName string, pathParameter string, op string, permission string) (result autorest.Response, err error) { + req, err := client.SetPermissionPreparer(accountName, pathParameter, op, permission) if err != nil { err = autorest.NewErrorWithError(err, "filesystem.GroupClient", "SetPermission", nil, "Failure preparing request") return @@ -1787,14 +1713,14 @@ func (client GroupClient) SetPermission(accountName string, setPermissionFilePat } // SetPermissionPreparer prepares the SetPermission request. -func (client GroupClient) SetPermissionPreparer(accountName string, setPermissionFilePath string, op string, permission string) (*http.Request, error) { +func (client GroupClient) SetPermissionPreparer(accountName string, pathParameter string, op string, permission string) (*http.Request, error) { urlParameters := map[string]interface{}{ "accountName": accountName, "adlsFileSystemDnsSuffix": client.AdlsFileSystemDNSSuffix, } pathParameters := map[string]interface{}{ - "setPermissionFilePath": autorest.Encode("path", setPermissionFilePath), + "path": autorest.Encode("path", pathParameter), } const APIVersion = "2016-11-01" @@ -1809,7 +1735,7 @@ func (client GroupClient) SetPermissionPreparer(accountName string, setPermissio preparer := autorest.CreatePreparer( autorest.AsPut(), autorest.WithCustomBaseURL("https://{accountName}.{adlsFileSystemDnsSuffix}", urlParameters), - autorest.WithPathParameters("/webhdfs/v1/{setPermissionFilePath}", pathParameters), + autorest.WithPathParameters("/webhdfs/v1/{path}", pathParameters), autorest.WithQueryParameters(queryParameters)) return preparer.Prepare(&http.Request{}) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/models.go b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/models.go index 517f86119..71f07e335 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/models.go @@ -14,11 +14,12 @@ package filesystem // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "encoding/json" + "errors" "github.com/Azure/go-autorest/autorest" "io" ) @@ -31,6 +32,32 @@ const ( Autocreate AppendModeType = "autocreate" ) +// Exception enumerates the values for exception. +type Exception string + +const ( + // ExceptionAccessControlException specifies the exception access control exception state for exception. + ExceptionAccessControlException Exception = "AccessControlException" + // ExceptionBadOffsetException specifies the exception bad offset exception state for exception. + ExceptionBadOffsetException Exception = "BadOffsetException" + // ExceptionFileAlreadyExistsException specifies the exception file already exists exception state for exception. + ExceptionFileAlreadyExistsException Exception = "FileAlreadyExistsException" + // ExceptionFileNotFoundException specifies the exception file not found exception state for exception. + ExceptionFileNotFoundException Exception = "FileNotFoundException" + // ExceptionIllegalArgumentException specifies the exception illegal argument exception state for exception. + ExceptionIllegalArgumentException Exception = "IllegalArgumentException" + // ExceptionIOException specifies the exception io exception state for exception. + ExceptionIOException Exception = "IOException" + // ExceptionRuntimeException specifies the exception runtime exception state for exception. + ExceptionRuntimeException Exception = "RuntimeException" + // ExceptionSecurityException specifies the exception security exception state for exception. + ExceptionSecurityException Exception = "SecurityException" + // ExceptionThrottledException specifies the exception throttled exception state for exception. + ExceptionThrottledException Exception = "ThrottledException" + // ExceptionUnsupportedOperationException specifies the exception unsupported operation exception state for exception. + ExceptionUnsupportedOperationException Exception = "UnsupportedOperationException" +) + // ExpiryOptionType enumerates the values for expiry option type. type ExpiryOptionType string @@ -39,11 +66,9 @@ const ( Absolute ExpiryOptionType = "Absolute" // NeverExpire specifies the never expire state for expiry option type. NeverExpire ExpiryOptionType = "NeverExpire" - // RelativeToCreationDate specifies the relative to creation date state for - // expiry option type. + // RelativeToCreationDate specifies the relative to creation date state for expiry option type. RelativeToCreationDate ExpiryOptionType = "RelativeToCreationDate" - // RelativeToNow specifies the relative to now state for expiry option - // type. + // RelativeToNow specifies the relative to now state for expiry option type. RelativeToNow ExpiryOptionType = "RelativeToNow" ) @@ -69,8 +94,7 @@ const ( METADATA SyncFlag = "METADATA" ) -// ACLStatus is data Lake Store file or directory Access Control List -// information. +// ACLStatus is data Lake Store file or directory Access Control List information. type ACLStatus struct { Entries *[]string `json:"entries,omitempty"` Group *string `json:"group,omitempty"` @@ -79,104 +103,812 @@ type ACLStatus struct { StickyBit *bool `json:"stickyBit,omitempty"` } -// ACLStatusResult is data Lake Store file or directory Access Control List -// information. +// ACLStatusResult is data Lake Store file or directory Access Control List information. type ACLStatusResult struct { autorest.Response `json:"-"` ACLStatus *ACLStatus `json:"AclStatus,omitempty"` } -// AdlsAccessControlException is a WebHDFS exception thrown indicating that -// access is denied due to insufficient permissions. Thrown when a 403 error -// response code is returned (forbidden). +// AdlsAccessControlException is a WebHDFS exception thrown indicating that access is denied due to insufficient +// permissions. Thrown when a 403 error response code is returned (forbidden). type AdlsAccessControlException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsBadOffsetException is a WebHDFS exception thrown indicating the append -// or read is from a bad offset. Thrown when a 400 error response code is -// returned for append and open operations (Bad request). +// MarshalJSON is the custom marshaler for AdlsAccessControlException. +func (aace AdlsAccessControlException) MarshalJSON() ([]byte, error) { + aace.Exception = ExceptionAccessControlException + type Alias AdlsAccessControlException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aace), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return &aace, true +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsAccessControlException. +func (aace AdlsAccessControlException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsBadOffsetException is a WebHDFS exception thrown indicating the append or read is from a bad offset. Thrown when +// a 400 error response code is returned for append and open operations (Bad request). type AdlsBadOffsetException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsError is data Lake Store filesystem error containing a specific WebHDFS -// exception. +// MarshalJSON is the custom marshaler for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) MarshalJSON() ([]byte, error) { + aboe.Exception = ExceptionBadOffsetException + type Alias AdlsBadOffsetException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aboe), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return &aboe, true +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsBadOffsetException. +func (aboe AdlsBadOffsetException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsError is data Lake Store filesystem error containing a specific WebHDFS exception. type AdlsError struct { - RemoteException *AdlsRemoteException `json:"RemoteException,omitempty"` + RemoteException AdlsRemoteException `json:"RemoteException,omitempty"` } -// AdlsFileAlreadyExistsException is a WebHDFS exception thrown indicating the -// file or folder already exists. Thrown when a 403 error response code is -// returned (forbidden). +// UnmarshalJSON is the custom unmarshaler for AdlsError struct. +func (ae *AdlsError) UnmarshalJSON(body []byte) error { + var m map[string]*json.RawMessage + err := json.Unmarshal(body, &m) + if err != nil { + return err + } + var v *json.RawMessage + + v = m["RemoteException"] + if v != nil { + remoteException, err := unmarshalAdlsRemoteException(*m["RemoteException"]) + if err != nil { + return err + } + ae.RemoteException = remoteException + } + + return nil +} + +// AdlsFileAlreadyExistsException is a WebHDFS exception thrown indicating the file or folder already exists. Thrown +// when a 403 error response code is returned (forbidden). type AdlsFileAlreadyExistsException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsFileNotFoundException is a WebHDFS exception thrown indicating the file -// or folder could not be found. Thrown when a 404 error response code is -// returned (not found). +// MarshalJSON is the custom marshaler for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) MarshalJSON() ([]byte, error) { + afaee.Exception = ExceptionFileAlreadyExistsException + type Alias AdlsFileAlreadyExistsException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(afaee), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return &afaee, true +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsFileAlreadyExistsException. +func (afaee AdlsFileAlreadyExistsException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsFileNotFoundException is a WebHDFS exception thrown indicating the file or folder could not be found. Thrown +// when a 404 error response code is returned (not found). type AdlsFileNotFoundException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsIllegalArgumentException is a WebHDFS exception thrown indicating that -// one more arguments is incorrect. Thrown when a 400 error response code is -// returned (bad request). +// MarshalJSON is the custom marshaler for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) MarshalJSON() ([]byte, error) { + afnfe.Exception = ExceptionFileNotFoundException + type Alias AdlsFileNotFoundException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(afnfe), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return &afnfe, true +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsFileNotFoundException. +func (afnfe AdlsFileNotFoundException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsIllegalArgumentException is a WebHDFS exception thrown indicating that one more arguments is incorrect. Thrown +// when a 400 error response code is returned (bad request). type AdlsIllegalArgumentException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsIOException is a WebHDFS exception thrown indicating there was an IO -// (read or write) error. Thrown when a 403 error response code is returned -// (forbidden). +// MarshalJSON is the custom marshaler for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) MarshalJSON() ([]byte, error) { + aiae.Exception = ExceptionIllegalArgumentException + type Alias AdlsIllegalArgumentException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aiae), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return &aiae, true +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsIllegalArgumentException. +func (aiae AdlsIllegalArgumentException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsIOException is a WebHDFS exception thrown indicating there was an IO (read or write) error. Thrown when a 403 +// error response code is returned (forbidden). type AdlsIOException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsRemoteException is data Lake Store filesystem exception based on the -// WebHDFS definition for RemoteExceptions. This is a WebHDFS 'catch all' -// exception -type AdlsRemoteException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` +// MarshalJSON is the custom marshaler for AdlsIOException. +func (aie AdlsIOException) MarshalJSON() ([]byte, error) { + aie.Exception = ExceptionIOException + type Alias AdlsIOException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(aie), + }) } -// AdlsRuntimeException is a WebHDFS exception thrown when an unexpected error -// occurs during an operation. Thrown when a 500 error response code is -// returned (Internal server error). +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsIOException() (*AdlsIOException, bool) { + return &aie, true +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsIOException. +func (aie AdlsIOException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsRemoteException is data Lake Store filesystem exception based on the WebHDFS definition for RemoteExceptions. +// This is a WebHDFS 'catch all' exception +type AdlsRemoteException interface { + AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) + AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) + AsAdlsSecurityException() (*AdlsSecurityException, bool) + AsAdlsIOException() (*AdlsIOException, bool) + AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) + AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) + AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) + AsAdlsRuntimeException() (*AdlsRuntimeException, bool) + AsAdlsAccessControlException() (*AdlsAccessControlException, bool) + AsAdlsThrottledException() (*AdlsThrottledException, bool) +} + +func unmarshalAdlsRemoteException(body []byte) (AdlsRemoteException, error) { + var m map[string]interface{} + err := json.Unmarshal(body, &m) + if err != nil { + return nil, err + } + + switch m["exception"] { + case string(ExceptionIllegalArgumentException): + var aiae AdlsIllegalArgumentException + err := json.Unmarshal(body, &aiae) + return aiae, err + case string(ExceptionUnsupportedOperationException): + var auoe AdlsUnsupportedOperationException + err := json.Unmarshal(body, &auoe) + return auoe, err + case string(ExceptionSecurityException): + var ase AdlsSecurityException + err := json.Unmarshal(body, &ase) + return ase, err + case string(ExceptionIOException): + var aie AdlsIOException + err := json.Unmarshal(body, &aie) + return aie, err + case string(ExceptionFileNotFoundException): + var afnfe AdlsFileNotFoundException + err := json.Unmarshal(body, &afnfe) + return afnfe, err + case string(ExceptionFileAlreadyExistsException): + var afaee AdlsFileAlreadyExistsException + err := json.Unmarshal(body, &afaee) + return afaee, err + case string(ExceptionBadOffsetException): + var aboe AdlsBadOffsetException + err := json.Unmarshal(body, &aboe) + return aboe, err + case string(ExceptionRuntimeException): + var are AdlsRuntimeException + err := json.Unmarshal(body, &are) + return are, err + case string(ExceptionAccessControlException): + var aace AdlsAccessControlException + err := json.Unmarshal(body, &aace) + return aace, err + case string(ExceptionThrottledException): + var ate AdlsThrottledException + err := json.Unmarshal(body, &ate) + return ate, err + default: + return nil, errors.New("Unsupported type") + } +} +func unmarshalAdlsRemoteExceptionArray(body []byte) ([]AdlsRemoteException, error) { + var rawMessages []*json.RawMessage + err := json.Unmarshal(body, &rawMessages) + if err != nil { + return nil, err + } + + areArray := make([]AdlsRemoteException, len(rawMessages)) + + for index, rawMessage := range rawMessages { + are, err := unmarshalAdlsRemoteException(*rawMessage) + if err != nil { + return nil, err + } + areArray[index] = are + } + return areArray, nil +} + +// AdlsRuntimeException is a WebHDFS exception thrown when an unexpected error occurs during an operation. Thrown when +// a 500 error response code is returned (Internal server error). type AdlsRuntimeException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsSecurityException is a WebHDFS exception thrown indicating that access -// is denied. Thrown when a 401 error response code is returned (Unauthorized). +// MarshalJSON is the custom marshaler for AdlsRuntimeException. +func (are AdlsRuntimeException) MarshalJSON() ([]byte, error) { + are.Exception = ExceptionRuntimeException + type Alias AdlsRuntimeException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(are), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return &are, true +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsRuntimeException. +func (are AdlsRuntimeException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsSecurityException is a WebHDFS exception thrown indicating that access is denied. Thrown when a 401 error +// response code is returned (Unauthorized). type AdlsSecurityException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsThrottledException is a WebHDFS exception thrown indicating that the -// request is being throttled. Reducing the number of requests or request size -// helps to mitigate this error. +// MarshalJSON is the custom marshaler for AdlsSecurityException. +func (ase AdlsSecurityException) MarshalJSON() ([]byte, error) { + ase.Exception = ExceptionSecurityException + type Alias AdlsSecurityException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ase), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return &ase, true +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsSecurityException. +func (ase AdlsSecurityException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false +} + +// AdlsThrottledException is a WebHDFS exception thrown indicating that the request is being throttled. Reducing the +// number of requests or request size helps to mitigate this error. type AdlsThrottledException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` } -// AdlsUnsupportedOperationException is a WebHDFS exception thrown indicating -// that the requested operation is not supported. Thrown when a 400 error -// response code is returned (bad request). +// MarshalJSON is the custom marshaler for AdlsThrottledException. +func (ate AdlsThrottledException) MarshalJSON() ([]byte, error) { + ate.Exception = ExceptionThrottledException + type Alias AdlsThrottledException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(ate), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return nil, false +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsThrottledException. +func (ate AdlsThrottledException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return &ate, true +} + +// AdlsUnsupportedOperationException is a WebHDFS exception thrown indicating that the requested operation is not +// supported. Thrown when a 400 error response code is returned (bad request). type AdlsUnsupportedOperationException struct { - JavaClassName *string `json:"javaClassName,omitempty"` - Message *string `json:"message,omitempty"` + JavaClassName *string `json:"javaClassName,omitempty"` + Message *string `json:"message,omitempty"` + Exception Exception `json:"exception,omitempty"` +} + +// MarshalJSON is the custom marshaler for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) MarshalJSON() ([]byte, error) { + auoe.Exception = ExceptionUnsupportedOperationException + type Alias AdlsUnsupportedOperationException + return json.Marshal(&struct { + Alias + }{ + Alias: (Alias)(auoe), + }) +} + +// AsAdlsIllegalArgumentException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsIllegalArgumentException() (*AdlsIllegalArgumentException, bool) { + return nil, false +} + +// AsAdlsUnsupportedOperationException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsUnsupportedOperationException() (*AdlsUnsupportedOperationException, bool) { + return &auoe, true +} + +// AsAdlsSecurityException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsSecurityException() (*AdlsSecurityException, bool) { + return nil, false +} + +// AsAdlsIOException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsIOException() (*AdlsIOException, bool) { + return nil, false +} + +// AsAdlsFileNotFoundException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsFileNotFoundException() (*AdlsFileNotFoundException, bool) { + return nil, false +} + +// AsAdlsFileAlreadyExistsException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsFileAlreadyExistsException() (*AdlsFileAlreadyExistsException, bool) { + return nil, false +} + +// AsAdlsBadOffsetException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsBadOffsetException() (*AdlsBadOffsetException, bool) { + return nil, false +} + +// AsAdlsRuntimeException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsRuntimeException() (*AdlsRuntimeException, bool) { + return nil, false +} + +// AsAdlsAccessControlException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsAccessControlException() (*AdlsAccessControlException, bool) { + return nil, false +} + +// AsAdlsThrottledException is the AdlsRemoteException implementation for AdlsUnsupportedOperationException. +func (auoe AdlsUnsupportedOperationException) AsAdlsThrottledException() (*AdlsThrottledException, bool) { + return nil, false } // ContentSummary is data Lake Store content summary information @@ -187,8 +919,7 @@ type ContentSummary struct { SpaceConsumed *int64 `json:"spaceConsumed,omitempty"` } -// ContentSummaryResult is data Lake Store filesystem content summary -// information response. +// ContentSummaryResult is data Lake Store filesystem content summary information response. type ContentSummaryResult struct { autorest.Response `json:"-"` ContentSummary *ContentSummary `json:"ContentSummary,omitempty"` @@ -205,8 +936,7 @@ type FileStatuses struct { FileStatus *[]FileStatusProperties `json:"FileStatus,omitempty"` } -// FileStatusesResult is data Lake Store filesystem file status list -// information response. +// FileStatusesResult is data Lake Store filesystem file status list information response. type FileStatusesResult struct { autorest.Response `json:"-"` FileStatuses *FileStatuses `json:"FileStatuses,omitempty"` @@ -228,8 +958,7 @@ type FileStatusProperties struct { ACLBit *bool `json:"aclBit,omitempty"` } -// FileStatusResult is data Lake Store filesystem file status information -// response. +// FileStatusResult is data Lake Store filesystem file status information response. type FileStatusResult struct { autorest.Response `json:"-"` FileStatus *FileStatusProperties `json:"FileStatus,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go index 00f4d4445..d4a2e2ff8 100755 --- a/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/datalake-store/filesystem/version.go @@ -14,15 +14,15 @@ package filesystem // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-filesystem/2016-11-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-filesystem/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/client.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/client.go new file mode 100644 index 000000000..1d38fc781 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/client.go @@ -0,0 +1,48 @@ +// Package face implements the Azure ARM Face service API version 1.0. +// +// An API for face detection, verification, and identification. +package face + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +const () + +// ManagementClient is the base client for Face. +type ManagementClient struct { + autorest.Client + SubscriptionKey string + AzureRegion AzureRegions +} + +// New creates an instance of the ManagementClient client. +func New(subscriptionKey string, azureRegion AzureRegions) ManagementClient { + return NewWithoutDefaults(subscriptionKey, azureRegion) +} + +// NewWithoutDefaults creates an instance of the ManagementClient client. +func NewWithoutDefaults(subscriptionKey string, azureRegion AzureRegions) ManagementClient { + return ManagementClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + SubscriptionKey: subscriptionKey, + AzureRegion: azureRegion, + } +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/group.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/group.go new file mode 100644 index 000000000..d2342596b --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/group.go @@ -0,0 +1,483 @@ +package face + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "io" + "net/http" +) + +// GroupClient is the an API for face detection, verification, and identification. +type GroupClient struct { + ManagementClient +} + +// NewGroupClient creates an instance of the GroupClient client. +func NewGroupClient(subscriptionKey string, azureRegion AzureRegions) GroupClient { + return GroupClient{New(subscriptionKey, azureRegion)} +} + +// Detect detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, and +// attributes. +// +// imageURL is a JSON document with a URL pointing to the image that is to be analyzed. returnFaceID is a value +// indicating whether the operation should return faceIds of detected faces. returnFaceLandmarks is a value indicating +// whether the operation should return landmarks of the detected faces. returnFaceAttributes is analyze and return the +// one or more specified face attributes in the comma-separated string like "returnFaceAttributes=age,gender". +// Supported face attributes include age, gender, headPose, smile, facialHair, glasses and emotion. Note that each face +// attribute analysis has additional computational and time cost. +func (client GroupClient) Detect(imageURL ImageURL, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes string) (result ListDetectedFace, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: imageURL, + Constraints: []validation.Constraint{{Target: "imageURL.URL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.GroupClient", "Detect") + } + + req, err := client.DetectPreparer(imageURL, returnFaceID, returnFaceLandmarks, returnFaceAttributes) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Detect", nil, "Failure preparing request") + return + } + + resp, err := client.DetectSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.GroupClient", "Detect", resp, "Failure sending request") + return + } + + result, err = client.DetectResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Detect", resp, "Failure responding to request") + } + + return +} + +// DetectPreparer prepares the Detect request. +func (client GroupClient) DetectPreparer(imageURL ImageURL, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + queryParameters := map[string]interface{}{} + if returnFaceID != nil { + queryParameters["returnFaceId"] = autorest.Encode("query", *returnFaceID) + } + if returnFaceLandmarks != nil { + queryParameters["returnFaceLandmarks"] = autorest.Encode("query", *returnFaceLandmarks) + } + if len(returnFaceAttributes) > 0 { + queryParameters["returnFaceAttributes"] = autorest.Encode("query", returnFaceAttributes) + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/detect"), + autorest.WithJSON(imageURL), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DetectSender sends the Detect request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) DetectSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DetectResponder handles the response to the Detect request. The method always +// closes the http.Response Body. +func (client GroupClient) DetectResponder(resp *http.Response) (result ListDetectedFace, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DetectInStream detect human faces in an image and returns face locations, and optionally with faceIds, landmarks, +// and attributes. +// +// imageParameter is an image stream. imageParameter will be closed upon successful return. Callers should ensure +// closure when receiving an error.returnFaceID is a value indicating whether the operation should return faceIds of +// detected faces. returnFaceLandmarks is a value indicating whether the operation should return landmarks of the +// detected faces. returnFaceAttributes is analyze and return the one or more specified face attributes in the +// comma-separated string like "returnFaceAttributes=age,gender". Supported face attributes include age, gender, +// headPose, smile, facialHair, glasses and emotion. Note that each face attribute analysis has additional +// computational and time cost. +func (client GroupClient) DetectInStream(imageParameter io.ReadCloser, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes string) (result ListDetectedFace, err error) { + req, err := client.DetectInStreamPreparer(imageParameter, returnFaceID, returnFaceLandmarks, returnFaceAttributes) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "DetectInStream", nil, "Failure preparing request") + return + } + + resp, err := client.DetectInStreamSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.GroupClient", "DetectInStream", resp, "Failure sending request") + return + } + + result, err = client.DetectInStreamResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "DetectInStream", resp, "Failure responding to request") + } + + return +} + +// DetectInStreamPreparer prepares the DetectInStream request. +func (client GroupClient) DetectInStreamPreparer(imageParameter io.ReadCloser, returnFaceID *bool, returnFaceLandmarks *bool, returnFaceAttributes string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + queryParameters := map[string]interface{}{} + if returnFaceID != nil { + queryParameters["returnFaceId"] = autorest.Encode("query", *returnFaceID) + } + if returnFaceLandmarks != nil { + queryParameters["returnFaceLandmarks"] = autorest.Encode("query", *returnFaceLandmarks) + } + if len(returnFaceAttributes) > 0 { + queryParameters["returnFaceAttributes"] = autorest.Encode("query", returnFaceAttributes) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/detect"), + autorest.WithFile(imageParameter), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DetectInStreamSender sends the DetectInStream request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) DetectInStreamSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DetectInStreamResponder handles the response to the DetectInStream request. The method always +// closes the http.Response Body. +func (client GroupClient) DetectInStreamResponder(resp *http.Response) (result ListDetectedFace, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// FindSimilar given query face's faceId, find the similar-looking faces from a faceId array or a faceListId. +// +func (client GroupClient) FindSimilar(body FindSimilarRequest) (result ListSimilarFaceResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.FaceID", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.FaceID", Name: validation.MaxLength, Rule: 64, Chain: nil}}}, + {Target: "body.FaceListID", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.FaceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "body.FaceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}, + }}, + {Target: "body.FaceIds", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.FaceIds", Name: validation.MaxItems, Rule: 1000, Chain: nil}}}, + {Target: "body.MaxNumOfCandidatesReturned", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + {Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.GroupClient", "FindSimilar") + } + + req, err := client.FindSimilarPreparer(body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "FindSimilar", nil, "Failure preparing request") + return + } + + resp, err := client.FindSimilarSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.GroupClient", "FindSimilar", resp, "Failure sending request") + return + } + + result, err = client.FindSimilarResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "FindSimilar", resp, "Failure responding to request") + } + + return +} + +// FindSimilarPreparer prepares the FindSimilar request. +func (client GroupClient) FindSimilarPreparer(body FindSimilarRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/findsimilars"), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// FindSimilarSender sends the FindSimilar request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) FindSimilarSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// FindSimilarResponder handles the response to the FindSimilar request. The method always +// closes the http.Response Body. +func (client GroupClient) FindSimilarResponder(resp *http.Response) (result ListSimilarFaceResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Group divide candidate faces into groups based on face similarity. +// +func (client GroupClient) Group(body GroupRequest) (result GroupResponse, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.FaceIds", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.FaceIds", Name: validation.MaxItems, Rule: 1000, Chain: nil}}}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.GroupClient", "Group") + } + + req, err := client.GroupPreparer(body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Group", nil, "Failure preparing request") + return + } + + resp, err := client.GroupSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.GroupClient", "Group", resp, "Failure sending request") + return + } + + result, err = client.GroupResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Group", resp, "Failure responding to request") + } + + return +} + +// GroupPreparer prepares the Group request. +func (client GroupClient) GroupPreparer(body GroupRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/group"), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// GroupSender sends the Group request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) GroupSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GroupResponder handles the response to the Group request. The method always +// closes the http.Response Body. +func (client GroupClient) GroupResponder(resp *http.Response) (result GroupResponse, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Identify identify unknown faces from a person group. +// +func (client GroupClient) Identify(body IdentifyRequest) (result ListIdentifyResultItem, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.PersonGroupID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.FaceIds", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.FaceIds", Name: validation.MaxItems, Rule: 1000, Chain: nil}}}, + {Target: "body.MaxNumOfCandidatesReturned", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + {Target: "body.MaxNumOfCandidatesReturned", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}, + {Target: "body.ConfidenceThreshold", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.ConfidenceThreshold", Name: validation.InclusiveMaximum, Rule: 1, Chain: nil}, + {Target: "body.ConfidenceThreshold", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.GroupClient", "Identify") + } + + req, err := client.IdentifyPreparer(body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Identify", nil, "Failure preparing request") + return + } + + resp, err := client.IdentifySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.GroupClient", "Identify", resp, "Failure sending request") + return + } + + result, err = client.IdentifyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Identify", resp, "Failure responding to request") + } + + return +} + +// IdentifyPreparer prepares the Identify request. +func (client GroupClient) IdentifyPreparer(body IdentifyRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/identify"), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// IdentifySender sends the Identify request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) IdentifySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// IdentifyResponder handles the response to the Identify request. The method always +// closes the http.Response Body. +func (client GroupClient) IdentifyResponder(resp *http.Response) (result ListIdentifyResultItem, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Verify verify whether two faces belong to a same person or whether one face belongs to a person. +// +func (client GroupClient) Verify(body VerifyRequest) (result VerifyResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.FaceID", Name: validation.Null, Rule: true, + Chain: []validation.Constraint{{Target: "body.FaceID", Name: validation.MaxLength, Rule: 64, Chain: nil}}}, + {Target: "body.PersonID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "body.PersonGroupID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.GroupClient", "Verify") + } + + req, err := client.VerifyPreparer(body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Verify", nil, "Failure preparing request") + return + } + + resp, err := client.VerifySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.GroupClient", "Verify", resp, "Failure sending request") + return + } + + result, err = client.VerifyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.GroupClient", "Verify", resp, "Failure responding to request") + } + + return +} + +// VerifyPreparer prepares the Verify request. +func (client GroupClient) VerifyPreparer(body VerifyRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/verify"), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// VerifySender sends the Verify request. The method will close the +// http.Response Body if it receives an error. +func (client GroupClient) VerifySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// VerifyResponder handles the response to the Verify request. The method always +// closes the http.Response Body. +func (client GroupClient) VerifyResponder(resp *http.Response) (result VerifyResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/listgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/listgroup.go new file mode 100644 index 000000000..31f33dc11 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/listgroup.go @@ -0,0 +1,608 @@ +package face + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// ListGroupClient is the an API for face detection, verification, and identification. +type ListGroupClient struct { + ManagementClient +} + +// NewListGroupClient creates an instance of the ListGroupClient client. +func NewListGroupClient(subscriptionKey string, azureRegion AzureRegions) ListGroupClient { + return ListGroupClient{New(subscriptionKey, azureRegion)} +} + +// AddFace add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a +// persistedFaceId representing the added face, and persistedFaceId will not expire. +// +// faceListID is id referencing a Face List. userData is user-specified data about the face list for any purpose. The +// maximum length is 1KB. targetFace is a face rectangle to specify the target face to be added into the face list, in +// the format of "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in +// the image, targetFace is required to specify which face to add. No targetFace means there is only one face detected +// in the entire image. +func (client ListGroupClient) AddFace(faceListID string, userData string, targetFace string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: faceListID, + Constraints: []validation.Constraint{{Target: "faceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "faceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.ListGroupClient", "AddFace") + } + + req, err := client.AddFacePreparer(faceListID, userData, targetFace) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "AddFace", nil, "Failure preparing request") + return + } + + resp, err := client.AddFaceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "AddFace", resp, "Failure sending request") + return + } + + result, err = client.AddFaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "AddFace", resp, "Failure responding to request") + } + + return +} + +// AddFacePreparer prepares the AddFace request. +func (client ListGroupClient) AddFacePreparer(faceListID string, userData string, targetFace string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "faceListId": autorest.Encode("path", faceListID), + } + + queryParameters := map[string]interface{}{} + if len(userData) > 0 { + queryParameters["userData"] = autorest.Encode("query", userData) + } + if len(targetFace) > 0 { + queryParameters["targetFace"] = autorest.Encode("query", targetFace) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/facelists/{faceListId}/persistedFaces", pathParameters), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// AddFaceSender sends the AddFace request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) AddFaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// AddFaceResponder handles the response to the AddFace request. The method always +// closes the http.Response Body. +func (client ListGroupClient) AddFaceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// AddFaceFromStream add a face to a face list. The input face is specified as an image with a targetFace rectangle. It +// returns a persistedFaceId representing the added face, and persistedFaceId will not expire. +// +// faceListID is id referencing a Face List. userData is user-specified data about the face list for any purpose. The +// maximum length is 1KB. targetFace is a face rectangle to specify the target face to be added into the face list, in +// the format of "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in +// the image, targetFace is required to specify which face to add. No targetFace means there is only one face detected +// in the entire image. +func (client ListGroupClient) AddFaceFromStream(faceListID string, userData string, targetFace string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: faceListID, + Constraints: []validation.Constraint{{Target: "faceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "faceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.ListGroupClient", "AddFaceFromStream") + } + + req, err := client.AddFaceFromStreamPreparer(faceListID, userData, targetFace) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "AddFaceFromStream", nil, "Failure preparing request") + return + } + + resp, err := client.AddFaceFromStreamSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "AddFaceFromStream", resp, "Failure sending request") + return + } + + result, err = client.AddFaceFromStreamResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "AddFaceFromStream", resp, "Failure responding to request") + } + + return +} + +// AddFaceFromStreamPreparer prepares the AddFaceFromStream request. +func (client ListGroupClient) AddFaceFromStreamPreparer(faceListID string, userData string, targetFace string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "faceListId": autorest.Encode("path", faceListID), + } + + queryParameters := map[string]interface{}{} + if len(userData) > 0 { + queryParameters["userData"] = autorest.Encode("query", userData) + } + if len(targetFace) > 0 { + queryParameters["targetFace"] = autorest.Encode("query", targetFace) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/facelists/{faceListId}/persistedFaces", pathParameters), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// AddFaceFromStreamSender sends the AddFaceFromStream request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) AddFaceFromStreamSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// AddFaceFromStreamResponder handles the response to the AddFaceFromStream request. The method always +// closes the http.Response Body. +func (client ListGroupClient) AddFaceFromStreamResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Create create an empty face list. Up to 64 face lists are allowed to exist in one subscription. +// +// faceListID is id referencing a particular face list. +func (client ListGroupClient) Create(faceListID string, body CreateFaceListRequest) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: faceListID, + Constraints: []validation.Constraint{{Target: "faceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "faceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}, + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Name", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.Name", Name: validation.MaxLength, Rule: 128, Chain: nil}}}, + {Target: "body.UserData", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.UserData", Name: validation.MaxLength, Rule: 16384, Chain: nil}}}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.ListGroupClient", "Create") + } + + req, err := client.CreatePreparer(faceListID, body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client ListGroupClient) CreatePreparer(faceListID string, body CreateFaceListRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "faceListId": autorest.Encode("path", faceListID), + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/facelists/{faceListId}", pathParameters), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client ListGroupClient) CreateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Delete delete an existing face list according to faceListId. Persisted face images in the face list will also be +// deleted. +// +// faceListID is id referencing a Face List. +func (client ListGroupClient) Delete(faceListID string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: faceListID, + Constraints: []validation.Constraint{{Target: "faceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "faceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.ListGroupClient", "Delete") + } + + req, err := client.DeletePreparer(faceListID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client ListGroupClient) DeletePreparer(faceListID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "faceListId": autorest.Encode("path", faceListID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/facelists/{faceListId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client ListGroupClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteFace delete an existing face from a face list (given by a persisitedFaceId and a faceListId). Persisted image +// related to the face will also be deleted. +// +// faceListID is faceListId of an existing face list. persistedFaceID is persistedFaceId of an existing face. +func (client ListGroupClient) DeleteFace(faceListID string, persistedFaceID string) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: faceListID, + Constraints: []validation.Constraint{{Target: "faceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "faceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.ListGroupClient", "DeleteFace") + } + + req, err := client.DeleteFacePreparer(faceListID, persistedFaceID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "DeleteFace", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteFaceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "DeleteFace", resp, "Failure sending request") + return + } + + result, err = client.DeleteFaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "DeleteFace", resp, "Failure responding to request") + } + + return +} + +// DeleteFacePreparer prepares the DeleteFace request. +func (client ListGroupClient) DeleteFacePreparer(faceListID string, persistedFaceID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "faceListId": autorest.Encode("path", faceListID), + "persistedFaceId": autorest.Encode("path", persistedFaceID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/facelists/{faceListId}/persistedFaces/{persistedFaceId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteFaceSender sends the DeleteFace request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) DeleteFaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteFaceResponder handles the response to the DeleteFace request. The method always +// closes the http.Response Body. +func (client ListGroupClient) DeleteFaceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieve a face list's information. +// +// faceListID is id referencing a Face List. +func (client ListGroupClient) Get(faceListID string) (result GetFaceListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: faceListID, + Constraints: []validation.Constraint{{Target: "faceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "faceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.ListGroupClient", "Get") + } + + req, err := client.GetPreparer(faceListID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client ListGroupClient) GetPreparer(faceListID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "faceListId": autorest.Encode("path", faceListID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/facelists/{faceListId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client ListGroupClient) GetResponder(resp *http.Response) (result GetFaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List retrieve information about all existing face lists. Only faceListId, name and userData will be returned. +func (client ListGroupClient) List() (result ListGetFaceListResult, err error) { + req, err := client.ListPreparer() + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client ListGroupClient) ListPreparer() (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/facelists"), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client ListGroupClient) ListResponder(resp *http.Response) (result ListGetFaceListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update update information of a face list. +// +// faceListID is id referencing a Face List. +func (client ListGroupClient) Update(faceListID string, body CreateFaceListRequest) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: faceListID, + Constraints: []validation.Constraint{{Target: "faceListID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "faceListID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.ListGroupClient", "Update") + } + + req, err := client.UpdatePreparer(faceListID, body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.ListGroupClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client ListGroupClient) UpdatePreparer(faceListID string, body CreateFaceListRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "faceListId": autorest.Encode("path", faceListID), + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/facelists/{faceListId}", pathParameters), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client ListGroupClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client ListGroupClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/models.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/models.go new file mode 100644 index 000000000..34fba705d --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/models.go @@ -0,0 +1,360 @@ +package face + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" +) + +// AzureRegions enumerates the values for azure regions. +type AzureRegions string + +const ( + // Eastus2 specifies the eastus 2 state for azure regions. + Eastus2 AzureRegions = "eastus2" + // Southeastasia specifies the southeastasia state for azure regions. + Southeastasia AzureRegions = "southeastasia" + // Westcentralus specifies the westcentralus state for azure regions. + Westcentralus AzureRegions = "westcentralus" + // Westeurope specifies the westeurope state for azure regions. + Westeurope AzureRegions = "westeurope" + // Westus specifies the westus state for azure regions. + Westus AzureRegions = "westus" +) + +// Gender enumerates the values for gender. +type Gender string + +const ( + // Female specifies the female state for gender. + Female Gender = "female" + // Male specifies the male state for gender. + Male Gender = "male" +) + +// Glasses enumerates the values for glasses. +type Glasses string + +const ( + // NoGlasses specifies the no glasses state for glasses. + NoGlasses Glasses = "noGlasses" + // ReadingGlasses specifies the reading glasses state for glasses. + ReadingGlasses Glasses = "readingGlasses" + // Sunglasses specifies the sunglasses state for glasses. + Sunglasses Glasses = "sunglasses" + // SwimmingGoggles specifies the swimming goggles state for glasses. + SwimmingGoggles Glasses = "swimmingGoggles" +) + +// Mode enumerates the values for mode. +type Mode string + +const ( + // MatchFace specifies the match face state for mode. + MatchFace Mode = "matchFace" + // MatchPerson specifies the match person state for mode. + MatchPerson Mode = "matchPerson" +) + +// Status enumerates the values for status. +type Status string + +const ( + // Failed specifies the failed state for status. + Failed Status = "failed" + // Nonstarted specifies the nonstarted state for status. + Nonstarted Status = "nonstarted" + // Running specifies the running state for status. + Running Status = "running" + // Succeeded specifies the succeeded state for status. + Succeeded Status = "succeeded" +) + +// APIError is error information returned by the API +type APIError struct { + Error *Error `json:"error,omitempty"` +} + +// Attributes is face Attributes +type Attributes struct { + Age *float64 `json:"age,omitempty"` + Gender Gender `json:"gender,omitempty"` + Smile *float64 `json:"smile,omitempty"` + Glasses Glasses `json:"glasses,omitempty"` + FacialHair *FacialHairProperties `json:"facialHair,omitempty"` + HeadPose *HeadPoseProperties `json:"headPose,omitempty"` + Emotion *EmotionProperties `json:"emotion,omitempty"` +} + +// CreateFaceListRequest is request to create a face list. +type CreateFaceListRequest struct { + Name *string `json:"name,omitempty"` + UserData *string `json:"userData,omitempty"` +} + +// CreatePersonGroupRequest is request to create a person group. +type CreatePersonGroupRequest struct { + Name *string `json:"name,omitempty"` + UserData *string `json:"userData,omitempty"` +} + +// CreatePersonRequest is request to create a person object. +type CreatePersonRequest struct { + Name *string `json:"name,omitempty"` + UserData *string `json:"userData,omitempty"` +} + +// CreatePersonResult is result of creating person. +type CreatePersonResult struct { + autorest.Response `json:"-"` + PersonID *string `json:"personId,omitempty"` +} + +// DetectedFace is detected Face object. +type DetectedFace struct { + FaceID *string `json:"faceId,omitempty"` + FaceRectangle *Rectangle `json:"faceRectangle,omitempty"` + FaceLandmarks *Landmarks `json:"faceLandmarks,omitempty"` +} + +// EmotionProperties is properties describing facial emotion. +type EmotionProperties struct { + Anger *float64 `json:"anger,omitempty"` + Contempt *float64 `json:"contempt,omitempty"` + Disgust *float64 `json:"disgust,omitempty"` + Fear *float64 `json:"fear,omitempty"` + Happiness *float64 `json:"happiness,omitempty"` + Neutral *float64 `json:"neutral,omitempty"` + Sadness *float64 `json:"sadness,omitempty"` + Surprise *float64 `json:"surprise,omitempty"` +} + +// Error is error body. +type Error struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` +} + +// FacialHairProperties is properties describing facial hair attributes. +type FacialHairProperties struct { + Mustache *float64 `json:"mustache,omitempty"` + Beard *float64 `json:"beard,omitempty"` + Sideburns *float64 `json:"sideburns,omitempty"` +} + +// FindSimilarRequest is request body for find similar operation. +type FindSimilarRequest struct { + FaceID *string `json:"faceId,omitempty"` + FaceListID *string `json:"faceListId,omitempty"` + FaceIds *[]string `json:"faceIds,omitempty"` + MaxNumOfCandidatesReturned *int32 `json:"maxNumOfCandidatesReturned,omitempty"` + Mode Mode `json:"mode,omitempty"` +} + +// GetFaceListResult is result of the GetFaceList operation. +type GetFaceListResult struct { + autorest.Response `json:"-"` + FaceListID *string `json:"faceListId,omitempty"` + Name *string `json:"name,omitempty"` + UserData *string `json:"userData,omitempty"` +} + +// GroupRequest is request body for group request. +type GroupRequest struct { + FaceIds *[]string `json:"faceIds,omitempty"` +} + +// GroupResponse is an array of face groups based on face similarity. +type GroupResponse struct { + autorest.Response `json:"-"` + Groups *[][]string `json:"groups,omitempty"` + MessyGroup *[]string `json:"messyGroup,omitempty"` +} + +// HeadPoseProperties is properties indicating head pose of the face. +type HeadPoseProperties struct { + Roll *float64 `json:"roll,omitempty"` + Yaw *float64 `json:"yaw,omitempty"` + Pitch *float64 `json:"pitch,omitempty"` +} + +// IdentifyRequest is request body for identify face operation. +type IdentifyRequest struct { + PersonGroupID *string `json:"personGroupId,omitempty"` + FaceIds *[]string `json:"faceIds,omitempty"` + MaxNumOfCandidatesReturned *int32 `json:"maxNumOfCandidatesReturned,omitempty"` + ConfidenceThreshold *float64 `json:"confidenceThreshold,omitempty"` +} + +// IdentifyResultCandidate is all possible faces that may qualify. +type IdentifyResultCandidate struct { + PersonID *string `json:"personId,omitempty"` + Confidence *float64 `json:"confidence,omitempty"` +} + +// IdentifyResultItem is response body for identify face operation. +type IdentifyResultItem struct { + FaceID *string `json:"faceId,omitempty"` + Candidates *[]IdentifyResultCandidate `json:"candidates,omitempty"` +} + +// ImageURL is +type ImageURL struct { + URL *string `json:"url,omitempty"` +} + +// Landmarks is a collection of 27-point face landmarks pointing to the important positions of face components. +type Landmarks struct { + PupilLeft *Position `json:"pupilLeft,omitempty"` + PupilRight *Position `json:"pupilRight,omitempty"` + NoseTip *Position `json:"noseTip,omitempty"` + MouthLeft *Position `json:"mouthLeft,omitempty"` + MouthRight *Position `json:"mouthRight,omitempty"` + EyebrowLeftOuter *Position `json:"eyebrowLeftOuter,omitempty"` + EyebrowLeftInner *Position `json:"eyebrowLeftInner,omitempty"` + EyeLeftOuter *Position `json:"eyeLeftOuter,omitempty"` + EyeLeftTop *Position `json:"eyeLeftTop,omitempty"` + EyeLeftBottom *Position `json:"eyeLeftBottom,omitempty"` + EyeLeftInner *Position `json:"eyeLeftInner,omitempty"` + EyebrowRightInner *Position `json:"eyebrowRightInner,omitempty"` + EyebrowRightOuter *Position `json:"eyebrowRightOuter,omitempty"` + EyeRightInner *Position `json:"eyeRightInner,omitempty"` + EyeRightTop *Position `json:"eyeRightTop,omitempty"` + EyeRightBottom *Position `json:"eyeRightBottom,omitempty"` + EyeRightOuter *Position `json:"eyeRightOuter,omitempty"` + NoseRootLeft *Position `json:"noseRootLeft,omitempty"` + NoseRootRight *Position `json:"noseRootRight,omitempty"` + NoseLeftAlarTop *Position `json:"noseLeftAlarTop,omitempty"` + NoseRightAlarTop *Position `json:"noseRightAlarTop,omitempty"` + NoseLeftAlarOutTip *Position `json:"noseLeftAlarOutTip,omitempty"` + NoseRightAlarOutTip *Position `json:"noseRightAlarOutTip,omitempty"` + UpperLipTop *Position `json:"upperLipTop,omitempty"` + UpperLipBottom *Position `json:"upperLipBottom,omitempty"` + UnderLipTop *Position `json:"underLipTop,omitempty"` + UnderLipBottom *Position `json:"underLipBottom,omitempty"` +} + +// ListDetectedFace is +type ListDetectedFace struct { + autorest.Response `json:"-"` + Value *[]DetectedFace `json:"value,omitempty"` +} + +// ListGetFaceListResult is +type ListGetFaceListResult struct { + autorest.Response `json:"-"` + Value *[]GetFaceListResult `json:"value,omitempty"` +} + +// ListIdentifyResultItem is +type ListIdentifyResultItem struct { + autorest.Response `json:"-"` + Value *[]IdentifyResultItem `json:"value,omitempty"` +} + +// ListPersonGroupResult is +type ListPersonGroupResult struct { + autorest.Response `json:"-"` + Value *[]PersonGroupResult `json:"value,omitempty"` +} + +// ListPersonResult is +type ListPersonResult struct { + autorest.Response `json:"-"` + Value *[]PersonResult `json:"value,omitempty"` +} + +// ListSimilarFaceResult is +type ListSimilarFaceResult struct { + autorest.Response `json:"-"` + Value *[]SimilarFaceResult `json:"value,omitempty"` +} + +// PersonFaceResult is personFace object. +type PersonFaceResult struct { + autorest.Response `json:"-"` + PersistedFaceID *string `json:"persistedFaceId,omitempty"` + UserData *string `json:"userData,omitempty"` +} + +// PersonGroupResult is person group object. +type PersonGroupResult struct { + autorest.Response `json:"-"` + PersonGroupID *string `json:"personGroupId,omitempty"` + Name *string `json:"name,omitempty"` + UserData *string `json:"userData,omitempty"` +} + +// PersonResult is person object. +type PersonResult struct { + autorest.Response `json:"-"` + PersonID *string `json:"personId,omitempty"` + PersistedFaceIds *[]string `json:"persistedFaceIds,omitempty"` + Name *string `json:"name,omitempty"` + UserData *string `json:"userData,omitempty"` +} + +// Position is coordinates within an image +type Position struct { + X *int32 `json:"x,omitempty"` + Y *int32 `json:"y,omitempty"` +} + +// Rectangle is a rectangle within which a face can be found +type Rectangle struct { + Width *int32 `json:"width,omitempty"` + Height *int32 `json:"height,omitempty"` + Left *int32 `json:"left,omitempty"` + Top *int32 `json:"top,omitempty"` +} + +// SimilarFaceResult is response body for find similar face operation. +type SimilarFaceResult struct { + FaceID *string `json:"faceId,omitempty"` + PersistedFaceID *string `json:"persistedFaceId,omitempty"` + Confidence *float64 `json:"confidence,omitempty"` +} + +// TrainingStatus is training status object. +type TrainingStatus struct { + autorest.Response `json:"-"` + Status Status `json:"status,omitempty"` + Created *date.Time `json:"createdDateTime,omitempty"` + LastAction *date.Time `json:"lastActionDateTime,omitempty"` + Message *string `json:"message,omitempty"` +} + +// UpdatePersonFaceDataRequest is request to update person face data. +type UpdatePersonFaceDataRequest struct { + UserData *string `json:"userData,omitempty"` +} + +// VerifyRequest is request body for verify operation. +type VerifyRequest struct { + FaceID *string `json:"faceId,omitempty"` + PersonID *string `json:"personId,omitempty"` + PersonGroupID *string `json:"personGroupId,omitempty"` +} + +// VerifyResult is result of the verify operation. +type VerifyResult struct { + autorest.Response `json:"-"` + IsIdentical *bool `json:"isIdentical,omitempty"` + Confidence *float64 `json:"confidence,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/person.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/person.go new file mode 100644 index 000000000..657a00142 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/person.go @@ -0,0 +1,711 @@ +package face + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// PersonClient is the an API for face detection, verification, and identification. +type PersonClient struct { + ManagementClient +} + +// NewPersonClient creates an instance of the PersonClient client. +func NewPersonClient(subscriptionKey string, azureRegion AzureRegions) PersonClient { + return PersonClient{New(subscriptionKey, azureRegion)} +} + +// AddFace add a representative face to a person for identification. The input face is specified as an image with a +// targetFace rectangle. +// +// personGroupID is specifying the person group containing the target person. personID is target person that the face +// is added to. userData is user-specified data about the target face to add for any purpose. The maximum length is +// 1KB. targetFace is a face rectangle to specify the target face to be added to a person in the format of +// "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in the image, +// targetFace is required to specify which face to add. No targetFace means there is only one face detected in the +// entire image. +func (client PersonClient) AddFace(personGroupID string, personID string, userData string, targetFace string) (result autorest.Response, err error) { + req, err := client.AddFacePreparer(personGroupID, personID, userData, targetFace) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "AddFace", nil, "Failure preparing request") + return + } + + resp, err := client.AddFaceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonClient", "AddFace", resp, "Failure sending request") + return + } + + result, err = client.AddFaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "AddFace", resp, "Failure responding to request") + } + + return +} + +// AddFacePreparer prepares the AddFace request. +func (client PersonClient) AddFacePreparer(personGroupID string, personID string, userData string, targetFace string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + queryParameters := map[string]interface{}{} + if len(userData) > 0 { + queryParameters["userData"] = autorest.Encode("query", userData) + } + if len(targetFace) > 0 { + queryParameters["targetFace"] = autorest.Encode("query", targetFace) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}/persistedFaces", pathParameters), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// AddFaceSender sends the AddFace request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) AddFaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// AddFaceResponder handles the response to the AddFace request. The method always +// closes the http.Response Body. +func (client PersonClient) AddFaceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// AddFaceFromStream add a representative face to a person for identification. The input face is specified as an image +// with a targetFace rectangle. +// +// personGroupID is specifying the person group containing the target person. personID is target person that the face +// is added to. userData is user-specified data about the target face to add for any purpose. The maximum length is +// 1KB. targetFace is a face rectangle to specify the target face to be added to a person, in the format of +// "targetFace=left,top,width,height". E.g. "targetFace=10,10,100,100". If there is more than one face in the image, +// targetFace is required to specify which face to add. No targetFace means there is only one face detected in the +// entire image. +func (client PersonClient) AddFaceFromStream(personGroupID string, personID string, userData string, targetFace string) (result autorest.Response, err error) { + req, err := client.AddFaceFromStreamPreparer(personGroupID, personID, userData, targetFace) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "AddFaceFromStream", nil, "Failure preparing request") + return + } + + resp, err := client.AddFaceFromStreamSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonClient", "AddFaceFromStream", resp, "Failure sending request") + return + } + + result, err = client.AddFaceFromStreamResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "AddFaceFromStream", resp, "Failure responding to request") + } + + return +} + +// AddFaceFromStreamPreparer prepares the AddFaceFromStream request. +func (client PersonClient) AddFaceFromStreamPreparer(personGroupID string, personID string, userData string, targetFace string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + queryParameters := map[string]interface{}{} + if len(userData) > 0 { + queryParameters["userData"] = autorest.Encode("query", userData) + } + if len(targetFace) > 0 { + queryParameters["targetFace"] = autorest.Encode("query", targetFace) + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}/persistedFaces", pathParameters), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// AddFaceFromStreamSender sends the AddFaceFromStream request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) AddFaceFromStreamSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// AddFaceFromStreamResponder handles the response to the AddFaceFromStream request. The method always +// closes the http.Response Body. +func (client PersonClient) AddFaceFromStreamResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Create create a new person in a specified person group. +// +// personGroupID is specifying the target person group to create the person. +func (client PersonClient) Create(personGroupID string, body CreatePersonRequest) (result CreatePersonResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Name", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.Name", Name: validation.MaxLength, Rule: 128, Chain: nil}}}, + {Target: "body.UserData", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.UserData", Name: validation.MaxLength, Rule: 16384, Chain: nil}}}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.PersonClient", "Create") + } + + req, err := client.CreatePreparer(personGroupID, body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.PersonClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client PersonClient) CreatePreparer(personGroupID string, body CreatePersonRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons", pathParameters), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client PersonClient) CreateResponder(resp *http.Response) (result CreatePersonResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Delete delete an existing person from a person group. Persisted face images of the person will also be deleted. +// +// personGroupID is specifying the person group containing the person. personID is the target personId to delete. +func (client PersonClient) Delete(personGroupID string, personID string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(personGroupID, personID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PersonClient) DeletePreparer(personGroupID string, personID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PersonClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// DeleteFace delete a face from a person. Relative image for the persisted face will also be deleted. +// +// personGroupID is specifying the person group containing the target person. personID is specifying the person that +// the target persisted face belong to. persistedFaceID is the persisted face to remove. +func (client PersonClient) DeleteFace(personGroupID string, personID string, persistedFaceID string) (result autorest.Response, err error) { + req, err := client.DeleteFacePreparer(personGroupID, personID, persistedFaceID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "DeleteFace", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteFaceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonClient", "DeleteFace", resp, "Failure sending request") + return + } + + result, err = client.DeleteFaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "DeleteFace", resp, "Failure responding to request") + } + + return +} + +// DeleteFacePreparer prepares the DeleteFace request. +func (client PersonClient) DeleteFacePreparer(personGroupID string, personID string, persistedFaceID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "persistedFaceId": autorest.Encode("path", persistedFaceID), + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}/persistedFaces/{persistedFaceId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteFaceSender sends the DeleteFace request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) DeleteFaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteFaceResponder handles the response to the DeleteFace request. The method always +// closes the http.Response Body. +func (client PersonClient) DeleteFaceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieve a person's information, including registered persisted faces, name and userData. +// +// personGroupID is specifying the person group containing the target person. personID is specifying the target person. +func (client PersonClient) Get(personGroupID string, personID string) (result PersonResult, err error) { + req, err := client.GetPreparer(personGroupID, personID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.PersonClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PersonClient) GetPreparer(personGroupID string, personID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PersonClient) GetResponder(resp *http.Response) (result PersonResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetFace retrieve information about a persisted face (specified by persistedFaceId, personId and its belonging +// personGroupId). +// +// personGroupID is specifying the person group containing the target person. personID is specifying the target person +// that the face belongs to. persistedFaceID is the persistedFaceId of the target persisted face of the person. +func (client PersonClient) GetFace(personGroupID string, personID string, persistedFaceID string) (result PersonFaceResult, err error) { + req, err := client.GetFacePreparer(personGroupID, personID, persistedFaceID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "GetFace", nil, "Failure preparing request") + return + } + + resp, err := client.GetFaceSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.PersonClient", "GetFace", resp, "Failure sending request") + return + } + + result, err = client.GetFaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "GetFace", resp, "Failure responding to request") + } + + return +} + +// GetFacePreparer prepares the GetFace request. +func (client PersonClient) GetFacePreparer(personGroupID string, personID string, persistedFaceID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "persistedFaceId": autorest.Encode("path", persistedFaceID), + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}/persistedFaces/{persistedFaceId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// GetFaceSender sends the GetFace request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) GetFaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetFaceResponder handles the response to the GetFace request. The method always +// closes the http.Response Body. +func (client PersonClient) GetFaceResponder(resp *http.Response) (result PersonFaceResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list all persons in a person group, and retrieve person information (including personId, name, userData and +// persistedFaceIds of registered faces of the person). +// +// personGroupID is personGroupId of the target person group. +func (client PersonClient) List(personGroupID string) (result ListPersonResult, err error) { + req, err := client.ListPreparer(personGroupID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.PersonClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PersonClient) ListPreparer(personGroupID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PersonClient) ListResponder(resp *http.Response) (result ListPersonResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Update update name or userData of a person. +// +// personGroupID is specifying the person group containing the target person. personID is personId of the target +// person. +func (client PersonClient) Update(personGroupID string, personID string, body CreatePersonRequest) (result autorest.Response, err error) { + req, err := client.UpdatePreparer(personGroupID, personID, body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client PersonClient) UpdatePreparer(personGroupID string, personID string, body CreatePersonRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}", pathParameters), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client PersonClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// UpdateFace update a person persisted face's userData field. +// +// personGroupID is specifying the person group containing the target person. personID is personId of the target +// person. persistedFaceID is persistedFaceId of target face, which is persisted and will not expire. +func (client PersonClient) UpdateFace(personGroupID string, personID string, persistedFaceID string, body UpdatePersonFaceDataRequest) (result autorest.Response, err error) { + req, err := client.UpdateFacePreparer(personGroupID, personID, persistedFaceID, body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "UpdateFace", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateFaceSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonClient", "UpdateFace", resp, "Failure sending request") + return + } + + result, err = client.UpdateFaceResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonClient", "UpdateFace", resp, "Failure responding to request") + } + + return +} + +// UpdateFacePreparer prepares the UpdateFace request. +func (client PersonClient) UpdateFacePreparer(personGroupID string, personID string, persistedFaceID string, body UpdatePersonFaceDataRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "persistedFaceId": autorest.Encode("path", persistedFaceID), + "personGroupId": autorest.Encode("path", personGroupID), + "personId": autorest.Encode("path", personID), + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/persons/{personId}/persistedFaces/{persistedFaceId}", pathParameters), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateFaceSender sends the UpdateFace request. The method will close the +// http.Response Body if it receives an error. +func (client PersonClient) UpdateFaceSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateFaceResponder handles the response to the UpdateFace request. The method always +// closes the http.Response Body. +func (client PersonClient) UpdateFaceResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/persongroup.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/persongroup.go new file mode 100644 index 000000000..b1de6f731 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/persongroup.go @@ -0,0 +1,500 @@ +package face + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/validation" + "net/http" +) + +// PersonGroupClient is the an API for face detection, verification, and identification. +type PersonGroupClient struct { + ManagementClient +} + +// NewPersonGroupClient creates an instance of the PersonGroupClient client. +func NewPersonGroupClient(subscriptionKey string, azureRegion AzureRegions) PersonGroupClient { + return PersonGroupClient{New(subscriptionKey, azureRegion)} +} + +// Create create a new person group with specified personGroupId, name and user-provided userData. +// +// personGroupID is user-provided personGroupId as a string. +func (client PersonGroupClient) Create(personGroupID string, body CreatePersonGroupRequest) (result autorest.Response, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: personGroupID, + Constraints: []validation.Constraint{{Target: "personGroupID", Name: validation.MaxLength, Rule: 64, Chain: nil}, + {Target: "personGroupID", Name: validation.Pattern, Rule: `^[a-z0-9-_]+$`, Chain: nil}}}, + {TargetValue: body, + Constraints: []validation.Constraint{{Target: "body.Name", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.Name", Name: validation.MaxLength, Rule: 128, Chain: nil}}}, + {Target: "body.UserData", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "body.UserData", Name: validation.MaxLength, Rule: 16384, Chain: nil}}}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.PersonGroupClient", "Create") + } + + req, err := client.CreatePreparer(personGroupID, body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Create", nil, "Failure preparing request") + return + } + + resp, err := client.CreateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Create", resp, "Failure sending request") + return + } + + result, err = client.CreateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Create", resp, "Failure responding to request") + } + + return +} + +// CreatePreparer prepares the Create request. +func (client PersonGroupClient) CreatePreparer(personGroupID string, body CreatePersonGroupRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}", pathParameters), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// CreateSender sends the Create request. The method will close the +// http.Response Body if it receives an error. +func (client PersonGroupClient) CreateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// CreateResponder handles the response to the Create request. The method always +// closes the http.Response Body. +func (client PersonGroupClient) CreateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Delete delete an existing person group. Persisted face images of all people in the person group will also be +// deleted. +// +// personGroupID is the personGroupId of the person group to be deleted. +func (client PersonGroupClient) Delete(personGroupID string) (result autorest.Response, err error) { + req, err := client.DeletePreparer(personGroupID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Delete", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Delete", resp, "Failure sending request") + return + } + + result, err = client.DeleteResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Delete", resp, "Failure responding to request") + } + + return +} + +// DeletePreparer prepares the Delete request. +func (client PersonGroupClient) DeletePreparer(personGroupID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSender sends the Delete request. The method will close the +// http.Response Body if it receives an error. +func (client PersonGroupClient) DeleteSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteResponder handles the response to the Delete request. The method always +// closes the http.Response Body. +func (client PersonGroupClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} + +// Get retrieve the information of a person group, including its name and userData. +// +// personGroupID is personGroupId of the target person group. +func (client PersonGroupClient) Get(personGroupID string) (result PersonGroupResult, err error) { + req, err := client.GetPreparer(personGroupID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Get", nil, "Failure preparing request") + return + } + + resp, err := client.GetSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Get", resp, "Failure sending request") + return + } + + result, err = client.GetResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Get", resp, "Failure responding to request") + } + + return +} + +// GetPreparer prepares the Get request. +func (client PersonGroupClient) GetPreparer(personGroupID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// GetSender sends the Get request. The method will close the +// http.Response Body if it receives an error. +func (client PersonGroupClient) GetSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetResponder handles the response to the Get request. The method always +// closes the http.Response Body. +func (client PersonGroupClient) GetResponder(resp *http.Response) (result PersonGroupResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetTrainingStatus retrieve the training status of a person group (completed or ongoing). +// +// personGroupID is personGroupId of target person group. +func (client PersonGroupClient) GetTrainingStatus(personGroupID string) (result TrainingStatus, err error) { + req, err := client.GetTrainingStatusPreparer(personGroupID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "GetTrainingStatus", nil, "Failure preparing request") + return + } + + resp, err := client.GetTrainingStatusSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "GetTrainingStatus", resp, "Failure sending request") + return + } + + result, err = client.GetTrainingStatusResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "GetTrainingStatus", resp, "Failure responding to request") + } + + return +} + +// GetTrainingStatusPreparer prepares the GetTrainingStatus request. +func (client PersonGroupClient) GetTrainingStatusPreparer(personGroupID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/training", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// GetTrainingStatusSender sends the GetTrainingStatus request. The method will close the +// http.Response Body if it receives an error. +func (client PersonGroupClient) GetTrainingStatusSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetTrainingStatusResponder handles the response to the GetTrainingStatus request. The method always +// closes the http.Response Body. +func (client PersonGroupClient) GetTrainingStatusResponder(resp *http.Response) (result TrainingStatus, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// List list person groups and their information. +// +// start is list person groups from the least personGroupId greater than the "start". top is the number of person +// groups to list. +func (client PersonGroupClient) List(start string, top *int32) (result ListPersonGroupResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: start, + Constraints: []validation.Constraint{{Target: "start", Name: validation.MaxLength, Rule: 64, Chain: nil}}}, + {TargetValue: top, + Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMaximum, Rule: 1000, Chain: nil}, + {Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "face.PersonGroupClient", "List") + } + + req, err := client.ListPreparer(start, top) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "List", nil, "Failure preparing request") + return + } + + resp, err := client.ListSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "List", resp, "Failure sending request") + return + } + + result, err = client.ListResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "List", resp, "Failure responding to request") + } + + return +} + +// ListPreparer prepares the List request. +func (client PersonGroupClient) ListPreparer(start string, top *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + queryParameters := map[string]interface{}{} + if len(start) > 0 { + queryParameters["start"] = autorest.Encode("query", start) + } + if top != nil { + queryParameters["top"] = autorest.Encode("query", *top) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPath("/persongroups"), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// ListSender sends the List request. The method will close the +// http.Response Body if it receives an error. +func (client PersonGroupClient) ListSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// ListResponder handles the response to the List request. The method always +// closes the http.Response Body. +func (client PersonGroupClient) ListResponder(resp *http.Response) (result ListPersonGroupResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result.Value), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Train queue a person group training task, the training task may not be started immediately. +// +// personGroupID is target person group to be trained. +func (client PersonGroupClient) Train(personGroupID string) (result autorest.Response, err error) { + req, err := client.TrainPreparer(personGroupID) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Train", nil, "Failure preparing request") + return + } + + resp, err := client.TrainSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Train", resp, "Failure sending request") + return + } + + result, err = client.TrainResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Train", resp, "Failure responding to request") + } + + return +} + +// TrainPreparer prepares the Train request. +func (client PersonGroupClient) TrainPreparer(personGroupID string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}/train", pathParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// TrainSender sends the Train request. The method will close the +// http.Response Body if it receives an error. +func (client PersonGroupClient) TrainSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// TrainResponder handles the response to the Train request. The method always +// closes the http.Response Body. +func (client PersonGroupClient) TrainResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), + autorest.ByClosing()) + result.Response = resp + return +} + +// Update update an existing person group's display name and userData. The properties which does not appear in request +// body will not be updated. +// +// personGroupID is personGroupId of the person group to be updated. +func (client PersonGroupClient) Update(personGroupID string, body CreatePersonGroupRequest) (result autorest.Response, err error) { + req, err := client.UpdatePreparer(personGroupID, body) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Update", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Update", resp, "Failure sending request") + return + } + + result, err = client.UpdateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "face.PersonGroupClient", "Update", resp, "Failure responding to request") + } + + return +} + +// UpdatePreparer prepares the Update request. +func (client PersonGroupClient) UpdatePreparer(personGroupID string, body CreatePersonGroupRequest) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + pathParameters := map[string]interface{}{ + "personGroupId": autorest.Encode("path", personGroupID), + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/face/v1.0", urlParameters), + autorest.WithPathParameters("/persongroups/{personGroupId}", pathParameters), + autorest.WithJSON(body), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSender sends the Update request. The method will close the +// http.Response Body if it receives an error. +func (client PersonGroupClient) UpdateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateResponder handles the response to the Update request. The method always +// closes the http.Response Body. +func (client PersonGroupClient) UpdateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByClosing()) + result.Response = resp + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/version.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/version.go new file mode 100644 index 000000000..831113734 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/face/version.go @@ -0,0 +1,28 @@ +package face + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/v11.0.0-beta arm-face/1.0" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return "v11.0.0-beta" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/client.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/client.go new file mode 100644 index 000000000..be978a339 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/client.go @@ -0,0 +1,249 @@ +// Package textanalytics implements the Azure ARM Textanalytics service API version v2.0. +// +// The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning +// algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase +// extraction and language detection. No training data is needed to use this API; just bring your text data. This API +// uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can +// be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview +package textanalytics + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/azure" + "net/http" +) + +const () + +// ManagementClient is the base client for Textanalytics. +type ManagementClient struct { + autorest.Client + SubscriptionKey string + AzureRegion AzureRegions +} + +// New creates an instance of the ManagementClient client. +func New(subscriptionKey string, azureRegion AzureRegions) ManagementClient { + return NewWithoutDefaults(subscriptionKey, azureRegion) +} + +// NewWithoutDefaults creates an instance of the ManagementClient client. +func NewWithoutDefaults(subscriptionKey string, azureRegion AzureRegions) ManagementClient { + return ManagementClient{ + Client: autorest.NewClientWithUserAgent(UserAgent()), + SubscriptionKey: subscriptionKey, + AzureRegion: azureRegion, + } +} + +// DetectLanguage scores close to 1 indicate 100% certainty that the identified language is true. A total of 120 +// languages are supported. +// +// input is collection of documents to analyze. numberOfLanguagesToDetect is (Optional. Deprecated) Number of languages +// to detect. Set to 1 by default. Irrespective of the value, the language with the highest score is returned. +func (client ManagementClient) DetectLanguage(input BatchInput, numberOfLanguagesToDetect *int32) (result LanguageBatchResult, err error) { + req, err := client.DetectLanguagePreparer(input, numberOfLanguagesToDetect) + if err != nil { + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "DetectLanguage", nil, "Failure preparing request") + return + } + + resp, err := client.DetectLanguageSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "DetectLanguage", resp, "Failure sending request") + return + } + + result, err = client.DetectLanguageResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "DetectLanguage", resp, "Failure responding to request") + } + + return +} + +// DetectLanguagePreparer prepares the DetectLanguage request. +func (client ManagementClient) DetectLanguagePreparer(input BatchInput, numberOfLanguagesToDetect *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + queryParameters := map[string]interface{}{} + if numberOfLanguagesToDetect != nil { + queryParameters["numberOfLanguagesToDetect"] = autorest.Encode("query", *numberOfLanguagesToDetect) + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/text/analytics", urlParameters), + autorest.WithPath("/v2.0/languages"), + autorest.WithJSON(input), + autorest.WithQueryParameters(queryParameters), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// DetectLanguageSender sends the DetectLanguage request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) DetectLanguageSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DetectLanguageResponder handles the response to the DetectLanguage request. The method always +// closes the http.Response Body. +func (client ManagementClient) DetectLanguageResponder(resp *http.Response) (result LanguageBatchResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// KeyPhrases we employ techniques from Microsoft Office's sophisticated Natural Language Processing toolkit. See the +//
Text +// Analytics Documentation for details about the languages that are supported by key phrase extraction. +// +// input is collection of documents to analyze. Documents can now contain a language field to indicate the text +// language +func (client ManagementClient) KeyPhrases(input MultiLanguageBatchInput) (result KeyPhraseBatchResult, err error) { + req, err := client.KeyPhrasesPreparer(input) + if err != nil { + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "KeyPhrases", nil, "Failure preparing request") + return + } + + resp, err := client.KeyPhrasesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "KeyPhrases", resp, "Failure sending request") + return + } + + result, err = client.KeyPhrasesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "KeyPhrases", resp, "Failure responding to request") + } + + return +} + +// KeyPhrasesPreparer prepares the KeyPhrases request. +func (client ManagementClient) KeyPhrasesPreparer(input MultiLanguageBatchInput) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/text/analytics", urlParameters), + autorest.WithPath("/v2.0/keyPhrases"), + autorest.WithJSON(input), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// KeyPhrasesSender sends the KeyPhrases request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) KeyPhrasesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// KeyPhrasesResponder handles the response to the KeyPhrases request. The method always +// closes the http.Response Body. +func (client ManagementClient) KeyPhrasesResponder(resp *http.Response) (result KeyPhraseBatchResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Sentiment scores close to 1 indicate positive sentiment, while scores close to 0 indicate negative sentiment. +// Sentiment score is generated using classification techniques. The input features to the classifier include n-grams, +// features generated from part-of-speech tags, and word embeddings. See the Text +// Analytics Documentation for details about the languages that are supported by sentiment analysis. +// +// input is collection of documents to analyze. +func (client ManagementClient) Sentiment(input MultiLanguageBatchInput) (result SentimentBatchResult, err error) { + req, err := client.SentimentPreparer(input) + if err != nil { + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "Sentiment", nil, "Failure preparing request") + return + } + + resp, err := client.SentimentSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "Sentiment", resp, "Failure sending request") + return + } + + result, err = client.SentimentResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "textanalytics.ManagementClient", "Sentiment", resp, "Failure responding to request") + } + + return +} + +// SentimentPreparer prepares the Sentiment request. +func (client ManagementClient) SentimentPreparer(input MultiLanguageBatchInput) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "AzureRegion": client.AzureRegion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("https://{AzureRegion}.api.cognitive.microsoft.com/text/analytics", urlParameters), + autorest.WithPath("/v2.0/sentiment"), + autorest.WithJSON(input), + autorest.WithHeader("Ocp-Apim-Subscription-Key", client.SubscriptionKey)) + return preparer.Prepare(&http.Request{}) +} + +// SentimentSender sends the Sentiment request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) SentimentSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// SentimentResponder handles the response to the Sentiment request. The method always +// closes the http.Response Body. +func (client ManagementClient) SentimentResponder(resp *http.Response) (result SentimentBatchResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/models.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/models.go new file mode 100644 index 000000000..4ef237371 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/models.go @@ -0,0 +1,128 @@ +package textanalytics + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +import ( + "github.com/Azure/go-autorest/autorest" +) + +// AzureRegions enumerates the values for azure regions. +type AzureRegions string + +const ( + // Eastus2 specifies the eastus 2 state for azure regions. + Eastus2 AzureRegions = "eastus2" + // Southeastasia specifies the southeastasia state for azure regions. + Southeastasia AzureRegions = "southeastasia" + // Westcentralus specifies the westcentralus state for azure regions. + Westcentralus AzureRegions = "westcentralus" + // Westeurope specifies the westeurope state for azure regions. + Westeurope AzureRegions = "westeurope" + // Westus specifies the westus state for azure regions. + Westus AzureRegions = "westus" +) + +// BatchInput is +type BatchInput struct { + Documents *[]Input `json:"documents,omitempty"` +} + +// DetectedLanguage is +type DetectedLanguage struct { + Name *string `json:"name,omitempty"` + Iso6391Name *string `json:"iso6391Name,omitempty"` + Score *float64 `json:"score,omitempty"` +} + +// ErrorRecord is +type ErrorRecord struct { + ID *string `json:"id,omitempty"` + Message *string `json:"message,omitempty"` +} + +// ErrorResponse is +type ErrorResponse struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + Target *string `json:"target,omitempty"` + InnerError *InternalError `json:"innerError,omitempty"` +} + +// Input is +type Input struct { + ID *string `json:"id,omitempty"` + Text *string `json:"text,omitempty"` +} + +// InternalError is +type InternalError struct { + Code *string `json:"code,omitempty"` + Message *string `json:"message,omitempty"` + InnerError *InternalError `json:"innerError,omitempty"` +} + +// KeyPhraseBatchResult is +type KeyPhraseBatchResult struct { + autorest.Response `json:"-"` + Documents *[]KeyPhraseBatchResultItem `json:"documents,omitempty"` + Errors *[]ErrorRecord `json:"errors,omitempty"` +} + +// KeyPhraseBatchResultItem is +type KeyPhraseBatchResultItem struct { + KeyPhrases *[]string `json:"keyPhrases,omitempty"` + ID *string `json:"id,omitempty"` +} + +// LanguageBatchResult is +type LanguageBatchResult struct { + autorest.Response `json:"-"` + Documents *[]LanguageBatchResultItem `json:"documents,omitempty"` + Errors *[]ErrorRecord `json:"errors,omitempty"` +} + +// LanguageBatchResultItem is +type LanguageBatchResultItem struct { + ID *string `json:"id,omitempty"` + DetectedLanguages *[]DetectedLanguage `json:"detectedLanguages,omitempty"` +} + +// MultiLanguageBatchInput is +type MultiLanguageBatchInput struct { + Documents *[]MultiLanguageInput `json:"documents,omitempty"` +} + +// MultiLanguageInput is +type MultiLanguageInput struct { + Language *string `json:"language,omitempty"` + ID *string `json:"id,omitempty"` + Text *string `json:"text,omitempty"` +} + +// SentimentBatchResult is +type SentimentBatchResult struct { + autorest.Response `json:"-"` + Documents *[]SentimentBatchResultItem `json:"documents,omitempty"` + Errors *[]ErrorRecord `json:"errors,omitempty"` +} + +// SentimentBatchResultItem is +type SentimentBatchResultItem struct { + Score *float64 `json:"score,omitempty"` + ID *string `json:"id,omitempty"` +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/version.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/version.go new file mode 100644 index 000000000..3f50c6645 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/cognitiveservices/textanalytics/version.go @@ -0,0 +1,28 @@ +package textanalytics + +// Copyright (c) Microsoft and contributors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +// UserAgent returns the UserAgent string to use when sending http.Requests. +func UserAgent() string { + return "Azure-SDK-For-Go/v11.0.0-beta arm-textanalytics/v2.0" +} + +// Version returns the semantic version (see http://semver.org) of the client. +func Version() string { + return "v11.0.0-beta" +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/client.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/client.go index c20b4e4c8..00eafa074 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/client.go @@ -1,8 +1,6 @@ -// Package keyvault implements the Azure ARM Keyvault service API version -// 2016-10-01. +// Package keyvault implements the Azure ARM Keyvault service API version 2016-10-01. // -// The key vault client performs cryptographic key operations and vault -// operations against the Key Vault service. +// The key vault client performs cryptographic key operations and vault operations against the Key Vault service. package keyvault // Copyright (c) Microsoft and contributors. All rights reserved. @@ -19,9 +17,8 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -49,22 +46,17 @@ func NewWithoutDefaults() ManagementClient { } } -// BackupKey the Key Backup operation exports a key from Azure Key Vault in a -// protected form. Note that this operation does NOT return key material in a -// form that can be used outside the Azure Key Vault system, the returned key -// material is either protected to a Azure Key Vault HSM or to Azure Key Vault -// itself. The intent of this operation is to allow a client to GENERATE a key -// in one Azure Key Vault instance, BACKUP the key, and then RESTORE it into -// another Azure Key Vault instance. The BACKUP operation may be used to -// export, in protected form, any key type from Azure Key Vault. Individual -// versions of a key cannot be backed up. BACKUP / RESTORE can be performed -// within geographical boundaries only; meaning that a BACKUP from one -// geographical area cannot be restored to another geographical area. For -// example, a backup from the US geographical area cannot be restored in an EU -// geographical area. +// BackupKey the Key Backup operation exports a key from Azure Key Vault in a protected form. Note that this operation +// does NOT return key material in a form that can be used outside the Azure Key Vault system, the returned key +// material is either protected to a Azure Key Vault HSM or to Azure Key Vault itself. The intent of this operation is +// to allow a client to GENERATE a key in one Azure Key Vault instance, BACKUP the key, and then RESTORE it into +// another Azure Key Vault instance. The BACKUP operation may be used to export, in protected form, any key type from +// Azure Key Vault. Individual versions of a key cannot be backed up. BACKUP / RESTORE can be performed within +// geographical boundaries only; meaning that a BACKUP from one geographical area cannot be restored to another +// geographical area. For example, a backup from the US geographical area cannot be restored in an EU geographical +// area. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. func (client ManagementClient) BackupKey(vaultBaseURL string, keyName string) (result BackupKeyResult, err error) { req, err := client.BackupKeyPreparer(vaultBaseURL, keyName) if err != nil { @@ -129,12 +121,78 @@ func (client ManagementClient) BackupKeyResponder(resp *http.Response) (result B return } -// CreateCertificate if this is the first version, the certificate resource is -// created. +// BackupSecret requests that a backup of the specified secret be downloaded to the client. Authorization: requires the +// secrets/backup permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. parameters is the parameters -// to create a certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret. +func (client ManagementClient) BackupSecret(vaultBaseURL string, secretName string) (result BackupSecretResult, err error) { + req, err := client.BackupSecretPreparer(vaultBaseURL, secretName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "BackupSecret", nil, "Failure preparing request") + return + } + + resp, err := client.BackupSecretSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "BackupSecret", resp, "Failure sending request") + return + } + + result, err = client.BackupSecretResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "BackupSecret", resp, "Failure responding to request") + } + + return +} + +// BackupSecretPreparer prepares the BackupSecret request. +func (client ManagementClient) BackupSecretPreparer(vaultBaseURL string, secretName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "secret-name": autorest.Encode("path", secretName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/secrets/{secret-name}/backup", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// BackupSecretSender sends the BackupSecret request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) BackupSecretSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// BackupSecretResponder handles the response to the BackupSecret request. The method always +// closes the http.Response Body. +func (client ManagementClient) BackupSecretResponder(resp *http.Response) (result BackupSecretResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// CreateCertificate if this is the first version, the certificate resource is created. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. parameters is the parameters to create a certificate. func (client ManagementClient) CreateCertificate(vaultBaseURL string, certificateName string, parameters CertificateCreateParameters) (result CertificateOperation, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: certificateName, @@ -214,13 +272,11 @@ func (client ManagementClient) CreateCertificateResponder(resp *http.Response) ( return } -// CreateKey the create key operation can be used to create any key type in -// Azure Key Vault. If the named key already exists, Azure Key Vault creates a -// new version of the key. +// CreateKey the create key operation can be used to create any key type in Azure Key Vault. If the named key already +// exists, Azure Key Vault creates a new version of the key. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name for the new key. The system will generate the version -// name for the new key. parameters is the parameters to create a key. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name for the new key. +// The system will generate the version name for the new key. parameters is the parameters to create a key. func (client ManagementClient) CreateKey(vaultBaseURL string, keyName string, parameters KeyCreateParameters) (result KeyBundle, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: keyName, @@ -293,17 +349,13 @@ func (client ManagementClient) CreateKeyResponder(resp *http.Response) (result K return } -// Decrypt the DECRYPT operation decrypts a well-formed block of ciphertext -// using the target encryption key and specified algorithm. This operation is -// the reverse of the ENCRYPT operation; only a single block of data may be -// decrypted, the size of this block is dependent on the target key and the -// algorithm to be used. The DECRYPT operation applies to asymmetric and -// symmetric keys stored in Azure Key Vault since it uses the private portion -// of the key. +// Decrypt the DECRYPT operation decrypts a well-formed block of ciphertext using the target encryption key and +// specified algorithm. This operation is the reverse of the ENCRYPT operation; only a single block of data may be +// decrypted, the size of this block is dependent on the target key and the algorithm to be used. The DECRYPT operation +// applies to asymmetric and symmetric keys stored in Azure Key Vault since it uses the private portion of the key. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. keyVersion is the version of the key. -// parameters is the parameters for the decryption operation. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. +// keyVersion is the version of the key. parameters is the parameters for the decryption operation. func (client ManagementClient) Decrypt(vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -377,13 +429,12 @@ func (client ManagementClient) DecryptResponder(resp *http.Response) (result Key return } -// DeleteCertificate deletes all versions of a certificate object along with -// its associated policy. Delete certificate cannot be used to remove -// individual versions of a certificate object. +// DeleteCertificate deletes all versions of a certificate object along with its associated policy. Delete certificate +// cannot be used to remove individual versions of a certificate object. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. -func (client ManagementClient) DeleteCertificate(vaultBaseURL string, certificateName string) (result CertificateBundle, err error) { +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. +func (client ManagementClient) DeleteCertificate(vaultBaseURL string, certificateName string) (result DeletedCertificateBundle, err error) { req, err := client.DeleteCertificatePreparer(vaultBaseURL, certificateName) if err != nil { err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteCertificate", nil, "Failure preparing request") @@ -436,7 +487,7 @@ func (client ManagementClient) DeleteCertificateSender(req *http.Request) (*http // DeleteCertificateResponder handles the response to the DeleteCertificate request. The method always // closes the http.Response Body. -func (client ManagementClient) DeleteCertificateResponder(resp *http.Response) (result CertificateBundle, err error) { +func (client ManagementClient) DeleteCertificateResponder(resp *http.Response) (result DeletedCertificateBundle, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -447,7 +498,8 @@ func (client ManagementClient) DeleteCertificateResponder(resp *http.Response) ( return } -// DeleteCertificateContacts +// DeleteCertificateContacts deletes the certificate contacts for a specified key vault certificate. Authorization: +// requires the certificates/managecontacts permission. // // vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. func (client ManagementClient) DeleteCertificateContacts(vaultBaseURL string) (result Contacts, err error) { @@ -510,10 +562,10 @@ func (client ManagementClient) DeleteCertificateContactsResponder(resp *http.Res return } -// DeleteCertificateIssuer +// DeleteCertificateIssuer the DeleteCertificateIssuer operation permanently removes the specified certificate issuer +// from the vault. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// issuerName is the name of the issuer. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. issuerName is the name of the issuer. func (client ManagementClient) DeleteCertificateIssuer(vaultBaseURL string, issuerName string) (result IssuerBundle, err error) { req, err := client.DeleteCertificateIssuerPreparer(vaultBaseURL, issuerName) if err != nil { @@ -578,10 +630,11 @@ func (client ManagementClient) DeleteCertificateIssuerResponder(resp *http.Respo return } -// DeleteCertificateOperation +// DeleteCertificateOperation deletes the operation for a specified certificate. Authorization: requires the +// certificates/update permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. func (client ManagementClient) DeleteCertificateOperation(vaultBaseURL string, certificateName string) (result CertificateOperation, err error) { req, err := client.DeleteCertificateOperationPreparer(vaultBaseURL, certificateName) if err != nil { @@ -646,14 +699,13 @@ func (client ManagementClient) DeleteCertificateOperationResponder(resp *http.Re return } -// DeleteKey the delete key operation cannot be used to remove individual -// versions of a key. This operation removes the cryptographic material -// associated with the key, which means the key is not usable for Sign/Verify, -// Wrap/Unwrap or Encrypt/Decrypt operations. +// DeleteKey the delete key operation cannot be used to remove individual versions of a key. This operation removes the +// cryptographic material associated with the key, which means the key is not usable for Sign/Verify, Wrap/Unwrap or +// Encrypt/Decrypt operations. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key to delete. -func (client ManagementClient) DeleteKey(vaultBaseURL string, keyName string) (result KeyBundle, err error) { +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key to +// delete. +func (client ManagementClient) DeleteKey(vaultBaseURL string, keyName string) (result DeletedKeyBundle, err error) { req, err := client.DeleteKeyPreparer(vaultBaseURL, keyName) if err != nil { err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteKey", nil, "Failure preparing request") @@ -706,7 +758,7 @@ func (client ManagementClient) DeleteKeySender(req *http.Request) (*http.Respons // DeleteKeyResponder handles the response to the DeleteKey request. The method always // closes the http.Response Body. -func (client ManagementClient) DeleteKeyResponder(resp *http.Response) (result KeyBundle, err error) { +func (client ManagementClient) DeleteKeyResponder(resp *http.Response) (result DeletedKeyBundle, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -717,12 +769,88 @@ func (client ManagementClient) DeleteKeyResponder(resp *http.Response) (result K return } -// DeleteSecret the DELETE operation applies to any secret stored in Azure Key -// Vault. DELETE cannot be applied to an individual version of a secret. +// DeleteSasDefinition deletes a SAS definition from a specified storage account. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// secretName is the name of the secret. -func (client ManagementClient) DeleteSecret(vaultBaseURL string, secretName string) (result SecretBundle, err error) { +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. sasDefinitionName is the name of the SAS definition. +func (client ManagementClient) DeleteSasDefinition(vaultBaseURL string, storageAccountName string, sasDefinitionName string) (result SasDefinitionBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: sasDefinitionName, + Constraints: []validation.Constraint{{Target: "sasDefinitionName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "DeleteSasDefinition") + } + + req, err := client.DeleteSasDefinitionPreparer(vaultBaseURL, storageAccountName, sasDefinitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteSasDefinition", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteSasDefinitionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteSasDefinition", resp, "Failure sending request") + return + } + + result, err = client.DeleteSasDefinitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteSasDefinition", resp, "Failure responding to request") + } + + return +} + +// DeleteSasDefinitionPreparer prepares the DeleteSasDefinition request. +func (client ManagementClient) DeleteSasDefinitionPreparer(vaultBaseURL string, storageAccountName string, sasDefinitionName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "sas-definition-name": autorest.Encode("path", sasDefinitionName), + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}/sas/{sas-definition-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteSasDefinitionSender sends the DeleteSasDefinition request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) DeleteSasDefinitionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteSasDefinitionResponder handles the response to the DeleteSasDefinition request. The method always +// closes the http.Response Body. +func (client ManagementClient) DeleteSasDefinitionResponder(resp *http.Response) (result SasDefinitionBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// DeleteSecret the DELETE operation applies to any secret stored in Azure Key Vault. DELETE cannot be applied to an +// individual version of a secret. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret. +func (client ManagementClient) DeleteSecret(vaultBaseURL string, secretName string) (result DeletedSecretBundle, err error) { req, err := client.DeleteSecretPreparer(vaultBaseURL, secretName) if err != nil { err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteSecret", nil, "Failure preparing request") @@ -775,7 +903,7 @@ func (client ManagementClient) DeleteSecretSender(req *http.Request) (*http.Resp // DeleteSecretResponder handles the response to the DeleteSecret request. The method always // closes the http.Response Body. -func (client ManagementClient) DeleteSecretResponder(resp *http.Response) (result SecretBundle, err error) { +func (client ManagementClient) DeleteSecretResponder(resp *http.Response) (result DeletedSecretBundle, err error) { err = autorest.Respond( resp, client.ByInspecting(), @@ -786,19 +914,89 @@ func (client ManagementClient) DeleteSecretResponder(resp *http.Response) (resul return } -// Encrypt the ENCRYPT operation encrypts an arbitrary sequence of bytes using -// an encryption key that is stored in Azure Key Vault. Note that the ENCRYPT -// operation only supports a single block of data, the size of which is -// dependent on the target key and the encryption algorithm to be used. The -// ENCRYPT operation is only strictly necessary for symmetric keys stored in -// Azure Key Vault since protection with an asymmetric key can be performed -// using public portion of the key. This operation is supported for asymmetric -// keys as a convenience for callers that have a key-reference but do not have -// access to the public key material. +// DeleteStorageAccount deletes a storage account. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. keyVersion is the version of the key. -// parameters is the parameters for the encryption operation. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. +func (client ManagementClient) DeleteStorageAccount(vaultBaseURL string, storageAccountName string) (result StorageBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "DeleteStorageAccount") + } + + req, err := client.DeleteStorageAccountPreparer(vaultBaseURL, storageAccountName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteStorageAccount", nil, "Failure preparing request") + return + } + + resp, err := client.DeleteStorageAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteStorageAccount", resp, "Failure sending request") + return + } + + result, err = client.DeleteStorageAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "DeleteStorageAccount", resp, "Failure responding to request") + } + + return +} + +// DeleteStorageAccountPreparer prepares the DeleteStorageAccount request. +func (client ManagementClient) DeleteStorageAccountPreparer(vaultBaseURL string, storageAccountName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// DeleteStorageAccountSender sends the DeleteStorageAccount request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) DeleteStorageAccountSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// DeleteStorageAccountResponder handles the response to the DeleteStorageAccount request. The method always +// closes the http.Response Body. +func (client ManagementClient) DeleteStorageAccountResponder(resp *http.Response) (result StorageBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Encrypt the ENCRYPT operation encrypts an arbitrary sequence of bytes using an encryption key that is stored in +// Azure Key Vault. Note that the ENCRYPT operation only supports a single block of data, the size of which is +// dependent on the target key and the encryption algorithm to be used. The ENCRYPT operation is only strictly +// necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed +// using public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that +// have a key-reference but do not have access to the public key material. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. +// keyVersion is the version of the key. parameters is the parameters for the encryption operation. func (client ManagementClient) Encrypt(vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -872,12 +1070,11 @@ func (client ManagementClient) EncryptResponder(resp *http.Response) (result Key return } -// GetCertificate the GetCertificate operation returns information about a -// specific certificate in the specified key vault +// GetCertificate gets information about a specified certificate. Authorization: requires the certificates/get +// permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate in the given vault. -// certificateVersion is the version of the certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate in the given vault. certificateVersion is the version of the certificate. func (client ManagementClient) GetCertificate(vaultBaseURL string, certificateName string, certificateVersion string) (result CertificateBundle, err error) { req, err := client.GetCertificatePreparer(vaultBaseURL, certificateName, certificateVersion) if err != nil { @@ -943,8 +1140,8 @@ func (client ManagementClient) GetCertificateResponder(resp *http.Response) (res return } -// GetCertificateContacts the GetCertificateContacts operation returns the set -// of certificate contact resources in the specified key vault. +// GetCertificateContacts the GetCertificateContacts operation returns the set of certificate contact resources in the +// specified key vault. // // vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. func (client ManagementClient) GetCertificateContacts(vaultBaseURL string) (result Contacts, err error) { @@ -1007,11 +1204,10 @@ func (client ManagementClient) GetCertificateContactsResponder(resp *http.Respon return } -// GetCertificateIssuer the GetCertificateIssuer operation returns the -// specified certificate issuer resources in the specified key vault +// GetCertificateIssuer the GetCertificateIssuer operation returns the specified certificate issuer resources in the +// specified key vault // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// issuerName is the name of the issuer. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. issuerName is the name of the issuer. func (client ManagementClient) GetCertificateIssuer(vaultBaseURL string, issuerName string) (result IssuerBundle, err error) { req, err := client.GetCertificateIssuerPreparer(vaultBaseURL, issuerName) if err != nil { @@ -1076,12 +1272,11 @@ func (client ManagementClient) GetCertificateIssuerResponder(resp *http.Response return } -// GetCertificateIssuers the GetCertificateIssuers operation returns the set of -// certificate issuer resources in the specified key vault +// GetCertificateIssuers the GetCertificateIssuers operation returns the set of certificate issuer resources in the +// specified key vault // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// maxresults is maximum number of results to return in a page. If not -// specified the service will return up to 25 results. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. func (client ManagementClient) GetCertificateIssuers(vaultBaseURL string, maxresults *int32) (result CertificateIssuerListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, @@ -1178,11 +1373,56 @@ func (client ManagementClient) GetCertificateIssuersNextResults(lastResults Cert return } -// GetCertificateOperation the GetCertificateOperation operation returns the -// certificate operation associated with the certificate. +// GetCertificateIssuersComplete gets all elements from the list without paging. +func (client ManagementClient) GetCertificateIssuersComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan CertificateIssuerItem, <-chan error) { + resultChan := make(chan CertificateIssuerItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetCertificateIssuers(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetCertificateIssuersNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetCertificateOperation gets the operation associated with a specified certificate. Authorization: requires the +// certificates/get permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. func (client ManagementClient) GetCertificateOperation(vaultBaseURL string, certificateName string) (result CertificateOperation, err error) { req, err := client.GetCertificateOperationPreparer(vaultBaseURL, certificateName) if err != nil { @@ -1247,11 +1487,11 @@ func (client ManagementClient) GetCertificateOperationResponder(resp *http.Respo return } -// GetCertificatePolicy the GetCertificatePolicy operation returns the -// specified certificate policy resources in the specified key vault +// GetCertificatePolicy the GetCertificatePolicy operation returns the specified certificate policy resources in the +// specified key vault // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate in a given key vault. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate in a given key vault. func (client ManagementClient) GetCertificatePolicy(vaultBaseURL string, certificateName string) (result CertificatePolicy, err error) { req, err := client.GetCertificatePolicyPreparer(vaultBaseURL, certificateName) if err != nil { @@ -1316,12 +1556,10 @@ func (client ManagementClient) GetCertificatePolicyResponder(resp *http.Response return } -// GetCertificates the GetCertificates operation returns the set of -// certificates resources in the specified key vault. +// GetCertificates the GetCertificates operation returns the set of certificates resources in the specified key vault. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// maxresults is maximum number of results to return in a page. If not -// specified the service will return up to 25 results. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. func (client ManagementClient) GetCertificates(vaultBaseURL string, maxresults *int32) (result CertificateListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, @@ -1418,13 +1656,57 @@ func (client ManagementClient) GetCertificatesNextResults(lastResults Certificat return } -// GetCertificateVersions the GetCertificateVersions operation returns the -// versions of a certificate in the specified key vault +// GetCertificatesComplete gets all elements from the list without paging. +func (client ManagementClient) GetCertificatesComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan CertificateItem, <-chan error) { + resultChan := make(chan CertificateItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetCertificates(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetCertificatesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetCertificateVersions the GetCertificateVersions operation returns the versions of a certificate in the specified +// key vault // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. maxresults is maximum number -// of results to return in a page. If not specified the service will return up -// to 25 results. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. maxresults is maximum number of results to return in a page. If not specified the service will return +// up to 25 results. func (client ManagementClient) GetCertificateVersions(vaultBaseURL string, certificateName string, maxresults *int32) (result CertificateListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, @@ -1525,13 +1807,697 @@ func (client ManagementClient) GetCertificateVersionsNextResults(lastResults Cer return } -// GetKey the get key operation is applicable to all key types. If the -// requested key is symmetric, then no key material is released in the -// response. +// GetCertificateVersionsComplete gets all elements from the list without paging. +func (client ManagementClient) GetCertificateVersionsComplete(vaultBaseURL string, certificateName string, maxresults *int32, cancel <-chan struct{}) (<-chan CertificateItem, <-chan error) { + resultChan := make(chan CertificateItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetCertificateVersions(vaultBaseURL, certificateName, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetCertificateVersionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetDeletedCertificate the GetDeletedCertificate operation retrieves the deleted certificate information plus its +// attributes, such as retention interval, scheduled permanent deletion and the current deletion recovery level. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key to get. keyVersion is adding the version -// parameter retrieves a specific version of a key. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate +func (client ManagementClient) GetDeletedCertificate(vaultBaseURL string, certificateName string) (result DeletedCertificateBundle, err error) { + req, err := client.GetDeletedCertificatePreparer(vaultBaseURL, certificateName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificate", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeletedCertificateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificate", resp, "Failure sending request") + return + } + + result, err = client.GetDeletedCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificate", resp, "Failure responding to request") + } + + return +} + +// GetDeletedCertificatePreparer prepares the GetDeletedCertificate request. +func (client ManagementClient) GetDeletedCertificatePreparer(vaultBaseURL string, certificateName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "certificate-name": autorest.Encode("path", certificateName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedcertificates/{certificate-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDeletedCertificateSender sends the GetDeletedCertificate request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetDeletedCertificateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDeletedCertificateResponder handles the response to the GetDeletedCertificate request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetDeletedCertificateResponder(resp *http.Response) (result DeletedCertificateBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeletedCertificates the GetDeletedCertificates operation retrieves the certificates in the current vault which +// are in a deleted state and ready for recovery or purging. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. +func (client ManagementClient) GetDeletedCertificates(vaultBaseURL string, maxresults *int32) (result DeletedCertificateListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxresults, + Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "GetDeletedCertificates") + } + + req, err := client.GetDeletedCertificatesPreparer(vaultBaseURL, maxresults) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificates", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeletedCertificatesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificates", resp, "Failure sending request") + return + } + + result, err = client.GetDeletedCertificatesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificates", resp, "Failure responding to request") + } + + return +} + +// GetDeletedCertificatesPreparer prepares the GetDeletedCertificates request. +func (client ManagementClient) GetDeletedCertificatesPreparer(vaultBaseURL string, maxresults *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if maxresults != nil { + queryParameters["maxresults"] = autorest.Encode("query", *maxresults) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPath("/deletedcertificates"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDeletedCertificatesSender sends the GetDeletedCertificates request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetDeletedCertificatesSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDeletedCertificatesResponder handles the response to the GetDeletedCertificates request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetDeletedCertificatesResponder(resp *http.Response) (result DeletedCertificateListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeletedCertificatesNextResults retrieves the next set of results, if any. +func (client ManagementClient) GetDeletedCertificatesNextResults(lastResults DeletedCertificateListResult) (result DeletedCertificateListResult, err error) { + req, err := lastResults.DeletedCertificateListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificates", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.GetDeletedCertificatesSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificates", resp, "Failure sending next results request") + } + + result, err = client.GetDeletedCertificatesResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedCertificates", resp, "Failure responding to next results request") + } + + return +} + +// GetDeletedCertificatesComplete gets all elements from the list without paging. +func (client ManagementClient) GetDeletedCertificatesComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan DeletedCertificateItem, <-chan error) { + resultChan := make(chan DeletedCertificateItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetDeletedCertificates(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetDeletedCertificatesNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetDeletedKey retrieves the deleted key information plus its attributes. Authorization: Requires the keys/get +// permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key +func (client ManagementClient) GetDeletedKey(vaultBaseURL string, keyName string) (result DeletedKeyBundle, err error) { + req, err := client.GetDeletedKeyPreparer(vaultBaseURL, keyName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKey", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeletedKeySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKey", resp, "Failure sending request") + return + } + + result, err = client.GetDeletedKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKey", resp, "Failure responding to request") + } + + return +} + +// GetDeletedKeyPreparer prepares the GetDeletedKey request. +func (client ManagementClient) GetDeletedKeyPreparer(vaultBaseURL string, keyName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "key-name": autorest.Encode("path", keyName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedkeys/{key-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDeletedKeySender sends the GetDeletedKey request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetDeletedKeySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDeletedKeyResponder handles the response to the GetDeletedKey request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetDeletedKeyResponder(resp *http.Response) (result DeletedKeyBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeletedKeys list deleted keys in the specified vault. Authorization: Requires the keys/list permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. +func (client ManagementClient) GetDeletedKeys(vaultBaseURL string, maxresults *int32) (result DeletedKeyListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxresults, + Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "GetDeletedKeys") + } + + req, err := client.GetDeletedKeysPreparer(vaultBaseURL, maxresults) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKeys", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeletedKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKeys", resp, "Failure sending request") + return + } + + result, err = client.GetDeletedKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKeys", resp, "Failure responding to request") + } + + return +} + +// GetDeletedKeysPreparer prepares the GetDeletedKeys request. +func (client ManagementClient) GetDeletedKeysPreparer(vaultBaseURL string, maxresults *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if maxresults != nil { + queryParameters["maxresults"] = autorest.Encode("query", *maxresults) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPath("/deletedkeys"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDeletedKeysSender sends the GetDeletedKeys request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetDeletedKeysSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDeletedKeysResponder handles the response to the GetDeletedKeys request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetDeletedKeysResponder(resp *http.Response) (result DeletedKeyListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeletedKeysNextResults retrieves the next set of results, if any. +func (client ManagementClient) GetDeletedKeysNextResults(lastResults DeletedKeyListResult) (result DeletedKeyListResult, err error) { + req, err := lastResults.DeletedKeyListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKeys", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.GetDeletedKeysSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKeys", resp, "Failure sending next results request") + } + + result, err = client.GetDeletedKeysResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedKeys", resp, "Failure responding to next results request") + } + + return +} + +// GetDeletedKeysComplete gets all elements from the list without paging. +func (client ManagementClient) GetDeletedKeysComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan DeletedKeyItem, <-chan error) { + resultChan := make(chan DeletedKeyItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetDeletedKeys(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetDeletedKeysNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetDeletedSecret retrieves the deleted secret information plus its attributes. Authorization: requires the +// secrets/get permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret +func (client ManagementClient) GetDeletedSecret(vaultBaseURL string, secretName string) (result DeletedSecretBundle, err error) { + req, err := client.GetDeletedSecretPreparer(vaultBaseURL, secretName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecret", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeletedSecretSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecret", resp, "Failure sending request") + return + } + + result, err = client.GetDeletedSecretResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecret", resp, "Failure responding to request") + } + + return +} + +// GetDeletedSecretPreparer prepares the GetDeletedSecret request. +func (client ManagementClient) GetDeletedSecretPreparer(vaultBaseURL string, secretName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "secret-name": autorest.Encode("path", secretName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedsecrets/{secret-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDeletedSecretSender sends the GetDeletedSecret request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetDeletedSecretSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDeletedSecretResponder handles the response to the GetDeletedSecret request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetDeletedSecretResponder(resp *http.Response) (result DeletedSecretBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeletedSecrets list deleted secrets in the specified vault. Authorization: requires the secrets/list permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. +func (client ManagementClient) GetDeletedSecrets(vaultBaseURL string, maxresults *int32) (result DeletedSecretListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxresults, + Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "GetDeletedSecrets") + } + + req, err := client.GetDeletedSecretsPreparer(vaultBaseURL, maxresults) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecrets", nil, "Failure preparing request") + return + } + + resp, err := client.GetDeletedSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecrets", resp, "Failure sending request") + return + } + + result, err = client.GetDeletedSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecrets", resp, "Failure responding to request") + } + + return +} + +// GetDeletedSecretsPreparer prepares the GetDeletedSecrets request. +func (client ManagementClient) GetDeletedSecretsPreparer(vaultBaseURL string, maxresults *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if maxresults != nil { + queryParameters["maxresults"] = autorest.Encode("query", *maxresults) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPath("/deletedsecrets"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetDeletedSecretsSender sends the GetDeletedSecrets request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetDeletedSecretsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetDeletedSecretsResponder handles the response to the GetDeletedSecrets request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetDeletedSecretsResponder(resp *http.Response) (result DeletedSecretListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetDeletedSecretsNextResults retrieves the next set of results, if any. +func (client ManagementClient) GetDeletedSecretsNextResults(lastResults DeletedSecretListResult) (result DeletedSecretListResult, err error) { + req, err := lastResults.DeletedSecretListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecrets", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.GetDeletedSecretsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecrets", resp, "Failure sending next results request") + } + + result, err = client.GetDeletedSecretsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetDeletedSecrets", resp, "Failure responding to next results request") + } + + return +} + +// GetDeletedSecretsComplete gets all elements from the list without paging. +func (client ManagementClient) GetDeletedSecretsComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan DeletedSecretItem, <-chan error) { + resultChan := make(chan DeletedSecretItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetDeletedSecrets(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetDeletedSecretsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetKey the get key operation is applicable to all key types. If the requested key is symmetric, then no key material +// is released in the response. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key to get. +// keyVersion is adding the version parameter retrieves a specific version of a key. func (client ManagementClient) GetKey(vaultBaseURL string, keyName string, keyVersion string) (result KeyBundle, err error) { req, err := client.GetKeyPreparer(vaultBaseURL, keyName, keyVersion) if err != nil { @@ -1597,16 +2563,13 @@ func (client ManagementClient) GetKeyResponder(resp *http.Response) (result KeyB return } -// GetKeys retrieves a list of the keys in the Key Vault as JSON Web Key -// structures that contain the public part of a stored key. The LIST operation -// is applicable to all key types, however only the base key -// identifier,attributes, and tags are provided in the response. Individual -// versions of a key are not listed in the response. Authorization: Requires -// the keys/list permission. +// GetKeys retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a +// stored key. The LIST operation is applicable to all key types, however only the base key identifier,attributes, and +// tags are provided in the response. Individual versions of a key are not listed in the response. Authorization: +// Requires the keys/list permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// maxresults is maximum number of results to return in a page. If not -// specified the service will return up to 25 results. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. func (client ManagementClient) GetKeys(vaultBaseURL string, maxresults *int32) (result KeyListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, @@ -1703,12 +2666,56 @@ func (client ManagementClient) GetKeysNextResults(lastResults KeyListResult) (re return } -// GetKeyVersions the full key identifier, attributes, and tags are provided in -// the response. +// GetKeysComplete gets all elements from the list without paging. +func (client ManagementClient) GetKeysComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan KeyItem, <-chan error) { + resultChan := make(chan KeyItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetKeys(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetKeysNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetKeyVersions the full key identifier, attributes, and tags are provided in the response. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. maxresults is maximum number of results to -// return in a page. If not specified the service will return up to 25 results. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. +// maxresults is maximum number of results to return in a page. If not specified the service will return up to 25 +// results. func (client ManagementClient) GetKeyVersions(vaultBaseURL string, keyName string, maxresults *int32) (result KeyListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, @@ -1809,12 +2816,284 @@ func (client ManagementClient) GetKeyVersionsNextResults(lastResults KeyListResu return } -// GetSecret the GET operation is applicable to any secret stored in Azure Key -// Vault. +// GetKeyVersionsComplete gets all elements from the list without paging. +func (client ManagementClient) GetKeyVersionsComplete(vaultBaseURL string, keyName string, maxresults *int32, cancel <-chan struct{}) (<-chan KeyItem, <-chan error) { + resultChan := make(chan KeyItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetKeyVersions(vaultBaseURL, keyName, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetKeyVersionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetSasDefinition gets information about a SAS definition for the specified storage account. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// secretName is the name of the secret. secretVersion is the version of the -// secret. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. sasDefinitionName is the name of the SAS definition. +func (client ManagementClient) GetSasDefinition(vaultBaseURL string, storageAccountName string, sasDefinitionName string) (result SasDefinitionBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: sasDefinitionName, + Constraints: []validation.Constraint{{Target: "sasDefinitionName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "GetSasDefinition") + } + + req, err := client.GetSasDefinitionPreparer(vaultBaseURL, storageAccountName, sasDefinitionName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinition", nil, "Failure preparing request") + return + } + + resp, err := client.GetSasDefinitionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinition", resp, "Failure sending request") + return + } + + result, err = client.GetSasDefinitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinition", resp, "Failure responding to request") + } + + return +} + +// GetSasDefinitionPreparer prepares the GetSasDefinition request. +func (client ManagementClient) GetSasDefinitionPreparer(vaultBaseURL string, storageAccountName string, sasDefinitionName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "sas-definition-name": autorest.Encode("path", sasDefinitionName), + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}/sas/{sas-definition-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSasDefinitionSender sends the GetSasDefinition request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetSasDefinitionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetSasDefinitionResponder handles the response to the GetSasDefinition request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetSasDefinitionResponder(resp *http.Response) (result SasDefinitionBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSasDefinitions list storage SAS definitions for the given storage account. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. maxresults is maximum number of results to return in a page. If not specified the service will +// return up to 25 results. +func (client ManagementClient) GetSasDefinitions(vaultBaseURL string, storageAccountName string, maxresults *int32) (result SasDefinitionListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: maxresults, + Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "GetSasDefinitions") + } + + req, err := client.GetSasDefinitionsPreparer(vaultBaseURL, storageAccountName, maxresults) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinitions", nil, "Failure preparing request") + return + } + + resp, err := client.GetSasDefinitionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinitions", resp, "Failure sending request") + return + } + + result, err = client.GetSasDefinitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinitions", resp, "Failure responding to request") + } + + return +} + +// GetSasDefinitionsPreparer prepares the GetSasDefinitions request. +func (client ManagementClient) GetSasDefinitionsPreparer(vaultBaseURL string, storageAccountName string, maxresults *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if maxresults != nil { + queryParameters["maxresults"] = autorest.Encode("query", *maxresults) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}/sas", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetSasDefinitionsSender sends the GetSasDefinitions request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetSasDefinitionsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetSasDefinitionsResponder handles the response to the GetSasDefinitions request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetSasDefinitionsResponder(resp *http.Response) (result SasDefinitionListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetSasDefinitionsNextResults retrieves the next set of results, if any. +func (client ManagementClient) GetSasDefinitionsNextResults(lastResults SasDefinitionListResult) (result SasDefinitionListResult, err error) { + req, err := lastResults.SasDefinitionListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinitions", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.GetSasDefinitionsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinitions", resp, "Failure sending next results request") + } + + result, err = client.GetSasDefinitionsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetSasDefinitions", resp, "Failure responding to next results request") + } + + return +} + +// GetSasDefinitionsComplete gets all elements from the list without paging. +func (client ManagementClient) GetSasDefinitionsComplete(vaultBaseURL string, storageAccountName string, maxresults *int32, cancel <-chan struct{}) (<-chan SasDefinitionItem, <-chan error) { + resultChan := make(chan SasDefinitionItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetSasDefinitions(vaultBaseURL, storageAccountName, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetSasDefinitionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetSecret the GET operation is applicable to any secret stored in Azure Key Vault. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret. +// secretVersion is the version of the secret. func (client ManagementClient) GetSecret(vaultBaseURL string, secretName string, secretVersion string) (result SecretBundle, err error) { req, err := client.GetSecretPreparer(vaultBaseURL, secretName, secretVersion) if err != nil { @@ -1880,13 +3159,11 @@ func (client ManagementClient) GetSecretResponder(resp *http.Response) (result S return } -// GetSecrets the LIST operation is applicable to the entire vault, however -// only the base secret identifier and attributes are provided in the response. -// Individual secret versions are not listed in the response. +// GetSecrets the LIST operation is applicable to the entire vault, however only the base secret identifier and +// attributes are provided in the response. Individual secret versions are not listed in the response. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// maxresults is maximum number of results to return in a page. If not -// specified the service will return up to 25 results. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. func (client ManagementClient) GetSecrets(vaultBaseURL string, maxresults *int32) (result SecretListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, @@ -1983,15 +3260,58 @@ func (client ManagementClient) GetSecretsNextResults(lastResults SecretListResul return } -// GetSecretVersions the LIST VERSIONS operation can be applied to all versions -// having the same secret name in the same key vault. The full secret -// identifier and attributes are provided in the response. No values are -// returned for the secrets and only current versions of a secret are listed. +// GetSecretsComplete gets all elements from the list without paging. +func (client ManagementClient) GetSecretsComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan SecretItem, <-chan error) { + resultChan := make(chan SecretItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetSecrets(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetSecretsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetSecretVersions the LIST VERSIONS operation can be applied to all versions having the same secret name in the same +// key vault. The full secret identifier and attributes are provided in the response. No values are returned for the +// secrets and only current versions of a secret are listed. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// secretName is the name of the secret. maxresults is maximum number of -// results to return in a page. If not specified the service will return up to -// 25 results. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret. +// maxresults is maximum number of results to return in a page. If not specified the service will return up to 25 +// results. func (client ManagementClient) GetSecretVersions(vaultBaseURL string, secretName string, maxresults *int32) (result SecretListResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: maxresults, @@ -2092,14 +3412,276 @@ func (client ManagementClient) GetSecretVersionsNextResults(lastResults SecretLi return } -// ImportCertificate imports an existing valid certificate, containing a -// private key, into Azure Key Vault. The certificate to be imported can be in -// either PFX or PEM format. If the certificate is in PEM format the PEM file -// must contain the key as well as x509 certificates. +// GetSecretVersionsComplete gets all elements from the list without paging. +func (client ManagementClient) GetSecretVersionsComplete(vaultBaseURL string, secretName string, maxresults *int32, cancel <-chan struct{}) (<-chan SecretItem, <-chan error) { + resultChan := make(chan SecretItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetSecretVersions(vaultBaseURL, secretName, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetSecretVersionsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// GetStorageAccount gets information about a specified storage account. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. parameters is the parameters -// to import the certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. +func (client ManagementClient) GetStorageAccount(vaultBaseURL string, storageAccountName string) (result StorageBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "GetStorageAccount") + } + + req, err := client.GetStorageAccountPreparer(vaultBaseURL, storageAccountName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccount", nil, "Failure preparing request") + return + } + + resp, err := client.GetStorageAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccount", resp, "Failure sending request") + return + } + + result, err = client.GetStorageAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccount", resp, "Failure responding to request") + } + + return +} + +// GetStorageAccountPreparer prepares the GetStorageAccount request. +func (client ManagementClient) GetStorageAccountPreparer(vaultBaseURL string, storageAccountName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetStorageAccountSender sends the GetStorageAccount request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetStorageAccountSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetStorageAccountResponder handles the response to the GetStorageAccount request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetStorageAccountResponder(resp *http.Response) (result StorageBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetStorageAccounts list storage accounts managed by specified key vault +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. maxresults is maximum number of results +// to return in a page. If not specified the service will return up to 25 results. +func (client ManagementClient) GetStorageAccounts(vaultBaseURL string, maxresults *int32) (result StorageListResult, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: maxresults, + Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "maxresults", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil}, + {Target: "maxresults", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}, + }}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "GetStorageAccounts") + } + + req, err := client.GetStorageAccountsPreparer(vaultBaseURL, maxresults) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccounts", nil, "Failure preparing request") + return + } + + resp, err := client.GetStorageAccountsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccounts", resp, "Failure sending request") + return + } + + result, err = client.GetStorageAccountsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccounts", resp, "Failure responding to request") + } + + return +} + +// GetStorageAccountsPreparer prepares the GetStorageAccounts request. +func (client ManagementClient) GetStorageAccountsPreparer(vaultBaseURL string, maxresults *int32) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + if maxresults != nil { + queryParameters["maxresults"] = autorest.Encode("query", *maxresults) + } + + preparer := autorest.CreatePreparer( + autorest.AsGet(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPath("/storage"), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// GetStorageAccountsSender sends the GetStorageAccounts request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) GetStorageAccountsSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// GetStorageAccountsResponder handles the response to the GetStorageAccounts request. The method always +// closes the http.Response Body. +func (client ManagementClient) GetStorageAccountsResponder(resp *http.Response) (result StorageListResult, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// GetStorageAccountsNextResults retrieves the next set of results, if any. +func (client ManagementClient) GetStorageAccountsNextResults(lastResults StorageListResult) (result StorageListResult, err error) { + req, err := lastResults.StorageListResultPreparer() + if err != nil { + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccounts", nil, "Failure preparing next results request") + } + if req == nil { + return + } + + resp, err := client.GetStorageAccountsSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + return result, autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccounts", resp, "Failure sending next results request") + } + + result, err = client.GetStorageAccountsResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "GetStorageAccounts", resp, "Failure responding to next results request") + } + + return +} + +// GetStorageAccountsComplete gets all elements from the list without paging. +func (client ManagementClient) GetStorageAccountsComplete(vaultBaseURL string, maxresults *int32, cancel <-chan struct{}) (<-chan StorageAccountItem, <-chan error) { + resultChan := make(chan StorageAccountItem) + errChan := make(chan error, 1) + go func() { + defer func() { + close(resultChan) + close(errChan) + }() + list, err := client.GetStorageAccounts(vaultBaseURL, maxresults) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + for list.NextLink != nil { + list, err = client.GetStorageAccountsNextResults(list) + if err != nil { + errChan <- err + return + } + if list.Value != nil { + for _, item := range *list.Value { + select { + case <-cancel: + return + case resultChan <- item: + // Intentionally left blank + } + } + } + } + }() + return resultChan, errChan +} + +// ImportCertificate imports an existing valid certificate, containing a private key, into Azure Key Vault. The +// certificate to be imported can be in either PFX or PEM format. If the certificate is in PEM format the PEM file must +// contain the key as well as x509 certificates. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. parameters is the parameters to import the certificate. func (client ManagementClient) ImportCertificate(vaultBaseURL string, certificateName string, parameters CertificateImportParameters) (result CertificateBundle, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: certificateName, @@ -2180,13 +3762,11 @@ func (client ManagementClient) ImportCertificateResponder(resp *http.Response) ( return } -// ImportKey the import key operation may be used to import any key type into -// an Azure Key Vault. If the named key already exists, Azure Key Vault creates -// a new version of the key. +// ImportKey the import key operation may be used to import any key type into an Azure Key Vault. If the named key +// already exists, Azure Key Vault creates a new version of the key. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is name for the imported key. parameters is the parameters to import -// a key. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is name for the imported key. +// parameters is the parameters to import a key. func (client ManagementClient) ImportKey(vaultBaseURL string, keyName string, parameters KeyImportParameters) (result KeyBundle, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: keyName, @@ -2261,11 +3841,11 @@ func (client ManagementClient) ImportKeyResponder(resp *http.Response) (result K return } -// MergeCertificate +// MergeCertificate the MergeCertificate operation performs the merging of a certificate or certificate chain with a +// key pair currently available in the service. Authorization: requires the certificates/update permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. parameters is the parameters -// to merge certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. parameters is the parameters to merge certificate. func (client ManagementClient) MergeCertificate(vaultBaseURL string, certificateName string, parameters CertificateMergeParameters) (result CertificateBundle, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -2338,21 +3918,505 @@ func (client ManagementClient) MergeCertificateResponder(resp *http.Response) (r return } -// RestoreKey imports a previously backed up key into Azure Key Vault, -// restoring the key, its key identifier, attributes and access control -// policies. The RESTORE operation may be used to import a previously backed up -// key. Individual versions of a key cannot be restored. The key is restored in -// its entirety with the same key name as it had when it was backed up. If the -// key name is not available in the target Key Vault, the RESTORE operation -// will be rejected. While the key name is retained during restore, the final -// key identifier will change if the key is restored to a different vault. -// Restore will restore all versions and preserve version identifiers. The -// RESTORE operation is subject to security constraints: The target Key Vault -// must be owned by the same Microsoft Azure Subscription as the source Key -// Vault The user must have RESTORE permission in the target Key Vault. +// PurgeDeletedCertificate the PurgeDeletedCertificate operation performs an irreversible deletion of the specified +// certificate, without possibility for recovery. The operation is not available if the recovery level does not specify +// 'Purgeable'. Requires the explicit granting of the 'purge' permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// parameters is the parameters to restore the key. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate +func (client ManagementClient) PurgeDeletedCertificate(vaultBaseURL string, certificateName string) (result autorest.Response, err error) { + req, err := client.PurgeDeletedCertificatePreparer(vaultBaseURL, certificateName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedCertificate", nil, "Failure preparing request") + return + } + + resp, err := client.PurgeDeletedCertificateSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedCertificate", resp, "Failure sending request") + return + } + + result, err = client.PurgeDeletedCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedCertificate", resp, "Failure responding to request") + } + + return +} + +// PurgeDeletedCertificatePreparer prepares the PurgeDeletedCertificate request. +func (client ManagementClient) PurgeDeletedCertificatePreparer(vaultBaseURL string, certificateName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "certificate-name": autorest.Encode("path", certificateName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedcertificates/{certificate-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// PurgeDeletedCertificateSender sends the PurgeDeletedCertificate request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) PurgeDeletedCertificateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// PurgeDeletedCertificateResponder handles the response to the PurgeDeletedCertificate request. The method always +// closes the http.Response Body. +func (client ManagementClient) PurgeDeletedCertificateResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// PurgeDeletedKey permanently deletes the specified key. aka purges the key. Authorization: Requires the keys/purge +// permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key +func (client ManagementClient) PurgeDeletedKey(vaultBaseURL string, keyName string) (result autorest.Response, err error) { + req, err := client.PurgeDeletedKeyPreparer(vaultBaseURL, keyName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedKey", nil, "Failure preparing request") + return + } + + resp, err := client.PurgeDeletedKeySender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedKey", resp, "Failure sending request") + return + } + + result, err = client.PurgeDeletedKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedKey", resp, "Failure responding to request") + } + + return +} + +// PurgeDeletedKeyPreparer prepares the PurgeDeletedKey request. +func (client ManagementClient) PurgeDeletedKeyPreparer(vaultBaseURL string, keyName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "key-name": autorest.Encode("path", keyName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedkeys/{key-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// PurgeDeletedKeySender sends the PurgeDeletedKey request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) PurgeDeletedKeySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// PurgeDeletedKeyResponder handles the response to the PurgeDeletedKey request. The method always +// closes the http.Response Body. +func (client ManagementClient) PurgeDeletedKeyResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// PurgeDeletedSecret permanently deletes the specified secret. aka purges the secret. Authorization: requires the +// secrets/purge permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret +func (client ManagementClient) PurgeDeletedSecret(vaultBaseURL string, secretName string) (result autorest.Response, err error) { + req, err := client.PurgeDeletedSecretPreparer(vaultBaseURL, secretName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedSecret", nil, "Failure preparing request") + return + } + + resp, err := client.PurgeDeletedSecretSender(req) + if err != nil { + result.Response = resp + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedSecret", resp, "Failure sending request") + return + } + + result, err = client.PurgeDeletedSecretResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "PurgeDeletedSecret", resp, "Failure responding to request") + } + + return +} + +// PurgeDeletedSecretPreparer prepares the PurgeDeletedSecret request. +func (client ManagementClient) PurgeDeletedSecretPreparer(vaultBaseURL string, secretName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "secret-name": autorest.Encode("path", secretName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsDelete(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedsecrets/{secret-name}", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// PurgeDeletedSecretSender sends the PurgeDeletedSecret request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) PurgeDeletedSecretSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// PurgeDeletedSecretResponder handles the response to the PurgeDeletedSecret request. The method always +// closes the http.Response Body. +func (client ManagementClient) PurgeDeletedSecretResponder(resp *http.Response) (result autorest.Response, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), + autorest.ByClosing()) + result.Response = resp + return +} + +// RecoverDeletedCertificate the RecoverDeletedCertificate operation performs the reversal of the Delete operation. The +// operation is applicable in vaults enabled for soft-delete, and must be issued during the retention interval +// (available in the deleted certificate's attributes). +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// deleted certificate +func (client ManagementClient) RecoverDeletedCertificate(vaultBaseURL string, certificateName string) (result CertificateBundle, err error) { + req, err := client.RecoverDeletedCertificatePreparer(vaultBaseURL, certificateName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedCertificate", nil, "Failure preparing request") + return + } + + resp, err := client.RecoverDeletedCertificateSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedCertificate", resp, "Failure sending request") + return + } + + result, err = client.RecoverDeletedCertificateResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedCertificate", resp, "Failure responding to request") + } + + return +} + +// RecoverDeletedCertificatePreparer prepares the RecoverDeletedCertificate request. +func (client ManagementClient) RecoverDeletedCertificatePreparer(vaultBaseURL string, certificateName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "certificate-name": autorest.Encode("path", certificateName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedcertificates/{certificate-name}/recover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RecoverDeletedCertificateSender sends the RecoverDeletedCertificate request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) RecoverDeletedCertificateSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RecoverDeletedCertificateResponder handles the response to the RecoverDeletedCertificate request. The method always +// closes the http.Response Body. +func (client ManagementClient) RecoverDeletedCertificateResponder(resp *http.Response) (result CertificateBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RecoverDeletedKey recovers the deleted key back to its current version under /keys. Authorization: Requires the +// keys/recover permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the deleted key +func (client ManagementClient) RecoverDeletedKey(vaultBaseURL string, keyName string) (result KeyBundle, err error) { + req, err := client.RecoverDeletedKeyPreparer(vaultBaseURL, keyName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedKey", nil, "Failure preparing request") + return + } + + resp, err := client.RecoverDeletedKeySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedKey", resp, "Failure sending request") + return + } + + result, err = client.RecoverDeletedKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedKey", resp, "Failure responding to request") + } + + return +} + +// RecoverDeletedKeyPreparer prepares the RecoverDeletedKey request. +func (client ManagementClient) RecoverDeletedKeyPreparer(vaultBaseURL string, keyName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "key-name": autorest.Encode("path", keyName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedkeys/{key-name}/recover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RecoverDeletedKeySender sends the RecoverDeletedKey request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) RecoverDeletedKeySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RecoverDeletedKeyResponder handles the response to the RecoverDeletedKey request. The method always +// closes the http.Response Body. +func (client ManagementClient) RecoverDeletedKeyResponder(resp *http.Response) (result KeyBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RecoverDeletedSecret recovers the deleted secret back to its current version under /secrets. Authorization: requires +// the secrets/recover permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the deleted +// secret +func (client ManagementClient) RecoverDeletedSecret(vaultBaseURL string, secretName string) (result SecretBundle, err error) { + req, err := client.RecoverDeletedSecretPreparer(vaultBaseURL, secretName) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedSecret", nil, "Failure preparing request") + return + } + + resp, err := client.RecoverDeletedSecretSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedSecret", resp, "Failure sending request") + return + } + + result, err = client.RecoverDeletedSecretResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RecoverDeletedSecret", resp, "Failure responding to request") + } + + return +} + +// RecoverDeletedSecretPreparer prepares the RecoverDeletedSecret request. +func (client ManagementClient) RecoverDeletedSecretPreparer(vaultBaseURL string, secretName string) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "secret-name": autorest.Encode("path", secretName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsPost(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/deletedsecrets/{secret-name}/recover", pathParameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RecoverDeletedSecretSender sends the RecoverDeletedSecret request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) RecoverDeletedSecretSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RecoverDeletedSecretResponder handles the response to the RecoverDeletedSecret request. The method always +// closes the http.Response Body. +func (client ManagementClient) RecoverDeletedSecretResponder(resp *http.Response) (result SecretBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RegenerateStorageAccountKey regenerates the specified key value for the given storage account. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. parameters is the parameters to regenerate storage account key. +func (client ManagementClient) RegenerateStorageAccountKey(vaultBaseURL string, storageAccountName string, parameters StorageAccountRegenerteKeyParameters) (result StorageBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.KeyName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "RegenerateStorageAccountKey") + } + + req, err := client.RegenerateStorageAccountKeyPreparer(vaultBaseURL, storageAccountName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RegenerateStorageAccountKey", nil, "Failure preparing request") + return + } + + resp, err := client.RegenerateStorageAccountKeySender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RegenerateStorageAccountKey", resp, "Failure sending request") + return + } + + result, err = client.RegenerateStorageAccountKeyResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RegenerateStorageAccountKey", resp, "Failure responding to request") + } + + return +} + +// RegenerateStorageAccountKeyPreparer prepares the RegenerateStorageAccountKey request. +func (client ManagementClient) RegenerateStorageAccountKeyPreparer(vaultBaseURL string, storageAccountName string, parameters StorageAccountRegenerteKeyParameters) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}/regeneratekey", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RegenerateStorageAccountKeySender sends the RegenerateStorageAccountKey request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) RegenerateStorageAccountKeySender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RegenerateStorageAccountKeyResponder handles the response to the RegenerateStorageAccountKey request. The method always +// closes the http.Response Body. +func (client ManagementClient) RegenerateStorageAccountKeyResponder(resp *http.Response) (result StorageBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// RestoreKey imports a previously backed up key into Azure Key Vault, restoring the key, its key identifier, +// attributes and access control policies. The RESTORE operation may be used to import a previously backed up key. +// Individual versions of a key cannot be restored. The key is restored in its entirety with the same key name as it +// had when it was backed up. If the key name is not available in the target Key Vault, the RESTORE operation will be +// rejected. While the key name is retained during restore, the final key identifier will change if the key is restored +// to a different vault. Restore will restore all versions and preserve version identifiers. The RESTORE operation is +// subject to security constraints: The target Key Vault must be owned by the same Microsoft Azure Subscription as the +// source Key Vault The user must have RESTORE permission in the target Key Vault. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. parameters is the parameters to restore +// the key. func (client ManagementClient) RestoreKey(vaultBaseURL string, parameters KeyRestoreParameters) (result KeyBundle, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -2421,10 +4485,83 @@ func (client ManagementClient) RestoreKeyResponder(resp *http.Response) (result return } -// SetCertificateContacts +// RestoreSecret restores a backed up secret to a vault. Authorization: requires the secrets/restore permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// contacts is the contacts for the key vault certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. parameters is the parameters to restore +// the secret. +func (client ManagementClient) RestoreSecret(vaultBaseURL string, parameters SecretRestoreParameters) (result SecretBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.SecretBundleBackup", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "RestoreSecret") + } + + req, err := client.RestoreSecretPreparer(vaultBaseURL, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RestoreSecret", nil, "Failure preparing request") + return + } + + resp, err := client.RestoreSecretSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RestoreSecret", resp, "Failure sending request") + return + } + + result, err = client.RestoreSecretResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "RestoreSecret", resp, "Failure responding to request") + } + + return +} + +// RestoreSecretPreparer prepares the RestoreSecret request. +func (client ManagementClient) RestoreSecretPreparer(vaultBaseURL string, parameters SecretRestoreParameters) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPost(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPath("/secrets/restore"), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// RestoreSecretSender sends the RestoreSecret request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) RestoreSecretSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// RestoreSecretResponder handles the response to the RestoreSecret request. The method always +// closes the http.Response Body. +func (client ManagementClient) RestoreSecretResponder(resp *http.Response) (result SecretBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SetCertificateContacts sets the certificate contacts for the specified key vault. Authorization: requires the +// certificates/managecontacts permission. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. contacts is the contacts for the key +// vault certificate. func (client ManagementClient) SetCertificateContacts(vaultBaseURL string, contacts Contacts) (result Contacts, err error) { req, err := client.SetCertificateContactsPreparer(vaultBaseURL, contacts) if err != nil { @@ -2487,11 +4624,10 @@ func (client ManagementClient) SetCertificateContactsResponder(resp *http.Respon return } -// SetCertificateIssuer +// SetCertificateIssuer the SetCertificateIssuer operation adds or updates the specified certificate issuer. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// issuerName is the name of the issuer. parameter is certificate issuer set -// parameter. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. issuerName is the name of the issuer. +// parameter is certificate issuer set parameter. func (client ManagementClient) SetCertificateIssuer(vaultBaseURL string, issuerName string, parameter CertificateIssuerSetParameters) (result IssuerBundle, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameter, @@ -2564,13 +4700,93 @@ func (client ManagementClient) SetCertificateIssuerResponder(resp *http.Response return } -// SetSecret the SET operation adds a secret to the Azure Key Vault. If the -// named secret already exists, Azure Key Vault creates a new version of that -// secret. +// SetSasDefinition creates or updates a new SAS definition for the specified storage account. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// secretName is the name of the secret. parameters is the parameters for -// setting the secret. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. sasDefinitionName is the name of the SAS definition. parameters is the parameters to create a SAS +// definition. +func (client ManagementClient) SetSasDefinition(vaultBaseURL string, storageAccountName string, sasDefinitionName string, parameters SasDefinitionCreateParameters) (result SasDefinitionBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: sasDefinitionName, + Constraints: []validation.Constraint{{Target: "sasDefinitionName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.Parameters", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "SetSasDefinition") + } + + req, err := client.SetSasDefinitionPreparer(vaultBaseURL, storageAccountName, sasDefinitionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "SetSasDefinition", nil, "Failure preparing request") + return + } + + resp, err := client.SetSasDefinitionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "SetSasDefinition", resp, "Failure sending request") + return + } + + result, err = client.SetSasDefinitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "SetSasDefinition", resp, "Failure responding to request") + } + + return +} + +// SetSasDefinitionPreparer prepares the SetSasDefinition request. +func (client ManagementClient) SetSasDefinitionPreparer(vaultBaseURL string, storageAccountName string, sasDefinitionName string, parameters SasDefinitionCreateParameters) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "sas-definition-name": autorest.Encode("path", sasDefinitionName), + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}/sas/{sas-definition-name}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// SetSasDefinitionSender sends the SetSasDefinition request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) SetSasDefinitionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// SetSasDefinitionResponder handles the response to the SetSasDefinition request. The method always +// closes the http.Response Body. +func (client ManagementClient) SetSasDefinitionResponder(resp *http.Response) (result SasDefinitionBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// SetSecret the SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key +// Vault creates a new version of that secret. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret. +// parameters is the parameters for setting the secret. func (client ManagementClient) SetSecret(vaultBaseURL string, secretName string, parameters SecretSetParameters) (result SecretBundle, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: secretName, @@ -2645,13 +4861,91 @@ func (client ManagementClient) SetSecretResponder(resp *http.Response) (result S return } -// Sign the SIGN operation is applicable to asymmetric and symmetric keys -// stored in Azure Key Vault since this operation uses the private portion of -// the key. +// SetStorageAccount creates or updates a new storage account. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. keyVersion is the version of the key. -// parameters is the parameters for the signing operation. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. parameters is the parameters to create a storage account. +func (client ManagementClient) SetStorageAccount(vaultBaseURL string, storageAccountName string, parameters StorageAccountCreateParameters) (result StorageBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: parameters, + Constraints: []validation.Constraint{{Target: "parameters.ResourceID", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.ActiveKeyName", Name: validation.Null, Rule: true, Chain: nil}, + {Target: "parameters.AutoRegenerateKey", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "SetStorageAccount") + } + + req, err := client.SetStorageAccountPreparer(vaultBaseURL, storageAccountName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "SetStorageAccount", nil, "Failure preparing request") + return + } + + resp, err := client.SetStorageAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "SetStorageAccount", resp, "Failure sending request") + return + } + + result, err = client.SetStorageAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "SetStorageAccount", resp, "Failure responding to request") + } + + return +} + +// SetStorageAccountPreparer prepares the SetStorageAccount request. +func (client ManagementClient) SetStorageAccountPreparer(vaultBaseURL string, storageAccountName string, parameters StorageAccountCreateParameters) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPut(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// SetStorageAccountSender sends the SetStorageAccount request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) SetStorageAccountSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// SetStorageAccountResponder handles the response to the SetStorageAccount request. The method always +// closes the http.Response Body. +func (client ManagementClient) SetStorageAccountResponder(resp *http.Response) (result StorageBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Sign the SIGN operation is applicable to asymmetric and symmetric keys stored in Azure Key Vault since this +// operation uses the private portion of the key. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. +// keyVersion is the version of the key. parameters is the parameters for the signing operation. func (client ManagementClient) Sign(vaultBaseURL string, keyName string, keyVersion string, parameters KeySignParameters) (result KeyOperationResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -2725,14 +5019,12 @@ func (client ManagementClient) SignResponder(resp *http.Response) (result KeyOpe return } -// UnwrapKey the UNWRAP operation supports decryption of a symmetric key using -// the target key encryption key. This operation is the reverse of the WRAP -// operation. The UNWRAP operation applies to asymmetric and symmetric keys -// stored in Azure Key Vault since it uses the private portion of the key. +// UnwrapKey the UNWRAP operation supports decryption of a symmetric key using the target key encryption key. This +// operation is the reverse of the WRAP operation. The UNWRAP operation applies to asymmetric and symmetric keys stored +// in Azure Key Vault since it uses the private portion of the key. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. keyVersion is the version of the key. -// parameters is the parameters for the key operation. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. +// keyVersion is the version of the key. parameters is the parameters for the key operation. func (client ManagementClient) UnwrapKey(vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -2806,11 +5098,11 @@ func (client ManagementClient) UnwrapKeyResponder(resp *http.Response) (result K return } -// UpdateCertificate +// UpdateCertificate the UpdateCertificate operation applies the specified update on the given certificate; note the +// only elements being updated are the certificate's attributes. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate in the given key vault. -// certificateVersion is the version of the certificate. parameters is the +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate in the given key vault. certificateVersion is the version of the certificate. parameters is the // parameters for certificate update. func (client ManagementClient) UpdateCertificate(vaultBaseURL string, certificateName string, certificateVersion string, parameters CertificateUpdateParameters) (result CertificateBundle, err error) { req, err := client.UpdateCertificatePreparer(vaultBaseURL, certificateName, certificateVersion, parameters) @@ -2879,11 +5171,11 @@ func (client ManagementClient) UpdateCertificateResponder(resp *http.Response) ( return } -// UpdateCertificateIssuer +// UpdateCertificateIssuer the UpdateCertificateIssuer operation performs an update on the specified certificate issuer +// entity. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// issuerName is the name of the issuer. parameter is certificate issuer update -// parameter. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. issuerName is the name of the issuer. +// parameter is certificate issuer update parameter. func (client ManagementClient) UpdateCertificateIssuer(vaultBaseURL string, issuerName string, parameter CertificateIssuerUpdateParameters) (result IssuerBundle, err error) { req, err := client.UpdateCertificateIssuerPreparer(vaultBaseURL, issuerName, parameter) if err != nil { @@ -2950,11 +5242,11 @@ func (client ManagementClient) UpdateCertificateIssuerResponder(resp *http.Respo return } -// UpdateCertificateOperation +// UpdateCertificateOperation updates a certificate operation. Authorization: requires the certificates/update +// permission. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate. certificateOperation is the -// certificate operation response. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate. certificateOperation is the certificate operation response. func (client ManagementClient) UpdateCertificateOperation(vaultBaseURL string, certificateName string, certificateOperation CertificateOperationUpdateParameter) (result CertificateOperation, err error) { req, err := client.UpdateCertificateOperationPreparer(vaultBaseURL, certificateName, certificateOperation) if err != nil { @@ -3021,12 +5313,10 @@ func (client ManagementClient) UpdateCertificateOperationResponder(resp *http.Re return } -// UpdateCertificatePolicy set specified members in the certificate policy. -// Leave others as null. +// UpdateCertificatePolicy set specified members in the certificate policy. Leave others as null. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// certificateName is the name of the certificate in the given vault. -// certificatePolicy is the policy for the certificate. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. certificateName is the name of the +// certificate in the given vault. certificatePolicy is the policy for the certificate. func (client ManagementClient) UpdateCertificatePolicy(vaultBaseURL string, certificateName string, certificatePolicy CertificatePolicy) (result CertificatePolicy, err error) { req, err := client.UpdateCertificatePolicyPreparer(vaultBaseURL, certificateName, certificatePolicy) if err != nil { @@ -3093,13 +5383,11 @@ func (client ManagementClient) UpdateCertificatePolicyResponder(resp *http.Respo return } -// UpdateKey in order to perform this operation, the key must already exist in -// the Key Vault. Note: The cryptographic material of a key itself cannot be -// changed. +// UpdateKey in order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic +// material of a key itself cannot be changed. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of key to update. keyVersion is the version of the key -// to update. parameters is the parameters of the key to update. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of key to update. +// keyVersion is the version of the key to update. parameters is the parameters of the key to update. func (client ManagementClient) UpdateKey(vaultBaseURL string, keyName string, keyVersion string, parameters KeyUpdateParameters) (result KeyBundle, err error) { req, err := client.UpdateKeyPreparer(vaultBaseURL, keyName, keyVersion, parameters) if err != nil { @@ -3167,13 +5455,91 @@ func (client ManagementClient) UpdateKeyResponder(resp *http.Response) (result K return } -// UpdateSecret the UPDATE operation changes specified attributes of an -// existing stored secret. Attributes that are not specified in the request are -// left unchanged. The value of a secret itself cannot be changed. +// UpdateSasDefinition updates the specified attributes associated with the given SAS definition. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// secretName is the name of the secret. secretVersion is the version of the -// secret. parameters is the parameters for update secret operation. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. sasDefinitionName is the name of the SAS definition. parameters is the parameters to update a SAS +// definition. +func (client ManagementClient) UpdateSasDefinition(vaultBaseURL string, storageAccountName string, sasDefinitionName string, parameters SasDefinitionUpdateParameters) (result SasDefinitionBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}, + {TargetValue: sasDefinitionName, + Constraints: []validation.Constraint{{Target: "sasDefinitionName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "UpdateSasDefinition") + } + + req, err := client.UpdateSasDefinitionPreparer(vaultBaseURL, storageAccountName, sasDefinitionName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "UpdateSasDefinition", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateSasDefinitionSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "UpdateSasDefinition", resp, "Failure sending request") + return + } + + result, err = client.UpdateSasDefinitionResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "UpdateSasDefinition", resp, "Failure responding to request") + } + + return +} + +// UpdateSasDefinitionPreparer prepares the UpdateSasDefinition request. +func (client ManagementClient) UpdateSasDefinitionPreparer(vaultBaseURL string, storageAccountName string, sasDefinitionName string, parameters SasDefinitionUpdateParameters) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "sas-definition-name": autorest.Encode("path", sasDefinitionName), + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}/sas/{sas-definition-name}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateSasDefinitionSender sends the UpdateSasDefinition request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) UpdateSasDefinitionSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateSasDefinitionResponder handles the response to the UpdateSasDefinition request. The method always +// closes the http.Response Body. +func (client ManagementClient) UpdateSasDefinitionResponder(resp *http.Response) (result SasDefinitionBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// UpdateSecret the UPDATE operation changes specified attributes of an existing stored secret. Attributes that are not +// specified in the request are left unchanged. The value of a secret itself cannot be changed. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. secretName is the name of the secret. +// secretVersion is the version of the secret. parameters is the parameters for update secret operation. func (client ManagementClient) UpdateSecret(vaultBaseURL string, secretName string, secretVersion string, parameters SecretUpdateParameters) (result SecretBundle, err error) { req, err := client.UpdateSecretPreparer(vaultBaseURL, secretName, secretVersion, parameters) if err != nil { @@ -3241,16 +5607,89 @@ func (client ManagementClient) UpdateSecretResponder(resp *http.Response) (resul return } -// Verify the VERIFY operation is applicable to symmetric keys stored in Azure -// Key Vault. VERIFY is not strictly necessary for asymmetric keys stored in -// Azure Key Vault since signature verification can be performed using the -// public portion of the key but this operation is supported as a convenience -// for callers that only have a key-reference and not the public portion of the -// key. +// UpdateStorageAccount updates the specified attributes associated with the given storage account. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. keyVersion is the version of the key. -// parameters is the parameters for verify operations. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. storageAccountName is the name of the +// storage account. parameters is the parameters to update a storage account. +func (client ManagementClient) UpdateStorageAccount(vaultBaseURL string, storageAccountName string, parameters StorageAccountUpdateParameters) (result StorageBundle, err error) { + if err := validation.Validate([]validation.Validation{ + {TargetValue: storageAccountName, + Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil { + return result, validation.NewErrorWithValidationError(err, "keyvault.ManagementClient", "UpdateStorageAccount") + } + + req, err := client.UpdateStorageAccountPreparer(vaultBaseURL, storageAccountName, parameters) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "UpdateStorageAccount", nil, "Failure preparing request") + return + } + + resp, err := client.UpdateStorageAccountSender(req) + if err != nil { + result.Response = autorest.Response{Response: resp} + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "UpdateStorageAccount", resp, "Failure sending request") + return + } + + result, err = client.UpdateStorageAccountResponder(resp) + if err != nil { + err = autorest.NewErrorWithError(err, "keyvault.ManagementClient", "UpdateStorageAccount", resp, "Failure responding to request") + } + + return +} + +// UpdateStorageAccountPreparer prepares the UpdateStorageAccount request. +func (client ManagementClient) UpdateStorageAccountPreparer(vaultBaseURL string, storageAccountName string, parameters StorageAccountUpdateParameters) (*http.Request, error) { + urlParameters := map[string]interface{}{ + "vaultBaseUrl": vaultBaseURL, + } + + pathParameters := map[string]interface{}{ + "storage-account-name": autorest.Encode("path", storageAccountName), + } + + const APIVersion = "2016-10-01" + queryParameters := map[string]interface{}{ + "api-version": APIVersion, + } + + preparer := autorest.CreatePreparer( + autorest.AsJSON(), + autorest.AsPatch(), + autorest.WithCustomBaseURL("{vaultBaseUrl}", urlParameters), + autorest.WithPathParameters("/storage/{storage-account-name}", pathParameters), + autorest.WithJSON(parameters), + autorest.WithQueryParameters(queryParameters)) + return preparer.Prepare(&http.Request{}) +} + +// UpdateStorageAccountSender sends the UpdateStorageAccount request. The method will close the +// http.Response Body if it receives an error. +func (client ManagementClient) UpdateStorageAccountSender(req *http.Request) (*http.Response, error) { + return autorest.SendWithSender(client, req) +} + +// UpdateStorageAccountResponder handles the response to the UpdateStorageAccount request. The method always +// closes the http.Response Body. +func (client ManagementClient) UpdateStorageAccountResponder(resp *http.Response) (result StorageBundle, err error) { + err = autorest.Respond( + resp, + client.ByInspecting(), + azure.WithErrorUnlessStatusCode(http.StatusOK), + autorest.ByUnmarshallingJSON(&result), + autorest.ByClosing()) + result.Response = autorest.Response{Response: resp} + return +} + +// Verify the VERIFY operation is applicable to symmetric keys stored in Azure Key Vault. VERIFY is not strictly +// necessary for asymmetric keys stored in Azure Key Vault since signature verification can be performed using the +// public portion of the key but this operation is supported as a convenience for callers that only have a +// key-reference and not the public portion of the key. +// +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. +// keyVersion is the version of the key. parameters is the parameters for verify operations. func (client ManagementClient) Verify(vaultBaseURL string, keyName string, keyVersion string, parameters KeyVerifyParameters) (result KeyVerifyResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, @@ -3325,17 +5764,14 @@ func (client ManagementClient) VerifyResponder(resp *http.Response) (result KeyV return } -// WrapKey the WRAP operation supports encryption of a symmetric key using a -// key encryption key that has previously been stored in an Azure Key Vault. -// The WRAP operation is only strictly necessary for symmetric keys stored in -// Azure Key Vault since protection with an asymmetric key can be performed -// using the public portion of the key. This operation is supported for -// asymmetric keys as a convenience for callers that have a key-reference but -// do not have access to the public key material. +// WrapKey the WRAP operation supports encryption of a symmetric key using a key encryption key that has previously +// been stored in an Azure Key Vault. The WRAP operation is only strictly necessary for symmetric keys stored in Azure +// Key Vault since protection with an asymmetric key can be performed using the public portion of the key. This +// operation is supported for asymmetric keys as a convenience for callers that have a key-reference but do not have +// access to the public key material. // -// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. -// keyName is the name of the key. keyVersion is the version of the key. -// parameters is the parameters for wrap operation. +// vaultBaseURL is the vault name, for example https://myvault.vault.azure.net. keyName is the name of the key. +// keyVersion is the version of the key. parameters is the parameters for wrap operation. func (client ManagementClient) WrapKey(vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) { if err := validation.Validate([]validation.Validation{ {TargetValue: parameters, diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/models.go index 842246227..8903454e6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/models.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/models.go @@ -14,9 +14,8 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0 -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( "github.com/Azure/go-autorest/autorest" @@ -35,16 +34,30 @@ const ( EmailContacts ActionType = "EmailContacts" ) -// JSONWebKeyEncryptionAlgorithm enumerates the values for json web key -// encryption algorithm. +// DeletionRecoveryLevel enumerates the values for deletion recovery level. +type DeletionRecoveryLevel string + +const ( + // Purgeable specifies the purgeable state for deletion recovery level. + Purgeable DeletionRecoveryLevel = "Purgeable" + // Recoverable specifies the recoverable state for deletion recovery level. + Recoverable DeletionRecoveryLevel = "Recoverable" + // RecoverableProtectedSubscription specifies the recoverable protected subscription state for deletion recovery level. + RecoverableProtectedSubscription DeletionRecoveryLevel = "Recoverable+ProtectedSubscription" + // RecoverablePurgeable specifies the recoverable purgeable state for deletion recovery level. + RecoverablePurgeable DeletionRecoveryLevel = "Recoverable+Purgeable" +) + +// JSONWebKeyEncryptionAlgorithm enumerates the values for json web key encryption algorithm. type JSONWebKeyEncryptionAlgorithm string const ( // RSA15 specifies the rsa15 state for json web key encryption algorithm. RSA15 JSONWebKeyEncryptionAlgorithm = "RSA1_5" - // RSAOAEP specifies the rsaoaep state for json web key encryption - // algorithm. + // RSAOAEP specifies the rsaoaep state for json web key encryption algorithm. RSAOAEP JSONWebKeyEncryptionAlgorithm = "RSA-OAEP" + // RSAOAEP256 specifies the rsaoaep256 state for json web key encryption algorithm. + RSAOAEP256 JSONWebKeyEncryptionAlgorithm = "RSA-OAEP-256" ) // JSONWebKeyOperation enumerates the values for json web key operation. @@ -65,11 +78,16 @@ const ( WrapKey JSONWebKeyOperation = "wrapKey" ) -// JSONWebKeySignatureAlgorithm enumerates the values for json web key -// signature algorithm. +// JSONWebKeySignatureAlgorithm enumerates the values for json web key signature algorithm. type JSONWebKeySignatureAlgorithm string const ( + // PS256 specifies the ps256 state for json web key signature algorithm. + PS256 JSONWebKeySignatureAlgorithm = "PS256" + // PS384 specifies the ps384 state for json web key signature algorithm. + PS384 JSONWebKeySignatureAlgorithm = "PS384" + // PS512 specifies the ps512 state for json web key signature algorithm. + PS512 JSONWebKeySignatureAlgorithm = "PS512" // RS256 specifies the rs256 state for json web key signature algorithm. RS256 JSONWebKeySignatureAlgorithm = "RS256" // RS384 specifies the rs384 state for json web key signature algorithm. @@ -100,13 +118,11 @@ type KeyUsageType string const ( // CRLSign specifies the crl sign state for key usage type. CRLSign KeyUsageType = "cRLSign" - // DataEncipherment specifies the data encipherment state for key usage - // type. + // DataEncipherment specifies the data encipherment state for key usage type. DataEncipherment KeyUsageType = "dataEncipherment" // DecipherOnly specifies the decipher only state for key usage type. DecipherOnly KeyUsageType = "decipherOnly" - // DigitalSignature specifies the digital signature state for key usage - // type. + // DigitalSignature specifies the digital signature state for key usage type. DigitalSignature KeyUsageType = "digitalSignature" // EncipherOnly specifies the encipher only state for key usage type. EncipherOnly KeyUsageType = "encipherOnly" @@ -125,8 +141,7 @@ type Action struct { ActionType ActionType `json:"action_type,omitempty"` } -// AdministratorDetails is details of the organization administrator of the -// certificate issuer. +// AdministratorDetails is details of the organization administrator of the certificate issuer. type AdministratorDetails struct { FirstName *string `json:"first_name,omitempty"` LastName *string `json:"last_name,omitempty"` @@ -149,17 +164,23 @@ type BackupKeyResult struct { Value *string `json:"value,omitempty"` } -// CertificateAttributes is the certificate management attributes. -type CertificateAttributes struct { - Enabled *bool `json:"enabled,omitempty"` - NotBefore *date.UnixTime `json:"nbf,omitempty"` - Expires *date.UnixTime `json:"exp,omitempty"` - Created *date.UnixTime `json:"created,omitempty"` - Updated *date.UnixTime `json:"updated,omitempty"` +// BackupSecretResult is the backup secret result, containing the backup blob. +type BackupSecretResult struct { + autorest.Response `json:"-"` + Value *string `json:"value,omitempty"` } -// CertificateBundle is a certificate bundle consists of a certificate (X509) -// plus its attributes. +// CertificateAttributes is the certificate management attributes. +type CertificateAttributes struct { + Enabled *bool `json:"enabled,omitempty"` + NotBefore *date.UnixTime `json:"nbf,omitempty"` + Expires *date.UnixTime `json:"exp,omitempty"` + Created *date.UnixTime `json:"created,omitempty"` + Updated *date.UnixTime `json:"updated,omitempty"` + RecoveryLevel DeletionRecoveryLevel `json:"recoveryLevel,omitempty"` +} + +// CertificateBundle is a certificate bundle consists of a certificate (X509) plus its attributes. type CertificateBundle struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -189,8 +210,7 @@ type CertificateImportParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// CertificateIssuerItem is the certificate issuer item containing certificate -// issuer metadata. +// CertificateIssuerItem is the certificate issuer item containing certificate issuer metadata. type CertificateIssuerItem struct { ID *string `json:"id,omitempty"` Provider *string `json:"provider,omitempty"` @@ -223,8 +243,7 @@ type CertificateIssuerSetParameters struct { Attributes *IssuerAttributes `json:"attributes,omitempty"` } -// CertificateIssuerUpdateParameters is the certificate issuer update -// parameters. +// CertificateIssuerUpdateParameters is the certificate issuer update parameters. type CertificateIssuerUpdateParameters struct { Provider *string `json:"provider,omitempty"` Credentials *IssuerCredentials `json:"credentials,omitempty"` @@ -266,8 +285,7 @@ type CertificateMergeParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } -// CertificateOperation is a certificate operation is returned in case of -// asynchronous requests. +// CertificateOperation is a certificate operation is returned in case of asynchronous requests. type CertificateOperation struct { autorest.Response `json:"-"` ID *string `json:"id,omitempty"` @@ -281,8 +299,7 @@ type CertificateOperation struct { RequestID *string `json:"request_id,omitempty"` } -// CertificateOperationUpdateParameter is the certificate operation update -// parameters. +// CertificateOperationUpdateParameter is the certificate operation update parameters. type CertificateOperationUpdateParameter struct { CancellationRequested *bool `json:"cancellation_requested,omitempty"` } @@ -320,6 +337,143 @@ type Contacts struct { ContactList *[]Contact `json:"contacts,omitempty"` } +// DeletedCertificateBundle is a Deleted Certificate consisting of its previous id, attributes and its tags, as well as +// information on when it will be purged. +type DeletedCertificateBundle struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + Kid *string `json:"kid,omitempty"` + Sid *string `json:"sid,omitempty"` + X509Thumbprint *string `json:"x5t,omitempty"` + Policy *CertificatePolicy `json:"policy,omitempty"` + Cer *[]byte `json:"cer,omitempty"` + ContentType *string `json:"contentType,omitempty"` + Attributes *CertificateAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + RecoveryID *string `json:"recoveryId,omitempty"` + ScheduledPurgeDate *date.UnixTime `json:"scheduledPurgeDate,omitempty"` + DeletedDate *date.UnixTime `json:"deletedDate,omitempty"` +} + +// DeletedCertificateItem is the deleted certificate item containing metadata about the deleted certificate. +type DeletedCertificateItem struct { + ID *string `json:"id,omitempty"` + Attributes *CertificateAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + X509Thumbprint *string `json:"x5t,omitempty"` + RecoveryID *string `json:"recoveryId,omitempty"` + ScheduledPurgeDate *date.UnixTime `json:"scheduledPurgeDate,omitempty"` + DeletedDate *date.UnixTime `json:"deletedDate,omitempty"` +} + +// DeletedCertificateListResult is a list of certificates that have been deleted in this vault. +type DeletedCertificateListResult struct { + autorest.Response `json:"-"` + Value *[]DeletedCertificateItem `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// DeletedCertificateListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client DeletedCertificateListResult) DeletedCertificateListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// DeletedKeyBundle is a DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info +type DeletedKeyBundle struct { + autorest.Response `json:"-"` + Key *JSONWebKey `json:"key,omitempty"` + Attributes *KeyAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Managed *bool `json:"managed,omitempty"` + RecoveryID *string `json:"recoveryId,omitempty"` + ScheduledPurgeDate *date.UnixTime `json:"scheduledPurgeDate,omitempty"` + DeletedDate *date.UnixTime `json:"deletedDate,omitempty"` +} + +// DeletedKeyItem is the deleted key item containing the deleted key metadata and information about deletion. +type DeletedKeyItem struct { + Kid *string `json:"kid,omitempty"` + Attributes *KeyAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Managed *bool `json:"managed,omitempty"` + RecoveryID *string `json:"recoveryId,omitempty"` + ScheduledPurgeDate *date.UnixTime `json:"scheduledPurgeDate,omitempty"` + DeletedDate *date.UnixTime `json:"deletedDate,omitempty"` +} + +// DeletedKeyListResult is a list of keys that have been deleted in this vault. +type DeletedKeyListResult struct { + autorest.Response `json:"-"` + Value *[]DeletedKeyItem `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// DeletedKeyListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client DeletedKeyListResult) DeletedKeyListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// DeletedSecretBundle is a Deleted Secret consisting of its previous id, attributes and its tags, as well as +// information on when it will be purged. +type DeletedSecretBundle struct { + autorest.Response `json:"-"` + Value *string `json:"value,omitempty"` + ID *string `json:"id,omitempty"` + ContentType *string `json:"contentType,omitempty"` + Attributes *SecretAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + Kid *string `json:"kid,omitempty"` + Managed *bool `json:"managed,omitempty"` + RecoveryID *string `json:"recoveryId,omitempty"` + ScheduledPurgeDate *date.UnixTime `json:"scheduledPurgeDate,omitempty"` + DeletedDate *date.UnixTime `json:"deletedDate,omitempty"` +} + +// DeletedSecretItem is the deleted secret item containing metadata about the deleted secret. +type DeletedSecretItem struct { + ID *string `json:"id,omitempty"` + Attributes *SecretAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` + ContentType *string `json:"contentType,omitempty"` + Managed *bool `json:"managed,omitempty"` + RecoveryID *string `json:"recoveryId,omitempty"` + ScheduledPurgeDate *date.UnixTime `json:"scheduledPurgeDate,omitempty"` + DeletedDate *date.UnixTime `json:"deletedDate,omitempty"` +} + +// DeletedSecretListResult is the deleted secret list result +type DeletedSecretListResult struct { + autorest.Response `json:"-"` + Value *[]DeletedSecretItem `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// DeletedSecretListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client DeletedSecretListResult) DeletedSecretListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // Error is the key vault server error. type Error struct { Code *string `json:"code,omitempty"` @@ -332,8 +486,7 @@ type ErrorType struct { Error *Error `json:"error,omitempty"` } -// IssuerAttributes is the attributes of an issuer managed by the Key Vault -// service. +// IssuerAttributes is the attributes of an issuer managed by the Key Vault service. type IssuerAttributes struct { Enabled *bool `json:"enabled,omitempty"` Created *date.UnixTime `json:"created,omitempty"` @@ -356,15 +509,13 @@ type IssuerCredentials struct { Password *string `json:"pwd,omitempty"` } -// IssuerParameters is parameters for the issuer of the X509 component of a -// certificate. +// IssuerParameters is parameters for the issuer of the X509 component of a certificate. type IssuerParameters struct { Name *string `json:"name,omitempty"` CertificateType *string `json:"cty,omitempty"` } -// JSONWebKey is as of -// http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 +// JSONWebKey is as of http://tools.ietf.org/html/draft-ietf-jose-json-web-key-18 type JSONWebKey struct { Kid *string `json:"kid,omitempty"` Kty JSONWebKeyType `json:"kty,omitempty"` @@ -383,11 +534,12 @@ type JSONWebKey struct { // KeyAttributes is the attributes of a key managed by the key vault service. type KeyAttributes struct { - Enabled *bool `json:"enabled,omitempty"` - NotBefore *date.UnixTime `json:"nbf,omitempty"` - Expires *date.UnixTime `json:"exp,omitempty"` - Created *date.UnixTime `json:"created,omitempty"` - Updated *date.UnixTime `json:"updated,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + NotBefore *date.UnixTime `json:"nbf,omitempty"` + Expires *date.UnixTime `json:"exp,omitempty"` + Created *date.UnixTime `json:"created,omitempty"` + Updated *date.UnixTime `json:"updated,omitempty"` + RecoveryLevel DeletionRecoveryLevel `json:"recoveryLevel,omitempty"` } // KeyBundle is a KeyBundle consisting of a WebKey plus its attributes. @@ -495,33 +647,89 @@ type KeyVerifyResult struct { Value *bool `json:"value,omitempty"` } -// LifetimeAction is action and its trigger that will be performed by Key Vault -// over the lifetime of a certificate. +// LifetimeAction is action and its trigger that will be performed by Key Vault over the lifetime of a certificate. type LifetimeAction struct { Trigger *Trigger `json:"trigger,omitempty"` Action *Action `json:"action,omitempty"` } -// OrganizationDetails is details of the organization of the certificate -// issuer. +// OrganizationDetails is details of the organization of the certificate issuer. type OrganizationDetails struct { ID *string `json:"id,omitempty"` AdminDetails *[]AdministratorDetails `json:"admin_details,omitempty"` } -// PendingCertificateSigningRequestResult is the pending certificate signing -// request result. +// PendingCertificateSigningRequestResult is the pending certificate signing request result. type PendingCertificateSigningRequestResult struct { Value *string `json:"value,omitempty"` } +// SasDefinitionAttributes is the SAS definition management attributes. +type SasDefinitionAttributes struct { + Enabled *bool `json:"enabled,omitempty"` + Created *date.UnixTime `json:"created,omitempty"` + Updated *date.UnixTime `json:"updated,omitempty"` +} + +// SasDefinitionBundle is a SAS definition bundle consists of key vault SAS definition details plus its attributes. +type SasDefinitionBundle struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + SecretID *string `json:"sid,omitempty"` + Parameters *map[string]*string `json:"parameters,omitempty"` + Attributes *SasDefinitionAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// SasDefinitionCreateParameters is the SAS definition create parameters. +type SasDefinitionCreateParameters struct { + Parameters *map[string]*string `json:"parameters,omitempty"` + SasDefinitionAttributes *SasDefinitionAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// SasDefinitionItem is the SAS definition item containing storage SAS definition metadata. +type SasDefinitionItem struct { + ID *string `json:"id,omitempty"` + SecretID *string `json:"sid,omitempty"` + Attributes *SasDefinitionAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// SasDefinitionListResult is the storage account SAS definition list result. +type SasDefinitionListResult struct { + autorest.Response `json:"-"` + Value *[]SasDefinitionItem `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// SasDefinitionListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client SasDefinitionListResult) SasDefinitionListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + +// SasDefinitionUpdateParameters is the SAS definition update parameters. +type SasDefinitionUpdateParameters struct { + Parameters *map[string]*string `json:"parameters,omitempty"` + SasDefinitionAttributes *SasDefinitionAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + // SecretAttributes is the secret management attributes. type SecretAttributes struct { - Enabled *bool `json:"enabled,omitempty"` - NotBefore *date.UnixTime `json:"nbf,omitempty"` - Expires *date.UnixTime `json:"exp,omitempty"` - Created *date.UnixTime `json:"created,omitempty"` - Updated *date.UnixTime `json:"updated,omitempty"` + Enabled *bool `json:"enabled,omitempty"` + NotBefore *date.UnixTime `json:"nbf,omitempty"` + Expires *date.UnixTime `json:"exp,omitempty"` + Created *date.UnixTime `json:"created,omitempty"` + Updated *date.UnixTime `json:"updated,omitempty"` + RecoveryLevel DeletionRecoveryLevel `json:"recoveryLevel,omitempty"` } // SecretBundle is a secret consisting of a value, id and its attributes. @@ -569,6 +777,11 @@ type SecretProperties struct { ContentType *string `json:"contentType,omitempty"` } +// SecretRestoreParameters is the secret restore parameters. +type SecretRestoreParameters struct { + SecretBundleBackup *string `json:"value,omitempty"` +} + // SecretSetParameters is the secret set parameters. type SecretSetParameters struct { Value *string `json:"value,omitempty"` @@ -584,6 +797,76 @@ type SecretUpdateParameters struct { Tags *map[string]*string `json:"tags,omitempty"` } +// StorageAccountAttributes is the storage account management attributes. +type StorageAccountAttributes struct { + Enabled *bool `json:"enabled,omitempty"` + Created *date.UnixTime `json:"created,omitempty"` + Updated *date.UnixTime `json:"updated,omitempty"` +} + +// StorageAccountCreateParameters is the storage account create parameters. +type StorageAccountCreateParameters struct { + ResourceID *string `json:"resourceId,omitempty"` + ActiveKeyName *string `json:"activeKeyName,omitempty"` + AutoRegenerateKey *bool `json:"autoRegenerateKey,omitempty"` + RegenerationPeriod *string `json:"regenerationPeriod,omitempty"` + StorageAccountAttributes *StorageAccountAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// StorageAccountItem is the storage account item containing storage account metadata. +type StorageAccountItem struct { + ID *string `json:"id,omitempty"` + ResourceID *string `json:"resourceId,omitempty"` + Attributes *StorageAccountAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// StorageAccountRegenerteKeyParameters is the storage account key regenerate parameters. +type StorageAccountRegenerteKeyParameters struct { + KeyName *string `json:"keyName,omitempty"` +} + +// StorageAccountUpdateParameters is the storage account update parameters. +type StorageAccountUpdateParameters struct { + ActiveKeyName *string `json:"activeKeyName,omitempty"` + AutoRegenerateKey *bool `json:"autoRegenerateKey,omitempty"` + RegenerationPeriod *string `json:"regenerationPeriod,omitempty"` + StorageAccountAttributes *StorageAccountAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// StorageBundle is a Storage account bundle consists of key vault storage account details plus its attributes. +type StorageBundle struct { + autorest.Response `json:"-"` + ID *string `json:"id,omitempty"` + ResourceID *string `json:"resourceId,omitempty"` + ActiveKeyName *string `json:"activeKeyName,omitempty"` + AutoRegenerateKey *bool `json:"autoRegenerateKey,omitempty"` + RegenerationPeriod *string `json:"regenerationPeriod,omitempty"` + Attributes *StorageAccountAttributes `json:"attributes,omitempty"` + Tags *map[string]*string `json:"tags,omitempty"` +} + +// StorageListResult is the storage accounts list result. +type StorageListResult struct { + autorest.Response `json:"-"` + Value *[]StorageAccountItem `json:"value,omitempty"` + NextLink *string `json:"nextLink,omitempty"` +} + +// StorageListResultPreparer prepares a request to retrieve the next set of results. It returns +// nil if no more results exist. +func (client StorageListResult) StorageListResultPreparer() (*http.Request, error) { + if client.NextLink == nil || len(to.String(client.NextLink)) <= 0 { + return nil, nil + } + return autorest.Prepare(&http.Request{}, + autorest.AsJSON(), + autorest.AsGet(), + autorest.WithBaseURL(to.String(client.NextLink))) +} + // SubjectAlternativeNames is the subject alternate names of a X509 object. type SubjectAlternativeNames struct { Emails *[]string `json:"emails,omitempty"` @@ -597,8 +880,7 @@ type Trigger struct { DaysBeforeExpiry *int32 `json:"days_before_expiry,omitempty"` } -// X509CertificateProperties is properties of the X509 component of a -// certificate. +// X509CertificateProperties is properties of the X509 component of a certificate. type X509CertificateProperties struct { Subject *string `json:"subject,omitempty"` Ekus *[]string `json:"ekus,omitempty"` diff --git a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go index 6ef6ca2d3..64ff8541e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/dataplane/keyvault/version.go @@ -14,15 +14,15 @@ package keyvault // See the License for the specific language governing permissions and // limitations under the License. // -// Code generated by Microsoft (R) AutoRest Code Generator 2.2.18.0 +// Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { - return "Azure-SDK-For-Go/v10.3.1-beta arm-keyvault/2016-10-01" + return "Azure-SDK-For-Go/v11.0.0-beta arm-keyvault/2016-10-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { - return "v10.3.1-beta" + return "v11.0.0-beta" } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/glide.lock b/vendor/github.com/Azure/azure-sdk-for-go/glide.lock index 3dc0fd7b1..1a16baaf4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/glide.lock +++ b/vendor/github.com/Azure/azure-sdk-for-go/glide.lock @@ -1,8 +1,8 @@ -hash: f52476dff67b66fe9fffe35b63ac0c06962fcaacd326b66820a33edf53b01a16 -updated: 2017-09-01T13:52:16.3705168-07:00 +hash: ee3a7971ba1cf6d287128746a2dd954ea023d952aec65453c94323f26955e0ae +updated: 2017-09-28T11:44:06.2382306-07:00 imports: - name: github.com/Azure/go-autorest - version: 48a8154950f853ae1f2a9c409e0eb1fb71119bc8 + version: f6be1abbb5abd0517522f850dd785990d373da7e subpackages: - autorest - autorest/adal @@ -15,9 +15,9 @@ imports: - name: github.com/howeyc/gopass version: bf9dde6d0d2c004a008c27aaee91170c786f6db8 - name: github.com/mattn/go-colorable - version: 040dd0b833b34b4182673409ada4df2853b26537 + version: ad5389df28cdac544c99bd7b9161a0b5b6ca9d1b - name: github.com/mattn/go-isatty - version: fc9e8d8ef48496124e79ae0df75490096eccf6fe + version: a5cdd64afdee435007ee3e9f6ed4684af949d568 - name: github.com/mgutz/ansi version: 9520e82c474b0a04dd04f8a40959027271bab992 - name: github.com/mgutz/minimist @@ -31,21 +31,22 @@ imports: - name: github.com/nozzle/throttler version: d9b45f19996c645d38c9266d1f5cf1990e930119 - name: github.com/satori/go.uuid - version: 879c5887cd475cd7864858769793b2ceb0d44feb + version: 5bf94b69c6b68ee1b541973bb8e1144db23a194b - name: github.com/satori/uuid version: 5bf94b69c6b68ee1b541973bb8e1144db23a194b - name: github.com/shopspring/decimal - version: 3c692774ac4c47c7a296ec96e553719dba1a68fc + version: aed1bfe463fa3c9cc268d60dcc1491db613bff7e - name: golang.org/x/crypto - version: 558b6879de74bc843225cde5686419267ff707ca + version: 76eec36fa14229c4b25bb894c2d0e591527af429 subpackages: - pkcs12 - pkcs12/internal/rc2 - ssh/terminal - name: golang.org/x/sys - version: 0f826bdd13b500be0f1d4004938ad978fcc6031e + version: 314a259e304ff91bd6985da2a7149bbf91237993 subpackages: - unix + - windows - name: gopkg.in/check.v1 version: 20d25e2804050c1cd24a7eea1e7a6447dd0e74ec - name: gopkg.in/godo.v2 @@ -62,4 +63,4 @@ testImports: - cassette - recorder - name: gopkg.in/yaml.v2 - version: 25c4ec802a7d637f88d584ab26798e94ad14c13b + version: eb3733d160e74a9c7e442f435eb3bea458e1d19f diff --git a/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml b/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml index d0961f338..9d79c902d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml +++ b/vendor/github.com/Azure/azure-sdk-for-go/glide.yaml @@ -1,7 +1,7 @@ package: github.com/Azure/azure-sdk-for-go import: - package: github.com/Azure/go-autorest - version: ~8.2.0 + version: ~8.4.0 subpackages: - /autorest - autorest/azure diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go index dd703c0ad..7f25a78f0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/client.go @@ -2,6 +2,20 @@ package affinitygroup +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/base64" "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go index 1e48cfddb..3c810a000 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/affinitygroup/entities.go @@ -2,6 +2,20 @@ package affinitygroup +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/client.go index 3ce4ede86..e0561d77a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/client.go @@ -4,6 +4,20 @@ // and make requests to the Microsoft Azure Service Management REST API. package management +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "errors" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go b/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go index f0b220225..eca555cb4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/errors.go @@ -2,6 +2,20 @@ package management +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go index 13579b1ad..e0d25c6ea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/errors_test.go @@ -2,6 +2,20 @@ package management_test +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" "testing" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go index 46cd5b27a..e9d28ef26 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/client.go @@ -3,6 +3,20 @@ // Package hostedservice provides a client for Hosted Services. package hostedservice +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/base64" "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go index 7ad7a9171..52360e31d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/hostedservice/entities.go @@ -2,6 +2,20 @@ package hostedservice +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/http.go b/vendor/github.com/Azure/azure-sdk-for-go/management/http.go index b8a6d5d32..357301001 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/http.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/http.go @@ -2,6 +2,20 @@ package management +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "crypto/tls" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go index 1b0262cea..da5916975 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/location/client.go @@ -3,6 +3,20 @@ // Package location provides a client for Locations. package location +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go index d85921995..726e4c151 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/location/entities.go @@ -2,6 +2,20 @@ package location +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go index 92cd349e8..4e617c170 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/client.go @@ -3,6 +3,20 @@ // Package networksecuritygroup provides a client for Network Security Groups. package networksecuritygroup +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go index 77856532f..6b2ed7826 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/networksecuritygroup/entities.go @@ -6,6 +6,20 @@ // https://msdn.microsoft.com/en-us/library/azure/dn913824.aspx package networksecuritygroup +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go index adf08aa14..eb306b8b1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/operations.go @@ -2,6 +2,20 @@ package management +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "errors" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go index 3391e5826..e29f025ed 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/client.go @@ -3,6 +3,20 @@ // Package osimage provides a client for Operating System Images. package osimage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go index 6731010b1..ee5715138 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/osimage/entities.go @@ -2,6 +2,20 @@ package osimage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go b/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go index 9eea9e3b3..8effb38eb 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/publishSettings.go @@ -2,6 +2,20 @@ package management +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/base64" "encoding/pem" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go index 57a71918f..a43553179 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/client.go @@ -2,6 +2,20 @@ package sql +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go index 7752fb50a..7006e8169 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/sql/entities.go @@ -2,6 +2,20 @@ package sql +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go index 6ba8a03da..87ae0396e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/client.go @@ -3,6 +3,20 @@ // Package storageservice provides a client for Storage Services. package storageservice +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go index 49d9c37ff..1be8cf729 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities.go @@ -2,6 +2,20 @@ package storageservice +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go index 298a62c8c..23a6e9afc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/storageservice/entities_test.go @@ -2,6 +2,20 @@ package storageservice +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "testing" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go b/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go index 09ae535e5..c3342bc71 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/testutils/managementclient.go @@ -3,6 +3,20 @@ // Package testutils contains some test utilities for the Azure SDK package testutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/base64" "os" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/util.go b/vendor/github.com/Azure/azure-sdk-for-go/management/util.go index 9439cd73e..9a32f20ea 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/util.go @@ -2,6 +2,20 @@ package management +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "io/ioutil" "net/http" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/version.go b/vendor/github.com/Azure/azure-sdk-for-go/management/version.go index ae11c8d8c..650db8a84 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/version.go @@ -2,6 +2,20 @@ package management +// Copyright 2017 Microsoft Corporation +// +// 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. + var ( - sdkVersion = "v10.3.1-beta" + sdkVersion = "v11.0.0-beta" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go index c3e718070..7ada4de4d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/client.go @@ -3,6 +3,20 @@ // Package virtualmachine provides a client for Virtual Machines. package virtualmachine +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go index 5c21a1981..ee5665231 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities.go @@ -2,6 +2,20 @@ package virtualmachine +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go index 3eef25aed..75002e6f8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/entities_test.go @@ -2,6 +2,20 @@ package virtualmachine +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "testing" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go index bcdef2d17..3a7859e22 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions.go @@ -2,6 +2,20 @@ package virtualmachine +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go index 2748719ef..5677fd454 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachine/resourceextensions_test.go @@ -2,6 +2,20 @@ package virtualmachine +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "testing" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go index 465363bcf..972c0de55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/client.go @@ -3,6 +3,20 @@ // Package virtualmachinedisk provides a client for Virtual Machine Disks. package virtualmachinedisk +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go index 3b5adb347..84a389455 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachinedisk/entities.go @@ -2,6 +2,20 @@ package virtualmachinedisk +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go index bff906c19..f78c739aa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/client.go @@ -3,6 +3,20 @@ // Package virtualmachineimage provides a client for Virtual Machine Images. package virtualmachineimage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go index e719d56b1..b12198456 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities.go @@ -2,6 +2,20 @@ package virtualmachineimage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go index ca2490e3f..b1b7f0f78 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualmachineimage/entities_test.go @@ -2,6 +2,20 @@ package virtualmachineimage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "testing" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go index 2e1f166fb..a15b0957e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/client.go @@ -3,6 +3,20 @@ // Package virtualnetwork provides a client for Virtual Networks. package virtualnetwork +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go index 4e22db32a..cd596a7ab 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/virtualnetwork/entities.go @@ -2,6 +2,20 @@ package virtualnetwork +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go index f8c163332..8afb6dc71 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/configurationset.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( vm "github.com/Azure/azure-sdk-for-go/management/virtualmachine" ) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go index fbf04f6be..5cbb904bd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/datadisks.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go index 788972a1e..e597b4022 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/deployment.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go index e82ad0e26..2ccd09464 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/base64" "encoding/json" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go index cb4d4a0af..c02e1cea0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/extensions_test.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "testing" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go index 5239c322f..943661906 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/integration_test.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/base64" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go index f06f43175..b545d7a47 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/network.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go index 44327b53c..5e6ab08b3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolesize.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go index bc753ad7d..82bc82345 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/rolestate.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "time" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go index 25df9cede..7cf35a7b2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils.go @@ -4,6 +4,20 @@ // Machine Role configurations. package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go index 48219f91f..a23241cb4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/management/vmutils/vmutils_test.go @@ -2,6 +2,20 @@ package vmutils +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "testing" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/README.md b/vendor/github.com/Azure/azure-sdk-for-go/storage/README.md new file mode 100644 index 000000000..6dc348e02 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/README.md @@ -0,0 +1,73 @@ +# Azure Storage SDK for Go + +The `github.com/Azure/azure-sdk-for-go/storage` package is used to perform REST operations against the [Azure Storage Service](https://docs.microsoft.com/en-us/azure/storage/). To manage your storage accounts (Azure Resource Manager / ARM), use the [github.com/Azure/azure-sdk-for-go/arm/storage](https://github.com/Azure/azure-sdk-for-go/tree/master/arm/storage) package. For your classic storage accounts (Azure Service Management / ASM), use [github.com/Azure/azure-sdk-for-go/management/storageservice](https://github.com/Azure/azure-sdk-for-go/tree/master/management/storageservice) package. + +This package includes support for [Azure Storage Emulator](https://azure.microsoft.com/documentation/articles/storage-use-emulator/). + +# Getting Started + + 1. Go get the SDK `go get -u github.com/Azure/azure-sdk-for=go/storage` + 1. If you don't already have one, [create a Storage Account](https://docs.microsoft.com/en-us/azure/storage/storage-create-storage-account). + - Take note of your Azure Storage Account Name and Azure Storage Account Key. They'll both be necessary for using this library. + - This option is production ready, but can also be used for development. + 1. (Optional, Windows only) Download and start the [Azure Storage Emulator](https://azure.microsoft.com/documentation/articles/storage-use-emulator/). + 1. Checkout our existing [samples](https://github.com/Azure-Samples?q=Storage&language=go). + +# Contributing + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +When contributing, please conform to the following practices: + - Run [gofmt](https://golang.org/cmd/gofmt/) to use standard go formatting. + - Run [golint](https://github.com/golang/lint) to conform to standard naming conventions. + - Run [go vet](https://golang.org/cmd/vet/) to catch common Go mistakes. + - Use [GoASTScanner/gas](https://github.com/GoASTScanner/gas) to ensure there are no common security violations in your contribution. + - Run [go test](https://golang.org/cmd/go/#hdr-Test_packages) to catch possible bugs in the code: `go test ./storage/...`. + - This project uses HTTP recordings for testing. + - The recorder should be attached to the client before calling the functions to test and later stopped. + - If you updated an existing test, its recording might need to be updated. Run `go test ./storage/... -ow -check.f TestName` to rerecord the test. + - Important note: all HTTP requests in the recording must be unique: different bodies, headers (`User-Agent`, `Authorization` and `Date` or `x-ms-date` headers are ignored), URLs and methods. As opposed to the example above, the following test is not suitable for recording: + +``` go +func (s *StorageQueueSuite) TestQueueExists(c *chk.C) { +cli := getQueueClient(c) +rec := cli.client.appendRecorder(c) +defer rec.Stop() + +queue := cli.GetQueueReference(queueName(c)) +ok, err := queue.Exists() +c.Assert(err, chk.IsNil) +c.Assert(ok, chk.Equals, false) + +c.Assert(queue.Create(nil), chk.IsNil) +defer queue.Delete(nil) + +ok, err = queue.Exists() // This is the very same request as the one 5 lines above +// The test replayer gets confused and the test fails in the last line +c.Assert(err, chk.IsNil) +c.Assert(ok, chk.Equals, true) +} +``` + + - On the other side, this test does not repeat requests: the URLs are different. + +``` go +func (s *StorageQueueSuite) TestQueueExists(c *chk.C) { +cli := getQueueClient(c) +rec := cli.client.appendRecorder(c) +defer rec.Stop() + +queue1 := cli.GetQueueReference(queueName(c, "nonexistent")) +ok, err := queue1.Exists() +c.Assert(err, chk.IsNil) +c.Assert(ok, chk.Equals, false) + +queue2 := cli.GetQueueReference(queueName(c, "exisiting")) +c.Assert(queue2.Create(nil), chk.IsNil) +defer queue2.Delete(nil) + +ok, err = queue2.Exists() +c.Assert(err, chk.IsNil) +c.Assert(ok, chk.Equals, true) +} +``` \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob.go index c13d409b7..8b5b96d48 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob.go @@ -1,7 +1,23 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" + "crypto/md5" + "encoding/base64" "fmt" "net/http" "net/url" @@ -31,8 +47,7 @@ func (b *Blob) PutAppendBlob(options *PutBlobOptions) error { if err != nil { return err } - readAndCloseBody(resp.body) - return checkRespCode(resp.statusCode, []int{http.StatusCreated}) + return b.respondCreation(resp, BlobTypeAppend) } // AppendBlockOptions includes the options for an append block operation @@ -46,6 +61,7 @@ type AppendBlockOptions struct { IfMatch string `header:"If-Match"` IfNoneMatch string `header:"If-None-Match"` RequestID string `header:"x-ms-client-request-id"` + ContentMD5 bool } // AppendBlock appends a block to an append blob. @@ -60,6 +76,10 @@ func (b *Blob) AppendBlock(chunk []byte, options *AppendBlockOptions) error { if options != nil { params = addTimeout(params, options.Timeout) headers = mergeHeaders(headers, headersFromStruct(*options)) + if options.ContentMD5 { + md5sum := md5.Sum(chunk) + headers[headerContentMD5] = base64.StdEncoding.EncodeToString(md5sum[:]) + } } uri := b.Container.bsc.client.getEndpoint(blobServiceName, b.buildPath(), params) @@ -67,6 +87,5 @@ func (b *Blob) AppendBlock(chunk []byte, options *AppendBlockOptions) error { if err != nil { return err } - readAndCloseBody(resp.body) - return checkRespCode(resp.statusCode, []int{http.StatusCreated}) + return b.respondCreation(resp, BlobTypeAppend) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob_test.go index 23f2a6e08..035bfbe0c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/appendblob_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "io/ioutil" @@ -62,7 +76,10 @@ func (s *AppendBlobSuite) TestPutAppendBlobAppendBlocks(c *chk.C) { c.Assert(blobContents, chk.DeepEquals, chunk1) // Append second block - c.Assert(b.AppendBlock(chunk2, nil), chk.IsNil) + op := AppendBlockOptions{ + ContentMD5: true, + } + c.Assert(b.AppendBlock(chunk2, &op), chk.IsNil) // Verify contents options.Range.End = uint64(len(chunk1) + len(chunk2) - 1) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go index d4ad5da27..76794c305 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization.go @@ -1,6 +1,20 @@ // Package storage provides clients for Microsoft Azure Storage Services. package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "fmt" @@ -41,11 +55,13 @@ const ( ) func (c *Client) addAuthorizationHeader(verb, url string, headers map[string]string, auth authentication) (map[string]string, error) { - authHeader, err := c.getSharedKey(verb, url, headers, auth) - if err != nil { - return nil, err + if !c.sasClient { + authHeader, err := c.getSharedKey(verb, url, headers, auth) + if err != nil { + return nil, err + } + headers[headerAuthorization] = authHeader } - headers[headerAuthorization] = authHeader return headers, nil } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go index 1130d0f80..5da3251e8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/authorization_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/base64" "net/http" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go index 12f61ac2a..0e48f3894 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "errors" @@ -135,8 +149,7 @@ func (b *Blob) Exists() (bool, error) { } // GetURL gets the canonical URL to the blob with the specified name in the -// specified container. If name is not specified, the canonical URL for the entire -// container is obtained. +// specified container. // This method does not create a publicly accessible URL if the blob or container // is private and this method does not check if the blob exists. func (b *Blob) GetURL() string { @@ -437,8 +450,8 @@ func (b *Blob) SetProperties(options *SetBlobPropertiesOptions) error { uri := b.Container.bsc.client.getEndpoint(blobServiceName, b.buildPath(), params) if b.Properties.BlobType == BlobTypePage { - headers = addToHeaders(headers, "x-ms-blob-content-length", fmt.Sprintf("byte %v", b.Properties.ContentLength)) - if options != nil || options.SequenceNumberAction != nil { + headers = addToHeaders(headers, "x-ms-blob-content-length", fmt.Sprintf("%v", b.Properties.ContentLength)) + if options != nil && options.SequenceNumberAction != nil { headers = addToHeaders(headers, "x-ms-sequence-number-action", string(*options.SequenceNumberAction)) if *options.SequenceNumberAction != SequenceNumberActionIncrement { headers = addToHeaders(headers, "x-ms-blob-sequence-number", fmt.Sprintf("%v", b.Properties.SequenceNumber)) @@ -627,3 +640,13 @@ func pathForResource(container, name string) string { } return fmt.Sprintf("/%s", container) } + +func (b *Blob) respondCreation(resp *storageResponse, bt BlobType) error { + readAndCloseBody(resp.body) + err := checkRespCode(resp.statusCode, []int{http.StatusCreated}) + if err != nil { + return err + } + b.Properties.BlobType = bt + return nil +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob_test.go index 9009b37c8..cebb03eaa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blob_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blob_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/xml" @@ -312,6 +326,26 @@ func (s *StorageBlobSuite) TestSetBlobProperties(c *chk.C) { c.Check(b.Properties.ContentLanguage, chk.Equals, input.ContentLanguage) } +func (s *StorageBlobSuite) TestSetPageBlobProperties(c *chk.C) { + cli := getBlobClient(c) + rec := cli.client.appendRecorder(c) + defer rec.Stop() + + cnt := cli.GetContainerReference(containerName(c)) + b := cnt.GetBlobReference(blobName(c)) + c.Assert(cnt.Create(nil), chk.IsNil) + defer cnt.Delete(nil) + + size := int64(1024) + b.Properties.ContentLength = size + c.Assert(b.PutPageBlob(nil), chk.IsNil) + + b.Properties.ContentLength = int64(512) + options := SetBlobPropertiesOptions{Timeout: 30} + err := b.SetProperties(&options) + c.Assert(err, chk.IsNil) +} + func (s *StorageBlobSuite) TestSnapshotBlob(c *chk.C) { cli := getBlobClient(c) rec := cli.client.appendRecorder(c) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go index 8f0864e34..e11af7744 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "errors" "fmt" @@ -8,70 +22,122 @@ import ( "time" ) -// GetSASURIWithSignedIPAndProtocol creates an URL to the specified blob which contains the Shared -// Access Signature with specified permissions and expiration time. Also includes signedIPRange and allowed protocols. -// If old API version is used but no signedIP is passed (ie empty string) then this should still work. -// We only populate the signedIP when it non-empty. +// OverrideHeaders defines overridable response heaedrs in +// a request using a SAS URI. +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas +type OverrideHeaders struct { + CacheControl string + ContentDisposition string + ContentEncoding string + ContentLanguage string + ContentType string +} + +// BlobSASOptions are options to construct a blob SAS +// URI. +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas +type BlobSASOptions struct { + BlobServiceSASPermissions + OverrideHeaders + SASOptions +} + +// BlobServiceSASPermissions includes the available permissions for +// blob service SAS URI. +type BlobServiceSASPermissions struct { + Read bool + Add bool + Create bool + Write bool + Delete bool +} + +func (p BlobServiceSASPermissions) buildString() string { + permissions := "" + if p.Read { + permissions += "r" + } + if p.Add { + permissions += "a" + } + if p.Create { + permissions += "c" + } + if p.Write { + permissions += "w" + } + if p.Delete { + permissions += "d" + } + return permissions +} + +// GetSASURI creates an URL to the blob which contains the Shared +// Access Signature with the specified options. // -// See https://msdn.microsoft.com/en-us/library/azure/ee395415.aspx -func (b *Blob) GetSASURIWithSignedIPAndProtocol(expiry time.Time, permissions string, signedIPRange string, HTTPSOnly bool) (string, error) { - var ( - signedPermissions = permissions - blobURL = b.GetURL() - ) - canonicalizedResource, err := b.Container.bsc.client.buildCanonicalizedResource(blobURL, b.Container.bsc.auth, true) +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas +func (b *Blob) GetSASURI(options BlobSASOptions) (string, error) { + uri := b.GetURL() + signedResource := "b" + canonicalizedResource, err := b.Container.bsc.client.buildCanonicalizedResource(uri, b.Container.bsc.auth, true) if err != nil { return "", err } - // "The canonicalizedresouce portion of the string is a canonical path to the signed resource. - // It must include the service name (blob, table, queue or file) for version 2015-02-21 or - // later, the storage account name, and the resource name, and must be URL-decoded. - // -- https://msdn.microsoft.com/en-us/library/azure/dn140255.aspx + permissions := options.BlobServiceSASPermissions.buildString() + return b.Container.bsc.client.blobAndFileSASURI(options.SASOptions, uri, permissions, canonicalizedResource, signedResource, options.OverrideHeaders) +} + +func (c *Client) blobAndFileSASURI(options SASOptions, uri, permissions, canonicalizedResource, signedResource string, headers OverrideHeaders) (string, error) { + start := "" + if options.Start != (time.Time{}) { + start = options.Start.UTC().Format(time.RFC3339) + } + + expiry := options.Expiry.UTC().Format(time.RFC3339) // We need to replace + with %2b first to avoid being treated as a space (which is correct for query strings, but not the path component). canonicalizedResource = strings.Replace(canonicalizedResource, "+", "%2b", -1) - canonicalizedResource, err = url.QueryUnescape(canonicalizedResource) + canonicalizedResource, err := url.QueryUnescape(canonicalizedResource) if err != nil { return "", err } - signedExpiry := expiry.UTC().Format(time.RFC3339) - - //If blob name is missing, resource is a container - signedResource := "c" - if len(b.Name) > 0 { - signedResource = "b" - } - protocols := "" - if HTTPSOnly { + if options.UseHTTPS { protocols = "https" } - stringToSign, err := blobSASStringToSign(b.Container.bsc.client.apiVersion, canonicalizedResource, signedExpiry, signedPermissions, signedIPRange, protocols) + stringToSign, err := blobSASStringToSign(permissions, start, expiry, canonicalizedResource, options.Identifier, options.IP, protocols, c.apiVersion, headers) if err != nil { return "", err } - sig := b.Container.bsc.client.computeHmac256(stringToSign) + sig := c.computeHmac256(stringToSign) sasParams := url.Values{ - "sv": {b.Container.bsc.client.apiVersion}, - "se": {signedExpiry}, + "sv": {c.apiVersion}, + "se": {expiry}, "sr": {signedResource}, - "sp": {signedPermissions}, + "sp": {permissions}, "sig": {sig}, } - if b.Container.bsc.client.apiVersion >= "2015-04-05" { + if c.apiVersion >= "2015-04-05" { if protocols != "" { sasParams.Add("spr", protocols) } - if signedIPRange != "" { - sasParams.Add("sip", signedIPRange) + if options.IP != "" { + sasParams.Add("sip", options.IP) } } - sasURL, err := url.Parse(blobURL) + // Add override response hedaers + addQueryParameter(sasParams, "rscc", headers.CacheControl) + addQueryParameter(sasParams, "rscd", headers.ContentDisposition) + addQueryParameter(sasParams, "rsce", headers.ContentEncoding) + addQueryParameter(sasParams, "rscl", headers.ContentLanguage) + addQueryParameter(sasParams, "rsct", headers.ContentType) + + sasURL, err := url.Parse(uri) if err != nil { return "", err } @@ -79,16 +145,12 @@ func (b *Blob) GetSASURIWithSignedIPAndProtocol(expiry time.Time, permissions st return sasURL.String(), nil } -// GetSASURI creates an URL to the specified blob which contains the Shared -// Access Signature with specified permissions and expiration time. -// -// See https://msdn.microsoft.com/en-us/library/azure/ee395415.aspx -func (b *Blob) GetSASURI(expiry time.Time, permissions string) (string, error) { - return b.GetSASURIWithSignedIPAndProtocol(expiry, permissions, "", false) -} - -func blobSASStringToSign(signedVersion, canonicalizedResource, signedExpiry, signedPermissions string, signedIP string, protocols string) (string, error) { - var signedStart, signedIdentifier, rscc, rscd, rsce, rscl, rsct string +func blobSASStringToSign(signedPermissions, signedStart, signedExpiry, canonicalizedResource, signedIdentifier, signedIP, protocols, signedVersion string, headers OverrideHeaders) (string, error) { + rscc := headers.CacheControl + rscd := headers.ContentDisposition + rsce := headers.ContentEncoding + rscl := headers.ContentLanguage + rsct := headers.ContentType if signedVersion >= "2015-02-21" { canonicalizedResource = "/blob" + canonicalizedResource diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go index 2bfda5bc5..b69aab0d8 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobsasuri_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "io/ioutil" "net/http" @@ -22,7 +36,6 @@ func (s *BlobSASURISuite) TestGetBlobSASURI(c *chk.C) { cli := api.GetBlobService() cnt := cli.GetContainerReference("container") b := cnt.GetBlobReference("name") - expiry := time.Time{} expectedParts := url.URL{ Scheme: "https", @@ -34,9 +47,14 @@ func (s *BlobSASURISuite) TestGetBlobSASURI(c *chk.C) { "sr": {"b"}, "sp": {"r"}, "se": {"0001-01-01T00:00:00Z"}, - }.Encode()} + }.Encode(), + } - u, err := b.GetSASURI(expiry, "r") + sasuriOptions := BlobSASOptions{} + sasuriOptions.Read = true + sasuriOptions.UseHTTPS = true + + u, err := b.GetSASURI(sasuriOptions) c.Assert(err, chk.IsNil) sasParts, err := url.Parse(u) c.Assert(err, chk.IsNil) @@ -50,8 +68,6 @@ func (s *BlobSASURISuite) TestGetBlobSASURIContainer(c *chk.C) { c.Assert(err, chk.IsNil) cli := api.GetBlobService() cnt := cli.GetContainerReference("container") - b := cnt.GetBlobReference("") - expiry := time.Time{} expectedParts := url.URL{ Scheme: "https", @@ -63,9 +79,13 @@ func (s *BlobSASURISuite) TestGetBlobSASURIContainer(c *chk.C) { "sr": {"c"}, "sp": {"r"}, "se": {"0001-01-01T00:00:00Z"}, - }.Encode()} + }.Encode(), + } - u, err := b.GetSASURI(expiry, "r") + sasuriOptions := ContainerSASOptions{} + sasuriOptions.Read = true + + u, err := cnt.GetSASURI(sasuriOptions) c.Assert(err, chk.IsNil) sasParts, err := url.Parse(u) c.Assert(err, chk.IsNil) @@ -79,7 +99,6 @@ func (s *BlobSASURISuite) TestGetBlobSASURIWithSignedIPAndProtocolValidAPIVersio cli := api.GetBlobService() cnt := cli.GetContainerReference("container") b := cnt.GetBlobReference("name") - expiry := time.Time{} expectedParts := url.URL{ Scheme: "https", @@ -93,9 +112,15 @@ func (s *BlobSASURISuite) TestGetBlobSASURIWithSignedIPAndProtocolValidAPIVersio "sp": {"r"}, "se": {"0001-01-01T00:00:00Z"}, "spr": {"https"}, - }.Encode()} + }.Encode(), + } - u, err := b.GetSASURIWithSignedIPAndProtocol(expiry, "r", "127.0.0.1", true) + sasuriOptions := BlobSASOptions{} + sasuriOptions.Read = true + sasuriOptions.IP = "127.0.0.1" + sasuriOptions.UseHTTPS = true + + u, err := b.GetSASURI(sasuriOptions) c.Assert(err, chk.IsNil) sasParts, err := url.Parse(u) c.Assert(err, chk.IsNil) @@ -110,7 +135,6 @@ func (s *BlobSASURISuite) TestGetBlobSASURIWithSignedIPAndProtocolUsingOldAPIVer cli := api.GetBlobService() cnt := cli.GetContainerReference("container") b := cnt.GetBlobReference("name") - expiry := time.Time{} expectedParts := url.URL{ Scheme: "https", @@ -122,9 +146,14 @@ func (s *BlobSASURISuite) TestGetBlobSASURIWithSignedIPAndProtocolUsingOldAPIVer "sr": {"b"}, "sp": {"r"}, "se": {"0001-01-01T00:00:00Z"}, - }.Encode()} + }.Encode(), + } - u, err := b.GetSASURIWithSignedIPAndProtocol(expiry, "r", "", true) + sasuriOptions := BlobSASOptions{} + sasuriOptions.Read = true + sasuriOptions.UseHTTPS = true + + u, err := b.GetSASURI(sasuriOptions) c.Assert(err, chk.IsNil) sasParts, err := url.Parse(u) c.Assert(err, chk.IsNil) @@ -134,11 +163,6 @@ func (s *BlobSASURISuite) TestGetBlobSASURIWithSignedIPAndProtocolUsingOldAPIVer func (s *BlobSASURISuite) TestBlobSASURICorrectness(c *chk.C) { cli := getBlobClient(c) - - if cli.client.usesDummies() { - c.Skip("As GetSASURI result depends on the account key, it is not practical to test it with a dummy key.") - } - simpleClient := &http.Client{} rec := cli.client.appendRecorder(c) simpleClient.Transport = rec @@ -150,12 +174,13 @@ func (s *BlobSASURISuite) TestBlobSASURICorrectness(c *chk.C) { defer cnt.Delete(nil) body := content(100) - expiry := fixedTime.UTC().Add(time.Hour) - permissions := "r" - c.Assert(b.putSingleBlockBlob(body), chk.IsNil) - sasURI, err := b.GetSASURI(expiry, permissions) + sasuriOptions := BlobSASOptions{} + sasuriOptions.Expiry = fixedTime.UTC().Add(time.Hour) + sasuriOptions.Read = true + + sasURI, err := b.GetSASURI(sasuriOptions) c.Assert(err, chk.IsNil) resp, err := simpleClient.Get(sasURI) @@ -171,15 +196,15 @@ func (s *BlobSASURISuite) TestBlobSASURICorrectness(c *chk.C) { } func (s *BlobSASURISuite) Test_blobSASStringToSign(c *chk.C) { - _, err := blobSASStringToSign("2012-02-12", "CS", "SE", "SP", "", "") + _, err := blobSASStringToSign("2012-02-12", "CS", "SE", "SP", "", "", "", "", OverrideHeaders{}) c.Assert(err, chk.NotNil) // not implemented SAS for versions earlier than 2013-08-15 - out, err := blobSASStringToSign(oldAPIVer, "CS", "SE", "SP", "", "") + out, err := blobSASStringToSign("SP", "", "SE", "CS", "", "", "", oldAPIVer, OverrideHeaders{}) c.Assert(err, chk.IsNil) c.Assert(out, chk.Equals, "SP\n\nSE\nCS\n\n2013-08-15\n\n\n\n\n") // check format for 2015-04-05 version - out, err = blobSASStringToSign(newerAPIVer, "CS", "SE", "SP", "127.0.0.1", "https,http") + out, err = blobSASStringToSign("SP", "", "SE", "CS", "", "127.0.0.1", "https,http", newerAPIVer, OverrideHeaders{}) c.Assert(err, chk.IsNil) c.Assert(out, chk.Equals, "SP\n\nSE\n/blobCS\n\n127.0.0.1\nhttps,http\n2015-04-05\n\n\n\n\n") } @@ -190,7 +215,15 @@ func (s *BlobSASURISuite) TestGetBlobSASURIStorageEmulator(c *chk.C) { blobService := client.GetBlobService() container := blobService.GetContainerReference("testfolder") blob := container.GetBlobReference("testfile") - url, err := blob.GetSASURI(time.Date(2017, 9, 30, 16, 0, 0, 0, time.UTC), "w") + options := BlobSASOptions{ + SASOptions: SASOptions{ + Expiry: time.Date(2017, 9, 30, 16, 0, 0, 0, time.UTC), + }, + BlobServiceSASPermissions: BlobServiceSASPermissions{ + Write: true, + }, + } + url, err := blob.GetSASURI(options) c.Assert(err, chk.IsNil) c.Assert(url, chk.Equals, "http://127.0.0.1:10000/devstoreaccount1/testfolder/testfile?se=2017-09-30T16%3A00%3A00Z&sig=Tyrg2ccc0RXyRz5xfkcSVDvjjoRivygrGb%2ByTLf0jJY%3D&sp=w&sr=b&sv=2016-05-31") } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go index 450b20f96..8fe21b0cf 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blobserviceclient.go @@ -1,9 +1,25 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( + "fmt" "net/http" "net/url" "strconv" + "strings" ) // BlobStorageClient contains operations for Microsoft Azure Blob Storage @@ -45,6 +61,21 @@ func (b *BlobStorageClient) GetContainerReference(name string) *Container { } } +// GetContainerReferenceFromSASURI returns a Container object for the specified +// container SASURI +func GetContainerReferenceFromSASURI(sasuri url.URL) (*Container, error) { + path := strings.Split(sasuri.Path, "/") + if len(path) <= 1 { + return nil, fmt.Errorf("could not find a container in URI: %s", sasuri.String()) + } + cli := newSASClient().GetBlobService() + return &Container{ + bsc: &cli, + Name: path[1], + sasuri: sasuri, + }, nil +} + // ListContainers returns the list of containers in a storage account along with // pagination token and other response details. // diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob.go index 5258f24fd..e0176d664 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/xml" @@ -132,8 +146,7 @@ func (b *Blob) CreateBlockBlobFromReader(blob io.Reader, options *PutBlobOptions if err != nil { return err } - readAndCloseBody(resp.body) - return checkRespCode(resp.statusCode, []int{http.StatusCreated}) + return b.respondCreation(resp, BlobTypeBlock) } // PutBlockOptions includes the options for a put block operation @@ -181,8 +194,7 @@ func (b *Blob) PutBlockWithLength(blockID string, size uint64, blob io.Reader, o if err != nil { return err } - readAndCloseBody(resp.body) - return checkRespCode(resp.statusCode, []int{http.StatusCreated}) + return b.respondCreation(resp, BlobTypeBlock) } // PutBlockListOptions includes the options for a put block list operation diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob_test.go index d10bd3a22..d9f86e8aa 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/blockblob_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/base64" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go index 42fa702f6..8f6cd95da 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/client.go @@ -1,6 +1,20 @@ // Package storage provides clients for Microsoft Azure Storage Services. package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bufio" "bytes" @@ -33,7 +47,9 @@ const ( // basic client is created. DefaultAPIVersion = "2016-05-31" - defaultUseHTTPS = true + defaultUseHTTPS = true + defaultRetryAttempts = 5 + defaultRetryDuration = time.Second * 5 // StorageEmulatorAccountName is the fixed storage account used by Azure Storage Emulator StorageEmulatorAccountName = "devstoreaccount1" @@ -56,7 +72,14 @@ const ( ) var ( - validStorageAccount = regexp.MustCompile("^[0-9a-z]{3,24}$") + validStorageAccount = regexp.MustCompile("^[0-9a-z]{3,24}$") + defaultValidStatusCodes = []int{ + http.StatusRequestTimeout, // 408 + http.StatusInternalServerError, // 500 + http.StatusBadGateway, // 502 + http.StatusServiceUnavailable, // 503 + http.StatusGatewayTimeout, // 504 + } ) // Sender sends a request @@ -112,6 +135,8 @@ type Client struct { baseURL string apiVersion string userAgent string + sasClient bool + accountSASToken url.Values } type storageResponse struct { @@ -206,13 +231,13 @@ func NewEmulatorClient() (Client, error) { // NewClient constructs a Client. This should be used if the caller wants // to specify whether to use HTTPS, a specific REST API version or a custom // storage endpoint than Azure Public Cloud. -func NewClient(accountName, accountKey, blobServiceBaseURL, apiVersion string, useHTTPS bool) (Client, error) { +func NewClient(accountName, accountKey, serviceBaseURL, apiVersion string, useHTTPS bool) (Client, error) { var c Client if !IsValidStorageAccount(accountName) { return c, fmt.Errorf("azure: account name is not valid: it must be between 3 and 24 characters, and only may contain numbers and lowercase letters: %v", accountName) } else if accountKey == "" { return c, fmt.Errorf("azure: account key required") - } else if blobServiceBaseURL == "" { + } else if serviceBaseURL == "" { return c, fmt.Errorf("azure: base storage service url required") } @@ -226,19 +251,14 @@ func NewClient(accountName, accountKey, blobServiceBaseURL, apiVersion string, u accountName: accountName, accountKey: key, useHTTPS: useHTTPS, - baseURL: blobServiceBaseURL, + baseURL: serviceBaseURL, apiVersion: apiVersion, + sasClient: false, UseSharedKeyLite: false, Sender: &DefaultSender{ - RetryAttempts: 5, - ValidStatusCodes: []int{ - http.StatusRequestTimeout, // 408 - http.StatusInternalServerError, // 500 - http.StatusBadGateway, // 502 - http.StatusServiceUnavailable, // 503 - http.StatusGatewayTimeout, // 504 - }, - RetryDuration: time.Second * 5, + RetryAttempts: defaultRetryAttempts, + ValidStatusCodes: defaultValidStatusCodes, + RetryDuration: defaultRetryDuration, }, } c.userAgent = c.getDefaultUserAgent() @@ -251,6 +271,43 @@ func IsValidStorageAccount(account string) bool { return validStorageAccount.MatchString(account) } +// NewAccountSASClient contructs a client that uses accountSAS authorization +// for its operations. +func NewAccountSASClient(account string, token url.Values, env azure.Environment) Client { + c := newSASClient() + c.accountSASToken = token + c.accountName = account + c.baseURL = env.StorageEndpointSuffix + + // Get API version and protocol from token + c.apiVersion = token.Get("sv") + c.useHTTPS = token.Get("spr") == "https" + return c +} + +func newSASClient() Client { + c := Client{ + HTTPClient: http.DefaultClient, + apiVersion: DefaultAPIVersion, + sasClient: true, + Sender: &DefaultSender{ + RetryAttempts: defaultRetryAttempts, + ValidStatusCodes: defaultValidStatusCodes, + RetryDuration: defaultRetryDuration, + }, + } + c.userAgent = c.getDefaultUserAgent() + return c +} + +func (c Client) isServiceSASClient() bool { + return c.sasClient && c.accountSASToken == nil +} + +func (c Client) isAccountSASClient() bool { + return c.sasClient && c.accountSASToken != nil +} + func (c Client) getDefaultUserAgent() string { return fmt.Sprintf("Go/%s (%s-%s) azure-storage-go/%s api-version/%s", runtime.Version(), @@ -323,6 +380,164 @@ func (c Client) getEndpoint(service, path string, params url.Values) string { return u.String() } +// AccountSASTokenOptions includes options for constructing +// an account SAS token. +// https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas +type AccountSASTokenOptions struct { + APIVersion string + Services Services + ResourceTypes ResourceTypes + Permissions Permissions + Start time.Time + Expiry time.Time + IP string + UseHTTPS bool +} + +// Services specify services accessible with an account SAS. +type Services struct { + Blob bool + Queue bool + Table bool + File bool +} + +// ResourceTypes specify the resources accesible with an +// account SAS. +type ResourceTypes struct { + Service bool + Container bool + Object bool +} + +// Permissions specifies permissions for an accountSAS. +type Permissions struct { + Read bool + Write bool + Delete bool + List bool + Add bool + Create bool + Update bool + Process bool +} + +// GetAccountSASToken creates an account SAS token +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas +func (c Client) GetAccountSASToken(options AccountSASTokenOptions) (url.Values, error) { + if options.APIVersion == "" { + options.APIVersion = c.apiVersion + } + + if options.APIVersion < "2015-04-05" { + return url.Values{}, fmt.Errorf("account SAS does not support API versions prior to 2015-04-05. API version : %s", options.APIVersion) + } + + // build services string + services := "" + if options.Services.Blob { + services += "b" + } + if options.Services.Queue { + services += "q" + } + if options.Services.Table { + services += "t" + } + if options.Services.File { + services += "f" + } + + // build resources string + resources := "" + if options.ResourceTypes.Service { + resources += "s" + } + if options.ResourceTypes.Container { + resources += "c" + } + if options.ResourceTypes.Object { + resources += "o" + } + + // build permissions string + permissions := "" + if options.Permissions.Read { + permissions += "r" + } + if options.Permissions.Write { + permissions += "w" + } + if options.Permissions.Delete { + permissions += "d" + } + if options.Permissions.List { + permissions += "l" + } + if options.Permissions.Add { + permissions += "a" + } + if options.Permissions.Create { + permissions += "c" + } + if options.Permissions.Update { + permissions += "u" + } + if options.Permissions.Process { + permissions += "p" + } + + // build start time, if exists + start := "" + if options.Start != (time.Time{}) { + start = options.Start.Format(time.RFC3339) + // For some reason I don't understand, it fails when the rest of the string is included + start = start[:10] + } + + // build expiry time + expiry := options.Expiry.Format(time.RFC3339) + // For some reason I don't understand, it fails when the rest of the string is included + expiry = expiry[:10] + + protocol := "https,http" + if options.UseHTTPS { + protocol = "https" + } + + stringToSign := strings.Join([]string{ + c.accountName, + permissions, + services, + resources, + start, + expiry, + options.IP, + protocol, + options.APIVersion, + "", + }, "\n") + signature := c.computeHmac256(stringToSign) + + sasParams := url.Values{ + "sv": {options.APIVersion}, + "ss": {services}, + "srt": {resources}, + "sp": {permissions}, + "se": {expiry}, + "spr": {protocol}, + "sig": {signature}, + } + if start != "" { + sasParams.Add("st", start) + } + if options.IP != "" { + sasParams.Add("sip", options.IP) + } + + return sasParams, nil +} + // GetBlobService returns a BlobStorageClient which can operate on the blob // service of the storage account. func (c Client) GetBlobService() BlobStorageClient { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/client_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/client_test.go index d7459c047..5b721a663 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/client_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/client_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/base64" @@ -72,6 +86,16 @@ func getBasicClient(c *chk.C) *Client { func (client *Client) appendRecorder(c *chk.C) *recorder.Recorder { tests := strings.Split(c.TestName(), ".") path := filepath.Join(recordingsFolder, tests[0], tests[1]) + + if overwriteRec { + fullPath := filepath.Join(pwd, path+".yaml") + _, err := os.Stat(fullPath) + if err == nil { + err := os.Remove(fullPath) + c.Assert(err, chk.IsNil) + } + } + rec, err := recorder.New(path) c.Assert(err, chk.IsNil) client.HTTPClient = &http.Client{ @@ -103,14 +127,24 @@ func compareMethods(r *http.Request, i cassette.Request) bool { } func compareURLs(r *http.Request, i cassette.Request) bool { - newURL := modifyURL(r.URL) - return newURL.String() == i.URL + requestURL := modifyURL(r.URL) + + cassetteURL, err := url.Parse(i.URL) + if err != nil { + return false + } + + err = removeSAS(cassetteURL) + if err != nil { + return false + } + return requestURL.String() == cassetteURL.String() } -func modifyURL(url *url.URL) *url.URL { +func modifyURL(uri *url.URL) *url.URL { // The URL host looks like this... // accountname.service.storageEndpointSuffix - parts := strings.Split(url.Host, ".") + parts := strings.Split(uri.Host, ".") // parts[0] corresponds to the storage account name, so it can be (almost) any string // parts[1] corresponds to the service name (table, blob, etc.). if !(parts[1] == blobServiceName || @@ -129,11 +163,29 @@ func modifyURL(url *url.URL) *url.URL { } host := dummyStorageAccount + "." + parts[1] + "." + azure.PublicCloud.StorageEndpointSuffix - newURL := url + newURL := uri newURL.Host = host + + err := removeSAS(newURL) + if err != nil { + return nil + } return newURL } +func removeSAS(uri *url.URL) error { + // Remove signature from a SAS URI + v := uri.Query() + v.Del("sig") + + q, err := url.QueryUnescape(v.Encode()) + if err != nil { + return err + } + uri.RawQuery = q + return nil +} + func compareHeaders(r *http.Request, i cassette.Request) bool { requestHeaders := r.Header cassetteHeaders := i.Headers @@ -517,7 +569,7 @@ func (s *StorageClientSuite) Test_doRetry(c *chk.C) { c.Assert(resp.StatusCode, chk.Equals, http.StatusNotFound) // Was it the correct amount of retries... ? - c.Assert(cli.Sender.(*DefaultSender).attempts, chk.Equals, cli.Sender.(*DefaultSender).RetryAttempts) + c.Assert(cli.Sender.(*DefaultSender).attempts, chk.Equals, ds.RetryAttempts) // What about time... ? // Note, seconds are rounded sum := 0 @@ -525,4 +577,57 @@ func (s *StorageClientSuite) Test_doRetry(c *chk.C) { sum += int(ds.RetryDuration.Seconds() * math.Pow(2, float64(i))) // same formula used in autorest.DelayForBackoff } c.Assert(int(afterRetries.Seconds()), chk.Equals, sum) + + // Service SAS test + blobCli := getBlobClient(c) + cnt := blobCli.GetContainerReference(containerName(c)) + sasuriOptions := ContainerSASOptions{} + sasuriOptions.Expiry = fixedTime + sasuriOptions.Read = true + sasuriOptions.Add = true + sasuriOptions.Create = true + sasuriOptions.Write = true + sasuriOptions.Delete = true + sasuriOptions.List = true + + sasuriString, err := cnt.GetSASURI(sasuriOptions) + c.Assert(err, chk.IsNil) + + sasuri, err := url.Parse(sasuriString) + c.Assert(err, chk.IsNil) + + cntServiceSAS, err := GetContainerReferenceFromSASURI(*sasuri) + c.Assert(err, chk.IsNil) + cntServiceSAS.Client().HTTPClient = cli.HTTPClient + + // This request will fail with 403 + ds.ValidStatusCodes = []int{http.StatusForbidden} + cntServiceSAS.Client().Sender = ds + + now = time.Now() + _, err = cntServiceSAS.Exists() + afterRetries = time.Since(now) + c.Assert(err, chk.NotNil) + + c.Assert(cntServiceSAS.Client().Sender.(*DefaultSender).attempts, chk.Equals, ds.RetryAttempts) + c.Assert(int(afterRetries.Seconds()), chk.Equals, sum) + + // Account SAS test + token, err := cli.GetAccountSASToken(accountSASOptions) + c.Assert(err, chk.IsNil) + + SAScli := NewAccountSASClient(cli.accountName, token, azure.PublicCloud).GetBlobService() + cntAccountSAS := SAScli.GetContainerReference(cnt.Name) + cntAccountSAS.Client().HTTPClient = cli.HTTPClient + + ds.ValidStatusCodes = []int{http.StatusNotFound} + cntAccountSAS.Client().Sender = ds + + now = time.Now() + _, err = cntAccountSAS.Exists() + afterRetries = time.Since(now) + c.Assert(err, chk.IsNil) + + c.Assert(cntAccountSAS.Client().Sender.(*DefaultSender).attempts, chk.Equals, ds.RetryAttempts) + c.Assert(int(afterRetries.Seconds()), chk.Equals, sum) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/commonsasuri.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/commonsasuri.go new file mode 100644 index 000000000..e898e9bfa --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/commonsasuri.go @@ -0,0 +1,38 @@ +package storage + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "net/url" + "time" +) + +// SASOptions includes options used by SAS URIs for different +// services and resources. +type SASOptions struct { + APIVersion string + Start time.Time + Expiry time.Time + IP string + UseHTTPS bool + Identifier string +} + +func addQueryParameter(query url.Values, key, value string) url.Values { + if value != "" { + query.Add(key, value) + } + return query +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/container.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/container.go index c2c9c055b..8963c7a89 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/container.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/container.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "errors" @@ -18,12 +32,66 @@ type Container struct { Name string `xml:"Name"` Properties ContainerProperties `xml:"Properties"` Metadata map[string]string + sasuri url.URL +} + +// Client returns the HTTP client used by the Container reference. +func (c *Container) Client() *Client { + return &c.bsc.client } func (c *Container) buildPath() string { return fmt.Sprintf("/%s", c.Name) } +// GetURL gets the canonical URL to the container. +// This method does not create a publicly accessible URL if the container +// is private and this method does not check if the blob exists. +func (c *Container) GetURL() string { + container := c.Name + if container == "" { + container = "$root" + } + return c.bsc.client.getEndpoint(blobServiceName, pathForResource(container, ""), nil) +} + +// ContainerSASOptions are options to construct a container SAS +// URI. +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas +type ContainerSASOptions struct { + ContainerSASPermissions + OverrideHeaders + SASOptions +} + +// ContainerSASPermissions includes the available permissions for +// a container SAS URI. +type ContainerSASPermissions struct { + BlobServiceSASPermissions + List bool +} + +// GetSASURI creates an URL to the container which contains the Shared +// Access Signature with the specified options. +// +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas +func (c *Container) GetSASURI(options ContainerSASOptions) (string, error) { + uri := c.GetURL() + signedResource := "c" + canonicalizedResource, err := c.bsc.client.buildCanonicalizedResource(uri, c.bsc.auth, true) + if err != nil { + return "", err + } + + // build permissions string + permissions := options.BlobServiceSASPermissions.buildString() + if options.List { + permissions += "l" + } + + return c.bsc.client.blobAndFileSASURI(options.SASOptions, uri, permissions, canonicalizedResource, signedResource, options.OverrideHeaders) +} + // ContainerProperties contains various properties of a container returned from // various endpoints like ListContainers. type ContainerProperties struct { @@ -224,7 +292,20 @@ func (c *Container) create(options *CreateContainerOptions) (*storageResponse, e // Exists returns true if a container with given name exists // on the storage account, otherwise returns false. func (c *Container) Exists() (bool, error) { - uri := c.bsc.client.getEndpoint(blobServiceName, c.buildPath(), url.Values{"restype": {"container"}}) + q := url.Values{"restype": {"container"}} + var uri string + if c.bsc.client.isServiceSASClient() { + q = mergeParams(q, c.sasuri.Query()) + newURI := c.sasuri + newURI.RawQuery = q.Encode() + uri = newURI.String() + + } else { + if c.bsc.client.isAccountSASClient() { + q = mergeParams(q, c.bsc.client.accountSASToken) + } + uri = c.bsc.client.getEndpoint(blobServiceName, c.buildPath(), q) + } headers := c.bsc.client.getStandardHeaders() resp, err := c.bsc.client.exec(http.MethodHead, uri, headers, nil, c.bsc.auth) @@ -399,9 +480,20 @@ func (c *Container) delete(options *DeleteContainerOptions) (*storageResponse, e func (c *Container) ListBlobs(params ListBlobsParameters) (BlobListResponse, error) { q := mergeParams(params.getParameters(), url.Values{ "restype": {"container"}, - "comp": {"list"}}, - ) - uri := c.bsc.client.getEndpoint(blobServiceName, c.buildPath(), q) + "comp": {"list"}, + }) + var uri string + if c.bsc.client.isServiceSASClient() { + q = mergeParams(q, c.sasuri.Query()) + newURI := c.sasuri + newURI.RawQuery = q.Encode() + uri = newURI.String() + } else { + if c.bsc.client.isAccountSASClient() { + q = mergeParams(q, c.bsc.client.accountSASToken) + } + uri = c.bsc.client.getEndpoint(blobServiceName, c.buildPath(), q) + } headers := c.bsc.client.getStandardHeaders() headers = addToHeaders(headers, "x-ms-client-request-id", params.RequestID) diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/container_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/container_test.go index e7317473c..9d8fab2bd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/container_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/container_test.go @@ -1,10 +1,26 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( + "net/url" "sort" "strconv" "time" + "github.com/Azure/go-autorest/autorest/azure" chk "gopkg.in/check.v1" ) @@ -82,13 +98,65 @@ func (s *ContainerSuite) TestContainerExists(c *chk.C) { c.Assert(err, chk.IsNil) c.Assert(ok, chk.Equals, false) - // COntainer exists + // Container exists cnt2 := cli.GetContainerReference(containerName(c, "2")) - c.Assert(cnt2.Create(nil), chk.IsNil) + err = cnt2.Create(nil) defer cnt2.Delete(nil) + c.Assert(err, chk.IsNil) ok, err = cnt2.Exists() c.Assert(err, chk.IsNil) c.Assert(ok, chk.Equals, true) + + // Service SASURI test (funcs should fail, service SAS has not enough permissions) + sasuriOptions := ContainerSASOptions{} + sasuriOptions.Expiry = fixedTime + sasuriOptions.Read = true + sasuriOptions.Add = true + sasuriOptions.Create = true + sasuriOptions.Write = true + sasuriOptions.Delete = true + sasuriOptions.List = true + + sasuriString1, err := cnt1.GetSASURI(sasuriOptions) + c.Assert(err, chk.IsNil) + sasuri1, err := url.Parse(sasuriString1) + c.Assert(err, chk.IsNil) + cntServiceSAS1, err := GetContainerReferenceFromSASURI(*sasuri1) + c.Assert(err, chk.IsNil) + cntServiceSAS1.Client().HTTPClient = cli.client.HTTPClient + + ok, err = cntServiceSAS1.Exists() + c.Assert(err, chk.NotNil) + c.Assert(ok, chk.Equals, false) + + sasuriString2, err := cnt2.GetSASURI(sasuriOptions) + c.Assert(err, chk.IsNil) + sasuri2, err := url.Parse(sasuriString2) + c.Assert(err, chk.IsNil) + cntServiceSAS2, err := GetContainerReferenceFromSASURI(*sasuri2) + c.Assert(err, chk.IsNil) + cntServiceSAS2.Client().HTTPClient = cli.client.HTTPClient + + ok, err = cntServiceSAS2.Exists() + c.Assert(err, chk.NotNil) + c.Assert(ok, chk.Equals, false) + + // Account SASURI test + token, err := cli.client.GetAccountSASToken(accountSASOptions) + c.Assert(err, chk.IsNil) + SAScli := NewAccountSASClient(cli.client.accountName, token, azure.PublicCloud).GetBlobService() + + cntAccountSAS1 := SAScli.GetContainerReference(cnt1.Name) + cntAccountSAS1.Client().HTTPClient = cli.client.HTTPClient + ok, err = cntAccountSAS1.Exists() + c.Assert(err, chk.IsNil) + c.Assert(ok, chk.Equals, false) + + cntAccountSAS2 := SAScli.GetContainerReference(cnt2.Name) + cntAccountSAS2.Client().HTTPClient = cli.client.HTTPClient + ok, err = cntAccountSAS2.Exists() + c.Assert(err, chk.IsNil) + c.Assert(ok, chk.Equals, true) } func (s *ContainerSuite) TestCreateContainerDeleteContainer(c *chk.C) { @@ -157,8 +225,9 @@ func (s *ContainerSuite) TestListBlobsPagination(c *chk.C) { defer rec.Stop() cnt := cli.GetContainerReference(containerName(c)) - c.Assert(cnt.Create(nil), chk.IsNil) + err := cnt.Create(nil) defer cnt.Delete(nil) + c.Assert(err, chk.IsNil) blobs := []string{} const n = 5 @@ -171,6 +240,40 @@ func (s *ContainerSuite) TestListBlobsPagination(c *chk.C) { } sort.Strings(blobs) + listBlobsPagination(c, cnt, pageSize, blobs) + + // Service SAS test + sasuriOptions := ContainerSASOptions{} + sasuriOptions.Expiry = fixedTime + sasuriOptions.Read = true + sasuriOptions.Add = true + sasuriOptions.Create = true + sasuriOptions.Write = true + sasuriOptions.Delete = true + sasuriOptions.List = true + + sasuriString, err := cnt.GetSASURI(sasuriOptions) + c.Assert(err, chk.IsNil) + sasuri, err := url.Parse(sasuriString) + c.Assert(err, chk.IsNil) + cntServiceSAS, err := GetContainerReferenceFromSASURI(*sasuri) + c.Assert(err, chk.IsNil) + cntServiceSAS.Client().HTTPClient = cli.client.HTTPClient + + listBlobsPagination(c, cntServiceSAS, pageSize, blobs) + + // Account SAS test + token, err := cli.client.GetAccountSASToken(accountSASOptions) + c.Assert(err, chk.IsNil) + SAScli := NewAccountSASClient(cli.client.accountName, token, azure.PublicCloud).GetBlobService() + + cntAccountSAS := SAScli.GetContainerReference(cnt.Name) + cntAccountSAS.Client().HTTPClient = cli.client.HTTPClient + + listBlobsPagination(c, cntAccountSAS, pageSize, blobs) +} + +func listBlobsPagination(c *chk.C, cnt *Container, pageSize uint, blobs []string) { // Paginate seen := []string{} marker := "" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob.go index f14342618..a4cc2527b 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "errors" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob_test.go index 60a50c8b7..ef29f6331 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/copyblob_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "io/ioutil" "net/http" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go index 57053efd1..189e03802 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "net/http" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory_test.go index ffe5f25c6..2fd6d65f9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/directory_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/directory_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import chk "gopkg.in/check.v1" type StorageDirSuite struct{} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go index 13e947507..9668ea669 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/json" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity_test.go index 22f95bd75..1ce7d58db 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/entity_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/entity_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/json" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go index b4022bcb6..5fb516c55 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/file.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "errors" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/file_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/file_test.go index 4993f302f..4a0f271bc 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/file_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/file_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "crypto/md5" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/fileserviceclient.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/fileserviceclient.go index 81217bdfa..295e3d3e2 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/fileserviceclient.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/fileserviceclient.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob.go index 415b74018..3d9d52d8e 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "errors" "net/http" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob_test.go index cd4528be7..4fb57c3b4 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/leaseblob_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import chk "gopkg.in/check.v1" type LeaseBlobSuite struct{} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go index 3ededcd42..7d9038a5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/message.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/message_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/message_test.go index ea3e675a0..ee6410c96 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/message_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/message_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import chk "gopkg.in/check.v1" type StorageMessageSuite struct{} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/odata.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/odata.go index 41d832e2b..800adf129 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/odata.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/odata.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + // MetadataLevel determines if operations should return a paylod, // and it level of detail. type MetadataLevel string diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob.go index 468b3868a..c59fd4b50 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "errors" @@ -186,6 +200,5 @@ func (b *Blob) PutPageBlob(options *PutBlobOptions) error { if err != nil { return err } - readAndCloseBody(resp.body) - return checkRespCode(resp.statusCode, []int{http.StatusCreated}) + return b.respondCreation(resp, BlobTypePage) } diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob_test.go index de009cfe0..9dac78410 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/pageblob_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "io/ioutil" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go index c2c7f742c..499592ebd 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/queue.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/xml" "errors" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/queue_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/queue_test.go index dbed7cacd..37e583fc3 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/queue_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/queue_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "time" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri.go new file mode 100644 index 000000000..28d9ab937 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri.go @@ -0,0 +1,146 @@ +package storage + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "errors" + "fmt" + "net/url" + "strings" + "time" +) + +// QueueSASOptions are options to construct a blob SAS +// URI. +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas +type QueueSASOptions struct { + QueueSASPermissions + SASOptions +} + +// QueueSASPermissions includes the available permissions for +// a queue SAS URI. +type QueueSASPermissions struct { + Read bool + Add bool + Update bool + Process bool +} + +func (q QueueSASPermissions) buildString() string { + permissions := "" + + if q.Read { + permissions += "r" + } + if q.Add { + permissions += "a" + } + if q.Update { + permissions += "u" + } + if q.Process { + permissions += "p" + } + return permissions +} + +// GetSASURI creates an URL to the specified queue which contains the Shared +// Access Signature with specified permissions and expiration time. +// +// See https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas +func (q *Queue) GetSASURI(options QueueSASOptions) (string, error) { + canonicalizedResource, err := q.qsc.client.buildCanonicalizedResource(q.buildPath(), q.qsc.auth, true) + if err != nil { + return "", err + } + + // "The canonicalizedresouce portion of the string is a canonical path to the signed resource. + // It must include the service name (blob, table, queue or file) for version 2015-02-21 or + // later, the storage account name, and the resource name, and must be URL-decoded. + // -- https://msdn.microsoft.com/en-us/library/azure/dn140255.aspx + // We need to replace + with %2b first to avoid being treated as a space (which is correct for query strings, but not the path component). + canonicalizedResource = strings.Replace(canonicalizedResource, "+", "%2b", -1) + canonicalizedResource, err = url.QueryUnescape(canonicalizedResource) + if err != nil { + return "", err + } + + signedStart := "" + if options.Start != (time.Time{}) { + signedStart = options.Start.UTC().Format(time.RFC3339) + } + signedExpiry := options.Expiry.UTC().Format(time.RFC3339) + + protocols := "https,http" + if options.UseHTTPS { + protocols = "https" + } + + permissions := options.QueueSASPermissions.buildString() + stringToSign, err := queueSASStringToSign(q.qsc.client.apiVersion, canonicalizedResource, signedStart, signedExpiry, options.IP, permissions, protocols, options.Identifier) + if err != nil { + return "", err + } + + sig := q.qsc.client.computeHmac256(stringToSign) + sasParams := url.Values{ + "sv": {q.qsc.client.apiVersion}, + "se": {signedExpiry}, + "sp": {permissions}, + "sig": {sig}, + } + + if q.qsc.client.apiVersion >= "2015-04-05" { + sasParams.Add("spr", protocols) + addQueryParameter(sasParams, "sip", options.IP) + } + + uri := q.qsc.client.getEndpoint(queueServiceName, q.buildPath(), nil) + sasURL, err := url.Parse(uri) + if err != nil { + return "", err + } + sasURL.RawQuery = sasParams.Encode() + return sasURL.String(), nil +} + +func queueSASStringToSign(signedVersion, canonicalizedResource, signedStart, signedExpiry, signedIP, signedPermissions, protocols, signedIdentifier string) (string, error) { + + if signedVersion >= "2015-02-21" { + canonicalizedResource = "/queue" + canonicalizedResource + } + + // https://msdn.microsoft.com/en-us/library/azure/dn140255.aspx#Anchor_12 + if signedVersion >= "2015-04-05" { + return fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s", + signedPermissions, + signedStart, + signedExpiry, + canonicalizedResource, + signedIdentifier, + signedIP, + protocols, + signedVersion), nil + + } + + // reference: http://msdn.microsoft.com/en-us/library/azure/dn140255.aspx + if signedVersion >= "2013-08-15" { + return fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s", signedPermissions, signedStart, signedExpiry, canonicalizedResource, signedIdentifier, signedVersion), nil + } + + return "", errors.New("storage: not implemented SAS for versions earlier than 2013-08-15") +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri_test.go new file mode 100644 index 000000000..d1f81b448 --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/queuesasuri_test.go @@ -0,0 +1,121 @@ +package storage + +// Copyright 2017 Microsoft Corporation +// +// 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. + +import ( + "net/url" + "time" + + chk "gopkg.in/check.v1" +) + +type QueueSASURISuite struct{} + +var _ = chk.Suite(&QueueSASURISuite{}) + +var queueOldAPIVer = "2013-08-15" +var queueNewerAPIVer = "2015-04-05" + +func (s *QueueSASURISuite) TestGetQueueSASURI(c *chk.C) { + api, err := NewClient("foo", dummyMiniStorageKey, DefaultBaseURL, queueOldAPIVer, true) + c.Assert(err, chk.IsNil) + cli := api.GetQueueService() + q := cli.GetQueueReference("name") + + expectedParts := url.URL{ + Scheme: "https", + Host: "foo.queue.core.windows.net", + Path: "name", + RawQuery: url.Values{ + "sv": {oldAPIVer}, + "sig": {"dYZ+elcEz3ZXEnTDKR5+RCrMzk0L7/ATWsemNzb36VM="}, + "sp": {"p"}, + "se": {"0001-01-01T00:00:00Z"}, + }.Encode()} + + options := QueueSASOptions{} + options.Process = true + options.Expiry = time.Time{} + + u, err := q.GetSASURI(options) + c.Assert(err, chk.IsNil) + sasParts, err := url.Parse(u) + c.Assert(err, chk.IsNil) + c.Assert(expectedParts.String(), chk.Equals, sasParts.String()) + c.Assert(expectedParts.Query(), chk.DeepEquals, sasParts.Query()) +} + +func (s *QueueSASURISuite) TestGetQueueSASURIWithSignedIPValidAPIVersionPassed(c *chk.C) { + api, err := NewClient("foo", dummyMiniStorageKey, DefaultBaseURL, queueNewerAPIVer, true) + c.Assert(err, chk.IsNil) + cli := api.GetQueueService() + q := cli.GetQueueReference("name") + + expectedParts := url.URL{ + Scheme: "https", + Host: "foo.queue.core.windows.net", + Path: "/name", + RawQuery: url.Values{ + "sv": {newerAPIVer}, + "sig": {"8uvfE93HdYxQ3xvt/CUN3S7sYEl1LcuHBC0oYoGDnfw="}, + "sip": {"127.0.0.1"}, + "sp": {"p"}, + "se": {"0001-01-01T00:00:00Z"}, + "spr": {"https,http"}, + }.Encode()} + + options := QueueSASOptions{} + options.Process = true + options.Expiry = time.Time{} + options.IP = "127.0.0.1" + + u, err := q.GetSASURI(options) + c.Assert(err, chk.IsNil) + sasParts, err := url.Parse(u) + c.Assert(err, chk.IsNil) + c.Assert(sasParts.Query(), chk.DeepEquals, expectedParts.Query()) +} + +// Trying to use SignedIP but using an older version of the API. +// Should ignore the signedIP and just use what the older version requires. +func (s *QueueSASURISuite) TestGetQueueSASURIWithSignedIPUsingOldAPIVersion(c *chk.C) { + api, err := NewClient("foo", dummyMiniStorageKey, DefaultBaseURL, oldAPIVer, true) + c.Assert(err, chk.IsNil) + cli := api.GetQueueService() + q := cli.GetQueueReference("name") + + expectedParts := url.URL{ + Scheme: "https", + Host: "foo.queue.core.windows.net", + Path: "/name", + RawQuery: url.Values{ + "sv": {oldAPIVer}, + "sig": {"dYZ+elcEz3ZXEnTDKR5+RCrMzk0L7/ATWsemNzb36VM="}, + "sp": {"p"}, + "se": {"0001-01-01T00:00:00Z"}, + }.Encode()} + + options := QueueSASOptions{} + options.Process = true + options.Expiry = time.Time{} + options.IP = "127.0.0.1" + + u, err := q.GetSASURI(options) + c.Assert(err, chk.IsNil) + sasParts, err := url.Parse(u) + c.Assert(err, chk.IsNil) + c.Assert(expectedParts.String(), chk.Equals, sasParts.String()) + c.Assert(expectedParts.Query(), chk.DeepEquals, sasParts.Query()) +} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/queueserviceclient.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/queueserviceclient.go index 19b44941c..29febe146 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/queueserviceclient.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/queueserviceclient.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + // QueueServiceClient contains operations for Microsoft Azure Queue Storage // Service. type QueueServiceClient struct { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/AppendBlobSuite/TestPutAppendBlobAppendBlocks.yaml b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/AppendBlobSuite/TestPutAppendBlobAppendBlocks.yaml index d5e435ead..c09ef540d 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/AppendBlobSuite/TestPutAppendBlobAppendBlocks.yaml +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/AppendBlobSuite/TestPutAppendBlobAppendBlocks.yaml @@ -7,12 +7,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:beFu17HY2hWcGvLuGRs9+6f2pmSpZqAl87ViaqbejAU= + - SharedKey golangrocksonazure:pqcZ0tfSvSANHaDKvBG8VArIzT37Ayy8xrtm4hDh3IQ= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-45appendblobsuitetestputappe?restype=container @@ -21,15 +20,15 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Etag: - - '"0x8D4CFC7C890FE4B"' + - '"0x8D4FC96D98E16B5"' Last-Modified: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d612dd4-0001-0009-1eb0-01ca46000000 + - 7bf8dde3-001e-0009-077f-2e1837000000 X-Ms-Version: - 2016-05-31 status: 201 Created @@ -39,14 +38,13 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:GrbdWcG/3Szoi5jGHhIIvNcZd9XqIGo57Dspquiuadk= + - SharedKey golangrocksonazure:iOW5xKnE/mPUQJ8wJn+JfeKmrWNd6DgwVgbPZ/lK7X8= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - AppendBlob x-ms-date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-45appendblobsuitetestputappe/blob/45appendblobsuitetestputappendblobappendblocks @@ -55,17 +53,17 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Etag: - - '"0x8D4CFC7C8EDB705"' + - '"0x8D4FC96D99869BE"' Last-Modified: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d612dd6-0001-0009-1fb0-01ca46000000 + - 7bf8de12-001e-0009-327f-2e1837000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -87,16 +85,15 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:HjxCSD8uk4ABhtv57Bufa1NLF94i/3YWdYkS2IPQQbk= + - SharedKey golangrocksonazure:A5Y9DfvvoiRJvcz6/0cIssbxA1Ra/FowzUgrCfj3QLc= Content-Length: - "1024" User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - AppendBlob x-ms-date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-45appendblobsuitetestputappe/blob/45appendblobsuitetestputappendblobappendblocks?comp=appendblock @@ -107,11 +104,11 @@ interactions: Content-Md5: - 0rZVY1m4cHz874drfCSd/w== Date: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Etag: - - '"0x8D4CFC7C8EF3DE7"' + - '"0x8D4FC96D9A6EB4D"' Last-Modified: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Blob-Append-Offset: @@ -119,9 +116,9 @@ interactions: X-Ms-Blob-Committed-Block-Count: - "1" X-Ms-Request-Id: - - 7d612dd8-0001-0009-21b0-01ca46000000 + - 7bf8de2b-001e-0009-487f-2e1837000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -131,14 +128,13 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:c7IaA0dgWHn2eBWJrCHwcxvHAWsUBgafE39LVT11yd8= + - SharedKey golangrocksonazure:w0LEs15qm+SmiWxsqt+cJ9NHjYUnpxIYoIQcC5JHsCE= Range: - bytes=0-1023 User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-45appendblobsuitetestputappe/blob/45appendblobsuitetestputappendblobappendblocks @@ -167,11 +163,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Etag: - - '"0x8D4CFC7C8EF3DE7"' + - '"0x8D4FC96D9A6EB4D"' Last-Modified: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Blob-Committed-Block-Count: @@ -183,9 +179,9 @@ interactions: X-Ms-Lease-Status: - unlocked X-Ms-Request-Id: - - 7d612dd9-0001-0009-22b0-01ca46000000 + - 7bf8de51-001e-0009-627f-2e1837000000 X-Ms-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 206 Partial Content @@ -201,16 +197,17 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:kqYe2AmOiFbK4TNd98nmpeiBvUeSvQoJ2Ir12V72dnQ= + - SharedKey golangrocksonazure:uk3Zxcf4nEQ5P2/aIggtvuSlJDeNjzzKSSSLMwOG/kY= Content-Length: - "512" + Content-MD5: + - 2Xr7q2sERdQmQ41hZ7sPvQ== User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - AppendBlob x-ms-date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-45appendblobsuitetestputappe/blob/45appendblobsuitetestputappendblobappendblocks?comp=appendblock @@ -221,11 +218,11 @@ interactions: Content-Md5: - 2Xr7q2sERdQmQ41hZ7sPvQ== Date: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Etag: - - '"0x8D4CFC7C8F2249E"' + - '"0x8D4FC96D9B545C4"' Last-Modified: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Blob-Append-Offset: @@ -233,9 +230,9 @@ interactions: X-Ms-Blob-Committed-Block-Count: - "2" X-Ms-Request-Id: - - 7d612dda-0001-0009-23b0-01ca46000000 + - 7bf8de57-001e-0009-677f-2e1837000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -245,14 +242,13 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:LYdivrAnQs8j8vQr0Z7Loz0llJMiDZ8WCSQ+7g+caVw= + - SharedKey golangrocksonazure:ebyFYeB4Ggxei3Op3fjAty8VZ3H8LGGSWvMbCEhSo0U= Range: - bytes=0-1535 User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-45appendblobsuitetestputappe/blob/45appendblobsuitetestputappendblobappendblocks @@ -288,11 +284,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Etag: - - '"0x8D4CFC7C8F2249E"' + - '"0x8D4FC96D9B545C4"' Last-Modified: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Blob-Committed-Block-Count: @@ -304,9 +300,9 @@ interactions: X-Ms-Lease-Status: - unlocked X-Ms-Request-Id: - - 7d612ddb-0001-0009-24b0-01ca46000000 + - 7bf8de60-001e-0009-707f-2e1837000000 X-Ms-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 206 Partial Content @@ -316,12 +312,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:1+EQAh17h1Lea64FEJOjlXFBuLWk15xpVkaiVdIh+GA= + - SharedKey golangrocksonazure:PqIFy4EpV3Pu2cZbT7BA6PtfMIbIWL6v/TBw20v03kM= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.8 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:33:54 GMT + - Sat, 16 Sep 2017 00:06:59 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-45appendblobsuitetestputappe?restype=container @@ -330,11 +325,11 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:33:53 GMT + - Sat, 16 Sep 2017 00:06:59 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d612ddc-0001-0009-25b0-01ca46000000 + - 7bf8de6c-001e-0009-7a7f-2e1837000000 X-Ms-Version: - 2016-05-31 status: 202 Accepted diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestContainerExists.yaml b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestContainerExists.yaml index 69a7104c2..b0662d95c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestContainerExists.yaml +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestContainerExists.yaml @@ -7,12 +7,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:DIo7xJY1ZzNbrmyX1TM36MDmixKzkDEVtIc7/i70oe4= + - SharedKey golangrocksonazure:m+LPOmxFZb2TFNxWZDNl7qZ50q/2Fb3OATx1+2hQnAM= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:21:41 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-134containersuitetestcontain?restype=container @@ -21,11 +20,11 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:21:41 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130ae-0001-0009-30b0-01ca46000000 + - 9a1a4af5-001e-0038-47e7-3743e0000000 X-Ms-Version: - 2016-05-31 status: 404 The specified container does not exist. @@ -35,12 +34,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:Cjy5Rd/Nh+xL68wCxsKa0TN7LmZQMiSd9+04k8ivvpc= + - SharedKey golangrocksonazure:wp+d4VKOzAVXFbVouSKEjIt/ZR5tioQsa/f/N3W3Eto= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:21:41 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-234containersuitetestcontain?restype=container @@ -49,15 +47,15 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:21:41 GMT Etag: - - '"0x8D4CFC7CDCC90E3"' + - '"0x8D505FE82D4E748"' Last-Modified: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:21:41 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130b1-0001-0009-32b0-01ca46000000 + - 9a1a4b03-001e-0038-50e7-3743e0000000 X-Ms-Version: - 2016-05-31 status: 201 Created @@ -67,12 +65,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:zECm6ZSUCeVy2I1K2JJr+wLGOJiaoj47oEXIqEufBgw= + - SharedKey golangrocksonazure:O+zM57wTRWigRabHBtDG+vNxOaP3cIItksFQwGQb5vE= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:21:42 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-234containersuitetestcontain?restype=container @@ -81,11 +78,11 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:21:41 GMT Etag: - - '"0x8D4CFC7CDCC90E3"' + - '"0x8D505FE82D4E748"' Last-Modified: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:21:41 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Lease-State: @@ -93,7 +90,115 @@ interactions: X-Ms-Lease-Status: - unlocked X-Ms-Request-Id: - - 7d6130b4-0001-0009-34b0-01ca46000000 + - 9a1a4b13-001e-0038-5de7-3743e0000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:21:42 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-134containersuitetestcontain?restype=container&se=2050-12-20T21%3A55%3A06Z&sig=LQbki0BVo2HysxQfHLjjpjQ527nGivIf6TkqVv3ucQY%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:21:41 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 9a1a4b17-001e-0038-61e7-3743e0000000 + X-Ms-Version: + - 2016-05-31 + status: 403 This request is not authorized to perform this operation. + code: 403 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:21:42 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-234containersuitetestcontain?restype=container&se=2050-12-20T21%3A55%3A06Z&sig=GG6hgkV%2BwUiAa2%2F6I2a%2BG758UqKESeutpNWRn%2BfaJf0%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:21:41 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 9a1a4b1c-001e-0038-66e7-3743e0000000 + X-Ms-Version: + - 2016-05-31 + status: 403 This request is not authorized to perform this operation. + code: 403 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:21:42 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-134containersuitetestcontain?restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:21:41 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 9a1a4b27-001e-0038-6fe7-3743e0000000 + X-Ms-Version: + - 2016-05-31 + status: 404 The specified container does not exist. + code: 404 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:21:42 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-234containersuitetestcontain?restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:21:41 GMT + Etag: + - '"0x8D505FE82D4E748"' + Last-Modified: + - Wed, 27 Sep 2017 23:21:41 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Lease-State: + - available + X-Ms-Lease-Status: + - unlocked + X-Ms-Request-Id: + - 9a1a4b2a-001e-0038-71e7-3743e0000000 X-Ms-Version: - 2016-05-31 status: 200 OK @@ -103,12 +208,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:CwxdH6a6YFGl1ZwIb4fxPhNSyPFFWph3d3czikyiAMk= + - SharedKey golangrocksonazure:tqrykn5C5pPEOaa+7lndgUCo4YnNYISfh/G38wBqeAw= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:21:42 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-234containersuitetestcontain?restype=container @@ -117,11 +221,11 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:21:41 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130b6-0001-0009-36b0-01ca46000000 + - 9a1a4b2d-001e-0038-74e7-3743e0000000 X-Ms-Version: - 2016-05-31 status: 202 Accepted diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestListBlobsPagination.yaml b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestListBlobsPagination.yaml index d78b91209..d203f4d98 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestListBlobsPagination.yaml +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/ContainerSuite/TestListBlobsPagination.yaml @@ -7,12 +7,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:0zD6u3EEWn038NVMgGElhN6blOjXuPKkFcDgYqwKdRc= + - SharedKey golangrocksonazure:qGGaf2/lNp4eY+edsEtbhszzKQxtHqskfmhIToCjMUM= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?restype=container @@ -21,15 +20,15 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:50 GMT Etag: - - '"0x8D4CFC7CDE8F858"' + - '"0x8D505FF3B71AFA9"' Last-Modified: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130d2-0001-0009-4bb0-01ca46000000 + - 8a9cdae3-001e-004d-24e8-37c45b000000 X-Ms-Version: - 2016-05-31 status: 201 Created @@ -39,16 +38,15 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:NCWL4NmjhKj1lXVY4TRDDAbes2DUdJbmWcl87FhUmK8= + - SharedKey golangrocksonazure:D2Y2qusTz/Ps1DeWUuQ6Vl6R92ZhQROffjSIbQajkgU= Content-Length: - "13" User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob/blob/038containersuitetestlistblobspagination @@ -59,17 +57,17 @@ interactions: Content-Md5: - bNNVbesNpUvKBgtMOUeYOQ== Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:50 GMT Etag: - - '"0x8D4CFC7CE456435"' + - '"0x8D505FF3B9A2B80"' Last-Modified: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130d4-0001-0009-4cb0-01ca46000000 + - 8a9cdaff-001e-004d-39e8-37c45b000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -79,16 +77,15 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:us45IJy9ydXR2+xATNsVyBz1NHsZlG45+DCK/M7pFi4= + - SharedKey golangrocksonazure:Utt7oVGUaSF9F7u1p/y8R0l+/XlNa1gcwvt94d3e+QU= Content-Length: - "13" User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob/blob/138containersuitetestlistblobspagination @@ -99,17 +96,17 @@ interactions: Content-Md5: - bNNVbesNpUvKBgtMOUeYOQ== Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:50 GMT Etag: - - '"0x8D4CFC7CE471231"' + - '"0x8D505FF3BA32DAA"' Last-Modified: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130d6-0001-0009-4eb0-01ca46000000 + - 8a9cdb1c-001e-004d-4de8-37c45b000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -119,16 +116,15 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:NQzBuyidorW8QJCuZJbidFKB5lTEeCVnwGnwcEJhSfg= + - SharedKey golangrocksonazure:PezsSpSV0dtyrLq3CtS+KWxJNCdQX2YoOttYE/eqatE= Content-Length: - "13" User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob/blob/238containersuitetestlistblobspagination @@ -139,17 +135,17 @@ interactions: Content-Md5: - bNNVbesNpUvKBgtMOUeYOQ== Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Etag: - - '"0x8D4CFC7CE4A9545"' + - '"0x8D505FF3BAAF721"' Last-Modified: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130d9-0001-0009-51b0-01ca46000000 + - 8a9cdb38-001e-004d-61e8-37c45b000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -159,16 +155,15 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:dHiREVjPqOUC2mnoOIbKo8n9JwD/qKJUEEY96WJzPrY= + - SharedKey golangrocksonazure:/0uKJzEptA4eDRkRQFBCGXHOpVb6x+X61g+ep9gmSvI= Content-Length: - "13" User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob/blob/338containersuitetestlistblobspagination @@ -179,17 +174,17 @@ interactions: Content-Md5: - bNNVbesNpUvKBgtMOUeYOQ== Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Etag: - - '"0x8D4CFC7CE4C6A5C"' + - '"0x8D505FF3BB2C09C"' Last-Modified: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130da-0001-0009-52b0-01ca46000000 + - 8a9cdb45-001e-004d-6ce8-37c45b000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -199,16 +194,15 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:n7isxxYGMw9TbDwvmCsJs/k1BgFMsVuFlLFX9clqvqQ= + - SharedKey golangrocksonazure:iPAf6CWqruFhS7LLZHJJ2qfnumrXY3NgvZov8k1TvGU= Content-Length: - "13" User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob/blob/438containersuitetestlistblobspagination @@ -219,17 +213,17 @@ interactions: Content-Md5: - bNNVbesNpUvKBgtMOUeYOQ== Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Etag: - - '"0x8D4CFC7CE4E3F67"' + - '"0x8D505FF3BBC8632"' Last-Modified: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130de-0001-0009-56b0-01ca46000000 + - 8a9cdb50-001e-004d-76e8-37c45b000000 X-Ms-Request-Server-Encrypted: - - "true" + - "false" X-Ms-Version: - 2016-05-31 status: 201 Created @@ -239,27 +233,26 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:i+ryxAdVVaB7KBx+m92wNqHV+BdJjdUs94G/iwHkOBE= + - SharedKey golangrocksonazure:jmvXWTecptwSQSJO8Yu61Cte4kgXJ736qqFDcQgUId0= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&maxresults=2&restype=container method: GET response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x30\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x54\x68\x75\x2C\x20\x32\x30\x20\x4A\x75\x6C\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x33\x34\x3A\x30\x33\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x34\x43\x46\x43\x37\x43\x45\x34\x35\x36\x34\x33\x35\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x31\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x54\x68\x75\x2C\x20\x32\x30\x20\x4A\x75\x6C\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x33\x34\x3A\x30\x33\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x34\x43\x46\x43\x37\x43\x45\x34\x37\x31\x32\x33\x31\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4D\x6A\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x30\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x39\x41\x32\x42\x38\x30\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x31\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x41\x33\x32\x44\x41\x41\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4D\x6A\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" headers: Content-Type: - application/xml Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130df-0001-0009-57b0-01ca46000000 + - 8a9cdb60-001e-004d-02e8-37c45b000000 X-Ms-Version: - 2016-05-31 status: 200 OK @@ -269,27 +262,26 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:z1txIWGlsQs5n8IioEkZ5ujOw8dNln2CmtnvsoR5MI4= + - SharedKey golangrocksonazure:p/XWLulo8vcELqeQMBa0NbBLh+LHoIfiAIdqpe4fYfw= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&marker=2%21120%21MDAwMDQ1IWJsb2IvMjM4Y29udGFpbmVyc3VpdGV0ZXN0bGlzdGJsb2JzcGFnaW5hdGlvbiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=2&restype=container method: GET response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x54\x68\x75\x2C\x20\x32\x30\x20\x4A\x75\x6C\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x33\x34\x3A\x30\x33\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x34\x43\x46\x43\x37\x43\x45\x34\x41\x39\x35\x34\x35\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x33\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x54\x68\x75\x2C\x20\x32\x30\x20\x4A\x75\x6C\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x33\x34\x3A\x30\x33\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x34\x43\x46\x43\x37\x43\x45\x34\x43\x36\x41\x35\x43\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4E\x44\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x41\x41\x46\x37\x32\x31\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x33\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x42\x32\x43\x30\x39\x43\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4E\x44\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" headers: Content-Type: - application/xml Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130e0-0001-0009-58b0-01ca46000000 + - 8a9cdb6e-001e-004d-0ee8-37c45b000000 X-Ms-Version: - 2016-05-31 status: 200 OK @@ -299,27 +291,188 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:ipncg+sKo+Z+K+bgfRs4qyZUT6Q8nLe+Z3JEDok6ya0= + - SharedKey golangrocksonazure:k+1IJMv/3+avpYdXThmotERAFccrEx4uk2XrEz71KT0= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:51 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&marker=2%21120%21MDAwMDQ1IWJsb2IvNDM4Y29udGFpbmVyc3VpdGV0ZXN0bGlzdGJsb2JzcGFnaW5hdGlvbiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=2&restype=container method: GET response: - body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x54\x68\x75\x2C\x20\x32\x30\x20\x4A\x75\x6C\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x33\x34\x3A\x30\x33\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x34\x43\x46\x43\x37\x43\x45\x34\x45\x33\x46\x36\x37\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x74\x72\x75\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x20\x2F\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x42\x43\x38\x36\x33\x32\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x20\x2F\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" headers: Content-Type: - application/xml Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130e2-0001-0009-5ab0-01ca46000000 + - 8a9cdb87-001e-004d-22e8-37c45b000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:26:51 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&maxresults=2&restype=container&se=2050-12-20T21%3A55%3A06Z&sig=LEY3a3b%2BbvLFPNIL96qHeFaBe1eTs8RDQ%2FQli2ZnXQs%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x30\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x39\x41\x32\x42\x38\x30\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x31\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x41\x33\x32\x44\x41\x41\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4D\x6A\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 27 Sep 2017 23:26:51 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8a9cdb9b-001e-004d-34e8-37c45b000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:26:52 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&marker=2%21120%21MDAwMDQ1IWJsb2IvMjM4Y29udGFpbmVyc3VpdGV0ZXN0bGlzdGJsb2JzcGFnaW5hdGlvbiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=2&restype=container&se=2050-12-20T21%3A55%3A06Z&sig=LEY3a3b%2BbvLFPNIL96qHeFaBe1eTs8RDQ%2FQli2ZnXQs%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x41\x41\x46\x37\x32\x31\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x33\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x42\x32\x43\x30\x39\x43\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4E\x44\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 27 Sep 2017 23:26:51 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8a9cdbaa-001e-004d-43e8-37c45b000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:26:52 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&marker=2%21120%21MDAwMDQ1IWJsb2IvNDM4Y29udGFpbmVyc3VpdGV0ZXN0bGlzdGJsb2JzcGFnaW5hdGlvbiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=2&restype=container&se=2050-12-20T21%3A55%3A06Z&sig=LEY3a3b%2BbvLFPNIL96qHeFaBe1eTs8RDQ%2FQli2ZnXQs%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x42\x43\x38\x36\x33\x32\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x20\x2F\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 27 Sep 2017 23:26:51 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8a9cdbb3-001e-004d-4be8-37c45b000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:26:52 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&maxresults=2&restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x30\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x39\x41\x32\x42\x38\x30\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x31\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x41\x33\x32\x44\x41\x41\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4D\x6A\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 27 Sep 2017 23:26:51 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8a9cdbb8-001e-004d-50e8-37c45b000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:26:52 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&marker=2%21120%21MDAwMDQ1IWJsb2IvMjM4Y29udGFpbmVyc3VpdGV0ZXN0bGlzdGJsb2JzcGFnaW5hdGlvbiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=2&restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x32\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x41\x41\x46\x37\x32\x31\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x33\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x42\x32\x43\x30\x39\x43\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x32\x21\x31\x32\x30\x21\x4D\x44\x41\x77\x4D\x44\x51\x31\x49\x57\x4A\x73\x62\x32\x49\x76\x4E\x44\x4D\x34\x59\x32\x39\x75\x64\x47\x46\x70\x62\x6D\x56\x79\x63\x33\x56\x70\x64\x47\x56\x30\x5A\x58\x4E\x30\x62\x47\x6C\x7A\x64\x47\x4A\x73\x62\x32\x4A\x7A\x63\x47\x46\x6E\x61\x57\x35\x68\x64\x47\x6C\x76\x62\x69\x45\x77\x4D\x44\x41\x77\x4D\x6A\x67\x68\x4F\x54\x6B\x35\x4F\x53\x30\x78\x4D\x69\x30\x7A\x4D\x56\x51\x79\x4D\x7A\x6F\x31\x4F\x54\x6F\x31\x4F\x53\x34\x35\x4F\x54\x6B\x35\x4F\x54\x6B\x35\x57\x69\x45\x2D\x3C\x2F\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 27 Sep 2017 23:26:51 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8a9cdbc2-001e-004d-58e8-37c45b000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:26:52 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?comp=list&marker=2%21120%21MDAwMDQ1IWJsb2IvNDM4Y29udGFpbmVyc3VpdGV0ZXN0bGlzdGJsb2JzcGFnaW5hdGlvbiEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-&maxresults=2&restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: GET + response: + body: "\uFEFF\x3C\x3F\x78\x6D\x6C\x20\x76\x65\x72\x73\x69\x6F\x6E\x3D\"\x31\x2E\x30\"\x20\x65\x6E\x63\x6F\x64\x69\x6E\x67\x3D\"\x75\x74\x66\x2D\x38\"\x3F\x3E\x3C\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x20\x53\x65\x72\x76\x69\x63\x65\x45\x6E\x64\x70\x6F\x69\x6E\x74\x3D\"\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x6F\x6C\x61\x6E\x67\x72\x6F\x63\x6B\x73\x6F\x6E\x61\x7A\x75\x72\x65\x2E\x62\x6C\x6F\x62\x2E\x63\x6F\x72\x65\x2E\x77\x69\x6E\x64\x6F\x77\x73\x2E\x6E\x65\x74\x2F\"\x20\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x4E\x61\x6D\x65\x3D\"\x63\x6E\x74\x2D\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\"\x3E\x3C\x4D\x61\x72\x6B\x65\x72\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4D\x61\x72\x6B\x65\x72\x3E\x3C\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x32\x3C\x2F\x4D\x61\x78\x52\x65\x73\x75\x6C\x74\x73\x3E\x3C\x42\x6C\x6F\x62\x73\x3E\x3C\x42\x6C\x6F\x62\x3E\x3C\x4E\x61\x6D\x65\x3E\x62\x6C\x6F\x62\x2F\x34\x33\x38\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x73\x75\x69\x74\x65\x74\x65\x73\x74\x6C\x69\x73\x74\x62\x6C\x6F\x62\x73\x70\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x3C\x2F\x4E\x61\x6D\x65\x3E\x3C\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x57\x65\x64\x2C\x20\x32\x37\x20\x53\x65\x70\x20\x32\x30\x31\x37\x20\x32\x33\x3A\x32\x36\x3A\x35\x31\x20\x47\x4D\x54\x3C\x2F\x4C\x61\x73\x74\x2D\x4D\x6F\x64\x69\x66\x69\x65\x64\x3E\x3C\x45\x74\x61\x67\x3E\x30\x78\x38\x44\x35\x30\x35\x46\x46\x33\x42\x42\x43\x38\x36\x33\x32\x3C\x2F\x45\x74\x61\x67\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x31\x33\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x63\x74\x65\x74\x2D\x73\x74\x72\x65\x61\x6D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x62\x4E\x4E\x56\x62\x65\x73\x4E\x70\x55\x76\x4B\x42\x67\x74\x4D\x4F\x55\x65\x59\x4F\x51\x3D\x3D\x3C\x2F\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4D\x44\x35\x3E\x3C\x43\x61\x63\x68\x65\x2D\x43\x6F\x6E\x74\x72\x6F\x6C\x20\x2F\x3E\x3C\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x2F\x3E\x3C\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x42\x6C\x6F\x63\x6B\x42\x6C\x6F\x62\x3C\x2F\x42\x6C\x6F\x62\x54\x79\x70\x65\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x75\x73\x3E\x3C\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3C\x2F\x4C\x65\x61\x73\x65\x53\x74\x61\x74\x65\x3E\x3C\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x66\x61\x6C\x73\x65\x3C\x2F\x53\x65\x72\x76\x65\x72\x45\x6E\x63\x72\x79\x70\x74\x65\x64\x3E\x3C\x2F\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x3E\x3C\x2F\x42\x6C\x6F\x62\x3E\x3C\x2F\x42\x6C\x6F\x62\x73\x3E\x3C\x4E\x65\x78\x74\x4D\x61\x72\x6B\x65\x72\x20\x2F\x3E\x3C\x2F\x45\x6E\x75\x6D\x65\x72\x61\x74\x69\x6F\x6E\x52\x65\x73\x75\x6C\x74\x73\x3E" + headers: + Content-Type: + - application/xml + Date: + - Wed, 27 Sep 2017 23:26:51 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 8a9cdbcc-001e-004d-60e8-37c45b000000 X-Ms-Version: - 2016-05-31 status: 200 OK @@ -329,12 +482,11 @@ interactions: form: {} headers: Authorization: - - SharedKey golangrocksonazure:omuZ+zjm0QwnfHSEi4xBBroqlkctmGSFXmW8JMLb4NU= + - SharedKey golangrocksonazure:mNkS8/0U71wK6p6FT0CRpxz/EskI3QFlF/q5qstOSQ0= User-Agent: - - Go/go1.9beta1 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 - blob + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob x-ms-date: - - Thu, 20 Jul 2017 23:34:03 GMT + - Wed, 27 Sep 2017 23:26:52 GMT x-ms-version: - 2016-05-31 url: https://golangrocksonazure.blob.core.windows.net/cnt-38containersuitetestlistblob?restype=container @@ -343,11 +495,11 @@ interactions: body: "" headers: Date: - - Thu, 20 Jul 2017 23:34:02 GMT + - Wed, 27 Sep 2017 23:26:51 GMT Server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 7d6130e3-0001-0009-5bb0-01ca46000000 + - 8a9cdbd6-001e-004d-69e8-37c45b000000 X-Ms-Version: - 2016-05-31 status: 202 Accepted diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageBlobSuite/TestSetPageBlobProperties.yaml b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageBlobSuite/TestSetPageBlobProperties.yaml new file mode 100644 index 000000000..7222cadeb --- /dev/null +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageBlobSuite/TestSetPageBlobProperties.yaml @@ -0,0 +1,136 @@ +--- +version: 1 +rwmutex: {} +interactions: +- request: + body: "" + form: {} + headers: + Authorization: + - SharedKey golangrocksonazure:MVbkRnsIo2WDc4NLbDCyyNqVCqIvXUegkdrulwnSjUY= + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Thu, 21 Sep 2017 22:05:24 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-42storageblobsuitetestsetpag?restype=container + method: PUT + response: + body: "" + headers: + Date: + - Thu, 21 Sep 2017 22:05:23 GMT + Etag: + - '"0x8D5013CDBFB69E8"' + Last-Modified: + - Thu, 21 Sep 2017 22:05:24 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 3c75464c-001e-00a0-3825-33cddf000000 + X-Ms-Version: + - 2016-05-31 + status: 201 Created + code: 201 +- request: + body: "" + form: {} + headers: + Authorization: + - SharedKey golangrocksonazure:fbHxRBbqRmtvlZI8WAs/WIVBlWK2N/+mgr9nXZjGV2k= + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-blob-content-length: + - "1024" + x-ms-blob-sequence-number: + - "0" + x-ms-blob-type: + - PageBlob + x-ms-date: + - Thu, 21 Sep 2017 22:05:24 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-42storageblobsuitetestsetpag/blob/42storageblobsuitetestsetpageblobproperties + method: PUT + response: + body: "" + headers: + Date: + - Thu, 21 Sep 2017 22:05:23 GMT + Etag: + - '"0x8D5013CDBED986E"' + Last-Modified: + - Thu, 21 Sep 2017 22:05:24 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 3c75466a-001e-00a0-5025-33cddf000000 + X-Ms-Request-Server-Encrypted: + - "false" + X-Ms-Version: + - 2016-05-31 + status: 201 Created + code: 201 +- request: + body: "" + form: {} + headers: + Authorization: + - SharedKey golangrocksonazure:HsD3iyu6ZcasqvRknO6zudPx+E6f7BzgOFTBq6oLOW4= + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-blob-content-length: + - "512" + x-ms-date: + - Thu, 21 Sep 2017 22:05:24 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-42storageblobsuitetestsetpag/blob/42storageblobsuitetestsetpageblobproperties?comp=properties&timeout=30 + method: PUT + response: + body: "" + headers: + Date: + - Thu, 21 Sep 2017 22:05:23 GMT + Etag: + - '"0x8D5013CDBF53B0F"' + Last-Modified: + - Thu, 21 Sep 2017 22:05:24 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Blob-Sequence-Number: + - "0" + X-Ms-Request-Id: + - 3c75467f-001e-00a0-5f25-33cddf000000 + X-Ms-Version: + - 2016-05-31 + status: 200 OK + code: 200 +- request: + body: "" + form: {} + headers: + Authorization: + - SharedKey golangrocksonazure:hA7eYCRZASeSy8tinPlEDXEQi6Mg2WLKShnszmvMw78= + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Thu, 21 Sep 2017 22:05:24 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-42storageblobsuitetestsetpag?restype=container + method: DELETE + response: + body: "" + headers: + Date: + - Thu, 21 Sep 2017 22:05:23 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 3c754682-001e-00a0-6225-33cddf000000 + X-Ms-Version: + - 2016-05-31 + status: 202 Accepted + code: 202 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageClientSuite/Test_doRetry.yaml b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageClientSuite/Test_doRetry.yaml index 47381b15f..7a5aaf40f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageClientSuite/Test_doRetry.yaml +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/recordings/StorageClientSuite/Test_doRetry.yaml @@ -16,18 +16,18 @@ interactions: method: DELETE response: body: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:875b7d62-0002-0036-48b0-0102e5000000\nTime:2017-07-20T23:33:55.9834316Z"}}}' + specified resource does not exist.\nRequestId:07179106-0002-00ce-65eb-3764f6000000\nTime:2017-09-27T23:52:14.1723707Z"}}}' headers: Content-Length: - "202" Content-Type: - application/json Date: - - Thu, 20 Jul 2017 23:33:55 GMT + - Wed, 27 Sep 2017 23:52:13 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 875b7d62-0002-0036-48b0-0102e5000000 + - 07179106-0002-00ce-65eb-3764f6000000 X-Ms-Version: - 2016-05-31 status: 404 The specified resource does not exist. @@ -46,18 +46,18 @@ interactions: method: DELETE response: body: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:875b7d91-0002-0036-74b0-0102e5000000\nTime:2017-07-20T23:33:57.0061650Z"}}}' + specified resource does not exist.\nRequestId:071791cd-0002-00ce-24eb-3764f6000000\nTime:2017-09-27T23:52:15.2801642Z"}}}' headers: Content-Length: - "202" Content-Type: - application/json Date: - - Thu, 20 Jul 2017 23:33:56 GMT + - Wed, 27 Sep 2017 23:52:14 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 875b7d91-0002-0036-74b0-0102e5000000 + - 071791cd-0002-00ce-24eb-3764f6000000 X-Ms-Version: - 2016-05-31 status: 404 The specified resource does not exist. @@ -76,19 +76,169 @@ interactions: method: DELETE response: body: '{"odata.error":{"code":"ResourceNotFound","message":{"lang":"en-US","value":"The - specified resource does not exist.\nRequestId:875b7dd8-0002-0036-31b0-0102e5000000\nTime:2017-07-20T23:33:59.0156064Z"}}}' + specified resource does not exist.\nRequestId:07179395-0002-00ce-55eb-3764f6000000\nTime:2017-09-27T23:52:17.3386407Z"}}}' headers: Content-Length: - "202" Content-Type: - application/json Date: - - Thu, 20 Jul 2017 23:33:58 GMT + - Wed, 27 Sep 2017 23:52:17 GMT Server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 X-Ms-Request-Id: - - 875b7dd8-0002-0036-31b0-0102e5000000 + - 07179395-0002-00ce-55eb-3764f6000000 X-Ms-Version: - 2016-05-31 status: 404 The specified resource does not exist. code: 404 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:52:21 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-31storageclientsuitetestdore?restype=container&se=2050-12-20T21%3A55%3A06Z&sig=UJ0X%2BdSTE2UqsP6d6dqhSAG%2FD0K1jeOEi2tS%2F5VrGk8%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:52:21 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4c4963bc-001e-00bc-70eb-3715c8000000 + X-Ms-Version: + - 2016-05-31 + status: 403 This request is not authorized to perform this operation. + code: 403 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:52:21 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-31storageclientsuitetestdore?restype=container&se=2050-12-20T21%3A55%3A06Z&sig=UJ0X%2BdSTE2UqsP6d6dqhSAG%2FD0K1jeOEi2tS%2F5VrGk8%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:52:22 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4c49644c-001e-00bc-58eb-3715c8000000 + X-Ms-Version: + - 2016-05-31 + status: 403 This request is not authorized to perform this operation. + code: 403 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:52:21 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-31storageclientsuitetestdore?restype=container&se=2050-12-20T21%3A55%3A06Z&sig=UJ0X%2BdSTE2UqsP6d6dqhSAG%2FD0K1jeOEi2tS%2F5VrGk8%3D&sp=racwdl&sr=c&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:52:24 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4c49656a-001e-00bc-3ceb-3715c8000000 + X-Ms-Version: + - 2016-05-31 + status: 403 This request is not authorized to perform this operation. + code: 403 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:52:28 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-31storageclientsuitetestdore?restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:52:29 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4c4967d1-001e-00bc-37eb-3715c8000000 + X-Ms-Version: + - 2016-05-31 + status: 404 The specified container does not exist. + code: 404 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:52:28 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-31storageclientsuitetestdore?restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:52:30 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4c4968aa-001e-00bc-6feb-3715c8000000 + X-Ms-Version: + - 2016-05-31 + status: 404 The specified container does not exist. + code: 404 +- request: + body: "" + form: {} + headers: + User-Agent: + - Go/go1.9 (amd64-windows) azure-storage-go/10.0.2 api-version/2016-05-31 blob + x-ms-date: + - Wed, 27 Sep 2017 23:52:28 GMT + x-ms-version: + - 2016-05-31 + url: https://golangrocksonazure.blob.core.windows.net/cnt-31storageclientsuitetestdore?restype=container&se=2050-12-20&sig=H47yV%2BBZqUb6EMXkxCwBoRUjUuBNbwqnUdArMgO3agQ%3D&sp=rwdlacup&spr=https&srt=sco&ss=b&sv=2016-05-31 + method: HEAD + response: + body: "" + headers: + Date: + - Wed, 27 Sep 2017 23:52:32 GMT + Server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + X-Ms-Request-Id: + - 4c496a40-001e-00bc-4eeb-3715c8000000 + X-Ms-Version: + - 2016-05-31 + status: 404 The specified container does not exist. + code: 404 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/share.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/share.go index e6a868081..a14d9d324 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/share.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/share.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "fmt" "net/http" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/share_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/share_test.go index 2e207bdc9..85b588c5f 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/share_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/share_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import chk "gopkg.in/check.v1" type StorageShareSuite struct{} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/storagepolicy.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/storagepolicy.go index bee1c31ad..056ab398a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/storagepolicy.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/storagepolicy.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "strings" "time" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice.go index 88700fbc9..c102619c9 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "net/http" "net/url" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice_test.go index 713aeb8a2..3b47f6322 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/storageservice_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import chk "gopkg.in/check.v1" type StorageSuite struct{} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/table.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/table.go index 4eae3af9d..6c01d32ee 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/table.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/table.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/json" @@ -174,11 +188,7 @@ func (t *Table) Delete(timeout uint, options *TableOptions) error { } defer readAndCloseBody(resp.body) - if err := checkRespCode(resp.statusCode, []int{http.StatusNoContent}); err != nil { - return err - - } - return nil + return checkRespCode(resp.statusCode, []int{http.StatusNoContent}) } // QueryOptions includes options for a query entities operation. @@ -261,10 +271,7 @@ func (t *Table) SetPermissions(tap []TableAccessPolicy, timeout uint, options *T } defer readAndCloseBody(resp.body) - if err := checkRespCode(resp.statusCode, []int{http.StatusNoContent}); err != nil { - return err - } - return nil + return checkRespCode(resp.statusCode, []int{http.StatusNoContent}) } func generateTableACLPayload(policies []TableAccessPolicy) (io.Reader, int, error) { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch.go index 7a0f0915c..3f882417c 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/json" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go index 7bf6c51c3..27c92d9f6 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_batch_test.go @@ -2,6 +2,20 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "time" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_test.go index fd17223db..fb49c9050 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/table_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/table_test.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "strconv" "time" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/tableserviceclient.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/tableserviceclient.go index 895dcfded..456bee773 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/tableserviceclient.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/tableserviceclient.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "encoding/json" "fmt" diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go index d3ae9d092..7734b8f88 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/util.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "crypto/hmac" @@ -18,7 +32,29 @@ import ( ) var ( - fixedTime = time.Date(2050, time.December, 20, 21, 55, 0, 0, time.FixedZone("GMT", -6)) + fixedTime = time.Date(2050, time.December, 20, 21, 55, 0, 0, time.FixedZone("GMT", -6)) + accountSASOptions = AccountSASTokenOptions{ + Services: Services{ + Blob: true, + }, + ResourceTypes: ResourceTypes{ + Service: true, + Container: true, + Object: true, + }, + Permissions: Permissions{ + Read: true, + Write: true, + Delete: true, + List: true, + Add: true, + Create: true, + Update: true, + Process: true, + }, + Expiry: fixedTime, + UseHTTPS: true, + } ) func (c Client) computeHmac256(message string) string { diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go index 345bb28f2..67ff6ca03 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.7.go @@ -1,5 +1,19 @@ // +build !go1.8 +// Copyright 2017 Microsoft Corporation +// +// 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 storage import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go index ed8b77919..eada102c0 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_1.8.go @@ -1,5 +1,19 @@ // +build go1.8 +// Copyright 2017 Microsoft Corporation +// +// 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 storage import ( diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_test.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_test.go index ec57f5056..2cb80534a 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/util_test.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/util_test.go @@ -1,9 +1,24 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + import ( "bytes" "encoding/hex" "encoding/xml" + "flag" "fmt" "io/ioutil" "net/url" @@ -16,9 +31,21 @@ import ( chk "gopkg.in/check.v1" ) +var ( + overwriteRec bool + pwd string +) + func TestMain(m *testing.M) { + var err error + flag.BoolVar(&overwriteRec, "ow", false, "Regenerate recordings for testing") + pwd, err = os.Getwd() + if err != nil { + fmt.Fprintf(os.Stderr, "Unable to get current working directory: %v\n", err) + os.Exit(1) + } exitStatus := m.Run() - err := fixRecordings() + err = fixRecordings() if err != nil { fmt.Fprintf(os.Stderr, "After test run, fixing recordings failed with error: %v\n", err) exitStatus = 1 diff --git a/vendor/github.com/Azure/azure-sdk-for-go/storage/version.go b/vendor/github.com/Azure/azure-sdk-for-go/storage/version.go index a23fff1e2..1cd3e03d1 100644 --- a/vendor/github.com/Azure/azure-sdk-for-go/storage/version.go +++ b/vendor/github.com/Azure/azure-sdk-for-go/storage/version.go @@ -1,5 +1,19 @@ package storage +// Copyright 2017 Microsoft Corporation +// +// 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. + var ( sdkVersion = "10.0.2" ) diff --git a/vendor/github.com/kurin/blazer/.travis.yml b/vendor/github.com/kurin/blazer/.travis.yml index f763c7505..47102cb0d 100644 --- a/vendor/github.com/kurin/blazer/.travis.yml +++ b/vendor/github.com/kurin/blazer/.travis.yml @@ -7,4 +7,5 @@ branches: only: - master -script: B2_LOG_LEVEL=2 go test -v ./base ./b2 +before_script: go run internal/bin/cleanup/cleanup.go +script: go test -v ./base ./b2 ./x/... diff --git a/vendor/github.com/kurin/blazer/b2/b2.go b/vendor/github.com/kurin/blazer/b2/b2.go index 03be44efb..875c5310e 100644 --- a/vendor/github.com/kurin/blazer/b2/b2.go +++ b/vendor/github.com/kurin/blazer/b2/b2.go @@ -28,6 +28,7 @@ package b2 import ( + "context" "fmt" "io" "net/http" @@ -35,8 +36,6 @@ import ( "strconv" "sync" "time" - - "golang.org/x/net/context" ) // Client is a Backblaze B2 client. @@ -67,11 +66,23 @@ type clientOptions struct { failSomeUploads bool expireTokens bool capExceeded bool + userAgents []string } // A ClientOption allows callers to adjust various per-client settings. type ClientOption func(*clientOptions) +// UserAgent sets the User-Agent HTTP header. The default header is +// "blazer/"; the value set here will be prepended to that. This can +// be set multiple times. +// +// A user agent is generally of the form "/ ()". +func UserAgent(agent string) ClientOption { + return func(o *clientOptions) { + o.userAgents = append(o.userAgents, agent) + } +} + // Transport sets the underlying HTTP transport mechanism. If unset, // http.DefaultTransport is used. func Transport(rt http.RoundTripper) ClientOption { @@ -118,6 +129,7 @@ const ( UnknownType BucketType = "" Private = "allPrivate" Public = "allPublic" + Snapshot = "snapshot" ) // BucketAttrs holds a bucket's metadata attributes. @@ -582,11 +594,19 @@ func (b *Bucket) Reveal(ctx context.Context, name string) error { return obj.Delete(ctx) } +// I don't want to import all of ioutil for this. +type discard struct{} + +func (discard) Write(p []byte) (int, error) { + return len(p), nil +} + func (b *Bucket) getObject(ctx context.Context, name string) (*Object, error) { fr, err := b.b.downloadFileByName(ctx, name, 0, 1) if err != nil { return nil, err } + io.Copy(discard{}, fr) fr.Close() return &Object{ name: name, diff --git a/vendor/github.com/kurin/blazer/b2/b2_test.go b/vendor/github.com/kurin/blazer/b2/b2_test.go index d862b898c..e728f9bb7 100644 --- a/vendor/github.com/kurin/blazer/b2/b2_test.go +++ b/vendor/github.com/kurin/blazer/b2/b2_test.go @@ -16,6 +16,7 @@ package b2 import ( "bytes" + "context" "crypto/sha1" "fmt" "io" @@ -26,8 +27,6 @@ import ( "sync" "testing" "time" - - "golang.org/x/net/context" ) const ( @@ -352,6 +351,82 @@ func (zReader) Read(p []byte) (int, error) { return len(p), nil } +type zReadSeeker struct { + size int64 + pos int64 +} + +func (rs *zReadSeeker) Read(p []byte) (int, error) { + for i := rs.pos; ; i++ { + j := int(i - rs.pos) + if j >= len(p) || i >= rs.size { + var rtn error + if i >= rs.size { + rtn = io.EOF + } + rs.pos = i + return j, rtn + } + f := int(i) % len(pattern) + p[j] = pattern[f] + } +} + +func (rs *zReadSeeker) Seek(offset int64, whence int) (int64, error) { + switch whence { + case io.SeekStart: + rs.pos = offset + case io.SeekEnd: + rs.pos = rs.size + offset + } + return rs.pos, nil +} + +func TestReaderFrom(t *testing.T) { + ctx := context.Background() + ctx, cancel := context.WithTimeout(ctx, 10*time.Second) + defer cancel() + + table := []struct { + size, pos int64 + }{ + { + size: 10, + }, + } + + for _, e := range table { + client := &Client{ + backend: &beRoot{ + b2i: &testRoot{ + bucketMap: make(map[string]map[string]string), + errs: &errCont{}, + }, + }, + } + + bucket, err := client.NewBucket(ctx, bucketName, &BucketAttrs{Type: Private}) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := bucket.Delete(ctx); err != nil { + t.Error(err) + } + }() + + r := &zReadSeeker{pos: e.pos, size: e.size} + w := bucket.Object("writer").NewWriter(ctx) + n, err := w.ReadFrom(r) + if err != nil { + t.Errorf("ReadFrom(): %v", err) + } + if n != e.size { + t.Errorf("ReadFrom(): got %d bytes, wanted %d bytes", n, e.size) + } + } +} + func TestReauth(t *testing.T) { ctx := context.Background() ctx, cancel := context.WithTimeout(ctx, 10*time.Second) @@ -696,6 +771,52 @@ func TestFileBuffer(t *testing.T) { } } +func TestNonBuffer(t *testing.T) { + table := []struct { + str string + off int64 + len int64 + want string + }{ + { + str: "a string", + off: 0, + len: 3, + want: "a s", + }, + { + str: "a string", + off: 3, + len: 1, + want: "t", + }, + { + str: "a string", + off: 3, + len: 5, + want: "tring", + }, + } + + for _, e := range table { + nb := newNonBuffer(strings.NewReader(e.str), e.off, e.len) + want := fmt.Sprintf("%s%x", e.want, sha1.Sum([]byte(e.str[int(e.off):int(e.off+e.len)]))) + r, err := nb.Reader() + if err != nil { + t.Error(err) + continue + } + got, err := ioutil.ReadAll(r) + if err != nil { + t.Errorf("ioutil.ReadAll(%#v): %v", e, err) + continue + } + if want != string(got) { + t.Errorf("ioutil.ReadAll(%#v): got %q, want %q", e, string(got), want) + } + } +} + func writeFile(ctx context.Context, bucket *Bucket, name string, size int64, csize int) (*Object, string, error) { r := io.LimitReader(zReader{}, size) o := bucket.Object(name) @@ -704,9 +825,13 @@ func writeFile(ctx context.Context, bucket *Bucket, name string, size int64, csi w := io.MultiWriter(f, h) f.ConcurrentUploads = 5 f.ChunkSize = csize - if _, err := io.Copy(w, r); err != nil { + n, err := io.Copy(w, r) + if err != nil { return nil, "", err } + if n != size { + return nil, "", fmt.Errorf("io.Copy(): wrote %d bytes; wanted %d bytes", n, size) + } if err := f.Close(); err != nil { return nil, "", err } diff --git a/vendor/github.com/kurin/blazer/b2/backend.go b/vendor/github.com/kurin/blazer/b2/backend.go index fa41319e0..392dbb3cf 100644 --- a/vendor/github.com/kurin/blazer/b2/backend.go +++ b/vendor/github.com/kurin/blazer/b2/backend.go @@ -15,11 +15,10 @@ package b2 import ( + "context" "io" "math/rand" "time" - - "golang.org/x/net/context" ) // This file wraps the baseline interfaces with backoff and retry semantics. @@ -63,7 +62,7 @@ type beBucket struct { } type beURLInterface interface { - uploadFile(context.Context, io.ReadSeeker, int, string, string, string, map[string]string) (beFileInterface, error) + uploadFile(context.Context, readResetter, int, string, string, string, map[string]string) (beFileInterface, error) } type beURL struct { @@ -100,7 +99,7 @@ type beLargeFile struct { type beFileChunkInterface interface { reload(context.Context) error - uploadPart(context.Context, io.ReadSeeker, string, int, int) (int, error) + uploadPart(context.Context, readResetter, string, int, int) (int, error) } type beFileChunk struct { @@ -414,10 +413,10 @@ func (b *beBucket) file(id, name string) beFileInterface { } } -func (b *beURL) uploadFile(ctx context.Context, r io.ReadSeeker, size int, name, ct, sha1 string, info map[string]string) (beFileInterface, error) { +func (b *beURL) uploadFile(ctx context.Context, r readResetter, size int, name, ct, sha1 string, info map[string]string) (beFileInterface, error) { var file beFileInterface f := func() error { - if _, err := r.Seek(0, 0); err != nil { + if err := r.Reset(); err != nil { return err } f, err := b.b2url.uploadFile(ctx, r, size, name, ct, sha1, info) @@ -578,12 +577,12 @@ func (b *beFileChunk) reload(ctx context.Context) error { return withBackoff(ctx, b.ri, f) } -func (b *beFileChunk) uploadPart(ctx context.Context, r io.ReadSeeker, sha1 string, size, index int) (int, error) { +func (b *beFileChunk) uploadPart(ctx context.Context, r readResetter, sha1 string, size, index int) (int, error) { // no re-auth; pass it back up to the caller so they can get an new upload URI and token // TODO: we should handle that here probably var i int f := func() error { - if _, err := r.Seek(0, 0); err != nil { + if err := r.Reset(); err != nil { return err } j, err := b.b2fileChunk.uploadPart(ctx, r, sha1, size, index) diff --git a/vendor/github.com/kurin/blazer/b2/baseline.go b/vendor/github.com/kurin/blazer/b2/baseline.go index a8084fb60..4a813b8a1 100644 --- a/vendor/github.com/kurin/blazer/b2/baseline.go +++ b/vendor/github.com/kurin/blazer/b2/baseline.go @@ -15,13 +15,12 @@ package b2 import ( + "context" "io" "net/http" "time" "github.com/kurin/blazer/base" - - "golang.org/x/net/context" ) // This file wraps the base package in a thin layer, for testing. It should be @@ -150,6 +149,9 @@ func (b *b2Root) authorizeAccount(ctx context.Context, account, key string, opts if c.capExceeded { aopts = append(aopts, base.ForceCapExceeded()) } + for _, agent := range c.userAgents { + aopts = append(aopts, base.UserAgent(agent)) + } nb, err := base.AuthorizeAccount(ctx, account, key, aopts...) if err != nil { return err diff --git a/vendor/github.com/kurin/blazer/b2/buffer.go b/vendor/github.com/kurin/blazer/b2/buffer.go index aba676527..ab8fef081 100644 --- a/vendor/github.com/kurin/blazer/b2/buffer.go +++ b/vendor/github.com/kurin/blazer/b2/buffer.go @@ -17,22 +17,84 @@ package b2 import ( "bytes" "crypto/sha1" + "errors" "fmt" "hash" "io" "io/ioutil" "os" + "strings" "sync" ) +type readResetter interface { + Read([]byte) (int, error) + Reset() error +} + +type resetter struct { + rs io.ReadSeeker +} + +func (r resetter) Read(p []byte) (int, error) { return r.rs.Read(p) } +func (r resetter) Reset() error { _, err := r.rs.Seek(0, 0); return err } + +func newResetter(p []byte) readResetter { return resetter{rs: bytes.NewReader(p)} } + type writeBuffer interface { io.Writer Len() int - Reader() (io.ReadSeeker, error) + Reader() (readResetter, error) Hash() string // sha1 or whatever it is Close() error } +// nonBuffer doesn't buffer anything, but passes values directly from the +// source readseeker. Many nonBuffers can point at different parts of the same +// underlying source, and be accessed by multiple goroutines simultaneously. +func newNonBuffer(rs io.ReaderAt, offset, size int64) writeBuffer { + return &nonBuffer{ + r: io.NewSectionReader(rs, offset, size), + size: int(size), + hsh: sha1.New(), + } +} + +type nonBuffer struct { + r *io.SectionReader + size int + hsh hash.Hash + + isEOF bool + buf *strings.Reader +} + +func (nb *nonBuffer) Len() int { return nb.size + 40 } +func (nb *nonBuffer) Hash() string { return "hex_digits_at_end" } +func (nb *nonBuffer) Close() error { return nil } +func (nb *nonBuffer) Reader() (readResetter, error) { return nb, nil } +func (nb *nonBuffer) Write([]byte) (int, error) { return 0, errors.New("writes not supported") } + +func (nb *nonBuffer) Read(p []byte) (int, error) { + if nb.isEOF { + return nb.buf.Read(p) + } + n, err := io.TeeReader(nb.r, nb.hsh).Read(p) + if err == io.EOF { + err = nil + nb.isEOF = true + nb.buf = strings.NewReader(fmt.Sprintf("%x", nb.hsh.Sum(nil))) + } + return n, err +} + +func (nb *nonBuffer) Reset() error { + nb.hsh.Reset() + nb.isEOF = false + _, err := nb.r.Seek(0, 0) + return err +} + type memoryBuffer struct { buf *bytes.Buffer hsh hash.Hash @@ -56,15 +118,10 @@ func newMemoryBuffer() *memoryBuffer { return mb } -type thing struct { - rs io.ReadSeeker - t int -} - -func (mb *memoryBuffer) Write(p []byte) (int, error) { return mb.w.Write(p) } -func (mb *memoryBuffer) Len() int { return mb.buf.Len() } -func (mb *memoryBuffer) Reader() (io.ReadSeeker, error) { return bytes.NewReader(mb.buf.Bytes()), nil } -func (mb *memoryBuffer) Hash() string { return fmt.Sprintf("%x", mb.hsh.Sum(nil)) } +func (mb *memoryBuffer) Write(p []byte) (int, error) { return mb.w.Write(p) } +func (mb *memoryBuffer) Len() int { return mb.buf.Len() } +func (mb *memoryBuffer) Reader() (readResetter, error) { return newResetter(mb.buf.Bytes()), nil } +func (mb *memoryBuffer) Hash() string { return fmt.Sprintf("%x", mb.hsh.Sum(nil)) } func (mb *memoryBuffer) Close() error { mb.mux.Lock() @@ -107,7 +164,7 @@ func (fb *fileBuffer) Write(p []byte) (int, error) { func (fb *fileBuffer) Len() int { return fb.s } func (fb *fileBuffer) Hash() string { return fmt.Sprintf("%x", fb.hsh.Sum(nil)) } -func (fb *fileBuffer) Reader() (io.ReadSeeker, error) { +func (fb *fileBuffer) Reader() (readResetter, error) { if _, err := fb.f.Seek(0, 0); err != nil { return nil, err } @@ -124,5 +181,5 @@ type fr struct { f *os.File } -func (r *fr) Read(p []byte) (int, error) { return r.f.Read(p) } -func (r *fr) Seek(a int64, b int) (int64, error) { return r.f.Seek(a, b) } +func (r *fr) Read(p []byte) (int, error) { return r.f.Read(p) } +func (r *fr) Reset() error { _, err := r.f.Seek(0, 0); return err } diff --git a/vendor/github.com/kurin/blazer/b2/integration_test.go b/vendor/github.com/kurin/blazer/b2/integration_test.go index df32f7923..07ca3c68b 100644 --- a/vendor/github.com/kurin/blazer/b2/integration_test.go +++ b/vendor/github.com/kurin/blazer/b2/integration_test.go @@ -16,6 +16,7 @@ package b2 import ( "bytes" + "context" "crypto/sha1" "fmt" "io" @@ -23,10 +24,9 @@ import ( "os" "reflect" "sync" + "sync/atomic" "testing" "time" - - "golang.org/x/net/context" ) const ( @@ -79,6 +79,86 @@ func TestReadWriteLive(t *testing.T) { } } +func TestReaderFromLive(t *testing.T) { + ctx := context.Background() + ctx, cancel := context.WithTimeout(ctx, 10*time.Minute) + defer cancel() + + bucket, done := startLiveTest(ctx, t) + defer done() + + table := []struct { + size, pos int64 + csize, writers int + }{ + { + // that it works at all + size: 10, + }, + { + // large uploads + size: 15e6 + 10, + csize: 5e6, + writers: 2, + }, + { + // an excess of writers + size: 50e6, + csize: 5e6, + writers: 12, + }, + { + // with offset, seeks back to start after turning it into a ReaderAt + size: 250, + pos: 50, + }, + } + + for i, e := range table { + rs := &zReadSeeker{pos: e.pos, size: e.size} + o := bucket.Object(fmt.Sprintf("writer.%d", i)) + w := o.NewWriter(ctx) + w.ChunkSize = e.csize + w.ConcurrentUploads = e.writers + n, err := w.ReadFrom(rs) + if err != nil { + t.Errorf("ReadFrom(): %v", err) + } + if n != e.size { + t.Errorf("ReadFrom(): got %d bytes, wanted %d bytes", n, e.size) + } + if err := w.Close(); err != nil { + t.Errorf("w.Close(): %v", err) + continue + } + + r := o.NewReader(ctx) + h := sha1.New() + rn, err := io.Copy(h, r) + if err != nil { + t.Errorf("Read from B2: %v", err) + } + if rn != n { + t.Errorf("Read from B2: got %d bytes, want %d bytes", rn, n) + } + if err := r.Close(); err != nil { + t.Errorf("r.Close(): %v", err) + } + + hex := fmt.Sprintf("%x", h.Sum(nil)) + attrs, err := o.Attrs(ctx) + if err != nil { + t.Errorf("Attrs(): %v", err) + continue + } + if attrs.SHA1 == "none" { + continue + } + if hex != attrs.SHA1 { + t.Errorf("SHA1: got %q, want %q", hex, attrs.SHA1) + } + } +} func TestHideShowLive(t *testing.T) { ctx := context.Background() ctx, cancel := context.WithTimeout(ctx, 10*time.Minute) @@ -200,7 +280,6 @@ func TestResumeWriter(t *testing.T) { } func TestAttrs(t *testing.T) { - // TODO: test is flaky ctx := context.Background() ctx, cancel := context.WithTimeout(ctx, 10*time.Minute) defer cancel() @@ -765,6 +844,74 @@ func listObjects(ctx context.Context, f func(context.Context, int, *Cursor) ([]* var transport = http.DefaultTransport +type eofTripper struct { + rt http.RoundTripper + t *testing.T +} + +func (et eofTripper) RoundTrip(req *http.Request) (*http.Response, error) { + resp, err := et.rt.RoundTrip(req) + if err != nil { + return nil, err + } + resp.Body = &eofReadCloser{rc: resp.Body, t: et.t} + return resp, nil +} + +type eofReadCloser struct { + rc io.ReadCloser + eof bool + t *testing.T +} + +func (eof *eofReadCloser) Read(p []byte) (int, error) { + n, err := eof.rc.Read(p) + if err == io.EOF { + eof.eof = true + } + return n, err +} + +func (eof *eofReadCloser) Close() error { + if !eof.eof { + eof.t.Error("http body closed with bytes unread") + } + return eof.rc.Close() +} + +// Checks that close is called. +type ccTripper struct { + t *testing.T + rt http.RoundTripper + trips int64 +} + +func (cc *ccTripper) RoundTrip(req *http.Request) (*http.Response, error) { + resp, err := cc.rt.RoundTrip(req) + if err != nil { + return nil, err + } + atomic.AddInt64(&cc.trips, 1) + resp.Body = &ccRC{ReadCloser: resp.Body, c: &cc.trips} + return resp, err +} + +func (cc *ccTripper) done() { + if cc.trips != 0 { + cc.t.Errorf("failed to close %d HTTP bodies", cc.trips) + } +} + +type ccRC struct { + io.ReadCloser + c *int64 +} + +func (cc *ccRC) Close() error { + atomic.AddInt64(cc.c, -1) + return cc.ReadCloser.Close() +} + func startLiveTest(ctx context.Context, t *testing.T) (*Bucket, func()) { id := os.Getenv(apiID) key := os.Getenv(apiKey) @@ -772,7 +919,9 @@ func startLiveTest(ctx context.Context, t *testing.T) (*Bucket, func()) { t.Skipf("B2_ACCOUNT_ID or B2_SECRET_KEY unset; skipping integration tests") return nil, nil } - client, err := NewClient(ctx, id, key, FailSomeUploads(), ExpireSomeAuthTokens(), Transport(transport)) + ccport := &ccTripper{rt: transport, t: t} + tport := eofTripper{rt: ccport, t: t} + client, err := NewClient(ctx, id, key, FailSomeUploads(), ExpireSomeAuthTokens(), Transport(tport), UserAgent("b2-test"), UserAgent("integration-test")) if err != nil { t.Fatal(err) return nil, nil @@ -783,6 +932,7 @@ func startLiveTest(ctx context.Context, t *testing.T) (*Bucket, func()) { return nil, nil } f := func() { + defer ccport.done() for c := range listObjects(ctx, bucket.ListObjects) { if c.err != nil { continue diff --git a/vendor/github.com/kurin/blazer/b2/reader.go b/vendor/github.com/kurin/blazer/b2/reader.go index 9b293710e..643e17dcf 100644 --- a/vendor/github.com/kurin/blazer/b2/reader.go +++ b/vendor/github.com/kurin/blazer/b2/reader.go @@ -16,13 +16,12 @@ package b2 import ( "bytes" + "context" "errors" "io" "sync" "github.com/kurin/blazer/internal/blog" - - "golang.org/x/net/context" ) var errNoMoreContent = errors.New("416: out of content") @@ -140,11 +139,12 @@ func (r *Reader) thread() { return } rsize, _, _, _ := fr.stats() - mr := &meteredReader{r: &fakeSeeker{fr}, size: int(rsize)} + mr := &meteredReader{r: noopResetter{fr}, size: int(rsize)} r.smux.Lock() r.smap[chunkID] = mr r.smux.Unlock() i, err := copyContext(r.ctx, buf, mr) + fr.Close() r.smux.Lock() r.smap[chunkID] = nil r.smux.Unlock() @@ -290,11 +290,8 @@ func copyContext(ctx context.Context, dst io.Writer, src io.Reader) (written int return written, err } -// fakeSeeker exists so that we can wrap the http response body (an io.Reader -// but not an io.Seeker) into a meteredReader, which will allow us to keep tabs -// on how much of the chunk we've read so far. -type fakeSeeker struct { +type noopResetter struct { io.Reader } -func (fs *fakeSeeker) Seek(int64, int) (int64, error) { return 0, nil } +func (noopResetter) Reset() error { return nil } diff --git a/vendor/github.com/kurin/blazer/b2/readerat.go b/vendor/github.com/kurin/blazer/b2/readerat.go new file mode 100644 index 000000000..5f2d153a0 --- /dev/null +++ b/vendor/github.com/kurin/blazer/b2/readerat.go @@ -0,0 +1,48 @@ +// Copyright 2017, Google +// +// 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 b2 + +import ( + "io" + "sync" +) + +type readerAt struct { + rs io.ReadSeeker + mu sync.Mutex +} + +func (r *readerAt) ReadAt(p []byte, off int64) (int, error) { + r.mu.Lock() + defer r.mu.Unlock() + + // ReadAt is supposed to preserve the offset. + cur, err := r.rs.Seek(0, io.SeekCurrent) + if err != nil { + return 0, err + } + defer func() { r.rs.Seek(cur, io.SeekStart) }() + + if _, err := r.rs.Seek(off, io.SeekStart); err != nil { + return 0, err + } + return io.ReadFull(r.rs, p) +} + +// wraps a ReadSeeker in a mutex to provite a ReaderAt how is this not in the +// io package? +func enReaderAt(rs io.ReadSeeker) io.ReaderAt { + return &readerAt{rs: rs} +} diff --git a/vendor/github.com/kurin/blazer/b2/writer.go b/vendor/github.com/kurin/blazer/b2/writer.go index 9959c5ac5..5e5c29ed4 100644 --- a/vendor/github.com/kurin/blazer/b2/writer.go +++ b/vendor/github.com/kurin/blazer/b2/writer.go @@ -15,6 +15,7 @@ package b2 import ( + "context" "errors" "fmt" "io" @@ -23,8 +24,6 @@ import ( "time" "github.com/kurin/blazer/internal/blog" - - "golang.org/x/net/context" ) // Writer writes data into Backblaze. It automatically switches to the large @@ -75,6 +74,7 @@ type Writer struct { file beLargeFileInterface seen map[int]string everStarted bool + newBuffer func() (writeBuffer, error) o *Object name string @@ -94,15 +94,8 @@ type chunk struct { buf writeBuffer } -func (w *Writer) getBuffer() (writeBuffer, error) { - if !w.UseFileBuffer { - return newMemoryBuffer(), nil - } - return newFileBuffer(w.FileBufferDir) -} - func (w *Writer) setErr(err error) { - if err == nil { + if err == nil || err == io.EOF { return } w.emux.Lock() @@ -200,8 +193,7 @@ func (w *Writer) thread() { }() } -// Write satisfies the io.Writer interface. -func (w *Writer) Write(p []byte) (int, error) { +func (w *Writer) init() { w.start.Do(func() { w.everStarted = true w.smux.Lock() @@ -212,13 +204,24 @@ func (w *Writer) Write(p []byte) (int, error) { if w.csize == 0 { w.csize = 1e8 } - v, err := w.getBuffer() + if w.newBuffer == nil { + w.newBuffer = func() (writeBuffer, error) { return newMemoryBuffer(), nil } + if w.UseFileBuffer { + w.newBuffer = func() (writeBuffer, error) { return newFileBuffer(w.FileBufferDir) } + } + } + v, err := w.newBuffer() if err != nil { w.setErr(err) return } w.w = v }) +} + +// Write satisfies the io.Writer interface. +func (w *Writer) Write(p []byte) (int, error) { + w.init() if err := w.getErr(); err != nil { return 0, err } @@ -263,7 +266,7 @@ redo: f, err := ue.uploadFile(w.ctx, mr, int(w.w.Len()), w.name, ctype, sha1, w.info) if err != nil { if w.o.b.r.reupload(err) { - blog.V(1).Infof("b2 writer: %v; retrying", err) + blog.V(2).Infof("b2 writer: %v; retrying", err) u, err := w.o.b.b.getUploadURL(w.ctx) if err != nil { return err @@ -352,7 +355,7 @@ func (w *Writer) sendChunk() error { return w.ctx.Err() } w.cidx++ - v, err := w.getBuffer() + v, err := w.newBuffer() if err != nil { return err } @@ -360,15 +363,83 @@ func (w *Writer) sendChunk() error { return nil } +// ReadFrom reads all of r into w, returning the first error or no error if r +// returns io.EOF. If r is also an io.Seeker, ReadFrom will stream r directly +// over the wire instead of buffering it locally. This reduces memory usage. +// +// Do not issue multiple calls to ReadFrom, or mix ReadFrom and Write. If you +// have multiple readers you want to concatenate into the same B2 object, use +// an io.MultiReader. +// +// Note that io.Copy will automatically choose to use ReadFrom. +// +// ReadFrom currently doesn't handle w.Resume; if w.Resume is true, ReadFrom +// will act as if r is not an io.Seeker. +func (w *Writer) ReadFrom(r io.Reader) (int64, error) { + rs, ok := r.(io.ReadSeeker) + if !ok || w.Resume { + return copyContext(w.ctx, w, r) + } + blog.V(2).Info("streaming without buffer") + size, err := rs.Seek(0, io.SeekEnd) + if err != nil { + return 0, err + } + var ra io.ReaderAt + if rat, ok := r.(io.ReaderAt); ok { + ra = rat + } else { + ra = enReaderAt(rs) + } + var offset int64 + var wrote int64 + w.newBuffer = func() (writeBuffer, error) { + left := size - offset + if left <= 0 { + // We're done sending real chunks; send empty chunks from now on so that + // Close() works. + w.newBuffer = func() (writeBuffer, error) { return newMemoryBuffer(), nil } + w.w = newMemoryBuffer() + return nil, io.EOF + } + csize := int64(w.csize) + if left < csize { + csize = left + } + nb := newNonBuffer(ra, offset, csize) + wrote += csize // TODO: this is kind of a total lie + offset += csize + return nb, nil + } + w.init() + if size < int64(w.csize) { + // the magic happens on w.Close() + return size, nil + } + for { + if err := w.sendChunk(); err != nil { + if err != io.EOF { + return wrote, err + } + return wrote, nil + } + } +} + // Close satisfies the io.Closer interface. It is critical to check the return -// value of Close on all writers. +// value of Close for all writers. func (w *Writer) Close() error { w.done.Do(func() { if !w.everStarted { return } defer w.o.b.c.removeWriter(w) - defer w.w.Close() // TODO: log error + defer func() { + if err := w.w.Close(); err != nil { + // this is non-fatal, but alarming + blog.V(1).Infof("close %s: %v", w.name, err) + } + }() if w.cidx == 0 { w.setErr(w.simpleWriteFile()) return @@ -423,7 +494,7 @@ func (w *Writer) status() *WriterStatus { type meteredReader struct { read int64 size int - r io.ReadSeeker + r readResetter mux sync.Mutex } @@ -435,11 +506,11 @@ func (mr *meteredReader) Read(p []byte) (int, error) { return n, err } -func (mr *meteredReader) Seek(offset int64, whence int) (int64, error) { +func (mr *meteredReader) Reset() error { mr.mux.Lock() defer mr.mux.Unlock() - mr.read = offset - return mr.r.Seek(offset, whence) + mr.read = 0 + return mr.r.Reset() } func (mr *meteredReader) done() float64 { diff --git a/vendor/github.com/kurin/blazer/base/base.go b/vendor/github.com/kurin/blazer/base/base.go index 9db0e7ea2..431e618bd 100644 --- a/vendor/github.com/kurin/blazer/base/base.go +++ b/vendor/github.com/kurin/blazer/base/base.go @@ -23,6 +23,7 @@ package base import ( "bytes" + "context" "encoding/base64" "encoding/json" "fmt" @@ -38,12 +39,11 @@ import ( "github.com/kurin/blazer/internal/b2types" "github.com/kurin/blazer/internal/blog" - - "golang.org/x/net/context" ) -var ( - APIBase = "https://api.backblazeb2.com" +const ( + APIBase = "https://api.backblazeb2.com" + DefaultUserAgent = "blazer/0.1.1" ) type b2err struct { @@ -218,6 +218,22 @@ type b2Options struct { failSomeUploads bool expireTokens bool capExceeded bool + apiBase string + userAgent string +} + +func (o *b2Options) getAPIBase() string { + if o.apiBase != "" { + return o.apiBase + } + return APIBase +} + +func (o *b2Options) getUserAgent() string { + if o.userAgent != "" { + return fmt.Sprintf("%s %s", o.userAgent, DefaultUserAgent) + } + return DefaultUserAgent } func (o *b2Options) getTransport() http.RoundTripper { @@ -281,6 +297,34 @@ func (rb *requestBody) getBody() io.Reader { return rb.body } +type keepFinalBytes struct { + r io.Reader + remain int + sha [40]byte +} + +func (k *keepFinalBytes) Read(p []byte) (int, error) { + n, err := k.r.Read(p) + if k.remain-n > 40 { + k.remain -= n + return n, err + } + // This was a whole lot harder than it looks. + pi := -40 + k.remain + if pi < 0 { + pi = 0 + } + pe := n + ki := 40 - k.remain + if ki < 0 { + ki = 0 + } + ke := n - k.remain + 40 + copy(k.sha[ki:ke], p[pi:pe]) + k.remain -= n + return n, err +} + var reqID int64 func (o *b2Options) makeRequest(ctx context.Context, method, verb, uri string, b2req, b2resp interface{}, headers map[string]string, body *requestBody) error { @@ -307,6 +351,7 @@ func (o *b2Options) makeRequest(ctx context.Context, method, verb, uri string, b } req.Header.Set(k, v) } + req.Header.Set("User-Agent", o.getUserAgent()) req.Header.Set("X-Blazer-Request-ID", fmt.Sprintf("%d", atomic.AddInt64(&reqID, 1))) req.Header.Set("X-Blazer-Method", method) if o.failSomeUploads { @@ -372,7 +417,7 @@ func AuthorizeAccount(ctx context.Context, account, key string, opts ...AuthOpti for _, f := range opts { f(b2opts) } - if err := b2opts.makeRequest(ctx, "b2_authorize_account", "GET", APIBase+b2types.V1api+"b2_authorize_account", nil, b2resp, headers, nil); err != nil { + if err := b2opts.makeRequest(ctx, "b2_authorize_account", "GET", b2opts.getAPIBase()+b2types.V1api+"b2_authorize_account", nil, b2resp, headers, nil); err != nil { return nil, err } return &B2{ @@ -388,6 +433,19 @@ func AuthorizeAccount(ctx context.Context, account, key string, opts ...AuthOpti // An AuthOption allows callers to choose per-session settings. type AuthOption func(*b2Options) +// UserAgent sets the User-Agent HTTP header. The default header is +// "blazer/"; the value set here will be prepended to that. This can +// be set multiple times. +func UserAgent(agent string) AuthOption { + return func(o *b2Options) { + if o.userAgent == "" { + o.userAgent = agent + return + } + o.userAgent = fmt.Sprintf("%s %s", agent, o.userAgent) + } +} + // Transport returns an AuthOption that sets the underlying HTTP mechanism. func Transport(rt http.RoundTripper) AuthOption { return func(o *b2Options) { @@ -817,10 +875,16 @@ func (fc *FileChunk) UploadPart(ctx context.Context, r io.Reader, sha1 string, s "Content-Length": fmt.Sprintf("%d", size), "X-Bz-Content-Sha1": sha1, } + if sha1 == "hex_digits_at_end" { + r = &keepFinalBytes{r: r, remain: size} + } if err := fc.file.b2.opts.makeRequest(ctx, "b2_upload_part", "POST", fc.url, nil, nil, headers, &requestBody{body: r, size: int64(size)}); err != nil { return 0, err } fc.file.mu.Lock() + if sha1 == "hex_digits_at_end" { + sha1 = string(r.(*keepFinalBytes).sha[:]) + } fc.file.hashes[index] = sha1 fc.file.size += int64(size) fc.file.mu.Unlock() @@ -1003,35 +1067,36 @@ func (b *Bucket) DownloadFileByName(ctx context.Context, name string, offset, si resp := reply.resp logResponse(resp, nil) if resp.StatusCode != 200 && resp.StatusCode != 206 { + defer resp.Body.Close() return nil, mkErr(resp) } - clen, err := strconv.ParseInt(reply.resp.Header.Get("Content-Length"), 10, 64) + clen, err := strconv.ParseInt(resp.Header.Get("Content-Length"), 10, 64) if err != nil { - reply.resp.Body.Close() + resp.Body.Close() return nil, err } info := make(map[string]string) - for key := range reply.resp.Header { + for key := range resp.Header { if !strings.HasPrefix(key, "X-Bz-Info-") { continue } name, err := unescape(strings.TrimPrefix(key, "X-Bz-Info-")) if err != nil { - reply.resp.Body.Close() + resp.Body.Close() return nil, err } - val, err := unescape(reply.resp.Header.Get(key)) + val, err := unescape(resp.Header.Get(key)) if err != nil { - reply.resp.Body.Close() + resp.Body.Close() return nil, err } info[name] = val } return &FileReader{ - ReadCloser: reply.resp.Body, - SHA1: reply.resp.Header.Get("X-Bz-Content-Sha1"), - ID: reply.resp.Header.Get("X-Bz-File-Id"), - ContentType: reply.resp.Header.Get("Content-Type"), + ReadCloser: resp.Body, + SHA1: resp.Header.Get("X-Bz-Content-Sha1"), + ID: resp.Header.Get("X-Bz-File-Id"), + ContentType: resp.Header.Get("Content-Type"), ContentLength: int(clen), Info: info, }, nil diff --git a/vendor/github.com/kurin/blazer/base/integration_test.go b/vendor/github.com/kurin/blazer/base/integration_test.go index 7d6980079..92af5a6d8 100644 --- a/vendor/github.com/kurin/blazer/base/integration_test.go +++ b/vendor/github.com/kurin/blazer/base/integration_test.go @@ -57,7 +57,7 @@ func TestStorage(t *testing.T) { ctx := context.Background() // b2_authorize_account - b2, err := AuthorizeAccount(ctx, id, key) + b2, err := AuthorizeAccount(ctx, id, key, UserAgent("blazer-base-test")) if err != nil { t.Fatal(err) } diff --git a/vendor/github.com/kurin/blazer/internal/bin/cleanup/cleanup.go b/vendor/github.com/kurin/blazer/internal/bin/cleanup/cleanup.go new file mode 100644 index 000000000..ece1b1aca --- /dev/null +++ b/vendor/github.com/kurin/blazer/internal/bin/cleanup/cleanup.go @@ -0,0 +1,63 @@ +package main + +import ( + "context" + "fmt" + "io" + "os" + "sync" + + "github.com/kurin/blazer/b2" +) + +const ( + apiID = "B2_ACCOUNT_ID" + apiKey = "B2_SECRET_KEY" +) + +func main() { + id := os.Getenv(apiID) + key := os.Getenv(apiKey) + ctx := context.Background() + client, err := b2.NewClient(ctx, id, key) + if err != nil { + fmt.Println(err) + return + } + var wg sync.WaitGroup + for _, name := range []string{"consistobucket", "base-tests"} { + wg.Add(1) + go func(name string) { + defer wg.Done() + if err := killBucket(ctx, client, id, name); err != nil { + fmt.Println(err) + } + }(name) + } + wg.Wait() +} + +func killBucket(ctx context.Context, client *b2.Client, id, name string) error { + bucket, err := client.NewBucket(ctx, id+"-"+name, nil) + if b2.IsNotExist(err) { + return nil + } + if err != nil { + return err + } + defer bucket.Delete(ctx) + cur := &b2.Cursor{} + for { + os, c, err := bucket.ListObjects(ctx, 1000, cur) + if err != nil && err != io.EOF { + return err + } + for _, o := range os { + o.Delete(ctx) + } + if err == io.EOF { + return nil + } + cur = c + } +} diff --git a/vendor/github.com/kurin/blazer/x/consistent/consistent.go b/vendor/github.com/kurin/blazer/x/consistent/consistent.go new file mode 100644 index 000000000..d9f47c1b2 --- /dev/null +++ b/vendor/github.com/kurin/blazer/x/consistent/consistent.go @@ -0,0 +1,363 @@ +// Copyright 2016, Google +// +// 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 consistent implements an experimental interface for using B2 as a +// coordination primitive. +package consistent + +import ( + "bytes" + "context" + "crypto/rand" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "reflect" + + "github.com/kurin/blazer/b2" +) + +const metaKey = "blazer-meta-key-no-touchie" + +var ( + errUpdateConflict = errors.New("update conflict") + errNotInGroup = errors.New("not in group") +) + +// NewGroup creates a new consistent Group for the given bucket. +func NewGroup(bucket *b2.Bucket, name string) *Group { + return &Group{ + name: name, + b: bucket, + } +} + +// Group represents a collection of B2 objects that can be modified in a +// consistent way. Objects in the same group contend with each other for +// updates, but there can only be so many (maximum of 10; fewer if there are +// other bucket attributes set) groups in a given bucket. +type Group struct { + name string + b *b2.Bucket + ba *b2.BucketAttrs +} + +// Operate calls f with the contents of the group object given by name, and +// updates that object with the output of f if f returns no error. Operate +// guarantees that no other callers have modified the contents of name in the +// meantime (as long as all other callers are using this package). It may call +// f any number of times and, as a result, the potential data transfer is +// unbounded. Callers should have f fail after a given number of attempts if +// this is unacceptable. +// +// The io.Reader that f returns is guaranteed to be read until at least the +// first error. Callers must ensure that this is sufficient for the reader to +// clean up after itself. +func (g *Group) OperateStream(ctx context.Context, name string, f func(io.Reader) (io.Reader, error)) error { + for { + r, err := g.NewReader(ctx, name) + if err != nil && err != errNotInGroup { + return err + } + out, err := f(r) + r.Close() + if err != nil { + return err + } + defer io.Copy(ioutil.Discard, out) // ensure the reader is read + w, err := g.NewWriter(ctx, r.Key, name) + if err != nil { + return err + } + if _, err := io.Copy(w, out); err != nil { + return err + } + if err := w.Close(); err != nil { + if err == errUpdateConflict { + continue + } + return err + } + return nil + } +} + +// Operate uses OperateStream to act on byte slices. +func (g *Group) Operate(ctx context.Context, name string, f func([]byte) ([]byte, error)) error { + return g.OperateStream(ctx, name, func(r io.Reader) (io.Reader, error) { + b, err := ioutil.ReadAll(r) + if b2.IsNotExist(err) { + b = nil + err = nil + } + if err != nil { + return nil, err + } + bs, err := f(b) + if err != nil { + return nil, err + } + return bytes.NewReader(bs), nil + }) +} + +// OperateJSON is a convenience function for transforming JSON data in B2 in a +// consistent way. Callers should pass a function f which accepts a pointer to +// a struct of a given type and transforms it into another struct (ideally but +// not necessarily of the same type). Callers should also pass an example +// struct, t, or a pointer to it, that is the same type. t will not be +// altered. If there is no existing file, f will be called with an pointer to +// an empty struct of type t. Otherwise, it will be called with a pointer to a +// struct filled out with the given JSON. +func (g *Group) OperateJSON(ctx context.Context, name string, t interface{}, f func(interface{}) (interface{}, error)) error { + jsonType := reflect.TypeOf(t) + for jsonType.Kind() == reflect.Ptr { + jsonType = jsonType.Elem() + } + return g.OperateStream(ctx, name, func(r io.Reader) (io.Reader, error) { + in := reflect.New(jsonType).Interface() + if err := json.NewDecoder(r).Decode(in); err != nil && err != io.EOF && !b2.IsNotExist(err) { + return nil, err + } + out, err := f(in) + if err != nil { + return nil, err + } + pr, pw := io.Pipe() + go func() { pw.CloseWithError(json.NewEncoder(pw).Encode(out)) }() + return closeAfterReading{rc: pr}, nil + }) +} + +// closeAfterReading closes the underlying reader on the first non-nil error +type closeAfterReading struct { + rc io.ReadCloser +} + +func (car closeAfterReading) Read(p []byte) (int, error) { + n, err := car.rc.Read(p) + if err != nil { + car.rc.Close() + } + return n, err +} + +// Writer is an io.ReadCloser. +type Writer struct { + ctx context.Context + wc io.WriteCloser + name string + suffix string + key string + g *Group +} + +// Write implements io.Write. +func (w Writer) Write(p []byte) (int, error) { return w.wc.Write(p) } + +// Close writes any remaining data into B2 and updates the group to reflect the +// contents of the new object. If the group object has been modified, Close() +// will fail. +func (w Writer) Close() error { + if err := w.wc.Close(); err != nil { + return err + } + // TODO: maybe see if you can cut down on calls to info() + for { + ci, err := w.g.info(w.ctx) + if err != nil { + // Replacement failed; delete the new version. + w.g.b.Object(w.name + "/" + w.suffix).Delete(w.ctx) + return err + } + old, ok := ci.Locations[w.name] + if ok && old != w.key { + w.g.b.Object(w.name + "/" + w.suffix).Delete(w.ctx) + return errUpdateConflict + } + ci.Locations[w.name] = w.suffix + if err := w.g.save(w.ctx, ci); err != nil { + if err == errUpdateConflict { + continue + } + w.g.b.Object(w.name + "/" + w.suffix).Delete(w.ctx) + return err + } + // Replacement successful; delete the old version. + w.g.b.Object(w.name + "/" + w.key).Delete(w.ctx) + return nil + } +} + +// Reader is an io.ReadCloser. Key must be passed to NewWriter. +type Reader struct { + r io.ReadCloser + Key string +} + +func (r Reader) Read(p []byte) (int, error) { + if r.r == nil { + return 0, io.EOF + } + return r.r.Read(p) +} + +func (r Reader) Close() error { + if r.r == nil { + return nil + } + return r.r.Close() +} + +// NewWriter creates a Writer and prepares it to be updated. The key argument +// should come from the Key field of a Reader; if Writer.Close() returns with +// no error, then the underlying group object was successfully updated from the +// data available from the Reader with no intervening writes. New objects can +// be created with an empty key. +func (g *Group) NewWriter(ctx context.Context, key, name string) (Writer, error) { + suffix, err := random() + if err != nil { + return Writer{}, err + } + return Writer{ + ctx: ctx, + wc: g.b.Object(name + "/" + suffix).NewWriter(ctx), + name: name, + suffix: suffix, + key: key, + g: g, + }, nil +} + +// NewReader creates a Reader with the current version of the object, as well +// as that object's update key. +func (g *Group) NewReader(ctx context.Context, name string) (Reader, error) { + ci, err := g.info(ctx) + if err != nil { + return Reader{}, err + } + suffix, ok := ci.Locations[name] + if !ok { + return Reader{}, errNotInGroup + } + return Reader{ + r: g.b.Object(name + "/" + suffix).NewReader(ctx), + Key: suffix, + }, nil +} + +func (g *Group) info(ctx context.Context) (*consistentInfo, error) { + attrs, err := g.b.Attrs(ctx) + if err != nil { + return nil, err + } + g.ba = attrs + imap := attrs.Info + if imap == nil { + return nil, nil + } + enc, ok := imap[metaKey+"-"+g.name] + if !ok { + return &consistentInfo{ + Version: 1, + Locations: make(map[string]string), + }, nil + } + b, err := base64.StdEncoding.DecodeString(enc) + if err != nil { + return nil, err + } + ci := &consistentInfo{} + if err := json.Unmarshal(b, ci); err != nil { + return nil, err + } + if ci.Locations == nil { + ci.Locations = make(map[string]string) + } + return ci, nil +} + +func (g *Group) save(ctx context.Context, ci *consistentInfo) error { + ci.Serial++ + b, err := json.Marshal(ci) + if err != nil { + return err + } + s := base64.StdEncoding.EncodeToString(b) + + for { + oldAI, err := g.info(ctx) + if err != nil { + return err + } + if oldAI.Serial != ci.Serial-1 { + return errUpdateConflict + } + if g.ba.Info == nil { + g.ba.Info = make(map[string]string) + } + g.ba.Info[metaKey+"-"+g.name] = s + err = g.b.Update(ctx, g.ba) + if err == nil { + return nil + } + if !b2.IsUpdateConflict(err) { + return err + } + // Bucket update conflict; try again. + } +} + +// List returns a list of all the group objects. +func (g *Group) List(ctx context.Context) ([]string, error) { + ci, err := g.info(ctx) + if err != nil { + return nil, err + } + var l []string + for name := range ci.Locations { + l = append(l, name) + } + return l, nil +} + +type consistentInfo struct { + Version int + + // Serial is incremented for every version saved. If we ensure that + // current.Serial = 1 + previous.Serial, and that the bucket metadata is + // updated cleanly, then we know that the version we saved is the direct + // successor to the version we had. If the bucket metadata doesn't update + // cleanly, but the serial relation holds true for the new AI struct, then we + // can retry without bothering the user. However, if the serial relation no + // longer holds true, it means someone else has updated AI and we have to ask + // the user to redo everything they've done. + // + // However, it is still necessary for higher level constructs to confirm that + // the serial number they expect is good. The writer does this, for example, + // but comparing the "key" of the file it is replacing. + Serial int + Locations map[string]string +} + +func random() (string, error) { + b := make([]byte, 20) + if _, err := rand.Read(b); err != nil { + return "", err + } + return fmt.Sprintf("%x", b), nil +} diff --git a/vendor/github.com/kurin/blazer/x/consistent/consistent_test.go b/vendor/github.com/kurin/blazer/x/consistent/consistent_test.go new file mode 100644 index 000000000..0a9b086dc --- /dev/null +++ b/vendor/github.com/kurin/blazer/x/consistent/consistent_test.go @@ -0,0 +1,186 @@ +package consistent + +import ( + "context" + "io" + "io/ioutil" + "os" + "strconv" + "sync" + "testing" + + "github.com/kurin/blazer/b2" +) + +const ( + apiID = "B2_ACCOUNT_ID" + apiKey = "B2_SECRET_KEY" + bucketName = "consistobucket" +) + +func TestOperationLive(t *testing.T) { + ctx := context.Background() + bucket, done := startLiveTest(ctx, t) + defer done() + + g := NewGroup(bucket, "tester") + name := "some_kinda_name/thing.txt" + + var wg sync.WaitGroup + for i := 0; i < 10; i++ { + wg.Add(1) + i := i + go func() { + var n int + defer wg.Done() + for j := 0; j < 10; j++ { + if err := g.Operate(ctx, name, func(b []byte) ([]byte, error) { + if len(b) > 0 { + i, err := strconv.Atoi(string(b)) + if err != nil { + return nil, err + } + n = i + } + return []byte(strconv.Itoa(n + 1)), nil + }); err != nil { + t.Error(err) + } + t.Logf("thread %d: successful %d++", i, n) + } + }() + } + wg.Wait() + + r, err := g.NewReader(ctx, name) + if err != nil { + t.Fatal(err) + } + defer r.Close() + b, err := ioutil.ReadAll(r) + if err != nil { + t.Fatal(err) + } + n, err := strconv.Atoi(string(b)) + if err != nil { + t.Fatal(err) + } + if n != 100 { + t.Errorf("result: got %d, want 10", n) + } +} + +type jsonThing struct { + Boop int `json:"boop_field"` + Thread int `json:"thread_id"` +} + +func TestOperationJSONLive(t *testing.T) { + ctx := context.Background() + bucket, done := startLiveTest(ctx, t) + defer done() + + g := NewGroup(bucket, "tester") + name := "some_kinda_json/thing.json" + + var wg sync.WaitGroup + for i := 0; i < 4; i++ { + wg.Add(1) + i := i + go func() { + var n int + defer wg.Done() + for j := 0; j < 4; j++ { + // Pass both a struct and a pointer to a struct. + var face interface{} + face = jsonThing{} + if j%2 == 0 { + face = &jsonThing{} + } + if err := g.OperateJSON(ctx, name, face, func(j interface{}) (interface{}, error) { + jt := j.(*jsonThing) + n = jt.Boop + return &jsonThing{ + Boop: jt.Boop + 1, + Thread: i, + }, nil + }); err != nil { + t.Error(err) + } + t.Logf("thread %d: successful %d++", i, n) + } + }() + } + wg.Wait() + + if err := g.OperateJSON(ctx, name, &jsonThing{}, func(i interface{}) (interface{}, error) { + jt := i.(*jsonThing) + if jt.Boop != 16 { + t.Errorf("got %d boops; want 16", jt.Boop) + } + return nil, nil + }); err != nil { + t.Error(err) + } +} + +func startLiveTest(ctx context.Context, t *testing.T) (*b2.Bucket, func()) { + id := os.Getenv(apiID) + key := os.Getenv(apiKey) + if id == "" || key == "" { + t.Skipf("B2_ACCOUNT_ID or B2_SECRET_KEY unset; skipping integration tests") + return nil, nil + } + client, err := b2.NewClient(ctx, id, key) + if err != nil { + t.Fatal(err) + return nil, nil + } + bucket, err := client.NewBucket(ctx, id+"-"+bucketName, nil) + if err != nil { + t.Fatal(err) + return nil, nil + } + f := func() { + for c := range listObjects(ctx, bucket.ListObjects) { + if c.err != nil { + continue + } + if err := c.o.Delete(ctx); err != nil { + t.Error(err) + } + } + if err := bucket.Delete(ctx); err != nil && !b2.IsNotExist(err) { + t.Error(err) + } + } + return bucket, f +} + +func listObjects(ctx context.Context, f func(context.Context, int, *b2.Cursor) ([]*b2.Object, *b2.Cursor, error)) <-chan object { + ch := make(chan object) + go func() { + defer close(ch) + var cur *b2.Cursor + for { + objs, c, err := f(ctx, 100, cur) + if err != nil && err != io.EOF { + ch <- object{err: err} + return + } + for _, o := range objs { + ch <- object{o: o} + } + if err == io.EOF { + return + } + cur = c + } + }() + return ch +} + +type object struct { + o *b2.Object + err error +} diff --git a/vendor/github.com/spf13/cobra/cobra/cmd/helpers.go b/vendor/github.com/spf13/cobra/cobra/cmd/helpers.go index c5e261ce3..e5b37ec72 100644 --- a/vendor/github.com/spf13/cobra/cobra/cmd/helpers.go +++ b/vendor/github.com/spf13/cobra/cobra/cmd/helpers.go @@ -18,6 +18,7 @@ import ( "fmt" "io" "os" + "os/exec" "path/filepath" "strings" "text/template" @@ -31,7 +32,27 @@ func init() { envGoPath := os.Getenv("GOPATH") goPaths := filepath.SplitList(envGoPath) if len(goPaths) == 0 { - er("$GOPATH is not set") + // Adapted from https://github.com/Masterminds/glide/pull/798/files. + // As of Go 1.8 the GOPATH is no longer required to be set. Instead there + // is a default value. If there is no GOPATH check for the default value. + // Note, checking the GOPATH first to avoid invoking the go toolchain if + // possible. + + goExecutable := os.Getenv("COBRA_GO_EXECUTABLE") + if len(goExecutable) <= 0 { + goExecutable = "go" + } + + out, err := exec.Command(goExecutable, "env", "GOPATH").Output() + if err != nil { + er(err) + } + + toolchainGoPath := strings.TrimSpace(string(out)) + goPaths = filepath.SplitList(toolchainGoPath) + if len(goPaths) == 0 { + er("$GOPATH is not set") + } } srcPaths = make([]string, 0, len(goPaths)) for _, goPath := range goPaths { diff --git a/vendor/golang.org/x/crypto/acme/autocert/autocert.go b/vendor/golang.org/x/crypto/acme/autocert/autocert.go index a478eff54..b10102017 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/autocert.go +++ b/vendor/golang.org/x/crypto/acme/autocert/autocert.go @@ -83,8 +83,10 @@ func defaultHostPolicy(context.Context, string) error { // It obtains and refreshes certificates automatically, // as well as providing them to a TLS server via tls.Config. // -// To preserve issued certificates and improve overall performance, -// use a cache implementation of Cache. For instance, DirCache. +// You must specify a cache implementation, such as DirCache, +// to reuse obtained certificates across program restarts. +// Otherwise your server is very likely to exceed the certificate +// issuer's request rate limits. type Manager struct { // Prompt specifies a callback function to conditionally accept a CA's Terms of Service (TOS). // The registration may require the caller to agree to the CA's TOS. diff --git a/vendor/golang.org/x/crypto/acme/autocert/example_test.go b/vendor/golang.org/x/crypto/acme/autocert/example_test.go index c6267b8dd..71d61eb1c 100644 --- a/vendor/golang.org/x/crypto/acme/autocert/example_test.go +++ b/vendor/golang.org/x/crypto/acme/autocert/example_test.go @@ -23,6 +23,7 @@ func ExampleNewListener() { func ExampleManager() { m := autocert.Manager{ + Cache: autocert.DirCache("secret-dir"), Prompt: autocert.AcceptTOS, HostPolicy: autocert.HostWhitelist("example.org"), } diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b_test.go b/vendor/golang.org/x/crypto/blake2b/blake2b_test.go index 4aa49579a..5d68bbf60 100644 --- a/vendor/golang.org/x/crypto/blake2b/blake2b_test.go +++ b/vendor/golang.org/x/crypto/blake2b/blake2b_test.go @@ -126,7 +126,7 @@ func testHashes2X(t *testing.T) { t.Fatalf("#%d (single write): error from Read: %v", i, err) } if n, err := h.Read(sum); n != 0 || err != io.EOF { - t.Fatalf("#%d (single write): Read did not return (0, os.EOF) after exhaustion, got (%v, %v)", i, n, err) + t.Fatalf("#%d (single write): Read did not return (0, io.EOF) after exhaustion, got (%v, %v)", i, n, err) } if gotHex := fmt.Sprintf("%x", sum); gotHex != expectedHex { t.Fatalf("#%d (single write): got %s, wanted %s", i, gotHex, expectedHex) diff --git a/vendor/golang.org/x/crypto/scrypt/example_test.go b/vendor/golang.org/x/crypto/scrypt/example_test.go new file mode 100644 index 000000000..6736479b1 --- /dev/null +++ b/vendor/golang.org/x/crypto/scrypt/example_test.go @@ -0,0 +1,26 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package scrypt_test + +import ( + "encoding/base64" + "fmt" + "log" + + "golang.org/x/crypto/scrypt" +) + +func Example() { + // DO NOT use this salt value; generate your own random salt. 8 bytes is + // a good length. + salt := []byte{0xc8, 0x28, 0xf2, 0x58, 0xa7, 0x6a, 0xad, 0x7b} + + dk, err := scrypt.Key([]byte("some password"), salt, 1<<15, 8, 1, 32) + if err != nil { + log.Fatal(err) + } + fmt.Println(base64.StdEncoding.EncodeToString(dk)) + // Output: lGnMz8io0AUkfzn6Pls1qX20Vs7PGN6sbYQ2TQgY12M= +} diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go index 14375c509..ff28aaef6 100644 --- a/vendor/golang.org/x/crypto/scrypt/scrypt.go +++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go @@ -220,9 +220,10 @@ func smix(b []byte, r, N int, v, xy []uint32) { // // dk, err := scrypt.Key([]byte("some password"), salt, 16384, 8, 1, 32) // -// The recommended parameters for interactive logins as of 2009 are N=16384, -// r=8, p=1. They should be increased as memory latency and CPU parallelism -// increases. Remember to get a good random salt. +// The recommended parameters for interactive logins as of 2017 are N=32768, r=8 +// and p=1. The parameters N, r, and p should be increased as memory latency and +// CPU parallelism increases; consider setting N to the highest power of 2 you +// can derive within 100 milliseconds. Remember to get a good random salt. func Key(password, salt []byte, N, r, p, keyLen int) ([]byte, error) { if N <= 1 || N&(N-1) != 0 { return nil, errors.New("scrypt: N must be > 1 and a power of 2") diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt_test.go b/vendor/golang.org/x/crypto/scrypt/scrypt_test.go index e096c3a31..766ed8d90 100644 --- a/vendor/golang.org/x/crypto/scrypt/scrypt_test.go +++ b/vendor/golang.org/x/crypto/scrypt/scrypt_test.go @@ -153,8 +153,10 @@ func TestKey(t *testing.T) { } } +var sink []byte + func BenchmarkKey(b *testing.B) { for i := 0; i < b.N; i++ { - Key([]byte("password"), []byte("salt"), 16384, 8, 1, 64) + sink, _ = Key([]byte("password"), []byte("salt"), 1<<15, 8, 1, 64) } } diff --git a/vendor/golang.org/x/crypto/ssh/buffer.go b/vendor/golang.org/x/crypto/ssh/buffer.go index 6931b5114..1ab07d078 100644 --- a/vendor/golang.org/x/crypto/ssh/buffer.go +++ b/vendor/golang.org/x/crypto/ssh/buffer.go @@ -51,13 +51,12 @@ func (b *buffer) write(buf []byte) { } // eof closes the buffer. Reads from the buffer once all -// the data has been consumed will receive os.EOF. -func (b *buffer) eof() error { +// the data has been consumed will receive io.EOF. +func (b *buffer) eof() { b.Cond.L.Lock() b.closed = true b.Cond.Signal() b.Cond.L.Unlock() - return nil } // Read reads data from the internal buffer in buf. Reads will block diff --git a/vendor/golang.org/x/net/README.md b/vendor/golang.org/x/net/README.md index 6b13d8e50..00a9b6eb2 100644 --- a/vendor/golang.org/x/net/README.md +++ b/vendor/golang.org/x/net/README.md @@ -1,3 +1,16 @@ +# Go Networking + This repository holds supplementary Go networking libraries. -To submit changes to this repository, see http://golang.org/doc/contribute.html. +## Download/Install + +The easiest way to install is to run `go get -u golang.org/x/net`. You can +also manually git clone the repository to `$GOPATH/src/golang.org/x/net`. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit +changes to this repository, see https://golang.org/doc/contribute.html. +The main issue tracker for the net repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/net:" in the +subject line, so it is easy to find. diff --git a/vendor/golang.org/x/net/html/atom/gen.go b/vendor/golang.org/x/net/html/atom/gen.go index 6bfa86601..cc5dc5dbc 100644 --- a/vendor/golang.org/x/net/html/atom/gen.go +++ b/vendor/golang.org/x/net/html/atom/gen.go @@ -4,17 +4,17 @@ // +build ignore +//go:generate go run gen.go +//go:generate go run gen.go -test + package main -// This program generates table.go and table_test.go. -// Invoke as -// -// go run gen.go |gofmt >table.go -// go run gen.go -test |gofmt >table_test.go - import ( + "bytes" "flag" "fmt" + "go/format" + "io/ioutil" "math/rand" "os" "sort" @@ -42,6 +42,18 @@ func identifier(s string) string { var test = flag.Bool("test", false, "generate table_test.go") +func genFile(name string, buf *bytes.Buffer) { + b, err := format.Source(buf.Bytes()) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + if err := ioutil.WriteFile(name, b, 0644); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} + func main() { flag.Parse() @@ -52,32 +64,31 @@ func main() { all = append(all, extra...) sort.Strings(all) - if *test { - fmt.Printf("// generated by go run gen.go -test; DO NOT EDIT\n\n") - fmt.Printf("package atom\n\n") - fmt.Printf("var testAtomList = []string{\n") - for _, s := range all { - fmt.Printf("\t%q,\n", s) - } - fmt.Printf("}\n") - return - } - // uniq - lists have dups - // compute max len too - maxLen := 0 w := 0 for _, s := range all { if w == 0 || all[w-1] != s { - if maxLen < len(s) { - maxLen = len(s) - } all[w] = s w++ } } all = all[:w] + if *test { + var buf bytes.Buffer + fmt.Fprintln(&buf, "// Code generated by go generate gen.go; DO NOT EDIT.\n") + fmt.Fprintln(&buf, "//go:generate go run gen.go -test\n") + fmt.Fprintln(&buf, "package atom\n") + fmt.Fprintln(&buf, "var testAtomList = []string{") + for _, s := range all { + fmt.Fprintf(&buf, "\t%q,\n", s) + } + fmt.Fprintln(&buf, "}") + + genFile("table_test.go", &buf) + return + } + // Find hash that minimizes table size. var best *table for i := 0; i < 1000000; i++ { @@ -163,36 +174,46 @@ func main() { atom[s] = uint32(off<<8 | len(s)) } + var buf bytes.Buffer // Generate the Go code. - fmt.Printf("// generated by go run gen.go; DO NOT EDIT\n\n") - fmt.Printf("package atom\n\nconst (\n") + fmt.Fprintln(&buf, "// Code generated by go generate gen.go; DO NOT EDIT.\n") + fmt.Fprintln(&buf, "//go:generate go run gen.go\n") + fmt.Fprintln(&buf, "package atom\n\nconst (") + + // compute max len + maxLen := 0 for _, s := range all { - fmt.Printf("\t%s Atom = %#x\n", identifier(s), atom[s]) + if maxLen < len(s) { + maxLen = len(s) + } + fmt.Fprintf(&buf, "\t%s Atom = %#x\n", identifier(s), atom[s]) } - fmt.Printf(")\n\n") + fmt.Fprintln(&buf, ")\n") - fmt.Printf("const hash0 = %#x\n\n", best.h0) - fmt.Printf("const maxAtomLen = %d\n\n", maxLen) + fmt.Fprintf(&buf, "const hash0 = %#x\n\n", best.h0) + fmt.Fprintf(&buf, "const maxAtomLen = %d\n\n", maxLen) - fmt.Printf("var table = [1<<%d]Atom{\n", best.k) + fmt.Fprintf(&buf, "var table = [1<<%d]Atom{\n", best.k) for i, s := range best.tab { if s == "" { continue } - fmt.Printf("\t%#x: %#x, // %s\n", i, atom[s], s) + fmt.Fprintf(&buf, "\t%#x: %#x, // %s\n", i, atom[s], s) } - fmt.Printf("}\n") + fmt.Fprintf(&buf, "}\n") datasize := (1 << best.k) * 4 - fmt.Printf("const atomText =\n") + fmt.Fprintln(&buf, "const atomText =") textsize := len(text) for len(text) > 60 { - fmt.Printf("\t%q +\n", text[:60]) + fmt.Fprintf(&buf, "\t%q +\n", text[:60]) text = text[60:] } - fmt.Printf("\t%q\n\n", text) + fmt.Fprintf(&buf, "\t%q\n\n", text) - fmt.Fprintf(os.Stderr, "%d atoms; %d string bytes + %d tables = %d total data\n", len(all), textsize, datasize, textsize+datasize) + genFile("table.go", &buf) + + fmt.Fprintf(os.Stdout, "%d atoms; %d string bytes + %d tables = %d total data\n", len(all), textsize, datasize, textsize+datasize) } type byLen []string @@ -285,8 +306,10 @@ func (t *table) push(i uint32, depth int) bool { // The lists of element names and attribute keys were taken from // https://html.spec.whatwg.org/multipage/indices.html#index -// as of the "HTML Living Standard - Last Updated 21 February 2015" version. +// as of the "HTML Living Standard - Last Updated 18 September 2017" version. +// "command", "keygen" and "menuitem" have been removed from the spec, +// but are kept here for backwards compatibility. var elements = []string{ "a", "abbr", @@ -349,6 +372,7 @@ var elements = []string{ "legend", "li", "link", + "main", "map", "mark", "menu", @@ -364,6 +388,7 @@ var elements = []string{ "output", "p", "param", + "picture", "pre", "progress", "q", @@ -375,6 +400,7 @@ var elements = []string{ "script", "section", "select", + "slot", "small", "source", "span", @@ -403,14 +429,21 @@ var elements = []string{ } // https://html.spec.whatwg.org/multipage/indices.html#attributes-3 - +// +// "challenge", "command", "contextmenu", "dropzone", "icon", "keytype", "mediagroup", +// "radiogroup", "spellcheck", "scoped", "seamless", "sortable" and "sorted" have been removed from the spec, +// but are kept here for backwards compatibility. var attributes = []string{ "abbr", "accept", "accept-charset", "accesskey", "action", + "allowfullscreen", + "allowpaymentrequest", + "allowusermedia", "alt", + "as", "async", "autocomplete", "autofocus", @@ -420,6 +453,7 @@ var attributes = []string{ "checked", "cite", "class", + "color", "cols", "colspan", "command", @@ -457,6 +491,8 @@ var attributes = []string{ "icon", "id", "inputmode", + "integrity", + "is", "ismap", "itemid", "itemprop", @@ -481,16 +517,20 @@ var attributes = []string{ "multiple", "muted", "name", + "nomodule", + "nonce", "novalidate", "open", "optimum", "pattern", "ping", "placeholder", + "playsinline", "poster", "preload", "radiogroup", "readonly", + "referrerpolicy", "rel", "required", "reversed", @@ -507,10 +547,13 @@ var attributes = []string{ "sizes", "sortable", "sorted", + "slot", "span", + "spellcheck", "src", "srcdoc", "srclang", + "srcset", "start", "step", "style", @@ -520,16 +563,22 @@ var attributes = []string{ "translate", "type", "typemustmatch", + "updateviacache", "usemap", "value", "width", + "workertype", "wrap", } +// "onautocomplete", "onautocompleteerror", "onmousewheel", +// "onshow" and "onsort" have been removed from the spec, +// but are kept here for backwards compatibility. var eventHandlers = []string{ "onabort", "onautocomplete", "onautocompleteerror", + "onauxclick", "onafterprint", "onbeforeprint", "onbeforeunload", @@ -541,11 +590,14 @@ var eventHandlers = []string{ "onclick", "onclose", "oncontextmenu", + "oncopy", "oncuechange", + "oncut", "ondblclick", "ondrag", "ondragend", "ondragenter", + "ondragexit", "ondragleave", "ondragover", "ondragstart", @@ -565,18 +617,24 @@ var eventHandlers = []string{ "onload", "onloadeddata", "onloadedmetadata", + "onloadend", "onloadstart", "onmessage", + "onmessageerror", "onmousedown", + "onmouseenter", + "onmouseleave", "onmousemove", "onmouseout", "onmouseover", "onmouseup", "onmousewheel", + "onwheel", "onoffline", "ononline", "onpagehide", "onpageshow", + "onpaste", "onpause", "onplay", "onplaying", @@ -585,7 +643,9 @@ var eventHandlers = []string{ "onratechange", "onreset", "onresize", + "onrejectionhandled", "onscroll", + "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", @@ -597,6 +657,7 @@ var eventHandlers = []string{ "onsuspend", "ontimeupdate", "ontoggle", + "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", diff --git a/vendor/golang.org/x/net/html/atom/table.go b/vendor/golang.org/x/net/html/atom/table.go index 2605ba310..f74018ece 100644 --- a/vendor/golang.org/x/net/html/atom/table.go +++ b/vendor/golang.org/x/net/html/atom/table.go @@ -1,713 +1,777 @@ -// generated by go run gen.go; DO NOT EDIT +// Code generated by go generate gen.go; DO NOT EDIT. + +//go:generate go run gen.go package atom const ( - A Atom = 0x1 - Abbr Atom = 0x4 - Accept Atom = 0x2106 - AcceptCharset Atom = 0x210e - Accesskey Atom = 0x3309 - Action Atom = 0x1f606 - Address Atom = 0x4f307 - Align Atom = 0x1105 - Alt Atom = 0x4503 - Annotation Atom = 0x1670a - AnnotationXml Atom = 0x1670e - Applet Atom = 0x2b306 - Area Atom = 0x2fa04 - Article Atom = 0x38807 - Aside Atom = 0x8305 - Async Atom = 0x7b05 - Audio Atom = 0xa605 - Autocomplete Atom = 0x1fc0c - Autofocus Atom = 0xb309 - Autoplay Atom = 0xce08 - B Atom = 0x101 - Base Atom = 0xd604 - Basefont Atom = 0xd608 - Bdi Atom = 0x1a03 - Bdo Atom = 0xe703 - Bgsound Atom = 0x11807 - Big Atom = 0x12403 - Blink Atom = 0x12705 - Blockquote Atom = 0x12c0a - Body Atom = 0x2f04 - Br Atom = 0x202 - Button Atom = 0x13606 - Canvas Atom = 0x7f06 - Caption Atom = 0x1bb07 - Center Atom = 0x5b506 - Challenge Atom = 0x21f09 - Charset Atom = 0x2807 - Checked Atom = 0x32807 - Cite Atom = 0x3c804 - Class Atom = 0x4de05 - Code Atom = 0x14904 - Col Atom = 0x15003 - Colgroup Atom = 0x15008 - Color Atom = 0x15d05 - Cols Atom = 0x16204 - Colspan Atom = 0x16207 - Command Atom = 0x17507 - Content Atom = 0x42307 - Contenteditable Atom = 0x4230f - Contextmenu Atom = 0x3310b - Controls Atom = 0x18808 - Coords Atom = 0x19406 - Crossorigin Atom = 0x19f0b - Data Atom = 0x44a04 - Datalist Atom = 0x44a08 - Datetime Atom = 0x23c08 - Dd Atom = 0x26702 - Default Atom = 0x8607 - Defer Atom = 0x14b05 - Del Atom = 0x3ef03 - Desc Atom = 0x4db04 - Details Atom = 0x4807 - Dfn Atom = 0x6103 - Dialog Atom = 0x1b06 - Dir Atom = 0x6903 - Dirname Atom = 0x6907 - Disabled Atom = 0x10c08 - Div Atom = 0x11303 - Dl Atom = 0x11e02 - Download Atom = 0x40008 - Draggable Atom = 0x17b09 - Dropzone Atom = 0x39108 - Dt Atom = 0x50902 - Em Atom = 0x6502 - Embed Atom = 0x6505 - Enctype Atom = 0x21107 - Face Atom = 0x5b304 - Fieldset Atom = 0x1b008 - Figcaption Atom = 0x1b80a - Figure Atom = 0x1cc06 - Font Atom = 0xda04 - Footer Atom = 0x8d06 - For Atom = 0x1d803 - ForeignObject Atom = 0x1d80d - Foreignobject Atom = 0x1e50d - Form Atom = 0x1f204 - Formaction Atom = 0x1f20a - Formenctype Atom = 0x20d0b - Formmethod Atom = 0x2280a - Formnovalidate Atom = 0x2320e - Formtarget Atom = 0x2470a - Frame Atom = 0x9a05 - Frameset Atom = 0x9a08 - H1 Atom = 0x26e02 - H2 Atom = 0x29402 - H3 Atom = 0x2a702 - H4 Atom = 0x2e902 - H5 Atom = 0x2f302 - H6 Atom = 0x50b02 - Head Atom = 0x2d504 - Header Atom = 0x2d506 - Headers Atom = 0x2d507 - Height Atom = 0x25106 - Hgroup Atom = 0x25906 - Hidden Atom = 0x26506 - High Atom = 0x26b04 - Hr Atom = 0x27002 - Href Atom = 0x27004 - Hreflang Atom = 0x27008 - Html Atom = 0x25504 - HttpEquiv Atom = 0x2780a - I Atom = 0x601 - Icon Atom = 0x42204 - Id Atom = 0x8502 - Iframe Atom = 0x29606 - Image Atom = 0x29c05 - Img Atom = 0x2a103 - Input Atom = 0x3e805 - Inputmode Atom = 0x3e809 - Ins Atom = 0x1a803 - Isindex Atom = 0x2a907 - Ismap Atom = 0x2b005 - Itemid Atom = 0x33c06 - Itemprop Atom = 0x3c908 - Itemref Atom = 0x5ad07 - Itemscope Atom = 0x2b909 - Itemtype Atom = 0x2c308 - Kbd Atom = 0x1903 - Keygen Atom = 0x3906 - Keytype Atom = 0x53707 - Kind Atom = 0x10904 - Label Atom = 0xf005 - Lang Atom = 0x27404 - Legend Atom = 0x18206 - Li Atom = 0x1202 - Link Atom = 0x12804 - List Atom = 0x44e04 - Listing Atom = 0x44e07 - Loop Atom = 0xf404 - Low Atom = 0x11f03 - Malignmark Atom = 0x100a - Manifest Atom = 0x5f108 - Map Atom = 0x2b203 - Mark Atom = 0x1604 - Marquee Atom = 0x2cb07 - Math Atom = 0x2d204 - Max Atom = 0x2e103 - Maxlength Atom = 0x2e109 - Media Atom = 0x6e05 - Mediagroup Atom = 0x6e0a - Menu Atom = 0x33804 - Menuitem Atom = 0x33808 - Meta Atom = 0x45d04 - Meter Atom = 0x24205 - Method Atom = 0x22c06 - Mglyph Atom = 0x2a206 - Mi Atom = 0x2eb02 - Min Atom = 0x2eb03 - Minlength Atom = 0x2eb09 - Mn Atom = 0x23502 - Mo Atom = 0x3ed02 - Ms Atom = 0x2bc02 - Mtext Atom = 0x2f505 - Multiple Atom = 0x30308 - Muted Atom = 0x30b05 - Name Atom = 0x6c04 - Nav Atom = 0x3e03 - Nobr Atom = 0x5704 - Noembed Atom = 0x6307 - Noframes Atom = 0x9808 - Noscript Atom = 0x3d208 - Novalidate Atom = 0x2360a - Object Atom = 0x1ec06 - Ol Atom = 0xc902 - Onabort Atom = 0x13a07 - Onafterprint Atom = 0x1c00c - Onautocomplete Atom = 0x1fa0e - Onautocompleteerror Atom = 0x1fa13 - Onbeforeprint Atom = 0x6040d - Onbeforeunload Atom = 0x4e70e - Onblur Atom = 0xaa06 - Oncancel Atom = 0xe908 - Oncanplay Atom = 0x28509 - Oncanplaythrough Atom = 0x28510 - Onchange Atom = 0x3a708 - Onclick Atom = 0x31007 - Onclose Atom = 0x31707 - Oncontextmenu Atom = 0x32f0d - Oncuechange Atom = 0x3420b - Ondblclick Atom = 0x34d0a - Ondrag Atom = 0x35706 - Ondragend Atom = 0x35709 - Ondragenter Atom = 0x3600b - Ondragleave Atom = 0x36b0b - Ondragover Atom = 0x3760a - Ondragstart Atom = 0x3800b - Ondrop Atom = 0x38f06 - Ondurationchange Atom = 0x39f10 - Onemptied Atom = 0x39609 - Onended Atom = 0x3af07 - Onerror Atom = 0x3b607 - Onfocus Atom = 0x3bd07 - Onhashchange Atom = 0x3da0c - Oninput Atom = 0x3e607 - Oninvalid Atom = 0x3f209 - Onkeydown Atom = 0x3fb09 - Onkeypress Atom = 0x4080a - Onkeyup Atom = 0x41807 - Onlanguagechange Atom = 0x43210 - Onload Atom = 0x44206 - Onloadeddata Atom = 0x4420c - Onloadedmetadata Atom = 0x45510 - Onloadstart Atom = 0x46b0b - Onmessage Atom = 0x47609 - Onmousedown Atom = 0x47f0b - Onmousemove Atom = 0x48a0b - Onmouseout Atom = 0x4950a - Onmouseover Atom = 0x4a20b - Onmouseup Atom = 0x4ad09 - Onmousewheel Atom = 0x4b60c - Onoffline Atom = 0x4c209 - Ononline Atom = 0x4cb08 - Onpagehide Atom = 0x4d30a - Onpageshow Atom = 0x4fe0a - Onpause Atom = 0x50d07 - Onplay Atom = 0x51706 - Onplaying Atom = 0x51709 - Onpopstate Atom = 0x5200a - Onprogress Atom = 0x52a0a - Onratechange Atom = 0x53e0c - Onreset Atom = 0x54a07 - Onresize Atom = 0x55108 - Onscroll Atom = 0x55f08 - Onseeked Atom = 0x56708 - Onseeking Atom = 0x56f09 - Onselect Atom = 0x57808 - Onshow Atom = 0x58206 - Onsort Atom = 0x58b06 - Onstalled Atom = 0x59509 - Onstorage Atom = 0x59e09 - Onsubmit Atom = 0x5a708 - Onsuspend Atom = 0x5bb09 - Ontimeupdate Atom = 0xdb0c - Ontoggle Atom = 0x5c408 - Onunload Atom = 0x5cc08 - Onvolumechange Atom = 0x5d40e - Onwaiting Atom = 0x5e209 - Open Atom = 0x3cf04 - Optgroup Atom = 0xf608 - Optimum Atom = 0x5eb07 - Option Atom = 0x60006 - Output Atom = 0x49c06 - P Atom = 0xc01 - Param Atom = 0xc05 - Pattern Atom = 0x5107 - Ping Atom = 0x7704 - Placeholder Atom = 0xc30b - Plaintext Atom = 0xfd09 - Poster Atom = 0x15706 - Pre Atom = 0x25e03 - Preload Atom = 0x25e07 - Progress Atom = 0x52c08 - Prompt Atom = 0x5fa06 - Public Atom = 0x41e06 - Q Atom = 0x13101 - Radiogroup Atom = 0x30a - Readonly Atom = 0x2fb08 - Rel Atom = 0x25f03 - Required Atom = 0x1d008 - Reversed Atom = 0x5a08 - Rows Atom = 0x9204 - Rowspan Atom = 0x9207 - Rp Atom = 0x1c602 - Rt Atom = 0x13f02 - Ruby Atom = 0xaf04 - S Atom = 0x2c01 - Samp Atom = 0x4e04 - Sandbox Atom = 0xbb07 - Scope Atom = 0x2bd05 - Scoped Atom = 0x2bd06 - Script Atom = 0x3d406 - Seamless Atom = 0x31c08 - Section Atom = 0x4e207 - Select Atom = 0x57a06 - Selected Atom = 0x57a08 - Shape Atom = 0x4f905 - Size Atom = 0x55504 - Sizes Atom = 0x55505 - Small Atom = 0x18f05 - Sortable Atom = 0x58d08 - Sorted Atom = 0x19906 - Source Atom = 0x1aa06 - Spacer Atom = 0x2db06 - Span Atom = 0x9504 - Spellcheck Atom = 0x3230a - Src Atom = 0x3c303 - Srcdoc Atom = 0x3c306 - Srclang Atom = 0x41107 - Start Atom = 0x38605 - Step Atom = 0x5f704 - Strike Atom = 0x53306 - Strong Atom = 0x55906 - Style Atom = 0x61105 - Sub Atom = 0x5a903 - Summary Atom = 0x61607 - Sup Atom = 0x61d03 - Svg Atom = 0x62003 - System Atom = 0x62306 - Tabindex Atom = 0x46308 - Table Atom = 0x42d05 - Target Atom = 0x24b06 - Tbody Atom = 0x2e05 - Td Atom = 0x4702 - Template Atom = 0x62608 - Textarea Atom = 0x2f608 - Tfoot Atom = 0x8c05 - Th Atom = 0x22e02 - Thead Atom = 0x2d405 - Time Atom = 0xdd04 - Title Atom = 0xa105 - Tr Atom = 0x10502 - Track Atom = 0x10505 - Translate Atom = 0x14009 - Tt Atom = 0x5302 - Type Atom = 0x21404 - Typemustmatch Atom = 0x2140d - U Atom = 0xb01 - Ul Atom = 0x8a02 - Usemap Atom = 0x51106 - Value Atom = 0x4005 - Var Atom = 0x11503 - Video Atom = 0x28105 - Wbr Atom = 0x12103 - Width Atom = 0x50705 - Wrap Atom = 0x58704 - Xmp Atom = 0xc103 + A Atom = 0x1 + Abbr Atom = 0x4 + Accept Atom = 0x1a06 + AcceptCharset Atom = 0x1a0e + Accesskey Atom = 0x2c09 + Action Atom = 0x25a06 + Address Atom = 0x6ed07 + Align Atom = 0x6d405 + Allowfullscreen Atom = 0x1f00f + Allowpaymentrequest Atom = 0x6913 + Allowusermedia Atom = 0x850e + Alt Atom = 0xb003 + Annotation Atom = 0x1b90a + AnnotationXml Atom = 0x1b90e + Applet Atom = 0x30106 + Area Atom = 0x34a04 + Article Atom = 0x3f007 + As Atom = 0xb902 + Aside Atom = 0xc105 + Async Atom = 0xb905 + Audio Atom = 0xcf05 + Autocomplete Atom = 0x2600c + Autofocus Atom = 0xeb09 + Autoplay Atom = 0x10608 + B Atom = 0x101 + Base Atom = 0x11504 + Basefont Atom = 0x11508 + Bdi Atom = 0x16103 + Bdo Atom = 0x13403 + Bgsound Atom = 0x14707 + Big Atom = 0x15903 + Blink Atom = 0x15c05 + Blockquote Atom = 0x1680a + Body Atom = 0x2804 + Br Atom = 0x202 + Button Atom = 0x17206 + Canvas Atom = 0xbd06 + Caption Atom = 0x21907 + Center Atom = 0x20806 + Challenge Atom = 0x28309 + Charset Atom = 0x2107 + Checked Atom = 0x46d07 + Cite Atom = 0x55804 + Class Atom = 0x5b905 + Code Atom = 0x19004 + Col Atom = 0x19703 + Colgroup Atom = 0x19708 + Color Atom = 0x1af05 + Cols Atom = 0x1b404 + Colspan Atom = 0x1b407 + Command Atom = 0x1c707 + Content Atom = 0x57f07 + Contenteditable Atom = 0x57f0f + Contextmenu Atom = 0x3740b + Controls Atom = 0x1ce08 + Coords Atom = 0x1da06 + Crossorigin Atom = 0x1e30b + Data Atom = 0x49904 + Datalist Atom = 0x49908 + Datetime Atom = 0x2a008 + Dd Atom = 0x2bf02 + Default Atom = 0xc407 + Defer Atom = 0x19205 + Del Atom = 0x44603 + Desc Atom = 0x55504 + Details Atom = 0x4607 + Dfn Atom = 0x5f03 + Dialog Atom = 0x16206 + Dir Atom = 0xa303 + Dirname Atom = 0xa307 + Disabled Atom = 0x14d08 + Div Atom = 0x15403 + Dl Atom = 0x5e202 + Download Atom = 0x45708 + Draggable Atom = 0x18309 + Dropzone Atom = 0x3f908 + Dt Atom = 0x64702 + Em Atom = 0x4202 + Embed Atom = 0x4205 + Enctype Atom = 0x27507 + Face Atom = 0x20604 + Fieldset Atom = 0x20e08 + Figcaption Atom = 0x2160a + Figure Atom = 0x23006 + Font Atom = 0x11904 + Footer Atom = 0xb306 + For Atom = 0x23c03 + ForeignObject Atom = 0x23c0d + Foreignobject Atom = 0x2490d + Form Atom = 0x25604 + Formaction Atom = 0x2560a + Formenctype Atom = 0x2710b + Formmethod Atom = 0x28c0a + Formnovalidate Atom = 0x2960e + Formtarget Atom = 0x2a80a + Frame Atom = 0x5705 + Frameset Atom = 0x5708 + H1 Atom = 0x14502 + H2 Atom = 0x2c602 + H3 Atom = 0x2f502 + H4 Atom = 0x33902 + H5 Atom = 0x34302 + H6 Atom = 0x64902 + Head Atom = 0x32504 + Header Atom = 0x32506 + Headers Atom = 0x32507 + Height Atom = 0x12c06 + Hgroup Atom = 0x2b206 + Hidden Atom = 0x2bd06 + High Atom = 0x2c304 + Hr Atom = 0x14002 + Href Atom = 0x2c804 + Hreflang Atom = 0x2c808 + Html Atom = 0x13004 + HttpEquiv Atom = 0x2d00a + I Atom = 0x601 + Icon Atom = 0x57e04 + Id Atom = 0xc302 + Iframe Atom = 0x2e406 + Image Atom = 0x2ea05 + Img Atom = 0x2ef03 + Input Atom = 0x43f05 + Inputmode Atom = 0x43f09 + Ins Atom = 0x1ec03 + Integrity Atom = 0x22709 + Is Atom = 0x14e02 + Isindex Atom = 0x2f707 + Ismap Atom = 0x2fe05 + Itemid Atom = 0x37f06 + Itemprop Atom = 0x55908 + Itemref Atom = 0x3c107 + Itemscope Atom = 0x66d09 + Itemtype Atom = 0x30708 + Kbd Atom = 0x16003 + Keygen Atom = 0x3206 + Keytype Atom = 0x7e07 + Kind Atom = 0x18004 + Label Atom = 0xda05 + Lang Atom = 0x2cc04 + Legend Atom = 0x18a06 + Li Atom = 0x11102 + Link Atom = 0x15d04 + List Atom = 0x49d04 + Listing Atom = 0x49d07 + Loop Atom = 0xde04 + Low Atom = 0x6b03 + Main Atom = 0x1004 + Malignmark Atom = 0x6d30a + Manifest Atom = 0x30f08 + Map Atom = 0x30003 + Mark Atom = 0x6d904 + Marquee Atom = 0x31b07 + Math Atom = 0x32204 + Max Atom = 0x33103 + Maxlength Atom = 0x33109 + Media Atom = 0x8e05 + Mediagroup Atom = 0x8e0a + Menu Atom = 0x37b04 + Menuitem Atom = 0x37b08 + Meta Atom = 0x4ac04 + Meter Atom = 0xa805 + Method Atom = 0x29006 + Mglyph Atom = 0x2f006 + Mi Atom = 0x33b02 + Min Atom = 0x33b03 + Minlength Atom = 0x33b09 + Mn Atom = 0x29902 + Mo Atom = 0x6302 + Ms Atom = 0x67002 + Mtext Atom = 0x34505 + Multiple Atom = 0x35308 + Muted Atom = 0x35b05 + Name Atom = 0xa604 + Nav Atom = 0x1303 + Nobr Atom = 0x3704 + Noembed Atom = 0x4007 + Noframes Atom = 0x5508 + Nomodule Atom = 0x6108 + Nonce Atom = 0x56205 + Noscript Atom = 0x1fe08 + Novalidate Atom = 0x29a0a + Object Atom = 0x25006 + Ol Atom = 0x10102 + Onabort Atom = 0x17607 + Onafterprint Atom = 0x21e0c + Onautocomplete Atom = 0x25e0e + Onautocompleteerror Atom = 0x25e13 + Onauxclick Atom = 0x61b0a + Onbeforeprint Atom = 0x69a0d + Onbeforeunload Atom = 0x6e10e + Onblur Atom = 0x5c206 + Oncancel Atom = 0xd308 + Oncanplay Atom = 0x13609 + Oncanplaythrough Atom = 0x13610 + Onchange Atom = 0x40f08 + Onclick Atom = 0x2dd07 + Onclose Atom = 0x36007 + Oncontextmenu Atom = 0x3720d + Oncopy Atom = 0x38506 + Oncuechange Atom = 0x38b0b + Oncut Atom = 0x39605 + Ondblclick Atom = 0x39b0a + Ondrag Atom = 0x3a506 + Ondragend Atom = 0x3a509 + Ondragenter Atom = 0x3ae0b + Ondragexit Atom = 0x3b90a + Ondragleave Atom = 0x3d30b + Ondragover Atom = 0x3de0a + Ondragstart Atom = 0x3e80b + Ondrop Atom = 0x3f706 + Ondurationchange Atom = 0x40710 + Onemptied Atom = 0x3fe09 + Onended Atom = 0x41707 + Onerror Atom = 0x41e07 + Onfocus Atom = 0x42507 + Onhashchange Atom = 0x4310c + Oninput Atom = 0x43d07 + Oninvalid Atom = 0x44909 + Onkeydown Atom = 0x45209 + Onkeypress Atom = 0x45f0a + Onkeyup Atom = 0x47407 + Onlanguagechange Atom = 0x48110 + Onload Atom = 0x49106 + Onloadeddata Atom = 0x4910c + Onloadedmetadata Atom = 0x4a410 + Onloadend Atom = 0x4ba09 + Onloadstart Atom = 0x4c30b + Onmessage Atom = 0x4ce09 + Onmessageerror Atom = 0x4ce0e + Onmousedown Atom = 0x4dc0b + Onmouseenter Atom = 0x4e70c + Onmouseleave Atom = 0x4f30c + Onmousemove Atom = 0x4ff0b + Onmouseout Atom = 0x50a0a + Onmouseover Atom = 0x5170b + Onmouseup Atom = 0x52209 + Onmousewheel Atom = 0x5300c + Onoffline Atom = 0x53c09 + Ononline Atom = 0x54508 + Onpagehide Atom = 0x54d0a + Onpageshow Atom = 0x5670a + Onpaste Atom = 0x57307 + Onpause Atom = 0x58e07 + Onplay Atom = 0x59806 + Onplaying Atom = 0x59809 + Onpopstate Atom = 0x5a10a + Onprogress Atom = 0x5ab0a + Onratechange Atom = 0x5c80c + Onrejectionhandled Atom = 0x5d412 + Onreset Atom = 0x5e607 + Onresize Atom = 0x5ed08 + Onscroll Atom = 0x5fc08 + Onsecuritypolicyviolation Atom = 0x60419 + Onseeked Atom = 0x62508 + Onseeking Atom = 0x62d09 + Onselect Atom = 0x63608 + Onshow Atom = 0x64006 + Onsort Atom = 0x64b06 + Onstalled Atom = 0x65509 + Onstorage Atom = 0x65e09 + Onsubmit Atom = 0x66708 + Onsuspend Atom = 0x67709 + Ontimeupdate Atom = 0x11a0c + Ontoggle Atom = 0x68008 + Onunhandledrejection Atom = 0x68814 + Onunload Atom = 0x6a708 + Onvolumechange Atom = 0x6af0e + Onwaiting Atom = 0x6bd09 + Onwheel Atom = 0x6c607 + Open Atom = 0x55f04 + Optgroup Atom = 0xe008 + Optimum Atom = 0x6cd07 + Option Atom = 0x6dd06 + Output Atom = 0x51106 + P Atom = 0xc01 + Param Atom = 0xc05 + Pattern Atom = 0x4f07 + Picture Atom = 0x9707 + Ping Atom = 0xe704 + Placeholder Atom = 0xfb0b + Plaintext Atom = 0x19e09 + Playsinline Atom = 0x10a0b + Poster Atom = 0x2b706 + Pre Atom = 0x46403 + Preload Atom = 0x47a07 + Progress Atom = 0x5ad08 + Prompt Atom = 0x52a06 + Public Atom = 0x57a06 + Q Atom = 0x7701 + Radiogroup Atom = 0x30a + Readonly Atom = 0x34b08 + Referrerpolicy Atom = 0x3c50e + Rel Atom = 0x47b03 + Required Atom = 0x23408 + Reversed Atom = 0x9c08 + Rows Atom = 0x3a04 + Rowspan Atom = 0x3a07 + Rp Atom = 0x22402 + Rt Atom = 0x17b02 + Ruby Atom = 0xac04 + S Atom = 0x2501 + Samp Atom = 0x4c04 + Sandbox Atom = 0xf307 + Scope Atom = 0x67105 + Scoped Atom = 0x67106 + Script Atom = 0x20006 + Seamless Atom = 0x36508 + Section Atom = 0x5bd07 + Select Atom = 0x63806 + Selected Atom = 0x63808 + Shape Atom = 0x1d505 + Size Atom = 0x5f104 + Sizes Atom = 0x5f105 + Slot Atom = 0x1df04 + Small Atom = 0x1ee05 + Sortable Atom = 0x64d08 + Sorted Atom = 0x32b06 + Source Atom = 0x36c06 + Spacer Atom = 0x42b06 + Span Atom = 0x3d04 + Spellcheck Atom = 0x4680a + Src Atom = 0x5b403 + Srcdoc Atom = 0x5b406 + Srclang Atom = 0x5f507 + Srcset Atom = 0x6f306 + Start Atom = 0x3ee05 + Step Atom = 0x57704 + Strike Atom = 0x7a06 + Strong Atom = 0x31506 + Style Atom = 0x6f905 + Sub Atom = 0x66903 + Summary Atom = 0x6fe07 + Sup Atom = 0x70503 + Svg Atom = 0x70803 + System Atom = 0x70b06 + Tabindex Atom = 0x4b208 + Table Atom = 0x58905 + Target Atom = 0x2ac06 + Tbody Atom = 0x2705 + Td Atom = 0x5e02 + Template Atom = 0x70e08 + Textarea Atom = 0x34608 + Tfoot Atom = 0xb205 + Th Atom = 0x13f02 + Thead Atom = 0x32405 + Time Atom = 0x11c04 + Title Atom = 0xca05 + Tr Atom = 0x7402 + Track Atom = 0x17c05 + Translate Atom = 0x1a609 + Tt Atom = 0x5102 + Type Atom = 0x8104 + Typemustmatch Atom = 0x2780d + U Atom = 0xb01 + Ul Atom = 0x6602 + Updateviacache Atom = 0x1200e + Usemap Atom = 0x59206 + Value Atom = 0x1505 + Var Atom = 0x15603 + Video Atom = 0x2d905 + Wbr Atom = 0x57003 + Width Atom = 0x64505 + Workertype Atom = 0x7160a + Wrap Atom = 0x72004 + Xmp Atom = 0xf903 ) -const hash0 = 0xc17da63e +const hash0 = 0x81cdf10e -const maxAtomLen = 19 +const maxAtomLen = 25 var table = [1 << 9]Atom{ - 0x1: 0x48a0b, // onmousemove - 0x2: 0x5e209, // onwaiting - 0x3: 0x1fa13, // onautocompleteerror - 0x4: 0x5fa06, // prompt - 0x7: 0x5eb07, // optimum - 0x8: 0x1604, // mark - 0xa: 0x5ad07, // itemref - 0xb: 0x4fe0a, // onpageshow - 0xc: 0x57a06, // select - 0xd: 0x17b09, // draggable - 0xe: 0x3e03, // nav - 0xf: 0x17507, // command - 0x11: 0xb01, // u - 0x14: 0x2d507, // headers - 0x15: 0x44a08, // datalist - 0x17: 0x4e04, // samp - 0x1a: 0x3fb09, // onkeydown - 0x1b: 0x55f08, // onscroll - 0x1c: 0x15003, // col - 0x20: 0x3c908, // itemprop - 0x21: 0x2780a, // http-equiv - 0x22: 0x61d03, // sup - 0x24: 0x1d008, // required - 0x2b: 0x25e07, // preload - 0x2c: 0x6040d, // onbeforeprint - 0x2d: 0x3600b, // ondragenter - 0x2e: 0x50902, // dt - 0x2f: 0x5a708, // onsubmit - 0x30: 0x27002, // hr - 0x31: 0x32f0d, // oncontextmenu - 0x33: 0x29c05, // image - 0x34: 0x50d07, // onpause - 0x35: 0x25906, // hgroup - 0x36: 0x7704, // ping - 0x37: 0x57808, // onselect - 0x3a: 0x11303, // div - 0x3b: 0x1fa0e, // onautocomplete - 0x40: 0x2eb02, // mi - 0x41: 0x31c08, // seamless - 0x42: 0x2807, // charset - 0x43: 0x8502, // id - 0x44: 0x5200a, // onpopstate - 0x45: 0x3ef03, // del - 0x46: 0x2cb07, // marquee - 0x47: 0x3309, // accesskey - 0x49: 0x8d06, // footer - 0x4a: 0x44e04, // list - 0x4b: 0x2b005, // ismap - 0x51: 0x33804, // menu - 0x52: 0x2f04, // body - 0x55: 0x9a08, // frameset - 0x56: 0x54a07, // onreset - 0x57: 0x12705, // blink - 0x58: 0xa105, // title - 0x59: 0x38807, // article - 0x5b: 0x22e02, // th - 0x5d: 0x13101, // q - 0x5e: 0x3cf04, // open - 0x5f: 0x2fa04, // area - 0x61: 0x44206, // onload - 0x62: 0xda04, // font - 0x63: 0xd604, // base - 0x64: 0x16207, // colspan - 0x65: 0x53707, // keytype - 0x66: 0x11e02, // dl - 0x68: 0x1b008, // fieldset - 0x6a: 0x2eb03, // min - 0x6b: 0x11503, // var - 0x6f: 0x2d506, // header - 0x70: 0x13f02, // rt - 0x71: 0x15008, // colgroup - 0x72: 0x23502, // mn - 0x74: 0x13a07, // onabort - 0x75: 0x3906, // keygen - 0x76: 0x4c209, // onoffline - 0x77: 0x21f09, // challenge - 0x78: 0x2b203, // map - 0x7a: 0x2e902, // h4 - 0x7b: 0x3b607, // onerror - 0x7c: 0x2e109, // maxlength - 0x7d: 0x2f505, // mtext - 0x7e: 0xbb07, // sandbox - 0x7f: 0x58b06, // onsort - 0x80: 0x100a, // malignmark - 0x81: 0x45d04, // meta - 0x82: 0x7b05, // async - 0x83: 0x2a702, // h3 - 0x84: 0x26702, // dd - 0x85: 0x27004, // href - 0x86: 0x6e0a, // mediagroup - 0x87: 0x19406, // coords - 0x88: 0x41107, // srclang - 0x89: 0x34d0a, // ondblclick - 0x8a: 0x4005, // value - 0x8c: 0xe908, // oncancel - 0x8e: 0x3230a, // spellcheck - 0x8f: 0x9a05, // frame - 0x91: 0x12403, // big - 0x94: 0x1f606, // action - 0x95: 0x6903, // dir - 0x97: 0x2fb08, // readonly - 0x99: 0x42d05, // table - 0x9a: 0x61607, // summary - 0x9b: 0x12103, // wbr - 0x9c: 0x30a, // radiogroup - 0x9d: 0x6c04, // name - 0x9f: 0x62306, // system - 0xa1: 0x15d05, // color - 0xa2: 0x7f06, // canvas - 0xa3: 0x25504, // html - 0xa5: 0x56f09, // onseeking - 0xac: 0x4f905, // shape - 0xad: 0x25f03, // rel - 0xae: 0x28510, // oncanplaythrough - 0xaf: 0x3760a, // ondragover - 0xb0: 0x62608, // template - 0xb1: 0x1d80d, // foreignObject - 0xb3: 0x9204, // rows - 0xb6: 0x44e07, // listing - 0xb7: 0x49c06, // output - 0xb9: 0x3310b, // contextmenu - 0xbb: 0x11f03, // low - 0xbc: 0x1c602, // rp - 0xbd: 0x5bb09, // onsuspend - 0xbe: 0x13606, // button - 0xbf: 0x4db04, // desc - 0xc1: 0x4e207, // section - 0xc2: 0x52a0a, // onprogress - 0xc3: 0x59e09, // onstorage - 0xc4: 0x2d204, // math - 0xc5: 0x4503, // alt - 0xc7: 0x8a02, // ul - 0xc8: 0x5107, // pattern - 0xc9: 0x4b60c, // onmousewheel - 0xca: 0x35709, // ondragend - 0xcb: 0xaf04, // ruby - 0xcc: 0xc01, // p - 0xcd: 0x31707, // onclose - 0xce: 0x24205, // meter - 0xcf: 0x11807, // bgsound - 0xd2: 0x25106, // height - 0xd4: 0x101, // b - 0xd5: 0x2c308, // itemtype - 0xd8: 0x1bb07, // caption - 0xd9: 0x10c08, // disabled - 0xdb: 0x33808, // menuitem - 0xdc: 0x62003, // svg - 0xdd: 0x18f05, // small - 0xde: 0x44a04, // data - 0xe0: 0x4cb08, // ononline - 0xe1: 0x2a206, // mglyph - 0xe3: 0x6505, // embed - 0xe4: 0x10502, // tr - 0xe5: 0x46b0b, // onloadstart - 0xe7: 0x3c306, // srcdoc - 0xeb: 0x5c408, // ontoggle - 0xed: 0xe703, // bdo - 0xee: 0x4702, // td - 0xef: 0x8305, // aside - 0xf0: 0x29402, // h2 - 0xf1: 0x52c08, // progress - 0xf2: 0x12c0a, // blockquote - 0xf4: 0xf005, // label - 0xf5: 0x601, // i - 0xf7: 0x9207, // rowspan - 0xfb: 0x51709, // onplaying - 0xfd: 0x2a103, // img - 0xfe: 0xf608, // optgroup - 0xff: 0x42307, // content - 0x101: 0x53e0c, // onratechange - 0x103: 0x3da0c, // onhashchange - 0x104: 0x4807, // details - 0x106: 0x40008, // download - 0x109: 0x14009, // translate - 0x10b: 0x4230f, // contenteditable - 0x10d: 0x36b0b, // ondragleave - 0x10e: 0x2106, // accept - 0x10f: 0x57a08, // selected - 0x112: 0x1f20a, // formaction - 0x113: 0x5b506, // center - 0x115: 0x45510, // onloadedmetadata - 0x116: 0x12804, // link - 0x117: 0xdd04, // time - 0x118: 0x19f0b, // crossorigin - 0x119: 0x3bd07, // onfocus - 0x11a: 0x58704, // wrap - 0x11b: 0x42204, // icon - 0x11d: 0x28105, // video - 0x11e: 0x4de05, // class - 0x121: 0x5d40e, // onvolumechange - 0x122: 0xaa06, // onblur - 0x123: 0x2b909, // itemscope - 0x124: 0x61105, // style - 0x127: 0x41e06, // public - 0x129: 0x2320e, // formnovalidate - 0x12a: 0x58206, // onshow - 0x12c: 0x51706, // onplay - 0x12d: 0x3c804, // cite - 0x12e: 0x2bc02, // ms - 0x12f: 0xdb0c, // ontimeupdate - 0x130: 0x10904, // kind - 0x131: 0x2470a, // formtarget - 0x135: 0x3af07, // onended - 0x136: 0x26506, // hidden - 0x137: 0x2c01, // s - 0x139: 0x2280a, // formmethod - 0x13a: 0x3e805, // input - 0x13c: 0x50b02, // h6 - 0x13d: 0xc902, // ol - 0x13e: 0x3420b, // oncuechange - 0x13f: 0x1e50d, // foreignobject - 0x143: 0x4e70e, // onbeforeunload - 0x144: 0x2bd05, // scope - 0x145: 0x39609, // onemptied - 0x146: 0x14b05, // defer - 0x147: 0xc103, // xmp - 0x148: 0x39f10, // ondurationchange - 0x149: 0x1903, // kbd - 0x14c: 0x47609, // onmessage - 0x14d: 0x60006, // option - 0x14e: 0x2eb09, // minlength - 0x14f: 0x32807, // checked - 0x150: 0xce08, // autoplay - 0x152: 0x202, // br - 0x153: 0x2360a, // novalidate - 0x156: 0x6307, // noembed - 0x159: 0x31007, // onclick - 0x15a: 0x47f0b, // onmousedown - 0x15b: 0x3a708, // onchange - 0x15e: 0x3f209, // oninvalid - 0x15f: 0x2bd06, // scoped - 0x160: 0x18808, // controls - 0x161: 0x30b05, // muted - 0x162: 0x58d08, // sortable - 0x163: 0x51106, // usemap - 0x164: 0x1b80a, // figcaption - 0x165: 0x35706, // ondrag - 0x166: 0x26b04, // high - 0x168: 0x3c303, // src - 0x169: 0x15706, // poster - 0x16b: 0x1670e, // annotation-xml - 0x16c: 0x5f704, // step - 0x16d: 0x4, // abbr - 0x16e: 0x1b06, // dialog - 0x170: 0x1202, // li - 0x172: 0x3ed02, // mo - 0x175: 0x1d803, // for - 0x176: 0x1a803, // ins - 0x178: 0x55504, // size - 0x179: 0x43210, // onlanguagechange - 0x17a: 0x8607, // default - 0x17b: 0x1a03, // bdi - 0x17c: 0x4d30a, // onpagehide - 0x17d: 0x6907, // dirname - 0x17e: 0x21404, // type - 0x17f: 0x1f204, // form - 0x181: 0x28509, // oncanplay - 0x182: 0x6103, // dfn - 0x183: 0x46308, // tabindex - 0x186: 0x6502, // em - 0x187: 0x27404, // lang - 0x189: 0x39108, // dropzone - 0x18a: 0x4080a, // onkeypress - 0x18b: 0x23c08, // datetime - 0x18c: 0x16204, // cols - 0x18d: 0x1, // a - 0x18e: 0x4420c, // onloadeddata - 0x190: 0xa605, // audio - 0x192: 0x2e05, // tbody - 0x193: 0x22c06, // method - 0x195: 0xf404, // loop - 0x196: 0x29606, // iframe - 0x198: 0x2d504, // head - 0x19e: 0x5f108, // manifest - 0x19f: 0xb309, // autofocus - 0x1a0: 0x14904, // code - 0x1a1: 0x55906, // strong - 0x1a2: 0x30308, // multiple - 0x1a3: 0xc05, // param - 0x1a6: 0x21107, // enctype - 0x1a7: 0x5b304, // face - 0x1a8: 0xfd09, // plaintext - 0x1a9: 0x26e02, // h1 - 0x1aa: 0x59509, // onstalled - 0x1ad: 0x3d406, // script - 0x1ae: 0x2db06, // spacer - 0x1af: 0x55108, // onresize - 0x1b0: 0x4a20b, // onmouseover - 0x1b1: 0x5cc08, // onunload - 0x1b2: 0x56708, // onseeked - 0x1b4: 0x2140d, // typemustmatch - 0x1b5: 0x1cc06, // figure - 0x1b6: 0x4950a, // onmouseout - 0x1b7: 0x25e03, // pre - 0x1b8: 0x50705, // width - 0x1b9: 0x19906, // sorted - 0x1bb: 0x5704, // nobr - 0x1be: 0x5302, // tt - 0x1bf: 0x1105, // align - 0x1c0: 0x3e607, // oninput - 0x1c3: 0x41807, // onkeyup - 0x1c6: 0x1c00c, // onafterprint - 0x1c7: 0x210e, // accept-charset - 0x1c8: 0x33c06, // itemid - 0x1c9: 0x3e809, // inputmode - 0x1cb: 0x53306, // strike - 0x1cc: 0x5a903, // sub - 0x1cd: 0x10505, // track - 0x1ce: 0x38605, // start - 0x1d0: 0xd608, // basefont - 0x1d6: 0x1aa06, // source - 0x1d7: 0x18206, // legend - 0x1d8: 0x2d405, // thead - 0x1da: 0x8c05, // tfoot - 0x1dd: 0x1ec06, // object - 0x1de: 0x6e05, // media - 0x1df: 0x1670a, // annotation - 0x1e0: 0x20d0b, // formenctype - 0x1e2: 0x3d208, // noscript - 0x1e4: 0x55505, // sizes - 0x1e5: 0x1fc0c, // autocomplete - 0x1e6: 0x9504, // span - 0x1e7: 0x9808, // noframes - 0x1e8: 0x24b06, // target - 0x1e9: 0x38f06, // ondrop - 0x1ea: 0x2b306, // applet - 0x1ec: 0x5a08, // reversed - 0x1f0: 0x2a907, // isindex - 0x1f3: 0x27008, // hreflang - 0x1f5: 0x2f302, // h5 - 0x1f6: 0x4f307, // address - 0x1fa: 0x2e103, // max - 0x1fb: 0xc30b, // placeholder - 0x1fc: 0x2f608, // textarea - 0x1fe: 0x4ad09, // onmouseup - 0x1ff: 0x3800b, // ondragstart + 0x1: 0x8e0a, // mediagroup + 0x2: 0x2cc04, // lang + 0x4: 0x2c09, // accesskey + 0x5: 0x5708, // frameset + 0x7: 0x63608, // onselect + 0x8: 0x70b06, // system + 0xa: 0x64505, // width + 0xc: 0x2710b, // formenctype + 0xd: 0x10102, // ol + 0xe: 0x38b0b, // oncuechange + 0x10: 0x13403, // bdo + 0x11: 0xcf05, // audio + 0x12: 0x18309, // draggable + 0x14: 0x2d905, // video + 0x15: 0x29902, // mn + 0x16: 0x37b04, // menu + 0x17: 0x2b706, // poster + 0x19: 0xb306, // footer + 0x1a: 0x29006, // method + 0x1b: 0x2a008, // datetime + 0x1c: 0x17607, // onabort + 0x1d: 0x1200e, // updateviacache + 0x1e: 0xb905, // async + 0x1f: 0x49106, // onload + 0x21: 0xd308, // oncancel + 0x22: 0x62508, // onseeked + 0x23: 0x2ea05, // image + 0x24: 0x5d412, // onrejectionhandled + 0x26: 0x15d04, // link + 0x27: 0x51106, // output + 0x28: 0x32504, // head + 0x29: 0x4f30c, // onmouseleave + 0x2a: 0x57307, // onpaste + 0x2b: 0x59809, // onplaying + 0x2c: 0x1b407, // colspan + 0x2f: 0x1af05, // color + 0x30: 0x5f104, // size + 0x31: 0x2d00a, // http-equiv + 0x33: 0x601, // i + 0x34: 0x54d0a, // onpagehide + 0x35: 0x68814, // onunhandledrejection + 0x37: 0x41e07, // onerror + 0x3a: 0x11508, // basefont + 0x3f: 0x1303, // nav + 0x40: 0x18004, // kind + 0x41: 0x34b08, // readonly + 0x42: 0x2f006, // mglyph + 0x44: 0x11102, // li + 0x46: 0x2bd06, // hidden + 0x47: 0x70803, // svg + 0x48: 0x57704, // step + 0x49: 0x22709, // integrity + 0x4a: 0x57a06, // public + 0x4c: 0x19703, // col + 0x4d: 0x1680a, // blockquote + 0x4e: 0x34302, // h5 + 0x50: 0x5ad08, // progress + 0x51: 0x5f105, // sizes + 0x52: 0x33902, // h4 + 0x56: 0x32405, // thead + 0x57: 0x7e07, // keytype + 0x58: 0x5ab0a, // onprogress + 0x59: 0x43f09, // inputmode + 0x5a: 0x3a509, // ondragend + 0x5d: 0x39605, // oncut + 0x5e: 0x42b06, // spacer + 0x5f: 0x19708, // colgroup + 0x62: 0x14e02, // is + 0x65: 0xb902, // as + 0x66: 0x53c09, // onoffline + 0x67: 0x32b06, // sorted + 0x69: 0x48110, // onlanguagechange + 0x6c: 0x4310c, // onhashchange + 0x6d: 0xa604, // name + 0x6e: 0xb205, // tfoot + 0x6f: 0x55504, // desc + 0x70: 0x33103, // max + 0x72: 0x1da06, // coords + 0x73: 0x2f502, // h3 + 0x74: 0x6e10e, // onbeforeunload + 0x75: 0x3a04, // rows + 0x76: 0x63806, // select + 0x77: 0xa805, // meter + 0x78: 0x37f06, // itemid + 0x79: 0x5300c, // onmousewheel + 0x7a: 0x5b406, // srcdoc + 0x7d: 0x17c05, // track + 0x7f: 0x30708, // itemtype + 0x82: 0x6302, // mo + 0x83: 0x40f08, // onchange + 0x84: 0x32507, // headers + 0x85: 0x5c80c, // onratechange + 0x86: 0x60419, // onsecuritypolicyviolation + 0x88: 0x49908, // datalist + 0x89: 0x4dc0b, // onmousedown + 0x8a: 0x1df04, // slot + 0x8b: 0x4a410, // onloadedmetadata + 0x8c: 0x1a06, // accept + 0x8d: 0x25006, // object + 0x91: 0x6af0e, // onvolumechange + 0x92: 0x2107, // charset + 0x93: 0x25e13, // onautocompleteerror + 0x94: 0x6913, // allowpaymentrequest + 0x95: 0x2804, // body + 0x96: 0xc407, // default + 0x97: 0x63808, // selected + 0x98: 0x20604, // face + 0x99: 0x1d505, // shape + 0x9b: 0x68008, // ontoggle + 0x9e: 0x64702, // dt + 0x9f: 0x6d904, // mark + 0xa1: 0xb01, // u + 0xa4: 0x6a708, // onunload + 0xa5: 0xde04, // loop + 0xa6: 0x14d08, // disabled + 0xaa: 0x41707, // onended + 0xab: 0x6d30a, // malignmark + 0xad: 0x67709, // onsuspend + 0xae: 0x34505, // mtext + 0xaf: 0x64b06, // onsort + 0xb0: 0x55908, // itemprop + 0xb3: 0x66d09, // itemscope + 0xb4: 0x15c05, // blink + 0xb6: 0x3a506, // ondrag + 0xb7: 0x6602, // ul + 0xb8: 0x25604, // form + 0xb9: 0xf307, // sandbox + 0xba: 0x5705, // frame + 0xbb: 0x1505, // value + 0xbc: 0x65e09, // onstorage + 0xc0: 0x17b02, // rt + 0xc2: 0x202, // br + 0xc3: 0x20e08, // fieldset + 0xc4: 0x2780d, // typemustmatch + 0xc5: 0x6108, // nomodule + 0xc6: 0x4007, // noembed + 0xc7: 0x69a0d, // onbeforeprint + 0xc8: 0x17206, // button + 0xc9: 0x2dd07, // onclick + 0xca: 0x6fe07, // summary + 0xcd: 0xac04, // ruby + 0xce: 0x5b905, // class + 0xcf: 0x3e80b, // ondragstart + 0xd0: 0x21907, // caption + 0xd4: 0x850e, // allowusermedia + 0xd5: 0x4c30b, // onloadstart + 0xd9: 0x15403, // div + 0xda: 0x49d04, // list + 0xdb: 0x32204, // math + 0xdc: 0x43f05, // input + 0xdf: 0x3de0a, // ondragover + 0xe0: 0x2c602, // h2 + 0xe2: 0x19e09, // plaintext + 0xe4: 0x4e70c, // onmouseenter + 0xe7: 0x46d07, // checked + 0xe8: 0x46403, // pre + 0xea: 0x35308, // multiple + 0xeb: 0x16103, // bdi + 0xec: 0x33109, // maxlength + 0xed: 0x7701, // q + 0xee: 0x61b0a, // onauxclick + 0xf0: 0x57003, // wbr + 0xf2: 0x11504, // base + 0xf3: 0x6dd06, // option + 0xf5: 0x40710, // ondurationchange + 0xf7: 0x5508, // noframes + 0xf9: 0x3f908, // dropzone + 0xfb: 0x67105, // scope + 0xfc: 0x9c08, // reversed + 0xfd: 0x3ae0b, // ondragenter + 0xfe: 0x3ee05, // start + 0xff: 0xf903, // xmp + 0x100: 0x5f507, // srclang + 0x101: 0x2ef03, // img + 0x104: 0x101, // b + 0x105: 0x23c03, // for + 0x106: 0xc105, // aside + 0x107: 0x43d07, // oninput + 0x108: 0x34a04, // area + 0x109: 0x28c0a, // formmethod + 0x10a: 0x72004, // wrap + 0x10c: 0x22402, // rp + 0x10d: 0x45f0a, // onkeypress + 0x10e: 0x5102, // tt + 0x110: 0x33b02, // mi + 0x111: 0x35b05, // muted + 0x112: 0xb003, // alt + 0x113: 0x19004, // code + 0x114: 0x4202, // em + 0x115: 0x3b90a, // ondragexit + 0x117: 0x3d04, // span + 0x119: 0x30f08, // manifest + 0x11a: 0x37b08, // menuitem + 0x11b: 0x57f07, // content + 0x11d: 0x6bd09, // onwaiting + 0x11f: 0x4ba09, // onloadend + 0x121: 0x3720d, // oncontextmenu + 0x123: 0x5c206, // onblur + 0x124: 0x3f007, // article + 0x125: 0xa303, // dir + 0x126: 0xe704, // ping + 0x127: 0x23408, // required + 0x128: 0x44909, // oninvalid + 0x129: 0x6d405, // align + 0x12b: 0x57e04, // icon + 0x12c: 0x64902, // h6 + 0x12d: 0x1b404, // cols + 0x12e: 0x2160a, // figcaption + 0x12f: 0x45209, // onkeydown + 0x130: 0x66708, // onsubmit + 0x131: 0x13609, // oncanplay + 0x132: 0x70503, // sup + 0x133: 0xc01, // p + 0x135: 0x3fe09, // onemptied + 0x136: 0x38506, // oncopy + 0x137: 0x55804, // cite + 0x138: 0x39b0a, // ondblclick + 0x13a: 0x4ff0b, // onmousemove + 0x13c: 0x66903, // sub + 0x13d: 0x47b03, // rel + 0x13e: 0xe008, // optgroup + 0x142: 0x3a07, // rowspan + 0x143: 0x36c06, // source + 0x144: 0x1fe08, // noscript + 0x145: 0x55f04, // open + 0x146: 0x1ec03, // ins + 0x147: 0x23c0d, // foreignObject + 0x148: 0x5a10a, // onpopstate + 0x14a: 0x27507, // enctype + 0x14b: 0x25e0e, // onautocomplete + 0x14c: 0x34608, // textarea + 0x14e: 0x2600c, // autocomplete + 0x14f: 0x14002, // hr + 0x150: 0x1ce08, // controls + 0x151: 0xc302, // id + 0x153: 0x21e0c, // onafterprint + 0x155: 0x2490d, // foreignobject + 0x156: 0x31b07, // marquee + 0x157: 0x58e07, // onpause + 0x158: 0x5e202, // dl + 0x159: 0x12c06, // height + 0x15a: 0x33b03, // min + 0x15b: 0xa307, // dirname + 0x15c: 0x1a609, // translate + 0x15d: 0x13004, // html + 0x15e: 0x33b09, // minlength + 0x15f: 0x47a07, // preload + 0x160: 0x70e08, // template + 0x161: 0x3d30b, // ondragleave + 0x164: 0x5b403, // src + 0x165: 0x31506, // strong + 0x167: 0x4c04, // samp + 0x168: 0x6ed07, // address + 0x169: 0x54508, // ononline + 0x16b: 0xfb0b, // placeholder + 0x16c: 0x2ac06, // target + 0x16d: 0x1ee05, // small + 0x16e: 0x6c607, // onwheel + 0x16f: 0x1b90a, // annotation + 0x170: 0x4680a, // spellcheck + 0x171: 0x4607, // details + 0x172: 0xbd06, // canvas + 0x173: 0xeb09, // autofocus + 0x174: 0xc05, // param + 0x176: 0x45708, // download + 0x177: 0x44603, // del + 0x178: 0x36007, // onclose + 0x179: 0x16003, // kbd + 0x17a: 0x30106, // applet + 0x17b: 0x2c804, // href + 0x17c: 0x5ed08, // onresize + 0x17e: 0x4910c, // onloadeddata + 0x180: 0x7402, // tr + 0x181: 0x2a80a, // formtarget + 0x182: 0xca05, // title + 0x183: 0x6f905, // style + 0x184: 0x7a06, // strike + 0x185: 0x59206, // usemap + 0x186: 0x2e406, // iframe + 0x187: 0x1004, // main + 0x189: 0x9707, // picture + 0x18c: 0x2fe05, // ismap + 0x18e: 0x49904, // data + 0x18f: 0xda05, // label + 0x191: 0x3c50e, // referrerpolicy + 0x192: 0x13f02, // th + 0x194: 0x52a06, // prompt + 0x195: 0x5bd07, // section + 0x197: 0x6cd07, // optimum + 0x198: 0x2c304, // high + 0x199: 0x14502, // h1 + 0x19a: 0x65509, // onstalled + 0x19b: 0x15603, // var + 0x19c: 0x11c04, // time + 0x19e: 0x67002, // ms + 0x19f: 0x32506, // header + 0x1a0: 0x4ce09, // onmessage + 0x1a1: 0x56205, // nonce + 0x1a2: 0x2560a, // formaction + 0x1a3: 0x20806, // center + 0x1a4: 0x3704, // nobr + 0x1a5: 0x58905, // table + 0x1a6: 0x49d07, // listing + 0x1a7: 0x18a06, // legend + 0x1a9: 0x28309, // challenge + 0x1aa: 0x23006, // figure + 0x1ab: 0x8e05, // media + 0x1ae: 0x8104, // type + 0x1af: 0x11904, // font + 0x1b0: 0x4ce0e, // onmessageerror + 0x1b1: 0x36508, // seamless + 0x1b2: 0x5f03, // dfn + 0x1b3: 0x19205, // defer + 0x1b4: 0x6b03, // low + 0x1b5: 0x62d09, // onseeking + 0x1b6: 0x5170b, // onmouseover + 0x1b7: 0x29a0a, // novalidate + 0x1b8: 0x7160a, // workertype + 0x1ba: 0x3c107, // itemref + 0x1bd: 0x1, // a + 0x1be: 0x30003, // map + 0x1bf: 0x11a0c, // ontimeupdate + 0x1c0: 0x14707, // bgsound + 0x1c1: 0x3206, // keygen + 0x1c2: 0x2705, // tbody + 0x1c5: 0x64006, // onshow + 0x1c7: 0x2501, // s + 0x1c8: 0x4f07, // pattern + 0x1cc: 0x13610, // oncanplaythrough + 0x1ce: 0x2bf02, // dd + 0x1cf: 0x6f306, // srcset + 0x1d0: 0x15903, // big + 0x1d2: 0x64d08, // sortable + 0x1d3: 0x47407, // onkeyup + 0x1d5: 0x59806, // onplay + 0x1d7: 0x4ac04, // meta + 0x1d8: 0x3f706, // ondrop + 0x1da: 0x5fc08, // onscroll + 0x1db: 0x1e30b, // crossorigin + 0x1dc: 0x5670a, // onpageshow + 0x1dd: 0x4, // abbr + 0x1de: 0x5e02, // td + 0x1df: 0x57f0f, // contenteditable + 0x1e0: 0x25a06, // action + 0x1e1: 0x10a0b, // playsinline + 0x1e2: 0x42507, // onfocus + 0x1e3: 0x2c808, // hreflang + 0x1e5: 0x50a0a, // onmouseout + 0x1e6: 0x5e607, // onreset + 0x1e7: 0x10608, // autoplay + 0x1ea: 0x67106, // scoped + 0x1ec: 0x30a, // radiogroup + 0x1ee: 0x3740b, // contextmenu + 0x1ef: 0x52209, // onmouseup + 0x1f1: 0x2b206, // hgroup + 0x1f2: 0x1f00f, // allowfullscreen + 0x1f3: 0x4b208, // tabindex + 0x1f6: 0x2f707, // isindex + 0x1f7: 0x1a0e, // accept-charset + 0x1f8: 0x2960e, // formnovalidate + 0x1fb: 0x1b90e, // annotation-xml + 0x1fc: 0x4205, // embed + 0x1fd: 0x20006, // script + 0x1fe: 0x16206, // dialog + 0x1ff: 0x1c707, // command } -const atomText = "abbradiogrouparamalignmarkbdialogaccept-charsetbodyaccesskey" + - "genavaluealtdetailsampatternobreversedfnoembedirnamediagroup" + - "ingasyncanvasidefaultfooterowspanoframesetitleaudionblurubya" + - "utofocusandboxmplaceholderautoplaybasefontimeupdatebdoncance" + - "labelooptgrouplaintextrackindisabledivarbgsoundlowbrbigblink" + - "blockquotebuttonabortranslatecodefercolgroupostercolorcolspa" + - "nnotation-xmlcommandraggablegendcontrolsmallcoordsortedcross" + - "originsourcefieldsetfigcaptionafterprintfigurequiredforeignO" + - "bjectforeignobjectformactionautocompleteerrorformenctypemust" + - "matchallengeformmethodformnovalidatetimeterformtargetheightm" + - "lhgroupreloadhiddenhigh1hreflanghttp-equivideoncanplaythroug" + - "h2iframeimageimglyph3isindexismappletitemscopeditemtypemarqu" + - "eematheaderspacermaxlength4minlength5mtextareadonlymultiplem" + - "utedonclickoncloseamlesspellcheckedoncontextmenuitemidoncuec" + - "hangeondblclickondragendondragenterondragleaveondragoverondr" + - "agstarticleondropzonemptiedondurationchangeonendedonerroronf" + - "ocusrcdocitempropenoscriptonhashchangeoninputmodeloninvalido" + - "nkeydownloadonkeypressrclangonkeyupublicontenteditableonlang" + - "uagechangeonloadeddatalistingonloadedmetadatabindexonloadsta" + - "rtonmessageonmousedownonmousemoveonmouseoutputonmouseoveronm" + - "ouseuponmousewheelonofflineononlineonpagehidesclassectionbef" + - "oreunloaddresshapeonpageshowidth6onpausemaponplayingonpopsta" + - "teonprogresstrikeytypeonratechangeonresetonresizestrongonscr" + - "ollonseekedonseekingonselectedonshowraponsortableonstalledon" + - "storageonsubmitemrefacenteronsuspendontoggleonunloadonvolume" + - "changeonwaitingoptimumanifestepromptoptionbeforeprintstylesu" + - "mmarysupsvgsystemplate" +const atomText = "abbradiogrouparamainavalueaccept-charsetbodyaccesskeygenobro" + + "wspanoembedetailsampatternoframesetdfnomoduleallowpaymentreq" + + "uestrikeytypeallowusermediagroupictureversedirnameterubyaltf" + + "ooterasyncanvasidefaultitleaudioncancelabelooptgroupingautof" + + "ocusandboxmplaceholderautoplaysinlinebasefontimeupdateviacac" + + "heightmlbdoncanplaythrough1bgsoundisabledivarbigblinkbdialog" + + "blockquotebuttonabortrackindraggablegendcodefercolgrouplaint" + + "extranslatecolorcolspannotation-xmlcommandcontrolshapecoords" + + "lotcrossoriginsmallowfullscreenoscriptfacenterfieldsetfigcap" + + "tionafterprintegrityfigurequiredforeignObjectforeignobjectfo" + + "rmactionautocompleteerrorformenctypemustmatchallengeformmeth" + + "odformnovalidatetimeformtargethgrouposterhiddenhigh2hreflang" + + "http-equivideonclickiframeimageimglyph3isindexismappletitemt" + + "ypemanifestrongmarqueematheadersortedmaxlength4minlength5mte" + + "xtareadonlymultiplemutedoncloseamlessourceoncontextmenuitemi" + + "doncopyoncuechangeoncutondblclickondragendondragenterondrage" + + "xitemreferrerpolicyondragleaveondragoverondragstarticleondro" + + "pzonemptiedondurationchangeonendedonerroronfocuspaceronhashc" + + "hangeoninputmodeloninvalidonkeydownloadonkeypresspellchecked" + + "onkeyupreloadonlanguagechangeonloadeddatalistingonloadedmeta" + + "databindexonloadendonloadstartonmessageerroronmousedownonmou" + + "seenteronmouseleaveonmousemoveonmouseoutputonmouseoveronmous" + + "eupromptonmousewheelonofflineononlineonpagehidescitempropeno" + + "nceonpageshowbronpastepublicontenteditableonpausemaponplayin" + + "gonpopstateonprogressrcdoclassectionbluronratechangeonreject" + + "ionhandledonresetonresizesrclangonscrollonsecuritypolicyviol" + + "ationauxclickonseekedonseekingonselectedonshowidth6onsortabl" + + "eonstalledonstorageonsubmitemscopedonsuspendontoggleonunhand" + + "ledrejectionbeforeprintonunloadonvolumechangeonwaitingonwhee" + + "loptimumalignmarkoptionbeforeunloaddressrcsetstylesummarysup" + + "svgsystemplateworkertypewrap" diff --git a/vendor/golang.org/x/net/html/atom/table_test.go b/vendor/golang.org/x/net/html/atom/table_test.go index 0f2ecce4f..16891054f 100644 --- a/vendor/golang.org/x/net/html/atom/table_test.go +++ b/vendor/golang.org/x/net/html/atom/table_test.go @@ -1,23 +1,28 @@ -// generated by go run gen.go -test; DO NOT EDIT +// Code generated by go generate gen.go; DO NOT EDIT. + +//go:generate go run gen.go -test package atom var testAtomList = []string{ "a", "abbr", - "abbr", "accept", "accept-charset", "accesskey", "action", "address", "align", + "allowfullscreen", + "allowpaymentrequest", + "allowusermedia", "alt", "annotation", "annotation-xml", "applet", "area", "article", + "as", "aside", "async", "audio", @@ -43,7 +48,6 @@ var testAtomList = []string{ "charset", "checked", "cite", - "cite", "class", "code", "col", @@ -52,7 +56,6 @@ var testAtomList = []string{ "cols", "colspan", "command", - "command", "content", "contenteditable", "contextmenu", @@ -60,7 +63,6 @@ var testAtomList = []string{ "coords", "crossorigin", "data", - "data", "datalist", "datetime", "dd", @@ -93,7 +95,6 @@ var testAtomList = []string{ "foreignObject", "foreignobject", "form", - "form", "formaction", "formenctype", "formmethod", @@ -128,6 +129,8 @@ var testAtomList = []string{ "input", "inputmode", "ins", + "integrity", + "is", "isindex", "ismap", "itemid", @@ -140,7 +143,6 @@ var testAtomList = []string{ "keytype", "kind", "label", - "label", "lang", "legend", "li", @@ -149,6 +151,7 @@ var testAtomList = []string{ "listing", "loop", "low", + "main", "malignmark", "manifest", "map", @@ -179,6 +182,8 @@ var testAtomList = []string{ "nobr", "noembed", "noframes", + "nomodule", + "nonce", "noscript", "novalidate", "object", @@ -187,6 +192,7 @@ var testAtomList = []string{ "onafterprint", "onautocomplete", "onautocompleteerror", + "onauxclick", "onbeforeprint", "onbeforeunload", "onblur", @@ -197,11 +203,14 @@ var testAtomList = []string{ "onclick", "onclose", "oncontextmenu", + "oncopy", "oncuechange", + "oncut", "ondblclick", "ondrag", "ondragend", "ondragenter", + "ondragexit", "ondragleave", "ondragover", "ondragstart", @@ -221,9 +230,13 @@ var testAtomList = []string{ "onload", "onloadeddata", "onloadedmetadata", + "onloadend", "onloadstart", "onmessage", + "onmessageerror", "onmousedown", + "onmouseenter", + "onmouseleave", "onmousemove", "onmouseout", "onmouseover", @@ -233,15 +246,18 @@ var testAtomList = []string{ "ononline", "onpagehide", "onpageshow", + "onpaste", "onpause", "onplay", "onplaying", "onpopstate", "onprogress", "onratechange", + "onrejectionhandled", "onreset", "onresize", "onscroll", + "onsecuritypolicyviolation", "onseeked", "onseeking", "onselect", @@ -253,9 +269,11 @@ var testAtomList = []string{ "onsuspend", "ontimeupdate", "ontoggle", + "onunhandledrejection", "onunload", "onvolumechange", "onwaiting", + "onwheel", "open", "optgroup", "optimum", @@ -264,9 +282,11 @@ var testAtomList = []string{ "p", "param", "pattern", + "picture", "ping", "placeholder", "plaintext", + "playsinline", "poster", "pre", "preload", @@ -276,6 +296,7 @@ var testAtomList = []string{ "q", "radiogroup", "readonly", + "referrerpolicy", "rel", "required", "reversed", @@ -297,23 +318,23 @@ var testAtomList = []string{ "shape", "size", "sizes", + "slot", "small", "sortable", "sorted", "source", "spacer", "span", - "span", "spellcheck", "src", "srcdoc", "srclang", + "srcset", "start", "step", "strike", "strong", "style", - "style", "sub", "summary", "sup", @@ -331,7 +352,6 @@ var testAtomList = []string{ "thead", "time", "title", - "title", "tr", "track", "translate", @@ -340,12 +360,14 @@ var testAtomList = []string{ "typemustmatch", "u", "ul", + "updateviacache", "usemap", "value", "var", "video", "wbr", "width", + "workertype", "wrap", "xmp", } diff --git a/vendor/golang.org/x/net/proxy/socks5.go b/vendor/golang.org/x/net/proxy/socks5.go index 2efec6e8d..2d7978fe4 100644 --- a/vendor/golang.org/x/net/proxy/socks5.go +++ b/vendor/golang.org/x/net/proxy/socks5.go @@ -12,7 +12,7 @@ import ( ) // SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address -// with an optional username and password. See RFC 1928. +// with an optional username and password. See RFC 1928 and 1929. func SOCKS5(network, addr string, auth *Auth, forward Dialer) (Dialer, error) { s := &socks5{ network: network, @@ -120,6 +120,7 @@ func (s *socks5) connect(conn net.Conn, target string) error { return errors.New("proxy: SOCKS5 proxy at " + s.addr + " requires authentication") } + // See RFC 1929 if buf[1] == socks5AuthPassword { buf = buf[:0] buf = append(buf, 1 /* password protocol version */) diff --git a/vendor/golang.org/x/oauth2/internal/doc.go b/vendor/golang.org/x/oauth2/internal/doc.go new file mode 100644 index 000000000..03265e888 --- /dev/null +++ b/vendor/golang.org/x/oauth2/internal/doc.go @@ -0,0 +1,6 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package internal contains support packages for oauth2 package. +package internal diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go index e31541b39..6978192a9 100644 --- a/vendor/golang.org/x/oauth2/internal/oauth2.go +++ b/vendor/golang.org/x/oauth2/internal/oauth2.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package internal contains support packages for oauth2 package. package internal import ( diff --git a/vendor/golang.org/x/oauth2/internal/oauth2_test.go b/vendor/golang.org/x/oauth2/internal/oauth2_test.go index 0aafc7f43..07d51c433 100644 --- a/vendor/golang.org/x/oauth2/internal/oauth2_test.go +++ b/vendor/golang.org/x/oauth2/internal/oauth2_test.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package internal contains support packages for oauth2 package. package internal import ( diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go index 53ec23cee..cf959ea69 100644 --- a/vendor/golang.org/x/oauth2/internal/token.go +++ b/vendor/golang.org/x/oauth2/internal/token.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package internal contains support packages for oauth2 package. package internal import ( diff --git a/vendor/golang.org/x/oauth2/internal/token_test.go b/vendor/golang.org/x/oauth2/internal/token_test.go index c19a462cc..df5eb2647 100644 --- a/vendor/golang.org/x/oauth2/internal/token_test.go +++ b/vendor/golang.org/x/oauth2/internal/token_test.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package internal contains support packages for oauth2 package. package internal import ( diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go index f1f173e34..783bd98c8 100644 --- a/vendor/golang.org/x/oauth2/internal/transport.go +++ b/vendor/golang.org/x/oauth2/internal/transport.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Package internal contains support packages for oauth2 package. package internal import ( diff --git a/vendor/golang.org/x/sys/README b/vendor/golang.org/x/sys/README deleted file mode 100644 index bd422b40c..000000000 --- a/vendor/golang.org/x/sys/README +++ /dev/null @@ -1,3 +0,0 @@ -This repository holds supplemental Go packages for low-level interactions with the operating system. - -To submit changes to this repository, see http://golang.org/doc/contribute.html. diff --git a/vendor/golang.org/x/sys/README.md b/vendor/golang.org/x/sys/README.md new file mode 100644 index 000000000..ef6c9e59c --- /dev/null +++ b/vendor/golang.org/x/sys/README.md @@ -0,0 +1,18 @@ +# sys + +This repository holds supplemental Go packages for low-level interactions with +the operating system. + +## Download/Install + +The easiest way to install is to run `go get -u golang.org/x/sys`. You can +also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. + +## Report Issues / Send Patches + +This repository uses Gerrit for code changes. To learn how to submit changes to +this repository, see https://golang.org/doc/contribute.html. + +The main issue tracker for the sys repository is located at +https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the +subject line, so it is easy to find. diff --git a/vendor/golang.org/x/sys/unix/mmap_unix_test.go b/vendor/golang.org/x/sys/unix/mmap_unix_test.go index 8de55feaf..3258ca328 100644 --- a/vendor/golang.org/x/sys/unix/mmap_unix_test.go +++ b/vendor/golang.org/x/sys/unix/mmap_unix_test.go @@ -17,7 +17,7 @@ func TestMmap(t *testing.T) { if err != nil { t.Fatalf("Mmap: %v", err) } - if err := unix.Mprotect(b, unix.PROT_WRITE); err != nil { + if err := unix.Mprotect(b, unix.PROT_READ|unix.PROT_WRITE); err != nil { t.Fatalf("Mprotect: %v", err) } diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go index 28b7f350d..a4a8e4ee1 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -28,7 +28,7 @@ package unix //sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 //sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK -//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT //sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) //sys Setfsgid(gid int) (err error) //sys Setfsuid(uid int) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_test.go b/vendor/golang.org/x/sys/unix/syscall_linux_test.go index 377023130..c0ab2db9e 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux_test.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux_test.go @@ -192,6 +192,13 @@ func TestGetrlimit(t *testing.T) { } } +func TestSelect(t *testing.T) { + _, err := unix.Select(0, nil, nil, nil, &unix.Timeval{0, 0}) + if err != nil { + t.Fatalf("Select: %v", err) + } +} + // utilities taken from os/os_test.go func touch(t *testing.T, name string) { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go index 39eacd630..2a32c6b41 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -1734,7 +1734,7 @@ func Seek(fd int, offset int64, whence int) (off int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { - r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go index 2a79746bf..8172d3558 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -1734,7 +1734,7 @@ func Seek(fd int, offset int64, whence int) (off int64, err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { - r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) n = int(r0) if e1 != 0 { err = errnoErr(e1) diff --git a/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json b/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json index 81ee739e0..36d359cc2 100644 --- a/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json +++ b/vendor/google.golang.org/api/acceleratedmobilepageurl/v1/acceleratedmobilepageurl-api.json @@ -1,29 +1,43 @@ { - "ownerName": "Google", - "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "resources": { "ampUrls": { "methods": { "batchGet": { + "request": { + "$ref": "BatchGetAmpUrlsRequest" + }, + "description": "Returns AMP URL(s) and equivalent\n[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "BatchGetAmpUrlsResponse" }, - "parameterOrder": [], - "httpMethod": "POST", "parameters": {}, "flatPath": "v1/ampUrls:batchGet", - "id": "acceleratedmobilepageurl.ampUrls.batchGet", "path": "v1/ampUrls:batchGet", - "description": "Returns AMP URL(s) and equivalent\n[AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).", - "request": { - "$ref": "BatchGetAmpUrlsRequest" - } + "id": "acceleratedmobilepageurl.ampUrls.batchGet" } } } }, "parameters": { + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", @@ -46,13 +60,11 @@ "location": "query" }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "$.xgafv": { - "description": "V1 error format.", - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -61,7 +73,9 @@ "enum": [ "1", "2" - ] + ], + "description": "V1 error format.", + "type": "string" }, "alt": { "enumDescriptions": [ @@ -85,33 +99,57 @@ "type": "string" }, "access_token": { - "location": "query", "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", "type": "string", "location": "query" } }, "schemas": { + "BatchGetAmpUrlsResponse": { + "description": "Batch AMP URL response.", + "type": "object", + "properties": { + "urlErrors": { + "description": "The errors for requested URLs that have no AMP URL.", + "items": { + "$ref": "AmpUrlError" + }, + "type": "array" + }, + "ampUrls": { + "description": "For each URL in BatchAmpUrlsRequest, the URL response. The response might\nnot be in the same order as URLs in the batch request.\nIf BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated\nonly once.", + "items": { + "$ref": "AmpUrl" + }, + "type": "array" + } + }, + "id": "BatchGetAmpUrlsResponse" + }, + "AmpUrl": { + "description": "AMP URL response for a requested URL.", + "type": "object", + "properties": { + "cdnAmpUrl": { + "description": "The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to\nthe cached document in the Google AMP Cache.", + "type": "string" + }, + "ampUrl": { + "description": "The AMP URL pointing to the publisher's web server.", + "type": "string" + }, + "originalUrl": { + "description": "The original non-AMP URL.", + "type": "string" + } + }, + "id": "AmpUrl" + }, "AmpUrlError": { "description": "AMP URL Error resource for a requested URL that couldn't be found.", "type": "object", @@ -152,6 +190,8 @@ "type": "object", "properties": { "lookupStrategy": { + "description": "The lookup_strategy being requested.", + "type": "string", "enumDescriptions": [ "FETCH_LIVE_DOC strategy involves live document fetch of URLs not found in\nthe index. Any request URL not found in the index is crawled in realtime\nto validate if there is a corresponding AMP URL. This strategy has higher\ncoverage but with extra latency introduced by realtime crawling. This is\nthe default strategy. Applications using this strategy should set higher\nHTTP timeouts of the API calls.", "IN_INDEX_DOC strategy skips fetching live documents of URL(s) not found\nin index. For applications which need low latency use of IN_INDEX_DOC\nstrategy is recommended." @@ -159,9 +199,7 @@ "enum": [ "FETCH_LIVE_DOC", "IN_INDEX_DOC" - ], - "description": "The lookup_strategy being requested.", - "type": "string" + ] }, "urls": { "description": "List of URLs to look up for the paired AMP URLs.\nThe URLs are case-sensitive. Up to 50 URLs per lookup\n(see [Usage Limits](/amp/cache/reference/limits)).", @@ -172,52 +210,12 @@ } }, "id": "BatchGetAmpUrlsRequest" - }, - "BatchGetAmpUrlsResponse": { - "description": "Batch AMP URL response.", - "type": "object", - "properties": { - "urlErrors": { - "description": "The errors for requested URLs that have no AMP URL.", - "items": { - "$ref": "AmpUrlError" - }, - "type": "array" - }, - "ampUrls": { - "description": "For each URL in BatchAmpUrlsRequest, the URL response. The response might\nnot be in the same order as URLs in the batch request.\nIf BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated\nonly once.", - "items": { - "$ref": "AmpUrl" - }, - "type": "array" - } - }, - "id": "BatchGetAmpUrlsResponse" - }, - "AmpUrl": { - "description": "AMP URL response for a requested URL.", - "type": "object", - "properties": { - "cdnAmpUrl": { - "description": "The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to\nthe cached document in the Google AMP Cache.", - "type": "string" - }, - "ampUrl": { - "description": "The AMP URL pointing to the publisher's web server.", - "type": "string" - }, - "originalUrl": { - "description": "The original non-AMP URL.", - "type": "string" - } - }, - "id": "AmpUrl" } }, "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, "version": "v1", "baseUrl": "https://acceleratedmobilepageurl.googleapis.com/", @@ -229,8 +227,10 @@ "ownerDomain": "google.com", "name": "acceleratedmobilepageurl", "batchPath": "batch", - "revision": "20170718", + "revision": "20170926", "documentationLink": "https://developers.google.com/amp/cache/", "id": "acceleratedmobilepageurl:v1", - "title": "Accelerated Mobile Pages (AMP) URL API" + "title": "Accelerated Mobile Pages (AMP) URL API", + "ownerName": "Google", + "discoveryVersion": "v1" } diff --git a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json index a4aa3b946..8e2573d8b 100644 --- a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json +++ b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-api.json @@ -1,1511 +1,1121 @@ { - "rootUrl": "https://adexchangebuyer.googleapis.com/", - "ownerDomain": "google.com", - "name": "adexchangebuyer2", - "batchPath": "batch", - "title": "Ad Exchange Buyer API II", - "ownerName": "Google", - "resources": { - "accounts": { - "resources": { - "filterSets": { - "methods": { - "list": { - "description": "Lists all filter sets for the account with the given account ID.", - "response": { - "$ref": "ListFilterSetsResponse" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilterSetsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.list\nmethod.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets", - "id": "adexchangebuyer2.accounts.filterSets.list", - "path": "v2beta1/accounts/{accountId}/filterSets" - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "response": { - "$ref": "FilterSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "filterSetId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "The ID of the filter set to get." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "id": "adexchangebuyer2.accounts.filterSets.get", - "description": "Retrieves the requested filter set for the account with the given account\nID." - }, - "create": { - "request": { - "$ref": "FilterSet" - }, - "description": "Creates the specified filter set for the account with the given account ID.", - "httpMethod": "POST", - "parameterOrder": [ - "accountId" - ], - "response": { - "$ref": "FilterSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "isTransient": { - "type": "boolean", - "location": "query", - "description": "Whether the filter set is transient, or should be persisted indefinitely.\nBy default, filter sets are not transient.\nIf transient, it will be available for at least 1 hour after creation." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets", - "path": "v2beta1/accounts/{accountId}/filterSets", - "id": "adexchangebuyer2.accounts.filterSets.create" - }, - "delete": { - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", - "id": "adexchangebuyer2.accounts.filterSets.delete", - "description": "Deletes the requested filter set from the account with the given account\nID.", - "httpMethod": "DELETE", - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to delete.", - "type": "string", - "required": true - } - } - } - }, - "resources": { - "bidMetrics": { - "methods": { - "list": { - "description": "Lists all metrics that are measured in terms of number of bids.", - "response": { - "$ref": "ListBidMetricsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "parameters": { - "filterSetId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply." - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidMetrics.list\nmethod.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Account ID of the buyer." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics", - "id": "adexchangebuyer2.accounts.filterSets.bidMetrics.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics" - } - } - }, - "impressionMetrics": { - "methods": { - "list": { - "description": "Lists all metrics that are measured in terms of number of impressions.", - "response": { - "$ref": "ListImpressionMetricsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListImpressionMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.impressionMetrics.list\nmethod.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics", - "id": "adexchangebuyer2.accounts.filterSets.impressionMetrics.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics" - } - } - }, - "bidResponseErrors": { - "methods": { - "list": { - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors", - "id": "adexchangebuyer2.accounts.filterSets.bidResponseErrors.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors", - "description": "List all errors that occurred in bid responses, with the number of bid\nresponses affected for each reason.", - "response": { - "$ref": "ListBidResponseErrorsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "type": "string", - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponseErrorsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponseErrors.list\nmethod." - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] - } - } - }, - "bidResponsesWithoutBids": { - "methods": { - "list": { - "response": { - "$ref": "ListBidResponsesWithoutBidsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponsesWithoutBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Account ID of the buyer." - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids", - "id": "adexchangebuyer2.accounts.filterSets.bidResponsesWithoutBids.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids", - "description": "List all reasons for which bid responses were considered to have no\napplicable bids, with the number of bid responses affected for each reason." - } - } - }, - "filteredBidRequests": { - "methods": { - "list": { - "response": { - "$ref": "ListFilteredBidRequestsResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidRequestsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBidRequests.list\nmethod.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests", - "id": "adexchangebuyer2.accounts.filterSets.filteredBidRequests.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests", - "description": "List all reasons that caused a bid request not to be sent for an\nimpression, with the number of bid requests not sent for each reason." - } - } - }, - "nonBillableWinningBids": { - "methods": { - "list": { - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids", - "id": "adexchangebuyer2.accounts.filterSets.nonBillableWinningBids.list", - "description": "List all reasons for which winning bids were not billable, with the number\nof bids not billed for each reason.", - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "response": { - "$ref": "ListNonBillableWinningBidsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListNonBillableWinningBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.nonBillableWinningBids.list\nmethod.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - } - } - } - } - }, - "filteredBids": { - "methods": { - "list": { - "description": "List all reasons for which bids were filtered, with the number of bids\nfiltered for each reason.", - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "response": { - "$ref": "ListFilteredBidsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.list\nmethod.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids", - "id": "adexchangebuyer2.accounts.filterSets.filteredBids.list" - } - }, - "resources": { - "details": { - "methods": { - "list": { - "description": "List all details associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each detail.", - "response": { - "$ref": "ListCreativeStatusBreakdownByDetailResponse" - }, - "parameterOrder": [ - "accountId", - "filterSetId", - "creativeStatusId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByDetailResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.details.list\nmethod.", - "type": "string" - }, - "creativeStatusId": { - "location": "path", - "format": "int32", - "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.", - "type": "integer", - "required": true - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Account ID of the buyer." - }, - "filterSetId": { - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details", - "id": "adexchangebuyer2.accounts.filterSets.filteredBids.details.list", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details" - } - } - }, - "creatives": { - "methods": { - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "filterSetId", - "creativeStatusId" - ], - "response": { - "$ref": "ListCreativeStatusBreakdownByCreativeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByCreativeResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod.", - "type": "string" - }, - "creativeStatusId": { - "type": "integer", - "required": true, - "location": "path", - "format": "int32", - "description": "The ID of the creative status for which to retrieve a breakdown by\ncreative.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes)." - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - }, - "filterSetId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply." - } - }, - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", - "id": "adexchangebuyer2.accounts.filterSets.filteredBids.creatives.list", - "description": "List all creatives associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each creative." - } - } - } - } - }, - "losingBids": { - "methods": { - "list": { - "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids", - "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids", - "id": "adexchangebuyer2.accounts.filterSets.losingBids.list", - "description": "List all reasons for which bids lost in the auction, with the number of\nbids that lost for each reason.", - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "filterSetId" - ], - "response": { - "$ref": "ListLosingBidsResponse" - }, - "parameters": { - "filterSetId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "The ID of the filter set to apply." - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListLosingBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.losingBids.list\nmethod.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Account ID of the buyer.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] - } - } - } - } - }, - "clients": { - "methods": { - "list": { - "response": { - "$ref": "ListClientsResponse" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientsResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.list method.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Unique numerical account ID of the sponsor buyer to list the clients for." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients", - "id": "adexchangebuyer2.accounts.clients.list", - "path": "v2beta1/accounts/{accountId}/clients", - "description": "Lists all the clients for the current sponsor buyer." - }, - "get": { - "description": "Gets a client buyer with a given client account ID.", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "clientAccountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer to retrieve. (required)", - "type": "string", - "required": true - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "id": "adexchangebuyer2.accounts.clients.get", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}" - }, - "update": { - "request": { - "$ref": "Client" - }, - "description": "Updates an existing client buyer.", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to update a client for. (required)" - }, - "clientAccountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Unique numerical account ID of the client to update. (required)" - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", - "id": "adexchangebuyer2.accounts.clients.update", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}" - }, - "create": { - "flatPath": "v2beta1/accounts/{accountId}/clients", - "id": "adexchangebuyer2.accounts.clients.create", - "path": "v2beta1/accounts/{accountId}/clients", - "request": { - "$ref": "Client" - }, - "description": "Creates a new client buyer.", - "response": { - "$ref": "Client" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to create a client for. (required)" - } - } - } - }, - "resources": { - "invitations": { - "methods": { - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "response": { - "$ref": "ListClientUserInvitationsResponse" - }, - "parameters": { - "clientAccountId": { - "location": "path", - "description": "Numerical account ID of the client buyer to list invitations for.\n(required)\nYou must either specify a string representation of a\nnumerical account identifier or the `-` character\nto list all the invitations for all the clients\nof a given sponsor buyer.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUserInvitationsResponse.nextPageToken\nreturned from the previous call to the\nclients.invitations.list\nmethod.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. Server may return fewer clients than requested.\nIf unspecified, server will pick an appropriate default." - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "id": "adexchangebuyer2.accounts.clients.invitations.list", - "description": "Lists all the client users invitations for a client\nwith a given account ID." - }, - "get": { - "response": { - "$ref": "ClientUserInvitation" - }, - "parameterOrder": [ - "accountId", - "clientAccountId", - "invitationId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "clientAccountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer that the user invitation\nto be retrieved is associated with. (required)" - }, - "invitationId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Numerical identifier of the user invitation to retrieve. (required)" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", - "id": "adexchangebuyer2.accounts.clients.invitations.get", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", - "description": "Retrieves an existing client user invitation." - }, - "create": { - "description": "Creates and sends out an email invitation to access\nan Ad Exchange client buyer account.", - "request": { - "$ref": "ClientUserInvitation" - }, - "response": { - "$ref": "ClientUserInvitation" - }, - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "httpMethod": "POST", - "parameters": { - "accountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true - }, - "clientAccountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer that the user\nshould be associated with. (required)", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", - "id": "adexchangebuyer2.accounts.clients.invitations.create", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations" - } - } - }, - "users": { - "methods": { - "get": { - "response": { - "$ref": "ClientUser" - }, - "parameterOrder": [ - "accountId", - "clientAccountId", - "userId" - ], - "httpMethod": "GET", - "parameters": { - "clientAccountId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer\nthat the user to be retrieved is associated with. (required)" - }, - "userId": { - "type": "string", - "required": true, - "location": "path", - "format": "int64", - "description": "Numerical identifier of the user to retrieve. (required)" - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "id": "adexchangebuyer2.accounts.clients.users.get", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "description": "Retrieves an existing client user." - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "clientAccountId" - ], - "response": { - "$ref": "ListClientUsersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "pageToken": { - "type": "string", - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUsersResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.users.list method." - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default." - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the sponsor buyer of the client to list users for.\n(required)", - "type": "string", - "required": true - }, - "clientAccountId": { - "location": "path", - "description": "The account ID of the client buyer to list users for. (required)\nYou must specify either a string representation of a\nnumerical account identifier or the `-` character\nto list all the client users for all the clients\nof a given sponsor buyer.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", - "id": "adexchangebuyer2.accounts.clients.users.list", - "description": "Lists all the known client users for a specified\nsponsor buyer account ID." - }, - "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "accountId", - "clientAccountId", - "userId" - ], - "response": { - "$ref": "ClientUser" - }, - "parameters": { - "userId": { - "location": "path", - "format": "int64", - "description": "Numerical identifier of the user to retrieve. (required)", - "type": "string", - "required": true - }, - "accountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client's sponsor buyer. (required)", - "type": "string", - "required": true - }, - "clientAccountId": { - "location": "path", - "format": "int64", - "description": "Numerical account ID of the client buyer that the user to be retrieved\nis associated with. (required)", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", - "id": "adexchangebuyer2.accounts.clients.users.update", - "description": "Updates an existing client user.\nOnly the user status can be changed on update.", - "request": { - "$ref": "ClientUser" - } - } - } - } - } - }, - "creatives": { - "methods": { - "stopWatching": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "httpMethod": "POST", - "parameters": { - "creativeId": { - "type": "string", - "required": true, - "location": "path", - "description": "The creative ID of the creative to stop notifications for.\nSpecify \"-\" to specify stopping account level notifications." - }, - "accountId": { - "location": "path", - "description": "The account of the creative to stop notifications for.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", - "id": "adexchangebuyer2.accounts.creatives.stopWatching", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", - "description": "Stops watching a creative. Will stop push notifications being sent to the\ntopics when the creative changes status.", - "request": { - "$ref": "StopWatchingCreativeRequest" - } - }, - "get": { - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "id": "adexchangebuyer2.accounts.creatives.get", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "description": "Gets a creative.", - "response": { - "$ref": "Creative" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "location": "path", - "description": "The account the creative belongs to.", - "type": "string", - "required": true - }, - "creativeId": { - "location": "path", - "description": "The ID of the creative to retrieve.", - "type": "string", - "required": true - } - } - }, - "watch": { - "httpMethod": "POST", - "parameterOrder": [ - "accountId", - "creativeId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "creativeId": { - "location": "path", - "description": "The creative ID to watch for status changes.\nSpecify \"-\" to watch all creatives under the above account.\nIf both creative-level and account-level notifications are\nsent, only a single notification will be sent to the\ncreative-level notification topic.", - "type": "string", - "required": true - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "description": "The account of the creative to watch." - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", - "id": "adexchangebuyer2.accounts.creatives.watch", - "request": { - "$ref": "WatchCreativeRequest" - }, - "description": "Watches a creative. Will result in push notifications being sent to the\ntopic when the creative changes status." - }, - "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "accountId", - "creativeId" - ], - "response": { - "$ref": "Creative" - }, - "parameters": { - "creativeId": { - "location": "path", - "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string", - "required": true - }, - "accountId": { - "location": "path", - "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", - "id": "adexchangebuyer2.accounts.creatives.update", - "description": "Updates a creative.", - "request": { - "$ref": "Creative" - } - }, - "list": { - "flatPath": "v2beta1/accounts/{accountId}/creatives", - "id": "adexchangebuyer2.accounts.creatives.list", - "path": "v2beta1/accounts/{accountId}/creatives", - "description": "Lists creatives.", - "response": { - "$ref": "ListCreativesResponse" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativesResponse.next_page_token\nreturned from the previous call to 'ListCreatives' method.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. The server may return fewer creatives than requested\n(due to timeout constraint) even if more are available via another call.\nIf unspecified, server will pick an appropriate default.\nAcceptable values are 1 to 1000, inclusive.", - "type": "integer" - }, - "accountId": { - "location": "path", - "description": "The account to list the creatives from.\nSpecify \"-\" to list all creatives the current user has access to.", - "type": "string", - "required": true - }, - "query": { - "location": "query", - "description": "An optional query string to filter creatives. If no filter is specified,\nall active creatives will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eattribute: {a numeric attribute from the list of attributes}\n\u003cli\u003edisapprovalReason: {a reason from\nDisapprovalReason\n\u003c/ul\u003e\nExample: 'accountId=12345 AND (dealsStatus:disapproved AND\ndisapprovalReason:unacceptable_content) OR attribute:47'", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ] - }, - "create": { - "response": { - "$ref": "Creative" - }, - "parameterOrder": [ - "accountId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "duplicateIdMode": { - "location": "query", - "enum": [ - "NO_DUPLICATES", - "FORCE_ENABLE_DUPLICATE_IDS" - ], - "description": "Indicates if multiple creatives can share an ID or not. Default is\nNO_DUPLICATES (one ID per creative).", - "type": "string" - }, - "accountId": { - "location": "path", - "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives", - "id": "adexchangebuyer2.accounts.creatives.create", - "path": "v2beta1/accounts/{accountId}/creatives", - "request": { - "$ref": "Creative" - }, - "description": "Creates a creative." - } - }, - "resources": { - "dealAssociations": { - "methods": { - "list": { - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", - "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list", - "description": "List all creative-deal associations.", - "httpMethod": "GET", - "parameterOrder": [ - "accountId", - "creativeId" - ], - "response": { - "$ref": "ListDealAssociationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "query": { - "location": "query", - "description": "An optional query string to filter deal associations. If no filter is\nspecified, all associations will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsId=\u003ci\u003edeals_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003c/ul\u003e\nExample: 'dealsId=12345 AND dealsStatus:disapproved'", - "type": "string" - }, - "creativeId": { - "location": "path", - "description": "The creative ID to list the associations from.\nSpecify \"-\" to list all creatives under the above account.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListDealAssociationsResponse.next_page_token\nreturned from the previous call to 'ListDealAssociations' method.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested page size. Server may return fewer associations than requested.\nIf unspecified, server will pick an appropriate default.", - "type": "integer" - }, - "accountId": { - "location": "path", - "description": "The account to list the associations from.\nSpecify \"-\" to list all creatives the current user has access to.", - "type": "string", - "required": true - } - } - }, - "remove": { - "description": "Remove the association between a deal and a creative.", - "request": { - "$ref": "RemoveDealAssociationRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "httpMethod": "POST", - "parameters": { - "creativeId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the creative associated with the deal." - }, - "accountId": { - "type": "string", - "required": true, - "location": "path", - "description": "The account the creative belongs to." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", - "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove" - }, - "add": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "accountId", - "creativeId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/adexchange.buyer" - ], - "parameters": { - "accountId": { - "type": "string", - "required": true, - "location": "path", - "description": "The account the creative belongs to." - }, - "creativeId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the creative associated with the deal." - } - }, - "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", - "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add", - "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", - "request": { - "$ref": "AddDealAssociationRequest" - }, - "description": "Associate an existing deal with a creative." - } - } - } - } - } - } - } - }, - "parameters": { - "upload_protocol": { - "type": "string", - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "default": "true", - "type": "boolean", - "location": "query", - "description": "Returns response with indentations and line breaks." - }, - "fields": { - "type": "string", - "location": "query", - "description": "Selector specifying which fields to include in a partial response." - }, - "uploadType": { - "type": "string", - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." - }, - "$.xgafv": { - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format." - }, - "callback": { - "type": "string", - "location": "query", - "description": "JSONP" - }, - "alt": { - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response." - }, - "key": { - "type": "string", - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token." - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "type": "string", - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." - }, - "pp": { - "default": "true", - "type": "boolean", - "location": "query", - "description": "Pretty-print response." - }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, - "oauth_token": { - "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." - } - }, - "version": "v2beta1", - "baseUrl": "https://adexchangebuyer.googleapis.com/", - "description": "Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.", - "kind": "discovery#restDescription", - "servicePath": "", "basePath": "", - "revision": "20170915", - "documentationLink": "https://developers.google.com/ad-exchange/buyer-rest/reference/rest/", "id": "adexchangebuyer2:v2beta1", + "documentationLink": "https://developers.google.com/ad-exchange/buyer-rest/reference/rest/", + "revision": "20170927", "discoveryVersion": "v1", "version_module": true, "schemas": { - "CalloutStatusRow": { + "CreativeStatusRow": { + "type": "object", + "properties": { + "creativeStatusId": { + "format": "int32", + "description": "The ID of the creative status.\nSee [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).", + "type": "integer" + }, + "bidCount": { + "$ref": "MetricValue", + "description": "The number of bids with the specified status." + }, + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + } + }, + "id": "CreativeStatusRow", + "description": "The number of bids with the specified dimension values that did not win the\nauction (either were filtered pre-auction or lost the auction), as described\nby the specified creative status." + }, + "RealtimeTimeRange": { + "description": "An open-ended realtime time range specified by the start timestamp.\nFor filter sets that specify a realtime time range RTB metrics continue to\nbe aggregated throughout the lifetime of the filter set.", + "type": "object", + "properties": { + "startTimestamp": { + "format": "google-datetime", + "description": "The start timestamp of the real-time RTB metrics aggregation.", + "type": "string" + } + }, + "id": "RealtimeTimeRange" + }, + "NonBillableWinningBidStatusRow": { + "description": "The number of winning bids with the specified dimension values for which the\nbuyer was not billed, as described by the specified status.", + "type": "object", + "properties": { + "status": { + "enumDescriptions": [ + "A placeholder for an undefined status.\nThis value will never be returned in responses.", + "The buyer was not billed because the ad was not rendered by the\npublisher.", + "The buyer was not billed because the impression won by the bid was\ndetermined to be invalid." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "AD_NOT_RENDERED", + "INVALID_IMPRESSION" + ], + "description": "The status specifying why the winning bids were not billed.", + "type": "string" + }, + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + }, + "bidCount": { + "description": "The number of bids with the specified status.", + "$ref": "MetricValue" + } + }, + "id": "NonBillableWinningBidStatusRow" + }, + "FilteredBidDetailRow": { + "description": "The number of filtered bids with the specified dimension values, among those\nfiltered due to the requested filtering reason (i.e. creative status), that\nhave the specified detail.", "type": "object", "properties": { "rowDimensions": { "$ref": "RowDimensions", "description": "The values of all dimensions associated with metric values in this row." }, - "calloutStatusId": { + "detailId": { "format": "int32", - "description": "The ID of the callout status.\nSee [callout-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/callout-status-codes).", + "description": "The ID of the detail. The associated value can be looked up in the\ndictionary file corresponding to the DetailType in the response message.", "type": "integer" }, - "impressionCount": { - "$ref": "MetricValue", - "description": "The number of impressions for which there was a bid request or bid response\nwith the specified callout status." + "bidCount": { + "description": "The number of bids with the specified detail.", + "$ref": "MetricValue" } }, - "id": "CalloutStatusRow", - "description": "The number of impressions with the specified dimension values where the\ncorresponding bid request or bid response was not successful, as described by\nthe specified callout status." + "id": "FilteredBidDetailRow" + }, + "AbsoluteDateRange": { + "description": "An absolute date range, specified by its start date and end date.\nThe supported range of dates begins 30 days before today and ends today.\nValidity checked upon filter set creation. If a filter set with an absolute\ndate range is run at a later date more than 30 days after start_date, it will\nfail.", + "type": "object", + "properties": { + "startDate": { + "description": "The start date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor before end_date.", + "$ref": "Date" + }, + "endDate": { + "description": "The end date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor after start_date.", + "$ref": "Date" + } + }, + "id": "AbsoluteDateRange" + }, + "AddDealAssociationRequest": { + "type": "object", + "properties": { + "association": { + "description": "The association between a creative and a deal that should be added.", + "$ref": "CreativeDealAssociation" + } + }, + "id": "AddDealAssociationRequest", + "description": "A request for associating a deal and a creative." + }, + "WatchCreativeRequest": { + "description": "A request for watching changes to creative Status.", + "type": "object", + "properties": { + "topic": { + "type": "string", + "description": "The Pub/Sub topic to publish notifications to.\nThis topic must already exist and must give permission to\nad-exchange-buyside-reports@google.com to write to the topic.\nThis should be the full resource name in\n\"projects/{project_id}/topics/{topic_id}\" format." + } + }, + "id": "WatchCreativeRequest" + }, + "TimeInterval": { + "properties": { + "endTime": { + "format": "google-datetime", + "description": "The timestamp marking the end of the range (exclusive) for which data is\nincluded.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The timestamp marking the start of the range (inclusive) for which data is\nincluded.", + "type": "string" + } + }, + "id": "TimeInterval", + "description": "An interval of time, with an absolute start and end.", + "type": "object" + }, + "FilteredBidCreativeRow": { + "description": "The number of filtered bids with the specified dimension values that have the\nspecified creative.", + "type": "object", + "properties": { + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + }, + "bidCount": { + "$ref": "MetricValue", + "description": "The number of bids with the specified creative." + }, + "creativeId": { + "description": "The ID of the creative.", + "type": "string" + } + }, + "id": "FilteredBidCreativeRow" + }, + "RelativeDateRange": { + "properties": { + "durationDays": { + "format": "int32", + "description": "The number of days in the requested date range. E.g. for a range spanning\ntoday, 1. For a range spanning the last 7 days, 7.", + "type": "integer" + }, + "offsetDays": { + "format": "int32", + "description": "The end date of the filter set, specified as the number of days before\ntoday. E.g. for a range where the last date is today, 0.", + "type": "integer" + } + }, + "id": "RelativeDateRange", + "description": "A relative date range, specified by an offset and a duration.\nThe supported range of dates begins 30 days before today and ends today.\nI.e. the limits for these values are:\noffset_days \u003e= 0\nduration_days \u003e= 1\noffset_days + duration_days \u003c= 30", + "type": "object" + }, + "NativeContent": { + "properties": { + "storeUrl": { + "type": "string", + "description": "The URL to the app store to purchase/download the promoted app." + }, + "headline": { + "description": "A short title for the ad.", + "type": "string" + }, + "appIcon": { + "$ref": "Image", + "description": "The app icon, for app download ads." + }, + "callToAction": { + "description": "A label for the button that the user is supposed to click.", + "type": "string" + }, + "body": { + "description": "A long description of the ad.", + "type": "string" + }, + "starRating": { + "format": "double", + "description": "The app rating in the app store. Must be in the range [0-5].", + "type": "number" + }, + "videoUrl": { + "description": "The URL to fetch a native video ad.", + "type": "string" + }, + "clickLinkUrl": { + "type": "string", + "description": "The URL that the browser/SDK will load when the user clicks the ad." + }, + "logo": { + "$ref": "Image", + "description": "A smaller image, for the advertiser's logo." + }, + "priceDisplayText": { + "description": "The price of the promoted app including currency info.", + "type": "string" + }, + "image": { + "$ref": "Image", + "description": "A large image." + }, + "clickTrackingUrl": { + "description": "The URL to use for click tracking.", + "type": "string" + }, + "advertiserName": { + "description": "The name of the advertiser or sponsor, to be displayed in the ad creative.", + "type": "string" + } + }, + "id": "NativeContent", + "description": "Native content for a creative.", + "type": "object" + }, + "ListClientsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientsRequest.pageToken\nfield in the subsequent call to the\naccounts.clients.list method\nto retrieve the next page of results.", + "type": "string" + }, + "clients": { + "description": "The returned list of clients.", + "items": { + "$ref": "Client" + }, + "type": "array" + } + }, + "id": "ListClientsResponse" + }, + "ListBidResponsesWithoutBidsResponse": { + "description": "Response message for listing all reasons that bid responses were considered\nto have no applicable bids.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponsesWithoutBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod to retrieve the next page of results.", + "type": "string" + }, + "bidResponseWithoutBidsStatusRows": { + "description": "List of rows, with counts of bid responses without bids aggregated by\nstatus.", + "items": { + "$ref": "BidResponseWithoutBidsStatusRow" + }, + "type": "array" + } + }, + "id": "ListBidResponsesWithoutBidsResponse" + }, + "ServingContext": { + "id": "ServingContext", + "description": "The serving context for this restriction.", + "type": "object", + "properties": { + "appType": { + "description": "Matches impressions for a particular app type.", + "$ref": "AppContext" + }, + "securityType": { + "$ref": "SecurityContext", + "description": "Matches impressions for a particular security type." + }, + "platform": { + "description": "Matches impressions coming from a particular platform.", + "$ref": "PlatformContext" + }, + "location": { + "$ref": "LocationContext", + "description": "Matches impressions coming from users *or* publishers in a specific\nlocation." + }, + "auctionType": { + "$ref": "AuctionContext", + "description": "Matches impressions for a particular auction type." + }, + "all": { + "type": "string", + "enumDescriptions": [ + "A simple context." + ], + "enum": [ + "SIMPLE_CONTEXT" + ], + "description": "Matches all contexts." + } + } + }, + "Image": { + "type": "object", + "properties": { + "height": { + "format": "int32", + "description": "Image height in pixels.", + "type": "integer" + }, + "width": { + "format": "int32", + "description": "Image width in pixels.", + "type": "integer" + }, + "url": { + "description": "The URL of the image.", + "type": "string" + } + }, + "id": "Image", + "description": "An image resource. You may provide a larger image than was requested,\nso long as the aspect ratio is preserved." + }, + "ListFilterSetsResponse": { + "description": "Response message for listing filter sets.", + "type": "object", + "properties": { + "filterSets": { + "description": "The filter sets belonging to the buyer.", + "items": { + "$ref": "FilterSet" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilterSetsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.list\nmethod to retrieve the next page of results.", + "type": "string" + } + }, + "id": "ListFilterSetsResponse" + }, + "BidResponseWithoutBidsStatusRow": { + "description": "The number of impressions with the specified dimension values that were\nconsidered to have no applicable bids, as described by the specified status.", + "type": "object", + "properties": { + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + }, + "impressionCount": { + "description": "The number of impressions for which there was a bid response with the\nspecified status.", + "$ref": "MetricValue" + }, + "status": { + "description": "The status specifying why the bid responses were considered to have no\napplicable bids.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined status.\nThis value will never be returned in responses.", + "The response had no bids.", + "The response had no bids for the specified account, though it may have\nincluded bids on behalf of other accounts.", + "The response had no bids for the specified deal, though it may have\nincluded bids on other deals on behalf of the account to which the deal\nbelongs." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "RESPONSES_WITHOUT_BIDS", + "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT", + "RESPONSES_WITHOUT_BIDS_FOR_DEAL" + ] + } + }, + "id": "BidResponseWithoutBidsStatusRow" + }, + "ClientUserInvitation": { + "properties": { + "invitationId": { + "format": "int64", + "description": "The unique numerical ID of the invitation that is sent to the user.\nThe value of this field is ignored in create operations.", + "type": "string" + }, + "email": { + "description": "The email address to which the invitation is sent. Email\naddresses should be unique among all client users under each sponsor\nbuyer.", + "type": "string" + }, + "clientAccountId": { + "format": "int64", + "description": "Numerical account ID of the client buyer\nthat the invited user is associated with.\nThe value of this field is ignored in create operations.", + "type": "string" + } + }, + "id": "ClientUserInvitation", + "description": "An invitation for a new client user to get access to the Ad Exchange\nBuyer UI.\nAll fields are required unless otherwise specified.", + "type": "object" + }, + "ListCreativeStatusBreakdownByDetailResponse": { + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByDetailRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.details.list\nmethod to retrieve the next page of results.", + "type": "string" + }, + "filteredBidDetailRows": { + "description": "List of rows, with counts of bids with a given creative status aggregated\nby detail.", + "items": { + "$ref": "FilteredBidDetailRow" + }, + "type": "array" + }, + "detailType": { + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined status.\nThis value will never be returned in responses.", + "Indicates that the detail ID refers to a creative attribute; see\n[publisher-excludable-creative-attributes](https://developers.google.com/ad-exchange/rtb/downloads/publisher-excludable-creative-attributes).", + "Indicates that the detail ID refers to a vendor; see\n[vendors](https://developers.google.com/ad-exchange/rtb/downloads/vendors).", + "Indicates that the detail ID refers to a sensitive category; see\n[ad-sensitive-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-sensitive-categories).", + "Indicates that the detail ID refers to a product category; see\n[ad-product-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-product-categories).", + "Indicates that the detail ID refers to a disapproval reason; see\nDisapprovalReason enum in [snippet-status-report-proto](https://developers.google.com/ad-exchange/rtb/downloads/snippet-status-report-proto)." + ], + "enum": [ + "DETAIL_TYPE_UNSPECIFIED", + "CREATIVE_ATTRIBUTE", + "VENDOR", + "SENSITIVE_CATEGORY", + "PRODUCT_CATEGORY", + "DISAPPROVAL_REASON" + ], + "description": "The type of detail that the detail IDs represent." + } + }, + "id": "ListCreativeStatusBreakdownByDetailResponse", + "description": "Response message for listing all details associated with a given filtered bid\nreason.", + "type": "object" + }, + "ListClientUsersResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUsersRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", + "type": "string" + }, + "users": { + "description": "The returned list of client users.", + "items": { + "$ref": "ClientUser" + }, + "type": "array" + } + }, + "id": "ListClientUsersResponse" + }, + "ListClientUserInvitationsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUserInvitationsRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", + "type": "string" + }, + "invitations": { + "description": "The returned list of client users.", + "items": { + "$ref": "ClientUserInvitation" + }, + "type": "array" + } + }, + "id": "ListClientUserInvitationsResponse" + }, + "LocationContext": { + "description": "@OutputOnly The Geo criteria the restriction applies to.", + "type": "object", + "properties": { + "geoCriteriaIds": { + "description": "IDs representing the geo location for this context.\nPlease refer to the\n[geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv)\nfile for different geo criteria IDs.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "id": "LocationContext" + }, + "PlatformContext": { + "description": "@OutputOnly The type of platform the restriction applies to.", + "type": "object", + "properties": { + "platforms": { + "enumDescriptions": [ + "Desktop platform.", + "Android platform.", + "iOS platform." + ], + "description": "The platforms this restriction applies to.", + "items": { + "enum": [ + "DESKTOP", + "ANDROID", + "IOS" + ], + "type": "string" + }, + "type": "array" + } + }, + "id": "PlatformContext" + }, + "MetricValue": { + "description": "A metric value, with an expected value and a variance; represents a count\nthat may be either exact or estimated (i.e. when sampled).", + "type": "object", + "properties": { + "variance": { + "type": "string", + "format": "int64", + "description": "The variance (i.e. square of the standard deviation) of the metric value.\nIf value is exact, variance is 0.\nCan be used to calculate margin of error as a percentage of value, using\nthe following formula, where Z is the standard constant that depends on the\ndesired size of the confidence interval (e.g. for 90% confidence interval,\nuse Z = 1.645):\n\n marginOfError = 100 * Z * sqrt(variance) / value" + }, + "value": { + "format": "int64", + "description": "The expected value of the metric.", + "type": "string" + } + }, + "id": "MetricValue" + }, + "ClientUser": { + "description": "A client user is created under a client buyer and has restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the associated client buyer.\n\nThe only way a new client user can be created is via accepting an\nemail invitation\n(see the\naccounts.clients.invitations.create\nmethod).\n\nAll fields are required unless otherwise specified.", + "type": "object", + "properties": { + "status": { + "enumDescriptions": [ + "A placeholder for an undefined user status.", + "A user who was already created but hasn't accepted the invitation yet.", + "A user that is currently active.", + "A user that is currently disabled." + ], + "enum": [ + "USER_STATUS_UNSPECIFIED", + "PENDING", + "ACTIVE", + "DISABLED" + ], + "description": "The status of the client user.", + "type": "string" + }, + "email": { + "description": "User's email address. The value of this field\nis ignored in an update operation.", + "type": "string" + }, + "userId": { + "format": "int64", + "description": "The unique numerical ID of the client user\nthat has accepted an invitation.\nThe value of this field is ignored in an update operation.", + "type": "string" + }, + "clientAccountId": { + "format": "int64", + "description": "Numerical account ID of the client buyer\nwith which the user is associated; the\nbuyer must be a client of the current sponsor buyer.\nThe value of this field is ignored in an update operation.", + "type": "string" + } + }, + "id": "ClientUser" + }, + "CreativeDealAssociation": { + "description": "The association between a creative and a deal.", + "type": "object", + "properties": { + "dealsId": { + "description": "The externalDealId for the deal associated with the creative.", + "type": "string" + }, + "accountId": { + "type": "string", + "description": "The account the creative belongs to." + }, + "creativeId": { + "description": "The ID of the creative associated with the deal.", + "type": "string" + } + }, + "id": "CreativeDealAssociation" + }, + "Creative": { + "description": "A creative and its classification data.", + "type": "object", + "properties": { + "vendorIds": { + "description": "All vendor IDs for the ads that may be shown from this creative.\nSee https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt\nfor possible values.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "impressionTrackingUrls": { + "description": "The set of URLs to be called to record an impression.", + "items": { + "type": "string" + }, + "type": "array" + }, + "html": { + "$ref": "HtmlContent", + "description": "An HTML creative." + }, + "detectedProductCategories": { + "description": "@OutputOnly Detected product categories, if any.\nSee the ad-product-categories.txt file in the technical documentation\nfor a list of IDs.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "dealsStatus": { + "enumDescriptions": [ + "The status is unknown.", + "The creative has not been checked.", + "The creative has been conditionally approved.\nSee serving_restrictions for details.", + "The creative has been approved.", + "The creative has been disapproved." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "NOT_CHECKED", + "CONDITIONALLY_APPROVED", + "APPROVED", + "DISAPPROVED" + ], + "description": "@OutputOnly The top-level deals status of this creative.\nIf disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string" + }, + "openAuctionStatus": { + "description": "@OutputOnly The top-level open auction status of this creative.\nIf disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "enumDescriptions": [ + "The status is unknown.", + "The creative has not been checked.", + "The creative has been conditionally approved.\nSee serving_restrictions for details.", + "The creative has been approved.", + "The creative has been disapproved." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "NOT_CHECKED", + "CONDITIONALLY_APPROVED", + "APPROVED", + "DISAPPROVED" + ] + }, + "advertiserName": { + "description": "The name of the company being advertised in the creative.", + "type": "string" + }, + "detectedDomains": { + "description": "@OutputOnly\nThe detected domains for this creative.", + "items": { + "type": "string" + }, + "type": "array" + }, + "detectedAdvertiserIds": { + "description": "@OutputOnly Detected advertiser IDs, if any.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, + "filteringStats": { + "$ref": "FilteringStats", + "description": "@OutputOnly The filtering stats for this creative." + }, + "attributes": { + "description": "All attributes for the ads that may be shown from this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "items": { + "type": "string", + "enum": [ + "ATTRIBUTE_UNSPECIFIED", + "IS_TAGGED", + "IS_COOKIE_TARGETED", + "IS_USER_INTEREST_TARGETED", + "EXPANDING_DIRECTION_NONE", + "EXPANDING_DIRECTION_UP", + "EXPANDING_DIRECTION_DOWN", + "EXPANDING_DIRECTION_LEFT", + "EXPANDING_DIRECTION_RIGHT", + "EXPANDING_DIRECTION_UP_LEFT", + "EXPANDING_DIRECTION_UP_RIGHT", + "EXPANDING_DIRECTION_DOWN_LEFT", + "EXPANDING_DIRECTION_DOWN_RIGHT", + "EXPANDING_DIRECTION_UP_OR_DOWN", + "EXPANDING_DIRECTION_LEFT_OR_RIGHT", + "EXPANDING_DIRECTION_ANY_DIAGONAL", + "EXPANDING_ACTION_ROLLOVER_TO_EXPAND", + "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH", + "RICH_MEDIA_CAPABILITY_TYPE_MRAID", + "RICH_MEDIA_CAPABILITY_TYPE_SSL", + "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL", + "NATIVE_ELIGIBILITY_ELIGIBLE", + "NATIVE_ELIGIBILITY_NOT_ELIGIBLE", + "RENDERING_SIZELESS_ADX" + ] + }, + "type": "array", + "enumDescriptions": [ + "Do not use. This is a placeholder value only.", + "The creative is tagged.", + "The creative is cookie targeted.", + "The creative is user interest targeted.", + "The creative does not expand.", + "The creative expands up.", + "The creative expands down.", + "The creative expands left.", + "The creative expands right.", + "The creative expands up and left.", + "The creative expands up and right.", + "The creative expands down and left.", + "The creative expands down and right.", + "The creative expands up or down.", + "The creative expands left or right.", + "The creative expands on any diagonal.", + "The creative expands when rolled over.", + "The instream vast video type is vpaid flash.", + "The creative is MRAID", + "The creative is SSL.", + "The creative is an interstitial.", + "The creative is eligible for native.", + "The creative is not eligible for native.", + "The creative can dynamically resize to fill a variety of slot sizes." + ] + }, + "apiUpdateTime": { + "type": "string", + "format": "google-datetime", + "description": "@OutputOnly The last update timestamp of the creative via API." + }, + "detectedLanguages": { + "description": "@OutputOnly\nThe detected languages for this creative. The order is arbitrary. The codes\nare 2 or 5 characters and are documented at\nhttps://developers.google.com/adwords/api/docs/appendix/languagecodes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "creativeId": { + "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string" + }, + "accountId": { + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string" + }, + "native": { + "$ref": "NativeContent", + "description": "A native creative." + }, + "video": { + "$ref": "VideoContent", + "description": "A video creative." + }, + "servingRestrictions": { + "description": "@OutputOnly The granular status of this ad in specific contexts.\nA context here relates to where something ultimately serves (for example,\na physical location, a platform, an HTTPS vs HTTP request, or the type\nof auction).", + "items": { + "$ref": "ServingRestriction" + }, + "type": "array" + }, + "agencyId": { + "format": "int64", + "description": "The agency ID for this creative.", + "type": "string" + }, + "clickThroughUrls": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The set of destination URLs for the creative." + }, + "adChoicesDestinationUrl": { + "description": "The link to AdChoices destination page.", + "type": "string" + }, + "detectedSensitiveCategories": { + "description": "@OutputOnly Detected sensitive categories, if any.\nSee the ad-sensitive-categories.txt file in the technical documentation for\na list of IDs. You should use these IDs along with the\nexcluded-sensitive-category field in the bid request to filter your bids.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "restrictedCategories": { + "description": "All restricted categories for the ads that may be shown from this creative.", + "items": { + "enum": [ + "NO_RESTRICTED_CATEGORIES", + "ALCOHOL" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "The ad has no restricted categories", + "The alcohol restricted category." + ] + }, + "corrections": { + "description": "@OutputOnly Shows any corrections that were applied to this creative.", + "items": { + "$ref": "Correction" + }, + "type": "array" + }, + "version": { + "format": "int32", + "description": "@OutputOnly The version of this creative.", + "type": "integer" + } + }, + "id": "Creative" + }, + "FilteringStats": { + "description": "@OutputOnly Filtering reasons for this creative during a period of a single\nday (from midnight to midnight Pacific).", + "type": "object", + "properties": { + "reasons": { + "description": "The set of filtering reasons for this date.", + "items": { + "$ref": "Reason" + }, + "type": "array" + }, + "date": { + "description": "The day during which the data was collected.\nThe data is collected from 00:00:00 to 23:59:59 PT.\nDuring switches from PST to PDT and back, the day may\ncontain 23 or 25 hours of data instead of the usual 24.", + "$ref": "Date" + } + }, + "id": "FilteringStats" + }, + "RemoveDealAssociationRequest": { + "description": "A request for removing the association between a deal and a creative.", + "type": "object", + "properties": { + "association": { + "description": "The association between a creative and a deal that should be removed.", + "$ref": "CreativeDealAssociation" + } + }, + "id": "RemoveDealAssociationRequest" + }, + "ListCreativeStatusBreakdownByCreativeResponse": { + "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByCreativeRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod to retrieve the next page of results.", + "type": "string" + }, + "filteredBidCreativeRows": { + "description": "List of rows, with counts of bids with a given creative status aggregated\nby creative.", + "items": { + "$ref": "FilteredBidCreativeRow" + }, + "type": "array" + } + }, + "id": "ListCreativeStatusBreakdownByCreativeResponse", + "description": "Response message for listing all creatives associated with a given filtered\nbid reason.", + "type": "object" + }, + "Client": { + "description": "A client resource represents a client buyer—an agency,\na brand, or an advertiser customer of the sponsor buyer.\nUsers associated with the client buyer have restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the client buyer.\nAll fields are required unless otherwise specified.", + "type": "object", + "properties": { + "clientAccountId": { + "format": "int64", + "description": "The globally-unique numerical ID of the client.\nThe value of this field is ignored in create and update operations.", + "type": "string" + }, + "entityName": { + "type": "string", + "description": "The name of the entity. This field is automatically fetched based on\nthe type and ID.\nThe value of this field is ignored in create and update operations." + }, + "status": { + "enumDescriptions": [ + "A placeholder for an undefined client status.", + "A client that is currently disabled.", + "A client that is currently active." + ], + "enum": [ + "CLIENT_STATUS_UNSPECIFIED", + "DISABLED", + "ACTIVE" + ], + "description": "The status of the client buyer.", + "type": "string" + }, + "entityType": { + "enum": [ + "ENTITY_TYPE_UNSPECIFIED", + "ADVERTISER", + "BRAND", + "AGENCY" + ], + "description": "The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined client entity type. Should not be used.", + "An advertiser.", + "A brand.", + "An advertising agency." + ] + }, + "clientName": { + "description": "Name used to represent this client to publishers.\nYou may have multiple clients that map to the same entity,\nbut for each client the combination of `clientName` and entity\nmust be unique.\nYou can specify this field as empty.", + "type": "string" + }, + "role": { + "enum": [ + "CLIENT_ROLE_UNSPECIFIED", + "CLIENT_DEAL_VIEWER", + "CLIENT_DEAL_NEGOTIATOR", + "CLIENT_DEAL_APPROVER" + ], + "description": "The role which is assigned to the client buyer. Each role implies a set of\npermissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`,\n`CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined client role.", + "Users associated with this client can see publisher deal offers\nin the Marketplace.\nThey can neither negotiate proposals nor approve deals.\nIf this client is visible to publishers, they can send deal proposals\nto this client.", + "Users associated with this client can respond to deal proposals\nsent to them by publishers. They can also initiate deal proposals\nof their own.", + "Users associated with this client can approve eligible deals\non your behalf. Some deals may still explicitly require publisher\nfinalization. If this role is not selected, the sponsor buyer\nwill need to manually approve each of their deals." + ] + }, + "visibleToSeller": { + "description": "Whether the client buyer will be visible to sellers.", + "type": "boolean" + }, + "entityId": { + "format": "int64", + "description": "Numerical identifier of the client entity.\nThe entity can be an advertiser, a brand, or an agency.\nThis identifier is unique among all the entities with the same type.\n\nA list of all known advertisers with their identifiers is available in the\n[advertisers.txt](https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt)\nfile.\n\nA list of all known brands with their identifiers is available in the\n[brands.txt](https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt)\nfile.\n\nA list of all known agencies with their identifiers is available in the\n[agencies.txt](https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt)\nfile.", + "type": "string" + } + }, + "id": "Client" + }, + "Correction": { + "type": "object", + "properties": { + "type": { + "enum": [ + "CORRECTION_TYPE_UNSPECIFIED", + "VENDOR_IDS_ADDED", + "SSL_ATTRIBUTE_REMOVED", + "FLASH_FREE_ATTRIBUTE_REMOVED", + "FLASH_FREE_ATTRIBUTE_ADDED", + "REQUIRED_ATTRIBUTE_ADDED", + "REQUIRED_VENDOR_ADDED", + "SSL_ATTRIBUTE_ADDED", + "IN_BANNER_VIDEO_ATTRIBUTE_ADDED", + "MRAID_ATTRIBUTE_ADDED", + "FLASH_ATTRIBUTE_REMOVED", + "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" + ], + "description": "The type of correction that was applied to the creative.", + "type": "string", + "enumDescriptions": [ + "The correction type is unknown. Refer to the details for more information.", + "The ad's declared vendors did not match the vendors that were detected.\nThe detected vendors were added.", + "The ad had the SSL attribute declared but was not SSL-compliant.\nThe SSL attribute was removed.", + "The ad was declared as Flash-free but contained Flash, so the Flash-free\nattribute was removed.", + "The ad was not declared as Flash-free but it did not reference any flash\ncontent, so the Flash-free attribute was added.", + "The ad did not declare a required creative attribute.\nThe attribute was added.", + "The ad did not declare a required technology vendor.\nThe technology vendor was added.", + "The ad did not declare the SSL attribute but was SSL-compliant, so the\nSSL attribute was added.", + "Properties consistent with In-banner video were found, so an\nIn-Banner Video attribute was added.", + "The ad makes calls to the MRAID API so the MRAID attribute was added.", + "The ad unnecessarily declared the Flash attribute, so the Flash attribute\nwas removed.", + "The ad contains video content." + ] + }, + "contexts": { + "description": "The contexts for the correction.", + "items": { + "$ref": "ServingContext" + }, + "type": "array" + }, + "details": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Additional details about what was corrected." + } + }, + "id": "Correction", + "description": "@OutputOnly Shows any corrections that were applied to this creative." + }, + "FilterSet": { + "description": "A set of filters that is applied to a request for data.\nWithin a filter set, an AND operation is performed across the filters\nrepresented by each field. An OR operation is performed across the filters\nrepresented by the multiple values of a repeated field. E.g.\n\"format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR\nseller_network_id=56)\"", + "type": "object", + "properties": { + "environment": { + "description": "The environment on which to filter; optional.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined environment; indicates that no environment\nfilter will be applied.", + "The ad impression appears on the web.", + "The ad impression appears in an app." + ], + "enum": [ + "ENVIRONMENT_UNSPECIFIED", + "WEB", + "APP" + ] + }, + "format": { + "type": "string", + "enumDescriptions": [ + "A placeholder for an undefined format; indicates that no format filter\nwill be applied.", + "The ad impression is display format (i.e. an image).", + "The ad impression is video format." + ], + "enum": [ + "FORMAT_UNSPECIFIED", + "DISPLAY", + "VIDEO" + ], + "description": "The format on which to filter; optional." + }, + "dealId": { + "format": "int64", + "description": "The ID of the deal on which to filter; optional.", + "type": "string" + }, + "timeSeriesGranularity": { + "description": "The granularity of time intervals if a time series breakdown is desired;\noptional.", + "type": "string", + "enumDescriptions": [ + "A placeholder for an unspecified interval; no time series is applied.\nAll rows in response will contain data for the entire requested time range.", + "Indicates that data will be broken down by the hour.", + "Indicates that data will be broken down by the day." + ], + "enum": [ + "TIME_SERIES_GRANULARITY_UNSPECIFIED", + "HOURLY", + "DAILY" + ] + }, + "filterSetId": { + "type": "string", + "format": "int64", + "description": "The ID of the filter set; unique within the account of the filter set\nowner.\nThe value of this field is ignored in create operations." + }, + "realtimeTimeRange": { + "description": "An open-ended realtime time range, defined by the aggregation start\ntimestamp.", + "$ref": "RealtimeTimeRange" + }, + "creativeId": { + "description": "The ID of the creative on which to filter; optional.", + "type": "string" + }, + "relativeDateRange": { + "$ref": "RelativeDateRange", + "description": "A relative date range, defined by an offset from today and a duration.\nInterpreted relative to Pacific time zone." + }, + "platforms": { + "description": "The list of platforms on which to filter; may be empty. The filters\nrepresented by multiple platforms are ORed together (i.e. if non-empty,\nresults must match any one of the platforms).", + "items": { + "type": "string", + "enum": [ + "PLATFORM_UNSPECIFIED", + "DESKTOP", + "TABLET", + "MOBILE" + ] + }, + "type": "array", + "enumDescriptions": [ + "A placeholder for an undefined platform; indicates that no platform\nfilter will be applied.", + "The ad impression appears on a desktop.", + "The ad impression appears on a tablet.", + "The ad impression appears on a mobile device." + ] + }, + "sellerNetworkIds": { + "description": "The list of IDs of the seller (publisher) networks on which to filter;\nmay be empty. The filters represented by multiple seller network IDs are\nORed together (i.e. if non-empty, results must match any one of the\npublisher networks).\nSee [seller-network-ids](https://developers.google.com/ad-exchange/rtb/downloads/seller-network-ids)\nfile for the set of existing seller network IDs.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "ownerAccountId": { + "format": "int64", + "description": "The account ID of the buyer who owns this filter set.\nThe value of this field is ignored in create operations.", + "type": "string" + }, + "absoluteDateRange": { + "$ref": "AbsoluteDateRange", + "description": "An absolute date range, defined by a start date and an end date.\nInterpreted relative to Pacific time zone." + }, + "buyerAccountId": { + "format": "int64", + "description": "The ID of the buyer account on which to filter; optional.", + "type": "string" + } + }, + "id": "FilterSet" }, "ListDealAssociationsResponse": { "description": "A response for listing creative and deal associations", "type": "object", "properties": { "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListDealAssociationsRequest.page_token\nfield in the subsequent call to 'ListDealAssociation' method to retrieve\nthe next page of results." + "description": "A token to retrieve the next page of results.\nPass this value in the\nListDealAssociationsRequest.page_token\nfield in the subsequent call to 'ListDealAssociation' method to retrieve\nthe next page of results.", + "type": "string" }, "associations": { "items": { @@ -1517,13 +1127,34 @@ }, "id": "ListDealAssociationsResponse" }, - "StopWatchingCreativeRequest": { - "description": "A request for stopping notifications for changes to creative Status.", + "CalloutStatusRow": { + "description": "The number of impressions with the specified dimension values where the\ncorresponding bid request or bid response was not successful, as described by\nthe specified callout status.", "type": "object", + "properties": { + "calloutStatusId": { + "format": "int32", + "description": "The ID of the callout status.\nSee [callout-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/callout-status-codes).", + "type": "integer" + }, + "impressionCount": { + "description": "The number of impressions for which there was a bid request or bid response\nwith the specified callout status.", + "$ref": "MetricValue" + }, + "rowDimensions": { + "$ref": "RowDimensions", + "description": "The values of all dimensions associated with metric values in this row." + } + }, + "id": "CalloutStatusRow" + }, + "StopWatchingCreativeRequest": { "properties": {}, - "id": "StopWatchingCreativeRequest" + "id": "StopWatchingCreativeRequest", + "description": "A request for stopping notifications for changes to creative Status.", + "type": "object" }, "Disapproval": { + "id": "Disapproval", "description": "@OutputOnly The reason and details for a disapproval.", "type": "object", "properties": { @@ -1535,6 +1166,7 @@ "type": "array" }, "reason": { + "description": "The categorized reason for disapproval.", "type": "string", "enumDescriptions": [ "The length of the image animation is longer than allowed.", @@ -1727,15 +1359,28 @@ "MAXIMUM_NUMBER_OF_COOKIES_EXCEEDED", "PERSONAL_LOANS", "UNSUPPORTED_FLASH_CONTENT" - ], - "description": "The categorized reason for disapproval." + ] } - }, - "id": "Disapproval" + } }, "ServingRestriction": { + "description": "@OutputOnly A representation of the status of an ad in a\nspecific context. A context here relates to where something ultimately serves\n(for example, a user or publisher geo, a platform, an HTTPS vs HTTP request,\nor the type of auction).", "type": "object", "properties": { + "status": { + "description": "The status of the creative in this context (for example, it has been\nexplicitly disapproved or is pending review).", + "type": "string", + "enumDescriptions": [ + "The status is not known.", + "The ad was disapproved in this context.", + "The ad is pending review in this context." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "DISAPPROVAL", + "PENDING_REVIEW" + ] + }, "disapprovalReasons": { "description": "Any disapprovals bound to this restriction.\nOnly present if status=DISAPPROVED.\nCan be used to filter the response of the\ncreatives.list\nmethod.", "items": { @@ -1749,57 +1394,42 @@ "$ref": "ServingContext" }, "type": "array" - }, - "status": { - "enum": [ - "STATUS_UNSPECIFIED", - "DISAPPROVAL", - "PENDING_REVIEW" - ], - "description": "The status of the creative in this context (for example, it has been\nexplicitly disapproved or is pending review).", - "type": "string", - "enumDescriptions": [ - "The status is not known.", - "The ad was disapproved in this context.", - "The ad is pending review in this context." - ] } }, - "id": "ServingRestriction", - "description": "@OutputOnly A representation of the status of an ad in a\nspecific context. A context here relates to where something ultimately serves\n(for example, a user or publisher geo, a platform, an HTTPS vs HTTP request,\nor the type of auction)." + "id": "ServingRestriction" }, "Date": { + "id": "Date", "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", "type": "object", "properties": { "day": { - "type": "integer", "format": "int32", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant." + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "type": "integer" }, "year": { - "type": "integer", "format": "int32", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year." + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "type": "integer" }, "month": { - "type": "integer", "format": "int32", - "description": "Month of year. Must be from 1 to 12." + "description": "Month of year. Must be from 1 to 12.", + "type": "integer" } - }, - "id": "Date" + } }, "RowDimensions": { + "description": "A response may include multiple rows, breaking down along various dimensions.\nEncapsulates the values of all dimensions for a given row.", "type": "object", "properties": { "timeInterval": { - "$ref": "TimeInterval", - "description": "The time interval that this row represents." + "description": "The time interval that this row represents.", + "$ref": "TimeInterval" } }, - "id": "RowDimensions", - "description": "A response may include multiple rows, breaking down along various dimensions.\nEncapsulates the values of all dimensions for a given row." + "id": "RowDimensions" }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", @@ -1808,9 +1438,15 @@ "id": "Empty" }, "AppContext": { + "description": "@OutputOnly The app type the restriction applies to for mobile device.", "type": "object", "properties": { "appTypes": { + "enumDescriptions": [ + "Native app context.", + "Mobile web app context." + ], + "description": "The app types this restriction applies to.", "items": { "type": "string", "enum": [ @@ -1818,31 +1454,25 @@ "WEB" ] }, - "type": "array", - "enumDescriptions": [ - "Native app context.", - "Mobile web app context." - ], - "description": "The app types this restriction applies to." + "type": "array" } }, - "id": "AppContext", - "description": "@OutputOnly The app type the restriction applies to for mobile device." + "id": "AppContext" }, "ListFilteredBidsResponse": { "description": "Response message for listing all reasons that bids were filtered from the\nauction.", "type": "object", "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.list\nmethod to retrieve the next page of results.", + "type": "string" + }, "creativeStatusRows": { "description": "List of rows, with counts of filtered bids aggregated by filtering reason\n(i.e. creative status).", "items": { "$ref": "CreativeStatusRow" }, "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.list\nmethod to retrieve the next page of results." } }, "id": "ListFilteredBidsResponse" @@ -1852,40 +1482,40 @@ "type": "object", "properties": { "securities": { + "description": "The security types in this context.", "items": { - "type": "string", "enum": [ "INSECURE", "SSL" - ] + ], + "type": "string" }, "type": "array", "enumDescriptions": [ "Matches impressions that require insecure compatibility.", "Matches impressions that require SSL compatibility." - ], - "description": "The security types in this context." + ] } }, "id": "SecurityContext" }, "ListCreativesResponse": { - "type": "object", "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativesRequest.page_token\nfield in the subsequent call to `ListCreatives` method to retrieve the next\npage of results.", - "type": "string" - }, "creatives": { + "description": "The list of creatives.", "items": { "$ref": "Creative" }, - "type": "array", - "description": "The list of creatives." + "type": "array" + }, + "nextPageToken": { + "type": "string", + "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativesRequest.page_token\nfield in the subsequent call to `ListCreatives` method to retrieve the next\npage of results." } }, "id": "ListCreativesResponse", - "description": "A response for listing creatives." + "description": "A response for listing creatives.", + "type": "object" }, "HtmlContent": { "description": "HTML content for a creative.", @@ -1920,13 +1550,15 @@ "type": "array" }, "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidRequestsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBidRequests.list\nmethod to retrieve the next page of results." + "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilteredBidRequestsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBidRequests.list\nmethod to retrieve the next page of results.", + "type": "string" } }, "id": "ListFilteredBidRequestsResponse" }, "ListBidMetricsResponse": { + "id": "ListBidMetricsResponse", + "description": "Response message for listing the metrics that are measured in number of bids.", "type": "object", "properties": { "bidMetricsRows": { @@ -1937,12 +1569,10 @@ "type": "array" }, "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidMetrics.list\nmethod to retrieve the next page of results." + "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidMetrics.list\nmethod to retrieve the next page of results.", + "type": "string" } - }, - "id": "ListBidMetricsResponse", - "description": "Response message for listing the metrics that are measured in number of bids." + } }, "Reason": { "description": "A specific filtering status and how many times it occurred.", @@ -1961,6 +1591,35 @@ }, "id": "Reason" }, + "VideoContent": { + "properties": { + "videoUrl": { + "description": "The URL to fetch a video ad.", + "type": "string" + } + }, + "id": "VideoContent", + "description": "Video content for a creative.", + "type": "object" + }, + "ListLosingBidsResponse": { + "id": "ListLosingBidsResponse", + "description": "Response message for listing all reasons that bids lost in the auction.", + "type": "object", + "properties": { + "creativeStatusRows": { + "items": { + "$ref": "CreativeStatusRow" + }, + "type": "array", + "description": "List of rows, with counts of losing bids aggregated by loss reason (i.e.\ncreative status)." + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListLosingBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.losingBids.list\nmethod to retrieve the next page of results.", + "type": "string" + } + } + }, "ListNonBillableWinningBidsResponse": { "description": "Response message for listing all reasons for which a buyer was not billed for\na winning bid.", "type": "object", @@ -1979,46 +1638,9 @@ }, "id": "ListNonBillableWinningBidsResponse" }, - "ListLosingBidsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListLosingBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.losingBids.list\nmethod to retrieve the next page of results.", - "type": "string" - }, - "creativeStatusRows": { - "items": { - "$ref": "CreativeStatusRow" - }, - "type": "array", - "description": "List of rows, with counts of losing bids aggregated by loss reason (i.e.\ncreative status)." - } - }, - "id": "ListLosingBidsResponse", - "description": "Response message for listing all reasons that bids lost in the auction." - }, - "VideoContent": { - "description": "Video content for a creative.", - "type": "object", - "properties": { - "videoUrl": { - "type": "string", - "description": "The URL to fetch a video ad." - } - }, - "id": "VideoContent" - }, "ImpressionMetricsRow": { "type": "object", "properties": { - "responsesWithBids": { - "$ref": "MetricValue", - "description": "The number of impressions for which Ad Exchange received a response from\nthe buyer that contained at least one applicable bid." - }, - "successfulResponses": { - "$ref": "MetricValue", - "description": "The number of impressions for which the buyer successfully sent a response\nto Ad Exchange." - }, "rowDimensions": { "$ref": "RowDimensions", "description": "The values of all dimensions associated with metric values in this row." @@ -2028,29 +1650,35 @@ "description": "The number of impressions available to the buyer on Ad Exchange.\nIn some cases this value may be unavailable." }, "inventoryMatches": { - "$ref": "MetricValue", - "description": "The number of impressions that match the buyer's inventory pretargeting." + "description": "The number of impressions that match the buyer's inventory pretargeting.", + "$ref": "MetricValue" }, "bidRequests": { + "description": "The number of impressions for which Ad Exchange sent the buyer a bid\nrequest.", + "$ref": "MetricValue" + }, + "responsesWithBids": { "$ref": "MetricValue", - "description": "The number of impressions for which Ad Exchange sent the buyer a bid\nrequest." + "description": "The number of impressions for which Ad Exchange received a response from\nthe buyer that contained at least one applicable bid." + }, + "successfulResponses": { + "$ref": "MetricValue", + "description": "The number of impressions for which the buyer successfully sent a response\nto Ad Exchange." } }, "id": "ImpressionMetricsRow", "description": "The set of metrics that are measured in numbers of impressions, representing\nhow many impressions with the specified dimension values were considered\neligible at each stage of the bidding funnel." }, "AuctionContext": { - "description": "@OutputOnly The auction type the restriction applies to.", - "type": "object", "properties": { "auctionTypes": { "description": "The auction types this restriction applies to.", "items": { - "type": "string", "enum": [ "OPEN_AUCTION", "DIRECT_DEALS" - ] + ], + "type": "string" }, "type": "array", "enumDescriptions": [ @@ -2059,29 +1687,38 @@ ] } }, - "id": "AuctionContext" + "id": "AuctionContext", + "description": "@OutputOnly The auction type the restriction applies to.", + "type": "object" }, "ListImpressionMetricsResponse": { "description": "Response message for listing the metrics that are measured in number of\nimpressions.", "type": "object", "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListImpressionMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.impressionMetrics.list\nmethod to retrieve the next page of results.", - "type": "string" - }, "impressionMetricsRows": { "description": "List of rows, each containing a set of impression metrics.", "items": { "$ref": "ImpressionMetricsRow" }, "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListImpressionMetricsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.impressionMetrics.list\nmethod to retrieve the next page of results.", + "type": "string" } }, "id": "ListImpressionMetricsResponse" }, "BidMetricsRow": { - "type": "object", "properties": { + "bids": { + "description": "The number of bids that Ad Exchange received from the buyer.", + "$ref": "MetricValue" + }, + "billedImpressions": { + "$ref": "MetricValue", + "description": "The number of bids for which the buyer was billed." + }, "bidsInAuction": { "$ref": "MetricValue", "description": "The number of bids that were permitted to compete in the auction." @@ -2099,1146 +1736,36 @@ "description": "The number of bids for which the corresponding impression was viewable (as\ndefined by Active View)." }, "measurableImpressions": { - "$ref": "MetricValue", - "description": "The number of bids for which the corresponding impression was measurable\nfor viewability (as defined by Active View)." - }, - "bids": { - "$ref": "MetricValue", - "description": "The number of bids that Ad Exchange received from the buyer." - }, - "billedImpressions": { - "$ref": "MetricValue", - "description": "The number of bids for which the buyer was billed." + "description": "The number of bids for which the corresponding impression was measurable\nfor viewability (as defined by Active View).", + "$ref": "MetricValue" } }, "id": "BidMetricsRow", - "description": "The set of metrics that are measured in numbers of bids, representing how\nmany bids with the specified dimension values were considered eligible at\neach stage of the bidding funnel;" + "description": "The set of metrics that are measured in numbers of bids, representing how\nmany bids with the specified dimension values were considered eligible at\neach stage of the bidding funnel;", + "type": "object" }, "ListBidResponseErrorsResponse": { - "type": "object", "properties": { + "nextPageToken": { + "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponseErrorsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponseErrors.list\nmethod to retrieve the next page of results.", + "type": "string" + }, "calloutStatusRows": { + "description": "List of rows, with counts of bid responses aggregated by callout status.", "items": { "$ref": "CalloutStatusRow" }, - "type": "array", - "description": "List of rows, with counts of bid responses aggregated by callout status." - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponseErrorsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponseErrors.list\nmethod to retrieve the next page of results." + "type": "array" } }, "id": "ListBidResponseErrorsResponse", - "description": "Response message for listing all reasons that bid responses resulted in an\nerror." - }, - "CreativeStatusRow": { - "description": "The number of bids with the specified dimension values that did not win the\nauction (either were filtered pre-auction or lost the auction), as described\nby the specified creative status.", - "type": "object", - "properties": { - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - }, - "creativeStatusId": { - "format": "int32", - "description": "The ID of the creative status.\nSee [creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).", - "type": "integer" - }, - "bidCount": { - "$ref": "MetricValue", - "description": "The number of bids with the specified status." - } - }, - "id": "CreativeStatusRow" - }, - "RealtimeTimeRange": { - "description": "An open-ended realtime time range specified by the start timestamp.\nFor filter sets that specify a realtime time range RTB metrics continue to\nbe aggregated throughout the lifetime of the filter set.", - "type": "object", - "properties": { - "startTimestamp": { - "format": "google-datetime", - "description": "The start timestamp of the real-time RTB metrics aggregation.", - "type": "string" - } - }, - "id": "RealtimeTimeRange" - }, - "NonBillableWinningBidStatusRow": { - "description": "The number of winning bids with the specified dimension values for which the\nbuyer was not billed, as described by the specified status.", - "type": "object", - "properties": { - "status": { - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined status.\nThis value will never be returned in responses.", - "The buyer was not billed because the ad was not rendered by the\npublisher.", - "The buyer was not billed because the impression won by the bid was\ndetermined to be invalid." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "AD_NOT_RENDERED", - "INVALID_IMPRESSION" - ], - "description": "The status specifying why the winning bids were not billed." - }, - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - }, - "bidCount": { - "$ref": "MetricValue", - "description": "The number of bids with the specified status." - } - }, - "id": "NonBillableWinningBidStatusRow" - }, - "FilteredBidDetailRow": { - "description": "The number of filtered bids with the specified dimension values, among those\nfiltered due to the requested filtering reason (i.e. creative status), that\nhave the specified detail.", - "type": "object", - "properties": { - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - }, - "detailId": { - "format": "int32", - "description": "The ID of the detail. The associated value can be looked up in the\ndictionary file corresponding to the DetailType in the response message.", - "type": "integer" - }, - "bidCount": { - "$ref": "MetricValue", - "description": "The number of bids with the specified detail." - } - }, - "id": "FilteredBidDetailRow" - }, - "AbsoluteDateRange": { - "description": "An absolute date range, specified by its start date and end date.\nThe supported range of dates begins 30 days before today and ends today.\nValidity checked upon filter set creation. If a filter set with an absolute\ndate range is run at a later date more than 30 days after start_date, it will\nfail.", - "type": "object", - "properties": { - "endDate": { - "$ref": "Date", - "description": "The end date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor after start_date." - }, - "startDate": { - "$ref": "Date", - "description": "The start date of the range (inclusive).\nMust be within the 30 days leading up to current date, and must be equal to\nor before end_date." - } - }, - "id": "AbsoluteDateRange" - }, - "AddDealAssociationRequest": { - "description": "A request for associating a deal and a creative.", - "type": "object", - "properties": { - "association": { - "$ref": "CreativeDealAssociation", - "description": "The association between a creative and a deal that should be added." - } - }, - "id": "AddDealAssociationRequest" - }, - "WatchCreativeRequest": { - "type": "object", - "properties": { - "topic": { - "description": "The Pub/Sub topic to publish notifications to.\nThis topic must already exist and must give permission to\nad-exchange-buyside-reports@google.com to write to the topic.\nThis should be the full resource name in\n\"projects/{project_id}/topics/{topic_id}\" format.", - "type": "string" - } - }, - "id": "WatchCreativeRequest", - "description": "A request for watching changes to creative Status." - }, - "TimeInterval": { - "type": "object", - "properties": { - "endTime": { - "type": "string", - "format": "google-datetime", - "description": "The timestamp marking the end of the range (exclusive) for which data is\nincluded." - }, - "startTime": { - "format": "google-datetime", - "description": "The timestamp marking the start of the range (inclusive) for which data is\nincluded.", - "type": "string" - } - }, - "id": "TimeInterval", - "description": "An interval of time, with an absolute start and end.\nThis is included in the response, for several reasons:\n1) The request may have specified start or end times relative to the time the\n request was sent; the response indicates the corresponding absolute time\n interval.\n2) The request may have specified an end time past the latest time for which\n data was available (e.g. if requesting data for the today); the response\n indicates the latest time for which data was actually returned.\n3) The response data for a single request may be broken down into multiple\n time intervals, if a time series was requested." - }, - "FilteredBidCreativeRow": { - "type": "object", - "properties": { - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - }, - "bidCount": { - "$ref": "MetricValue", - "description": "The number of bids with the specified creative." - }, - "creativeId": { - "description": "The ID of the creative.", - "type": "string" - } - }, - "id": "FilteredBidCreativeRow", - "description": "The number of filtered bids with the specified dimension values that have the\nspecified creative." - }, - "RelativeDateRange": { - "description": "A relative date range, specified by an offset and a duration.\nThe supported range of dates begins 30 days before today and ends today.\nI.e. the limits for these values are:\noffset_days \u003e= 0\nduration_days \u003e= 1\noffset_days + duration_days \u003c= 30", - "type": "object", - "properties": { - "offsetDays": { - "type": "integer", - "format": "int32", - "description": "The end date of the filter set, specified as the number of days before\ntoday. E.g. for a range where the last date is today, 0." - }, - "durationDays": { - "type": "integer", - "format": "int32", - "description": "The number of days in the requested date range. E.g. for a range spanning\ntoday, 1. For a range spanning the last 7 days, 7." - } - }, - "id": "RelativeDateRange" - }, - "ListClientsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientsRequest.pageToken\nfield in the subsequent call to the\naccounts.clients.list method\nto retrieve the next page of results.", - "type": "string" - }, - "clients": { - "items": { - "$ref": "Client" - }, - "type": "array", - "description": "The returned list of clients." - } - }, - "id": "ListClientsResponse" - }, - "NativeContent": { - "description": "Native content for a creative.", - "type": "object", - "properties": { - "clickTrackingUrl": { - "type": "string", - "description": "The URL to use for click tracking." - }, - "image": { - "$ref": "Image", - "description": "A large image." - }, - "advertiserName": { - "type": "string", - "description": "The name of the advertiser or sponsor, to be displayed in the ad creative." - }, - "storeUrl": { - "type": "string", - "description": "The URL to the app store to purchase/download the promoted app." - }, - "headline": { - "type": "string", - "description": "A short title for the ad." - }, - "appIcon": { - "$ref": "Image", - "description": "The app icon, for app download ads." - }, - "callToAction": { - "type": "string", - "description": "A label for the button that the user is supposed to click." - }, - "body": { - "type": "string", - "description": "A long description of the ad." - }, - "starRating": { - "type": "number", - "format": "double", - "description": "The app rating in the app store. Must be in the range [0-5]." - }, - "videoUrl": { - "type": "string", - "description": "The URL to fetch a native video ad." - }, - "logo": { - "$ref": "Image", - "description": "A smaller image, for the advertiser's logo." - }, - "clickLinkUrl": { - "description": "The URL that the browser/SDK will load when the user clicks the ad.", - "type": "string" - }, - "priceDisplayText": { - "type": "string", - "description": "The price of the promoted app including currency info." - } - }, - "id": "NativeContent" - }, - "ListBidResponsesWithoutBidsResponse": { - "description": "Response message for listing all reasons that bid responses were considered\nto have no applicable bids.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListBidResponsesWithoutBidsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod to retrieve the next page of results.", - "type": "string" - }, - "bidResponseWithoutBidsStatusRows": { - "items": { - "$ref": "BidResponseWithoutBidsStatusRow" - }, - "type": "array", - "description": "List of rows, with counts of bid responses without bids aggregated by\nstatus." - } - }, - "id": "ListBidResponsesWithoutBidsResponse" - }, - "ServingContext": { - "type": "object", - "properties": { - "platform": { - "$ref": "PlatformContext", - "description": "Matches impressions coming from a particular platform." - }, - "location": { - "$ref": "LocationContext", - "description": "Matches impressions coming from users *or* publishers in a specific\nlocation." - }, - "auctionType": { - "$ref": "AuctionContext", - "description": "Matches impressions for a particular auction type." - }, - "all": { - "type": "string", - "enumDescriptions": [ - "A simple context." - ], - "enum": [ - "SIMPLE_CONTEXT" - ], - "description": "Matches all contexts." - }, - "appType": { - "$ref": "AppContext", - "description": "Matches impressions for a particular app type." - }, - "securityType": { - "$ref": "SecurityContext", - "description": "Matches impressions for a particular security type." - } - }, - "id": "ServingContext", - "description": "The serving context for this restriction." - }, - "Image": { - "description": "An image resource. You may provide a larger image than was requested,\nso long as the aspect ratio is preserved.", - "type": "object", - "properties": { - "width": { - "format": "int32", - "description": "Image width in pixels.", - "type": "integer" - }, - "url": { - "description": "The URL of the image.", - "type": "string" - }, - "height": { - "type": "integer", - "format": "int32", - "description": "Image height in pixels." - } - }, - "id": "Image" - }, - "ListFilterSetsResponse": { - "description": "Response message for listing filter sets.", - "type": "object", - "properties": { - "filterSets": { - "items": { - "$ref": "FilterSet" - }, - "type": "array", - "description": "The filter sets belonging to the buyer." - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListFilterSetsRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.list\nmethod to retrieve the next page of results." - } - }, - "id": "ListFilterSetsResponse" - }, - "BidResponseWithoutBidsStatusRow": { - "type": "object", - "properties": { - "impressionCount": { - "$ref": "MetricValue", - "description": "The number of impressions for which there was a bid response with the\nspecified status." - }, - "status": { - "enum": [ - "STATUS_UNSPECIFIED", - "RESPONSES_WITHOUT_BIDS", - "RESPONSES_WITHOUT_BIDS_FOR_ACCOUNT", - "RESPONSES_WITHOUT_BIDS_FOR_DEAL" - ], - "description": "The status specifying why the bid responses were considered to have no\napplicable bids.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined status.\nThis value will never be returned in responses.", - "The response had no bids.", - "The response had no bids for the specified account, though it may have\nincluded bids on behalf of other accounts.", - "The response had no bids for the specified deal, though it may have\nincluded bids on other deals on behalf of the account to which the deal\nbelongs." - ] - }, - "rowDimensions": { - "$ref": "RowDimensions", - "description": "The values of all dimensions associated with metric values in this row." - } - }, - "id": "BidResponseWithoutBidsStatusRow", - "description": "The number of impressions with the specified dimension values that were\nconsidered to have no applicable bids, as described by the specified status." - }, - "ClientUserInvitation": { - "description": "An invitation for a new client user to get access to the Ad Exchange\nBuyer UI.\nAll fields are required unless otherwise specified.", - "type": "object", - "properties": { - "clientAccountId": { - "type": "string", - "format": "int64", - "description": "Numerical account ID of the client buyer\nthat the invited user is associated with.\nThe value of this field is ignored in create operations." - }, - "invitationId": { - "type": "string", - "format": "int64", - "description": "The unique numerical ID of the invitation that is sent to the user.\nThe value of this field is ignored in create operations." - }, - "email": { - "description": "The email address to which the invitation is sent. Email\naddresses should be unique among all client users under each sponsor\nbuyer.", - "type": "string" - } - }, - "id": "ClientUserInvitation" - }, - "ListClientUserInvitationsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUserInvitationsRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", - "type": "string" - }, - "invitations": { - "items": { - "$ref": "ClientUserInvitation" - }, - "type": "array", - "description": "The returned list of client users." - } - }, - "id": "ListClientUserInvitationsResponse" - }, - "ListClientUsersResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve the next page of results.\nPass this value in the\nListClientUsersRequest.pageToken\nfield in the subsequent call to the\nclients.invitations.list\nmethod to retrieve the next\npage of results.", - "type": "string" - }, - "users": { - "description": "The returned list of client users.", - "items": { - "$ref": "ClientUser" - }, - "type": "array" - } - }, - "id": "ListClientUsersResponse" - }, - "ListCreativeStatusBreakdownByDetailResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByDetailRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.details.list\nmethod to retrieve the next page of results." - }, - "filteredBidDetailRows": { - "description": "List of rows, with counts of bids with a given creative status aggregated\nby detail.", - "items": { - "$ref": "FilteredBidDetailRow" - }, - "type": "array" - }, - "detailType": { - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined status.\nThis value will never be returned in responses.", - "Indicates that the detail ID refers to a creative attribute; see\n[publisher-excludable-creative-attributes](https://developers.google.com/ad-exchange/rtb/downloads/publisher-excludable-creative-attributes).", - "Indicates that the detail ID refers to a vendor; see\n[vendors](https://developers.google.com/ad-exchange/rtb/downloads/vendors).", - "Indicates that the detail ID refers to a sensitive category; see\n[ad-sensitive-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-sensitive-categories).", - "Indicates that the detail ID refers to a product category; see\n[ad-product-categories](https://developers.google.com/ad-exchange/rtb/downloads/ad-product-categories).", - "Indicates that the detail ID refers to a disapproval reason; see\nDisapprovalReason enum in [snippet-status-report-proto](https://developers.google.com/ad-exchange/rtb/downloads/snippet-status-report-proto)." - ], - "enum": [ - "DETAIL_TYPE_UNSPECIFIED", - "CREATIVE_ATTRIBUTE", - "VENDOR", - "SENSITIVE_CATEGORY", - "PRODUCT_CATEGORY", - "DISAPPROVAL_REASON" - ], - "description": "The type of detail that the detail IDs represent." - } - }, - "id": "ListCreativeStatusBreakdownByDetailResponse", - "description": "Response message for listing all details associated with a given filtered bid\nreason." - }, - "LocationContext": { - "type": "object", - "properties": { - "geoCriteriaIds": { - "description": "IDs representing the geo location for this context.\nPlease refer to the\n[geo-table.csv](https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv)\nfile for different geo criteria IDs.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - } - }, - "id": "LocationContext", - "description": "@OutputOnly The Geo criteria the restriction applies to." - }, - "PlatformContext": { - "type": "object", - "properties": { - "platforms": { - "items": { - "type": "string", - "enum": [ - "DESKTOP", - "ANDROID", - "IOS" - ] - }, - "type": "array", - "enumDescriptions": [ - "Desktop platform.", - "Android platform.", - "iOS platform." - ], - "description": "The platforms this restriction applies to." - } - }, - "id": "PlatformContext", - "description": "@OutputOnly The type of platform the restriction applies to." - }, - "MetricValue": { - "type": "object", - "properties": { - "variance": { - "format": "int64", - "description": "The variance (i.e. square of the standard deviation) of the metric value.\nIf value is exact, variance is 0.\nCan be used to calculate margin of error as a percentage of value, using\nthe following formula, where Z is the standard constant that depends on the\ndesired size of the confidence interval (e.g. for 90% confidence interval,\nuse Z = 1.645):\n\n marginOfError = 100 * Z * sqrt(variance) / value", - "type": "string" - }, - "value": { - "format": "int64", - "description": "The expected value of the metric.", - "type": "string" - } - }, - "id": "MetricValue", - "description": "A metric value, with an expected value and a variance; represents a count\nthat may be either exact or estimated (i.e. when sampled)." - }, - "ClientUser": { - "type": "object", - "properties": { - "clientAccountId": { - "type": "string", - "format": "int64", - "description": "Numerical account ID of the client buyer\nwith which the user is associated; the\nbuyer must be a client of the current sponsor buyer.\nThe value of this field is ignored in an update operation." - }, - "status": { - "enum": [ - "USER_STATUS_UNSPECIFIED", - "PENDING", - "ACTIVE", - "DISABLED" - ], - "description": "The status of the client user.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined user status.", - "A user who was already created but hasn't accepted the invitation yet.", - "A user that is currently active.", - "A user that is currently disabled." - ] - }, - "email": { - "description": "User's email address. The value of this field\nis ignored in an update operation.", - "type": "string" - }, - "userId": { - "type": "string", - "format": "int64", - "description": "The unique numerical ID of the client user\nthat has accepted an invitation.\nThe value of this field is ignored in an update operation." - } - }, - "id": "ClientUser", - "description": "A client user is created under a client buyer and has restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the associated client buyer.\n\nThe only way a new client user can be created is via accepting an\nemail invitation\n(see the\naccounts.clients.invitations.create\nmethod).\n\nAll fields are required unless otherwise specified." - }, - "CreativeDealAssociation": { - "type": "object", - "properties": { - "creativeId": { - "description": "The ID of the creative associated with the deal.", - "type": "string" - }, - "dealsId": { - "description": "The externalDealId for the deal associated with the creative.", - "type": "string" - }, - "accountId": { - "description": "The account the creative belongs to.", - "type": "string" - } - }, - "id": "CreativeDealAssociation", - "description": "The association between a creative and a deal." - }, - "Creative": { - "description": "A creative and its classification data.", - "type": "object", - "properties": { - "filteringStats": { - "$ref": "FilteringStats", - "description": "@OutputOnly The filtering stats for this creative." - }, - "attributes": { - "items": { - "type": "string", - "enum": [ - "ATTRIBUTE_UNSPECIFIED", - "IS_TAGGED", - "IS_COOKIE_TARGETED", - "IS_USER_INTEREST_TARGETED", - "EXPANDING_DIRECTION_NONE", - "EXPANDING_DIRECTION_UP", - "EXPANDING_DIRECTION_DOWN", - "EXPANDING_DIRECTION_LEFT", - "EXPANDING_DIRECTION_RIGHT", - "EXPANDING_DIRECTION_UP_LEFT", - "EXPANDING_DIRECTION_UP_RIGHT", - "EXPANDING_DIRECTION_DOWN_LEFT", - "EXPANDING_DIRECTION_DOWN_RIGHT", - "EXPANDING_DIRECTION_UP_OR_DOWN", - "EXPANDING_DIRECTION_LEFT_OR_RIGHT", - "EXPANDING_DIRECTION_ANY_DIAGONAL", - "EXPANDING_ACTION_ROLLOVER_TO_EXPAND", - "INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH", - "RICH_MEDIA_CAPABILITY_TYPE_MRAID", - "RICH_MEDIA_CAPABILITY_TYPE_SSL", - "RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL", - "NATIVE_ELIGIBILITY_ELIGIBLE", - "NATIVE_ELIGIBILITY_NOT_ELIGIBLE", - "RENDERING_SIZELESS_ADX" - ] - }, - "type": "array", - "enumDescriptions": [ - "Do not use. This is a placeholder value only.", - "The creative is tagged.", - "The creative is cookie targeted.", - "The creative is user interest targeted.", - "The creative does not expand.", - "The creative expands up.", - "The creative expands down.", - "The creative expands left.", - "The creative expands right.", - "The creative expands up and left.", - "The creative expands up and right.", - "The creative expands down and left.", - "The creative expands down and right.", - "The creative expands up or down.", - "The creative expands left or right.", - "The creative expands on any diagonal.", - "The creative expands when rolled over.", - "The instream vast video type is vpaid flash.", - "The creative is MRAID", - "The creative is SSL.", - "The creative is an interstitial.", - "The creative is eligible for native.", - "The creative is not eligible for native.", - "The creative can dynamically resize to fill a variety of slot sizes." - ], - "description": "All attributes for the ads that may be shown from this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod." - }, - "apiUpdateTime": { - "type": "string", - "format": "google-datetime", - "description": "@OutputOnly The last update timestamp of the creative via API." - }, - "detectedLanguages": { - "description": "@OutputOnly\nThe detected languages for this creative. The order is arbitrary. The codes\nare 2 or 5 characters and are documented at\nhttps://developers.google.com/adwords/api/docs/appendix/languagecodes.", - "items": { - "type": "string" - }, - "type": "array" - }, - "creativeId": { - "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string" - }, - "accountId": { - "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string" - }, - "native": { - "$ref": "NativeContent", - "description": "A native creative." - }, - "servingRestrictions": { - "items": { - "$ref": "ServingRestriction" - }, - "type": "array", - "description": "@OutputOnly The granular status of this ad in specific contexts.\nA context here relates to where something ultimately serves (for example,\na physical location, a platform, an HTTPS vs HTTP request, or the type\nof auction)." - }, - "video": { - "$ref": "VideoContent", - "description": "A video creative." - }, - "agencyId": { - "type": "string", - "format": "int64", - "description": "The agency ID for this creative." - }, - "clickThroughUrls": { - "description": "The set of destination URLs for the creative.", - "items": { - "type": "string" - }, - "type": "array" - }, - "adChoicesDestinationUrl": { - "description": "The link to AdChoices destination page.", - "type": "string" - }, - "detectedSensitiveCategories": { - "description": "@OutputOnly Detected sensitive categories, if any.\nSee the ad-sensitive-categories.txt file in the technical documentation for\na list of IDs. You should use these IDs along with the\nexcluded-sensitive-category field in the bid request to filter your bids.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "restrictedCategories": { - "description": "All restricted categories for the ads that may be shown from this creative.", - "items": { - "enum": [ - "NO_RESTRICTED_CATEGORIES", - "ALCOHOL" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "The ad has no restricted categories", - "The alcohol restricted category." - ] - }, - "corrections": { - "description": "@OutputOnly Shows any corrections that were applied to this creative.", - "items": { - "$ref": "Correction" - }, - "type": "array" - }, - "version": { - "format": "int32", - "description": "@OutputOnly The version of this creative.", - "type": "integer" - }, - "vendorIds": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "description": "All vendor IDs for the ads that may be shown from this creative.\nSee https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt\nfor possible values." - }, - "impressionTrackingUrls": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The set of URLs to be called to record an impression." - }, - "html": { - "$ref": "HtmlContent", - "description": "An HTML creative." - }, - "dealsStatus": { - "enum": [ - "STATUS_UNSPECIFIED", - "NOT_CHECKED", - "CONDITIONALLY_APPROVED", - "APPROVED", - "DISAPPROVED" - ], - "description": "@OutputOnly The top-level deals status of this creative.\nIf disapproved, an entry for 'auctionType=DIRECT_DEALS' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod.", - "type": "string", - "enumDescriptions": [ - "The status is unknown.", - "The creative has not been checked.", - "The creative has been conditionally approved.\nSee serving_restrictions for details.", - "The creative has been approved.", - "The creative has been disapproved." - ] - }, - "detectedProductCategories": { - "description": "@OutputOnly Detected product categories, if any.\nSee the ad-product-categories.txt file in the technical documentation\nfor a list of IDs.", - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array" - }, - "openAuctionStatus": { - "type": "string", - "enumDescriptions": [ - "The status is unknown.", - "The creative has not been checked.", - "The creative has been conditionally approved.\nSee serving_restrictions for details.", - "The creative has been approved.", - "The creative has been disapproved." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "NOT_CHECKED", - "CONDITIONALLY_APPROVED", - "APPROVED", - "DISAPPROVED" - ], - "description": "@OutputOnly The top-level open auction status of this creative.\nIf disapproved, an entry for 'auctionType = OPEN_AUCTION' (or 'ALL') in\nserving_restrictions will also exist. Note\nthat this may be nuanced with other contextual restrictions, in which case,\nit may be preferable to read from serving_restrictions directly.\nCan be used to filter the response of the\ncreatives.list\nmethod." - }, - "advertiserName": { - "type": "string", - "description": "The name of the company being advertised in the creative." - }, - "detectedDomains": { - "items": { - "type": "string" - }, - "type": "array", - "description": "@OutputOnly\nThe detected domains for this creative." - }, - "detectedAdvertiserIds": { - "items": { - "format": "int64", - "type": "string" - }, - "type": "array", - "description": "@OutputOnly Detected advertiser IDs, if any." - } - }, - "id": "Creative" - }, - "FilteringStats": { - "description": "@OutputOnly Filtering reasons for this creative during a period of a single\nday (from midnight to midnight Pacific).", - "type": "object", - "properties": { - "reasons": { - "items": { - "$ref": "Reason" - }, - "type": "array", - "description": "The set of filtering reasons for this date." - }, - "date": { - "$ref": "Date", - "description": "The day during which the data was collected.\nThe data is collected from 00:00:00 to 23:59:59 PT.\nDuring switches from PST to PDT and back, the day may\ncontain 23 or 25 hours of data instead of the usual 24." - } - }, - "id": "FilteringStats" - }, - "RemoveDealAssociationRequest": { - "description": "A request for removing the association between a deal and a creative.", - "type": "object", - "properties": { - "association": { - "$ref": "CreativeDealAssociation", - "description": "The association between a creative and a deal that should be removed." - } - }, - "id": "RemoveDealAssociationRequest" - }, - "ListCreativeStatusBreakdownByCreativeResponse": { - "type": "object", - "properties": { - "filteredBidCreativeRows": { - "description": "List of rows, with counts of bids with a given creative status aggregated\nby creative.", - "items": { - "$ref": "FilteredBidCreativeRow" - }, - "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve the next page of results.\nPass this value in the\nListCreativeStatusBreakdownByCreativeRequest.pageToken\nfield in the subsequent call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod to retrieve the next page of results." - } - }, - "id": "ListCreativeStatusBreakdownByCreativeResponse", - "description": "Response message for listing all creatives associated with a given filtered\nbid reason." - }, - "Client": { - "type": "object", - "properties": { - "clientAccountId": { - "type": "string", - "format": "int64", - "description": "The globally-unique numerical ID of the client.\nThe value of this field is ignored in create and update operations." - }, - "entityName": { - "type": "string", - "description": "The name of the entity. This field is automatically fetched based on\nthe type and ID.\nThe value of this field is ignored in create and update operations." - }, - "status": { - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined client status.", - "A client that is currently disabled.", - "A client that is currently active." - ], - "enum": [ - "CLIENT_STATUS_UNSPECIFIED", - "DISABLED", - "ACTIVE" - ], - "description": "The status of the client buyer." - }, - "entityType": { - "enum": [ - "ENTITY_TYPE_UNSPECIFIED", - "ADVERTISER", - "BRAND", - "AGENCY" - ], - "description": "The type of the client entity: `ADVERTISER`, `BRAND`, or `AGENCY`.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined client entity type. Should not be used.", - "An advertiser.", - "A brand.", - "An advertising agency." - ] - }, - "clientName": { - "description": "Name used to represent this client to publishers.\nYou may have multiple clients that map to the same entity,\nbut for each client the combination of `clientName` and entity\nmust be unique.\nYou can specify this field as empty.", - "type": "string" - }, - "role": { - "enum": [ - "CLIENT_ROLE_UNSPECIFIED", - "CLIENT_DEAL_VIEWER", - "CLIENT_DEAL_NEGOTIATOR", - "CLIENT_DEAL_APPROVER" - ], - "description": "The role which is assigned to the client buyer. Each role implies a set of\npermissions granted to the client. Must be one of `CLIENT_DEAL_VIEWER`,\n`CLIENT_DEAL_NEGOTIATOR` or `CLIENT_DEAL_APPROVER`.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined client role.", - "Users associated with this client can see publisher deal offers\nin the Marketplace.\nThey can neither negotiate proposals nor approve deals.\nIf this client is visible to publishers, they can send deal proposals\nto this client.", - "Users associated with this client can respond to deal proposals\nsent to them by publishers. They can also initiate deal proposals\nof their own.", - "Users associated with this client can approve eligible deals\non your behalf. Some deals may still explicitly require publisher\nfinalization. If this role is not selected, the sponsor buyer\nwill need to manually approve each of their deals." - ] - }, - "visibleToSeller": { - "description": "Whether the client buyer will be visible to sellers.", - "type": "boolean" - }, - "entityId": { - "format": "int64", - "description": "Numerical identifier of the client entity.\nThe entity can be an advertiser, a brand, or an agency.\nThis identifier is unique among all the entities with the same type.\n\nA list of all known advertisers with their identifiers is available in the\n[advertisers.txt](https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt)\nfile.\n\nA list of all known brands with their identifiers is available in the\n[brands.txt](https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt)\nfile.\n\nA list of all known agencies with their identifiers is available in the\n[agencies.txt](https://storage.googleapis.com/adx-rtb-dictionaries/agencies.txt)\nfile.", - "type": "string" - } - }, - "id": "Client", - "description": "A client resource represents a client buyer—an agency,\na brand, or an advertiser customer of the sponsor buyer.\nUsers associated with the client buyer have restricted access to\nthe Ad Exchange Marketplace and certain other sections\nof the Ad Exchange Buyer UI based on the role\ngranted to the client buyer.\nAll fields are required unless otherwise specified." - }, - "Correction": { - "description": "@OutputOnly Shows any corrections that were applied to this creative.", - "type": "object", - "properties": { - "type": { - "type": "string", - "enumDescriptions": [ - "The correction type is unknown. Refer to the details for more information.", - "The ad's declared vendors did not match the vendors that were detected.\nThe detected vendors were added.", - "The ad had the SSL attribute declared but was not SSL-compliant.\nThe SSL attribute was removed.", - "The ad was declared as Flash-free but contained Flash, so the Flash-free\nattribute was removed.", - "The ad was not declared as Flash-free but it did not reference any flash\ncontent, so the Flash-free attribute was added.", - "The ad did not declare a required creative attribute.\nThe attribute was added.", - "The ad did not declare a required technology vendor.\nThe technology vendor was added.", - "The ad did not declare the SSL attribute but was SSL-compliant, so the\nSSL attribute was added.", - "Properties consistent with In-banner video were found, so an\nIn-Banner Video attribute was added.", - "The ad makes calls to the MRAID API so the MRAID attribute was added.", - "The ad unnecessarily declared the Flash attribute, so the Flash attribute\nwas removed.", - "The ad contains video content." - ], - "enum": [ - "CORRECTION_TYPE_UNSPECIFIED", - "VENDOR_IDS_ADDED", - "SSL_ATTRIBUTE_REMOVED", - "FLASH_FREE_ATTRIBUTE_REMOVED", - "FLASH_FREE_ATTRIBUTE_ADDED", - "REQUIRED_ATTRIBUTE_ADDED", - "REQUIRED_VENDOR_ADDED", - "SSL_ATTRIBUTE_ADDED", - "IN_BANNER_VIDEO_ATTRIBUTE_ADDED", - "MRAID_ATTRIBUTE_ADDED", - "FLASH_ATTRIBUTE_REMOVED", - "VIDEO_IN_SNIPPET_ATTRIBUTE_ADDED" - ], - "description": "The type of correction that was applied to the creative." - }, - "contexts": { - "description": "The contexts for the correction.", - "items": { - "$ref": "ServingContext" - }, - "type": "array" - }, - "details": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Additional details about what was corrected." - } - }, - "id": "Correction" - }, - "FilterSet": { - "type": "object", - "properties": { - "absoluteDateRange": { - "$ref": "AbsoluteDateRange", - "description": "An absolute date range, defined by a start date and an end date.\nInterpreted relative to Pacific time zone." - }, - "buyerAccountId": { - "type": "string", - "format": "int64", - "description": "The ID of the buyer account on which to filter; optional." - }, - "environment": { - "enum": [ - "ENVIRONMENT_UNSPECIFIED", - "WEB", - "APP" - ], - "description": "The environment on which to filter; optional.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined environment; indicates that no environment\nfilter will be applied.", - "The ad impression appears on the web.", - "The ad impression appears in an app." - ] - }, - "dealId": { - "type": "string", - "format": "int64", - "description": "The ID of the deal on which to filter; optional." - }, - "format": { - "type": "string", - "enumDescriptions": [ - "A placeholder for an undefined format; indicates that no format filter\nwill be applied.", - "The ad impression is display format (i.e. an image).", - "The ad impression is video format." - ], - "enum": [ - "FORMAT_UNSPECIFIED", - "DISPLAY", - "VIDEO" - ], - "description": "The format on which to filter; optional." - }, - "timeSeriesGranularity": { - "enum": [ - "TIME_SERIES_GRANULARITY_UNSPECIFIED", - "HOURLY", - "DAILY" - ], - "description": "The granularity of time intervals if a time series breakdown is desired;\noptional.", - "type": "string", - "enumDescriptions": [ - "A placeholder for an unspecified interval; no time series is applied.\nAll rows in response will contain data for the entire requested time range.", - "Indicates that data will be broken down by the hour.", - "Indicates that data will be broken down by the day." - ] - }, - "filterSetId": { - "format": "int64", - "description": "The ID of the filter set; unique within the account of the filter set\nowner.\nThe value of this field is ignored in create operations.", - "type": "string" - }, - "realtimeTimeRange": { - "$ref": "RealtimeTimeRange", - "description": "An open-ended realtime time range, defined by the aggregation start\ntimestamp." - }, - "creativeId": { - "type": "string", - "description": "The ID of the creative on which to filter; optional." - }, - "platforms": { - "items": { - "type": "string", - "enum": [ - "PLATFORM_UNSPECIFIED", - "DESKTOP", - "TABLET", - "MOBILE" - ] - }, - "type": "array", - "enumDescriptions": [ - "A placeholder for an undefined platform; indicates that no platform\nfilter will be applied.", - "The ad impression appears on a desktop.", - "The ad impression appears on a tablet.", - "The ad impression appears on a mobile device." - ], - "description": "The list of platforms on which to filter; may be empty. The filters\nrepresented by multiple platforms are ORed together (i.e. if non-empty,\nresults must match any one of the platforms)." - }, - "relativeDateRange": { - "$ref": "RelativeDateRange", - "description": "A relative date range, defined by an offset from today and a duration.\nInterpreted relative to Pacific time zone." - }, - "sellerNetworkIds": { - "items": { - "type": "integer", - "format": "int32" - }, - "type": "array", - "description": "The list of IDs of the seller (publisher) networks on which to filter;\nmay be empty. The filters represented by multiple seller network IDs are\nORed together (i.e. if non-empty, results must match any one of the\npublisher networks).\nSee [seller-network-ids](https://developers.google.com/ad-exchange/rtb/downloads/seller-network-ids)\nfile for the set of existing seller network IDs." - }, - "ownerAccountId": { - "type": "string", - "format": "int64", - "description": "The account ID of the buyer who owns this filter set.\nThe value of this field is ignored in create operations." - } - }, - "id": "FilterSet", - "description": "A set of filters that is applied to a request for data.\nWithin a filter set, an AND operation is performed across the filters\nrepresented by each field. An OR operation is performed across the filters\nrepresented by the multiple values of a repeated field. E.g.\n\"format=VIDEO AND deal_id=12 AND (seller_network_id=34 OR\nseller_network_id=56)\"" + "description": "Response message for listing all reasons that bid responses resulted in an\nerror.", + "type": "object" } }, "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, "protocol": "rest", "canonicalName": "AdExchangeBuyerII", @@ -3250,5 +1777,1478 @@ } } } - } + }, + "rootUrl": "https://adexchangebuyer.googleapis.com/", + "ownerDomain": "google.com", + "name": "adexchangebuyer2", + "batchPath": "batch", + "title": "Ad Exchange Buyer API II", + "ownerName": "Google", + "resources": { + "accounts": { + "resources": { + "clients": { + "methods": { + "create": { + "flatPath": "v2beta1/accounts/{accountId}/clients", + "path": "v2beta1/accounts/{accountId}/clients", + "id": "adexchangebuyer2.accounts.clients.create", + "description": "Creates a new client buyer.", + "request": { + "$ref": "Client" + }, + "httpMethod": "POST", + "parameterOrder": [ + "accountId" + ], + "response": { + "$ref": "Client" + }, + "parameters": { + "accountId": { + "format": "int64", + "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to create a client for. (required)", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + }, + "list": { + "flatPath": "v2beta1/accounts/{accountId}/clients", + "path": "v2beta1/accounts/{accountId}/clients", + "id": "adexchangebuyer2.accounts.clients.list", + "description": "Lists all the clients for the current sponsor buyer.", + "httpMethod": "GET", + "response": { + "$ref": "ListClientsResponse" + }, + "parameterOrder": [ + "accountId" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientsResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.list method.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "type": "string", + "required": true, + "location": "path", + "format": "int64", + "description": "Unique numerical account ID of the sponsor buyer to list the clients for." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + }, + "get": { + "description": "Gets a client buyer with a given client account ID.", + "response": { + "$ref": "Client" + }, + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "httpMethod": "GET", + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer to retrieve. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "id": "adexchangebuyer2.accounts.clients.get", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}" + }, + "update": { + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}", + "id": "adexchangebuyer2.accounts.clients.update", + "description": "Updates an existing client buyer.", + "request": { + "$ref": "Client" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "response": { + "$ref": "Client" + }, + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Unique numerical account ID for the buyer of which the client buyer\nis a customer; the sponsor buyer to update a client for. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "type": "string", + "required": true, + "location": "path", + "format": "int64", + "description": "Unique numerical account ID of the client to update. (required)" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + } + }, + "resources": { + "invitations": { + "methods": { + "list": { + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUserInvitationsResponse.nextPageToken\nreturned from the previous call to the\nclients.invitations.list\nmethod.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. Server may return fewer clients than requested.\nIf unspecified, server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "location": "path", + "description": "Numerical account ID of the client buyer to list invitations for.\n(required)\nYou must either specify a string representation of a\nnumerical account identifier or the `-` character\nto list all the invitations for all the clients\nof a given sponsor buyer.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "id": "adexchangebuyer2.accounts.clients.invitations.list", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "description": "Lists all the client users invitations for a client\nwith a given account ID.", + "response": { + "$ref": "ListClientUserInvitationsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "clientAccountId" + ] + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "ClientUserInvitation" + }, + "parameterOrder": [ + "accountId", + "clientAccountId", + "invitationId" + ], + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "invitationId": { + "location": "path", + "format": "int64", + "description": "Numerical identifier of the user invitation to retrieve. (required)", + "type": "string", + "required": true + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer that the user invitation\nto be retrieved is associated with. (required)", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations/{invitationId}", + "id": "adexchangebuyer2.accounts.clients.invitations.get", + "description": "Retrieves an existing client user invitation." + }, + "create": { + "response": { + "$ref": "ClientUserInvitation" + }, + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "httpMethod": "POST", + "parameters": { + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer that the user\nshould be associated with. (required)", + "type": "string", + "required": true + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "id": "adexchangebuyer2.accounts.clients.invitations.create", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/invitations", + "description": "Creates and sends out an email invitation to access\nan Ad Exchange client buyer account.", + "request": { + "$ref": "ClientUserInvitation" + } + } + } + }, + "users": { + "methods": { + "get": { + "response": { + "$ref": "ClientUser" + }, + "parameterOrder": [ + "accountId", + "clientAccountId", + "userId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "userId": { + "format": "int64", + "description": "Numerical identifier of the user to retrieve. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true + }, + "clientAccountId": { + "type": "string", + "required": true, + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer\nthat the user to be retrieved is associated with. (required)" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "id": "adexchangebuyer2.accounts.clients.users.get", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "description": "Retrieves an existing client user." + }, + "list": { + "description": "Lists all the known client users for a specified\nsponsor buyer account ID.", + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "clientAccountId" + ], + "response": { + "$ref": "ListClientUsersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListClientUsersResponse.nextPageToken\nreturned from the previous call to the\naccounts.clients.users.list method.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer clients than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "format": "int64", + "description": "Numerical account ID of the sponsor buyer of the client to list users for.\n(required)", + "type": "string", + "required": true, + "location": "path" + }, + "clientAccountId": { + "description": "The account ID of the client buyer to list users for. (required)\nYou must specify either a string representation of a\nnumerical account identifier or the `-` character\nto list all the client users for all the clients\nof a given sponsor buyer.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users", + "id": "adexchangebuyer2.accounts.clients.users.list" + }, + "update": { + "flatPath": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "path": "v2beta1/accounts/{accountId}/clients/{clientAccountId}/users/{userId}", + "id": "adexchangebuyer2.accounts.clients.users.update", + "description": "Updates an existing client user.\nOnly the user status can be changed on update.", + "request": { + "$ref": "ClientUser" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "accountId", + "clientAccountId", + "userId" + ], + "response": { + "$ref": "ClientUser" + }, + "parameters": { + "userId": { + "format": "int64", + "description": "Numerical identifier of the user to retrieve. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "accountId": { + "format": "int64", + "description": "Numerical account ID of the client's sponsor buyer. (required)", + "type": "string", + "required": true, + "location": "path" + }, + "clientAccountId": { + "location": "path", + "format": "int64", + "description": "Numerical account ID of the client buyer that the user to be retrieved\nis associated with. (required)", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + } + } + } + } + }, + "creatives": { + "methods": { + "list": { + "description": "Lists creatives.", + "response": { + "$ref": "ListCreativesResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer creatives than requested\n(due to timeout constraint) even if more are available via another call.\nIf unspecified, server will pick an appropriate default.\nAcceptable values are 1 to 1000, inclusive.", + "type": "integer" + }, + "accountId": { + "description": "The account to list the creatives from.\nSpecify \"-\" to list all creatives the current user has access to.", + "type": "string", + "required": true, + "location": "path" + }, + "query": { + "description": "An optional query string to filter creatives. If no filter is specified,\nall active creatives will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus: {approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eattribute: {a numeric attribute from the list of attributes}\n\u003cli\u003edisapprovalReason: {a reason from\nDisapprovalReason\n\u003c/ul\u003e\nExample: 'accountId=12345 AND (dealsStatus:disapproved AND\ndisapprovalReason:unacceptable_content) OR attribute:47'", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativesResponse.next_page_token\nreturned from the previous call to 'ListCreatives' method.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives", + "id": "adexchangebuyer2.accounts.creatives.list", + "path": "v2beta1/accounts/{accountId}/creatives" + }, + "create": { + "flatPath": "v2beta1/accounts/{accountId}/creatives", + "path": "v2beta1/accounts/{accountId}/creatives", + "id": "adexchangebuyer2.accounts.creatives.create", + "description": "Creates a creative.", + "request": { + "$ref": "Creative" + }, + "httpMethod": "POST", + "parameterOrder": [ + "accountId" + ], + "response": { + "$ref": "Creative" + }, + "parameters": { + "duplicateIdMode": { + "location": "query", + "enum": [ + "NO_DUPLICATES", + "FORCE_ENABLE_DUPLICATE_IDS" + ], + "description": "Indicates if multiple creatives can share an ID or not. Default is\nNO_DUPLICATES (one ID per creative).", + "type": "string" + }, + "accountId": { + "location": "path", + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ] + }, + "stopWatching": { + "httpMethod": "POST", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "accountId": { + "location": "path", + "description": "The account of the creative to stop notifications for.", + "type": "string", + "required": true + }, + "creativeId": { + "location": "path", + "description": "The creative ID of the creative to stop notifications for.\nSpecify \"-\" to specify stopping account level notifications.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:stopWatching", + "id": "adexchangebuyer2.accounts.creatives.stopWatching", + "description": "Stops watching a creative. Will stop push notifications being sent to the\ntopics when the creative changes status.", + "request": { + "$ref": "StopWatchingCreativeRequest" + } + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Creative" + }, + "parameters": { + "accountId": { + "location": "path", + "description": "The account the creative belongs to.", + "type": "string", + "required": true + }, + "creativeId": { + "location": "path", + "description": "The ID of the creative to retrieve.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "id": "adexchangebuyer2.accounts.creatives.get", + "description": "Gets a creative." + }, + "watch": { + "description": "Watches a creative. Will result in push notifications being sent to the\ntopic when the creative changes status.", + "request": { + "$ref": "WatchCreativeRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "accountId": { + "location": "path", + "description": "The account of the creative to watch.", + "type": "string", + "required": true + }, + "creativeId": { + "location": "path", + "description": "The creative ID to watch for status changes.\nSpecify \"-\" to watch all creatives under the above account.\nIf both creative-level and account-level notifications are\nsent, only a single notification will be sent to the\ncreative-level notification topic.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}:watch", + "id": "adexchangebuyer2.accounts.creatives.watch" + }, + "update": { + "request": { + "$ref": "Creative" + }, + "description": "Updates a creative.", + "httpMethod": "PUT", + "parameterOrder": [ + "accountId", + "creativeId" + ], + "response": { + "$ref": "Creative" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "description": "The account that this creative belongs to.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "required": true, + "location": "path" + }, + "creativeId": { + "location": "path", + "description": "The buyer-defined creative ID of this creative.\nCan be used to filter the response of the\ncreatives.list\nmethod.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}", + "id": "adexchangebuyer2.accounts.creatives.update" + } + }, + "resources": { + "dealAssociations": { + "methods": { + "remove": { + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "creativeId": { + "type": "string", + "required": true, + "location": "path", + "description": "The ID of the creative associated with the deal." + }, + "accountId": { + "description": "The account the creative belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.remove", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:remove", + "request": { + "$ref": "RemoveDealAssociationRequest" + }, + "description": "Remove the association between a deal and a creative.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "POST" + }, + "add": { + "description": "Associate an existing deal with a creative.", + "request": { + "$ref": "AddDealAssociationRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "POST", + "parameters": { + "accountId": { + "description": "The account the creative belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "creativeId": { + "description": "The ID of the creative associated with the deal.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.add", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations:add" + }, + "list": { + "parameterOrder": [ + "accountId", + "creativeId" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListDealAssociationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "type": "string", + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListDealAssociationsResponse.next_page_token\nreturned from the previous call to 'ListDealAssociations' method." + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. Server may return fewer associations than requested.\nIf unspecified, server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "description": "The account to list the associations from.\nSpecify \"-\" to list all creatives the current user has access to.", + "type": "string", + "required": true + }, + "query": { + "location": "query", + "description": "An optional query string to filter deal associations. If no filter is\nspecified, all associations will be returned.\nSupported queries are:\n\u003cul\u003e\n\u003cli\u003eaccountId=\u003ci\u003eaccount_id_string\u003c/i\u003e\n\u003cli\u003ecreativeId=\u003ci\u003ecreative_id_string\u003c/i\u003e\n\u003cli\u003edealsId=\u003ci\u003edeals_id_string\u003c/i\u003e\n\u003cli\u003edealsStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003cli\u003eopenAuctionStatus:{approved, conditionally_approved, disapproved,\n not_checked}\n\u003c/ul\u003e\nExample: 'dealsId=12345 AND dealsStatus:disapproved'", + "type": "string" + }, + "creativeId": { + "location": "path", + "description": "The creative ID to list the associations from.\nSpecify \"-\" to list all creatives under the above account.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", + "id": "adexchangebuyer2.accounts.creatives.dealAssociations.list", + "path": "v2beta1/accounts/{accountId}/creatives/{creativeId}/dealAssociations", + "description": "List all creative-deal associations." + } + } + } + } + }, + "filterSets": { + "methods": { + "delete": { + "description": "Deletes the requested filter set from the account with the given account\nID.", + "httpMethod": "DELETE", + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to delete.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", + "id": "adexchangebuyer2.accounts.filterSets.delete" + }, + "list": { + "description": "Lists all filter sets for the account with the given account ID.", + "response": { + "$ref": "ListFilterSetsResponse" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilterSetsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets", + "id": "adexchangebuyer2.accounts.filterSets.list", + "path": "v2beta1/accounts/{accountId}/filterSets" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "response": { + "$ref": "FilterSet" + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "type": "string", + "required": true, + "location": "path", + "format": "int64", + "description": "The ID of the filter set to get." + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}", + "id": "adexchangebuyer2.accounts.filterSets.get", + "description": "Retrieves the requested filter set for the account with the given account\nID." + }, + "create": { + "response": { + "$ref": "FilterSet" + }, + "parameterOrder": [ + "accountId" + ], + "httpMethod": "POST", + "parameters": { + "isTransient": { + "location": "query", + "description": "Whether the filter set is transient, or should be persisted indefinitely.\nBy default, filter sets are not transient.\nIf transient, it will be available for at least 1 hour after creation.", + "type": "boolean" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets", + "id": "adexchangebuyer2.accounts.filterSets.create", + "path": "v2beta1/accounts/{accountId}/filterSets", + "description": "Creates the specified filter set for the account with the given account ID.", + "request": { + "$ref": "FilterSet" + } + } + }, + "resources": { + "bidMetrics": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListBidMetricsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidMetrics.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidMetrics", + "id": "adexchangebuyer2.accounts.filterSets.bidMetrics.list", + "description": "Lists all metrics that are measured in terms of number of bids." + } + } + }, + "impressionMetrics": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListImpressionMetricsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListImpressionMetricsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.impressionMetrics.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/impressionMetrics", + "id": "adexchangebuyer2.accounts.filterSets.impressionMetrics.list", + "description": "Lists all metrics that are measured in terms of number of impressions." + } + } + }, + "bidResponseErrors": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListBidResponseErrorsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponseErrorsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponseErrors.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponseErrors", + "id": "adexchangebuyer2.accounts.filterSets.bidResponseErrors.list", + "description": "List all errors that occurred in bid responses, with the number of bid\nresponses affected for each reason." + } + } + }, + "bidResponsesWithoutBids": { + "methods": { + "list": { + "description": "List all reasons for which bid responses were considered to have no\napplicable bids, with the number of bid responses affected for each reason.", + "response": { + "$ref": "ListBidResponsesWithoutBidsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListBidResponsesWithoutBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.bidResponsesWithoutBids.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids", + "id": "adexchangebuyer2.accounts.filterSets.bidResponsesWithoutBids.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/bidResponsesWithoutBids" + } + } + }, + "filteredBidRequests": { + "methods": { + "list": { + "response": { + "$ref": "ListFilteredBidRequestsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidRequestsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBidRequests.list\nmethod.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "type": "string", + "required": true, + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests", + "id": "adexchangebuyer2.accounts.filterSets.filteredBidRequests.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBidRequests", + "description": "List all reasons that caused a bid request not to be sent for an\nimpression, with the number of bid requests not sent for each reason." + } + } + }, + "nonBillableWinningBids": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListNonBillableWinningBidsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "filterSetId": { + "type": "string", + "required": true, + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply." + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListNonBillableWinningBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.nonBillableWinningBids.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default." + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/nonBillableWinningBids", + "id": "adexchangebuyer2.accounts.filterSets.nonBillableWinningBids.list", + "description": "List all reasons for which winning bids were not billable, with the number\nof bids not billed for each reason." + } + } + }, + "filteredBids": { + "resources": { + "creatives": { + "methods": { + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListCreativeStatusBreakdownByCreativeResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId", + "creativeStatusId" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByCreativeResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.creatives.list\nmethod.", + "type": "string", + "location": "query" + }, + "creativeStatusId": { + "format": "int32", + "description": "The ID of the creative status for which to retrieve a breakdown by\ncreative.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).", + "type": "integer", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/creatives", + "id": "adexchangebuyer2.accounts.filterSets.filteredBids.creatives.list", + "description": "List all creatives associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each creative." + } + } + }, + "details": { + "methods": { + "list": { + "description": "List all details associated with a specific reason for which bids were\nfiltered, with the number of bids filtered for each detail.", + "response": { + "$ref": "ListCreativeStatusBreakdownByDetailResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId", + "creativeStatusId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListCreativeStatusBreakdownByDetailResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.details.list\nmethod.", + "type": "string" + }, + "creativeStatusId": { + "location": "path", + "format": "int32", + "description": "The ID of the creative status for which to retrieve a breakdown by detail.\nSee\n[creative-status-codes](https://developers.google.com/ad-exchange/rtb/downloads/creative-status-codes).\nDetails are only available for statuses 10, 14, 15, 17, 18, 19, 86, and 87.", + "type": "integer", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details", + "id": "adexchangebuyer2.accounts.filterSets.filteredBids.details.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids/{creativeStatusId}/details" + } + } + } + }, + "methods": { + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "response": { + "$ref": "ListFilteredBidsResponse" + }, + "parameters": { + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListFilteredBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.filteredBids.list\nmethod.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "accountId": { + "location": "path", + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true + }, + "filterSetId": { + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/filteredBids", + "id": "adexchangebuyer2.accounts.filterSets.filteredBids.list", + "description": "List all reasons for which bids were filtered, with the number of bids\nfiltered for each reason." + } + } + }, + "losingBids": { + "methods": { + "list": { + "id": "adexchangebuyer2.accounts.filterSets.losingBids.list", + "path": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids", + "description": "List all reasons for which bids lost in the auction, with the number of\nbids that lost for each reason.", + "response": { + "$ref": "ListLosingBidsResponse" + }, + "parameterOrder": [ + "accountId", + "filterSetId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/adexchange.buyer" + ], + "parameters": { + "pageToken": { + "description": "A token identifying a page of results the server should return.\nTypically, this is the value of\nListLosingBidsResponse.nextPageToken\nreturned from the previous call to the\naccounts.filterSets.losingBids.list\nmethod.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. The server may return fewer results than requested.\nIf unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "accountId": { + "format": "int64", + "description": "Account ID of the buyer.", + "type": "string", + "required": true, + "location": "path" + }, + "filterSetId": { + "location": "path", + "format": "int64", + "description": "The ID of the filter set to apply.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/accounts/{accountId}/filterSets/{filterSetId}/losingBids" + } + } + } + } + } + } + } + }, + "parameters": { + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + } + }, + "version": "v2beta1", + "baseUrl": "https://adexchangebuyer.googleapis.com/", + "servicePath": "", + "description": "Accesses the latest features for managing Ad Exchange accounts, Real-Time Bidding configurations and auction metrics, and Marketplace programmatic deals.", + "kind": "discovery#restDescription" } diff --git a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go index 0e47e0465..d7e27b2fe 100644 --- a/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go +++ b/vendor/google.golang.org/api/adexchangebuyer2/v2beta1/adexchangebuyer2-gen.go @@ -3126,22 +3126,7 @@ func (s *ServingRestriction) MarshalJSON() ([]byte, error) { type StopWatchingCreativeRequest struct { } -// TimeInterval: An interval of time, with an absolute start and -// end. -// This is included in the response, for several reasons: -// 1) The request may have specified start or end times relative to the -// time the -// request was sent; the response indicates the corresponding -// absolute time -// interval. -// 2) The request may have specified an end time past the latest time -// for which -// data was available (e.g. if requesting data for the today); the -// response -// indicates the latest time for which data was actually returned. -// 3) The response data for a single request may be broken down into -// multiple -// time intervals, if a time series was requested. +// TimeInterval: An interval of time, with an absolute start and end. type TimeInterval struct { // EndTime: The timestamp marking the end of the range (exclusive) for // which data is diff --git a/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json b/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json index 753b6f5d4..4bea68b59 100644 --- a/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json +++ b/vendor/google.golang.org/api/adexperiencereport/v1/adexperiencereport-api.json @@ -1,4 +1,120 @@ { + "schemas": { + "ViolatingSitesResponse": { + "description": "Response message for ListViolatingSites.", + "type": "object", + "properties": { + "violatingSites": { + "description": "A list of summaries of violating sites.", + "items": { + "$ref": "SiteSummaryResponse" + }, + "type": "array" + } + }, + "id": "ViolatingSitesResponse" + }, + "SiteSummaryResponse": { + "description": "Response message for GetSiteSummary.", + "type": "object", + "properties": { + "mobileSummary": { + "description": "Summary for the mobile review of the site.", + "$ref": "PlatformSummary" + }, + "reviewedSite": { + "description": "The name of the site reviewed.", + "type": "string" + }, + "desktopSummary": { + "description": "Summary for the desktop review of the site.", + "$ref": "PlatformSummary" + } + }, + "id": "SiteSummaryResponse" + }, + "PlatformSummary": { + "properties": { + "lastChangeTime": { + "format": "google-datetime", + "description": "The last time that the site changed status.", + "type": "string" + }, + "betterAdsStatus": { + "enum": [ + "UNKNOWN", + "PASSING", + "WARNING", + "FAILING" + ], + "description": "The status of the site reviewed for the Better Ads Standards.", + "type": "string", + "enumDescriptions": [ + "Not reviewed.", + "Passing.", + "Warning.", + "Failing." + ] + }, + "region": { + "enumDescriptions": [ + "Ad standard not yet defined for your region.", + "Region A.", + "Region B." + ], + "description": "The assigned regions for the site and platform.", + "items": { + "enum": [ + "REGION_UNKNOWN", + "REGION_A", + "REGION_B" + ], + "type": "string" + }, + "type": "array" + }, + "enforcementTime": { + "format": "google-datetime", + "description": "The date on which ad filtering begins.", + "type": "string" + }, + "filterStatus": { + "enumDescriptions": [ + "N/A.", + "Ad filtering is on.", + "Ad filtering is off.", + "Ad filtering is paused.", + "Ad filtering is pending." + ], + "enum": [ + "UNKNOWN", + "ON", + "OFF", + "PAUSED", + "PENDING" + ], + "description": "The ad filtering status of the site.", + "type": "string" + }, + "underReview": { + "description": "Whether the site is currently under review.", + "type": "boolean" + }, + "reportUrl": { + "description": "A link that leads to a full ad experience report.", + "type": "string" + } + }, + "id": "PlatformSummary", + "description": "Summary of the ad experience rating of a site for a specific platform.", + "type": "object" + } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, "canonicalName": "Ad Experience Report", "auth": { "oauth2": { @@ -16,17 +132,39 @@ "title": "Google Ad Experience Report API", "ownerName": "Google", "resources": { + "violatingSites": { + "methods": { + "list": { + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ViolatingSitesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ], + "parameters": {}, + "flatPath": "v1/violatingSites", + "path": "v1/violatingSites", + "id": "adexperiencereport.violatingSites.list", + "description": "Lists sites with Ad Experience Report statuses of \"Failing\" or \"Warning\"." + } + } + }, "sites": { "methods": { "get": { "description": "Gets a summary of the ad experience rating of a site.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], "response": { "$ref": "SiteSummaryResponse" }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/xapi.zoo" + ], "parameters": { "name": { "pattern": "^sites/[^/]+$", @@ -36,57 +174,14 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/xapi.zoo" - ], "flatPath": "v1/sites/{sitesId}", - "path": "v1/{+name}", - "id": "adexperiencereport.sites.get" - } - } - }, - "violatingSites": { - "methods": { - "list": { - "description": "Lists sites with Ad Experience Report statuses of \"Failing\" or \"Warning\".", - "response": { - "$ref": "ViolatingSitesResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/xapi.zoo" - ], - "flatPath": "v1/violatingSites", - "id": "adexperiencereport.violatingSites.list", - "path": "v1/violatingSites" + "id": "adexperiencereport.sites.get", + "path": "v1/{+name}" } } } }, "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", @@ -103,15 +198,15 @@ "type": "string" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "string", + "location": "query" }, "uploadType": { "location": "query", @@ -119,6 +214,8 @@ "type": "string" }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -127,9 +224,7 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" + ] }, "callback": { "description": "JSONP", @@ -151,6 +246,27 @@ "location": "query", "description": "Data format for response.", "default": "json" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" } }, "version": "v1", @@ -159,125 +275,9 @@ "description": "View Ad Experience Report data, and get a list of sites that have a significant number of annoying ads.", "servicePath": "", "basePath": "", - "revision": "20170918", - "documentationLink": "https://developers.google.com/ad-experience-report/", "id": "adexperiencereport:v1", + "documentationLink": "https://developers.google.com/ad-experience-report/", + "revision": "20170918", "discoveryVersion": "v1", - "version_module": true, - "schemas": { - "ViolatingSitesResponse": { - "properties": { - "violatingSites": { - "description": "A list of summaries of violating sites.", - "items": { - "$ref": "SiteSummaryResponse" - }, - "type": "array" - } - }, - "id": "ViolatingSitesResponse", - "description": "Response message for ListViolatingSites.", - "type": "object" - }, - "SiteSummaryResponse": { - "properties": { - "mobileSummary": { - "description": "Summary for the mobile review of the site.", - "$ref": "PlatformSummary" - }, - "reviewedSite": { - "description": "The name of the site reviewed.", - "type": "string" - }, - "desktopSummary": { - "$ref": "PlatformSummary", - "description": "Summary for the desktop review of the site." - } - }, - "id": "SiteSummaryResponse", - "description": "Response message for GetSiteSummary.", - "type": "object" - }, - "PlatformSummary": { - "description": "Summary of the ad experience rating of a site for a specific platform.", - "type": "object", - "properties": { - "lastChangeTime": { - "format": "google-datetime", - "description": "The last time that the site changed status.", - "type": "string" - }, - "betterAdsStatus": { - "enumDescriptions": [ - "Not reviewed.", - "Passing.", - "Warning.", - "Failing." - ], - "enum": [ - "UNKNOWN", - "PASSING", - "WARNING", - "FAILING" - ], - "description": "The status of the site reviewed for the Better Ads Standards.", - "type": "string" - }, - "enforcementTime": { - "format": "google-datetime", - "description": "The date on which ad filtering begins.", - "type": "string" - }, - "region": { - "description": "The assigned regions for the site and platform.", - "items": { - "enum": [ - "REGION_UNKNOWN", - "REGION_A", - "REGION_B" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "Ad standard not yet defined for your region.", - "Region A.", - "Region B." - ] - }, - "filterStatus": { - "description": "The ad filtering status of the site.", - "type": "string", - "enumDescriptions": [ - "N/A.", - "Ad filtering is on.", - "Ad filtering is off.", - "Ad filtering is paused.", - "Ad filtering is pending." - ], - "enum": [ - "UNKNOWN", - "ON", - "OFF", - "PAUSED", - "PENDING" - ] - }, - "underReview": { - "description": "Whether the site is currently under review.", - "type": "boolean" - }, - "reportUrl": { - "description": "A link that leads to a full ad experience report.", - "type": "string" - } - }, - "id": "PlatformSummary" - } - }, - "protocol": "rest", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - } + "version_module": true } diff --git a/vendor/google.golang.org/api/admin/directory/v1/admin-api.json b/vendor/google.golang.org/api/admin/directory/v1/admin-api.json index cdf0c5f12..33fcb8713 100644 --- a/vendor/google.golang.org/api/admin/directory/v1/admin-api.json +++ b/vendor/google.golang.org/api/admin/directory/v1/admin-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/O3yStPLO-_BtPqwnPm5OpyYaKQ4\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/JB19efQGH5f-JRT49yZz7BTyNQU\"", "discoveryVersion": "v1", "id": "admin:directory_v1", "name": "admin", "canonicalName": "directory", "version": "directory_v1", - "revision": "20170723", + "revision": "20170830", "title": "Admin Directory API", "description": "The Admin SDK Directory API lets you view and manage enterprise resources such as users and groups, administrative notifications, security features, and more.", "ownerDomain": "google.com", @@ -277,6 +277,10 @@ "type": "string", "description": "ETag of the resource." }, + "generatedResourceName": { + "type": "string", + "description": "The auto-generated name of the calendar resource which includes metadata about the resource such as building name, floor, capacity, etc. For example, NYC-2-Training Room 1A (16)" + }, "kind": { "type": "string", "description": "The type of the resource. For calendar resources, the value is admin#directory#resources#calendars#CalendarResource.", @@ -292,21 +296,11 @@ }, "resourceId": { "type": "string", - "description": "The unique ID for the calendar resource.", - "annotations": { - "required": [ - "directory.resources.calendars.insert" - ] - } + "description": "The unique ID for the calendar resource." }, "resourceName": { "type": "string", - "description": "The name of the calendar resource. For example, Training Room 1A", - "annotations": { - "required": [ - "directory.resources.calendars.insert" - ] - } + "description": "The name of the calendar resource. For example, Training Room 1A" }, "resourceType": { "type": "string", @@ -1843,6 +1837,9 @@ "externalIds": { "type": "any" }, + "gender": { + "type": "any" + }, "hashFunction": { "type": "string", "description": "Hash function name for password. Supported are MD5, SHA-1 and crypt" @@ -2113,6 +2110,24 @@ } } }, + "UserGender": { + "id": "UserGender", + "type": "object", + "properties": { + "addressMeAs": { + "type": "string", + "description": "AddressMeAs. A human-readable string containing the proper way to refer to the profile owner by humans, for example \"he/him/his\" or \"they/them/their\"." + }, + "customGender": { + "type": "string", + "description": "Custom gender." + }, + "type": { + "type": "string", + "description": "Gender." + } + } + }, "UserIm": { "id": "UserIm", "type": "object", @@ -2395,9 +2410,9 @@ "description": "The GECOS (user information) for this account." }, "gid": { - "type": "integer", + "type": "string", "description": "The default group ID.", - "format": "int32" + "format": "uint64" }, "homeDirectory": { "type": "string", @@ -2416,9 +2431,9 @@ "description": "System identifier for which account Username or Uid apply to." }, "uid": { - "type": "integer", + "type": "string", "description": "The POSIX compliant user ID.", - "format": "int32" + "format": "uint64" }, "username": { "type": "string", diff --git a/vendor/google.golang.org/api/admin/directory/v1/admin-gen.go b/vendor/google.golang.org/api/admin/directory/v1/admin-gen.go index 943d38a5a..142c017df 100644 --- a/vendor/google.golang.org/api/admin/directory/v1/admin-gen.go +++ b/vendor/google.golang.org/api/admin/directory/v1/admin-gen.go @@ -608,6 +608,11 @@ type CalendarResource struct { // Etags: ETag of the resource. Etags string `json:"etags,omitempty"` + // GeneratedResourceName: The auto-generated name of the calendar + // resource which includes metadata about the resource such as building + // name, floor, capacity, etc. For example, NYC-2-Training Room 1A (16) + GeneratedResourceName string `json:"generatedResourceName,omitempty"` + // Kind: The type of the resource. For calendar resources, the value is // admin#directory#resources#calendars#CalendarResource. Kind string `json:"kind,omitempty"` @@ -2649,6 +2654,8 @@ type User struct { ExternalIds interface{} `json:"externalIds,omitempty"` + Gender interface{} `json:"gender,omitempty"` + // HashFunction: Hash function name for password. Supported are MD5, // SHA-1 and crypt HashFunction string `json:"hashFunction,omitempty"` @@ -2942,6 +2949,41 @@ func (s *UserExternalId) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type UserGender struct { + // AddressMeAs: AddressMeAs. A human-readable string containing the + // proper way to refer to the profile owner by humans, for example + // "he/him/his" or "they/them/their". + AddressMeAs string `json:"addressMeAs,omitempty"` + + // CustomGender: Custom gender. + CustomGender string `json:"customGender,omitempty"` + + // Type: Gender. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AddressMeAs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddressMeAs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *UserGender) MarshalJSON() ([]byte, error) { + type noMethod UserGender + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // UserIm: JSON template for instant messenger of an user. type UserIm struct { // CustomProtocol: Custom protocol. @@ -3352,7 +3394,7 @@ type UserPosixAccount struct { Gecos string `json:"gecos,omitempty"` // Gid: The default group ID. - Gid int64 `json:"gid,omitempty"` + Gid uint64 `json:"gid,omitempty,string"` // HomeDirectory: The path to the home directory for this account. HomeDirectory string `json:"homeDirectory,omitempty"` @@ -3368,7 +3410,7 @@ type UserPosixAccount struct { SystemId string `json:"systemId,omitempty"` // Uid: The POSIX compliant user ID. - Uid int64 `json:"uid,omitempty"` + Uid uint64 `json:"uid,omitempty,string"` // Username: The username of the account. Username string `json:"username,omitempty"` diff --git a/vendor/google.golang.org/api/analytics/v3/analytics-api.json b/vendor/google.golang.org/api/analytics/v3/analytics-api.json index a5e3aecc3..dd5559ae3 100644 --- a/vendor/google.golang.org/api/analytics/v3/analytics-api.json +++ b/vendor/google.golang.org/api/analytics/v3/analytics-api.json @@ -20,7 +20,7 @@ "basePath": "/analytics/v3/", "rootUrl": "https://www.googleapis.com/", "servicePath": "analytics/v3/", - "batchPath": "batch", + "batchPath": "batch/analytics/v3", "parameters": { "alt": { "type": "string", diff --git a/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json b/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json index 334a12b1a..02dc7f212 100644 --- a/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json +++ b/vendor/google.golang.org/api/analyticsreporting/v4/analyticsreporting-api.json @@ -1,13 +1,12 @@ { - "canonicalName": "AnalyticsReporting", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/analytics.readonly": { - "description": "View your Google Analytics data" - }, "https://www.googleapis.com/auth/analytics": { "description": "View and manage your Google Analytics data" + }, + "https://www.googleapis.com/auth/analytics.readonly": { + "description": "View your Google Analytics data" } } } @@ -22,113 +21,113 @@ "reports": { "methods": { "batchGet": { - "path": "v4/reports:batchGet", - "id": "analyticsreporting.reports.batchGet", - "request": { - "$ref": "GetReportsRequest" - }, - "description": "Returns the Analytics data.", - "httpMethod": "POST", - "parameterOrder": [], "response": { "$ref": "GetReportsResponse" }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly" ], - "parameters": {}, - "flatPath": "v4/reports:batchGet" + "flatPath": "v4/reports:batchGet", + "id": "analyticsreporting.reports.batchGet", + "path": "v4/reports:batchGet", + "description": "Returns the Analytics data.", + "request": { + "$ref": "GetReportsRequest" + } } } } }, "parameters": { - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, "pp": { "location": "query", "description": "Pretty-print response.", "default": "true", "type": "boolean" }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "bearer_token": { "description": "OAuth bearer token.", "type": "string", "location": "query" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" } }, "version": "v4", @@ -137,19 +136,38 @@ "description": "Accesses Analytics report data.", "servicePath": "", "basePath": "", - "id": "analyticsreporting:v4", + "revision": "20170925", "documentationLink": "https://developers.google.com/analytics/devguides/reporting/core/v4/", - "revision": "20170705", + "id": "analyticsreporting:v4", "discoveryVersion": "v1", - "version_module": "True", + "version_module": true, "schemas": { + "PivotHeader": { + "properties": { + "pivotHeaderEntries": { + "description": "A single pivot section header.", + "items": { + "$ref": "PivotHeaderEntry" + }, + "type": "array" + }, + "totalPivotGroupsCount": { + "format": "int32", + "description": "The total number of groups for this pivot.", + "type": "integer" + } + }, + "id": "PivotHeader", + "description": "The headers for each of the pivot sections defined in the request.", + "type": "object" + }, "DateRange": { "description": "A contiguous set of days: startDate, startDate + 1 day, ..., endDate.\nThe start and end dates are specified in\n[ISO8601](https://en.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.", "type": "object", "properties": { "endDate": { - "description": "The end date for the query in the format `YYYY-MM-DD`.", - "type": "string" + "type": "string", + "description": "The end date for the query in the format `YYYY-MM-DD`." }, "startDate": { "description": "The start date for the query in the format `YYYY-MM-DD`.", @@ -158,45 +176,32 @@ }, "id": "DateRange" }, - "MetricFilter": { + "ReportRequest": { + "description": "The main request class which specifies the Reporting API request.", + "type": "object", "properties": { - "operator": { - "enumDescriptions": [ - "If the operator is not specified, it is treated as `EQUAL`.", - "Should the value of the metric be exactly equal to the comparison value.", - "Should the value of the metric be less than to the comparison value.", - "Should the value of the metric be greater than to the comparison value.", - "Validates if the metric is missing.\nDoesn't take comparisonValue into account." - ], - "enum": [ - "OPERATOR_UNSPECIFIED", - "EQUAL", - "LESS_THAN", - "GREATER_THAN", - "IS_MISSING" - ], - "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_MISSING`, checks if the metric is missing and would ignore the\ncomparisonValue.", + "dateRanges": { + "description": "Date ranges in the request. The request can have a maximum of 2 date\nranges. The response will contain a set of metric values for each\ncombination of the dimensions for each date range in the request. So, if\nthere are two date ranges, there will be two set of metric values, one for\nthe original date range and one for the second date range.\nThe `reportRequest.dateRanges` field should not be specified for cohorts\nor Lifetime value requests.\nIf a date range is not provided, the default date range is (startDate:\ncurrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `dateRanges` definition.", + "items": { + "$ref": "DateRange" + }, + "type": "array" + }, + "pageToken": { + "description": "A continuation token to get the next page of the results. Adding this to\nthe request will return the rows after the pageToken. The pageToken should\nbe the value returned in the nextPageToken parameter in the response to\nthe GetReports request.", "type": "string" }, - "not": { - "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\nmetric values will be excluded in the report. The default is false.", + "pivots": { + "description": "The pivot definitions. Requests can have a maximum of 2 pivots.", + "items": { + "$ref": "Pivot" + }, + "type": "array" + }, + "includeEmptyRows": { + "description": "If set to false, the response does not include rows if all the retrieved\nmetrics are equal to zero. The default is false which will exclude these\nrows.", "type": "boolean" }, - "metricName": { - "description": "The metric that will be filtered on. A metricFilter must contain a metric\nname. A metric name can be an alias earlier defined as a metric or it can\nalso be a metric expression.", - "type": "string" - }, - "comparisonValue": { - "description": "The value to compare against.", - "type": "string" - } - }, - "id": "MetricFilter", - "description": "MetricFilter specifies the filter on a metric.", - "type": "object" - }, - "ReportRequest": { - "properties": { "metricFilterClauses": { "description": "The metric filter clauses. They are logically combined with the `AND`\noperator. Metric filters look at only the first date range and not the\ncomparing date range. Note that filtering on metrics occurs after the\nmetrics are aggregated.", "items": { @@ -209,21 +214,21 @@ "description": "Page size is for paging and specifies the maximum number of returned rows.\nPage size should be \u003e= 0. A query returns the default of 1,000 rows.\nThe Analytics Core Reporting API returns a maximum of 10,000 rows per\nrequest, no matter how many you ask for. It can also return fewer rows\nthan requested, if there aren't as many dimension segments as you expect.\nFor instance, there are fewer than 300 possible values for `ga:country`,\nso when segmenting only by country, you can't get more than 300 rows,\neven if you set `pageSize` to a higher value.", "type": "integer" }, - "hideTotals": { - "description": "If set to true, hides the total of all metrics for all the matching rows,\nfor every date range. The default false and will return the totals.", - "type": "boolean" - }, "hideValueRanges": { "description": "If set to true, hides the minimum and maximum across all matching rows.\nThe default is false and the value ranges are returned.", "type": "boolean" }, - "cohortGroup": { - "$ref": "CohortGroup", - "description": "Cohort group associated with this request. If there is a cohort group\nin the request the `ga:cohort` dimension must be present.\nEvery [ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `cohortGroup` definition." + "hideTotals": { + "description": "If set to true, hides the total of all metrics for all the matching rows,\nfor every date range. The default false and will return the totals.", + "type": "boolean" }, "filtersExpression": { - "description": "Dimension or metric filters that restrict the data returned for your\nrequest. To use the `filtersExpression`, supply a dimension or metric on\nwhich to filter, followed by the filter expression. For example, the\nfollowing expression selects `ga:browser` dimension which starts with\nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric filters, see\n[Filters reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters).", - "type": "string" + "type": "string", + "description": "Dimension or metric filters that restrict the data returned for your\nrequest. To use the `filtersExpression`, supply a dimension or metric on\nwhich to filter, followed by the filter expression. For example, the\nfollowing expression selects `ga:browser` dimension which starts with\nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric filters, see\n[Filters reference](https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters)." + }, + "cohortGroup": { + "description": "Cohort group associated with this request. If there is a cohort group\nin the request the `ga:cohort` dimension must be present.\nEvery [ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `cohortGroup` definition.", + "$ref": "CohortGroup" }, "viewId": { "description": "The Analytics\n[view ID](https://support.google.com/analytics/answer/1009618)\nfrom which to retrieve data. Every [ReportRequest](#ReportRequest)\nwithin a `batchGet` method must contain the same `viewId`.", @@ -279,38 +284,56 @@ "$ref": "Dimension" }, "type": "array" - }, - "dateRanges": { - "description": "Date ranges in the request. The request can have a maximum of 2 date\nranges. The response will contain a set of metric values for each\ncombination of the dimensions for each date range in the request. So, if\nthere are two date ranges, there will be two set of metric values, one for\nthe original date range and one for the second date range.\nThe `reportRequest.dateRanges` field should not be specified for cohorts\nor Lifetime value requests.\nIf a date range is not provided, the default date range is (startDate:\ncurrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#ReportRequest) within a `batchGet` method must\ncontain the same `dateRanges` definition.", - "items": { - "$ref": "DateRange" - }, - "type": "array" - }, - "pageToken": { - "description": "A continuation token to get the next page of the results. Adding this to\nthe request will return the rows after the pageToken. The pageToken should\nbe the value returned in the nextPageToken parameter in the response to\nthe GetReports request.", - "type": "string" - }, - "pivots": { - "description": "The pivot definitions. Requests can have a maximum of 2 pivots.", - "items": { - "$ref": "Pivot" - }, - "type": "array" - }, - "includeEmptyRows": { - "description": "If set to false, the response does not include rows if all the retrieved\nmetrics are equal to zero. The default is false which will exclude these\nrows.", - "type": "boolean" } }, - "id": "ReportRequest", - "description": "The main request class which specifies the Reporting API request.", + "id": "ReportRequest" + }, + "MetricFilter": { + "properties": { + "comparisonValue": { + "description": "The value to compare against.", + "type": "string" + }, + "operator": { + "enumDescriptions": [ + "If the operator is not specified, it is treated as `EQUAL`.", + "Should the value of the metric be exactly equal to the comparison value.", + "Should the value of the metric be less than to the comparison value.", + "Should the value of the metric be greater than to the comparison value.", + "Validates if the metric is missing.\nDoesn't take comparisonValue into account." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "EQUAL", + "LESS_THAN", + "GREATER_THAN", + "IS_MISSING" + ], + "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREATER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_MISSING`, checks if the metric is missing and would ignore the\ncomparisonValue.", + "type": "string" + }, + "not": { + "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\nmetric values will be excluded in the report. The default is false.", + "type": "boolean" + }, + "metricName": { + "description": "The metric that will be filtered on. A metricFilter must contain a metric\nname. A metric name can be an alias earlier defined as a metric or it can\nalso be a metric expression.", + "type": "string" + } + }, + "id": "MetricFilter", + "description": "MetricFilter specifies the filter on a metric.", "type": "object" }, "Dimension": { + "id": "Dimension", "description": "[Dimensions](https://support.google.com/analytics/answer/1033861)\nare attributes of your data. For example, the dimension `ga:city`\nindicates the city, for example, \"Paris\" or \"New York\", from which\na session originates.", "type": "object", "properties": { + "name": { + "description": "Name of the dimension to fetch, for example `ga:browser`.", + "type": "string" + }, "histogramBuckets": { "description": "If non-empty, we place dimension values into buckets after string to\nint64. Dimension values that are not the string representation of an\nintegral value will be converted to zero. The bucket values have to be in\nincreasing order. Each bucket is closed on the lower end, and open on the\nupper end. The \"first\" bucket includes all values less than the first\nboundary, the \"last\" bucket includes all values up to infinity. Dimension\nvalues that fall in a bucket get transformed to a new dimension value. For\nexample, if one gives a list of \"0, 1, 3, 4, 7\", then we return the\nfollowing buckets:\n\n- bucket #1: values \u003c 0, dimension value \"\u003c0\"\n- bucket #2: values in [0,1), dimension value \"0\"\n- bucket #3: values in [1,3), dimension value \"1-2\"\n- bucket #4: values in [3,4), dimension value \"3\"\n- bucket #5: values in [4,7), dimension value \"4-6\"\n- bucket #6: values \u003e= 7, dimension value \"7+\"\n\nNOTE: If you are applying histogram mutation on any dimension, and using\nthat dimension in sort, you will want to use the sort type\n`HISTOGRAM_BUCKET` for that purpose. Without that the dimension values\nwill be sorted according to dictionary\n(lexicographic) order. For example the ascending dictionary order is:\n\n \"\u003c50\", \"1001+\", \"121-1000\", \"50-120\"\n\nAnd the ascending `HISTOGRAM_BUCKET` order is:\n\n \"\u003c50\", \"50-120\", \"121-1000\", \"1001+\"\n\nThe client has to explicitly request `\"orderType\": \"HISTOGRAM_BUCKET\"`\nfor a histogram-mutated dimension.", "items": { @@ -318,21 +341,16 @@ "type": "string" }, "type": "array" - }, - "name": { - "description": "Name of the dimension to fetch, for example `ga:browser`.", - "type": "string" } - }, - "id": "Dimension" + } }, "DynamicSegment": { "description": "Dynamic segment definition for defining the segment within the request.\nA segment can select users, sessions or both.", "type": "object", "properties": { "sessionSegment": { - "description": "Session Segment to select sessions to include in the segment.", - "$ref": "SegmentDefinition" + "$ref": "SegmentDefinition", + "description": "Session Segment to select sessions to include in the segment." }, "name": { "description": "The name of the dynamic segment.", @@ -346,6 +364,9 @@ "id": "DynamicSegment" }, "SimpleSegment": { + "id": "SimpleSegment", + "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined.", + "type": "object", "properties": { "orFiltersForSegment": { "description": "A list of segment filters groups which are combined with logical `AND`\noperator.", @@ -354,48 +375,73 @@ }, "type": "array" } - }, - "id": "SimpleSegment", - "description": "A Simple segment conditions consist of one or more dimension/metric\nconditions that can be combined.", - "type": "object" + } }, "ColumnHeader": { + "description": "Column headers.", + "type": "object", "properties": { "dimensions": { - "description": "The dimension names in the response.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "The dimension names in the response." }, "metricHeader": { - "$ref": "MetricHeader", - "description": "Metric headers for the metrics in the response." + "description": "Metric headers for the metrics in the response.", + "$ref": "MetricHeader" } }, - "id": "ColumnHeader", - "description": "Column headers.", - "type": "object" + "id": "ColumnHeader" }, "SegmentFilterClause": { "description": "Filter Clause to be used in a segment definition, can be wither a metric or\na dimension filter.", "type": "object", "properties": { - "metricFilter": { - "description": "Metric Filter for the segment definition.", - "$ref": "SegmentMetricFilter" - }, "not": { "description": "Matches the complement (`!`) of the filter.", "type": "boolean" }, "dimensionFilter": { - "description": "Dimension Filter for the segment definition.", - "$ref": "SegmentDimensionFilter" + "$ref": "SegmentDimensionFilter", + "description": "Dimension Filter for the segment definition." + }, + "metricFilter": { + "description": "Metric Filter for the segment definition.", + "$ref": "SegmentMetricFilter" } }, "id": "SegmentFilterClause" }, + "MetricFilterClause": { + "id": "MetricFilterClause", + "description": "Represents a group of metric filters.\nSet the operator value to specify how the filters are logically combined.", + "type": "object", + "properties": { + "filters": { + "description": "The repeated set of filters. They are logically combined based on the\noperator specified.", + "items": { + "$ref": "MetricFilter" + }, + "type": "array" + }, + "operator": { + "enumDescriptions": [ + "Unspecified operator. It is treated as an `OR`.", + "The logical `OR` operator.", + "The logical `AND` operator." + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "OR", + "AND" + ], + "description": "The operator for combining multiple metric filters. If unspecified, it is\ntreated as an `OR`.", + "type": "string" + } + } + }, "Cohort": { "description": "Defines a cohort. A cohort is a group of users who share a common\ncharacteristic. For example, all users with the same acquisition date\nbelong to the same cohort.", "type": "object", @@ -423,37 +469,7 @@ }, "id": "Cohort" }, - "MetricFilterClause": { - "description": "Represents a group of metric filters.\nSet the operator value to specify how the filters are logically combined.", - "type": "object", - "properties": { - "filters": { - "description": "The repeated set of filters. They are logically combined based on the\noperator specified.", - "items": { - "$ref": "MetricFilter" - }, - "type": "array" - }, - "operator": { - "enumDescriptions": [ - "Unspecified operator. It is treated as an `OR`.", - "The logical `OR` operator.", - "The logical `AND` operator." - ], - "enum": [ - "OPERATOR_UNSPECIFIED", - "OR", - "AND" - ], - "description": "The operator for combining multiple metric filters. If unspecified, it is\ntreated as an `OR`.", - "type": "string" - } - }, - "id": "MetricFilterClause" - }, "ReportRow": { - "description": "A row in the report.", - "type": "object", "properties": { "metrics": { "description": "List of metrics for each requested DateRange.", @@ -470,9 +486,13 @@ "type": "array" } }, - "id": "ReportRow" + "id": "ReportRow", + "description": "A row in the report.", + "type": "object" }, "OrFiltersForSegment": { + "description": "A list of segment filters in the `OR` group are combined with the logical OR\noperator.", + "type": "object", "properties": { "segmentFilterClauses": { "description": "List of segment filters to be combined with a `OR` operator.", @@ -482,32 +502,32 @@ "type": "array" } }, - "id": "OrFiltersForSegment", - "description": "A list of segment filters in the `OR` group are combined with the logical OR\noperator.", - "type": "object" + "id": "OrFiltersForSegment" }, "MetricHeader": { "description": "The headers for the metrics.", "type": "object", "properties": { - "pivotHeaders": { - "description": "Headers for the pivots in the response.", - "items": { - "$ref": "PivotHeader" - }, - "type": "array" - }, "metricHeaderEntries": { "description": "Headers for the metrics in the response.", "items": { "$ref": "MetricHeaderEntry" }, "type": "array" + }, + "pivotHeaders": { + "description": "Headers for the pivots in the response.", + "items": { + "$ref": "PivotHeader" + }, + "type": "array" } }, "id": "MetricHeader" }, "DimensionFilterClause": { + "description": "A group of dimension filters. Set the operator value to specify how\nthe filters are logically combined.", + "type": "object", "properties": { "filters": { "description": "The repeated set of filters. They are logically combined based on the\noperator specified.", @@ -531,11 +551,10 @@ "type": "string" } }, - "id": "DimensionFilterClause", - "description": "A group of dimension filters. Set the operator value to specify how\nthe filters are logically combined.", - "type": "object" + "id": "DimensionFilterClause" }, "GetReportsResponse": { + "id": "GetReportsResponse", "description": "The main response class which holds the reports from the Reporting API\n`batchGet` call.", "type": "object", "properties": { @@ -546,23 +565,22 @@ }, "type": "array" } - }, - "id": "GetReportsResponse" + } }, "SequenceSegment": { "description": "Sequence conditions consist of one or more steps, where each step is defined\nby one or more dimension/metric conditions. Multiple steps can be combined\nwith special sequence operators.", "type": "object", "properties": { - "firstStepShouldMatchFirstHit": { - "description": "If set, first step condition must match the first hit of the visitor (in\nthe date range).", - "type": "boolean" - }, "segmentSequenceSteps": { - "description": "The list of steps in the sequence.", "items": { "$ref": "SegmentSequenceStep" }, - "type": "array" + "type": "array", + "description": "The list of steps in the sequence." + }, + "firstStepShouldMatchFirstHit": { + "description": "If set, first step condition must match the first hit of the visitor (in\nthe date range).", + "type": "boolean" } }, "id": "SequenceSegment" @@ -571,7 +589,38 @@ "description": "Metric filter to be used in a segment filter clause.", "type": "object", "properties": { + "metricName": { + "description": "The metric that will be filtered on. A `metricFilter` must contain a\nmetric name.", + "type": "string" + }, + "scope": { + "description": "Scope for a metric defines the level at which that metric is defined. The\nspecified metric scope must be equal to or greater than its primary scope\nas defined in the data model. The primary scope is defined by if the\nsegment is selecting users or sessions.", + "type": "string", + "enumDescriptions": [ + "If the scope is unspecified, it defaults to the condition scope,\n`USER` or `SESSION` depending on if the segment is trying to choose\nusers or sessions.", + "Product scope.", + "Hit scope.", + "Session scope.", + "User scope." + ], + "enum": [ + "UNSPECIFIED_SCOPE", + "PRODUCT", + "HIT", + "SESSION", + "USER" + ] + }, + "maxComparisonValue": { + "type": "string", + "description": "Max comparison value is only used for `BETWEEN` operator." + }, + "comparisonValue": { + "description": "The value to compare against. If the operator is `BETWEEN`, this value is\ntreated as minimum comparison value.", + "type": "string" + }, "operator": { + "type": "string", "enumDescriptions": [ "Unspecified operator is treated as `LESS_THAN` operator.", "Checks if the metric value is less than comparison value.", @@ -586,44 +635,12 @@ "EQUAL", "BETWEEN" ], - "description": "Specifies is the operation to perform to compare the metric. The default\nis `EQUAL`.", - "type": "string" - }, - "metricName": { - "description": "The metric that will be filtered on. A `metricFilter` must contain a\nmetric name.", - "type": "string" - }, - "scope": { - "enumDescriptions": [ - "If the scope is unspecified, it defaults to the condition scope,\n`USER` or `SESSION` depending on if the segment is trying to choose\nusers or sessions.", - "Product scope.", - "Hit scope.", - "Session scope.", - "User scope." - ], - "enum": [ - "UNSPECIFIED_SCOPE", - "PRODUCT", - "HIT", - "SESSION", - "USER" - ], - "description": "Scope for a metric defines the level at which that metric is defined. The\nspecified metric scope must be equal to or greater than its primary scope\nas defined in the data model. The primary scope is defined by if the\nsegment is selecting users or sessions.", - "type": "string" - }, - "maxComparisonValue": { - "description": "Max comparison value is only used for `BETWEEN` operator.", - "type": "string" - }, - "comparisonValue": { - "description": "The value to compare against. If the operator is `BETWEEN`, this value is\ntreated as minimum comparison value.", - "type": "string" + "description": "Specifies is the operation to perform to compare the metric. The default\nis `EQUAL`." } }, "id": "SegmentMetricFilter" }, "DateRangeValues": { - "description": "Used to return a list of metrics for a single DateRange / dimension\ncombination", "type": "object", "properties": { "values": { @@ -641,25 +658,26 @@ "type": "array" } }, - "id": "DateRangeValues" + "id": "DateRangeValues", + "description": "Used to return a list of metrics for a single DateRange / dimension\ncombination" }, "CohortGroup": { + "description": "Defines a cohort group.\nFor example:\n\n \"cohortGroup\": {\n \"cohorts\": [{\n \"name\": \"cohort 1\",\n \"type\": \"FIRST_VISIT_DATE\",\n \"dateRange\": { \"startDate\": \"2015-08-01\", \"endDate\": \"2015-08-01\" }\n },{\n \"name\": \"cohort 2\"\n \"type\": \"FIRST_VISIT_DATE\"\n \"dateRange\": { \"startDate\": \"2015-07-01\", \"endDate\": \"2015-07-01\" }\n }]\n }", + "type": "object", "properties": { + "lifetimeValue": { + "description": "Enable Life Time Value (LTV). LTV measures lifetime value for users\nacquired through different channels.\nPlease see:\n[Cohort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifetime Value](https://support.google.com/analytics/answer/6182550)\nIf the value of lifetimeValue is false:\n\n- The metric values are similar to the values in the web interface cohort\n report.\n- The cohort definition date ranges must be aligned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in\n the cohort definition should be a Sunday and the `endDate` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDate`\n should be the 1st of the month and `endDate` should be the last day\n of the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will correspond to the values in the web interface\n LifeTime value report.\n- The Lifetime Value report shows you how user value (Revenue) and\n engagement (Appviews, Goal Completions, Sessions, and Session Duration)\n grow during the 90 days after a user is acquired.\n- The metrics are calculated as a cumulative average per user per the time\n increment.\n- The cohort definition date ranges need not be aligned to the calendar\n week and month boundaries.\n- The `viewId` must be an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)", + "type": "boolean" + }, "cohorts": { "description": "The definition for the cohort.", "items": { "$ref": "Cohort" }, "type": "array" - }, - "lifetimeValue": { - "description": "Enable Life Time Value (LTV). LTV measures lifetime value for users\nacquired through different channels.\nPlease see:\n[Cohort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifetime Value](https://support.google.com/analytics/answer/6182550)\nIf the value of lifetimeValue is false:\n\n- The metric values are similar to the values in the web interface cohort\n report.\n- The cohort definition date ranges must be aligned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in\n the cohort definition should be a Sunday and the `endDate` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDate`\n should be the 1st of the month and `endDate` should be the last day\n of the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will correspond to the values in the web interface\n LifeTime value report.\n- The Lifetime Value report shows you how user value (Revenue) and\n engagement (Appviews, Goal Completions, Sessions, and Session Duration)\n grow during the 90 days after a user is acquired.\n- The metrics are calculated as a cumulative average per user per the time\n increment.\n- The cohort definition date ranges need not be aligned to the calendar\n week and month boundaries.\n- The `viewId` must be an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)", - "type": "boolean" } }, - "id": "CohortGroup", - "description": "Defines a cohort group.\nFor example:\n\n \"cohortGroup\": {\n \"cohorts\": [{\n \"name\": \"cohort 1\",\n \"type\": \"FIRST_VISIT_DATE\",\n \"dateRange\": { \"startDate\": \"2015-08-01\", \"endDate\": \"2015-08-01\" }\n },{\n \"name\": \"cohort 2\"\n \"type\": \"FIRST_VISIT_DATE\"\n \"dateRange\": { \"startDate\": \"2015-07-01\", \"endDate\": \"2015-07-01\" }\n }]\n }", - "type": "object" + "id": "CohortGroup" }, "GetReportsRequest": { "description": "The batch request containing multiple report request.", @@ -679,6 +697,11 @@ "description": "The Pivot describes the pivot section in the request.\nThe Pivot helps rearrange the information in the table for certain reports\nby pivoting your data on a second dimension.", "type": "object", "properties": { + "maxGroupCount": { + "format": "int32", + "description": "Specifies the maximum number of groups to return.\nThe default value is 10, also the maximum value is 1,000.", + "type": "integer" + }, "startGroup": { "format": "int32", "description": "If k metrics were requested, then the response will contain some\ndata-dependent multiple of k columns in the report. E.g., if you pivoted\non the dimension `ga:browser` then you'd get k columns for \"Firefox\", k\ncolumns for \"IE\", k columns for \"Chrome\", etc. The ordering of the groups\nof columns is determined by descending order of \"total\" for the first of\nthe k values. Ties are broken by lexicographic ordering of the first\npivot dimension, then lexicographic ordering of the second pivot\ndimension, and so on. E.g., if the totals for the first value for\nFirefox, IE, and Chrome were 8, 2, 8, respectively, the order of columns\nwould be Chrome, Firefox, IE.\n\nThe following let you choose which of the groups of k columns are\nincluded in the response.", @@ -704,11 +727,6 @@ "$ref": "Dimension" }, "type": "array" - }, - "maxGroupCount": { - "format": "int32", - "description": "Specifies the maximum number of groups to return.\nThe default value is 10, also the maximum value is 1,000.", - "type": "integer" } }, "id": "Pivot" @@ -717,19 +735,19 @@ "description": "The headers for the each of the metric column corresponding to the metrics\nrequested in the pivots section of the response.", "type": "object", "properties": { - "dimensionValues": { - "description": "The values for the dimensions in the pivot.", + "metric": { + "$ref": "MetricHeaderEntry", + "description": "The metric header for the metric in the pivot." + }, + "dimensionNames": { + "description": "The name of the dimensions in the pivot response.", "items": { "type": "string" }, "type": "array" }, - "metric": { - "description": "The metric header for the metric in the pivot.", - "$ref": "MetricHeaderEntry" - }, - "dimensionNames": { - "description": "The name of the dimensions in the pivot response.", + "dimensionValues": { + "description": "The values for the dimensions in the pivot.", "items": { "type": "string" }, @@ -739,10 +757,12 @@ "id": "PivotHeaderEntry" }, "SegmentFilter": { + "description": "SegmentFilter defines the segment to be either a simple or a sequence\nsegment. A simple segment condition contains dimension and metric conditions\nto select the sessions or users. A sequence segment condition can be used to\nselect users or sessions based on sequential conditions.", + "type": "object", "properties": { "not": { - "description": "If true, match the complement of simple or sequence segment.\nFor example, to match all visits not from \"New York\", we can define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segmentFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegment\": [{\n \"segmentFilterClauses\":[{\n \"dimensionFilter\": {\n \"dimensionName\": \"ga:city\",\n \"expressions\": [\"New York\"]\n }\n }]\n }]\n },\n \"not\": \"True\"\n }]\n },", - "type": "boolean" + "type": "boolean", + "description": "If true, match the complement of simple or sequence segment.\nFor example, to match all visits not from \"New York\", we can define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segmentFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegment\": [{\n \"segmentFilterClauses\":[{\n \"dimensionFilter\": {\n \"dimensionName\": \"ga:city\",\n \"expressions\": [\"New York\"]\n }\n }]\n }]\n },\n \"not\": \"True\"\n }]\n }," }, "simpleSegment": { "$ref": "SimpleSegment", @@ -753,9 +773,7 @@ "$ref": "SequenceSegment" } }, - "id": "SegmentFilter", - "description": "SegmentFilter defines the segment to be either a simple or a sequence\nsegment. A simple segment condition contains dimension and metric conditions\nto select the sessions or users. A sequence segment condition can be used to\nselect users or sessions based on sequential conditions.", - "type": "object" + "id": "SegmentFilter" }, "SegmentDefinition": { "description": "SegmentDefinition defines the segment to be a set of SegmentFilters which\nare combined together with a logical `AND` operation.", @@ -806,6 +824,14 @@ "description": "The data part of the report.", "type": "object", "properties": { + "samplesReadCounts": { + "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of samples read, one entry per date range.\nIf the results are not sampled this field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + }, "rowCount": { "format": "int32", "description": "Total number of matching rows for this query.", @@ -823,9 +849,9 @@ "type": "boolean" }, "dataLastRefreshed": { + "type": "string", "format": "google-datetime", - "description": "The last time the data in the report was refreshed. All the hits received\nbefore this timestamp are included in the calculation of the report.", - "type": "string" + "description": "The last time the data in the report was refreshed. All the hits received\nbefore this timestamp are included in the calculation of the report." }, "maximums": { "description": "Minimum and maximum values seen over all matching rows. These are both\nempty when `hideValueRanges` in the request is false, or when\nrowCount is zero.", @@ -855,38 +881,28 @@ "$ref": "DateRangeValues" }, "type": "array" - }, - "samplesReadCounts": { - "description": "If the results are\n[sampled](https://support.google.com/analytics/answer/2637192),\nthis returns the total number of samples read, one entry per date range.\nIf the results are not sampled this field will not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sampling)\nfor details.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" } }, "id": "ReportData" }, "DimensionFilter": { "properties": { + "expressions": { + "description": "Strings or regular expression to match against. Only the first value of\nthe list is used for comparison unless the operator is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter the\ndimensions as explained in the description of the `IN_LIST` operator.", + "items": { + "type": "string" + }, + "type": "array" + }, + "not": { + "type": "boolean", + "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\ndimension values will be excluded in the report. The default is false." + }, "caseSensitive": { "description": "Should the match be case sensitive? Default is false.", "type": "boolean" }, "operator": { - "enum": [ - "OPERATOR_UNSPECIFIED", - "REGEXP", - "BEGINS_WITH", - "ENDS_WITH", - "PARTIAL", - "EXACT", - "NUMERIC_EQUAL", - "NUMERIC_GREATER_THAN", - "NUMERIC_LESS_THAN", - "IN_LIST" - ], - "description": "How to match the dimension to the expression. The default is REGEXP.", "type": "string", "enumDescriptions": [ "If the match type is unspecified, it is treated as a `REGEXP`.", @@ -899,22 +915,24 @@ "Checks if the dimension is numerically greater than the match\nexpression. Read the description for `NUMERIC_EQUALS` for restrictions.", "Checks if the dimension is numerically less than the match expression.\nRead the description for `NUMERIC_EQUALS` for restrictions.", "This option is used to specify a dimension filter whose expression can\ntake any value from a selected list of values. This helps avoiding\nevaluating multiple exact match dimension filters which are OR'ed for\nevery single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\nAny response row whose dimension has it is value as A, B or C, matches\nthis DimensionFilter." - ] + ], + "enum": [ + "OPERATOR_UNSPECIFIED", + "REGEXP", + "BEGINS_WITH", + "ENDS_WITH", + "PARTIAL", + "EXACT", + "NUMERIC_EQUAL", + "NUMERIC_GREATER_THAN", + "NUMERIC_LESS_THAN", + "IN_LIST" + ], + "description": "How to match the dimension to the expression. The default is REGEXP." }, "dimensionName": { "description": "The dimension to filter on. A DimensionFilter must contain a dimension.", "type": "string" - }, - "expressions": { - "description": "Strings or regular expression to match against. Only the first value of\nthe list is used for comparison unless the operator is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter the\ndimensions as explained in the description of the `IN_LIST` operator.", - "items": { - "type": "string" - }, - "type": "array" - }, - "not": { - "description": "Logical `NOT` operator. If this boolean is set to true, then the matching\ndimension values will be excluded in the report. The default is false.", - "type": "boolean" } }, "id": "DimensionFilter", @@ -936,60 +954,12 @@ }, "id": "Segment" }, - "OrderBy": { - "properties": { - "orderType": { - "enum": [ - "ORDER_TYPE_UNSPECIFIED", - "VALUE", - "DELTA", - "SMART", - "HISTOGRAM_BUCKET", - "DIMENSION_AS_INTEGER" - ], - "description": "The order type. The default orderType is `VALUE`.", - "type": "string", - "enumDescriptions": [ - "Unspecified order type will be treated as sort based on value.", - "The sort order is based on the value of the chosen column; looks only at\nthe first date range.", - "The sort order is based on the difference of the values of the chosen\ncolumn between the first two date ranges. Usable only if there are\nexactly two date ranges.", - "The sort order is based on weighted value of the chosen column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe `(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios.", - "Histogram order type is applicable only to dimension columns with\nnon-empty histogram-buckets.", - "If the dimensions are fixed length numbers, ordinary sort would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions are\nvariable length numbers." - ] - }, - "fieldName": { - "description": "The field which to sort by. The default sort order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify one field for sort here. For example,\n`ga:browser, ga:city` is not valid.", - "type": "string" - }, - "sortOrder": { - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "description": "The sorting order for the field.", - "type": "string", - "enumDescriptions": [ - "If the sort order is unspecified, the default is ascending.", - "Ascending sort. The field will be sorted in an ascending manner.", - "Descending sort. The field will be sorted in a descending manner." - ] - } - }, - "id": "OrderBy", - "description": "Specifies the sorting options.", - "type": "object" - }, "SegmentDimensionFilter": { + "type": "object", "properties": { - "caseSensitive": { - "description": "Should the match be case sensitive, ignored for `IN_LIST` operator.", - "type": "boolean" - }, "minComparisonValue": { - "description": "Minimum comparison values for `BETWEEN` match type.", - "type": "string" + "type": "string", + "description": "Minimum comparison values for `BETWEEN` match type." }, "maxComparisonValue": { "description": "Maximum comparison values for `BETWEEN` match type.", @@ -1000,6 +970,8 @@ "type": "string" }, "operator": { + "description": "The operator to use to match the dimension with the expressions.", + "type": "string", "enumDescriptions": [ "If the match type is unspecified, it is treated as a REGEXP.", "The match expression is treated as a regular expression. All other match\ntypes are not treated as regular expressions.", @@ -1023,9 +995,7 @@ "NUMERIC_LESS_THAN", "NUMERIC_GREATER_THAN", "NUMERIC_BETWEEN" - ], - "description": "The operator to use to match the dimension with the expressions.", - "type": "string" + ] }, "expressions": { "description": "The list of expressions, only the first element is used for all operators", @@ -1033,13 +1003,62 @@ "type": "string" }, "type": "array" + }, + "caseSensitive": { + "description": "Should the match be case sensitive, ignored for `IN_LIST` operator.", + "type": "boolean" } }, "id": "SegmentDimensionFilter", - "description": "Dimension filter specifies the filtering options on a dimension.", - "type": "object" + "description": "Dimension filter specifies the filtering options on a dimension." + }, + "OrderBy": { + "description": "Specifies the sorting options.", + "type": "object", + "properties": { + "sortOrder": { + "description": "The sorting order for the field.", + "type": "string", + "enumDescriptions": [ + "If the sort order is unspecified, the default is ascending.", + "Ascending sort. The field will be sorted in an ascending manner.", + "Descending sort. The field will be sorted in a descending manner." + ], + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ] + }, + "orderType": { + "enumDescriptions": [ + "Unspecified order type will be treated as sort based on value.", + "The sort order is based on the value of the chosen column; looks only at\nthe first date range.", + "The sort order is based on the difference of the values of the chosen\ncolumn between the first two date ranges. Usable only if there are\nexactly two date ranges.", + "The sort order is based on weighted value of the chosen column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe `(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios.", + "Histogram order type is applicable only to dimension columns with\nnon-empty histogram-buckets.", + "If the dimensions are fixed length numbers, ordinary sort would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions are\nvariable length numbers." + ], + "enum": [ + "ORDER_TYPE_UNSPECIFIED", + "VALUE", + "DELTA", + "SMART", + "HISTOGRAM_BUCKET", + "DIMENSION_AS_INTEGER" + ], + "description": "The order type. The default orderType is `VALUE`.", + "type": "string" + }, + "fieldName": { + "description": "The field which to sort by. The default sort order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify one field for sort here. For example,\n`ga:browser, ga:city` is not valid.", + "type": "string" + } + }, + "id": "OrderBy" }, "SegmentSequenceStep": { + "type": "object", "properties": { "orFiltersForSegment": { "description": "A sequence is specified with a list of Or grouped filters which are\ncombined with `AND` operator.", @@ -1049,6 +1068,8 @@ "type": "array" }, "matchType": { + "description": "Specifies if the step immediately precedes or can be any time before the\nnext step.", + "type": "string", "enumDescriptions": [ "Unspecified match type is treated as precedes.", "Operator indicates that the previous step precedes the next step.", @@ -1058,26 +1079,21 @@ "UNSPECIFIED_MATCH_TYPE", "PRECEDES", "IMMEDIATELY_PRECEDES" - ], - "description": "Specifies if the step immediately precedes or can be any time before the\nnext step.", - "type": "string" + ] } }, "id": "SegmentSequenceStep", - "description": "A segment sequence definition.", - "type": "object" + "description": "A segment sequence definition." }, "Metric": { + "description": "[Metrics](https://support.google.com/analytics/answer/1033861)\nare the quantitative measurements. For example, the metric `ga:users`\nindicates the total number of users for the requested time period.", + "type": "object", "properties": { + "expression": { + "description": "A metric expression in the request. An expression is constructed from one\nor more metrics and numbers. Accepted operators include: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the\nmetric expression is just a single metric name like `ga:users`.\nAdding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpected results.", + "type": "string" + }, "formattingType": { - "enumDescriptions": [ - "Metric type is unspecified.", - "Integer metric.", - "Float metric.", - "Currency metric.", - "Percentage metric.", - "Time metric in `HH:MM:SS` format." - ], "enum": [ "METRIC_TYPE_UNSPECIFIED", "INTEGER", @@ -1087,20 +1103,22 @@ "TIME" ], "description": "Specifies how the metric expression should be formatted, for example\n`INTEGER`.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Metric type is unspecified.", + "Integer metric.", + "Float metric.", + "Currency metric.", + "Percentage metric.", + "Time metric in `HH:MM:SS` format." + ] }, "alias": { "description": "An alias for the metric expression is an alternate name for the\nexpression. The alias can be used for filtering and sorting. This field\nis optional and is useful if the expression is not a single metric but\na complex expression which cannot be used in filtering and sorting.\nThe alias is also used in the response column header.", "type": "string" - }, - "expression": { - "description": "A metric expression in the request. An expression is constructed from one\nor more metrics and numbers. Accepted operators include: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by (*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases the\nmetric expression is just a single metric name like `ga:users`.\nAdding mixed `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpected results.", - "type": "string" } }, - "id": "Metric", - "description": "[Metrics](https://support.google.com/analytics/answer/1033861)\nare the quantitative measurements. For example, the metric `ga:users`\nindicates the total number of users for the requested time period.", - "type": "object" + "id": "Metric" }, "PivotValueRegion": { "description": "The metric values in the pivot region.", @@ -1120,44 +1138,26 @@ "description": "The data response corresponding to the request.", "type": "object", "properties": { + "columnHeader": { + "$ref": "ColumnHeader", + "description": "The column headers." + }, "nextPageToken": { "description": "Page token to retrieve the next page of results in the list.", "type": "string" }, "data": { - "$ref": "ReportData", - "description": "Response data." - }, - "columnHeader": { - "description": "The column headers.", - "$ref": "ColumnHeader" + "description": "Response data.", + "$ref": "ReportData" } }, "id": "Report" - }, - "PivotHeader": { - "properties": { - "pivotHeaderEntries": { - "description": "A single pivot section header.", - "items": { - "$ref": "PivotHeaderEntry" - }, - "type": "array" - }, - "totalPivotGroupsCount": { - "format": "int32", - "description": "The total number of groups for this pivot.", - "type": "integer" - } - }, - "id": "PivotHeader", - "description": "The headers for each of the pivot sections defined in the request.", - "type": "object" } }, - "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" - } + }, + "protocol": "rest", + "canonicalName": "AnalyticsReporting" } diff --git a/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index 1d1a75025..a725a2b4b 100644 --- a/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/vendor/google.golang.org/api/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -1,163 +1,54 @@ { - "canonicalName": "Android Provisioning Partner", - "kind": "discovery#restDescription", - "description": "Automates reseller integration into zero-touch enrollment by assigning devices to customers and creating device reports.", - "servicePath": "", - "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "androiddeviceprovisioning", "batchPath": "batch", "id": "androiddeviceprovisioning:v1", "documentationLink": "https://developers.google.com/zero-touch/", - "revision": "20170920", + "revision": "20170923", "title": "Android Device Provisioning Partner API", "ownerName": "Google", "discoveryVersion": "v1", "version_module": true, "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^operations/.+$" + } + }, + "flatPath": "v1/operations/{operationsId}", + "path": "v1/{+name}", + "id": "androiddeviceprovisioning.operations.get" + } + } + }, "partners": { "resources": { "devices": { "methods": { - "updateMetadataAsync": { - "request": { - "$ref": "UpdateDeviceMetadataInBatchRequest" - }, - "description": "Set metadata in batch asynchronously.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "partnerId" - ], - "httpMethod": "POST", - "parameters": { - "partnerId": { - "location": "path", - "description": "Partner ID.", - "pattern": "^[^/]+$", - "format": "int64", - "type": "string", - "required": true - } - }, - "flatPath": "v1/partners/{partnersId}/devices:updateMetadataAsync", - "path": "v1/partners/{+partnerId}/devices:updateMetadataAsync", - "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync" - }, - "get": { - "id": "androiddeviceprovisioning.partners.devices.get", - "path": "v1/{+name}", - "description": "Get a device.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Device" - }, - "parameters": { - "name": { - "description": "Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", - "required": true, - "type": "string", - "pattern": "^partners/[^/]+/devices/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/partners/{partnersId}/devices/{devicesId}" - }, - "unclaim": { - "flatPath": "v1/partners/{partnersId}/devices:unclaim", - "path": "v1/partners/{+partnerId}/devices:unclaim", - "id": "androiddeviceprovisioning.partners.devices.unclaim", - "request": { - "$ref": "UnclaimDeviceRequest" - }, - "description": "Unclaim the device identified by the `device_id` or the `deviceIdentifier`.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "partnerId" - ], - "httpMethod": "POST", - "parameters": { - "partnerId": { - "format": "int64", - "required": true, - "type": "string", - "location": "path", - "description": "ID of the partner.", - "pattern": "^[^/]+$" - } - } - }, - "findByOwner": { - "description": "Find devices by ownership.", - "request": { - "$ref": "FindDevicesByOwnerRequest" - }, - "response": { - "$ref": "FindDevicesByOwnerResponse" - }, - "parameterOrder": [ - "partnerId" - ], - "httpMethod": "POST", - "parameters": { - "partnerId": { - "location": "path", - "description": "ID of the partner.", - "pattern": "^[^/]+$", - "format": "int64", - "required": true, - "type": "string" - } - }, - "flatPath": "v1/partners/{partnersId}/devices:findByOwner", - "path": "v1/partners/{+partnerId}/devices:findByOwner", - "id": "androiddeviceprovisioning.partners.devices.findByOwner" - }, - "claim": { - "response": { - "$ref": "ClaimDeviceResponse" - }, - "parameterOrder": [ - "partnerId" - ], - "httpMethod": "POST", - "parameters": { - "partnerId": { - "format": "int64", - "type": "string", - "required": true, - "location": "path", - "description": "ID of the partner.", - "pattern": "^[^/]+$" - } - }, - "flatPath": "v1/partners/{partnersId}/devices:claim", - "path": "v1/partners/{+partnerId}/devices:claim", - "id": "androiddeviceprovisioning.partners.devices.claim", - "request": { - "$ref": "ClaimDeviceRequest" - }, - "description": "Claim the device identified by device identifier." - }, "claimAsync": { - "request": { - "$ref": "ClaimDevicesRequest" - }, - "description": "Claim devices asynchronously.", - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "partnerId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, "parameters": { "partnerId": { "location": "path", @@ -169,34 +60,38 @@ } }, "flatPath": "v1/partners/{partnersId}/devices:claimAsync", + "id": "androiddeviceprovisioning.partners.devices.claimAsync", "path": "v1/partners/{+partnerId}/devices:claimAsync", - "id": "androiddeviceprovisioning.partners.devices.claimAsync" + "request": { + "$ref": "ClaimDevicesRequest" + }, + "description": "Claim devices asynchronously." }, "findByIdentifier": { - "description": "Find devices by device identifier.", "request": { "$ref": "FindDevicesByDeviceIdentifierRequest" }, - "response": { - "$ref": "FindDevicesByDeviceIdentifierResponse" - }, + "description": "Find devices by device identifier.", + "httpMethod": "POST", "parameterOrder": [ "partnerId" ], - "httpMethod": "POST", + "response": { + "$ref": "FindDevicesByDeviceIdentifierResponse" + }, "parameters": { "partnerId": { "format": "int64", - "type": "string", "required": true, + "type": "string", "location": "path", "description": "ID of the partner.", "pattern": "^[^/]+$" } }, "flatPath": "v1/partners/{partnersId}/devices:findByIdentifier", - "path": "v1/partners/{+partnerId}/devices:findByIdentifier", - "id": "androiddeviceprovisioning.partners.devices.findByIdentifier" + "id": "androiddeviceprovisioning.partners.devices.findByIdentifier", + "path": "v1/partners/{+partnerId}/devices:findByIdentifier" }, "unclaimAsync": { "response": { @@ -208,12 +103,12 @@ "httpMethod": "POST", "parameters": { "partnerId": { - "location": "path", - "description": "Partner ID.", - "pattern": "^[^/]+$", "format": "int64", "required": true, - "type": "string" + "type": "string", + "location": "path", + "description": "Partner ID.", + "pattern": "^[^/]+$" } }, "flatPath": "v1/partners/{partnersId}/devices:unclaimAsync", @@ -225,44 +120,193 @@ } }, "metadata": { - "path": "v1/partners/{+metadataOwnerId}/devices/{+deviceId}/metadata", - "id": "androiddeviceprovisioning.partners.devices.metadata", - "request": { - "$ref": "UpdateDeviceMetadataRequest" - }, - "description": "Update the metadata.", - "response": { - "$ref": "DeviceMetadata" - }, + "httpMethod": "POST", "parameterOrder": [ "metadataOwnerId", "deviceId" ], - "httpMethod": "POST", + "response": { + "$ref": "DeviceMetadata" + }, "parameters": { + "metadataOwnerId": { + "format": "int64", + "type": "string", + "required": true, + "location": "path", + "description": "The owner of the newly set metadata. Set this to the partner ID.", + "pattern": "^[^/]+$" + }, "deviceId": { + "location": "path", + "description": "ID of the partner.", + "pattern": "^[^/]+$", + "format": "int64", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata", + "id": "androiddeviceprovisioning.partners.devices.metadata", + "path": "v1/partners/{+metadataOwnerId}/devices/{+deviceId}/metadata", + "request": { + "$ref": "UpdateDeviceMetadataRequest" + }, + "description": "Update the metadata." + }, + "updateMetadataAsync": { + "request": { + "$ref": "UpdateDeviceMetadataInBatchRequest" + }, + "description": "Set metadata in batch asynchronously.", + "httpMethod": "POST", + "parameterOrder": [ + "partnerId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "partnerId": { + "description": "Partner ID.", + "pattern": "^[^/]+$", + "format": "int64", + "required": true, + "type": "string", + "location": "path" + } + }, + "flatPath": "v1/partners/{partnersId}/devices:updateMetadataAsync", + "id": "androiddeviceprovisioning.partners.devices.updateMetadataAsync", + "path": "v1/partners/{+partnerId}/devices:updateMetadataAsync" + }, + "get": { + "description": "Get a device.", + "httpMethod": "GET", + "response": { + "$ref": "Device" + }, + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name in `partners/[PARTNER_ID]/devices/[DEVICE_ID]`.", + "required": true, + "type": "string", + "pattern": "^partners/[^/]+/devices/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/partners/{partnersId}/devices/{devicesId}", + "id": "androiddeviceprovisioning.partners.devices.get", + "path": "v1/{+name}" + }, + "unclaim": { + "httpMethod": "POST", + "parameterOrder": [ + "partnerId" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "partnerId": { "format": "int64", "required": true, "type": "string", "location": "path", "description": "ID of the partner.", "pattern": "^[^/]+$" - }, - "metadataOwnerId": { - "pattern": "^[^/]+$", - "format": "int64", - "type": "string", - "required": true, - "location": "path", - "description": "The owner of the newly set metadata. Set this to the partner ID." } }, - "flatPath": "v1/partners/{partnersId}/devices/{devicesId}/metadata" + "flatPath": "v1/partners/{partnersId}/devices:unclaim", + "id": "androiddeviceprovisioning.partners.devices.unclaim", + "path": "v1/partners/{+partnerId}/devices:unclaim", + "request": { + "$ref": "UnclaimDeviceRequest" + }, + "description": "Unclaim the device identified by the `device_id` or the `deviceIdentifier`." + }, + "findByOwner": { + "request": { + "$ref": "FindDevicesByOwnerRequest" + }, + "description": "Find devices by ownership.", + "response": { + "$ref": "FindDevicesByOwnerResponse" + }, + "parameterOrder": [ + "partnerId" + ], + "httpMethod": "POST", + "parameters": { + "partnerId": { + "format": "int64", + "required": true, + "type": "string", + "location": "path", + "description": "ID of the partner.", + "pattern": "^[^/]+$" + } + }, + "flatPath": "v1/partners/{partnersId}/devices:findByOwner", + "path": "v1/partners/{+partnerId}/devices:findByOwner", + "id": "androiddeviceprovisioning.partners.devices.findByOwner" + }, + "claim": { + "request": { + "$ref": "ClaimDeviceRequest" + }, + "description": "Claim the device identified by device identifier.", + "httpMethod": "POST", + "parameterOrder": [ + "partnerId" + ], + "response": { + "$ref": "ClaimDeviceResponse" + }, + "parameters": { + "partnerId": { + "location": "path", + "description": "ID of the partner.", + "pattern": "^[^/]+$", + "format": "int64", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/partners/{partnersId}/devices:claim", + "id": "androiddeviceprovisioning.partners.devices.claim", + "path": "v1/partners/{+partnerId}/devices:claim" } } }, "customers": { "methods": { + "list": { + "description": "Lists the customers that are enrolled to the reseller identified by the\n`partnerId` argument. This list includes customers that the reseller\ncreated and customers that enrolled themselves using the portal.", + "response": { + "$ref": "ListCustomersResponse" + }, + "parameterOrder": [ + "partnerId" + ], + "httpMethod": "GET", + "parameters": { + "partnerId": { + "format": "int64", + "type": "string", + "required": true, + "location": "path", + "description": "The ID of the partner.", + "pattern": "^[^/]+$" + } + }, + "flatPath": "v1/partners/{partnersId}/customers", + "path": "v1/partners/{+partnerId}/customers", + "id": "androiddeviceprovisioning.partners.customers.list" + }, "create": { "response": { "$ref": "Company" @@ -287,102 +331,47 @@ "$ref": "CreateCustomerRequest" }, "description": "Creates a customer for zero-touch enrollment. After the method returns\nsuccessfully, admin and owner roles can manage devices and EMM configs\nby calling API methods or using their zero-touch enrollment portal. The API\ndoesn't notify the customer that they have access." - }, - "list": { - "response": { - "$ref": "ListCustomersResponse" - }, - "parameterOrder": [ - "partnerId" - ], - "httpMethod": "GET", - "parameters": { - "partnerId": { - "pattern": "^[^/]+$", - "format": "int64", - "required": true, - "type": "string", - "location": "path", - "description": "The ID of the partner." - } - }, - "flatPath": "v1/partners/{partnersId}/customers", - "path": "v1/partners/{+partnerId}/customers", - "id": "androiddeviceprovisioning.partners.customers.list", - "description": "Lists the customers that are enrolled to the reseller identified by the\n`partnerId` argument. This list includes customers that the reseller\ncreated and customers that enrolled themselves using the portal." } } } } - }, - "operations": { - "methods": { - "get": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "pattern": "^operations/.+$", - "location": "path", - "description": "The name of the operation resource.", - "required": true, - "type": "string" - } - }, - "flatPath": "v1/operations/{operationsId}", - "path": "v1/{+name}", - "id": "androiddeviceprovisioning.operations.get", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - } - } } }, "parameters": { - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "type": "boolean", - "default": "true" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, "bearer_token": { "description": "OAuth bearer token.", "type": "string", "location": "query" }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, "prettyPrint": { - "location": "query", "description": "Returns response with indentations and line breaks.", "type": "boolean", - "default": "true" + "default": "true", + "location": "query" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "uploadType": { + "callback": { "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "description": "JSONP", "type": "string" }, "$.xgafv": { @@ -398,12 +387,8 @@ "2" ] }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, "alt": { + "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -416,8 +401,7 @@ "json", "media", "proto" - ], - "type": "string" + ] }, "access_token": { "description": "OAuth access token.", @@ -425,12 +409,57 @@ "location": "query" }, "key": { - "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "type": "boolean", + "default": "true", + "location": "query" } }, "schemas": { + "Company": { + "description": "A customer resource in the zero-touch enrollment API.", + "type": "object", + "properties": { + "companyId": { + "description": "Output only. The ID of the company. Assigned by the server.", + "format": "int64", + "type": "string" + }, + "companyName": { + "description": "Required. The name of the company. For example _XYZ Corp_. Characters\nallowed are: Latin letters, numerals, hyphens, and spaces. Displayed to the\ncustomer's employees in the zero-touch enrollment portal.", + "type": "string" + }, + "name": { + "description": "Output only. The API resource name of the company in the format\n`partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`. Assigned by the server.", + "type": "string" + }, + "adminEmails": { + "description": "Input only. Optional. Email address of customer's users in the admin role.\nEach email address must be associated with a Google Account.", + "type": "array", + "items": { + "type": "string" + } + }, + "ownerEmails": { + "description": "Input only. Email address of customer's users in the owner role. At least\none `owner_email` is required. Each email address must be associated with a\nGoogle Account. Owners share the same access as admins but can also add,\ndelete, and edit your organization's portal users.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "id": "Company" + }, "UpdateDeviceMetadataRequest": { "description": "Request to set metadata for a device.", "type": "object", @@ -451,15 +480,15 @@ "$ref": "DeviceIdentifier" }, "sectionType": { - "enum": [ - "SECTION_TYPE_UNSPECIFIED", - "SECTION_TYPE_ZERO_TOUCH" - ], "description": "Section type to unclaim.", "type": "string", "enumDescriptions": [ "Unspecified section type.", "Zero touch section type." + ], + "enum": [ + "SECTION_TYPE_UNSPECIFIED", + "SECTION_TYPE_ZERO_TOUCH" ] }, "deviceId": { @@ -480,16 +509,16 @@ "description": "Response containing found devices.", "type": "object", "properties": { - "nextPageToken": { - "description": "Page token of the next page.", - "type": "string" - }, "devices": { "description": "Found devices.", "type": "array", "items": { "$ref": "Device" } + }, + "nextPageToken": { + "description": "Page token of the next page.", + "type": "string" } }, "id": "FindDevicesByDeviceIdentifierResponse" @@ -498,18 +527,13 @@ "description": "Identifies one claim request.", "type": "object", "properties": { - "customerId": { - "description": "Customer ID to claim for.", - "format": "int64", - "type": "string" - }, "deviceIdentifier": { - "description": "Device identifier of the device.", - "$ref": "DeviceIdentifier" + "$ref": "DeviceIdentifier", + "description": "Device identifier of the device." }, "deviceMetadata": { - "$ref": "DeviceMetadata", - "description": "Metadata to set at claim." + "description": "Metadata to set at claim.", + "$ref": "DeviceMetadata" }, "sectionType": { "enumDescriptions": [ @@ -522,6 +546,11 @@ ], "description": "Section type to claim.", "type": "string" + }, + "customerId": { + "description": "Customer ID to claim for.", + "format": "int64", + "type": "string" } }, "id": "PartnerClaim" @@ -530,18 +559,11 @@ "description": "Request message to unclaim a device.", "type": "object", "properties": { - "deviceId": { - "description": "The device ID returned by `ClaimDevice`.", - "format": "int64", - "type": "string" - }, "deviceIdentifier": { - "description": "The device identifier you used when you claimed this device.", - "$ref": "DeviceIdentifier" + "$ref": "DeviceIdentifier", + "description": "The device identifier you used when you claimed this device." }, "sectionType": { - "description": "The section type to unclaim for.", - "type": "string", "enumDescriptions": [ "Unspecified section type.", "Zero touch section type." @@ -549,26 +571,35 @@ "enum": [ "SECTION_TYPE_UNSPECIFIED", "SECTION_TYPE_ZERO_TOUCH" - ] + ], + "description": "The section type to unclaim for.", + "type": "string" + }, + "deviceId": { + "description": "The device ID returned by `ClaimDevice`.", + "format": "int64", + "type": "string" } }, "id": "UnclaimDeviceRequest" }, "DeviceMetadata": { + "description": "A key-value pair of the device metadata.", + "type": "object", "properties": { "entries": { + "description": "Metadata entries", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "Metadata entries", - "type": "object" + } } }, - "id": "DeviceMetadata", - "description": "A key-value pair of the device metadata.", - "type": "object" + "id": "DeviceMetadata" }, "DevicesLongRunningOperationResponse": { + "description": "Long running operation response.", + "type": "object", "properties": { "successCount": { "description": "Number of succeesfully processed ones.", @@ -583,15 +614,20 @@ } } }, - "id": "DevicesLongRunningOperationResponse", - "description": "Long running operation response.", - "type": "object" + "id": "DevicesLongRunningOperationResponse" }, "DeviceClaim": { "description": "Information about a device claimed for a partner.", "type": "object", "properties": { + "ownerCompanyId": { + "description": "Owner ID.", + "format": "int64", + "type": "string" + }, "sectionType": { + "description": "Section type of the device claim.", + "type": "string", "enumDescriptions": [ "Unspecified section type.", "Zero touch section type." @@ -599,14 +635,7 @@ "enum": [ "SECTION_TYPE_UNSPECIFIED", "SECTION_TYPE_ZERO_TOUCH" - ], - "description": "Section type of the device claim.", - "type": "string" - }, - "ownerCompanyId": { - "description": "Owner ID.", - "format": "int64", - "type": "string" + ] } }, "id": "DeviceClaim" @@ -615,12 +644,18 @@ "description": "Stores the processing result for each device.", "type": "object", "properties": { + "errorMessage": { + "description": "Error message.", + "type": "string" + }, "deviceId": { "description": "Device ID of the device if process succeeds.", "format": "int64", "type": "string" }, "status": { + "description": "Process result.", + "type": "string", "enumDescriptions": [ "Invalid code. Shouldn't be used.", "Unknown error.\nWe don't expect this error to occur here.", @@ -640,17 +675,11 @@ "SINGLE_DEVICE_STATUS_INVALID_DEVICE_IDENTIFIER", "SINGLE_DEVICE_STATUS_INVALID_SECTION_TYPE", "SINGLE_DEVICE_STATUS_SECTION_NOT_YOURS" - ], - "description": "Process result.", - "type": "string" + ] }, "errorIdentifier": { "description": "Error identifier.", "type": "string" - }, - "errorMessage": { - "description": "Error message.", - "type": "string" } }, "id": "PerDeviceStatusInBatch" @@ -669,6 +698,8 @@ "type": "string" }, "sectionType": { + "description": "The section type.", + "type": "string", "enumDescriptions": [ "Unspecified section type.", "Zero touch section type." @@ -676,9 +707,7 @@ "enum": [ "SECTION_TYPE_UNSPECIFIED", "SECTION_TYPE_ZERO_TOUCH" - ], - "description": "The section type.", - "type": "string" + ] }, "customerId": { "description": "List of customer IDs to search for.", @@ -709,6 +738,10 @@ "description": "Identifies a unique device.", "type": "object", "properties": { + "imei": { + "description": "IMEI number.", + "type": "string" + }, "meid": { "description": "MEID number.", "type": "string" @@ -720,10 +753,6 @@ "serialNumber": { "description": "Serial number (optional).", "type": "string" - }, - "imei": { - "description": "IMEI number.", - "type": "string" } }, "id": "DeviceIdentifier" @@ -737,12 +766,12 @@ "type": "boolean" }, "response": { - "description": "This field will contain a `DevicesLongRunningOperationResponse` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - } + }, + "description": "This field will contain a `DevicesLongRunningOperationResponse` object if the operation is created by `claimAsync`, `unclaimAsync`, or `updateMetadataAsync`.", + "type": "object" }, "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", @@ -781,17 +810,6 @@ "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, "code": { "description": "The status code, which should be an enum value of google.rpc.Code.", "format": "int32", @@ -800,6 +818,17 @@ "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } } }, "id": "Status" @@ -808,6 +837,11 @@ "description": "Request to find devices.", "type": "object", "properties": { + "limit": { + "description": "Number of devices to show.", + "format": "int64", + "type": "string" + }, "deviceIdentifier": { "description": "The device identifier to search.", "$ref": "DeviceIdentifier" @@ -815,17 +849,22 @@ "pageToken": { "description": "Page token.", "type": "string" - }, - "limit": { - "description": "Number of devices to show.", - "format": "int64", - "type": "string" } }, "id": "FindDevicesByDeviceIdentifierRequest" }, "OperationPerDevice": { + "description": "Operation the server received for every device.", + "type": "object", "properties": { + "unclaim": { + "description": "Request to unclaim a device.", + "$ref": "PartnerUnclaim" + }, + "result": { + "$ref": "PerDeviceStatusInBatch", + "description": "Processing result for every device." + }, "claim": { "$ref": "PartnerClaim", "description": "Request to claim a device." @@ -833,66 +872,28 @@ "updateMetadata": { "$ref": "UpdateMetadataArguments", "description": "Request to set metadata for a device." - }, - "unclaim": { - "description": "Request to unclaim a device.", - "$ref": "PartnerUnclaim" - }, - "result": { - "description": "Processing result for every device.", - "$ref": "PerDeviceStatusInBatch" } }, - "id": "OperationPerDevice", - "description": "Operation the server received for every device.", - "type": "object" + "id": "OperationPerDevice" }, "FindDevicesByOwnerResponse": { "description": "Response containing found devices.", "type": "object", "properties": { - "nextPageToken": { - "description": "Page token of the next page.", - "type": "string" - }, "devices": { "description": "Devices found.", "type": "array", "items": { "$ref": "Device" } + }, + "nextPageToken": { + "description": "Page token of the next page.", + "type": "string" } }, "id": "FindDevicesByOwnerResponse" }, - "ClaimDeviceRequest": { - "description": "Request message to claim a device on behalf of a customer.", - "type": "object", - "properties": { - "deviceIdentifier": { - "description": "The device identifier of the device to claim.", - "$ref": "DeviceIdentifier" - }, - "sectionType": { - "enumDescriptions": [ - "Unspecified section type.", - "Zero touch section type." - ], - "enum": [ - "SECTION_TYPE_UNSPECIFIED", - "SECTION_TYPE_ZERO_TOUCH" - ], - "description": "The section to claim.", - "type": "string" - }, - "customerId": { - "description": "The customer to claim for.", - "format": "int64", - "type": "string" - } - }, - "id": "ClaimDeviceRequest" - }, "DevicesLongRunningOperationMetadata": { "description": "Long running operation metadata.", "type": "object", @@ -926,6 +927,34 @@ }, "id": "DevicesLongRunningOperationMetadata" }, + "ClaimDeviceRequest": { + "description": "Request message to claim a device on behalf of a customer.", + "type": "object", + "properties": { + "deviceIdentifier": { + "$ref": "DeviceIdentifier", + "description": "The device identifier of the device to claim." + }, + "sectionType": { + "enumDescriptions": [ + "Unspecified section type.", + "Zero touch section type." + ], + "enum": [ + "SECTION_TYPE_UNSPECIFIED", + "SECTION_TYPE_ZERO_TOUCH" + ], + "description": "The section to claim.", + "type": "string" + }, + "customerId": { + "description": "The customer to claim for.", + "format": "int64", + "type": "string" + } + }, + "id": "ClaimDeviceRequest" + }, "UpdateDeviceMetadataInBatchRequest": { "description": "Request to update device metadata in batch.", "type": "object", @@ -940,22 +969,36 @@ }, "id": "UpdateDeviceMetadataInBatchRequest" }, + "ListCustomersResponse": { + "description": "Response message of all customers related to this partner.", + "type": "object", + "properties": { + "customers": { + "description": "List of customers related to this partner.", + "type": "array", + "items": { + "$ref": "Company" + } + } + }, + "id": "ListCustomersResponse" + }, "UpdateMetadataArguments": { "description": "Identifies metdata updates to one device.", "type": "object", "properties": { + "deviceId": { + "description": "Device ID of the device.", + "format": "int64", + "type": "string" + }, "deviceIdentifier": { "description": "Device identifier.", "$ref": "DeviceIdentifier" }, "deviceMetadata": { - "description": "The metadata to update.", - "$ref": "DeviceMetadata" - }, - "deviceId": { - "description": "Device ID of the device.", - "format": "int64", - "type": "string" + "$ref": "DeviceMetadata", + "description": "The metadata to update." } }, "id": "UpdateMetadataArguments" @@ -976,27 +1019,20 @@ }, "id": "ClaimDeviceResponse" }, - "ListCustomersResponse": { - "description": "Response message of all customers related to this partner.", - "type": "object", - "properties": { - "customers": { - "description": "List of customers related to this partner.", - "type": "array", - "items": { - "$ref": "Company" - } - } - }, - "id": "ListCustomersResponse" - }, "Device": { "description": "An Android device.", "type": "object", "properties": { + "claims": { + "description": "Claims.", + "type": "array", + "items": { + "$ref": "DeviceClaim" + } + }, "deviceIdentifier": { - "$ref": "DeviceIdentifier", - "description": "Device identifier." + "description": "Device identifier.", + "$ref": "DeviceIdentifier" }, "deviceMetadata": { "description": "Device metadata.", @@ -1014,13 +1050,6 @@ "configuration": { "description": "The resource name of the configuration.\nOnly set for customers.", "type": "string" - }, - "claims": { - "description": "Claims.", - "type": "array", - "items": { - "$ref": "DeviceClaim" - } } }, "id": "Device" @@ -1030,52 +1059,23 @@ "type": "object", "properties": { "customer": { - "description": "Required. The company data to populate the new customer. Must contain a\nvalue for `companyName` and at least one `owner_email` that's associated\nwith a Google Account. The values for `companyId` and `name` must be empty.", - "$ref": "Company" + "$ref": "Company", + "description": "Required. The company data to populate the new customer. Must contain a\nvalue for `companyName` and at least one `owner_email` that's associated\nwith a Google Account. The values for `companyId` and `name` must be empty." } }, "id": "CreateCustomerRequest" - }, - "Company": { - "properties": { - "ownerEmails": { - "description": "Input only. Email address of customer's users in the owner role. At least\none `owner_email` is required. Each email address must be associated with a\nGoogle Account. Owners share the same access as admins but can also add,\ndelete, and edit your organization's portal users.", - "type": "array", - "items": { - "type": "string" - } - }, - "companyId": { - "description": "Output only. The ID of the company. Assigned by the server.", - "format": "int64", - "type": "string" - }, - "companyName": { - "description": "Required. The name of the company. For example _XYZ Corp_. Characters\nallowed are: Latin letters, numerals, hyphens, and spaces. Displayed to the\ncustomer's employees in the zero-touch enrollment portal.", - "type": "string" - }, - "name": { - "description": "Output only. The API resource name of the company in the format\n`partners/[PARTNER_ID]/customers/[CUSTOMER_ID]`. Assigned by the server.", - "type": "string" - }, - "adminEmails": { - "description": "Input only. Optional. Email address of customer's users in the admin role.\nEach email address must be associated with a Google Account.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "Company", - "description": "A customer resource in the zero-touch enrollment API.", - "type": "object" } }, "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "version": "v1", - "baseUrl": "https://androiddeviceprovisioning.googleapis.com/" + "baseUrl": "https://androiddeviceprovisioning.googleapis.com/", + "canonicalName": "Android Provisioning Partner", + "kind": "discovery#restDescription", + "description": "Automates reseller integration into zero-touch enrollment by assigning devices to customers and creating device reports.", + "servicePath": "", + "rootUrl": "https://androiddeviceprovisioning.googleapis.com/" } diff --git a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json index fb46b2300..d26c4af83 100644 --- a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json +++ b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-api.json @@ -1148,7 +1148,7 @@ "type": "string" }, "installationFailureReason": { - "description": "If package_name is set and the non-compliance reason is APP_NOT_INSTALLED, the detailed reason the app cannot be installed.", + "description": "If package_name is set and the non-compliance reason is APP_NOT_INSTALLED or APP_NOT_UPDATED, the detailed reason the app cannot be installed or updated.", "enum": [ "INSTALLATION_FAILURE_REASON_UNSPECIFIED", "INSTALLATION_FAILURE_REASON_UNKNOWN", @@ -1476,14 +1476,16 @@ "enumDescriptions": [ "This value is ignored.", "Don't allow other admins to change the password again until the user has entered it.", - "Don't ask for user credentials on device boot." + "Don't ask for user credentials on device boot.", + "Lock the device after password reset." ], "type": "array", "items": { "enum": [ "RESET_PASSWORD_FLAG_UNSPECIFIED", "REQUIRE_ENTRY", - "DO_NOT_ASK_CREDENTIALS_ON_BOOT" + "DO_NOT_ASK_CREDENTIALS_ON_BOOT", + "LOCK_NOW" ], "type": "string" } @@ -2250,7 +2252,7 @@ "id": "HardwareStatus" } }, - "revision": "20170911", + "revision": "20170918", "basePath": "", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", diff --git a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go index f2142c9a1..47321b0cb 100644 --- a/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go +++ b/vendor/google.golang.org/api/androidmanagement/v1/androidmanagement-gen.go @@ -385,6 +385,7 @@ type Command struct { // again until the user has entered it. // "DO_NOT_ASK_CREDENTIALS_ON_BOOT" - Don't ask for user credentials // on device boot. + // "LOCK_NOW" - Lock the device after password reset. ResetPasswordFlags []string `json:"resetPasswordFlags,omitempty"` // Type: The type of the command. @@ -1370,8 +1371,8 @@ type NonComplianceDetail struct { FieldPath string `json:"fieldPath,omitempty"` // InstallationFailureReason: If package_name is set and the - // non-compliance reason is APP_NOT_INSTALLED, the detailed reason the - // app cannot be installed. + // non-compliance reason is APP_NOT_INSTALLED or APP_NOT_UPDATED, the + // detailed reason the app cannot be installed or updated. // // Possible values: // "INSTALLATION_FAILURE_REASON_UNSPECIFIED" - This value is diff --git a/vendor/google.golang.org/api/api-list.json b/vendor/google.golang.org/api/api-list.json index 57bea4fa6..a768dc260 100644 --- a/vendor/google.golang.org/api/api-list.json +++ b/vendor/google.golang.org/api/api-list.json @@ -696,6 +696,36 @@ "documentationLink": "https://cloud.google.com/functions", "preferred": false }, + { + "kind": "discovery#directoryItem", + "id": "cloudiot:v1", + "name": "cloudiot", + "version": "v1", + "title": "Google Cloud IoT API", + "description": "Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.", + "discoveryRestUrl": "https://cloudiot.googleapis.com/$discovery/rest?version=v1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/iot", + "preferred": true + }, + { + "kind": "discovery#directoryItem", + "id": "cloudiot:v1beta1", + "name": "cloudiot", + "version": "v1beta1", + "title": "Google Cloud IoT API", + "description": "Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.", + "discoveryRestUrl": "https://cloudiot.googleapis.com/$discovery/rest?version=v1beta1", + "icons": { + "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", + "x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" + }, + "documentationLink": "https://cloud.google.com/iot", + "preferred": false + }, { "kind": "discovery#directoryItem", "id": "cloudkms:v1", @@ -2265,7 +2295,7 @@ "name": "script", "version": "v1", "title": "Google Apps Script Execution API", - "description": "Executes functions in Google Apps Script projects.", + "description": "An API for managing and executing Google Apps Script projects.", "discoveryRestUrl": "https://script.googleapis.com/$discovery/rest?version=v1", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/vendor/google.golang.org/api/appengine/v1/appengine-api.json b/vendor/google.golang.org/api/appengine/v1/appengine-api.json index 26055ac88..b6e1b31ef 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1/appengine-api.json @@ -1,15 +1,31 @@ { + "baseUrl": "https://appengine.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/appengine.admin": { + "description": "View and manage your applications deployed on Google App Engine" + } + } + } + }, + "kind": "discovery#restDescription", "servicePath": "", "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", - "kind": "discovery#restDescription", "rootUrl": "https://appengine.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "appengine", "batchPath": "batch", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", "id": "appengine:v1", - "revision": "20170912", + "revision": "20170926", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", "title": "Google App Engine Admin API", "ownerName": "Google", "discoveryVersion": "v1", @@ -17,41 +33,14 @@ "resources": { "apps": { "methods": { - "repair": { - "path": "v1/apps/{appsId}:repair", - "id": "appengine.apps.repair", - "request": { - "$ref": "RepairApplicationRequest" - }, - "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", - "httpMethod": "POST", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/apps/{appsId}:repair" - }, "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId" - ], "response": { "$ref": "Operation" }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "PATCH", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], @@ -70,15 +59,14 @@ } }, "flatPath": "v1/apps/{appsId}", - "path": "v1/apps/{appsId}", "id": "appengine.apps.patch", + "path": "v1/apps/{appsId}", "request": { "$ref": "Application" }, "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application." }, "get": { - "description": "Gets information about an application.", "response": { "$ref": "Application" }, @@ -101,7 +89,8 @@ ], "flatPath": "v1/apps/{appsId}", "id": "appengine.apps.get", - "path": "v1/apps/{appsId}" + "path": "v1/apps/{appsId}", + "description": "Gets information about an application." }, "create": { "httpMethod": "POST", @@ -109,45 +98,108 @@ "response": { "$ref": "Operation" }, + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "parameters": {}, "flatPath": "v1/apps", "path": "v1/apps", "id": "appengine.apps.create", + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", "request": { "$ref": "Application" + } + }, + "repair": { + "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", + "request": { + "$ref": "RepairApplicationRequest" }, - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)." + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}:repair", + "id": "appengine.apps.repair", + "path": "v1/apps/{appsId}:repair" } }, "resources": { - "locations": { + "domainMappings": { "methods": { - "get": { - "flatPath": "v1/apps/{appsId}/locations/{locationsId}", - "id": "appengine.apps.locations.get", - "path": "v1/apps/{appsId}/locations/{locationsId}", - "description": "Get information about a location.", - "response": { - "$ref": "Location" + "patch": { + "request": { + "$ref": "DomainMapping" }, + "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", + "httpMethod": "PATCH", "parameterOrder": [ "appsId", - "locationsId" + "domainMappingsId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" ], - "httpMethod": "GET", "parameters": { - "locationsId": { + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + }, + "domainMappingsId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true - }, + } + }, + "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.patch" + }, + "get": { + "response": { + "$ref": "DomainMapping" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "httpMethod": "GET", + "parameters": { "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + }, + "domainMappingsId": { "location": "path", - "description": "Part of `name`. Resource name for the location.", + "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true } @@ -156,7 +208,351 @@ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" - ] + ], + "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.get", + "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "description": "Gets the specified domain mapping." + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListDomainMappingsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/apps/{appsId}/domainMappings", + "path": "v1/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.list", + "description": "Lists the domain mappings on an application." + }, + "create": { + "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", + "request": { + "$ref": "DomainMapping" + }, + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/domainMappings", + "path": "v1/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.create" + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "domainMappingsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.delete", + "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource." + } + } + }, + "firewall": { + "resources": { + "ingressRules": { + "methods": { + "batchUpdate": { + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "BatchUpdateIngressRulesResponse" + }, + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", + "path": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", + "id": "appengine.apps.firewall.ingressRules.batchUpdate", + "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list.", + "request": { + "$ref": "BatchUpdateIngressRulesRequest" + } + }, + "delete": { + "description": "Deletes the specified firewall rule.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "appsId", + "ingressRulesId" + ], + "httpMethod": "DELETE", + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", + "type": "string", + "required": true, + "location": "path" + }, + "ingressRulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "id": "appengine.apps.firewall.ingressRules.delete", + "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListIngressRulesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "matchingAddress": { + "location": "query", + "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.", + "type": "string" + } + }, + "flatPath": "v1/apps/{appsId}/firewall/ingressRules", + "path": "v1/apps/{appsId}/firewall/ingressRules", + "id": "appengine.apps.firewall.ingressRules.list", + "description": "Lists the firewall rules of an application." + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "FirewallRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/firewall/ingressRules", + "path": "v1/apps/{appsId}/firewall/ingressRules", + "id": "appengine.apps.firewall.ingressRules.create", + "request": { + "$ref": "FirewallRule" + }, + "description": "Creates a firewall rule for the application." + }, + "get": { + "id": "appengine.apps.firewall.ingressRules.get", + "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "description": "Gets the specified firewall rule.", + "response": { + "$ref": "FirewallRule" + }, + "parameterOrder": [ + "appsId", + "ingressRulesId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", + "type": "string", + "required": true, + "location": "path" + }, + "ingressRulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}" + }, + "patch": { + "response": { + "$ref": "FirewallRule" + }, + "parameterOrder": [ + "appsId", + "ingressRulesId" + ], + "httpMethod": "PATCH", + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", + "type": "string", + "required": true, + "location": "path" + }, + "ingressRulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "id": "appengine.apps.firewall.ingressRules.patch", + "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "description": "Updates the specified firewall rule.", + "request": { + "$ref": "FirewallRule" + } + } + } + } + } + }, + "locations": { + "methods": { + "get": { + "response": { + "$ref": "Location" + }, + "parameterOrder": [ + "appsId", + "locationsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true + }, + "locationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "path": "v1/apps/{appsId}/locations/{locationsId}", + "description": "Get information about a location." }, "list": { "description": "Lists information about the supported locations for this service.", @@ -167,35 +563,35 @@ "appsId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, "filter": { + "location": "query", "description": "The standard list filter.", - "type": "string", - "location": "query" + "type": "string" }, "pageToken": { + "location": "query", "description": "The standard list page token.", - "type": "string", - "location": "query" + "type": "string" }, "appsId": { "location": "path", "description": "Part of `name`. The resource that owns the locations collection, if applicable.", "type": "string", "required": true - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "flatPath": "v1/apps/{appsId}/locations", "id": "appengine.apps.locations.list", "path": "v1/apps/{appsId}/locations" @@ -205,17 +601,15 @@ "authorizedCertificates": { "methods": { "delete": { + "description": "Deletes the specified SSL certificate.", + "response": { + "$ref": "Empty" + }, "parameterOrder": [ "appsId", "authorizedCertificatesId" ], "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { "authorizedCertificatesId": { "location": "path", @@ -230,31 +624,30 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", "id": "appengine.apps.authorizedCertificates.delete", - "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "description": "Deletes the specified SSL certificate." + "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" }, "patch": { - "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", "request": { "$ref": "AuthorizedCertificate" }, - "httpMethod": "PATCH", + "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", + "response": { + "$ref": "AuthorizedCertificate" + }, "parameterOrder": [ "appsId", "authorizedCertificatesId" ], - "response": { - "$ref": "AuthorizedCertificate" - }, + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "authorizedCertificatesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, "updateMask": { "location": "query", "format": "google-fieldmask", @@ -262,25 +655,27 @@ "type": "string" }, "appsId": { - "location": "path", "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", "type": "string", + "required": true, + "location": "path" + }, + "authorizedCertificatesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.patch" + "id": "appengine.apps.authorizedCertificates.patch", + "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" }, "get": { - "description": "Gets the specified SSL certificate.", - "httpMethod": "GET", "response": { "$ref": "AuthorizedCertificate" }, + "httpMethod": "GET", "parameterOrder": [ "appsId", "authorizedCertificatesId" @@ -292,10 +687,10 @@ ], "parameters": { "authorizedCertificatesId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true }, "appsId": { "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", @@ -314,35 +709,33 @@ } }, "flatPath": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.get", "path": "v1/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.get" + "description": "Gets the specified SSL certificate." }, "list": { + "flatPath": "v1/apps/{appsId}/authorizedCertificates", + "path": "v1/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.list", "description": "Lists all SSL certificates the user is authorized to administer.", + "httpMethod": "GET", "response": { "$ref": "ListAuthorizedCertificatesResponse" }, "parameterOrder": [ "appsId" ], - "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true - }, "pageSize": { - "location": "query", "format": "int32", "description": "Maximum results to return per page.", - "type": "integer" + "type": "integer", + "location": "query" }, "view": { "location": "query", @@ -352,28 +745,28 @@ ], "description": "Controls the set of fields returned in the LIST response.", "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.list", - "path": "v1/apps/{appsId}/authorizedCertificates" + } }, "create": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId" - ], "response": { "$ref": "AuthorizedCertificate" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "parameterOrder": [ + "appsId" ], + "httpMethod": "POST", "parameters": { "appsId": { "location": "path", @@ -382,49 +775,21 @@ "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/apps/{appsId}/authorizedCertificates", - "path": "v1/apps/{appsId}/authorizedCertificates", "id": "appengine.apps.authorizedCertificates.create", + "path": "v1/apps/{appsId}/authorizedCertificates", + "description": "Uploads the specified SSL certificate.", "request": { "$ref": "AuthorizedCertificate" - }, - "description": "Uploads the specified SSL certificate." + } } } }, "services": { "methods": { - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.delete", - "path": "v1/apps/{appsId}/services/{servicesId}", - "description": "Deletes the specified service and all enclosed versions." - }, "patch": { "flatPath": "v1/apps/{appsId}/services/{servicesId}", "id": "appengine.apps.services.patch", @@ -445,6 +810,17 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", + "type": "string", + "required": true, + "location": "path" + }, + "migrateTraffic": { + "location": "query", + "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", + "type": "boolean" + }, "updateMask": { "location": "query", "format": "google-fieldmask", @@ -452,41 +828,22 @@ "type": "string" }, "servicesId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", - "type": "string", - "required": true - }, - "migrateTraffic": { - "location": "query", - "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", - "type": "boolean" + "required": true, + "location": "path" } } }, "get": { - "id": "appengine.apps.services.get", - "path": "v1/apps/{appsId}/services/{servicesId}", - "description": "Gets the current configuration of the specified service.", + "httpMethod": "GET", "parameterOrder": [ "appsId", "servicesId" ], - "httpMethod": "GET", "response": { "$ref": "Service" }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { "servicesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -501,7 +858,15 @@ "location": "path" } }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}" + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/apps/{appsId}/services/{servicesId}", + "path": "v1/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.get", + "description": "Gets the current configuration of the specified service." }, "list": { "response": { @@ -511,6 +876,11 @@ "appsId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { "pageToken": { "description": "Continuation token for fetching the next page of results.", @@ -524,30 +894,87 @@ "location": "path" }, "pageSize": { - "location": "query", "format": "int32", "description": "Maximum results to return per page.", - "type": "integer" + "type": "integer", + "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "flatPath": "v1/apps/{appsId}/services", "id": "appengine.apps.services.list", "path": "v1/apps/{appsId}/services", "description": "Lists all the services in the application." + }, + "delete": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.delete", + "path": "v1/apps/{appsId}/services/{servicesId}", + "description": "Deletes the specified service and all enclosed versions." } }, "resources": { "versions": { "methods": { + "create": { + "request": { + "$ref": "Version" + }, + "description": "Deploys code and resource files to a new version.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.create", + "path": "v1/apps/{appsId}/services/{servicesId}/versions" + }, "delete": { - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.delete", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", "description": "Deletes an existing Version resource.", "response": { "$ref": "Operation" @@ -558,12 +985,15 @@ "versionsId" ], "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "versionsId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path" }, "servicesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -572,21 +1002,21 @@ "location": "path" }, "appsId": { - "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", "type": "string", - "required": true + "required": true, + "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}" }, "patch": { + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.", "request": { "$ref": "Version" }, - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.", "response": { "$ref": "Operation" }, @@ -596,22 +1026,7 @@ "versionsId" ], "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, "appsId": { "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", "type": "string", @@ -619,32 +1034,51 @@ "location": "path" }, "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "servicesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", "id": "appengine.apps.services.versions.patch", "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}" }, "get": { - "httpMethod": "GET", + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", + "response": { + "$ref": "Version" + }, "parameterOrder": [ "appsId", "servicesId", "versionsId" ], - "response": { - "$ref": "Version" - }, + "httpMethod": "GET", "parameters": { "appsId": { - "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", "type": "string", - "required": true + "required": true, + "location": "path" }, "view": { "location": "query", @@ -662,23 +1096,21 @@ "required": true }, "servicesId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.get", - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource." + ] }, "list": { + "id": "appengine.apps.services.versions.list", + "path": "v1/apps/{appsId}/services/{servicesId}/versions", "description": "Lists the versions of a service.", "response": { "$ref": "ListVersionsResponse" @@ -695,10 +1127,10 @@ ], "parameters": { "servicesId": { - "location": "path", "description": "Part of `parent`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path" }, "pageToken": { "description": "Continuation token for fetching the next page of results.", @@ -727,49 +1159,160 @@ "type": "string" } }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.list", - "path": "v1/apps/{appsId}/services/{servicesId}/versions" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions", - "path": "v1/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.create", - "request": { - "$ref": "Version" - }, - "description": "Deploys code and resource files to a new version." + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions" } }, "resources": { "instances": { "methods": { + "get": { + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "description": "Gets instance information.", + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "GET", + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "list": { + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "versionsId": { + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "id": "appengine.apps.services.versions.instances.list", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances" + }, + "debug": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.services.versions.instances.debug", + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "request": { + "$ref": "DebugInstanceRequest" + }, + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment." + }, "delete": { + "description": "Stops a running instance.", "response": { "$ref": "Operation" }, @@ -781,11 +1324,17 @@ ], "httpMethod": "DELETE", "parameters": { - "servicesId": { + "versionsId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true }, "instancesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -798,12 +1347,6 @@ "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", "type": "string", "required": true - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true } }, "scopes": [ @@ -811,154 +1354,7 @@ ], "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", "id": "appengine.apps.services.versions.instances.delete", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "description": "Stops a running instance." - }, - "get": { - "response": { - "$ref": "Instance" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "instancesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.get", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "description": "Gets instance information." - }, - "list": { - "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", - "httpMethod": "GET", - "response": { - "$ref": "ListInstancesResponse" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "parameters": { - "servicesId": { - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, - "versionsId": { - "location": "path", - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "id": "appengine.apps.services.versions.instances.list" - }, - "debug": { - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", - "request": { - "$ref": "DebugInstanceRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "instancesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "id": "appengine.apps.services.versions.instances.debug" + "path": "v1/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" } } } @@ -969,40 +1365,40 @@ "authorizedDomains": { "methods": { "list": { - "httpMethod": "GET", "response": { "$ref": "ListAuthorizedDomainsResponse" }, "parameterOrder": [ "appsId" ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], + "httpMethod": "GET", "parameters": { - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, "pageToken": { "description": "Continuation token for fetching the next page of results.", "type": "string", "location": "query" }, "appsId": { + "location": "path", "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", "type": "string", - "required": true, - "location": "path" + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1/apps/{appsId}/authorizedDomains", - "path": "v1/apps/{appsId}/authorizedDomains", "id": "appengine.apps.authorizedDomains.list", + "path": "v1/apps/{appsId}/authorizedDomains", "description": "Lists all domains the user is authorized to administer." } } @@ -1010,10 +1406,7 @@ "operations": { "methods": { "get": { - "path": "v1/apps/{appsId}/operations/{operationsId}", - "id": "appengine.apps.operations.get", "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "httpMethod": "GET", "response": { "$ref": "Operation" }, @@ -1021,12 +1414,18 @@ "appsId", "operationsId" ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { "appsId": { + "location": "path", "description": "Part of `name`. The name of the operation resource.", "type": "string", - "required": true, - "location": "path" + "required": true }, "operationsId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -1035,226 +1434,51 @@ "location": "path" } }, + "flatPath": "v1/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get", + "path": "v1/apps/{appsId}/operations/{operationsId}" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListOperationsResponse" + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1/apps/{appsId}/operations/{operationsId}" - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", "parameters": { - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, "filter": { "location": "query", "description": "The standard list filter.", "type": "string" }, "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. The name of the operation's parent resource.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/apps/{appsId}/operations", - "id": "appengine.apps.operations.list", - "path": "v1/apps/{appsId}/operations" - } - } - }, - "domainMappings": { - "methods": { - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "updateMask": { "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", + "description": "The standard list page token.", "type": "string" }, "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", - "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.patch", - "request": { - "$ref": "DomainMapping" - }, - "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource." - }, - "get": { - "id": "appengine.apps.domainMappings.get", - "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", - "description": "Gets the specified domain mapping.", - "response": { - "$ref": "DomainMapping" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - }, - "domainMappingsId": { - "description": "Part of `name`. See documentation of `appsId`.", + "description": "Part of `name`. The name of the operation's parent resource.", "type": "string", "required": true, "location": "path" - } - }, - "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}" - }, - "list": { - "description": "Lists the domain mappings on an application.", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListDomainMappingsResponse" - }, - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true }, "pageSize": { + "location": "query", "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" + "description": "The standard list page size.", + "type": "integer" } }, - "flatPath": "v1/apps/{appsId}/domainMappings", - "id": "appengine.apps.domainMappings.list", - "path": "v1/apps/{appsId}/domainMappings" - }, - "create": { - "request": { - "$ref": "DomainMapping" - }, - "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/apps/{appsId}/domainMappings", - "id": "appengine.apps.domainMappings.create", - "path": "v1/apps/{appsId}/domainMappings" - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "httpMethod": "DELETE", - "parameters": { - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.delete", - "path": "v1/apps/{appsId}/domainMappings/{domainMappingsId}", - "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource." + "flatPath": "v1/apps/{appsId}/operations", + "path": "v1/apps/{appsId}/operations", + "id": "appengine.apps.operations.list", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id." } } } @@ -1262,65 +1486,54 @@ } }, "parameters": { - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, "bearer_token": { - "location": "query", "description": "OAuth bearer token.", - "type": "string" + "type": "string", + "location": "query" }, "oauth_token": { + "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], + "fields": { "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { "enum": [ "1", "2" ], "description": "V1 error format.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "alt": { "enum": [ @@ -1347,234 +1560,39 @@ "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" } }, "schemas": { - "OperationMetadataExperimental": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataExperimental" - }, - "AuthorizedDomain": { - "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", - "type": "object", - "properties": { - "id": { - "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", - "type": "string" - }, - "name": { - "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", - "type": "string" - } - }, - "id": "AuthorizedDomain" - }, - "TrafficSplit": { - "properties": { - "allocations": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "type": "object" - }, - "shardBy": { - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "type": "string", - "enumDescriptions": [ - "Diversion method unspecified.", - "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", - "Diversion based on applying the modulus operation to a fingerprint of the IP address.", - "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." - ], - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP", - "RANDOM" - ] - } - }, - "id": "TrafficSplit", - "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", - "type": "object" - }, - "OperationMetadataV1Beta": { - "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, - "ListServicesResponse": { - "description": "Response message for Services.ListServices.", + "ListInstancesResponse": { + "description": "Response message for Instances.ListInstances.", "type": "object", "properties": { "nextPageToken": { "description": "Continuation token for fetching the next page of results.", "type": "string" }, - "services": { - "description": "The services belonging to the requested application.", - "items": { - "$ref": "Service" - }, - "type": "array" - } - }, - "id": "ListServicesResponse" - }, - "Resources": { - "properties": { - "volumes": { - "description": "User specified volumes.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "diskGb": { - "format": "double", - "description": "Disk size (GB) needed.", - "type": "number" - }, - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" - } - }, - "id": "Resources", - "description": "Machine resources for a version.", - "type": "object" - }, - "Deployment": { - "description": "Code and application artifacts used to deploy a version to App Engine.", - "type": "object", - "properties": { - "zip": { - "description": "The zip file for this deployment, if this is a zip deployment.", - "$ref": "ZipInfo" - }, - "container": { - "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.", - "$ref": "ContainerInfo" - }, - "files": { - "additionalProperties": { - "$ref": "FileInfo" - }, - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "type": "object" - } - }, - "id": "Deployment" - }, - "Volume": { - "properties": { - "sizeGb": { - "format": "double", - "description": "Volume size in gigabytes.", - "type": "number" - }, - "name": { - "description": "Unique name for the volume.", - "type": "string" - }, - "volumeType": { - "description": "Underlying volume type, e.g. 'tmpfs'.", - "type": "string" - } - }, - "id": "Volume", - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "type": "object" - }, - "ListInstancesResponse": { - "properties": { "instances": { "description": "The instances belonging to the requested version.", "items": { "$ref": "Instance" }, "type": "array" - }, - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" } }, - "id": "ListInstancesResponse", - "description": "Response message for Instances.ListInstances.", - "type": "object" + "id": "ListInstancesResponse" }, "ListDomainMappingsResponse": { - "description": "Response message for DomainMappings.ListDomainMappings.", - "type": "object", "properties": { "domainMappings": { "description": "The domain mappings for the application.", @@ -1588,12 +1606,18 @@ "type": "string" } }, - "id": "ListDomainMappingsResponse" + "id": "ListDomainMappingsResponse", + "description": "Response message for DomainMappings.ListDomainMappings.", + "type": "object" }, "OperationMetadataV1Alpha": { "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, "method": { "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", "type": "string" @@ -1615,23 +1639,25 @@ "description": "Time that this operation was created.@OutputOnly", "type": "string" }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" } }, "id": "OperationMetadataV1Alpha" }, "UrlDispatchRule": { + "description": "Rules to match an HTTP request and dispatch that request to a service.", + "type": "object", "properties": { + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + }, "service": { "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default.", "type": "string" @@ -1639,15 +1665,9 @@ "domain": { "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", "type": "string" - }, - "path": { - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", - "type": "string" } }, - "id": "UrlDispatchRule", - "description": "Rules to match an HTTP request and dispatch that request to a service.", - "type": "object" + "id": "UrlDispatchRule" }, "ListVersionsResponse": { "description": "Response message for Versions.ListVersions.", @@ -1685,7 +1705,26 @@ }, "id": "ListAuthorizedDomainsResponse" }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "ApiEndpointHandler": { + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler" + }, "DomainMapping": { + "description": "A domain serving an App Engine application.", + "type": "object", "properties": { "sslSettings": { "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.", @@ -1707,31 +1746,54 @@ "type": "string" } }, - "id": "DomainMapping", - "description": "A domain serving an App Engine application.", - "type": "object" + "id": "DomainMapping" }, - "ApiEndpointHandler": { - "description": "Uses Google Cloud Endpoints to handle requests.", + "ZipInfo": { + "description": "The zip file information for a zip deployment.", "type": "object", "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", + "filesCount": { + "format": "int32", + "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", + "type": "integer" + }, + "sourceUrl": { + "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", "type": "string" } }, - "id": "ApiEndpointHandler" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "type": "object", - "properties": {}, - "id": "Empty" + "id": "ZipInfo" }, "AutomaticScaling": { - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "type": "object", "properties": { + "minTotalInstances": { + "format": "int32", + "description": "Minimum number of instances that should be maintained for this version.", + "type": "integer" + }, + "networkUtilization": { + "description": "Target scaling by network usage.", + "$ref": "NetworkUtilization" + }, + "maxConcurrentRequests": { + "format": "int32", + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "type": "integer" + }, + "coolDownPeriod": { + "format": "google-duration", + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", + "type": "string" + }, + "maxPendingLatency": { + "format": "google-duration", + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "cpuUtilization": { + "description": "Target scaling by CPU usage.", + "$ref": "CpuUtilization" + }, "diskUtilization": { "description": "Target scaling by disk usage.", "$ref": "DiskUtilization" @@ -1741,15 +1803,15 @@ "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", "type": "string" }, - "requestUtilization": { - "description": "Target scaling by request utilization.", - "$ref": "RequestUtilization" - }, "maxIdleInstances": { "format": "int32", "description": "Maximum number of idle instances that should be maintained for this version.", "type": "integer" }, + "requestUtilization": { + "description": "Target scaling by request utilization.", + "$ref": "RequestUtilization" + }, "minIdleInstances": { "format": "int32", "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", @@ -1759,68 +1821,14 @@ "format": "int32", "description": "Maximum number of instances that should be started to handle requests.", "type": "integer" - }, - "minTotalInstances": { - "format": "int32", - "description": "Minimum number of instances that should be maintained for this version.", - "type": "integer" - }, - "networkUtilization": { - "$ref": "NetworkUtilization", - "description": "Target scaling by network usage." - }, - "coolDownPeriod": { - "format": "google-duration", - "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", - "type": "string" - }, - "maxConcurrentRequests": { - "format": "int32", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "type": "integer" - }, - "maxPendingLatency": { - "format": "google-duration", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "cpuUtilization": { - "$ref": "CpuUtilization", - "description": "Target scaling by CPU usage." } }, - "id": "AutomaticScaling" - }, - "ZipInfo": { - "description": "The zip file information for a zip deployment.", - "type": "object", - "properties": { - "sourceUrl": { - "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "filesCount": { - "format": "int32", - "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", - "type": "integer" - } - }, - "id": "ZipInfo" + "id": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object" }, "AuthorizedCertificate": { "properties": { - "visibleDomainMappings": { - "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "expireTime": { - "format": "google-datetime", - "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", - "type": "string" - }, "name": { "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", "type": "string" @@ -1846,8 +1854,20 @@ "type": "string" }, "certificateRawData": { - "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.", - "$ref": "CertificateRawData" + "$ref": "CertificateRawData", + "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority." + }, + "visibleDomainMappings": { + "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "format": "google-datetime", + "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", + "type": "string" } }, "id": "AuthorizedCertificate", @@ -1863,12 +1883,6 @@ "type": "string" }, "type": { - "enumDescriptions": [ - "An unknown resource record.", - "An A resource record. Data is an IPv4 address.", - "An AAAA resource record. Data is an IPv6 address.", - "A CNAME resource record. Data is a domain name to be aliased." - ], "enum": [ "RECORD_TYPE_UNSPECIFIED", "A", @@ -1876,7 +1890,13 @@ "CNAME" ], "description": "Resource record type. Example: AAAA.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "An unknown resource record.", + "An A resource record. Data is an IPv4 address.", + "An AAAA resource record. Data is an IPv6 address.", + "A CNAME resource record. Data is a domain name to be aliased." + ] }, "rrdata": { "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", @@ -1901,22 +1921,22 @@ "id": "Library" }, "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" } }, - "id": "ListLocationsResponse", - "description": "The response message for Locations.ListLocations.", - "type": "object" + "id": "ListLocationsResponse" }, "ContainerInfo": { "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", @@ -1950,38 +1970,6 @@ "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", "type": "object", "properties": { - "securityLevel": { - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ], - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" - }, - "authFailAction": { - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with a 401 HTTP status code and an error message." - ], - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ], - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string" - }, "script": { "$ref": "ScriptHandler", "description": "Executes a script to handle the request that matches this URL pattern." @@ -1991,6 +1979,12 @@ "type": "string" }, "login": { + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], "description": "Level of login required to access this resource.", "type": "string", "enumDescriptions": [ @@ -1998,12 +1992,6 @@ "Does not require that the user is signed in.", "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." - ], - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" ] }, "apiEndpoint": { @@ -2015,6 +2003,13 @@ "description": "Returns the contents of a file, such as an image, as the response." }, "redirectHttpResponseCode": { + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ], "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", "type": "string", "enumDescriptions": [ @@ -2023,79 +2018,9 @@ "302 Moved Temporarily code.", "303 See Other code.", "307 Temporary Redirect code." - ], - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" ] - } - }, - "id": "UrlMap" - }, - "EndpointsApiService": { - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "type": "object", - "properties": { - "configId": { - "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", - "type": "string" - }, - "name": { - "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", - "type": "string" - } - }, - "id": "EndpointsApiService" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object", - "properties": { - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - } - }, - "id": "Operation" - }, - "ApiConfigHandler": { - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "type": "object", - "properties": { - "url": { - "description": "URL to serve the endpoint at.", - "type": "string" }, "securityLevel": { - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string", "enumDescriptions": [ "Not specified.", "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", @@ -2109,11 +2034,11 @@ "SECURE_NEVER", "SECURE_OPTIONAL", "SECURE_ALWAYS" - ] + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" }, "authFailAction": { - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string", "enumDescriptions": [ "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", @@ -2123,13 +2048,110 @@ "AUTH_FAIL_ACTION_UNSPECIFIED", "AUTH_FAIL_ACTION_REDIRECT", "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + } + }, + "id": "UrlMap" + }, + "EndpointsApiService": { + "properties": { + "configId": { + "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", + "type": "string" + }, + "name": { + "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", + "type": "string" + } + }, + "id": "EndpointsApiService", + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", + "type": "object" + }, + "Operation": { + "properties": { + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object" + }, + "ApiConfigHandler": { + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", + "properties": { + "url": { + "description": "URL to serve the endpoint at.", + "type": "string" + }, + "securityLevel": { + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." ] }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + }, "script": { "description": "Path to the script from the application root directory.", "type": "string" }, "login": { + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string", "enumDescriptions": [ "Not specified. LOGIN_OPTIONAL is assumed.", "Does not require that the user is signed in.", @@ -2141,26 +2163,26 @@ "LOGIN_OPTIONAL", "LOGIN_ADMIN", "LOGIN_REQUIRED" - ], - "description": "Level of login required to access this resource. Defaults to optional.", - "type": "string" + ] } }, "id": "ApiConfigHandler" }, "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", "properties": { - "httpHeaders": { - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers to use for all responses from these URLs.", - "type": "object" - }, "applicationReadable": { "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", "type": "boolean" }, + "httpHeaders": { + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "uploadPathRegex": { "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", "type": "string" @@ -2183,39 +2205,29 @@ "type": "string" } }, - "id": "StaticFilesHandler", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "type": "object" + "id": "StaticFilesHandler" }, "BasicScaling": { "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", "type": "object", "properties": { - "maxInstances": { - "format": "int32", - "description": "Maximum number of instances to create for this version.", - "type": "integer" - }, "idleTimeout": { "format": "google-duration", "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", "type": "string" + }, + "maxInstances": { + "format": "int32", + "description": "Maximum number of instances to create for this version.", + "type": "integer" } }, "id": "BasicScaling" }, "DiskUtilization": { + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object", "properties": { - "targetWriteOpsPerSecond": { - "format": "int32", - "description": "Target ops written per second.", - "type": "integer" - }, - "targetWriteBytesPerSecond": { - "format": "int32", - "description": "Target bytes written per second.", - "type": "integer" - }, "targetReadOpsPerSecond": { "format": "int32", "description": "Target ops read per seconds.", @@ -2225,11 +2237,19 @@ "format": "int32", "description": "Target bytes read per second.", "type": "integer" + }, + "targetWriteOpsPerSecond": { + "format": "int32", + "description": "Target ops written per second.", + "type": "integer" + }, + "targetWriteBytesPerSecond": { + "format": "int32", + "description": "Target bytes written per second.", + "type": "integer" } }, - "id": "DiskUtilization", - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "type": "object" + "id": "DiskUtilization" }, "CpuUtilization": { "description": "Target scaling by CPU usage.", @@ -2252,17 +2272,6 @@ "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, "code": { "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", @@ -2271,6 +2280,17 @@ "message": { "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" } }, "id": "Status" @@ -2311,6 +2331,8 @@ "id": "ManualScaling" }, "LocationMetadata": { + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object", "properties": { "flexibleEnvironmentAvailable": { "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", @@ -2321,9 +2343,7 @@ "type": "boolean" } }, - "id": "LocationMetadata", - "description": "Metadata for the given google.cloud.location.Location.", - "type": "object" + "id": "LocationMetadata" }, "Service": { "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", @@ -2364,6 +2384,15 @@ }, "OperationMetadata": { "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, "operationType": { "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", "type": "string" @@ -2380,49 +2409,118 @@ "target": { "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" } }, "id": "OperationMetadata", "description": "Metadata for the given google.longrunning.Operation.", "type": "object" }, - "ListAuthorizedCertificatesResponse": { + "FirewallRule": { + "description": "A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests.", + "type": "object", "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", + "sourceRange": { + "description": "IP address or range, defined using CIDR notation, of requests that this rule applies to. You can use the wildcard character \"*\" to match all IPs equivalent to \"0/0\" and \"::/0\" together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 or 2001:0db8:0000:0042:0000:8a2e:0370:7334.\u003cp\u003eTruncation will be silently performed on addresses which are not properly truncated. For example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address as 2001:db8::/32.", "type": "string" }, + "priority": { + "format": "int32", + "description": "A positive integer between 1, Int32.MaxValue-1 that defines the order of rule evaluation. Rules with the lowest priority are evaluated first.A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user.", + "type": "integer" + }, + "action": { + "description": "The action to take on matched requests.", + "type": "string", + "enumDescriptions": [ + "", + "Matching requests are allowed.", + "Matching requests are denied." + ], + "enum": [ + "UNSPECIFIED_ACTION", + "ALLOW", + "DENY" + ] + }, + "description": { + "description": "An optional string description of this rule. This field has a maximum length of 100 characters.", + "type": "string" + } + }, + "id": "FirewallRule" + }, + "ListAuthorizedCertificatesResponse": { + "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", + "type": "object", + "properties": { "certificates": { "description": "The SSL certificates the user is authorized to administer.", "items": { "$ref": "AuthorizedCertificate" }, "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" } }, - "id": "ListAuthorizedCertificatesResponse", - "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", - "type": "object" + "id": "ListAuthorizedCertificatesResponse" }, "FeatureSettings": { - "description": "The feature specific settings to be used in the application. These define behaviors that are user configurable.", - "type": "object", "properties": { "splitHealthChecks": { "description": "Boolean value indicating if split health checks should be used instead of the legacy health checks. At an app.yaml level, this means defaulting to 'readiness_check' and 'liveness_check' values instead of 'health_check' ones. Once the legacy 'health_check' behavior is deprecated, and this value is always true, this setting can be removed.", "type": "boolean" } }, - "id": "FeatureSettings" + "id": "FeatureSettings", + "description": "The feature specific settings to be used in the application. These define behaviors that are user configurable.", + "type": "object" + }, + "ErrorHandler": { + "description": "Custom static error page to be served when an error occurs.", + "type": "object", + "properties": { + "mimeType": { + "description": "MIME type of file. Defaults to text/html.", + "type": "string" + }, + "errorCode": { + "enum": [ + "ERROR_CODE_UNSPECIFIED", + "ERROR_CODE_DEFAULT", + "ERROR_CODE_OVER_QUOTA", + "ERROR_CODE_DOS_API_DENIAL", + "ERROR_CODE_TIMEOUT" + ], + "description": "Error condition this handler applies to.", + "type": "string", + "enumDescriptions": [ + "Not specified. ERROR_CODE_DEFAULT is assumed.", + "All other error types.", + "Application has exceeded a resource quota.", + "Client blocked by the application's Denial of Service protection configuration.", + "Deadline reached before the application responds." + ] + }, + "staticFile": { + "description": "Static file content to be served for this error.", + "type": "string" + } + }, + "id": "ErrorHandler" + }, + "SslSettings": { + "description": "SSL configuration for a DomainMapping resource.", + "type": "object", + "properties": { + "certificateId": { + "description": "ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will remove SSL support. Example: 12345.", + "type": "string" + } + }, + "id": "SslSettings" }, "OperationMetadataV1": { "description": "Metadata for the given google.longrunning.Operation.", @@ -2445,14 +2543,14 @@ }, "type": "array" }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, "target": { "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" @@ -2464,87 +2562,24 @@ }, "id": "OperationMetadataV1" }, - "SslSettings": { - "description": "SSL configuration for a DomainMapping resource.", - "type": "object", - "properties": { - "certificateId": { - "description": "ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will remove SSL support. Example: 12345.", - "type": "string" - } - }, - "id": "SslSettings" - }, - "ErrorHandler": { - "properties": { - "mimeType": { - "description": "MIME type of file. Defaults to text/html.", - "type": "string" - }, - "errorCode": { - "enumDescriptions": [ - "Not specified. ERROR_CODE_DEFAULT is assumed.", - "All other error types.", - "Application has exceeded a resource quota.", - "Client blocked by the application's Denial of Service protection configuration.", - "Deadline reached before the application responds." - ], - "enum": [ - "ERROR_CODE_UNSPECIFIED", - "ERROR_CODE_DEFAULT", - "ERROR_CODE_OVER_QUOTA", - "ERROR_CODE_DOS_API_DENIAL", - "ERROR_CODE_TIMEOUT" - ], - "description": "Error condition this handler applies to.", - "type": "string" - }, - "staticFile": { - "description": "Static file content to be served for this error.", - "type": "string" - } - }, - "id": "ErrorHandler", - "description": "Custom static error page to be served when an error occurs.", - "type": "object" - }, - "Network": { - "description": "Extra network settings. Only applicable for App Engine flexible environment versions", - "type": "object", - "properties": { - "subnetworkName": { - "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.", - "type": "string" - }, - "instanceTag": { - "description": "Tag to apply to the VM instance during creation. Only applicable for for App Engine flexible environment versions.", - "type": "string" - }, - "forwardedPorts": { - "description": "List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable for App Engine flexible environment versions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "name": { - "description": "Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", - "type": "string" - } - }, - "id": "Network" - }, "Application": { "description": "An Application resource contains the top-level configuration of an App Engine application. Next tag: 20", "type": "object", "properties": { + "defaultCookieExpiration": { + "format": "google-duration", + "description": "Cookie expiration policy for this application.", + "type": "string" + }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" + }, "locationId": { "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", "type": "string" }, "servingStatus": { - "description": "Serving status of this application.", - "type": "string", "enumDescriptions": [ "Serving status is unspecified.", "Application is serving.", @@ -2556,7 +2591,9 @@ "SERVING", "USER_DISABLED", "SYSTEM_DISABLED" - ] + ], + "description": "Serving status of this application.", + "type": "string" }, "defaultHostname": { "description": "Hostname used to reach this application, as resolved by App Engine.@OutputOnly", @@ -2595,67 +2632,81 @@ "name": { "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", "type": "string" - }, - "defaultCookieExpiration": { - "format": "google-duration", - "description": "Cookie expiration policy for this application.", - "type": "string" - }, - "id": { - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", - "type": "string" } }, "id": "Application" }, - "Instance": { + "Network": { + "description": "Extra network settings. Only applicable for App Engine flexible environment versions", + "type": "object", "properties": { - "vmName": { - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "subnetworkName": { + "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.", "type": "string" }, - "vmId": { - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "instanceTag": { + "description": "Tag to apply to the VM instance during creation. Only applicable for for App Engine flexible environment versions.", "type": "string" }, + "forwardedPorts": { + "description": "List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable for App Engine flexible environment versions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path.Defaults to default.", + "type": "string" + } + }, + "id": "Network" + }, + "Instance": { + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", + "type": "object", + "properties": { "qps": { "format": "float", "description": "Average queries per second (QPS) over the last minute.@OutputOnly", "type": "number" }, - "vmZoneName": { - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, "name": { "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", "type": "string" }, + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, "averageLatency": { "format": "int32", "description": "Average latency (ms) over the last minute.@OutputOnly", "type": "integer" }, + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, "memoryUsage": { "format": "int64", "description": "Total memory in use (bytes).@OutputOnly", "type": "string" }, - "vmIp": { - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, "id": { "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", "type": "string" }, - "vmStatus": { - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" + "errors": { + "format": "int32", + "description": "Number of errors since this instance was started.@OutputOnly", + "type": "integer" }, "availability": { - "description": "Availability of the instance.@OutputOnly", - "type": "string", "enumDescriptions": [ "", "", @@ -2665,12 +2716,13 @@ "UNSPECIFIED", "RESIDENT", "DYNAMIC" - ] + ], + "description": "Availability of the instance.@OutputOnly", + "type": "string" }, - "errors": { - "format": "int32", - "description": "Number of errors since this instance was started.@OutputOnly", - "type": "integer" + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" }, "startTime": { "format": "google-datetime", @@ -2689,26 +2741,18 @@ "appEngineRelease": { "description": "App Engine release this instance is running on.@OutputOnly", "type": "string" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" } }, - "id": "Instance", - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", - "type": "object" + "id": "Instance" }, "LivenessCheck": { "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", "type": "object", "properties": { - "timeout": { - "format": "google-duration", - "description": "Time before the check is considered failed.", - "type": "string" - }, - "failureThreshold": { - "format": "uint32", - "description": "Number of consecutive failed checks required before considering the VM unhealthy.", - "type": "integer" - }, "initialDelay": { "format": "google-duration", "description": "The initial delay before starting to execute the checks.", @@ -2718,52 +2762,46 @@ "description": "The request path.", "type": "string" }, - "host": { - "description": "Host header to send when performing a HTTP Liveness check. Example: \"myapp.appspot.com\"", - "type": "string" - }, "successThreshold": { "format": "uint32", "description": "Number of consecutive successful checks required before considering the VM healthy.", "type": "integer" }, + "host": { + "description": "Host header to send when performing a HTTP Liveness check. Example: \"myapp.appspot.com\"", + "type": "string" + }, "checkInterval": { "format": "google-duration", "description": "Interval between health checks.", "type": "string" + }, + "failureThreshold": { + "format": "uint32", + "description": "Number of consecutive failed checks required before considering the VM unhealthy.", + "type": "integer" + }, + "timeout": { + "format": "google-duration", + "description": "Time before the check is considered failed.", + "type": "string" } }, "id": "LivenessCheck" }, - "Location": { - "description": "A resource that represents Google Cloud Platform location.", + "BatchUpdateIngressRulesRequest": { + "description": "Request message for Firewall.BatchUpdateIngressRules.", "type": "object", "properties": { - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "labels": { - "additionalProperties": { - "type": "string" + "ingressRules": { + "description": "A list of FirewallRules to replace the existing set.", + "items": { + "$ref": "FirewallRule" }, - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object" + "type": "array" } }, - "id": "Location" + "id": "BatchUpdateIngressRulesRequest" }, "NetworkUtilization": { "description": "Target scaling by network usage. Only applicable for VM runtimes.", @@ -2792,8 +2830,45 @@ }, "id": "NetworkUtilization" }, - "HealthCheck": { + "Location": { "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + } + }, + "id": "Location", + "description": "A resource that represents Google Cloud Platform location.", + "type": "object" + }, + "HealthCheck": { + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", + "type": "object", + "properties": { + "unhealthyThreshold": { + "format": "uint32", + "description": "Number of consecutive failed health checks required before removing traffic.", + "type": "integer" + }, "disableHealthCheck": { "description": "Whether to explicitly disable health checks for this instance.", "type": "boolean" @@ -2802,16 +2877,16 @@ "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", "type": "string" }, - "restartThreshold": { - "format": "uint32", - "description": "Number of consecutive failed health checks required before an instance is restarted.", - "type": "integer" - }, "healthyThreshold": { "format": "uint32", "description": "Number of consecutive successful health checks required before receiving traffic.", "type": "integer" }, + "restartThreshold": { + "format": "uint32", + "description": "Number of consecutive failed health checks required before an instance is restarted.", + "type": "integer" + }, "checkInterval": { "format": "google-duration", "description": "Interval between health checks.", @@ -2821,31 +2896,14 @@ "format": "google-duration", "description": "Time before the health check is considered failed.", "type": "string" - }, - "unhealthyThreshold": { - "format": "uint32", - "description": "Number of consecutive failed health checks required before removing traffic.", - "type": "integer" } }, - "id": "HealthCheck", - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", - "type": "object" + "id": "HealthCheck" }, "ReadinessCheck": { "description": "Readiness checking configuration for VM instances. Unhealthy instances are removed from traffic rotation.", "type": "object", "properties": { - "timeout": { - "format": "google-duration", - "description": "Time before the check is considered failed.", - "type": "string" - }, - "failureThreshold": { - "format": "uint32", - "description": "Number of consecutive failed checks required before removing traffic.", - "type": "integer" - }, "appStartTimeout": { "format": "google-duration", "description": "A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to serve traffic.", @@ -2855,33 +2913,43 @@ "description": "The request path.", "type": "string" }, - "host": { - "description": "Host header to send when performing a HTTP Readiness check. Example: \"myapp.appspot.com\"", - "type": "string" - }, "successThreshold": { "format": "uint32", "description": "Number of consecutive successful checks required before receiving traffic.", "type": "integer" }, + "host": { + "description": "Host header to send when performing a HTTP Readiness check. Example: \"myapp.appspot.com\"", + "type": "string" + }, "checkInterval": { "format": "google-duration", "description": "Interval between health checks.", "type": "string" + }, + "failureThreshold": { + "format": "uint32", + "description": "Number of consecutive failed checks required before removing traffic.", + "type": "integer" + }, + "timeout": { + "format": "google-duration", + "description": "Time before the check is considered failed.", + "type": "string" } }, "id": "ReadinessCheck" }, "DebugInstanceRequest": { + "description": "Request message for Instances.DebugInstance.", + "type": "object", "properties": { "sshKey": { "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", "type": "string" } }, - "id": "DebugInstanceRequest", - "description": "Request message for Instances.DebugInstance.", - "type": "object" + "id": "DebugInstanceRequest" }, "OperationMetadataV1Beta5": { "description": "Metadata for the given google.longrunning.Operation.", @@ -2913,7 +2981,83 @@ "id": "OperationMetadataV1Beta5" }, "Version": { + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", + "type": "object", "properties": { + "runtime": { + "description": "Desired runtime. Example: python27.", + "type": "string" + }, + "id": { + "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "createdBy": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, + "envVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object" + }, + "livenessCheck": { + "$ref": "LivenessCheck", + "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." + }, + "network": { + "description": "Extra network settings. Only applicable for App Engine flexible environment versions.", + "$ref": "Network" + }, + "betaSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" + }, + "env": { + "description": "App Engine execution environment for this version.Defaults to standard.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "UrlMap" + }, + "type": "array" + }, + "automaticScaling": { + "$ref": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." + }, + "diskUsageBytes": { + "format": "int64", + "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", + "type": "string" + }, + "healthCheck": { + "$ref": "HealthCheck", + "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "readinessCheck": { + "$ref": "ReadinessCheck", + "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set." + }, + "manualScaling": { + "$ref": "ManualScaling", + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", + "type": "string" + }, "apiConfig": { "$ref": "ApiConfigHandler", "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." @@ -2922,31 +3066,31 @@ "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.", "$ref": "EndpointsApiService" }, - "versionUrl": { - "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", - "type": "string" - }, "vm": { "description": "Whether to deploy this version in a container on a virtual machine.", "type": "boolean" }, + "versionUrl": { + "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", + "type": "string" + }, "instanceClass": { "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", "type": "string" }, "servingStatus": { - "enumDescriptions": [ - "Not specified.", - "Currently serving. Instances are created according to the scaling settings of the version.", - "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." - ], "enum": [ "SERVING_STATUS_UNSPECIFIED", "SERVING", "STOPPED" ], "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ] }, "runtimeApiVersion": { "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", @@ -2991,8 +3135,8 @@ ] }, "resources": { - "$ref": "Resources", - "description": "Machine resources for this version. Only applicable for VM runtimes." + "description": "Machine resources for this version. Only applicable for VM runtimes.", + "$ref": "Resources" }, "errorHandlers": { "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", @@ -3020,85 +3164,9 @@ "basicScaling": { "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", "$ref": "BasicScaling" - }, - "runtime": { - "description": "Desired runtime. Example: python27.", - "type": "string" - }, - "createdBy": { - "description": "Email address of the user who created this version.@OutputOnly", - "type": "string" - }, - "id": { - "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", - "type": "string" - }, - "envVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", - "type": "object" - }, - "livenessCheck": { - "$ref": "LivenessCheck", - "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." - }, - "network": { - "$ref": "Network", - "description": "Extra network settings. Only applicable for App Engine flexible environment versions." - }, - "betaSettings": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "type": "object" - }, - "env": { - "description": "App Engine execution environment for this version.Defaults to standard.", - "type": "string" - }, - "handlers": { - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "automaticScaling": { - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "$ref": "AutomaticScaling" - }, - "diskUsageBytes": { - "format": "int64", - "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", - "type": "string" - }, - "healthCheck": { - "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set.", - "$ref": "HealthCheck" - }, - "threadsafe": { - "description": "Whether multiple requests can be dispatched to this version at once.", - "type": "boolean" - }, - "readinessCheck": { - "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.", - "$ref": "ReadinessCheck" - }, - "manualScaling": { - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "$ref": "ManualScaling" - }, - "name": { - "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", - "type": "string" } }, - "id": "Version", - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", - "type": "object" + "id": "Version" }, "RepairApplicationRequest": { "description": "Request message for 'Applications.RepairApplication'.", @@ -3121,6 +3189,25 @@ }, "id": "CertificateRawData" }, + "FileInfo": { + "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + }, + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + } + }, + "id": "FileInfo", + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object" + }, "ScriptHandler": { "description": "Executes a script to handle the request that matches the URL pattern.", "type": "object", @@ -3132,46 +3219,247 @@ }, "id": "ScriptHandler" }, - "FileInfo": { + "OperationMetadataExperimental": { "properties": { - "mimeType": { - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", "type": "string" }, - "sourceUrl": { - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", "type": "string" }, - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", "type": "string" } }, - "id": "FileInfo", - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "id": "OperationMetadataExperimental", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + }, + "AuthorizedDomain": { + "properties": { + "name": { + "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", + "type": "string" + }, + "id": { + "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", + "type": "string" + } + }, + "id": "AuthorizedDomain", + "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", + "type": "object" + }, + "TrafficSplit": { + "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", + "type": "object", + "properties": { + "allocations": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object" + }, + "shardBy": { + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address.", + "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." + ], + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP", + "RANDOM" + ], + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string" + } + }, + "id": "TrafficSplit" + }, + "OperationMetadataV1Beta": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta" + }, + "ListIngressRulesResponse": { + "description": "Response message for Firewall.ListIngressRules.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "ingressRules": { + "description": "The ingress FirewallRules for this application.", + "items": { + "$ref": "FirewallRule" + }, + "type": "array" + } + }, + "id": "ListIngressRulesResponse" + }, + "ListServicesResponse": { + "description": "Response message for Services.ListServices.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "services": { + "description": "The services belonging to the requested application.", + "items": { + "$ref": "Service" + }, + "type": "array" + } + }, + "id": "ListServicesResponse" + }, + "Resources": { + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "memoryGb": { + "format": "double", + "description": "Memory (GB) needed.", + "type": "number" + }, + "cpu": { + "format": "double", + "description": "Number of CPU cores needed.", + "type": "number" + }, + "volumes": { + "description": "User specified volumes.", + "items": { + "$ref": "Volume" + }, + "type": "array" + }, + "diskGb": { + "format": "double", + "description": "Disk size (GB) needed.", + "type": "number" + } + }, + "id": "Resources" + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "files": { + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object", + "additionalProperties": { + "$ref": "FileInfo" + } + }, + "zip": { + "$ref": "ZipInfo", + "description": "The zip file for this deployment, if this is a zip deployment." + }, + "container": { + "$ref": "ContainerInfo", + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." + } + }, + "id": "Deployment" + }, + "Volume": { + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + }, + "sizeGb": { + "format": "double", + "description": "Volume size in gigabytes.", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + } + }, + "id": "Volume" + }, + "BatchUpdateIngressRulesResponse": { + "properties": { + "ingressRules": { + "description": "The full list of ingress FirewallRules for this application.", + "items": { + "$ref": "FirewallRule" + }, + "type": "array" + } + }, + "id": "BatchUpdateIngressRulesResponse", + "description": "Response message for Firewall.UpdateAllIngressRules.", "type": "object" } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", - "version": "v1", - "baseUrl": "https://appengine.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/appengine.admin": { - "description": "View and manage your applications deployed on Google App Engine" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - } + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "version": "v1" } diff --git a/vendor/google.golang.org/api/appengine/v1/appengine-gen.go b/vendor/google.golang.org/api/appengine/v1/appengine-gen.go index 239717eb1..647fc90f6 100644 --- a/vendor/google.golang.org/api/appengine/v1/appengine-gen.go +++ b/vendor/google.golang.org/api/appengine/v1/appengine-gen.go @@ -86,6 +86,7 @@ func NewAppsService(s *APIService) *AppsService { rs.AuthorizedCertificates = NewAppsAuthorizedCertificatesService(s) rs.AuthorizedDomains = NewAppsAuthorizedDomainsService(s) rs.DomainMappings = NewAppsDomainMappingsService(s) + rs.Firewall = NewAppsFirewallService(s) rs.Locations = NewAppsLocationsService(s) rs.Operations = NewAppsOperationsService(s) rs.Services = NewAppsServicesService(s) @@ -101,6 +102,8 @@ type AppsService struct { DomainMappings *AppsDomainMappingsService + Firewall *AppsFirewallService + Locations *AppsLocationsService Operations *AppsOperationsService @@ -135,6 +138,27 @@ type AppsDomainMappingsService struct { s *APIService } +func NewAppsFirewallService(s *APIService) *AppsFirewallService { + rs := &AppsFirewallService{s: s} + rs.IngressRules = NewAppsFirewallIngressRulesService(s) + return rs +} + +type AppsFirewallService struct { + s *APIService + + IngressRules *AppsFirewallIngressRulesService +} + +func NewAppsFirewallIngressRulesService(s *APIService) *AppsFirewallIngressRulesService { + rs := &AppsFirewallIngressRulesService{s: s} + return rs +} + +type AppsFirewallIngressRulesService struct { + s *APIService +} + func NewAppsLocationsService(s *APIService) *AppsLocationsService { rs := &AppsLocationsService{s: s} return rs @@ -613,6 +637,69 @@ func (s *BasicScaling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BatchUpdateIngressRulesRequest: Request message for +// Firewall.BatchUpdateIngressRules. +type BatchUpdateIngressRulesRequest struct { + // IngressRules: A list of FirewallRules to replace the existing set. + IngressRules []*FirewallRule `json:"ingressRules,omitempty"` + + // ForceSendFields is a list of field names (e.g. "IngressRules") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IngressRules") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchUpdateIngressRulesRequest) MarshalJSON() ([]byte, error) { + type noMethod BatchUpdateIngressRulesRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BatchUpdateIngressRulesResponse: Response message for +// Firewall.UpdateAllIngressRules. +type BatchUpdateIngressRulesResponse struct { + // IngressRules: The full list of ingress FirewallRules for this + // application. + IngressRules []*FirewallRule `json:"ingressRules,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "IngressRules") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IngressRules") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BatchUpdateIngressRulesResponse) MarshalJSON() ([]byte, error) { + type noMethod BatchUpdateIngressRulesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CertificateRawData: An SSL certificate obtained from a certificate // authority. type CertificateRawData struct { @@ -1070,6 +1157,66 @@ func (s *FileInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// FirewallRule: A single firewall rule that is evaluated against +// incoming traffic and provides an action to take on matched requests. +type FirewallRule struct { + // Action: The action to take on matched requests. + // + // Possible values: + // "UNSPECIFIED_ACTION" + // "ALLOW" - Matching requests are allowed. + // "DENY" - Matching requests are denied. + Action string `json:"action,omitempty"` + + // Description: An optional string description of this rule. This field + // has a maximum length of 100 characters. + Description string `json:"description,omitempty"` + + // Priority: A positive integer between 1, Int32.MaxValue-1 that defines + // the order of rule evaluation. Rules with the lowest priority are + // evaluated first.A default rule at priority Int32.MaxValue matches all + // IPv4 and IPv6 traffic when no previous rule matches. Only the action + // of this rule can be modified by the user. + Priority int64 `json:"priority,omitempty"` + + // SourceRange: IP address or range, defined using CIDR notation, of + // requests that this rule applies to. You can use the wildcard + // character "*" to match all IPs equivalent to "0/0" and "::/0" + // together. Examples: 192.168.1.1 or 192.168.0.0/16 or 2001:db8::/32 + // or 2001:0db8:0000:0042:0000:8a2e:0370:7334.

Truncation will be + // silently performed on addresses which are not properly truncated. For + // example, 1.2.3.4/24 is accepted as the same address as 1.2.3.0/24. + // Similarly, for IPv6, 2001:db8::1/32 is accepted as the same address + // as 2001:db8::/32. + SourceRange string `json:"sourceRange,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Action") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Action") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *FirewallRule) MarshalJSON() ([]byte, error) { + type noMethod FirewallRule + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // HealthCheck: Health checking configuration for VM instances. // Unhealthy instances are killed and replaced with new instances. Only // applicable for instances in App Engine flexible environment. @@ -1425,6 +1572,43 @@ func (s *ListDomainMappingsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListIngressRulesResponse: Response message for +// Firewall.ListIngressRules. +type ListIngressRulesResponse struct { + // IngressRules: The ingress FirewallRules for this application. + IngressRules []*FirewallRule `json:"ingressRules,omitempty"` + + // NextPageToken: Continuation token for fetching the next page of + // results. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "IngressRules") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "IngressRules") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListIngressRulesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListIngressRulesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListInstancesResponse: Response message for Instances.ListInstances. type ListInstancesResponse struct { // Instances: The instances belonging to the requested version. @@ -5465,6 +5649,919 @@ func (c *AppsDomainMappingsPatchCall) Do(opts ...googleapi.CallOption) (*Operati } +// method id "appengine.apps.firewall.ingressRules.batchUpdate": + +type AppsFirewallIngressRulesBatchUpdateCall struct { + s *APIService + appsId string + batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchUpdate: Replaces the entire firewall ruleset in one bulk +// operation. This overrides and replaces the rules of an existing +// firewall with the new rules.If the final rule does not match traffic +// with the '*' wildcard IP range, then an "allow all" rule is +// explicitly added to the end of the list. +func (r *AppsFirewallIngressRulesService) BatchUpdate(appsId string, batchupdateingressrulesrequest *BatchUpdateIngressRulesRequest) *AppsFirewallIngressRulesBatchUpdateCall { + c := &AppsFirewallIngressRulesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.batchupdateingressrulesrequest = batchupdateingressrulesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsFirewallIngressRulesBatchUpdateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesBatchUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsFirewallIngressRulesBatchUpdateCall) Context(ctx context.Context) *AppsFirewallIngressRulesBatchUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsFirewallIngressRulesBatchUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsFirewallIngressRulesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdateingressrulesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules:batchUpdate") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.firewall.ingressRules.batchUpdate" call. +// Exactly one of *BatchUpdateIngressRulesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *BatchUpdateIngressRulesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsFirewallIngressRulesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateIngressRulesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &BatchUpdateIngressRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list.", + // "flatPath": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", + // "httpMethod": "POST", + // "id": "appengine.apps.firewall.ingressRules.batchUpdate", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/firewall/ingressRules:batchUpdate", + // "request": { + // "$ref": "BatchUpdateIngressRulesRequest" + // }, + // "response": { + // "$ref": "BatchUpdateIngressRulesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.firewall.ingressRules.create": + +type AppsFirewallIngressRulesCreateCall struct { + s *APIService + appsId string + firewallrule *FirewallRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a firewall rule for the application. +func (r *AppsFirewallIngressRulesService) Create(appsId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesCreateCall { + c := &AppsFirewallIngressRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.firewallrule = firewallrule + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsFirewallIngressRulesCreateCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsFirewallIngressRulesCreateCall) Context(ctx context.Context) *AppsFirewallIngressRulesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsFirewallIngressRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsFirewallIngressRulesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.firewall.ingressRules.create" call. +// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *FirewallRule.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AppsFirewallIngressRulesCreateCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &FirewallRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a firewall rule for the application.", + // "flatPath": "v1/apps/{appsId}/firewall/ingressRules", + // "httpMethod": "POST", + // "id": "appengine.apps.firewall.ingressRules.create", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/firewall/ingressRules", + // "request": { + // "$ref": "FirewallRule" + // }, + // "response": { + // "$ref": "FirewallRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.firewall.ingressRules.delete": + +type AppsFirewallIngressRulesDeleteCall struct { + s *APIService + appsId string + ingressRulesId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified firewall rule. +func (r *AppsFirewallIngressRulesService) Delete(appsId string, ingressRulesId string) *AppsFirewallIngressRulesDeleteCall { + c := &AppsFirewallIngressRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.ingressRulesId = ingressRulesId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsFirewallIngressRulesDeleteCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsFirewallIngressRulesDeleteCall) Context(ctx context.Context) *AppsFirewallIngressRulesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsFirewallIngressRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsFirewallIngressRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "ingressRulesId": c.ingressRulesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.firewall.ingressRules.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *AppsFirewallIngressRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified firewall rule.", + // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + // "httpMethod": "DELETE", + // "id": "appengine.apps.firewall.ingressRules.delete", + // "parameterOrder": [ + // "appsId", + // "ingressRulesId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "ingressRulesId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "appengine.apps.firewall.ingressRules.get": + +type AppsFirewallIngressRulesGetCall struct { + s *APIService + appsId string + ingressRulesId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the specified firewall rule. +func (r *AppsFirewallIngressRulesService) Get(appsId string, ingressRulesId string) *AppsFirewallIngressRulesGetCall { + c := &AppsFirewallIngressRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.ingressRulesId = ingressRulesId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsFirewallIngressRulesGetCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AppsFirewallIngressRulesGetCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsFirewallIngressRulesGetCall) Context(ctx context.Context) *AppsFirewallIngressRulesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsFirewallIngressRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsFirewallIngressRulesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "ingressRulesId": c.ingressRulesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.firewall.ingressRules.get" call. +// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *FirewallRule.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AppsFirewallIngressRulesGetCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &FirewallRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified firewall rule.", + // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + // "httpMethod": "GET", + // "id": "appengine.apps.firewall.ingressRules.get", + // "parameterOrder": [ + // "appsId", + // "ingressRulesId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "ingressRulesId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + // "response": { + // "$ref": "FirewallRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// method id "appengine.apps.firewall.ingressRules.list": + +type AppsFirewallIngressRulesListCall struct { + s *APIService + appsId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the firewall rules of an application. +func (r *AppsFirewallIngressRulesService) List(appsId string) *AppsFirewallIngressRulesListCall { + c := &AppsFirewallIngressRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + return c +} + +// MatchingAddress sets the optional parameter "matchingAddress": A +// valid IP Address. If set, only rules matching this address will be +// returned. The first returned rule will be the rule that fires on +// requests from this IP. +func (c *AppsFirewallIngressRulesListCall) MatchingAddress(matchingAddress string) *AppsFirewallIngressRulesListCall { + c.urlParams_.Set("matchingAddress", matchingAddress) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum results to +// return per page. +func (c *AppsFirewallIngressRulesListCall) PageSize(pageSize int64) *AppsFirewallIngressRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Continuation token +// for fetching the next page of results. +func (c *AppsFirewallIngressRulesListCall) PageToken(pageToken string) *AppsFirewallIngressRulesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsFirewallIngressRulesListCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *AppsFirewallIngressRulesListCall) IfNoneMatch(entityTag string) *AppsFirewallIngressRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsFirewallIngressRulesListCall) Context(ctx context.Context) *AppsFirewallIngressRulesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsFirewallIngressRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsFirewallIngressRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.firewall.ingressRules.list" call. +// Exactly one of *ListIngressRulesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListIngressRulesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *AppsFirewallIngressRulesListCall) Do(opts ...googleapi.CallOption) (*ListIngressRulesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListIngressRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the firewall rules of an application.", + // "flatPath": "v1/apps/{appsId}/firewall/ingressRules", + // "httpMethod": "GET", + // "id": "appengine.apps.firewall.ingressRules.list", + // "parameterOrder": [ + // "appsId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "matchingAddress": { + // "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum results to return per page.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Continuation token for fetching the next page of results.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/firewall/ingressRules", + // "response": { + // "$ref": "ListIngressRulesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/appengine.admin", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *AppsFirewallIngressRulesListCall) Pages(ctx context.Context, f func(*ListIngressRulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "appengine.apps.firewall.ingressRules.patch": + +type AppsFirewallIngressRulesPatchCall struct { + s *APIService + appsId string + ingressRulesId string + firewallrule *FirewallRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified firewall rule. +func (r *AppsFirewallIngressRulesService) Patch(appsId string, ingressRulesId string, firewallrule *FirewallRule) *AppsFirewallIngressRulesPatchCall { + c := &AppsFirewallIngressRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.appsId = appsId + c.ingressRulesId = ingressRulesId + c.firewallrule = firewallrule + return c +} + +// UpdateMask sets the optional parameter "updateMask": Standard field +// mask for the set of fields to be updated. +func (c *AppsFirewallIngressRulesPatchCall) UpdateMask(updateMask string) *AppsFirewallIngressRulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AppsFirewallIngressRulesPatchCall) Fields(s ...googleapi.Field) *AppsFirewallIngressRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *AppsFirewallIngressRulesPatchCall) Context(ctx context.Context) *AppsFirewallIngressRulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *AppsFirewallIngressRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *AppsFirewallIngressRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallrule) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "appsId": c.appsId, + "ingressRulesId": c.ingressRulesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.apps.firewall.ingressRules.patch" call. +// Exactly one of *FirewallRule or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *FirewallRule.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *AppsFirewallIngressRulesPatchCall) Do(opts ...googleapi.CallOption) (*FirewallRule, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &FirewallRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified firewall rule.", + // "flatPath": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + // "httpMethod": "PATCH", + // "id": "appengine.apps.firewall.ingressRules.patch", + // "parameterOrder": [ + // "appsId", + // "ingressRulesId" + // ], + // "parameters": { + // "appsId": { + // "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "ingressRulesId": { + // "description": "Part of `name`. See documentation of `appsId`.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Standard field mask for the set of fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + // "request": { + // "$ref": "FirewallRule" + // }, + // "response": { + // "$ref": "FirewallRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "appengine.apps.locations.get": type AppsLocationsGetCall struct { diff --git a/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json b/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json index 97dd7a950..afb9b9ac5 100644 --- a/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1alpha/appengine-api.json @@ -1,11 +1,11 @@ { "batchPath": "batch", + "revision": "20170926", "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "revision": "20170912", "id": "appengine:v1alpha", "title": "Google App Engine Admin API", - "discoveryVersion": "v1", "ownerName": "Google", + "discoveryVersion": "v1", "resources": { "apps": { "resources": { @@ -20,30 +20,30 @@ "appsId" ], "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + } + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - } - }, "flatPath": "v1alpha/apps/{appsId}/authorizedDomains", "id": "appengine.apps.authorizedDomains.list", "path": "v1alpha/apps/{appsId}/authorizedDomains" @@ -53,86 +53,86 @@ "operations": { "methods": { "get": { - "flatPath": "v1alpha/apps/{appsId}/operations/{operationsId}", - "id": "appengine.apps.operations.get", "path": "v1alpha/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get", "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "response": { - "$ref": "Operation" - }, + "httpMethod": "GET", "parameterOrder": [ "appsId", "operationsId" ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], + "response": { + "$ref": "Operation" + }, "parameters": { - "operationsId": { + "appsId": { "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", + "description": "Part of `name`. The name of the operation resource.", "type": "string", "required": true }, - "appsId": { - "description": "Part of `name`. The name of the operation resource.", + "operationsId": { + "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" } - } - }, - "list": { - "response": { - "$ref": "ListOperationsResponse" }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], + "flatPath": "v1alpha/apps/{appsId}/operations/{operationsId}" + }, + "list": { + "flatPath": "v1alpha/apps/{appsId}/operations", + "path": "v1alpha/apps/{appsId}/operations", + "id": "appengine.apps.operations.list", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListOperationsResponse" + }, "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, "pageToken": { "description": "The standard list page token.", "type": "string", "location": "query" }, "appsId": { + "location": "path", "description": "Part of `name`. The name of the operation's parent resource.", "type": "string", - "required": true, - "location": "path" + "required": true }, "pageSize": { + "location": "query", "format": "int32", "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" + "type": "integer" } }, - "flatPath": "v1alpha/apps/{appsId}/operations", - "id": "appengine.apps.operations.list", - "path": "v1alpha/apps/{appsId}/operations", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id." + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] } } }, "locations": { "methods": { "get": { - "httpMethod": "GET", + "description": "Get information about a location.", "response": { "$ref": "Location" }, @@ -140,86 +140,88 @@ "appsId", "locationsId" ], + "httpMethod": "GET", + "parameters": { + "locationsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true + } + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "parameters": { - "locationsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Resource name for the location.", - "type": "string", - "required": true, - "location": "path" - } - }, "flatPath": "v1alpha/apps/{appsId}/locations/{locationsId}", - "path": "v1alpha/apps/{appsId}/locations/{locationsId}", "id": "appengine.apps.locations.get", - "description": "Get information about a location." + "path": "v1alpha/apps/{appsId}/locations/{locationsId}" }, "list": { "description": "Lists information about the supported locations for this service.", - "httpMethod": "GET", "response": { "$ref": "ListLocationsResponse" }, "parameterOrder": [ "appsId" ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, "filter": { "location": "query", "description": "The standard list filter.", "type": "string" }, "pageToken": { + "location": "query", "description": "The standard list page token.", - "type": "string", - "location": "query" + "type": "string" }, "appsId": { + "location": "path", "description": "Part of `name`. The resource that owns the locations collection, if applicable.", "type": "string", - "required": true, - "location": "path" + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "flatPath": "v1alpha/apps/{appsId}/locations", - "path": "v1alpha/apps/{appsId}/locations", - "id": "appengine.apps.locations.list" + "id": "appengine.apps.locations.list", + "path": "v1alpha/apps/{appsId}/locations" } } }, "domainMappings": { "methods": { "delete": { + "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.delete", "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", - "response": { - "$ref": "Operation" - }, + "httpMethod": "DELETE", "parameterOrder": [ "appsId", "domainMappingsId" ], - "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, "parameters": { "appsId": { "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", @@ -228,32 +230,30 @@ "location": "path" }, "domainMappingsId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.delete", - "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}" + "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}" }, "patch": { "request": { "$ref": "DomainMapping" }, "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", - "httpMethod": "PATCH", + "response": { + "$ref": "Operation" + }, "parameterOrder": [ "appsId", "domainMappingsId" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "PATCH", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], @@ -277,25 +277,25 @@ "required": true }, "noManagedCertificate": { + "location": "query", "description": "Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated. Only applicable if ssl_settings.certificate_id is specified in the update mask.", - "type": "boolean", - "location": "query" + "type": "boolean" } }, "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", - "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.patch" + "id": "appengine.apps.domainMappings.patch", + "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}" }, "get": { "description": "Gets the specified domain mapping.", - "response": { - "$ref": "DomainMapping" - }, + "httpMethod": "GET", "parameterOrder": [ "appsId", "domainMappingsId" ], - "httpMethod": "GET", + "response": { + "$ref": "DomainMapping" + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", @@ -316,10 +316,11 @@ } }, "flatPath": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.get", - "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}" + "path": "v1alpha/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.get" }, "list": { + "description": "Lists the domain mappings on an application.", "response": { "$ref": "ListDomainMappingsResponse" }, @@ -334,9 +335,9 @@ ], "parameters": { "pageToken": { + "location": "query", "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" + "type": "string" }, "appsId": { "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", @@ -345,54 +346,56 @@ "location": "path" }, "pageSize": { + "location": "query", "format": "int32", "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" + "type": "integer" } }, "flatPath": "v1alpha/apps/{appsId}/domainMappings", "id": "appengine.apps.domainMappings.list", - "path": "v1alpha/apps/{appsId}/domainMappings", - "description": "Lists the domain mappings on an application." + "path": "v1alpha/apps/{appsId}/domainMappings" }, "create": { - "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", - "request": { - "$ref": "DomainMapping" - }, - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "appsId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "noManagedCertificate": { - "description": "Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manaually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated.", - "type": "boolean", - "location": "query" - }, "appsId": { "location": "path", "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", "type": "string", "required": true + }, + "noManagedCertificate": { + "description": "Whether a managed certificate should be provided by App Engine. If true, a certificate ID must be manaually set in the DomainMapping resource to configure SSL for this domain. If false, a managed certificate will be provisioned and a certificate ID will be automatically populated.", + "type": "boolean", + "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1alpha/apps/{appsId}/domainMappings", + "path": "v1alpha/apps/{appsId}/domainMappings", "id": "appengine.apps.domainMappings.create", - "path": "v1alpha/apps/{appsId}/domainMappings" + "request": { + "$ref": "DomainMapping" + }, + "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains." } } }, "authorizedCertificates": { "methods": { "create": { + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.create", + "path": "v1alpha/apps/{appsId}/authorizedCertificates", "request": { "$ref": "AuthorizedCertificate" }, @@ -409,72 +412,61 @@ ], "parameters": { "appsId": { + "location": "path", "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", "type": "string", - "required": true, - "location": "path" + "required": true } - }, - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.create", - "path": "v1alpha/apps/{appsId}/authorizedCertificates" + } }, "delete": { + "id": "appengine.apps.authorizedCertificates.delete", + "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", "description": "Deletes the specified SSL certificate.", - "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, "parameterOrder": [ "appsId", "authorizedCertificatesId" ], - "response": { - "$ref": "Empty" - }, + "httpMethod": "DELETE", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "authorizedCertificatesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, "appsId": { "location": "path", "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", "type": "string", "required": true - } - }, - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.delete" - }, - "patch": { - "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.patch", - "request": { - "$ref": "AuthorizedCertificate" - }, - "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "authorizedCertificatesId" - ], - "response": { - "$ref": "AuthorizedCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { + }, "authorizedCertificatesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true - }, + } + }, + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" + }, + "patch": { + "request": { + "$ref": "AuthorizedCertificate" + }, + "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { "updateMask": { "location": "query", "format": "google-fieldmask", @@ -482,16 +474,23 @@ "type": "string" }, "appsId": { - "location": "path", "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", "type": "string", - "required": true + "required": true, + "location": "path" + }, + "authorizedCertificatesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" } }, - "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" + "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.patch", + "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" }, "get": { - "description": "Gets the specified SSL certificate.", "response": { "$ref": "AuthorizedCertificate" }, @@ -506,57 +505,64 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "parameters": { - "view": { - "description": "Controls the set of fields returned in the GET response.", + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", "type": "string", + "required": true + }, + "view": { "location": "query", "enum": [ "BASIC_CERTIFICATE", "FULL_CERTIFICATE" - ] + ], + "description": "Controls the set of fields returned in the GET response.", + "type": "string" }, "authorizedCertificatesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", - "type": "string", - "required": true, - "location": "path" } }, "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", "id": "appengine.apps.authorizedCertificates.get", - "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" + "path": "v1alpha/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "description": "Gets the specified SSL certificate." }, "list": { - "httpMethod": "GET", + "description": "Lists all SSL certificates the user is authorized to administer.", "response": { "$ref": "ListAuthorizedCertificatesResponse" }, "parameterOrder": [ "appsId" ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { "pageToken": { + "location": "query", "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" + "type": "string" }, "appsId": { - "location": "path", "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", "type": "string", - "required": true + "required": true, + "location": "path" }, "pageSize": { + "location": "query", "format": "int32", "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" + "type": "integer" }, "view": { "enum": [ @@ -568,15 +574,9 @@ "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "flatPath": "v1alpha/apps/{appsId}/authorizedCertificates", - "path": "v1alpha/apps/{appsId}/authorizedCertificates", "id": "appengine.apps.authorizedCertificates.list", - "description": "Lists all SSL certificates the user is authorized to administer." + "path": "v1alpha/apps/{appsId}/authorizedCertificates" } } } @@ -584,32 +584,11 @@ } }, "parameters": { - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "description": "OAuth bearer token.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, "prettyPrint": { "location": "query", "description": "Returns response with indentations and line breaks.", @@ -626,11 +605,6 @@ "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, "$.xgafv": { "enumDescriptions": [ "v1 error format", @@ -644,7 +618,18 @@ "description": "V1 error format.", "type": "string" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", "description": "Data format for response.", "default": "json", "enum": [ @@ -652,435 +637,45 @@ "media", "proto" ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" + "type": "string" }, "access_token": { + "location": "query", "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", "type": "string", "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" } }, "schemas": { - "OperationMetadataV1Alpha": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Alpha" - }, - "OperationMetadataExperimental": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataExperimental" - }, - "Status": { - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status", - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object" - }, - "AuthorizedDomain": { - "properties": { - "name": { - "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", - "type": "string" - }, - "id": { - "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", - "type": "string" - } - }, - "id": "AuthorizedDomain", - "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", - "type": "object" - }, - "ListAuthorizedDomainsResponse": { - "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "domains": { - "description": "The authorized domains belonging to the user.", - "items": { - "$ref": "AuthorizedDomain" - }, - "type": "array" - } - }, - "id": "ListAuthorizedDomainsResponse" - }, - "LocationMetadata": { - "properties": { - "flexibleEnvironmentAvailable": { - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - } - }, - "id": "LocationMetadata", - "description": "Metadata for the given google.cloud.location.Location.", - "type": "object" - }, - "DomainMapping": { - "description": "A domain serving an App Engine application.", - "type": "object", - "properties": { - "sslSettings": { - "$ref": "SslSettings", - "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL." - }, - "name": { - "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", - "type": "string" - }, - "resourceRecords": { - "description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.@OutputOnly", - "items": { - "$ref": "ResourceRecord" - }, - "type": "array" - }, - "id": { - "description": "Relative name of the domain serving the application. Example: example.com.", - "type": "string" - } - }, - "id": "DomainMapping" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "OperationMetadataV1Beta": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta" - }, - "Location": { - "properties": { - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object" - }, - "labels": { - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "Location", - "description": "A resource that represents Google Cloud Platform location.", - "type": "object" - }, - "AuthorizedCertificate": { - "properties": { - "domainNames": { - "description": "Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", - "type": "string" - }, - "displayName": { - "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", - "type": "string" - }, - "managedCertificate": { - "$ref": "ManagedCertificate", - "description": "Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.@OutputOnly" - }, - "certificateRawData": { - "$ref": "CertificateRawData", - "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority." - }, - "visibleDomainMappings": { - "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "expireTime": { - "format": "google-datetime", - "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", - "type": "string" - }, - "name": { - "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", - "type": "string" - }, - "domainMappingsCount": { - "format": "int32", - "description": "Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "type": "integer" - } - }, - "id": "AuthorizedCertificate", - "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", - "type": "object" - }, - "ResourceRecord": { - "description": "A DNS resource record.", - "type": "object", - "properties": { - "name": { - "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", - "type": "string" - }, - "type": { - "enumDescriptions": [ - "An A resource record. Data is an IPv4 address.", - "An AAAA resource record. Data is an IPv6 address.", - "A CNAME resource record. Data is a domain name to be aliased." - ], - "enum": [ - "A", - "AAAA", - "CNAME" - ], - "description": "Resource record type. Example: AAAA.", - "type": "string" - }, - "rrdata": { - "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", - "type": "string" - } - }, - "id": "ResourceRecord" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadata" - }, - "ListAuthorizedCertificatesResponse": { - "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "certificates": { - "description": "The SSL certificates the user is authorized to administer.", - "items": { - "$ref": "AuthorizedCertificate" - }, - "type": "array" - } - }, - "id": "ListAuthorizedCertificatesResponse" - }, "OperationMetadataV1Beta5": { "description": "Metadata for the given google.longrunning.Operation.", "type": "object", "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, "target": { "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" @@ -1092,37 +687,40 @@ "method": { "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" } }, "id": "OperationMetadataV1Beta5" }, "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" } }, - "id": "ListLocationsResponse" + "id": "ListLocationsResponse", + "description": "The response message for Locations.ListLocations.", + "type": "object" }, "ManagedCertificate": { - "description": "A certificate managed by App Engine.", - "type": "object", "properties": { - "lastRenewalTime": { - "format": "google-datetime", - "description": "Time at which the certificate was last renewed. The renewal process is fully managed. Certificate renewal will automatically occur before the certificate expires. Renewal errors can be tracked via ManagementStatus.@OutputOnly", - "type": "string" - }, "status": { "description": "Status of certificate management. Refers to the most recent certificate acquisition or renewal attempt.@OutputOnly", "type": "string", @@ -1142,11 +740,35 @@ "FAILED_RETRYING_NOT_VISIBLE", "FAILED_PERMANENTLY_NOT_VISIBLE" ] + }, + "lastRenewalTime": { + "format": "google-datetime", + "description": "Time at which the certificate was last renewed. The renewal process is fully managed. Certificate renewal will automatically occur before the certificate expires. Renewal errors can be tracked via ManagementStatus.@OutputOnly", + "type": "string" } }, - "id": "ManagedCertificate" + "id": "ManagedCertificate", + "description": "A certificate managed by App Engine.", + "type": "object" + }, + "CertificateRawData": { + "properties": { + "privateKey": { + "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN RSA PRIVATE KEY----- \u003cunencrypted_key_value\u003e -----END RSA PRIVATE KEY----- \u003c/pre\u003e @InputOnly", + "type": "string" + }, + "publicCertificate": { + "description": "PEM encoded x.509 public key certificate. This field is set once on certificate creation. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN CERTIFICATE----- \u003ccertificate_value\u003e -----END CERTIFICATE----- \u003c/pre\u003e", + "type": "string" + } + }, + "id": "CertificateRawData", + "description": "An SSL certificate obtained from a certificate authority.", + "type": "object" }, "OperationMetadataV1": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", "properties": { "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", @@ -1182,11 +804,11 @@ "type": "string" } }, - "id": "OperationMetadataV1", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" + "id": "OperationMetadataV1" }, "SslSettings": { + "description": "SSL configuration for a DomainMapping resource.", + "type": "object", "properties": { "isManagedCertificate": { "description": "Whether the mapped certificate is an App Engine managed certificate. Managed certificates are created by default with a domain mapping. To opt out, specify no_managed_certificate on a CREATE or UPDATE request.@OutputOnly", @@ -1197,26 +819,11 @@ "type": "string" } }, - "id": "SslSettings", - "description": "SSL configuration for a DomainMapping resource.", - "type": "object" - }, - "CertificateRawData": { - "description": "An SSL certificate obtained from a certificate authority.", - "type": "object", - "properties": { - "privateKey": { - "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN RSA PRIVATE KEY----- \u003cunencrypted_key_value\u003e -----END RSA PRIVATE KEY----- \u003c/pre\u003e @InputOnly", - "type": "string" - }, - "publicCertificate": { - "description": "PEM encoded x.509 public key certificate. This field is set once on certificate creation. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN CERTIFICATE----- \u003ccertificate_value\u003e -----END CERTIFICATE----- \u003c/pre\u003e", - "type": "string" - } - }, - "id": "CertificateRawData" + "id": "SslSettings" }, "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", "properties": { "done": { "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", @@ -1247,9 +854,7 @@ "type": "object" } }, - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object" + "id": "Operation" }, "ListDomainMappingsResponse": { "description": "Response message for DomainMappings.ListDomainMappings.", @@ -1268,13 +873,408 @@ } }, "id": "ListDomainMappingsResponse" + }, + "OperationMetadataExperimental": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataExperimental" + }, + "OperationMetadataV1Alpha": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Alpha" + }, + "AuthorizedDomain": { + "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", + "type": "string" + }, + "name": { + "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", + "type": "string" + } + }, + "id": "AuthorizedDomain" + }, + "ListAuthorizedDomainsResponse": { + "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "domains": { + "description": "The authorized domains belonging to the user.", + "items": { + "$ref": "AuthorizedDomain" + }, + "type": "array" + } + }, + "id": "ListAuthorizedDomainsResponse" + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "DomainMapping": { + "description": "A domain serving an App Engine application.", + "type": "object", + "properties": { + "sslSettings": { + "$ref": "SslSettings", + "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL." + }, + "name": { + "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", + "type": "string" + }, + "resourceRecords": { + "description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.@OutputOnly", + "items": { + "$ref": "ResourceRecord" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the domain serving the application. Example: example.com.", + "type": "string" + } + }, + "id": "DomainMapping" + }, + "LocationMetadata": { + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object", + "properties": { + "flexibleEnvironmentAvailable": { + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean" + }, + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" + } + }, + "id": "LocationMetadata" + }, + "OperationMetadataV1Beta": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta" + }, + "Location": { + "properties": { + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + } + }, + "id": "Location", + "description": "A resource that represents Google Cloud Platform location.", + "type": "object" + }, + "AuthorizedCertificate": { + "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", + "type": "object", + "properties": { + "displayName": { + "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", + "type": "string" + }, + "certificateRawData": { + "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.", + "$ref": "CertificateRawData" + }, + "managedCertificate": { + "description": "Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.@OutputOnly", + "$ref": "ManagedCertificate" + }, + "visibleDomainMappings": { + "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "format": "google-datetime", + "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", + "type": "string" + }, + "domainMappingsCount": { + "format": "int32", + "description": "Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "type": "integer" + }, + "domainNames": { + "description": "Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", + "type": "string" + } + }, + "id": "AuthorizedCertificate" + }, + "ResourceRecord": { + "description": "A DNS resource record.", + "type": "object", + "properties": { + "rrdata": { + "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", + "type": "string" + }, + "name": { + "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", + "type": "string" + }, + "type": { + "enum": [ + "A", + "AAAA", + "CNAME" + ], + "description": "Resource record type. Example: AAAA.", + "type": "string", + "enumDescriptions": [ + "An A resource record. Data is an IPv4 address.", + "An AAAA resource record. Data is an IPv6 address.", + "A CNAME resource record. Data is a domain name to be aliased." + ] + } + }, + "id": "ResourceRecord" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "ListAuthorizedCertificatesResponse": { + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "certificates": { + "description": "The SSL certificates the user is authorized to administer.", + "items": { + "$ref": "AuthorizedCertificate" + }, + "type": "array" + } + }, + "id": "ListAuthorizedCertificatesResponse", + "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", + "type": "object" } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "version": "v1alpha", "baseUrl": "https://appengine.googleapis.com/", "auth": { @@ -1292,9 +1292,9 @@ } } }, - "servicePath": "", - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", "kind": "discovery#restDescription", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "servicePath": "", "rootUrl": "https://appengine.googleapis.com/", "basePath": "", "ownerDomain": "google.com", diff --git a/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json b/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json index b14a09d71..0f271e19c 100644 --- a/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1beta/appengine-api.json @@ -1,6 +1,2489 @@ { + "servicePath": "", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "kind": "discovery#restDescription", + "rootUrl": "https://appengine.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "revision": "20170926", + "id": "appengine:v1beta", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "title": "Google App Engine Admin API", + "ownerName": "Google", + "discoveryVersion": "v1", + "resources": { + "apps": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Get information about a location.", + "parameterOrder": [ + "appsId", + "locationsId" + ], + "httpMethod": "GET", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true, + "location": "path" + }, + "locationsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "path": "v1beta/apps/{appsId}/locations/{locationsId}" + }, + "list": { + "flatPath": "v1beta/apps/{appsId}/locations", + "path": "v1beta/apps/{appsId}/locations", + "id": "appengine.apps.locations.list", + "description": "Lists information about the supported locations for this service.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true + }, + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + } + } + } + } + }, + "authorizedCertificates": { + "methods": { + "create": { + "description": "Uploads the specified SSL certificate.", + "request": { + "$ref": "AuthorizedCertificate" + }, + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", + "path": "v1beta/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.create" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "authorizedCertificatesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.delete", + "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "description": "Deletes the specified SSL certificate." + }, + "patch": { + "request": { + "$ref": "AuthorizedCertificate" + }, + "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "authorizedCertificatesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.", + "type": "string" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.patch", + "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" + }, + "get": { + "response": { + "$ref": "AuthorizedCertificate" + }, + "parameterOrder": [ + "appsId", + "authorizedCertificatesId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "authorizedCertificatesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", + "type": "string", + "required": true, + "location": "path" + }, + "view": { + "enum": [ + "BASIC_CERTIFICATE", + "FULL_CERTIFICATE" + ], + "description": "Controls the set of fields returned in the GET response.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "id": "appengine.apps.authorizedCertificates.get", + "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", + "description": "Gets the specified SSL certificate." + }, + "list": { + "description": "Lists all SSL certificates the user is authorized to administer.", + "response": { + "$ref": "ListAuthorizedCertificatesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "BASIC_CERTIFICATE", + "FULL_CERTIFICATE" + ], + "description": "Controls the set of fields returned in the LIST response.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", + "id": "appengine.apps.authorizedCertificates.list", + "path": "v1beta/apps/{appsId}/authorizedCertificates" + } + } + }, + "services": { + "resources": { + "versions": { + "methods": { + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", + "type": "string", + "required": true + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.patch", + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.", + "request": { + "$ref": "Version" + } + }, + "get": { + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", + "httpMethod": "GET", + "response": { + "$ref": "Version" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the Get response.", + "type": "string" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "ListVersionsResponse" + }, + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the List response.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.list", + "description": "Lists the versions of a service." + }, + "create": { + "description": "Deploys code and resource files to a new version.", + "request": { + "$ref": "Version" + }, + "httpMethod": "POST", + "parameterOrder": [ + "appsId", + "servicesId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "servicesId": { + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", + "id": "appengine.apps.services.versions.create" + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete", + "description": "Deletes an existing Version resource." + } + }, + "resources": { + "instances": { + "methods": { + "delete": { + "description": "Stops a running instance.", + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "parameters": { + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.delete" + }, + "get": { + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "description": "Gets instance information.", + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "GET", + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "list": { + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "versionsId": { + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "servicesId": { + "location": "path", + "description": "Part of `parent`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "id": "appengine.apps.services.versions.instances.list", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances" + }, + "debug": { + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", + "request": { + "$ref": "DebugInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "POST", + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.services.versions.instances.debug", + "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug" + } + } + } + } + } + }, + "methods": { + "delete": { + "description": "Deletes the specified service and all enclosed versions.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "DELETE", + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "type": "string", + "required": true, + "location": "path" + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.delete", + "path": "v1beta/apps/{appsId}/services/{servicesId}" + }, + "patch": { + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.patch", + "path": "v1beta/apps/{appsId}/services/{servicesId}", + "description": "Updates the configuration of the specified service.", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "PATCH", + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", + "type": "string", + "required": true + }, + "migrateTraffic": { + "location": "query", + "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", + "type": "boolean" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "id": "appengine.apps.services.get", + "path": "v1beta/apps/{appsId}/services/{servicesId}", + "description": "Gets the current configuration of the specified service.", + "response": { + "$ref": "Service" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "GET", + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/services/{servicesId}" + }, + "list": { + "response": { + "$ref": "ListServicesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/services", + "id": "appengine.apps.services.list", + "path": "v1beta/apps/{appsId}/services", + "description": "Lists all the services in the application." + } + } + }, + "authorizedDomains": { + "methods": { + "list": { + "description": "Lists all domains the user is authorized to administer.", + "response": { + "$ref": "ListAuthorizedDomainsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/authorizedDomains", + "id": "appengine.apps.authorizedDomains.list", + "path": "v1beta/apps/{appsId}/authorizedDomains" + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "operationsId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. The name of the operation resource.", + "type": "string", + "required": true, + "location": "path" + }, + "operationsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}", + "path": "v1beta/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get" + }, + "list": { + "id": "appengine.apps.operations.list", + "path": "v1beta/apps/{appsId}/operations", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The name of the operation's parent resource.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/operations" + } + } + }, + "domainMappings": { + "methods": { + "delete": { + "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.delete", + "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "domainMappingsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}" + }, + "patch": { + "request": { + "$ref": "DomainMapping" + }, + "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "domainMappingsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.patch" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "DomainMapping" + }, + "parameterOrder": [ + "appsId", + "domainMappingsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "domainMappingsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", + "id": "appengine.apps.domainMappings.get", + "description": "Gets the specified domain mapping." + }, + "list": { + "path": "v1beta/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.list", + "description": "Lists the domain mappings on an application.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "ListDomainMappingsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1beta/apps/{appsId}/domainMappings" + }, + "create": { + "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains.", + "request": { + "$ref": "DomainMapping" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/domainMappings", + "id": "appengine.apps.domainMappings.create", + "path": "v1beta/apps/{appsId}/domainMappings" + } + } + }, + "firewall": { + "resources": { + "ingressRules": { + "methods": { + "get": { + "response": { + "$ref": "FirewallRule" + }, + "parameterOrder": [ + "appsId", + "ingressRulesId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", + "type": "string", + "required": true + }, + "ingressRulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "id": "appengine.apps.firewall.ingressRules.get", + "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "description": "Gets the specified firewall rule." + }, + "patch": { + "request": { + "$ref": "FirewallRule" + }, + "description": "Updates the specified firewall rule.", + "response": { + "$ref": "FirewallRule" + }, + "parameterOrder": [ + "appsId", + "ingressRulesId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", + "type": "string", + "required": true, + "location": "path" + }, + "ingressRulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "id": "appengine.apps.firewall.ingressRules.patch", + "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}" + }, + "batchUpdate": { + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", + "id": "appengine.apps.firewall.ingressRules.batchUpdate", + "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", + "request": { + "$ref": "BatchUpdateIngressRulesRequest" + }, + "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list.", + "response": { + "$ref": "BatchUpdateIngressRulesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "delete": { + "description": "Deletes the specified firewall rule.", + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "ingressRulesId" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", + "type": "string", + "required": true, + "location": "path" + }, + "ingressRulesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", + "id": "appengine.apps.firewall.ingressRules.delete" + }, + "list": { + "description": "Lists the firewall rules of an application.", + "response": { + "$ref": "ListIngressRulesResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "matchingAddress": { + "location": "query", + "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.", + "type": "string" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true, + "location": "path" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + } + }, + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", + "id": "appengine.apps.firewall.ingressRules.list", + "path": "v1beta/apps/{appsId}/firewall/ingressRules" + }, + "create": { + "description": "Creates a firewall rule for the application.", + "request": { + "$ref": "FirewallRule" + }, + "httpMethod": "POST", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "FirewallRule" + }, + "parameters": { + "appsId": { + "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", + "path": "v1beta/apps/{appsId}/firewall/ingressRules", + "id": "appengine.apps.firewall.ingressRules.create" + } + } + } + } + } + }, + "methods": { + "repair": { + "request": { + "$ref": "RepairApplicationRequest" + }, + "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta/apps/{appsId}:repair", + "id": "appengine.apps.repair", + "path": "v1beta/apps/{appsId}:repair" + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Standard field mask for the set of fields to be updated.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps/{appsId}", + "path": "v1beta/apps/{appsId}", + "id": "appengine.apps.patch", + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application.", + "request": { + "$ref": "Application" + } + }, + "get": { + "response": { + "$ref": "Application" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta/apps/{appsId}", + "id": "appengine.apps.get", + "path": "v1beta/apps/{appsId}", + "description": "Gets information about an application." + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta/apps", + "id": "appengine.apps.create", + "path": "v1beta/apps", + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", + "request": { + "$ref": "Application" + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + } + }, "schemas": { + "AuthorizedDomain": { + "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", + "type": "object", + "properties": { + "id": { + "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", + "type": "string" + }, + "name": { + "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", + "type": "string" + } + }, + "id": "AuthorizedDomain" + }, + "TrafficSplit": { + "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", + "type": "object", + "properties": { + "allocations": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object" + }, + "shardBy": { + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string", + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address.", + "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." + ], + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP", + "RANDOM" + ] + } + }, + "id": "TrafficSplit" + }, + "OperationMetadataV1Beta": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta" + }, + "ListIngressRulesResponse": { + "description": "Response message for Firewall.ListIngressRules.", + "type": "object", + "properties": { + "ingressRules": { + "description": "The ingress FirewallRules for this application.", + "items": { + "$ref": "FirewallRule" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListIngressRulesResponse" + }, + "ListServicesResponse": { + "description": "Response message for Services.ListServices.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "services": { + "description": "The services belonging to the requested application.", + "items": { + "$ref": "Service" + }, + "type": "array" + } + }, + "id": "ListServicesResponse" + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "build": { + "description": "Google Cloud Container Builder build information.", + "$ref": "BuildInfo" + }, + "files": { + "additionalProperties": { + "$ref": "FileInfo" + }, + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object" + }, + "zip": { + "$ref": "ZipInfo", + "description": "The zip file for this deployment, if this is a zip deployment." + }, + "container": { + "$ref": "ContainerInfo", + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." + } + }, + "id": "Deployment" + }, + "Resources": { + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "memoryGb": { + "format": "double", + "description": "Memory (GB) needed.", + "type": "number" + }, + "cpu": { + "format": "double", + "description": "Number of CPU cores needed.", + "type": "number" + }, + "volumes": { + "description": "User specified volumes.", + "items": { + "$ref": "Volume" + }, + "type": "array" + }, + "diskGb": { + "format": "double", + "description": "Disk size (GB) needed.", + "type": "number" + } + }, + "id": "Resources" + }, + "BatchUpdateIngressRulesResponse": { + "properties": { + "ingressRules": { + "description": "The full list of ingress FirewallRules for this application.", + "items": { + "$ref": "FirewallRule" + }, + "type": "array" + } + }, + "id": "BatchUpdateIngressRulesResponse", + "description": "Response message for Firewall.UpdateAllIngressRules.", + "type": "object" + }, + "Volume": { + "properties": { + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + }, + "sizeGb": { + "format": "double", + "description": "Volume size in gigabytes.", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + } + }, + "id": "Volume", + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object" + }, + "ManagedCertificate": { + "properties": { + "lastRenewalTime": { + "format": "google-datetime", + "description": "Time at which the certificate was last renewed. The renewal process is fully managed. Certificate renewal will automatically occur before the certificate expires. Renewal errors can be tracked via ManagementStatus.@OutputOnly", + "type": "string" + }, + "status": { + "enumDescriptions": [ + "", + "Certificate was successfully obtained and inserted into the serving system.", + "Certificate is under active attempts to acquire or renew.", + "Most recent renewal failed due to an invalid DNS setup and will be retried. Renewal attempts will continue to fail until the certificate domain's DNS configuration is fixed. The last successfully provisioned certificate may still be serving.", + "All renewal attempts have been exhausted, likely due to an invalid DNS setup." + ], + "enum": [ + "MANAGEMENT_STATUS_UNSPECIFIED", + "OK", + "PENDING", + "FAILED_RETRYING_NOT_VISIBLE", + "FAILED_PERMANENT" + ], + "description": "Status of certificate management. Refers to the most recent certificate acquisition or renewal attempt.@OutputOnly", + "type": "string" + } + }, + "id": "ManagedCertificate", + "description": "A certificate managed by App Engine.", + "type": "object" + }, + "ListInstancesResponse": { + "description": "Response message for Instances.ListInstances.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "instances": { + "description": "The instances belonging to the requested version.", + "items": { + "$ref": "Instance" + }, + "type": "array" + } + }, + "id": "ListInstancesResponse" + }, + "ListDomainMappingsResponse": { + "description": "Response message for DomainMappings.ListDomainMappings.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "domainMappings": { + "description": "The domain mappings for the application.", + "items": { + "$ref": "DomainMapping" + }, + "type": "array" + } + }, + "id": "ListDomainMappingsResponse" + }, + "OperationMetadataV1Alpha": { + "properties": { + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Alpha", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + }, + "UrlDispatchRule": { + "properties": { + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + }, + "service": { + "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default.", + "type": "string" + }, + "domain": { + "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "type": "string" + } + }, + "id": "UrlDispatchRule", + "description": "Rules to match an HTTP request and dispatch that request to a service.", + "type": "object" + }, + "ListVersionsResponse": { + "description": "Response message for Versions.ListVersions.", + "type": "object", + "properties": { + "versions": { + "description": "The versions belonging to the requested service.", + "items": { + "$ref": "Version" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + } + }, + "id": "ListVersionsResponse" + }, + "ListAuthorizedDomainsResponse": { + "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "domains": { + "description": "The authorized domains belonging to the user.", + "items": { + "$ref": "AuthorizedDomain" + }, + "type": "array" + } + }, + "id": "ListAuthorizedDomainsResponse" + }, + "DomainMapping": { + "description": "A domain serving an App Engine application.", + "type": "object", + "properties": { + "resourceRecords": { + "description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.@OutputOnly", + "items": { + "$ref": "ResourceRecord" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the domain serving the application. Example: example.com.", + "type": "string" + }, + "sslSettings": { + "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL.", + "$ref": "SslSettings" + }, + "name": { + "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", + "type": "string" + } + }, + "id": "DomainMapping" + }, + "Empty": { + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", + "type": "object" + }, + "ApiEndpointHandler": { + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object", + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler" + }, + "AutomaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object", + "properties": { + "diskUtilization": { + "$ref": "DiskUtilization", + "description": "Target scaling by disk usage." + }, + "minPendingLatency": { + "format": "google-duration", + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "maxIdleInstances": { + "format": "int32", + "description": "Maximum number of idle instances that should be maintained for this version.", + "type": "integer" + }, + "standardSchedulerSettings": { + "$ref": "StandardSchedulerSettings", + "description": "Scheduler settings for standard environment." + }, + "requestUtilization": { + "$ref": "RequestUtilization", + "description": "Target scaling by request utilization." + }, + "minIdleInstances": { + "format": "int32", + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", + "type": "integer" + }, + "maxTotalInstances": { + "format": "int32", + "description": "Maximum number of instances that should be started to handle requests.", + "type": "integer" + }, + "minTotalInstances": { + "format": "int32", + "description": "Minimum number of instances that should be maintained for this version.", + "type": "integer" + }, + "networkUtilization": { + "description": "Target scaling by network usage.", + "$ref": "NetworkUtilization" + }, + "coolDownPeriod": { + "format": "google-duration", + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", + "type": "string" + }, + "maxConcurrentRequests": { + "format": "int32", + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "type": "integer" + }, + "maxPendingLatency": { + "format": "google-duration", + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "cpuUtilization": { + "$ref": "CpuUtilization", + "description": "Target scaling by CPU usage." + } + }, + "id": "AutomaticScaling" + }, + "ZipInfo": { + "description": "The zip file information for a zip deployment.", + "type": "object", + "properties": { + "filesCount": { + "format": "int32", + "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", + "type": "integer" + }, + "sourceUrl": { + "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + } + }, + "id": "ZipInfo" + }, + "AuthorizedCertificate": { + "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", + "type": "object", + "properties": { + "displayName": { + "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", + "type": "string" + }, + "certificateRawData": { + "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority.", + "$ref": "CertificateRawData" + }, + "managedCertificate": { + "description": "Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.@OutputOnly", + "$ref": "ManagedCertificate" + }, + "visibleDomainMappings": { + "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "expireTime": { + "format": "google-datetime", + "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", + "type": "string" + }, + "domainMappingsCount": { + "format": "int32", + "description": "Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", + "type": "integer" + }, + "domainNames": { + "description": "Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", + "type": "string" + } + }, + "id": "AuthorizedCertificate" + }, + "ResourceRecord": { + "description": "A DNS resource record.", + "type": "object", + "properties": { + "name": { + "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", + "type": "string" + }, + "type": { + "enumDescriptions": [ + "An A resource record. Data is an IPv4 address.", + "An AAAA resource record. Data is an IPv6 address.", + "A CNAME resource record. Data is a domain name to be aliased." + ], + "enum": [ + "A", + "AAAA", + "CNAME" + ], + "description": "Resource record type. Example: AAAA.", + "type": "string" + }, + "rrdata": { + "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", + "type": "string" + } + }, + "id": "ResourceRecord" + }, + "Library": { + "description": "Third-party Python runtime library that is required by the application.", + "type": "object", + "properties": { + "name": { + "description": "Name of the library. Example: \"django\".", + "type": "string" + }, + "version": { + "description": "Version of the library to select, or \"latest\".", + "type": "string" + } + }, + "id": "Library" + }, + "ListLocationsResponse": { + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + } + }, + "id": "ListLocationsResponse", + "description": "The response message for Locations.ListLocations.", + "type": "object" + }, + "ContainerInfo": { + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object", + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + "type": "string" + } + }, + "id": "ContainerInfo" + }, + "RequestUtilization": { + "properties": { + "targetConcurrentRequests": { + "format": "int32", + "description": "Target number of concurrent requests.", + "type": "integer" + }, + "targetRequestCountPerSecond": { + "format": "int32", + "description": "Target requests per second.", + "type": "integer" + } + }, + "id": "RequestUtilization", + "description": "Target scaling by request utilization. Only applicable for VM runtimes.", + "type": "object" + }, + "UrlMap": { + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object", + "properties": { + "redirectHttpResponseCode": { + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ], + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ], + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string" + }, + "securityLevel": { + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ] + }, + "authFailAction": { + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string", + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ] + }, + "script": { + "description": "Executes a script to handle the request that matches this URL pattern.", + "$ref": "ScriptHandler" + }, + "urlRegex": { + "description": "URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", + "type": "string" + }, + "login": { + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ] + }, + "apiEndpoint": { + "$ref": "ApiEndpointHandler", + "description": "Uses API Endpoints to handle requests." + }, + "staticFiles": { + "description": "Returns the contents of a file, such as an image, as the response.", + "$ref": "StaticFilesHandler" + } + }, + "id": "UrlMap" + }, + "EndpointsApiService": { + "properties": { + "configId": { + "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", + "type": "string" + }, + "name": { + "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", + "type": "string" + } + }, + "id": "EndpointsApiService", + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + } + }, + "id": "Operation" + }, + "ApiConfigHandler": { + "properties": { + "securityLevel": { + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with a 401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + }, + "script": { + "description": "Path to the script from the application root directory.", + "type": "string" + }, + "login": { + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string", + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ] + }, + "url": { + "description": "URL to serve the endpoint at.", + "type": "string" + } + }, + "id": "ApiConfigHandler", + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object" + }, + "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", + "properties": { + "httpHeaders": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object" + }, + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "uploadPathRegex": { + "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", + "type": "string" + }, + "path": { + "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", + "type": "string" + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler.Defaults to file-specific MIME types, which are derived from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + }, + "expiration": { + "format": "google-duration", + "description": "Time a static file served by this handler should be cached by web proxies and browsers.", + "type": "string" + } + }, + "id": "StaticFilesHandler" + }, + "BasicScaling": { + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", + "properties": { + "maxInstances": { + "format": "int32", + "description": "Maximum number of instances to create for this version.", + "type": "integer" + }, + "idleTimeout": { + "format": "google-duration", + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "type": "string" + } + }, + "id": "BasicScaling" + }, + "DiskUtilization": { + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetReadOpsPerSecond": { + "format": "int32", + "description": "Target ops read per seconds.", + "type": "integer" + }, + "targetReadBytesPerSecond": { + "format": "int32", + "description": "Target bytes read per second.", + "type": "integer" + }, + "targetWriteOpsPerSecond": { + "format": "int32", + "description": "Target ops written per second.", + "type": "integer" + }, + "targetWriteBytesPerSecond": { + "format": "int32", + "description": "Target bytes written per second.", + "type": "integer" + } + }, + "id": "DiskUtilization" + }, "CpuUtilization": { + "description": "Target scaling by CPU usage.", + "type": "object", "properties": { "aggregationWindowLength": { "format": "google-duration", @@ -13,45 +2496,12 @@ "type": "number" } }, - "id": "CpuUtilization", - "description": "Target scaling by CPU usage.", - "type": "object" - }, - "Status": { - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - } - }, - "id": "Status" + "id": "CpuUtilization" }, "IdentityAwareProxy": { "description": "Identity-Aware Proxy", "type": "object", "properties": { - "enabled": { - "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", - "type": "boolean" - }, "oauth2ClientSecret": { "description": "OAuth2 client secret to use for the authentication flow.For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", "type": "string" @@ -63,10 +2513,41 @@ "oauth2ClientSecretSha256": { "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", "type": "string" + }, + "enabled": { + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", + "type": "boolean" } }, "id": "IdentityAwareProxy" }, + "Status": { + "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "type": "array" + } + }, + "id": "Status", + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object" + }, "ManualScaling": { "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", "type": "object", @@ -80,8 +2561,6 @@ "id": "ManualScaling" }, "LocationMetadata": { - "description": "Metadata for the given google.cloud.location.Location.", - "type": "object", "properties": { "standardEnvironmentAvailable": { "description": "App Engine Standard Environment is available in the given location.@OutputOnly", @@ -92,15 +2571,17 @@ "type": "boolean" } }, - "id": "LocationMetadata" + "id": "LocationMetadata", + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object" }, "Service": { "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle tasks such as backend data analysis or API requests from mobile devices. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", "type": "object", "properties": { "split": { - "$ref": "TrafficSplit", - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service." + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service.", + "$ref": "TrafficSplit" }, "id": { "description": "Relative name of the service within the application. Example: default.@OutputOnly", @@ -114,8 +2595,6 @@ "id": "Service" }, "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", "properties": { "nextPageToken": { "description": "The standard List next-page token.", @@ -129,40 +2608,9 @@ "type": "array" } }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadata" + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object" }, "FirewallRule": { "description": "A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests.", @@ -198,6 +2646,39 @@ }, "id": "FirewallRule" }, + "OperationMetadata": { + "properties": { + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadata", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + }, "ListAuthorizedCertificatesResponse": { "description": "Response message for AuthorizedCertificates.ListAuthorizedCertificates.", "type": "object", @@ -228,6 +2709,8 @@ "id": "FeatureSettings" }, "ErrorHandler": { + "description": "Custom static error page to be served when an error occurs.", + "type": "object", "properties": { "mimeType": { "description": "MIME type of file. Defaults to text/html.", @@ -256,13 +2739,9 @@ "type": "string" } }, - "id": "ErrorHandler", - "description": "Custom static error page to be served when an error occurs.", - "type": "object" + "id": "ErrorHandler" }, "SslSettings": { - "description": "SSL configuration for a DomainMapping resource.", - "type": "object", "properties": { "pendingManagedCertificateId": { "description": "ID of the managed AuthorizedCertificate resource currently being provisioned, if applicable. Until the new managed certificate has been successfully provisioned, the previous SSL state will be preserved. Once the provisioning process completes, the certificate_id field will reflect the new managed certificate and this field will be left empty. To remove SSL support while there is still a pending managed certificate, clear the certificate_id field with an UpdateDomainMappingRequest.@OutputOnly", @@ -285,15 +2764,14 @@ "type": "string" } }, - "id": "SslSettings" + "id": "SslSettings", + "description": "SSL configuration for a DomainMapping resource.", + "type": "object" }, "OperationMetadataV1": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", "properties": { - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", "items": { @@ -306,14 +2784,14 @@ "description": "Time that this operation was created.@OutputOnly", "type": "string" }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, "target": { "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", "type": "string" }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" @@ -321,18 +2799,19 @@ "method": { "description": "API method that initiated this operation. Example: google.appengine.v1.Versions.CreateVersion.@OutputOnly", "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" } }, - "id": "OperationMetadataV1", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" + "id": "OperationMetadataV1" }, "Application": { - "description": "An Application resource contains the top-level configuration of an App Engine application. Next tag: 20", - "type": "object", "properties": { - "id": { - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "name": { + "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", "type": "string" }, "defaultCookieExpiration": { @@ -340,17 +2819,15 @@ "description": "Cookie expiration policy for this application.", "type": "string" }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" + }, "locationId": { "description": "Location from which this application will be run. Application instances will run out of data centers in the chosen location, which is also where all of the application's end user content is stored.Defaults to us-central.Options are:us-central - Central USeurope-west - Western Europeus-east1 - Eastern US", "type": "string" }, "servingStatus": { - "enumDescriptions": [ - "Serving status is unspecified.", - "Application is serving.", - "Application has been disabled by the user.", - "Application has been disabled by the system." - ], "enum": [ "UNSPECIFIED", "SERVING", @@ -358,23 +2835,29 @@ "SYSTEM_DISABLED" ], "description": "Serving status of this application.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Serving status is unspecified.", + "Application is serving.", + "Application has been disabled by the user.", + "Application has been disabled by the system." + ] }, "defaultHostname": { "description": "Hostname used to reach this application, as resolved by App Engine.@OutputOnly", "type": "string" }, "featureSettings": { - "description": "The feature specific settings to be used in the application.", - "$ref": "FeatureSettings" + "$ref": "FeatureSettings", + "description": "The feature specific settings to be used in the application." + }, + "iap": { + "$ref": "IdentityAwareProxy" }, "authDomain": { "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", "type": "string" }, - "iap": { - "$ref": "IdentityAwareProxy" - }, "codeBucket": { "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly", "type": "string" @@ -393,17 +2876,13 @@ "gcrDomain": { "description": "The Google Container Registry domain used for storing managed build docker images for this application.", "type": "string" - }, - "name": { - "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", - "type": "string" } }, - "id": "Application" + "id": "Application", + "description": "An Application resource contains the top-level configuration of an App Engine application. Next tag: 20", + "type": "object" }, "Network": { - "description": "Extra network settings. Only applicable for App Engine flexible environment versions", - "type": "object", "properties": { "subnetworkName": { "description": "Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path.If a subnetwork name is specified, a network name will also be required unless it is for the default network.\nIf the network the VM instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.\nIf the network the VM instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.\nIf the network the VM instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork.If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.", @@ -425,14 +2904,18 @@ "type": "string" } }, - "id": "Network" + "id": "Network", + "description": "Extra network settings. Only applicable for App Engine flexible environment versions", + "type": "object" }, "Instance": { - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", - "type": "object", "properties": { - "vmId": { - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "appEngineRelease": { + "description": "App Engine release this instance is running on.@OutputOnly", + "type": "string" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, "qps": { @@ -440,27 +2923,31 @@ "description": "Average queries per second (QPS) over the last minute.@OutputOnly", "type": "number" }, - "vmZoneName": { - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, "name": { "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", "type": "string" }, + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, "averageLatency": { "format": "int32", "description": "Average latency (ms) over the last minute.@OutputOnly", "type": "integer" }, - "vmIp": { - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, "id": { "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", "type": "string" }, + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, "memoryUsage": { "format": "int64", "description": "Total memory in use (bytes).@OutputOnly", @@ -502,37 +2989,14 @@ "format": "int32", "description": "Number of requests since this instance was started.@OutputOnly", "type": "integer" - }, - "appEngineRelease": { - "description": "App Engine release this instance is running on.@OutputOnly", - "type": "string" - }, - "vmName": { - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" } }, - "id": "Instance" + "id": "Instance", + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", + "type": "object" }, "LivenessCheck": { - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", - "type": "object", "properties": { - "checkInterval": { - "format": "google-duration", - "description": "Interval between health checks.", - "type": "string" - }, - "timeout": { - "format": "google-duration", - "description": "Time before the check is considered failed.", - "type": "string" - }, - "failureThreshold": { - "format": "uint32", - "description": "Number of consecutive failed checks required before considering the VM unhealthy.", - "type": "integer" - }, "initialDelay": { "format": "google-duration", "description": "The initial delay before starting to execute the checks.", @@ -550,9 +3014,26 @@ "format": "uint32", "description": "Number of consecutive successful checks required before considering the VM healthy.", "type": "integer" + }, + "checkInterval": { + "format": "google-duration", + "description": "Interval between health checks.", + "type": "string" + }, + "timeout": { + "format": "google-duration", + "description": "Time before the check is considered failed.", + "type": "string" + }, + "failureThreshold": { + "format": "uint32", + "description": "Number of consecutive failed checks required before considering the VM unhealthy.", + "type": "integer" } }, - "id": "LivenessCheck" + "id": "LivenessCheck", + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances.", + "type": "object" }, "BatchUpdateIngressRulesRequest": { "description": "Request message for Firewall.BatchUpdateIngressRules.", @@ -568,10 +3049,43 @@ }, "id": "BatchUpdateIngressRulesRequest" }, - "NetworkUtilization": { - "description": "Target scaling by network usage. Only applicable for VM runtimes.", - "type": "object", + "Location": { "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "labels": { + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "id": "Location", + "description": "A resource that represents Google Cloud Platform location.", + "type": "object" + }, + "NetworkUtilization": { + "properties": { + "targetSentBytesPerSecond": { + "format": "int32", + "description": "Target bytes sent per second.", + "type": "integer" + }, "targetReceivedBytesPerSecond": { "format": "int32", "description": "Target bytes received per second.", @@ -586,44 +3100,11 @@ "format": "int32", "description": "Target packets received per second.", "type": "integer" - }, - "targetSentBytesPerSecond": { - "format": "int32", - "description": "Target bytes sent per second.", - "type": "integer" } }, - "id": "NetworkUtilization" - }, - "Location": { - "description": "A resource that represents Google Cloud Platform location.", - "type": "object", - "properties": { - "labels": { - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - } - }, - "id": "Location" + "id": "NetworkUtilization", + "description": "Target scaling by network usage. Only applicable for VM runtimes.", + "type": "object" }, "HealthCheck": { "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", @@ -674,16 +3155,16 @@ "description": "Interval between health checks.", "type": "string" }, - "timeout": { - "format": "google-duration", - "description": "Time before the check is considered failed.", - "type": "string" - }, "failureThreshold": { "format": "uint32", "description": "Number of consecutive failed checks required before removing traffic.", "type": "integer" }, + "timeout": { + "format": "google-duration", + "description": "Time before the check is considered failed.", + "type": "string" + }, "appStartTimeout": { "format": "google-duration", "description": "A maximum time limit on application initialization, measured from moment the application successfully replies to a healthcheck until it is ready to serve traffic.", @@ -706,12 +3187,9 @@ "id": "ReadinessCheck" }, "StandardSchedulerSettings": { + "description": "Scheduler settings for standard environment.", + "type": "object", "properties": { - "targetCpuUtilization": { - "format": "double", - "description": "Target CPU utilization ratio to maintain when scaling.", - "type": "number" - }, "targetThroughputUtilization": { "format": "double", "description": "Target throughput utilization ratio to maintain when scaling", @@ -726,11 +3204,14 @@ "format": "int32", "description": "Minimum number of instances for an app version. Set to a non-positive value (0 by convention) to disable min_instances configuration.", "type": "integer" + }, + "targetCpuUtilization": { + "format": "double", + "description": "Target CPU utilization ratio to maintain when scaling.", + "type": "number" } }, - "id": "StandardSchedulerSettings", - "description": "Scheduler settings for standard environment.", - "type": "object" + "id": "StandardSchedulerSettings" }, "DebugInstanceRequest": { "description": "Request message for Instances.DebugInstance.", @@ -744,17 +3225,7 @@ "id": "DebugInstanceRequest" }, "OperationMetadataV1Beta5": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", "properties": { - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, "method": { "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", "type": "string" @@ -768,66 +3239,40 @@ "format": "google-datetime", "description": "Timestamp that this operation completed.@OutputOnly", "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" } }, - "id": "OperationMetadataV1Beta5" + "id": "OperationMetadataV1Beta5", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" }, "Version": { "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", "type": "object", "properties": { - "handlers": { - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "automaticScaling": { - "$ref": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." - }, - "diskUsageBytes": { - "format": "int64", - "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", - "type": "string" - }, - "healthCheck": { - "$ref": "HealthCheck", - "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." - }, - "threadsafe": { - "description": "Whether multiple requests can be dispatched to this version at once.", - "type": "boolean" - }, - "readinessCheck": { - "$ref": "ReadinessCheck", - "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set." - }, - "manualScaling": { - "$ref": "ManualScaling", - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." - }, - "name": { - "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", - "type": "string" - }, "apiConfig": { - "$ref": "ApiConfigHandler", - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set." + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.", + "$ref": "ApiConfigHandler" }, "endpointsApiService": { - "$ref": "EndpointsApiService", - "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." - }, - "vm": { - "description": "Whether to deploy this version in a container on a virtual machine.", - "type": "boolean" + "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.", + "$ref": "EndpointsApiService" }, "versionUrl": { "description": "Serving URL for this version. Example: \"https://myversion-dot-myservice-dot-myapp.appspot.com\"@OutputOnly", "type": "string" }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, "instanceClass": { "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", "type": "string" @@ -846,23 +3291,19 @@ "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", "type": "string" }, - "deployment": { - "$ref": "Deployment", - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." - }, "runtimeApiVersion": { "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", "type": "string" }, + "deployment": { + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.", + "$ref": "Deployment" + }, "createTime": { "format": "google-datetime", "description": "Time that this version was created.@OutputOnly", "type": "string" }, - "resources": { - "$ref": "Resources", - "description": "Machine resources for this version. Only applicable for VM runtimes." - }, "inboundServices": { "enumDescriptions": [ "Not specified.", @@ -892,6 +3333,10 @@ }, "type": "array" }, + "resources": { + "description": "Machine resources for this version. Only applicable for VM runtimes.", + "$ref": "Resources" + }, "errorHandlers": { "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", "items": { @@ -916,35 +3361,35 @@ "type": "string" }, "basicScaling": { - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "$ref": "BasicScaling" + "$ref": "BasicScaling", + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." }, "runtime": { "description": "Desired runtime. Example: python27.", "type": "string" }, - "createdBy": { - "description": "Email address of the user who created this version.@OutputOnly", - "type": "string" - }, "id": { "description": "Relative name of the version within the service. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", "type": "string" }, + "createdBy": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, "envVariables": { + "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "Environment variables available to the application.Only returned in GET requests if view=FULL is set.", - "type": "object" + } }, "livenessCheck": { - "$ref": "LivenessCheck", - "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set." + "description": "Configures liveness health checking for VM instances. Unhealthy instances are stopped and replaced with new instancesOnly returned in GET requests if view=FULL is set.", + "$ref": "LivenessCheck" }, "network": { - "$ref": "Network", - "description": "Extra network settings. Only applicable for App Engine flexible environment versions." + "description": "Extra network settings. Only applicable for App Engine flexible environment versions.", + "$ref": "Network" }, "betaSettings": { "additionalProperties": { @@ -956,6 +3401,42 @@ "env": { "description": "App Engine execution environment for this version.Defaults to standard.", "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "UrlMap" + }, + "type": "array" + }, + "automaticScaling": { + "$ref": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." + }, + "diskUsageBytes": { + "format": "int64", + "description": "Total size in bytes of all the files that are included in this version and curerntly hosted on the App Engine disk.@OutputOnly", + "type": "string" + }, + "healthCheck": { + "$ref": "HealthCheck", + "description": "Configures health checking for VM instances. Unhealthy instances are stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "readinessCheck": { + "description": "Configures readiness health checking for VM instances. Unhealthy instances are not put into the backend traffic rotation.Only returned in GET requests if view=FULL is set.", + "$ref": "ReadinessCheck" + }, + "manualScaling": { + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "$ref": "ManualScaling" + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", + "type": "string" } }, "id": "Version" @@ -967,8 +3448,6 @@ "id": "RepairApplicationRequest" }, "CertificateRawData": { - "description": "An SSL certificate obtained from a certificate authority.", - "type": "object", "properties": { "privateKey": { "description": "Unencrypted PEM encoded RSA private key. This field is set once on certificate creation and then encrypted. The key size must be 2048 bits or fewer. Must include the header and footer. Example: \u003cpre\u003e -----BEGIN RSA PRIVATE KEY----- \u003cunencrypted_key_value\u003e -----END RSA PRIVATE KEY----- \u003c/pre\u003e @InputOnly", @@ -979,18 +3458,20 @@ "type": "string" } }, - "id": "CertificateRawData" + "id": "CertificateRawData", + "description": "An SSL certificate obtained from a certificate authority.", + "type": "object" }, "BuildInfo": { + "description": "Google Cloud Container Builder build information.", + "type": "object", "properties": { "cloudBuildId": { "description": "The Google Cloud Container Builder build id. Example: \"f966068f-08b2-42c8-bdfe-74137dff2bf9\"", "type": "string" } }, - "id": "BuildInfo", - "description": "Google Cloud Container Builder build information.", - "type": "object" + "id": "BuildInfo" }, "ScriptHandler": { "properties": { @@ -1007,6 +3488,10 @@ "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", "type": "object", "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, "mimeType": { "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", "type": "string" @@ -1014,24 +3499,14 @@ "sourceUrl": { "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", "type": "string" - }, - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", - "type": "string" } }, "id": "FileInfo" }, "OperationMetadataExperimental": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", "properties": { - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, "method": { "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", "type": "string" @@ -1045,2514 +3520,39 @@ "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", "type": "string" - } - }, - "id": "OperationMetadataExperimental", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, - "AuthorizedDomain": { - "description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via Webmaster Central (https://www.google.com/webmasters/verification/home).", - "type": "object", - "properties": { - "id": { - "description": "Fully qualified domain name of the domain authorized for use. Example: example.com.", - "type": "string" - }, - "name": { - "description": "Full path to the AuthorizedDomain resource in the API. Example: apps/myapp/authorizedDomains/example.com.@OutputOnly", - "type": "string" - } - }, - "id": "AuthorizedDomain" - }, - "TrafficSplit": { - "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", - "type": "object", - "properties": { - "allocations": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "type": "object" - }, - "shardBy": { - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP", - "RANDOM" - ], - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "type": "string", - "enumDescriptions": [ - "Diversion method unspecified.", - "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or no diversion will occur.", - "Diversion based on applying the modulus operation to a fingerprint of the IP address.", - "Diversion based on weighted random assignment. An incoming request is randomly routed to a version in the traffic split, with probability proportional to the version's traffic share." - ] - } - }, - "id": "TrafficSplit" - }, - "OperationMetadataV1Beta": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" }, "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", "type": "string" }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" } }, - "id": "OperationMetadataV1Beta" - }, - "ListIngressRulesResponse": { - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "ingressRules": { - "description": "The ingress FirewallRules for this application.", - "items": { - "$ref": "FirewallRule" - }, - "type": "array" - } - }, - "id": "ListIngressRulesResponse", - "description": "Response message for Firewall.ListIngressRules.", - "type": "object" - }, - "ListServicesResponse": { - "description": "Response message for Services.ListServices.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "services": { - "description": "The services belonging to the requested application.", - "items": { - "$ref": "Service" - }, - "type": "array" - } - }, - "id": "ListServicesResponse" - }, - "Deployment": { - "properties": { - "build": { - "description": "Google Cloud Container Builder build information.", - "$ref": "BuildInfo" - }, - "files": { - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "type": "object", - "additionalProperties": { - "$ref": "FileInfo" - } - }, - "zip": { - "description": "The zip file for this deployment, if this is a zip deployment.", - "$ref": "ZipInfo" - }, - "container": { - "$ref": "ContainerInfo", - "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." - } - }, - "id": "Deployment", - "description": "Code and application artifacts used to deploy a version to App Engine.", - "type": "object" - }, - "Resources": { - "description": "Machine resources for a version.", - "type": "object", - "properties": { - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" - }, - "volumes": { - "description": "User specified volumes.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "diskGb": { - "format": "double", - "description": "Disk size (GB) needed.", - "type": "number" - } - }, - "id": "Resources" - }, - "BatchUpdateIngressRulesResponse": { - "description": "Response message for Firewall.UpdateAllIngressRules.", - "type": "object", - "properties": { - "ingressRules": { - "description": "The full list of ingress FirewallRules for this application.", - "items": { - "$ref": "FirewallRule" - }, - "type": "array" - } - }, - "id": "BatchUpdateIngressRulesResponse" - }, - "Volume": { - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "sizeGb": { - "format": "double", - "description": "Volume size in gigabytes.", - "type": "number" - }, - "name": { - "description": "Unique name for the volume.", - "type": "string" - }, - "volumeType": { - "description": "Underlying volume type, e.g. 'tmpfs'.", - "type": "string" - } - }, - "id": "Volume" - }, - "ManagedCertificate": { - "properties": { - "lastRenewalTime": { - "format": "google-datetime", - "description": "Time at which the certificate was last renewed. The renewal process is fully managed. Certificate renewal will automatically occur before the certificate expires. Renewal errors can be tracked via ManagementStatus.@OutputOnly", - "type": "string" - }, - "status": { - "description": "Status of certificate management. Refers to the most recent certificate acquisition or renewal attempt.@OutputOnly", - "type": "string", - "enumDescriptions": [ - "", - "Certificate was successfully obtained and inserted into the serving system.", - "Certificate is under active attempts to acquire or renew.", - "Most recent renewal failed due to an invalid DNS setup and will be retried. Renewal attempts will continue to fail until the certificate domain's DNS configuration is fixed. The last successfully provisioned certificate may still be serving.", - "All renewal attempts have been exhausted, likely due to an invalid DNS setup." - ], - "enum": [ - "MANAGEMENT_STATUS_UNSPECIFIED", - "OK", - "PENDING", - "FAILED_RETRYING_NOT_VISIBLE", - "FAILED_PERMANENT" - ] - } - }, - "id": "ManagedCertificate", - "description": "A certificate managed by App Engine.", - "type": "object" - }, - "ListInstancesResponse": { - "description": "Response message for Instances.ListInstances.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "instances": { - "description": "The instances belonging to the requested version.", - "items": { - "$ref": "Instance" - }, - "type": "array" - } - }, - "id": "ListInstancesResponse" - }, - "ListDomainMappingsResponse": { - "description": "Response message for DomainMappings.ListDomainMappings.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "domainMappings": { - "description": "The domain mappings for the application.", - "items": { - "$ref": "DomainMapping" - }, - "type": "array" - } - }, - "id": "ListDomainMappingsResponse" - }, - "OperationMetadataV1Alpha": { - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Alpha", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, - "UrlDispatchRule": { - "description": "Rules to match an HTTP request and dispatch that request to a service.", - "type": "object", - "properties": { - "service": { - "description": "Resource ID of a service in this application that should serve the matched request. The service must already exist. Example: default.", - "type": "string" - }, - "domain": { - "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", - "type": "string" - }, - "path": { - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path.The sum of the lengths of the domain and path may not exceed 100 characters.", - "type": "string" - } - }, - "id": "UrlDispatchRule" - }, - "ListVersionsResponse": { - "description": "Response message for Versions.ListVersions.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "versions": { - "description": "The versions belonging to the requested service.", - "items": { - "$ref": "Version" - }, - "type": "array" - } - }, - "id": "ListVersionsResponse" - }, - "ListAuthorizedDomainsResponse": { - "description": "Response message for AuthorizedDomains.ListAuthorizedDomains.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "domains": { - "description": "The authorized domains belonging to the user.", - "items": { - "$ref": "AuthorizedDomain" - }, - "type": "array" - } - }, - "id": "ListAuthorizedDomainsResponse" - }, - "ApiEndpointHandler": { - "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", - "type": "string" - } - }, - "id": "ApiEndpointHandler", - "description": "Uses Google Cloud Endpoints to handle requests.", - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "DomainMapping": { - "properties": { - "resourceRecords": { - "description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.@OutputOnly", - "items": { - "$ref": "ResourceRecord" - }, - "type": "array" - }, - "id": { - "description": "Relative name of the domain serving the application. Example: example.com.", - "type": "string" - }, - "sslSettings": { - "$ref": "SslSettings", - "description": "SSL configuration for this domain. If unconfigured, this domain will not serve with SSL." - }, - "name": { - "description": "Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com.@OutputOnly", - "type": "string" - } - }, - "id": "DomainMapping", - "description": "A domain serving an App Engine application.", - "type": "object" - }, - "ZipInfo": { - "description": "The zip file information for a zip deployment.", - "type": "object", - "properties": { - "sourceUrl": { - "description": "URL of the zip file to deploy from. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "filesCount": { - "format": "int32", - "description": "An estimate of the number of files in a zip for a zip deployment. If set, must be greater than or equal to the actual number of files. Used for optimizing performance; if not provided, deployment may be slow.", - "type": "integer" - } - }, - "id": "ZipInfo" - }, - "AutomaticScaling": { - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "type": "object", - "properties": { - "minPendingLatency": { - "format": "google-duration", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "standardSchedulerSettings": { - "description": "Scheduler settings for standard environment.", - "$ref": "StandardSchedulerSettings" - }, - "requestUtilization": { - "$ref": "RequestUtilization", - "description": "Target scaling by request utilization." - }, - "maxIdleInstances": { - "format": "int32", - "description": "Maximum number of idle instances that should be maintained for this version.", - "type": "integer" - }, - "minIdleInstances": { - "format": "int32", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.", - "type": "integer" - }, - "maxTotalInstances": { - "format": "int32", - "description": "Maximum number of instances that should be started to handle requests.", - "type": "integer" - }, - "minTotalInstances": { - "format": "int32", - "description": "Minimum number of instances that should be maintained for this version.", - "type": "integer" - }, - "networkUtilization": { - "$ref": "NetworkUtilization", - "description": "Target scaling by network usage." - }, - "coolDownPeriod": { - "format": "google-duration", - "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", - "type": "string" - }, - "maxConcurrentRequests": { - "format": "int32", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "type": "integer" - }, - "maxPendingLatency": { - "format": "google-duration", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "cpuUtilization": { - "description": "Target scaling by CPU usage.", - "$ref": "CpuUtilization" - }, - "diskUtilization": { - "$ref": "DiskUtilization", - "description": "Target scaling by disk usage." - } - }, - "id": "AutomaticScaling" - }, - "AuthorizedCertificate": { - "properties": { - "displayName": { - "description": "The user-specified display name of the certificate. This is not guaranteed to be unique. Example: My Certificate.", - "type": "string" - }, - "managedCertificate": { - "description": "Only applicable if this certificate is managed by App Engine. Managed certificates are tied to the lifecycle of a DomainMapping and cannot be updated or deleted via the AuthorizedCertificates API. If this certificate is manually administered by the user, this field will be empty.@OutputOnly", - "$ref": "ManagedCertificate" - }, - "certificateRawData": { - "$ref": "CertificateRawData", - "description": "The SSL certificate serving the AuthorizedCertificate resource. This must be obtained independently from a certificate authority." - }, - "visibleDomainMappings": { - "description": "The full paths to user visible Domain Mapping resources that have this certificate mapped. Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped domain mappings if the user does not have VIEWER permissions on all of the applications that have this certificate mapped. See domain_mappings_count for a complete count.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "expireTime": { - "format": "google-datetime", - "description": "The time when this certificate expires. To update the renewal time on this certificate, upload an SSL certificate with a different expiration time using AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly", - "type": "string" - }, - "name": { - "description": "Full path to the AuthorizedCertificate resource in the API. Example: apps/myapp/authorizedCertificates/12345.@OutputOnly", - "type": "string" - }, - "domainMappingsCount": { - "format": "int32", - "description": "Aggregate count of the domain mappings with this certificate mapped. This count includes domain mappings on applications for which the user does not have VIEWER permissions.Only returned by GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE option.@OutputOnly", - "type": "integer" - }, - "domainNames": { - "description": "Topmost applicable domains of this certificate. This certificate applies to these domains and their subdomains. Example: example.com.@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate resource creation. Example: 12345.@OutputOnly", - "type": "string" - } - }, - "id": "AuthorizedCertificate", - "description": "An SSL certificate that a user has been authorized to administer. A user is authorized to administer any certificate that applies to one of their authorized domains.", - "type": "object" - }, - "ResourceRecord": { - "description": "A DNS resource record.", - "type": "object", - "properties": { - "name": { - "description": "Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'.", - "type": "string" - }, - "type": { - "description": "Resource record type. Example: AAAA.", - "type": "string", - "enumDescriptions": [ - "An A resource record. Data is an IPv4 address.", - "An AAAA resource record. Data is an IPv6 address.", - "A CNAME resource record. Data is a domain name to be aliased." - ], - "enum": [ - "A", - "AAAA", - "CNAME" - ] - }, - "rrdata": { - "description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", - "type": "string" - } - }, - "id": "ResourceRecord" - }, - "Library": { - "description": "Third-party Python runtime library that is required by the application.", - "type": "object", - "properties": { - "version": { - "description": "Version of the library to select, or \"latest\".", - "type": "string" - }, - "name": { - "description": "Name of the library. Example: \"django\".", - "type": "string" - } - }, - "id": "Library" - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListLocationsResponse" - }, - "ContainerInfo": { - "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", - "type": "object", - "properties": { - "image": { - "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", - "type": "string" - } - }, - "id": "ContainerInfo" - }, - "RequestUtilization": { - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "targetConcurrentRequests": { - "format": "int32", - "description": "Target number of concurrent requests.", - "type": "integer" - }, - "targetRequestCountPerSecond": { - "format": "int32", - "description": "Target requests per second.", - "type": "integer" - } - }, - "id": "RequestUtilization" - }, - "EndpointsApiService": { - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "type": "object", - "properties": { - "configId": { - "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", - "type": "string" - }, - "name": { - "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", - "type": "string" - } - }, - "id": "EndpointsApiService" - }, - "UrlMap": { - "properties": { - "securityLevel": { - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ] - }, - "authFailAction": { - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ], - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string", - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with a 401 HTTP status code and an error message." - ] - }, - "script": { - "description": "Executes a script to handle the request that matches this URL pattern.", - "$ref": "ScriptHandler" - }, - "urlRegex": { - "description": "URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", - "type": "string" - }, - "login": { - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." - ], - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ], - "description": "Level of login required to access this resource.", - "type": "string" - }, - "apiEndpoint": { - "$ref": "ApiEndpointHandler", - "description": "Uses API Endpoints to handle requests." - }, - "staticFiles": { - "$ref": "StaticFilesHandler", - "description": "Returns the contents of a file, such as an image, as the response." - }, - "redirectHttpResponseCode": { - "enumDescriptions": [ - "Not specified. 302 is assumed.", - "301 Moved Permanently code.", - "302 Moved Temporarily code.", - "303 See Other code.", - "307 Temporary Redirect code." - ], - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ], - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "type": "string" - } - }, - "id": "UrlMap", - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "type": "object" - }, - "ApiConfigHandler": { - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "type": "object", - "properties": { - "url": { - "description": "URL to serve the endpoint at.", - "type": "string" - }, - "securityLevel": { - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ], - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ] - }, - "authFailAction": { - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ], - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string", - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with a 401 HTTP status code and an error message." - ] - }, - "script": { - "description": "Path to the script from the application root directory.", - "type": "string" - }, - "login": { - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." - ], - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ], - "description": "Level of login required to access this resource. Defaults to optional.", - "type": "string" - } - }, - "id": "ApiConfigHandler" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "Operation" - }, - "StaticFilesHandler": { - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "type": "object", - "properties": { - "uploadPathRegex": { - "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", - "type": "string" - }, - "path": { - "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", - "type": "string" - }, - "mimeType": { - "description": "MIME type used to serve all files served by this handler.Defaults to file-specific MIME types, which are derived from each file's filename extension.", - "type": "string" - }, - "requireMatchingFile": { - "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", - "type": "boolean" - }, - "expiration": { - "format": "google-duration", - "description": "Time a static file served by this handler should be cached by web proxies and browsers.", - "type": "string" - }, - "applicationReadable": { - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", - "type": "boolean" - }, - "httpHeaders": { - "description": "HTTP headers to use for all responses from these URLs.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "StaticFilesHandler" - }, - "DiskUtilization": { - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "targetWriteBytesPerSecond": { - "format": "int32", - "description": "Target bytes written per second.", - "type": "integer" - }, - "targetReadOpsPerSecond": { - "format": "int32", - "description": "Target ops read per seconds.", - "type": "integer" - }, - "targetReadBytesPerSecond": { - "format": "int32", - "description": "Target bytes read per second.", - "type": "integer" - }, - "targetWriteOpsPerSecond": { - "format": "int32", - "description": "Target ops written per second.", - "type": "integer" - } - }, - "id": "DiskUtilization" - }, - "BasicScaling": { - "properties": { - "maxInstances": { - "format": "int32", - "description": "Maximum number of instances to create for this version.", - "type": "integer" - }, - "idleTimeout": { - "format": "google-duration", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", - "type": "string" - } - }, - "id": "BasicScaling", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "type": "object" + "id": "OperationMetadataExperimental" } }, - "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, + "protocol": "rest", "version": "v1beta", "baseUrl": "https://appengine.googleapis.com/", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, "https://www.googleapis.com/auth/appengine.admin": { "description": "View and manage your applications deployed on Google App Engine" }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } } - }, - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", - "kind": "discovery#restDescription", - "servicePath": "", - "rootUrl": "https://appengine.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "appengine", - "batchPath": "batch", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "id": "appengine:v1beta", - "revision": "20170912", - "title": "Google App Engine Admin API", - "ownerName": "Google", - "discoveryVersion": "v1", - "resources": { - "apps": { - "resources": { - "firewall": { - "resources": { - "ingressRules": { - "methods": { - "patch": { - "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "id": "appengine.apps.firewall.ingressRules.patch", - "request": { - "$ref": "FirewallRule" - }, - "description": "Updates the specified firewall rule.", - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "ingressRulesId" - ], - "response": { - "$ref": "FirewallRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the Firewall resource to update. Example: apps/myapp/firewall/ingressRules/100.", - "type": "string", - "required": true - }, - "ingressRulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string" - } - }, - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}" - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "ingressRulesId" - ], - "response": { - "$ref": "FirewallRule" - }, - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the Firewall resource to retrieve. Example: apps/myapp/firewall/ingressRules/100.", - "type": "string", - "required": true, - "location": "path" - }, - "ingressRulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "id": "appengine.apps.firewall.ingressRules.get", - "description": "Gets the specified firewall rule." - }, - "batchUpdate": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "BatchUpdateIngressRulesResponse" - }, - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the Firewall collection to set. Example: apps/myapp/firewall/ingressRules.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", - "path": "v1beta/apps/{appsId}/firewall/ingressRules:batchUpdate", - "id": "appengine.apps.firewall.ingressRules.batchUpdate", - "description": "Replaces the entire firewall ruleset in one bulk operation. This overrides and replaces the rules of an existing firewall with the new rules.If the final rule does not match traffic with the '*' wildcard IP range, then an \"allow all\" rule is explicitly added to the end of the list.", - "request": { - "$ref": "BatchUpdateIngressRulesRequest" - } - }, - "delete": { - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "id": "appengine.apps.firewall.ingressRules.delete", - "path": "v1beta/apps/{appsId}/firewall/ingressRules/{ingressRulesId}", - "description": "Deletes the specified firewall rule.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "appsId", - "ingressRulesId" - ], - "httpMethod": "DELETE", - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the Firewall resource to delete. Example: apps/myapp/firewall/ingressRules/100.", - "type": "string", - "required": true, - "location": "path" - }, - "ingressRulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "id": "appengine.apps.firewall.ingressRules.list", - "path": "v1beta/apps/{appsId}/firewall/ingressRules", - "description": "Lists the firewall rules of an application.", - "response": { - "$ref": "ListIngressRulesResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - }, - "matchingAddress": { - "location": "query", - "description": "A valid IP Address. If set, only rules matching this address will be returned. The first returned rule will be the rule that fires on requests from this IP.", - "type": "string" - }, - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the Firewall collection to retrieve. Example: apps/myapp/firewall/ingressRules.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules" - }, - "create": { - "request": { - "$ref": "FirewallRule" - }, - "description": "Creates a firewall rule for the application.", - "response": { - "$ref": "FirewallRule" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Firewall collection in which to create a new rule. Example: apps/myapp/firewall/ingressRules.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}/firewall/ingressRules", - "id": "appengine.apps.firewall.ingressRules.create", - "path": "v1beta/apps/{appsId}/firewall/ingressRules" - } - } - } - } - }, - "locations": { - "methods": { - "get": { - "response": { - "$ref": "Location" - }, - "parameterOrder": [ - "appsId", - "locationsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Resource name for the location.", - "type": "string", - "required": true - }, - "locationsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta/apps/{appsId}/locations/{locationsId}", - "id": "appengine.apps.locations.get", - "path": "v1beta/apps/{appsId}/locations/{locationsId}", - "description": "Get information about a location." - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "ListLocationsResponse" - }, - "parameters": { - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/locations", - "path": "v1beta/apps/{appsId}/locations", - "id": "appengine.apps.locations.list", - "description": "Lists information about the supported locations for this service." - } - } - }, - "authorizedCertificates": { - "methods": { - "patch": { - "request": { - "$ref": "AuthorizedCertificate" - }, - "description": "Updates the specified SSL certificate. To renew a certificate and maintain its existing domain mappings, update certificate_data with a new certificate. The new certificate must be applicable to the same domains as the original certificate. The certificate display_name may also be updated.", - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "authorizedCertificatesId" - ], - "response": { - "$ref": "AuthorizedCertificate" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "authorizedCertificatesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated. Updates are only supported on the certificate_raw_data and display_name fields.", - "type": "string", - "location": "query" - }, - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/authorizedCertificates/12345.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.patch" - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "AuthorizedCertificate" - }, - "parameterOrder": [ - "appsId", - "authorizedCertificatesId" - ], - "parameters": { - "view": { - "location": "query", - "enum": [ - "BASIC_CERTIFICATE", - "FULL_CERTIFICATE" - ], - "description": "Controls the set of fields returned in the GET response.", - "type": "string" - }, - "authorizedCertificatesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/authorizedCertificates/12345.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.get", - "description": "Gets the specified SSL certificate." - }, - "list": { - "description": "Lists all SSL certificates the user is authorized to administer.", - "response": { - "$ref": "ListAuthorizedCertificatesResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, - "view": { - "description": "Controls the set of fields returned in the LIST response.", - "type": "string", - "location": "query", - "enum": [ - "BASIC_CERTIFICATE", - "FULL_CERTIFICATE" - ] - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.list", - "path": "v1beta/apps/{appsId}/authorizedCertificates" - }, - "create": { - "response": { - "$ref": "AuthorizedCertificate" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "parameters": { - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/authorizedCertificates", - "id": "appengine.apps.authorizedCertificates.create", - "path": "v1beta/apps/{appsId}/authorizedCertificates", - "description": "Uploads the specified SSL certificate.", - "request": { - "$ref": "AuthorizedCertificate" - } - }, - "delete": { - "path": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}", - "id": "appengine.apps.authorizedCertificates.delete", - "description": "Deletes the specified SSL certificate.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "appsId", - "authorizedCertificatesId" - ], - "parameters": { - "authorizedCertificatesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/authorizedCertificates/12345.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/authorizedCertificates/{authorizedCertificatesId}" - } - } - }, - "services": { - "methods": { - "delete": { - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", - "path": "v1beta/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.delete", - "description": "Deletes the specified service and all enclosed versions.", - "httpMethod": "DELETE", - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.patch", - "path": "v1beta/apps/{appsId}/services/{servicesId}", - "request": { - "$ref": "Service" - }, - "description": "Updates the configuration of the specified service.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", - "type": "string", - "required": true - }, - "migrateTraffic": { - "location": "query", - "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", - "type": "boolean" - } - } - }, - "get": { - "description": "Gets the current configuration of the specified service.", - "httpMethod": "GET", - "response": { - "$ref": "Service" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}", - "path": "v1beta/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.get" - }, - "list": { - "flatPath": "v1beta/apps/{appsId}/services", - "id": "appengine.apps.services.list", - "path": "v1beta/apps/{appsId}/services", - "description": "Lists all the services in the application.", - "response": { - "$ref": "ListServicesResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - } - } - } - }, - "resources": { - "versions": { - "resources": { - "instances": { - "methods": { - "get": { - "description": "Gets instance information.", - "response": { - "$ref": "Instance" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "httpMethod": "GET", - "parameters": { - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.get", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "ListInstancesResponse" - }, - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Version resource. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, - "versionsId": { - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "id": "appengine.apps.services.versions.instances.list", - "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)." - }, - "debug": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "httpMethod": "POST", - "parameters": { - "instancesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "id": "appengine.apps.services.versions.instances.debug", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", - "request": { - "$ref": "DebugInstanceRequest" - } - }, - "delete": { - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.delete", - "description": "Stops a running instance.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "parameters": { - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - }, - "methods": { - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent resource to create this version under. Example: apps/myapp/services/default.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.create", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", - "request": { - "$ref": "Version" - }, - "description": "Deploys code and resource files to a new version." - }, - "delete": { - "description": "Deletes an existing Version resource.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "httpMethod": "DELETE", - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.delete", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}" - }, - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.patch", - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.min_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.max_total_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cool_down_period_sec (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.\nautomatic_scaling.cpu_utilization.target_utilization (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/apps.services.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine Flexible environment.", - "request": { - "$ref": "Version" - } - }, - "get": { - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.get", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "response": { - "$ref": "Version" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "httpMethod": "GET", - "parameters": { - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true, - "location": "path" - }, - "view": { - "enum": [ - "BASIC", - "FULL" - ], - "description": "Controls the set of fields returned in the Get response.", - "type": "string", - "location": "query" - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - }, - "list": { - "response": { - "$ref": "ListVersionsResponse" - }, - "parameterOrder": [ - "appsId", - "servicesId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, - "view": { - "description": "Controls the set of fields returned in the List response.", - "type": "string", - "location": "query", - "enum": [ - "BASIC", - "FULL" - ] - }, - "servicesId": { - "location": "path", - "description": "Part of `parent`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Service resource. Example: apps/myapp/services/default.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.list", - "path": "v1beta/apps/{appsId}/services/{servicesId}/versions", - "description": "Lists the versions of a service." - } - } - } - } - }, - "authorizedDomains": { - "methods": { - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListAuthorizedDomainsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/authorizedDomains", - "path": "v1beta/apps/{appsId}/authorizedDomains", - "id": "appengine.apps.authorizedDomains.list", - "description": "Lists all domains the user is authorized to administer." - } - } - }, - "operations": { - "methods": { - "get": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "operationsId" - ], - "httpMethod": "GET", - "parameters": { - "operationsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. The name of the operation resource.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/operations/{operationsId}", - "id": "appengine.apps.operations.get", - "path": "v1beta/apps/{appsId}/operations/{operationsId}", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. The name of the operation's parent resource.", - "type": "string", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "flatPath": "v1beta/apps/{appsId}/operations", - "id": "appengine.apps.operations.list", - "path": "v1beta/apps/{appsId}/operations" - } - } - }, - "domainMappings": { - "methods": { - "delete": { - "description": "Deletes the specified domain mapping. A user must be authorized to administer the associated domain in order to delete a DomainMapping resource.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "parameters": { - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to delete. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.delete" - }, - "patch": { - "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.patch", - "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "description": "Updates the specified domain mapping. To map an SSL certificate to a domain mapping, update certificate_id to point to an AuthorizedCertificate resource. A user must be authorized to administer the associated domain in order to update a DomainMapping resource.", - "request": { - "$ref": "DomainMapping" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "httpMethod": "PATCH", - "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true - }, - "domainMappingsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Gets the specified domain mapping.", - "response": { - "$ref": "DomainMapping" - }, - "parameterOrder": [ - "appsId", - "domainMappingsId" - ], - "httpMethod": "GET", - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/domainMappings/example.com.", - "type": "string", - "required": true, - "location": "path" - }, - "domainMappingsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}", - "id": "appengine.apps.domainMappings.get", - "path": "v1beta/apps/{appsId}/domainMappings/{domainMappingsId}" - }, - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListDomainMappingsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - } - }, - "flatPath": "v1beta/apps/{appsId}/domainMappings", - "path": "v1beta/apps/{appsId}/domainMappings", - "id": "appengine.apps.domainMappings.list", - "description": "Lists the domain mappings on an application." - }, - "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `parent`. Name of the parent Application resource. Example: apps/myapp.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta/apps/{appsId}/domainMappings", - "id": "appengine.apps.domainMappings.create", - "path": "v1beta/apps/{appsId}/domainMappings", - "request": { - "$ref": "DomainMapping" - }, - "description": "Maps a domain to an application. A user must be authorized to administer a domain in order to map it to an application. For a list of available authorized domains, see AuthorizedDomains.ListAuthorizedDomains." - } - } - } - }, - "methods": { - "create": { - "path": "v1beta/apps", - "id": "appengine.apps.create", - "request": { - "$ref": "Application" - }, - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1beta/apps" - }, - "repair": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the application to repair. Example: apps/myapp", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}:repair", - "path": "v1beta/apps/{appsId}:repair", - "id": "appengine.apps.repair", - "description": "Recreates the required App Engine features for the specified App Engine application, for example a Cloud Storage bucket or App Engine service account. Use this method if you receive an error message about a missing feature, for example, Error retrieving the App Engine service account.", - "request": { - "$ref": "RepairApplicationRequest" - } - }, - "patch": { - "path": "v1beta/apps/{appsId}", - "id": "appengine.apps.patch", - "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain - Google authentication domain for controlling user access to the application.\ndefault_cookie_expiration - Cookie expiration policy for the application.", - "request": { - "$ref": "Application" - }, - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", - "type": "string", - "required": true - }, - "updateMask": { - "format": "google-fieldmask", - "description": "Standard field mask for the set of fields to be updated.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta/apps/{appsId}" - }, - "get": { - "description": "Gets information about an application.", - "httpMethod": "GET", - "parameterOrder": [ - "appsId" - ], - "response": { - "$ref": "Application" - }, - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the Application resource to get. Example: apps/myapp.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta/apps/{appsId}", - "path": "v1beta/apps/{appsId}", - "id": "appengine.apps.get" - } - } - } - }, - "parameters": { - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - } } } diff --git a/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json b/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json index edfd8051e..bf3f93f25 100644 --- a/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1beta4/appengine-api.json @@ -1,27 +1,27 @@ { + "id": "appengine:v1beta4", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "revision": "20170926", + "title": "Google App Engine Admin API", + "ownerName": "Google", + "discoveryVersion": "v1", "resources": { "apps": { "methods": { "patch": { - "path": "v1beta4/apps/{appsId}", - "id": "appengine.apps.patch", - "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)", - "request": { - "$ref": "Application" - }, - "httpMethod": "PATCH", - "parameterOrder": [ - "appsId" - ], "response": { "$ref": "Operation" }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "PATCH", "parameters": { "appsId": { + "location": "path", "description": "Part of `name`. Name of the Application resource to update. Example: apps/myapp.", "type": "string", - "required": true, - "location": "path" + "required": true }, "mask": { "format": "google-fieldmask", @@ -33,7 +33,13 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta4/apps/{appsId}" + "flatPath": "v1beta4/apps/{appsId}", + "id": "appengine.apps.patch", + "path": "v1beta4/apps/{appsId}", + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps#Application.FIELDS.default_cookie_expiration)", + "request": { + "$ref": "Application" + } }, "get": { "response": { @@ -43,6 +49,9 @@ "appsId" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "ensureResourcesExist": { "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete.", @@ -56,78 +65,81 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1beta4/apps/{appsId}", "id": "appengine.apps.get", "path": "v1beta4/apps/{appsId}", "description": "Gets information about an application." }, "create": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1beta4/apps", - "id": "appengine.apps.create", "path": "v1beta4/apps", + "id": "appengine.apps.create", + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", "request": { "$ref": "Application" }, - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/)." + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps" } }, "resources": { - "locations": { + "operations": { "methods": { "get": { - "description": "Get information about a location.", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "httpMethod": "GET", "response": { - "$ref": "Location" + "$ref": "Operation" }, "parameterOrder": [ "appsId", - "locationsId" + "operationsId" ], - "httpMethod": "GET", - "parameters": { - "locationsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Resource name for the location.", - "type": "string", - "required": true - } - }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1beta4/apps/{appsId}/locations/{locationsId}", - "id": "appengine.apps.locations.get", - "path": "v1beta4/apps/{appsId}/locations/{locationsId}" + "parameters": { + "appsId": { + "description": "Part of `name`. The name of the operation resource.", + "type": "string", + "required": true, + "location": "path" + }, + "operationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta4/apps/{appsId}/operations/{operationsId}", + "path": "v1beta4/apps/{appsId}/operations/{operationsId}", + "id": "appengine.apps.operations.get" }, "list": { "response": { - "$ref": "ListLocationsResponse" + "$ref": "ListOperationsResponse" }, "parameterOrder": [ "appsId" ], "httpMethod": "GET", "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, "filter": { "location": "query", "description": "The standard list filter.", @@ -139,16 +151,10 @@ "type": "string" }, "appsId": { - "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "location": "path", + "description": "Part of `name`. The name of the operation's parent resource.", "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" + "required": true } }, "scopes": [ @@ -156,51 +162,95 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], + "flatPath": "v1beta4/apps/{appsId}/operations", + "id": "appengine.apps.operations.list", + "path": "v1beta4/apps/{appsId}/operations", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id." + } + } + }, + "locations": { + "methods": { + "get": { + "response": { + "$ref": "Location" + }, + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "locationsId" + ], + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "appsId": { + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true, + "location": "path" + }, + "locationsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta4/apps/{appsId}/locations/{locationsId}", + "id": "appengine.apps.locations.get", + "path": "v1beta4/apps/{appsId}/locations/{locationsId}", + "description": "Get information about a location." + }, + "list": { "flatPath": "v1beta4/apps/{appsId}/locations", "id": "appengine.apps.locations.list", "path": "v1beta4/apps/{appsId}/locations", - "description": "Lists information about the supported locations for this service." + "description": "Lists information about the supported locations for this service.", + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "appsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true + }, + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + } + } } } }, "modules": { "methods": { - "delete": { - "path": "v1beta4/apps/{appsId}/modules/{modulesId}", - "id": "appengine.apps.modules.delete", - "description": "Deletes the specified module and all enclosed versions.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", - "type": "string", - "required": true, - "location": "path" - }, - "modulesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}" - }, "patch": { - "request": { - "$ref": "Module" - }, - "description": "Updates the configuration of the specified module.", "httpMethod": "PATCH", "parameterOrder": [ "appsId", @@ -214,21 +264,21 @@ ], "parameters": { "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", "type": "string", - "required": true, - "location": "path" + "required": true }, "migrateTraffic": { + "location": "query", "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules#shardby) field in the Module resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", - "type": "boolean", - "location": "query" + "type": "boolean" }, "mask": { - "location": "query", "format": "google-fieldmask", "description": "Standard field mask for the set of fields to be updated.", - "type": "string" + "type": "string", + "location": "query" }, "modulesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -239,7 +289,11 @@ }, "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", "path": "v1beta4/apps/{appsId}/modules/{modulesId}", - "id": "appengine.apps.modules.patch" + "id": "appengine.apps.modules.patch", + "request": { + "$ref": "Module" + }, + "description": "Updates the configuration of the specified module." }, "list": { "response": { @@ -249,59 +303,56 @@ "appsId" ], "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", + "type": "string", + "required": true + } + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "parameters": { - "pageToken": { - "location": "query", - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - } - }, "flatPath": "v1beta4/apps/{appsId}/modules", "id": "appengine.apps.modules.list", "path": "v1beta4/apps/{appsId}/modules", "description": "Lists all the modules in the application." }, "get": { - "path": "v1beta4/apps/{appsId}/modules/{modulesId}", - "id": "appengine.apps.modules.get", - "description": "Gets the current configuration of the specified module.", - "httpMethod": "GET", + "response": { + "$ref": "Module" + }, "parameterOrder": [ "appsId", "modulesId" ], - "response": { - "$ref": "Module" - }, + "httpMethod": "GET", "parameters": { - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", - "type": "string", - "required": true, - "location": "path" - }, "modulesId": { "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", + "type": "string", + "required": true } }, "scopes": [ @@ -309,267 +360,61 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}" + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", + "id": "appengine.apps.modules.get", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}", + "description": "Gets the current configuration of the specified module." + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "modulesId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", + "type": "string", + "required": true + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}", + "id": "appengine.apps.modules.delete", + "description": "Deletes the specified module and all enclosed versions." } }, "resources": { "versions": { - "resources": { - "instances": { - "methods": { - "debug": { - "httpMethod": "POST", - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "instancesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "modulesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", - "id": "appengine.apps.modules.versions.instances.debug", - "request": { - "$ref": "DebugInstanceRequest" - }, - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment." - }, - "delete": { - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.modules.versions.instances.delete", - "description": "Stops a running instance.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true - }, - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId" - ], - "response": { - "$ref": "ListInstancesResponse" - }, - "parameters": { - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", - "type": "string", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", - "id": "appengine.apps.modules.versions.instances.list", - "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)." - }, - "get": { - "description": "Gets instance information.", - "response": { - "$ref": "Instance" - }, - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId", - "instancesId" - ], - "httpMethod": "GET", - "parameters": { - "instancesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.modules.versions.instances.get", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}" - } - } - } - }, "methods": { - "delete": { - "description": "Deletes an existing version.", - "httpMethod": "DELETE", - "parameterOrder": [ - "appsId", - "modulesId", - "versionsId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", - "type": "string", - "required": true - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "modulesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "id": "appengine.apps.modules.versions.delete" - }, "patch": { - "httpMethod": "PATCH", + "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.", + "request": { + "$ref": "Version" + }, + "response": { + "$ref": "Operation" + }, "parameterOrder": [ "appsId", "modulesId", "versionsId" ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "httpMethod": "PATCH", "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1.", - "type": "string", - "required": true - }, "mask": { "location": "query", "format": "google-fieldmask", @@ -577,96 +422,96 @@ "type": "string" }, "versionsId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true }, "modulesId": { "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" - } - }, - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "id": "appengine.apps.modules.versions.patch", - "request": { - "$ref": "Version" - }, - "description": "Updates the specified Version resource. You can specify the following fields depending on the App Engine environment and type of scaling that the version resource uses:\nserving_status (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.serving_status): For Version resources that use basic scaling, manual scaling, or run in the App Engine flexible environment.\ninstance_class (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.instance_class): For Version resources that run in the App Engine standard environment.\nautomatic_scaling.min_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment.\nautomatic_scaling.max_idle_instances (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta4/apps.modules.versions#Version.FIELDS.automatic_scaling): For Version resources that use automatic scaling and run in the App Engine standard environment." - }, - "list": { - "description": "Lists the versions of a module.", - "response": { - "$ref": "ListVersionsResponse" - }, - "parameterOrder": [ - "appsId", - "modulesId" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" }, "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", - "type": "string", - "required": true, - "location": "path" - }, - "pageSize": { - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" - }, - "view": { - "enum": [ - "BASIC", - "FULL" - ], - "description": "Controls the set of fields returned in the List response.", - "type": "string", - "location": "query" - }, - "modulesId": { - "description": "Part of `name`. See documentation of `appsId`.", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default/versions/1.", "type": "string", "required": true, "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.patch", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}" + }, + "list": { + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "id": "appengine.apps.modules.versions.list", + "description": "Lists the versions of a module.", + "httpMethod": "GET", + "parameterOrder": [ + "appsId", + "modulesId" + ], + "response": { + "$ref": "ListVersionsResponse" + }, + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Controls the set of fields returned in the List response.", + "type": "string" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default.", + "type": "string", + "required": true + } + }, "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", - "id": "appengine.apps.modules.versions.list", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions" + ] }, "get": { - "httpMethod": "GET", + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", + "response": { + "$ref": "Version" + }, "parameterOrder": [ "appsId", "modulesId", "versionsId" ], - "response": { - "$ref": "Version" - }, + "httpMethod": "GET", "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", - "type": "string", - "required": true - }, "view": { "location": "query", "enum": [ @@ -687,6 +532,12 @@ "type": "string", "required": true, "location": "path" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", + "type": "string", + "required": true } }, "scopes": [ @@ -695,140 +546,353 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", "id": "appengine.apps.modules.versions.get", - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource." + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}" }, "create": { - "id": "appengine.apps.modules.versions.create", - "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", - "description": "Deploys code and resource files to a new version.", - "request": { - "$ref": "Version" - }, - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "appsId", "modulesId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", - "type": "string", - "required": true - }, "modulesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/modules/default.", + "type": "string", + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions" + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions", + "id": "appengine.apps.modules.versions.create", + "description": "Deploys code and resource files to a new version.", + "request": { + "$ref": "Version" + } + }, + "delete": { + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}", + "id": "appengine.apps.modules.versions.delete", + "description": "Deletes an existing version.", + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}" + } + }, + "resources": { + "instances": { + "methods": { + "list": { + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", + "id": "appengine.apps.modules.versions.instances.list", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances", + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)." + }, + "get": { + "description": "Gets instance information.", + "httpMethod": "GET", + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "parameters": { + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.modules.versions.instances.get" + }, + "debug": { + "httpMethod": "POST", + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.modules.versions.instances.debug", + "request": { + "$ref": "DebugInstanceRequest" + }, + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment." + }, + "delete": { + "description": "Stops a running instance.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "modulesId", + "versionsId", + "instancesId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "instancesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/modules/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "modulesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.modules.versions.instances.delete", + "path": "v1beta4/apps/{appsId}/modules/{modulesId}/versions/{versionsId}/instances/{instancesId}" + } + } } } } } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "httpMethod": "GET", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "operationsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. The name of the operation resource.", - "type": "string", - "required": true - }, - "operationsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta4/apps/{appsId}/operations/{operationsId}", - "path": "v1beta4/apps/{appsId}/operations/{operationsId}", - "id": "appengine.apps.operations.get" - }, - "list": { - "path": "v1beta4/apps/{appsId}/operations", - "id": "appengine.apps.operations.list", - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - "httpMethod": "GET", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "appsId" - ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. The name of the operation's parent resource.", - "type": "string", - "required": true - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - } - }, - "flatPath": "v1beta4/apps/{appsId}/operations" - } - } } } } }, "parameters": { + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, "$.xgafv": { "enum": [ @@ -844,73 +908,156 @@ "location": "query" }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", "location": "query" } }, "schemas": { - "ListInstancesResponse": { - "description": "Response message for Instances.ListInstances.", + "ListModulesResponse": { + "description": "Response message for Modules.ListModules.", "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "modules": { + "description": "The modules belonging to the requested application.", + "items": { + "$ref": "Module" + }, + "type": "array" + } + }, + "id": "ListModulesResponse" + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "files": { + "additionalProperties": { + "$ref": "FileInfo" + }, + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object" + }, + "sourceReferences": { + "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", + "items": { + "$ref": "SourceReference" + }, + "type": "array" + }, + "container": { + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.", + "$ref": "ContainerInfo" + } + }, + "id": "Deployment" + }, + "Resources": { + "properties": { + "volumes": { + "description": "User specified volumes.", + "items": { + "$ref": "Volume" + }, + "type": "array" + }, + "diskGb": { + "format": "double", + "description": "Disk size (GB) needed.", + "type": "number" + }, + "memoryGb": { + "format": "double", + "description": "Memory (GB) needed.", + "type": "number" + }, + "cpu": { + "format": "double", + "description": "Number of CPU cores needed.", + "type": "number" + } + }, + "id": "Resources", + "description": "Machine resources for a version.", + "type": "object" + }, + "Volume": { + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "sizeGb": { + "format": "double", + "description": "Volume size in gigabytes.", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + }, + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + } + }, + "id": "Volume" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadata" + }, + "ListInstancesResponse": { "properties": { "nextPageToken": { "description": "Continuation token for fetching the next page of results.", @@ -924,18 +1071,34 @@ "type": "array" } }, - "id": "ListInstancesResponse" + "id": "ListInstancesResponse", + "description": "Response message for Instances.ListInstances.", + "type": "object" }, "OperationMetadataV1": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", "properties": { - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", "type": "string" }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" @@ -948,23 +1111,9 @@ "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", "type": "string" - }, - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" } }, - "id": "OperationMetadataV1", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" + "id": "OperationMetadataV1" }, "ErrorHandler": { "properties": { @@ -973,6 +1122,8 @@ "type": "string" }, "errorCode": { + "description": "Error condition this handler applies to.", + "type": "string", "enumDescriptions": [ "Not specified. ERROR_CODE_DEFAULT is assumed.", "All other error types.", @@ -986,9 +1137,7 @@ "ERROR_CODE_OVER_QUOTA", "ERROR_CODE_DOS_API_DENIAL", "ERROR_CODE_TIMEOUT" - ], - "description": "Error condition this handler applies to.", - "type": "string" + ] }, "staticFile": { "description": "Static file content to be served for this error.", @@ -1000,6 +1149,8 @@ "type": "object" }, "OperationMetadataV1Alpha": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", "properties": { "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", @@ -1013,14 +1164,14 @@ "description": "Time that this operation was created.@OutputOnly", "type": "string" }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" @@ -1035,34 +1186,12 @@ "type": "string" } }, - "id": "OperationMetadataV1Alpha", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" + "id": "OperationMetadataV1Alpha" }, "Application": { "description": "An Application resource contains the top-level configuration of an App Engine application.", "type": "object", "properties": { - "name": { - "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", - "type": "string" - }, - "iap": { - "$ref": "IdentityAwareProxy" - }, - "authDomain": { - "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", - "type": "string" - }, - "defaultCookieExpiration": { - "format": "google-duration", - "description": "Cookie expiration policy for this application.", - "type": "string" - }, - "id": { - "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", - "type": "string" - }, "codeBucket": { "description": "Google Cloud Storage bucket that can be used for storing files associated with this application. This bucket is associated with the application and can be used by the gcloud deployment commands.@OutputOnly", "type": "string" @@ -1085,11 +1214,33 @@ "defaultHostname": { "description": "Hostname used to reach the application, as resolved by App Engine.@OutputOnly", "type": "string" + }, + "name": { + "description": "Full path to the Application resource in the API. Example: apps/myapp.@OutputOnly", + "type": "string" + }, + "iap": { + "$ref": "IdentityAwareProxy" + }, + "authDomain": { + "description": "Google Apps authentication domain that controls which users can access this application.Defaults to open access for any Google Account.", + "type": "string" + }, + "defaultCookieExpiration": { + "format": "google-duration", + "description": "Cookie expiration policy for this application.", + "type": "string" + }, + "id": { + "description": "Identifier of the Application resource. This identifier is equivalent to the project ID of the Google Cloud Platform project where you want to deploy your application. Example: myapp.", + "type": "string" } }, "id": "Application" }, "Network": { + "description": "Extra network settings. Only applicable for VM runtimes.", + "type": "object", "properties": { "instanceTag": { "description": "Tag to apply to the VM instance during creation.", @@ -1107,27 +1258,21 @@ "type": "string" } }, - "id": "Network", - "description": "Extra network settings. Only applicable for VM runtimes.", - "type": "object" + "id": "Network" }, "Instance": { "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", "type": "object", "properties": { - "vmName": { - "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "vmId": { - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, "qps": { "format": "float", "description": "Average queries per second (QPS) over the last minute.@OutputOnly", "type": "number" }, + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, "vmZoneName": { "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" @@ -1149,33 +1294,33 @@ "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, - "id": { - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", - "type": "string" - }, "memoryUsage": { "format": "int64", "description": "Total memory in use (bytes).@OutputOnly", "type": "string" }, + "id": { + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", + "type": "string" + }, "errors": { "format": "uint32", "description": "Number of errors since this instance was started.@OutputOnly", "type": "integer" }, "availability": { + "enumDescriptions": [ + "", + "", + "" + ], "enum": [ "UNSPECIFIED", "RESIDENT", "DYNAMIC" ], "description": "Availability of the instance.@OutputOnly", - "type": "string", - "enumDescriptions": [ - "", - "", - "" - ] + "type": "string" }, "vmStatus": { "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", @@ -1194,6 +1339,10 @@ "format": "google-datetime", "description": "Time that this instance was started.@OutputOnly", "type": "string" + }, + "vmName": { + "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" } }, "id": "Instance" @@ -1202,6 +1351,10 @@ "description": "Rules to match an HTTP request and dispatch that request to a module.", "type": "object", "properties": { + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + }, "module": { "description": "Resource ID of a module in this application that should serve the matched request. The module must already exist. Example: default.", "type": "string" @@ -1209,14 +1362,29 @@ "domain": { "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", "type": "string" - }, - "path": { - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", - "type": "string" } }, "id": "UrlDispatchRule" }, + "Module": { + "description": "A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module.", + "type": "object", + "properties": { + "split": { + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the module.", + "$ref": "TrafficSplit" + }, + "id": { + "description": "Relative name of the module within the application. Example: default.@OutputOnly", + "type": "string" + }, + "name": { + "description": "Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + } + }, + "id": "Module" + }, "ListVersionsResponse": { "description": "Response message for Versions.ListVersions.", "type": "object", @@ -1235,25 +1403,6 @@ }, "id": "ListVersionsResponse" }, - "Module": { - "properties": { - "id": { - "description": "Relative name of the module within the application. Example: default.@OutputOnly", - "type": "string" - }, - "name": { - "description": "Full path to the Module resource in the API. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "split": { - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the module.", - "$ref": "TrafficSplit" - } - }, - "id": "Module", - "description": "A Module resource is a logical component of an application that can share state and communicate in a secure fashion with other modules. For example, an application that handles customer requests might include separate modules to handle tasks such as backend data analysis or API requests from mobile devices. Each module has a collection of versions that define a specific set of code used to implement the functionality of that module.", - "type": "object" - }, "ApiEndpointHandler": { "description": "Uses Google Cloud Endpoints to handle requests.", "type": "object", @@ -1265,14 +1414,73 @@ }, "id": "ApiEndpointHandler" }, + "AutomaticScaling": { + "properties": { + "cpuUtilization": { + "description": "Target scaling by CPU usage.", + "$ref": "CpuUtilization" + }, + "diskUtilization": { + "description": "Target scaling by disk usage.", + "$ref": "DiskUtilization" + }, + "minPendingLatency": { + "format": "google-duration", + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "requestUtilization": { + "$ref": "RequestUtilization", + "description": "Target scaling by request utilization." + }, + "maxIdleInstances": { + "format": "int32", + "description": "Maximum number of idle instances that should be maintained for this version.", + "type": "integer" + }, + "minIdleInstances": { + "format": "int32", + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", + "type": "integer" + }, + "maxTotalInstances": { + "format": "int32", + "description": "Maximum number of instances that should be started to handle requests.", + "type": "integer" + }, + "minTotalInstances": { + "format": "int32", + "description": "Minimum number of instances that should be maintained for this version.", + "type": "integer" + }, + "networkUtilization": { + "$ref": "NetworkUtilization", + "description": "Target scaling by network usage." + }, + "coolDownPeriod": { + "format": "google-duration", + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", + "type": "string" + }, + "maxConcurrentRequests": { + "format": "int32", + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "type": "integer" + }, + "maxPendingLatency": { + "format": "google-duration", + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + } + }, + "id": "AutomaticScaling", + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object" + }, "StaticDirectoryHandler": { "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static directory handlers make it easy to serve the entire contents of a directory as static files.", "type": "object", "properties": { - "requireMatchingFile": { - "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", - "type": "boolean" - }, "expiration": { "format": "google-duration", "description": "Time a static file served by this handler should be cached.", @@ -1296,75 +1504,25 @@ "mimeType": { "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are direved from each file's filename extension.", "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" } }, "id": "StaticDirectoryHandler" }, - "AutomaticScaling": { - "properties": { - "minPendingLatency": { - "format": "google-duration", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "maxIdleInstances": { - "format": "int32", - "description": "Maximum number of idle instances that should be maintained for this version.", - "type": "integer" - }, - "requestUtilization": { - "description": "Target scaling by request utilization.", - "$ref": "RequestUtilization" - }, - "minIdleInstances": { - "format": "int32", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", - "type": "integer" - }, - "maxTotalInstances": { - "format": "int32", - "description": "Maximum number of instances that should be started to handle requests.", - "type": "integer" - }, - "minTotalInstances": { - "format": "int32", - "description": "Minimum number of instances that should be maintained for this version.", - "type": "integer" - }, - "networkUtilization": { - "description": "Target scaling by network usage.", - "$ref": "NetworkUtilization" - }, - "maxConcurrentRequests": { - "format": "int32", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "type": "integer" - }, - "coolDownPeriod": { - "format": "google-duration", - "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", - "type": "string" - }, - "maxPendingLatency": { - "format": "google-duration", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "cpuUtilization": { - "$ref": "CpuUtilization", - "description": "Target scaling by CPU usage." - }, - "diskUtilization": { - "description": "Target scaling by disk usage.", - "$ref": "DiskUtilization" - } - }, - "id": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "type": "object" - }, "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + }, "name": { "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", "type": "string" @@ -1380,18 +1538,9 @@ }, "description": "Service-specific metadata. For example the available capacity at the given location.", "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object" } }, - "id": "Location", - "description": "A resource that represents Google Cloud Platform location.", - "type": "object" + "id": "Location" }, "NetworkUtilization": { "description": "Target scaling by network usage. Only applicable for VM runtimes.", @@ -1437,16 +1586,16 @@ "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", "type": "string" }, - "healthyThreshold": { - "format": "uint32", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "type": "integer" - }, "restartThreshold": { "format": "uint32", "description": "Number of consecutive failed health checks required before an instance is restarted.", "type": "integer" }, + "healthyThreshold": { + "format": "uint32", + "description": "Number of consecutive successful health checks required before receiving traffic.", + "type": "integer" + }, "checkInterval": { "format": "google-duration", "description": "Interval between health checks.", @@ -1460,6 +1609,17 @@ }, "id": "HealthCheck" }, + "DebugInstanceRequest": { + "properties": { + "sshKey": { + "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "type": "string" + } + }, + "id": "DebugInstanceRequest", + "description": "Request message for Instances.DebugInstance.", + "type": "object" + }, "SourceReference": { "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", "type": "object", @@ -1475,16 +1635,34 @@ }, "id": "SourceReference" }, - "DebugInstanceRequest": { + "OperationMetadataV1Beta5": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", "properties": { - "sshKey": { - "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", "type": "string" } }, - "id": "DebugInstanceRequest", - "description": "Request message for Instances.DebugInstance.", - "type": "object" + "id": "OperationMetadataV1Beta5" }, "Library": { "description": "Third-party Python runtime library that is required by the application.", @@ -1501,92 +1679,39 @@ }, "id": "Library" }, - "OperationMetadataV1Beta5": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta5" - }, "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", + } + }, + "id": "ListLocationsResponse", + "description": "The response message for Locations.ListLocations.", + "type": "object" + }, + "ContainerInfo": { + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object", + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", "type": "string" } }, - "id": "ListLocationsResponse" + "id": "ContainerInfo" }, "Version": { + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a module.", + "type": "object", "properties": { - "id": { - "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", - "type": "string" - }, - "envVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", - "type": "object" - }, - "network": { - "description": "Extra network settings. Only applicable for VM runtimes.", - "$ref": "Network" - }, - "betaSettings": { - "additionalProperties": { - "type": "string" - }, - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "type": "object" - }, - "env": { - "description": "App Engine execution environment to use for this version.Defaults to 1.", - "type": "string" - }, - "handlers": { - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "deployer": { - "description": "Email address of the user who created this version.@OutputOnly", - "type": "string" - }, "automaticScaling": { "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", "$ref": "AutomaticScaling" @@ -1600,8 +1725,8 @@ "type": "boolean" }, "manualScaling": { - "$ref": "ManualScaling", - "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time." + "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "$ref": "ManualScaling" }, "name": { "description": "Full path to the Version resource in the API. Example: apps/myapp/modules/default/versions/v1.@OutputOnly", @@ -1633,21 +1758,18 @@ "Disabled. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." ] }, + "deployment": { + "$ref": "Deployment", + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." + }, "runtimeApiVersion": { "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", "type": "string" }, - "deployment": { - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.", - "$ref": "Deployment" - }, - "resources": { - "description": "Machine resources for this version. Only applicable for VM runtimes.", - "$ref": "Resources" - }, "inboundServices": { "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", "items": { + "type": "string", "enum": [ "INBOUND_SERVICE_UNSPECIFIED", "INBOUND_SERVICE_MAIL", @@ -1658,8 +1780,7 @@ "INBOUND_SERVICE_XMPP_PRESENCE", "INBOUND_SERVICE_CHANNEL_PRESENCE", "INBOUND_SERVICE_WARMUP" - ], - "type": "string" + ] }, "type": "array", "enumDescriptions": [ @@ -1674,6 +1795,10 @@ "Enables warmup requests." ] }, + "resources": { + "description": "Machine resources for this version. Only applicable for VM runtimes.", + "$ref": "Resources" + }, "errorHandlers": { "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", "items": { @@ -1693,40 +1818,66 @@ }, "type": "array" }, - "nobuildFilesRegex": { - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", - "type": "string" - }, "creationTime": { "format": "google-datetime", "description": "Time that this version was created.@OutputOnly", "type": "string" }, + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, "basicScaling": { - "$ref": "BasicScaling", - "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." + "description": "A module with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "$ref": "BasicScaling" }, "runtime": { "description": "Desired runtime. Example: python27.", "type": "string" - } - }, - "id": "Version", - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a module.", - "type": "object" - }, - "ContainerInfo": { - "properties": { - "image": { - "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + }, + "id": { + "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "envVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object" + }, + "network": { + "description": "Extra network settings. Only applicable for VM runtimes.", + "$ref": "Network" + }, + "betaSettings": { + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "env": { + "description": "App Engine execution environment to use for this version.Defaults to 1.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "UrlMap" + }, + "type": "array" + }, + "deployer": { + "description": "Email address of the user who created this version.@OutputOnly", "type": "string" } }, - "id": "ContainerInfo", - "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", - "type": "object" + "id": "Version" }, "RequestUtilization": { + "description": "Target scaling by request utilization. Only applicable for VM runtimes.", + "type": "object", "properties": { "targetConcurrentRequests": { "format": "int32", @@ -1739,13 +1890,33 @@ "type": "integer" } }, - "id": "RequestUtilization", - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", - "type": "object" + "id": "RequestUtilization" }, "UrlMap": { + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object", "properties": { + "redirectHttpResponseCode": { + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string", + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ], + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ] + }, "securityLevel": { + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string", "enumDescriptions": [ "Not specified.", "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", @@ -1759,9 +1930,7 @@ "SECURE_NEVER", "SECURE_OPTIONAL", "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" + ] }, "authFailAction": { "enumDescriptions": [ @@ -1778,14 +1947,20 @@ "type": "string" }, "script": { - "description": "Executes a script to handle the request that matches this URL pattern.", - "$ref": "ScriptHandler" + "$ref": "ScriptHandler", + "description": "Executes a script to handle the request that matches this URL pattern." }, "urlRegex": { "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", "type": "string" }, "login": { + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ], "enum": [ "LOGIN_UNSPECIFIED", "LOGIN_OPTIONAL", @@ -1793,62 +1968,28 @@ "LOGIN_REQUIRED" ], "description": "Level of login required to access this resource.", - "type": "string", - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." - ] + "type": "string" }, "apiEndpoint": { - "description": "Uses API Endpoints to handle requests.", - "$ref": "ApiEndpointHandler" + "$ref": "ApiEndpointHandler", + "description": "Uses API Endpoints to handle requests." }, "staticDirectory": { - "description": "Serves the entire contents of a directory as static files.This attribute is deprecated. You can mimic the behavior of static directories using static files.", - "$ref": "StaticDirectoryHandler" + "$ref": "StaticDirectoryHandler", + "description": "Serves the entire contents of a directory as static files.This attribute is deprecated. You can mimic the behavior of static directories using static files." }, "staticFiles": { "description": "Returns the contents of a file, such as an image, as the response.", "$ref": "StaticFilesHandler" - }, - "redirectHttpResponseCode": { - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ], - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "type": "string", - "enumDescriptions": [ - "Not specified. 302 is assumed.", - "301 Moved Permanently code.", - "302 Moved Temporarily code.", - "303 See Other code.", - "307 Temporary Redirect code." - ] } }, - "id": "UrlMap", - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "type": "object" + "id": "UrlMap" }, "ApiConfigHandler": { + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", "properties": { - "script": { - "description": "Path to the script from the application root directory.", - "type": "string" - }, "login": { - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ], "description": "Level of login required to access this resource. Defaults to optional.", "type": "string", "enumDescriptions": [ @@ -1856,6 +1997,12 @@ "Does not require that the user is signed in.", "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", "If the user has signed in, the handler proceeds normally. Otherwise, the auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" ] }, "url": { @@ -1893,21 +2040,27 @@ ], "description": "Action to take when users access resources that require authentication. Defaults to redirect.", "type": "string" + }, + "script": { + "description": "Path to the script from the application root directory.", + "type": "string" } }, - "id": "ApiConfigHandler", - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "type": "object" + "id": "ApiConfigHandler" }, "Operation": { "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, "response": { + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" + } }, "name": { "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", @@ -1924,41 +2077,16 @@ }, "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", "type": "object" - }, - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" } }, "id": "Operation", "description": "This resource represents a long-running operation that is the result of a network API call.", "type": "object" }, - "FileInfo": { - "properties": { - "sourceUrl": { - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - }, - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", - "type": "string" - }, - "mimeType": { - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", - "type": "string" - } - }, - "id": "FileInfo", - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "type": "object" - }, "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", "properties": { - "requireMatchingFile": { - "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", - "type": "boolean" - }, "expiration": { "format": "google-duration", "description": "Time a static file served by this handler should be cached.", @@ -1986,11 +2114,13 @@ "mimeType": { "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" } }, - "id": "StaticFilesHandler", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "type": "object" + "id": "StaticFilesHandler" }, "ScriptHandler": { "description": "Executes a script to handle the request that matches the URL pattern.", @@ -2003,20 +2133,29 @@ }, "id": "ScriptHandler" }, + "FileInfo": { + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object", + "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + }, + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + } + }, + "id": "FileInfo" + }, "DiskUtilization": { "description": "Target scaling by disk usage. Only applicable for VM runtimes.", "type": "object", "properties": { - "targetReadBytesPerSec": { - "format": "int32", - "description": "Target bytes read per second.", - "type": "integer" - }, - "targetWriteOpsPerSec": { - "format": "int32", - "description": "Target ops written per second.", - "type": "integer" - }, "targetWriteBytesPerSec": { "format": "int32", "description": "Target bytes written per second.", @@ -2026,6 +2165,16 @@ "format": "int32", "description": "Target ops read per second.", "type": "integer" + }, + "targetReadBytesPerSec": { + "format": "int32", + "description": "Target bytes read per second.", + "type": "integer" + }, + "targetWriteOpsPerSec": { + "format": "int32", + "description": "Target ops written per second.", + "type": "integer" } }, "id": "DiskUtilization" @@ -2048,8 +2197,6 @@ "type": "object" }, "OperationMetadataExperimental": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", "properties": { "method": { "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", @@ -2074,9 +2221,13 @@ "type": "string" } }, - "id": "OperationMetadataExperimental" + "id": "OperationMetadataExperimental", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" }, "CpuUtilization": { + "description": "Target scaling by CPU usage.", + "type": "object", "properties": { "aggregationWindowLength": { "format": "google-duration", @@ -2089,9 +2240,7 @@ "type": "number" } }, - "id": "CpuUtilization", - "description": "Target scaling by CPU usage.", - "type": "object" + "id": "CpuUtilization" }, "IdentityAwareProxy": { "properties": { @@ -2117,7 +2266,14 @@ "type": "object" }, "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, "message": { "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", "type": "string" @@ -2132,16 +2288,9 @@ "type": "object" }, "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" } }, - "id": "Status", - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object" + "id": "Status" }, "TrafficSplit": { "properties": { @@ -2154,6 +2303,8 @@ "type": "object" }, "shardBy": { + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string", "enumDescriptions": [ "Diversion method unspecified.", "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or else no diversion will occur.", @@ -2163,9 +2314,7 @@ "UNSPECIFIED", "COOKIE", "IP" - ], - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "type": "string" + ] } }, "id": "TrafficSplit", @@ -2173,6 +2322,8 @@ "type": "object" }, "ManualScaling": { + "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "type": "object", "properties": { "instances": { "format": "int32", @@ -2180,41 +2331,30 @@ "type": "integer" } }, - "id": "ManualScaling", - "description": "A module with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "type": "object" + "id": "ManualScaling" }, "LocationMetadata": { + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object", "properties": { - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, "flexibleEnvironmentAvailable": { "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", "type": "boolean" + }, + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" } }, - "id": "LocationMetadata", - "description": "Metadata for the given google.cloud.location.Location.", - "type": "object" + "id": "LocationMetadata" }, "OperationMetadataV1Beta": { "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, "endTime": { "format": "google-datetime", "description": "Time that this operation completed.@OutputOnly", "type": "string" }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, "warning": { "description": "Durable messages that persist on every operation poll. @OutputOnly", "items": { @@ -2222,6 +2362,11 @@ }, "type": "array" }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" @@ -2233,160 +2378,21 @@ "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" } }, "id": "OperationMetadataV1Beta", "description": "Metadata for the given google.longrunning.Operation.", "type": "object" - }, - "ListModulesResponse": { - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "modules": { - "description": "The modules belonging to the requested application.", - "items": { - "$ref": "Module" - }, - "type": "array" - } - }, - "id": "ListModulesResponse", - "description": "Response message for Modules.ListModules.", - "type": "object" - }, - "Resources": { - "properties": { - "volumes": { - "description": "User specified volumes.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "diskGb": { - "format": "double", - "description": "Disk size (GB) needed.", - "type": "number" - }, - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" - } - }, - "id": "Resources", - "description": "Machine resources for a version.", - "type": "object" - }, - "Deployment": { - "description": "Code and application artifacts used to deploy a version to App Engine.", - "type": "object", - "properties": { - "files": { - "additionalProperties": { - "$ref": "FileInfo" - }, - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "type": "object" - }, - "sourceReferences": { - "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", - "items": { - "$ref": "SourceReference" - }, - "type": "array" - }, - "container": { - "$ref": "ContainerInfo", - "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." - } - }, - "id": "Deployment" - }, - "Volume": { - "properties": { - "sizeGb": { - "format": "double", - "description": "Volume size in gigabytes.", - "type": "number" - }, - "name": { - "description": "Unique name for the volume.", - "type": "string" - }, - "volumeType": { - "description": "Underlying volume type, e.g. 'tmpfs'.", - "type": "string" - } - }, - "id": "Volume", - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "type": "object" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadata" } }, "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "version": "v1beta4", "baseUrl": "https://appengine.googleapis.com/", @@ -2405,18 +2411,12 @@ } } }, - "kind": "discovery#restDescription", - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", "servicePath": "", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "kind": "discovery#restDescription", "rootUrl": "https://appengine.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "appengine", - "batchPath": "batch", - "id": "appengine:v1beta4", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "revision": "20170912", - "title": "Google App Engine Admin API", - "discoveryVersion": "v1", - "ownerName": "Google" + "batchPath": "batch" } diff --git a/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json b/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json index 58f892055..91e5dfdd0 100644 --- a/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json +++ b/vendor/google.golang.org/api/appengine/v1beta5/appengine-api.json @@ -1,24 +1,64 @@ { + "version": "v1beta5", + "baseUrl": "https://appengine.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/appengine.admin": { + "description": "View and manage your applications deployed on Google App Engine" + }, + "https://www.googleapis.com/auth/cloud-platform.read-only": { + "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", + "kind": "discovery#restDescription", + "rootUrl": "https://appengine.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "appengine", + "batchPath": "batch", + "id": "appengine:v1beta5", + "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", + "revision": "20170926", + "title": "Google App Engine Admin API", "discoveryVersion": "v1", "ownerName": "Google", "resources": { "apps": { "methods": { - "patch": { + "create": { + "id": "appengine.apps.create", + "path": "v1beta5/apps", + "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", "request": { "$ref": "Application" }, - "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)", "response": { "$ref": "Operation" }, - "parameterOrder": [ - "appsId" - ], - "httpMethod": "PATCH", + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "flatPath": "v1beta5/apps" + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "appsId" + ], + "response": { + "$ref": "Operation" + }, "parameters": { "appsId": { "location": "path", @@ -33,92 +73,50 @@ "type": "string" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta5/apps/{appsId}", + "path": "v1beta5/apps/{appsId}", "id": "appengine.apps.patch", - "path": "v1beta5/apps/{appsId}" + "description": "Updates the specified Application resource. You can update the following fields:\nauth_domain (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.auth_domain)\ndefault_cookie_expiration (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps#Application.FIELDS.default_cookie_expiration)", + "request": { + "$ref": "Application" + } }, "get": { - "httpMethod": "GET", "response": { "$ref": "Application" }, "parameterOrder": [ "appsId" ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "ensureResourcesExist": { - "location": "query", "description": "Certain resources associated with an application are created on-demand. Controls whether these resources should be created when performing the GET operation. If specified and any resources could not be created, the request will fail with an error code. Additionally, this parameter can cause the request to take longer to complete. Note: This parameter will be deprecated in a future version of the API.", - "type": "boolean" + "type": "boolean", + "location": "query" }, "appsId": { - "location": "path", "description": "Part of `name`. Name of the application to get. Example: apps/myapp.", "type": "string", - "required": true + "required": true, + "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1beta5/apps/{appsId}", - "path": "v1beta5/apps/{appsId}", "id": "appengine.apps.get", + "path": "v1beta5/apps/{appsId}", "description": "Gets information about an application." - }, - "create": { - "id": "appengine.apps.create", - "path": "v1beta5/apps", - "request": { - "$ref": "Application" - }, - "description": "Creates an App Engine application for a Google Cloud Platform project. Required fields:\nid - The ID of the target Cloud Platform project.\nlocation - The region (https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.For more information about App Engine applications, see Managing Projects, Applications, and Billing (https://cloud.google.com/appengine/docs/python/console/).", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1beta5/apps" } }, "resources": { "services": { "methods": { - "delete": { - "description": "Deletes the specified service and all enclosed versions.", - "httpMethod": "DELETE", - "parameterOrder": [ - "appsId", - "servicesId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", - "path": "v1beta5/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.delete" - }, "patch": { "response": { "$ref": "Operation" @@ -128,47 +126,43 @@ "servicesId" ], "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default.", "type": "string", - "required": true, - "location": "path" + "required": true }, "migrateTraffic": { + "location": "query", "description": "Set to true to gradually shift traffic to one or more versions that you specify. By default, traffic is shifted immediately. For gradual traffic migration, the target versions must be located within instances that are configured for both warmup requests (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#inboundservicetype) and automatic scaling (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services.versions#automaticscaling). You must specify the shardBy (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta5/apps.services#shardby) field in the Service resource. Gradual traffic migration is not supported in the App Engine flexible environment. For examples, see Migrating and Splitting Traffic (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).", - "type": "boolean", - "location": "query" + "type": "boolean" }, "mask": { "format": "google-fieldmask", "description": "Standard field mask for the set of fields to be updated.", "type": "string", "location": "query" - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", "id": "appengine.apps.services.patch", "path": "v1beta5/apps/{appsId}/services/{servicesId}", - "description": "Updates the configuration of the specified service.", "request": { "$ref": "Service" - } + }, + "description": "Updates the configuration of the specified service." }, "list": { - "flatPath": "v1beta5/apps/{appsId}/services", - "path": "v1beta5/apps/{appsId}/services", - "id": "appengine.apps.services.list", - "description": "Lists all the services in the application.", "httpMethod": "GET", "parameterOrder": [ "appsId" @@ -176,33 +170,38 @@ "response": { "$ref": "ListServicesResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", - "type": "string", - "required": true, - "location": "path" - }, "pageSize": { "format": "int32", "description": "Maximum results to return per page.", "type": "integer", "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp.", + "type": "string", + "required": true } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta5/apps/{appsId}/services", + "path": "v1beta5/apps/{appsId}/services", + "id": "appengine.apps.services.list", + "description": "Lists all the services in the application." }, "get": { "description": "Gets the current configuration of the specified service.", + "httpMethod": "GET", "response": { "$ref": "Service" }, @@ -210,12 +209,42 @@ "appsId", "servicesId" ], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/appengine.admin", "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", + "path": "v1beta5/apps/{appsId}/services/{servicesId}", + "id": "appengine.apps.services.get" + }, + "delete": { + "description": "Deletes the specified service and all enclosed versions.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "servicesId": { "location": "path", @@ -231,228 +260,27 @@ } }, "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}", - "id": "appengine.apps.services.get", + "id": "appengine.apps.services.delete", "path": "v1beta5/apps/{appsId}/services/{servicesId}" } }, "resources": { "versions": { - "resources": { - "instances": { - "methods": { - "delete": { - "id": "appengine.apps.services.versions.instances.delete", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "description": "Stops a running instance.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/services/default/versions/v1/instances/instance-1\".", - "type": "string", - "required": true - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "servicesId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}" - }, - "list": { - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId" - ], - "response": { - "$ref": "ListInstancesResponse" - }, - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum results to return per page.", - "type": "integer" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string", - "location": "query" - }, - "appsId": { - "location": "path", - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "id": "appengine.apps.services.versions.instances.list", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", - "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list)." - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "response": { - "$ref": "Instance" - }, - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", - "id": "appengine.apps.services.versions.instances.get", - "description": "Gets instance information." - }, - "debug": { - "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "id": "appengine.apps.services.versions.instances.debug", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", - "request": { - "$ref": "DebugInstanceRequest" - }, - "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "appsId", - "servicesId", - "versionsId", - "instancesId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "servicesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "instancesId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - }, - "appsId": { - "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", - "type": "string", - "required": true, - "location": "path" - }, - "versionsId": { - "location": "path", - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true - } - } - } - } - } - }, "methods": { "delete": { - "description": "Deletes an existing version.", - "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, "parameterOrder": [ "appsId", "servicesId", "versionsId" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "versionsId": { - "description": "Part of `name`. See documentation of `appsId`.", - "type": "string", - "required": true, - "location": "path" - }, "servicesId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", @@ -464,14 +292,18 @@ "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", "type": "string", "required": true + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.delete", "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.delete" + "description": "Deletes an existing version." }, "patch": { "httpMethod": "PATCH", @@ -491,10 +323,10 @@ "location": "path" }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource to update. Example: apps/myapp/services/default/versions/1.", "type": "string", - "required": true, - "location": "path" + "required": true }, "mask": { "format": "google-fieldmask", @@ -503,10 +335,10 @@ "location": "query" }, "versionsId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "scopes": [ @@ -522,7 +354,6 @@ }, "list": { "description": "Lists the versions of a service.", - "httpMethod": "GET", "response": { "$ref": "ListVersionsResponse" }, @@ -530,6 +361,12 @@ "appsId", "servicesId" ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { "servicesId": { "description": "Part of `name`. See documentation of `appsId`.", @@ -543,39 +380,32 @@ "location": "query" }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", "type": "string", - "required": true, - "location": "path" + "required": true }, "pageSize": { + "location": "query", "format": "int32", "description": "Maximum results to return per page.", - "type": "integer", - "location": "query" + "type": "integer" }, "view": { - "description": "Controls the set of fields returned in the List response.", - "type": "string", "location": "query", "enum": [ "BASIC", "FULL" - ] + ], + "description": "Controls the set of fields returned in the List response.", + "type": "string" } }, - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions", - "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions", - "id": "appengine.apps.services.versions.list" + "id": "appengine.apps.services.versions.list", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions" }, "get": { - "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource.", - "httpMethod": "GET", "response": { "$ref": "Version" }, @@ -584,17 +414,13 @@ "servicesId", "versionsId" ], - "scopes": [ - "https://www.googleapis.com/auth/appengine.admin", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], + "httpMethod": "GET", "parameters": { "servicesId": { - "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true + "required": true, + "location": "path" }, "appsId": { "location": "path", @@ -603,24 +429,30 @@ "required": true }, "view": { + "location": "query", "enum": [ "BASIC", "FULL" ], "description": "Controls the set of fields returned in the Get response.", - "type": "string", - "location": "query" + "type": "string" }, "versionsId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", + "id": "appengine.apps.services.versions.get", "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}", - "id": "appengine.apps.services.versions.get" + "description": "Gets the specified Version resource. By default, only a BASIC_VIEW will be returned. Specify the FULL_VIEW parameter to get the full resource." }, "create": { "description": "Deploys new code and resource files to a new version.", @@ -637,16 +469,16 @@ "httpMethod": "POST", "parameters": { "servicesId": { + "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", - "required": true, - "location": "path" + "required": true }, "appsId": { + "location": "path", "description": "Part of `name`. Name of the resource to update. For example: \"apps/myapp/services/default\".", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ @@ -656,6 +488,203 @@ "id": "appengine.apps.services.versions.create", "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions" } + }, + "resources": { + "instances": { + "methods": { + "delete": { + "description": "Stops a running instance.", + "httpMethod": "DELETE", + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "description": "Part of `name`. Name of the resource requested. For example: \"apps/myapp/services/default/versions/v1/instances/instance-1\".", + "type": "string", + "required": true, + "location": "path" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.delete" + }, + "list": { + "description": "Lists the instances of a version.Tip: To aggregate details about instances over time, see the Stackdriver Monitoring API (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).", + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string", + "location": "query" + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum results to return per page.", + "type": "integer" + }, + "versionsId": { + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances", + "id": "appengine.apps.services.versions.instances.list", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances" + }, + "get": { + "response": { + "$ref": "Instance" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/appengine.admin", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true + }, + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "id": "appengine.apps.services.versions.instances.get", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}", + "description": "Gets instance information." + }, + "debug": { + "request": { + "$ref": "DebugInstanceRequest" + }, + "description": "Enables debugging on a VM instance. This allows you to use the SSH command to connect to the virtual machine where the instance lives. While in \"debug mode\", the instance continues to serve live traffic. You should delete the instance when you are done debugging and then allow the system to take over and determine if another instance should be started.Only applicable for instances in App Engine flexible environment.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "appsId", + "servicesId", + "versionsId", + "instancesId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "versionsId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "servicesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "instancesId": { + "location": "path", + "description": "Part of `name`. See documentation of `appsId`.", + "type": "string", + "required": true + }, + "appsId": { + "location": "path", + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default/versions/v1/instances/instance-1.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug", + "id": "appengine.apps.services.versions.instances.debug", + "path": "v1beta5/apps/{appsId}/services/{servicesId}/versions/{versionsId}/instances/{instancesId}:debug" + } + } + } } } } @@ -677,14 +706,14 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "parameters": { - "operationsId": { - "description": "Part of `name`. See documentation of `appsId`.", + "appsId": { + "description": "Part of `name`. The name of the operation resource.", "type": "string", "required": true, "location": "path" }, - "appsId": { - "description": "Part of `name`. The name of the operation resource.", + "operationsId": { + "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true, "location": "path" @@ -710,26 +739,26 @@ ], "parameters": { "filter": { - "location": "query", "description": "The standard list filter.", - "type": "string" + "type": "string", + "location": "query" }, "pageToken": { - "location": "query", "description": "The standard list page token.", - "type": "string" + "type": "string", + "location": "query" }, "appsId": { + "location": "path", "description": "Part of `name`. The name of the operation's parent resource.", "type": "string", - "required": true, - "location": "path" + "required": true }, "pageSize": { + "location": "query", "format": "int32", "description": "The standard list page size.", - "type": "integer", - "location": "query" + "type": "integer" } }, "flatPath": "v1beta5/apps/{appsId}/operations", @@ -742,6 +771,9 @@ "locations": { "methods": { "get": { + "id": "appengine.apps.locations.get", + "path": "v1beta5/apps/{appsId}/locations/{locationsId}", + "description": "Get information about a location.", "response": { "$ref": "Location" }, @@ -751,17 +783,17 @@ ], "httpMethod": "GET", "parameters": { - "appsId": { - "location": "path", - "description": "Part of `name`. Resource name for the location.", - "type": "string", - "required": true - }, "locationsId": { "location": "path", "description": "Part of `name`. See documentation of `appsId`.", "type": "string", "required": true + }, + "appsId": { + "description": "Part of `name`. Resource name for the location.", + "type": "string", + "required": true, + "location": "path" } }, "scopes": [ @@ -769,20 +801,17 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1beta5/apps/{appsId}/locations/{locationsId}", - "id": "appengine.apps.locations.get", - "path": "v1beta5/apps/{appsId}/locations/{locationsId}", - "description": "Get information about a location." + "flatPath": "v1beta5/apps/{appsId}/locations/{locationsId}" }, "list": { "description": "Lists information about the supported locations for this service.", + "httpMethod": "GET", "response": { "$ref": "ListLocationsResponse" }, "parameterOrder": [ "appsId" ], - "httpMethod": "GET", "parameters": { "filter": { "location": "query", @@ -801,10 +830,10 @@ "location": "path" }, "pageSize": { + "location": "query", "format": "int32", "description": "The standard list page size.", - "type": "integer", - "location": "query" + "type": "integer" } }, "scopes": [ @@ -813,8 +842,8 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "flatPath": "v1beta5/apps/{appsId}/locations", - "id": "appengine.apps.locations.list", - "path": "v1beta5/apps/{appsId}/locations" + "path": "v1beta5/apps/{appsId}/locations", + "id": "appengine.apps.locations.list" } } } @@ -822,30 +851,15 @@ } }, "parameters": { - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, "quotaUser": { "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", "type": "string", "location": "query" }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", + "type": "boolean", "location": "query" }, "bearer_token": { @@ -853,46 +867,52 @@ "type": "string", "location": "query" }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" + "type": "boolean" }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" }, "$.xgafv": { + "enum": [ + "1", + "2" + ], "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" ], + "location": "query" + }, + "callback": { "location": "query", - "enum": [ - "1", - "2" - ] + "description": "JSONP", + "type": "string" }, "alt": { + "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -905,1144 +925,23 @@ "json", "media", "proto" - ], + ] + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", "type": "string" } }, "schemas": { - "ApiEndpointHandler": { - "description": "Uses Google Cloud Endpoints to handle requests.", - "type": "object", - "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", - "type": "string" - } - }, - "id": "ApiEndpointHandler" - }, - "AutomaticScaling": { - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", - "type": "object", - "properties": { - "diskUtilization": { - "description": "Target scaling by disk usage.", - "$ref": "DiskUtilization" - }, - "minPendingLatency": { - "format": "google-duration", - "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "requestUtilization": { - "$ref": "RequestUtilization", - "description": "Target scaling by request utilization." - }, - "maxIdleInstances": { - "format": "int32", - "description": "Maximum number of idle instances that should be maintained for this version.", - "type": "integer" - }, - "minIdleInstances": { - "format": "int32", - "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", - "type": "integer" - }, - "maxTotalInstances": { - "format": "int32", - "description": "Maximum number of instances that should be started to handle requests.", - "type": "integer" - }, - "minTotalInstances": { - "format": "int32", - "description": "Minimum number of instances that should be maintained for this version.", - "type": "integer" - }, - "networkUtilization": { - "description": "Target scaling by network usage.", - "$ref": "NetworkUtilization" - }, - "coolDownPeriod": { - "format": "google-duration", - "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", - "type": "string" - }, - "maxConcurrentRequests": { - "format": "int32", - "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", - "type": "integer" - }, - "maxPendingLatency": { - "format": "google-duration", - "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", - "type": "string" - }, - "cpuUtilization": { - "$ref": "CpuUtilization", - "description": "Target scaling by CPU usage." - } - }, - "id": "AutomaticScaling" - }, - "Location": { - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", - "type": "object" - }, - "name": { - "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", - "type": "string" - }, - "locationId": { - "description": "The canonical id for this location. For example: \"us-east1\".", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given location.", - "type": "object" - } - }, - "id": "Location", - "description": "A resource that represents Google Cloud Platform location.", - "type": "object" - }, - "NetworkUtilization": { - "description": "Target scaling by network usage. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "targetReceivedBytesPerSec": { - "format": "int32", - "description": "Target bytes received per second.", - "type": "integer" - }, - "targetSentPacketsPerSec": { - "format": "int32", - "description": "Target packets sent per second.", - "type": "integer" - }, - "targetReceivedPacketsPerSec": { - "format": "int32", - "description": "Target packets received per second.", - "type": "integer" - }, - "targetSentBytesPerSec": { - "format": "int32", - "description": "Target bytes sent per second.", - "type": "integer" - } - }, - "id": "NetworkUtilization" - }, - "HealthCheck": { - "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", - "type": "object", - "properties": { - "unhealthyThreshold": { - "format": "uint32", - "description": "Number of consecutive failed health checks required before removing traffic.", - "type": "integer" - }, - "disableHealthCheck": { - "description": "Whether to explicitly disable health checks for this instance.", - "type": "boolean" - }, - "host": { - "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", - "type": "string" - }, - "restartThreshold": { - "format": "uint32", - "description": "Number of consecutive failed health checks required before an instance is restarted.", - "type": "integer" - }, - "healthyThreshold": { - "format": "uint32", - "description": "Number of consecutive successful health checks required before receiving traffic.", - "type": "integer" - }, - "checkInterval": { - "format": "google-duration", - "description": "Interval between health checks.", - "type": "string" - }, - "timeout": { - "format": "google-duration", - "description": "Time before the health check is considered failed.", - "type": "string" - } - }, - "id": "HealthCheck" - }, - "SourceReference": { - "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", - "type": "object", - "properties": { - "repository": { - "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"", - "type": "string" - }, - "revisionId": { - "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"", - "type": "string" - } - }, - "id": "SourceReference" - }, - "DebugInstanceRequest": { - "properties": { - "sshKey": { - "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", - "type": "string" - } - }, - "id": "DebugInstanceRequest", - "description": "Request message for Instances.DebugInstance.", - "type": "object" - }, - "OperationMetadataV1Beta5": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta5" - }, - "Library": { - "description": "Third-party Python runtime library that is required by the application.", - "type": "object", - "properties": { - "name": { - "description": "Name of the library. Example: \"django\".", - "type": "string" - }, - "version": { - "description": "Version of the library to select, or \"latest\".", - "type": "string" - } - }, - "id": "Library" - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - }, - "type": "array" - } - }, - "id": "ListLocationsResponse" - }, - "Version": { - "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", - "type": "object", - "properties": { - "basicScaling": { - "$ref": "BasicScaling", - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." - }, - "runtime": { - "description": "Desired runtime. Example: python27.", - "type": "string" - }, - "id": { - "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", - "type": "string" - }, - "envVariables": { - "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "network": { - "$ref": "Network", - "description": "Extra network settings. Only applicable for VM runtimes." - }, - "betaSettings": { - "description": "Metadata settings that are supplied to this version to enable beta runtime features.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "env": { - "description": "App Engine execution environment to use for this version.Defaults to 1.", - "type": "string" - }, - "handlers": { - "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "UrlMap" - }, - "type": "array" - }, - "deployer": { - "description": "Email address of the user who created this version.@OutputOnly", - "type": "string" - }, - "automaticScaling": { - "$ref": "AutomaticScaling", - "description": "Automatic scaling is based on request rate, response latencies, and other application metrics." - }, - "diskUsageBytes": { - "format": "int64", - "description": "Total size of version files hosted on App Engine disk in bytes.@OutputOnly", - "type": "string" - }, - "healthCheck": { - "$ref": "HealthCheck", - "description": "Configures health checking for VM instances. Unhealthy instances are be stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." - }, - "threadsafe": { - "description": "Whether multiple requests can be dispatched to this version at once.", - "type": "boolean" - }, - "manualScaling": { - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "$ref": "ManualScaling" - }, - "name": { - "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", - "type": "string" - }, - "apiConfig": { - "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.", - "$ref": "ApiConfigHandler" - }, - "endpointsApiService": { - "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app.", - "$ref": "EndpointsApiService" - }, - "vm": { - "description": "Whether to deploy this version in a container on a virtual machine.", - "type": "boolean" - }, - "instanceClass": { - "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", - "type": "string" - }, - "servingStatus": { - "enumDescriptions": [ - "Not specified.", - "Currently serving. Instances are created according to the scaling settings of the version.", - "Disabled from serving. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." - ], - "enum": [ - "SERVING_STATUS_UNSPECIFIED", - "SERVING", - "STOPPED" - ], - "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", - "type": "string" - }, - "runtimeApiVersion": { - "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", - "type": "string" - }, - "deployment": { - "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set.", - "$ref": "Deployment" - }, - "resources": { - "$ref": "Resources", - "description": "Machine resources for this version. Only applicable for VM runtimes." - }, - "inboundServices": { - "enumDescriptions": [ - "Not specified.", - "Allows an application to receive mail.", - "Allows an application to receive email-bound notifications.", - "Allows an application to receive error stanzas.", - "Allows an application to receive instant messages.", - "Allows an application to receive user subscription POSTs.", - "Allows an application to receive a user's chat presence.", - "Registers an application for notifications when a client connects or disconnects from a channel.", - "Enables warmup requests." - ], - "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", - "items": { - "type": "string", - "enum": [ - "INBOUND_SERVICE_UNSPECIFIED", - "INBOUND_SERVICE_MAIL", - "INBOUND_SERVICE_MAIL_BOUNCE", - "INBOUND_SERVICE_XMPP_ERROR", - "INBOUND_SERVICE_XMPP_MESSAGE", - "INBOUND_SERVICE_XMPP_SUBSCRIBE", - "INBOUND_SERVICE_XMPP_PRESENCE", - "INBOUND_SERVICE_CHANNEL_PRESENCE", - "INBOUND_SERVICE_WARMUP" - ] - }, - "type": "array" - }, - "errorHandlers": { - "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "ErrorHandler" - }, - "type": "array" - }, - "defaultExpiration": { - "format": "google-duration", - "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.", - "type": "string" - }, - "libraries": { - "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", - "items": { - "$ref": "Library" - }, - "type": "array" - }, - "creationTime": { - "format": "google-datetime", - "description": "Time that this version was created.@OutputOnly", - "type": "string" - }, - "nobuildFilesRegex": { - "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", - "type": "string" - } - }, - "id": "Version" - }, - "ContainerInfo": { - "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", - "type": "object", - "properties": { - "image": { - "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", - "type": "string" - } - }, - "id": "ContainerInfo" - }, - "RequestUtilization": { - "properties": { - "targetConcurrentRequests": { - "format": "int32", - "description": "Target number of concurrent requests.", - "type": "integer" - }, - "targetRequestCountPerSec": { - "format": "int32", - "description": "Target requests per second.", - "type": "integer" - } - }, - "id": "RequestUtilization", - "description": "Target scaling by request utilization. Only applicable for VM runtimes.", - "type": "object" - }, - "UrlMap": { - "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", - "type": "object", - "properties": { - "securityLevel": { - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ], - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" - }, - "authFailAction": { - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string", - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with an401 HTTP status code and an error message." - ], - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ] - }, - "script": { - "$ref": "ScriptHandler", - "description": "Executes a script to handle the request that matches this URL pattern." - }, - "urlRegex": { - "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", - "type": "string" - }, - "login": { - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." - ], - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ], - "description": "Level of login required to access this resource.", - "type": "string" - }, - "apiEndpoint": { - "description": "Uses API Endpoints to handle requests.", - "$ref": "ApiEndpointHandler" - }, - "staticFiles": { - "description": "Returns the contents of a file, such as an image, as the response.", - "$ref": "StaticFilesHandler" - }, - "redirectHttpResponseCode": { - "enum": [ - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", - "REDIRECT_HTTP_RESPONSE_CODE_301", - "REDIRECT_HTTP_RESPONSE_CODE_302", - "REDIRECT_HTTP_RESPONSE_CODE_303", - "REDIRECT_HTTP_RESPONSE_CODE_307" - ], - "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", - "type": "string", - "enumDescriptions": [ - "Not specified. 302 is assumed.", - "301 Moved Permanently code.", - "302 Moved Temporarily code.", - "303 See Other code.", - "307 Temporary Redirect code." - ] - } - }, - "id": "UrlMap" - }, - "EndpointsApiService": { - "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", - "type": "object", - "properties": { - "configId": { - "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", - "type": "string" - }, - "name": { - "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", - "type": "string" - } - }, - "id": "EndpointsApiService" - }, - "ApiConfigHandler": { - "properties": { - "url": { - "description": "URL to serve the endpoint at.", - "type": "string" - }, - "securityLevel": { - "enumDescriptions": [ - "Not specified.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", - "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", - "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", - "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." - ], - "enum": [ - "SECURE_UNSPECIFIED", - "SECURE_DEFAULT", - "SECURE_NEVER", - "SECURE_OPTIONAL", - "SECURE_ALWAYS" - ], - "description": "Security (HTTPS) enforcement for this URL.", - "type": "string" - }, - "authFailAction": { - "enumDescriptions": [ - "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", - "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", - "Rejects request with an401 HTTP status code and an error message." - ], - "enum": [ - "AUTH_FAIL_ACTION_UNSPECIFIED", - "AUTH_FAIL_ACTION_REDIRECT", - "AUTH_FAIL_ACTION_UNAUTHORIZED" - ], - "description": "Action to take when users access resources that require authentication. Defaults to redirect.", - "type": "string" - }, - "script": { - "description": "Path to the script from the application root directory.", - "type": "string" - }, - "login": { - "description": "Level of login required to access this resource. Defaults to optional.", - "type": "string", - "enumDescriptions": [ - "Not specified. LOGIN_OPTIONAL is assumed.", - "Does not require that the user is signed in.", - "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", - "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." - ], - "enum": [ - "LOGIN_UNSPECIFIED", - "LOGIN_OPTIONAL", - "LOGIN_ADMIN", - "LOGIN_REQUIRED" - ] - } - }, - "id": "ApiConfigHandler", - "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", - "type": "object" - }, - "Operation": { - "properties": { - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" - } - }, - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object" - }, - "FileInfo": { - "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", - "type": "object", - "properties": { - "sha1Sum": { - "description": "The SHA1 hash of the file, in hex.", - "type": "string" - }, - "mimeType": { - "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", - "type": "string" - }, - "sourceUrl": { - "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", - "type": "string" - } - }, - "id": "FileInfo" - }, - "StaticFilesHandler": { - "properties": { - "requireMatchingFile": { - "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", - "type": "boolean" - }, - "expiration": { - "format": "google-duration", - "description": "Time a static file served by this handler should be cached.", - "type": "string" - }, - "applicationReadable": { - "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", - "type": "boolean" - }, - "httpHeaders": { - "additionalProperties": { - "type": "string" - }, - "description": "HTTP headers to use for all responses from these URLs.", - "type": "object" - }, - "uploadPathRegex": { - "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", - "type": "string" - }, - "path": { - "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", - "type": "string" - }, - "mimeType": { - "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", - "type": "string" - } - }, - "id": "StaticFilesHandler", - "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", - "type": "object" - }, - "ScriptHandler": { - "properties": { - "scriptPath": { - "description": "Path to the script from the application root directory.", - "type": "string" - } - }, - "id": "ScriptHandler", - "description": "Executes a script to handle the request that matches the URL pattern.", - "type": "object" - }, - "BasicScaling": { - "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", - "type": "object", - "properties": { - "idleTimeout": { - "format": "google-duration", - "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", - "type": "string" - }, - "maxInstances": { - "format": "int32", - "description": "Maximum number of instances to create for this version.", - "type": "integer" - } - }, - "id": "BasicScaling" - }, - "DiskUtilization": { - "properties": { - "targetReadOpsPerSec": { - "format": "int32", - "description": "Target ops read per second.", - "type": "integer" - }, - "targetReadBytesPerSec": { - "format": "int32", - "description": "Target bytes read per second.", - "type": "integer" - }, - "targetWriteOpsPerSec": { - "format": "int32", - "description": "Target ops written per second.", - "type": "integer" - }, - "targetWriteBytesPerSec": { - "format": "int32", - "description": "Target bytes written per second.", - "type": "integer" - } - }, - "id": "DiskUtilization", - "description": "Target scaling by disk usage. Only applicable for VM runtimes.", - "type": "object" - }, - "OperationMetadataExperimental": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "method": { - "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataExperimental" - }, - "CpuUtilization": { - "description": "Target scaling by CPU usage.", - "type": "object", - "properties": { - "aggregationWindowLength": { - "format": "google-duration", - "description": "Period of time over which CPU utilization is calculated.", - "type": "string" - }, - "targetUtilization": { - "format": "double", - "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", - "type": "number" - } - }, - "id": "CpuUtilization" - }, - "Status": { - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - } - }, - "id": "Status" - }, - "IdentityAwareProxy": { - "description": "Identity-Aware Proxy", - "type": "object", - "properties": { - "oauth2ClientSecret": { - "description": "For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", - "type": "string" - }, - "oauth2ClientId": { - "description": "OAuth2 client ID to use for the authentication flow.", - "type": "string" - }, - "oauth2ClientSecretSha256": { - "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", - "type": "string" - }, - "enabled": { - "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", - "type": "boolean" - } - }, - "id": "IdentityAwareProxy" - }, - "TrafficSplit": { - "properties": { - "allocations": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", - "type": "object" - }, - "shardBy": { - "enum": [ - "UNSPECIFIED", - "COOKIE", - "IP" - ], - "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", - "type": "string", - "enumDescriptions": [ - "Diversion method unspecified.", - "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or else no diversion will occur.", - "Diversion based on applying the modulus operation to a fingerprint of the IP address." - ] - } - }, - "id": "TrafficSplit", - "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", - "type": "object" - }, - "ManualScaling": { - "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", - "type": "object", - "properties": { - "instances": { - "format": "int32", - "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", - "type": "integer" - } - }, - "id": "ManualScaling" - }, - "LocationMetadata": { - "description": "Metadata for the given google.cloud.location.Location.", - "type": "object", - "properties": { - "standardEnvironmentAvailable": { - "description": "App Engine Standard Environment is available in the given location.@OutputOnly", - "type": "boolean" - }, - "flexibleEnvironmentAvailable": { - "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", - "type": "boolean" - } - }, - "id": "LocationMetadata" - }, - "OperationMetadataV1Beta": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", - "properties": { - "warning": { - "description": "Durable messages that persist on every operation poll. @OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "insertTime": { - "format": "google-datetime", - "description": "Time that this operation was created.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "ephemeralMessage": { - "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Time that this operation completed.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadataV1Beta" - }, - "ListServicesResponse": { - "description": "Response message for Services.ListServices.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Continuation token for fetching the next page of results.", - "type": "string" - }, - "services": { - "description": "The services belonging to the requested application.", - "items": { - "$ref": "Service" - }, - "type": "array" - } - }, - "id": "ListServicesResponse" - }, - "Deployment": { - "description": "Code and application artifacts used to deploy a version to App Engine.", - "type": "object", - "properties": { - "files": { - "additionalProperties": { - "$ref": "FileInfo" - }, - "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", - "type": "object" - }, - "sourceReferences": { - "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", - "items": { - "$ref": "SourceReference" - }, - "type": "array" - }, - "container": { - "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment.", - "$ref": "ContainerInfo" - } - }, - "id": "Deployment" - }, - "Resources": { - "description": "Machine resources for a version.", - "type": "object", - "properties": { - "memoryGb": { - "format": "double", - "description": "Memory (GB) needed.", - "type": "number" - }, - "cpu": { - "format": "double", - "description": "Number of CPU cores needed.", - "type": "number" - }, - "volumes": { - "description": "Volumes mounted within the app container.", - "items": { - "$ref": "Volume" - }, - "type": "array" - }, - "diskGb": { - "format": "double", - "description": "Disk size (GB) needed.", - "type": "number" - } - }, - "id": "Resources" - }, - "Service": { - "properties": { - "name": { - "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, - "split": { - "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service.", - "$ref": "TrafficSplit" - }, - "id": { - "description": "Relative name of the service within the application. Example: default.@OutputOnly", - "type": "string" - } - }, - "id": "Service", - "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle other tasks such as API requests from mobile devices or backend data analysis. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", - "type": "object" - }, - "Volume": { - "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", - "type": "object", - "properties": { - "volumeType": { - "description": "Underlying volume type, e.g. 'tmpfs'.", - "type": "string" - }, - "sizeGb": { - "format": "double", - "description": "Volume size in gigabytes.", - "type": "number" - }, - "name": { - "description": "Unique name for the volume.", - "type": "string" - } - }, - "id": "Volume" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "OperationMetadata": { - "properties": { - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", - "type": "string" - }, - "user": { - "description": "User who requested this operation.@OutputOnly", - "type": "string" - }, - "method": { - "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "Timestamp that this operation completed.@OutputOnly", - "type": "string" - }, - "operationType": { - "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", - "type": "string" - }, - "insertTime": { - "format": "google-datetime", - "description": "Timestamp that this operation was created.@OutputOnly", - "type": "string" - } - }, - "id": "OperationMetadata", - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object" - }, "ListInstancesResponse": { + "description": "Response message for Instances.ListInstances.", + "type": "object", "properties": { "nextPageToken": { "description": "Continuation token for fetching the next page of results.", @@ -2056,13 +955,9 @@ "type": "array" } }, - "id": "ListInstancesResponse", - "description": "Response message for Instances.ListInstances.", - "type": "object" + "id": "ListInstancesResponse" }, "OperationMetadataV1": { - "description": "Metadata for the given google.longrunning.Operation.", - "type": "object", "properties": { "endTime": { "format": "google-datetime", @@ -2081,14 +976,14 @@ "description": "Time that this operation was created.@OutputOnly", "type": "string" }, - "target": { - "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", - "type": "string" - }, "user": { "description": "User who requested this operation.@OutputOnly", "type": "string" }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, "ephemeralMessage": { "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", "type": "string" @@ -2098,7 +993,9 @@ "type": "string" } }, - "id": "OperationMetadataV1" + "id": "OperationMetadataV1", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" }, "ErrorHandler": { "description": "Custom static error page to be served when an error occurs.", @@ -2109,6 +1006,8 @@ "type": "string" }, "errorCode": { + "description": "Error condition this handler applies to.", + "type": "string", "enumDescriptions": [ "Not specified. ERROR_CODE_DEFAULT is assumed.", "All other error types.", @@ -2122,9 +1021,7 @@ "ERROR_CODE_OVER_QUOTA", "ERROR_CODE_DOS_API_DENIAL", "ERROR_CODE_TIMEOUT" - ], - "description": "Error condition this handler applies to.", - "type": "string" + ] }, "staticFile": { "description": "Static file content to be served for this error.", @@ -2249,55 +1146,17 @@ }, "id": "Network" }, - "UrlDispatchRule": { - "description": "Rules to match an HTTP request and dispatch that request to a service.", + "Instance": { + "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", "type": "object", "properties": { - "service": { - "description": "Resource id of a service in this application that should serve the matched request. The service must already exist. Example: default.", - "type": "string" - }, - "domain": { - "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", - "type": "string" - }, - "path": { - "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", - "type": "string" - } - }, - "id": "UrlDispatchRule" - }, - "Instance": { - "properties": { - "vmId": { - "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "qps": { - "format": "float", - "description": "Average queries per second (QPS) over the last minute.@OutputOnly", - "type": "number" - }, - "vmZoneName": { - "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "string" - }, - "vmUnlocked": { - "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", - "type": "boolean" - }, - "name": { - "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", - "type": "string" - }, "averageLatency": { "format": "int32", "description": "Average latency (ms) over the last minute.@OutputOnly", "type": "integer" }, - "vmIp": { - "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "id": { + "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", "type": "string" }, "memoryUsage": { @@ -2305,12 +1164,8 @@ "description": "Total memory in use (bytes).@OutputOnly", "type": "string" }, - "id": { - "description": "Relative name of the instance within the version. Example: instance-1.@OutputOnly", - "type": "string" - }, - "vmStatus": { - "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "vmIp": { + "description": "The IP address of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" }, "errors": { @@ -2318,19 +1173,23 @@ "description": "Number of errors since this instance was started.@OutputOnly", "type": "integer" }, + "vmStatus": { + "description": "Status of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, "availability": { - "enumDescriptions": [ - "", - "", - "" - ], "enum": [ "UNSPECIFIED", "RESIDENT", "DYNAMIC" ], "description": "Availability of the instance.@OutputOnly", - "type": "string" + "type": "string", + "enumDescriptions": [ + "", + "", + "" + ] }, "requests": { "format": "int32", @@ -2349,10 +1208,48 @@ "vmName": { "description": "Name of the virtual machine where this instance lives. Only applicable for instances in App Engine flexible environment.@OutputOnly", "type": "string" + }, + "vmId": { + "description": "Virtual machine ID of this instance. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" + }, + "qps": { + "format": "float", + "description": "Average queries per second (QPS) over the last minute.@OutputOnly", + "type": "number" + }, + "vmUnlocked": { + "description": "Whether this instance is in debug mode. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "boolean" + }, + "name": { + "description": "Full path to the Instance resource in the API. Example: apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly", + "type": "string" + }, + "vmZoneName": { + "description": "Zone where the virtual machine is located. Only applicable for instances in App Engine flexible environment.@OutputOnly", + "type": "string" } }, - "id": "Instance", - "description": "An Instance resource is the computing unit that App Engine uses to automatically scale an application.", + "id": "Instance" + }, + "UrlDispatchRule": { + "properties": { + "service": { + "description": "Resource id of a service in this application that should serve the matched request. The service must already exist. Example: default.", + "type": "string" + }, + "domain": { + "description": "Domain name to match against. The wildcard \"*\" is supported if specified before a period: \"*.\".Defaults to matching all domains: \"*\".", + "type": "string" + }, + "path": { + "description": "Pathname within the host. Must start with a \"/\". A single \"*\" can be included at the end of the path. The sum of the lengths of the domain and path may not exceed 100 characters.", + "type": "string" + } + }, + "id": "UrlDispatchRule", + "description": "Rules to match an HTTP request and dispatch that request to a service.", "type": "object" }, "ListVersionsResponse": { @@ -2372,40 +1269,1143 @@ } }, "id": "ListVersionsResponse" + }, + "ApiEndpointHandler": { + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ApiEndpointHandler", + "description": "Uses Google Cloud Endpoints to handle requests.", + "type": "object" + }, + "AutomaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "type": "object", + "properties": { + "cpuUtilization": { + "$ref": "CpuUtilization", + "description": "Target scaling by CPU usage." + }, + "diskUtilization": { + "description": "Target scaling by disk usage.", + "$ref": "DiskUtilization" + }, + "minPendingLatency": { + "format": "google-duration", + "description": "Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + }, + "requestUtilization": { + "$ref": "RequestUtilization", + "description": "Target scaling by request utilization." + }, + "maxIdleInstances": { + "format": "int32", + "description": "Maximum number of idle instances that should be maintained for this version.", + "type": "integer" + }, + "minIdleInstances": { + "format": "int32", + "description": "Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a module.", + "type": "integer" + }, + "maxTotalInstances": { + "format": "int32", + "description": "Maximum number of instances that should be started to handle requests.", + "type": "integer" + }, + "minTotalInstances": { + "format": "int32", + "description": "Minimum number of instances that should be maintained for this version.", + "type": "integer" + }, + "networkUtilization": { + "$ref": "NetworkUtilization", + "description": "Target scaling by network usage." + }, + "coolDownPeriod": { + "format": "google-duration", + "description": "Amount of time that the Autoscaler (https://cloud.google.com/compute/docs/autoscaler/) should wait between changes to the number of virtual machines. Only applicable for VM runtimes.", + "type": "string" + }, + "maxConcurrentRequests": { + "format": "int32", + "description": "Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.Defaults to a runtime-specific value.", + "type": "integer" + }, + "maxPendingLatency": { + "format": "google-duration", + "description": "Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.", + "type": "string" + } + }, + "id": "AutomaticScaling" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n{\"cloud.googleapis.com/region\": \"us-east1\"}\n", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: \"projects/example-project/locations/us-east1\"", + "type": "string" + }, + "locationId": { + "description": "The canonical id for this location. For example: \"us-east1\".", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + } + }, + "id": "Location" + }, + "NetworkUtilization": { + "properties": { + "targetSentPacketsPerSec": { + "format": "int32", + "description": "Target packets sent per second.", + "type": "integer" + }, + "targetReceivedPacketsPerSec": { + "format": "int32", + "description": "Target packets received per second.", + "type": "integer" + }, + "targetSentBytesPerSec": { + "format": "int32", + "description": "Target bytes sent per second.", + "type": "integer" + }, + "targetReceivedBytesPerSec": { + "format": "int32", + "description": "Target bytes received per second.", + "type": "integer" + } + }, + "id": "NetworkUtilization", + "description": "Target scaling by network usage. Only applicable for VM runtimes.", + "type": "object" + }, + "HealthCheck": { + "description": "Health checking configuration for VM instances. Unhealthy instances are killed and replaced with new instances. Only applicable for instances in App Engine flexible environment.", + "type": "object", + "properties": { + "host": { + "description": "Host header to send when performing an HTTP health check. Example: \"myapp.appspot.com\"", + "type": "string" + }, + "healthyThreshold": { + "format": "uint32", + "description": "Number of consecutive successful health checks required before receiving traffic.", + "type": "integer" + }, + "restartThreshold": { + "format": "uint32", + "description": "Number of consecutive failed health checks required before an instance is restarted.", + "type": "integer" + }, + "checkInterval": { + "format": "google-duration", + "description": "Interval between health checks.", + "type": "string" + }, + "timeout": { + "format": "google-duration", + "description": "Time before the health check is considered failed.", + "type": "string" + }, + "unhealthyThreshold": { + "format": "uint32", + "description": "Number of consecutive failed health checks required before removing traffic.", + "type": "integer" + }, + "disableHealthCheck": { + "description": "Whether to explicitly disable health checks for this instance.", + "type": "boolean" + } + }, + "id": "HealthCheck" + }, + "SourceReference": { + "properties": { + "repository": { + "description": "URI string identifying the repository. Example: \"https://source.developers.google.com/p/app-123/r/default\"", + "type": "string" + }, + "revisionId": { + "description": "The canonical, persistent identifier of the deployed revision. Aliases that include tags or branch names are not allowed. Example (git): \"2198322f89e0bb2e25021667c2ed489d1fd34e6b\"", + "type": "string" + } + }, + "id": "SourceReference", + "description": "Reference to a particular snapshot of the source tree used to build and deploy the application.", + "type": "object" + }, + "DebugInstanceRequest": { + "description": "Request message for Instances.DebugInstance.", + "type": "object", + "properties": { + "sshKey": { + "description": "Public SSH key to add to the instance. Examples:\n[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]\n[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {\"userName\":\"[USERNAME]\",\"expireOn\":\"[EXPIRE_TIME]\"}For more information, see Adding and Removing SSH Keys (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).", + "type": "string" + } + }, + "id": "DebugInstanceRequest" + }, + "Library": { + "properties": { + "name": { + "description": "Name of the library. Example: \"django\".", + "type": "string" + }, + "version": { + "description": "Version of the library to select, or \"latest\".", + "type": "string" + } + }, + "id": "Library", + "description": "Third-party Python runtime library that is required by the application.", + "type": "object" + }, + "OperationMetadataV1Beta5": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "method": { + "description": "API method name that initiated this operation. Example: google.appengine.v1beta5.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta5" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + } + }, + "id": "ListLocationsResponse" + }, + "ContainerInfo": { + "description": "Docker image that is used to create a container and start a VM instance for the version that you deploy. Only applicable for instances running in the App Engine flexible environment.", + "type": "object", + "properties": { + "image": { + "description": "URI to the hosted container image in Google Container Registry. The URI must be fully qualified and include a tag or digest. Examples: \"gcr.io/my-project/image:tag\" or \"gcr.io/my-project/image@digest\"", + "type": "string" + } + }, + "id": "ContainerInfo" + }, + "Version": { + "properties": { + "errorHandlers": { + "description": "Custom static error pages. Limited to 10KB per page.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "ErrorHandler" + }, + "type": "array" + }, + "defaultExpiration": { + "format": "google-duration", + "description": "Duration that static files should be cached by web proxies and browsers. Only applicable if the corresponding StaticFilesHandler (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler) does not specify its own expiration time.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, + "libraries": { + "description": "Configuration for third-party Python runtime libraries required by the application.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "Library" + }, + "type": "array" + }, + "creationTime": { + "format": "google-datetime", + "description": "Time that this version was created.@OutputOnly", + "type": "string" + }, + "nobuildFilesRegex": { + "description": "Files that match this pattern will not be built into this version. Only applicable for Go runtimes.Only returned in GET requests if view=FULL is set.", + "type": "string" + }, + "basicScaling": { + "$ref": "BasicScaling", + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity." + }, + "runtime": { + "description": "Desired runtime. Example: python27.", + "type": "string" + }, + "id": { + "description": "Relative name of the version within the module. Example: v1. Version names can contain only lowercase letters, numbers, or hyphens. Reserved names: \"default\", \"latest\", and any name with the prefix \"ah-\".", + "type": "string" + }, + "envVariables": { + "description": "Environment variables made available to the application.Only returned in GET requests if view=FULL is set.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "network": { + "$ref": "Network", + "description": "Extra network settings. Only applicable for VM runtimes." + }, + "betaSettings": { + "additionalProperties": { + "type": "string" + }, + "description": "Metadata settings that are supplied to this version to enable beta runtime features.", + "type": "object" + }, + "env": { + "description": "App Engine execution environment to use for this version.Defaults to 1.", + "type": "string" + }, + "handlers": { + "description": "An ordered list of URL-matching patterns that should be applied to incoming requests. The first matching URL handles the request and other request handlers are not attempted.Only returned in GET requests if view=FULL is set.", + "items": { + "$ref": "UrlMap" + }, + "type": "array" + }, + "deployer": { + "description": "Email address of the user who created this version.@OutputOnly", + "type": "string" + }, + "automaticScaling": { + "description": "Automatic scaling is based on request rate, response latencies, and other application metrics.", + "$ref": "AutomaticScaling" + }, + "diskUsageBytes": { + "format": "int64", + "description": "Total size of version files hosted on App Engine disk in bytes.@OutputOnly", + "type": "string" + }, + "healthCheck": { + "$ref": "HealthCheck", + "description": "Configures health checking for VM instances. Unhealthy instances are be stopped and replaced with new instances. Only applicable for VM runtimes.Only returned in GET requests if view=FULL is set." + }, + "threadsafe": { + "description": "Whether multiple requests can be dispatched to this version at once.", + "type": "boolean" + }, + "manualScaling": { + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "$ref": "ManualScaling" + }, + "name": { + "description": "Full path to the Version resource in the API. Example: apps/myapp/services/default/versions/v1.@OutputOnly", + "type": "string" + }, + "apiConfig": { + "description": "Serving configuration for Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned in GET requests if view=FULL is set.", + "$ref": "ApiConfigHandler" + }, + "endpointsApiService": { + "$ref": "EndpointsApiService", + "description": "Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud Endpoints Extensible Service Proxy will be provided to serve the API implemented by the app." + }, + "vm": { + "description": "Whether to deploy this version in a container on a virtual machine.", + "type": "boolean" + }, + "instanceClass": { + "description": "Instance class that is used to run this version. Valid values are:\nAutomaticScaling: F1, F2, F4, F4_1G\nManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for AutomaticScaling and B1 for ManualScaling or BasicScaling.", + "type": "string" + }, + "servingStatus": { + "description": "Current serving status of this version. Only the versions with a SERVING status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an invalid value. Defaults to SERVING.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "Currently serving. Instances are created according to the scaling settings of the version.", + "Disabled from serving. No instances will be created and the scaling settings are ignored until the state of the version changes to SERVING." + ], + "enum": [ + "SERVING_STATUS_UNSPECIFIED", + "SERVING", + "STOPPED" + ] + }, + "deployment": { + "$ref": "Deployment", + "description": "Code and application artifacts that make up this version.Only returned in GET requests if view=FULL is set." + }, + "runtimeApiVersion": { + "description": "The version of the API in the given runtime environment. Please see the app.yaml reference for valid values at https://cloud.google.com/appengine/docs/standard/\u003clanguage\u003e/config/appref", + "type": "string" + }, + "inboundServices": { + "description": "Before an application can receive email or XMPP messages, the application must be configured to enable the service.", + "items": { + "enum": [ + "INBOUND_SERVICE_UNSPECIFIED", + "INBOUND_SERVICE_MAIL", + "INBOUND_SERVICE_MAIL_BOUNCE", + "INBOUND_SERVICE_XMPP_ERROR", + "INBOUND_SERVICE_XMPP_MESSAGE", + "INBOUND_SERVICE_XMPP_SUBSCRIBE", + "INBOUND_SERVICE_XMPP_PRESENCE", + "INBOUND_SERVICE_CHANNEL_PRESENCE", + "INBOUND_SERVICE_WARMUP" + ], + "type": "string" + }, + "type": "array", + "enumDescriptions": [ + "Not specified.", + "Allows an application to receive mail.", + "Allows an application to receive email-bound notifications.", + "Allows an application to receive error stanzas.", + "Allows an application to receive instant messages.", + "Allows an application to receive user subscription POSTs.", + "Allows an application to receive a user's chat presence.", + "Registers an application for notifications when a client connects or disconnects from a channel.", + "Enables warmup requests." + ] + }, + "resources": { + "$ref": "Resources", + "description": "Machine resources for this version. Only applicable for VM runtimes." + } + }, + "id": "Version", + "description": "A Version resource is a specific set of source code and configuration files that are deployed into a service.", + "type": "object" + }, + "RequestUtilization": { + "description": "Target scaling by request utilization. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetConcurrentRequests": { + "format": "int32", + "description": "Target number of concurrent requests.", + "type": "integer" + }, + "targetRequestCountPerSec": { + "format": "int32", + "description": "Target requests per second.", + "type": "integer" + } + }, + "id": "RequestUtilization" + }, + "UrlMap": { + "description": "URL pattern and description of how the URL should be handled. App Engine can handle URLs by executing application code, or by serving static files uploaded with the version, such as images, CSS, or JavaScript.", + "type": "object", + "properties": { + "securityLevel": { + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" + }, + "authFailAction": { + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string", + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with an401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ] + }, + "script": { + "description": "Executes a script to handle the request that matches this URL pattern.", + "$ref": "ScriptHandler" + }, + "urlRegex": { + "description": "A URL prefix. Uses regular expression syntax, which means regexp special characters must be escaped, but should not contain groupings. All URLs that begin with this prefix are handled by this handler, using the portion of the URL after the prefix as part of the file path.", + "type": "string" + }, + "login": { + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource.", + "type": "string" + }, + "apiEndpoint": { + "$ref": "ApiEndpointHandler", + "description": "Uses API Endpoints to handle requests." + }, + "staticFiles": { + "description": "Returns the contents of a file, such as an image, as the response.", + "$ref": "StaticFilesHandler" + }, + "redirectHttpResponseCode": { + "enum": [ + "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED", + "REDIRECT_HTTP_RESPONSE_CODE_301", + "REDIRECT_HTTP_RESPONSE_CODE_302", + "REDIRECT_HTTP_RESPONSE_CODE_303", + "REDIRECT_HTTP_RESPONSE_CODE_307" + ], + "description": "30x code to use when performing redirects for the secure field. Defaults to 302.", + "type": "string", + "enumDescriptions": [ + "Not specified. 302 is assumed.", + "301 Moved Permanently code.", + "302 Moved Temporarily code.", + "303 See Other code.", + "307 Temporary Redirect code." + ] + } + }, + "id": "UrlMap" + }, + "EndpointsApiService": { + "properties": { + "configId": { + "description": "Endpoints service configuration id as specified by the Service Management API. For example \"2016-09-19r1\"", + "type": "string" + }, + "name": { + "description": "Endpoints service name which is the name of the \"service\" resource in the Service Management API. For example \"myapi.endpoints.myproject.cloud.goog\"", + "type": "string" + } + }, + "id": "EndpointsApiService", + "description": "Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The Endpoints API Service provides tooling for serving Open API and gRPC endpoints via an NGINX proxy.The fields here refer to the name and configuration id of a \"service\" resource in the Service Management API (https://cloud.google.com/service-management/overview).", + "type": "object" + }, + "ApiConfigHandler": { + "description": "Google Cloud Endpoints (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for API handlers.", + "type": "object", + "properties": { + "script": { + "description": "Path to the script from the application root directory.", + "type": "string" + }, + "login": { + "enumDescriptions": [ + "Not specified. LOGIN_OPTIONAL is assumed.", + "Does not require that the user is signed in.", + "If the user is not signed in, the auth_fail_action is taken. In addition, if the user is not an administrator for the application, they are given an error message regardless of auth_fail_action. If the user is an administrator, the handler proceeds.", + "If the user has signed in, the handler proceeds normally. Otherwise, the action given in auth_fail_action is taken." + ], + "enum": [ + "LOGIN_UNSPECIFIED", + "LOGIN_OPTIONAL", + "LOGIN_ADMIN", + "LOGIN_REQUIRED" + ], + "description": "Level of login required to access this resource. Defaults to optional.", + "type": "string" + }, + "url": { + "description": "URL to serve the endpoint at.", + "type": "string" + }, + "securityLevel": { + "enumDescriptions": [ + "Not specified.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used, and respond accordingly.", + "Requests for a URL that match this handler that use HTTPS are automatically redirected to the HTTP equivalent URL.", + "Both HTTP and HTTPS requests with URLs that match the handler succeed without redirects. The application can examine the request to determine which protocol was used and respond accordingly.", + "Requests for a URL that match this handler that do not use HTTPS are automatically redirected to the HTTPS URL with the same path. Query parameters are reserved for the redirect." + ], + "enum": [ + "SECURE_UNSPECIFIED", + "SECURE_DEFAULT", + "SECURE_NEVER", + "SECURE_OPTIONAL", + "SECURE_ALWAYS" + ], + "description": "Security (HTTPS) enforcement for this URL.", + "type": "string" + }, + "authFailAction": { + "enumDescriptions": [ + "Not specified. AUTH_FAIL_ACTION_REDIRECT is assumed.", + "Redirects user to \"accounts.google.com\". The user is redirected back to the application URL after signing in or creating an account.", + "Rejects request with an401 HTTP status code and an error message." + ], + "enum": [ + "AUTH_FAIL_ACTION_UNSPECIFIED", + "AUTH_FAIL_ACTION_REDIRECT", + "AUTH_FAIL_ACTION_UNAUTHORIZED" + ], + "description": "Action to take when users access resources that require authentication. Defaults to redirect.", + "type": "string" + } + }, + "id": "ApiConfigHandler" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + } + }, + "id": "Operation" + }, + "ScriptHandler": { + "properties": { + "scriptPath": { + "description": "Path to the script from the application root directory.", + "type": "string" + } + }, + "id": "ScriptHandler", + "description": "Executes a script to handle the request that matches the URL pattern.", + "type": "object" + }, + "StaticFilesHandler": { + "description": "Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.", + "type": "object", + "properties": { + "applicationReadable": { + "description": "Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.", + "type": "boolean" + }, + "httpHeaders": { + "description": "HTTP headers to use for all responses from these URLs.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "uploadPathRegex": { + "description": "Regular expression that matches the file paths for all files that should be referenced by this handler.", + "type": "string" + }, + "path": { + "description": "Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.", + "type": "string" + }, + "mimeType": { + "description": "MIME type used to serve all files served by this handler. Defaults to file-specific MIME types, which are derived from each file's filename extension.", + "type": "string" + }, + "requireMatchingFile": { + "description": "Whether this handler should match the request if the file referenced by the handler does not exist.", + "type": "boolean" + }, + "expiration": { + "format": "google-duration", + "description": "Time a static file served by this handler should be cached.", + "type": "string" + } + }, + "id": "StaticFilesHandler" + }, + "FileInfo": { + "properties": { + "sha1Sum": { + "description": "The SHA1 hash of the file, in hex.", + "type": "string" + }, + "mimeType": { + "description": "The MIME type of the file.Defaults to the value from Google Cloud Storage.", + "type": "string" + }, + "sourceUrl": { + "description": "URL source to use to fetch this file. Must be a URL to a resource in Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\u003cbucket\u003e/\u003cobject\u003e'.", + "type": "string" + } + }, + "id": "FileInfo", + "description": "Single source file that is part of the version to be deployed. Each source file that is deployed must be specified separately.", + "type": "object" + }, + "BasicScaling": { + "description": "A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.", + "type": "object", + "properties": { + "idleTimeout": { + "format": "google-duration", + "description": "Duration of time after the last request that an instance must wait before the instance is shut down.", + "type": "string" + }, + "maxInstances": { + "format": "int32", + "description": "Maximum number of instances to create for this version.", + "type": "integer" + } + }, + "id": "BasicScaling" + }, + "DiskUtilization": { + "description": "Target scaling by disk usage. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "targetWriteBytesPerSec": { + "format": "int32", + "description": "Target bytes written per second.", + "type": "integer" + }, + "targetReadOpsPerSec": { + "format": "int32", + "description": "Target ops read per second.", + "type": "integer" + }, + "targetReadBytesPerSec": { + "format": "int32", + "description": "Target bytes read per second.", + "type": "integer" + }, + "targetWriteOpsPerSec": { + "format": "int32", + "description": "Target ops written per second.", + "type": "integer" + } + }, + "id": "DiskUtilization" + }, + "OperationMetadataExperimental": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/customDomains/example.com.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataExperimental" + }, + "CpuUtilization": { + "properties": { + "aggregationWindowLength": { + "format": "google-duration", + "description": "Period of time over which CPU utilization is calculated.", + "type": "string" + }, + "targetUtilization": { + "format": "double", + "description": "Target CPU utilization ratio to maintain when scaling. Must be between 0 and 1.", + "type": "number" + } + }, + "id": "CpuUtilization", + "description": "Target scaling by CPU usage.", + "type": "object" + }, + "IdentityAwareProxy": { + "properties": { + "oauth2ClientSecret": { + "description": "For security reasons, this value cannot be retrieved via the API. Instead, the SHA-256 hash of the value is returned in the oauth2_client_secret_sha256 field.@InputOnly", + "type": "string" + }, + "oauth2ClientId": { + "description": "OAuth2 client ID to use for the authentication flow.", + "type": "string" + }, + "oauth2ClientSecretSha256": { + "description": "Hex-encoded SHA-256 hash of the client secret.@OutputOnly", + "type": "string" + }, + "enabled": { + "description": "Whether the serving infrastructure will authenticate and authorize all incoming requests.If true, the oauth2_client_id and oauth2_client_secret fields must be non-empty.", + "type": "boolean" + } + }, + "id": "IdentityAwareProxy", + "description": "Identity-Aware Proxy", + "type": "object" + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "TrafficSplit": { + "description": "Traffic routing configuration for versions within a single service. Traffic splits define how traffic directed to the service is assigned to versions.", + "type": "object", + "properties": { + "allocations": { + "description": "Mapping from version IDs within the service to fractional (0.000, 1] allocations of traffic for that version. Each version can be specified only once, but some versions in the service may not have any traffic allocation. Services that have traffic allocated cannot be deleted until either the service is deleted or their traffic allocation is removed. Allocations must sum to 1. Up to two decimal place precision is supported for IP-based splits and up to three decimal places is supported for cookie-based splits.", + "type": "object", + "additionalProperties": { + "format": "double", + "type": "number" + } + }, + "shardBy": { + "enumDescriptions": [ + "Diversion method unspecified.", + "Diversion based on a specially named cookie, \"GOOGAPPUID.\" The cookie must be set by the application itself or else no diversion will occur.", + "Diversion based on applying the modulus operation to a fingerprint of the IP address." + ], + "enum": [ + "UNSPECIFIED", + "COOKIE", + "IP" + ], + "description": "Mechanism used to determine which version a request is sent to. The traffic selection algorithm will be stable for either type until allocations are changed.", + "type": "string" + } + }, + "id": "TrafficSplit" + }, + "ManualScaling": { + "properties": { + "instances": { + "format": "int32", + "description": "Number of instances to assign to the service at the start. This number can later be altered by using the Modules API (https://cloud.google.com/appengine/docs/python/modules/functions) set_num_instances() function.", + "type": "integer" + } + }, + "id": "ManualScaling", + "description": "A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time.", + "type": "object" + }, + "LocationMetadata": { + "description": "Metadata for the given google.cloud.location.Location.", + "type": "object", + "properties": { + "standardEnvironmentAvailable": { + "description": "App Engine Standard Environment is available in the given location.@OutputOnly", + "type": "boolean" + }, + "flexibleEnvironmentAvailable": { + "description": "App Engine Flexible Environment is available in the given location.@OutputOnly", + "type": "boolean" + } + }, + "id": "LocationMetadata" + }, + "OperationMetadataV1Beta": { + "properties": { + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta.Versions.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Time that this operation completed.@OutputOnly", + "type": "string" + }, + "warning": { + "description": "Durable messages that persist on every operation poll. @OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "insertTime": { + "format": "google-datetime", + "description": "Time that this operation was created.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "ephemeralMessage": { + "description": "Ephemeral message that may change every time the operation is polled. @OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta", + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object" + }, + "ListServicesResponse": { + "description": "Response message for Services.ListServices.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Continuation token for fetching the next page of results.", + "type": "string" + }, + "services": { + "description": "The services belonging to the requested application.", + "items": { + "$ref": "Service" + }, + "type": "array" + } + }, + "id": "ListServicesResponse" + }, + "Resources": { + "description": "Machine resources for a version.", + "type": "object", + "properties": { + "volumes": { + "description": "Volumes mounted within the app container.", + "items": { + "$ref": "Volume" + }, + "type": "array" + }, + "diskGb": { + "format": "double", + "description": "Disk size (GB) needed.", + "type": "number" + }, + "memoryGb": { + "format": "double", + "description": "Memory (GB) needed.", + "type": "number" + }, + "cpu": { + "format": "double", + "description": "Number of CPU cores needed.", + "type": "number" + } + }, + "id": "Resources" + }, + "Deployment": { + "description": "Code and application artifacts used to deploy a version to App Engine.", + "type": "object", + "properties": { + "sourceReferences": { + "description": "Origin of the source code for this deployment. There can be more than one source reference per version if source code is distributed among multiple repositories.", + "items": { + "$ref": "SourceReference" + }, + "type": "array" + }, + "container": { + "$ref": "ContainerInfo", + "description": "The Docker image for the container that runs the version. Only applicable for instances running in the App Engine flexible environment." + }, + "files": { + "additionalProperties": { + "$ref": "FileInfo" + }, + "description": "Manifest of the files stored in Google Cloud Storage that are included as part of this version. All files must be readable using the credentials supplied with this call.", + "type": "object" + } + }, + "id": "Deployment" + }, + "Volume": { + "description": "Volumes mounted within the app container. Only applicable for VM runtimes.", + "type": "object", + "properties": { + "volumeType": { + "description": "Underlying volume type, e.g. 'tmpfs'.", + "type": "string" + }, + "sizeGb": { + "format": "double", + "description": "Volume size in gigabytes.", + "type": "number" + }, + "name": { + "description": "Unique name for the volume.", + "type": "string" + } + }, + "id": "Volume" + }, + "Service": { + "description": "A Service resource is a logical component of an application that can share state and communicate in a secure fashion with other services. For example, an application that handles customer requests might include separate services to handle other tasks such as API requests from mobile devices or backend data analysis. Each service has a collection of versions that define a specific set of code used to implement the functionality of that service.", + "type": "object", + "properties": { + "name": { + "description": "Full path to the Service resource in the API. Example: apps/myapp/services/default.@OutputOnly", + "type": "string" + }, + "split": { + "$ref": "TrafficSplit", + "description": "Mapping that defines fractional HTTP traffic diversion to different versions within the service." + }, + "id": { + "description": "Relative name of the service within the application. Example: default.@OutputOnly", + "type": "string" + } + }, + "id": "Service" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "OperationMetadata": { + "description": "Metadata for the given google.longrunning.Operation.", + "type": "object", + "properties": { + "target": { + "description": "Name of the resource that this operation is acting on. Example: apps/myapp/modules/default.@OutputOnly", + "type": "string" + }, + "user": { + "description": "User who requested this operation.@OutputOnly", + "type": "string" + }, + "method": { + "description": "API method that initiated this operation. Example: google.appengine.v1beta4.Version.CreateVersion.@OutputOnly", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Timestamp that this operation completed.@OutputOnly", + "type": "string" + }, + "operationType": { + "description": "Type of this operation. Deprecated, use method field instead. Example: \"create_version\".@OutputOnly", + "type": "string" + }, + "insertTime": { + "format": "google-datetime", + "description": "Timestamp that this operation was created.@OutputOnly", + "type": "string" + } + }, + "id": "OperationMetadata" } }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, "protocol": "rest", - "version": "v1beta5", - "baseUrl": "https://appengine.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/appengine.admin": { - "description": "View and manage your applications deployed on Google App Engine" - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "servicePath": "", - "description": "The App Engine Admin API enables developers to provision and manage their App Engine applications.", - "kind": "discovery#restDescription", - "rootUrl": "https://appengine.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "appengine", - "batchPath": "batch", - "revision": "20170912", - "documentationLink": "https://cloud.google.com/appengine/docs/admin-api/", - "id": "appengine:v1beta5", - "title": "Google App Engine Admin API" + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + } } diff --git a/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json b/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json index ee8446f2c..f9916907d 100644 --- a/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json +++ b/vendor/google.golang.org/api/bigquerydatatransfer/v1/bigquerydatatransfer-api.json @@ -1,40 +1,1283 @@ { + "resources": { + "projects": { + "resources": { + "transferConfigs": { + "methods": { + "list": { + "flatPath": "v1/projects/{projectsId}/transferConfigs", + "id": "bigquerydatatransfer.projects.transferConfigs.list", + "path": "v1/{+parent}/transferConfigs", + "description": "Returns information about all data transfers in the project.", + "response": { + "$ref": "ListTransferConfigsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "dataSourceIds": { + "description": "When specified, only configurations of requested data sources are returned.", + "type": "string", + "repeated": true, + "location": "query" + }, + "parent": { + "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "pageToken": { + "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer" + } + } + }, + "create": { + "description": "Creates a new data transfer configuration.", + "request": { + "$ref": "TransferConfig" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "TransferConfig" + }, + "parameters": { + "authorizationCode": { + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", + "type": "string", + "location": "query" + }, + "parent": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs", + "path": "v1/{+parent}/transferConfigs", + "id": "bigquerydatatransfer.projects.transferConfigs.create" + }, + "scheduleRuns": { + "request": { + "$ref": "ScheduleTransferRunsRequest" + }, + "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range.", + "response": { + "$ref": "ScheduleTransferRunsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "description": "Transfer configuration name in the form:\n`projects/{project_id}/transferConfigs/{config_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}:scheduleRuns", + "id": "bigquerydatatransfer.projects.transferConfigs.scheduleRuns", + "path": "v1/{+parent}:scheduleRuns" + }, + "patch": { + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.transferConfigs.patch", + "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated.", + "request": { + "$ref": "TransferConfig" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "TransferConfig" + }, + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Required list of fields to be updated in this request.", + "type": "string" + }, + "name": { + "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path" + }, + "authorizationCode": { + "type": "string", + "location": "query", + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "id": "bigquerydatatransfer.projects.transferConfigs.get", + "path": "v1/{+name}", + "description": "Returns information about a data transfer config.", + "response": { + "$ref": "TransferConfig" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}" + }, + "delete": { + "description": "Deletes a data transfer configuration,\nincluding any associated transfer runs and logs.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", + "id": "bigquerydatatransfer.projects.transferConfigs.delete", + "path": "v1/{+name}" + } + }, + "resources": { + "runs": { + "resources": { + "transferLogs": { + "methods": { + "list": { + "parameters": { + "parent": { + "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path", + "description": "Transfer run name in the form:\n`projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.", + "type": "string", + "required": true + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "Pagination token, which can be used to request a specific page\nof `ListTransferLogsRequest` list results. For multiple-page\nresults, `ListTransferLogsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results." + }, + "pageSize": { + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer", + "location": "query" + }, + "messageTypes": { + "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "MESSAGE_SEVERITY_UNSPECIFIED", + "INFO", + "WARNING", + "ERROR" + ] + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}/transferLogs", + "path": "v1/{+parent}/transferLogs", + "id": "bigquerydatatransfer.projects.transferConfigs.runs.transferLogs.list", + "description": "Returns user facing log messages for the data transfer run.", + "httpMethod": "GET", + "response": { + "$ref": "ListTransferLogsResponse" + }, + "parameterOrder": [ + "parent" + ] + } + } + } + }, + "methods": { + "list": { + "description": "Returns information about running and completed jobs.", + "response": { + "$ref": "ListTransferRunsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageToken": { + "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer" + }, + "states": { + "enum": [ + "TRANSFER_STATE_UNSPECIFIED", + "INACTIVE", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ], + "description": "When specified, only transfer runs with requested states are returned.", + "type": "string", + "repeated": true, + "location": "query" + }, + "runAttempt": { + "enum": [ + "RUN_ATTEMPT_UNSPECIFIED", + "LATEST" + ], + "description": "Indicates how run attempts are to be pulled.", + "type": "string", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs", + "id": "bigquerydatatransfer.projects.transferConfigs.runs.list", + "path": "v1/{+parent}/runs" + }, + "get": { + "description": "Returns information about the particular transfer run.", + "response": { + "$ref": "TransferRun" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", + "id": "bigquerydatatransfer.projects.transferConfigs.runs.get", + "path": "v1/{+name}" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", + "id": "bigquerydatatransfer.projects.transferConfigs.runs.delete", + "path": "v1/{+name}", + "description": "Deletes the specified transfer run." + } + } + } + } + }, + "dataSources": { + "methods": { + "checkValidCreds": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "CheckValidCredsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/dataSources/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}:checkValidCreds", + "path": "v1/{+name}:checkValidCreds", + "id": "bigquerydatatransfer.projects.dataSources.checkValidCreds", + "request": { + "$ref": "CheckValidCredsRequest" + }, + "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.\nSome data sources doesn't support service account, so we need to talk to\nthem on behalf of the end user. This API just checks whether we have OAuth\ntoken for the particular user, which is a pre-requisite before user can\ncreate a transfer config." + }, + "list": { + "response": { + "$ref": "ListDataSourcesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer", + "location": "query" + }, + "parent": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`" + }, + "pageToken": { + "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/projects/{projectsId}/dataSources", + "id": "bigquerydatatransfer.projects.dataSources.list", + "path": "v1/{+parent}/dataSources", + "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering." + }, + "get": { + "id": "bigquerydatatransfer.projects.dataSources.get", + "path": "v1/{+name}", + "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering.", + "response": { + "$ref": "DataSource" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/dataSources/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}" + } + } + }, + "locations": { + "methods": { + "get": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "id": "bigquerydatatransfer.projects.locations.get", + "path": "v1/{+name}", + "description": "Get information about a location.", + "response": { + "$ref": "Location" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Resource name for the location.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "list": { + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The resource that owns the locations collection, if applicable." + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations", + "id": "bigquerydatatransfer.projects.locations.list", + "path": "v1/{+name}/locations", + "description": "Lists information about the supported locations for this service." + } + }, + "resources": { + "transferConfigs": { + "resources": { + "runs": { + "methods": { + "list": { + "response": { + "$ref": "ListTransferRunsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer", + "location": "query" + }, + "states": { + "description": "When specified, only transfer runs with requested states are returned.", + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "TRANSFER_STATE_UNSPECIFIED", + "INACTIVE", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ] + }, + "runAttempt": { + "enum": [ + "RUN_ATTEMPT_UNSPECIFIED", + "LATEST" + ], + "description": "Indicates how run attempts are to be pulled.", + "type": "string", + "location": "query" + }, + "parent": { + "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.list", + "path": "v1/{+parent}/runs", + "description": "Returns information about running and completed jobs." + }, + "get": { + "description": "Returns information about the particular transfer run.", + "response": { + "$ref": "TransferRun" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.get", + "path": "v1/{+name}" + }, + "delete": { + "description": "Deletes the specified transfer run.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.delete", + "path": "v1/{+name}" + } + }, + "resources": { + "transferLogs": { + "methods": { + "list": { + "parameters": { + "pageToken": { + "location": "query", + "description": "Pagination token, which can be used to request a specific page\nof `ListTransferLogsRequest` list results. For multiple-page\nresults, `ListTransferLogsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results." + }, + "messageTypes": { + "enum": [ + "MESSAGE_SEVERITY_UNSPECIFIED", + "INFO", + "WARNING", + "ERROR" + ], + "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", + "type": "string", + "repeated": true, + "location": "query" + }, + "parent": { + "location": "path", + "description": "Transfer run name in the form:\n`projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}/transferLogs", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.transferLogs.list", + "path": "v1/{+parent}/transferLogs", + "description": "Returns user facing log messages for the data transfer run.", + "response": { + "$ref": "ListTransferLogsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET" + } + } + } + } + } + }, + "methods": { + "get": { + "response": { + "$ref": "TransferConfig" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.get", + "path": "v1/{+name}", + "description": "Returns information about a data transfer config." + }, + "patch": { + "path": "v1/{+name}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.patch", + "request": { + "$ref": "TransferConfig" + }, + "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated.", + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "TransferConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Required list of fields to be updated in this request.", + "type": "string" + }, + "name": { + "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", + "location": "path" + }, + "authorizationCode": { + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}" + }, + "delete": { + "description": "Deletes a data transfer configuration,\nincluding any associated transfer runs and logs.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.delete", + "path": "v1/{+name}" + }, + "list": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs", + "path": "v1/{+parent}/transferConfigs", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.list", + "description": "Returns information about all data transfers in the project.", + "httpMethod": "GET", + "response": { + "$ref": "ListTransferConfigsResponse" + }, + "parameterOrder": [ + "parent" + ], + "parameters": { + "dataSourceIds": { + "type": "string", + "repeated": true, + "location": "query", + "description": "When specified, only configurations of requested data sources are returned." + }, + "parent": { + "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "create": { + "id": "bigquerydatatransfer.projects.locations.transferConfigs.create", + "path": "v1/{+parent}/transferConfigs", + "description": "Creates a new data transfer configuration.", + "request": { + "$ref": "TransferConfig" + }, + "response": { + "$ref": "TransferConfig" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "authorizationCode": { + "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", + "type": "string", + "location": "query" + }, + "parent": { + "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs" + }, + "scheduleRuns": { + "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range.", + "request": { + "$ref": "ScheduleTransferRunsRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ScheduleTransferRunsResponse" + }, + "parameters": { + "parent": { + "location": "path", + "description": "Transfer configuration name in the form:\n`projects/{project_id}/transferConfigs/{config_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}:scheduleRuns", + "path": "v1/{+parent}:scheduleRuns", + "id": "bigquerydatatransfer.projects.locations.transferConfigs.scheduleRuns" + } + } + }, + "dataSources": { + "methods": { + "list": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources", + "path": "v1/{+parent}/dataSources", + "id": "bigquerydatatransfer.projects.locations.dataSources.list", + "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListDataSourcesResponse" + }, + "parameters": { + "pageToken": { + "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Page size. The default page size is the maximum value of 1000 results.", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "get": { + "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering.", + "response": { + "$ref": "DataSource" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/dataSources/[^/]+$", + "location": "path", + "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}", + "id": "bigquerydatatransfer.projects.locations.dataSources.get", + "path": "v1/{+name}" + }, + "checkValidCreds": { + "response": { + "$ref": "CheckValidCredsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/dataSources/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}:checkValidCreds", + "id": "bigquerydatatransfer.projects.locations.dataSources.checkValidCreds", + "path": "v1/{+name}:checkValidCreds", + "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.\nSome data sources doesn't support service account, so we need to talk to\nthem on behalf of the end user. This API just checks whether we have OAuth\ntoken for the particular user, which is a pre-requisite before user can\ncreate a transfer config.", + "request": { + "$ref": "CheckValidCredsRequest" + } + } + } + } + } + } + } + } + }, + "parameters": { + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "callback": { + "type": "string", + "location": "query", + "description": "JSONP" + }, + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "key": { + "type": "string", + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token." + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://bigquerydatatransfer.googleapis.com/", + "servicePath": "", + "description": "Transfers data from partner SaaS applications to Google BigQuery on a scheduled, managed basis.", + "kind": "discovery#restDescription", + "basePath": "", + "revision": "20170927", + "id": "bigquerydatatransfer:v1", + "documentationLink": "https://cloud.google.com/bigquery/", + "discoveryVersion": "v1", "version_module": true, "schemas": { + "TransferRun": { + "id": "TransferRun", + "description": "Represents a data transfer run.", + "type": "object", + "properties": { + "params": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Data transfer specific parameters.", + "type": "object" + }, + "endTime": { + "format": "google-datetime", + "description": "Time when transfer run ended. Parameter ignored by server for input\nrequests.\nOutput only.", + "type": "string" + }, + "datasetRegion": { + "description": "Region in which BigQuery dataset is located. Currently possible values are:\n\"US\" and \"EU\".\nOutput only.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Time when transfer run was started. Parameter ignored by server for input\nrequests.\nOutput only.", + "type": "string" + }, + "scheduleTime": { + "format": "google-datetime", + "description": "Minimum time after which a transfer run can be started.", + "type": "string" + }, + "updateTime": { + "format": "google-datetime", + "description": "Last time the data transfer run state was updated.\nOutput only.", + "type": "string" + }, + "schedule": { + "description": "Describes the schedule of this transfer run if it was created as part of\na regular schedule. For batch transfer runs that are directly created,\nthis is empty.\nNOTE: the system might choose to delay the schedule depending on the\ncurrent load, so `schedule_time` doesn't always matches this.\nOutput only.", + "type": "string" + }, + "runTime": { + "format": "google-datetime", + "description": "For batch transfer runs, specifies the date and time that\ndata should be ingested.", + "type": "string" + }, + "dataSourceId": { + "description": "Data source id.\nOutput only.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "State placeholder.", + "Data transfer is inactive.", + "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", + "Data transfer is in progress.", + "Data transfer completed successsfully.", + "Data transfer failed.", + "Data transfer is cancelled." + ], + "enum": [ + "TRANSFER_STATE_UNSPECIFIED", + "INACTIVE", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED", + "CANCELLED" + ], + "description": "Data transfer run state. Ignored for input requests.\nOutput only.", + "type": "string" + }, + "userId": { + "format": "int64", + "description": "Unique ID of the user on whose behalf transfer is done. Applicable only\nto data sources that do not support service accounts. When set to 0,\nthe data source service account credentials are used.\nOutput only.", + "type": "string" + }, + "name": { + "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.\nThe name is ignored when creating a transfer run.", + "type": "string" + }, + "destinationDatasetId": { + "description": "The BigQuery target dataset id.", + "type": "string" + } + } + }, + "CheckValidCredsRequest": { + "description": "A request to determine whether the user has valid credentials. This method\nis used to limit the number of OAuth popups in the user interface. The\nuser id is inferred from the API call context.\nIf the data source has the Google+ authorization type, this method\nreturns false, as it cannot be determined whether the credentials are\nalready valid merely based on the user id.", + "type": "object", + "properties": {}, + "id": "CheckValidCredsRequest" + }, + "CheckValidCredsResponse": { + "description": "A response indicating whether the credentials exist and are valid.", + "type": "object", + "properties": { + "hasValidCreds": { + "description": "If set to `true`, the credentials exist and are valid.", + "type": "boolean" + } + }, + "id": "CheckValidCredsResponse" + }, "ScheduleTransferRunsResponse": { "description": "A response to schedule transfer runs for a time range.", "type": "object", "properties": { "runs": { + "description": "The transfer runs that were scheduled.", "items": { "$ref": "TransferRun" }, - "type": "array", - "description": "The transfer runs that were scheduled." + "type": "array" } }, "id": "ScheduleTransferRunsResponse" }, "ListTransferLogsResponse": { + "type": "object", "properties": { - "nextPageToken": { - "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`GetTransferRunLogRequest.page_token`\nto request the next page of list results.\nOutput only.", - "type": "string" - }, "transferMessages": { "description": "The stored pipeline transfer messages.\nOutput only.", "items": { "$ref": "TransferMessage" }, "type": "array" + }, + "nextPageToken": { + "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`GetTransferRunLogRequest.page_token`\nto request the next page of list results.\nOutput only.", + "type": "string" } }, "id": "ListTransferLogsResponse", - "description": "The returned list transfer run messages.", - "type": "object" + "description": "The returned list transfer run messages." }, "TransferMessage": { - "id": "TransferMessage", "description": "Represents a user facing message for a particular data transfer run.", "type": "object", "properties": { @@ -43,8 +1286,6 @@ "type": "string" }, "severity": { - "description": "Message severity.", - "type": "string", "enumDescriptions": [ "No severity specified.", "Informational message.", @@ -56,25 +1297,28 @@ "INFO", "WARNING", "ERROR" - ] + ], + "description": "Message severity.", + "type": "string" }, "messageTime": { "format": "google-datetime", "description": "Time when message was logged.", "type": "string" } - } + }, + "id": "TransferMessage" }, "ListDataSourcesResponse": { "description": "Returns list of supported data sources and their metadata.", "type": "object", "properties": { "dataSources": { + "description": "List of supported data sources and their transfer settings.", "items": { "$ref": "DataSource" }, - "type": "array", - "description": "List of supported data sources and their transfer settings." + "type": "array" }, "nextPageToken": { "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListDataSourcesRequest.page_token`\nto request the next page of list results.\nOutput only.", @@ -87,58 +1331,6 @@ "description": "Represents a data source parameter with validation rules, so that\nparameters can be rendered in the UI. These parameters are given to us by\nsupported data sources, and include all needed information for rendering\nand validation.\nThus, whoever uses this api can decide to generate either generic ui,\nor custom data source specific forms.", "type": "object", "properties": { - "recurse": { - "description": "If set to true, schema should be taken from the parent with the same\nparameter_id. Only applicable when parameter type is RECORD.", - "type": "boolean" - }, - "description": { - "description": "Parameter description.", - "type": "string" - }, - "allowedValues": { - "description": "All possible values for the parameter.", - "items": { - "type": "string" - }, - "type": "array" - }, - "validationHelpUrl": { - "description": "URL to a help document to further explain the naming requirements.", - "type": "string" - }, - "minValue": { - "format": "double", - "description": "For integer and double values specifies minimum allowed value.", - "type": "number" - }, - "validationRegex": { - "description": "Regular expression which can be used for parameter validation.", - "type": "string" - }, - "paramId": { - "description": "Parameter identifier.", - "type": "string" - }, - "required": { - "description": "Is parameter required.", - "type": "boolean" - }, - "repeated": { - "type": "boolean", - "description": "Can parameter have multiple values." - }, - "displayName": { - "description": "Parameter display name in the user interface.", - "type": "string" - }, - "validationDescription": { - "description": "Description of the requirements for this field, in case the user input does\nnot fulfill the regex pattern or min/max values.", - "type": "string" - }, - "immutable": { - "description": "Cannot be changed after initial creation.", - "type": "boolean" - }, "fields": { "description": "When parameter is a record, describes child fields.", "items": { @@ -147,13 +1339,11 @@ "type": "array" }, "maxValue": { + "type": "number", "format": "double", - "description": "For integer and double values specifies maxminum allowed value.", - "type": "number" + "description": "For integer and double values specifies maxminum allowed value." }, "type": { - "description": "Parameter type.", - "type": "string", "enumDescriptions": [ "Type unspecified.", "String parameter.", @@ -171,32 +1361,84 @@ "BOOLEAN", "RECORD", "PLUS_PAGE" - ] + ], + "description": "Parameter type.", + "type": "string" + }, + "recurse": { + "description": "If set to true, schema should be taken from the parent with the same\nparameter_id. Only applicable when parameter type is RECORD.", + "type": "boolean" + }, + "description": { + "description": "Parameter description.", + "type": "string" + }, + "allowedValues": { + "description": "All possible values for the parameter.", + "items": { + "type": "string" + }, + "type": "array" + }, + "minValue": { + "format": "double", + "description": "For integer and double values specifies minimum allowed value.", + "type": "number" + }, + "validationHelpUrl": { + "description": "URL to a help document to further explain the naming requirements.", + "type": "string" + }, + "validationRegex": { + "description": "Regular expression which can be used for parameter validation.", + "type": "string" + }, + "paramId": { + "description": "Parameter identifier.", + "type": "string" + }, + "required": { + "type": "boolean", + "description": "Is parameter required." + }, + "repeated": { + "description": "Can parameter have multiple values.", + "type": "boolean" + }, + "displayName": { + "description": "Parameter display name in the user interface.", + "type": "string" + }, + "validationDescription": { + "description": "Description of the requirements for this field, in case the user input does\nnot fulfill the regex pattern or min/max values.", + "type": "string" + }, + "immutable": { + "type": "boolean", + "description": "Cannot be changed after initial creation." } }, "id": "DataSourceParameter" }, "ListTransferRunsResponse": { + "description": "The returned list of pipelines in the project.", "type": "object", "properties": { - "nextPageToken": { - "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferRunsRequest.page_token`\nto request the next page of list results.\nOutput only.", - "type": "string" - }, "transferRuns": { "description": "The stored pipeline transfer runs.\nOutput only.", "items": { "$ref": "TransferRun" }, "type": "array" + }, + "nextPageToken": { + "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferRunsRequest.page_token`\nto request the next page of list results.\nOutput only.", + "type": "string" } }, - "id": "ListTransferRunsResponse", - "description": "The returned list of pipelines in the project." + "id": "ListTransferRunsResponse" }, "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", "properties": { "locations": { "description": "A list of locations that matches the specified filter in the request.", @@ -210,30 +1452,48 @@ "type": "string" } }, - "id": "ListLocationsResponse" + "id": "ListLocationsResponse", + "description": "The response message for Locations.ListLocations.", + "type": "object" }, "ListTransferConfigsResponse": { + "description": "The returned list of pipelines in the project.", "type": "object", "properties": { "transferConfigs": { + "description": "The stored pipeline transfer configurations.\nOutput only.", "items": { "$ref": "TransferConfig" }, - "type": "array", - "description": "The stored pipeline transfer configurations.\nOutput only." + "type": "array" }, "nextPageToken": { - "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferConfigsRequest.page_token`\nto request the next page of list results.\nOutput only.", - "type": "string" + "type": "string", + "description": "The next-pagination token. For multiple-page list results,\nthis token can be used as the\n`ListTransferConfigsRequest.page_token`\nto request the next page of list results.\nOutput only." } }, - "id": "ListTransferConfigsResponse", - "description": "The returned list of pipelines in the project." + "id": "ListTransferConfigsResponse" }, "DataSource": { + "id": "DataSource", "description": "Represents data source metadata. Metadata is sufficient to\nrender UI and request proper OAuth tokens.", "type": "object", "properties": { + "dataSourceId": { + "description": "Data source id.", + "type": "string" + }, + "scopes": { + "description": "Api auth scopes for which refresh token needs to be obtained. Only valid\nwhen `client_id` is specified. Ignored otherwise. These are scopes needed\nby a data source to prepare data and ingest them into BigQuery,\ne.g., https://www.googleapis.com/auth/bigquery", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "Data source resource name.", + "type": "string" + }, "minimumScheduleInterval": { "format": "google-duration", "description": "The minimum interval between two consecutive scheduled runs.", @@ -244,6 +1504,8 @@ "type": "string" }, "authorizationType": { + "description": "Indicates the type of authorization.", + "type": "string", "enumDescriptions": [ "Type unspecified.", "Use OAuth 2 authorization codes that can be exchanged\nfor a refresh token on the backend.", @@ -253,17 +1515,15 @@ "AUTHORIZATION_TYPE_UNSPECIFIED", "AUTHORIZATION_CODE", "GOOGLE_PLUS_AUTHORIZATION_CODE" - ], - "description": "Indicates the type of authorization.", - "type": "string" + ] }, "supportsCustomSchedule": { "description": "Specifies whether the data source supports a user defined schedule, or\noperates on the default schedule.\nWhen set to `true`, user can override default schedule.", "type": "boolean" }, "displayName": { - "type": "string", - "description": "User friendly data source name." + "description": "User friendly data source name.", + "type": "string" }, "updateDeadlineSeconds": { "format": "int32", @@ -271,18 +1531,18 @@ "type": "integer" }, "dataRefreshType": { + "enumDescriptions": [ + "The data source won't support data auto refresh, which is default value.", + "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Does not allow custom values to be set for each\ntransfer config.", + "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Allows custom values to be set for each transfer\nconfig." + ], "enum": [ "DATA_REFRESH_TYPE_UNSPECIFIED", "SLIDING_WINDOW", "CUSTOM_SLIDING_WINDOW" ], "description": "Specifies whether the data source supports automatic data refresh for the\npast few days, and how it's supported.\nFor some data sources, data might not be complete until a few days later,\nso it's useful to refresh data automatically.", - "type": "string", - "enumDescriptions": [ - "The data source won't support data auto refresh, which is default value.", - "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Does not allow custom values to be set for each\ntransfer config.", - "The data source supports data auto refresh, and runs will be scheduled\nfor the past few days. Allows custom values to be set for each transfer\nconfig." - ] + "type": "string" }, "parameters": { "description": "Data source parameters.", @@ -313,6 +1573,7 @@ "type": "boolean" }, "transferType": { + "type": "string", "enumDescriptions": [ "Invalid or Unknown transfer type placeholder.", "Batch data transfer.", @@ -323,32 +1584,16 @@ "BATCH", "STREAMING" ], - "description": "Transfer type. Currently supports only batch transfers,\nwhich are transfers that use the BigQuery batch APIs (load or\nquery) to ingest the data.", - "type": "string" + "description": "Transfer type. Currently supports only batch transfers,\nwhich are transfers that use the BigQuery batch APIs (load or\nquery) to ingest the data." }, "description": { "description": "User friendly data source description string.", "type": "string" - }, - "dataSourceId": { - "description": "Data source id.", - "type": "string" - }, - "name": { - "description": "Data source resource name.", - "type": "string" - }, - "scopes": { - "description": "Api auth scopes for which refresh token needs to be obtained. Only valid\nwhen `client_id` is specified. Ignored otherwise. These are scopes needed\nby a data source to prepare data and ingest them into BigQuery,\ne.g., https://www.googleapis.com/auth/bigquery", - "items": { - "type": "string" - }, - "type": "array" } - }, - "id": "DataSource" + } }, "ScheduleTransferRunsRequest": { + "description": "A request to schedule transfer runs for a time range.", "type": "object", "properties": { "endTime": { @@ -357,28 +1602,31 @@ "type": "string" }, "startTime": { + "type": "string", "format": "google-datetime", - "description": "Start time of the range of transfer runs. For example,\n`\"2017-05-25T00:00:00+00:00\"`.", - "type": "string" + "description": "Start time of the range of transfer runs. For example,\n`\"2017-05-25T00:00:00+00:00\"`." } }, - "id": "ScheduleTransferRunsRequest", - "description": "A request to schedule transfer runs for a time range." + "id": "ScheduleTransferRunsRequest" }, "Empty": { - "properties": {}, - "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" + "type": "object", + "properties": {}, + "id": "Empty" }, "Location": { "description": "A resource that represents Google Cloud Platform location.", "type": "object", "properties": { - "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", "type": "string" }, + "locationId": { + "type": "string", + "description": "The canonical id for this location. For example: `\"us-east1\"`." + }, "metadata": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -393,10 +1641,6 @@ }, "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", "type": "object" - }, - "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", - "type": "string" } }, "id": "Location" @@ -406,6 +1650,14 @@ "description": "Represents a data transfer configuration. A transfer configuration\ncontains all metadata needed to perform a data transfer. For example,\n`destination_dataset_id` specifies where data should be stored.\nWhen a new transfer configuration is created, the specified\n`destination_dataset_id` is created when needed and shared with the\nappropriate data source service account.", "type": "object", "properties": { + "params": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object." + }, + "description": "Data transfer specific parameters.", + "type": "object" + }, "datasetRegion": { "description": "Region in which BigQuery dataset is located. Currently possible values are:\n\"US\" and \"EU\".\nOutput only.", "type": "string" @@ -423,15 +1675,15 @@ "description": "Next time when data transfer will run.\nOutput only.", "type": "string" }, + "schedule": { + "description": "Data transfer schedule.\nIf the data source does not support a custom schedule, this should be\nempty. If it is empty, the default value for the data source will be\nused.\nThe specified times are in UTC.\nExamples of valid format:\n`1st,3rd monday of month 15:30`,\n`every wed,fri of jan,jun 13:15`, and\n`first sunday of quarter 00:00`.\nSee more explanation about the format here:\nhttps://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format\nNOTE: the granularity should be at least 8 hours, or less frequent.", + "type": "string" + }, "updateTime": { "type": "string", "format": "google-datetime", "description": "Data transfer modification time. Ignored by server on input.\nOutput only." }, - "schedule": { - "description": "Data transfer schedule.\nIf the data source does not support a custom schedule, this should be\nempty. If it is empty, the default value for the data source will be\nused.\nThe specified times are in UTC.\nExamples of valid format:\n`1st,3rd monday of month 15:30`,\n`every wed,fri of jan,jun 13:15`, and\n`first sunday of quarter 00:00`.\nSee more explanation about the format here:\nhttps://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format\nNOTE: the granularity should be at least 8 hours, or less frequent.", - "type": "string" - }, "dataRefreshWindowDays": { "format": "int32", "description": "The number of days to look back to automatically refresh the data.\nFor example, if `data_refresh_window_days = 10`, then every day\nBigQuery reingests data for [today-10, today-1], rather than ingesting data\nfor just [today-1].\nOnly valid if the data source supports the feature. Set the value to 0\nto use the default value.", @@ -442,6 +1694,15 @@ "type": "string" }, "state": { + "enumDescriptions": [ + "State placeholder.", + "Data transfer is inactive.", + "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", + "Data transfer is in progress.", + "Data transfer completed successsfully.", + "Data transfer failed.", + "Data transfer is cancelled." + ], "enum": [ "TRANSFER_STATE_UNSPECIFIED", "INACTIVE", @@ -452,20 +1713,7 @@ "CANCELLED" ], "description": "State of the most recently updated transfer run.\nOutput only.", - "type": "string", - "enumDescriptions": [ - "State placeholder.", - "Data transfer is inactive.", - "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", - "Data transfer is in progress.", - "Data transfer completed successsfully.", - "Data transfer failed.", - "Data transfer is cancelled." - ] - }, - "name": { - "type": "string", - "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig." + "type": "string" }, "userId": { "format": "int64", @@ -476,126 +1724,18 @@ "description": "The BigQuery target dataset id.", "type": "string" }, - "params": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Data transfer specific parameters." + "name": { + "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig.", + "type": "string" } } - }, - "TransferRun": { - "description": "Represents a data transfer run.", - "type": "object", - "properties": { - "dataSourceId": { - "description": "Data source id.\nOutput only.", - "type": "string" - }, - "state": { - "type": "string", - "enumDescriptions": [ - "State placeholder.", - "Data transfer is inactive.", - "Data transfer is scheduled and is waiting to be picked up by\ndata transfer backend.", - "Data transfer is in progress.", - "Data transfer completed successsfully.", - "Data transfer failed.", - "Data transfer is cancelled." - ], - "enum": [ - "TRANSFER_STATE_UNSPECIFIED", - "INACTIVE", - "PENDING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLED" - ], - "description": "Data transfer run state. Ignored for input requests.\nOutput only." - }, - "destinationDatasetId": { - "description": "The BigQuery target dataset id.", - "type": "string" - }, - "name": { - "description": "The resource name of the transfer run.\nTransfer run names have the form\n`projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.\nThe name is ignored when creating a transfer run.", - "type": "string" - }, - "userId": { - "format": "int64", - "description": "Unique ID of the user on whose behalf transfer is done. Applicable only\nto data sources that do not support service accounts. When set to 0,\nthe data source service account credentials are used.\nOutput only.", - "type": "string" - }, - "params": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Data transfer specific parameters." - }, - "endTime": { - "format": "google-datetime", - "description": "Time when transfer run ended. Parameter ignored by server for input\nrequests.\nOutput only.", - "type": "string" - }, - "datasetRegion": { - "description": "Region in which BigQuery dataset is located. Currently possible values are:\n\"US\" and \"EU\".\nOutput only.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Time when transfer run was started. Parameter ignored by server for input\nrequests.\nOutput only.", - "type": "string" - }, - "scheduleTime": { - "format": "google-datetime", - "description": "Minimum time after which a transfer run can be started.", - "type": "string" - }, - "schedule": { - "description": "Describes the schedule of this transfer run if it was created as part of\na regular schedule. For batch transfer runs that are directly created,\nthis is empty.\nNOTE: the system might choose to delay the schedule depending on the\ncurrent load, so `schedule_time` doesn't always matches this.\nOutput only.", - "type": "string" - }, - "updateTime": { - "type": "string", - "format": "google-datetime", - "description": "Last time the data transfer run state was updated.\nOutput only." - }, - "runTime": { - "type": "string", - "format": "google-datetime", - "description": "For batch transfer runs, specifies the date and time that\ndata should be ingested." - } - }, - "id": "TransferRun" - }, - "CheckValidCredsRequest": { - "description": "A request to determine whether the user has valid credentials. This method\nis used to limit the number of OAuth popups in the user interface. The\nuser id is inferred from the API call context.\nIf the data source has the Google+ authorization type, this method\nreturns false, as it cannot be determined whether the credentials are\nalready valid merely based on the user id.", - "type": "object", - "properties": {}, - "id": "CheckValidCredsRequest" - }, - "CheckValidCredsResponse": { - "description": "A response indicating whether the credentials exist and are valid.", - "type": "object", - "properties": { - "hasValidCreds": { - "description": "If set to `true`, the credentials exist and are valid.", - "type": "boolean" - } - }, - "id": "CheckValidCredsResponse" } }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, "canonicalName": "BigQuery Data Transfer", "auth": { "oauth2": { @@ -616,1146 +1756,7 @@ "ownerDomain": "google.com", "name": "bigquerydatatransfer", "batchPath": "batch", + "fullyEncodeReservedExpansion": true, "title": "BigQuery Data Transfer API", - "ownerName": "Google", - "resources": { - "projects": { - "resources": { - "transferConfigs": { - "methods": { - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.transferConfigs.delete", - "description": "Deletes a data transfer configuration,\nincluding any associated transfer runs and logs." - }, - "list": { - "path": "v1/{+parent}/transferConfigs", - "id": "bigquerydatatransfer.projects.transferConfigs.list", - "description": "Returns information about all data transfers in the project.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListTransferConfigsResponse" - }, - "parameters": { - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results." - }, - "dataSourceIds": { - "location": "query", - "description": "When specified, only configurations of requested data sources are returned.", - "type": "string", - "repeated": true - }, - "parent": { - "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "TransferConfig" - }, - "parameters": { - "authorizationCode": { - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", - "type": "string", - "location": "query" - }, - "parent": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs", - "path": "v1/{+parent}/transferConfigs", - "id": "bigquerydatatransfer.projects.transferConfigs.create", - "description": "Creates a new data transfer configuration.", - "request": { - "$ref": "TransferConfig" - } - }, - "scheduleRuns": { - "response": { - "$ref": "ScheduleTransferRunsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "Transfer configuration name in the form:\n`projects/{project_id}/transferConfigs/{config_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}:scheduleRuns", - "id": "bigquerydatatransfer.projects.transferConfigs.scheduleRuns", - "path": "v1/{+parent}:scheduleRuns", - "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range.", - "request": { - "$ref": "ScheduleTransferRunsRequest" - } - }, - "patch": { - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string" - }, - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path", - "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig." - }, - "authorizationCode": { - "location": "query", - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", - "type": "string" - } - }, - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}", - "id": "bigquerydatatransfer.projects.transferConfigs.patch", - "path": "v1/{+name}", - "request": { - "$ref": "TransferConfig" - }, - "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated.", - "response": { - "$ref": "TransferConfig" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH" - }, - "get": { - "id": "bigquerydatatransfer.projects.transferConfigs.get", - "path": "v1/{+name}", - "description": "Returns information about a data transfer config.", - "response": { - "$ref": "TransferConfig" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}" - } - }, - "resources": { - "runs": { - "methods": { - "delete": { - "description": "Deletes the specified transfer run.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.delete", - "path": "v1/{+name}" - }, - "list": { - "description": "Returns information about running and completed jobs.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListTransferRunsResponse" - }, - "parameters": { - "parent": { - "pattern": "^projects/[^/]+/transferConfigs/[^/]+$", - "location": "path", - "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - }, - "states": { - "description": "When specified, only transfer runs with requested states are returned.", - "type": "string", - "repeated": true, - "location": "query", - "enum": [ - "TRANSFER_STATE_UNSPECIFIED", - "INACTIVE", - "PENDING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLED" - ] - }, - "runAttempt": { - "location": "query", - "enum": [ - "RUN_ATTEMPT_UNSPECIFIED", - "LATEST" - ], - "description": "Indicates how run attempts are to be pulled.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs", - "path": "v1/{+parent}/runs", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.list" - }, - "get": { - "description": "Returns information about the particular transfer run.", - "response": { - "$ref": "TransferRun" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.get", - "path": "v1/{+name}" - } - }, - "resources": { - "transferLogs": { - "methods": { - "list": { - "description": "Returns user facing log messages for the data transfer run.", - "httpMethod": "GET", - "response": { - "$ref": "ListTransferLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - }, - "messageTypes": { - "repeated": true, - "location": "query", - "enum": [ - "MESSAGE_SEVERITY_UNSPECIFIED", - "INFO", - "WARNING", - "ERROR" - ], - "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", - "type": "string" - }, - "parent": { - "description": "Transfer run name in the form:\n`projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path" - }, - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransferLogsRequest` list results. For multiple-page\nresults, `ListTransferLogsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/transferConfigs/{transferConfigsId}/runs/{runsId}/transferLogs", - "path": "v1/{+parent}/transferLogs", - "id": "bigquerydatatransfer.projects.transferConfigs.runs.transferLogs.list" - } - } - } - } - } - } - }, - "dataSources": { - "methods": { - "list": { - "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering.", - "response": { - "$ref": "ListDataSourcesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - }, - "parent": { - "location": "path", - "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - } - }, - "flatPath": "v1/projects/{projectsId}/dataSources", - "id": "bigquerydatatransfer.projects.dataSources.list", - "path": "v1/{+parent}/dataSources" - }, - "get": { - "httpMethod": "GET", - "response": { - "$ref": "DataSource" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/dataSources/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.dataSources.get", - "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering." - }, - "checkValidCreds": { - "flatPath": "v1/projects/{projectsId}/dataSources/{dataSourcesId}:checkValidCreds", - "id": "bigquerydatatransfer.projects.dataSources.checkValidCreds", - "path": "v1/{+name}:checkValidCreds", - "request": { - "$ref": "CheckValidCredsRequest" - }, - "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.\nSome data sources doesn't support service account, so we need to talk to\nthem on behalf of the end user. This API just checks whether we have OAuth\ntoken for the particular user, which is a pre-requisite before user can\ncreate a transfer config.", - "response": { - "$ref": "CheckValidCredsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/dataSources/[^/]+$", - "location": "path" - } - } - } - } - }, - "locations": { - "methods": { - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Location" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "location": "path", - "description": "Resource name for the location.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.locations.get", - "description": "Get information about a location." - }, - "list": { - "description": "Lists information about the supported locations for this service.", - "response": { - "$ref": "ListLocationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "type": "string", - "location": "query", - "description": "The standard list filter." - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "location": "path", - "description": "The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/locations", - "id": "bigquerydatatransfer.projects.locations.list", - "path": "v1/{+name}/locations" - } - }, - "resources": { - "transferConfigs": { - "methods": { - "scheduleRuns": { - "description": "Creates transfer runs for a time range [range_start_time, range_end_time].\nFor each date - or whatever granularity the data source supports - in the\nrange, one transfer run is created.\nNote that runs are created per UTC time in the time range.", - "request": { - "$ref": "ScheduleTransferRunsRequest" - }, - "response": { - "$ref": "ScheduleTransferRunsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "location": "path", - "description": "Transfer configuration name in the form:\n`projects/{project_id}/transferConfigs/{config_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}:scheduleRuns", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.scheduleRuns", - "path": "v1/{+parent}:scheduleRuns" - }, - "get": { - "description": "Returns information about a data transfer config.", - "response": { - "$ref": "TransferConfig" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.get", - "path": "v1/{+name}" - }, - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "TransferConfig" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "authorizationCode": { - "type": "string", - "location": "query", - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nIf it is provided, the transfer configuration will be associated with the\ngaia id of the authorizing user.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application." - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Required list of fields to be updated in this request.", - "type": "string" - }, - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", - "location": "path", - "description": "The resource name of the transfer config.\nTransfer config names have the form\n`projects/{project_id}/transferConfigs/{config_id}`.\nWhere `config_id` is usually a uuid, even though it is not\nguaranteed or required. The name is ignored when creating a transfer\nconfig.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.patch", - "request": { - "$ref": "TransferConfig" - }, - "description": "Updates a data transfer configuration.\nAll fields must be set, even if they are not updated." - }, - "delete": { - "id": "bigquerydatatransfer.projects.locations.transferConfigs.delete", - "path": "v1/{+name}", - "description": "Deletes a data transfer configuration,\nincluding any associated transfer runs and logs.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}`", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}" - }, - "list": { - "response": { - "$ref": "ListTransferConfigsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransfersRequest` list results. For multiple-page\nresults, `ListTransfersResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer" - }, - "dataSourceIds": { - "description": "When specified, only configurations of requested data sources are returned.", - "type": "string", - "repeated": true, - "location": "query" - }, - "parent": { - "description": "The BigQuery project id for which data sources\nshould be returned: `projects/{project_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.list", - "path": "v1/{+parent}/transferConfigs", - "description": "Returns information about all data transfers in the project." - }, - "create": { - "description": "Creates a new data transfer configuration.", - "request": { - "$ref": "TransferConfig" - }, - "response": { - "$ref": "TransferConfig" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "The BigQuery project id where the transfer configuration should be created.\nMust be in the format /projects/{project_id}/locations/{location_id}\nor\n/projects/{project_id}/locations/-\nIn case when '-' is specified as location_id, location is infered from\nthe destination dataset region.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - }, - "authorizationCode": { - "location": "query", - "description": "Optional OAuth2 authorization code to use with this transfer configuration.\nThis is required if new credentials are needed, as indicated by\n`CheckValidCreds`.\nIn order to obtain authorization_code, please make a\nrequest to\nhttps://www.gstatic.com/bigquerydatatransfer/oauthz/auth?client_id=\u003cdatatransferapiclientid\u003e&scope=\u003cdata_source_scopes\u003e&redirect_uri=\u003credirect_uri\u003e\n\n* client_id should be OAuth client_id of BigQuery DTS API for the given\n data source returned by ListDataSources method.\n* data_source_scopes are the scopes returned by ListDataSources method.\n* redirect_uri is an optional parameter. If not specified, then\n authorization code is posted to the opener of authorization flow window.\n Otherwise it will be sent to the redirect uri. A special value of\n urn:ietf:wg:oauth:2.0:oob means that authorization code should be\n returned in the title bar of the browser, with the page text prompting\n the user to copy the code and paste it in the application.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.create", - "path": "v1/{+parent}/transferConfigs" - } - }, - "resources": { - "runs": { - "methods": { - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.delete", - "path": "v1/{+name}", - "description": "Deletes the specified transfer run." - }, - "list": { - "description": "Returns information about running and completed jobs.", - "response": { - "$ref": "ListTransferRunsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransferRunsRequest` list results. For multiple-page\nresults, `ListTransferRunsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer" - }, - "states": { - "location": "query", - "enum": [ - "TRANSFER_STATE_UNSPECIFIED", - "INACTIVE", - "PENDING", - "RUNNING", - "SUCCEEDED", - "FAILED", - "CANCELLED" - ], - "description": "When specified, only transfer runs with requested states are returned.", - "type": "string", - "repeated": true - }, - "runAttempt": { - "description": "Indicates how run attempts are to be pulled.", - "type": "string", - "location": "query", - "enum": [ - "RUN_ATTEMPT_UNSPECIFIED", - "LATEST" - ] - }, - "parent": { - "description": "Name of transfer configuration for which transfer runs should be retrieved.\nFormat of transfer configuration resource name is:\n`projects/{project_id}/transferConfigs/{config_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.list", - "path": "v1/{+parent}/runs" - }, - "get": { - "response": { - "$ref": "TransferRun" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}`" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.get", - "path": "v1/{+name}", - "description": "Returns information about the particular transfer run." - } - }, - "resources": { - "transferLogs": { - "methods": { - "list": { - "response": { - "$ref": "ListTransferLogsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "Pagination token, which can be used to request a specific page\nof `ListTransferLogsRequest` list results. For multiple-page\nresults, `ListTransferLogsResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer" - }, - "messageTypes": { - "description": "Message types to return. If not populated - INFO, WARNING and ERROR\nmessages are returned.", - "type": "string", - "repeated": true, - "location": "query", - "enum": [ - "MESSAGE_SEVERITY_UNSPECIFIED", - "INFO", - "WARNING", - "ERROR" - ] - }, - "parent": { - "description": "Transfer run name in the form:\n`projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/transferConfigs/[^/]+/runs/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/transferConfigs/{transferConfigsId}/runs/{runsId}/transferLogs", - "id": "bigquerydatatransfer.projects.locations.transferConfigs.runs.transferLogs.list", - "path": "v1/{+parent}/transferLogs", - "description": "Returns user facing log messages for the data transfer run." - } - } - } - } - } - } - }, - "dataSources": { - "methods": { - "list": { - "path": "v1/{+parent}/dataSources", - "id": "bigquerydatatransfer.projects.locations.dataSources.list", - "description": "Lists supported data sources and returns their settings,\nwhich can be used for UI rendering.", - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListDataSourcesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "description": "Pagination token, which can be used to request a specific page\nof `ListDataSourcesRequest` list results. For multiple-page\nresults, `ListDataSourcesResponse` outputs\na `next_page` token, which can be used as the\n`page_token` value to request the next page of list results.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Page size. The default page size is the maximum value of 1000 results.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "The BigQuery project id for which data sources should be returned.\nMust be in the form: `projects/{project_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources" - }, - "get": { - "description": "Retrieves a supported data source and returns its settings,\nwhich can be used for UI rendering.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "DataSource" - }, - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/dataSources/[^/]+$", - "location": "path", - "description": "The field will contain name of the resource requested, for example:\n`projects/{project_id}/dataSources/{data_source_id}`" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}", - "path": "v1/{+name}", - "id": "bigquerydatatransfer.projects.locations.dataSources.get" - }, - "checkValidCreds": { - "request": { - "$ref": "CheckValidCredsRequest" - }, - "description": "Returns true if valid credentials exist for the given data source and\nrequesting user.\nSome data sources doesn't support service account, so we need to talk to\nthem on behalf of the end user. This API just checks whether we have OAuth\ntoken for the particular user, which is a pre-requisite before user can\ncreate a transfer config.", - "response": { - "$ref": "CheckValidCredsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "location": "path", - "description": "The data source in the form:\n`projects/{project_id}/dataSources/{data_source_id}`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/dataSources/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataSources/{dataSourcesId}:checkValidCreds", - "id": "bigquerydatatransfer.projects.locations.dataSources.checkValidCreds", - "path": "v1/{+name}:checkValidCreds" - } - } - } - } - } - } - } - }, - "parameters": { - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - } - }, - "version": "v1", - "baseUrl": "https://bigquerydatatransfer.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Transfers data from partner SaaS applications to Google BigQuery on a scheduled, managed basis.", - "servicePath": "", - "basePath": "", - "id": "bigquerydatatransfer:v1", - "documentationLink": "https://cloud.google.com/bigquery/", - "revision": "20170918", - "discoveryVersion": "v1" + "ownerName": "Google" } diff --git a/vendor/google.golang.org/api/classroom/v1/classroom-api.json b/vendor/google.golang.org/api/classroom/v1/classroom-api.json index f4eebe787..3b25e702a 100644 --- a/vendor/google.golang.org/api/classroom/v1/classroom-api.json +++ b/vendor/google.golang.org/api/classroom/v1/classroom-api.json @@ -1,10 +1,41 @@ { + "basePath": "", + "ownerDomain": "google.com", + "name": "classroom", + "batchPath": "batch", + "id": "classroom:v1", + "documentationLink": "https://developers.google.com/classroom/", + "revision": "20170926", "title": "Google Classroom API", "ownerName": "Google", "discoveryVersion": "v1", "resources": { "invitations": { "methods": { + "delete": { + "path": "v1/invitations/{id}", + "id": "classroom.invitations.delete", + "description": "Deletes an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID.", + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "id" + ], + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the invitation to delete.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/invitations/{id}" + }, "list": { "response": { "$ref": "ListInvitationsResponse" @@ -12,6 +43,16 @@ "parameterOrder": [], "httpMethod": "GET", "parameters": { + "pageToken": { + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating\nthat the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string" + }, + "userId": { + "type": "string", + "location": "query", + "description": "Restricts returned invitations to those for a specific user. The identifier\ncan be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" + }, "pageSize": { "location": "query", "format": "int32", @@ -22,16 +63,6 @@ "location": "query", "description": "Restricts returned invitations to those for a course with the specified\nidentifier.", "type": "string" - }, - "pageToken": { - "location": "query", - "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating\nthat the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", - "type": "string" - }, - "userId": { - "type": "string", - "location": "query", - "description": "Restricts returned invitations to those for a specific user. The identifier\ncan be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" } }, "scopes": [ @@ -44,95 +75,119 @@ "description": "Returns a list of invitations that the requesting user is permitted to\nview, restricted to those that match the list request.\n\n*Note:* At least one of `user_id` or `course_id` must be supplied. Both\nfields can be supplied.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors." }, "get": { + "description": "Returns an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID.", "response": { "$ref": "Invitation" }, + "httpMethod": "GET", "parameterOrder": [ "id" ], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/classroom.rosters", "https://www.googleapis.com/auth/classroom.rosters.readonly" ], "parameters": { "id": { + "location": "path", "description": "Identifier of the invitation to return.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1/invitations/{id}", "id": "classroom.invitations.get", - "path": "v1/invitations/{id}", - "description": "Returns an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID." + "path": "v1/invitations/{id}" }, "create": { + "request": { + "$ref": "Invitation" + }, + "description": "Creates an invitation. Only one invitation for a user and course may exist\nat a time. Delete and re-create an invitation to make changes.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ninvitations for this course or for access errors.\n* `NOT_FOUND` if the course or the user does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled or if\nthe user already has this role or a role with greater permissions.\n* `ALREADY_EXISTS` if an invitation for the specified user and course\nalready exists.", + "response": { + "$ref": "Invitation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": {}, + "flatPath": "v1/invitations", + "id": "classroom.invitations.create", + "path": "v1/invitations" + }, + "accept": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "id" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the invitation to accept.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/invitations/{id}:accept", + "id": "classroom.invitations.accept", + "path": "v1/invitations/{id}:accept", + "description": "Accepts an invitation, removing it and adding the invited user to the\nteachers or students (as appropriate) of the specified course. Only the\ninvited user may accept an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to accept the\nrequested invitation or for access errors.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `NOT_FOUND` if no invitation exists with the requested ID." + } + } + }, + "registrations": { + "methods": { + "create": { + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "parameters": {}, + "flatPath": "v1/registrations", + "path": "v1/registrations", + "id": "classroom.registrations.create", + "request": { + "$ref": "Registration" + }, + "description": "Creates a `Registration`, causing Classroom to start sending notifications\nfrom the provided `feed` to the provided `destination`.\n\nReturns the created `Registration`. Currently, this will be the same as\nthe argument, but with server-assigned fields such as `expiry_time` and\n`id` filled in.\n\nNote that any value specified for the `expiry_time` or `id` fields will be\nignored.\n\nWhile Classroom may validate the `destination` and return errors on a best\neffort basis, it is the caller's responsibility to ensure that it exists\nand that Classroom has permission to publish to it.\n\nThis method may return the following error codes:\n\n* `PERMISSION_DENIED` if:\n * the authenticated user does not have permission to receive\n notifications from the requested field; or\n * the credential provided does not include the appropriate scope for the\n requested feed.\n * another access error is encountered.\n* `INVALID_ARGUMENT` if:\n * no `destination` is specified, or the specified `destination` is not\n valid; or\n * no `feed` is specified, or the specified `feed` is not valid.\n* `NOT_FOUND` if:\n * the specified `feed` cannot be located, or the requesting user does not\n have permission to determine whether or not it exists; or\n * the specified `destination` cannot be located, or Classroom has not\n been granted permission to publish to it.", "httpMethod": "POST", "parameterOrder": [], "response": { - "$ref": "Invitation" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ], - "flatPath": "v1/invitations", - "path": "v1/invitations", - "id": "classroom.invitations.create", - "description": "Creates an invitation. Only one invitation for a user and course may exist\nat a time. Delete and re-create an invitation to make changes.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ninvitations for this course or for access errors.\n* `NOT_FOUND` if the course or the user does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled or if\nthe user already has this role or a role with greater permissions.\n* `ALREADY_EXISTS` if an invitation for the specified user and course\nalready exists.", - "request": { - "$ref": "Invitation" + "$ref": "Registration" } }, - "accept": { - "description": "Accepts an invitation, removing it and adding the invited user to the\nteachers or students (as appropriate) of the specified course. Only the\ninvited user may accept an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to accept the\nrequested invitation or for access errors.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `NOT_FOUND` if no invitation exists with the requested ID.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "id" - ], - "httpMethod": "POST", - "parameters": { - "id": { - "description": "Identifier of the invitation to accept.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ], - "flatPath": "v1/invitations/{id}:accept", - "id": "classroom.invitations.accept", - "path": "v1/invitations/{id}:accept" - }, "delete": { - "flatPath": "v1/invitations/{id}", - "id": "classroom.invitations.delete", - "path": "v1/invitations/{id}", - "description": "Deletes an invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested invitation or for access errors.\n* `NOT_FOUND` if no invitation exists with the requested ID.", - "parameterOrder": [ - "id" + "parameters": { + "registrationId": { + "location": "path", + "description": "The `registration_id` of the `Registration` to be deleted.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" ], + "flatPath": "v1/registrations/{registrationId}", + "id": "classroom.registrations.delete", + "path": "v1/registrations/{registrationId}", + "description": "Deletes a `Registration`, causing Classroom to stop sending notifications\nfor that `Registration`.", "response": { "$ref": "Empty" }, - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" + "parameterOrder": [ + "registrationId" ], - "parameters": { - "id": { - "description": "Identifier of the invitation to delete.", - "type": "string", - "required": true, - "location": "path" - } - } + "httpMethod": "DELETE" } } }, @@ -167,165 +222,9 @@ } }, "resources": { - "guardianInvitations": { - "methods": { - "patch": { - "httpMethod": "PATCH", - "parameterOrder": [ - "studentId", - "invitationId" - ], - "response": { - "$ref": "GuardianInvitation" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.students" - ], - "parameters": { - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `state`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", - "type": "string" - }, - "invitationId": { - "location": "path", - "description": "The `id` field of the `GuardianInvitation` to be modified.", - "type": "string", - "required": true - }, - "studentId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the student whose guardian invitation is to be modified." - } - }, - "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "id": "classroom.userProfiles.guardianInvitations.patch", - "request": { - "$ref": "GuardianInvitation" - }, - "description": "Modifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from\n`PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if guardians are not enabled for the domain in question\n or for other access errors.\n* `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n* `INVALID_ARGUMENT` if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API), or if the passed `GuardianInvitation` has a `state` other than\n `COMPLETE`, or if it modifies fields other than `state`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student, or if the `id` field does not\n refer to a guardian invitation known to Classroom." - }, - "get": { - "description": "Returns a specific guardian invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\n guardian invitations for the student identified by the `student_id`, if\n guardians are not enabled for the domain in question, or for other\n access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if Classroom cannot find any record of the given student or\n `invitation_id`. May also be returned if the student exists, but the\n requesting user does not have access to see that student.", - "httpMethod": "GET", - "parameterOrder": [ - "studentId", - "invitationId" - ], - "response": { - "$ref": "GuardianInvitation" - }, - "parameters": { - "invitationId": { - "location": "path", - "description": "The `id` field of the `GuardianInvitation` being requested.", - "type": "string", - "required": true - }, - "studentId": { - "description": "The ID of the student whose guardian invitation is being requested.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.students", - "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" - ], - "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", - "id": "classroom.userProfiles.guardianInvitations.get" - }, - "list": { - "response": { - "$ref": "ListGuardianInvitationsResponse" - }, - "parameterOrder": [ - "studentId" - ], - "httpMethod": "GET", - "parameters": { - "studentId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the student whose guardian invitations are to be returned.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n* the string literal `\"-\"`, indicating that results should be returned for\n all students that the requesting user is permitted to view guardian\n invitations." - }, - "pageToken": { - "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer" - }, - "states": { - "enum": [ - "GUARDIAN_INVITATION_STATE_UNSPECIFIED", - "PENDING", - "COMPLETE" - ], - "description": "If specified, only results with the specified `state` values will be\nreturned. Otherwise, results with a `state` of `PENDING` will be returned.", - "type": "string", - "repeated": true, - "location": "query" - }, - "invitedEmailAddress": { - "type": "string", - "location": "query", - "description": "If specified, only results with the specified `invited_email_address`\nwill be returned." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.students", - "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" - ], - "flatPath": "v1/userProfiles/{studentId}/guardianInvitations", - "id": "classroom.userProfiles.guardianInvitations.list", - "path": "v1/userProfiles/{studentId}/guardianInvitations", - "description": "Returns a list of guardian invitations that the requesting user is\npermitted to view, filtered by the parameters provided.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian invitations for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` or `state` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student." - }, - "create": { - "id": "classroom.userProfiles.guardianInvitations.create", - "path": "v1/userProfiles/{studentId}/guardianInvitations", - "request": { - "$ref": "GuardianInvitation" - }, - "description": "Creates a guardian invitation, and sends an email to the guardian asking\nthem to confirm that they are the student's guardian.\n\nOnce the guardian accepts the invitation, their `state` will change to\n`COMPLETED` and they will start receiving guardian notifications. A\n`Guardian` resource will also be created to represent the active guardian.\n\nThe request object must have the `student_id` and\n`invited_email_address` fields set. Failing to set these fields, or\nsetting any other fields in the request, will result in an error.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if the guardian in question has already rejected\n too many requests for that student, if guardians are not enabled for the\n domain in question, or for other access errors.\n* `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian\n link limit.\n* `INVALID_ARGUMENT` if the guardian email address is not valid (for\n example, if it is too long), or if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API). This error will also be returned if read-only fields are set,\n or if the `state` field is set to to a value other than `PENDING`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student.\n* `ALREADY_EXISTS` if there is already a pending guardian invitation for\n the student and `invited_email_address` provided, or if the provided\n `invited_email_address` matches the Google account of an existing\n `Guardian` for this user.", - "response": { - "$ref": "GuardianInvitation" - }, - "parameterOrder": [ - "studentId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.students" - ], - "parameters": { - "studentId": { - "description": "ID of the student (in standard format)", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/userProfiles/{studentId}/guardianInvitations" - } - } - }, "guardians": { "methods": { "delete": { - "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", "id": "classroom.userProfiles.guardians.delete", "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", "description": "Deletes a guardian.\n\nThe guardian will no longer receive guardian notifications and the guardian\nwill no longer be accessible via the API.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to manage guardians for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API).\n* `NOT_FOUND` if the requesting user is permitted to modify guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student with the provided `guardian_id`.", @@ -341,21 +240,39 @@ "https://www.googleapis.com/auth/classroom.guardianlinks.students" ], "parameters": { + "guardianId": { + "location": "path", + "description": "The `id` field from a `Guardian`.", + "type": "string", + "required": true + }, "studentId": { "location": "path", "description": "The student whose guardian is to be deleted. One of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", "type": "string", "required": true - }, - "guardianId": { - "description": "The `id` field from a `Guardian`.", - "type": "string", - "required": true, - "location": "path" } - } + }, + "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}" }, "get": { + "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", + "id": "classroom.userProfiles.guardians.get", + "description": "Returns a specific guardian.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to view guardian information for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if the requesting user is permitted to view guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student that matches the provided `guardian_id`.", + "httpMethod": "GET", + "parameterOrder": [ + "studentId", + "guardianId" + ], + "response": { + "$ref": "Guardian" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly", + "https://www.googleapis.com/auth/classroom.guardianlinks.students", + "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" + ], "parameters": { "studentId": { "location": "path", @@ -369,37 +286,17 @@ "required": true, "location": "path" } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly", - "https://www.googleapis.com/auth/classroom.guardianlinks.students", - "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" - ], - "flatPath": "v1/userProfiles/{studentId}/guardians/{guardianId}", - "id": "classroom.userProfiles.guardians.get", - "path": "v1/userProfiles/{studentId}/guardians/{guardianId}", - "description": "Returns a specific guardian.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if no user that matches the provided `student_id`\n is visible to the requesting user, if the requesting user is not\n permitted to view guardian information for the student identified by the\n `student_id`, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if the requesting user is permitted to view guardians for\n the requested `student_id`, but no `Guardian` record exists for that\n student that matches the provided `guardian_id`.", - "response": { - "$ref": "Guardian" - }, - "parameterOrder": [ - "studentId", - "guardianId" - ], - "httpMethod": "GET" + } }, "list": { - "flatPath": "v1/userProfiles/{studentId}/guardians", - "path": "v1/userProfiles/{studentId}/guardians", - "id": "classroom.userProfiles.guardians.list", "description": "Returns a list of guardians that the requesting user is permitted to\nview, restricted to those that match the request.\n\nTo list guardians for any student that the requesting user may view\nguardians for, use the literal character `-` for the student ID.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian information for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n if the `invited_email_address` filter is set by a user who is not a\n domain administrator, or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student.", "httpMethod": "GET", - "response": { - "$ref": "ListGuardiansResponse" - }, "parameterOrder": [ "studentId" ], + "response": { + "$ref": "ListGuardiansResponse" + }, "scopes": [ "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly", "https://www.googleapis.com/auth/classroom.guardianlinks.students", @@ -418,17 +315,175 @@ "location": "query" }, "pageSize": { + "location": "query", "format": "int32", "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer", - "location": "query" + "type": "integer" }, "invitedEmailAddress": { "description": "Filter results by the email address that the original invitation was sent\nto, resulting in this guardian link.\nThis filter can only be used by domain administrators.", "type": "string", "location": "query" } - } + }, + "flatPath": "v1/userProfiles/{studentId}/guardians", + "path": "v1/userProfiles/{studentId}/guardians", + "id": "classroom.userProfiles.guardians.list" + } + } + }, + "guardianInvitations": { + "methods": { + "create": { + "response": { + "$ref": "GuardianInvitation" + }, + "parameterOrder": [ + "studentId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.students" + ], + "parameters": { + "studentId": { + "description": "ID of the student (in standard format)", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations", + "id": "classroom.userProfiles.guardianInvitations.create", + "path": "v1/userProfiles/{studentId}/guardianInvitations", + "request": { + "$ref": "GuardianInvitation" + }, + "description": "Creates a guardian invitation, and sends an email to the guardian asking\nthem to confirm that they are the student's guardian.\n\nOnce the guardian accepts the invitation, their `state` will change to\n`COMPLETED` and they will start receiving guardian notifications. A\n`Guardian` resource will also be created to represent the active guardian.\n\nThe request object must have the `student_id` and\n`invited_email_address` fields set. Failing to set these fields, or\nsetting any other fields in the request, will result in an error.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if the guardian in question has already rejected\n too many requests for that student, if guardians are not enabled for the\n domain in question, or for other access errors.\n* `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian\n link limit.\n* `INVALID_ARGUMENT` if the guardian email address is not valid (for\n example, if it is too long), or if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API). This error will also be returned if read-only fields are set,\n or if the `state` field is set to to a value other than `PENDING`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student.\n* `ALREADY_EXISTS` if there is already a pending guardian invitation for\n the student and `invited_email_address` provided, or if the provided\n `invited_email_address` matches the Google account of an existing\n `Guardian` for this user." + }, + "patch": { + "request": { + "$ref": "GuardianInvitation" + }, + "description": "Modifies a guardian invitation.\n\nCurrently, the only valid modification is to change the `state` from\n`PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the current user does not have permission to\n manage guardians, if guardians are not enabled for the domain in question\n or for other access errors.\n* `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state.\n* `INVALID_ARGUMENT` if the format of the student ID provided\n cannot be recognized (it is not an email address, nor a `user_id` from\n this API), or if the passed `GuardianInvitation` has a `state` other than\n `COMPLETE`, or if it modifies fields other than `state`.\n* `NOT_FOUND` if the student ID provided is a valid student ID, but\n Classroom has no record of that student, or if the `id` field does not\n refer to a guardian invitation known to Classroom.", + "httpMethod": "PATCH", + "parameterOrder": [ + "studentId", + "invitationId" + ], + "response": { + "$ref": "GuardianInvitation" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.students" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `state`\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", + "type": "string", + "location": "query" + }, + "invitationId": { + "description": "The `id` field of the `GuardianInvitation` to be modified.", + "type": "string", + "required": true, + "location": "path" + }, + "studentId": { + "location": "path", + "description": "The ID of the student whose guardian invitation is to be modified.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", + "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", + "id": "classroom.userProfiles.guardianInvitations.patch" + }, + "get": { + "id": "classroom.userProfiles.guardianInvitations.get", + "path": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}", + "description": "Returns a specific guardian invitation.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\n guardian invitations for the student identified by the `student_id`, if\n guardians are not enabled for the domain in question, or for other\n access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`).\n* `NOT_FOUND` if Classroom cannot find any record of the given student or\n `invitation_id`. May also be returned if the student exists, but the\n requesting user does not have access to see that student.", + "response": { + "$ref": "GuardianInvitation" + }, + "parameterOrder": [ + "studentId", + "invitationId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.students", + "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" + ], + "parameters": { + "studentId": { + "location": "path", + "description": "The ID of the student whose guardian invitation is being requested.", + "type": "string", + "required": true + }, + "invitationId": { + "location": "path", + "description": "The `id` field of the `GuardianInvitation` being requested.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations/{invitationId}" + }, + "list": { + "response": { + "$ref": "ListGuardianInvitationsResponse" + }, + "parameterOrder": [ + "studentId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.guardianlinks.students", + "https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer", + "location": "query" + }, + "states": { + "type": "string", + "repeated": true, + "location": "query", + "enum": [ + "GUARDIAN_INVITATION_STATE_UNSPECIFIED", + "PENDING", + "COMPLETE" + ], + "description": "If specified, only results with the specified `state` values will be\nreturned. Otherwise, results with a `state` of `PENDING` will be returned." + }, + "invitedEmailAddress": { + "description": "If specified, only results with the specified `invited_email_address`\nwill be returned.", + "type": "string", + "location": "query" + }, + "studentId": { + "location": "path", + "description": "The ID of the student whose guardian invitations are to be returned.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n* the string literal `\"-\"`, indicating that results should be returned for\n all students that the requesting user is permitted to view guardian\n invitations.", + "type": "string", + "required": true + }, + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1/userProfiles/{studentId}/guardianInvitations", + "id": "classroom.userProfiles.guardianInvitations.list", + "path": "v1/userProfiles/{studentId}/guardianInvitations", + "description": "Returns a list of guardian invitations that the requesting user is\npermitted to view, filtered by the parameters provided.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if a `student_id` is specified, and the requesting\n user is not permitted to view guardian invitations for that student, if\n `\"-\"` is specified as the `student_id` and the user is not a domain\n administrator, if guardians are not enabled for the domain in question,\n or for other access errors.\n* `INVALID_ARGUMENT` if a `student_id` is specified, but its format cannot\n be recognized (it is not an email address, nor a `student_id` from the\n API, nor the literal string `me`). May also be returned if an invalid\n `page_token` or `state` is provided.\n* `NOT_FOUND` if a `student_id` is specified, and its format can be\n recognized, but Classroom has no record of that student." } } } @@ -436,43 +491,36 @@ }, "courses": { "methods": { - "delete": { - "path": "v1/courses/{id}", - "id": "classroom.courses.delete", - "description": "Deletes a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "id" - ], - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ], - "parameters": { - "id": { - "description": "Identifier of the course to delete.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/courses/{id}" - }, "list": { "description": "Returns a list of courses that the requesting user is permitted to view,\nrestricted to those that match the request. Returned courses are ordered by\ncreation time, with the most recently created coming first.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` for access errors.\n* `INVALID_ARGUMENT` if the query argument is malformed.\n* `NOT_FOUND` if any users specified in the query arguments do not exist.", + "httpMethod": "GET", "response": { "$ref": "ListCoursesResponse" }, "parameterOrder": [], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/classroom.courses", "https://www.googleapis.com/auth/classroom.courses.readonly" ], "parameters": { + "studentId": { + "location": "query", + "description": "Restricts returned courses to those having a student with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer" + }, "courseStates": { + "repeated": true, "location": "query", "enum": [ "COURSE_STATE_UNSPECIFIED", @@ -483,58 +531,41 @@ "SUSPENDED" ], "description": "Restricts returned courses to those in one of the specified states\nThe default value is ACTIVE, ARCHIVED, PROVISIONED, DECLINED.", - "type": "string", - "repeated": true + "type": "string" }, "teacherId": { - "location": "query", - "description": "Restricts returned courses to those having a teacher with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string" - }, - "studentId": { - "description": "Restricts returned courses to those having a student with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", "type": "string", - "location": "query" - }, - "pageToken": { "location": "query", - "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer", - "location": "query" + "description": "Restricts returned courses to those having a teacher with the specified\nidentifier. The identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" } }, "flatPath": "v1/courses", - "id": "classroom.courses.list", - "path": "v1/courses" + "path": "v1/courses", + "id": "classroom.courses.list" }, "create": { - "description": "Creates a course.\n\nThe user specified in `ownerId` is the owner of the created course\nand added as a teacher.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ncourses or for access errors.\n* `NOT_FOUND` if the primary teacher is not a valid user.\n* `FAILED_PRECONDITION` if the course owner's account is disabled or for\nthe following request errors:\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if an alias was specified in the `id` and\nalready exists.", - "request": { - "$ref": "Course" - }, "response": { "$ref": "Course" }, "parameterOrder": [], "httpMethod": "POST", - "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/classroom.courses" ], + "parameters": {}, "flatPath": "v1/courses", "id": "classroom.courses.create", - "path": "v1/courses" + "path": "v1/courses", + "request": { + "$ref": "Course" + }, + "description": "Creates a course.\n\nThe user specified in `ownerId` is the owner of the created course\nand added as a teacher.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\ncourses or for access errors.\n* `NOT_FOUND` if the primary teacher is not a valid user.\n* `FAILED_PRECONDITION` if the course owner's account is disabled or for\nthe following request errors:\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if an alias was specified in the `id` and\nalready exists." }, "get": { - "httpMethod": "GET", "response": { "$ref": "Course" }, + "httpMethod": "GET", "parameterOrder": [ "id" ], @@ -551,15 +582,11 @@ } }, "flatPath": "v1/courses/{id}", - "path": "v1/courses/{id}", "id": "classroom.courses.get", + "path": "v1/courses/{id}", "description": "Returns a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID." }, "patch": { - "description": "Updates one or more fields in a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `INVALID_ARGUMENT` if invalid fields are specified in the update mask or\nif no update mask is supplied.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable", - "request": { - "$ref": "Course" - }, "httpMethod": "PATCH", "parameterOrder": [ "id" @@ -567,6 +594,9 @@ "response": { "$ref": "Course" }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], "parameters": { "id": { "location": "path", @@ -575,27 +605,35 @@ "required": true }, "updateMask": { - "format": "google-fieldmask", - "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `name`\n* `section`\n* `descriptionHeading`\n* `description`\n* `room`\n* `courseState`\n* `ownerId`\n\nNote: patches to ownerId are treated as being effective immediately, but in\npractice it may take some time for the ownership transfer of all affected\nresources to complete.\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`", "type": "string", - "location": "query" + "location": "query", + "format": "google-fieldmask", + "description": "Mask that identifies which fields on the course to update.\nThis field is required to do an update. The update will fail if invalid\nfields are specified. The following fields are valid:\n\n* `name`\n* `section`\n* `descriptionHeading`\n* `description`\n* `room`\n* `courseState`\n* `ownerId`\n\nNote: patches to ownerId are treated as being effective immediately, but in\npractice it may take some time for the ownership transfer of all affected\nresources to complete.\n\nWhen set in a query parameter, this field should be specified as\n\n`updateMask=\u003cfield1\u003e,\u003cfield2\u003e,...`" } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ], "flatPath": "v1/courses/{id}", "path": "v1/courses/{id}", - "id": "classroom.courses.patch" - }, - "update": { - "response": { + "id": "classroom.courses.patch", + "request": { "$ref": "Course" }, + "description": "Updates one or more fields in a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `INVALID_ARGUMENT` if invalid fields are specified in the update mask or\nif no update mask is supplied.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable" + }, + "update": { + "flatPath": "v1/courses/{id}", + "path": "v1/courses/{id}", + "id": "classroom.courses.update", + "request": { + "$ref": "Course" + }, + "description": "Updates a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable", + "httpMethod": "PUT", "parameterOrder": [ "id" ], - "httpMethod": "PUT", + "response": { + "$ref": "Course" + }, "scopes": [ "https://www.googleapis.com/auth/classroom.courses" ], @@ -606,266 +644,75 @@ "required": true, "location": "path" } + } + }, + "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "id" + ], + "response": { + "$ref": "Empty" }, + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the course to delete.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], "flatPath": "v1/courses/{id}", - "id": "classroom.courses.update", "path": "v1/courses/{id}", - "request": { - "$ref": "Course" - }, - "description": "Updates a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to modify the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID.\n* `FAILED_PRECONDITION` for the following request errors:\n * CourseNotModifiable" + "id": "classroom.courses.delete", + "description": "Deletes a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete the\nrequested course or for access errors.\n* `NOT_FOUND` if no course exists with the requested ID." } }, "resources": { - "aliases": { - "methods": { - "list": { - "description": "Returns a list of aliases for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\ncourse or for access errors.\n* `NOT_FOUND` if the course does not exist.", - "httpMethod": "GET", - "response": { - "$ref": "ListCourseAliasesResponse" - }, - "parameterOrder": [ - "courseId" - ], - "parameters": { - "pageToken": { - "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer", - "location": "query" - }, - "courseId": { - "description": "The identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses", - "https://www.googleapis.com/auth/classroom.courses.readonly" - ], - "flatPath": "v1/courses/{courseId}/aliases", - "path": "v1/courses/{courseId}/aliases", - "id": "classroom.courses.aliases.list" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "CourseAlias" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ], - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course to alias.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/courses/{courseId}/aliases", - "path": "v1/courses/{courseId}/aliases", - "id": "classroom.courses.aliases.create", - "request": { - "$ref": "CourseAlias" - }, - "description": "Creates an alias for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create the\nalias or for access errors.\n* `NOT_FOUND` if the course does not exist.\n* `ALREADY_EXISTS` if the alias already exists.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to access a domain-scoped alias)." - }, - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "courseId", - "alias" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course whose alias should be deleted.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, - "alias": { - "type": "string", - "required": true, - "location": "path", - "description": "Alias to delete.\nThis may not be the Classroom-assigned identifier." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.courses" - ], - "flatPath": "v1/courses/{courseId}/aliases/{alias}", - "path": "v1/courses/{courseId}/aliases/{alias}", - "id": "classroom.courses.aliases.delete", - "description": "Deletes an alias of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to remove the\nalias or for access errors.\n* `NOT_FOUND` if the alias does not exist.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to delete a domain-scoped alias)." - } - } - }, - "students": { - "methods": { - "delete": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "courseId", - "userId" - ], - "httpMethod": "DELETE", - "parameters": { - "userId": { - "description": "Identifier of the student to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "required": true, - "location": "path" - }, - "courseId": { - "type": "string", - "required": true, - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ], - "flatPath": "v1/courses/{courseId}/students/{userId}", - "id": "classroom.courses.students.delete", - "path": "v1/courses/{courseId}/students/{userId}", - "description": "Deletes a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist." - }, - "list": { - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer", - "location": "query" - }, - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/courses/{courseId}/students", - "id": "classroom.courses.students.list", - "path": "v1/courses/{courseId}/students", - "description": "Returns a list of students of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors.", - "response": { - "$ref": "ListStudentsResponse" - }, - "parameterOrder": [ - "courseId" - ], - "httpMethod": "GET" - }, - "get": { - "description": "Returns a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist.", - "response": { - "$ref": "Student" - }, - "parameterOrder": [ - "courseId", - "userId" - ], - "httpMethod": "GET", - "parameters": { - "userId": { - "description": "Identifier of the student to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "required": true, - "location": "path" - }, - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ], - "flatPath": "v1/courses/{courseId}/students/{userId}", - "id": "classroom.courses.students.get", - "path": "v1/courses/{courseId}/students/{userId}" - }, - "create": { - "request": { - "$ref": "Student" - }, - "description": "Adds a user as a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nstudents in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a student or teacher in the\ncourse.", - "response": { - "$ref": "Student" - }, - "parameterOrder": [ - "courseId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters" - ], - "parameters": { - "courseId": { - "description": "Identifier of the course to create the student in.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" - }, - "enrollmentCode": { - "location": "query", - "description": "Enrollment code of the course to create the student in.\nThis code is required if userId\ncorresponds to the requesting user; it may be omitted if the requesting\nuser has administrative permissions to create students for any user.", - "type": "string" - } - }, - "flatPath": "v1/courses/{courseId}/students", - "id": "classroom.courses.students.create", - "path": "v1/courses/{courseId}/students" - } - } - }, "courseWork": { "methods": { + "delete": { + "description": "Deletes a course work.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the requesting user is not permitted\nto delete the requested course or for access errors.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if no course exists with the requested ID.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "id" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the course work to delete.\nThis identifier is a Classroom-assigned identifier.", + "type": "string", + "required": true + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{id}", + "id": "classroom.courses.courseWork.delete", + "path": "v1/courses/{courseId}/courseWork/{id}" + }, "list": { "httpMethod": "GET", + "parameterOrder": [ + "courseId" + ], "response": { "$ref": "ListCourseWorkResponse" }, - "parameterOrder": [ - "courseId" - ], "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.me", "https://www.googleapis.com/auth/classroom.coursework.me.readonly", @@ -874,14 +721,14 @@ ], "parameters": { "pageToken": { + "location": "query", "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", - "type": "string", - "location": "query" + "type": "string" }, "orderBy": { - "location": "query", "description": "Optional sort ordering for results. A comma-separated list of fields with\nan optional sort direction keyword. Supported fields are `updateTime`\nand `dueDate`. Supported direction keywords are `asc` and `desc`.\nIf not specified, `updateTime desc` is the default behavior.\nExamples: `dueDate asc,updateTime desc`, `updateTime,dueDate desc`", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "format": "int32", @@ -913,22 +760,24 @@ "id": "classroom.courses.courseWork.list", "description": "Returns a list of course work that the requester is permitted to view.\n\nCourse students may only view `PUBLISHED` course work. Course teachers\nand domain administrators may view all course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access\nthe requested course or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist." }, - "get": { + "create": { + "id": "classroom.courses.courseWork.create", + "path": "v1/courses/{courseId}/courseWork", + "request": { + "$ref": "CourseWork" + }, + "description": "Creates course work.\n\nThe resulting course work (and corresponding student submissions) are\nassociated with the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\nmake the request. Classroom API requests to modify course work and student\nsubmissions must be made with an OAuth client ID from the associated\nDeveloper Console project.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, create course work in the requested course, share a\nDrive attachment, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.\n* `FAILED_PRECONDITION` for the following request error:\n * AttachmentNotVisible", "response": { "$ref": "CourseWork" }, "parameterOrder": [ - "courseId", - "id" + "courseId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.students" ], - "httpMethod": "GET", "parameters": { - "id": { - "location": "path", - "description": "Identifier of the course work.", - "type": "string", - "required": true - }, "courseId": { "location": "path", "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", @@ -936,21 +785,58 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.me.readonly", - "https://www.googleapis.com/auth/classroom.coursework.students", - "https://www.googleapis.com/auth/classroom.coursework.students.readonly" - ], - "flatPath": "v1/courses/{courseId}/courseWork/{id}", - "id": "classroom.courses.courseWork.get", - "path": "v1/courses/{courseId}/courseWork/{id}", - "description": "Returns course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist." + "flatPath": "v1/courses/{courseId}/courseWork" }, - "patch": { + "modifyAssignees": { + "httpMethod": "POST", + "parameterOrder": [ + "courseId", + "id" + ], + "response": { + "$ref": "CourseWork" + }, "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.students" ], + "parameters": { + "courseId": { + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true, + "location": "path" + }, + "id": { + "location": "path", + "description": "Identifier of the coursework.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{id}:modifyAssignees", + "path": "v1/courses/{courseId}/courseWork/{id}:modifyAssignees", + "id": "classroom.courses.courseWork.modifyAssignees", + "request": { + "$ref": "ModifyCourseWorkAssigneesRequest" + }, + "description": "Modifies assignee mode and options of a coursework.\n\nOnly a teacher of the course that contains the coursework may\ncall this method.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist." + }, + "patch": { + "flatPath": "v1/courses/{courseId}/courseWork/{id}", + "path": "v1/courses/{courseId}/courseWork/{id}", + "id": "classroom.courses.courseWork.patch", + "description": "Updates one or more fields of a course work.\n\nSee google.classroom.v1.CourseWork for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "request": { + "$ref": "CourseWork" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "courseId", + "id" + ], + "response": { + "$ref": "CourseWork" + }, "parameters": { "courseId": { "location": "path", @@ -965,67 +851,31 @@ "location": "path" }, "updateMask": { - "location": "query", "format": "google-fieldmask", - "description": "Mask that identifies which fields on the course work to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified. If a field supports empty values, it can be cleared\nby specifying it in the update mask and not in the CourseWork object. If a\nfield that does not support empty values is included in the update mask and\nnot set in the CourseWork object, an `INVALID_ARGUMENT` error will be\nreturned.\n\nThe following fields may be specified by teachers:\n* `title`\n* `description`\n* `state`\n* `due_date`\n* `due_time`\n* `max_points`\n* `scheduled_time`\n* `submission_modification_mode`", - "type": "string" - } - }, - "flatPath": "v1/courses/{courseId}/courseWork/{id}", - "id": "classroom.courses.courseWork.patch", - "path": "v1/courses/{courseId}/courseWork/{id}", - "request": { - "$ref": "CourseWork" - }, - "description": "Updates one or more fields of a course work.\n\nSee google.classroom.v1.CourseWork for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", - "response": { - "$ref": "CourseWork" - }, - "parameterOrder": [ - "courseId", - "id" - ], - "httpMethod": "PATCH" - }, - "create": { - "description": "Creates course work.\n\nThe resulting course work (and corresponding student submissions) are\nassociated with the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\nmake the request. Classroom API requests to modify course work and student\nsubmissions must be made with an OAuth client ID from the associated\nDeveloper Console project.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, create course work in the requested course, share a\nDrive attachment, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.\n* `FAILED_PRECONDITION` for the following request error:\n * AttachmentNotVisible", - "request": { - "$ref": "CourseWork" - }, - "response": { - "$ref": "CourseWork" - }, - "parameterOrder": [ - "courseId" - ], - "httpMethod": "POST", - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "description": "Mask that identifies which fields on the course work to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified. If a field supports empty values, it can be cleared\nby specifying it in the update mask and not in the CourseWork object. If a\nfield that does not support empty values is included in the update mask and\nnot set in the CourseWork object, an `INVALID_ARGUMENT` error will be\nreturned.\n\nThe following fields may be specified by teachers:\n\n* `title`\n* `description`\n* `state`\n* `due_date`\n* `due_time`\n* `max_points`\n* `scheduled_time`\n* `submission_modification_mode`", "type": "string", - "required": true + "location": "query" } }, "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.students" - ], - "flatPath": "v1/courses/{courseId}/courseWork", - "id": "classroom.courses.courseWork.create", - "path": "v1/courses/{courseId}/courseWork" + ] }, - "delete": { - "description": "Deletes a course work.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the requesting user is not permitted\nto delete the requested course or for access errors.\n* `FAILED_PRECONDITION` if the requested course work has already been\ndeleted.\n* `NOT_FOUND` if no course exists with the requested ID.", + "get": { + "description": "Returns course work.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist.", "response": { - "$ref": "Empty" + "$ref": "CourseWork" }, "parameterOrder": [ "courseId", "id" ], - "httpMethod": "DELETE", + "httpMethod": "GET", "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.students" + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.me.readonly", + "https://www.googleapis.com/auth/classroom.coursework.students", + "https://www.googleapis.com/auth/classroom.coursework.students.readonly" ], "parameters": { "courseId": { @@ -1035,14 +885,14 @@ "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." }, "id": { + "description": "Identifier of the course work.", "type": "string", "required": true, - "location": "path", - "description": "Identifier of the course work to delete.\nThis identifier is a Classroom-assigned identifier." + "location": "path" } }, "flatPath": "v1/courses/{courseId}/courseWork/{id}", - "id": "classroom.courses.courseWork.delete", + "id": "classroom.courses.courseWork.get", "path": "v1/courses/{courseId}/courseWork/{id}" } }, @@ -1050,15 +900,16 @@ "studentSubmissions": { "methods": { "get": { - "response": { - "$ref": "StudentSubmission" - }, + "description": "Returns a student submission.\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, course work, or student submission or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "httpMethod": "GET", "parameterOrder": [ "courseId", "courseWorkId", "id" ], - "httpMethod": "GET", + "response": { + "$ref": "StudentSubmission" + }, "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.me", "https://www.googleapis.com/auth/classroom.coursework.me.readonly", @@ -1069,16 +920,16 @@ ], "parameters": { "courseWorkId": { + "location": "path", "description": "Identifier of the course work.", "type": "string", - "required": true, - "location": "path" + "required": true }, "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", - "required": true + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." }, "id": { "location": "path", @@ -1088,57 +939,56 @@ } }, "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "id": "classroom.courses.courseWork.studentSubmissions.get", "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "description": "Returns a student submission.\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, course work, or student submission or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." + "id": "classroom.courses.courseWork.studentSubmissions.get" }, "patch": { - "request": { + "response": { "$ref": "StudentSubmission" }, - "description": "Updates one or more fields of a student submission.\n\nSee google.classroom.v1.StudentSubmission for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", - "httpMethod": "PATCH", "parameterOrder": [ "courseId", "courseWorkId", "id" ], - "response": { - "$ref": "StudentSubmission" - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.students" - ], + "httpMethod": "PATCH", "parameters": { + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "type": "string", + "required": true + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Mask that identifies which fields on the student submission to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified.\n\nThe following fields may be specified by teachers:\n\n* `draft_grade`\n* `assigned_grade`", + "type": "string" + }, + "courseWorkId": { + "description": "Identifier of the course work.", + "type": "string", + "required": true, + "location": "path" + }, "courseId": { "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", "required": true, "location": "path" - }, - "id": { - "type": "string", - "required": true, - "location": "path", - "description": "Identifier of the student submission." - }, - "updateMask": { - "format": "google-fieldmask", - "description": "Mask that identifies which fields on the student submission to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified.\n\nThe following fields may be specified by teachers:\n* `draft_grade`\n* `assigned_grade`", - "type": "string", - "location": "query" - }, - "courseWorkId": { - "location": "path", - "description": "Identifier of the course work.", - "type": "string", - "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.students" + ], "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", + "id": "classroom.courses.courseWork.studentSubmissions.patch", "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}", - "id": "classroom.courses.courseWork.studentSubmissions.patch" + "description": "Updates one or more fields of a student submission.\n\nSee google.classroom.v1.StudentSubmission for details\nof which fields may be updated and who may change them.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding course work, if the user is not permitted to make the\nrequested modification to the student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "request": { + "$ref": "StudentSubmission" + } }, "return": { "response": { @@ -1150,57 +1000,9 @@ "id" ], "httpMethod": "POST", - "parameters": { - "courseWorkId": { - "location": "path", - "description": "Identifier of the course work.", - "type": "string", - "required": true - }, - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, - "id": { - "location": "path", - "description": "Identifier of the student submission.", - "type": "string", - "required": true - } - }, "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.students" ], - "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", - "id": "classroom.courses.courseWork.studentSubmissions.return", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", - "description": "Returns a student submission.\n\nReturning a student submission transfers ownership of attached Drive\nfiles to the student and may also update the submission state.\nUnlike the Classroom application, returning a student submission does not\nset assignedGrade to the draftGrade value.\n\nOnly a teacher of the course that contains the requested student submission\nmay call this method.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, return the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", - "request": { - "$ref": "ReturnStudentSubmissionRequest" - } - }, - "reclaim": { - "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", - "id": "classroom.courses.courseWork.studentSubmissions.reclaim", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", - "request": { - "$ref": "ReclaimStudentSubmissionRequest" - }, - "description": "Reclaims a student submission on behalf of the student that owns it.\n\nReclaiming a student submission transfers ownership of attached Drive\nfiles to the student and update the submission state.\n\nOnly the student that owns the requested student submission may call this\nmethod, and only for a student submission that has been turned in.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, unsubmit the requested student submission,\nor for access errors.\n* `FAILED_PRECONDITION` if the student submission has not been turned in.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me" - ], "parameters": { "courseWorkId": { "location": "path", @@ -1215,14 +1017,21 @@ "location": "path" }, "id": { - "location": "path", "description": "Identifier of the student submission.", "type": "string", - "required": true + "required": true, + "location": "path" } - } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", + "id": "classroom.courses.courseWork.studentSubmissions.return", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:return", + "request": { + "$ref": "ReturnStudentSubmissionRequest" + }, + "description": "Returns a student submission.\n\nReturning a student submission transfers ownership of attached Drive\nfiles to the student and may also update the submission state.\nUnlike the Classroom application, returning a student submission does not\nset assignedGrade to the draftGrade value.\n\nOnly a teacher of the course that contains the requested student submission\nmay call this method.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, return the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." }, - "turnIn": { + "reclaim": { "httpMethod": "POST", "parameterOrder": [ "courseId", @@ -1232,6 +1041,47 @@ "response": { "$ref": "Empty" }, + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the student submission." + }, + "courseWorkId": { + "description": "Identifier of the course work.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me" + ], + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:reclaim", + "id": "classroom.courses.courseWork.studentSubmissions.reclaim", + "description": "Reclaims a student submission on behalf of the student that owns it.\n\nReclaiming a student submission transfers ownership of attached Drive\nfiles to the student and update the submission state.\n\nOnly the student that owns the requested student submission may call this\nmethod, and only for a student submission that has been turned in.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, unsubmit the requested student submission,\nor for access errors.\n* `FAILED_PRECONDITION` if the student submission has not been turned in.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "request": { + "$ref": "ReclaimStudentSubmissionRequest" + } + }, + "turnIn": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/classroom.coursework.me" ], @@ -1243,10 +1093,10 @@ "required": true }, "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." }, "id": { "location": "path", @@ -1256,29 +1106,66 @@ } }, "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", "id": "classroom.courses.courseWork.studentSubmissions.turnIn", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:turnIn", "request": { "$ref": "TurnInStudentSubmissionRequest" }, "description": "Turns in a student submission.\n\nTurning in a student submission transfers ownership of attached Drive\nfiles to the teacher and may also update the submission state.\n\nThis may only be called by the student that owns the specified student\nsubmission.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, turn in the requested student submission,\nor for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist." }, - "list": { - "response": { - "$ref": "ListStudentSubmissionsResponse" + "modifyAttachments": { + "request": { + "$ref": "ModifyAttachmentsRequest" }, + "description": "Modifies attachments of student submission.\n\nAttachments may only be added to student submissions belonging to course\nwork objects with a `workType` of `ASSIGNMENT`.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, if the user is not permitted to modify\nattachments on the requested student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", + "response": { + "$ref": "StudentSubmission" + }, + "parameterOrder": [ + "courseId", + "courseWorkId", + "id" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.coursework.me", + "https://www.googleapis.com/auth/classroom.coursework.students" + ], + "parameters": { + "courseWorkId": { + "location": "path", + "description": "Identifier of the course work.", + "type": "string", + "required": true + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "location": "path", + "description": "Identifier of the student submission.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", + "id": "classroom.courses.courseWork.studentSubmissions.modifyAttachments", + "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments" + }, + "list": { + "description": "Returns a list of student submissions that the requester is permitted to\nview, factoring in the OAuth scopes of the request.\n`-` may be specified as the `course_work_id` to include student\nsubmissions for multiple course work items.\n\nCourse students may only view their own work. Course teachers\nand domain administrators may view all student submissions.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.", + "httpMethod": "GET", "parameterOrder": [ "courseId", "courseWorkId" ], - "httpMethod": "GET", + "response": { + "$ref": "ListStudentSubmissionsResponse" + }, "parameters": { - "courseWorkId": { - "description": "Identifier of the student work to request.\nThis may be set to the string literal `\"-\"` to request student work for\nall course work in the specified course.", - "type": "string", - "required": true, - "location": "path" - }, "courseId": { "location": "path", "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", @@ -1296,19 +1183,17 @@ "type": "string" }, "pageToken": { + "location": "query", "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { - "location": "query", "format": "int32", "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", - "type": "integer" + "type": "integer", + "location": "query" }, "states": { - "description": "Requested submission states. If specified, returned student submissions\nmatch one of the specified submission states.", - "type": "string", "repeated": true, "location": "query", "enum": [ @@ -1318,12 +1203,20 @@ "TURNED_IN", "RETURNED", "RECLAIMED_BY_STUDENT" - ] + ], + "description": "Requested submission states. If specified, returned student submissions\nmatch one of the specified submission states.", + "type": "string" }, "userId": { - "location": "query", "description": "Optional argument to restrict returned student work to those owned by the\nstudent with the specified identifier. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string" + "type": "string", + "location": "query" + }, + "courseWorkId": { + "location": "path", + "description": "Identifier of the student work to request.\nThis may be set to the string literal `\"-\"` to request student work for\nall course work in the specified course.", + "type": "string", + "required": true } }, "scopes": [ @@ -1335,51 +1228,8 @@ "https://www.googleapis.com/auth/classroom.student-submissions.students.readonly" ], "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions", - "id": "classroom.courses.courseWork.studentSubmissions.list", "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions", - "description": "Returns a list of student submissions that the requester is permitted to\nview, factoring in the OAuth scopes of the request.\n`-` may be specified as the `course_work_id` to include student\nsubmissions for multiple course work items.\n\nCourse students may only view their own work. Course teachers\nand domain administrators may view all student submissions.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist." - }, - "modifyAttachments": { - "response": { - "$ref": "StudentSubmission" - }, - "parameterOrder": [ - "courseId", - "courseWorkId", - "id" - ], - "httpMethod": "POST", - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - }, - "id": { - "type": "string", - "required": true, - "location": "path", - "description": "Identifier of the student submission." - }, - "courseWorkId": { - "description": "Identifier of the course work.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.coursework.me", - "https://www.googleapis.com/auth/classroom.coursework.students" - ], - "flatPath": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", - "id": "classroom.courses.courseWork.studentSubmissions.modifyAttachments", - "path": "v1/courses/{courseId}/courseWork/{courseWorkId}/studentSubmissions/{id}:modifyAttachments", - "description": "Modifies attachments of student submission.\n\nAttachments may only be added to student submissions belonging to course\nwork objects with a `workType` of `ASSIGNMENT`.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding course work item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work, if the user is not permitted to modify\nattachments on the requested student submission, or for\naccess errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course, course work, or student submission\ndoes not exist.", - "request": { - "$ref": "ModifyAttachmentsRequest" - } + "id": "classroom.courses.courseWork.studentSubmissions.list" } } } @@ -1387,80 +1237,46 @@ }, "teachers": { "methods": { - "create": { - "description": "Creates a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nteachers in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a teacher or student in the\ncourse.", - "request": { - "$ref": "Teacher" - }, - "httpMethod": "POST", - "parameterOrder": [ - "courseId" - ], - "response": { - "$ref": "Teacher" - }, - "parameters": { - "courseId": { - "location": "path", - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters" - ], - "flatPath": "v1/courses/{courseId}/teachers", - "path": "v1/courses/{courseId}/teachers", - "id": "classroom.courses.teachers.create" - }, "delete": { "description": "Deletes a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist.\n* `FAILED_PRECONDITION` if the requested ID belongs to the primary teacher\nof this course.", - "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, "parameterOrder": [ "courseId", "userId" ], - "response": { - "$ref": "Empty" - }, + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], "parameters": { + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + }, "userId": { "description": "Identifier of the teacher to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", "type": "string", "required": true, "location": "path" - }, - "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", - "type": "string", - "required": true, - "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/classroom.rosters" - ], "flatPath": "v1/courses/{courseId}/teachers/{userId}", - "path": "v1/courses/{courseId}/teachers/{userId}", - "id": "classroom.courses.teachers.delete" + "id": "classroom.courses.teachers.delete", + "path": "v1/courses/{courseId}/teachers/{userId}" }, "list": { - "httpMethod": "GET", + "description": "Returns a list of teachers of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors.", "response": { "$ref": "ListTeachersResponse" }, "parameterOrder": [ "courseId" ], - "scopes": [ - "https://www.googleapis.com/auth/classroom.profile.emails", - "https://www.googleapis.com/auth/classroom.profile.photos", - "https://www.googleapis.com/auth/classroom.rosters", - "https://www.googleapis.com/auth/classroom.rosters.readonly" - ], + "httpMethod": "GET", "parameters": { "pageToken": { "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", @@ -1473,6 +1289,66 @@ "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", "type": "integer" }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "flatPath": "v1/courses/{courseId}/teachers", + "id": "classroom.courses.teachers.list", + "path": "v1/courses/{courseId}/teachers" + }, + "get": { + "response": { + "$ref": "Teacher" + }, + "parameterOrder": [ + "courseId", + "userId" + ], + "httpMethod": "GET", + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "userId": { + "location": "path", + "description": "Identifier of the teacher to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "flatPath": "v1/courses/{courseId}/teachers/{userId}", + "id": "classroom.courses.teachers.get", + "path": "v1/courses/{courseId}/teachers/{userId}", + "description": "Returns a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist." + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "courseId" + ], + "response": { + "$ref": "Teacher" + }, + "parameters": { "courseId": { "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", "type": "string", @@ -1480,21 +1356,458 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters" + ], "flatPath": "v1/courses/{courseId}/teachers", "path": "v1/courses/{courseId}/teachers", - "id": "classroom.courses.teachers.list", - "description": "Returns a list of teachers of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors." + "id": "classroom.courses.teachers.create", + "description": "Creates a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nteachers in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * CourseTeacherLimitReached\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a teacher or student in the\ncourse.", + "request": { + "$ref": "Teacher" + } + } + } + }, + "announcements": { + "methods": { + "delete": { + "description": "Deletes an announcement.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding announcement item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding announcement, if the requesting user is not permitted\nto delete the requested course or for access errors.\n* `FAILED_PRECONDITION` if the requested announcement has already been\ndeleted.\n* `NOT_FOUND` if no course exists with the requested ID.", + "httpMethod": "DELETE", + "parameterOrder": [ + "courseId", + "id" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "id": { + "location": "path", + "description": "Identifier of the announcement to delete.\nThis identifier is a Classroom-assigned identifier.", + "type": "string", + "required": true + }, + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.announcements" + ], + "flatPath": "v1/courses/{courseId}/announcements/{id}", + "path": "v1/courses/{courseId}/announcements/{id}", + "id": "classroom.courses.announcements.delete" + }, + "list": { + "flatPath": "v1/courses/{courseId}/announcements", + "id": "classroom.courses.announcements.list", + "path": "v1/courses/{courseId}/announcements", + "description": "Returns a list of announcements that the requester is permitted to view.\n\nCourse students may only view `PUBLISHED` announcements. Course teachers\nand domain administrators may view all announcements.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access\nthe requested course or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.", + "response": { + "$ref": "ListAnnouncementsResponse" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.announcements", + "https://www.googleapis.com/auth/classroom.announcements.readonly" + ], + "parameters": { + "announcementStates": { + "enum": [ + "ANNOUNCEMENT_STATE_UNSPECIFIED", + "PUBLISHED", + "DRAFT", + "DELETED" + ], + "description": "Restriction on the `state` of announcements returned.\nIf this argument is left unspecified, the default value is `PUBLISHED`.", + "type": "string", + "repeated": true, + "location": "query" + }, + "pageToken": { + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + "type": "string", + "location": "query" + }, + "orderBy": { + "location": "query", + "description": "Optional sort ordering for results. A comma-separated list of fields with\nan optional sort direction keyword. Supported field is `updateTime`.\nSupported direction keywords are `asc` and `desc`.\nIf not specified, `updateTime desc` is the default behavior.\nExamples: `updateTime asc`, `updateTime`", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer" + }, + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + } + }, + "create": { + "response": { + "$ref": "Announcement" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/classroom.announcements" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/courses/{courseId}/announcements", + "id": "classroom.courses.announcements.create", + "path": "v1/courses/{courseId}/announcements", + "request": { + "$ref": "Announcement" + }, + "description": "Creates an announcement.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, create announcements in the requested course, share a\nDrive attachment, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.\n* `FAILED_PRECONDITION` for the following request error:\n * AttachmentNotVisible" + }, + "modifyAssignees": { + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "location": "path", + "description": "Identifier of the announcement.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.announcements" + ], + "flatPath": "v1/courses/{courseId}/announcements/{id}:modifyAssignees", + "path": "v1/courses/{courseId}/announcements/{id}:modifyAssignees", + "id": "classroom.courses.announcements.modifyAssignees", + "description": "Modifies assignee mode and options of an announcement.\n\nOnly a teacher of the course that contains the announcement may\ncall this method.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist.", + "request": { + "$ref": "ModifyAnnouncementAssigneesRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "courseId", + "id" + ], + "response": { + "$ref": "Announcement" + } }, "get": { - "description": "Returns a teacher of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nteachers of this course or for access errors.\n* `NOT_FOUND` if no teacher of this course has the requested ID or if the\ncourse does not exist.", + "id": "classroom.courses.announcements.get", + "path": "v1/courses/{courseId}/announcements/{id}", + "description": "Returns an announcement.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or announcement, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or announcement does not exist.", + "response": { + "$ref": "Announcement" + }, + "parameterOrder": [ + "courseId", + "id" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/classroom.announcements", + "https://www.googleapis.com/auth/classroom.announcements.readonly" + ], + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "description": "Identifier of the announcement.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/courses/{courseId}/announcements/{id}" + }, + "patch": { + "response": { + "$ref": "Announcement" + }, + "parameterOrder": [ + "courseId", + "id" + ], + "httpMethod": "PATCH", + "parameters": { + "courseId": { + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + }, + "id": { + "location": "path", + "description": "Identifier of the announcement.", + "type": "string", + "required": true + }, + "updateMask": { + "format": "google-fieldmask", + "description": "Mask that identifies which fields on the announcement to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified. If a field supports empty values, it can be cleared\nby specifying it in the update mask and not in the Announcement object. If\na field that does not support empty values is included in the update mask\nand not set in the Announcement object, an `INVALID_ARGUMENT` error will be\nreturned.\n\nThe following fields may be specified by teachers:\n\n* `text`\n* `state`\n* `scheduled_time`", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.announcements" + ], + "flatPath": "v1/courses/{courseId}/announcements/{id}", + "id": "classroom.courses.announcements.patch", + "path": "v1/courses/{courseId}/announcements/{id}", + "description": "Updates one or more fields of an announcement.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding announcement or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `FAILED_PRECONDITION` if the requested announcement has already been\ndeleted.\n* `NOT_FOUND` if the requested course or announcement does not exist", + "request": { + "$ref": "Announcement" + } + } + } + }, + "aliases": { + "methods": { + "list": { + "description": "Returns a list of aliases for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\ncourse or for access errors.\n* `NOT_FOUND` if the course does not exist.", + "httpMethod": "GET", + "parameterOrder": [ + "courseId" + ], + "response": { + "$ref": "ListCourseAliasesResponse" + }, + "parameters": { + "pageSize": { + "format": "int32", + "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer", + "location": "query" + }, + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "The identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses", + "https://www.googleapis.com/auth/classroom.courses.readonly" + ], + "flatPath": "v1/courses/{courseId}/aliases", + "path": "v1/courses/{courseId}/aliases", + "id": "classroom.courses.aliases.list" + }, + "create": { + "description": "Creates an alias for a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create the\nalias or for access errors.\n* `NOT_FOUND` if the course does not exist.\n* `ALREADY_EXISTS` if the alias already exists.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to access a domain-scoped alias).", + "request": { + "$ref": "CourseAlias" + }, + "response": { + "$ref": "CourseAlias" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "POST", + "parameters": { + "courseId": { + "description": "Identifier of the course to alias.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "flatPath": "v1/courses/{courseId}/aliases", + "id": "classroom.courses.aliases.create", + "path": "v1/courses/{courseId}/aliases" + }, + "delete": { + "description": "Deletes an alias of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to remove the\nalias or for access errors.\n* `NOT_FOUND` if the alias does not exist.\n* `FAILED_PRECONDITION` if the alias requested does not make sense for the\n requesting user or course (for example, if a user not in a domain\n attempts to delete a domain-scoped alias).", + "httpMethod": "DELETE", + "parameterOrder": [ + "courseId", + "alias" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "alias": { + "location": "path", + "description": "Alias to delete.\nThis may not be the Classroom-assigned identifier.", + "type": "string", + "required": true + }, + "courseId": { + "location": "path", + "description": "Identifier of the course whose alias should be deleted.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.courses" + ], + "flatPath": "v1/courses/{courseId}/aliases/{alias}", + "path": "v1/courses/{courseId}/aliases/{alias}", + "id": "classroom.courses.aliases.delete" + } + } + }, + "students": { + "methods": { + "create": { + "request": { + "$ref": "Student" + }, + "description": "Adds a user as a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to create\nstudents in this course or for access errors.\n* `NOT_FOUND` if the requested course ID does not exist.\n* `FAILED_PRECONDITION` if the requested user's account is disabled,\nfor the following request errors:\n * CourseMemberLimitReached\n * CourseNotModifiable\n * UserGroupsMembershipLimitReached\n* `ALREADY_EXISTS` if the user is already a student or teacher in the\ncourse.", + "httpMethod": "POST", + "parameterOrder": [ + "courseId" + ], + "response": { + "$ref": "Student" + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "courseId": { + "description": "Identifier of the course to create the student in.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "type": "string", + "required": true, + "location": "path" + }, + "enrollmentCode": { + "location": "query", + "description": "Enrollment code of the course to create the student in.\nThis code is required if userId\ncorresponds to the requesting user; it may be omitted if the requesting\nuser has administrative permissions to create students for any user.", + "type": "string" + } + }, + "flatPath": "v1/courses/{courseId}/students", + "path": "v1/courses/{courseId}/students", + "id": "classroom.courses.students.create" + }, + "delete": { + "scopes": [ + "https://www.googleapis.com/auth/classroom.rosters" + ], + "parameters": { + "userId": { + "description": "Identifier of the student to delete. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string", + "required": true, + "location": "path" + }, + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + } + }, + "flatPath": "v1/courses/{courseId}/students/{userId}", + "id": "classroom.courses.students.delete", + "path": "v1/courses/{courseId}/students/{userId}", + "description": "Deletes a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to delete\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "courseId", + "userId" + ], + "httpMethod": "DELETE" + }, + "list": { + "description": "Returns a list of students of this course that the requester\nis permitted to view.\n\nThis method returns the following error codes:\n\n* `NOT_FOUND` if the course does not exist.\n* `PERMISSION_DENIED` for access errors.", + "response": { + "$ref": "ListStudentsResponse" + }, + "parameterOrder": [ + "courseId" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "location": "query", + "description": "nextPageToken\nvalue returned from a previous\nlist call, indicating that\nthe subsequent page of results should be returned.\n\nThe list request must be\notherwise identical to the one that resulted in this token.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Maximum number of items to return. Zero means no maximum.\n\nThe server may return fewer than the specified number of results.", + "type": "integer", + "location": "query" + }, + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/classroom.profile.emails", + "https://www.googleapis.com/auth/classroom.profile.photos", + "https://www.googleapis.com/auth/classroom.rosters", + "https://www.googleapis.com/auth/classroom.rosters.readonly" + ], + "flatPath": "v1/courses/{courseId}/students", + "id": "classroom.courses.students.list", + "path": "v1/courses/{courseId}/students" + }, + "get": { + "flatPath": "v1/courses/{courseId}/students/{userId}", + "id": "classroom.courses.students.get", + "path": "v1/courses/{courseId}/students/{userId}", + "description": "Returns a student of a course.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to view\nstudents of this course or for access errors.\n* `NOT_FOUND` if no student of this course has the requested ID or if the\ncourse does not exist.", + "response": { + "$ref": "Student" + }, "httpMethod": "GET", "parameterOrder": [ "courseId", "userId" ], - "response": { - "$ref": "Teacher" - }, "scopes": [ "https://www.googleapis.com/auth/classroom.profile.emails", "https://www.googleapis.com/auth/classroom.profile.photos", @@ -1503,21 +1816,18 @@ ], "parameters": { "userId": { - "location": "path", - "description": "Identifier of the teacher to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string", - "required": true - }, - "courseId": { - "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + "description": "Identifier of the student to return. The identifier can be one of the\nfollowing:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", "type": "string", "required": true, "location": "path" + }, + "courseId": { + "type": "string", + "required": true, + "location": "path", + "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias." } - }, - "flatPath": "v1/courses/{courseId}/teachers/{userId}", - "path": "v1/courses/{courseId}/teachers/{userId}", - "id": "classroom.courses.teachers.get" + } } } } @@ -1525,8 +1835,46 @@ } }, "parameters": { - "alt": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", "type": "string", + "location": "query" + }, + "$.xgafv": { + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format." + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -1539,960 +1887,51 @@ "json", "media", "proto" - ] + ], + "type": "string" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." }, "key": { "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string" }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, "quotaUser": { - "type": "string", "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" }, "pp": { - "description": "Pretty-print response.", "default": "true", "type": "boolean", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" + "location": "query", + "description": "Pretty-print response." }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { + "oauth_token": { "type": "string", "location": "query", - "description": "Selector specifying which fields to include in a partial response." - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" + "description": "OAuth 2.0 token for the current user." } }, "schemas": { - "GradeHistory": { - "description": "The history of each grade on this submission.", - "type": "object", - "properties": { - "actorUserId": { - "description": "The teacher who made the grade change.", - "type": "string" - }, - "gradeChangeType": { - "description": "The type of grade change at this time in the submission grade history.", - "type": "string", - "enumDescriptions": [ - "No grade change type specified. This should never be returned.", - "A change in the numerator of the draft grade.", - "A change in the numerator of the assigned grade.", - "A change in the denominator of the grade." - ], - "enum": [ - "UNKNOWN_GRADE_CHANGE_TYPE", - "DRAFT_GRADE_POINTS_EARNED_CHANGE", - "ASSIGNED_GRADE_POINTS_EARNED_CHANGE", - "MAX_POINTS_CHANGE" - ] - }, - "gradeTimestamp": { - "format": "google-datetime", - "description": "When the grade of the submission was changed.", - "type": "string" - }, - "maxPoints": { - "format": "double", - "description": "The denominator of the grade at this time in the submission grade\nhistory.", - "type": "number" - }, - "pointsEarned": { - "format": "double", - "description": "The numerator of the grade at this time in the submission grade history.", - "type": "number" - } - }, - "id": "GradeHistory" - }, - "ReclaimStudentSubmissionRequest": { - "description": "Request to reclaim a student submission.", - "type": "object", - "properties": {}, - "id": "ReclaimStudentSubmissionRequest" - }, - "AssignmentSubmission": { - "description": "Student work for an assignment.", - "type": "object", - "properties": { - "attachments": { - "description": "Attachments added by the student.\nDrive files that correspond to materials with a share mode of\nSTUDENT_COPY may not exist yet if the student has not accessed the\nassignment in Classroom.\n\nSome attachment metadata is only populated if the requesting user has\npermission to access it. Identifier and alternate_link fields are always\navailable, but others (e.g. title) may not be.", - "items": { - "$ref": "Attachment" - }, - "type": "array" - } - }, - "id": "AssignmentSubmission" - }, - "Material": { - "id": "Material", - "description": "Material attached to course work.\n\nWhen creating attachments, setting the `form` field is not supported.", - "type": "object", - "properties": { - "driveFile": { - "description": "Google Drive file material.", - "$ref": "SharedDriveFile" - }, - "form": { - "$ref": "Form", - "description": "Google Forms material." - }, - "link": { - "description": "Link material. On creation, will be upgraded to a more appropriate type\nif possible, and this will be reflected in the response.", - "$ref": "Link" - }, - "youtubeVideo": { - "description": "YouTube video material.", - "$ref": "YouTubeVideo" - } - } - }, - "CourseWork": { - "id": "CourseWork", - "description": "Course work created by a teacher for students of the course.", - "type": "object", - "properties": { - "dueTime": { - "$ref": "TimeOfDay", - "description": "Optional time of day, in UTC, that submissions for this this course work\nare due.\nThis must be specified if `due_date` is specified." - }, - "title": { - "description": "Title of this course work.\nThe title must be a valid UTF-8 string containing between 1 and 3000\ncharacters.", - "type": "string" - }, - "materials": { - "description": "Additional materials.\n\nCourseWork must have no more than 20 material items.", - "items": { - "$ref": "Material" - }, - "type": "array" - }, - "associatedWithDeveloper": { - "description": "Whether this course work item is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only.", - "type": "boolean" - }, - "updateTime": { - "format": "google-datetime", - "description": "Timestamp of the most recent change to this course work.\n\nRead-only.", - "type": "string" - }, - "alternateLink": { - "description": "Absolute link to this course work in the Classroom web UI.\nThis is only populated if `state` is `PUBLISHED`.\n\nRead-only.", - "type": "string" - }, - "maxPoints": { - "format": "double", - "description": "Maximum grade for this course work.\nIf zero or unspecified, this assignment is considered ungraded.\nThis must be a non-negative integer value.", - "type": "number" - }, - "assignment": { - "description": "Assignment details.\nThis is populated only when `work_type` is `ASSIGNMENT`.\n\nRead-only.", - "$ref": "Assignment" - }, - "multipleChoiceQuestion": { - "description": "Multiple choice question details.\nFor read operations, this field is populated only when `work_type` is\n`MULTIPLE_CHOICE_QUESTION`.\nFor write operations, this field must be specified when creating course\nwork with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be\nset otherwise.", - "$ref": "MultipleChoiceQuestion" - }, - "workType": { - "enum": [ - "COURSE_WORK_TYPE_UNSPECIFIED", - "ASSIGNMENT", - "SHORT_ANSWER_QUESTION", - "MULTIPLE_CHOICE_QUESTION" - ], - "description": "Type of this course work.\n\nThe type is set when the course work is created and cannot be changed.", - "type": "string", - "enumDescriptions": [ - "No work type specified. This is never returned.", - "An assignment.", - "A short answer question.", - "A multiple-choice question." - ] - }, - "description": { - "description": "Optional description of this course work.\nIf set, the description must be a valid UTF-8 string containing no more\nthan 30,000 characters.", - "type": "string" - }, - "scheduledTime": { - "format": "google-datetime", - "description": "Optional timestamp when this course work is scheduled to be published.", - "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "Timestamp when this course work was created.\n\nRead-only.", - "type": "string" - }, - "dueDate": { - "description": "Optional date, in UTC, that submissions for this this course work are due.\nThis must be specified if `due_time` is specified.", - "$ref": "Date" - }, - "state": { - "enumDescriptions": [ - "No state specified. This is never returned.", - "Status for work that has been published.\nThis is the default state.", - "Status for work that is not yet published.\nWork in this state is visible only to course teachers and domain\nadministrators.", - "Status for work that was published but is now deleted.\nWork in this state is visible only to course teachers and domain\nadministrators.\nWork in this state is deleted after some time." - ], - "enum": [ - "COURSE_WORK_STATE_UNSPECIFIED", - "PUBLISHED", - "DRAFT", - "DELETED" - ], - "description": "Status of this course work.\nIf unspecified, the default state is `DRAFT`.", - "type": "string" - }, - "submissionModificationMode": { - "enumDescriptions": [ - "No modification mode specified. This is never returned.", - "Submisisons can be modified before being turned in.", - "Submisisons can be modified at any time." - ], - "enum": [ - "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED", - "MODIFIABLE_UNTIL_TURNED_IN", - "MODIFIABLE" - ], - "description": "Setting to determine when students are allowed to modify submissions.\nIf unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.", - "type": "string" - }, - "courseId": { - "description": "Identifier of the course.\n\nRead-only.", - "type": "string" - }, - "id": { - "description": "Classroom-assigned identifier of this course work, unique per course.\n\nRead-only.", - "type": "string" - } - } - }, - "Guardian": { - "id": "Guardian", - "description": "Association between a student and a guardian of that student. The guardian\nmay receive information about the student's course work.", - "type": "object", - "properties": { - "invitedEmailAddress": { - "description": "The email address to which the initial guardian invitation was sent.\nThis field is only visible to domain administrators.", - "type": "string" - }, - "guardianId": { - "description": "Identifier for the guardian.", - "type": "string" - }, - "guardianProfile": { - "$ref": "UserProfile", - "description": "User profile for the guardian." - }, - "studentId": { - "type": "string", - "description": "Identifier for the student to whom the guardian relationship applies." - } - } - }, - "UserProfile": { - "description": "Global information for a user.", - "type": "object", - "properties": { - "emailAddress": { - "description": "Email address of the user.\n\nRead-only.", - "type": "string" - }, - "photoUrl": { - "description": "URL of user's profile photo.\n\nRead-only.", - "type": "string" - }, - "permissions": { - "description": "Global permissions of the user.\n\nRead-only.", - "items": { - "$ref": "GlobalPermission" - }, - "type": "array" - }, - "name": { - "$ref": "Name", - "description": "Name of the user.\n\nRead-only." - }, - "id": { - "description": "Identifier of the user.\n\nRead-only.", - "type": "string" - }, - "verifiedTeacher": { - "description": "Represents whether a G Suite for Education user's domain administrator has\nexplicitly verified them as being a teacher. If the user is not a member of\na G Suite for Education domain, than this field will always be false.\n\nRead-only", - "type": "boolean" - } - }, - "id": "UserProfile" - }, - "ListStudentsResponse": { - "description": "Response when listing students.", - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." - }, - "students": { - "description": "Students who match the list request.", - "items": { - "$ref": "Student" - }, - "type": "array" - } - }, - "id": "ListStudentsResponse" - }, - "Student": { - "type": "object", - "properties": { - "userId": { - "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string" - }, - "courseId": { - "description": "Identifier of the course.\n\nRead-only.", - "type": "string" - }, - "studentWorkFolder": { - "description": "Information about a Drive Folder for this student's work in this course.\nOnly visible to the student and domain administrators.\n\nRead-only.", - "$ref": "DriveFolder" - }, - "profile": { - "description": "Global user information for the student.\n\nRead-only.", - "$ref": "UserProfile" - } - }, - "id": "Student", - "description": "Student in a course." - }, - "Invitation": { - "id": "Invitation", - "description": "An invitation to join a course.", - "type": "object", - "properties": { - "courseId": { - "description": "Identifier of the course to invite the user to.", - "type": "string" - }, - "id": { - "description": "Identifier assigned by Classroom.\n\nRead-only.", - "type": "string" - }, - "role": { - "enumDescriptions": [ - "No course role.", - "Student in the course.", - "Teacher of the course.", - "Owner of the course." - ], - "enum": [ - "COURSE_ROLE_UNSPECIFIED", - "STUDENT", - "TEACHER", - "OWNER" - ], - "description": "Role to invite the user to have.\nMust not be `COURSE_ROLE_UNSPECIFIED`.", - "type": "string" - }, - "userId": { - "description": "Identifier of the invited user.\n\nWhen specified as a parameter of a request, this identifier can be set to\none of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", - "type": "string" - } - } - }, - "DriveFolder": { - "id": "DriveFolder", - "description": "Representation of a Google Drive folder.", - "type": "object", - "properties": { - "id": { - "description": "Drive API resource ID.", - "type": "string" - }, - "title": { - "description": "Title of the Drive folder.\n\nRead-only.", - "type": "string" - }, - "alternateLink": { - "type": "string", - "description": "URL that can be used to access the Drive folder.\n\nRead-only." - } - } - }, - "SubmissionHistory": { - "description": "The history of the submission. This currently includes state and grade\nhistories.", - "type": "object", - "properties": { - "gradeHistory": { - "$ref": "GradeHistory", - "description": "The grade history information of the submission, if present." - }, - "stateHistory": { - "description": "The state history information of the submission, if present.", - "$ref": "StateHistory" - } - }, - "id": "SubmissionHistory" - }, - "ShortAnswerSubmission": { - "description": "Student work for a short answer question.", - "type": "object", - "properties": { - "answer": { - "description": "Student response to a short-answer question.", - "type": "string" - } - }, - "id": "ShortAnswerSubmission" - }, - "TurnInStudentSubmissionRequest": { - "description": "Request to turn in a student submission.", - "type": "object", - "properties": {}, - "id": "TurnInStudentSubmissionRequest" - }, - "ListStudentSubmissionsResponse": { - "description": "Response when listing student submissions.", - "type": "object", - "properties": { - "studentSubmissions": { - "description": "Student work that matches the request.", - "items": { - "$ref": "StudentSubmission" - }, - "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." - } - }, - "id": "ListStudentSubmissionsResponse" - }, - "StudentSubmission": { - "description": "Student submission for course work.\n\nStudentSubmission items are generated when a CourseWork item is created.\n\nStudentSubmissions that have never been accessed (i.e. with `state` = NEW)\nmay not have a creation time or update time.", - "type": "object", - "properties": { - "shortAnswerSubmission": { - "description": "Submission content when course_work_type is SHORT_ANSWER_QUESTION.", - "$ref": "ShortAnswerSubmission" - }, - "associatedWithDeveloper": { - "description": "Whether this student submission is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only.", - "type": "boolean" - }, - "updateTime": { - "format": "google-datetime", - "description": "Last update time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only.", - "type": "string" - }, - "alternateLink": { - "description": "Absolute link to the submission in the Classroom web UI.\n\nRead-only.", - "type": "string" - }, - "late": { - "description": "Whether this submission is late.\n\nRead-only.", - "type": "boolean" - }, - "draftGrade": { - "format": "double", - "description": "Optional pending grade. If unset, no grade was set.\nThis value must be non-negative. Decimal (i.e. non-integer) values are\nallowed, but will be rounded to two decimal places.\n\nThis is only visible to and modifiable by course teachers.", - "type": "number" - }, - "courseWorkType": { - "enumDescriptions": [ - "No work type specified. This is never returned.", - "An assignment.", - "A short answer question.", - "A multiple-choice question." - ], - "enum": [ - "COURSE_WORK_TYPE_UNSPECIFIED", - "ASSIGNMENT", - "SHORT_ANSWER_QUESTION", - "MULTIPLE_CHOICE_QUESTION" - ], - "description": "Type of course work this submission is for.\n\nRead-only.", - "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "Creation time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only.", - "type": "string" - }, - "state": { - "enumDescriptions": [ - "No state specified. This should never be returned.", - "The student has never accessed this submission. Attachments are not\nreturned and timestamps is not set.", - "Has been created.", - "Has been turned in to the teacher.", - "Has been returned to the student.", - "Student chose to \"unsubmit\" the assignment." - ], - "enum": [ - "SUBMISSION_STATE_UNSPECIFIED", - "NEW", - "CREATED", - "TURNED_IN", - "RETURNED", - "RECLAIMED_BY_STUDENT" - ], - "description": "State of this submission.\n\nRead-only.", - "type": "string" - }, - "userId": { - "description": "Identifier for the student that owns this submission.\n\nRead-only.", - "type": "string" - }, - "courseWorkId": { - "description": "Identifier for the course work this corresponds to.\n\nRead-only.", - "type": "string" - }, - "courseId": { - "description": "Identifier of the course.\n\nRead-only.", - "type": "string" - }, - "id": { - "type": "string", - "description": "Classroom-assigned Identifier for the student submission.\nThis is unique among submissions for the relevant course work.\n\nRead-only." - }, - "submissionHistory": { - "description": "The history of the submission (includes state and grade histories).\n\nRead-only.", - "items": { - "$ref": "SubmissionHistory" - }, - "type": "array" - }, - "assignedGrade": { - "format": "double", - "description": "Optional grade. If unset, no grade was set.\nThis value must be non-negative. Decimal (i.e. non-integer) values are\nallowed, but will be rounded to two decimal places.\n\nThis may be modified only by course teachers.", - "type": "number" - }, - "multipleChoiceSubmission": { - "$ref": "MultipleChoiceSubmission", - "description": "Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION." - }, - "assignmentSubmission": { - "description": "Submission content when course_work_type is ASSIGNMENT .", - "$ref": "AssignmentSubmission" - } - }, - "id": "StudentSubmission" - }, - "ModifyAttachmentsRequest": { - "description": "Request to modify the attachments of a student submission.", - "type": "object", - "properties": { - "addAttachments": { - "description": "Attachments to add.\nA student submission may not have more than 20 attachments.\n\nForm attachments are not supported.", - "items": { - "$ref": "Attachment" - }, - "type": "array" - } - }, - "id": "ModifyAttachmentsRequest" - }, - "ListCourseWorkResponse": { - "description": "Response when listing course work.", - "type": "object", - "properties": { - "courseWork": { - "description": "Course work items that match the request.", - "items": { - "$ref": "CourseWork" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - } - }, - "id": "ListCourseWorkResponse" - }, - "YouTubeVideo": { - "id": "YouTubeVideo", - "description": "YouTube video item.", - "type": "object", - "properties": { - "thumbnailUrl": { - "description": "URL of a thumbnail image of the YouTube video.\n\nRead-only.", - "type": "string" - }, - "id": { - "type": "string", - "description": "YouTube API resource ID." - }, - "title": { - "description": "Title of the YouTube video.\n\nRead-only.", - "type": "string" - }, - "alternateLink": { - "description": "URL that can be used to view the YouTube video.\n\nRead-only.", - "type": "string" - } - } - }, - "ListInvitationsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "type": "string", - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available." - }, - "invitations": { - "description": "Invitations that match the list request.", - "items": { - "$ref": "Invitation" - }, - "type": "array" - } - }, - "id": "ListInvitationsResponse", - "description": "Response when listing invitations." - }, - "GuardianInvitation": { - "description": "An invitation to become the guardian of a specified user, sent to a specified\nemail address.", - "type": "object", - "properties": { - "invitationId": { - "description": "Unique identifier for this invitation.\n\nRead-only.", - "type": "string" - }, - "state": { - "enumDescriptions": [ - "Should never be returned.", - "The invitation is active and awaiting a response.", - "The invitation is no longer active. It may have been accepted, declined,\nwithdrawn or it may have expired." - ], - "enum": [ - "GUARDIAN_INVITATION_STATE_UNSPECIFIED", - "PENDING", - "COMPLETE" - ], - "description": "The state that this invitation is in.", - "type": "string" - }, - "studentId": { - "description": "ID of the student (in standard format)", - "type": "string" - }, - "invitedEmailAddress": { - "description": "Email address that the invitation was sent to.\nThis field is only visible to domain administrators.", - "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "The time that this invitation was created.\n\nRead-only.", - "type": "string" - } - }, - "id": "GuardianInvitation" - }, - "Attachment": { - "id": "Attachment", - "description": "Attachment added to student assignment work.\n\nWhen creating attachments, setting the `form` field is not supported.", - "type": "object", - "properties": { - "link": { - "$ref": "Link", - "description": "Link attachment." - }, - "youTubeVideo": { - "$ref": "YouTubeVideo", - "description": "Youtube video attachment." - }, - "driveFile": { - "$ref": "DriveFile", - "description": "Google Drive file attachment." - }, - "form": { - "description": "Google Forms attachment.", - "$ref": "Form" - } - } - }, - "StateHistory": { - "description": "The history of each state this submission has been in.", - "type": "object", - "properties": { - "state": { - "enumDescriptions": [ - "No state specified. This should never be returned.", - "The Submission has been created.", - "The student has turned in an assigned document, which may or may not be\na template.", - "The teacher has returned the assigned document to the student.", - "The student turned in the assigned document, and then chose to\n\"unsubmit\" the assignment, giving the student control again as the\nowner.", - "The student edited their submission after turning it in. Currently,\nonly used by Questions, when the student edits their answer." - ], - "enum": [ - "STATE_UNSPECIFIED", - "CREATED", - "TURNED_IN", - "RETURNED", - "RECLAIMED_BY_STUDENT", - "STUDENT_EDITED_AFTER_TURN_IN" - ], - "description": "The workflow pipeline stage.", - "type": "string" - }, - "stateTimestamp": { - "format": "google-datetime", - "description": "When the submission entered this state.", - "type": "string" - }, - "actorUserId": { - "description": "The teacher or student who made the change", - "type": "string" - } - }, - "id": "StateHistory" - }, - "CourseMaterialSet": { - "properties": { - "materials": { - "description": "Materials attached to this set.", - "items": { - "$ref": "CourseMaterial" - }, - "type": "array" - }, - "title": { - "type": "string", - "description": "Title for this set." - } - }, - "id": "CourseMaterialSet", - "description": "A set of materials that appears on the \"About\" page of the course.\nThese materials might include a syllabus, schedule, or other background\ninformation relating to the course as a whole.", - "type": "object" - }, - "TimeOfDay": { - "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", - "type": "object", - "properties": { - "hours": { - "type": "integer", - "format": "int32", - "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time." - }, - "nanos": { - "format": "int32", - "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", - "type": "integer" - }, - "seconds": { - "format": "int32", - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", - "type": "integer" - }, - "minutes": { - "format": "int32", - "description": "Minutes of hour of day. Must be from 0 to 59.", - "type": "integer" - } - }, - "id": "TimeOfDay" - }, - "ListCoursesResponse": { - "description": "Response when listing courses.", - "type": "object", - "properties": { - "courses": { - "description": "Courses that match the list request.", - "items": { - "$ref": "Course" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - } - }, - "id": "ListCoursesResponse" - }, - "Form": { - "id": "Form", - "description": "Google Forms item.", - "type": "object", - "properties": { - "formUrl": { - "description": "URL of the form.", - "type": "string" - }, - "title": { - "description": "Title of the Form.\n\nRead-only.", - "type": "string" - }, - "thumbnailUrl": { - "type": "string", - "description": "URL of a thumbnail image of the Form.\n\nRead-only." - }, - "responseUrl": { - "description": "URL of the form responses document.\nOnly set if respsonses have been recorded and only when the\nrequesting user is an editor of the form.\n\nRead-only.", - "type": "string" - } - } - }, - "ListTeachersResponse": { - "id": "ListTeachersResponse", - "description": "Response when listing teachers.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - }, - "teachers": { - "description": "Teachers who match the list request.", - "items": { - "$ref": "Teacher" - }, - "type": "array" - } - } - }, - "Link": { - "description": "URL item.", - "type": "object", - "properties": { - "thumbnailUrl": { - "description": "URL of a thumbnail image of the target URL.\n\nRead-only.", - "type": "string" - }, - "url": { - "type": "string", - "description": "URL to link to.\nThis must be a valid UTF-8 string containing between 1 and 2024 characters." - }, - "title": { - "description": "Title of the target of the URL.\n\nRead-only.", - "type": "string" - } - }, - "id": "Link" - }, - "ListGuardiansResponse": { - "description": "Response when listing guardians.", - "type": "object", - "properties": { - "guardians": { - "description": "Guardians on this page of results that met the criteria specified in\nthe request.", - "items": { - "$ref": "Guardian" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - } - }, - "id": "ListGuardiansResponse" - }, - "ListGuardianInvitationsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - }, - "guardianInvitations": { - "description": "Guardian invitations that matched the list request.", - "items": { - "$ref": "GuardianInvitation" - }, - "type": "array" - } - }, - "id": "ListGuardianInvitationsResponse", - "description": "Response when listing guardian invitations." - }, - "ListCourseAliasesResponse": { - "description": "Response when listing course aliases.", - "type": "object", - "properties": { - "aliases": { - "description": "The course aliases.", - "items": { - "$ref": "CourseAlias" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", - "type": "string" - } - }, - "id": "ListCourseAliasesResponse" - }, - "CourseAlias": { - "type": "object", - "properties": { - "alias": { - "description": "Alias string. The format of the string indicates the desired alias scoping.\n\n* `d:\u003cname\u003e` indicates a domain-scoped alias.\n Example: `d:math_101`\n* `p:\u003cname\u003e` indicates a project-scoped alias.\n Example: `p:abc123`\n\nThis field has a maximum length of 256 characters.", - "type": "string" - } - }, - "id": "CourseAlias", - "description": "Alternative identifier for a course.\n\nAn alias uniquely identifies a course. It must be unique within one of the\nfollowing scopes:\n\n* domain: A domain-scoped alias is visible to all users within the alias\ncreator's domain and can be created only by a domain admin. A domain-scoped\nalias is often used when a course has an identifier external to Classroom.\n\n* project: A project-scoped alias is visible to any request from an\napplication using the Developer Console project ID that created the alias\nand can be created by any project. A project-scoped alias is often used when\nan application has alternative identifiers. A random value can also be used\nto avoid duplicate courses in the event of transmission failures, as retrying\na request will return `ALREADY_EXISTS` if a previous one has succeeded." - }, "Date": { - "id": "Date", "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", "type": "object", "properties": { + "month": { + "format": "int32", + "description": "Month of year. Must be from 1 to 12.", + "type": "integer" + }, "day": { "format": "int32", "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", @@ -2502,47 +1941,9 @@ "format": "int32", "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", "type": "integer" - }, - "month": { - "format": "int32", - "description": "Month of year. Must be from 1 to 12.", - "type": "integer" - } - } - }, - "MultipleChoiceSubmission": { - "description": "Student work for a multiple-choice question.", - "type": "object", - "properties": { - "answer": { - "description": "Student's select choice.", - "type": "string" } }, - "id": "MultipleChoiceSubmission" - }, - "CourseMaterial": { - "description": "A material attached to a course as part of a material set.", - "type": "object", - "properties": { - "form": { - "$ref": "Form", - "description": "Google Forms attachment." - }, - "link": { - "description": "Link atatchment.", - "$ref": "Link" - }, - "youTubeVideo": { - "description": "Youtube video attachment.", - "$ref": "YouTubeVideo" - }, - "driveFile": { - "$ref": "DriveFile", - "description": "Google Drive file attachment." - } - }, - "id": "CourseMaterial" + "id": "Date" }, "Name": { "description": "Details of the user's name.", @@ -2575,11 +1976,8 @@ "id": "Assignment" }, "SharedDriveFile": { - "description": "Drive file that is used as material for course work.", - "type": "object", "properties": { "shareMode": { - "type": "string", "enumDescriptions": [ "No sharing mode specified. This should never be returned.", "Students can view the shared file.", @@ -2592,22 +1990,546 @@ "EDIT", "STUDENT_COPY" ], - "description": "Mechanism by which students access the Drive item." + "description": "Mechanism by which students access the Drive item.", + "type": "string" }, "driveFile": { - "description": "Drive file details.", - "$ref": "DriveFile" + "$ref": "DriveFile", + "description": "Drive file details." } }, - "id": "SharedDriveFile" + "id": "SharedDriveFile", + "description": "Drive file that is used as material for course work.", + "type": "object" }, "Empty": { - "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", "type": "object", - "properties": {} + "properties": {}, + "id": "Empty" + }, + "ModifyAnnouncementAssigneesRequest": { + "id": "ModifyAnnouncementAssigneesRequest", + "description": "Request to modify assignee mode and options of an announcement.", + "type": "object", + "properties": { + "assigneeMode": { + "enum": [ + "ASSIGNEE_MODE_UNSPECIFIED", + "ALL_STUDENTS", + "INDIVIDUAL_STUDENTS" + ], + "description": "Mode of the announcement describing whether it will be accessible by all\nstudents or specified individual students.", + "type": "string", + "enumDescriptions": [ + "No mode specified. This is never returned.", + "All students can see the item.\nThis is the default state.", + "A subset of the students can see the item." + ] + }, + "modifyIndividualStudentsOptions": { + "$ref": "ModifyIndividualStudentsOptions", + "description": "Set which students can view or cannot view the announcement.\nMust be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`." + } + } + }, + "GlobalPermission": { + "properties": { + "permission": { + "description": "Permission value.", + "type": "string", + "enumDescriptions": [ + "No permission is specified. This is not returned and is not a\nvalid value.", + "User is permitted to create a course." + ], + "enum": [ + "PERMISSION_UNSPECIFIED", + "CREATE_COURSE" + ] + } + }, + "id": "GlobalPermission", + "description": "Global user permission description.", + "type": "object" + }, + "Teacher": { + "description": "Teacher of a course.", + "type": "object", + "properties": { + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" + }, + "profile": { + "$ref": "UserProfile", + "description": "Global user information for the teacher.\n\nRead-only." + }, + "userId": { + "type": "string", + "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user" + } + }, + "id": "Teacher" + }, + "GradeHistory": { + "description": "The history of each grade on this submission.", + "type": "object", + "properties": { + "actorUserId": { + "type": "string", + "description": "The teacher who made the grade change." + }, + "gradeChangeType": { + "enumDescriptions": [ + "No grade change type specified. This should never be returned.", + "A change in the numerator of the draft grade.", + "A change in the numerator of the assigned grade.", + "A change in the denominator of the grade." + ], + "enum": [ + "UNKNOWN_GRADE_CHANGE_TYPE", + "DRAFT_GRADE_POINTS_EARNED_CHANGE", + "ASSIGNED_GRADE_POINTS_EARNED_CHANGE", + "MAX_POINTS_CHANGE" + ], + "description": "The type of grade change at this time in the submission grade history.", + "type": "string" + }, + "gradeTimestamp": { + "format": "google-datetime", + "description": "When the grade of the submission was changed.", + "type": "string" + }, + "maxPoints": { + "format": "double", + "description": "The denominator of the grade at this time in the submission grade\nhistory.", + "type": "number" + }, + "pointsEarned": { + "format": "double", + "description": "The numerator of the grade at this time in the submission grade history.", + "type": "number" + } + }, + "id": "GradeHistory" + }, + "AssignmentSubmission": { + "description": "Student work for an assignment.", + "type": "object", + "properties": { + "attachments": { + "items": { + "$ref": "Attachment" + }, + "type": "array", + "description": "Attachments added by the student.\nDrive files that correspond to materials with a share mode of\nSTUDENT_COPY may not exist yet if the student has not accessed the\nassignment in Classroom.\n\nSome attachment metadata is only populated if the requesting user has\npermission to access it. Identifier and alternate_link fields are always\navailable, but others (e.g. title) may not be." + } + }, + "id": "AssignmentSubmission" + }, + "Material": { + "description": "Material attached to course work.\n\nWhen creating attachments, setting the `form` field is not supported.", + "type": "object", + "properties": { + "link": { + "$ref": "Link", + "description": "Link material. On creation, will be upgraded to a more appropriate type\nif possible, and this will be reflected in the response." + }, + "youtubeVideo": { + "$ref": "YouTubeVideo", + "description": "YouTube video material." + }, + "driveFile": { + "description": "Google Drive file material.", + "$ref": "SharedDriveFile" + }, + "form": { + "$ref": "Form", + "description": "Google Forms material." + } + }, + "id": "Material" + }, + "Feed": { + "properties": { + "courseRosterChangesInfo": { + "description": "Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`.\nThis field must be specified if `feed_type` is `COURSE_ROSTER_CHANGES`.", + "$ref": "CourseRosterChangesInfo" + }, + "feedType": { + "type": "string", + "enumDescriptions": [ + "Should never be returned or provided.", + "All roster changes for a particular domain.\n\nNotifications will be generated whenever a user joins or leaves a course.\n\nNo notifications will be generated when an invitation is created or\ndeleted, but notifications will be generated when a user joins a course\nby accepting an invitation.", + "All roster changes for a particular course.\n\nNotifications will be generated whenever a user joins or leaves a course.\n\nNo notifications will be generated when an invitation is created or\ndeleted, but notifications will be generated when a user joins a course\nby accepting an invitation." + ], + "enum": [ + "FEED_TYPE_UNSPECIFIED", + "DOMAIN_ROSTER_CHANGES", + "COURSE_ROSTER_CHANGES" + ], + "description": "The type of feed." + } + }, + "id": "Feed", + "description": "A class of notifications that an application can register to receive.\nFor example: \"all roster changes for a domain\".", + "type": "object" + }, + "Student": { + "description": "Student in a course.", + "type": "object", + "properties": { + "studentWorkFolder": { + "$ref": "DriveFolder", + "description": "Information about a Drive Folder for this student's work in this course.\nOnly visible to the student and domain administrators.\n\nRead-only." + }, + "profile": { + "description": "Global user information for the student.\n\nRead-only.", + "$ref": "UserProfile" + }, + "userId": { + "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" + } + }, + "id": "Student" + }, + "Invitation": { + "description": "An invitation to join a course.", + "type": "object", + "properties": { + "id": { + "description": "Identifier assigned by Classroom.\n\nRead-only.", + "type": "string" + }, + "role": { + "enum": [ + "COURSE_ROLE_UNSPECIFIED", + "STUDENT", + "TEACHER", + "OWNER" + ], + "description": "Role to invite the user to have.\nMust not be `COURSE_ROLE_UNSPECIFIED`.", + "type": "string", + "enumDescriptions": [ + "No course role.", + "Student in the course.", + "Teacher of the course.", + "Owner of the course." + ] + }, + "userId": { + "description": "Identifier of the invited user.\n\nWhen specified as a parameter of a request, this identifier can be set to\none of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "type": "string" + }, + "courseId": { + "description": "Identifier of the course to invite the user to.", + "type": "string" + } + }, + "id": "Invitation" + }, + "TurnInStudentSubmissionRequest": { + "properties": {}, + "id": "TurnInStudentSubmissionRequest", + "description": "Request to turn in a student submission.", + "type": "object" + }, + "ListCourseWorkResponse": { + "description": "Response when listing course work.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "courseWork": { + "description": "Course work items that match the request.", + "items": { + "$ref": "CourseWork" + }, + "type": "array" + } + }, + "id": "ListCourseWorkResponse" + }, + "Attachment": { + "description": "Attachment added to student assignment work.\n\nWhen creating attachments, setting the `form` field is not supported.", + "type": "object", + "properties": { + "youTubeVideo": { + "$ref": "YouTubeVideo", + "description": "Youtube video attachment." + }, + "driveFile": { + "description": "Google Drive file attachment.", + "$ref": "DriveFile" + }, + "form": { + "$ref": "Form", + "description": "Google Forms attachment." + }, + "link": { + "$ref": "Link", + "description": "Link attachment." + } + }, + "id": "Attachment" + }, + "ListAnnouncementsResponse": { + "description": "Response when listing course work.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "announcements": { + "description": "Announcement items that match the request.", + "items": { + "$ref": "Announcement" + }, + "type": "array" + } + }, + "id": "ListAnnouncementsResponse" + }, + "TimeOfDay": { + "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "hours": { + "format": "int32", + "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", + "type": "integer" + }, + "nanos": { + "format": "int32", + "description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", + "type": "integer" + }, + "seconds": { + "type": "integer", + "format": "int32", + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds." + }, + "minutes": { + "format": "int32", + "description": "Minutes of hour of day. Must be from 0 to 59.", + "type": "integer" + } + }, + "id": "TimeOfDay" + }, + "ListCoursesResponse": { + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "courses": { + "description": "Courses that match the list request.", + "items": { + "$ref": "Course" + }, + "type": "array" + } + }, + "id": "ListCoursesResponse", + "description": "Response when listing courses.", + "type": "object" + }, + "Form": { + "id": "Form", + "description": "Google Forms item.", + "type": "object", + "properties": { + "formUrl": { + "description": "URL of the form.", + "type": "string" + }, + "title": { + "type": "string", + "description": "Title of the Form.\n\nRead-only." + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the Form.\n\nRead-only.", + "type": "string" + }, + "responseUrl": { + "description": "URL of the form responses document.\nOnly set if respsonses have been recorded and only when the\nrequesting user is an editor of the form.\n\nRead-only.", + "type": "string" + } + } + }, + "ModifyCourseWorkAssigneesRequest": { + "id": "ModifyCourseWorkAssigneesRequest", + "description": "Request to modify assignee mode and options of a coursework.", + "type": "object", + "properties": { + "assigneeMode": { + "description": "Mode of the coursework describing whether it will be assigned to all\nstudents or specified individual students.", + "type": "string", + "enumDescriptions": [ + "No mode specified. This is never returned.", + "All students can see the item.\nThis is the default state.", + "A subset of the students can see the item." + ], + "enum": [ + "ASSIGNEE_MODE_UNSPECIFIED", + "ALL_STUDENTS", + "INDIVIDUAL_STUDENTS" + ] + }, + "modifyIndividualStudentsOptions": { + "$ref": "ModifyIndividualStudentsOptions", + "description": "Set which students are assigned or not assigned to the coursework.\nMust be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`." + } + } + }, + "ListGuardiansResponse": { + "description": "Response when listing guardians.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "guardians": { + "description": "Guardians on this page of results that met the criteria specified in\nthe request.", + "items": { + "$ref": "Guardian" + }, + "type": "array" + } + }, + "id": "ListGuardiansResponse" + }, + "CourseAlias": { + "description": "Alternative identifier for a course.\n\nAn alias uniquely identifies a course. It must be unique within one of the\nfollowing scopes:\n\n* domain: A domain-scoped alias is visible to all users within the alias\ncreator's domain and can be created only by a domain admin. A domain-scoped\nalias is often used when a course has an identifier external to Classroom.\n\n* project: A project-scoped alias is visible to any request from an\napplication using the Developer Console project ID that created the alias\nand can be created by any project. A project-scoped alias is often used when\nan application has alternative identifiers. A random value can also be used\nto avoid duplicate courses in the event of transmission failures, as retrying\na request will return `ALREADY_EXISTS` if a previous one has succeeded.", + "type": "object", + "properties": { + "alias": { + "description": "Alias string. The format of the string indicates the desired alias scoping.\n\n* `d:\u003cname\u003e` indicates a domain-scoped alias.\n Example: `d:math_101`\n* `p:\u003cname\u003e` indicates a project-scoped alias.\n Example: `p:abc123`\n\nThis field has a maximum length of 256 characters.", + "type": "string" + } + }, + "id": "CourseAlias" + }, + "ListCourseAliasesResponse": { + "description": "Response when listing course aliases.", + "type": "object", + "properties": { + "aliases": { + "items": { + "$ref": "CourseAlias" + }, + "type": "array", + "description": "The course aliases." + }, + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + } + }, + "id": "ListCourseAliasesResponse" + }, + "ListGuardianInvitationsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "guardianInvitations": { + "items": { + "$ref": "GuardianInvitation" + }, + "type": "array", + "description": "Guardian invitations that matched the list request." + } + }, + "id": "ListGuardianInvitationsResponse", + "description": "Response when listing guardian invitations." + }, + "IndividualStudentsOptions": { + "description": "Assignee details about a coursework/announcement.\nThis field is set if and only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.", + "type": "object", + "properties": { + "studentIds": { + "description": "Identifiers for the students that have access to the\ncoursework/announcement.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "IndividualStudentsOptions" + }, + "MultipleChoiceSubmission": { + "description": "Student work for a multiple-choice question.", + "type": "object", + "properties": { + "answer": { + "description": "Student's select choice.", + "type": "string" + } + }, + "id": "MultipleChoiceSubmission" + }, + "Registration": { + "description": "An instruction to Classroom to send notifications from the `feed` to the\nprovided `destination`.", + "type": "object", + "properties": { + "feed": { + "description": "Specification for the class of notifications that Classroom should deliver\nto the `destination`.", + "$ref": "Feed" + }, + "registrationId": { + "description": "A server-generated unique identifier for this `Registration`.\n\nRead-only.", + "type": "string" + }, + "expiryTime": { + "format": "google-datetime", + "description": "The time until which the `Registration` is effective.\n\nThis is a read-only field assigned by the server.", + "type": "string" + }, + "cloudPubsubTopic": { + "$ref": "CloudPubsubTopic", + "description": "The Cloud Pub/Sub topic that notifications are to be sent to." + } + }, + "id": "Registration" + }, + "CourseMaterial": { + "type": "object", + "properties": { + "form": { + "$ref": "Form", + "description": "Google Forms attachment." + }, + "link": { + "description": "Link atatchment.", + "$ref": "Link" + }, + "youTubeVideo": { + "$ref": "YouTubeVideo", + "description": "Youtube video attachment." + }, + "driveFile": { + "$ref": "DriveFile", + "description": "Google Drive file attachment." + } + }, + "id": "CourseMaterial", + "description": "A material attached to a course as part of a material set." }, "MultipleChoiceQuestion": { + "id": "MultipleChoiceQuestion", "description": "Additional details for multiple-choice questions.", "type": "object", "properties": { @@ -2618,59 +2540,26 @@ }, "type": "array" } - }, - "id": "MultipleChoiceQuestion" + } }, "Course": { "properties": { - "courseState": { - "enumDescriptions": [ - "No course state. No returned Course message will use this value.", - "The course is active.", - "The course has been archived. You cannot modify it except to change it\nto a different state.", - "The course has been created, but not yet activated. It is accessible by\nthe primary teacher and domain administrators, who may modify it or\nchange it to the `ACTIVE` or `DECLINED` states.\nA course may only be changed to `PROVISIONED` if it is in the `DECLINED`\nstate.", - "The course has been created, but declined. It is accessible by the\ncourse owner and domain administrators, though it will not be\ndisplayed in the web UI. You cannot modify the course except to change it\nto the `PROVISIONED` state.\nA course may only be changed to `DECLINED` if it is in the `PROVISIONED`\nstate.", - "The course has been suspended. You cannot modify the course, and only the\nuser identified by the `owner_id` can view the course.\nA course may be placed in this state if it potentially violates the\nTerms of Service." - ], - "enum": [ - "COURSE_STATE_UNSPECIFIED", - "ACTIVE", - "ARCHIVED", - "PROVISIONED", - "DECLINED", - "SUSPENDED" - ], - "description": "State of the course.\nIf unspecified, the default state is `PROVISIONED`.", - "type": "string" - }, - "ownerId": { - "description": "The identifier of the owner of a course.\n\nWhen specified as a parameter of a\ncreate course request, this\nfield is required.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n\nThis must be set in a create request. Admins can also specify this field\nin a patch course request to\ntransfer ownership. In other contexts, it is read-only.", - "type": "string" - }, - "description": { - "description": "Optional description.\nFor example, \"We'll be learning about the structure of living\ncreatures from a combination of textbooks, guest lectures, and lab work.\nExpect to be excited!\"\nIf set, this field must be a valid UTF-8 string and no longer than 30,000\ncharacters.", - "type": "string" - }, - "teacherGroupEmail": { - "description": "The email address of a Google group containing all teachers of the course.\nThis group does not accept email and can only be used for permissions.\n\nRead-only.", - "type": "string" - }, "creationTime": { + "type": "string", "format": "google-datetime", - "description": "Creation time of the course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only.", + "description": "Creation time of the course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only." + }, + "name": { + "description": "Name of the course.\nFor example, \"10th Grade Biology\".\nThe name is required. It must be between 1 and 750 characters and a valid\nUTF-8 string.", "type": "string" }, "teacherFolder": { "$ref": "DriveFolder", "description": "Information about a Drive Folder that is shared with all teachers of the\ncourse.\n\nThis field will only be set for teachers of the course and domain administrators.\n\nRead-only." }, - "name": { - "description": "Name of the course.\nFor example, \"10th Grade Biology\".\nThe name is required. It must be between 1 and 750 characters and a valid\nUTF-8 string.", - "type": "string" - }, "section": { - "type": "string", - "description": "Section of the course.\nFor example, \"Period 2\".\nIf set, this field must be a valid UTF-8 string and no longer than 2800\ncharacters." + "description": "Section of the course.\nFor example, \"Period 2\".\nIf set, this field must be a valid UTF-8 string and no longer than 2800\ncharacters.", + "type": "string" }, "id": { "description": "Identifier for this course assigned by Classroom.\n\nWhen\ncreating a course,\nyou may optionally set this identifier to an\nalias string in the\nrequest to create a corresponding alias. The `id` is still assigned by\nClassroom and cannot be updated after the course is created.\n\nSpecifying this field in a course update mask results in an error.", @@ -2700,9 +2589,9 @@ "type": "string" }, "updateTime": { + "type": "string", "format": "google-datetime", - "description": "Time of the most recent update to this course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only.", - "type": "string" + "description": "Time of the most recent update to this course.\nSpecifying this field in a course update mask results in an error.\n\nRead-only." }, "calendarId": { "description": "The Calendar ID for a calendar that all course members can see, to which\nClassroom adds events for course work and announcements in the course.\n\nRead-only.", @@ -2715,6 +2604,38 @@ "guardiansEnabled": { "description": "Whether or not guardian notifications are enabled for this course.\n\nRead-only.", "type": "boolean" + }, + "ownerId": { + "type": "string", + "description": "The identifier of the owner of a course.\n\nWhen specified as a parameter of a\ncreate course request, this\nfield is required.\nThe identifier can be one of the following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user\n\nThis must be set in a create request. Admins can also specify this field\nin a patch course request to\ntransfer ownership. In other contexts, it is read-only." + }, + "courseState": { + "enumDescriptions": [ + "No course state. No returned Course message will use this value.", + "The course is active.", + "The course has been archived. You cannot modify it except to change it\nto a different state.", + "The course has been created, but not yet activated. It is accessible by\nthe primary teacher and domain administrators, who may modify it or\nchange it to the `ACTIVE` or `DECLINED` states.\nA course may only be changed to `PROVISIONED` if it is in the `DECLINED`\nstate.", + "The course has been created, but declined. It is accessible by the\ncourse owner and domain administrators, though it will not be\ndisplayed in the web UI. You cannot modify the course except to change it\nto the `PROVISIONED` state.\nA course may only be changed to `DECLINED` if it is in the `PROVISIONED`\nstate.", + "The course has been suspended. You cannot modify the course, and only the\nuser identified by the `owner_id` can view the course.\nA course may be placed in this state if it potentially violates the\nTerms of Service." + ], + "enum": [ + "COURSE_STATE_UNSPECIFIED", + "ACTIVE", + "ARCHIVED", + "PROVISIONED", + "DECLINED", + "SUSPENDED" + ], + "description": "State of the course.\nIf unspecified, the default state is `PROVISIONED`.", + "type": "string" + }, + "description": { + "description": "Optional description.\nFor example, \"We'll be learning about the structure of living\ncreatures from a combination of textbooks, guest lectures, and lab work.\nExpect to be excited!\"\nIf set, this field must be a valid UTF-8 string and no longer than 30,000\ncharacters.", + "type": "string" + }, + "teacherGroupEmail": { + "description": "The email address of a Google group containing all teachers of the course.\nThis group does not accept email and can only be used for permissions.\n\nRead-only.", + "type": "string" } }, "id": "Course", @@ -2725,10 +2646,6 @@ "description": "Representation of a Google Drive file.", "type": "object", "properties": { - "title": { - "description": "Title of the Drive item.\n\nRead-only.", - "type": "string" - }, "alternateLink": { "description": "URL that can be used to access the Drive item.\n\nRead-only.", "type": "string" @@ -2738,70 +2655,739 @@ "type": "string" }, "id": { - "description": "Drive API resource ID.", + "type": "string", + "description": "Drive API resource ID." + }, + "title": { + "description": "Title of the Drive item.\n\nRead-only.", "type": "string" } }, "id": "DriveFile" }, "ReturnStudentSubmissionRequest": { - "id": "ReturnStudentSubmissionRequest", "description": "Request to return a student submission.", "type": "object", - "properties": {} + "properties": {}, + "id": "ReturnStudentSubmissionRequest" }, - "GlobalPermission": { - "properties": { - "permission": { - "description": "Permission value.", - "type": "string", - "enumDescriptions": [ - "No permission is specified. This is not returned and is not a\nvalid value.", - "User is permitted to create a course." - ], - "enum": [ - "PERMISSION_UNSPECIFIED", - "CREATE_COURSE" - ] - } - }, - "id": "GlobalPermission", - "description": "Global user permission description.", + "ReclaimStudentSubmissionRequest": { + "properties": {}, + "id": "ReclaimStudentSubmissionRequest", + "description": "Request to reclaim a student submission.", "type": "object" }, - "Teacher": { - "description": "Teacher of a course.", + "CourseRosterChangesInfo": { + "description": "Information about a `Feed` with a `feed_type` of `COURSE_ROSTER_CHANGES`.", "type": "object", "properties": { - "profile": { - "$ref": "UserProfile", - "description": "Global user information for the teacher.\n\nRead-only." + "courseId": { + "description": "The `course_id` of the course to subscribe to roster changes for.", + "type": "string" + } + }, + "id": "CourseRosterChangesInfo" + }, + "CourseWork": { + "description": "Course work created by a teacher for students of the course.", + "type": "object", + "properties": { + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" }, - "userId": { - "description": "Identifier of the user.\n\nWhen specified as a parameter of a request, this identifier can be one of\nthe following:\n\n* the numeric identifier for the user\n* the email address of the user\n* the string literal `\"me\"`, indicating the requesting user", + "id": { + "description": "Classroom-assigned identifier of this course work, unique per course.\n\nRead-only.", + "type": "string" + }, + "dueTime": { + "$ref": "TimeOfDay", + "description": "Optional time of day, in UTC, that submissions for this this course work\nare due.\nThis must be specified if `due_date` is specified." + }, + "title": { + "description": "Title of this course work.\nThe title must be a valid UTF-8 string containing between 1 and 3000\ncharacters.", + "type": "string" + }, + "associatedWithDeveloper": { + "type": "boolean", + "description": "Whether this course work item is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only." + }, + "materials": { + "description": "Additional materials.\n\nCourseWork must have no more than 20 material items.", + "items": { + "$ref": "Material" + }, + "type": "array" + }, + "updateTime": { + "type": "string", + "format": "google-datetime", + "description": "Timestamp of the most recent change to this course work.\n\nRead-only." + }, + "assigneeMode": { + "type": "string", + "enumDescriptions": [ + "No mode specified. This is never returned.", + "All students can see the item.\nThis is the default state.", + "A subset of the students can see the item." + ], + "enum": [ + "ASSIGNEE_MODE_UNSPECIFIED", + "ALL_STUDENTS", + "INDIVIDUAL_STUDENTS" + ], + "description": "Assignee mode of the coursework.\nIf unspecified, the default value is `ALL_STUDENTS`." + }, + "alternateLink": { + "description": "Absolute link to this course work in the Classroom web UI.\nThis is only populated if `state` is `PUBLISHED`.\n\nRead-only.", + "type": "string" + }, + "maxPoints": { + "type": "number", + "format": "double", + "description": "Maximum grade for this course work.\nIf zero or unspecified, this assignment is considered ungraded.\nThis must be a non-negative integer value." + }, + "workType": { + "description": "Type of this course work.\n\nThe type is set when the course work is created and cannot be changed.", + "type": "string", + "enumDescriptions": [ + "No work type specified. This is never returned.", + "An assignment.", + "A short answer question.", + "A multiple-choice question." + ], + "enum": [ + "COURSE_WORK_TYPE_UNSPECIFIED", + "ASSIGNMENT", + "SHORT_ANSWER_QUESTION", + "MULTIPLE_CHOICE_QUESTION" + ] + }, + "assignment": { + "$ref": "Assignment", + "description": "Assignment details.\nThis is populated only when `work_type` is `ASSIGNMENT`.\n\nRead-only." + }, + "multipleChoiceQuestion": { + "description": "Multiple choice question details.\nFor read operations, this field is populated only when `work_type` is\n`MULTIPLE_CHOICE_QUESTION`.\nFor write operations, this field must be specified when creating course\nwork with a `work_type` of `MULTIPLE_CHOICE_QUESTION`, and it must not be\nset otherwise.", + "$ref": "MultipleChoiceQuestion" + }, + "description": { + "description": "Optional description of this course work.\nIf set, the description must be a valid UTF-8 string containing no more\nthan 30,000 characters.", + "type": "string" + }, + "scheduledTime": { + "format": "google-datetime", + "description": "Optional timestamp when this course work is scheduled to be published.", + "type": "string" + }, + "creationTime": { + "format": "google-datetime", + "description": "Timestamp when this course work was created.\n\nRead-only.", + "type": "string" + }, + "dueDate": { + "$ref": "Date", + "description": "Optional date, in UTC, that submissions for this this course work are due.\nThis must be specified if `due_time` is specified." + }, + "individualStudentsOptions": { + "description": "Identifiers of students with access to the coursework.\nThis field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.\nIf the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students\nspecified in this field will be assigned the coursework.", + "$ref": "IndividualStudentsOptions" + }, + "creatorUserId": { + "description": "Identifier for the user that created the coursework.\n\nRead-only.", + "type": "string" + }, + "state": { + "description": "Status of this course work.\nIf unspecified, the default state is `DRAFT`.", + "type": "string", + "enumDescriptions": [ + "No state specified. This is never returned.", + "Status for work that has been published.\nThis is the default state.", + "Status for work that is not yet published.\nWork in this state is visible only to course teachers and domain\nadministrators.", + "Status for work that was published but is now deleted.\nWork in this state is visible only to course teachers and domain\nadministrators.\nWork in this state is deleted after some time." + ], + "enum": [ + "COURSE_WORK_STATE_UNSPECIFIED", + "PUBLISHED", + "DRAFT", + "DELETED" + ] + }, + "submissionModificationMode": { + "enumDescriptions": [ + "No modification mode specified. This is never returned.", + "Submisisons can be modified before being turned in.", + "Submisisons can be modified at any time." + ], + "enum": [ + "SUBMISSION_MODIFICATION_MODE_UNSPECIFIED", + "MODIFIABLE_UNTIL_TURNED_IN", + "MODIFIABLE" + ], + "description": "Setting to determine when students are allowed to modify submissions.\nIf unspecified, the default value is `MODIFIABLE_UNTIL_TURNED_IN`.", + "type": "string" + } + }, + "id": "CourseWork" + }, + "Guardian": { + "id": "Guardian", + "description": "Association between a student and a guardian of that student. The guardian\nmay receive information about the student's course work.", + "type": "object", + "properties": { + "invitedEmailAddress": { + "description": "The email address to which the initial guardian invitation was sent.\nThis field is only visible to domain administrators.", + "type": "string" + }, + "guardianId": { + "description": "Identifier for the guardian.", + "type": "string" + }, + "guardianProfile": { + "$ref": "UserProfile", + "description": "User profile for the guardian." + }, + "studentId": { + "description": "Identifier for the student to whom the guardian relationship applies.", + "type": "string" + } + } + }, + "UserProfile": { + "type": "object", + "properties": { + "name": { + "description": "Name of the user.\n\nRead-only.", + "$ref": "Name" + }, + "id": { + "description": "Identifier of the user.\n\nRead-only.", + "type": "string" + }, + "verifiedTeacher": { + "description": "Represents whether a G Suite for Education user's domain administrator has\nexplicitly verified them as being a teacher. If the user is not a member of\na G Suite for Education domain, than this field will always be false.\n\nRead-only", + "type": "boolean" + }, + "emailAddress": { + "description": "Email address of the user.\n\nRead-only.", + "type": "string" + }, + "photoUrl": { + "description": "URL of user's profile photo.\n\nRead-only.", + "type": "string" + }, + "permissions": { + "description": "Global permissions of the user.\n\nRead-only.", + "items": { + "$ref": "GlobalPermission" + }, + "type": "array" + } + }, + "id": "UserProfile", + "description": "Global information for a user." + }, + "ListStudentsResponse": { + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "students": { + "items": { + "$ref": "Student" + }, + "type": "array", + "description": "Students who match the list request." + } + }, + "id": "ListStudentsResponse", + "description": "Response when listing students.", + "type": "object" + }, + "Announcement": { + "description": "Announcement created by a teacher for students of the course", + "type": "object", + "properties": { + "text": { + "description": "Description of this announcement.\nThe text must be a valid UTF-8 string containing no more\nthan 30,000 characters.", "type": "string" }, "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" + }, + "id": { + "description": "Classroom-assigned identifier of this announcement, unique per course.\n\nRead-only.", + "type": "string" + }, + "materials": { + "description": "Additional materials.\n\nAnnouncements must have no more than 20 material items.", + "items": { + "$ref": "Material" + }, + "type": "array" + }, + "updateTime": { + "format": "google-datetime", + "description": "Timestamp of the most recent change to this announcement.\n\nRead-only.", + "type": "string" + }, + "alternateLink": { + "description": "Absolute link to this announcement in the Classroom web UI.\nThis is only populated if `state` is `PUBLISHED`.\n\nRead-only.", + "type": "string" + }, + "assigneeMode": { + "enumDescriptions": [ + "No mode specified. This is never returned.", + "All students can see the item.\nThis is the default state.", + "A subset of the students can see the item." + ], + "enum": [ + "ASSIGNEE_MODE_UNSPECIFIED", + "ALL_STUDENTS", + "INDIVIDUAL_STUDENTS" + ], + "description": "Assignee mode of the announcement.\nIf unspecified, the default value is `ALL_STUDENTS`.", + "type": "string" + }, + "scheduledTime": { + "format": "google-datetime", + "description": "Optional timestamp when this announcement is scheduled to be published.", + "type": "string" + }, + "creationTime": { + "format": "google-datetime", + "description": "Timestamp when this announcement was created.\n\nRead-only.", + "type": "string" + }, + "individualStudentsOptions": { + "$ref": "IndividualStudentsOptions", + "description": "Identifiers of students with access to the announcement.\nThis field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`.\nIf the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students specified in this\nfield will be able to see the announcement." + }, + "creatorUserId": { + "description": "Identifier for the user that created the announcement.\n\nRead-only.", + "type": "string" + }, + "state": { + "enum": [ + "ANNOUNCEMENT_STATE_UNSPECIFIED", + "PUBLISHED", + "DRAFT", + "DELETED" + ], + "description": "Status of this announcement.\nIf unspecified, the default state is `DRAFT`.", "type": "string", - "description": "Identifier of the course.\n\nRead-only." + "enumDescriptions": [ + "No state specified. This is never returned.", + "Status for announcement that has been published.\nThis is the default state.", + "Status for an announcement that is not yet published.\nAnnouncement in this state is visible only to course teachers and domain\nadministrators.", + "Status for announcement that was published but is now deleted.\nAnnouncement in this state is visible only to course teachers and domain\nadministrators.\nAnnouncement in this state is deleted after some time." + ] } }, - "id": "Teacher" + "id": "Announcement" + }, + "ModifyIndividualStudentsOptions": { + "description": "Contains fields to add or remove students from a course work or announcement\nwhere the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`.", + "type": "object", + "properties": { + "addStudentIds": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Ids of students to be added as having access to this\ncoursework/announcement." + }, + "removeStudentIds": { + "description": "Ids of students to be removed from having access to this\ncoursework/announcement.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "ModifyIndividualStudentsOptions" + }, + "DriveFolder": { + "description": "Representation of a Google Drive folder.", + "type": "object", + "properties": { + "title": { + "description": "Title of the Drive folder.\n\nRead-only.", + "type": "string" + }, + "alternateLink": { + "description": "URL that can be used to access the Drive folder.\n\nRead-only.", + "type": "string" + }, + "id": { + "description": "Drive API resource ID.", + "type": "string" + } + }, + "id": "DriveFolder" + }, + "SubmissionHistory": { + "description": "The history of the submission. This currently includes state and grade\nhistories.", + "type": "object", + "properties": { + "gradeHistory": { + "$ref": "GradeHistory", + "description": "The grade history information of the submission, if present." + }, + "stateHistory": { + "$ref": "StateHistory", + "description": "The state history information of the submission, if present." + } + }, + "id": "SubmissionHistory" + }, + "ShortAnswerSubmission": { + "description": "Student work for a short answer question.", + "type": "object", + "properties": { + "answer": { + "description": "Student response to a short-answer question.", + "type": "string" + } + }, + "id": "ShortAnswerSubmission" + }, + "StudentSubmission": { + "description": "Student submission for course work.\n\nStudentSubmission items are generated when a CourseWork item is created.\n\nStudentSubmissions that have never been accessed (i.e. with `state` = NEW)\nmay not have a creation time or update time.", + "type": "object", + "properties": { + "assignedGrade": { + "format": "double", + "description": "Optional grade. If unset, no grade was set.\nThis value must be non-negative. Decimal (i.e. non-integer) values are\nallowed, but will be rounded to two decimal places.\n\nThis may be modified only by course teachers.", + "type": "number" + }, + "multipleChoiceSubmission": { + "description": "Submission content when course_work_type is MULTIPLE_CHOICE_QUESTION.", + "$ref": "MultipleChoiceSubmission" + }, + "assignmentSubmission": { + "$ref": "AssignmentSubmission", + "description": "Submission content when course_work_type is ASSIGNMENT.\n\nStudents can modify this content using\ngoogle.classroom.Work.ModifyAttachments." + }, + "shortAnswerSubmission": { + "$ref": "ShortAnswerSubmission", + "description": "Submission content when course_work_type is SHORT_ANSWER_QUESTION." + }, + "associatedWithDeveloper": { + "description": "Whether this student submission is associated with the Developer Console\nproject making the request.\n\nSee google.classroom.Work.CreateCourseWork for more\ndetails.\n\nRead-only.", + "type": "boolean" + }, + "updateTime": { + "format": "google-datetime", + "description": "Last update time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only.", + "type": "string" + }, + "alternateLink": { + "description": "Absolute link to the submission in the Classroom web UI.\n\nRead-only.", + "type": "string" + }, + "late": { + "description": "Whether this submission is late.\n\nRead-only.", + "type": "boolean" + }, + "draftGrade": { + "format": "double", + "description": "Optional pending grade. If unset, no grade was set.\nThis value must be non-negative. Decimal (i.e. non-integer) values are\nallowed, but will be rounded to two decimal places.\n\nThis is only visible to and modifiable by course teachers.", + "type": "number" + }, + "courseWorkType": { + "enum": [ + "COURSE_WORK_TYPE_UNSPECIFIED", + "ASSIGNMENT", + "SHORT_ANSWER_QUESTION", + "MULTIPLE_CHOICE_QUESTION" + ], + "description": "Type of course work this submission is for.\n\nRead-only.", + "type": "string", + "enumDescriptions": [ + "No work type specified. This is never returned.", + "An assignment.", + "A short answer question.", + "A multiple-choice question." + ] + }, + "creationTime": { + "format": "google-datetime", + "description": "Creation time of this submission.\nThis may be unset if the student has not accessed this item.\n\nRead-only.", + "type": "string" + }, + "state": { + "enum": [ + "SUBMISSION_STATE_UNSPECIFIED", + "NEW", + "CREATED", + "TURNED_IN", + "RETURNED", + "RECLAIMED_BY_STUDENT" + ], + "description": "State of this submission.\n\nRead-only.", + "type": "string", + "enumDescriptions": [ + "No state specified. This should never be returned.", + "The student has never accessed this submission. Attachments are not\nreturned and timestamps is not set.", + "Has been created.", + "Has been turned in to the teacher.", + "Has been returned to the student.", + "Student chose to \"unsubmit\" the assignment." + ] + }, + "userId": { + "description": "Identifier for the student that owns this submission.\n\nRead-only.", + "type": "string" + }, + "courseWorkId": { + "description": "Identifier for the course work this corresponds to.\n\nRead-only.", + "type": "string" + }, + "courseId": { + "description": "Identifier of the course.\n\nRead-only.", + "type": "string" + }, + "id": { + "description": "Classroom-assigned Identifier for the student submission.\nThis is unique among submissions for the relevant course work.\n\nRead-only.", + "type": "string" + }, + "submissionHistory": { + "description": "The history of the submission (includes state and grade histories).\n\nRead-only.", + "items": { + "$ref": "SubmissionHistory" + }, + "type": "array" + } + }, + "id": "StudentSubmission" + }, + "ListStudentSubmissionsResponse": { + "description": "Response when listing student submissions.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "studentSubmissions": { + "description": "Student work that matches the request.", + "items": { + "$ref": "StudentSubmission" + }, + "type": "array" + } + }, + "id": "ListStudentSubmissionsResponse" + }, + "ModifyAttachmentsRequest": { + "description": "Request to modify the attachments of a student submission.", + "type": "object", + "properties": { + "addAttachments": { + "description": "Attachments to add.\nA student submission may not have more than 20 attachments.\n\nForm attachments are not supported.", + "items": { + "$ref": "Attachment" + }, + "type": "array" + } + }, + "id": "ModifyAttachmentsRequest" + }, + "YouTubeVideo": { + "properties": { + "id": { + "description": "YouTube API resource ID.", + "type": "string" + }, + "title": { + "description": "Title of the YouTube video.\n\nRead-only.", + "type": "string" + }, + "alternateLink": { + "description": "URL that can be used to view the YouTube video.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the YouTube video.\n\nRead-only.", + "type": "string" + } + }, + "id": "YouTubeVideo", + "description": "YouTube video item.", + "type": "object" + }, + "ListInvitationsResponse": { + "description": "Response when listing invitations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "invitations": { + "description": "Invitations that match the list request.", + "items": { + "$ref": "Invitation" + }, + "type": "array" + } + }, + "id": "ListInvitationsResponse" + }, + "CloudPubsubTopic": { + "description": "A reference to a Cloud Pub/Sub topic.\n\nTo register for notifications, the owner of the topic must grant\n`classroom-notifications@system.gserviceaccount.com` the\n `projects.topics.publish` permission.", + "type": "object", + "properties": { + "topicName": { + "description": "The `name` field of a Cloud Pub/Sub\n[Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics#Topic).", + "type": "string" + } + }, + "id": "CloudPubsubTopic" + }, + "GuardianInvitation": { + "type": "object", + "properties": { + "invitedEmailAddress": { + "description": "Email address that the invitation was sent to.\nThis field is only visible to domain administrators.", + "type": "string" + }, + "creationTime": { + "format": "google-datetime", + "description": "The time that this invitation was created.\n\nRead-only.", + "type": "string" + }, + "invitationId": { + "description": "Unique identifier for this invitation.\n\nRead-only.", + "type": "string" + }, + "state": { + "enum": [ + "GUARDIAN_INVITATION_STATE_UNSPECIFIED", + "PENDING", + "COMPLETE" + ], + "description": "The state that this invitation is in.", + "type": "string", + "enumDescriptions": [ + "Should never be returned.", + "The invitation is active and awaiting a response.", + "The invitation is no longer active. It may have been accepted, declined,\nwithdrawn or it may have expired." + ] + }, + "studentId": { + "type": "string", + "description": "ID of the student (in standard format)" + } + }, + "id": "GuardianInvitation", + "description": "An invitation to become the guardian of a specified user, sent to a specified\nemail address." + }, + "StateHistory": { + "description": "The history of each state this submission has been in.", + "type": "object", + "properties": { + "state": { + "description": "The workflow pipeline stage.", + "type": "string", + "enumDescriptions": [ + "No state specified. This should never be returned.", + "The Submission has been created.", + "The student has turned in an assigned document, which may or may not be\na template.", + "The teacher has returned the assigned document to the student.", + "The student turned in the assigned document, and then chose to\n\"unsubmit\" the assignment, giving the student control again as the\nowner.", + "The student edited their submission after turning it in. Currently,\nonly used by Questions, when the student edits their answer." + ], + "enum": [ + "STATE_UNSPECIFIED", + "CREATED", + "TURNED_IN", + "RETURNED", + "RECLAIMED_BY_STUDENT", + "STUDENT_EDITED_AFTER_TURN_IN" + ] + }, + "stateTimestamp": { + "format": "google-datetime", + "description": "When the submission entered this state.", + "type": "string" + }, + "actorUserId": { + "description": "The teacher or student who made the change", + "type": "string" + } + }, + "id": "StateHistory" + }, + "CourseMaterialSet": { + "description": "A set of materials that appears on the \"About\" page of the course.\nThese materials might include a syllabus, schedule, or other background\ninformation relating to the course as a whole.", + "type": "object", + "properties": { + "materials": { + "description": "Materials attached to this set.", + "items": { + "$ref": "CourseMaterial" + }, + "type": "array" + }, + "title": { + "description": "Title for this set.", + "type": "string" + } + }, + "id": "CourseMaterialSet" + }, + "ListTeachersResponse": { + "description": "Response when listing teachers.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token identifying the next page of results to return. If empty, no further\nresults are available.", + "type": "string" + }, + "teachers": { + "description": "Teachers who match the list request.", + "items": { + "$ref": "Teacher" + }, + "type": "array" + } + }, + "id": "ListTeachersResponse" + }, + "Link": { + "description": "URL item.", + "type": "object", + "properties": { + "title": { + "description": "Title of the target of the URL.\n\nRead-only.", + "type": "string" + }, + "thumbnailUrl": { + "description": "URL of a thumbnail image of the target URL.\n\nRead-only.", + "type": "string" + }, + "url": { + "description": "URL to link to.\nThis must be a valid UTF-8 string containing between 1 and 2024 characters.", + "type": "string" + } + }, + "id": "Link" } }, "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "version": "v1", "baseUrl": "https://classroom.googleapis.com/", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/classroom.coursework.me": { - "description": "Manage your course work and view your grades in Google Classroom" - }, "https://www.googleapis.com/auth/classroom.rosters": { "description": "Manage your Google Classroom class rosters" }, @@ -2817,45 +3403,47 @@ "https://www.googleapis.com/auth/classroom.courses.readonly": { "description": "View your Google Classroom classes" }, + "https://www.googleapis.com/auth/classroom.announcements": { + "description": "View and manage announcements in Google Classroom" + }, "https://www.googleapis.com/auth/classroom.rosters.readonly": { "description": "View your Google Classroom class rosters" }, "https://www.googleapis.com/auth/classroom.profile.photos": { "description": "View the profile photos of people in your classes" }, + "https://www.googleapis.com/auth/classroom.announcements.readonly": { + "description": "View announcements in Google Classroom" + }, "https://www.googleapis.com/auth/classroom.guardianlinks.students": { "description": "View and manage guardians for students in your Google Classroom classes" }, "https://www.googleapis.com/auth/classroom.student-submissions.me.readonly": { "description": "View your course work and grades in Google Classroom" }, - "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly": { - "description": "View your Google Classroom guardians" + "https://www.googleapis.com/auth/classroom.coursework.students": { + "description": "Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer" }, "https://www.googleapis.com/auth/classroom.coursework.students.readonly": { "description": "View course work and grades for students in the Google Classroom classes you teach or administer" }, - "https://www.googleapis.com/auth/classroom.coursework.students": { - "description": "Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer" + "https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly": { + "description": "View your Google Classroom guardians" }, "https://www.googleapis.com/auth/classroom.coursework.me.readonly": { "description": "View your course work and grades in Google Classroom" }, "https://www.googleapis.com/auth/classroom.profile.emails": { "description": "View the email addresses of people in your classes" + }, + "https://www.googleapis.com/auth/classroom.coursework.me": { + "description": "Manage your course work and view your grades in Google Classroom" } } } }, - "description": "Manages classes, rosters, and invitations in Google Classroom.", "servicePath": "", + "description": "Manages classes, rosters, and invitations in Google Classroom.", "kind": "discovery#restDescription", - "rootUrl": "https://classroom.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "classroom", - "batchPath": "batch", - "id": "classroom:v1", - "documentationLink": "https://developers.google.com/classroom/", - "revision": "20170919" + "rootUrl": "https://classroom.googleapis.com/" } diff --git a/vendor/google.golang.org/api/classroom/v1/classroom-gen.go b/vendor/google.golang.org/api/classroom/v1/classroom-gen.go index 0d12012c8..b7a7959e9 100644 --- a/vendor/google.golang.org/api/classroom/v1/classroom-gen.go +++ b/vendor/google.golang.org/api/classroom/v1/classroom-gen.go @@ -47,6 +47,12 @@ const basePath = "https://classroom.googleapis.com/" // OAuth2 scopes used by this API. const ( + // View and manage announcements in Google Classroom + ClassroomAnnouncementsScope = "https://www.googleapis.com/auth/classroom.announcements" + + // View announcements in Google Classroom + ClassroomAnnouncementsReadonlyScope = "https://www.googleapis.com/auth/classroom.announcements.readonly" + // Manage your Google Classroom classes ClassroomCoursesScope = "https://www.googleapis.com/auth/classroom.courses" @@ -105,6 +111,7 @@ func New(client *http.Client) (*Service, error) { s := &Service{client: client, BasePath: basePath} s.Courses = NewCoursesService(s) s.Invitations = NewInvitationsService(s) + s.Registrations = NewRegistrationsService(s) s.UserProfiles = NewUserProfilesService(s) return s, nil } @@ -118,6 +125,8 @@ type Service struct { Invitations *InvitationsService + Registrations *RegistrationsService + UserProfiles *UserProfilesService } @@ -131,6 +140,7 @@ func (s *Service) userAgent() string { func NewCoursesService(s *Service) *CoursesService { rs := &CoursesService{s: s} rs.Aliases = NewCoursesAliasesService(s) + rs.Announcements = NewCoursesAnnouncementsService(s) rs.CourseWork = NewCoursesCourseWorkService(s) rs.Students = NewCoursesStudentsService(s) rs.Teachers = NewCoursesTeachersService(s) @@ -142,6 +152,8 @@ type CoursesService struct { Aliases *CoursesAliasesService + Announcements *CoursesAnnouncementsService + CourseWork *CoursesCourseWorkService Students *CoursesStudentsService @@ -158,6 +170,15 @@ type CoursesAliasesService struct { s *Service } +func NewCoursesAnnouncementsService(s *Service) *CoursesAnnouncementsService { + rs := &CoursesAnnouncementsService{s: s} + return rs +} + +type CoursesAnnouncementsService struct { + s *Service +} + func NewCoursesCourseWorkService(s *Service) *CoursesCourseWorkService { rs := &CoursesCourseWorkService{s: s} rs.StudentSubmissions = NewCoursesCourseWorkStudentSubmissionsService(s) @@ -206,6 +227,15 @@ type InvitationsService struct { s *Service } +func NewRegistrationsService(s *Service) *RegistrationsService { + rs := &RegistrationsService{s: s} + return rs +} + +type RegistrationsService struct { + s *Service +} + func NewUserProfilesService(s *Service) *UserProfilesService { rs := &UserProfilesService{s: s} rs.GuardianInvitations = NewUserProfilesGuardianInvitationsService(s) @@ -239,6 +269,126 @@ type UserProfilesGuardiansService struct { s *Service } +// Announcement: Announcement created by a teacher for students of the +// course +type Announcement struct { + // AlternateLink: Absolute link to this announcement in the Classroom + // web UI. + // This is only populated if `state` is `PUBLISHED`. + // + // Read-only. + AlternateLink string `json:"alternateLink,omitempty"` + + // AssigneeMode: Assignee mode of the announcement. + // If unspecified, the default value is `ALL_STUDENTS`. + // + // Possible values: + // "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never + // returned. + // "ALL_STUDENTS" - All students can see the item. + // This is the default state. + // "INDIVIDUAL_STUDENTS" - A subset of the students can see the item. + AssigneeMode string `json:"assigneeMode,omitempty"` + + // CourseId: Identifier of the course. + // + // Read-only. + CourseId string `json:"courseId,omitempty"` + + // CreationTime: Timestamp when this announcement was + // created. + // + // Read-only. + CreationTime string `json:"creationTime,omitempty"` + + // CreatorUserId: Identifier for the user that created the + // announcement. + // + // Read-only. + CreatorUserId string `json:"creatorUserId,omitempty"` + + // Id: Classroom-assigned identifier of this announcement, unique per + // course. + // + // Read-only. + Id string `json:"id,omitempty"` + + // IndividualStudentsOptions: Identifiers of students with access to the + // announcement. + // This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. + // If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only students + // specified in this + // field will be able to see the announcement. + IndividualStudentsOptions *IndividualStudentsOptions `json:"individualStudentsOptions,omitempty"` + + // Materials: Additional materials. + // + // Announcements must have no more than 20 material items. + Materials []*Material `json:"materials,omitempty"` + + // ScheduledTime: Optional timestamp when this announcement is scheduled + // to be published. + ScheduledTime string `json:"scheduledTime,omitempty"` + + // State: Status of this announcement. + // If unspecified, the default state is `DRAFT`. + // + // Possible values: + // "ANNOUNCEMENT_STATE_UNSPECIFIED" - No state specified. This is + // never returned. + // "PUBLISHED" - Status for announcement that has been published. + // This is the default state. + // "DRAFT" - Status for an announcement that is not yet + // published. + // Announcement in this state is visible only to course teachers and + // domain + // administrators. + // "DELETED" - Status for announcement that was published but is now + // deleted. + // Announcement in this state is visible only to course teachers and + // domain + // administrators. + // Announcement in this state is deleted after some time. + State string `json:"state,omitempty"` + + // Text: Description of this announcement. + // The text must be a valid UTF-8 string containing no more + // than 30,000 characters. + Text string `json:"text,omitempty"` + + // UpdateTime: Timestamp of the most recent change to this + // announcement. + // + // Read-only. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AlternateLink") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AlternateLink") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Announcement) MarshalJSON() ([]byte, error) { + type noMethod Announcement + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Assignment: Additional details for assignments. type Assignment struct { // StudentWorkFolder: Drive folder where attachments from student @@ -348,6 +498,42 @@ func (s *Attachment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CloudPubsubTopic: A reference to a Cloud Pub/Sub topic. +// +// To register for notifications, the owner of the topic must +// grant +// `classroom-notifications@system.gserviceaccount.com` the +// `projects.topics.publish` permission. +type CloudPubsubTopic struct { + // TopicName: The `name` field of a Cloud + // Pub/Sub + // [Topic](https://cloud.google.com/pubsub/docs/reference/rest/v1 + // /projects.topics#Topic). + TopicName string `json:"topicName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TopicName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TopicName") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CloudPubsubTopic) MarshalJSON() ([]byte, error) { + type noMethod CloudPubsubTopic + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Course: A Course in Classroom. type Course struct { // AlternateLink: Absolute link to this course in the Classroom web @@ -694,6 +880,36 @@ func (s *CourseMaterialSet) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// CourseRosterChangesInfo: Information about a `Feed` with a +// `feed_type` of `COURSE_ROSTER_CHANGES`. +type CourseRosterChangesInfo struct { + // CourseId: The `course_id` of the course to subscribe to roster + // changes for. + CourseId string `json:"courseId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CourseId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CourseId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *CourseRosterChangesInfo) MarshalJSON() ([]byte, error) { + type noMethod CourseRosterChangesInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CourseWork: Course work created by a teacher for students of the // course. type CourseWork struct { @@ -704,6 +920,17 @@ type CourseWork struct { // Read-only. AlternateLink string `json:"alternateLink,omitempty"` + // AssigneeMode: Assignee mode of the coursework. + // If unspecified, the default value is `ALL_STUDENTS`. + // + // Possible values: + // "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never + // returned. + // "ALL_STUDENTS" - All students can see the item. + // This is the default state. + // "INDIVIDUAL_STUDENTS" - A subset of the students can see the item. + AssigneeMode string `json:"assigneeMode,omitempty"` + // Assignment: Assignment details. // This is populated only when `work_type` is `ASSIGNMENT`. // @@ -732,6 +959,12 @@ type CourseWork struct { // Read-only. CreationTime string `json:"creationTime,omitempty"` + // CreatorUserId: Identifier for the user that created the + // coursework. + // + // Read-only. + CreatorUserId string `json:"creatorUserId,omitempty"` + // Description: Optional description of this course work. // If set, the description must be a valid UTF-8 string containing no // more @@ -755,6 +988,14 @@ type CourseWork struct { // Read-only. Id string `json:"id,omitempty"` + // IndividualStudentsOptions: Identifiers of students with access to the + // coursework. + // This field is set only if `assigneeMode` is `INDIVIDUAL_STUDENTS`. + // If the `assigneeMode` is `INDIVIDUAL_STUDENTS`, then only + // students + // specified in this field will be assigned the coursework. + IndividualStudentsOptions *IndividualStudentsOptions `json:"individualStudentsOptions,omitempty"` + // Materials: Additional materials. // // CourseWork must have no more than 20 material items. @@ -1029,6 +1270,69 @@ type Empty struct { googleapi.ServerResponse `json:"-"` } +// Feed: A class of notifications that an application can register to +// receive. +// For example: "all roster changes for a domain". +type Feed struct { + // CourseRosterChangesInfo: Information about a `Feed` with a + // `feed_type` of `COURSE_ROSTER_CHANGES`. + // This field must be specified if `feed_type` is + // `COURSE_ROSTER_CHANGES`. + CourseRosterChangesInfo *CourseRosterChangesInfo `json:"courseRosterChangesInfo,omitempty"` + + // FeedType: The type of feed. + // + // Possible values: + // "FEED_TYPE_UNSPECIFIED" - Should never be returned or provided. + // "DOMAIN_ROSTER_CHANGES" - All roster changes for a particular + // domain. + // + // Notifications will be generated whenever a user joins or leaves a + // course. + // + // No notifications will be generated when an invitation is created + // or + // deleted, but notifications will be generated when a user joins a + // course + // by accepting an invitation. + // "COURSE_ROSTER_CHANGES" - All roster changes for a particular + // course. + // + // Notifications will be generated whenever a user joins or leaves a + // course. + // + // No notifications will be generated when an invitation is created + // or + // deleted, but notifications will be generated when a user joins a + // course + // by accepting an invitation. + FeedType string `json:"feedType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "CourseRosterChangesInfo") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CourseRosterChangesInfo") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Feed) MarshalJSON() ([]byte, error) { + type noMethod Feed + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Form: Google Forms item. type Form struct { // FormUrl: URL of the form. @@ -1283,6 +1587,39 @@ func (s *GuardianInvitation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IndividualStudentsOptions: Assignee details about a +// coursework/announcement. +// This field is set if and only if `assigneeMode` is +// `INDIVIDUAL_STUDENTS`. +type IndividualStudentsOptions struct { + // StudentIds: Identifiers for the students that have access to + // the + // coursework/announcement. + StudentIds []string `json:"studentIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "StudentIds") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StudentIds") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IndividualStudentsOptions) MarshalJSON() ([]byte, error) { + type noMethod IndividualStudentsOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Invitation: An invitation to join a course. type Invitation struct { // CourseId: Identifier of the course to invite the user to. @@ -1381,6 +1718,43 @@ func (s *Link) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListAnnouncementsResponse: Response when listing course work. +type ListAnnouncementsResponse struct { + // Announcements: Announcement items that match the request. + Announcements []*Announcement `json:"announcements,omitempty"` + + // NextPageToken: Token identifying the next page of results to return. + // If empty, no further + // results are available. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Announcements") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Announcements") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListAnnouncementsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListAnnouncementsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListCourseAliasesResponse: Response when listing course aliases. type ListCourseAliasesResponse struct { // Aliases: The course aliases. @@ -1761,6 +2135,49 @@ func (s *Material) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ModifyAnnouncementAssigneesRequest: Request to modify assignee mode +// and options of an announcement. +type ModifyAnnouncementAssigneesRequest struct { + // AssigneeMode: Mode of the announcement describing whether it will be + // accessible by all + // students or specified individual students. + // + // Possible values: + // "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never + // returned. + // "ALL_STUDENTS" - All students can see the item. + // This is the default state. + // "INDIVIDUAL_STUDENTS" - A subset of the students can see the item. + AssigneeMode string `json:"assigneeMode,omitempty"` + + // ModifyIndividualStudentsOptions: Set which students can view or + // cannot view the announcement. + // Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. + ModifyIndividualStudentsOptions *ModifyIndividualStudentsOptions `json:"modifyIndividualStudentsOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AssigneeMode") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssigneeMode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyAnnouncementAssigneesRequest) MarshalJSON() ([]byte, error) { + type noMethod ModifyAnnouncementAssigneesRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ModifyAttachmentsRequest: Request to modify the attachments of a // student submission. type ModifyAttachmentsRequest struct { @@ -1794,6 +2211,86 @@ func (s *ModifyAttachmentsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ModifyCourseWorkAssigneesRequest: Request to modify assignee mode and +// options of a coursework. +type ModifyCourseWorkAssigneesRequest struct { + // AssigneeMode: Mode of the coursework describing whether it will be + // assigned to all + // students or specified individual students. + // + // Possible values: + // "ASSIGNEE_MODE_UNSPECIFIED" - No mode specified. This is never + // returned. + // "ALL_STUDENTS" - All students can see the item. + // This is the default state. + // "INDIVIDUAL_STUDENTS" - A subset of the students can see the item. + AssigneeMode string `json:"assigneeMode,omitempty"` + + // ModifyIndividualStudentsOptions: Set which students are assigned or + // not assigned to the coursework. + // Must be specified only when `assigneeMode` is `INDIVIDUAL_STUDENTS`. + ModifyIndividualStudentsOptions *ModifyIndividualStudentsOptions `json:"modifyIndividualStudentsOptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AssigneeMode") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AssigneeMode") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyCourseWorkAssigneesRequest) MarshalJSON() ([]byte, error) { + type noMethod ModifyCourseWorkAssigneesRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModifyIndividualStudentsOptions: Contains fields to add or remove +// students from a course work or announcement +// where the `assigneeMode` is set to `INDIVIDUAL_STUDENTS`. +type ModifyIndividualStudentsOptions struct { + // AddStudentIds: Ids of students to be added as having access to + // this + // coursework/announcement. + AddStudentIds []string `json:"addStudentIds,omitempty"` + + // RemoveStudentIds: Ids of students to be removed from having access to + // this + // coursework/announcement. + RemoveStudentIds []string `json:"removeStudentIds,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AddStudentIds") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AddStudentIds") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyIndividualStudentsOptions) MarshalJSON() ([]byte, error) { + type noMethod ModifyIndividualStudentsOptions + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // MultipleChoiceQuestion: Additional details for multiple-choice // questions. type MultipleChoiceQuestion struct { @@ -1899,6 +2396,59 @@ func (s *Name) MarshalJSON() ([]byte, error) { type ReclaimStudentSubmissionRequest struct { } +// Registration: An instruction to Classroom to send notifications from +// the `feed` to the +// provided `destination`. +type Registration struct { + // CloudPubsubTopic: The Cloud Pub/Sub topic that notifications are to + // be sent to. + CloudPubsubTopic *CloudPubsubTopic `json:"cloudPubsubTopic,omitempty"` + + // ExpiryTime: The time until which the `Registration` is + // effective. + // + // This is a read-only field assigned by the server. + ExpiryTime string `json:"expiryTime,omitempty"` + + // Feed: Specification for the class of notifications that Classroom + // should deliver + // to the `destination`. + Feed *Feed `json:"feed,omitempty"` + + // RegistrationId: A server-generated unique identifier for this + // `Registration`. + // + // Read-only. + RegistrationId string `json:"registrationId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudPubsubTopic") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CloudPubsubTopic") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Registration) MarshalJSON() ([]byte, error) { + type noMethod Registration + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ReturnStudentSubmissionRequest: Request to return a student // submission. type ReturnStudentSubmissionRequest struct { @@ -2104,7 +2654,11 @@ type StudentSubmission struct { AssignedGrade float64 `json:"assignedGrade,omitempty"` // AssignmentSubmission: Submission content when course_work_type is - // ASSIGNMENT . + // ASSIGNMENT. + // + // Students can modify this content + // using + // google.classroom.Work.ModifyAttachments. AssignmentSubmission *AssignmentSubmission `json:"assignmentSubmission,omitempty"` // AssociatedWithDeveloper: Whether this student submission is @@ -3990,6 +4544,1055 @@ func (c *CoursesAliasesListCall) Pages(ctx context.Context, f func(*ListCourseAl } } +// method id "classroom.courses.announcements.create": + +type CoursesAnnouncementsCreateCall struct { + s *Service + courseId string + announcement *Announcement + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an announcement. +// +// This method returns the following error codes: +// +// * `PERMISSION_DENIED` if the requesting user is not permitted to +// access the +// requested course, create announcements in the requested course, share +// a +// Drive attachment, or for access errors. +// * `INVALID_ARGUMENT` if the request is malformed. +// * `NOT_FOUND` if the requested course does not exist. +// * `FAILED_PRECONDITION` for the following request error: +// * AttachmentNotVisible +func (r *CoursesAnnouncementsService) Create(courseId string, announcement *Announcement) *CoursesAnnouncementsCreateCall { + c := &CoursesAnnouncementsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.courseId = courseId + c.announcement = announcement + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CoursesAnnouncementsCreateCall) Fields(s ...googleapi.Field) *CoursesAnnouncementsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CoursesAnnouncementsCreateCall) Context(ctx context.Context) *CoursesAnnouncementsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CoursesAnnouncementsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CoursesAnnouncementsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.announcement) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{courseId}/announcements") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "courseId": c.courseId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.courses.announcements.create" call. +// Exactly one of *Announcement or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Announcement.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CoursesAnnouncementsCreateCall) Do(opts ...googleapi.CallOption) (*Announcement, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Announcement{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an announcement.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course, create announcements in the requested course, share a\nDrive attachment, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.\n* `FAILED_PRECONDITION` for the following request error:\n * AttachmentNotVisible", + // "flatPath": "v1/courses/{courseId}/announcements", + // "httpMethod": "POST", + // "id": "classroom.courses.announcements.create", + // "parameterOrder": [ + // "courseId" + // ], + // "parameters": { + // "courseId": { + // "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/courses/{courseId}/announcements", + // "request": { + // "$ref": "Announcement" + // }, + // "response": { + // "$ref": "Announcement" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.announcements" + // ] + // } + +} + +// method id "classroom.courses.announcements.delete": + +type CoursesAnnouncementsDeleteCall struct { + s *Service + courseId string + id string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an announcement. +// +// This request must be made by the Developer Console project of +// the +// [OAuth client ID](https://support.google.com/cloud/answer/6158849) +// used to +// create the corresponding announcement item. +// +// This method returns the following error codes: +// +// * `PERMISSION_DENIED` if the requesting developer project did not +// create +// the corresponding announcement, if the requesting user is not +// permitted +// to delete the requested course or for access errors. +// * `FAILED_PRECONDITION` if the requested announcement has already +// been +// deleted. +// * `NOT_FOUND` if no course exists with the requested ID. +func (r *CoursesAnnouncementsService) Delete(courseId string, id string) *CoursesAnnouncementsDeleteCall { + c := &CoursesAnnouncementsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.courseId = courseId + c.id = id + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CoursesAnnouncementsDeleteCall) Fields(s ...googleapi.Field) *CoursesAnnouncementsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CoursesAnnouncementsDeleteCall) Context(ctx context.Context) *CoursesAnnouncementsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CoursesAnnouncementsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CoursesAnnouncementsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{courseId}/announcements/{id}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "courseId": c.courseId, + "id": c.id, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.courses.announcements.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *CoursesAnnouncementsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an announcement.\n\nThis request must be made by the Developer Console project of the\n[OAuth client ID](https://support.google.com/cloud/answer/6158849) used to\ncreate the corresponding announcement item.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding announcement, if the requesting user is not permitted\nto delete the requested course or for access errors.\n* `FAILED_PRECONDITION` if the requested announcement has already been\ndeleted.\n* `NOT_FOUND` if no course exists with the requested ID.", + // "flatPath": "v1/courses/{courseId}/announcements/{id}", + // "httpMethod": "DELETE", + // "id": "classroom.courses.announcements.delete", + // "parameterOrder": [ + // "courseId", + // "id" + // ], + // "parameters": { + // "courseId": { + // "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "id": { + // "description": "Identifier of the announcement to delete.\nThis identifier is a Classroom-assigned identifier.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/courses/{courseId}/announcements/{id}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.announcements" + // ] + // } + +} + +// method id "classroom.courses.announcements.get": + +type CoursesAnnouncementsGetCall struct { + s *Service + courseId string + id string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns an announcement. +// +// This method returns the following error codes: +// +// * `PERMISSION_DENIED` if the requesting user is not permitted to +// access the +// requested course or announcement, or for access errors. +// * `INVALID_ARGUMENT` if the request is malformed. +// * `NOT_FOUND` if the requested course or announcement does not exist. +func (r *CoursesAnnouncementsService) Get(courseId string, id string) *CoursesAnnouncementsGetCall { + c := &CoursesAnnouncementsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.courseId = courseId + c.id = id + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CoursesAnnouncementsGetCall) Fields(s ...googleapi.Field) *CoursesAnnouncementsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CoursesAnnouncementsGetCall) IfNoneMatch(entityTag string) *CoursesAnnouncementsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CoursesAnnouncementsGetCall) Context(ctx context.Context) *CoursesAnnouncementsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CoursesAnnouncementsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CoursesAnnouncementsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{courseId}/announcements/{id}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "courseId": c.courseId, + "id": c.id, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.courses.announcements.get" call. +// Exactly one of *Announcement or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Announcement.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CoursesAnnouncementsGetCall) Do(opts ...googleapi.CallOption) (*Announcement, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Announcement{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns an announcement.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or announcement, or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or announcement does not exist.", + // "flatPath": "v1/courses/{courseId}/announcements/{id}", + // "httpMethod": "GET", + // "id": "classroom.courses.announcements.get", + // "parameterOrder": [ + // "courseId", + // "id" + // ], + // "parameters": { + // "courseId": { + // "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "id": { + // "description": "Identifier of the announcement.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/courses/{courseId}/announcements/{id}", + // "response": { + // "$ref": "Announcement" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.announcements", + // "https://www.googleapis.com/auth/classroom.announcements.readonly" + // ] + // } + +} + +// method id "classroom.courses.announcements.list": + +type CoursesAnnouncementsListCall struct { + s *Service + courseId string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Returns a list of announcements that the requester is permitted +// to view. +// +// Course students may only view `PUBLISHED` announcements. Course +// teachers +// and domain administrators may view all announcements. +// +// This method returns the following error codes: +// +// * `PERMISSION_DENIED` if the requesting user is not permitted to +// access +// the requested course or for access errors. +// * `INVALID_ARGUMENT` if the request is malformed. +// * `NOT_FOUND` if the requested course does not exist. +func (r *CoursesAnnouncementsService) List(courseId string) *CoursesAnnouncementsListCall { + c := &CoursesAnnouncementsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.courseId = courseId + return c +} + +// AnnouncementStates sets the optional parameter "announcementStates": +// Restriction on the `state` of announcements returned. +// If this argument is left unspecified, the default value is +// `PUBLISHED`. +// +// Possible values: +// "ANNOUNCEMENT_STATE_UNSPECIFIED" +// "PUBLISHED" +// "DRAFT" +// "DELETED" +func (c *CoursesAnnouncementsListCall) AnnouncementStates(announcementStates ...string) *CoursesAnnouncementsListCall { + c.urlParams_.SetMulti("announcementStates", append([]string{}, announcementStates...)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Optional sort ordering +// for results. A comma-separated list of fields with +// an optional sort direction keyword. Supported field is +// `updateTime`. +// Supported direction keywords are `asc` and `desc`. +// If not specified, `updateTime desc` is the default +// behavior. +// Examples: `updateTime asc`, `updateTime` +func (c *CoursesAnnouncementsListCall) OrderBy(orderBy string) *CoursesAnnouncementsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// items to return. Zero or unspecified indicates that the +// server may assign a maximum. +// +// The server may return fewer than the specified number of results. +func (c *CoursesAnnouncementsListCall) PageSize(pageSize int64) *CoursesAnnouncementsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": +// nextPageToken +// value returned from a previous +// list call, +// indicating that the subsequent page of results should be +// returned. +// +// The list request +// must be otherwise identical to the one that resulted in this token. +func (c *CoursesAnnouncementsListCall) PageToken(pageToken string) *CoursesAnnouncementsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CoursesAnnouncementsListCall) Fields(s ...googleapi.Field) *CoursesAnnouncementsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *CoursesAnnouncementsListCall) IfNoneMatch(entityTag string) *CoursesAnnouncementsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CoursesAnnouncementsListCall) Context(ctx context.Context) *CoursesAnnouncementsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CoursesAnnouncementsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CoursesAnnouncementsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{courseId}/announcements") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "courseId": c.courseId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.courses.announcements.list" call. +// Exactly one of *ListAnnouncementsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListAnnouncementsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *CoursesAnnouncementsListCall) Do(opts ...googleapi.CallOption) (*ListAnnouncementsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListAnnouncementsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns a list of announcements that the requester is permitted to view.\n\nCourse students may only view `PUBLISHED` announcements. Course teachers\nand domain administrators may view all announcements.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access\nthe requested course or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course does not exist.", + // "flatPath": "v1/courses/{courseId}/announcements", + // "httpMethod": "GET", + // "id": "classroom.courses.announcements.list", + // "parameterOrder": [ + // "courseId" + // ], + // "parameters": { + // "announcementStates": { + // "description": "Restriction on the `state` of announcements returned.\nIf this argument is left unspecified, the default value is `PUBLISHED`.", + // "enum": [ + // "ANNOUNCEMENT_STATE_UNSPECIFIED", + // "PUBLISHED", + // "DRAFT", + // "DELETED" + // ], + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "courseId": { + // "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "orderBy": { + // "description": "Optional sort ordering for results. A comma-separated list of fields with\nan optional sort direction keyword. Supported field is `updateTime`.\nSupported direction keywords are `asc` and `desc`.\nIf not specified, `updateTime desc` is the default behavior.\nExamples: `updateTime asc`, `updateTime`", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of items to return. Zero or unspecified indicates that the\nserver may assign a maximum.\n\nThe server may return fewer than the specified number of results.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "nextPageToken\nvalue returned from a previous\nlist call,\nindicating that the subsequent page of results should be returned.\n\nThe list request\nmust be otherwise identical to the one that resulted in this token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/courses/{courseId}/announcements", + // "response": { + // "$ref": "ListAnnouncementsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.announcements", + // "https://www.googleapis.com/auth/classroom.announcements.readonly" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *CoursesAnnouncementsListCall) Pages(ctx context.Context, f func(*ListAnnouncementsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "classroom.courses.announcements.modifyAssignees": + +type CoursesAnnouncementsModifyAssigneesCall struct { + s *Service + courseId string + id string + modifyannouncementassigneesrequest *ModifyAnnouncementAssigneesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModifyAssignees: Modifies assignee mode and options of an +// announcement. +// +// Only a teacher of the course that contains the announcement may +// call this method. +// +// This method returns the following error codes: +// +// * `PERMISSION_DENIED` if the requesting user is not permitted to +// access the +// requested course or course work or for access errors. +// * `INVALID_ARGUMENT` if the request is malformed. +// * `NOT_FOUND` if the requested course or course work does not exist. +func (r *CoursesAnnouncementsService) ModifyAssignees(courseId string, id string, modifyannouncementassigneesrequest *ModifyAnnouncementAssigneesRequest) *CoursesAnnouncementsModifyAssigneesCall { + c := &CoursesAnnouncementsModifyAssigneesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.courseId = courseId + c.id = id + c.modifyannouncementassigneesrequest = modifyannouncementassigneesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CoursesAnnouncementsModifyAssigneesCall) Fields(s ...googleapi.Field) *CoursesAnnouncementsModifyAssigneesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CoursesAnnouncementsModifyAssigneesCall) Context(ctx context.Context) *CoursesAnnouncementsModifyAssigneesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CoursesAnnouncementsModifyAssigneesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CoursesAnnouncementsModifyAssigneesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifyannouncementassigneesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{courseId}/announcements/{id}:modifyAssignees") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "courseId": c.courseId, + "id": c.id, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.courses.announcements.modifyAssignees" call. +// Exactly one of *Announcement or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Announcement.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CoursesAnnouncementsModifyAssigneesCall) Do(opts ...googleapi.CallOption) (*Announcement, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Announcement{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies assignee mode and options of an announcement.\n\nOnly a teacher of the course that contains the announcement may\ncall this method.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist.", + // "flatPath": "v1/courses/{courseId}/announcements/{id}:modifyAssignees", + // "httpMethod": "POST", + // "id": "classroom.courses.announcements.modifyAssignees", + // "parameterOrder": [ + // "courseId", + // "id" + // ], + // "parameters": { + // "courseId": { + // "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "id": { + // "description": "Identifier of the announcement.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/courses/{courseId}/announcements/{id}:modifyAssignees", + // "request": { + // "$ref": "ModifyAnnouncementAssigneesRequest" + // }, + // "response": { + // "$ref": "Announcement" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.announcements" + // ] + // } + +} + +// method id "classroom.courses.announcements.patch": + +type CoursesAnnouncementsPatchCall struct { + s *Service + courseId string + id string + announcement *Announcement + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates one or more fields of an announcement. +// +// This method returns the following error codes: +// +// * `PERMISSION_DENIED` if the requesting developer project did not +// create +// the corresponding announcement or for access errors. +// * `INVALID_ARGUMENT` if the request is malformed. +// * `FAILED_PRECONDITION` if the requested announcement has already +// been +// deleted. +// * `NOT_FOUND` if the requested course or announcement does not exist +func (r *CoursesAnnouncementsService) Patch(courseId string, id string, announcement *Announcement) *CoursesAnnouncementsPatchCall { + c := &CoursesAnnouncementsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.courseId = courseId + c.id = id + c.announcement = announcement + return c +} + +// UpdateMask sets the optional parameter "updateMask": Mask that +// identifies which fields on the announcement to update. +// This field is required to do an update. The update fails if +// invalid +// fields are specified. If a field supports empty values, it can be +// cleared +// by specifying it in the update mask and not in the Announcement +// object. If +// a field that does not support empty values is included in the update +// mask +// and not set in the Announcement object, an `INVALID_ARGUMENT` error +// will be +// returned. +// +// The following fields may be specified by teachers: +// +// * `text` +// * `state` +// * `scheduled_time` +func (c *CoursesAnnouncementsPatchCall) UpdateMask(updateMask string) *CoursesAnnouncementsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CoursesAnnouncementsPatchCall) Fields(s ...googleapi.Field) *CoursesAnnouncementsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CoursesAnnouncementsPatchCall) Context(ctx context.Context) *CoursesAnnouncementsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CoursesAnnouncementsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CoursesAnnouncementsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.announcement) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{courseId}/announcements/{id}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "courseId": c.courseId, + "id": c.id, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.courses.announcements.patch" call. +// Exactly one of *Announcement or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Announcement.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CoursesAnnouncementsPatchCall) Do(opts ...googleapi.CallOption) (*Announcement, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Announcement{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates one or more fields of an announcement.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting developer project did not create\nthe corresponding announcement or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `FAILED_PRECONDITION` if the requested announcement has already been\ndeleted.\n* `NOT_FOUND` if the requested course or announcement does not exist", + // "flatPath": "v1/courses/{courseId}/announcements/{id}", + // "httpMethod": "PATCH", + // "id": "classroom.courses.announcements.patch", + // "parameterOrder": [ + // "courseId", + // "id" + // ], + // "parameters": { + // "courseId": { + // "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "id": { + // "description": "Identifier of the announcement.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Mask that identifies which fields on the announcement to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified. If a field supports empty values, it can be cleared\nby specifying it in the update mask and not in the Announcement object. If\na field that does not support empty values is included in the update mask\nand not set in the Announcement object, an `INVALID_ARGUMENT` error will be\nreturned.\n\nThe following fields may be specified by teachers:\n\n* `text`\n* `state`\n* `scheduled_time`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/courses/{courseId}/announcements/{id}", + // "request": { + // "$ref": "Announcement" + // }, + // "response": { + // "$ref": "Announcement" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.announcements" + // ] + // } + +} + // method id "classroom.courses.courseWork.create": type CoursesCourseWorkCreateCall struct { @@ -4715,6 +6318,162 @@ func (c *CoursesCourseWorkListCall) Pages(ctx context.Context, f func(*ListCours } } +// method id "classroom.courses.courseWork.modifyAssignees": + +type CoursesCourseWorkModifyAssigneesCall struct { + s *Service + courseId string + id string + modifycourseworkassigneesrequest *ModifyCourseWorkAssigneesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModifyAssignees: Modifies assignee mode and options of a +// coursework. +// +// Only a teacher of the course that contains the coursework may +// call this method. +// +// This method returns the following error codes: +// +// * `PERMISSION_DENIED` if the requesting user is not permitted to +// access the +// requested course or course work or for access errors. +// * `INVALID_ARGUMENT` if the request is malformed. +// * `NOT_FOUND` if the requested course or course work does not exist. +func (r *CoursesCourseWorkService) ModifyAssignees(courseId string, id string, modifycourseworkassigneesrequest *ModifyCourseWorkAssigneesRequest) *CoursesCourseWorkModifyAssigneesCall { + c := &CoursesCourseWorkModifyAssigneesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.courseId = courseId + c.id = id + c.modifycourseworkassigneesrequest = modifycourseworkassigneesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *CoursesCourseWorkModifyAssigneesCall) Fields(s ...googleapi.Field) *CoursesCourseWorkModifyAssigneesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *CoursesCourseWorkModifyAssigneesCall) Context(ctx context.Context) *CoursesCourseWorkModifyAssigneesCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *CoursesCourseWorkModifyAssigneesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *CoursesCourseWorkModifyAssigneesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycourseworkassigneesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/courses/{courseId}/courseWork/{id}:modifyAssignees") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "courseId": c.courseId, + "id": c.id, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.courses.courseWork.modifyAssignees" call. +// Exactly one of *CourseWork or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *CourseWork.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *CoursesCourseWorkModifyAssigneesCall) Do(opts ...googleapi.CallOption) (*CourseWork, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &CourseWork{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies assignee mode and options of a coursework.\n\nOnly a teacher of the course that contains the coursework may\ncall this method.\n\nThis method returns the following error codes:\n\n* `PERMISSION_DENIED` if the requesting user is not permitted to access the\nrequested course or course work or for access errors.\n* `INVALID_ARGUMENT` if the request is malformed.\n* `NOT_FOUND` if the requested course or course work does not exist.", + // "flatPath": "v1/courses/{courseId}/courseWork/{id}:modifyAssignees", + // "httpMethod": "POST", + // "id": "classroom.courses.courseWork.modifyAssignees", + // "parameterOrder": [ + // "courseId", + // "id" + // ], + // "parameters": { + // "courseId": { + // "description": "Identifier of the course.\nThis identifier can be either the Classroom-assigned identifier or an\nalias.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "id": { + // "description": "Identifier of the coursework.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/courses/{courseId}/courseWork/{id}:modifyAssignees", + // "request": { + // "$ref": "ModifyCourseWorkAssigneesRequest" + // }, + // "response": { + // "$ref": "CourseWork" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.coursework.students" + // ] + // } + +} + // method id "classroom.courses.courseWork.patch": type CoursesCourseWorkPatchCall struct { @@ -4776,6 +6535,7 @@ func (r *CoursesCourseWorkService) Patch(courseId string, id string, coursework // returned. // // The following fields may be specified by teachers: +// // * `title` // * `description` // * `state` @@ -4898,7 +6658,7 @@ func (c *CoursesCourseWorkPatchCall) Do(opts ...googleapi.CallOption) (*CourseWo // "type": "string" // }, // "updateMask": { - // "description": "Mask that identifies which fields on the course work to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified. If a field supports empty values, it can be cleared\nby specifying it in the update mask and not in the CourseWork object. If a\nfield that does not support empty values is included in the update mask and\nnot set in the CourseWork object, an `INVALID_ARGUMENT` error will be\nreturned.\n\nThe following fields may be specified by teachers:\n* `title`\n* `description`\n* `state`\n* `due_date`\n* `due_time`\n* `max_points`\n* `scheduled_time`\n* `submission_modification_mode`", + // "description": "Mask that identifies which fields on the course work to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified. If a field supports empty values, it can be cleared\nby specifying it in the update mask and not in the CourseWork object. If a\nfield that does not support empty values is included in the update mask and\nnot set in the CourseWork object, an `INVALID_ARGUMENT` error will be\nreturned.\n\nThe following fields may be specified by teachers:\n\n* `title`\n* `description`\n* `state`\n* `due_date`\n* `due_time`\n* `max_points`\n* `scheduled_time`\n* `submission_modification_mode`", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -5619,6 +7379,7 @@ func (r *CoursesCourseWorkStudentSubmissionsService) Patch(courseId string, cour // fields are specified. // // The following fields may be specified by teachers: +// // * `draft_grade` // * `assigned_grade` func (c *CoursesCourseWorkStudentSubmissionsPatchCall) UpdateMask(updateMask string) *CoursesCourseWorkStudentSubmissionsPatchCall { @@ -5743,7 +7504,7 @@ func (c *CoursesCourseWorkStudentSubmissionsPatchCall) Do(opts ...googleapi.Call // "type": "string" // }, // "updateMask": { - // "description": "Mask that identifies which fields on the student submission to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified.\n\nThe following fields may be specified by teachers:\n* `draft_grade`\n* `assigned_grade`", + // "description": "Mask that identifies which fields on the student submission to update.\nThis field is required to do an update. The update fails if invalid\nfields are specified.\n\nThe following fields may be specified by teachers:\n\n* `draft_grade`\n* `assigned_grade`", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -8415,6 +10176,294 @@ func (c *InvitationsListCall) Pages(ctx context.Context, f func(*ListInvitations } } +// method id "classroom.registrations.create": + +type RegistrationsCreateCall struct { + s *Service + registration *Registration + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a `Registration`, causing Classroom to start sending +// notifications +// from the provided `feed` to the provided `destination`. +// +// Returns the created `Registration`. Currently, this will be the same +// as +// the argument, but with server-assigned fields such as `expiry_time` +// and +// `id` filled in. +// +// Note that any value specified for the `expiry_time` or `id` fields +// will be +// ignored. +// +// While Classroom may validate the `destination` and return errors on a +// best +// effort basis, it is the caller's responsibility to ensure that it +// exists +// and that Classroom has permission to publish to it. +// +// This method may return the following error codes: +// +// * `PERMISSION_DENIED` if: +// * the authenticated user does not have permission to receive +// notifications from the requested field; or +// * the credential provided does not include the appropriate scope +// for the +// requested feed. +// * another access error is encountered. +// * `INVALID_ARGUMENT` if: +// * no `destination` is specified, or the specified `destination` is +// not +// valid; or +// * no `feed` is specified, or the specified `feed` is not valid. +// * `NOT_FOUND` if: +// * the specified `feed` cannot be located, or the requesting user +// does not +// have permission to determine whether or not it exists; or +// * the specified `destination` cannot be located, or Classroom has +// not +// been granted permission to publish to it. +func (r *RegistrationsService) Create(registration *Registration) *RegistrationsCreateCall { + c := &RegistrationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registration = registration + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegistrationsCreateCall) Fields(s ...googleapi.Field) *RegistrationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegistrationsCreateCall) Context(ctx context.Context) *RegistrationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegistrationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegistrationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.registration) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/registrations") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.registrations.create" call. +// Exactly one of *Registration or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Registration.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegistrationsCreateCall) Do(opts ...googleapi.CallOption) (*Registration, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Registration{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a `Registration`, causing Classroom to start sending notifications\nfrom the provided `feed` to the provided `destination`.\n\nReturns the created `Registration`. Currently, this will be the same as\nthe argument, but with server-assigned fields such as `expiry_time` and\n`id` filled in.\n\nNote that any value specified for the `expiry_time` or `id` fields will be\nignored.\n\nWhile Classroom may validate the `destination` and return errors on a best\neffort basis, it is the caller's responsibility to ensure that it exists\nand that Classroom has permission to publish to it.\n\nThis method may return the following error codes:\n\n* `PERMISSION_DENIED` if:\n * the authenticated user does not have permission to receive\n notifications from the requested field; or\n * the credential provided does not include the appropriate scope for the\n requested feed.\n * another access error is encountered.\n* `INVALID_ARGUMENT` if:\n * no `destination` is specified, or the specified `destination` is not\n valid; or\n * no `feed` is specified, or the specified `feed` is not valid.\n* `NOT_FOUND` if:\n * the specified `feed` cannot be located, or the requesting user does not\n have permission to determine whether or not it exists; or\n * the specified `destination` cannot be located, or Classroom has not\n been granted permission to publish to it.", + // "flatPath": "v1/registrations", + // "httpMethod": "POST", + // "id": "classroom.registrations.create", + // "parameterOrder": [], + // "parameters": {}, + // "path": "v1/registrations", + // "request": { + // "$ref": "Registration" + // }, + // "response": { + // "$ref": "Registration" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.rosters", + // "https://www.googleapis.com/auth/classroom.rosters.readonly" + // ] + // } + +} + +// method id "classroom.registrations.delete": + +type RegistrationsDeleteCall struct { + s *Service + registrationId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a `Registration`, causing Classroom to stop sending +// notifications +// for that `Registration`. +func (r *RegistrationsService) Delete(registrationId string) *RegistrationsDeleteCall { + c := &RegistrationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.registrationId = registrationId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegistrationsDeleteCall) Fields(s ...googleapi.Field) *RegistrationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RegistrationsDeleteCall) Context(ctx context.Context) *RegistrationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RegistrationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegistrationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/registrations/{registrationId}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "registrationId": c.registrationId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "classroom.registrations.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RegistrationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a `Registration`, causing Classroom to stop sending notifications\nfor that `Registration`.", + // "flatPath": "v1/registrations/{registrationId}", + // "httpMethod": "DELETE", + // "id": "classroom.registrations.delete", + // "parameterOrder": [ + // "registrationId" + // ], + // "parameters": { + // "registrationId": { + // "description": "The `registration_id` of the `Registration` to be deleted.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/registrations/{registrationId}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/classroom.rosters", + // "https://www.googleapis.com/auth/classroom.rosters.readonly" + // ] + // } + +} + // method id "classroom.userProfiles.get": type UserProfilesGetCall struct { diff --git a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json index 0d4a45926..3661b7a83 100644 --- a/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json +++ b/vendor/google.golang.org/api/cloudbuild/v1/cloudbuild-api.json @@ -1,4 +1,5 @@ { + "canonicalName": "Cloud Build", "auth": { "oauth2": { "scopes": { @@ -15,116 +16,80 @@ "title": "Google Cloud Container Builder API", "ownerName": "Google", "resources": { - "operations": { - "methods": { - "cancel": { - "request": { - "$ref": "CancelOperationRequest" - }, - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^operations/.+$", - "location": "path", - "description": "The name of the operation resource to be cancelled." - } - }, - "flatPath": "v1/operations/{operationsId}:cancel", - "path": "v1/{+name}:cancel", - "id": "cloudbuild.operations.cancel" - }, - "get": { - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^operations/.+$", - "location": "path", - "description": "The name of the operation resource.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/operations/{operationsId}", - "id": "cloudbuild.operations.get", - "path": "v1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - }, - "list": { - "id": "cloudbuild.operations.list", - "path": "v1/{+name}", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true, - "pattern": "^operations$" - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - } - }, - "flatPath": "v1/operations" - } - } - }, "projects": { "resources": { "builds": { "methods": { - "list": { - "httpMethod": "GET", + "create": { + "httpMethod": "POST", "parameterOrder": [ "projectId" ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the project.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/builds", + "path": "v1/projects/{projectId}/builds", + "id": "cloudbuild.projects.builds.create", + "description": "Starts a build with the specified configuration.\n\nThe long-running Operation returned by this method will include the ID of\nthe build, which can be passed to GetBuild to determine its status (e.g.,\nsuccess or failure).", + "request": { + "$ref": "Build" + } + }, + "cancel": { + "id": "cloudbuild.projects.builds.cancel", + "path": "v1/projects/{projectId}/builds/{id}:cancel", + "description": "Cancels a requested build in progress.", + "request": { + "$ref": "CancelBuildRequest" + }, + "response": { + "$ref": "Build" + }, + "parameterOrder": [ + "projectId", + "id" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the project.", + "type": "string", + "required": true + }, + "id": { + "location": "path", + "description": "ID of the build.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/builds/{id}:cancel" + }, + "list": { + "description": "Lists previously requested builds.\n\nPreviously requested builds may still be in-progress, or may have finished\nsuccessfully or unsuccessfully.", "response": { "$ref": "ListBuildsResponse" }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", "parameters": { "filter": { "description": "The raw filter text to constrain the results.", @@ -132,9 +97,9 @@ "location": "query" }, "pageToken": { + "location": "query", "description": "Token to provide to skip to a particular spot in the list.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { "format": "int32", @@ -153,12 +118,13 @@ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectId}/builds", - "path": "v1/projects/{projectId}/builds", "id": "cloudbuild.projects.builds.list", - "description": "Lists previously requested builds.\n\nPreviously requested builds may still be in-progress, or may have finished\nsuccessfully or unsuccessfully." + "path": "v1/projects/{projectId}/builds" }, "get": { - "httpMethod": "GET", + "id": "cloudbuild.projects.builds.get", + "path": "v1/projects/{projectId}/builds/{id}", + "description": "Returns information about a previously requested build.\n\nThe Build that is returned includes its status (e.g., success or failure,\nor in-progress), and timing information.", "parameterOrder": [ "projectId", "id" @@ -166,102 +132,100 @@ "response": { "$ref": "Build" }, + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "projectId": { + "location": "path", "description": "ID of the project.", "type": "string", - "required": true, - "location": "path" + "required": true }, "id": { + "location": "path", "description": "ID of the build.", "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/builds/{id}", - "path": "v1/projects/{projectId}/builds/{id}", - "id": "cloudbuild.projects.builds.get", - "description": "Returns information about a previously requested build.\n\nThe Build that is returned includes its status (e.g., success or failure,\nor in-progress), and timing information." - }, - "create": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "ID of the project.", - "type": "string", "required": true } }, - "flatPath": "v1/projects/{projectId}/builds", - "path": "v1/projects/{projectId}/builds", - "id": "cloudbuild.projects.builds.create", - "request": { - "$ref": "Build" - }, - "description": "Starts a build with the specified configuration.\n\nThe long-running Operation returned by this method will include the ID of\nthe build, which can be passed to GetBuild to determine its status (e.g.,\nsuccess or failure).", - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "Operation" - } - }, - "cancel": { - "path": "v1/projects/{projectId}/builds/{id}:cancel", - "id": "cloudbuild.projects.builds.cancel", - "request": { - "$ref": "CancelBuildRequest" - }, - "description": "Cancels a requested build in progress.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "id" - ], - "response": { - "$ref": "Build" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "id": { - "type": "string", - "required": true, - "location": "path", - "description": "ID of the build." - }, - "projectId": { - "location": "path", - "description": "ID of the project.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/builds/{id}:cancel" + "flatPath": "v1/projects/{projectId}/builds/{id}" } } }, "triggers": { "methods": { - "patch": { - "httpMethod": "PATCH", + "create": { + "flatPath": "v1/projects/{projectId}/triggers", + "id": "cloudbuild.projects.triggers.create", + "path": "v1/projects/{projectId}/triggers", + "description": "Creates a new BuildTrigger.\n\nThis API is experimental.", + "request": { + "$ref": "BuildTrigger" + }, + "response": { + "$ref": "BuildTrigger" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "ID of the project for which to configure automatic builds.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "id": "cloudbuild.projects.triggers.delete", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "description": "Deletes an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", + "response": { + "$ref": "Empty" + }, "parameterOrder": [ "projectId", "triggerId" ], + "httpMethod": "DELETE", + "parameters": { + "triggerId": { + "description": "ID of the BuildTrigger to delete.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "ID of the project that owns the trigger.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}" + }, + "patch": { "response": { "$ref": "BuildTrigger" }, + "parameterOrder": [ + "projectId", + "triggerId" + ], + "httpMethod": "PATCH", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "triggerId": { "location": "path", @@ -276,121 +240,53 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "path": "v1/projects/{projectId}/triggers/{triggerId}", "id": "cloudbuild.projects.triggers.patch", - "description": "Updates an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", + "path": "v1/projects/{projectId}/triggers/{triggerId}", "request": { "$ref": "BuildTrigger" - } + }, + "description": "Updates an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental." }, "list": { - "flatPath": "v1/projects/{projectId}/triggers", - "id": "cloudbuild.projects.triggers.list", "path": "v1/projects/{projectId}/triggers", + "id": "cloudbuild.projects.triggers.list", "description": "Lists existing BuildTrigger.\n\nThis API is experimental.", + "httpMethod": "GET", + "parameterOrder": [ + "projectId" + ], "response": { "$ref": "ListBuildTriggersResponse" }, - "parameterOrder": [ - "projectId" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" ], - "httpMethod": "GET", "parameters": { "projectId": { - "location": "path", "description": "ID of the project for which to list BuildTriggers.", "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "path": "v1/projects/{projectId}/triggers/{triggerId}", - "id": "cloudbuild.projects.triggers.get", - "description": "Gets information about a BuildTrigger.\n\nThis API is experimental.", - "httpMethod": "GET", - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "triggerId": { - "type": "string", - "required": true, - "location": "path", - "description": "ID of the BuildTrigger to get." - }, - "projectId": { - "location": "path", - "description": "ID of the project that owns the trigger.", - "type": "string", - "required": true - } - } - }, - "create": { - "description": "Creates a new BuildTrigger.\n\nThis API is experimental.", - "request": { - "$ref": "BuildTrigger" - }, - "response": { - "$ref": "BuildTrigger" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "location": "path", - "description": "ID of the project for which to configure automatic builds.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/triggers", - "id": "cloudbuild.projects.triggers.create", - "path": "v1/projects/{projectId}/triggers" - }, - "delete": { - "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", - "id": "cloudbuild.projects.triggers.delete", - "path": "v1/projects/{projectId}/triggers/{triggerId}", - "description": "Deletes an BuildTrigger by its project ID and trigger ID.\n\nThis API is experimental.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId", - "triggerId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "triggerId": { - "description": "ID of the BuildTrigger to delete.", - "type": "string", "required": true, "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/triggers" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "triggerId" + ], + "response": { + "$ref": "BuildTrigger" + }, + "parameters": { + "triggerId": { + "location": "path", + "description": "ID of the BuildTrigger to get.", + "type": "string", + "required": true }, "projectId": { "location": "path", @@ -398,30 +294,135 @@ "type": "string", "required": true } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/triggers/{triggerId}", + "path": "v1/projects/{projectId}/triggers/{triggerId}", + "id": "cloudbuild.projects.triggers.get", + "description": "Gets information about a BuildTrigger.\n\nThis API is experimental." } } } } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^operations/.+$", + "location": "path" + } + }, + "flatPath": "v1/operations/{operationsId}", + "path": "v1/{+name}", + "id": "cloudbuild.operations.get" + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true, + "pattern": "^operations$", + "location": "path" + }, + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1/operations", + "id": "cloudbuild.operations.list", + "path": "v1/{+name}" + }, + "cancel": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^operations/.+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/operations/{operationsId}:cancel", + "id": "cloudbuild.operations.cancel", + "path": "v1/{+name}:cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "request": { + "$ref": "CancelOperationRequest" + } + } + } } }, "parameters": { "pp": { - "default": "true", - "type": "boolean", "location": "query", - "description": "Pretty-print response." - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", @@ -433,23 +434,17 @@ "type": "boolean", "location": "query" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "fields": { "description": "Selector specifying which fields to include in a partial response.", "type": "string", "location": "query" }, - "callback": { - "description": "JSONP", + "uploadType": { "type": "string", - "location": "query" + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." }, "$.xgafv": { - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -459,7 +454,13 @@ "1", "2" ], - "description": "V1 error format." + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" }, "alt": { "enum": [ @@ -488,9 +489,9 @@ "type": "string" }, "quotaUser": { + "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" + "type": "string" } }, "version": "v1", @@ -499,333 +500,14 @@ "description": "Builds container images in the cloud.", "kind": "discovery#restDescription", "basePath": "", - "revision": "20170920", - "documentationLink": "https://cloud.google.com/container-builder/docs/", "id": "cloudbuild:v1", + "revision": "20170928", + "documentationLink": "https://cloud.google.com/container-builder/docs/", "discoveryVersion": "v1", "version_module": true, "schemas": { - "Status": { - "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - } - }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "BuildTrigger": { - "description": "Configuration for an automated build in response to source repository\nchanges.", - "type": "object", - "properties": { - "id": { - "description": "Unique identifier of the trigger.\n\n@OutputOnly", - "type": "string" - }, - "build": { - "description": "Contents of the build template.", - "$ref": "Build" - }, - "substitutions": { - "additionalProperties": { - "type": "string" - }, - "description": "Substitutions data for Build resource.", - "type": "object" - }, - "description": { - "description": "Human-readable description of this trigger.", - "type": "string" - }, - "disabled": { - "description": "If true, the trigger will never result in a build.", - "type": "boolean" - }, - "createTime": { - "format": "google-datetime", - "description": "Time when the trigger was created.\n\n@OutputOnly", - "type": "string" - }, - "filename": { - "description": "Path, from the source root, to a file whose contents is used for the\ntemplate.", - "type": "string" - }, - "triggerTemplate": { - "$ref": "RepoSource", - "description": "Template describing the types of source changes to trigger a build.\n\nBranch and tag names in trigger templates are interpreted as regular\nexpressions. Any branch or tag change that matches that regular expression\nwill trigger a build." - } - }, - "id": "BuildTrigger" - }, - "Build": { - "type": "object", - "properties": { - "buildTriggerId": { - "description": "The ID of the BuildTrigger that triggered this build, if it was\ntriggered automatically.\n@OutputOnly", - "type": "string" - }, - "tags": { - "description": "Tags for annotation of a Build. These are not docker tags.", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "Unique identifier of the build.\n@OutputOnly", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Time at which execution of the build was started.\n@OutputOnly", - "type": "string" - }, - "substitutions": { - "additionalProperties": { - "type": "string" - }, - "description": "Substitutions data for Build resource.", - "type": "object" - }, - "createTime": { - "format": "google-datetime", - "description": "Time at which the request to create the build was received.\n@OutputOnly", - "type": "string" - }, - "sourceProvenance": { - "$ref": "SourceProvenance", - "description": "A permanent fixed identifier for source.\n@OutputOnly" - }, - "images": { - "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images will be pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the Build resource's\nresults field.\n\nIf any of the images fail to be pushed, the build is marked FAILURE.", - "items": { - "type": "string" - }, - "type": "array" - }, - "projectId": { - "description": "ID of the project.\n@OutputOnly.", - "type": "string" - }, - "logUrl": { - "type": "string", - "description": "URL to logs for this build in Google Cloud Logging.\n@OutputOnly" - }, - "finishTime": { - "format": "google-datetime", - "description": "Time at which execution of the build was finished.\n\nThe difference between finish_time and start_time is the duration of the\nbuild's execution.\n@OutputOnly", - "type": "string" - }, - "options": { - "$ref": "BuildOptions", - "description": "Special options for this build." - }, - "source": { - "$ref": "Source", - "description": "Describes where to find the source files to build." - }, - "statusDetail": { - "description": "Customer-readable message about the current status.\n@OutputOnly", - "type": "string" - }, - "status": { - "description": "Status of the build.\n@OutputOnly", - "type": "string", - "enumDescriptions": [ - "Status of the build is unknown.", - "Build is queued; work has not yet begun.", - "Build is being executed.", - "Build finished successfully.", - "Build failed to complete successfully.", - "Build failed due to an internal cause.", - "Build took longer than was allowed.", - "Build was canceled by a user." - ], - "enum": [ - "STATUS_UNKNOWN", - "QUEUED", - "WORKING", - "SUCCESS", - "FAILURE", - "INTERNAL_ERROR", - "TIMEOUT", - "CANCELLED" - ] - }, - "timeout": { - "format": "google-duration", - "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be TIMEOUT.\n\nDefault time is ten minutes.", - "type": "string" - }, - "secrets": { - "description": "Secrets to decrypt using Cloud KMS.", - "items": { - "$ref": "Secret" - }, - "type": "array" - }, - "results": { - "$ref": "Results", - "description": "Results of the build.\n@OutputOnly" - }, - "logsBucket": { - "type": "string", - "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}/log-${build_id}.txt`." - }, - "steps": { - "description": "Describes the operations to be performed on the workspace.", - "items": { - "$ref": "BuildStep" - }, - "type": "array" - } - }, - "id": "Build", - "description": "A build resource in the Container Builder API.\n\nAt a high level, a Build describes where to find source code, how to build\nit (for example, the builder image to run on the source), and what tag to\napply to the built image when it is pushed to Google Container Registry.\n\nFields can include the following variables which will be expanded when the\nbuild is created:\n\n- $PROJECT_ID: the project ID of the build.\n- $BUILD_ID: the autogenerated ID of the build.\n- $REPO_NAME: the source repository name specified by RepoSource.\n- $BRANCH_NAME: the branch name specified by RepoSource.\n- $TAG_NAME: the tag name specified by RepoSource.\n- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or\n resolved from the specified branch or tag.\n- $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA." - }, - "CancelBuildRequest": { - "description": "Request to cancel an ongoing build.", - "type": "object", - "properties": {}, - "id": "CancelBuildRequest" - }, - "ListBuildsResponse": { - "description": "Response including listed builds.", - "type": "object", - "properties": { - "builds": { - "items": { - "$ref": "Build" - }, - "type": "array", - "description": "Builds will be sorted by create_time, descending." - }, - "nextPageToken": { - "description": "Token to receive the next page of results.", - "type": "string" - } - }, - "id": "ListBuildsResponse" - }, - "Volume": { - "type": "object", - "properties": { - "name": { - "description": "Name of the volume to mount.\n\nVolume names must be unique per build step and must be valid names for\nDocker volumes. Each named volume must be used by at least two build steps.", - "type": "string" - }, - "path": { - "description": "Path at which to mount the volume.\n\nPaths must be absolute and cannot conflict with other volume paths on the\nsame build step or with certain reserved volume paths.", - "type": "string" - } - }, - "id": "Volume", - "description": "Volume describes a Docker container volume which is mounted into build steps\nin order to persist files across build step execution." - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListOperationsResponse" - }, - "Source": { - "description": "Source describes the location of the source in a supported storage\nservice.", - "type": "object", - "properties": { - "repoSource": { - "description": "If provided, get source from this location in a Cloud Repo.", - "$ref": "RepoSource" - }, - "storageSource": { - "$ref": "StorageSource", - "description": "If provided, get the source from this location in Google Cloud Storage." - } - }, - "id": "Source" - }, - "BuildOptions": { - "description": "Optional arguments to enable specific features of builds.", - "type": "object", - "properties": { - "sourceProvenanceHash": { - "enumDescriptions": [ - "No hash requested.", - "Use a sha256 hash." - ], - "description": "Requested hash for SourceProvenance.", - "items": { - "enum": [ - "NONE", - "SHA256" - ], - "type": "string" - }, - "type": "array" - }, - "substitutionOption": { - "type": "string", - "enumDescriptions": [ - "Fails the build if error in substitutions checks, like missing\na substitution in the template or in the map.", - "Do not fail the build if error in substitutions checks." - ], - "enum": [ - "MUST_MATCH", - "ALLOW_LOOSE" - ], - "description": "SubstitutionOption to allow unmatch substitutions." - }, - "requestedVerifyOption": { - "enum": [ - "NOT_VERIFIED", - "VERIFIED" - ], - "description": "Requested verifiability options.", - "type": "string", - "enumDescriptions": [ - "Not a verifiable build. (default)", - "Verified build." - ] - } - }, - "id": "BuildOptions" - }, "StorageSource": { + "description": "StorageSource describes the location of the source in an archive file in\nGoogle Cloud Storage.", "type": "object", "properties": { "bucket": { @@ -842,42 +524,42 @@ "type": "string" } }, - "id": "StorageSource", - "description": "StorageSource describes the location of the source in an archive file in\nGoogle Cloud Storage." + "id": "StorageSource" }, "Results": { "description": "Results describes the artifacts created by the build pipeline.", "type": "object", "properties": { - "images": { - "description": "Images that were built as a part of the build.", - "items": { - "$ref": "BuiltImage" - }, - "type": "array" - }, "buildStepImages": { "description": "List of build step digests, in order corresponding to build step indices.", "items": { "type": "string" }, "type": "array" + }, + "images": { + "description": "Images that were built as a part of the build.", + "items": { + "$ref": "BuiltImage" + }, + "type": "array" } }, "id": "Results" }, "BuildOperationMetadata": { - "description": "Metadata for build operations.", - "type": "object", "properties": { "build": { - "$ref": "Build", - "description": "The build that the operation is tracking." + "description": "The build that the operation is tracking.", + "$ref": "Build" } }, - "id": "BuildOperationMetadata" + "id": "BuildOperationMetadata", + "description": "Metadata for build operations.", + "type": "object" }, "SourceProvenance": { + "id": "SourceProvenance", "description": "Provenance of the source. Ways to find the original source, or verify that\nsome source was used for this build.", "type": "object", "properties": { @@ -890,14 +572,13 @@ "$ref": "StorageSource" }, "fileHashes": { - "description": "Hash(es) of the build source, which can be used to verify that the original\nsource integrity was maintained in the build. Note that FileHashes will\nonly be populated if BuildOptions has requested a SourceProvenanceHash.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for the single path to that file.\n@OutputOnly", "type": "object", "additionalProperties": { "$ref": "FileHashes" - } + }, + "description": "Hash(es) of the build source, which can be used to verify that the original\nsource integrity was maintained in the build. Note that FileHashes will\nonly be populated if BuildOptions has requested a SourceProvenanceHash.\n\nThe keys to this map are file paths used as build source and the values\ncontain the hash values for those files.\n\nIf the build source came in a single package such as a gzipped tarfile\n(.tar.gz), the FileHash will be for the single path to that file.\n@OutputOnly" } - }, - "id": "SourceProvenance" + } }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", @@ -920,17 +601,23 @@ "id": "ListBuildTriggersResponse" }, "Operation": { - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", "type": "string" }, "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" }, "metadata": { "additionalProperties": { @@ -943,90 +630,33 @@ "done": { "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } } - } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." }, "BuiltImage": { + "description": "BuiltImage describes an image built by the pipeline.", "type": "object", "properties": { "name": { - "description": "Name used to push the container image to Google Container Registry, as\npresented to `docker push`.", - "type": "string" + "type": "string", + "description": "Name used to push the container image to Google Container Registry, as\npresented to `docker push`." }, "digest": { "description": "Docker Registry 2.0 digest.", "type": "string" } }, - "id": "BuiltImage", - "description": "BuiltImage describes an image built by the pipeline." - }, - "Hash": { - "description": "Container message for hash values.", - "type": "object", - "properties": { - "type": { - "description": "The type of hash that was performed.", - "type": "string", - "enumDescriptions": [ - "No hash requested.", - "Use a sha256 hash." - ], - "enum": [ - "NONE", - "SHA256" - ] - }, - "value": { - "format": "byte", - "description": "The hash value.", - "type": "string" - } - }, - "id": "Hash" - }, - "RepoSource": { - "description": "RepoSource describes the location of the source in a Google Cloud Source\nRepository.", - "type": "object", - "properties": { - "branchName": { - "description": "Name of the branch to build.", - "type": "string" - }, - "repoName": { - "description": "Name of the repo. If omitted, the name \"default\" is assumed.", - "type": "string" - }, - "projectId": { - "description": "ID of the project that owns the repo. If omitted, the project ID requesting\nthe build is assumed.", - "type": "string" - }, - "commitSha": { - "description": "Explicit commit SHA to build.", - "type": "string" - }, - "tagName": { - "description": "Name of the tag to build.", - "type": "string" - } - }, - "id": "RepoSource" + "id": "BuiltImage" }, "BuildStep": { "description": "BuildStep describes a step to perform in the build pipeline.", "type": "object", "properties": { "entrypoint": { - "description": "Optional entrypoint to be used instead of the build step image's default\nIf unset, the image's default will be used.", - "type": "string" + "type": "string", + "description": "Optional entrypoint to be used instead of the build step image's default\nIf unset, the image's default will be used." }, "secretEnv": { "items": { @@ -1058,11 +688,11 @@ "type": "array" }, "env": { + "description": "A list of environment variable definitions to be used when running a step.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\".", "items": { "type": "string" }, - "type": "array", - "description": "A list of environment variable definitions to be used when running a step.\n\nThe elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\"\nbeing given the value \"VALUE\"." + "type": "array" }, "args": { "description": "A list of arguments that will be presented to the step when it is started.\n\nIf the image used to run the step's container has an entrypoint, these args\nwill be used as arguments to that entrypoint. If the image does not define\nan entrypoint, the first element in args will be used as the entrypoint,\nand the remainder will be used as arguments.", @@ -1078,8 +708,58 @@ }, "id": "BuildStep" }, + "RepoSource": { + "id": "RepoSource", + "description": "RepoSource describes the location of the source in a Google Cloud Source\nRepository.", + "type": "object", + "properties": { + "commitSha": { + "description": "Explicit commit SHA to build.", + "type": "string" + }, + "tagName": { + "description": "Name of the tag to build.", + "type": "string" + }, + "branchName": { + "type": "string", + "description": "Name of the branch to build." + }, + "repoName": { + "description": "Name of the repo. If omitted, the name \"default\" is assumed.", + "type": "string" + }, + "projectId": { + "description": "ID of the project that owns the repo. If omitted, the project ID requesting\nthe build is assumed.", + "type": "string" + } + } + }, + "Hash": { + "description": "Container message for hash values.", + "type": "object", + "properties": { + "type": { + "enum": [ + "NONE", + "SHA256" + ], + "description": "The type of hash that was performed.", + "type": "string", + "enumDescriptions": [ + "No hash requested.", + "Use a sha256 hash." + ] + }, + "value": { + "type": "string", + "format": "byte", + "description": "The hash value." + } + }, + "id": "Hash" + }, "FileHashes": { - "id": "FileHashes", "description": "Container message for hashes of byte content of files, used in\nSourceProvenance messages to verify integrity of source input to the build.", "type": "object", "properties": { @@ -1090,32 +770,352 @@ }, "type": "array" } - } + }, + "id": "FileHashes" }, "Secret": { + "id": "Secret", "description": "Secret pairs a set of secret environment variables containing encrypted\nvalues with the Cloud KMS key to use to decrypt the value.", "type": "object", "properties": { "secretEnv": { - "description": "Map of environment variable name to its encrypted value.\n\nSecret environment variables must be unique across all of a build's\nsecrets, and must be used by at least one build step. Values can be at most\n1 KB in size. There can be at most ten secret values across all of a\nbuild's secrets.", - "type": "object", "additionalProperties": { "format": "byte", "type": "string" - } + }, + "description": "Map of environment variable name to its encrypted value.\n\nSecret environment variables must be unique across all of a build's\nsecrets, and must be used by at least one build step. Values can be at most\n1 KB in size. There can be at most ten secret values across all of a\nbuild's secrets.", + "type": "object" }, "kmsKeyName": { - "description": "Cloud KMS key name to use to decrypt these envs.", + "type": "string", + "description": "Cloud KMS key name to use to decrypt these envs." + } + } + }, + "Status": { + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array", + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + } + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "BuildTrigger": { + "id": "BuildTrigger", + "description": "Configuration for an automated build in response to source repository\nchanges.", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of the trigger.\n\n@OutputOnly", + "type": "string" + }, + "build": { + "description": "Contents of the build template.", + "$ref": "Build" + }, + "substitutions": { + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions data for Build resource.", + "type": "object" + }, + "description": { + "description": "Human-readable description of this trigger.", + "type": "string" + }, + "disabled": { + "description": "If true, the trigger will never result in a build.", + "type": "boolean" + }, + "createTime": { + "format": "google-datetime", + "description": "Time when the trigger was created.\n\n@OutputOnly", + "type": "string" + }, + "triggerTemplate": { + "description": "Template describing the types of source changes to trigger a build.\n\nBranch and tag names in trigger templates are interpreted as regular\nexpressions. Any branch or tag change that matches that regular expression\nwill trigger a build.", + "$ref": "RepoSource" + }, + "filename": { + "description": "Path, from the source root, to a file whose contents is used for the\ntemplate.", + "type": "string" + } + } + }, + "Build": { + "description": "A build resource in the Container Builder API.\n\nAt a high level, a Build describes where to find source code, how to build\nit (for example, the builder image to run on the source), and what tag to\napply to the built image when it is pushed to Google Container Registry.\n\nFields can include the following variables which will be expanded when the\nbuild is created:\n\n- $PROJECT_ID: the project ID of the build.\n- $BUILD_ID: the autogenerated ID of the build.\n- $REPO_NAME: the source repository name specified by RepoSource.\n- $BRANCH_NAME: the branch name specified by RepoSource.\n- $TAG_NAME: the tag name specified by RepoSource.\n- $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or\n resolved from the specified branch or tag.\n- $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.", + "type": "object", + "properties": { + "statusDetail": { + "description": "Customer-readable message about the current status.\n@OutputOnly", + "type": "string" + }, + "status": { + "enum": [ + "STATUS_UNKNOWN", + "QUEUED", + "WORKING", + "SUCCESS", + "FAILURE", + "INTERNAL_ERROR", + "TIMEOUT", + "CANCELLED" + ], + "description": "Status of the build.\n@OutputOnly", + "type": "string", + "enumDescriptions": [ + "Status of the build is unknown.", + "Build is queued; work has not yet begun.", + "Build is being executed.", + "Build finished successfully.", + "Build failed to complete successfully.", + "Build failed due to an internal cause.", + "Build took longer than was allowed.", + "Build was canceled by a user." + ] + }, + "timeout": { + "format": "google-duration", + "description": "Amount of time that this build should be allowed to run, to second\ngranularity. If this amount of time elapses, work on the build will cease\nand the build status will be TIMEOUT.\n\nDefault time is ten minutes.", + "type": "string" + }, + "secrets": { + "description": "Secrets to decrypt using Cloud KMS.", + "items": { + "$ref": "Secret" + }, + "type": "array" + }, + "logsBucket": { + "description": "Google Cloud Storage bucket where logs should be written (see\n[Bucket Name\nRequirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nLogs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", + "type": "string" + }, + "results": { + "description": "Results of the build.\n@OutputOnly", + "$ref": "Results" + }, + "steps": { + "description": "Describes the operations to be performed on the workspace.", + "items": { + "$ref": "BuildStep" + }, + "type": "array" + }, + "buildTriggerId": { + "type": "string", + "description": "The ID of the BuildTrigger that triggered this build, if it was\ntriggered automatically.\n@OutputOnly" + }, + "tags": { + "description": "Tags for annotation of a Build. These are not docker tags.", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "Unique identifier of the build.\n@OutputOnly", + "type": "string" + }, + "substitutions": { + "additionalProperties": { + "type": "string" + }, + "description": "Substitutions data for Build resource.", + "type": "object" + }, + "startTime": { + "format": "google-datetime", + "description": "Time at which execution of the build was started.\n@OutputOnly", + "type": "string" + }, + "sourceProvenance": { + "description": "A permanent fixed identifier for source.\n@OutputOnly", + "$ref": "SourceProvenance" + }, + "createTime": { + "format": "google-datetime", + "description": "Time at which the request to create the build was received.\n@OutputOnly", + "type": "string" + }, + "images": { + "description": "A list of images to be pushed upon the successful completion of all build\nsteps.\n\nThe images will be pushed using the builder service account's credentials.\n\nThe digests of the pushed images will be stored in the Build resource's\nresults field.\n\nIf any of the images fail to be pushed, the build is marked FAILURE.", + "items": { + "type": "string" + }, + "type": "array" + }, + "projectId": { + "description": "ID of the project.\n@OutputOnly.", + "type": "string" + }, + "logUrl": { + "description": "URL to logs for this build in Google Cloud Logging.\n@OutputOnly", + "type": "string" + }, + "finishTime": { + "type": "string", + "format": "google-datetime", + "description": "Time at which execution of the build was finished.\n\nThe difference between finish_time and start_time is the duration of the\nbuild's execution.\n@OutputOnly" + }, + "options": { + "$ref": "BuildOptions", + "description": "Special options for this build." + }, + "source": { + "$ref": "Source", + "description": "Describes where to find the source files to build." + } + }, + "id": "Build" + }, + "CancelBuildRequest": { + "description": "Request to cancel an ongoing build.", + "type": "object", + "properties": {}, + "id": "CancelBuildRequest" + }, + "Volume": { + "description": "Volume describes a Docker container volume which is mounted into build steps\nin order to persist files across build step execution.", + "type": "object", + "properties": { + "name": { + "description": "Name of the volume to mount.\n\nVolume names must be unique per build step and must be valid names for\nDocker volumes. Each named volume must be used by at least two build steps.", + "type": "string" + }, + "path": { + "description": "Path at which to mount the volume.\n\nPaths must be absolute and cannot conflict with other volume paths on the\nsame build step or with certain reserved volume paths.", "type": "string" } }, - "id": "Secret" + "id": "Volume" + }, + "ListBuildsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "description": "Token to receive the next page of results.", + "type": "string" + }, + "builds": { + "description": "Builds will be sorted by create_time, descending.", + "items": { + "$ref": "Build" + }, + "type": "array" + } + }, + "id": "ListBuildsResponse", + "description": "Response including listed builds." + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "Source": { + "properties": { + "storageSource": { + "description": "If provided, get the source from this location in Google Cloud Storage.", + "$ref": "StorageSource" + }, + "repoSource": { + "$ref": "RepoSource", + "description": "If provided, get source from this location in a Cloud Repo." + } + }, + "id": "Source", + "description": "Source describes the location of the source in a supported storage\nservice.", + "type": "object" + }, + "BuildOptions": { + "type": "object", + "properties": { + "sourceProvenanceHash": { + "items": { + "type": "string", + "enum": [ + "NONE", + "SHA256" + ] + }, + "type": "array", + "enumDescriptions": [ + "No hash requested.", + "Use a sha256 hash." + ], + "description": "Requested hash for SourceProvenance." + }, + "substitutionOption": { + "type": "string", + "enumDescriptions": [ + "Fails the build if error in substitutions checks, like missing\na substitution in the template or in the map.", + "Do not fail the build if error in substitutions checks." + ], + "enum": [ + "MUST_MATCH", + "ALLOW_LOOSE" + ], + "description": "SubstitutionOption to allow unmatch substitutions." + }, + "requestedVerifyOption": { + "enum": [ + "NOT_VERIFIED", + "VERIFIED" + ], + "description": "Requested verifiability options.", + "type": "string", + "enumDescriptions": [ + "Not a verifiable build. (default)", + "Verified build." + ] + } + }, + "id": "BuildOptions", + "description": "Optional arguments to enable specific features of builds." } }, - "protocol": "rest", "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "canonicalName": "Cloud Build" + "protocol": "rest" } diff --git a/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json b/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json index 8895afa9f..c8d952a28 100644 --- a/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json +++ b/vendor/google.golang.org/api/clouddebugger/v2/clouddebugger-api.json @@ -1,342 +1,19 @@ { + "version": "v2", + "baseUrl": "https://clouddebugger.googleapis.com/", + "kind": "discovery#restDescription", "description": "Examines the call stack and variables of a running application without stopping or slowing it down.\n", "servicePath": "", - "kind": "discovery#restDescription", "basePath": "", + "revision": "20170928", "documentationLink": "http://cloud.google.com/debugger", - "revision": "20170919", "id": "clouddebugger:v2", "discoveryVersion": "v1", "version_module": true, "schemas": { - "StatusMessage": { - "description": "Represents a contextual status message.\nThe message can indicate an error or informational status, and refer to\nspecific parts of the containing object.\nFor example, the `Breakpoint.status` field can indicate an error referring\nto the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.", - "type": "object", - "properties": { - "description": { - "description": "Status message text.", - "$ref": "FormatMessage" - }, - "isError": { - "description": "Distinguishes errors from informational messages.", - "type": "boolean" - }, - "refersTo": { - "enumDescriptions": [ - "Status doesn't refer to any particular input.", - "Status applies to the breakpoint and is related to its location.", - "Status applies to the breakpoint and is related to its condition.", - "Status applies to the breakpoint and is related to its expressions.", - "Status applies to the breakpoint and is related to its age.", - "Status applies to the entire variable.", - "Status applies to variable value (variable name is valid)." - ], - "enum": [ - "UNSPECIFIED", - "BREAKPOINT_SOURCE_LOCATION", - "BREAKPOINT_CONDITION", - "BREAKPOINT_EXPRESSION", - "BREAKPOINT_AGE", - "VARIABLE_NAME", - "VARIABLE_VALUE" - ], - "description": "Reference to which the message applies.", - "type": "string" - } - }, - "id": "StatusMessage" - }, - "GitSourceContext": { - "properties": { - "revisionId": { - "description": "Git commit hash.\nrequired.", - "type": "string" - }, - "url": { - "description": "Git repository URL.", - "type": "string" - } - }, - "id": "GitSourceContext", - "description": "A GitSourceContext denotes a particular revision in a third party Git\nrepository (e.g. GitHub).", - "type": "object" - }, - "Variable": { - "description": "Represents a variable or an argument possibly of a compound object type.\nNote how the following variables are represented:\n\n1) A simple variable:\n\n int x = 5\n\n { name: \"x\", value: \"5\", type: \"int\" } // Captured variable\n\n2) A compound object:\n\n struct T {\n int m1;\n int m2;\n };\n T x = { 3, 7 };\n\n { // Captured variable\n name: \"x\",\n type: \"T\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n3) A pointer where the pointee was captured:\n\n T x = { 3, 7 };\n T* p = &x;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00500500\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n4) A pointer where the pointee was not captured:\n\n T* p = new T;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00400400\"\n status { is_error: true, description { format: \"unavailable\" } }\n }\n\nThe status should describe the reason for the missing value,\nsuch as `\u003coptimized out\u003e`, `\u003cinaccessible\u003e`, `\u003cpointers limit reached\u003e`.\n\nNote that a null pointer should not have members.\n\n5) An unnamed value:\n\n int* p = new int(7);\n\n { // Captured variable\n name: \"p\",\n value: \"0x00500500\",\n type: \"int*\",\n members { value: \"7\", type: \"int\" } }\n\n6) An unnamed pointer where the pointee was not captured:\n\n int* p = new int(7);\n int** pp = &p;\n\n { // Captured variable\n name: \"pp\",\n value: \"0x00500500\",\n type: \"int**\",\n members {\n value: \"0x00400400\",\n type: \"int*\"\n status {\n is_error: true,\n description: { format: \"unavailable\" } }\n }\n }\n }\n\nTo optimize computation, memory and network traffic, variables that\nrepeat in the output multiple times can be stored once in a shared\nvariable table and be referenced using the `var_table_index` field. The\nvariables stored in the shared table are nameless and are essentially\na partition of the complete variable. To reconstruct the complete\nvariable, merge the referencing variable with the referenced variable.\n\nWhen using the shared variable table, the following variables:\n\n T x = { 3, 7 };\n T* p = &x;\n T& r = x;\n\n { name: \"x\", var_table_index: 3, type: \"T\" } // Captured variables\n { name: \"p\", value \"0x00500500\", type=\"T*\", var_table_index: 3 }\n { name: \"r\", type=\"T&\", var_table_index: 3 }\n\n { // Shared variable table entry #3:\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\nNote that the pointer address is stored with the referencing variable\nand not with the referenced variable. This allows the referenced variable\nto be shared between pointers and references.\n\nThe type field is optional. The debugger agent may or may not support it.", - "type": "object", - "properties": { - "members": { - "description": "Members contained or pointed to by the variable.", - "items": { - "$ref": "Variable" - }, - "type": "array" - }, - "status": { - "description": "Status associated with the variable. This field will usually stay\nunset. A status of a single variable only applies to that variable or\nexpression. The rest of breakpoint data still remains valid. Variables\nmight be reported in error state even when breakpoint is not in final\nstate.\n\nThe message may refer to variable name with `refers_to` set to\n`VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`.\nIn either case variable value and members will be unset.\n\nExample of error message applied to name: `Invalid expression syntax`.\n\nExample of information message applied to value: `Not captured`.\n\nExamples of error message applied to value:\n\n* `Malformed string`,\n* `Field f not found in class C`\n* `Null pointer dereference`", - "$ref": "StatusMessage" - }, - "name": { - "description": "Name of the variable, if any.", - "type": "string" - }, - "type": { - "description": "Variable type (e.g. `MyClass`). If the variable is split with\n`var_table_index`, `type` goes next to `value`. The interpretation of\na type is agent specific. It is recommended to include the dynamic type\nrather than a static type of an object.", - "type": "string" - }, - "value": { - "description": "Simple value of the variable.", - "type": "string" - }, - "varTableIndex": { - "format": "int32", - "description": "Reference to a variable in the shared variable table. More than\none variable can reference the same variable in the table. The\n`var_table_index` field is an index into `variable_table` in Breakpoint.", - "type": "integer" - } - }, - "id": "Variable" - }, - "StackFrame": { - "properties": { - "function": { - "description": "Demangled function name at the call site.", - "type": "string" - }, - "arguments": { - "description": "Set of arguments passed to this function.\nNote that this might not be populated for all stack frames.", - "items": { - "$ref": "Variable" - }, - "type": "array" - }, - "locals": { - "description": "Set of local variables at the stack frame location.\nNote that this might not be populated for all stack frames.", - "items": { - "$ref": "Variable" - }, - "type": "array" - }, - "location": { - "description": "Source location of the call site.", - "$ref": "SourceLocation" - } - }, - "id": "StackFrame", - "description": "Represents a stack frame context.", - "type": "object" - }, - "RepoId": { - "description": "A unique identifier for a cloud repo.", - "type": "object", - "properties": { - "projectRepoId": { - "description": "A combination of a project ID and a repo name.", - "$ref": "ProjectRepoId" - }, - "uid": { - "description": "A server-assigned, globally unique identifier.", - "type": "string" - } - }, - "id": "RepoId" - }, - "FormatMessage": { - "description": "Represents a message with parameters.", - "type": "object", - "properties": { - "parameters": { - "description": "Optional parameters to be embedded into the message.", - "items": { - "type": "string" - }, - "type": "array" - }, - "format": { - "description": "Format template for the message. The `format` uses placeholders `$0`,\n`$1`, etc. to reference parameters. `$$` can be used to denote the `$`\ncharacter.\n\nExamples:\n\n* `Failed to load '$0' which helps debug $1 the first time it\n is loaded. Again, $0 is very important.`\n* `Please pay $$10 to use $0 instead of $1.`", - "type": "string" - } - }, - "id": "FormatMessage" - }, - "ExtendedSourceContext": { - "description": "An ExtendedSourceContext is a SourceContext combined with additional\ndetails describing the context.", - "type": "object", - "properties": { - "context": { - "description": "Any source context.", - "$ref": "SourceContext" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels with user defined metadata.", - "type": "object" - } - }, - "id": "ExtendedSourceContext" - }, - "ListDebuggeesResponse": { - "description": "Response for listing debuggees.", - "type": "object", - "properties": { - "debuggees": { - "description": "List of debuggees accessible to the calling user.\nThe fields `debuggee.id` and `description` are guaranteed to be set.\nThe `description` field is a human readable field provided by agents and\ncan be displayed to users.", - "items": { - "$ref": "Debuggee" - }, - "type": "array" - } - }, - "id": "ListDebuggeesResponse" - }, - "AliasContext": { - "properties": { - "name": { - "description": "The alias name.", - "type": "string" - }, - "kind": { - "enumDescriptions": [ - "Do not use.", - "Git tag", - "Git branch", - "OTHER is used to specify non-standard aliases, those not of the kinds\nabove. For example, if a Git repo has a ref named \"refs/foo/bar\", it\nis considered to be of kind OTHER." - ], - "enum": [ - "ANY", - "FIXED", - "MOVABLE", - "OTHER" - ], - "description": "The alias kind.", - "type": "string" - } - }, - "id": "AliasContext", - "description": "An alias to a repo revision.", - "type": "object" - }, - "Empty": { - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" - }, - "SourceLocation": { - "properties": { - "path": { - "description": "Path to the source file within the source context of the target binary.", - "type": "string" - }, - "line": { - "format": "int32", - "description": "Line inside the file. The first line in the file has the value `1`.", - "type": "integer" - } - }, - "id": "SourceLocation", - "description": "Represents a location in the source code.", - "type": "object" - }, - "Debuggee": { - "properties": { - "project": { - "description": "Project the debuggee is associated with.\nUse project number or id when registering a Google Cloud Platform project.", - "type": "string" - }, - "isDisabled": { - "description": "If set to `true`, indicates that the agent should disable itself and\ndetach from the debuggee.", - "type": "boolean" - }, - "agentVersion": { - "description": "Version ID of the agent.\nSchema: `domain/language-platform/vmajor.minor` (for example\n`google.com/java-gcp/v1.1`).", - "type": "string" - }, - "id": { - "description": "Unique identifier for the debuggee generated by the controller service.", - "type": "string" - }, - "uniquifier": { - "description": "Uniquifier to further distiguish the application.\nIt is possible that different applications might have identical values in\nthe debuggee message, thus, incorrectly identified as a single application\nby the Controller service. This field adds salt to further distiguish the\napplication. Agents should consider seeding this field with value that\nidentifies the code, binary, configuration and environment.", - "type": "string" - }, - "description": { - "description": "Human readable description of the debuggee.\nIncluding a human-readable project name, environment name and version\ninformation is recommended.", - "type": "string" - }, - "sourceContexts": { - "description": "References to the locations and revisions of the source code used in the\ndeployed application.", - "items": { - "$ref": "SourceContext" - }, - "type": "array" - }, - "extSourceContexts": { - "description": "References to the locations and revisions of the source code used in the\ndeployed application.\n\nNOTE: this field is experimental and can be ignored.", - "items": { - "$ref": "ExtendedSourceContext" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "A set of custom debuggee properties, populated by the agent, to be\ndisplayed to the user.", - "type": "object" - }, - "status": { - "description": "Human readable message to be displayed to the user about this debuggee.\nAbsence of this field indicates no status. The message can be either\ninformational or an error status.", - "$ref": "StatusMessage" - }, - "isInactive": { - "description": "If set to `true`, indicates that Controller service does not detect any\nactivity from the debuggee agents and the application is possibly stopped.", - "type": "boolean" - } - }, - "id": "Debuggee", - "description": "Represents the debugged application. The application may include one or more\nreplicated processes executing the same code. Each of these processes is\nattached with a debugger agent, carrying out the debugging commands.\nAgents attached to the same debuggee identify themselves as such by using\nexactly the same Debuggee message value when registering.", - "type": "object" - }, - "ListActiveBreakpointsResponse": { - "description": "Response for listing active breakpoints.", - "type": "object", - "properties": { - "breakpoints": { - "description": "List of all active breakpoints.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.", - "items": { - "$ref": "Breakpoint" - }, - "type": "array" - }, - "waitExpired": { - "description": "If set to `true`, indicates that there is no change to the\nlist of active breakpoints and the server-selected timeout has expired.\nThe `breakpoints` field would be empty and should be ignored.", - "type": "boolean" - }, - "nextWaitToken": { - "description": "A token that can be used in the next method call to block until\nthe list of breakpoints changes.", - "type": "string" - } - }, - "id": "ListActiveBreakpointsResponse" - }, - "ProjectRepoId": { - "properties": { - "repoName": { - "description": "The name of the repo. Leave empty for the default repo.", - "type": "string" - }, - "projectId": { - "description": "The ID of the project.", - "type": "string" - } - }, - "id": "ProjectRepoId", - "description": "Selects a repo using a Google Cloud Platform project ID\n(e.g. winged-cargo-31) and a repo name within that project.", - "type": "object" - }, "CloudWorkspaceSourceContext": { + "description": "A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.", + "type": "object", "properties": { "snapshotId": { "description": "The ID of the snapshot.\nAn empty snapshot_id refers to the most recent snapshot.", @@ -347,14 +24,26 @@ "description": "The ID of the workspace." } }, - "id": "CloudWorkspaceSourceContext", - "description": "A CloudWorkspaceSourceContext denotes a workspace at a particular snapshot.", - "type": "object" + "id": "CloudWorkspaceSourceContext" + }, + "UpdateActiveBreakpointResponse": { + "description": "Response for updating an active breakpoint.\nThe message is defined to allow future extensions.", + "type": "object", + "properties": {}, + "id": "UpdateActiveBreakpointResponse" }, "GerritSourceContext": { "description": "A SourceContext referring to a Gerrit project.", "type": "object", "properties": { + "aliasContext": { + "description": "An alias, which may be a branch or tag.", + "$ref": "AliasContext" + }, + "gerritProject": { + "description": "The full project name within the host. Projects may be nested, so\n\"project/subproject\" is a valid project name.\nThe \"repo name\" is hostURI/project.", + "type": "string" + }, "revisionId": { "description": "A revision (commit) ID.", "type": "string" @@ -366,95 +55,47 @@ "aliasName": { "description": "The name of an alias (branch, tag, etc.).", "type": "string" - }, - "aliasContext": { - "description": "An alias, which may be a branch or tag.", - "$ref": "AliasContext" - }, - "gerritProject": { - "description": "The full project name within the host. Projects may be nested, so\n\"project/subproject\" is a valid project name.\nThe \"repo name\" is hostURI/project.", - "type": "string" } }, "id": "GerritSourceContext" }, - "UpdateActiveBreakpointResponse": { - "properties": {}, - "id": "UpdateActiveBreakpointResponse", - "description": "Response for updating an active breakpoint.\nThe message is defined to allow future extensions.", - "type": "object" - }, "CloudWorkspaceId": { "description": "A CloudWorkspaceId is a unique identifier for a cloud workspace.\nA cloud workspace is a place associated with a repo where modified files\ncan be stored before they are committed.", "type": "object", "properties": { + "repoId": { + "$ref": "RepoId", + "description": "The ID of the repo containing the workspace." + }, "name": { "description": "The unique name of the workspace within the repo. This is the name\nchosen by the client in the Source API's CreateWorkspace method.", "type": "string" - }, - "repoId": { - "description": "The ID of the repo containing the workspace.", - "$ref": "RepoId" } }, "id": "CloudWorkspaceId" }, "ListBreakpointsResponse": { + "description": "Response for listing breakpoints.", + "type": "object", "properties": { + "nextWaitToken": { + "description": "A wait token that can be used in the next call to `list` (REST) or\n`ListBreakpoints` (RPC) to block until the list of breakpoints has changes.", + "type": "string" + }, "breakpoints": { "description": "List of breakpoints matching the request.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.\nThe fields: `stack_frames`, `evaluated_expressions` and `variable_table`\nare cleared on each breakpoint regardless of its status.", "items": { "$ref": "Breakpoint" }, "type": "array" - }, - "nextWaitToken": { - "description": "A wait token that can be used in the next call to `list` (REST) or\n`ListBreakpoints` (RPC) to block until the list of breakpoints has changes.", - "type": "string" } }, - "id": "ListBreakpointsResponse", - "description": "Response for listing breakpoints.", - "type": "object" + "id": "ListBreakpointsResponse" }, "Breakpoint": { + "description": "Represents the breakpoint specification, status and results.", + "type": "object", "properties": { - "id": { - "description": "Breakpoint identifier, unique in the scope of the debuggee.", - "type": "string" - }, - "location": { - "description": "Breakpoint source location.", - "$ref": "SourceLocation" - }, - "finalTime": { - "format": "google-datetime", - "description": "Time this breakpoint was finalized as seen by the server in seconds\nresolution.", - "type": "string" - }, - "variableTable": { - "description": "The `variable_table` exists to aid with computation, memory and network\ntraffic optimization. It enables storing a variable once and reference\nit from multiple variables, including variables stored in the\n`variable_table` itself.\nFor example, the same `this` object, which may appear at many levels of\nthe stack, can have all of its data stored once in this table. The\nstack frame variables then would hold only a reference to it.\n\nThe variable `var_table_index` field is an index into this repeated field.\nThe stored objects are nameless and get their name from the referencing\nvariable. The effective variable is a merge of the referencing variable\nand the referenced variable.", - "items": { - "$ref": "Variable" - }, - "type": "array" - }, - "createTime": { - "format": "google-datetime", - "description": "Time this breakpoint was created by the server in seconds resolution.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "A set of custom breakpoint properties, populated by the agent, to be\ndisplayed to the user.", - "type": "object" - }, - "logMessageFormat": { - "description": "Only relevant when action is `LOG`. Defines the message to log when\nthe breakpoint hits. The message may include parameter placeholders `$0`,\n`$1`, etc. These placeholders are replaced with the evaluated value\nof the appropriate expression. Expressions not referenced in\n`log_message_format` are not logged.\n\nExample: `Message received, id = $0, count = $1` with\n`expressions` = `[ message.id, message.count ]`.", - "type": "string" - }, "expressions": { "description": "List of read-only expressions to evaluate at the breakpoint location.\nThe expressions are composed using expressions in the programming language\nat the source location. If the breakpoint action is `LOG`, the evaluated\nexpressions are included in log statements.", "items": { @@ -493,46 +134,69 @@ "type": "string" }, "action": { + "enumDescriptions": [ + "Capture stack frame and variables and update the breakpoint.\nThe data is only captured once. After that the breakpoint is set\nin a final state.", + "Log each breakpoint hit. The breakpoint remains active until\ndeleted or expired." + ], "enum": [ "CAPTURE", "LOG" ], "description": "Action that the agent should perform when the code at the\nbreakpoint location is hit.", - "type": "string", - "enumDescriptions": [ - "Capture stack frame and variables and update the breakpoint.\nThe data is only captured once. After that the breakpoint is set\nin a final state.", - "Log each breakpoint hit. The breakpoint remains active until\ndeleted or expired." - ] + "type": "string" }, "logLevel": { - "enum": [ - "INFO", - "WARNING", - "ERROR" - ], "description": "Indicates the severity of the log. Only relevant when action is `LOG`.", "type": "string", "enumDescriptions": [ "Information log message.", "Warning log message.", "Error log message." + ], + "enum": [ + "INFO", + "WARNING", + "ERROR" ] + }, + "id": { + "description": "Breakpoint identifier, unique in the scope of the debuggee.", + "type": "string" + }, + "location": { + "$ref": "SourceLocation", + "description": "Breakpoint source location." + }, + "finalTime": { + "format": "google-datetime", + "description": "Time this breakpoint was finalized as seen by the server in seconds\nresolution.", + "type": "string" + }, + "variableTable": { + "description": "The `variable_table` exists to aid with computation, memory and network\ntraffic optimization. It enables storing a variable once and reference\nit from multiple variables, including variables stored in the\n`variable_table` itself.\nFor example, the same `this` object, which may appear at many levels of\nthe stack, can have all of its data stored once in this table. The\nstack frame variables then would hold only a reference to it.\n\nThe variable `var_table_index` field is an index into this repeated field.\nThe stored objects are nameless and get their name from the referencing\nvariable. The effective variable is a merge of the referencing variable\nand the referenced variable.", + "items": { + "$ref": "Variable" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "A set of custom breakpoint properties, populated by the agent, to be\ndisplayed to the user.", + "type": "object" + }, + "logMessageFormat": { + "description": "Only relevant when action is `LOG`. Defines the message to log when\nthe breakpoint hits. The message may include parameter placeholders `$0`,\n`$1`, etc. These placeholders are replaced with the evaluated value\nof the appropriate expression. Expressions not referenced in\n`log_message_format` are not logged.\n\nExample: `Message received, id = $0, count = $1` with\n`expressions` = `[ message.id, message.count ]`.", + "type": "string" + }, + "createTime": { + "format": "google-datetime", + "description": "Time this breakpoint was created by the server in seconds resolution.", + "type": "string" } }, - "id": "Breakpoint", - "description": "Represents the breakpoint specification, status and results.", - "type": "object" - }, - "UpdateActiveBreakpointRequest": { - "properties": { - "breakpoint": { - "description": "Updated breakpoint information.\nThe field `id` must be set.\nThe agent must echo all Breakpoint specification fields in the update.", - "$ref": "Breakpoint" - } - }, - "id": "UpdateActiveBreakpointRequest", - "description": "Request to update an active breakpoint.", - "type": "object" + "id": "Breakpoint" }, "SetBreakpointResponse": { "description": "Response for setting a breakpoint.", @@ -545,8 +209,25 @@ }, "id": "SetBreakpointResponse" }, - "SourceContext": { + "UpdateActiveBreakpointRequest": { + "description": "Request to update an active breakpoint.", + "type": "object", "properties": { + "breakpoint": { + "$ref": "Breakpoint", + "description": "Updated breakpoint information.\nThe field `id` must be set.\nThe agent must echo all Breakpoint specification fields in the update." + } + }, + "id": "UpdateActiveBreakpointRequest" + }, + "SourceContext": { + "description": "A SourceContext is a reference to a tree of files. A SourceContext together\nwith a path point to a unique revision of a single file or directory.", + "type": "object", + "properties": { + "git": { + "description": "A SourceContext referring to any third party Git repo (e.g. GitHub).", + "$ref": "GitSourceContext" + }, "gerrit": { "$ref": "GerritSourceContext", "description": "A SourceContext referring to a Gerrit project." @@ -558,18 +239,18 @@ "cloudRepo": { "$ref": "CloudRepoSourceContext", "description": "A SourceContext referring to a revision in a cloud repo." - }, - "git": { - "description": "A SourceContext referring to any third party Git repo (e.g. GitHub).", - "$ref": "GitSourceContext" } }, - "id": "SourceContext", - "description": "A SourceContext is a reference to a tree of files. A SourceContext together\nwith a path point to a unique revision of a single file or directory.", - "type": "object" + "id": "SourceContext" }, "CloudRepoSourceContext": { + "description": "A CloudRepoSourceContext denotes a particular revision in a cloud\nrepo (a repo hosted by the Google Cloud Platform).", + "type": "object", "properties": { + "repoId": { + "description": "The ID of the repo.", + "$ref": "RepoId" + }, "aliasContext": { "description": "An alias, which may be a branch or tag.", "$ref": "AliasContext" @@ -581,64 +262,385 @@ "aliasName": { "description": "The name of an alias (branch, tag, etc.).", "type": "string" - }, - "repoId": { - "description": "The ID of the repo.", - "$ref": "RepoId" } }, - "id": "CloudRepoSourceContext", - "description": "A CloudRepoSourceContext denotes a particular revision in a cloud\nrepo (a repo hosted by the Google Cloud Platform).", - "type": "object" - }, - "RegisterDebuggeeRequest": { - "description": "Request to register a debuggee.", - "type": "object", - "properties": { - "debuggee": { - "description": "Debuggee information to register.\nThe fields `project`, `uniquifier`, `description` and `agent_version`\nof the debuggee must be set.", - "$ref": "Debuggee" - } - }, - "id": "RegisterDebuggeeRequest" + "id": "CloudRepoSourceContext" }, "RegisterDebuggeeResponse": { + "description": "Response for registering a debuggee.", + "type": "object", "properties": { "debuggee": { "description": "Debuggee resource.\nThe field `id` is guranteed to be set (in addition to the echoed fields).\nIf the field `is_disabled` is set to `true`, the agent should disable\nitself by removing all breakpoints and detaching from the application.\nIt should however continue to poll `RegisterDebuggee` until reenabled.", "$ref": "Debuggee" } }, - "id": "RegisterDebuggeeResponse", - "description": "Response for registering a debuggee.", - "type": "object" + "id": "RegisterDebuggeeResponse" + }, + "RegisterDebuggeeRequest": { + "description": "Request to register a debuggee.", + "type": "object", + "properties": { + "debuggee": { + "$ref": "Debuggee", + "description": "Debuggee information to register.\nThe fields `project`, `uniquifier`, `description` and `agent_version`\nof the debuggee must be set." + } + }, + "id": "RegisterDebuggeeRequest" }, "GetBreakpointResponse": { + "description": "Response for getting breakpoint information.", + "type": "object", "properties": { "breakpoint": { "description": "Complete breakpoint state.\nThe fields `id` and `location` are guaranteed to be set.", "$ref": "Breakpoint" } }, - "id": "GetBreakpointResponse", - "description": "Response for getting breakpoint information.", - "type": "object" + "id": "GetBreakpointResponse" + }, + "StatusMessage": { + "description": "Represents a contextual status message.\nThe message can indicate an error or informational status, and refer to\nspecific parts of the containing object.\nFor example, the `Breakpoint.status` field can indicate an error referring\nto the `BREAKPOINT_SOURCE_LOCATION` with the message `Location not found`.", + "type": "object", + "properties": { + "description": { + "$ref": "FormatMessage", + "description": "Status message text." + }, + "isError": { + "description": "Distinguishes errors from informational messages.", + "type": "boolean" + }, + "refersTo": { + "enumDescriptions": [ + "Status doesn't refer to any particular input.", + "Status applies to the breakpoint and is related to its location.", + "Status applies to the breakpoint and is related to its condition.", + "Status applies to the breakpoint and is related to its expressions.", + "Status applies to the breakpoint and is related to its age.", + "Status applies to the entire variable.", + "Status applies to variable value (variable name is valid)." + ], + "enum": [ + "UNSPECIFIED", + "BREAKPOINT_SOURCE_LOCATION", + "BREAKPOINT_CONDITION", + "BREAKPOINT_EXPRESSION", + "BREAKPOINT_AGE", + "VARIABLE_NAME", + "VARIABLE_VALUE" + ], + "description": "Reference to which the message applies.", + "type": "string" + } + }, + "id": "StatusMessage" + }, + "GitSourceContext": { + "description": "A GitSourceContext denotes a particular revision in a third party Git\nrepository (e.g. GitHub).", + "type": "object", + "properties": { + "revisionId": { + "description": "Git commit hash.\nrequired.", + "type": "string" + }, + "url": { + "description": "Git repository URL.", + "type": "string" + } + }, + "id": "GitSourceContext" + }, + "Variable": { + "description": "Represents a variable or an argument possibly of a compound object type.\nNote how the following variables are represented:\n\n1) A simple variable:\n\n int x = 5\n\n { name: \"x\", value: \"5\", type: \"int\" } // Captured variable\n\n2) A compound object:\n\n struct T {\n int m1;\n int m2;\n };\n T x = { 3, 7 };\n\n { // Captured variable\n name: \"x\",\n type: \"T\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n3) A pointer where the pointee was captured:\n\n T x = { 3, 7 };\n T* p = &x;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00500500\",\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\n4) A pointer where the pointee was not captured:\n\n T* p = new T;\n\n { // Captured variable\n name: \"p\",\n type: \"T*\",\n value: \"0x00400400\"\n status { is_error: true, description { format: \"unavailable\" } }\n }\n\nThe status should describe the reason for the missing value,\nsuch as `\u003coptimized out\u003e`, `\u003cinaccessible\u003e`, `\u003cpointers limit reached\u003e`.\n\nNote that a null pointer should not have members.\n\n5) An unnamed value:\n\n int* p = new int(7);\n\n { // Captured variable\n name: \"p\",\n value: \"0x00500500\",\n type: \"int*\",\n members { value: \"7\", type: \"int\" } }\n\n6) An unnamed pointer where the pointee was not captured:\n\n int* p = new int(7);\n int** pp = &p;\n\n { // Captured variable\n name: \"pp\",\n value: \"0x00500500\",\n type: \"int**\",\n members {\n value: \"0x00400400\",\n type: \"int*\"\n status {\n is_error: true,\n description: { format: \"unavailable\" } }\n }\n }\n }\n\nTo optimize computation, memory and network traffic, variables that\nrepeat in the output multiple times can be stored once in a shared\nvariable table and be referenced using the `var_table_index` field. The\nvariables stored in the shared table are nameless and are essentially\na partition of the complete variable. To reconstruct the complete\nvariable, merge the referencing variable with the referenced variable.\n\nWhen using the shared variable table, the following variables:\n\n T x = { 3, 7 };\n T* p = &x;\n T& r = x;\n\n { name: \"x\", var_table_index: 3, type: \"T\" } // Captured variables\n { name: \"p\", value \"0x00500500\", type=\"T*\", var_table_index: 3 }\n { name: \"r\", type=\"T&\", var_table_index: 3 }\n\n { // Shared variable table entry #3:\n members { name: \"m1\", value: \"3\", type: \"int\" },\n members { name: \"m2\", value: \"7\", type: \"int\" }\n }\n\nNote that the pointer address is stored with the referencing variable\nand not with the referenced variable. This allows the referenced variable\nto be shared between pointers and references.\n\nThe type field is optional. The debugger agent may or may not support it.", + "type": "object", + "properties": { + "members": { + "description": "Members contained or pointed to by the variable.", + "items": { + "$ref": "Variable" + }, + "type": "array" + }, + "status": { + "$ref": "StatusMessage", + "description": "Status associated with the variable. This field will usually stay\nunset. A status of a single variable only applies to that variable or\nexpression. The rest of breakpoint data still remains valid. Variables\nmight be reported in error state even when breakpoint is not in final\nstate.\n\nThe message may refer to variable name with `refers_to` set to\n`VARIABLE_NAME`. Alternatively `refers_to` will be set to `VARIABLE_VALUE`.\nIn either case variable value and members will be unset.\n\nExample of error message applied to name: `Invalid expression syntax`.\n\nExample of information message applied to value: `Not captured`.\n\nExamples of error message applied to value:\n\n* `Malformed string`,\n* `Field f not found in class C`\n* `Null pointer dereference`" + }, + "name": { + "description": "Name of the variable, if any.", + "type": "string" + }, + "type": { + "description": "Variable type (e.g. `MyClass`). If the variable is split with\n`var_table_index`, `type` goes next to `value`. The interpretation of\na type is agent specific. It is recommended to include the dynamic type\nrather than a static type of an object.", + "type": "string" + }, + "value": { + "description": "Simple value of the variable.", + "type": "string" + }, + "varTableIndex": { + "format": "int32", + "description": "Reference to a variable in the shared variable table. More than\none variable can reference the same variable in the table. The\n`var_table_index` field is an index into `variable_table` in Breakpoint.", + "type": "integer" + } + }, + "id": "Variable" + }, + "StackFrame": { + "description": "Represents a stack frame context.", + "type": "object", + "properties": { + "arguments": { + "description": "Set of arguments passed to this function.\nNote that this might not be populated for all stack frames.", + "items": { + "$ref": "Variable" + }, + "type": "array" + }, + "locals": { + "description": "Set of local variables at the stack frame location.\nNote that this might not be populated for all stack frames.", + "items": { + "$ref": "Variable" + }, + "type": "array" + }, + "location": { + "description": "Source location of the call site.", + "$ref": "SourceLocation" + }, + "function": { + "description": "Demangled function name at the call site.", + "type": "string" + } + }, + "id": "StackFrame" + }, + "RepoId": { + "description": "A unique identifier for a cloud repo.", + "type": "object", + "properties": { + "uid": { + "description": "A server-assigned, globally unique identifier.", + "type": "string" + }, + "projectRepoId": { + "description": "A combination of a project ID and a repo name.", + "$ref": "ProjectRepoId" + } + }, + "id": "RepoId" + }, + "FormatMessage": { + "description": "Represents a message with parameters.", + "type": "object", + "properties": { + "format": { + "description": "Format template for the message. The `format` uses placeholders `$0`,\n`$1`, etc. to reference parameters. `$$` can be used to denote the `$`\ncharacter.\n\nExamples:\n\n* `Failed to load '$0' which helps debug $1 the first time it\n is loaded. Again, $0 is very important.`\n* `Please pay $$10 to use $0 instead of $1.`", + "type": "string" + }, + "parameters": { + "description": "Optional parameters to be embedded into the message.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "FormatMessage" + }, + "ExtendedSourceContext": { + "description": "An ExtendedSourceContext is a SourceContext combined with additional\ndetails describing the context.", + "type": "object", + "properties": { + "labels": { + "description": "Labels with user defined metadata.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "context": { + "description": "Any source context.", + "$ref": "SourceContext" + } + }, + "id": "ExtendedSourceContext" + }, + "AliasContext": { + "description": "An alias to a repo revision.", + "type": "object", + "properties": { + "kind": { + "enumDescriptions": [ + "Do not use.", + "Git tag", + "Git branch", + "OTHER is used to specify non-standard aliases, those not of the kinds\nabove. For example, if a Git repo has a ref named \"refs/foo/bar\", it\nis considered to be of kind OTHER." + ], + "enum": [ + "ANY", + "FIXED", + "MOVABLE", + "OTHER" + ], + "description": "The alias kind.", + "type": "string" + }, + "name": { + "description": "The alias name.", + "type": "string" + } + }, + "id": "AliasContext" + }, + "ListDebuggeesResponse": { + "description": "Response for listing debuggees.", + "type": "object", + "properties": { + "debuggees": { + "description": "List of debuggees accessible to the calling user.\nThe fields `debuggee.id` and `description` are guaranteed to be set.\nThe `description` field is a human readable field provided by agents and\ncan be displayed to users.", + "items": { + "$ref": "Debuggee" + }, + "type": "array" + } + }, + "id": "ListDebuggeesResponse" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "SourceLocation": { + "description": "Represents a location in the source code.", + "type": "object", + "properties": { + "line": { + "format": "int32", + "description": "Line inside the file. The first line in the file has the value `1`.", + "type": "integer" + }, + "path": { + "description": "Path to the source file within the source context of the target binary.", + "type": "string" + } + }, + "id": "SourceLocation" + }, + "Debuggee": { + "description": "Represents the debugged application. The application may include one or more\nreplicated processes executing the same code. Each of these processes is\nattached with a debugger agent, carrying out the debugging commands.\nAgents attached to the same debuggee identify themselves as such by using\nexactly the same Debuggee message value when registering.", + "type": "object", + "properties": { + "uniquifier": { + "description": "Uniquifier to further distiguish the application.\nIt is possible that different applications might have identical values in\nthe debuggee message, thus, incorrectly identified as a single application\nby the Controller service. This field adds salt to further distiguish the\napplication. Agents should consider seeding this field with value that\nidentifies the code, binary, configuration and environment.", + "type": "string" + }, + "description": { + "description": "Human readable description of the debuggee.\nIncluding a human-readable project name, environment name and version\ninformation is recommended.", + "type": "string" + }, + "sourceContexts": { + "description": "References to the locations and revisions of the source code used in the\ndeployed application.", + "items": { + "$ref": "SourceContext" + }, + "type": "array" + }, + "extSourceContexts": { + "description": "References to the locations and revisions of the source code used in the\ndeployed application.\n\nNOTE: this field is experimental and can be ignored.", + "items": { + "$ref": "ExtendedSourceContext" + }, + "type": "array" + }, + "labels": { + "description": "A set of custom debuggee properties, populated by the agent, to be\ndisplayed to the user.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "status": { + "description": "Human readable message to be displayed to the user about this debuggee.\nAbsence of this field indicates no status. The message can be either\ninformational or an error status.", + "$ref": "StatusMessage" + }, + "isInactive": { + "description": "If set to `true`, indicates that Controller service does not detect any\nactivity from the debuggee agents and the application is possibly stopped.", + "type": "boolean" + }, + "project": { + "description": "Project the debuggee is associated with.\nUse project number or id when registering a Google Cloud Platform project.", + "type": "string" + }, + "isDisabled": { + "description": "If set to `true`, indicates that the agent should disable itself and\ndetach from the debuggee.", + "type": "boolean" + }, + "agentVersion": { + "description": "Version ID of the agent.\nSchema: `domain/language-platform/vmajor.minor` (for example\n`google.com/java-gcp/v1.1`).", + "type": "string" + }, + "id": { + "description": "Unique identifier for the debuggee generated by the controller service.", + "type": "string" + } + }, + "id": "Debuggee" + }, + "ListActiveBreakpointsResponse": { + "description": "Response for listing active breakpoints.", + "type": "object", + "properties": { + "waitExpired": { + "description": "If set to `true`, indicates that there is no change to the\nlist of active breakpoints and the server-selected timeout has expired.\nThe `breakpoints` field would be empty and should be ignored.", + "type": "boolean" + }, + "nextWaitToken": { + "description": "A token that can be used in the next method call to block until\nthe list of breakpoints changes.", + "type": "string" + }, + "breakpoints": { + "description": "List of all active breakpoints.\nThe fields `id` and `location` are guaranteed to be set on each breakpoint.", + "items": { + "$ref": "Breakpoint" + }, + "type": "array" + } + }, + "id": "ListActiveBreakpointsResponse" + }, + "ProjectRepoId": { + "description": "Selects a repo using a Google Cloud Platform project ID\n(e.g. winged-cargo-31) and a repo name within that project.", + "type": "object", + "properties": { + "repoName": { + "description": "The name of the repo. Leave empty for the default repo.", + "type": "string" + }, + "projectId": { + "description": "The ID of the project.", + "type": "string" + } + }, + "id": "ProjectRepoId" } }, "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, "protocol": "rest", "canonicalName": "Cloud Debugger", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, "https://www.googleapis.com/auth/cloud_debugger": { "description": "Manage cloud debugger" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } } @@ -653,178 +655,6 @@ "debugger": { "resources": { "debuggees": { - "resources": { - "breakpoints": { - "methods": { - "delete": { - "description": "Deletes the breakpoint from the debuggee.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "debuggeeId", - "breakpointId" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "parameters": { - "clientVersion": { - "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string", - "location": "query" - }, - "breakpointId": { - "location": "path", - "description": "ID of the breakpoint to delete.", - "type": "string", - "required": true - }, - "debuggeeId": { - "location": "path", - "description": "ID of the debuggee whose breakpoint to delete.", - "type": "string", - "required": true - } - }, - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "id": "clouddebugger.debugger.debuggees.breakpoints.delete", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}" - }, - "set": { - "httpMethod": "POST", - "parameterOrder": [ - "debuggeeId" - ], - "response": { - "$ref": "SetBreakpointResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "parameters": { - "debuggeeId": { - "description": "ID of the debuggee where the breakpoint is to be set.", - "type": "string", - "required": true, - "location": "path" - }, - "clientVersion": { - "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string", - "location": "query" - } - }, - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", - "id": "clouddebugger.debugger.debuggees.breakpoints.set", - "request": { - "$ref": "Breakpoint" - }, - "description": "Sets the breakpoint to the debuggee." - }, - "list": { - "response": { - "$ref": "ListBreakpointsResponse" - }, - "parameterOrder": [ - "debuggeeId" - ], - "httpMethod": "GET", - "parameters": { - "stripResults": { - "description": "This field is deprecated. The following fields are always stripped out of\nthe result: `stack_frames`, `evaluated_expressions` and `variable_table`.", - "type": "boolean", - "location": "query" - }, - "debuggeeId": { - "description": "ID of the debuggee whose breakpoints to list.", - "type": "string", - "required": true, - "location": "path" - }, - "waitToken": { - "description": "A wait token that, if specified, blocks the call until the breakpoints\nlist has changed, or a server selected timeout has expired. The value\nshould be set from the last response. The error code\n`google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which\nshould be called again with the same `wait_token`.", - "type": "string", - "location": "query" - }, - "clientVersion": { - "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string", - "location": "query" - }, - "action.value": { - "location": "query", - "enum": [ - "CAPTURE", - "LOG" - ], - "description": "Only breakpoints with the specified action will pass the filter.", - "type": "string" - }, - "includeInactive": { - "description": "When set to `true`, the response includes active and inactive\nbreakpoints. Otherwise, it includes only active breakpoints.", - "type": "boolean", - "location": "query" - }, - "includeAllUsers": { - "location": "query", - "description": "When set to `true`, the response includes the list of breakpoints set by\nany user. Otherwise, it includes only breakpoints set by the caller.", - "type": "boolean" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints", - "id": "clouddebugger.debugger.debuggees.breakpoints.list", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints", - "description": "Lists all breakpoints for the debuggee." - }, - "get": { - "description": "Gets breakpoint information.", - "response": { - "$ref": "GetBreakpointResponse" - }, - "parameterOrder": [ - "debuggeeId", - "breakpointId" - ], - "httpMethod": "GET", - "parameters": { - "clientVersion": { - "location": "query", - "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", - "type": "string" - }, - "breakpointId": { - "description": "ID of the breakpoint to get.", - "type": "string", - "required": true, - "location": "path" - }, - "debuggeeId": { - "description": "ID of the debuggee whose breakpoint to get.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", - "id": "clouddebugger.debugger.debuggees.breakpoints.get", - "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}" - } - } - } - }, "methods": { "list": { "response": { @@ -858,6 +688,178 @@ "path": "v2/debugger/debuggees", "description": "Lists all the debuggees that the user has access to." } + }, + "resources": { + "breakpoints": { + "methods": { + "list": { + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints", + "id": "clouddebugger.debugger.debuggees.breakpoints.list", + "description": "Lists all breakpoints for the debuggee.", + "httpMethod": "GET", + "parameterOrder": [ + "debuggeeId" + ], + "response": { + "$ref": "ListBreakpointsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "stripResults": { + "description": "This field is deprecated. The following fields are always stripped out of\nthe result: `stack_frames`, `evaluated_expressions` and `variable_table`.", + "type": "boolean", + "location": "query" + }, + "debuggeeId": { + "description": "ID of the debuggee whose breakpoints to list.", + "type": "string", + "required": true, + "location": "path" + }, + "waitToken": { + "location": "query", + "description": "A wait token that, if specified, blocks the call until the breakpoints\nlist has changed, or a server selected timeout has expired. The value\nshould be set from the last response. The error code\n`google.rpc.Code.ABORTED` (RPC) is returned on wait timeout, which\nshould be called again with the same `wait_token`.", + "type": "string" + }, + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + }, + "action.value": { + "description": "Only breakpoints with the specified action will pass the filter.", + "type": "string", + "location": "query", + "enum": [ + "CAPTURE", + "LOG" + ] + }, + "includeInactive": { + "location": "query", + "description": "When set to `true`, the response includes active and inactive\nbreakpoints. Otherwise, it includes only active breakpoints.", + "type": "boolean" + }, + "includeAllUsers": { + "description": "When set to `true`, the response includes the list of breakpoints set by\nany user. Otherwise, it includes only breakpoints set by the caller.", + "type": "boolean", + "location": "query" + } + } + }, + "get": { + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "id": "clouddebugger.debugger.debuggees.breakpoints.get", + "description": "Gets breakpoint information.", + "httpMethod": "GET", + "parameterOrder": [ + "debuggeeId", + "breakpointId" + ], + "response": { + "$ref": "GetBreakpointResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + }, + "breakpointId": { + "location": "path", + "description": "ID of the breakpoint to get.", + "type": "string", + "required": true + }, + "debuggeeId": { + "location": "path", + "description": "ID of the debuggee whose breakpoint to get.", + "type": "string", + "required": true + } + } + }, + "delete": { + "description": "Deletes the breakpoint from the debuggee.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "debuggeeId", + "breakpointId" + ], + "httpMethod": "DELETE", + "parameters": { + "debuggeeId": { + "description": "ID of the debuggee whose breakpoint to delete.", + "type": "string", + "required": true, + "location": "path" + }, + "clientVersion": { + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string", + "location": "query" + }, + "breakpointId": { + "location": "path", + "description": "ID of the breakpoint to delete.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}", + "id": "clouddebugger.debugger.debuggees.breakpoints.delete", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/{breakpointId}" + }, + "set": { + "description": "Sets the breakpoint to the debuggee.", + "request": { + "$ref": "Breakpoint" + }, + "response": { + "$ref": "SetBreakpointResponse" + }, + "parameterOrder": [ + "debuggeeId" + ], + "httpMethod": "POST", + "parameters": { + "debuggeeId": { + "description": "ID of the debuggee where the breakpoint is to be set.", + "type": "string", + "required": true, + "location": "path" + }, + "clientVersion": { + "location": "query", + "description": "The client version making the call.\nSchema: `domain/type/version` (e.g., `google.com/intellij/v1`).", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set", + "id": "clouddebugger.debugger.debuggees.breakpoints.set", + "path": "v2/debugger/debuggees/{debuggeeId}/breakpoints/set" + } + } + } } } } @@ -865,10 +867,73 @@ "controller": { "resources": { "debuggees": { + "methods": { + "register": { + "response": { + "$ref": "RegisterDebuggeeResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "flatPath": "v2/controller/debuggees/register", + "id": "clouddebugger.controller.debuggees.register", + "path": "v2/controller/debuggees/register", + "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application must call this method with\nexactly the same request content to get back the same stable `debuggee_id`.\nAgents should call this method again whenever `google.rpc.Code.NOT_FOUND`\nis returned from any controller method.\n\nThis protocol allows the controller service to disable debuggees, recover\nfrom data loss, or change the `debuggee_id` format. Agents must handle\n`debuggee_id` value changing upon re-registration.", + "request": { + "$ref": "RegisterDebuggeeRequest" + } + } + }, "resources": { "breakpoints": { "methods": { + "list": { + "response": { + "$ref": "ListActiveBreakpointsResponse" + }, + "parameterOrder": [ + "debuggeeId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud_debugger" + ], + "parameters": { + "successOnTimeout": { + "location": "query", + "description": "If set to `true` (recommended), returns `google.rpc.Code.OK` status and\nsets the `wait_expired` response field to `true` when the server-selected\ntimeout has expired.\n\nIf set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status\nwhen the server-selected timeout has expired.", + "type": "boolean" + }, + "debuggeeId": { + "description": "Identifies the debuggee.", + "type": "string", + "required": true, + "location": "path" + }, + "waitToken": { + "location": "query", + "description": "A token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server-selected timeout has\nexpired. The value should be set from the `next_wait_token` field in\nthe last response. The initial value should be set to `\"init\"`.", + "type": "string" + } + }, + "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints", + "id": "clouddebugger.controller.debuggees.breakpoints.list", + "path": "v2/controller/debuggees/{debuggeeId}/breakpoints", + "description": "Returns the list of all active breakpoints for the debuggee.\n\nThe breakpoint specification (`location`, `condition`, and `expressions`\nfields) is semantically immutable, although the field values may\nchange. For example, an agent may update the location line number\nto reflect the actual line where the breakpoint was set, but this\ndoesn't change the breakpoint semantics.\n\nThis means that an agent does not need to check if a breakpoint has changed\nwhen it encounters the same breakpoint on a successive call.\nMoreover, an agent should remember the breakpoints that are completed\nuntil the controller removes them from the active list to avoid\nsetting those breakpoints again." + }, "update": { + "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", + "path": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", + "id": "clouddebugger.controller.debuggees.breakpoints.update", + "request": { + "$ref": "UpdateActiveBreakpointRequest" + }, + "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller service.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expressions` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code.", "httpMethod": "PUT", "parameterOrder": [ "debuggeeId", @@ -882,96 +947,49 @@ "https://www.googleapis.com/auth/cloud_debugger" ], "parameters": { - "id": { + "debuggeeId": { "location": "path", - "description": "Breakpoint identifier, unique in the scope of the debuggee.", + "description": "Identifies the debuggee being debugged.", "type": "string", "required": true }, - "debuggeeId": { - "description": "Identifies the debuggee being debugged.", + "id": { + "description": "Breakpoint identifier, unique in the scope of the debuggee.", "type": "string", "required": true, "location": "path" } - }, - "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", - "path": "v2/controller/debuggees/{debuggeeId}/breakpoints/{id}", - "id": "clouddebugger.controller.debuggees.breakpoints.update", - "request": { - "$ref": "UpdateActiveBreakpointRequest" - }, - "description": "Updates the breakpoint state or mutable fields.\nThe entire Breakpoint message must be sent back to the controller service.\n\nUpdates to active breakpoint fields are only allowed if the new value\ndoes not change the breakpoint specification. Updates to the `location`,\n`condition` and `expressions` fields should not alter the breakpoint\nsemantics. These may only make changes such as canonicalizing a value\nor snapping the location to the correct line of code." - }, - "list": { - "path": "v2/controller/debuggees/{debuggeeId}/breakpoints", - "id": "clouddebugger.controller.debuggees.breakpoints.list", - "description": "Returns the list of all active breakpoints for the debuggee.\n\nThe breakpoint specification (`location`, `condition`, and `expressions`\nfields) is semantically immutable, although the field values may\nchange. For example, an agent may update the location line number\nto reflect the actual line where the breakpoint was set, but this\ndoesn't change the breakpoint semantics.\n\nThis means that an agent does not need to check if a breakpoint has changed\nwhen it encounters the same breakpoint on a successive call.\nMoreover, an agent should remember the breakpoints that are completed\nuntil the controller removes them from the active list to avoid\nsetting those breakpoints again.", - "httpMethod": "GET", - "parameterOrder": [ - "debuggeeId" - ], - "response": { - "$ref": "ListActiveBreakpointsResponse" - }, - "parameters": { - "waitToken": { - "location": "query", - "description": "A token that, if specified, blocks the method call until the list\nof active breakpoints has changed, or a server-selected timeout has\nexpired. The value should be set from the `next_wait_token` field in\nthe last response. The initial value should be set to `\"init\"`.", - "type": "string" - }, - "successOnTimeout": { - "description": "If set to `true` (recommended), returns `google.rpc.Code.OK` status and\nsets the `wait_expired` response field to `true` when the server-selected\ntimeout has expired.\n\nIf set to `false` (deprecated), returns `google.rpc.Code.ABORTED` status\nwhen the server-selected timeout has expired.", - "type": "boolean", - "location": "query" - }, - "debuggeeId": { - "description": "Identifies the debuggee.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/controller/debuggees/{debuggeeId}/breakpoints" + } } } } - }, - "methods": { - "register": { - "description": "Registers the debuggee with the controller service.\n\nAll agents attached to the same application must call this method with\nexactly the same request content to get back the same stable `debuggee_id`.\nAgents should call this method again whenever `google.rpc.Code.NOT_FOUND`\nis returned from any controller method.\n\nThis protocol allows the controller service to disable debuggees, recover\nfrom data loss, or change the `debuggee_id` format. Agents must handle\n`debuggee_id` value changing upon re-registration.", - "request": { - "$ref": "RegisterDebuggeeRequest" - }, - "response": { - "$ref": "RegisterDebuggeeResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud_debugger" - ], - "flatPath": "v2/controller/debuggees/register", - "id": "clouddebugger.controller.debuggees.register", - "path": "v2/controller/debuggees/register" - } } } } } }, "parameters": { - "upload_protocol": { + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "description": "OAuth bearer token.", "type": "string" }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, "prettyPrint": { "location": "query", "description": "Returns response with indentations and line breaks.", @@ -979,9 +997,9 @@ "type": "boolean" }, "uploadType": { + "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "fields": { "location": "query", @@ -989,9 +1007,9 @@ "type": "string" }, "callback": { + "location": "query", "description": "JSONP", - "type": "string", - "location": "query" + "type": "string" }, "$.xgafv": { "enumDescriptions": [ @@ -1023,9 +1041,9 @@ "location": "query" }, "key": { - "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" + "type": "string", + "location": "query" }, "access_token": { "location": "query", @@ -1033,27 +1051,9 @@ "type": "string" }, "quotaUser": { - "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", "type": "string", "location": "query" } - }, - "version": "v2", - "baseUrl": "https://clouddebugger.googleapis.com/" + } } diff --git a/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json b/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json index 6378780f9..042f7a652 100644 --- a/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json +++ b/vendor/google.golang.org/api/clouderrorreporting/v1beta1/clouderrorreporting-api.json @@ -1,15 +1,4 @@ { - "canonicalName": "Clouderrorreporting", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://clouderrorreporting.googleapis.com/", "ownerDomain": "google.com", "name": "clouderrorreporting", "batchPath": "batch", @@ -19,28 +8,28 @@ "projects": { "methods": { "deleteEvents": { - "httpMethod": "DELETE", "response": { "$ref": "DeleteEventsResponse" }, "parameterOrder": [ "projectName" ], + "httpMethod": "DELETE", "parameters": { "projectName": { + "pattern": "^projects/[^/]+$", + "location": "path", "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta1/projects/{projectsId}/events", - "path": "v1beta1/{+projectName}/events", "id": "clouderrorreporting.projects.deleteEvents", + "path": "v1beta1/{+projectName}/events", "description": "Deletes all error events of a given project." } }, @@ -48,25 +37,21 @@ "events": { "methods": { "list": { + "path": "v1beta1/{+projectName}/events", + "id": "clouderrorreporting.projects.events.list", + "description": "Lists the specified events.", + "httpMethod": "GET", "response": { "$ref": "ListEventsResponse" }, "parameterOrder": [ "projectName" ], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "serviceFilter.resourceType": { - "location": "query", - "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", - "type": "string" - }, "timeRange.period": { - "description": "Restricts the query to the specified time range.", - "type": "string", "location": "query", "enum": [ "PERIOD_UNSPECIFIED", @@ -75,29 +60,31 @@ "PERIOD_1_DAY", "PERIOD_1_WEEK", "PERIOD_30_DAYS" - ] + ], + "description": "Restricts the query to the specified time range.", + "type": "string" }, "projectName": { + "location": "path", "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas `projects/` plus the\n[Google Cloud Platform project\nID](https://support.google.com/cloud/answer/6158840).\nExample: `projects/my-project-123`.", "type": "string", "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" + "pattern": "^projects/[^/]+$" }, "groupId": { + "location": "query", "description": "[Required] The group for which events shall be returned.", + "type": "string" + }, + "pageToken": { + "description": "[Optional] A `next_page_token` provided by a previous response.", "type": "string", "location": "query" }, "serviceFilter.service": { - "location": "query", "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "[Optional] A `next_page_token` provided by a previous response.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "location": "query", @@ -106,19 +93,19 @@ "type": "integer" }, "serviceFilter.version": { + "location": "query", "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", + "type": "string" + }, + "serviceFilter.resourceType": { + "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", "type": "string", "location": "query" } }, - "flatPath": "v1beta1/projects/{projectsId}/events", - "id": "clouderrorreporting.projects.events.list", - "path": "v1beta1/{+projectName}/events", - "description": "Lists the specified events." + "flatPath": "v1beta1/projects/{projectsId}/events" }, "report": { - "path": "v1beta1/{+projectName}/events:report", - "id": "clouderrorreporting.projects.events.report", "request": { "$ref": "ReportedErrorEvent" }, @@ -142,7 +129,9 @@ "required": true } }, - "flatPath": "v1beta1/projects/{projectsId}/events:report" + "flatPath": "v1beta1/projects/{projectsId}/events:report", + "path": "v1beta1/{+projectName}/events:report", + "id": "clouderrorreporting.projects.events.report" } } }, @@ -156,16 +145,56 @@ "projectName" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { - "pageToken": { + "serviceFilter.version": { + "type": "string", "location": "query", - "description": "[Optional] A `next_page_token` provided by a previous response. To view\nadditional results, pass this token along with the identical query\nparameters as the first request.", + "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version)." + }, + "order": { + "description": "[Optional] The sort order in which the results are returned.\nDefault is `COUNT_DESC`.", + "type": "string", + "location": "query", + "enum": [ + "GROUP_ORDER_UNSPECIFIED", + "COUNT_DESC", + "LAST_SEEN_DESC", + "CREATED_DESC", + "AFFECTED_USERS_DESC" + ] + }, + "serviceFilter.resourceType": { + "location": "query", + "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", "type": "string" }, + "alignmentTime": { + "location": "query", + "format": "google-datetime", + "description": "[Optional] Time where the timed counts shall be aligned if rounded\nalignment is chosen. Default is 00:00 UTC.", + "type": "string" + }, + "projectName": { + "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas \u003ccode\u003eprojects/\u003c/code\u003e plus the\n\u003ca href=\"https://support.google.com/cloud/answer/6158840\"\u003eGoogle Cloud\nPlatform project ID\u003c/a\u003e.\n\nExample: \u003ccode\u003eprojects/my-project-123\u003c/code\u003e.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + }, + "timedCountDuration": { + "format": "google-duration", + "description": "[Optional] The preferred duration for a single returned `TimedCount`.\nIf not set, no timed counts are returned.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "[Optional] A `next_page_token` provided by a previous response. To view\nadditional results, pass this token along with the identical query\nparameters as the first request.", + "type": "string", + "location": "query" + }, "timeRange.period": { + "description": "Restricts the query to the specified time range.", + "type": "string", "location": "query", "enum": [ "PERIOD_UNSPECIFIED", @@ -174,9 +203,7 @@ "PERIOD_1_DAY", "PERIOD_1_WEEK", "PERIOD_30_DAYS" - ], - "description": "Restricts the query to the specified time range.", - "type": "string" + ] }, "alignment": { "location": "query", @@ -189,64 +216,26 @@ "type": "string" }, "groupId": { - "description": "[Optional] List all \u003ccode\u003eErrorGroupStats\u003c/code\u003e with these IDs.", - "type": "string", "repeated": true, - "location": "query" + "location": "query", + "description": "[Optional] List all \u003ccode\u003eErrorGroupStats\u003c/code\u003e with these IDs.", + "type": "string" }, "serviceFilter.service": { + "location": "query", "description": "[Optional] The exact value to match against\n[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service).", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { + "type": "integer", "location": "query", "format": "int32", - "description": "[Optional] The maximum number of results to return per response.\nDefault is 20.", - "type": "integer" - }, - "order": { - "location": "query", - "enum": [ - "GROUP_ORDER_UNSPECIFIED", - "COUNT_DESC", - "LAST_SEEN_DESC", - "CREATED_DESC", - "AFFECTED_USERS_DESC" - ], - "description": "[Optional] The sort order in which the results are returned.\nDefault is `COUNT_DESC`.", - "type": "string" - }, - "serviceFilter.version": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version).", - "type": "string", - "location": "query" - }, - "serviceFilter.resourceType": { - "description": "[Optional] The exact value to match against\n[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type).", - "type": "string", - "location": "query" - }, - "alignmentTime": { - "format": "google-datetime", - "description": "[Optional] Time where the timed counts shall be aligned if rounded\nalignment is chosen. Default is 00:00 UTC.", - "type": "string", - "location": "query" - }, - "projectName": { - "location": "path", - "description": "[Required] The resource name of the Google Cloud Platform project. Written\nas \u003ccode\u003eprojects/\u003c/code\u003e plus the\n\u003ca href=\"https://support.google.com/cloud/answer/6158840\"\u003eGoogle Cloud\nPlatform project ID\u003c/a\u003e.\n\nExample: \u003ccode\u003eprojects/my-project-123\u003c/code\u003e.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" - }, - "timedCountDuration": { - "location": "query", - "format": "google-duration", - "description": "[Optional] The preferred duration for a single returned `TimedCount`.\nIf not set, no timed counts are returned.", - "type": "string" + "description": "[Optional] The maximum number of results to return per response.\nDefault is 20." } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta1/projects/{projectsId}/groupStats", "id": "clouderrorreporting.projects.groupStats.list", "path": "v1beta1/{+projectName}/groupStats", @@ -257,48 +246,41 @@ "groups": { "methods": { "get": { - "parameterOrder": [ - "groupName" - ], + "id": "clouderrorreporting.projects.groups.get", + "path": "v1beta1/{+groupName}", + "description": "Get the specified group.", "response": { "$ref": "ErrorGroup" }, + "parameterOrder": [ + "groupName" + ], "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "groupName": { - "pattern": "^projects/[^/]+/groups/[^/]+$", "location": "path", "description": "[Required] The group resource name. Written as\n\u003ccode\u003eprojects/\u003cvar\u003eprojectID\u003c/var\u003e/groups/\u003cvar\u003egroup_name\u003c/var\u003e\u003c/code\u003e.\nCall\n\u003ca href=\"/error-reporting/reference/rest/v1beta1/projects.groupStats/list\"\u003e\n\u003ccode\u003egroupStats.list\u003c/code\u003e\u003c/a\u003e to return a list of groups belonging to\nthis project.\n\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-group\u003c/code\u003e", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+/groups/[^/]+$" } }, - "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", - "id": "clouderrorreporting.projects.groups.get", - "path": "v1beta1/{+groupName}", - "description": "Get the specified group." + "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}" }, "update": { - "response": { - "$ref": "ErrorGroup" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PUT", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "name": { - "location": "path", "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", "type": "string", "required": true, - "pattern": "^projects/[^/]+/groups/[^/]+$" + "pattern": "^projects/[^/]+/groups/[^/]+$", + "location": "path" } }, "flatPath": "v1beta1/projects/{projectsId}/groups/{groupsId}", @@ -307,7 +289,14 @@ "request": { "$ref": "ErrorGroup" }, - "description": "Replace the data for the specified group.\nFails if the group does not exist." + "description": "Replace the data for the specified group.\nFails if the group does not exist.", + "response": { + "$ref": "ErrorGroup" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT" } } } @@ -315,15 +304,26 @@ } }, "parameters": { + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, "oauth_token": { "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" }, "bearer_token": { + "type": "string", "location": "query", - "description": "OAuth bearer token.", - "type": "string" + "description": "OAuth bearer token." }, "upload_protocol": { "location": "query", @@ -331,10 +331,10 @@ "type": "string" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" }, "uploadType": { "location": "query", @@ -352,6 +352,8 @@ "type": "string" }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -360,16 +362,9 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" + ] }, "alt": { - "enum": [ - "json", - "media", - "proto" - ], "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", @@ -378,90 +373,45 @@ ], "location": "query", "description": "Data format for response.", - "default": "json" + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" }, - "access_token": { + "key": { "location": "query", - "description": "OAuth access token.", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" } }, "version": "v1beta1", "baseUrl": "https://clouderrorreporting.googleapis.com/", - "description": "Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors.\n", "kind": "discovery#restDescription", + "description": "Groups and counts similar errors from cloud services and applications, reports new errors, and provides access to error groups and their associated errors.\n", "servicePath": "", "basePath": "", + "revision": "20170914", "id": "clouderrorreporting:v1beta1", "documentationLink": "https://cloud.google.com/error-reporting/", - "revision": "20170914", "discoveryVersion": "v1", "version_module": true, "schemas": { - "ListGroupStatsResponse": { - "description": "Contains a set of requested error group stats.", - "type": "object", - "properties": { - "timeRangeBegin": { - "format": "google-datetime", - "description": "The timestamp specifies the start time to which the request was restricted.\nThe start time is set based on the requested time range. It may be adjusted\nto a later time if a project has exceeded the storage quota and older data\nhas been deleted.", - "type": "string" - }, - "errorGroupStats": { - "description": "The error group stats which match the given request.", - "items": { - "$ref": "ErrorGroupStats" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", - "type": "string" - } - }, - "id": "ListGroupStatsResponse" - }, - "SourceReference": { - "description": "A reference to a particular snapshot of the source tree used to build and\ndeploy an application.", - "type": "object", - "properties": { - "repository": { - "description": "Optional. A URI string identifying the repository.\nExample: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", - "type": "string" - }, - "revisionId": { - "description": "The canonical and persistent identifier of the deployed revision.\nExample (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", - "type": "string" - } - }, - "id": "SourceReference" - }, - "DeleteEventsResponse": { - "description": "Response message for deleting error events.", - "type": "object", - "properties": {}, - "id": "DeleteEventsResponse" - }, "ErrorEvent": { "description": "An error event which is returned by the Error Reporting system.", "type": "object", "properties": { + "eventTime": { + "type": "string", + "format": "google-datetime", + "description": "Time when the event occurred as provided in the error report.\nIf the report did not contain a timestamp, the time the error was received\nby the Error Reporting system is used." + }, "context": { "$ref": "ErrorContext", "description": "Data about the context in which the error occurred." @@ -471,13 +421,8 @@ "type": "string" }, "serviceContext": { - "$ref": "ServiceContext", - "description": "The `ServiceContext` for which this error was reported." - }, - "eventTime": { - "format": "google-datetime", - "description": "Time when the event occurred as provided in the error report.\nIf the report did not contain a timestamp, the time the error was received\nby the Error Reporting system is used.", - "type": "string" + "description": "The `ServiceContext` for which this error was reported.", + "$ref": "ServiceContext" } }, "id": "ErrorEvent" @@ -486,6 +431,11 @@ "description": "An error event which is reported to the Error Reporting system.", "type": "object", "properties": { + "eventTime": { + "format": "google-datetime", + "description": "[Optional] Time when the event occurred.\nIf not provided, the time when the event was received by the\nError Reporting system will be used.", + "type": "string" + }, "context": { "$ref": "ErrorContext", "description": "[Optional] A description of the context in which the error occurred." @@ -495,13 +445,8 @@ "type": "string" }, "serviceContext": { - "description": "[Required] The service context in which this error has occurred.", - "$ref": "ServiceContext" - }, - "eventTime": { - "format": "google-datetime", - "description": "[Optional] Time when the event occurred.\nIf not provided, the time when the event was received by the\nError Reporting system will be used.", - "type": "string" + "$ref": "ServiceContext", + "description": "[Required] The service context in which this error has occurred." } }, "id": "ReportedErrorEvent" @@ -510,50 +455,41 @@ "description": "A description of the context in which an error occurred.\nThis data should be provided by the application when reporting an error,\nunless the\nerror report has been generated automatically from Google App Engine logs.", "type": "object", "properties": { - "user": { - "description": "The user who caused or was affected by the crash.\nThis can be a user ID, an email address, or an arbitrary token that\nuniquely identifies the user.\nWhen sending an error report, leave this field empty if the user was not\nlogged in. In this case the\nError Reporting system will use other data, such as remote IP address, to\ndistinguish affected users. See `affected_users_count` in\n`ErrorGroupStats`.", - "type": "string" - }, "sourceReferences": { - "description": "Source code that was used to build the executable which has\ncaused the given error message.", "items": { "$ref": "SourceReference" }, - "type": "array" + "type": "array", + "description": "Source code that was used to build the executable which has\ncaused the given error message." }, "reportLocation": { - "$ref": "SourceLocation", - "description": "The location in the source code where the decision was made to\nreport the error, usually the place where it was logged.\nFor a logged exception this would be the source line where the\nexception is logged, usually close to the place where it was\ncaught." + "description": "The location in the source code where the decision was made to\nreport the error, usually the place where it was logged.\nFor a logged exception this would be the source line where the\nexception is logged, usually close to the place where it was\ncaught.", + "$ref": "SourceLocation" }, "httpRequest": { - "$ref": "HttpRequestContext", - "description": "The HTTP request which was processed when the error was\ntriggered." + "description": "The HTTP request which was processed when the error was\ntriggered.", + "$ref": "HttpRequestContext" + }, + "user": { + "description": "The user who caused or was affected by the crash.\nThis can be a user ID, an email address, or an arbitrary token that\nuniquely identifies the user.\nWhen sending an error report, leave this field empty if the user was not\nlogged in. In this case the\nError Reporting system will use other data, such as remote IP address, to\ndistinguish affected users. See `affected_users_count` in\n`ErrorGroupStats`.", + "type": "string" } }, "id": "ErrorContext" }, "TrackingIssue": { + "description": "Information related to tracking the progress on resolving the error.", + "type": "object", "properties": { "url": { "description": "A URL pointing to a related entry in an issue tracking system.\nExample: https://github.com/user/project/issues/4", "type": "string" } }, - "id": "TrackingIssue", - "description": "Information related to tracking the progress on resolving the error.", - "type": "object" + "id": "TrackingIssue" }, "ErrorGroupStats": { - "description": "Data extracted for a specific group based on certain filter criteria,\nsuch as a given time period and/or service filter.", - "type": "object", "properties": { - "timedCounts": { - "description": "Approximate number of occurrences over time.\nTimed counts returned by ListGroups are guaranteed to be:\n\n- Inside the requested time interval\n- Non-overlapping, and\n- Ordered by ascending time.", - "items": { - "$ref": "TimedCount" - }, - "type": "array" - }, "group": { "$ref": "ErrorGroup", "description": "Group data that is independent of the filter criteria." @@ -578,6 +514,11 @@ "description": "Approximate last occurrence that was ever seen for this group and\nwhich matches the given filter criteria, ignoring the time_range\nthat was specified in the request.", "type": "string" }, + "numAffectedServices": { + "format": "int32", + "description": "The total number of services with a non-zero error count for the given\nfilter criteria.", + "type": "integer" + }, "affectedServices": { "description": "Service contexts with a non-zero error count for the given filter\ncriteria. This list can be truncated if multiple services are affected.\nRefer to `num_affected_services` for the total count.", "items": { @@ -585,17 +526,21 @@ }, "type": "array" }, - "numAffectedServices": { - "format": "int32", - "description": "The total number of services with a non-zero error count for the given\nfilter criteria.", - "type": "integer" - }, "representative": { - "$ref": "ErrorEvent", - "description": "An arbitrary event that is chosen as representative for the whole group.\nThe representative event is intended to be used as a quick preview for\nthe whole group. Events in the group are usually sufficiently similar\nto each other such that showing an arbitrary representative provides\ninsight into the characteristics of the group as a whole." + "description": "An arbitrary event that is chosen as representative for the whole group.\nThe representative event is intended to be used as a quick preview for\nthe whole group. Events in the group are usually sufficiently similar\nto each other such that showing an arbitrary representative provides\ninsight into the characteristics of the group as a whole.", + "$ref": "ErrorEvent" + }, + "timedCounts": { + "description": "Approximate number of occurrences over time.\nTimed counts returned by ListGroups are guaranteed to be:\n\n- Inside the requested time interval\n- Non-overlapping, and\n- Ordered by ascending time.", + "items": { + "$ref": "TimedCount" + }, + "type": "array" } }, - "id": "ErrorGroupStats" + "id": "ErrorGroupStats", + "description": "Data extracted for a specific group based on certain filter criteria,\nsuch as a given time period and/or service filter.", + "type": "object" }, "ListEventsResponse": { "properties": { @@ -605,11 +550,11 @@ "type": "string" }, "errorEvents": { - "description": "The error events which match the given request.", "items": { "$ref": "ErrorEvent" }, - "type": "array" + "type": "array", + "description": "The error events which match the given request." }, "nextPageToken": { "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", @@ -624,6 +569,11 @@ "description": "The number of errors in a given time period.\nAll numbers are approximate since the error events are sampled\nbefore counting them.", "type": "object", "properties": { + "endTime": { + "format": "google-datetime", + "description": "End of the time period to which `count` refers (excluded).", + "type": "string" + }, "startTime": { "format": "google-datetime", "description": "Start of the time period to which `count` refers (included).", @@ -633,17 +583,18 @@ "format": "int64", "description": "Approximate number of occurrences in the given time period.", "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "End of the time period to which `count` refers (excluded).", - "type": "string" } }, "id": "TimedCount" }, "ErrorGroup": { + "description": "Description of a group of similar error events.", + "type": "object", "properties": { + "name": { + "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", + "type": "string" + }, "trackingIssues": { "description": "Associated tracking issues.", "items": { @@ -654,17 +605,33 @@ "groupId": { "description": "Group IDs are unique for a given project. If the same kind of error\noccurs in different service contexts, it will receive the same group ID.", "type": "string" - }, - "name": { - "description": "The group resource name.\nExample: \u003ccode\u003eprojects/my-project-123/groups/my-groupid\u003c/code\u003e", - "type": "string" } }, - "id": "ErrorGroup", - "description": "Description of a group of similar error events.", - "type": "object" + "id": "ErrorGroup" + }, + "ServiceContext": { + "id": "ServiceContext", + "description": "Describes a running service that sends errors.\nIts version changes over time and multiple versions can run in parallel.", + "type": "object", + "properties": { + "version": { + "description": "Represents the source code version that the developer provided,\nwhich could represent a version label or a Git SHA-1 hash, for example.\nFor App Engine standard environment, the version is set to the version of\nthe app.", + "type": "string" + }, + "service": { + "description": "An identifier of the service, such as the name of the\nexecutable, job, or Google App Engine service name. This field is expected\nto have a low number of values that are relatively stable over time, as\nopposed to `version`, which can be changed whenever new code is deployed.\n\nContains the service name for error reports extracted from Google\nApp Engine logs or `default` if the App Engine default service is used.", + "type": "string" + }, + "resourceType": { + "description": "Type of the MonitoredResource. List of possible values:\nhttps://cloud.google.com/monitoring/api/resources\n\nValue is set automatically for incoming errors and must not be set when\nreporting errors.", + "type": "string" + } + } }, "SourceLocation": { + "id": "SourceLocation", + "description": "Indicates a location in the source code of the service for which errors are\nreported. `functionName` must be provided by the application when reporting\nan error, unless the error report contains a `message` with a supported\nexception stack trace. All fields are optional for the later case.", + "type": "object", "properties": { "functionName": { "description": "Human-readable name of a function or method.\nThe value can include optional context like the class or package name.\nFor example, `my.package.MyClass.method` in case of Java.", @@ -679,29 +646,7 @@ "description": "1-based. 0 indicates that the line number is unknown.", "type": "integer" } - }, - "id": "SourceLocation", - "description": "Indicates a location in the source code of the service for which errors are\nreported. `functionName` must be provided by the application when reporting\nan error, unless the error report contains a `message` with a supported\nexception stack trace. All fields are optional for the later case.", - "type": "object" - }, - "ServiceContext": { - "properties": { - "resourceType": { - "description": "Type of the MonitoredResource. List of possible values:\nhttps://cloud.google.com/monitoring/api/resources\n\nValue is set automatically for incoming errors and must not be set when\nreporting errors.", - "type": "string" - }, - "version": { - "description": "Represents the source code version that the developer provided,\nwhich could represent a version label or a Git SHA-1 hash, for example.\nFor App Engine standard environment, the version is set to the version of\nthe app.", - "type": "string" - }, - "service": { - "description": "An identifier of the service, such as the name of the\nexecutable, job, or Google App Engine service name. This field is expected\nto have a low number of values that are relatively stable over time, as\nopposed to `version`, which can be changed whenever new code is deployed.\n\nContains the service name for error reports extracted from Google\nApp Engine logs or `default` if the App Engine default service is used.", - "type": "string" - } - }, - "id": "ServiceContext", - "description": "Describes a running service that sends errors.\nIts version changes over time and multiple versions can run in parallel.", - "type": "object" + } }, "ReportErrorEventResponse": { "description": "Response for reporting an individual error event.\nData may be added to this message in the future.", @@ -735,16 +680,71 @@ "type": "string" }, "url": { - "description": "The URL of the request.", - "type": "string" + "type": "string", + "description": "The URL of the request." } }, "id": "HttpRequestContext" + }, + "ListGroupStatsResponse": { + "description": "Contains a set of requested error group stats.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "If non-empty, more results are available.\nPass this token, along with the same query parameters as the first\nrequest, to view the next page of results.", + "type": "string" + }, + "timeRangeBegin": { + "format": "google-datetime", + "description": "The timestamp specifies the start time to which the request was restricted.\nThe start time is set based on the requested time range. It may be adjusted\nto a later time if a project has exceeded the storage quota and older data\nhas been deleted.", + "type": "string" + }, + "errorGroupStats": { + "description": "The error group stats which match the given request.", + "items": { + "$ref": "ErrorGroupStats" + }, + "type": "array" + } + }, + "id": "ListGroupStatsResponse" + }, + "SourceReference": { + "description": "A reference to a particular snapshot of the source tree used to build and\ndeploy an application.", + "type": "object", + "properties": { + "revisionId": { + "description": "The canonical and persistent identifier of the deployed revision.\nExample (git): \"0035781c50ec7aa23385dc841529ce8a4b70db1b\"", + "type": "string" + }, + "repository": { + "description": "Optional. A URI string identifying the repository.\nExample: \"https://github.com/GoogleCloudPlatform/kubernetes.git\"", + "type": "string" + } + }, + "id": "SourceReference" + }, + "DeleteEventsResponse": { + "description": "Response message for deleting error events.", + "type": "object", + "properties": {}, + "id": "DeleteEventsResponse" } }, "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest" + "protocol": "rest", + "canonicalName": "Clouderrorreporting", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://clouderrorreporting.googleapis.com/" } diff --git a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json index 826c474a7..a62a7c282 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json +++ b/vendor/google.golang.org/api/cloudfunctions/v1/cloudfunctions-api.json @@ -1,252 +1,88 @@ { - "canonicalName": "Cloud Functions", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://cloudfunctions.googleapis.com/", - "ownerDomain": "google.com", - "name": "cloudfunctions", - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Cloud Functions API", - "ownerName": "Google", - "resources": { - "operations": { - "methods": { - "get": { - "flatPath": "v1/operations/{operationsId}", - "id": "cloudfunctions.operations.get", - "path": "v1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "filter": { - "location": "query", - "description": "The standard list filter.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "flatPath": "v1/operations", - "id": "cloudfunctions.operations.list", - "path": "v1/operations" - } - } - }, - "projects": { - "resources": { - "locations": { - "methods": { - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListLocationsResponse" - }, - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "The standard list page size." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations", - "path": "v1/{+name}/locations", - "id": "cloudfunctions.projects.locations.list", - "description": "Lists information about the supported locations for this service." - } - } - } - } - } - }, - "parameters": { - "oauth_token": { - "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format." - }, - "alt": { - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - } - }, - "version": "v1", - "baseUrl": "https://cloudfunctions.googleapis.com/", - "kind": "discovery#restDescription", - "description": "API for managing lightweight user-provided functions executed in response to events.", - "servicePath": "", - "basePath": "", - "id": "cloudfunctions:v1", - "documentationLink": "https://cloud.google.com/functions", - "revision": "20170920", "discoveryVersion": "v1", "version_module": true, "schemas": { + "OperationMetadataV1Beta2": { + "description": "Metadata describing an Operation", + "type": "object", + "properties": { + "versionId": { + "format": "int64", + "description": "Version id of the function created or updated by an API call.\nThis field is only pupulated for Create and Update operations.", + "type": "string" + }, + "request": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The original request that started the operation.", + "type": "object" + }, + "type": { + "description": "Type of operation.", + "type": "string", + "enumDescriptions": [ + "Unknown operation type.", + "Triggered by CreateFunction call", + "Triggered by UpdateFunction call", + "Triggered by DeleteFunction call." + ], + "enum": [ + "OPERATION_UNSPECIFIED", + "CREATE_FUNCTION", + "UPDATE_FUNCTION", + "DELETE_FUNCTION" + ] + }, + "target": { + "description": "Target of the operation - for example\nprojects/project-1/locations/region-1/functions/function-1", + "type": "string" + } + }, + "id": "OperationMetadataV1Beta2" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "type": "object", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, "locations": { "description": "A list of locations that matches the specified filter in the request.", "items": { "$ref": "Location" }, "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" } }, "id": "ListLocationsResponse" @@ -256,11 +92,11 @@ "type": "object", "properties": { "labels": { + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object" + } }, "name": { "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", @@ -281,6 +117,24 @@ }, "id": "Location" }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", @@ -302,109 +156,255 @@ "type": "string" }, "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" }, "metadata": { "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - } - }, - "id": "Operation" - }, - "ListOperationsResponse": { - "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object" - }, - "OperationMetadataV1Beta2": { - "properties": { - "type": { - "enumDescriptions": [ - "Unknown operation type.", - "Triggered by CreateFunction call", - "Triggered by UpdateFunction call", - "Triggered by DeleteFunction call." - ], - "enum": [ - "OPERATION_UNSPECIFIED", - "CREATE_FUNCTION", - "UPDATE_FUNCTION", - "DELETE_FUNCTION" - ], - "description": "Type of operation.", - "type": "string" - }, - "target": { - "description": "Target of the operation - for example\nprojects/project-1/locations/region-1/functions/function-1", - "type": "string" - }, - "versionId": { - "format": "int64", - "description": "Version id of the function created or updated by an API call.\nThis field is only pupulated for Create and Update operations.", - "type": "string" - }, - "request": { - "description": "The original request that started the operation.", - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" } } }, - "id": "OperationMetadataV1Beta2", - "description": "Metadata describing an Operation", - "type": "object" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array", - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." - } - }, - "id": "Status" + "id": "Operation" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest" + "canonicalName": "Cloud Functions", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://cloudfunctions.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudfunctions", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Cloud Functions API", + "ownerName": "Google", + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/operations/{operationsId}", + "id": "cloudfunctions.operations.get", + "path": "v1/{+name}" + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListOperationsResponse" + }, + "parameters": { + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "location": "query", + "description": "The name of the operation's parent resource.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/operations", + "path": "v1/operations", + "id": "cloudfunctions.operations.list", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." + } + } + }, + "projects": { + "resources": { + "locations": { + "methods": { + "list": { + "description": "Lists information about the supported locations for this service.", + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "format": "int32", + "description": "The standard list page size.", + "type": "integer", + "location": "query" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/locations", + "id": "cloudfunctions.projects.locations.list", + "path": "v1/{+name}/locations" + } + } + } + } + } + }, + "parameters": { + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://cloudfunctions.googleapis.com/", + "servicePath": "", + "kind": "discovery#restDescription", + "description": "API for managing lightweight user-provided functions executed in response to events.", + "basePath": "", + "id": "cloudfunctions:v1", + "documentationLink": "https://cloud.google.com/functions", + "revision": "20170926" } diff --git a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json index 815900bb6..cd624c350 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json +++ b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-api.json @@ -1,17 +1,565 @@ { + "rootUrl": "https://cloudfunctions.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudfunctions", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Cloud Functions API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "list": { + "description": "Lists information about the supported locations for this service.", + "response": { + "$ref": "ListLocationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "The standard list page token." + }, + "name": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/locations", + "id": "cloudfunctions.projects.locations.list", + "path": "v1beta2/{+name}/locations" + } + }, + "resources": { + "functions": { + "methods": { + "get": { + "description": "Returns a function with the given name from the requested project.", + "response": { + "$ref": "CloudFunction" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the function which details should be obtained.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "id": "cloudfunctions.projects.locations.functions.get", + "path": "v1beta2/{+name}" + }, + "update": { + "request": { + "$ref": "CloudFunction" + }, + "description": "Updates existing function.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the function to be updated.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "id": "cloudfunctions.projects.locations.functions.update", + "path": "v1beta2/{+name}" + }, + "delete": { + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", + "id": "cloudfunctions.projects.locations.functions.delete", + "path": "v1beta2/{+name}", + "description": "Deletes a function with the given name from the specified project. If the\ngiven function is used by some trigger, the trigger will be updated to\nremove this function.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the function which should be deleted.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$" + } + } + }, + "list": { + "response": { + "$ref": "ListFunctionsResponse" + }, + "parameterOrder": [ + "location" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The value returned by the last\n`ListFunctionsResponse`; indicates that\nthis is a continuation of a prior `ListFunctions` call, and that the\nsystem should return the next page of data.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of functions to return per call.", + "type": "integer" + }, + "location": { + "description": "The project and location from which the function should be listed,\nspecified in the format `projects/*/locations/*`\nIf you want to list functions in all locations, use \"-\" in place of a\nlocation.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions", + "id": "cloudfunctions.projects.locations.functions.list", + "path": "v1beta2/{+location}/functions", + "description": "Returns a list of functions that belong to the requested project." + }, + "create": { + "id": "cloudfunctions.projects.locations.functions.create", + "path": "v1beta2/{+location}/functions", + "description": "Creates a new function. If a function with the given name already exists in\nthe specified project, the long running operation will return\n`ALREADY_EXISTS` error.", + "request": { + "$ref": "CloudFunction" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "location" + ], + "httpMethod": "POST", + "parameters": { + "location": { + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path", + "description": "The project and location in which the function should be created, specified\nin the format `projects/*/locations/*`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions" + }, + "call": { + "request": { + "$ref": "CallFunctionRequest" + }, + "description": "Invokes synchronously deployed function. To be used for testing, very\nlimited traffic allowed.", + "response": { + "$ref": "CallFunctionResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the function to be called.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:call", + "id": "cloudfunctions.projects.locations.functions.call", + "path": "v1beta2/{+name}:call" + } + } + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^operations/[^/]+$", + "location": "path", + "description": "The name of the operation resource." + } + }, + "flatPath": "v1beta2/operations/{operationsId}", + "path": "v1beta2/{+name}", + "id": "cloudfunctions.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "type": "string", + "location": "query", + "description": "The name of the operation's parent resource." + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta2/operations", + "path": "v1beta2/operations", + "id": "cloudfunctions.operations.list" + } + } + } + }, + "parameters": { + "quotaUser": { + "type": "string", + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + } + }, "version": "v1beta2", "baseUrl": "https://cloudfunctions.googleapis.com/", "servicePath": "", - "kind": "discovery#restDescription", "description": "API for managing lightweight user-provided functions executed in response to events.", + "kind": "discovery#restDescription", "basePath": "", "id": "cloudfunctions:v1beta2", "documentationLink": "https://cloud.google.com/functions", - "revision": "20170920", + "revision": "20170926", "discoveryVersion": "v1", "version_module": true, "schemas": { + "Retry": { + "description": "Describes the retry policy in case of function's execution failure.\nA function execution will be retried on any failure.\nA failed execution will be retried up to 7 days with an exponential backoff\n(capped at 10 seconds).\nRetried execution is charged as any other execution.", + "type": "object", + "properties": {}, + "id": "Retry" + }, + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "ListFunctionsResponse": { + "description": "Response for the `ListFunctions` method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "If not empty, indicates that there may be more functions that match\nthe request; this value should be passed in a new\ngoogle.cloud.functions.v1beta2.ListFunctionsRequest\nto get more functions.", + "type": "string" + }, + "functions": { + "description": "The functions that match the request.", + "items": { + "$ref": "CloudFunction" + }, + "type": "array" + } + }, + "id": "ListFunctionsResponse" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "locations": { + "items": { + "$ref": "Location" + }, + "type": "array", + "description": "A list of locations that matches the specified filter in the request." + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListLocationsResponse" + }, + "CallFunctionResponse": { + "description": "Response of `CallFunction` method.", + "type": "object", + "properties": { + "executionId": { + "description": "Execution id of function invocation.", + "type": "string" + }, + "error": { + "description": "Either system or user-function generated error. Set if execution\nwas not successful.", + "type": "string" + }, + "result": { + "description": "Result populated for successful execution of synchronous function. Will\nnot be populated if function does not return a result through context.", + "type": "string" + } + }, + "id": "CallFunctionResponse" + }, + "EventTrigger": { + "description": "Describes EventTrigger, used to request events be sent from another\nservice.", + "type": "object", + "properties": { + "resource": { + "description": "Which instance of the source's service should send events. E.g. for Pub/Sub\nthis would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud\nStorage this would be a bucket at `projects/*/buckets/*`. For any source\nthat only supports one instance per-project, this should be the name of the\nproject (`projects/*`)", + "type": "string" + }, + "service": { + "description": "The hostname of the service that should be observed.\n\nIf no string is provided, the default service implementing the API will\nbe used. For example, `storage.googleapis.com` is the default for all\nevent types in the 'google.storage` namespace.", + "type": "string" + }, + "failurePolicy": { + "description": "Specifies policy for failed executions.", + "$ref": "FailurePolicy" + }, + "eventType": { + "description": "`event_type` names contain the service that is sending an event and the\nkind of event that was fired. Must be of the form\n`providers/*/eventTypes/*` e.g. Directly handle a Message published to\nGoogle Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`\n\n Handle an object changing in Google Cloud Storage\n `providers/cloud.storage/eventTypes/object.change`\n\n Handle a write to the Firebase Realtime Database\n `providers/google.firebase.database/eventTypes/ref.write`", + "type": "string" + } + }, + "id": "EventTrigger" + }, + "HTTPSTrigger": { + "description": "Describes HTTPSTrigger, could be used to connect web hooks to function.", + "type": "object", + "properties": { + "url": { + "description": "Output only. The deployed url for the function.", + "type": "string" + } + }, + "id": "HTTPSTrigger" + }, + "FailurePolicy": { + "description": "Describes the policy in case of function's execution failure.\nIf empty, then defaults to ignoring failures (i.e. not retrying them).", + "type": "object", + "properties": { + "retry": { + "$ref": "Retry", + "description": "If specified, then the function will be retried in case of a failure." + } + }, + "id": "FailurePolicy" + }, + "Operation": { + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + }, + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + } + } + }, "OperationMetadataV1Beta2": { + "id": "OperationMetadataV1Beta2", "description": "Metadata describing an Operation", "type": "object", "properties": { @@ -48,37 +596,37 @@ "description": "Type of operation.", "type": "string" } - }, - "id": "OperationMetadataV1Beta2" + } }, "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { + "type": "object", "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + } }, "type": "array" }, "code": { + "type": "integer", "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" + "description": "The status code, which should be an enum value of google.rpc.Code." + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" } }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" + "id": "Status" }, "SourceRepository": { + "type": "object", "properties": { "revision": { "description": "The id of the revision that captures the state of the repository from\nwhich the function should be fetched.", @@ -106,29 +654,49 @@ } }, "id": "SourceRepository", - "description": "Describes the location of the function source in a remote repository.", - "type": "object" + "description": "Describes the location of the function source in a remote repository." }, "CallFunctionRequest": { + "description": "Request for the `CallFunction` method.", + "type": "object", "properties": { "data": { "description": "Input to be passed to the function.", "type": "string" } }, - "id": "CallFunctionRequest", - "description": "Request for the `CallFunction` method.", - "type": "object" + "id": "CallFunctionRequest" }, "CloudFunction": { + "description": "Describes a Cloud Function that contains user computation executed in\nresponse to an event. It encapsulate function and triggers configurations.", + "type": "object", "properties": { + "sourceArchiveUrl": { + "type": "string", + "description": "The Google Cloud Storage URL, starting with gs://, pointing to the zip\narchive which contains the function." + }, + "sourceRepository": { + "$ref": "SourceRepository", + "description": "The hosted repository where the function is defined." + }, + "entryPoint": { + "description": "The name of the function (as defined in source code) that will be\nexecuted. Defaults to the resource name suffix, if not specified. For\nbackward compatibility, if function with given name is not found, then the\nsystem will try to use function named \"function\".\nFor Node.js this is name of a function exported by the module specified\nin `source_location`.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels associated with this Cloud Function.", + "type": "object" + }, "updateTime": { "format": "google-datetime", "description": "Output only. The last update timestamp of a Cloud Function.", "type": "string" }, "sourceRepositoryUrl": { - "description": "The URL pointing to the hosted repository where the function is defined.\nThere are supported Cloud Source Repository URLs in the following\nformats:\n\nTo refer to a specific commit:\n`https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`\nTo refer to a moveable alias (branch):\n`https://source.developers.google.com/projects/*/repos/*/aliases/movable/*/paths/*`\nIn particular, to refer to HEAD use `master` moveable alias.\nTo refer to a specific fixed alias (tag):\n`https://source.developers.google.com/projects/*/repos/*/aliases/fixed/*/paths/*`\n\nYou may omit `paths/*` if you want to use the main directory.", + "description": "The URL pointing to the hosted repository where the function is defined.\nThere are supported Cloud Source Repository URLs in the following\nformats:\n\nTo refer to a specific commit:\n`https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*`\nTo refer to a moveable alias (branch):\n`https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*`\nIn particular, to refer to HEAD use `master` moveable alias.\nTo refer to a specific fixed alias (tag):\n`https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*`\n\nYou may omit `paths/*` if you want to use the main directory.", "type": "string" }, "latestOperation": { @@ -136,8 +704,13 @@ "type": "string" }, "httpsTrigger": { - "$ref": "HTTPSTrigger", - "description": "An HTTPS endpoint type of source that can be triggered via URL." + "description": "An HTTPS endpoint type of source that can be triggered via URL.", + "$ref": "HTTPSTrigger" + }, + "timeout": { + "format": "google-duration", + "description": "The function execution timeout. Execution is considered failed and\ncan be terminated if the function is not completed at the end of the\ntimeout period. Defaults to 60 seconds.", + "type": "string" }, "status": { "enum": [ @@ -157,11 +730,6 @@ "Deletion in progress." ] }, - "timeout": { - "format": "google-duration", - "description": "The function execution timeout. Execution is considered failed and\ncan be terminated if the function is not completed at the end of the\ntimeout period. Defaults to 60 seconds.", - "type": "string" - }, "eventTrigger": { "$ref": "EventTrigger", "description": "A source that fires events in response to a condition in another service." @@ -181,35 +749,23 @@ "type": "string" }, "serviceAccount": { - "description": "Output only. The service account of the function.", - "type": "string" - }, - "sourceArchiveUrl": { - "description": "The Google Cloud Storage URL, starting with gs://, pointing to the zip\narchive which contains the function.", - "type": "string" - }, - "sourceRepository": { - "description": "The hosted repository where the function is defined.", - "$ref": "SourceRepository" - }, + "type": "string", + "description": "Output only. The service account of the function." + } + }, + "id": "CloudFunction" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { "labels": { "additionalProperties": { "type": "string" }, - "description": "Labels associated with this Cloud Function.", + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", "type": "object" }, - "entryPoint": { - "description": "The name of the function (as defined in source code) that will be\nexecuted. Defaults to the resource name suffix, if not specified. For\nbackward compatibility, if function with given name is not found, then the\nsystem will try to use function named \"function\".\nFor Node.js this is name of a function exported by the module specified\nin `source_location`.", - "type": "string" - } - }, - "id": "CloudFunction", - "description": "Describes a Cloud Function that contains user computation executed in\nresponse to an event. It encapsulate function and triggers configurations.", - "type": "object" - }, - "Location": { - "properties": { "name": { "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", "type": "string" @@ -219,190 +775,22 @@ "type": "string" }, "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object" - } - }, - "id": "Location", - "description": "A resource that represents Google Cloud Platform location.", - "type": "object" - }, - "Retry": { - "properties": {}, - "id": "Retry", - "description": "Describes the retry policy in case of function's execution failure.\nA function execution will be retried on any failure.\nA failed execution will be retried up to 7 days with an exponential backoff\n(capped at 10 seconds).\nRetried execution is charged as any other execution.", - "type": "object" - }, - "ListOperationsResponse": { - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse", - "description": "The response message for Operations.ListOperations.", - "type": "object" - }, - "ListFunctionsResponse": { - "properties": { - "functions": { - "description": "The functions that match the request.", - "items": { - "$ref": "CloudFunction" - }, - "type": "array" - }, - "nextPageToken": { - "description": "If not empty, indicates that there may be more functions that match\nthe request; this value should be passed in a new\ngoogle.cloud.functions.v1beta2.ListFunctionsRequest\nto get more functions.", - "type": "string" - } - }, - "id": "ListFunctionsResponse", - "description": "Response for the `ListFunctions` method.", - "type": "object" - }, - "CallFunctionResponse": { - "properties": { - "executionId": { - "description": "Execution id of function invocation.", - "type": "string" - }, - "error": { - "description": "Either system or user-function generated error. Set if execution\nwas not successful.", - "type": "string" - }, - "result": { - "description": "Result populated for successful execution of synchronous function. Will\nnot be populated if function does not return a result through context.", - "type": "string" - } - }, - "id": "CallFunctionResponse", - "description": "Response of `CallFunction` method.", - "type": "object" - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListLocationsResponse" - }, - "EventTrigger": { - "properties": { - "eventType": { - "description": "`event_type` names contain the service that is sending an event and the\nkind of event that was fired. Must be of the form\n`providers/*/eventTypes/*` e.g. Directly handle a Message published to\nGoogle Cloud Pub/Sub `providers/cloud.pubsub/eventTypes/topic.publish`\n\n Handle an object changing in Google Cloud Storage\n `providers/cloud.storage/eventTypes/object.change`\n\n Handle a write to the Firebase Realtime Database\n `providers/firebase.database/eventTypes/data.write`", - "type": "string" - }, - "resource": { - "description": "Which instance of the source's service should send events. E.g. for Pub/Sub\nthis would be a Pub/Sub topic at `projects/*/topics/*`. For Google Cloud\nStorage this would be a bucket at `projects/*/buckets/*`. For any source\nthat only supports one instance per-project, this should be the name of the\nproject (`projects/*`)", - "type": "string" - }, - "service": { - "description": "The hostname of the service that should be observed.\n\nIf no string is provided, the default service implementing the API will\nbe used. For example, `storage.googleapis.com` is the default for all\nevent types in the 'google.storage` namespace.", - "type": "string" - }, - "failurePolicy": { - "description": "Specifies policy for failed executions.", - "$ref": "FailurePolicy" - } - }, - "id": "EventTrigger", - "description": "Describes EventTrigger, used to request events be sent from another\nservice.", - "type": "object" - }, - "HTTPSTrigger": { - "properties": { - "url": { - "description": "Output only. The deployed url for the function.", - "type": "string" - } - }, - "id": "HTTPSTrigger", - "description": "Describes HTTPSTrigger, could be used to connect web hooks to function.", - "type": "object" - }, - "FailurePolicy": { - "description": "Describes the policy in case of function's execution failure.\nIf empty, then defaults to ignoring failures (i.e. not retrying them).", - "type": "object", - "properties": { - "retry": { - "$ref": "Retry", - "description": "If specified, then the function will be retried in case of a failure." - } - }, - "id": "FailurePolicy" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" + } } }, - "id": "Operation" + "id": "Location" } }, - "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, + "protocol": "rest", "canonicalName": "Cloud Functions", "auth": { "oauth2": { @@ -412,393 +800,5 @@ } } } - }, - "rootUrl": "https://cloudfunctions.googleapis.com/", - "ownerDomain": "google.com", - "name": "cloudfunctions", - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Cloud Functions API", - "ownerName": "Google", - "resources": { - "operations": { - "methods": { - "get": { - "httpMethod": "GET", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/operations/{operationsId}", - "path": "v1beta2/{+name}", - "id": "cloudfunctions.operations.get", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/operations", - "id": "cloudfunctions.operations.list", - "path": "v1beta2/operations" - } - } - }, - "projects": { - "resources": { - "locations": { - "methods": { - "list": { - "description": "Lists information about the supported locations for this service.", - "httpMethod": "GET", - "response": { - "$ref": "ListLocationsResponse" - }, - "parameterOrder": [ - "name" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations", - "path": "v1beta2/{+name}/locations", - "id": "cloudfunctions.projects.locations.list" - } - }, - "resources": { - "functions": { - "methods": { - "update": { - "path": "v1beta2/{+name}", - "id": "cloudfunctions.projects.locations.functions.update", - "description": "Updates existing function.", - "request": { - "$ref": "CloudFunction" - }, - "httpMethod": "PUT", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "location": "path", - "description": "The name of the function to be updated.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}" - }, - "delete": { - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "location": "path", - "description": "The name of the function which should be deleted.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", - "path": "v1beta2/{+name}", - "id": "cloudfunctions.projects.locations.functions.delete", - "description": "Deletes a function with the given name from the specified project. If the\ngiven function is used by some trigger, the trigger will be updated to\nremove this function." - }, - "list": { - "path": "v1beta2/{+location}/functions", - "id": "cloudfunctions.projects.locations.functions.list", - "description": "Returns a list of functions that belong to the requested project.", - "httpMethod": "GET", - "response": { - "$ref": "ListFunctionsResponse" - }, - "parameterOrder": [ - "location" - ], - "parameters": { - "location": { - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "The project and location from which the function should be listed,\nspecified in the format `projects/*/locations/*`\nIf you want to list functions in all locations, use \"-\" in place of a\nlocation.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "The value returned by the last\n`ListFunctionsResponse`; indicates that\nthis is a continuation of a prior `ListFunctions` call, and that the\nsystem should return the next page of data.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "Maximum number of functions to return per call.", - "type": "integer", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions" - }, - "call": { - "id": "cloudfunctions.projects.locations.functions.call", - "path": "v1beta2/{+name}:call", - "description": "Invokes synchronously deployed function. To be used for testing, very\nlimited traffic allowed.", - "request": { - "$ref": "CallFunctionRequest" - }, - "response": { - "$ref": "CallFunctionResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "location": "path", - "description": "The name of the function to be called.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:call" - }, - "create": { - "request": { - "$ref": "CloudFunction" - }, - "description": "Creates a new function. If a function with the given name already exists in\nthe specified project, the long running operation will return\n`ALREADY_EXISTS` error.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "location" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "location": { - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "The project and location in which the function should be created, specified\nin the format `projects/*/locations/*`", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions", - "id": "cloudfunctions.projects.locations.functions.create", - "path": "v1beta2/{+location}/functions" - }, - "get": { - "description": "Returns a function with the given name from the requested project.", - "response": { - "$ref": "CloudFunction" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/functions/[^/]+$", - "location": "path", - "description": "The name of the function which details should be obtained.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}", - "id": "cloudfunctions.projects.locations.functions.get", - "path": "v1beta2/{+name}" - } - } - } - } - } - } - } - }, - "parameters": { - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - } } } diff --git a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go index 93e8eea54..8523c054a 100644 --- a/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go +++ b/vendor/google.golang.org/api/cloudfunctions/v1beta2/cloudfunctions-gen.go @@ -260,13 +260,13 @@ type CloudFunction struct { // ions/*/paths/*` // To refer to a moveable alias // (branch): - // `https://source.developers.google.com/projects/*/repos/*/ali - // ases/movable/*/paths/*` + // `https://source.developers.google.com/projects/*/repos/*/mov + // eable-aliases/*/paths/*` // In particular, to refer to HEAD use `master` moveable alias. // To refer to a specific fixed alias // (tag): - // `https://source.developers.google.com/projects/*/repos/*/aliase - // s/fixed/*/paths/*` + // `https://source.developers.google.com/projects/*/repos/*/fixed- + // aliases/*/paths/*` // // You may omit `paths/*` if you want to use the main directory. SourceRepositoryUrl string `json:"sourceRepositoryUrl,omitempty"` @@ -345,7 +345,7 @@ type EventTrigger struct { // `providers/cloud.storage/eventTypes/object.change` // // Handle a write to the Firebase Realtime Database - // `providers/firebase.database/eventTypes/data.write` + // `providers/google.firebase.database/eventTypes/ref.write` EventType string `json:"eventType,omitempty"` // FailurePolicy: Specifies policy for failed executions. diff --git a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json new file mode 100644 index 000000000..35e50a32f --- /dev/null +++ b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-api.json @@ -0,0 +1,1304 @@ +{ + "version_module": true, + "schemas": { + "EventNotificationConfig": { + "description": "The configuration to forward telemetry events.", + "type": "object", + "properties": { + "pubsubTopicName": { + "description": "A Cloud Pub/Sub topic name. For example,\n`projects/myProject/topics/deviceEvents`.", + "type": "string" + } + }, + "id": "EventNotificationConfig" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "updateMask": { + "format": "google-fieldmask", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "type": "string" + }, + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest" + }, + "Empty": { + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {} + }, + "PublicKeyCredential": { + "description": "A public key format and data.", + "type": "object", + "properties": { + "key": { + "description": "The key data.", + "type": "string" + }, + "format": { + "enum": [ + "UNSPECIFIED_PUBLIC_KEY_FORMAT", + "RSA_PEM", + "RSA_X509_PEM", + "ES256_PEM", + "ES256_X509_PEM" + ], + "description": "The format of the key.", + "type": "string", + "enumDescriptions": [ + "The format has not been specified. This is an invalid default value and\nmust not be used.", + "An RSA public key encoded in base64, and wrapped by\n`-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can be\nused to verify `RS256` signatures in JWT tokens ([RFC7518](\nhttps://www.ietf.org/rfc/rfc7518.txt)).", + "As RSA_PEM, but wrapped in an X.509v3 certificate ([RFC5280](\nhttps://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by\n`-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.", + "Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in\nbase64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END\nPUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256`\nalgorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This curve is\ndefined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` curve.", + "As ES256_PEM, but wrapped in an X.509v3 certificate ([RFC5280](\nhttps://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and wrapped by\n`-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`." + ] + } + }, + "id": "PublicKeyCredential" + }, + "PublicKeyCertificate": { + "description": "A public key certificate format and data.", + "type": "object", + "properties": { + "format": { + "enumDescriptions": [ + "The format has not been specified. This is an invalid default value and\nmust not be used.", + "An X.509v3 certificate ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)),\nencoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` and\n`-----END CERTIFICATE-----`." + ], + "enum": [ + "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT", + "X509_CERTIFICATE_PEM" + ], + "description": "The certificate format.", + "type": "string" + }, + "certificate": { + "description": "The certificate data.", + "type": "string" + }, + "x509Details": { + "$ref": "X509CertificateDetails", + "description": "[Output only] The certificate details. Used only for X.509 certificates." + } + }, + "id": "PublicKeyCertificate" + }, + "DeviceState": { + "properties": { + "binaryData": { + "format": "byte", + "description": "The device state data.", + "type": "string" + }, + "updateTime": { + "format": "google-datetime", + "description": "[Output only] The time at which this state version was updated in Cloud\nIoT Core.", + "type": "string" + } + }, + "id": "DeviceState", + "description": "The device state, as reported by the device.", + "type": "object" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object", + "properties": { + "logType": { + "type": "string", + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables." + }, + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "AuditLogConfig" + }, + "StateNotificationConfig": { + "id": "StateNotificationConfig", + "description": "The configuration for notification of new states received from the device.", + "type": "object", + "properties": { + "pubsubTopicName": { + "description": "A Cloud Pub/Sub topic name. For example,\n`projects/myProject/topics/deviceEvents`.", + "type": "string" + } + } + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsRequest" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "iamOwned": { + "type": "boolean" + }, + "etag": { + "format": "byte", + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", + "items": { + "$ref": "Binding" + }, + "type": "array" + } + }, + "id": "Policy" + }, + "RegistryCredential": { + "description": "A server-stored registry credential used to validate device credentials.", + "type": "object", + "properties": { + "publicKeyCertificate": { + "$ref": "PublicKeyCertificate", + "description": "A public key certificate used to verify the device credentials." + } + }, + "id": "RegistryCredential" + }, + "ListDeviceRegistriesResponse": { + "description": "Response for `ListDeviceRegistries`.", + "type": "object", + "properties": { + "deviceRegistries": { + "items": { + "$ref": "DeviceRegistry" + }, + "type": "array", + "description": "The registries that matched the query." + }, + "nextPageToken": { + "description": "If not empty, indicates that there may be more registries that match the\nrequest; this value should be passed in a new\n`ListDeviceRegistriesRequest`.", + "type": "string" + } + }, + "id": "ListDeviceRegistriesResponse" + }, + "DeviceRegistry": { + "description": "A container for a group of devices.", + "type": "object", + "properties": { + "httpConfig": { + "description": "The DeviceService (HTTP) configuration for this device registry.", + "$ref": "HttpConfig" + }, + "id": { + "description": "The identifier of this device registry. For example, `myRegistry`.", + "type": "string" + }, + "mqttConfig": { + "$ref": "MqttConfig", + "description": "The MQTT configuration for this device registry." + }, + "stateNotificationConfig": { + "$ref": "StateNotificationConfig", + "description": "The configuration for notification of new states received from the device.\nState updates are guaranteed to be stored in the state history, but\nnotifications to Cloud Pub/Sub are not guaranteed. For example, if\npermissions are misconfigured or the specified topic doesn't exist, no\nnotification will be published but the state will still be stored in Cloud\nIoT Core." + }, + "credentials": { + "description": "The credentials used to verify the device credentials. No more than 10\ncredentials can be bound to a single registry at a time. The verification\nprocess occurs at the time of device creation or update. If this field is\nempty, no verification is performed. Otherwise, the credentials of a newly\ncreated device or added credentials of an updated device should be signed\nwith one of these registry credentials.\n\nNote, however, that existing devices will never be affected by\nmodifications to this list of credentials: after a device has been\nsuccessfully created in a registry, it should be able to connect even if\nits registry credentials are revoked, deleted, or modified.", + "items": { + "$ref": "RegistryCredential" + }, + "type": "array" + }, + "name": { + "description": "The resource path name. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string" + }, + "eventNotificationConfigs": { + "description": "The configuration for notification of telemetry events received from the\ndevice. All telemetry events that were successfully published by the\ndevice and acknowledged by Cloud IoT Core are guaranteed to be\ndelivered to Cloud Pub/Sub. Only the first configuration is used.", + "items": { + "$ref": "EventNotificationConfig" + }, + "type": "array" + } + }, + "id": "DeviceRegistry" + }, + "ListDevicesResponse": { + "description": "Response for `ListDevices`.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "If not empty, indicates that there may be more devices that match the\nrequest; this value should be passed in a new `ListDevicesRequest`.", + "type": "string" + }, + "devices": { + "description": "The devices that match the request.", + "items": { + "$ref": "Device" + }, + "type": "array" + } + }, + "id": "ListDevicesResponse" + }, + "DeviceCredential": { + "properties": { + "expirationTime": { + "format": "google-datetime", + "description": "[Optional] The time at which this credential becomes invalid. This\ncredential will be ignored for new client authentication requests after\nthis timestamp; however, it will not be automatically deleted.", + "type": "string" + }, + "publicKey": { + "description": "A public key used to verify the signature of JSON Web Tokens (JWTs).\nWhen adding a new device credential, either via device creation or via\nmodifications, this public key credential may be required to be signed by\none of the registry level certificates. More specifically, if the\nregistry contains at least one certificate, any new device credential\nmust be signed by one of the registry certificates. As a result,\nwhen the registry contains certificates, only X.509 certificates are\naccepted as device credentials. However, if the registry does\nnot contain a certificate, self-signed certificates and public keys will\nbe accepted. New device credentials must be different from every\nregistry-level certificate.", + "$ref": "PublicKeyCredential" + } + }, + "id": "DeviceCredential", + "description": "A server-stored device credential used for authentication.", + "type": "object" + }, + "HttpConfig": { + "description": "The configuration of the HTTP bridge for a device registry.", + "type": "object", + "properties": { + "httpEnabledState": { + "description": "If enabled, allows devices to use DeviceService via the HTTP protocol.\nOtherwise, any requests to DeviceService will fail for this registry.", + "type": "string", + "enumDescriptions": [ + "No HTTP state specified. If not specified, DeviceService will be\nenabled by default.", + "Enables DeviceService (HTTP) service for the registry.", + "Disables DeviceService (HTTP) service for the registry." + ], + "enum": [ + "HTTP_STATE_UNSPECIFIED", + "HTTP_ENABLED", + "HTTP_DISABLED" + ] + } + }, + "id": "HttpConfig" + }, + "AuditConfig": { + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "exemptedMembers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", + "type": "string" + } + }, + "id": "AuditConfig" + }, + "DeviceConfig": { + "properties": { + "binaryData": { + "format": "byte", + "description": "The device configuration data.", + "type": "string" + }, + "deviceAckTime": { + "format": "google-datetime", + "description": "[Output only] The time at which Cloud IoT Core received the\nacknowledgment from the device, indicating that the device has received\nthis configuration version. If this field is not present, the device has\nnot yet acknowledged that it received this version. Note that when\nthe config was sent to the device, many config versions may have been\navailable in Cloud IoT Core while the device was disconnected, and on\nconnection, only the latest version is sent to the device. Some\nversions may never be sent to the device, and therefore are never\nacknowledged. This timestamp is set by Cloud IoT Core.", + "type": "string" + }, + "cloudUpdateTime": { + "format": "google-datetime", + "description": "[Output only] The time at which this configuration version was updated in\nCloud IoT Core. This timestamp is set by the server.", + "type": "string" + }, + "version": { + "format": "int64", + "description": "[Output only] The version of this update. The version number is assigned by\nthe server, and is always greater than 0 after device creation. The\nversion must be 0 on the `CreateDevice` request if a `config` is\nspecified; the response of `CreateDevice` will always have a value of 1.", + "type": "string" + } + }, + "id": "DeviceConfig", + "description": "The device configuration. Eventually delivered to devices.", + "type": "object" + }, + "MqttConfig": { + "description": "The configuration of MQTT for a device registry.", + "type": "object", + "properties": { + "mqttEnabledState": { + "description": "If enabled, allows connections using the MQTT protocol. Otherwise, MQTT\nconnections to this registry will fail.", + "type": "string", + "enumDescriptions": [ + "No MQTT state specified. If not specified, MQTT will be enabled by default.", + "Enables a MQTT connection.", + "Disables a MQTT connection." + ], + "enum": [ + "MQTT_STATE_UNSPECIFIED", + "MQTT_ENABLED", + "MQTT_DISABLED" + ] + } + }, + "id": "MqttConfig" + }, + "Status": { + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" + }, + "Binding": { + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + }, + "condition": { + "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL.", + "$ref": "Expr" + } + } + }, + "Expr": { + "properties": { + "description": { + "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", + "type": "string" + }, + "location": { + "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", + "type": "string" + } + }, + "id": "Expr", + "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", + "type": "object" + }, + "ModifyCloudToDeviceConfigRequest": { + "properties": { + "versionToUpdate": { + "format": "int64", + "description": "The version number to update. If this value is zero, it will not check the\nversion number of the server and will always update the current version;\notherwise, this update will fail if the version number found on the server\ndoes not match this version number. This is used to support multiple\nsimultaneous updates without losing data.", + "type": "string" + }, + "binaryData": { + "type": "string", + "format": "byte", + "description": "The configuration data for the device." + } + }, + "id": "ModifyCloudToDeviceConfigRequest", + "description": "Request for `ModifyCloudToDeviceConfig`.", + "type": "object" + }, + "ListDeviceStatesResponse": { + "properties": { + "deviceStates": { + "description": "The last few device states. States are listed in descending order of server\nupdate time, starting from the most recent one.", + "items": { + "$ref": "DeviceState" + }, + "type": "array" + } + }, + "id": "ListDeviceStatesResponse", + "description": "Response for `ListDeviceStates`.", + "type": "object" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse" + }, + "Device": { + "description": "The device resource.", + "type": "object", + "properties": { + "lastHeartbeatTime": { + "type": "string", + "format": "google-datetime", + "description": "[Output only] The last time a heartbeat was received. Timestamps are\nperiodically collected and written to storage; they may be stale by a few\nminutes. This field is only for devices connecting through MQTT." + }, + "blocked": { + "description": "If a device is blocked, connections or requests from this device will fail.\nCan be used to temporarily prevent the device from connecting if, for\nexample, the sensor is generating bad data and needs maintenance.", + "type": "boolean" + }, + "lastEventTime": { + "format": "google-datetime", + "description": "[Output only] The last time a telemetry event was received. Timestamps are\nperiodically collected and written to storage; they may be stale by a few\nminutes.", + "type": "string" + }, + "lastConfigSendTime": { + "type": "string", + "format": "google-datetime", + "description": "[Output only] The last time a cloud-to-device config version was sent to\nthe device." + }, + "lastErrorStatus": { + "$ref": "Status", + "description": "[Output only] The error message of the most recent error, such as a failure\nto publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this\nfield. If no errors have occurred, this field has an empty message\nand the status code 0 == OK. Otherwise, this field is expected to have a\nstatus code other than OK." + }, + "lastStateTime": { + "format": "google-datetime", + "description": "[Output only] The last time a state event was received. Timestamps are\nperiodically collected and written to storage; they may be stale by a few\nminutes.", + "type": "string" + }, + "config": { + "description": "The most recent device configuration, which is eventually sent from\nCloud IoT Core to the device. If not present on creation, the\nconfiguration will be initialized with an empty payload and version value\nof `1`. To update this field after creation, use the\n`DeviceManager.ModifyCloudToDeviceConfig` method.", + "$ref": "DeviceConfig" + }, + "state": { + "description": "[Output only] The state most recently received from the device. If no state\nhas been reported, this field is not present.", + "$ref": "DeviceState" + }, + "credentials": { + "description": "The credentials used to authenticate this device. To allow credential\nrotation without interruption, multiple device credentials can be bound to\nthis device. No more than 3 credentials can be bound to a single device at\na time. When new credentials are added to a device, they are verified\nagainst the registry credentials. For details, see the description of the\n`DeviceRegistry.credentials` field.", + "items": { + "$ref": "DeviceCredential" + }, + "type": "array" + }, + "name": { + "description": "The resource path name. For example,\n`projects/p1/locations/us-central1/registries/registry0/devices/dev0` or\n`projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.\nWhen `name` is populated as a response from the service, it always ends\nin the device numeric ID.", + "type": "string" + }, + "lastErrorTime": { + "type": "string", + "format": "google-datetime", + "description": "[Output only] The time the most recent error occurred, such as a failure to\npublish to Cloud Pub/Sub. This field is the timestamp of\n'last_error_status'." + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "The metadata key-value pairs assigned to the device. This metadata is not\ninterpreted or indexed by Cloud IoT Core. It can be used to add contextual\ninformation for the device.\n\nKeys must conform to the regular expression [a-zA-Z0-9-_]+ and be less than\n128 bytes in length.\n\nValues are free-form strings. Each value must be less than or equal to 32\nKB in size.\n\nThe total size of all keys and values must be less than 256 KB, and the\nmaximum number of key-value pairs is 500.", + "type": "object" + }, + "id": { + "type": "string", + "description": "The user-defined device identifier. The device ID must be unique\nwithin a device registry." + }, + "lastConfigAckTime": { + "format": "google-datetime", + "description": "[Output only] The last time a cloud-to-device config version acknowledgment\nwas received from the device. This field is only for configurations\nsent through MQTT.", + "type": "string" + }, + "numId": { + "format": "uint64", + "description": "[Output only] A server-defined unique numeric ID for the device. This is a\nmore compact way to identify devices, and it is globally unique.", + "type": "string" + } + }, + "id": "Device" + }, + "ListDeviceConfigVersionsResponse": { + "description": "Response for `ListDeviceConfigVersions`.", + "type": "object", + "properties": { + "deviceConfigs": { + "description": "The device configuration for the last few versions. Versions are listed\nin decreasing order, starting from the most recent one.", + "items": { + "$ref": "DeviceConfig" + }, + "type": "array" + } + }, + "id": "ListDeviceConfigVersionsResponse" + }, + "X509CertificateDetails": { + "id": "X509CertificateDetails", + "description": "Details of an X.509 certificate. For informational purposes only.", + "type": "object", + "properties": { + "issuer": { + "type": "string", + "description": "The entity that signed the certificate." + }, + "publicKeyType": { + "description": "The type of public key in the certificate.", + "type": "string" + }, + "signatureAlgorithm": { + "description": "The algorithm used to sign the certificate.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The time the certificate becomes valid.", + "type": "string" + }, + "expiryTime": { + "format": "google-datetime", + "description": "The time the certificate becomes invalid.", + "type": "string" + }, + "subject": { + "type": "string", + "description": "The entity the certificate and public key belong to." + } + } + } + }, + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "protocol": "rest", + "canonicalName": "Cloud Iot", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloudiot": { + "description": "Register and manage devices in the Google Cloud IoT service" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://cloudiot.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudiot", + "batchPath": "batch", + "title": "Google Cloud IoT API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "registries": { + "methods": { + "list": { + "response": { + "$ref": "ListDeviceRegistriesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "parent": { + "description": "The project and cloud region path. For example,\n`projects/example-project/locations/us-central1`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call, and\nthat the system should return the next page of data.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries", + "id": "cloudiot.projects.locations.registries.list", + "path": "v1/{+parent}/registries", + "description": "Lists device registries." + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "cloudiot.projects.locations.registries.setIamPolicy" + }, + "create": { + "parameters": { + "parent": { + "description": "The project and cloud region where this device registry must be created.\nFor example, `projects/example-project/locations/us-central1`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries", + "id": "cloudiot.projects.locations.registries.create", + "path": "v1/{+parent}/registries", + "description": "Creates a device registry that contains devices.", + "request": { + "$ref": "DeviceRegistry" + }, + "response": { + "$ref": "DeviceRegistry" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST" + }, + "getIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:getIamPolicy", + "id": "cloudiot.projects.locations.registries.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset." + }, + "get": { + "description": "Gets a device registry configuration.", + "response": { + "$ref": "DeviceRegistry" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "location": "path", + "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + "id": "cloudiot.projects.locations.registries.get", + "path": "v1/{+name}" + }, + "patch": { + "description": "Updates a device registry configuration.", + "request": { + "$ref": "DeviceRegistry" + }, + "response": { + "$ref": "DeviceRegistry" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PATCH", + "parameters": { + "name": { + "location": "path", + "description": "The resource path name. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$" + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Only updates the `device_registry` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `event_notification_config`, `mqtt_config`, and\n`state_notification_config`.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + "id": "cloudiot.projects.locations.registries.patch", + "path": "v1/{+name}" + }, + "testIamPermissions": { + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:testIamPermissions", + "id": "cloudiot.projects.locations.registries.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error." + }, + "delete": { + "parameters": { + "name": { + "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + "path": "v1/{+name}", + "id": "cloudiot.projects.locations.registries.delete", + "description": "Deletes a device registry configuration.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + } + } + }, + "resources": { + "devices": { + "methods": { + "get": { + "response": { + "$ref": "Device" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + "id": "cloudiot.projects.locations.registries.devices.get", + "path": "v1/{+name}", + "description": "Gets details about a device." + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Device" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "updateMask": { + "format": "google-fieldmask", + "description": "Only updates the `device` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `credentials`, `enabled_state`, and `metadata`", + "type": "string", + "location": "query" + }, + "name": { + "description": "The resource path name. For example,\n`projects/p1/locations/us-central1/registries/registry0/devices/dev0` or\n`projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.\nWhen `name` is populated as a response from the service, it always ends\nin the device numeric ID.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + "path": "v1/{+name}", + "id": "cloudiot.projects.locations.registries.devices.patch", + "request": { + "$ref": "Device" + }, + "description": "Updates a device." + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + "path": "v1/{+name}", + "id": "cloudiot.projects.locations.registries.devices.delete", + "description": "Deletes a device." + }, + "list": { + "id": "cloudiot.projects.locations.registries.devices.list", + "path": "v1/{+parent}/devices", + "description": "List devices in a device registry.", + "response": { + "$ref": "ListDevicesResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", + "type": "string" + }, + "fieldMask": { + "location": "query", + "format": "google-fieldmask", + "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + "type": "integer" + }, + "deviceIds": { + "repeated": true, + "location": "query", + "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", + "type": "string" + }, + "parent": { + "location": "path", + "description": "The device registry path. Required. For example,\n`projects/my-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$" + }, + "deviceNumIds": { + "type": "string", + "repeated": true, + "location": "query", + "format": "uint64", + "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries." + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices" + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Device" + }, + "parameters": { + "parent": { + "description": "The name of the device registry where this device should be created.\nFor example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices", + "path": "v1/{+parent}/devices", + "id": "cloudiot.projects.locations.registries.devices.create", + "description": "Creates a device in a device registry.", + "request": { + "$ref": "Device" + } + }, + "modifyCloudToDeviceConfig": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:modifyCloudToDeviceConfig", + "path": "v1/{+name}:modifyCloudToDeviceConfig", + "id": "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig", + "request": { + "$ref": "ModifyCloudToDeviceConfigRequest" + }, + "description": "Modifies the configuration for the device, which is eventually sent from\nthe Cloud IoT Core servers. Returns the modified configuration version and\nits metadata.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "DeviceConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + } + } + } + }, + "resources": { + "states": { + "methods": { + "list": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/states", + "id": "cloudiot.projects.locations.registries.devices.states.list", + "path": "v1/{+name}/states", + "description": "Lists the last few versions of the device state in descending order (i.e.:\nnewest first).", + "response": { + "$ref": "ListDeviceStatesResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path", + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true + }, + "numStates": { + "location": "query", + "format": "int32", + "description": "The number of states to list. States are listed in descending order of\nupdate time. The maximum number of states retained is 10. If this\nvalue is zero, it will return all the states available.", + "type": "integer" + } + } + } + } + }, + "configVersions": { + "methods": { + "list": { + "description": "Lists the last few versions of the device configuration in descending\norder (i.e.: newest first).", + "response": { + "$ref": "ListDeviceConfigVersionsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path", + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`." + }, + "numVersions": { + "format": "int32", + "description": "The number of versions to list. Versions are listed in decreasing order of\nthe version number. The maximum number of versions retained is 10. If this\nvalue is zero, it will return all the versions available.", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/configVersions", + "id": "cloudiot.projects.locations.registries.devices.configVersions.list", + "path": "v1/{+name}/configVersions" + } + } + } + } + } + } + } + } + } + } + } + }, + "parameters": { + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + } + }, + "version": "v1", + "baseUrl": "https://cloudiot.googleapis.com/", + "servicePath": "", + "description": "Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.\n", + "kind": "discovery#restDescription", + "basePath": "", + "revision": "20170922", + "documentationLink": "https://cloud.google.com/iot", + "id": "cloudiot:v1", + "discoveryVersion": "v1" +} diff --git a/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go new file mode 100644 index 000000000..4e99148a6 --- /dev/null +++ b/vendor/google.golang.org/api/cloudiot/v1/cloudiot-gen.go @@ -0,0 +1,4121 @@ +// Package cloudiot provides access to the Google Cloud IoT API. +// +// See https://cloud.google.com/iot +// +// Usage example: +// +// import "google.golang.org/api/cloudiot/v1" +// ... +// cloudiotService, err := cloudiot.New(oauthHttpClient) +package cloudiot // import "google.golang.org/api/cloudiot/v1" + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" + "io" + "net/http" + "net/url" + "strconv" + "strings" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = ctxhttp.Do + +const apiId = "cloudiot:v1" +const apiName = "cloudiot" +const apiVersion = "v1" +const basePath = "https://cloudiot.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // View and manage your data across Google Cloud Platform services + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + + // Register and manage devices in the Google Cloud IoT service + CloudiotScope = "https://www.googleapis.com/auth/cloudiot" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Registries = NewProjectsLocationsRegistriesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Registries *ProjectsLocationsRegistriesService +} + +func NewProjectsLocationsRegistriesService(s *Service) *ProjectsLocationsRegistriesService { + rs := &ProjectsLocationsRegistriesService{s: s} + rs.Devices = NewProjectsLocationsRegistriesDevicesService(s) + return rs +} + +type ProjectsLocationsRegistriesService struct { + s *Service + + Devices *ProjectsLocationsRegistriesDevicesService +} + +func NewProjectsLocationsRegistriesDevicesService(s *Service) *ProjectsLocationsRegistriesDevicesService { + rs := &ProjectsLocationsRegistriesDevicesService{s: s} + rs.ConfigVersions = NewProjectsLocationsRegistriesDevicesConfigVersionsService(s) + rs.States = NewProjectsLocationsRegistriesDevicesStatesService(s) + return rs +} + +type ProjectsLocationsRegistriesDevicesService struct { + s *Service + + ConfigVersions *ProjectsLocationsRegistriesDevicesConfigVersionsService + + States *ProjectsLocationsRegistriesDevicesStatesService +} + +func NewProjectsLocationsRegistriesDevicesConfigVersionsService(s *Service) *ProjectsLocationsRegistriesDevicesConfigVersionsService { + rs := &ProjectsLocationsRegistriesDevicesConfigVersionsService{s: s} + return rs +} + +type ProjectsLocationsRegistriesDevicesConfigVersionsService struct { + s *Service +} + +func NewProjectsLocationsRegistriesDevicesStatesService(s *Service) *ProjectsLocationsRegistriesDevicesStatesService { + rs := &ProjectsLocationsRegistriesDevicesStatesService{s: s} + return rs +} + +type ProjectsLocationsRegistriesDevicesStatesService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. +// The configuration determines which permission types are logged, and +// what +// identities, if any, are exempted from logging. +// An AuditConfig must have one or more AuditLogConfigs. +// +// If there are AuditConfigs for both `allServices` and a specific +// service, +// the union of the two AuditConfigs is used for that service: the +// log_types +// specified in each AuditConfig are enabled, and the exempted_members +// in each +// AuditConfig are exempted. +// +// Example Policy with multiple AuditConfigs: +// +// { +// "audit_configs": [ +// { +// "service": "allServices" +// "audit_log_configs": [ +// { +// "log_type": "DATA_READ", +// "exempted_members": [ +// "user:foo@gmail.com" +// ] +// }, +// { +// "log_type": "DATA_WRITE", +// }, +// { +// "log_type": "ADMIN_READ", +// } +// ] +// }, +// { +// "service": "fooservice.googleapis.com" +// "audit_log_configs": [ +// { +// "log_type": "DATA_READ", +// }, +// { +// "log_type": "DATA_WRITE", +// "exempted_members": [ +// "user:bar@gmail.com" +// ] +// } +// ] +// } +// ] +// } +// +// For fooservice, this policy enables DATA_READ, DATA_WRITE and +// ADMIN_READ +// logging. It also exempts foo@gmail.com from DATA_READ logging, +// and +// bar@gmail.com from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + // Next ID: 4 + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // Service: Specifies a service that will be enabled for audit + // logging. + // For example, `storage.googleapis.com`, + // `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type noMethod AuditConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. +// Example: +// +// { +// "audit_log_configs": [ +// { +// "log_type": "DATA_READ", +// "exempted_members": [ +// "user:foo@gmail.com" +// ] +// }, +// { +// "log_type": "DATA_WRITE", +// } +// ] +// } +// +// This enables 'DATA_READ' and 'DATA_WRITE' logging, while +// exempting +// foo@gmail.com from DATA_READ logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of + // permission. + // Follows the same format of Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type noMethod AuditLogConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members` with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. + // NOTE: an unsatisfied condition will not allow user access via + // current + // binding. Different bindings, including their conditions, are + // examined + // independently. + // This field is GOOGLE_INTERNAL. + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the identities requesting access for a Cloud + // Platform resource. + // `members` can have the following values: + // + // * `allUsers`: A special identifier that represents anyone who is + // on the internet; with or without a Google account. + // + // * `allAuthenticatedUsers`: A special identifier that represents + // anyone + // who is authenticated with a Google account or a service + // account. + // + // * `user:{emailid}`: An email address that represents a specific + // Google + // account. For example, `alice@gmail.com` or `joe@example.com`. + // + // + // * `serviceAccount:{emailid}`: An email address that represents a + // service + // account. For example, + // `my-other-app@appspot.gserviceaccount.com`. + // + // * `group:{emailid}`: An email address that represents a Google + // group. + // For example, `admins@example.com`. + // + // + // * `domain:{domain}`: A Google Apps domain name that represents all + // the + // users of that domain. For example, `google.com` or + // `example.com`. + // + // + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to `members`. + // For example, `roles/viewer`, `roles/editor`, or + // `roles/owner`. + // Required + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type noMethod Binding + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Device: The device resource. +type Device struct { + // Blocked: If a device is blocked, connections or requests from this + // device will fail. + // Can be used to temporarily prevent the device from connecting if, + // for + // example, the sensor is generating bad data and needs maintenance. + Blocked bool `json:"blocked,omitempty"` + + // Config: The most recent device configuration, which is eventually + // sent from + // Cloud IoT Core to the device. If not present on creation, + // the + // configuration will be initialized with an empty payload and version + // value + // of `1`. To update this field after creation, use + // the + // `DeviceManager.ModifyCloudToDeviceConfig` method. + Config *DeviceConfig `json:"config,omitempty"` + + // Credentials: The credentials used to authenticate this device. To + // allow credential + // rotation without interruption, multiple device credentials can be + // bound to + // this device. No more than 3 credentials can be bound to a single + // device at + // a time. When new credentials are added to a device, they are + // verified + // against the registry credentials. For details, see the description of + // the + // `DeviceRegistry.credentials` field. + Credentials []*DeviceCredential `json:"credentials,omitempty"` + + // Id: The user-defined device identifier. The device ID must be + // unique + // within a device registry. + Id string `json:"id,omitempty"` + + // LastConfigAckTime: [Output only] The last time a cloud-to-device + // config version acknowledgment + // was received from the device. This field is only for + // configurations + // sent through MQTT. + LastConfigAckTime string `json:"lastConfigAckTime,omitempty"` + + // LastConfigSendTime: [Output only] The last time a cloud-to-device + // config version was sent to + // the device. + LastConfigSendTime string `json:"lastConfigSendTime,omitempty"` + + // LastErrorStatus: [Output only] The error message of the most recent + // error, such as a failure + // to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of + // this + // field. If no errors have occurred, this field has an empty + // message + // and the status code 0 == OK. Otherwise, this field is expected to + // have a + // status code other than OK. + LastErrorStatus *Status `json:"lastErrorStatus,omitempty"` + + // LastErrorTime: [Output only] The time the most recent error occurred, + // such as a failure to + // publish to Cloud Pub/Sub. This field is the timestamp + // of + // 'last_error_status'. + LastErrorTime string `json:"lastErrorTime,omitempty"` + + // LastEventTime: [Output only] The last time a telemetry event was + // received. Timestamps are + // periodically collected and written to storage; they may be stale by a + // few + // minutes. + LastEventTime string `json:"lastEventTime,omitempty"` + + // LastHeartbeatTime: [Output only] The last time a heartbeat was + // received. Timestamps are + // periodically collected and written to storage; they may be stale by a + // few + // minutes. This field is only for devices connecting through MQTT. + LastHeartbeatTime string `json:"lastHeartbeatTime,omitempty"` + + // LastStateTime: [Output only] The last time a state event was + // received. Timestamps are + // periodically collected and written to storage; they may be stale by a + // few + // minutes. + LastStateTime string `json:"lastStateTime,omitempty"` + + // Metadata: The metadata key-value pairs assigned to the device. This + // metadata is not + // interpreted or indexed by Cloud IoT Core. It can be used to add + // contextual + // information for the device. + // + // Keys must conform to the regular expression [a-zA-Z0-9-_]+ and be + // less than + // 128 bytes in length. + // + // Values are free-form strings. Each value must be less than or equal + // to 32 + // KB in size. + // + // The total size of all keys and values must be less than 256 KB, and + // the + // maximum number of key-value pairs is 500. + Metadata map[string]string `json:"metadata,omitempty"` + + // Name: The resource path name. For + // example, + // `projects/p1/locations/us-central1/registries/registry0/devic + // es/dev0` + // or + // `projects/p1/locations/us-central1/registries/registry0/devices/{nu + // m_id}`. + // When `name` is populated as a response from the service, it always + // ends + // in the device numeric ID. + Name string `json:"name,omitempty"` + + // NumId: [Output only] A server-defined unique numeric ID for the + // device. This is a + // more compact way to identify devices, and it is globally unique. + NumId uint64 `json:"numId,omitempty,string"` + + // State: [Output only] The state most recently received from the + // device. If no state + // has been reported, this field is not present. + State *DeviceState `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Blocked") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Blocked") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Device) MarshalJSON() ([]byte, error) { + type noMethod Device + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceConfig: The device configuration. Eventually delivered to +// devices. +type DeviceConfig struct { + // BinaryData: The device configuration data. + BinaryData string `json:"binaryData,omitempty"` + + // CloudUpdateTime: [Output only] The time at which this configuration + // version was updated in + // Cloud IoT Core. This timestamp is set by the server. + CloudUpdateTime string `json:"cloudUpdateTime,omitempty"` + + // DeviceAckTime: [Output only] The time at which Cloud IoT Core + // received the + // acknowledgment from the device, indicating that the device has + // received + // this configuration version. If this field is not present, the device + // has + // not yet acknowledged that it received this version. Note that + // when + // the config was sent to the device, many config versions may have + // been + // available in Cloud IoT Core while the device was disconnected, and + // on + // connection, only the latest version is sent to the device. + // Some + // versions may never be sent to the device, and therefore are + // never + // acknowledged. This timestamp is set by Cloud IoT Core. + DeviceAckTime string `json:"deviceAckTime,omitempty"` + + // Version: [Output only] The version of this update. The version number + // is assigned by + // the server, and is always greater than 0 after device creation. + // The + // version must be 0 on the `CreateDevice` request if a `config` + // is + // specified; the response of `CreateDevice` will always have a value of + // 1. + Version int64 `json:"version,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BinaryData") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceConfig) MarshalJSON() ([]byte, error) { + type noMethod DeviceConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceCredential: A server-stored device credential used for +// authentication. +type DeviceCredential struct { + // ExpirationTime: [Optional] The time at which this credential becomes + // invalid. This + // credential will be ignored for new client authentication requests + // after + // this timestamp; however, it will not be automatically deleted. + ExpirationTime string `json:"expirationTime,omitempty"` + + // PublicKey: A public key used to verify the signature of JSON Web + // Tokens (JWTs). + // When adding a new device credential, either via device creation or + // via + // modifications, this public key credential may be required to be + // signed by + // one of the registry level certificates. More specifically, if + // the + // registry contains at least one certificate, any new device + // credential + // must be signed by one of the registry certificates. As a result, + // when the registry contains certificates, only X.509 certificates + // are + // accepted as device credentials. However, if the registry does + // not contain a certificate, self-signed certificates and public keys + // will + // be accepted. New device credentials must be different from + // every + // registry-level certificate. + PublicKey *PublicKeyCredential `json:"publicKey,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpirationTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpirationTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceCredential) MarshalJSON() ([]byte, error) { + type noMethod DeviceCredential + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceRegistry: A container for a group of devices. +type DeviceRegistry struct { + // Credentials: The credentials used to verify the device credentials. + // No more than 10 + // credentials can be bound to a single registry at a time. The + // verification + // process occurs at the time of device creation or update. If this + // field is + // empty, no verification is performed. Otherwise, the credentials of a + // newly + // created device or added credentials of an updated device should be + // signed + // with one of these registry credentials. + // + // Note, however, that existing devices will never be affected + // by + // modifications to this list of credentials: after a device has + // been + // successfully created in a registry, it should be able to connect even + // if + // its registry credentials are revoked, deleted, or modified. + Credentials []*RegistryCredential `json:"credentials,omitempty"` + + // EventNotificationConfigs: The configuration for notification of + // telemetry events received from the + // device. All telemetry events that were successfully published by + // the + // device and acknowledged by Cloud IoT Core are guaranteed to + // be + // delivered to Cloud Pub/Sub. Only the first configuration is used. + EventNotificationConfigs []*EventNotificationConfig `json:"eventNotificationConfigs,omitempty"` + + // HttpConfig: The DeviceService (HTTP) configuration for this device + // registry. + HttpConfig *HttpConfig `json:"httpConfig,omitempty"` + + // Id: The identifier of this device registry. For example, + // `myRegistry`. + Id string `json:"id,omitempty"` + + // MqttConfig: The MQTT configuration for this device registry. + MqttConfig *MqttConfig `json:"mqttConfig,omitempty"` + + // Name: The resource path name. For + // example, + // `projects/example-project/locations/us-central1/registries/my + // -registry`. + Name string `json:"name,omitempty"` + + // StateNotificationConfig: The configuration for notification of new + // states received from the device. + // State updates are guaranteed to be stored in the state history, + // but + // notifications to Cloud Pub/Sub are not guaranteed. For example, + // if + // permissions are misconfigured or the specified topic doesn't exist, + // no + // notification will be published but the state will still be stored in + // Cloud + // IoT Core. + StateNotificationConfig *StateNotificationConfig `json:"stateNotificationConfig,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Credentials") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Credentials") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceRegistry) MarshalJSON() ([]byte, error) { + type noMethod DeviceRegistry + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceState: The device state, as reported by the device. +type DeviceState struct { + // BinaryData: The device state data. + BinaryData string `json:"binaryData,omitempty"` + + // UpdateTime: [Output only] The time at which this state version was + // updated in Cloud + // IoT Core. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinaryData") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceState) MarshalJSON() ([]byte, error) { + type noMethod DeviceState + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated +// empty messages in your APIs. A typical example is to use it as the +// request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// EventNotificationConfig: The configuration to forward telemetry +// events. +type EventNotificationConfig struct { + // PubsubTopicName: A Cloud Pub/Sub topic name. For + // example, + // `projects/myProject/topics/deviceEvents`. + PubsubTopicName string `json:"pubsubTopicName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PubsubTopicName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PubsubTopicName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *EventNotificationConfig) MarshalJSON() ([]byte, error) { + type noMethod EventNotificationConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Expr: Represents an expression text. Example: +// +// title: "User account presence" +// description: "Determines whether the request has a user account" +// expression: "size(request.user) > 0" +type Expr struct { + // Description: An optional description of the expression. This is a + // longer text which + // describes the expression, e.g. when hovered over it in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in + // Common Expression Language syntax. + // + // The application context of the containing message determines + // which + // well-known feature set of CEL is supported. + Expression string `json:"expression,omitempty"` + + // Location: An optional string indicating the location of the + // expression for error + // reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: An optional title for the expression, i.e. a short string + // describing + // its purpose. This can be used e.g. in UIs which allow to enter + // the + // expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type noMethod Expr + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetIamPolicyRequest: Request message for `GetIamPolicy` method. +type GetIamPolicyRequest struct { +} + +// HttpConfig: The configuration of the HTTP bridge for a device +// registry. +type HttpConfig struct { + // HttpEnabledState: If enabled, allows devices to use DeviceService via + // the HTTP protocol. + // Otherwise, any requests to DeviceService will fail for this registry. + // + // Possible values: + // "HTTP_STATE_UNSPECIFIED" - No HTTP state specified. If not + // specified, DeviceService will be + // enabled by default. + // "HTTP_ENABLED" - Enables DeviceService (HTTP) service for the + // registry. + // "HTTP_DISABLED" - Disables DeviceService (HTTP) service for the + // registry. + HttpEnabledState string `json:"httpEnabledState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HttpEnabledState") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HttpEnabledState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *HttpConfig) MarshalJSON() ([]byte, error) { + type noMethod HttpConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDeviceConfigVersionsResponse: Response for +// `ListDeviceConfigVersions`. +type ListDeviceConfigVersionsResponse struct { + // DeviceConfigs: The device configuration for the last few versions. + // Versions are listed + // in decreasing order, starting from the most recent one. + DeviceConfigs []*DeviceConfig `json:"deviceConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceConfigs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListDeviceConfigVersionsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDeviceConfigVersionsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDeviceRegistriesResponse: Response for `ListDeviceRegistries`. +type ListDeviceRegistriesResponse struct { + // DeviceRegistries: The registries that matched the query. + DeviceRegistries []*DeviceRegistry `json:"deviceRegistries,omitempty"` + + // NextPageToken: If not empty, indicates that there may be more + // registries that match the + // request; this value should be passed in a + // new + // `ListDeviceRegistriesRequest`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceRegistries") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceRegistries") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDeviceRegistriesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDeviceRegistriesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDeviceStatesResponse: Response for `ListDeviceStates`. +type ListDeviceStatesResponse struct { + // DeviceStates: The last few device states. States are listed in + // descending order of server + // update time, starting from the most recent one. + DeviceStates []*DeviceState `json:"deviceStates,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceStates") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceStates") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListDeviceStatesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDeviceStatesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDevicesResponse: Response for `ListDevices`. +type ListDevicesResponse struct { + // Devices: The devices that match the request. + Devices []*Device `json:"devices,omitempty"` + + // NextPageToken: If not empty, indicates that there may be more devices + // that match the + // request; this value should be passed in a new `ListDevicesRequest`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Devices") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Devices") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListDevicesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDevicesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModifyCloudToDeviceConfigRequest: Request for +// `ModifyCloudToDeviceConfig`. +type ModifyCloudToDeviceConfigRequest struct { + // BinaryData: The configuration data for the device. + BinaryData string `json:"binaryData,omitempty"` + + // VersionToUpdate: The version number to update. If this value is zero, + // it will not check the + // version number of the server and will always update the current + // version; + // otherwise, this update will fail if the version number found on the + // server + // does not match this version number. This is used to support + // multiple + // simultaneous updates without losing data. + VersionToUpdate int64 `json:"versionToUpdate,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "BinaryData") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyCloudToDeviceConfigRequest) MarshalJSON() ([]byte, error) { + type noMethod ModifyCloudToDeviceConfigRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MqttConfig: The configuration of MQTT for a device registry. +type MqttConfig struct { + // MqttEnabledState: If enabled, allows connections using the MQTT + // protocol. Otherwise, MQTT + // connections to this registry will fail. + // + // Possible values: + // "MQTT_STATE_UNSPECIFIED" - No MQTT state specified. If not + // specified, MQTT will be enabled by default. + // "MQTT_ENABLED" - Enables a MQTT connection. + // "MQTT_DISABLED" - Disables a MQTT connection. + MqttEnabledState string `json:"mqttEnabledState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MqttEnabledState") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MqttEnabledState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MqttConfig) MarshalJSON() ([]byte, error) { + type noMethod MqttConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: Defines an Identity and Access Management (IAM) policy. It is +// used to +// specify access control policies for Cloud Platform resources. +// +// +// A `Policy` consists of a list of `bindings`. A `Binding` binds a list +// of +// `members` to a `role`, where the members can be user accounts, Google +// groups, +// Google domains, and service accounts. A `role` is a named list of +// permissions +// defined by IAM. +// +// **Example** +// +// { +// "bindings": [ +// { +// "role": "roles/owner", +// "members": [ +// "user:mike@example.com", +// "group:admins@example.com", +// "domain:google.com", +// +// "serviceAccount:my-other-app@appspot.gserviceaccount.com", +// ] +// }, +// { +// "role": "roles/viewer", +// "members": ["user:sean@example.com"] +// } +// ] +// } +// +// For a description of IAM and its features, see the +// [IAM developer's guide](https://cloud.google.com/iam). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members` to a `role`. + // `bindings` with no members will result in an error. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help + // prevent simultaneous updates of a policy from overwriting each + // other. + // It is strongly suggested that systems make use of the `etag` in + // the + // read-modify-write cycle to perform policy updates in order to avoid + // race + // conditions: An `etag` is returned in the response to `getIamPolicy`, + // and + // systems are expected to put that etag in the request to + // `setIamPolicy` to + // ensure that their change will be applied to the same version of the + // policy. + // + // If no `etag` is provided in the call to `setIamPolicy`, then the + // existing + // policy is overwritten blindly. + Etag string `json:"etag,omitempty"` + + IamOwned bool `json:"iamOwned,omitempty"` + + // Version: Version of the `Policy`. The default version is 0. + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type noMethod Policy + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicKeyCertificate: A public key certificate format and data. +type PublicKeyCertificate struct { + // Certificate: The certificate data. + Certificate string `json:"certificate,omitempty"` + + // Format: The certificate format. + // + // Possible values: + // "UNSPECIFIED_PUBLIC_KEY_CERTIFICATE_FORMAT" - The format has not + // been specified. This is an invalid default value and + // must not be used. + // "X509_CERTIFICATE_PEM" - An X.509v3 certificate + // ([RFC5280](https://www.ietf.org/rfc/rfc5280.txt)), + // encoded in base64, and wrapped by `-----BEGIN CERTIFICATE-----` + // and + // `-----END CERTIFICATE-----`. + Format string `json:"format,omitempty"` + + // X509Details: [Output only] The certificate details. Used only for + // X.509 certificates. + X509Details *X509CertificateDetails `json:"x509Details,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Certificate") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Certificate") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicKeyCertificate) MarshalJSON() ([]byte, error) { + type noMethod PublicKeyCertificate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicKeyCredential: A public key format and data. +type PublicKeyCredential struct { + // Format: The format of the key. + // + // Possible values: + // "UNSPECIFIED_PUBLIC_KEY_FORMAT" - The format has not been + // specified. This is an invalid default value and + // must not be used. + // "RSA_PEM" - An RSA public key encoded in base64, and wrapped + // by + // `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`. This can + // be + // used to verify `RS256` signatures in JWT tokens + // ([RFC7518]( + // https://www.ietf.org/rfc/rfc7518.txt)). + // "RSA_X509_PEM" - As RSA_PEM, but wrapped in an X.509v3 certificate + // ([RFC5280]( + // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and + // wrapped by + // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + // "ES256_PEM" - Public key for the ECDSA algorithm using P-256 and + // SHA-256, encoded in + // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and + // `-----END + // PUBLIC KEY-----`. This can be used to verify JWT tokens with the + // `ES256` + // algorithm ([RFC7518](https://www.ietf.org/rfc/rfc7518.txt)). This + // curve is + // defined in [OpenSSL](https://www.openssl.org/) as the `prime256v1` + // curve. + // "ES256_X509_PEM" - As ES256_PEM, but wrapped in an X.509v3 + // certificate ([RFC5280]( + // https://www.ietf.org/rfc/rfc5280.txt)), encoded in base64, and + // wrapped by + // `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`. + Format string `json:"format,omitempty"` + + // Key: The key data. + Key string `json:"key,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Format") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Format") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicKeyCredential) MarshalJSON() ([]byte, error) { + type noMethod PublicKeyCredential + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// RegistryCredential: A server-stored registry credential used to +// validate device credentials. +type RegistryCredential struct { + // PublicKeyCertificate: A public key certificate used to verify the + // device credentials. + PublicKeyCertificate *PublicKeyCertificate `json:"publicKeyCertificate,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PublicKeyCertificate") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PublicKeyCertificate") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *RegistryCredential) MarshalJSON() ([]byte, error) { + type noMethod RegistryCredential + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of + // the policy is limited to a few 10s of KB. An empty policy is a + // valid policy but certain Cloud Platform services (such as + // Projects) + // might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only + // the fields in the mask will be modified. If no mask is provided, + // the + // following default mask is used: + // paths: "bindings, etag" + // This field is only used by Cloud IAM. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type noMethod SetIamPolicyRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// StateNotificationConfig: The configuration for notification of new +// states received from the device. +type StateNotificationConfig struct { + // PubsubTopicName: A Cloud Pub/Sub topic name. For + // example, + // `projects/myProject/topics/deviceEvents`. + PubsubTopicName string `json:"pubsubTopicName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PubsubTopicName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PubsubTopicName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *StateNotificationConfig) MarshalJSON() ([]byte, error) { + type noMethod StateNotificationConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different +// programming environments, including REST APIs and RPC APIs. It is +// used by +// [gRPC](https://github.com/grpc). The error model is designed to +// be: +// +// - Simple to use and understand for most users +// - Flexible enough to meet unexpected needs +// +// # Overview +// +// The `Status` message contains three pieces of data: error code, error +// message, +// and error details. The error code should be an enum value +// of +// google.rpc.Code, but it may accept additional error codes if needed. +// The +// error message should be a developer-facing English message that +// helps +// developers *understand* and *resolve* the error. If a localized +// user-facing +// error message is needed, put the localized message in the error +// details or +// localize it in the client. The optional error details may contain +// arbitrary +// information about the error. There is a predefined set of error +// detail types +// in the package `google.rpc` that can be used for common error +// conditions. +// +// # Language mapping +// +// The `Status` message is the logical representation of the error +// model, but it +// is not necessarily the actual wire format. When the `Status` message +// is +// exposed in different client libraries and different wire protocols, +// it can be +// mapped differently. For example, it will likely be mapped to some +// exceptions +// in Java, but more likely mapped to some error codes in C. +// +// # Other uses +// +// The error model and the `Status` message can be used in a variety +// of +// environments, either with or without APIs, to provide a +// consistent developer experience across different +// environments. +// +// Example uses of this error model include: +// +// - Partial errors. If a service needs to return partial errors to the +// client, +// it may embed the `Status` in the normal response to indicate the +// partial +// errors. +// +// - Workflow errors. A typical workflow has multiple steps. Each step +// may +// have a `Status` message for error reporting. +// +// - Batch operations. If a client uses batch request and batch +// response, the +// `Status` message should be used directly inside batch response, +// one for +// each error sub-response. +// +// - Asynchronous operations. If an API call embeds asynchronous +// operation +// results in its response, the status of those operations should +// be +// represented directly using the `Status` message. +// +// - Logging. If some API errors are stored in logs, the message +// `Status` could +// be used directly after any stripping needed for security/privacy +// reasons. +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of + // message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any + // user-facing error message should be localized and sent in + // the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type noMethod Status + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with + // wildcards (such as '*' or 'storage.*') are not allowed. For + // more + // information see + // [IAM + // Overview](https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type noMethod TestIamPermissionsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is + // allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type noMethod TestIamPermissionsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// X509CertificateDetails: Details of an X.509 certificate. For +// informational purposes only. +type X509CertificateDetails struct { + // ExpiryTime: The time the certificate becomes invalid. + ExpiryTime string `json:"expiryTime,omitempty"` + + // Issuer: The entity that signed the certificate. + Issuer string `json:"issuer,omitempty"` + + // PublicKeyType: The type of public key in the certificate. + PublicKeyType string `json:"publicKeyType,omitempty"` + + // SignatureAlgorithm: The algorithm used to sign the certificate. + SignatureAlgorithm string `json:"signatureAlgorithm,omitempty"` + + // StartTime: The time the certificate becomes valid. + StartTime string `json:"startTime,omitempty"` + + // Subject: The entity the certificate and public key belong to. + Subject string `json:"subject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpiryTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpiryTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *X509CertificateDetails) MarshalJSON() ([]byte, error) { + type noMethod X509CertificateDetails + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "cloudiot.projects.locations.registries.create": + +type ProjectsLocationsRegistriesCreateCall struct { + s *Service + parent string + deviceregistry *DeviceRegistry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a device registry that contains devices. +func (r *ProjectsLocationsRegistriesService) Create(parent string, deviceregistry *DeviceRegistry) *ProjectsLocationsRegistriesCreateCall { + c := &ProjectsLocationsRegistriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.deviceregistry = deviceregistry + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRegistriesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deviceregistry) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registries") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.create" call. +// Exactly one of *DeviceRegistry or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceRegistry.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesCreateCall) Do(opts ...googleapi.CallOption) (*DeviceRegistry, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceRegistry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a device registry that contains devices.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The project and cloud region where this device registry must be created.\nFor example, `projects/example-project/locations/us-central1`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/registries", + // "request": { + // "$ref": "DeviceRegistry" + // }, + // "response": { + // "$ref": "DeviceRegistry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.delete": + +type ProjectsLocationsRegistriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a device registry configuration. +func (r *ProjectsLocationsRegistriesService) Delete(name string) *ProjectsLocationsRegistriesDeleteCall { + c := &ProjectsLocationsRegistriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a device registry configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + // "httpMethod": "DELETE", + // "id": "cloudiot.projects.locations.registries.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.get": + +type ProjectsLocationsRegistriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a device registry configuration. +func (r *ProjectsLocationsRegistriesService) Get(name string) *ProjectsLocationsRegistriesGetCall { + c := &ProjectsLocationsRegistriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesGetCall) Context(ctx context.Context) *ProjectsLocationsRegistriesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.get" call. +// Exactly one of *DeviceRegistry or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceRegistry.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesGetCall) Do(opts ...googleapi.CallOption) (*DeviceRegistry, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceRegistry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a device registry configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "DeviceRegistry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.getIamPolicy": + +type ProjectsLocationsRegistriesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. +// Returns an empty policy if the resource exists and does not have a +// policy +// set. +func (r *ProjectsLocationsRegistriesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsRegistriesGetIamPolicyCall { + c := &ProjectsLocationsRegistriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistriesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:getIamPolicy", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.list": + +type ProjectsLocationsRegistriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists device registries. +func (r *ProjectsLocationsRegistriesService) List(parent string) *ProjectsLocationsRegistriesListCall { + c := &ProjectsLocationsRegistriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of registries to return in the response. If this value +// is zero, the service will select a default size. A call may return +// fewer +// objects than requested, but if there is a non-empty `page_token`, +// it +// indicates that more entries are available. +func (c *ProjectsLocationsRegistriesListCall) PageSize(pageSize int64) *ProjectsLocationsRegistriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListDeviceRegistriesResponse`; indicates +// that this is a continuation of a prior `ListDeviceRegistries` call, +// and +// that the system should return the next page of data. +func (c *ProjectsLocationsRegistriesListCall) PageToken(pageToken string) *ProjectsLocationsRegistriesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesListCall) Context(ctx context.Context) *ProjectsLocationsRegistriesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/registries") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.list" call. +// Exactly one of *ListDeviceRegistriesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDeviceRegistriesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesListCall) Do(opts ...googleapi.CallOption) (*ListDeviceRegistriesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDeviceRegistriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists device registries.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call, and\nthat the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The project and cloud region path. For example,\n`projects/example-project/locations/us-central1`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/registries", + // "response": { + // "$ref": "ListDeviceRegistriesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRegistriesListCall) Pages(ctx context.Context, f func(*ListDeviceRegistriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudiot.projects.locations.registries.patch": + +type ProjectsLocationsRegistriesPatchCall struct { + s *Service + name string + deviceregistry *DeviceRegistry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a device registry configuration. +func (r *ProjectsLocationsRegistriesService) Patch(name string, deviceregistry *DeviceRegistry) *ProjectsLocationsRegistriesPatchCall { + c := &ProjectsLocationsRegistriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deviceregistry = deviceregistry + return c +} + +// UpdateMask sets the optional parameter "updateMask": Only updates the +// `device_registry` fields indicated by this mask. +// The field mask must not be empty, and it must not contain fields +// that +// are immutable or only set by the server. +// Mutable top-level fields: `event_notification_config`, `mqtt_config`, +// and +// `state_notification_config`. +func (c *ProjectsLocationsRegistriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRegistriesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRegistriesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deviceregistry) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.patch" call. +// Exactly one of *DeviceRegistry or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceRegistry.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesPatchCall) Do(opts ...googleapi.CallOption) (*DeviceRegistry, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceRegistry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a device registry configuration.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + // "httpMethod": "PATCH", + // "id": "cloudiot.projects.locations.registries.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource path name. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Only updates the `device_registry` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `event_notification_config`, `mqtt_config`, and\n`state_notification_config`.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "DeviceRegistry" + // }, + // "response": { + // "$ref": "DeviceRegistry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.setIamPolicy": + +type ProjectsLocationsRegistriesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any +// existing policy. +func (r *ProjectsLocationsRegistriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRegistriesSetIamPolicyCall { + c := &ProjectsLocationsRegistriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistriesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.testIamPermissions": + +type ProjectsLocationsRegistriesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// If the resource does not exist, this will return an empty set +// of +// permissions, not a NOT_FOUND error. +func (r *ProjectsLocationsRegistriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRegistriesTestIamPermissionsCall { + c := &ProjectsLocationsRegistriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRegistriesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.create": + +type ProjectsLocationsRegistriesDevicesCreateCall struct { + s *Service + parent string + device *Device + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a device in a device registry. +func (r *ProjectsLocationsRegistriesDevicesService) Create(parent string, device *Device) *ProjectsLocationsRegistriesDevicesCreateCall { + c := &ProjectsLocationsRegistriesDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.device = device + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.device) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.create" call. +// Exactly one of *Device or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Device.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*Device, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Device{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a device in a device registry.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.devices.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The name of the device registry where this device should be created.\nFor example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/devices", + // "request": { + // "$ref": "Device" + // }, + // "response": { + // "$ref": "Device" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.delete": + +type ProjectsLocationsRegistriesDevicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a device. +func (r *ProjectsLocationsRegistriesDevicesService) Delete(name string) *ProjectsLocationsRegistriesDevicesDeleteCall { + c := &ProjectsLocationsRegistriesDevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a device.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + // "httpMethod": "DELETE", + // "id": "cloudiot.projects.locations.registries.devices.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.get": + +type ProjectsLocationsRegistriesDevicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a device. +func (r *ProjectsLocationsRegistriesDevicesService) Get(name string) *ProjectsLocationsRegistriesDevicesGetCall { + c := &ProjectsLocationsRegistriesDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.get" call. +// Exactly one of *Device or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Device.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Device{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details about a device.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Device" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.list": + +type ProjectsLocationsRegistriesDevicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List devices in a device registry. +func (r *ProjectsLocationsRegistriesDevicesService) List(parent string) *ProjectsLocationsRegistriesDevicesListCall { + c := &ProjectsLocationsRegistriesDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// DeviceIds sets the optional parameter "deviceIds": A list of device +// string identifiers. If empty, it will ignore this field. +// For example, `['device0', 'device12']`. This field cannot hold more +// than +// 10,000 entries. +func (c *ProjectsLocationsRegistriesDevicesListCall) DeviceIds(deviceIds ...string) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.SetMulti("deviceIds", append([]string{}, deviceIds...)) + return c +} + +// DeviceNumIds sets the optional parameter "deviceNumIds": A list of +// device numerical ids. If empty, it will ignore this field. This +// field cannot hold more than 10,000 entries. +func (c *ProjectsLocationsRegistriesDevicesListCall) DeviceNumIds(deviceNumIds ...uint64) *ProjectsLocationsRegistriesDevicesListCall { + var deviceNumIds_ []string + for _, v := range deviceNumIds { + deviceNumIds_ = append(deviceNumIds_, fmt.Sprint(v)) + } + c.urlParams_.SetMulti("deviceNumIds", deviceNumIds_) + return c +} + +// FieldMask sets the optional parameter "fieldMask": The fields of the +// `Device` resource to be returned in the response. The +// fields `id`, and `num_id` are always returned by default, along with +// any +// other fields specified. +func (c *ProjectsLocationsRegistriesDevicesListCall) FieldMask(fieldMask string) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("fieldMask", fieldMask) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of devices to return in the response. If this value +// is zero, the service will select a default size. A call may return +// fewer +// objects than requested, but if there is a non-empty `page_token`, +// it +// indicates that more entries are available. +func (c *ProjectsLocationsRegistriesDevicesListCall) PageSize(pageSize int64) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListDevicesResponse`; indicates +// that this is a continuation of a prior `ListDevices` call, and +// that the system should return the next page of data. +func (c *ProjectsLocationsRegistriesDevicesListCall) PageToken(pageToken string) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesListCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/devices") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.list" call. +// Exactly one of *ListDevicesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDevicesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDevicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List devices in a device registry.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "deviceIds": { + // "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "deviceNumIds": { + // "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries.", + // "format": "uint64", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "fieldMask": { + // "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The device registry path. Required. For example,\n`projects/my-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/devices", + // "response": { + // "$ref": "ListDevicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRegistriesDevicesListCall) Pages(ctx context.Context, f func(*ListDevicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig": + +type ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall struct { + s *Service + name string + modifycloudtodeviceconfigrequest *ModifyCloudToDeviceConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModifyCloudToDeviceConfig: Modifies the configuration for the device, +// which is eventually sent from +// the Cloud IoT Core servers. Returns the modified configuration +// version and +// its metadata. +func (r *ProjectsLocationsRegistriesDevicesService) ModifyCloudToDeviceConfig(name string, modifycloudtodeviceconfigrequest *ModifyCloudToDeviceConfigRequest) *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall { + c := &ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.modifycloudtodeviceconfigrequest = modifycloudtodeviceconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycloudtodeviceconfigrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:modifyCloudToDeviceConfig") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig" call. +// Exactly one of *DeviceConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Do(opts ...googleapi.CallOption) (*DeviceConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies the configuration for the device, which is eventually sent from\nthe Cloud IoT Core servers. Returns the modified configuration version and\nits metadata.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:modifyCloudToDeviceConfig", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:modifyCloudToDeviceConfig", + // "request": { + // "$ref": "ModifyCloudToDeviceConfigRequest" + // }, + // "response": { + // "$ref": "DeviceConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.patch": + +type ProjectsLocationsRegistriesDevicesPatchCall struct { + s *Service + name string + device *Device + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a device. +func (r *ProjectsLocationsRegistriesDevicesService) Patch(name string, device *Device) *ProjectsLocationsRegistriesDevicesPatchCall { + c := &ProjectsLocationsRegistriesDevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.device = device + return c +} + +// UpdateMask sets the optional parameter "updateMask": Only updates the +// `device` fields indicated by this mask. +// The field mask must not be empty, and it must not contain fields +// that +// are immutable or only set by the server. +// Mutable top-level fields: `credentials`, `enabled_state`, and +// `metadata` +func (c *ProjectsLocationsRegistriesDevicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRegistriesDevicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.device) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.patch" call. +// Exactly one of *Device or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Device.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*Device, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Device{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a device.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + // "httpMethod": "PATCH", + // "id": "cloudiot.projects.locations.registries.devices.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource path name. For example,\n`projects/p1/locations/us-central1/registries/registry0/devices/dev0` or\n`projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.\nWhen `name` is populated as a response from the service, it always ends\nin the device numeric ID.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Only updates the `device` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `credentials`, `enabled_state`, and `metadata`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Device" + // }, + // "response": { + // "$ref": "Device" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.configVersions.list": + +type ProjectsLocationsRegistriesDevicesConfigVersionsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the last few versions of the device configuration in +// descending +// order (i.e.: newest first). +func (r *ProjectsLocationsRegistriesDevicesConfigVersionsService) List(name string) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c := &ProjectsLocationsRegistriesDevicesConfigVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// NumVersions sets the optional parameter "numVersions": The number of +// versions to list. Versions are listed in decreasing order of +// the version number. The maximum number of versions retained is 10. If +// this +// value is zero, it will return all the versions available. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) NumVersions(numVersions int64) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.urlParams_.Set("numVersions", fmt.Sprint(numVersions)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/configVersions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.configVersions.list" call. +// Exactly one of *ListDeviceConfigVersionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDeviceConfigVersionsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Do(opts ...googleapi.CallOption) (*ListDeviceConfigVersionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDeviceConfigVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the last few versions of the device configuration in descending\norder (i.e.: newest first).", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/configVersions", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.configVersions.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "numVersions": { + // "description": "The number of versions to list. Versions are listed in decreasing order of\nthe version number. The maximum number of versions retained is 10. If this\nvalue is zero, it will return all the versions available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // } + // }, + // "path": "v1/{+name}/configVersions", + // "response": { + // "$ref": "ListDeviceConfigVersionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.states.list": + +type ProjectsLocationsRegistriesDevicesStatesListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the last few versions of the device state in descending +// order (i.e.: +// newest first). +func (r *ProjectsLocationsRegistriesDevicesStatesService) List(name string) *ProjectsLocationsRegistriesDevicesStatesListCall { + c := &ProjectsLocationsRegistriesDevicesStatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// NumStates sets the optional parameter "numStates": The number of +// states to list. States are listed in descending order of +// update time. The maximum number of states retained is 10. If +// this +// value is zero, it will return all the states available. +func (c *ProjectsLocationsRegistriesDevicesStatesListCall) NumStates(numStates int64) *ProjectsLocationsRegistriesDevicesStatesListCall { + c.urlParams_.Set("numStates", fmt.Sprint(numStates)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesStatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesStatesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesStatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesStatesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesStatesListCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesStatesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesStatesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesStatesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/states") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.states.list" call. +// Exactly one of *ListDeviceStatesResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListDeviceStatesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesStatesListCall) Do(opts ...googleapi.CallOption) (*ListDeviceStatesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDeviceStatesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the last few versions of the device state in descending order (i.e.:\nnewest first).", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/states", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.states.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "numStates": { + // "description": "The number of states to list. States are listed in descending order of\nupdate time. The maximum number of states retained is 10. If this\nvalue is zero, it will return all the states available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // } + // }, + // "path": "v1/{+name}/states", + // "response": { + // "$ref": "ListDeviceStatesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-api.json b/vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-api.json new file mode 100644 index 000000000..9d5e04c86 --- /dev/null +++ b/vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-api.json @@ -0,0 +1,1251 @@ +{ + "basePath": "", + "id": "cloudiot:v1beta1", + "documentationLink": "https://cloud.google.com/iot", + "revision": "20170922", + "discoveryVersion": "v1", + "version_module": true, + "schemas": { + "NotificationConfig": { + "id": "NotificationConfig", + "description": "Configuration to forward messages such as telemetry events.", + "type": "object", + "properties": { + "pubsubTopicName": { + "description": "A Cloud Pub/Sub topic name. For example,\n`projects/myProject/topics/deviceEvents`.", + "type": "string" + } + } + }, + "HttpPublishEventRequest": { + "description": "Request for `PublishEvent`.", + "type": "object", + "properties": { + "subFolder": { + "description": "Optional subfolder for the telemetry event. This can be used to classify\ntypes of events, and is included in the Pub/Sub message attributes.", + "type": "string" + }, + "binaryData": { + "format": "byte", + "description": "Payload data in binary format.", + "type": "string" + } + }, + "id": "HttpPublishEventRequest" + }, + "Device": { + "description": "The device resource.", + "type": "object", + "properties": { + "enabledState": { + "description": "If a device is disabled, communication from it will be blocked. Can be used\nto temporarily prevent the device from connecting if, for example, the\nsensor is generating bad data and needs maintenance.", + "type": "string", + "enumDescriptions": [ + "No enabled state specified. If not specified, defaults to enabled\n(communication to Cloud IoT Core allowed).", + "Enables a device. By default, devices are enabled, allowing communication\nfrom the device to Cloud IoT Core. When a device is disabled, it is blocked\nfrom communicating with Cloud IoT Core.", + "Disables a device, blocking all communication from it to Cloud IoT Core." + ], + "enum": [ + "UNSPECIFIED_ENABLED_STATE", + "DEVICE_ENABLED", + "DEVICE_DISABLED" + ] + }, + "id": { + "description": "The user-defined device identifier. The device ID must be unique\nwithin a device registry.", + "type": "string" + }, + "lastHeartbeatTime": { + "format": "google-datetime", + "description": "[Output only] The last time a heartbeat was received. Timestamps are\nperiodically collected and written to storage; they may be stale by a few\nminutes.", + "type": "string" + }, + "lastEventTime": { + "format": "google-datetime", + "description": "[Output only] The last time an event was received. Timestamps are\nperiodically collected and written to storage; they may be stale by a few\nminutes.", + "type": "string" + }, + "lastErrorStatus": { + "description": "[Output only] The error message of the last error, e.g., failed to publish\nto Cloud Pub/Sub. 'last_error_time' is the timestamp of this field. If no\nerrors are present, this will have an empty message (whose status code is\n0 == OK), otherwise this field is expected to have a not-OK status code.", + "$ref": "Status" + }, + "lastConfigAckTime": { + "format": "google-datetime", + "description": "[Output only] The last time a cloud-to-device config version acknowledgment\nwas received from the device.", + "type": "string" + }, + "numId": { + "format": "uint64", + "description": "[Output only] A server-defined unique numeric ID for the device. This is a\nmore compact way to identify devices, and it is globally unique.", + "type": "string" + }, + "config": { + "$ref": "DeviceConfig", + "description": "The most recent device configuration, which is eventually sent from the\nCloud IoT Core service to the device. If not present on creation, the\nconfiguration will be initialized with an empty payload and version value\nof `1`. To update this field after creation, use the\n`DeviceManager.ModifyCloudToDeviceConfig` method." + }, + "name": { + "description": "The resource path name. For example,\n`projects/p1/locations/us-central1/registries/registry0/devices/dev0` or\n`projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.\nWhen `name` is populated as a response from the service, it always ends\nin the device numeric ID.", + "type": "string" + }, + "credentials": { + "description": "The credentials used to authenticate this device. To allow credential\nrotation without interruption, multiple device credentials can be bound to\nthis device. No more than 3 credentials can be bound to a single device at\na time.", + "items": { + "$ref": "DeviceCredential" + }, + "type": "array" + }, + "lastErrorTime": { + "format": "google-datetime", + "description": "[Output only] The last time an error happened, e.g., failed to publish to\nCloud Pub/Sub. This field is the timestamp of 'last_error_status'.", + "type": "string" + } + }, + "id": "Device" + }, + "HttpSetDeviceStateRequest": { + "description": "Request for `SetDeviceState`.", + "type": "object", + "properties": { + "state": { + "$ref": "HttpDeviceState", + "description": "The device state." + } + }, + "id": "HttpSetDeviceStateRequest" + }, + "ListDeviceConfigVersionsResponse": { + "id": "ListDeviceConfigVersionsResponse", + "description": "Response for `ListDeviceConfigVersions`.", + "type": "object", + "properties": { + "deviceConfigs": { + "description": "The device configuration for the last few versions. Versions are listed\nin decreasing order, starting from the most recent one.", + "items": { + "$ref": "DeviceConfig" + }, + "type": "array" + } + } + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "updateMask": { + "format": "google-fieldmask", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "type": "string" + }, + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest" + }, + "HttpDeviceState": { + "id": "HttpDeviceState", + "description": "The device state reported to Cloud IoT Core.", + "type": "object", + "properties": { + "binaryData": { + "format": "byte", + "description": "Data in binary format.", + "type": "string" + } + } + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "DeviceConfigData": { + "id": "DeviceConfigData", + "description": "The data for a device configuration. Only binary data is currently supported.", + "type": "object", + "properties": { + "binaryData": { + "format": "byte", + "description": "The configuration sent to the device, as bytes.", + "type": "string" + } + } + }, + "PublicKeyCredential": { + "description": "A public key format and data.", + "type": "object", + "properties": { + "key": { + "description": "The key data.", + "type": "string" + }, + "format": { + "enumDescriptions": [ + "The format has not been specified. This is an invalid default value and\nmust not be used.", + "An RSA public key wrapped in a X.509v3 certificate\n[RFC5280](https://www.ietf.org/rfc/rfc5280.txt), encoded in base64, and\nwrapped by `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`.\nThis can be used to verify `RS256` signatures in JWT tokens\n[RFC7518](https://www.ietf.org/rfc/rfc7518.txt).", + "Public key for the ECDSA algorithm using P-256 and SHA-256, encoded in\nbase64, and wrapped by `-----BEGIN PUBLIC KEY-----` and `-----END\nPUBLIC KEY-----`. This can be used to verify JWT tokens with the `ES256`\nalgorithm [RFC7518](https://www.ietf.org/rfc/rfc7518.txt). This curve is\ndefined in [openssl](https://www.openssl.org/) as the `prime256v1` curve." + ], + "enum": [ + "UNSPECIFIED_PUBLIC_KEY_FORMAT", + "RSA_X509_PEM", + "ES256_PEM" + ], + "description": "The format of the key.", + "type": "string" + } + }, + "id": "PublicKeyCredential" + }, + "AuditLogConfig": { + "id": "AuditLogConfig", + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "type": "string", + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ] + } + } + }, + "TestIamPermissionsRequest": { + "id": "TestIamPermissionsRequest", + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "iamOwned": { + "type": "boolean" + }, + "etag": { + "format": "byte", + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "type": "string" + } + }, + "id": "Policy" + }, + "ListDeviceRegistriesResponse": { + "id": "ListDeviceRegistriesResponse", + "description": "Response for `ListDeviceRegistries`.", + "type": "object", + "properties": { + "deviceRegistries": { + "description": "The registries that matched the query.", + "items": { + "$ref": "DeviceRegistry" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If not empty, indicates that there may be more registries that match the\nrequest; this value should be passed in a new\n`ListDeviceRegistriesRequest`.", + "type": "string" + } + } + }, + "DeviceRegistry": { + "id": "DeviceRegistry", + "description": "A container for a group of devices.", + "type": "object", + "properties": { + "id": { + "description": "The identifier of this device registry. For example, `myRegistry`.", + "type": "string" + }, + "mqttConfig": { + "description": "The configuration of the MQTT broker associated with this device registry,\nincluding enablement, payload data format type, etc.", + "$ref": "MqttConfig" + }, + "name": { + "description": "The resource path name. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string" + }, + "eventNotificationConfig": { + "description": "Configuration to notify events received from the device.", + "$ref": "NotificationConfig" + } + } + }, + "ListDevicesResponse": { + "id": "ListDevicesResponse", + "description": "Response for `ListDevices`.", + "type": "object", + "properties": { + "devices": { + "description": "The devices that match the request.", + "items": { + "$ref": "Device" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If not empty, indicates that there may be more devices that match the\nrequest; this value should be passed in a new `ListDevicesRequest`.", + "type": "string" + } + } + }, + "AuditConfig": { + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object", + "properties": { + "exemptedMembers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", + "type": "string" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + } + }, + "id": "AuditConfig" + }, + "DeviceCredential": { + "description": "A server-stored device credential used for authentication.", + "type": "object", + "properties": { + "expirationTime": { + "format": "google-datetime", + "description": "[Optional] The time at which this credential becomes invalid. This\ncredential will be ignored for new client authentication requests after\nthis timestamp; however, it will not be automatically deleted.", + "type": "string" + }, + "publicKey": { + "$ref": "PublicKeyCredential", + "description": "A public key used to verify the signature of JSON Web Tokens (JWTs)." + } + }, + "id": "DeviceCredential" + }, + "DeviceConfig": { + "id": "DeviceConfig", + "description": "The device configuration and its metadata. Eventually delivered to devices.", + "type": "object", + "properties": { + "deviceAckTime": { + "format": "google-datetime", + "description": "[Output only] The time when the Cloud IoT Core server received the\nacknowledgment from the device, indicating that the device has received\nthis configuration version. If this field is not present, the device has\nnot yet acknowledged that it received this version. Note that when sending\nthe config to the device, there may have been many config versions on the\nCloud IoT Core service while the device was disconnected; and on\nconnection, only the latest version is sent to the device. Some of the\nversions may never be sent to the device, and therefore are never\nacknowledged. This timestamp is set by the Cloud IoT Core service.", + "type": "string" + }, + "cloudUpdateTime": { + "format": "google-datetime", + "description": "[Output only] The time when this version state was updated in the Cloud IoT\nCore service. This timestamp is set by the server.", + "type": "string" + }, + "version": { + "format": "int64", + "description": "[Output only] The version of this update. The version number is assigned by\nthe server, and is always greater than zero after device creation. The\nversion must be zero on the `CreateDevice` request if a `config` is\nspecified; the response of `CreateDevice` will always have a value of one.", + "type": "string" + }, + "data": { + "$ref": "DeviceConfigData", + "description": "The device configuration data." + } + } + }, + "MqttConfig": { + "description": "The configuration of MQTT for a device registry.", + "type": "object", + "properties": { + "mqttConfigState": { + "description": "If enabled, allows connections using the MQTT protocol. Otherwise any MQTT\nconnection to this registry will fail.", + "type": "string", + "enumDescriptions": [ + "No MQTT state specified. If not specified, MQTT will be enabled by default.", + "Enables a MQTT connection.", + "Disables a MQTT connection." + ], + "enum": [ + "UNSPECIFIED_MQTT_STATE", + "MQTT_ENABLED", + "MQTT_DISABLED" + ] + } + }, + "id": "MqttConfig" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + } + }, + "id": "Status" + }, + "Binding": { + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + } + } + }, + "Expr": { + "id": "Expr", + "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", + "type": "object", + "properties": { + "description": { + "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", + "type": "string" + }, + "location": { + "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", + "type": "string" + } + } + }, + "HttpPublishEventResponse": { + "description": "Response for `PublishEvent`.", + "type": "object", + "properties": {}, + "id": "HttpPublishEventResponse" + }, + "ModifyCloudToDeviceConfigRequest": { + "description": "Request for `ModifyCloudToDeviceConfig`.", + "type": "object", + "properties": { + "versionToUpdate": { + "format": "int64", + "description": "The version number to update. If this value is zero, it will not check the\nversion number of the server and will always update the current version;\notherwise, this update will fail if the version number found on the server\ndoes not match this version number. This is used to support multiple\nsimultaneous updates without losing data.", + "type": "string" + }, + "data": { + "$ref": "DeviceConfigData", + "description": "The configuration data for the device." + } + }, + "id": "ModifyCloudToDeviceConfigRequest" + }, + "GetIamPolicyRequest": { + "id": "GetIamPolicyRequest", + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {} + }, + "TestIamPermissionsResponse": { + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "HttpDeviceConfig": { + "description": "The device configuration obtained from Cloud IoT Core.", + "type": "object", + "properties": { + "version": { + "format": "int64", + "description": "The version of the configuration in Cloud IoT Core.", + "type": "string" + }, + "binaryData": { + "format": "byte", + "description": "Data in binary format.", + "type": "string" + } + }, + "id": "HttpDeviceConfig" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "canonicalName": "Cloud Iot", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloudiot": { + "description": "Register and manage devices in the Google Cloud IoT service" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://cloudiot.googleapis.com/", + "ownerDomain": "google.com", + "name": "cloudiot", + "batchPath": "batch", + "title": "Google Cloud IoT API", + "ownerName": "Google", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "registries": { + "methods": { + "delete": { + "path": "v1beta1/{+name}", + "id": "cloudiot.projects.locations.registries.delete", + "description": "Deletes a device registry configuration.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}" + }, + "list": { + "path": "v1beta1/{+parent}/registries", + "id": "cloudiot.projects.locations.registries.list", + "description": "Lists device registries.", + "httpMethod": "GET", + "response": { + "$ref": "ListDeviceRegistriesResponse" + }, + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "pageToken": { + "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call, and\nthat the system should return the next page of data.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "The project and cloud region path. For example,\n`projects/example-project/locations/us-central1`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries" + }, + "create": { + "parameters": { + "parent": { + "description": "The project and cloud region where this device registry must be created.\nFor example, `projects/example-project/locations/us-central1`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries", + "path": "v1beta1/{+parent}/registries", + "id": "cloudiot.projects.locations.registries.create", + "description": "Creates a device registry that contains devices.", + "request": { + "$ref": "DeviceRegistry" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "DeviceRegistry" + } + }, + "setIamPolicy": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy", + "id": "cloudiot.projects.locations.registries.setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + } + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:getIamPolicy", + "path": "v1beta1/{+resource}:getIamPolicy", + "id": "cloudiot.projects.locations.registries.getIamPolicy" + }, + "patch": { + "path": "v1beta1/{+name}", + "id": "cloudiot.projects.locations.registries.patch", + "request": { + "$ref": "DeviceRegistry" + }, + "description": "Updates a device registry configuration.", + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "DeviceRegistry" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path", + "description": "The resource path name. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Only updates the `device_registry` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `event_notification_config` and `mqtt_config`", + "type": "string" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "DeviceRegistry" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + "path": "v1beta1/{+name}", + "id": "cloudiot.projects.locations.registries.get", + "description": "Gets a device registry configuration." + }, + "testIamPermissions": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "id": "cloudiot.projects.locations.registries.testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", + "request": { + "$ref": "TestIamPermissionsRequest" + } + } + }, + "resources": { + "devices": { + "methods": { + "delete": { + "id": "cloudiot.projects.locations.registries.devices.delete", + "path": "v1beta1/{+name}", + "description": "Deletes a device.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}" + }, + "list": { + "parameters": { + "pageToken": { + "location": "query", + "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", + "type": "string" + }, + "fieldMask": { + "format": "google-fieldmask", + "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + "type": "integer" + }, + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path", + "description": "The device registry path. Required. For example,\n`projects/my-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true + }, + "deviceIds": { + "repeated": true, + "location": "query", + "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", + "type": "string" + }, + "deviceNumIds": { + "repeated": true, + "location": "query", + "format": "uint64", + "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices", + "path": "v1beta1/{+parent}/devices", + "id": "cloudiot.projects.locations.registries.devices.list", + "description": "List devices in a device registry.", + "httpMethod": "GET", + "response": { + "$ref": "ListDevicesResponse" + }, + "parameterOrder": [ + "parent" + ] + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Device" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "parent": { + "description": "The name of the device registry where this device should be created.\nFor example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices", + "path": "v1beta1/{+parent}/devices", + "id": "cloudiot.projects.locations.registries.devices.create", + "request": { + "$ref": "Device" + }, + "description": "Creates a device in a device registry." + }, + "modifyCloudToDeviceConfig": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "DeviceConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:modifyCloudToDeviceConfig", + "path": "v1beta1/{+name}:modifyCloudToDeviceConfig", + "id": "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig", + "request": { + "$ref": "ModifyCloudToDeviceConfigRequest" + }, + "description": "Modifies the configuration for the device, which is eventually sent from\nthe Cloud IoT servers. Returns the modified configuration version and its\nmeta-data." + }, + "publishEvent": { + "response": { + "$ref": "HttpPublishEventResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path", + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:publishEvent", + "id": "cloudiot.projects.locations.registries.devices.publishEvent", + "path": "v1beta1/{+name}:publishEvent", + "request": { + "$ref": "HttpPublishEventRequest" + }, + "description": "Publishes a telemetry event for a device." + }, + "get": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + "path": "v1beta1/{+name}", + "id": "cloudiot.projects.locations.registries.devices.get", + "description": "Gets details about a device.", + "httpMethod": "GET", + "response": { + "$ref": "Device" + }, + "parameterOrder": [ + "name" + ] + }, + "patch": { + "path": "v1beta1/{+name}", + "id": "cloudiot.projects.locations.registries.devices.patch", + "description": "Updates a device.", + "request": { + "$ref": "Device" + }, + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Device" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path", + "description": "The resource path name. For example,\n`projects/p1/locations/us-central1/registries/registry0/devices/dev0` or\n`projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.\nWhen `name` is populated as a response from the service, it always ends\nin the device numeric ID.", + "type": "string", + "required": true + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Only updates the `device` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `credentials` and `enabled_state`", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}" + }, + "setState": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:setState", + "id": "cloudiot.projects.locations.registries.devices.setState", + "path": "v1beta1/{+name}:setState", + "description": "Sets the state of a device.", + "request": { + "$ref": "HttpSetDeviceStateRequest" + } + }, + "getConfig": { + "path": "v1beta1/{+name}/config", + "id": "cloudiot.projects.locations.registries.devices.getConfig", + "description": "Gets the configuration of a device.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "HttpDeviceConfig" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path", + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0`.", + "type": "string", + "required": true + }, + "localVersion": { + "format": "int64", + "description": "If zero, returns the current device configuration from Cloud IoT Core.\nIf nonzero, specifies the local version of the configuration on the device.\nThe server returns config data only if a higher (newer) version is\navailable from Cloud IoT Core.\nIf this value is higher than the latest version available in Cloud IoT\nCore, returns an `OUT_OF_RANGE` error.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/config" + } + }, + "resources": { + "configVersions": { + "methods": { + "list": { + "response": { + "$ref": "ListDeviceConfigVersionsResponse" + }, + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloudiot" + ], + "parameters": { + "name": { + "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + "location": "path" + }, + "numVersions": { + "format": "int32", + "description": "The number of versions to list. Versions are listed in decreasing order of\nthe version number. The maximum number of versions retained is 10. If this\nvalue is zero, it will return all the versions available.", + "type": "integer", + "location": "query" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/configVersions", + "id": "cloudiot.projects.locations.registries.devices.configVersions.list", + "path": "v1beta1/{+name}/configVersions", + "description": "Lists the last few versions of the device configuration in descending\norder (i.e.: newest first)." + } + } + } + } + } + } + } + } + } + } + } + }, + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + } + }, + "version": "v1beta1", + "baseUrl": "https://cloudiot.googleapis.com/", + "description": "Registers and manages IoT (Internet of Things) devices that connect to the Google Cloud Platform.\n", + "kind": "discovery#restDescription", + "servicePath": "" +} diff --git a/vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-gen.go b/vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-gen.go new file mode 100644 index 000000000..a5cb77f6c --- /dev/null +++ b/vendor/google.golang.org/api/cloudiot/v1beta1/cloudiot-gen.go @@ -0,0 +1,4174 @@ +// Package cloudiot provides access to the Google Cloud IoT API. +// +// See https://cloud.google.com/iot +// +// Usage example: +// +// import "google.golang.org/api/cloudiot/v1beta1" +// ... +// cloudiotService, err := cloudiot.New(oauthHttpClient) +package cloudiot // import "google.golang.org/api/cloudiot/v1beta1" + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + context "golang.org/x/net/context" + ctxhttp "golang.org/x/net/context/ctxhttp" + gensupport "google.golang.org/api/gensupport" + googleapi "google.golang.org/api/googleapi" + "io" + "net/http" + "net/url" + "strconv" + "strings" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = ctxhttp.Do + +const apiId = "cloudiot:v1beta1" +const apiName = "cloudiot" +const apiVersion = "v1beta1" +const basePath = "https://cloudiot.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // View and manage your data across Google Cloud Platform services + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + + // Register and manage devices in the Google Cloud IoT service + CloudiotScope = "https://www.googleapis.com/auth/cloudiot" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Registries = NewProjectsLocationsRegistriesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Registries *ProjectsLocationsRegistriesService +} + +func NewProjectsLocationsRegistriesService(s *Service) *ProjectsLocationsRegistriesService { + rs := &ProjectsLocationsRegistriesService{s: s} + rs.Devices = NewProjectsLocationsRegistriesDevicesService(s) + return rs +} + +type ProjectsLocationsRegistriesService struct { + s *Service + + Devices *ProjectsLocationsRegistriesDevicesService +} + +func NewProjectsLocationsRegistriesDevicesService(s *Service) *ProjectsLocationsRegistriesDevicesService { + rs := &ProjectsLocationsRegistriesDevicesService{s: s} + rs.ConfigVersions = NewProjectsLocationsRegistriesDevicesConfigVersionsService(s) + return rs +} + +type ProjectsLocationsRegistriesDevicesService struct { + s *Service + + ConfigVersions *ProjectsLocationsRegistriesDevicesConfigVersionsService +} + +func NewProjectsLocationsRegistriesDevicesConfigVersionsService(s *Service) *ProjectsLocationsRegistriesDevicesConfigVersionsService { + rs := &ProjectsLocationsRegistriesDevicesConfigVersionsService{s: s} + return rs +} + +type ProjectsLocationsRegistriesDevicesConfigVersionsService struct { + s *Service +} + +// AuditConfig: Specifies the audit configuration for a service. +// The configuration determines which permission types are logged, and +// what +// identities, if any, are exempted from logging. +// An AuditConfig must have one or more AuditLogConfigs. +// +// If there are AuditConfigs for both `allServices` and a specific +// service, +// the union of the two AuditConfigs is used for that service: the +// log_types +// specified in each AuditConfig are enabled, and the exempted_members +// in each +// AuditConfig are exempted. +// +// Example Policy with multiple AuditConfigs: +// +// { +// "audit_configs": [ +// { +// "service": "allServices" +// "audit_log_configs": [ +// { +// "log_type": "DATA_READ", +// "exempted_members": [ +// "user:foo@gmail.com" +// ] +// }, +// { +// "log_type": "DATA_WRITE", +// }, +// { +// "log_type": "ADMIN_READ", +// } +// ] +// }, +// { +// "service": "fooservice.googleapis.com" +// "audit_log_configs": [ +// { +// "log_type": "DATA_READ", +// }, +// { +// "log_type": "DATA_WRITE", +// "exempted_members": [ +// "user:bar@gmail.com" +// ] +// } +// ] +// } +// ] +// } +// +// For fooservice, this policy enables DATA_READ, DATA_WRITE and +// ADMIN_READ +// logging. It also exempts foo@gmail.com from DATA_READ logging, +// and +// bar@gmail.com from DATA_WRITE logging. +type AuditConfig struct { + // AuditLogConfigs: The configuration for logging of each type of + // permission. + // Next ID: 4 + AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` + + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // Service: Specifies a service that will be enabled for audit + // logging. + // For example, `storage.googleapis.com`, + // `cloudsql.googleapis.com`. + // `allServices` is a special value that covers all services. + Service string `json:"service,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditLogConfigs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditConfig) MarshalJSON() ([]byte, error) { + type noMethod AuditConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// AuditLogConfig: Provides the configuration for logging a type of +// permissions. +// Example: +// +// { +// "audit_log_configs": [ +// { +// "log_type": "DATA_READ", +// "exempted_members": [ +// "user:foo@gmail.com" +// ] +// }, +// { +// "log_type": "DATA_WRITE", +// } +// ] +// } +// +// This enables 'DATA_READ' and 'DATA_WRITE' logging, while +// exempting +// foo@gmail.com from DATA_READ logging. +type AuditLogConfig struct { + // ExemptedMembers: Specifies the identities that do not cause logging + // for this type of + // permission. + // Follows the same format of Binding.members. + ExemptedMembers []string `json:"exemptedMembers,omitempty"` + + // LogType: The log type that this config enables. + // + // Possible values: + // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. + // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy + // "DATA_WRITE" - Data writes. Example: CloudSQL Users create + // "DATA_READ" - Data reads. Example: CloudSQL Users list + LogType string `json:"logType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExemptedMembers") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { + type noMethod AuditLogConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Binding: Associates `members` with a `role`. +type Binding struct { + // Condition: The condition that is associated with this binding. + // NOTE: an unsatisfied condition will not allow user access via + // current + // binding. Different bindings, including their conditions, are + // examined + // independently. + // This field is GOOGLE_INTERNAL. + Condition *Expr `json:"condition,omitempty"` + + // Members: Specifies the identities requesting access for a Cloud + // Platform resource. + // `members` can have the following values: + // + // * `allUsers`: A special identifier that represents anyone who is + // on the internet; with or without a Google account. + // + // * `allAuthenticatedUsers`: A special identifier that represents + // anyone + // who is authenticated with a Google account or a service + // account. + // + // * `user:{emailid}`: An email address that represents a specific + // Google + // account. For example, `alice@gmail.com` or `joe@example.com`. + // + // + // * `serviceAccount:{emailid}`: An email address that represents a + // service + // account. For example, + // `my-other-app@appspot.gserviceaccount.com`. + // + // * `group:{emailid}`: An email address that represents a Google + // group. + // For example, `admins@example.com`. + // + // + // * `domain:{domain}`: A Google Apps domain name that represents all + // the + // users of that domain. For example, `google.com` or + // `example.com`. + // + // + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to `members`. + // For example, `roles/viewer`, `roles/editor`, or + // `roles/owner`. + // Required + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Condition") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type noMethod Binding + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Device: The device resource. +type Device struct { + // Config: The most recent device configuration, which is eventually + // sent from the + // Cloud IoT Core service to the device. If not present on creation, + // the + // configuration will be initialized with an empty payload and version + // value + // of `1`. To update this field after creation, use + // the + // `DeviceManager.ModifyCloudToDeviceConfig` method. + Config *DeviceConfig `json:"config,omitempty"` + + // Credentials: The credentials used to authenticate this device. To + // allow credential + // rotation without interruption, multiple device credentials can be + // bound to + // this device. No more than 3 credentials can be bound to a single + // device at + // a time. + Credentials []*DeviceCredential `json:"credentials,omitempty"` + + // EnabledState: If a device is disabled, communication from it will be + // blocked. Can be used + // to temporarily prevent the device from connecting if, for example, + // the + // sensor is generating bad data and needs maintenance. + // + // Possible values: + // "UNSPECIFIED_ENABLED_STATE" - No enabled state specified. If not + // specified, defaults to enabled + // (communication to Cloud IoT Core allowed). + // "DEVICE_ENABLED" - Enables a device. By default, devices are + // enabled, allowing communication + // from the device to Cloud IoT Core. When a device is disabled, it is + // blocked + // from communicating with Cloud IoT Core. + // "DEVICE_DISABLED" - Disables a device, blocking all communication + // from it to Cloud IoT Core. + EnabledState string `json:"enabledState,omitempty"` + + // Id: The user-defined device identifier. The device ID must be + // unique + // within a device registry. + Id string `json:"id,omitempty"` + + // LastConfigAckTime: [Output only] The last time a cloud-to-device + // config version acknowledgment + // was received from the device. + LastConfigAckTime string `json:"lastConfigAckTime,omitempty"` + + // LastErrorStatus: [Output only] The error message of the last error, + // e.g., failed to publish + // to Cloud Pub/Sub. 'last_error_time' is the timestamp of this field. + // If no + // errors are present, this will have an empty message (whose status + // code is + // 0 == OK), otherwise this field is expected to have a not-OK status + // code. + LastErrorStatus *Status `json:"lastErrorStatus,omitempty"` + + // LastErrorTime: [Output only] The last time an error happened, e.g., + // failed to publish to + // Cloud Pub/Sub. This field is the timestamp of 'last_error_status'. + LastErrorTime string `json:"lastErrorTime,omitempty"` + + // LastEventTime: [Output only] The last time an event was received. + // Timestamps are + // periodically collected and written to storage; they may be stale by a + // few + // minutes. + LastEventTime string `json:"lastEventTime,omitempty"` + + // LastHeartbeatTime: [Output only] The last time a heartbeat was + // received. Timestamps are + // periodically collected and written to storage; they may be stale by a + // few + // minutes. + LastHeartbeatTime string `json:"lastHeartbeatTime,omitempty"` + + // Name: The resource path name. For + // example, + // `projects/p1/locations/us-central1/registries/registry0/devic + // es/dev0` + // or + // `projects/p1/locations/us-central1/registries/registry0/devices/{nu + // m_id}`. + // When `name` is populated as a response from the service, it always + // ends + // in the device numeric ID. + Name string `json:"name,omitempty"` + + // NumId: [Output only] A server-defined unique numeric ID for the + // device. This is a + // more compact way to identify devices, and it is globally unique. + NumId uint64 `json:"numId,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Config") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Config") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Device) MarshalJSON() ([]byte, error) { + type noMethod Device + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceConfig: The device configuration and its metadata. Eventually +// delivered to devices. +type DeviceConfig struct { + // CloudUpdateTime: [Output only] The time when this version state was + // updated in the Cloud IoT + // Core service. This timestamp is set by the server. + CloudUpdateTime string `json:"cloudUpdateTime,omitempty"` + + // Data: The device configuration data. + Data *DeviceConfigData `json:"data,omitempty"` + + // DeviceAckTime: [Output only] The time when the Cloud IoT Core server + // received the + // acknowledgment from the device, indicating that the device has + // received + // this configuration version. If this field is not present, the device + // has + // not yet acknowledged that it received this version. Note that when + // sending + // the config to the device, there may have been many config versions on + // the + // Cloud IoT Core service while the device was disconnected; and + // on + // connection, only the latest version is sent to the device. Some of + // the + // versions may never be sent to the device, and therefore are + // never + // acknowledged. This timestamp is set by the Cloud IoT Core service. + DeviceAckTime string `json:"deviceAckTime,omitempty"` + + // Version: [Output only] The version of this update. The version number + // is assigned by + // the server, and is always greater than zero after device creation. + // The + // version must be zero on the `CreateDevice` request if a `config` + // is + // specified; the response of `CreateDevice` will always have a value of + // one. + Version int64 `json:"version,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CloudUpdateTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CloudUpdateTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceConfig) MarshalJSON() ([]byte, error) { + type noMethod DeviceConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceConfigData: The data for a device configuration. Only binary +// data is currently supported. +type DeviceConfigData struct { + // BinaryData: The configuration sent to the device, as bytes. + BinaryData string `json:"binaryData,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinaryData") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceConfigData) MarshalJSON() ([]byte, error) { + type noMethod DeviceConfigData + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceCredential: A server-stored device credential used for +// authentication. +type DeviceCredential struct { + // ExpirationTime: [Optional] The time at which this credential becomes + // invalid. This + // credential will be ignored for new client authentication requests + // after + // this timestamp; however, it will not be automatically deleted. + ExpirationTime string `json:"expirationTime,omitempty"` + + // PublicKey: A public key used to verify the signature of JSON Web + // Tokens (JWTs). + PublicKey *PublicKeyCredential `json:"publicKey,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExpirationTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExpirationTime") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceCredential) MarshalJSON() ([]byte, error) { + type noMethod DeviceCredential + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// DeviceRegistry: A container for a group of devices. +type DeviceRegistry struct { + // EventNotificationConfig: Configuration to notify events received from + // the device. + EventNotificationConfig *NotificationConfig `json:"eventNotificationConfig,omitempty"` + + // Id: The identifier of this device registry. For example, + // `myRegistry`. + Id string `json:"id,omitempty"` + + // MqttConfig: The configuration of the MQTT broker associated with this + // device registry, + // including enablement, payload data format type, etc. + MqttConfig *MqttConfig `json:"mqttConfig,omitempty"` + + // Name: The resource path name. For + // example, + // `projects/example-project/locations/us-central1/registries/my + // -registry`. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "EventNotificationConfig") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EventNotificationConfig") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *DeviceRegistry) MarshalJSON() ([]byte, error) { + type noMethod DeviceRegistry + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Empty: A generic empty message that you can re-use to avoid defining +// duplicated +// empty messages in your APIs. A typical example is to use it as the +// request +// or the response type of an API method. For instance: +// +// service Foo { +// rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); +// } +// +// The JSON representation for `Empty` is empty JSON object `{}`. +type Empty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// Expr: Represents an expression text. Example: +// +// title: "User account presence" +// description: "Determines whether the request has a user account" +// expression: "size(request.user) > 0" +type Expr struct { + // Description: An optional description of the expression. This is a + // longer text which + // describes the expression, e.g. when hovered over it in a UI. + Description string `json:"description,omitempty"` + + // Expression: Textual representation of an expression in + // Common Expression Language syntax. + // + // The application context of the containing message determines + // which + // well-known feature set of CEL is supported. + Expression string `json:"expression,omitempty"` + + // Location: An optional string indicating the location of the + // expression for error + // reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + + // Title: An optional title for the expression, i.e. a short string + // describing + // its purpose. This can be used e.g. in UIs which allow to enter + // the + // expression. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Description") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Expr) MarshalJSON() ([]byte, error) { + type noMethod Expr + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GetIamPolicyRequest: Request message for `GetIamPolicy` method. +type GetIamPolicyRequest struct { +} + +// HttpDeviceConfig: The device configuration obtained from Cloud IoT +// Core. +type HttpDeviceConfig struct { + // BinaryData: Data in binary format. + BinaryData string `json:"binaryData,omitempty"` + + // Version: The version of the configuration in Cloud IoT Core. + Version int64 `json:"version,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BinaryData") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpDeviceConfig) MarshalJSON() ([]byte, error) { + type noMethod HttpDeviceConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpDeviceState: The device state reported to Cloud IoT Core. +type HttpDeviceState struct { + // BinaryData: Data in binary format. + BinaryData string `json:"binaryData,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinaryData") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpDeviceState) MarshalJSON() ([]byte, error) { + type noMethod HttpDeviceState + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpPublishEventRequest: Request for `PublishEvent`. +type HttpPublishEventRequest struct { + // BinaryData: Payload data in binary format. + BinaryData string `json:"binaryData,omitempty"` + + // SubFolder: Optional subfolder for the telemetry event. This can be + // used to classify + // types of events, and is included in the Pub/Sub message attributes. + SubFolder string `json:"subFolder,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BinaryData") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BinaryData") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpPublishEventRequest) MarshalJSON() ([]byte, error) { + type noMethod HttpPublishEventRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// HttpPublishEventResponse: Response for `PublishEvent`. +type HttpPublishEventResponse struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// HttpSetDeviceStateRequest: Request for `SetDeviceState`. +type HttpSetDeviceStateRequest struct { + // State: The device state. + State *HttpDeviceState `json:"state,omitempty"` + + // ForceSendFields is a list of field names (e.g. "State") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "State") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *HttpSetDeviceStateRequest) MarshalJSON() ([]byte, error) { + type noMethod HttpSetDeviceStateRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDeviceConfigVersionsResponse: Response for +// `ListDeviceConfigVersions`. +type ListDeviceConfigVersionsResponse struct { + // DeviceConfigs: The device configuration for the last few versions. + // Versions are listed + // in decreasing order, starting from the most recent one. + DeviceConfigs []*DeviceConfig `json:"deviceConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceConfigs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListDeviceConfigVersionsResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDeviceConfigVersionsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDeviceRegistriesResponse: Response for `ListDeviceRegistries`. +type ListDeviceRegistriesResponse struct { + // DeviceRegistries: The registries that matched the query. + DeviceRegistries []*DeviceRegistry `json:"deviceRegistries,omitempty"` + + // NextPageToken: If not empty, indicates that there may be more + // registries that match the + // request; this value should be passed in a + // new + // `ListDeviceRegistriesRequest`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DeviceRegistries") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceRegistries") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ListDeviceRegistriesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDeviceRegistriesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ListDevicesResponse: Response for `ListDevices`. +type ListDevicesResponse struct { + // Devices: The devices that match the request. + Devices []*Device `json:"devices,omitempty"` + + // NextPageToken: If not empty, indicates that there may be more devices + // that match the + // request; this value should be passed in a new `ListDevicesRequest`. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Devices") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Devices") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListDevicesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListDevicesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ModifyCloudToDeviceConfigRequest: Request for +// `ModifyCloudToDeviceConfig`. +type ModifyCloudToDeviceConfigRequest struct { + // Data: The configuration data for the device. + Data *DeviceConfigData `json:"data,omitempty"` + + // VersionToUpdate: The version number to update. If this value is zero, + // it will not check the + // version number of the server and will always update the current + // version; + // otherwise, this update will fail if the version number found on the + // server + // does not match this version number. This is used to support + // multiple + // simultaneous updates without losing data. + VersionToUpdate int64 `json:"versionToUpdate,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "Data") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Data") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ModifyCloudToDeviceConfigRequest) MarshalJSON() ([]byte, error) { + type noMethod ModifyCloudToDeviceConfigRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// MqttConfig: The configuration of MQTT for a device registry. +type MqttConfig struct { + // MqttConfigState: If enabled, allows connections using the MQTT + // protocol. Otherwise any MQTT + // connection to this registry will fail. + // + // Possible values: + // "UNSPECIFIED_MQTT_STATE" - No MQTT state specified. If not + // specified, MQTT will be enabled by default. + // "MQTT_ENABLED" - Enables a MQTT connection. + // "MQTT_DISABLED" - Disables a MQTT connection. + MqttConfigState string `json:"mqttConfigState,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MqttConfigState") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MqttConfigState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *MqttConfig) MarshalJSON() ([]byte, error) { + type noMethod MqttConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// NotificationConfig: Configuration to forward messages such as +// telemetry events. +type NotificationConfig struct { + // PubsubTopicName: A Cloud Pub/Sub topic name. For + // example, + // `projects/myProject/topics/deviceEvents`. + PubsubTopicName string `json:"pubsubTopicName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PubsubTopicName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PubsubTopicName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *NotificationConfig) MarshalJSON() ([]byte, error) { + type noMethod NotificationConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Policy: Defines an Identity and Access Management (IAM) policy. It is +// used to +// specify access control policies for Cloud Platform resources. +// +// +// A `Policy` consists of a list of `bindings`. A `Binding` binds a list +// of +// `members` to a `role`, where the members can be user accounts, Google +// groups, +// Google domains, and service accounts. A `role` is a named list of +// permissions +// defined by IAM. +// +// **Example** +// +// { +// "bindings": [ +// { +// "role": "roles/owner", +// "members": [ +// "user:mike@example.com", +// "group:admins@example.com", +// "domain:google.com", +// +// "serviceAccount:my-other-app@appspot.gserviceaccount.com", +// ] +// }, +// { +// "role": "roles/viewer", +// "members": ["user:sean@example.com"] +// } +// ] +// } +// +// For a description of IAM and its features, see the +// [IAM developer's guide](https://cloud.google.com/iam). +type Policy struct { + // AuditConfigs: Specifies cloud audit logging configuration for this + // policy. + AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` + + // Bindings: Associates a list of `members` to a `role`. + // `bindings` with no members will result in an error. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: `etag` is used for optimistic concurrency control as a way to + // help + // prevent simultaneous updates of a policy from overwriting each + // other. + // It is strongly suggested that systems make use of the `etag` in + // the + // read-modify-write cycle to perform policy updates in order to avoid + // race + // conditions: An `etag` is returned in the response to `getIamPolicy`, + // and + // systems are expected to put that etag in the request to + // `setIamPolicy` to + // ensure that their change will be applied to the same version of the + // policy. + // + // If no `etag` is provided in the call to `setIamPolicy`, then the + // existing + // policy is overwritten blindly. + Etag string `json:"etag,omitempty"` + + IamOwned bool `json:"iamOwned,omitempty"` + + // Version: Version of the `Policy`. The default version is 0. + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AuditConfigs") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AuditConfigs") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type noMethod Policy + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// PublicKeyCredential: A public key format and data. +type PublicKeyCredential struct { + // Format: The format of the key. + // + // Possible values: + // "UNSPECIFIED_PUBLIC_KEY_FORMAT" - The format has not been + // specified. This is an invalid default value and + // must not be used. + // "RSA_X509_PEM" - An RSA public key wrapped in a X.509v3 + // certificate + // [RFC5280](https://www.ietf.org/rfc/rfc5280.txt), encoded in base64, + // and + // wrapped by `-----BEGIN CERTIFICATE-----` and `-----END + // CERTIFICATE-----`. + // This can be used to verify `RS256` signatures in JWT + // tokens + // [RFC7518](https://www.ietf.org/rfc/rfc7518.txt). + // "ES256_PEM" - Public key for the ECDSA algorithm using P-256 and + // SHA-256, encoded in + // base64, and wrapped by `-----BEGIN PUBLIC KEY-----` and + // `-----END + // PUBLIC KEY-----`. This can be used to verify JWT tokens with the + // `ES256` + // algorithm [RFC7518](https://www.ietf.org/rfc/rfc7518.txt). This curve + // is + // defined in [openssl](https://www.openssl.org/) as the `prime256v1` + // curve. + Format string `json:"format,omitempty"` + + // Key: The key data. + Key string `json:"key,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Format") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Format") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PublicKeyCredential) MarshalJSON() ([]byte, error) { + type noMethod PublicKeyCredential + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the + // `resource`. The size of + // the policy is limited to a few 10s of KB. An empty policy is a + // valid policy but certain Cloud Platform services (such as + // Projects) + // might reject them. + Policy *Policy `json:"policy,omitempty"` + + // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the + // policy to modify. Only + // the fields in the mask will be modified. If no mask is provided, + // the + // following default mask is used: + // paths: "bindings, etag" + // This field is only used by Cloud IAM. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type noMethod SetIamPolicyRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is +// suitable for different +// programming environments, including REST APIs and RPC APIs. It is +// used by +// [gRPC](https://github.com/grpc). The error model is designed to +// be: +// +// - Simple to use and understand for most users +// - Flexible enough to meet unexpected needs +// +// # Overview +// +// The `Status` message contains three pieces of data: error code, error +// message, +// and error details. The error code should be an enum value +// of +// google.rpc.Code, but it may accept additional error codes if needed. +// The +// error message should be a developer-facing English message that +// helps +// developers *understand* and *resolve* the error. If a localized +// user-facing +// error message is needed, put the localized message in the error +// details or +// localize it in the client. The optional error details may contain +// arbitrary +// information about the error. There is a predefined set of error +// detail types +// in the package `google.rpc` that can be used for common error +// conditions. +// +// # Language mapping +// +// The `Status` message is the logical representation of the error +// model, but it +// is not necessarily the actual wire format. When the `Status` message +// is +// exposed in different client libraries and different wire protocols, +// it can be +// mapped differently. For example, it will likely be mapped to some +// exceptions +// in Java, but more likely mapped to some error codes in C. +// +// # Other uses +// +// The error model and the `Status` message can be used in a variety +// of +// environments, either with or without APIs, to provide a +// consistent developer experience across different +// environments. +// +// Example uses of this error model include: +// +// - Partial errors. If a service needs to return partial errors to the +// client, +// it may embed the `Status` in the normal response to indicate the +// partial +// errors. +// +// - Workflow errors. A typical workflow has multiple steps. Each step +// may +// have a `Status` message for error reporting. +// +// - Batch operations. If a client uses batch request and batch +// response, the +// `Status` message should be used directly inside batch response, +// one for +// each error sub-response. +// +// - Asynchronous operations. If an API call embeds asynchronous +// operation +// results in its response, the status of those operations should +// be +// represented directly using the `Status` message. +// +// - Logging. If some API errors are stored in logs, the message +// `Status` could +// be used directly after any stripping needed for security/privacy +// reasons. +type Status struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of + // message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any + // user-facing error message should be localized and sent in + // the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Status) MarshalJSON() ([]byte, error) { + type noMethod Status + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsRequest: Request message for `TestIamPermissions` +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the `resource`. + // Permissions with + // wildcards (such as '*' or 'storage.*') are not allowed. For + // more + // information see + // [IAM + // Overview](https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type noMethod TestIamPermissionsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for `TestIamPermissions` +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of `TestPermissionsRequest.permissions` that + // the caller is + // allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type noMethod TestIamPermissionsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "cloudiot.projects.locations.registries.create": + +type ProjectsLocationsRegistriesCreateCall struct { + s *Service + parent string + deviceregistry *DeviceRegistry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a device registry that contains devices. +func (r *ProjectsLocationsRegistriesService) Create(parent string, deviceregistry *DeviceRegistry) *ProjectsLocationsRegistriesCreateCall { + c := &ProjectsLocationsRegistriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.deviceregistry = deviceregistry + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRegistriesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deviceregistry) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/registries") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.create" call. +// Exactly one of *DeviceRegistry or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceRegistry.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesCreateCall) Do(opts ...googleapi.CallOption) (*DeviceRegistry, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceRegistry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a device registry that contains devices.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The project and cloud region where this device registry must be created.\nFor example, `projects/example-project/locations/us-central1`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/registries", + // "request": { + // "$ref": "DeviceRegistry" + // }, + // "response": { + // "$ref": "DeviceRegistry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.delete": + +type ProjectsLocationsRegistriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a device registry configuration. +func (r *ProjectsLocationsRegistriesService) Delete(name string) *ProjectsLocationsRegistriesDeleteCall { + c := &ProjectsLocationsRegistriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a device registry configuration.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + // "httpMethod": "DELETE", + // "id": "cloudiot.projects.locations.registries.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.get": + +type ProjectsLocationsRegistriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a device registry configuration. +func (r *ProjectsLocationsRegistriesService) Get(name string) *ProjectsLocationsRegistriesGetCall { + c := &ProjectsLocationsRegistriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesGetCall) Context(ctx context.Context) *ProjectsLocationsRegistriesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.get" call. +// Exactly one of *DeviceRegistry or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceRegistry.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesGetCall) Do(opts ...googleapi.CallOption) (*DeviceRegistry, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceRegistry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a device registry configuration.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device registry. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "DeviceRegistry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.getIamPolicy": + +type ProjectsLocationsRegistriesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. +// Returns an empty policy if the resource exists and does not have a +// policy +// set. +func (r *ProjectsLocationsRegistriesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsRegistriesGetIamPolicyCall { + c := &ProjectsLocationsRegistriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistriesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:getIamPolicy", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.list": + +type ProjectsLocationsRegistriesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists device registries. +func (r *ProjectsLocationsRegistriesService) List(parent string) *ProjectsLocationsRegistriesListCall { + c := &ProjectsLocationsRegistriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of registries to return in the response. If this value +// is zero, the service will select a default size. A call may return +// fewer +// objects than requested, but if there is a non-empty `page_token`, +// it +// indicates that more entries are available. +func (c *ProjectsLocationsRegistriesListCall) PageSize(pageSize int64) *ProjectsLocationsRegistriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListDeviceRegistriesResponse`; indicates +// that this is a continuation of a prior `ListDeviceRegistries` call, +// and +// that the system should return the next page of data. +func (c *ProjectsLocationsRegistriesListCall) PageToken(pageToken string) *ProjectsLocationsRegistriesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesListCall) Context(ctx context.Context) *ProjectsLocationsRegistriesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/registries") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.list" call. +// Exactly one of *ListDeviceRegistriesResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDeviceRegistriesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesListCall) Do(opts ...googleapi.CallOption) (*ListDeviceRegistriesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDeviceRegistriesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists device registries.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "The maximum number of registries to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListDeviceRegistriesResponse`; indicates\nthat this is a continuation of a prior `ListDeviceRegistries` call, and\nthat the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The project and cloud region path. For example,\n`projects/example-project/locations/us-central1`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/registries", + // "response": { + // "$ref": "ListDeviceRegistriesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRegistriesListCall) Pages(ctx context.Context, f func(*ListDeviceRegistriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudiot.projects.locations.registries.patch": + +type ProjectsLocationsRegistriesPatchCall struct { + s *Service + name string + deviceregistry *DeviceRegistry + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a device registry configuration. +func (r *ProjectsLocationsRegistriesService) Patch(name string, deviceregistry *DeviceRegistry) *ProjectsLocationsRegistriesPatchCall { + c := &ProjectsLocationsRegistriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.deviceregistry = deviceregistry + return c +} + +// UpdateMask sets the optional parameter "updateMask": Only updates the +// `device_registry` fields indicated by this mask. +// The field mask must not be empty, and it must not contain fields +// that +// are immutable or only set by the server. +// Mutable top-level fields: `event_notification_config` and +// `mqtt_config` +func (c *ProjectsLocationsRegistriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRegistriesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRegistriesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deviceregistry) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.patch" call. +// Exactly one of *DeviceRegistry or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceRegistry.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesPatchCall) Do(opts ...googleapi.CallOption) (*DeviceRegistry, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceRegistry{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a device registry configuration.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}", + // "httpMethod": "PATCH", + // "id": "cloudiot.projects.locations.registries.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource path name. For example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Only updates the `device_registry` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `event_notification_config` and `mqtt_config`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "DeviceRegistry" + // }, + // "response": { + // "$ref": "DeviceRegistry" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.setIamPolicy": + +type ProjectsLocationsRegistriesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any +// existing policy. +func (r *ProjectsLocationsRegistriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRegistriesSetIamPolicyCall { + c := &ProjectsLocationsRegistriesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRegistriesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.testIamPermissions": + +type ProjectsLocationsRegistriesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +// If the resource does not exist, this will return an empty set +// of +// permissions, not a NOT_FOUND error. +func (r *ProjectsLocationsRegistriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRegistriesTestIamPermissionsCall { + c := &ProjectsLocationsRegistriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRegistriesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.create": + +type ProjectsLocationsRegistriesDevicesCreateCall struct { + s *Service + parent string + device *Device + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a device in a device registry. +func (r *ProjectsLocationsRegistriesDevicesService) Create(parent string, device *Device) *ProjectsLocationsRegistriesDevicesCreateCall { + c := &ProjectsLocationsRegistriesDevicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.device = device + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.device) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/devices") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.create" call. +// Exactly one of *Device or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Device.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesCreateCall) Do(opts ...googleapi.CallOption) (*Device, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Device{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a device in a device registry.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.devices.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "The name of the device registry where this device should be created.\nFor example,\n`projects/example-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/devices", + // "request": { + // "$ref": "Device" + // }, + // "response": { + // "$ref": "Device" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.delete": + +type ProjectsLocationsRegistriesDevicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a device. +func (r *ProjectsLocationsRegistriesDevicesService) Delete(name string) *ProjectsLocationsRegistriesDevicesDeleteCall { + c := &ProjectsLocationsRegistriesDevicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a device.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + // "httpMethod": "DELETE", + // "id": "cloudiot.projects.locations.registries.devices.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.get": + +type ProjectsLocationsRegistriesDevicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details about a device. +func (r *ProjectsLocationsRegistriesDevicesService) Get(name string) *ProjectsLocationsRegistriesDevicesGetCall { + c := &ProjectsLocationsRegistriesDevicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.get" call. +// Exactly one of *Device or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Device.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesGetCall) Do(opts ...googleapi.CallOption) (*Device, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Device{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets details about a device.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "response": { + // "$ref": "Device" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.getConfig": + +type ProjectsLocationsRegistriesDevicesGetConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetConfig: Gets the configuration of a device. +func (r *ProjectsLocationsRegistriesDevicesService) GetConfig(name string) *ProjectsLocationsRegistriesDevicesGetConfigCall { + c := &ProjectsLocationsRegistriesDevicesGetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// LocalVersion sets the optional parameter "localVersion": If zero, +// returns the current device configuration from Cloud IoT Core. +// If nonzero, specifies the local version of the configuration on the +// device. +// The server returns config data only if a higher (newer) version +// is +// available from Cloud IoT Core. +// If this value is higher than the latest version available in Cloud +// IoT +// Core, returns an `OUT_OF_RANGE` error. +func (c *ProjectsLocationsRegistriesDevicesGetConfigCall) LocalVersion(localVersion int64) *ProjectsLocationsRegistriesDevicesGetConfigCall { + c.urlParams_.Set("localVersion", fmt.Sprint(localVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesGetConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesGetConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesGetConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesGetConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesGetConfigCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesGetConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesGetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesGetConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/config") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.getConfig" call. +// Exactly one of *HttpDeviceConfig or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *HttpDeviceConfig.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesGetConfigCall) Do(opts ...googleapi.CallOption) (*HttpDeviceConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HttpDeviceConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the configuration of a device.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/config", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.getConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "localVersion": { + // "description": "If zero, returns the current device configuration from Cloud IoT Core.\nIf nonzero, specifies the local version of the configuration on the device.\nThe server returns config data only if a higher (newer) version is\navailable from Cloud IoT Core.\nIf this value is higher than the latest version available in Cloud IoT\nCore, returns an `OUT_OF_RANGE` error.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}/config", + // "response": { + // "$ref": "HttpDeviceConfig" + // } + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.list": + +type ProjectsLocationsRegistriesDevicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: List devices in a device registry. +func (r *ProjectsLocationsRegistriesDevicesService) List(parent string) *ProjectsLocationsRegistriesDevicesListCall { + c := &ProjectsLocationsRegistriesDevicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// DeviceIds sets the optional parameter "deviceIds": A list of device +// string identifiers. If empty, it will ignore this field. +// For example, `['device0', 'device12']`. This field cannot hold more +// than +// 10,000 entries. +func (c *ProjectsLocationsRegistriesDevicesListCall) DeviceIds(deviceIds ...string) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.SetMulti("deviceIds", append([]string{}, deviceIds...)) + return c +} + +// DeviceNumIds sets the optional parameter "deviceNumIds": A list of +// device numerical ids. If empty, it will ignore this field. This +// field cannot hold more than 10,000 entries. +func (c *ProjectsLocationsRegistriesDevicesListCall) DeviceNumIds(deviceNumIds ...uint64) *ProjectsLocationsRegistriesDevicesListCall { + var deviceNumIds_ []string + for _, v := range deviceNumIds { + deviceNumIds_ = append(deviceNumIds_, fmt.Sprint(v)) + } + c.urlParams_.SetMulti("deviceNumIds", deviceNumIds_) + return c +} + +// FieldMask sets the optional parameter "fieldMask": The fields of the +// `Device` resource to be returned in the response. The +// fields `id`, and `num_id` are always returned by default, along with +// any +// other fields specified. +func (c *ProjectsLocationsRegistriesDevicesListCall) FieldMask(fieldMask string) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("fieldMask", fieldMask) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of devices to return in the response. If this value +// is zero, the service will select a default size. A call may return +// fewer +// objects than requested, but if there is a non-empty `page_token`, +// it +// indicates that more entries are available. +func (c *ProjectsLocationsRegistriesDevicesListCall) PageSize(pageSize int64) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned +// by the last `ListDevicesResponse`; indicates +// that this is a continuation of a prior `ListDevices` call, and +// that the system should return the next page of data. +func (c *ProjectsLocationsRegistriesDevicesListCall) PageToken(pageToken string) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesListCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/devices") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.list" call. +// Exactly one of *ListDevicesResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListDevicesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesListCall) Do(opts ...googleapi.CallOption) (*ListDevicesResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDevicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "List devices in a device registry.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "deviceIds": { + // "description": "A list of device string identifiers. If empty, it will ignore this field.\nFor example, `['device0', 'device12']`. This field cannot hold more than\n10,000 entries.", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "deviceNumIds": { + // "description": "A list of device numerical ids. If empty, it will ignore this field. This\nfield cannot hold more than 10,000 entries.", + // "format": "uint64", + // "location": "query", + // "repeated": true, + // "type": "string" + // }, + // "fieldMask": { + // "description": "The fields of the `Device` resource to be returned in the response. The\nfields `id`, and `num_id` are always returned by default, along with any\nother fields specified.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "The maximum number of devices to return in the response. If this value\nis zero, the service will select a default size. A call may return fewer\nobjects than requested, but if there is a non-empty `page_token`, it\nindicates that more entries are available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The value returned by the last `ListDevicesResponse`; indicates\nthat this is a continuation of a prior `ListDevices` call, and\nthat the system should return the next page of data.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "The device registry path. Required. For example,\n`projects/my-project/locations/us-central1/registries/my-registry`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+parent}/devices", + // "response": { + // "$ref": "ListDevicesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRegistriesDevicesListCall) Pages(ctx context.Context, f func(*ListDevicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig": + +type ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall struct { + s *Service + name string + modifycloudtodeviceconfigrequest *ModifyCloudToDeviceConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ModifyCloudToDeviceConfig: Modifies the configuration for the device, +// which is eventually sent from +// the Cloud IoT servers. Returns the modified configuration version and +// its +// meta-data. +func (r *ProjectsLocationsRegistriesDevicesService) ModifyCloudToDeviceConfig(name string, modifycloudtodeviceconfigrequest *ModifyCloudToDeviceConfigRequest) *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall { + c := &ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.modifycloudtodeviceconfigrequest = modifycloudtodeviceconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.modifycloudtodeviceconfigrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:modifyCloudToDeviceConfig") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig" call. +// Exactly one of *DeviceConfig or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *DeviceConfig.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesModifyCloudToDeviceConfigCall) Do(opts ...googleapi.CallOption) (*DeviceConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &DeviceConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Modifies the configuration for the device, which is eventually sent from\nthe Cloud IoT servers. Returns the modified configuration version and its\nmeta-data.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:modifyCloudToDeviceConfig", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.devices.modifyCloudToDeviceConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:modifyCloudToDeviceConfig", + // "request": { + // "$ref": "ModifyCloudToDeviceConfigRequest" + // }, + // "response": { + // "$ref": "DeviceConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.patch": + +type ProjectsLocationsRegistriesDevicesPatchCall struct { + s *Service + name string + device *Device + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a device. +func (r *ProjectsLocationsRegistriesDevicesService) Patch(name string, device *Device) *ProjectsLocationsRegistriesDevicesPatchCall { + c := &ProjectsLocationsRegistriesDevicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.device = device + return c +} + +// UpdateMask sets the optional parameter "updateMask": Only updates the +// `device` fields indicated by this mask. +// The field mask must not be empty, and it must not contain fields +// that +// are immutable or only set by the server. +// Mutable top-level fields: `credentials` and `enabled_state` +func (c *ProjectsLocationsRegistriesDevicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRegistriesDevicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.device) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.patch" call. +// Exactly one of *Device or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Device.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesPatchCall) Do(opts ...googleapi.CallOption) (*Device, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Device{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a device.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}", + // "httpMethod": "PATCH", + // "id": "cloudiot.projects.locations.registries.devices.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The resource path name. For example,\n`projects/p1/locations/us-central1/registries/registry0/devices/dev0` or\n`projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`.\nWhen `name` is populated as a response from the service, it always ends\nin the device numeric ID.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Only updates the `device` fields indicated by this mask.\nThe field mask must not be empty, and it must not contain fields that\nare immutable or only set by the server.\nMutable top-level fields: `credentials` and `enabled_state`", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}", + // "request": { + // "$ref": "Device" + // }, + // "response": { + // "$ref": "Device" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.publishEvent": + +type ProjectsLocationsRegistriesDevicesPublishEventCall struct { + s *Service + name string + httppublisheventrequest *HttpPublishEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PublishEvent: Publishes a telemetry event for a device. +func (r *ProjectsLocationsRegistriesDevicesService) PublishEvent(name string, httppublisheventrequest *HttpPublishEventRequest) *ProjectsLocationsRegistriesDevicesPublishEventCall { + c := &ProjectsLocationsRegistriesDevicesPublishEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.httppublisheventrequest = httppublisheventrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesPublishEventCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesPublishEventCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesPublishEventCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesPublishEventCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesPublishEventCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesPublishEventCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httppublisheventrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:publishEvent") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.publishEvent" call. +// Exactly one of *HttpPublishEventResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *HttpPublishEventResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesPublishEventCall) Do(opts ...googleapi.CallOption) (*HttpPublishEventResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &HttpPublishEventResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Publishes a telemetry event for a device.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:publishEvent", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.devices.publishEvent", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:publishEvent", + // "request": { + // "$ref": "HttpPublishEventRequest" + // }, + // "response": { + // "$ref": "HttpPublishEventResponse" + // } + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.setState": + +type ProjectsLocationsRegistriesDevicesSetStateCall struct { + s *Service + name string + httpsetdevicestaterequest *HttpSetDeviceStateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetState: Sets the state of a device. +func (r *ProjectsLocationsRegistriesDevicesService) SetState(name string, httpsetdevicestaterequest *HttpSetDeviceStateRequest) *ProjectsLocationsRegistriesDevicesSetStateCall { + c := &ProjectsLocationsRegistriesDevicesSetStateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.httpsetdevicestaterequest = httpsetdevicestaterequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesSetStateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesSetStateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesSetStateCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesSetStateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesSetStateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesSetStateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpsetdevicestaterequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:setState") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.setState" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsRegistriesDevicesSetStateCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the state of a device.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}:setState", + // "httpMethod": "POST", + // "id": "cloudiot.projects.locations.registries.devices.setState", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:setState", + // "request": { + // "$ref": "HttpSetDeviceStateRequest" + // }, + // "response": { + // "$ref": "Empty" + // } + // } + +} + +// method id "cloudiot.projects.locations.registries.devices.configVersions.list": + +type ProjectsLocationsRegistriesDevicesConfigVersionsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the last few versions of the device configuration in +// descending +// order (i.e.: newest first). +func (r *ProjectsLocationsRegistriesDevicesConfigVersionsService) List(name string) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c := &ProjectsLocationsRegistriesDevicesConfigVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// NumVersions sets the optional parameter "numVersions": The number of +// versions to list. Versions are listed in decreasing order of +// the version number. The maximum number of versions retained is 10. If +// this +// value is zero, it will return all the versions available. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) NumVersions(numVersions int64) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.urlParams_.Set("numVersions", fmt.Sprint(numVersions)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Context(ctx context.Context) *ProjectsLocationsRegistriesDevicesConfigVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/configVersions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "cloudiot.projects.locations.registries.devices.configVersions.list" call. +// Exactly one of *ListDeviceConfigVersionsResponse or error will be +// non-nil. Any non-2xx status code is an error. Response headers are in +// either *ListDeviceConfigVersionsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsRegistriesDevicesConfigVersionsListCall) Do(opts ...googleapi.CallOption) (*ListDeviceConfigVersionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &ListDeviceConfigVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists the last few versions of the device configuration in descending\norder (i.e.: newest first).", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/registries/{registriesId}/devices/{devicesId}/configVersions", + // "httpMethod": "GET", + // "id": "cloudiot.projects.locations.registries.devices.configVersions.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the device. For example,\n`projects/p0/locations/us-central1/registries/registry0/devices/device0` or\n`projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/registries/[^/]+/devices/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "numVersions": { + // "description": "The number of versions to list. Versions are listed in decreasing order of\nthe version number. The maximum number of versions retained is 10. If this\nvalue is zero, it will return all the versions available.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // } + // }, + // "path": "v1beta1/{+name}/configVersions", + // "response": { + // "$ref": "ListDeviceConfigVersionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloudiot" + // ] + // } + +} diff --git a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json index 75d19244b..07344935e 100644 --- a/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json +++ b/vendor/google.golang.org/api/cloudkms/v1/cloudkms-api.json @@ -1,4 +1,512 @@ { + "discoveryVersion": "v1", + "version_module": true, + "schemas": { + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsRequest" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", + "items": { + "$ref": "Binding" + }, + "type": "array" + }, + "iamOwned": { + "type": "boolean" + }, + "etag": { + "format": "byte", + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + } + }, + "id": "Policy" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + } + }, + "id": "ListLocationsResponse" + }, + "KeyRing": { + "description": "A KeyRing is a toplevel logical grouping of CryptoKeys.", + "type": "object", + "properties": { + "createTime": { + "format": "google-datetime", + "description": "Output only. The time at which this KeyRing was created.", + "type": "string" + }, + "name": { + "description": "Output only. The resource name for the KeyRing in the format\n`projects/*/locations/*/keyRings/*`.", + "type": "string" + } + }, + "id": "KeyRing" + }, + "EncryptResponse": { + "description": "Response message for KeyManagementService.Encrypt.", + "type": "object", + "properties": { + "ciphertext": { + "format": "byte", + "description": "The encrypted data.", + "type": "string" + }, + "name": { + "description": "The resource name of the CryptoKeyVersion used in encryption.", + "type": "string" + } + }, + "id": "EncryptResponse" + }, + "RestoreCryptoKeyVersionRequest": { + "description": "Request message for KeyManagementService.RestoreCryptoKeyVersion.", + "type": "object", + "properties": {}, + "id": "RestoreCryptoKeyVersionRequest" + }, + "UpdateCryptoKeyPrimaryVersionRequest": { + "description": "Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.", + "type": "object", + "properties": { + "cryptoKeyVersionId": { + "description": "The id of the child CryptoKeyVersion to use as primary.", + "type": "string" + } + }, + "id": "UpdateCryptoKeyPrimaryVersionRequest" + }, + "ListKeyRingsResponse": { + "description": "Response message for KeyManagementService.ListKeyRings.", + "type": "object", + "properties": { + "keyRings": { + "description": "The list of KeyRings.", + "items": { + "$ref": "KeyRing" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in\nListKeyRingsRequest.page_token to retrieve the next page of results.", + "type": "string" + }, + "totalSize": { + "format": "int32", + "description": "The total number of KeyRings that matched the query.", + "type": "integer" + } + }, + "id": "ListKeyRingsResponse" + }, + "AuditConfig": { + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object", + "properties": { + "service": { + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", + "type": "string" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, + "exemptedMembers": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "AuditConfig" + }, + "CryptoKeyVersion": { + "description": "A CryptoKeyVersion represents an individual cryptographic key, and the\nassociated key material.\n\nIt can be used for cryptographic operations either directly, or via its\nparent CryptoKey, in which case the server will choose the appropriate\nversion for the operation.\n\nFor security reasons, the raw cryptographic key material represented by a\nCryptoKeyVersion can never be viewed or exported. It can only be used to\nencrypt or decrypt data when an authorized user or application invokes Cloud\nKMS.", + "type": "object", + "properties": { + "destroyEventTime": { + "format": "google-datetime", + "description": "Output only. The time this CryptoKeyVersion's key material was\ndestroyed. Only present if state is\nDESTROYED.", + "type": "string" + }, + "destroyTime": { + "format": "google-datetime", + "description": "Output only. The time this CryptoKeyVersion's key material is scheduled\nfor destruction. Only present if state is\nDESTROY_SCHEDULED.", + "type": "string" + }, + "createTime": { + "format": "google-datetime", + "description": "Output only. The time at which this CryptoKeyVersion was created.", + "type": "string" + }, + "state": { + "description": "The current state of the CryptoKeyVersion.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "This version may be used in Encrypt and\nDecrypt requests.", + "This version may not be used, but the key material is still available,\nand the version can be placed back into the ENABLED state.", + "This version is destroyed, and the key material is no longer stored.\nA version may not leave this state once entered.", + "This version is scheduled for destruction, and will be destroyed soon.\nCall\nRestoreCryptoKeyVersion\nto put it back into the DISABLED state." + ], + "enum": [ + "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED", + "ENABLED", + "DISABLED", + "DESTROYED", + "DESTROY_SCHEDULED" + ] + }, + "name": { + "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", + "type": "string" + } + }, + "id": "CryptoKeyVersion" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + }, + "updateMask": { + "format": "google-fieldmask", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "type": "string" + } + }, + "id": "SetIamPolicyRequest" + }, + "DecryptRequest": { + "description": "Request message for KeyManagementService.Decrypt.", + "type": "object", + "properties": { + "additionalAuthenticatedData": { + "format": "byte", + "description": "Optional data that must match the data originally supplied in\nEncryptRequest.additional_authenticated_data.", + "type": "string" + }, + "ciphertext": { + "format": "byte", + "description": "Required. The encrypted data originally returned in\nEncryptResponse.ciphertext.", + "type": "string" + } + }, + "id": "DecryptRequest" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL." + }, + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "Expr": { + "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", + "type": "object", + "properties": { + "location": { + "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", + "type": "string" + }, + "description": { + "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", + "type": "string" + } + }, + "id": "Expr" + }, + "EncryptRequest": { + "description": "Request message for KeyManagementService.Encrypt.", + "type": "object", + "properties": { + "additionalAuthenticatedData": { + "format": "byte", + "description": "Optional data that, if specified, must also be provided during decryption\nthrough DecryptRequest.additional_authenticated_data. Must be no\nlarger than 64KiB.", + "type": "string" + }, + "plaintext": { + "format": "byte", + "description": "Required. The data to encrypt. Must be no larger than 64KiB.", + "type": "string" + } + }, + "id": "EncryptRequest" + }, + "ListCryptoKeyVersionsResponse": { + "description": "Response message for KeyManagementService.ListCryptoKeyVersions.", + "type": "object", + "properties": { + "cryptoKeyVersions": { + "description": "The list of CryptoKeyVersions.", + "items": { + "$ref": "CryptoKeyVersion" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeyVersionsRequest.page_token to retrieve the next page of\nresults.", + "type": "string" + }, + "totalSize": { + "format": "int32", + "description": "The total number of CryptoKeyVersions that matched the\nquery.", + "type": "integer" + } + }, + "id": "ListCryptoKeyVersionsResponse" + }, + "Location": { + "description": "A resource that represents Google Cloud Platform location.", + "type": "object", + "properties": { + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "id": "Location" + }, + "ListCryptoKeysResponse": { + "description": "Response message for KeyManagementService.ListCryptoKeys.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeysRequest.page_token to retrieve the next page of results.", + "type": "string" + }, + "totalSize": { + "format": "int32", + "description": "The total number of CryptoKeys that matched the query.", + "type": "integer" + }, + "cryptoKeys": { + "description": "The list of CryptoKeys.", + "items": { + "$ref": "CryptoKey" + }, + "type": "array" + } + }, + "id": "ListCryptoKeysResponse" + }, + "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse" + }, + "DestroyCryptoKeyVersionRequest": { + "description": "Request message for KeyManagementService.DestroyCryptoKeyVersion.", + "type": "object", + "properties": {}, + "id": "DestroyCryptoKeyVersionRequest" + }, + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object", + "properties": { + "logType": { + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables.", + "type": "string" + }, + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "AuditLogConfig" + }, + "CryptoKey": { + "description": "A CryptoKey represents a logical key that can be used for cryptographic\noperations.\n\nA CryptoKey is made up of one or more versions, which\nrepresent the actual key material used in cryptographic operations.", + "type": "object", + "properties": { + "labels": { + "description": "Labels with user defined metadata.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "createTime": { + "format": "google-datetime", + "description": "Output only. The time at which this CryptoKey was created.", + "type": "string" + }, + "rotationPeriod": { + "format": "google-duration", + "description": "next_rotation_time will be advanced by this period when the service\nautomatically rotates a key. Must be at least one day.\n\nIf rotation_period is set, next_rotation_time must also be set.", + "type": "string" + }, + "primary": { + "description": "Output only. A copy of the \"primary\" CryptoKeyVersion that will be used\nby Encrypt when this CryptoKey is given\nin EncryptRequest.name.\n\nThe CryptoKey's primary version can be updated via\nUpdateCryptoKeyPrimaryVersion.", + "$ref": "CryptoKeyVersion" + }, + "name": { + "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string" + }, + "purpose": { + "enumDescriptions": [ + "Not specified.", + "CryptoKeys with this purpose may be used with\nEncrypt and\nDecrypt." + ], + "enum": [ + "CRYPTO_KEY_PURPOSE_UNSPECIFIED", + "ENCRYPT_DECRYPT" + ], + "description": "The immutable purpose of this CryptoKey. Currently, the only acceptable\npurpose is ENCRYPT_DECRYPT.", + "type": "string" + }, + "nextRotationTime": { + "format": "google-datetime", + "description": "At next_rotation_time, the Key Management Service will automatically:\n\n1. Create a new version of this CryptoKey.\n2. Mark the new version as primary.\n\nKey rotations performed manually via\nCreateCryptoKeyVersion and\nUpdateCryptoKeyPrimaryVersion\ndo not affect next_rotation_time.", + "type": "string" + } + }, + "id": "CryptoKey" + }, + "DecryptResponse": { + "description": "Response message for KeyManagementService.Decrypt.", + "type": "object", + "properties": { + "plaintext": { + "format": "byte", + "description": "The decrypted data originally supplied in EncryptRequest.plaintext.", + "type": "string" + } + }, + "id": "DecryptResponse" + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "protocol": "rest", + "canonicalName": "Cloud KMS", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://cloudkms.googleapis.com/", "ownerDomain": "google.com", "name": "cloudkms", "batchPath": "batch", @@ -10,34 +518,31 @@ "locations": { "methods": { "get": { - "description": "Get information about a location.", - "httpMethod": "GET", "response": { "$ref": "Location" }, "parameterOrder": [ "name" ], + "httpMethod": "GET", "parameters": { "name": { + "location": "path", "description": "Resource name for the location.", "type": "string", "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" + "pattern": "^projects/[^/]+/locations/[^/]+$" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "id": "cloudkms.projects.locations.get", "path": "v1/{+name}", - "id": "cloudkms.projects.locations.get" + "description": "Get information about a location." }, "list": { - "flatPath": "v1/projects/{projectsId}/locations", - "id": "cloudkms.projects.locations.list", - "path": "v1/{+name}/locations", "description": "Lists information about the supported locations for this service.", "response": { "$ref": "ListLocationsResponse" @@ -50,36 +555,192 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "description": "The resource that owns the locations collection, if applicable.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" - }, "pageSize": { "format": "int32", "description": "The standard list page size.", "type": "integer", "location": "query" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "The resource that owns the locations collection, if applicable.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" } - } + }, + "flatPath": "v1/projects/{projectsId}/locations", + "id": "cloudkms.projects.locations.list", + "path": "v1/{+name}/locations" } }, "resources": { "keyRings": { "methods": { + "get": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}", + "path": "v1/{+name}", + "id": "cloudkms.projects.locations.keyRings.get", + "description": "Returns metadata for a given KeyRing.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "KeyRing" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the KeyRing to get.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + } + }, + "testIamPermissions": { + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:testIamPermissions", + "id": "cloudkms.projects.locations.keyRings.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions" + }, + "list": { + "response": { + "$ref": "ListKeyRingsResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional limit on the number of KeyRings to include in the\nresponse. Further KeyRings can subsequently be obtained by\nincluding the ListKeyRingsResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", + "type": "integer" + }, + "parent": { + "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "Optional pagination token, returned earlier via\nListKeyRingsResponse.next_page_token.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", + "id": "cloudkms.projects.locations.keyRings.list", + "path": "v1/{+parent}/keyRings", + "description": "Lists KeyRings." + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "KeyRing" + }, + "parameters": { + "keyRingId": { + "location": "query", + "description": "Required. It must be unique within a location and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", + "path": "v1/{+parent}/keyRings", + "id": "cloudkms.projects.locations.keyRings.create", + "description": "Create a new KeyRing in a given Project and Location.", + "request": { + "$ref": "KeyRing" + } + }, + "setIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:setIamPolicy", + "id": "cloudkms.projects.locations.keyRings.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } + }, "getIamPolicy": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:getIamPolicy", + "id": "cloudkms.projects.locations.keyRings.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", "response": { "$ref": "Policy" @@ -97,174 +758,147 @@ "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:getIamPolicy", - "id": "cloudkms.projects.locations.keyRings.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy" - }, - "get": { - "response": { - "$ref": "KeyRing" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the KeyRing to get.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}", - "id": "cloudkms.projects.locations.keyRings.get", - "path": "v1/{+name}", - "description": "Returns metadata for a given KeyRing." - }, - "testIamPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "id": "cloudkms.projects.locations.keyRings.testIamPermissions", - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - "request": { - "$ref": "TestIamPermissionsRequest" - } - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "ListKeyRingsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageSize": { - "format": "int32", - "description": "Optional limit on the number of KeyRings to include in the\nresponse. Further KeyRings can subsequently be obtained by\nincluding the ListKeyRingsResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - }, - "pageToken": { - "description": "Optional pagination token, returned earlier via\nListKeyRingsResponse.next_page_token.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", - "path": "v1/{+parent}/keyRings", - "id": "cloudkms.projects.locations.keyRings.list", - "description": "Lists KeyRings." - }, - "create": { - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings", - "id": "cloudkms.projects.locations.keyRings.create", - "path": "v1/{+parent}/keyRings", - "description": "Create a new KeyRing in a given Project and Location.", - "request": { - "$ref": "KeyRing" - }, - "response": { - "$ref": "KeyRing" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "parameters": { - "keyRingId": { - "description": "Required. It must be unique within a location and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - "type": "string", - "location": "query" - }, - "parent": { - "description": "Required. The resource name of the location associated with the\nKeyRings, in the format `projects/*/locations/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "setIamPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "cloudkms.projects.locations.keyRings.setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - } } }, "resources": { "cryptoKeys": { "methods": { + "list": { + "description": "Lists CryptoKeys.", + "response": { + "$ref": "ListCryptoKeysResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Optional pagination token, returned earlier via\nListCryptoKeysResponse.next_page_token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Optional limit on the number of CryptoKeys to include in the\nresponse. Further CryptoKeys can subsequently be obtained by\nincluding the ListCryptoKeysResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Required. The resource name of the KeyRing to list, in the format\n`projects/*/locations/*/keyRings/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.list", + "path": "v1/{+parent}/cryptoKeys" + }, + "encrypt": { + "request": { + "$ref": "EncryptRequest" + }, + "description": "Encrypts data, so that it can only be recovered by a call to Decrypt.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "EncryptResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the CryptoKey or CryptoKeyVersion\nto use for encryption.\n\nIf a CryptoKey is specified, the server will use its\nprimary version.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:encrypt", + "path": "v1/{+name}:encrypt", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt" + }, + "setIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + } + }, + "create": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", + "path": "v1/{+parent}/cryptoKeys", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.create", + "request": { + "$ref": "CryptoKey" + }, + "description": "Create a new CryptoKey within a KeyRing.\n\nCryptoKey.purpose is required.", + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "CryptoKey" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "cryptoKeyId": { + "location": "query", + "description": "Required. It must be unique within a KeyRing and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", + "type": "string" + }, + "parent": { + "location": "path", + "description": "Required. The name of the KeyRing associated with the\nCryptoKeys.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$" + } + } + }, "updatePrimaryVersion": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:updatePrimaryVersion", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.updatePrimaryVersion", "path": "v1/{+name}:updatePrimaryVersion", + "description": "Update the version of a CryptoKey that will be used in Encrypt", "request": { "$ref": "UpdateCryptoKeyPrimaryVersionRequest" }, - "description": "Update the version of a CryptoKey that will be used in Encrypt", "response": { "$ref": "CryptoKey" }, @@ -272,28 +906,28 @@ "name" ], "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", "location": "path", "description": "The resource name of the CryptoKey to update.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" } }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:updatePrimaryVersion" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] }, "getIamPolicy": { - "httpMethod": "GET", + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", "response": { "$ref": "Policy" }, "parameterOrder": [ "resource" ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], @@ -307,34 +941,8 @@ } }, "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.getIamPolicy", - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset." - }, - "get": { - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.get", - "path": "v1/{+name}", - "description": "Returns metadata for a given CryptoKey, as well as its\nprimary CryptoKeyVersion.", - "response": { - "$ref": "CryptoKey" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the CryptoKey to get.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}" + "path": "v1/{+resource}:getIamPolicy" }, "patch": { "request": { @@ -359,18 +967,47 @@ "location": "query" }, "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", "location": "path", "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" } }, "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.patch", "path": "v1/{+name}" }, + "get": { + "description": "Returns metadata for a given CryptoKey, as well as its\nprimary CryptoKeyVersion.", + "response": { + "$ref": "CryptoKey" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the CryptoKey to get.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.get", + "path": "v1/{+name}" + }, "testIamPermissions": { + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", "response": { "$ref": "TestIamPermissionsResponse" }, @@ -378,6 +1015,9 @@ "resource" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "resource": { "location": "path", @@ -387,16 +1027,9 @@ "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:testIamPermissions", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - "request": { - "$ref": "TestIamPermissionsRequest" - } + "path": "v1/{+resource}:testIamPermissions" }, "decrypt": { "response": { @@ -406,6 +1039,9 @@ "name" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "name": { "description": "Required. The resource name of the CryptoKey to use for decryption.\nThe server will choose the appropriate version.", @@ -415,147 +1051,22 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:decrypt", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.decrypt", "path": "v1/{+name}:decrypt", - "description": "Decrypts data that was protected by Encrypt.", "request": { "$ref": "DecryptRequest" - } - }, - "list": { - "description": "Lists CryptoKeys.", - "response": { - "$ref": "ListCryptoKeysResponse" }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "location": "query", - "description": "Optional pagination token, returned earlier via\nListCryptoKeysResponse.next_page_token.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Optional limit on the number of CryptoKeys to include in the\nresponse. Further CryptoKeys can subsequently be obtained by\nincluding the ListCryptoKeysResponse.next_page_token in a subsequent\nrequest. If unspecified, the server will pick an appropriate default.", - "type": "integer" - }, - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path", - "description": "Required. The resource name of the KeyRing to list, in the format\n`projects/*/locations/*/keyRings/*`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.list", - "path": "v1/{+parent}/cryptoKeys" - }, - "encrypt": { - "response": { - "$ref": "EncryptResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "Required. The resource name of the CryptoKey or CryptoKeyVersion\nto use for encryption.\n\nIf a CryptoKey is specified, the server will use its\nprimary version.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:encrypt", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.encrypt", - "path": "v1/{+name}:encrypt", - "description": "Encrypts data, so that it can only be recovered by a call to Decrypt.", - "request": { - "$ref": "EncryptRequest" - } - }, - "setIamPolicy": { - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}:setIamPolicy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - } - } - }, - "create": { - "description": "Create a new CryptoKey within a KeyRing.\n\nCryptoKey.purpose is required.", - "request": { - "$ref": "CryptoKey" - }, - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "CryptoKey" - }, - "parameters": { - "cryptoKeyId": { - "location": "query", - "description": "Required. It must be unique within a KeyRing and match the regular\nexpression `[a-zA-Z0-9_-]{1,63}`", - "type": "string" - }, - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$", - "location": "path", - "description": "Required. The name of the KeyRing associated with the\nCryptoKeys.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys", - "path": "v1/{+parent}/cryptoKeys", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.create" + "description": "Decrypts data that was protected by Encrypt." } }, "resources": { "cryptoKeyVersions": { "methods": { "list": { + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", + "path": "v1/{+parent}/cryptoKeyVersions", "description": "Lists CryptoKeyVersions.", "response": { "$ref": "ListCryptoKeyVersionsResponse" @@ -568,72 +1079,38 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "parent": { - "description": "Required. The resource name of the CryptoKey to list, in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$", - "location": "path" - }, "pageToken": { "location": "query", "description": "Optional pagination token, returned earlier via\nListCryptoKeyVersionsResponse.next_page_token.", "type": "string" }, "pageSize": { - "location": "query", "format": "int32", "description": "Optional limit on the number of CryptoKeyVersions to\ninclude in the response. Further CryptoKeyVersions can\nsubsequently be obtained by including the\nListCryptoKeyVersionsResponse.next_page_token in a subsequent request.\nIf unspecified, the server will pick an appropriate default.", - "type": "integer" + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "Required. The resource name of the CryptoKey to list, in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" } - }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.list", - "path": "v1/{+parent}/cryptoKeyVersions" + } }, - "destroy": { - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:destroy", - "path": "v1/{+name}:destroy", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy", - "description": "Schedule a CryptoKeyVersion for destruction.\n\nUpon calling this method, CryptoKeyVersion.state will be set to\nDESTROY_SCHEDULED\nand destroy_time will be set to a time 24\nhours in the future, at which point the state\nwill be changed to\nDESTROYED, and the key\nmaterial will be irrevocably destroyed.\n\nBefore the destroy_time is reached,\nRestoreCryptoKeyVersion may be called to reverse the process.", + "create": { + "description": "Create a new CryptoKeyVersion in a CryptoKey.\n\nThe server will assign the next sequential id. If unset,\nstate will be set to\nENABLED.", "request": { - "$ref": "DestroyCryptoKeyVersionRequest" + "$ref": "CryptoKeyVersion" }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], "response": { "$ref": "CryptoKeyVersion" }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", - "location": "path", - "description": "The resource name of the CryptoKeyVersion to destroy.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "create": { - "request": { - "$ref": "CryptoKeyVersion" - }, - "description": "Create a new CryptoKeyVersion in a CryptoKey.\n\nThe server will assign the next sequential id. If unset,\nstate will be set to\nENABLED.", - "httpMethod": "POST", "parameterOrder": [ "parent" ], - "response": { - "$ref": "CryptoKeyVersion" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "httpMethod": "POST", "parameters": { "parent": { "location": "path", @@ -643,22 +1120,49 @@ "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$" } }, - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", - "path": "v1/{+parent}/cryptoKeyVersions", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create" - }, - "restore": { - "description": "Restore a CryptoKeyVersion in the\nDESTROY_SCHEDULED,\nstate.\n\nUpon restoration of the CryptoKeyVersion, state\nwill be set to DISABLED,\nand destroy_time will be cleared.", - "request": { - "$ref": "RestoreCryptoKeyVersionRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" ], + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.create", + "path": "v1/{+parent}/cryptoKeyVersions" + }, + "destroy": { + "request": { + "$ref": "DestroyCryptoKeyVersionRequest" + }, + "description": "Schedule a CryptoKeyVersion for destruction.\n\nUpon calling this method, CryptoKeyVersion.state will be set to\nDESTROY_SCHEDULED\nand destroy_time will be set to a time 24\nhours in the future, at which point the state\nwill be changed to\nDESTROYED, and the key\nmaterial will be irrevocably destroyed.\n\nBefore the destroy_time is reached,\nRestoreCryptoKeyVersion may be called to reverse the process.", "response": { "$ref": "CryptoKeyVersion" }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the CryptoKeyVersion to destroy.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:destroy", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.destroy", + "path": "v1/{+name}:destroy" + }, + "restore": { + "response": { + "$ref": "CryptoKeyVersion" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", "parameters": { "name": { "description": "The resource name of the CryptoKeyVersion to restore.", @@ -672,30 +1176,34 @@ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}:restore", + "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore", "path": "v1/{+name}:restore", - "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.restore" + "description": "Restore a CryptoKeyVersion in the\nDESTROY_SCHEDULED,\nstate.\n\nUpon restoration of the CryptoKeyVersion, state\nwill be set to DISABLED,\nand destroy_time will be cleared.", + "request": { + "$ref": "RestoreCryptoKeyVersionRequest" + } }, "get": { "description": "Returns metadata for a given CryptoKeyVersion.", "httpMethod": "GET", - "response": { - "$ref": "CryptoKeyVersion" - }, "parameterOrder": [ "name" ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the CryptoKeyVersion to get.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$" - } + "response": { + "$ref": "CryptoKeyVersion" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": { + "name": { + "description": "The name of the CryptoKeyVersion to get.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$", + "location": "path" + } + }, "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/keyRings/{keyRingsId}/cryptoKeys/{cryptoKeysId}/cryptoKeyVersions/{cryptoKeyVersionsId}", "path": "v1/{+name}", "id": "cloudkms.projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.get" @@ -746,49 +1254,51 @@ } }, "parameters": { - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", "location": "query" }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "string", + "location": "query" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -797,14 +1307,7 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + ] }, "alt": { "enum": [ @@ -822,532 +1325,29 @@ "description": "Data format for response.", "default": "json" }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, "access_token": { "description": "OAuth access token.", "type": "string", "location": "query" }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" } }, "version": "v1", "baseUrl": "https://cloudkms.googleapis.com/", - "kind": "discovery#restDescription", "description": "Manages encryption for your cloud services the same way you do on-premises. You can generate, use, rotate, and destroy AES256 encryption keys.", "servicePath": "", + "kind": "discovery#restDescription", "basePath": "", - "id": "cloudkms:v1", "documentationLink": "https://cloud.google.com/kms/", - "revision": "20170913", - "discoveryVersion": "v1", - "version_module": true, - "schemas": { - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - }, - "updateMask": { - "format": "google-fieldmask", - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", - "type": "string" - } - }, - "id": "SetIamPolicyRequest" - }, - "DecryptRequest": { - "properties": { - "additionalAuthenticatedData": { - "format": "byte", - "description": "Optional data that must match the data originally supplied in\nEncryptRequest.additional_authenticated_data.", - "type": "string" - }, - "ciphertext": { - "format": "byte", - "description": "Required. The encrypted data originally returned in\nEncryptResponse.ciphertext.", - "type": "string" - } - }, - "id": "DecryptRequest", - "description": "Request message for KeyManagementService.Decrypt.", - "type": "object" - }, - "Binding": { - "properties": { - "condition": { - "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL.", - "$ref": "Expr" - }, - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" - } - }, - "id": "Binding", - "description": "Associates `members` with a `role`.", - "type": "object" - }, - "Expr": { - "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", - "type": "object", - "properties": { - "location": { - "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", - "type": "string" - }, - "description": { - "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", - "type": "string" - } - }, - "id": "Expr" - }, - "EncryptRequest": { - "properties": { - "plaintext": { - "format": "byte", - "description": "Required. The data to encrypt. Must be no larger than 64KiB.", - "type": "string" - }, - "additionalAuthenticatedData": { - "format": "byte", - "description": "Optional data that, if specified, must also be provided during decryption\nthrough DecryptRequest.additional_authenticated_data. Must be no\nlarger than 64KiB.", - "type": "string" - } - }, - "id": "EncryptRequest", - "description": "Request message for KeyManagementService.Encrypt.", - "type": "object" - }, - "ListCryptoKeyVersionsResponse": { - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeyVersionsRequest.page_token to retrieve the next page of\nresults.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total number of CryptoKeyVersions that matched the\nquery.", - "type": "integer" - }, - "cryptoKeyVersions": { - "description": "The list of CryptoKeyVersions.", - "items": { - "$ref": "CryptoKeyVersion" - }, - "type": "array" - } - }, - "id": "ListCryptoKeyVersionsResponse", - "description": "Response message for KeyManagementService.ListCryptoKeyVersions.", - "type": "object" - }, - "Location": { - "description": "A resource that represents Google Cloud Platform location.", - "type": "object", - "properties": { - "locationId": { - "description": "The canonical id for this location. For example: `\"us-east1\"`.", - "type": "string" - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object" - }, - "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", - "type": "string" - } - }, - "id": "Location" - }, - "ListCryptoKeysResponse": { - "description": "Response message for KeyManagementService.ListCryptoKeys.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results. Pass this value in\nListCryptoKeysRequest.page_token to retrieve the next page of results.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total number of CryptoKeys that matched the query.", - "type": "integer" - }, - "cryptoKeys": { - "description": "The list of CryptoKeys.", - "items": { - "$ref": "CryptoKey" - }, - "type": "array" - } - }, - "id": "ListCryptoKeysResponse" - }, - "TestIamPermissionsResponse": { - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object" - }, - "DestroyCryptoKeyVersionRequest": { - "description": "Request message for KeyManagementService.DestroyCryptoKeyVersion.", - "type": "object", - "properties": {}, - "id": "DestroyCryptoKeyVersionRequest" - }, - "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", - "type": "object", - "properties": { - "logType": { - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "description": "The log type that this config enables.", - "type": "string", - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ] - }, - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "AuditLogConfig" - }, - "CryptoKey": { - "properties": { - "purpose": { - "enumDescriptions": [ - "Not specified.", - "CryptoKeys with this purpose may be used with\nEncrypt and\nDecrypt." - ], - "enum": [ - "CRYPTO_KEY_PURPOSE_UNSPECIFIED", - "ENCRYPT_DECRYPT" - ], - "description": "The immutable purpose of this CryptoKey. Currently, the only acceptable\npurpose is ENCRYPT_DECRYPT.", - "type": "string" - }, - "nextRotationTime": { - "format": "google-datetime", - "description": "At next_rotation_time, the Key Management Service will automatically:\n\n1. Create a new version of this CryptoKey.\n2. Mark the new version as primary.\n\nKey rotations performed manually via\nCreateCryptoKeyVersion and\nUpdateCryptoKeyPrimaryVersion\ndo not affect next_rotation_time.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Labels with user defined metadata.", - "type": "object" - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. The time at which this CryptoKey was created.", - "type": "string" - }, - "rotationPeriod": { - "format": "google-duration", - "description": "next_rotation_time will be advanced by this period when the service\nautomatically rotates a key. Must be at least one day.\n\nIf rotation_period is set, next_rotation_time must also be set.", - "type": "string" - }, - "primary": { - "$ref": "CryptoKeyVersion", - "description": "Output only. A copy of the \"primary\" CryptoKeyVersion that will be used\nby Encrypt when this CryptoKey is given\nin EncryptRequest.name.\n\nThe CryptoKey's primary version can be updated via\nUpdateCryptoKeyPrimaryVersion." - }, - "name": { - "description": "Output only. The resource name for this CryptoKey in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*`.", - "type": "string" - } - }, - "id": "CryptoKey", - "description": "A CryptoKey represents a logical key that can be used for cryptographic\noperations.\n\nA CryptoKey is made up of one or more versions, which\nrepresent the actual key material used in cryptographic operations.", - "type": "object" - }, - "DecryptResponse": { - "description": "Response message for KeyManagementService.Decrypt.", - "type": "object", - "properties": { - "plaintext": { - "format": "byte", - "description": "The decrypted data originally supplied in EncryptRequest.plaintext.", - "type": "string" - } - }, - "id": "DecryptResponse" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsRequest" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "iamOwned": { - "type": "boolean" - }, - "etag": { - "format": "byte", - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - } - }, - "id": "Policy" - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "locations": { - "description": "A list of locations that matches the specified filter in the request.", - "items": { - "$ref": "Location" - }, - "type": "array" - } - }, - "id": "ListLocationsResponse" - }, - "KeyRing": { - "description": "A KeyRing is a toplevel logical grouping of CryptoKeys.", - "type": "object", - "properties": { - "createTime": { - "format": "google-datetime", - "description": "Output only. The time at which this KeyRing was created.", - "type": "string" - }, - "name": { - "description": "Output only. The resource name for the KeyRing in the format\n`projects/*/locations/*/keyRings/*`.", - "type": "string" - } - }, - "id": "KeyRing" - }, - "EncryptResponse": { - "description": "Response message for KeyManagementService.Encrypt.", - "type": "object", - "properties": { - "name": { - "description": "The resource name of the CryptoKeyVersion used in encryption.", - "type": "string" - }, - "ciphertext": { - "format": "byte", - "description": "The encrypted data.", - "type": "string" - } - }, - "id": "EncryptResponse" - }, - "UpdateCryptoKeyPrimaryVersionRequest": { - "description": "Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.", - "type": "object", - "properties": { - "cryptoKeyVersionId": { - "description": "The id of the child CryptoKeyVersion to use as primary.", - "type": "string" - } - }, - "id": "UpdateCryptoKeyPrimaryVersionRequest" - }, - "RestoreCryptoKeyVersionRequest": { - "description": "Request message for KeyManagementService.RestoreCryptoKeyVersion.", - "type": "object", - "properties": {}, - "id": "RestoreCryptoKeyVersionRequest" - }, - "ListKeyRingsResponse": { - "description": "Response message for KeyManagementService.ListKeyRings.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "A token to retrieve next page of results. Pass this value in\nListKeyRingsRequest.page_token to retrieve the next page of results.", - "type": "string" - }, - "totalSize": { - "format": "int32", - "description": "The total number of KeyRings that matched the query.", - "type": "integer" - }, - "keyRings": { - "description": "The list of KeyRings.", - "items": { - "$ref": "KeyRing" - }, - "type": "array" - } - }, - "id": "ListKeyRingsResponse" - }, - "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", - "type": "object", - "properties": { - "service": { - "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", - "type": "string" - }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" - }, - "exemptedMembers": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "AuditConfig" - }, - "CryptoKeyVersion": { - "properties": { - "createTime": { - "format": "google-datetime", - "description": "Output only. The time at which this CryptoKeyVersion was created.", - "type": "string" - }, - "state": { - "enum": [ - "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED", - "ENABLED", - "DISABLED", - "DESTROYED", - "DESTROY_SCHEDULED" - ], - "description": "The current state of the CryptoKeyVersion.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "This version may be used in Encrypt and\nDecrypt requests.", - "This version may not be used, but the key material is still available,\nand the version can be placed back into the ENABLED state.", - "This version is destroyed, and the key material is no longer stored.\nA version may not leave this state once entered.", - "This version is scheduled for destruction, and will be destroyed soon.\nCall\nRestoreCryptoKeyVersion\nto put it back into the DISABLED state." - ] - }, - "name": { - "description": "Output only. The resource name for this CryptoKeyVersion in the format\n`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.", - "type": "string" - }, - "destroyEventTime": { - "format": "google-datetime", - "description": "Output only. The time this CryptoKeyVersion's key material was\ndestroyed. Only present if state is\nDESTROYED.", - "type": "string" - }, - "destroyTime": { - "format": "google-datetime", - "description": "Output only. The time this CryptoKeyVersion's key material is scheduled\nfor destruction. Only present if state is\nDESTROY_SCHEDULED.", - "type": "string" - } - }, - "id": "CryptoKeyVersion", - "description": "A CryptoKeyVersion represents an individual cryptographic key, and the\nassociated key material.\n\nIt can be used for cryptographic operations either directly, or via its\nparent CryptoKey, in which case the server will choose the appropriate\nversion for the operation.\n\nFor security reasons, the raw cryptographic key material represented by a\nCryptoKeyVersion can never be viewed or exported. It can only be used to\nencrypt or decrypt data when an authorized user or application invokes Cloud\nKMS.", - "type": "object" - } - }, - "protocol": "rest", - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "canonicalName": "Cloud KMS", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://cloudkms.googleapis.com/" + "revision": "20170919", + "id": "cloudkms:v1" } diff --git a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json index 891023345..16d7b4fb8 100644 --- a/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json +++ b/vendor/google.golang.org/api/cloudmonitoring/v2beta2/cloudmonitoring-api.json @@ -21,7 +21,7 @@ "basePath": "/cloudmonitoring/v2beta2/projects/", "rootUrl": "https://www.googleapis.com/", "servicePath": "cloudmonitoring/v2beta2/projects/", - "batchPath": "batch", + "batchPath": "batch/cloudmonitoring/v2beta2", "parameters": { "alt": { "type": "string", diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json index 2249193cd..1d4b7d063 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1,47 +1,255 @@ { "discoveryVersion": "v1", "schemas": { + "ListOrgPoliciesResponse": { + "description": "The response returned from the ListOrgPolicies method. It will be empty\nif no `Policies` are set on the resource.", + "type": "object", + "properties": { + "policies": { + "description": "The `Policies` that are set on the resource. It will be empty if no\n`Policies` are set.", + "items": { + "$ref": "OrgPolicy" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Page token used to retrieve the next page. This is currently not used, but\nthe server may at any point start supplying a valid token.", + "type": "string" + } + }, + "id": "ListOrgPoliciesResponse" + }, + "SearchOrganizationsResponse": { + "description": "The response returned from the `SearchOrganizations` method.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", + "type": "string" + }, + "organizations": { + "description": "The list of Organizations that matched the search query, possibly\npaginated.", + "items": { + "$ref": "Organization" + }, + "type": "array" + } + }, + "id": "SearchOrganizationsResponse" + }, + "FolderOperationError": { + "properties": { + "errorMessageId": { + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "ACTIVE_FOLDER_HEIGHT_VIOLATION", + "MAX_CHILD_FOLDERS_VIOLATION", + "FOLDER_NAME_UNIQUENESS_VIOLATION", + "RESOURCE_DELETED_VIOLATION", + "PARENT_DELETED_VIOLATION", + "CYCLE_INTRODUCED_VIOLATION", + "FOLDER_BEING_MOVED_VIOLATION", + "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", + "DELETED_FOLDER_HEIGHT_VIOLATION" + ], + "description": "The type of operation error experienced.", + "type": "string", + "enumDescriptions": [ + "The error type was unrecognized or unspecified.", + "The attempted action would violate the max folder depth constraint.", + "The attempted action would violate the max child folders constraint.", + "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", + "The resource being moved has been deleted.", + "The resource a folder was being added to has been deleted.", + "The attempted action would introduce cycle in resource path.", + "The attempted action would move a folder that is already being moved.", + "The folder the caller is trying to delete contains active resources.", + "The attempted action would violate the max deleted folder depth\nconstraint." + ] + } + }, + "id": "FolderOperationError", + "description": "A classification of the Folder Operation error.", + "type": "object" + }, + "OrgPolicy": { + "properties": { + "listPolicy": { + "$ref": "ListPolicy", + "description": "List of values either allowed or disallowed." + }, + "etag": { + "format": "byte", + "description": "An opaque tag indicating the current version of the `Policy`, used for\nconcurrency control.\n\nWhen the `Policy` is returned from either a `GetPolicy` or a\n`ListOrgPolicy` request, this `etag` indicates the version of the current\n`Policy` to use when executing a read-modify-write loop.\n\nWhen the `Policy` is returned from a `GetEffectivePolicy` request, the\n`etag` will be unset.\n\nWhen the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value\nthat was returned from a `GetOrgPolicy` request as part of a\nread-modify-write loop for concurrency control. Not setting the `etag`in a\n`SetOrgPolicy` request will result in an unconditional write of the\n`Policy`.", + "type": "string" + }, + "booleanPolicy": { + "description": "For boolean `Constraints`, whether to enforce the `Constraint` or not.", + "$ref": "BooleanPolicy" + }, + "constraint": { + "description": "The name of the `Constraint` the `Policy` is configuring, for example,\n`constraints/serviceuser.services`.\n\nImmutable after creation.", + "type": "string" + }, + "updateTime": { + "format": "google-datetime", + "description": "The time stamp the `Policy` was previously updated. This is set by the\nserver, not specified by the caller, and represents the last time a call to\n`SetOrgPolicy` was made for that `Policy`. Any value set by the client will\nbe ignored.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. Default version is 0;", + "type": "integer" + }, + "restoreDefault": { + "description": "Restores the default behavior of the constraint; independent of\n`Constraint` type.", + "$ref": "RestoreDefault" + } + }, + "id": "OrgPolicy", + "description": "Defines a Cloud Organization `Policy` which is used to specify `Constraints`\nfor configurations of Cloud Platform resources.", + "type": "object" + }, + "BooleanPolicy": { + "description": "Used in `policy_type` to specify how `boolean_policy` will behave at this\nresource.", + "type": "object", + "properties": { + "enforced": { + "description": "If `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nSuppose you have a `Constraint` `constraints/compute.disableSerialPortAccess`\nwith `constraint_default` set to `ALLOW`. A `Policy` for that\n`Constraint` exhibits the following behavior:\n - If the `Policy` at this resource has enforced set to `false`, serial\n port connection attempts will be allowed.\n - If the `Policy` at this resource has enforced set to `true`, serial\n port connection attempts will be refused.\n - If the `Policy` at this resource is `RestoreDefault`, serial port\n connection attempts will be allowed.\n - If no `Policy` is set at this resource or anywhere higher in the\n resource hierarchy, serial port connection attempts will be allowed.\n - If no `Policy` is set at this resource, but one exists higher in the\n resource hierarchy, the behavior is as if the`Policy` were set at\n this resource.\n\nThe following examples demonstrate the different possible layerings:\n\nExample 1 (nearest `Constraint` wins):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has no `Policy` set.\nThe constraint at `projects/bar` and `organizations/foo` will not be\nenforced.\n\nExample 2 (enforcement gets replaced):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has a `Policy` with:\n {enforced: true}\nThe constraint at `organizations/foo` is not enforced.\nThe constraint at `projects/bar` is enforced.\n\nExample 3 (RestoreDefault):\n `organizations/foo` has a `Policy` with:\n {enforced: true}\n `projects/bar` has a `Policy` with:\n {RestoreDefault: {}}\nThe constraint at `organizations/foo` is enforced.\nThe constraint at `projects/bar` is not enforced, because\n`constraint_default` for the `Constraint` is `ALLOW`.", + "type": "boolean" + } + }, + "id": "BooleanPolicy" + }, + "Lien": { + "properties": { + "parent": { + "description": "A reference to the resource this Lien is attached to. The server will\nvalidate the parent against those for which Liens are supported.\n\nExample: `projects/1234`", + "type": "string" + }, + "createTime": { + "format": "google-datetime", + "description": "The creation time of this Lien.", + "type": "string" + }, + "name": { + "description": "A system-generated unique identifier for this Lien.\n\nExample: `liens/1234abcd`", + "type": "string" + }, + "reason": { + "description": "Concise user-visible strings indicating why an action cannot be performed\non a resource. Maximum lenth of 200 characters.\n\nExample: 'Holds production API key'", + "type": "string" + }, + "origin": { + "description": "A stable, user-visible/meaningful string identifying the origin of the\nLien, intended to be inspected programmatically. Maximum length of 200\ncharacters.\n\nExample: 'compute.googleapis.com'", + "type": "string" + }, + "restrictions": { + "description": "The types of operations which should be blocked as a result of this Lien.\nEach value should correspond to an IAM permission. The server will\nvalidate the permissions against those for which Liens are supported.\n\nAn empty list is meaningless and will be rejected.\n\nExample: ['resourcemanager.projects.delete']", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "Lien", + "description": "A Lien represents an encumbrance on the actions that can be performed on a\nresource.", + "type": "object" + }, + "Ancestor": { + "properties": { + "resourceId": { + "description": "Resource id of the ancestor.", + "$ref": "ResourceId" + } + }, + "id": "Ancestor", + "description": "Identifying information for a single ancestor of a project.", + "type": "object" + }, + "ListConstraint": { + "properties": { + "suggestedValue": { + "description": "Optional. The Google Cloud Console will try to default to a configuration\nthat matches the value specified in this `Constraint`.", + "type": "string" + } + }, + "id": "ListConstraint", + "description": "A `Constraint` that allows or disallows a list of string values, which are\nconfigured by an Organization's policy administrator with a `Policy`.", + "type": "object" + }, + "SetOrgPolicyRequest": { + "description": "The request sent to the SetOrgPolicyRequest method.", + "type": "object", + "properties": { + "policy": { + "$ref": "OrgPolicy", + "description": "`Policy` to set on the resource." + } + }, + "id": "SetOrgPolicyRequest" + }, + "SetIamPolicyRequest": { + "properties": { + "updateMask": { + "format": "google-fieldmask", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "type": "string" + }, + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method.", + "type": "object" + }, + "Empty": { + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object" + }, "Organization": { "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", "type": "object", "properties": { + "creationTime": { + "format": "google-datetime", + "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", + "type": "string" + }, "lifecycleState": { - "enumDescriptions": [ - "Unspecified state. This is only useful for distinguishing unset values.", - "The normal and active state.", - "The organization has been marked for deletion by the user." - ], "enum": [ "LIFECYCLE_STATE_UNSPECIFIED", "ACTIVE", "DELETE_REQUESTED" ], "description": "The organization's current lifecycle state. Assigned by the server.\n@OutputOnly", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unspecified state. This is only useful for distinguishing unset values.", + "The normal and active state.", + "The organization has been marked for deletion by the user." + ] }, "owner": { "$ref": "OrganizationOwner", "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required." }, "name": { - "type": "string", - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\"." + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", + "type": "string" }, "displayName": { "description": "A friendly string to be used to refer to the Organization in the UI.\nAssigned by the server, set to the primary domain of the G Suite\ncustomer that owns the organization.\n@OutputOnly", "type": "string" - }, - "creationTime": { - "format": "google-datetime", - "description": "Timestamp when the Organization was created. Assigned by the server.\n@OutputOnly", - "type": "string" } }, "id": "Organization" }, "ListAvailableOrgPolicyConstraintsResponse": { - "description": "The response returned from the ListAvailableOrgPolicyConstraints method.\nReturns all `Constraints` that could be set at this level of the hierarchy\n(contrast with the response from `ListPolicies`, which returns all policies\nwhich are set).", - "type": "object", "properties": { "nextPageToken": { "description": "Page token used to retrieve the next page. This is currently not used.", @@ -55,12 +263,11 @@ "type": "array" } }, - "id": "ListAvailableOrgPolicyConstraintsResponse" + "id": "ListAvailableOrgPolicyConstraintsResponse", + "description": "The response returned from the ListAvailableOrgPolicyConstraints method.\nReturns all `Constraints` that could be set at this level of the hierarchy\n(contrast with the response from `ListPolicies`, which returns all policies\nwhich are set).", + "type": "object" }, "ListPolicy": { - "id": "ListPolicy", - "description": "Used in `policy_type` to specify how `list_policy` behaves at this\nresource.\n\nA `ListPolicy` can define specific values that are allowed or denied by\nsetting either the `allowed_values` or `denied_values` fields. It can also\nbe used to allow or deny all values, by setting the `all_values` field. If\n`all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values`\nor `denied_values` must be set (attempting to set both or neither will\nresult in a failed request). If `all_values` is set to either `ALLOW` or\n`DENY`, `allowed_values` and `denied_values` must be unset.", - "type": "object", "properties": { "allValues": { "enumDescriptions": [ @@ -98,26 +305,26 @@ }, "type": "array" } - } + }, + "id": "ListPolicy", + "description": "Used in `policy_type` to specify how `list_policy` behaves at this\nresource.\n\nA `ListPolicy` can define specific values that are allowed or denied by\nsetting either the `allowed_values` or `denied_values` fields. It can also\nbe used to allow or deny all values, by setting the `all_values` field. If\n`all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values`\nor `denied_values` must be set (attempting to set both or neither will\nresult in a failed request). If `all_values` is set to either `ALLOW` or\n`DENY`, `allowed_values` and `denied_values` must be unset.", + "type": "object" }, "GetAncestryResponse": { + "description": "Response from the GetAncestry method.", "type": "object", "properties": { "ancestor": { + "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", "items": { "$ref": "Ancestor" }, - "type": "array", - "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc." + "type": "array" } }, - "id": "GetAncestryResponse", - "description": "Response from the GetAncestry method." + "id": "GetAncestryResponse" }, "AuditLogConfig": { - "id": "AuditLogConfig", - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", - "type": "object", "properties": { "exemptedMembers": { "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", @@ -127,6 +334,12 @@ "type": "array" }, "logType": { + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], "enum": [ "LOG_TYPE_UNSPECIFIED", "ADMIN_READ", @@ -134,22 +347,15 @@ "DATA_READ" ], "description": "The log type that this config enables.", - "type": "string", - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ] + "type": "string" } - } + }, + "id": "AuditLogConfig", + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object" }, "SearchOrganizationsRequest": { "properties": { - "filter": { - "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with\n`owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", - "type": "string" - }, "pageToken": { "description": "A pagination token returned from a previous call to `SearchOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", "type": "string" @@ -158,6 +364,10 @@ "format": "int32", "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", "type": "integer" + }, + "filter": { + "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with\n`owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", + "type": "string" } }, "id": "SearchOrganizationsRequest", @@ -165,12 +375,14 @@ "type": "object" }, "GetAncestryRequest": { - "description": "The request sent to the\nGetAncestry\nmethod.", - "type": "object", "properties": {}, - "id": "GetAncestryRequest" + "id": "GetAncestryRequest", + "description": "The request sent to the\nGetAncestry\nmethod.", + "type": "object" }, "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", "properties": { "permissions": { "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", @@ -180,22 +392,45 @@ "type": "array" } }, - "id": "TestIamPermissionsRequest", - "description": "Request message for `TestIamPermissions` method.", + "id": "TestIamPermissionsRequest" + }, + "FolderOperation": { + "properties": { + "operationType": { + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE", + "MOVE" + ], + "description": "The type of this operation.", + "type": "string", + "enumDescriptions": [ + "Operation type not specified.", + "A create folder operation.", + "A move folder operation." + ] + }, + "sourceParent": { + "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + }, + "destinationParent": { + "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", + "type": "string" + } + }, + "id": "FolderOperation", + "description": "Metadata describing a long running folder operation", "type": "object" }, "Policy": { - "id": "Policy", "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", "type": "object", "properties": { - "bindings": { - "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, "etag": { "format": "byte", "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", @@ -212,88 +447,20 @@ "$ref": "AuditConfig" }, "type": "array" + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", + "items": { + "$ref": "Binding" + }, + "type": "array" } - } + }, + "id": "Policy" }, "ListAvailableOrgPolicyConstraintsRequest": { "description": "The request sent to the [ListAvailableOrgPolicyConstraints]\ngoogle.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.", "type": "object", - "properties": { - "pageToken": { - "description": "Page token used to retrieve the next page. This is currently unsupported\nand will be ignored. The server may at any point start using this field.", - "type": "string" - }, - "pageSize": { - "type": "integer", - "format": "int32", - "description": "Size of the pages to be returned. This is currently unsupported and will\nbe ignored. The server may at any point start using this field to limit\npage size." - } - }, - "id": "ListAvailableOrgPolicyConstraintsRequest" - }, - "FolderOperation": { - "description": "Metadata describing a long running folder operation", - "type": "object", - "properties": { - "sourceParent": { - "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", - "type": "string" - }, - "displayName": { - "description": "The display name of the folder.", - "type": "string" - }, - "destinationParent": { - "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", - "type": "string" - }, - "operationType": { - "description": "The type of this operation.", - "type": "string", - "enumDescriptions": [ - "Operation type not specified.", - "A create folder operation.", - "A move folder operation." - ], - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE", - "MOVE" - ] - } - }, - "id": "FolderOperation" - }, - "ResourceId": { - "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an App Engine app,\na Compute Engine instance, a Cloud SQL database, and so on.", - "type": "object", - "properties": { - "type": { - "description": "Required field representing the resource type this id is for.\nAt present, the valid types are: \"organization\"", - "type": "string" - }, - "id": { - "description": "Required field for the type-specific id. This should correspond to the id\nused in the type-specific API's.", - "type": "string" - } - }, - "id": "ResourceId" - }, - "GetEffectiveOrgPolicyRequest": { - "description": "The request sent to the GetEffectiveOrgPolicy method.", - "type": "object", - "properties": { - "constraint": { - "type": "string", - "description": "The name of the `Constraint` to compute the effective `Policy`." - } - }, - "id": "GetEffectiveOrgPolicyRequest" - }, - "ListOrgPoliciesRequest": { - "id": "ListOrgPoliciesRequest", - "description": "The request sent to the ListOrgPolicies method.", - "type": "object", "properties": { "pageToken": { "description": "Page token used to retrieve the next page. This is currently unsupported\nand will be ignored. The server may at any point start using this field.", @@ -304,29 +471,52 @@ "description": "Size of the pages to be returned. This is currently unsupported and will\nbe ignored. The server may at any point start using this field to limit\npage size.", "type": "integer" } - } + }, + "id": "ListAvailableOrgPolicyConstraintsRequest" }, - "AuditConfig": { - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", - "type": "object", + "ResourceId": { "properties": { - "service": { - "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", + "id": { + "description": "Required field for the type-specific id. This should correspond to the id\nused in the type-specific API's.", "type": "string" }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" + "type": { + "description": "Required field representing the resource type this id is for.\nAt present, the valid types are: \"organization\"", + "type": "string" } }, - "id": "AuditConfig" + "id": "ResourceId", + "description": "A container to reference an id for any resource type. A `resource` in Google\nCloud Platform is a generic term for something you (a developer) may want to\ninteract with through one of our API's. Some examples are an App Engine app,\na Compute Engine instance, a Cloud SQL database, and so on.", + "type": "object" + }, + "GetEffectiveOrgPolicyRequest": { + "properties": { + "constraint": { + "description": "The name of the `Constraint` to compute the effective `Policy`.", + "type": "string" + } + }, + "id": "GetEffectiveOrgPolicyRequest", + "description": "The request sent to the GetEffectiveOrgPolicy method.", + "type": "object" + }, + "ListOrgPoliciesRequest": { + "properties": { + "pageToken": { + "description": "Page token used to retrieve the next page. This is currently unsupported\nand will be ignored. The server may at any point start using this field.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "Size of the pages to be returned. This is currently unsupported and will\nbe ignored. The server may at any point start using this field to limit\npage size.", + "type": "integer" + } + }, + "id": "ListOrgPoliciesRequest", + "description": "The request sent to the ListOrgPolicies method.", + "type": "object" }, "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", "properties": { "done": { "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", @@ -341,27 +531,45 @@ "type": "object" }, "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`." + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" }, "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" }, "metadata": { "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" }, "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", "type": "object" } }, - "id": "Operation" + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object" + }, + "AuditConfig": { + "properties": { + "service": { + "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", + "type": "string" + }, + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + } + }, + "id": "AuditConfig", + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object" }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", "properties": { "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", @@ -371,8 +579,8 @@ "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" }, "type": "object" }, @@ -384,7 +592,9 @@ "type": "integer" } }, - "id": "Status" + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object" }, "ListLiensResponse": { "properties": { @@ -408,44 +618,44 @@ "description": "A `Constraint` describes a way in which a resource's configuration can be\nrestricted. For example, it controls which cloud services can be activated\nacross an organization, or whether a Compute Engine instance can have\nserial port connections established. `Constraints` can be configured by the\norganization's policy adminstrator to fit the needs of the organzation by\nsetting Policies for `Constraints` at different locations in the\norganization's resource hierarchy. Policies are inherited down the resource\nhierarchy from higher levels, but can also be overridden. For details about\nthe inheritance rules please read about\nPolicies.\n\n`Constraints` have a default behavior determined by the `constraint_default`\nfield, which is the enforcement behavior that is used in the absence of a\n`Policy` being defined or inherited for the resource in question.", "type": "object", "properties": { - "name": { - "type": "string", - "description": "Immutable value, required to globally be unique. For example,\n`constraints/serviceuser.services`" - }, - "listConstraint": { - "$ref": "ListConstraint", - "description": "Defines this constraint as being a ListConstraint." - }, - "version": { - "format": "int32", - "description": "Version of the `Constraint`. Default version is 0;", - "type": "integer" - }, - "displayName": { - "description": "The human readable name.\n\nMutable.", - "type": "string" - }, - "description": { - "description": "Detailed description of what this `Constraint` controls as well as how and\nwhere it is enforced.\n\nMutable.", - "type": "string" - }, "booleanConstraint": { "$ref": "BooleanConstraint", "description": "Defines this constraint as being a BooleanConstraint." }, "constraintDefault": { + "enumDescriptions": [ + "This is only used for distinguishing unset values and should never be\nused.", + "Indicate that all values are allowed for list constraints.\nIndicate that enforcement is off for boolean constraints.", + "Indicate that all values are denied for list constraints.\nIndicate that enforcement is on for boolean constraints." + ], "enum": [ "CONSTRAINT_DEFAULT_UNSPECIFIED", "ALLOW", "DENY" ], "description": "The evaluation behavior of this constraint in the absense of 'Policy'.", - "type": "string", - "enumDescriptions": [ - "This is only used for distinguishing unset values and should never be\nused.", - "Indicate that all values are allowed for list constraints.\nIndicate that enforcement is off for boolean constraints.", - "Indicate that all values are denied for list constraints.\nIndicate that enforcement is on for boolean constraints." - ] + "type": "string" + }, + "name": { + "description": "Immutable value, required to globally be unique. For example,\n`constraints/serviceuser.services`", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Constraint`. Default version is 0;", + "type": "integer" + }, + "listConstraint": { + "description": "Defines this constraint as being a ListConstraint.", + "$ref": "ListConstraint" + }, + "description": { + "description": "Detailed description of what this `Constraint` controls as well as how and\nwhere it is enforced.\n\nMutable.", + "type": "string" + }, + "displayName": { + "description": "The human readable name.\n\nMutable.", + "type": "string" } }, "id": "Constraint" @@ -480,10 +690,10 @@ "id": "GetOrgPolicyRequest" }, "RestoreDefault": { + "description": "Ignores policies set above this resource and restores the\n`constraint_default` enforcement behavior of the specific `Constraint` at\nthis resource.\n\nSuppose that `constraint_default` is set to `ALLOW` for the\n`Constraint` `constraints/serviceuser.services`. Suppose that organization\nfoo.com sets a `Policy` at their Organization resource node that restricts\nthe allowed service activations to deny all service activations. They\ncould then set a `Policy` with the `policy_type` `restore_default` on\nseveral experimental projects, restoring the `constraint_default`\nenforcement of the `Constraint` for only those projects, allowing those\nprojects to have all services activated.", "type": "object", "properties": {}, - "id": "RestoreDefault", - "description": "Ignores policies set above this resource and restores the\n`constraint_default` enforcement behavior of the specific `Constraint` at\nthis resource.\n\nSuppose that `constraint_default` is set to `ALLOW` for the\n`Constraint` `constraints/serviceuser.services`. Suppose that organization\nfoo.com sets a `Policy` at their Organization resource node that restricts\nthe allowed service activations to deny all service activations. They\ncould then set a `Policy` with the `policy_type` `restore_default` on\nseveral experimental projects, restoring the `constraint_default`\nenforcement of the `Constraint` for only those projects, allowing those\nprojects to have all services activated." + "id": "RestoreDefault" }, "ClearOrgPolicyRequest": { "properties": { @@ -520,18 +730,18 @@ "type": "boolean" }, "createTime": { - "type": "string", "format": "google-datetime", - "description": "Creation time of the project creation workflow." + "description": "Creation time of the project creation workflow.", + "type": "string" } }, "id": "ProjectCreationStatus" }, "BooleanConstraint": { - "description": "A `Constraint` that is either enforced or not.\n\nFor example a constraint `constraints/compute.disableSerialPortAccess`.\nIf it is enforced on a VM instance, serial port connections will not be\nopened to that instance.", - "type": "object", "properties": {}, - "id": "BooleanConstraint" + "id": "BooleanConstraint", + "description": "A `Constraint` that is either enforced or not.\n\nFor example a constraint `constraints/compute.disableSerialPortAccess`.\nIf it is enforced on a VM instance, serial port connections will not be\nopened to that instance.", + "type": "object" }, "GetIamPolicyRequest": { "description": "Request message for `GetIamPolicy` method.", @@ -554,52 +764,45 @@ "id": "TestIamPermissionsResponse" }, "OrganizationOwner": { - "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", - "type": "object", "properties": { "directoryCustomerId": { "description": "The Google for Work customer id used in the Directory API.", "type": "string" } }, - "id": "OrganizationOwner" + "id": "OrganizationOwner", + "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", + "type": "object" }, "ListProjectsResponse": { - "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", - "type": "object", "properties": { "nextPageToken": { "description": "Pagination token.\n\nIf the result set is too large to fit in a single response, this token\nis returned. It encodes the position of the current result cursor.\nFeeding this value into a new list request with the `page_token` parameter\ngives the next page of the results.\n\nWhen `next_page_token` is not filled in, there is no next page and\nthe list returned is the last page in the result set.\n\nPagination tokens have a limited lifetime.", "type": "string" }, "projects": { + "description": "The list of Projects that matched the list filter. This list can\nbe paginated.", "items": { "$ref": "Project" }, - "type": "array", - "description": "The list of Projects that matched the list filter. This list can\nbe paginated." + "type": "array" } }, - "id": "ListProjectsResponse" + "id": "ListProjectsResponse", + "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", + "type": "object" }, "Project": { - "type": "object", "properties": { "name": { - "type": "string", - "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write." + "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", + "type": "string" }, "projectId": { - "type": "string", - "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation." + "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation.", + "type": "string" }, "lifecycleState": { - "enumDescriptions": [ - "Unspecified state. This is only used/useful for distinguishing\nunset values.", - "The normal and active state.", - "The project has been marked for deletion by the user\n(by invoking\nDeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", - "This lifecycle state is no longer used and not returned by the API." - ], "enum": [ "LIFECYCLE_STATE_UNSPECIFIED", "ACTIVE", @@ -607,7 +810,13 @@ "DELETE_IN_PROGRESS" ], "description": "The Project lifecycle state.\n\nRead-only.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unspecified state. This is only used/useful for distinguishing\nunset values.", + "The normal and active state.", + "The project has been marked for deletion by the user\n(by invoking\nDeleteProject)\nor by the system (Google Cloud Platform).\nThis can generally be reversed by invoking UndeleteProject.", + "This lifecycle state is no longer used and not returned by the API." + ] }, "projectNumber": { "format": "int64", @@ -618,238 +827,29 @@ "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write.", "$ref": "ResourceId" }, + "createTime": { + "format": "google-datetime", + "description": "Creation time.\n\nRead-only.", + "type": "string" + }, "labels": { "additionalProperties": { "type": "string" }, "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write.", "type": "object" - }, - "createTime": { - "format": "google-datetime", - "description": "Creation time.\n\nRead-only.", - "type": "string" } }, "id": "Project", - "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources." - }, - "SearchOrganizationsResponse": { - "type": "object", - "properties": { - "nextPageToken": { - "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", - "type": "string" - }, - "organizations": { - "description": "The list of Organizations that matched the search query, possibly\npaginated.", - "items": { - "$ref": "Organization" - }, - "type": "array" - } - }, - "id": "SearchOrganizationsResponse", - "description": "The response returned from the `SearchOrganizations` method." - }, - "ListOrgPoliciesResponse": { - "type": "object", - "properties": { - "policies": { - "description": "The `Policies` that are set on the resource. It will be empty if no\n`Policies` are set.", - "items": { - "$ref": "OrgPolicy" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Page token used to retrieve the next page. This is currently not used, but\nthe server may at any point start supplying a valid token.", - "type": "string" - } - }, - "id": "ListOrgPoliciesResponse", - "description": "The response returned from the ListOrgPolicies method. It will be empty\nif no `Policies` are set on the resource." - }, - "FolderOperationError": { - "description": "A classification of the Folder Operation error.", - "type": "object", - "properties": { - "errorMessageId": { - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "ACTIVE_FOLDER_HEIGHT_VIOLATION", - "MAX_CHILD_FOLDERS_VIOLATION", - "FOLDER_NAME_UNIQUENESS_VIOLATION", - "RESOURCE_DELETED_VIOLATION", - "PARENT_DELETED_VIOLATION", - "CYCLE_INTRODUCED_VIOLATION", - "FOLDER_BEING_MOVED_VIOLATION", - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" - ], - "description": "The type of operation error experienced.", - "type": "string", - "enumDescriptions": [ - "The error type was unrecognized or unspecified.", - "The attempted action would violate the max folder depth constraint.", - "The attempted action would violate the max child folders constraint.", - "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", - "The resource being moved has been deleted.", - "The resource a folder was being added to has been deleted.", - "The attempted action would introduce cycle in resource path.", - "The attempted action would move a folder that is already being moved.", - "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth\nconstraint." - ] - } - }, - "id": "FolderOperationError" - }, - "OrgPolicy": { - "description": "Defines a Cloud Organization `Policy` which is used to specify `Constraints`\nfor configurations of Cloud Platform resources.", - "type": "object", - "properties": { - "version": { - "format": "int32", - "description": "Version of the `Policy`. Default version is 0;", - "type": "integer" - }, - "restoreDefault": { - "description": "Restores the default behavior of the constraint; independent of\n`Constraint` type.", - "$ref": "RestoreDefault" - }, - "listPolicy": { - "description": "List of values either allowed or disallowed.", - "$ref": "ListPolicy" - }, - "etag": { - "format": "byte", - "description": "An opaque tag indicating the current version of the `Policy`, used for\nconcurrency control.\n\nWhen the `Policy` is returned from either a `GetPolicy` or a\n`ListOrgPolicy` request, this `etag` indicates the version of the current\n`Policy` to use when executing a read-modify-write loop.\n\nWhen the `Policy` is returned from a `GetEffectivePolicy` request, the\n`etag` will be unset.\n\nWhen the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value\nthat was returned from a `GetOrgPolicy` request as part of a\nread-modify-write loop for concurrency control. Not setting the `etag`in a\n`SetOrgPolicy` request will result in an unconditional write of the\n`Policy`.", - "type": "string" - }, - "constraint": { - "description": "The name of the `Constraint` the `Policy` is configuring, for example,\n`constraints/serviceuser.services`.\n\nImmutable after creation.", - "type": "string" - }, - "booleanPolicy": { - "description": "For boolean `Constraints`, whether to enforce the `Constraint` or not.", - "$ref": "BooleanPolicy" - }, - "updateTime": { - "format": "google-datetime", - "description": "The time stamp the `Policy` was previously updated. This is set by the\nserver, not specified by the caller, and represents the last time a call to\n`SetOrgPolicy` was made for that `Policy`. Any value set by the client will\nbe ignored.", - "type": "string" - } - }, - "id": "OrgPolicy" - }, - "BooleanPolicy": { - "description": "Used in `policy_type` to specify how `boolean_policy` will behave at this\nresource.", - "type": "object", - "properties": { - "enforced": { - "description": "If `true`, then the `Policy` is enforced. If `false`, then any\nconfiguration is acceptable.\n\nSuppose you have a `Constraint` `constraints/compute.disableSerialPortAccess`\nwith `constraint_default` set to `ALLOW`. A `Policy` for that\n`Constraint` exhibits the following behavior:\n - If the `Policy` at this resource has enforced set to `false`, serial\n port connection attempts will be allowed.\n - If the `Policy` at this resource has enforced set to `true`, serial\n port connection attempts will be refused.\n - If the `Policy` at this resource is `RestoreDefault`, serial port\n connection attempts will be allowed.\n - If no `Policy` is set at this resource or anywhere higher in the\n resource hierarchy, serial port connection attempts will be allowed.\n - If no `Policy` is set at this resource, but one exists higher in the\n resource hierarchy, the behavior is as if the`Policy` were set at\n this resource.\n\nThe following examples demonstrate the different possible layerings:\n\nExample 1 (nearest `Constraint` wins):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has no `Policy` set.\nThe constraint at `projects/bar` and `organizations/foo` will not be\nenforced.\n\nExample 2 (enforcement gets replaced):\n `organizations/foo` has a `Policy` with:\n {enforced: false}\n `projects/bar` has a `Policy` with:\n {enforced: true}\nThe constraint at `organizations/foo` is not enforced.\nThe constraint at `projects/bar` is enforced.\n\nExample 3 (RestoreDefault):\n `organizations/foo` has a `Policy` with:\n {enforced: true}\n `projects/bar` has a `Policy` with:\n {RestoreDefault: {}}\nThe constraint at `organizations/foo` is enforced.\nThe constraint at `projects/bar` is not enforced, because\n`constraint_default` for the `Constraint` is `ALLOW`.", - "type": "boolean" - } - }, - "id": "BooleanPolicy" - }, - "Lien": { - "type": "object", - "properties": { - "parent": { - "type": "string", - "description": "A reference to the resource this Lien is attached to. The server will\nvalidate the parent against those for which Liens are supported.\n\nExample: `projects/1234`" - }, - "createTime": { - "format": "google-datetime", - "description": "The creation time of this Lien.", - "type": "string" - }, - "name": { - "type": "string", - "description": "A system-generated unique identifier for this Lien.\n\nExample: `liens/1234abcd`" - }, - "reason": { - "description": "Concise user-visible strings indicating why an action cannot be performed\non a resource. Maximum lenth of 200 characters.\n\nExample: 'Holds production API key'", - "type": "string" - }, - "origin": { - "description": "A stable, user-visible/meaningful string identifying the origin of the\nLien, intended to be inspected programmatically. Maximum length of 200\ncharacters.\n\nExample: 'compute.googleapis.com'", - "type": "string" - }, - "restrictions": { - "description": "The types of operations which should be blocked as a result of this Lien.\nEach value should correspond to an IAM permission. The server will\nvalidate the permissions against those for which Liens are supported.\n\nAn empty list is meaningless and will be rejected.\n\nExample: ['resourcemanager.projects.delete']", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "Lien", - "description": "A Lien represents an encumbrance on the actions that can be performed on a\nresource." - }, - "Ancestor": { - "id": "Ancestor", - "description": "Identifying information for a single ancestor of a project.", - "type": "object", - "properties": { - "resourceId": { - "$ref": "ResourceId", - "description": "Resource id of the ancestor." - } - } - }, - "ListConstraint": { - "properties": { - "suggestedValue": { - "description": "Optional. The Google Cloud Console will try to default to a configuration\nthat matches the value specified in this `Constraint`.", - "type": "string" - } - }, - "id": "ListConstraint", - "description": "A `Constraint` that allows or disallows a list of string values, which are\nconfigured by an Organization's policy administrator with a `Policy`.", + "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", "type": "object" - }, - "SetOrgPolicyRequest": { - "description": "The request sent to the SetOrgPolicyRequest method.", - "type": "object", - "properties": { - "policy": { - "description": "`Policy` to set on the resource.", - "$ref": "OrgPolicy" - } - }, - "id": "SetOrgPolicyRequest" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." - }, - "updateMask": { - "format": "google-fieldmask", - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", - "type": "string" - } - }, - "id": "SetIamPolicyRequest" - }, - "Empty": { - "type": "object", - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." } }, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, "canonicalName": "Cloud Resource Manager", "auth": { "oauth2": { @@ -871,548 +871,9 @@ "title": "Google Cloud Resource Manager API", "ownerName": "Google", "resources": { - "organizations": { - "methods": { - "getOrgPolicy": { - "request": { - "$ref": "GetOrgPolicyRequest" - }, - "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "OrgPolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "description": "Name of the resource the `Policy` is set on.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}:getOrgPolicy", - "path": "v1/{+resource}:getOrgPolicy", - "id": "cloudresourcemanager.organizations.getOrgPolicy" - }, - "search": { - "response": { - "$ref": "SearchOrganizationsResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/organizations:search", - "id": "cloudresourcemanager.organizations.search", - "path": "v1/organizations:search", - "description": "Searches Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the\nresults.\n\nSearch will only return organizations on which the user has the permission\n`resourcemanager.organizations.get`", - "request": { - "$ref": "SearchOrganizationsRequest" - } - }, - "get": { - "response": { - "$ref": "Organization" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "location": "path", - "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/organizations/{organizationsId}", - "id": "cloudresourcemanager.organizations.get", - "path": "v1/{+name}", - "description": "Fetches an Organization resource identified by the specified resource name." - }, - "getEffectiveOrgPolicy": { - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "description": "The name of the resource to start computing the effective `Policy`." - } - }, - "flatPath": "v1/organizations/{organizationsId}:getEffectiveOrgPolicy", - "id": "cloudresourcemanager.organizations.getEffectiveOrgPolicy", - "path": "v1/{+resource}:getEffectiveOrgPolicy", - "request": { - "$ref": "GetEffectiveOrgPolicyRequest" - }, - "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources." - }, - "testIamPermissions": { - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}:testIamPermissions", - "id": "cloudresourcemanager.organizations.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".\n\nThere are no permissions required for making this API call." - }, - "clearOrgPolicy": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path", - "description": "Name of the resource for the `Policy` to clear." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/organizations/{organizationsId}:clearOrgPolicy", - "id": "cloudresourcemanager.organizations.clearOrgPolicy", - "path": "v1/{+resource}:clearOrgPolicy", - "description": "Clears a `Policy` from a resource.", - "request": { - "$ref": "ClearOrgPolicyRequest" - } - }, - "setOrgPolicy": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "Resource name of the resource to attach the `Policy`.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}:setOrgPolicy", - "path": "v1/{+resource}:setOrgPolicy", - "id": "cloudresourcemanager.organizations.setOrgPolicy", - "request": { - "$ref": "SetOrgPolicyRequest" - }, - "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "OrgPolicy" - } - }, - "setIamPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "cloudresourcemanager.organizations.setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.setIamPolicy` on the specified organization" - }, - "listAvailableOrgPolicyConstraints": { - "id": "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints", - "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", - "request": { - "$ref": "ListAvailableOrgPolicyConstraintsRequest" - }, - "description": "Lists `Constraints` that could be applied on the specified resource.", - "response": { - "$ref": "ListAvailableOrgPolicyConstraintsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "pattern": "^organizations/[^/]+$", - "location": "path", - "description": "Name of the resource to list `Constraints` for.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/organizations/{organizationsId}:listAvailableOrgPolicyConstraints" - }, - "listOrgPolicies": { - "path": "v1/{+resource}:listOrgPolicies", - "id": "cloudresourcemanager.organizations.listOrgPolicies", - "description": "Lists all the `Policies` set for a particular resource.", - "request": { - "$ref": "ListOrgPoliciesRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "ListOrgPoliciesResponse" - }, - "parameters": { - "resource": { - "description": "Name of the resource to list Policies for.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/organizations/{organizationsId}:listOrgPolicies" - }, - "getIamPolicy": { - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.getIamPolicy` on the specified organization", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/organizations/{organizationsId}:getIamPolicy", - "id": "cloudresourcemanager.organizations.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy" - } - } - }, - "operations": { - "methods": { - "get": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "flatPath": "v1/operations/{operationsId}", - "id": "cloudresourcemanager.operations.get", - "path": "v1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - } - } - }, - "liens": { - "methods": { - "list": { - "parameterOrder": [], - "httpMethod": "GET", - "response": { - "$ref": "ListLiensResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "The `next_page_token` value returned from a previous List request, if any.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The maximum number of items to return. This is a suggestion for the server.", - "type": "integer" - }, - "parent": { - "location": "query", - "description": "The name of the resource to list all attached Liens.\nFor example, `projects/1234`.", - "type": "string" - } - }, - "flatPath": "v1/liens", - "id": "cloudresourcemanager.liens.list", - "path": "v1/liens", - "description": "List all Liens applied to the `parent` resource.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.get`." - }, - "create": { - "response": { - "$ref": "Lien" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": {}, - "flatPath": "v1/liens", - "id": "cloudresourcemanager.liens.create", - "path": "v1/liens", - "request": { - "$ref": "Lien" - }, - "description": "Create a Lien which applies to the resource denoted by the `parent` field.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, applying to `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`.\n\nNOTE: Some resources may limit the number of Liens which may be applied." - }, - "delete": { - "flatPath": "v1/liens/{liensId}", - "path": "v1/{+name}", - "id": "cloudresourcemanager.liens.delete", - "description": "Delete a Lien by `name`.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`.", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "pattern": "^liens/.+$", - "location": "path", - "description": "The name/identifier of the Lien to delete.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ] - } - } - }, "folders": { "methods": { - "listAvailableOrgPolicyConstraints": { - "response": { - "$ref": "ListAvailableOrgPolicyConstraintsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "Name of the resource to list `Constraints` for.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/folders/{foldersId}:listAvailableOrgPolicyConstraints", - "id": "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints", - "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", - "description": "Lists `Constraints` that could be applied on the specified resource.", - "request": { - "$ref": "ListAvailableOrgPolicyConstraintsRequest" - } - }, - "listOrgPolicies": { - "flatPath": "v1/folders/{foldersId}:listOrgPolicies", - "path": "v1/{+resource}:listOrgPolicies", - "id": "cloudresourcemanager.folders.listOrgPolicies", - "request": { - "$ref": "ListOrgPoliciesRequest" - }, - "description": "Lists all the `Policies` set for a particular resource.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "ListOrgPoliciesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path", - "description": "Name of the resource to list Policies for." - } - } - }, - "getOrgPolicy": { - "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", - "request": { - "$ref": "GetOrgPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "OrgPolicy" - }, - "parameters": { - "resource": { - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path", - "description": "Name of the resource the `Policy` is set on." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/folders/{foldersId}:getOrgPolicy", - "path": "v1/{+resource}:getOrgPolicy", - "id": "cloudresourcemanager.folders.getOrgPolicy" - }, - "getEffectiveOrgPolicy": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "pattern": "^folders/[^/]+$", - "location": "path", - "description": "The name of the resource to start computing the effective `Policy`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/folders/{foldersId}:getEffectiveOrgPolicy", - "id": "cloudresourcemanager.folders.getEffectiveOrgPolicy", - "path": "v1/{+resource}:getEffectiveOrgPolicy", - "request": { - "$ref": "GetEffectiveOrgPolicyRequest" - }, - "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", - "response": { - "$ref": "OrgPolicy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST" - }, "clearOrgPolicy": { - "description": "Clears a `Policy` from a resource.", - "request": { - "$ref": "ClearOrgPolicyRequest" - }, "response": { "$ref": "Empty" }, @@ -1420,21 +881,25 @@ "resource" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "resource": { + "pattern": "^folders/[^/]+$", "location": "path", "description": "Name of the resource for the `Policy` to clear.", "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1/folders/{foldersId}:clearOrgPolicy", "id": "cloudresourcemanager.folders.clearOrgPolicy", - "path": "v1/{+resource}:clearOrgPolicy" + "path": "v1/{+resource}:clearOrgPolicy", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "description": "Clears a `Policy` from a resource." }, "setOrgPolicy": { "id": "cloudresourcemanager.folders.setOrgPolicy", @@ -1453,21 +918,189 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": { + "resource": { + "description": "Resource name of the resource to attach the `Policy`.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/folders/{foldersId}:setOrgPolicy" + }, + "listAvailableOrgPolicyConstraints": { + "response": { + "$ref": "ListAvailableOrgPolicyConstraintsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "Name of the resource to list `Constraints` for.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/folders/{foldersId}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.folders.listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + }, + "description": "Lists `Constraints` that could be applied on the specified resource." + }, + "listOrgPolicies": { + "path": "v1/{+resource}:listOrgPolicies", + "id": "cloudresourcemanager.folders.listOrgPolicies", + "description": "Lists all the `Policies` set for a particular resource.", + "request": { + "$ref": "ListOrgPoliciesRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "ListOrgPoliciesResponse" + }, "parameters": { "resource": { "pattern": "^folders/[^/]+$", "location": "path", - "description": "Resource name of the resource to attach the `Policy`.", + "description": "Name of the resource to list Policies for.", "type": "string", "required": true } }, - "flatPath": "v1/folders/{foldersId}:setOrgPolicy" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/folders/{foldersId}:listOrgPolicies" + }, + "getOrgPolicy": { + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "Name of the resource the `Policy` is set on.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/folders/{foldersId}:getOrgPolicy", + "id": "cloudresourcemanager.folders.getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", + "request": { + "$ref": "GetOrgPolicyRequest" + } + }, + "getEffectiveOrgPolicy": { + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "The name of the resource to start computing the effective `Policy`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/folders/{foldersId}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.folders.getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy", + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources." } } }, "projects": { "methods": { + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId" + ], + "parameters": { + "projectId": { + "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}", + "path": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.delete", + "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time,\nat which point the Project is no longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project." + }, + "clearOrgPolicy": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Name of the resource for the `Policy` to clear.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectsId}:clearOrgPolicy", + "id": "cloudresourcemanager.projects.clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, + "description": "Clears a `Policy` from a resource." + }, "setIamPolicy": { "response": { "$ref": "Policy" @@ -1496,10 +1129,6 @@ } }, "listAvailableOrgPolicyConstraints": { - "description": "Lists `Constraints` that could be applied on the specified resource.", - "request": { - "$ref": "ListAvailableOrgPolicyConstraintsRequest" - }, "httpMethod": "POST", "parameterOrder": [ "resource" @@ -1509,11 +1138,11 @@ }, "parameters": { "resource": { - "location": "path", "description": "Name of the resource to list `Constraints` for.", "type": "string", "required": true, - "pattern": "^projects/[^/]+$" + "pattern": "^projects/[^/]+$", + "location": "path" } }, "scopes": [ @@ -1522,44 +1151,41 @@ ], "flatPath": "v1/projects/{projectsId}:listAvailableOrgPolicyConstraints", "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", - "id": "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints" + "id": "cloudresourcemanager.projects.listAvailableOrgPolicyConstraints", + "description": "Lists `Constraints` that could be applied on the specified resource.", + "request": { + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + } }, "getIamPolicy": { - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{resource}:getIamPolicy", - "id": "cloudresourcemanager.projects.getIamPolicy", - "path": "v1/projects/{resource}:getIamPolicy", - "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project", "request": { "$ref": "GetIamPolicyRequest" }, + "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.getIamPolicy` on the project", "response": { "$ref": "Policy" }, "parameterOrder": [ "resource" ], - "httpMethod": "POST" + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{resource}:getIamPolicy", + "id": "cloudresourcemanager.projects.getIamPolicy", + "path": "v1/projects/{resource}:getIamPolicy" }, "getOrgPolicy": { - "flatPath": "v1/projects/{projectsId}:getOrgPolicy", - "id": "cloudresourcemanager.projects.getOrgPolicy", - "path": "v1/{+resource}:getOrgPolicy", - "request": { - "$ref": "GetOrgPolicyRequest" - }, - "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write.", "response": { "$ref": "OrgPolicy" }, @@ -1579,13 +1205,22 @@ "pattern": "^projects/[^/]+$", "location": "path" } - } + }, + "flatPath": "v1/projects/{projectsId}:getOrgPolicy", + "id": "cloudresourcemanager.projects.getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "request": { + "$ref": "GetOrgPolicyRequest" + }, + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write." }, "undelete": { - "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", + "id": "cloudresourcemanager.projects.undelete", + "path": "v1/projects/{projectId}:undelete", "request": { "$ref": "UndeleteProjectRequest" }, + "description": "Restores the Project identified by the specified\n`project_id` (for example, `my-project-123`).\nYou can only use this method for a Project that has a lifecycle state of\nDELETE_REQUESTED.\nAfter deletion starts, the Project cannot be restored.\n\nThe caller must have modify permissions for this Project.", "response": { "$ref": "Empty" }, @@ -1593,6 +1228,9 @@ "projectId" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "projectId": { "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", @@ -1601,90 +1239,81 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}:undelete", - "id": "cloudresourcemanager.projects.undelete", - "path": "v1/projects/{projectId}:undelete" + "flatPath": "v1/projects/{projectId}:undelete" }, "getEffectiveOrgPolicy": { - "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", - "request": { - "$ref": "GetEffectiveOrgPolicyRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], "response": { "$ref": "OrgPolicy" }, - "parameters": { - "resource": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The name of the resource to start computing the effective `Policy`.", - "type": "string", - "required": true - } - }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], + "parameters": { + "resource": { + "description": "The name of the resource to start computing the effective `Policy`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$", + "location": "path" + } + }, "flatPath": "v1/projects/{projectsId}:getEffectiveOrgPolicy", + "id": "cloudresourcemanager.projects.getEffectiveOrgPolicy", "path": "v1/{+resource}:getEffectiveOrgPolicy", - "id": "cloudresourcemanager.projects.getEffectiveOrgPolicy" + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources." }, "update": { - "flatPath": "v1/projects/{projectId}", - "path": "v1/projects/{projectId}", - "id": "cloudresourcemanager.projects.update", - "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project.", - "request": { - "$ref": "Project" - }, - "httpMethod": "PUT", - "parameterOrder": [ - "projectId" - ], "response": { "$ref": "Project" }, - "parameters": { - "projectId": { - "location": "path", - "description": "The project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true - } - }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "PUT", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] + ], + "parameters": { + "projectId": { + "description": "The project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}", + "id": "cloudresourcemanager.projects.update", + "path": "v1/projects/{projectId}", + "request": { + "$ref": "Project" + }, + "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project." }, "list": { "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list.", "httpMethod": "GET", - "parameterOrder": [], "response": { "$ref": "ListProjectsResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], + "parameterOrder": [], "parameters": { "filter": { + "location": "query", "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n+ `name`\n+ `id`\n+ \u003ccode\u003elabels.\u003cem\u003ekey\u003c/em\u003e\u003c/code\u003e where *key* is the name of a label\n\nSome examples of using labels as filters:\n\n|Filter|Description|\n|------|-----------|\n|name:how*|The project's name starts with \"how\".|\n|name:Howl|The project's name is `Howl` or `howl`.|\n|name:HOWL|Equivalent to above.|\n|NAME:howl|Equivalent to above.|\n|labels.color:*|The project has the label `color`.|\n|labels.color:red|The project's label `color` has the value `red`.|\n|labels.color:red labels.size:big|The project's label `color` has the value `red` and its label `size` has the value `big`.\n\nIf you specify a filter that has both `parent.type` and `parent.id`, then\nthe `resourcemanager.projects.list` permission is checked on the parent.\nIf the user has this permission, all projects under the parent will be\nreturned after remaining filters have been applied. If the user lacks this\npermission, then all projects for which the user has the\n`resourcemanager.projects.get` permission will be returned after remaining\nfilters have been applied. If no filter is specified, the call will return\nprojects for which the user has `resourcemanager.projects.get` permissions.\n\nOptional.", - "type": "string", - "location": "query" + "type": "string" }, "pageToken": { - "type": "string", "location": "query", - "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional." + "description": "A pagination token returned from a previous call to ListProjects\nthat indicates from where listing should continue.\n\nOptional.", + "type": "string" }, "pageSize": { "location": "query", @@ -1693,18 +1322,28 @@ "type": "integer" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1/projects", "path": "v1/projects", "id": "cloudresourcemanager.projects.list" }, "setOrgPolicy": { - "response": { - "$ref": "OrgPolicy" + "path": "v1/{+resource}:setOrgPolicy", + "id": "cloudresourcemanager.projects.setOrgPolicy", + "request": { + "$ref": "SetOrgPolicyRequest" }, + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", + "httpMethod": "POST", "parameterOrder": [ "resource" ], - "httpMethod": "POST", + "response": { + "$ref": "OrgPolicy" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], @@ -1717,33 +1356,199 @@ "required": true } }, - "flatPath": "v1/projects/{projectsId}:setOrgPolicy", - "id": "cloudresourcemanager.projects.setOrgPolicy", - "path": "v1/{+resource}:setOrgPolicy", - "request": { - "$ref": "SetOrgPolicyRequest" - }, - "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`." + "flatPath": "v1/projects/{projectsId}:setOrgPolicy" }, "create": { - "flatPath": "v1/projects", - "id": "cloudresourcemanager.projects.create", "path": "v1/projects", - "description": "Request that a new Project be created. The result is an Operation which\ncan be used to track the creation process. It is automatically deleted\nafter a few hours, so there is no need to call DeleteOperation.\n\nOur SLO permits Project creation to take up to 30 seconds at the 90th\npercentile. As of 2016-08-29, we are observing 6 seconds 50th percentile\nlatency. 95th percentile latency is around 11 seconds. We recommend\npolling at the 5th second with an exponential backoff.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.create` on the specified parent for the new\nproject.", + "id": "cloudresourcemanager.projects.create", "request": { "$ref": "Project" }, + "description": "Request that a new Project be created. The result is an Operation which\ncan be used to track the creation process. It is automatically deleted\nafter a few hours, so there is no need to call DeleteOperation.\n\nOur SLO permits Project creation to take up to 30 seconds at the 90th\npercentile. As of 2016-08-29, we are observing 6 seconds 50th percentile\nlatency. 95th percentile latency is around 11 seconds. We recommend\npolling at the 5th second with an exponential backoff.\n\nAuthorization requires the Google IAM permission\n`resourcemanager.projects.create` on the specified parent for the new\nproject.", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "Operation" }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] + ], + "parameters": {}, + "flatPath": "v1/projects" }, "listOrgPolicies": { + "response": { + "$ref": "ListOrgPoliciesResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+$", + "location": "path", + "description": "Name of the resource to list Policies for.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectsId}:listOrgPolicies", + "id": "cloudresourcemanager.projects.listOrgPolicies", + "path": "v1/{+resource}:listOrgPolicies", + "description": "Lists all the `Policies` set for a particular resource.", + "request": { + "$ref": "ListOrgPoliciesRequest" + } + }, + "get": { + "id": "cloudresourcemanager.projects.get", + "path": "v1/projects/{projectId}", + "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "response": { + "$ref": "Project" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}" + }, + "getAncestry": { + "response": { + "$ref": "GetAncestryResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/projects/{projectId}:getAncestry", + "id": "cloudresourcemanager.projects.getAncestry", + "path": "v1/projects/{projectId}:getAncestry", + "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "request": { + "$ref": "GetAncestryRequest" + } + }, + "testIamPermissions": { + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified Project.\n\nThere are no permissions required for making this API call.", + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{resource}:testIamPermissions", + "id": "cloudresourcemanager.projects.testIamPermissions", + "path": "v1/projects/{resource}:testIamPermissions" + } + } + }, + "organizations": { + "methods": { + "setOrgPolicy": { + "id": "cloudresourcemanager.organizations.setOrgPolicy", + "path": "v1/{+resource}:setOrgPolicy", + "description": "Updates the specified `Policy` on the resource. Creates a new `Policy` for\nthat `Constraint` on the resource if one does not exist.\n\nNot supplying an `etag` on the request `Policy` results in an unconditional\nwrite of the `Policy`.", + "request": { + "$ref": "SetOrgPolicyRequest" + }, + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Resource name of the resource to attach the `Policy`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}:setOrgPolicy" + }, + "setIamPolicy": { + "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.setIamPolicy` on the specified organization", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/organizations/{organizationsId}:setIamPolicy", + "id": "cloudresourcemanager.organizations.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy" + }, + "listOrgPolicies": { + "path": "v1/{+resource}:listOrgPolicies", + "id": "cloudresourcemanager.organizations.listOrgPolicies", "request": { "$ref": "ListOrgPoliciesRequest" }, @@ -1764,28 +1569,26 @@ "description": "Name of the resource to list Policies for.", "type": "string", "required": true, - "pattern": "^projects/[^/]+$", + "pattern": "^organizations/[^/]+$", "location": "path" } }, - "flatPath": "v1/projects/{projectsId}:listOrgPolicies", - "path": "v1/{+resource}:listOrgPolicies", - "id": "cloudresourcemanager.projects.listOrgPolicies" + "flatPath": "v1/organizations/{organizationsId}:listOrgPolicies" }, - "get": { - "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "listAvailableOrgPolicyConstraints": { "response": { - "$ref": "Project" + "$ref": "ListAvailableOrgPolicyConstraintsResponse" }, "parameterOrder": [ - "projectId" + "resource" ], - "httpMethod": "GET", + "httpMethod": "POST", "parameters": { - "projectId": { - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "resource": { + "description": "Name of the resource to list `Constraints` for.", "type": "string", "required": true, + "pattern": "^organizations/[^/]+$", "location": "path" } }, @@ -1793,22 +1596,49 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1/projects/{projectId}", - "id": "cloudresourcemanager.projects.get", - "path": "v1/projects/{projectId}" - }, - "getAncestry": { - "id": "cloudresourcemanager.projects.getAncestry", - "path": "v1/projects/{projectId}:getAncestry", + "flatPath": "v1/organizations/{organizationsId}:listAvailableOrgPolicyConstraints", + "id": "cloudresourcemanager.organizations.listAvailableOrgPolicyConstraints", + "path": "v1/{+resource}:listAvailableOrgPolicyConstraints", + "description": "Lists `Constraints` that could be applied on the specified resource.", "request": { - "$ref": "GetAncestryRequest" - }, - "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "$ref": "ListAvailableOrgPolicyConstraintsRequest" + } + }, + "getIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], "response": { - "$ref": "GetAncestryResponse" + "$ref": "Policy" + }, + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/organizations/{organizationsId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "cloudresourcemanager.organizations.getIamPolicy", + "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".\n\nAuthorization requires the Google IAM permission\n`resourcemanager.organizations.getIamPolicy` on the specified organization", + "request": { + "$ref": "GetIamPolicyRequest" + } + }, + "getOrgPolicy": { + "response": { + "$ref": "OrgPolicy" }, "parameterOrder": [ - "projectId" + "resource" ], "httpMethod": "POST", "scopes": [ @@ -1816,20 +1646,101 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ], "parameters": { - "projectId": { + "resource": { + "pattern": "^organizations/[^/]+$", "location": "path", - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "description": "Name of the resource the `Policy` is set on.", "type": "string", "required": true } }, - "flatPath": "v1/projects/{projectId}:getAncestry" + "flatPath": "v1/organizations/{organizationsId}:getOrgPolicy", + "id": "cloudresourcemanager.organizations.getOrgPolicy", + "path": "v1/{+resource}:getOrgPolicy", + "request": { + "$ref": "GetOrgPolicyRequest" + }, + "description": "Gets a `Policy` on a resource.\n\nIf no `Policy` is set on the resource, a `Policy` is returned with default\nvalues including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The\n`etag` value can be used with `SetOrgPolicy()` to create or update a\n`Policy` during read-modify-write." + }, + "search": { + "response": { + "$ref": "SearchOrganizationsResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": {}, + "flatPath": "v1/organizations:search", + "id": "cloudresourcemanager.organizations.search", + "path": "v1/organizations:search", + "request": { + "$ref": "SearchOrganizationsRequest" + }, + "description": "Searches Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the\nresults.\n\nSearch will only return organizations on which the user has the permission\n`resourcemanager.organizations.get`" + }, + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Organization" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/organizations/{organizationsId}", + "path": "v1/{+name}", + "id": "cloudresourcemanager.organizations.get", + "description": "Fetches an Organization resource identified by the specified resource name." + }, + "getEffectiveOrgPolicy": { + "id": "cloudresourcemanager.organizations.getEffectiveOrgPolicy", + "path": "v1/{+resource}:getEffectiveOrgPolicy", + "request": { + "$ref": "GetEffectiveOrgPolicyRequest" + }, + "description": "Gets the effective `Policy` on a resource. This is the result of merging\n`Policies` in the resource hierarchy. The returned `Policy` will not have\nan `etag`set because it is a computed `Policy` across multiple resources.", + "response": { + "$ref": "OrgPolicy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "The name of the resource to start computing the effective `Policy`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/organizations/{organizationsId}:getEffectiveOrgPolicy" }, "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".\n\nThere are no permissions required for making this API call.", "request": { "$ref": "TestIamPermissionsRequest" }, - "description": "Returns permissions that a caller has on the specified Project.\n\nThere are no permissions required for making this API call.", "response": { "$ref": "TestIamPermissionsResponse" }, @@ -1837,47 +1748,28 @@ "resource" ], "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "parameters": { - "resource": { - "type": "string", - "required": true, - "location": "path", - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field." - } - }, - "flatPath": "v1/projects/{resource}:testIamPermissions", - "id": "cloudresourcemanager.projects.testIamPermissions", - "path": "v1/projects/{resource}:testIamPermissions" - }, - "delete": { - "flatPath": "v1/projects/{projectId}", - "path": "v1/projects/{projectId}", - "id": "cloudresourcemanager.projects.delete", - "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time,\nat which point the Project is no longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project.", - "httpMethod": "DELETE", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Project ID (for example, `foo-bar-123`).\n\nRequired.", - "type": "string", - "required": true, - "location": "path" - } - } + "flatPath": "v1/organizations/{organizationsId}:testIamPermissions", + "id": "cloudresourcemanager.organizations.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions" }, "clearOrgPolicy": { + "description": "Clears a `Policy` from a resource.", + "request": { + "$ref": "ClearOrgPolicyRequest" + }, "response": { "$ref": "Empty" }, @@ -1885,30 +1777,193 @@ "resource" ], "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Name of the resource for the `Policy` to clear.", + "type": "string", + "required": true + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "flatPath": "v1/organizations/{organizationsId}:clearOrgPolicy", + "id": "cloudresourcemanager.organizations.clearOrgPolicy", + "path": "v1/{+resource}:clearOrgPolicy" + } + } + }, + "operations": { + "methods": { + "get": { + "id": "cloudresourcemanager.operations.get", + "path": "v1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "parameters": { - "resource": { - "description": "Name of the resource for the `Policy` to clear.", + "name": { + "pattern": "^operations/.+$", + "location": "path", + "description": "The name of the operation resource.", "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path" + "required": true } }, - "flatPath": "v1/projects/{projectsId}:clearOrgPolicy", - "id": "cloudresourcemanager.projects.clearOrgPolicy", - "path": "v1/{+resource}:clearOrgPolicy", - "request": { - "$ref": "ClearOrgPolicyRequest" + "flatPath": "v1/operations/{operationsId}" + } + } + }, + "liens": { + "methods": { + "delete": { + "description": "Delete a Lien by `name`.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`.", + "response": { + "$ref": "Empty" }, - "description": "Clears a `Policy` from a resource." + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "pattern": "^liens/.+$", + "location": "path", + "description": "The name/identifier of the Lien to delete.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/liens/{liensId}", + "id": "cloudresourcemanager.liens.delete", + "path": "v1/{+name}" + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListLiensResponse" + }, + "parameterOrder": [], + "parameters": { + "parent": { + "description": "The name of the resource to list all attached Liens.\nFor example, `projects/1234`.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The `next_page_token` value returned from a previous List request, if any.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of items to return. This is a suggestion for the server.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/liens", + "path": "v1/liens", + "id": "cloudresourcemanager.liens.list", + "description": "List all Liens applied to the `parent` resource.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, a Lien with a `parent` of `projects/1234` requires permission\n`resourcemanager.projects.get`." + }, + "create": { + "response": { + "$ref": "Lien" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1/liens", + "id": "cloudresourcemanager.liens.create", + "path": "v1/liens", + "description": "Create a Lien which applies to the resource denoted by the `parent` field.\n\nCallers of this method will require permission on the `parent` resource.\nFor example, applying to `projects/1234` requires permission\n`resourcemanager.projects.updateLiens`.\n\nNOTE: Some resources may limit the number of Liens which may be applied.", + "request": { + "$ref": "Lien" + } } } } }, "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, "key": { "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string", @@ -1925,75 +1980,20 @@ "type": "string" }, "pp": { - "default": "true", - "type": "boolean", "location": "query", - "description": "Pretty-print response." - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "type": "string", - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", + "description": "Pretty-print response.", "default": "true", "type": "boolean" }, - "fields": { + "oauth_token": { "location": "query", - "description": "Selector specifying which fields to include in a partial response.", + "description": "OAuth 2.0 token for the current user.", "type": "string" }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { + "bearer_token": { + "description": "OAuth bearer token.", "type": "string", - "location": "query", - "description": "JSONP" - }, - "alt": { - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] + "location": "query" } }, "version": "v1", @@ -2002,7 +2002,7 @@ "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "kind": "discovery#restDescription", "basePath": "", - "revision": "20170918", - "id": "cloudresourcemanager:v1", - "documentationLink": "https://cloud.google.com/resource-manager" + "documentationLink": "https://cloud.google.com/resource-manager", + "revision": "20170927", + "id": "cloudresourcemanager:v1" } diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index 0864ffea8..e560dab6c 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -1,8 +1,10 @@ { + "id": "cloudresourcemanager:v1beta1", + "documentationLink": "https://cloud.google.com/resource-manager", + "revision": "20170927", "discoveryVersion": "v1", "schemas": { "Binding": { - "type": "object", "properties": { "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", @@ -17,13 +19,20 @@ } }, "id": "Binding", - "description": "Associates `members` with a `role`." + "description": "Associates `members` with a `role`.", + "type": "object" }, "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", "properties": {}, - "id": "Empty" + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object" + }, + "UndeleteProjectRequest": { + "properties": {}, + "id": "UndeleteProjectRequest", + "description": "The request sent to the UndeleteProject\nmethod.", + "type": "object" }, "Organization": { "description": "The root node in the resource hierarchy to which a particular entity's\n(e.g., company) resources belong.", @@ -53,8 +62,8 @@ "type": "string" }, "owner": { - "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required.", - "$ref": "OrganizationOwner" + "$ref": "OrganizationOwner", + "description": "The owner of this Organization. The owner should be specified on\ncreation. Once set, it cannot be changed.\nThis field is required." }, "name": { "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", @@ -67,12 +76,6 @@ }, "id": "Organization" }, - "UndeleteProjectRequest": { - "description": "The request sent to the UndeleteProject\nmethod.", - "type": "object", - "properties": {}, - "id": "UndeleteProjectRequest" - }, "ProjectCreationStatus": { "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", "type": "object", @@ -94,14 +97,12 @@ "id": "ProjectCreationStatus" }, "GetIamPolicyRequest": { - "type": "object", "properties": {}, "id": "GetIamPolicyRequest", - "description": "Request message for `GetIamPolicy` method." + "description": "Request message for `GetIamPolicy` method.", + "type": "object" }, "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", "properties": { "permissions": { "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", @@ -111,7 +112,23 @@ "type": "array" } }, - "id": "TestIamPermissionsResponse" + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method.", + "type": "object" + }, + "GetAncestryResponse": { + "properties": { + "ancestor": { + "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", + "items": { + "$ref": "Ancestor" + }, + "type": "array" + } + }, + "id": "GetAncestryResponse", + "description": "Response from the GetAncestry method.", + "type": "object" }, "OrganizationOwner": { "description": "The entity that owns an Organization. The lifetime of the Organization and\nall of its descendants are bound to the `OrganizationOwner`. If the\n`OrganizationOwner` is deleted, the Organization and all its descendants will\nbe deleted.", @@ -124,25 +141,18 @@ }, "id": "OrganizationOwner" }, - "GetAncestryResponse": { - "description": "Response from the GetAncestry method.", + "AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", "type": "object", "properties": { - "ancestor": { - "description": "Ancestors are ordered from bottom to top of the resource hierarchy. The\nfirst ancestor is the project itself, followed by the project's parent,\netc.", + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", "items": { - "$ref": "Ancestor" + "type": "string" }, "type": "array" - } - }, - "id": "GetAncestryResponse" - }, - "AuditLogConfig": { - "properties": { + }, "logType": { - "description": "The log type that this config enables.", - "type": "string", "enumDescriptions": [ "Default case. Should never be this.", "Admin reads. Example: CloudIAM getIamPolicy", @@ -154,21 +164,16 @@ "ADMIN_READ", "DATA_WRITE", "DATA_READ" - ] - }, - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" + ], + "description": "The log type that this config enables.", + "type": "string" } }, - "id": "AuditLogConfig", - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", - "type": "object" + "id": "AuditLogConfig" }, "ListProjectsResponse": { + "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", + "type": "object", "properties": { "projects": { "description": "The list of Projects that matched the list filter. This list can\nbe paginated.", @@ -182,24 +187,17 @@ "type": "string" } }, - "id": "ListProjectsResponse", - "description": "A page of the response received from the\nListProjects\nmethod.\n\nA paginated response where more pages are available has\n`next_page_token` set. This token can be used in a subsequent request to\nretrieve the next request page.", - "type": "object" + "id": "ListProjectsResponse" }, "GetAncestryRequest": { - "description": "The request sent to the\nGetAncestry\nmethod.", - "type": "object", "properties": {}, - "id": "GetAncestryRequest" + "id": "GetAncestryRequest", + "description": "The request sent to the\nGetAncestry\nmethod.", + "type": "object" }, "Project": { - "id": "Project", - "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", - "type": "object", "properties": { "lifecycleState": { - "description": "The Project lifecycle state.\n\nRead-only.", - "type": "string", "enumDescriptions": [ "Unspecified state. This is only used/useful for distinguishing\nunset values.", "The normal and active state.", @@ -211,7 +209,9 @@ "ACTIVE", "DELETE_REQUESTED", "DELETE_IN_PROGRESS" - ] + ], + "description": "The Project lifecycle state.\n\nRead-only.", + "type": "string" }, "projectNumber": { "format": "int64", @@ -219,8 +219,13 @@ "type": "string" }, "parent": { - "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write.", - "$ref": "ResourceId" + "$ref": "ResourceId", + "description": "An optional reference to a parent Resource.\n\nThe only supported parent type is \"organization\". Once set, the parent\ncannot be modified. The `parent` can be set on creation or using the\n`UpdateProject` method; the end user must have the\n`resourcemanager.projects.create` permission on the parent.\n\nRead-write." + }, + "createTime": { + "format": "google-datetime", + "description": "Creation time.\n\nRead-only.", + "type": "string" }, "labels": { "additionalProperties": { @@ -229,20 +234,18 @@ "description": "The labels associated with this Project.\n\nLabel keys must be between 1 and 63 characters long and must conform\nto the following regular expression: \\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?.\n\nLabel values must be between 0 and 63 characters long and must conform\nto the regular expression (\\[a-z\\](\\[-a-z0-9\\]*\\[a-z0-9\\])?)?.\n\nNo more than 256 labels can be associated with a given resource.\n\nClients should store labels in a representation such as JSON that does not\ndepend on specific characters being disallowed.\n\nExample: \u003ccode\u003e\"environment\" : \"dev\"\u003c/code\u003e\nRead-write.", "type": "object" }, - "createTime": { - "format": "google-datetime", - "description": "Creation time.\n\nRead-only.", - "type": "string" - }, "name": { - "type": "string", - "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write." + "description": "The user-assigned display name of the Project.\nIt must be 4 to 30 characters.\nAllowed characters are: lowercase and uppercase letters, numbers,\nhyphen, single-quote, double-quote, space, and exclamation point.\n\nExample: \u003ccode\u003eMy Project\u003c/code\u003e\nRead-write.", + "type": "string" }, "projectId": { "description": "The unique, user-assigned ID of the Project.\nIt must be 6 to 30 lowercase letters, digits, or hyphens.\nIt must start with a letter.\nTrailing hyphens are prohibited.\n\nExample: \u003ccode\u003etokyo-rain-123\u003c/code\u003e\nRead-only after creation.", "type": "string" } - } + }, + "id": "Project", + "description": "A Project is a high-level Google Cloud Platform entity. It is a\ncontainer for ACLs, APIs, App Engine Apps, VMs, and other\nGoogle Cloud Platform resources.", + "type": "object" }, "TestIamPermissionsRequest": { "properties": { @@ -258,41 +261,6 @@ "description": "Request message for `TestIamPermissions` method.", "type": "object" }, - "FolderOperationError": { - "description": "A classification of the Folder Operation error.", - "type": "object", - "properties": { - "errorMessageId": { - "enumDescriptions": [ - "The error type was unrecognized or unspecified.", - "The attempted action would violate the max folder depth constraint.", - "The attempted action would violate the max child folders constraint.", - "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", - "The resource being moved has been deleted.", - "The resource a folder was being added to has been deleted.", - "The attempted action would introduce cycle in resource path.", - "The attempted action would move a folder that is already being moved.", - "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth\nconstraint." - ], - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "ACTIVE_FOLDER_HEIGHT_VIOLATION", - "MAX_CHILD_FOLDERS_VIOLATION", - "FOLDER_NAME_UNIQUENESS_VIOLATION", - "RESOURCE_DELETED_VIOLATION", - "PARENT_DELETED_VIOLATION", - "CYCLE_INTRODUCED_VIOLATION", - "FOLDER_BEING_MOVED_VIOLATION", - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" - ], - "description": "The type of operation error experienced.", - "type": "string" - } - }, - "id": "FolderOperationError" - }, "FolderOperation": { "description": "Metadata describing a long running folder operation", "type": "object", @@ -327,9 +295,12 @@ "id": "FolderOperation" }, "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", "properties": { + "etag": { + "format": "byte", + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "type": "string" + }, "version": { "format": "int32", "description": "Version of the `Policy`. The default version is 0.", @@ -348,24 +319,56 @@ "$ref": "Binding" }, "type": "array" - }, - "etag": { - "format": "byte", - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + } + }, + "id": "Policy", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object" + }, + "FolderOperationError": { + "properties": { + "errorMessageId": { + "enumDescriptions": [ + "The error type was unrecognized or unspecified.", + "The attempted action would violate the max folder depth constraint.", + "The attempted action would violate the max child folders constraint.", + "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", + "The resource being moved has been deleted.", + "The resource a folder was being added to has been deleted.", + "The attempted action would introduce cycle in resource path.", + "The attempted action would move a folder that is already being moved.", + "The folder the caller is trying to delete contains active resources.", + "The attempted action would violate the max deleted folder depth\nconstraint." + ], + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "ACTIVE_FOLDER_HEIGHT_VIOLATION", + "MAX_CHILD_FOLDERS_VIOLATION", + "FOLDER_NAME_UNIQUENESS_VIOLATION", + "RESOURCE_DELETED_VIOLATION", + "PARENT_DELETED_VIOLATION", + "CYCLE_INTRODUCED_VIOLATION", + "FOLDER_BEING_MOVED_VIOLATION", + "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", + "DELETED_FOLDER_HEIGHT_VIOLATION" + ], + "description": "The type of operation error experienced.", "type": "string" } }, - "id": "Policy" + "id": "FolderOperationError", + "description": "A classification of the Folder Operation error.", + "type": "object" }, "ResourceId": { "properties": { - "type": { - "type": "string", - "description": "Required field representing the resource type this id is for.\nAt present, the valid types are \"project\", \"folder\", and \"organization\"." - }, "id": { "description": "Required field for the type-specific id. This should correspond to the id\nused in the type-specific API's.", "type": "string" + }, + "type": { + "description": "Required field representing the resource type this id is for.\nAt present, the valid types are \"project\", \"folder\", and \"organization\".", + "type": "string" } }, "id": "ResourceId", @@ -391,20 +394,33 @@ "id": "AuditConfig" }, "Ancestor": { - "description": "Identifying information for a single ancestor of a project.", - "type": "object", "properties": { "resourceId": { - "$ref": "ResourceId", - "description": "Resource id of the ancestor." + "description": "Resource id of the ancestor.", + "$ref": "ResourceId" } }, - "id": "Ancestor" + "id": "Ancestor", + "description": "Identifying information for a single ancestor of a project.", + "type": "object" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "updateMask": { + "format": "google-fieldmask", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "type": "string" + }, + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest" }, "ListOrganizationsResponse": { - "id": "ListOrganizationsResponse", - "description": "The response returned from the `ListOrganizations` method.", - "type": "object", "properties": { "nextPageToken": { "description": "A pagination token to be used to retrieve the next page of results. If the\nresult is too large to fit within the page size specified in the request,\nthis field will be set with a token that can be used to fetch the next page\nof results. If this field is empty, it indicates that this response\ncontains the last page of results.", @@ -417,23 +433,10 @@ }, "type": "array" } - } - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." - }, - "updateMask": { - "type": "string", - "format": "google-fieldmask", - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM." - } }, - "id": "SetIamPolicyRequest" + "id": "ListOrganizationsResponse", + "description": "The response returned from the `ListOrganizations` method.", + "type": "object" } }, "icons": { @@ -445,11 +448,11 @@ "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, "https://www.googleapis.com/auth/cloud-platform.read-only": { "description": "View your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" } } } @@ -464,6 +467,57 @@ "resources": { "projects": { "methods": { + "setIamPolicy": { + "id": "cloudresourcemanager.projects.setIamPolicy", + "path": "v1beta1/projects/{resource}:setIamPolicy", + "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`; they must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{resource}:setIamPolicy" + }, + "create": { + "response": { + "$ref": "Project" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": { + "useLegacyStack": { + "description": "A safety hatch to opt out of the new reliable project creation process.", + "type": "boolean", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects", + "id": "cloudresourcemanager.projects.create", + "path": "v1beta1/projects", + "description": "Creates a Project resource.\n\nInitially, the Project resource is owned by its creator exclusively.\nThe creator can later grant permission to others to read or update the\nProject.\n\nSeveral APIs are activated automatically for the Project, including\nGoogle Cloud Storage.", + "request": { + "$ref": "Project" + } + }, "getIamPolicy": { "description": "Returns the IAM access control policy for the specified Project.\nPermission is denied if the policy or the resource does not exist.", "request": { @@ -478,10 +532,10 @@ "httpMethod": "POST", "parameters": { "resource": { + "location": "path", "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ @@ -492,7 +546,34 @@ "id": "cloudresourcemanager.projects.getIamPolicy", "path": "v1beta1/projects/{resource}:getIamPolicy" }, + "get": { + "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", + "response": { + "$ref": "Project" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "location": "path", + "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/projects/{projectId}", + "id": "cloudresourcemanager.projects.get", + "path": "v1beta1/projects/{projectId}" + }, "undelete": { + "path": "v1beta1/projects/{projectId}:undelete", + "id": "cloudresourcemanager.projects.undelete", "request": { "$ref": "UndeleteProjectRequest" }, @@ -509,46 +590,21 @@ ], "parameters": { "projectId": { - "location": "path", "description": "The project ID (for example, `foo-bar-123`).\n\nRequired.", "type": "string", - "required": true + "required": true, + "location": "path" } }, - "flatPath": "v1beta1/projects/{projectId}:undelete", - "path": "v1beta1/projects/{projectId}:undelete", - "id": "cloudresourcemanager.projects.undelete" - }, - "get": { - "flatPath": "v1beta1/projects/{projectId}", - "id": "cloudresourcemanager.projects.get", - "path": "v1beta1/projects/{projectId}", - "description": "Retrieves the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", - "response": { - "$ref": "Project" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Project ID (for example, `my-project-123`).\n\nRequired.", - "type": "string", - "required": true - } - } + "flatPath": "v1beta1/projects/{projectId}:undelete" }, "getAncestry": { + "id": "cloudresourcemanager.projects.getAncestry", + "path": "v1beta1/projects/{projectId}:getAncestry", + "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", "request": { "$ref": "GetAncestryRequest" }, - "description": "Gets a list of ancestors in the resource hierarchy for the Project\nidentified by the specified `project_id` (for example, `my-project-123`).\n\nThe caller must have read permissions for this Project.", "response": { "$ref": "GetAncestryResponse" }, @@ -556,10 +612,6 @@ "projectId" ], "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { "projectId": { "location": "path", @@ -568,21 +620,20 @@ "required": true } }, - "flatPath": "v1beta1/projects/{projectId}:getAncestry", - "id": "cloudresourcemanager.projects.getAncestry", - "path": "v1beta1/projects/{projectId}:getAncestry" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/projects/{projectId}:getAncestry" }, "update": { - "httpMethod": "PUT", - "parameterOrder": [ - "projectId" - ], "response": { "$ref": "Project" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" + "parameterOrder": [ + "projectId" ], + "httpMethod": "PUT", "parameters": { "projectId": { "location": "path", @@ -591,28 +642,31 @@ "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta1/projects/{projectId}", - "path": "v1beta1/projects/{projectId}", "id": "cloudresourcemanager.projects.update", + "path": "v1beta1/projects/{projectId}", + "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project.", "request": { "$ref": "Project" - }, - "description": "Updates the attributes of the Project identified by the specified\n`project_id` (for example, `my-project-123`).\n\nThe caller must have modify permissions for this Project." + } }, "testIamPermissions": { - "path": "v1beta1/projects/{resource}:testIamPermissions", "id": "cloudresourcemanager.projects.testIamPermissions", + "path": "v1beta1/projects/{resource}:testIamPermissions", "request": { "$ref": "TestIamPermissionsRequest" }, "description": "Returns permissions that a caller has on the specified Project.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], "response": { "$ref": "TestIamPermissionsResponse" }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" @@ -628,13 +682,13 @@ "flatPath": "v1beta1/projects/{resource}:testIamPermissions" }, "delete": { + "httpMethod": "DELETE", "response": { "$ref": "Empty" }, "parameterOrder": [ "projectId" ], - "httpMethod": "DELETE", "parameters": { "projectId": { "location": "path", @@ -647,13 +701,16 @@ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta1/projects/{projectId}", - "id": "cloudresourcemanager.projects.delete", "path": "v1beta1/projects/{projectId}", + "id": "cloudresourcemanager.projects.delete", "description": "Marks the Project identified by the specified\n`project_id` (for example, `my-project-123`) for deletion.\nThis method will only affect the Project if the following criteria are met:\n\n+ The Project does not have a billing account associated with it.\n+ The Project has a lifecycle state of\nACTIVE.\n\nThis method changes the Project's lifecycle state from\nACTIVE\nto DELETE_REQUESTED.\nThe deletion starts at an unspecified time, at which point the project is\nno longer accessible.\n\nUntil the deletion completes, you can check the lifecycle state\nchecked by retrieving the Project with GetProject,\nand the Project remains visible to ListProjects.\nHowever, you cannot update the project.\n\nAfter the deletion completes, the Project is not retrievable by\nthe GetProject and\nListProjects methods.\n\nThe caller must have modify permissions for this Project." }, "list": { - "httpMethod": "GET", + "id": "cloudresourcemanager.projects.list", + "path": "v1beta1/projects", + "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list.", "parameterOrder": [], + "httpMethod": "GET", "response": { "$ref": "ListProjectsResponse" }, @@ -679,18 +736,19 @@ "location": "query" } }, - "flatPath": "v1beta1/projects", - "path": "v1beta1/projects", - "id": "cloudresourcemanager.projects.list", - "description": "Lists Projects that are visible to the user and satisfy the\nspecified filter. This method returns Projects in an unspecified order.\nNew Projects do not necessarily appear at the end of the list." - }, + "flatPath": "v1beta1/projects" + } + } + }, + "organizations": { + "methods": { "setIamPolicy": { - "id": "cloudresourcemanager.projects.setIamPolicy", - "path": "v1beta1/projects/{resource}:setIamPolicy", + "id": "cloudresourcemanager.organizations.setIamPolicy", + "path": "v1beta1/{+resource}:setIamPolicy", "request": { "$ref": "SetIamPolicyRequest" }, - "description": "Sets the IAM access control policy for the specified Project. Replaces\nany existing policy.\n\nThe following constraints apply when using `setIamPolicy()`:\n\n+ Project does not support `allUsers` and `allAuthenticatedUsers` as\n`members` in a `Binding` of a `Policy`.\n\n+ The owner role can be granted only to `user` and `serviceAccount`.\n\n+ Service accounts can be made owners of a project directly\nwithout any restrictions. However, to be added as an owner, a user must be\ninvited via Cloud Platform console and must accept the invitation.\n\n+ A user cannot be granted the owner role using `setIamPolicy()`. The user\nmust be granted the owner role using the Cloud Platform Console and must\nexplicitly accept the invitation.\n\n+ Invitations to grant the owner role cannot be sent using\n`setIamPolicy()`; they must be sent only using the Cloud Platform Console.\n\n+ Membership changes that leave the project without any owners that have\naccepted the Terms of Service (ToS) will be rejected.\n\n+ If the project is not part of an organization, there must be at least\none owner who has accepted the Terms of Service (ToS) agreement in the\npolicy. Calling `setIamPolicy()` to remove the last ToS-accepted owner\nfrom the policy will fail. This restriction also applies to legacy\nprojects that no longer have owners who have accepted the ToS. Edits to\nIAM policies will be rejected until the lack of a ToS-accepting owner is\nrectified.\n\n+ Calling this method requires enabling the App Engine Admin API.\n\nNote: Removing service accounts from policies or changing their roles\ncan render services completely inoperable. It is important to understand\nhow the service account is being used before removing or updating its\nroles.", + "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", "response": { "$ref": "Policy" }, @@ -703,49 +761,104 @@ ], "parameters": { "resource": { + "pattern": "^organizations/[^/]+$", + "location": "path", "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/organizations/{organizationsId}:setIamPolicy" + }, + "getIamPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", "required": true, + "pattern": "^organizations/[^/]+$", "location": "path" } }, - "flatPath": "v1beta1/projects/{resource}:setIamPolicy" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v1beta1/organizations/{organizationsId}:getIamPolicy", + "path": "v1beta1/{+resource}:getIamPolicy", + "id": "cloudresourcemanager.organizations.getIamPolicy", + "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".", + "request": { + "$ref": "GetIamPolicyRequest" + } }, - "create": { + "get": { + "path": "v1beta1/{+name}", + "id": "cloudresourcemanager.organizations.get", + "description": "Fetches an Organization resource identified by the specified resource name.", + "httpMethod": "GET", "response": { - "$ref": "Project" + "$ref": "Organization" + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "name": { + "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", + "type": "string", + "required": true, + "pattern": "^organizations/[^/]+$", + "location": "path" + }, + "organizationId": { + "location": "query", + "description": "The id of the Organization resource to fetch.\nThis field is deprecated and will be removed in v1. Use name instead.", + "type": "string" + } + }, + "flatPath": "v1beta1/organizations/{organizationsId}" + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Organization" + }, + "parameters": { + "name": { + "pattern": "^organizations/[^/]+$", + "location": "path", + "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", + "type": "string", + "required": true + } }, - "parameterOrder": [], - "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "parameters": { - "useLegacyStack": { - "location": "query", - "description": "A safety hatch to opt out of the new reliable project creation process.", - "type": "boolean" - } - }, - "flatPath": "v1beta1/projects", - "id": "cloudresourcemanager.projects.create", - "path": "v1beta1/projects", + "flatPath": "v1beta1/organizations/{organizationsId}", + "path": "v1beta1/{+name}", + "id": "cloudresourcemanager.organizations.update", + "description": "Updates an Organization resource identified by the specified resource name.", "request": { - "$ref": "Project" - }, - "description": "Creates a Project resource.\n\nInitially, the Project resource is owned by its creator exclusively.\nThe creator can later grant permission to others to read or update the\nProject.\n\nSeveral APIs are activated automatically for the Project, including\nGoogle Cloud Storage." - } - } - }, - "organizations": { - "methods": { + "$ref": "Organization" + } + }, "testIamPermissions": { - "id": "cloudresourcemanager.organizations.testIamPermissions", - "path": "v1beta1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\".", "response": { "$ref": "TestIamPermissionsResponse" }, @@ -766,156 +879,46 @@ "required": true } }, - "flatPath": "v1beta1/organizations/{organizationsId}:testIamPermissions" + "flatPath": "v1beta1/organizations/{organizationsId}:testIamPermissions", + "id": "cloudresourcemanager.organizations.testIamPermissions", + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that a caller has on the specified Organization.\nThe `resource` field should be the organization's resource name,\ne.g. \"organizations/123\"." }, "list": { + "description": "Lists Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the list.", "httpMethod": "GET", "response": { "$ref": "ListOrganizationsResponse" }, "parameterOrder": [], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], "parameters": { - "filter": { - "location": "query", - "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", - "type": "string" - }, "pageToken": { + "location": "query", "description": "A pagination token returned from a previous call to `ListOrganizations`\nthat indicates from where listing should continue.\nThis field is optional.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { "format": "int32", "description": "The maximum number of Organizations to return in the response.\nThis field is optional.", "type": "integer", "location": "query" + }, + "filter": { + "location": "query", + "description": "An optional query string used to filter the Organizations to return in\nthe response. Filter rules are case-insensitive.\n\n\nOrganizations may be filtered by `owner.directoryCustomerId` or by\n`domain`, where the domain is a Google for Work domain, for example:\n\n|Filter|Description|\n|------|-----------|\n|owner.directorycustomerid:123456789|Organizations with `owner.directory_customer_id` equal to `123456789`.|\n|domain:google.com|Organizations corresponding to the domain `google.com`.|\n\nThis field is optional.", + "type": "string" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], "flatPath": "v1beta1/organizations", "path": "v1beta1/organizations", - "id": "cloudresourcemanager.organizations.list", - "description": "Lists Organization resources that are visible to the user and satisfy\nthe specified filter. This method returns Organizations in an unspecified\norder. New Organizations do not necessarily appear at the end of the list." - }, - "setIamPolicy": { - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on an Organization resource. Replaces any\nexisting policy. The `resource` field should be the organization's resource\nname, e.g. \"organizations/123\".", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/organizations/{organizationsId}:setIamPolicy", - "id": "cloudresourcemanager.organizations.setIamPolicy", - "path": "v1beta1/{+resource}:setIamPolicy" - }, - "getIamPolicy": { - "flatPath": "v1beta1/organizations/{organizationsId}:getIamPolicy", - "id": "cloudresourcemanager.organizations.getIamPolicy", - "path": "v1beta1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for an Organization resource. May be empty\nif no such policy or resource exists. The `resource` field should be the\norganization's resource name, e.g. \"organizations/123\".", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "pattern": "^organizations/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - } - }, - "get": { - "response": { - "$ref": "Organization" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The resource name of the Organization to fetch, e.g. \"organizations/1234\".", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$", - "location": "path" - }, - "organizationId": { - "type": "string", - "location": "query", - "description": "The id of the Organization resource to fetch.\nThis field is deprecated and will be removed in v1. Use name instead." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1beta1/organizations/{organizationsId}", - "id": "cloudresourcemanager.organizations.get", - "path": "v1beta1/{+name}", - "description": "Fetches an Organization resource identified by the specified resource name." - }, - "update": { - "flatPath": "v1beta1/organizations/{organizationsId}", - "path": "v1beta1/{+name}", - "id": "cloudresourcemanager.organizations.update", - "description": "Updates an Organization resource identified by the specified resource name.", - "request": { - "$ref": "Organization" - }, - "httpMethod": "PUT", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Organization" - }, - "parameters": { - "name": { - "location": "path", - "description": "Output Only. The resource name of the organization. This is the\norganization's relative path in the API. Its format is\n\"organizations/[organization_id]\". For example, \"organizations/1234\".", - "type": "string", - "required": true, - "pattern": "^organizations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "id": "cloudresourcemanager.organizations.list" } } } @@ -927,37 +930,37 @@ "location": "query" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" }, "fields": { - "type": "string", "location": "query", - "description": "Selector specifying which fields to include in a partial response." - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "callback": { - "description": "JSONP", + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", "type": "string" }, "alt": { @@ -992,29 +995,26 @@ "location": "query" }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", + "type": "boolean", "location": "query" }, "bearer_token": { + "location": "query", "description": "OAuth bearer token.", - "type": "string", - "location": "query" + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" } }, "version": "v1beta1", "baseUrl": "https://cloudresourcemanager.googleapis.com/", - "kind": "discovery#restDescription", - "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "servicePath": "", - "basePath": "", - "id": "cloudresourcemanager:v1beta1", - "revision": "20170918", - "documentationLink": "https://cloud.google.com/resource-manager" + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", + "kind": "discovery#restDescription", + "basePath": "" } diff --git a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json index da867dc9e..d7b28a5fd 100644 --- a/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json +++ b/vendor/google.golang.org/api/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json @@ -1,645 +1,15 @@ { - "resources": { - "folders": { - "methods": { - "getIamPolicy": { - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for a Folder. The returned policy may be\nempty if no such policy or resource exists. The `resource` field should\nbe the Folder's resource name, e.g. \"folders/1234\".\nThe caller must have `resourcemanager.folders.getIamPolicy` permission\non the identified folder.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "flatPath": "v2beta1/folders/{foldersId}:getIamPolicy", - "path": "v2beta1/{+resource}:getIamPolicy", - "id": "cloudresourcemanager.folders.getIamPolicy" - }, - "search": { - "request": { - "$ref": "SearchFoldersRequest" - }, - "description": "Search for folders that match specific filter criteria.\nSearch provides an eventually consistent view of the folders a user has\naccess to which meet the specified filter criteria.\n\nThis will only return folders on which the caller has the\npermission `resourcemanager.folders.get`.", - "response": { - "$ref": "SearchFoldersResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": {}, - "flatPath": "v2beta1/folders:search", - "id": "cloudresourcemanager.folders.search", - "path": "v2beta1/folders:search" - }, - "undelete": { - "request": { - "$ref": "UndeleteFolderRequest" - }, - "description": "Cancels the deletion request for a Folder. This method may only be\ncalled on a Folder in the [DELETE_REQUESTED] state.\nIn order to succeed, the Folder's parent must be in the [ACTIVE] state.\nIn addition, reintroducing the folder into the tree must not violate\nfolder naming, height and fanout constraints described in the\n[CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.undelete` permission on the\nidentified folder.", - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Folder" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The resource name of the Folder to undelete.\nMust be of the form `folders/{folder_id}`.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta1/folders/{foldersId}:undelete", - "path": "v2beta1/{+name}:undelete", - "id": "cloudresourcemanager.folders.undelete" - }, - "get": { - "parameters": { - "name": { - "pattern": "^folders/[^/]+$", - "location": "path", - "description": "The resource name of the Folder to retrieve.\nMust be of the form `folders/{folder_id}`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v2beta1/folders/{foldersId}", - "path": "v2beta1/{+name}", - "id": "cloudresourcemanager.folders.get", - "description": "Retrieves a Folder identified by the supplied resource name.\nValid Folder resource names have the format `folders/{folder_id}`\n(for example, `folders/1234`).\nThe caller must have `resourcemanager.folders.get` permission on the\nidentified folder.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Folder" - } - }, - "patch": { - "id": "cloudresourcemanager.folders.patch", - "path": "v2beta1/{+name}", - "description": "Updates a Folder, changing its display_name.\nChanges to the folder display_name will be rejected if they violate either\nthe display_name formatting rules or naming constraints described in\nthe [CreateFolder] documentation.\n+ The Folder's display name must start and end with a letter or digit,\nmay contain letters, digits, spaces, hyphens and underscores and can be\nno longer than 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?.\nThe caller must have `resourcemanager.folders.update` permission on the\nidentified folder.\n\nIf the update fails due to the unique name constraint then a\nPreconditionFailure explaining this violation will be returned\nin the Status.details field.", - "request": { - "$ref": "Folder" - }, - "response": { - "$ref": "Folder" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "PATCH", - "parameters": { - "name": { - "pattern": "^folders/[^/]+$", - "location": "path", - "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".", - "type": "string", - "required": true - }, - "updateMask": { - "location": "query", - "format": "google-fieldmask", - "description": "Fields to be updated.\nOnly the `display_name` can be updated.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders/{foldersId}" - }, - "move": { - "request": { - "$ref": "MoveFolderRequest" - }, - "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the [CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "The resource name of the Folder to move.\nMust be of the form folders/{folder_id}", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$" - } - }, - "flatPath": "v2beta1/folders/{foldersId}:move", - "id": "cloudresourcemanager.folders.move", - "path": "v2beta1/{+name}:move" - }, - "testIamPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders/{foldersId}:testIamPermissions", - "path": "v2beta1/{+resource}:testIamPermissions", - "id": "cloudresourcemanager.folders.testIamPermissions", - "description": "Returns permissions that a caller has on the specified Folder.\nThe `resource` field should be the Folder's resource name,\ne.g. \"folders/1234\".\n\nThere are no permissions required for making this API call.", - "request": { - "$ref": "TestIamPermissionsRequest" - } - }, - "delete": { - "response": { - "$ref": "Folder" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^folders/[^/]+$", - "location": "path", - "description": "the resource name of the Folder to be deleted.\nMust be of the form `folders/{folder_id}`.", - "type": "string", - "required": true - } - }, - "flatPath": "v2beta1/folders/{foldersId}", - "id": "cloudresourcemanager.folders.delete", - "path": "v2beta1/{+name}", - "description": "Requests deletion of a Folder. The Folder is moved into the\n[DELETE_REQUESTED] state immediately, and is deleted approximately 30 days\nlater. This method may only be called on an empty Folder in the [ACTIVE]\nstate, where a Folder is empty if it doesn't contain any Folders or\nProjects in the [ACTIVE] state.\nThe caller must have `resourcemanager.folders.delete` permission on the\nidentified folder." - }, - "list": { - "description": "Lists the Folders that are direct descendants of supplied parent resource.\nList provides a strongly consistent view of the Folders underneath\nthe specified parent resource.\nList returns Folders sorted based upon the (ascending) lexical ordering\nof their display_name.\nThe caller must have `resourcemanager.folders.list` permission on the\nidentified parent.", - "httpMethod": "GET", - "parameterOrder": [], - "response": { - "$ref": "ListFoldersResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "parameters": { - "showDeleted": { - "location": "query", - "description": "Controls whether Folders in the [DELETE_REQUESTED} state should\nbe returned.", - "type": "boolean" - }, - "pageToken": { - "location": "query", - "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates where this listing should continue from.\nThis field is optional.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of Folders to return in the response.\nThis field is optional.", - "type": "integer", - "location": "query" - }, - "parent": { - "location": "query", - "description": "The resource name of the Organization or Folder whose Folders are\nbeing listed.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.\nAccess to this method is controlled by checking the\n`resourcemanager.folders.list` permission on the `parent`.", - "type": "string" - } - }, - "flatPath": "v2beta1/folders", - "path": "v2beta1/folders", - "id": "cloudresourcemanager.folders.list" - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Operation" - }, - "parameters": { - "parent": { - "description": "The resource name of the new Folder's parent.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders", - "path": "v2beta1/folders", - "id": "cloudresourcemanager.folders.create", - "description": "Creates a Folder in the resource hierarchy.\nReturns an Operation which can be used to track the progress of the\nfolder creation workflow.\nUpon success the Operation.response field will be populated with the\ncreated Folder.\n\nIn order to succeed, the addition of this new Folder must not violate\nthe Folder naming, height or fanout constraints.\n+ The Folder's display_name must be distinct from all other Folder's that\nshare its parent.\n+ The addition of the Folder must not cause the active Folder hierarchy\nto exceed a height of 4. Note, the full active + deleted Folder hierarchy\nis allowed to reach a height of 8; this provides additional headroom when\nmoving folders that contain deleted folders.\n+ The addition of the Folder must not cause the total number of Folders\nunder its parent to exceed 100.\n\nIf the operation fails due to a folder constraint violation,\na PreconditionFailure explaining the violation will be returned.\nIf the failure occurs synchronously then the PreconditionFailure\nwill be returned via the Status.details field and if it occurs\nasynchronously then the PreconditionFailure will be returned\nvia the the Operation.error field.\n\nThe caller must have `resourcemanager.folders.create` permission on the\nidentified parent.", - "request": { - "$ref": "Folder" - } - }, - "setIamPolicy": { - "description": "Sets the access control policy on a Folder, replacing any existing policy.\nThe `resource` field should be the Folder's resource name, e.g.\n\"folders/1234\".\nThe caller must have `resourcemanager.folders.setIamPolicy` permission\non the identified folder.", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^folders/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta1/folders/{foldersId}:setIamPolicy", - "id": "cloudresourcemanager.folders.setIamPolicy", - "path": "v2beta1/{+resource}:setIamPolicy" - } - } - } - }, - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - } - }, - "version": "v2beta1", "baseUrl": "https://cloudresourcemanager.googleapis.com/", - "servicePath": "", - "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", "kind": "discovery#restDescription", + "description": "The Google Cloud Resource Manager API provides methods for creating, reading, and updating project metadata.", + "servicePath": "", "basePath": "", + "revision": "20170927", "documentationLink": "https://cloud.google.com/resource-manager", - "revision": "20170918", "id": "cloudresourcemanager:v2beta1", "discoveryVersion": "v1", "schemas": { - "Folder": { - "description": "A Folder in an Organization's resource hierarchy, used to\norganize that Organization's resources.", - "type": "object", - "properties": { - "lifecycleState": { - "enum": [ - "LIFECYCLE_STATE_UNSPECIFIED", - "ACTIVE", - "DELETE_REQUESTED" - ], - "description": "Output only. The lifecycle state of the folder.\nUpdates to the lifecycle_state must be performed via\n[DeleteFolder] and [UndeleteFolder].", - "type": "string", - "enumDescriptions": [ - "Unspecified state.", - "The normal and active state.", - "The folder has been marked for deletion by the user." - ] - }, - "name": { - "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\".", - "type": "string" - }, - "displayName": { - "type": "string", - "description": "The folder’s display name.\nA folder’s display name must be unique amongst its siblings, e.g.\nno two folders with the same parent can share the same display name.\nThe display name must start and end with a letter or digit, may contain\nletters, digits, spaces, hyphens and underscores and can be no longer\nthan 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?." - }, - "parent": { - "description": "The Folder’s parent's resource name.\nUpdates to the folder's parent must be performed via [MoveFolders].", - "type": "string" - }, - "createTime": { - "format": "google-datetime", - "description": "Output only. Timestamp when the Folder was created. Assigned by the server.", - "type": "string" - } - }, - "id": "Folder" - }, - "ProjectCreationStatus": { - "id": "ProjectCreationStatus", - "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", - "type": "object", - "properties": { - "ready": { - "description": "True if the project creation process is complete.", - "type": "boolean" - }, - "gettable": { - "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", - "type": "boolean" - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "Creation time of the project creation workflow." - } - } - }, - "TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsResponse" - }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" - }, - "UndeleteFolderRequest": { - "description": "The UndeleteFolder request message.", - "type": "object", - "properties": {}, - "id": "UndeleteFolderRequest" - }, - "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", - "type": "object", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logType": { - "description": "The log type that this config enables.", - "type": "string", - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ] - } - }, - "id": "AuditLogConfig" - }, - "TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "type": "object", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestIamPermissionsRequest" - }, - "FolderOperationError": { - "description": "A classification of the Folder Operation error.", - "type": "object", - "properties": { - "errorMessageId": { - "enum": [ - "ERROR_TYPE_UNSPECIFIED", - "ACTIVE_FOLDER_HEIGHT_VIOLATION", - "MAX_CHILD_FOLDERS_VIOLATION", - "FOLDER_NAME_UNIQUENESS_VIOLATION", - "RESOURCE_DELETED_VIOLATION", - "PARENT_DELETED_VIOLATION", - "CYCLE_INTRODUCED_VIOLATION", - "FOLDER_BEING_MOVED_VIOLATION", - "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", - "DELETED_FOLDER_HEIGHT_VIOLATION" - ], - "description": "The type of operation error experienced.", - "type": "string", - "enumDescriptions": [ - "The error type was unrecognized or unspecified.", - "The attempted action would violate the max folder depth constraint.", - "The attempted action would violate the max child folders constraint.", - "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", - "The resource being moved has been deleted.", - "The resource a folder was being added to has been deleted.", - "The attempted action would introduce cycle in resource path.", - "The attempted action would move a folder that is already being moved.", - "The folder the caller is trying to delete contains active resources.", - "The attempted action would violate the max deleted folder depth\nconstraint." - ] - } - }, - "id": "FolderOperationError" - }, - "FolderOperation": { - "description": "Metadata describing a long running folder operation", - "type": "object", - "properties": { - "operationType": { - "description": "The type of this operation.", - "type": "string", - "enumDescriptions": [ - "Operation type not specified.", - "A create folder operation.", - "A move folder operation." - ], - "enum": [ - "OPERATION_TYPE_UNSPECIFIED", - "CREATE", - "MOVE" - ] - }, - "sourceParent": { - "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", - "type": "string" - }, - "displayName": { - "type": "string", - "description": "The display name of the folder." - }, - "destinationParent": { - "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", - "type": "string" - } - }, - "id": "FolderOperation" - }, - "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object", - "properties": { - "etag": { - "format": "byte", - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - } - }, - "id": "Policy" - }, "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { "done": { @@ -663,15 +33,16 @@ "description": "The error result of the operation in case of failure or cancellation." }, "metadata": { + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any." + } } }, - "id": "Operation" + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." }, "AuditConfig": { "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", @@ -682,27 +53,27 @@ "type": "string" }, "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", "items": { "$ref": "AuditLogConfig" }, - "type": "array" + "type": "array", + "description": "The configuration for logging of each type of permission.\nNext ID: 4" } }, "id": "AuditConfig" }, "ListFoldersResponse": { "properties": { - "nextPageToken": { - "type": "string", - "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates from where listing should continue.\nThis field is optional." - }, "folders": { "description": "A possibly paginated list of Folders that are direct descendants of\nthe specified parent resource.", "items": { "$ref": "Folder" }, "type": "array" + }, + "nextPageToken": { + "type": "string", + "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates from where listing should continue.\nThis field is optional." } }, "id": "ListFoldersResponse", @@ -710,6 +81,7 @@ "type": "object" }, "MoveFolderRequest": { + "id": "MoveFolderRequest", "description": "The MoveFolder request message.", "type": "object", "properties": { @@ -717,33 +89,15 @@ "description": "The resource name of the Folder or Organization to reparent\nthe folder under.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.", "type": "string" } - }, - "id": "MoveFolderRequest" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "updateMask": { - "format": "google-fieldmask", - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", - "type": "string" - }, - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - } - }, - "id": "SetIamPolicyRequest" + } }, "SearchFoldersResponse": { - "id": "SearchFoldersResponse", "description": "The response message for searching folders.", "type": "object", "properties": { "nextPageToken": { - "type": "string", - "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where searching should continue.\nThis field is optional." + "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where searching should continue.\nThis field is optional.", + "type": "string" }, "folders": { "description": "A possibly paginated folder search results.\nthe specified parent resource.", @@ -752,38 +106,53 @@ }, "type": "array" } - } + }, + "id": "SearchFoldersResponse" + }, + "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + }, + "updateMask": { + "format": "google-fieldmask", + "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", + "type": "string" + } + }, + "id": "SetIamPolicyRequest" }, "Status": { + "id": "Status", "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" }, "type": "object" }, "type": "array" - }, - "code": { - "type": "integer", - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code." } - }, - "id": "Status" + } }, "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", "properties": { "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", @@ -797,12 +166,18 @@ "type": "string" } }, - "id": "Binding" + "id": "Binding", + "description": "Associates `members` with a `role`.", + "type": "object" }, "SearchFoldersRequest": { "description": "The request message for searching folders.", "type": "object", "properties": { + "pageToken": { + "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where search should continue.\nThis field is optional.", + "type": "string" + }, "pageSize": { "format": "int32", "description": "The maximum number of folders to return in the response.\nThis field is optional.", @@ -811,20 +186,243 @@ "query": { "description": "Search criteria used to select the Folders to return.\nIf no search criteria is specified then all accessible folders will be\nreturned.\n\nQuery expressions can be used to restrict results based upon displayName,\nlifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nSome example queries are:\n|Query|Description|\n|------|-----------|\n|displayName=Test*|Folders whose display name starts with \"Test\".|\n|lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.|\n|parent=folders/123|Folders whose parent is \"folders/123\".|\n|parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose\nparent is \"folders/123\".|", "type": "string" - }, - "pageToken": { - "description": "A pagination token returned from a previous call to `SearchFolders`\nthat indicates from where search should continue.\nThis field is optional.", - "type": "string" } }, "id": "SearchFoldersRequest" + }, + "ProjectCreationStatus": { + "description": "A status object which is used as the `metadata` field for the Operation\nreturned by CreateProject. It provides insight for when significant phases of\nProject creation have completed.", + "type": "object", + "properties": { + "ready": { + "description": "True if the project creation process is complete.", + "type": "boolean" + }, + "gettable": { + "description": "True if the project can be retrieved using GetProject. No other operations\non the project are guaranteed to work until the project creation is\ncomplete.", + "type": "boolean" + }, + "createTime": { + "format": "google-datetime", + "description": "Creation time of the project creation workflow.", + "type": "string" + } + }, + "id": "ProjectCreationStatus" + }, + "Folder": { + "description": "A Folder in an Organization's resource hierarchy, used to\norganize that Organization's resources.", + "type": "object", + "properties": { + "parent": { + "description": "The Folder’s parent's resource name.\nUpdates to the folder's parent must be performed via [MoveFolders].", + "type": "string" + }, + "createTime": { + "format": "google-datetime", + "description": "Output only. Timestamp when the Folder was created. Assigned by the server.", + "type": "string" + }, + "lifecycleState": { + "description": "Output only. The lifecycle state of the folder.\nUpdates to the lifecycle_state must be performed via\n[DeleteFolder] and [UndeleteFolder].", + "type": "string", + "enumDescriptions": [ + "Unspecified state.", + "The normal and active state.", + "The folder has been marked for deletion by the user." + ], + "enum": [ + "LIFECYCLE_STATE_UNSPECIFIED", + "ACTIVE", + "DELETE_REQUESTED" + ] + }, + "name": { + "type": "string", + "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\"." + }, + "displayName": { + "description": "The folder’s display name.\nA folder’s display name must be unique amongst its siblings, e.g.\nno two folders with the same parent can share the same display name.\nThe display name must start and end with a letter or digit, may contain\nletters, digits, spaces, hyphens and underscores and can be no longer\nthan 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?.", + "type": "string" + } + }, + "id": "Folder" + }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, + "TestIamPermissionsResponse": { + "properties": { + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse", + "description": "Response message for `TestIamPermissions` method.", + "type": "object" + }, + "UndeleteFolderRequest": { + "type": "object", + "properties": {}, + "id": "UndeleteFolderRequest", + "description": "The UndeleteFolder request message." + }, + "AuditLogConfig": { + "id": "AuditLogConfig", + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object", + "properties": { + "logType": { + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "description": "The log type that this config enables.", + "type": "string", + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ] + }, + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + } + } + }, + "TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsRequest" + }, + "FolderOperationError": { + "type": "object", + "properties": { + "errorMessageId": { + "description": "The type of operation error experienced.", + "type": "string", + "enumDescriptions": [ + "The error type was unrecognized or unspecified.", + "The attempted action would violate the max folder depth constraint.", + "The attempted action would violate the max child folders constraint.", + "The attempted action would violate the locally-unique folder\ndisplay_name constraint.", + "The resource being moved has been deleted.", + "The resource a folder was being added to has been deleted.", + "The attempted action would introduce cycle in resource path.", + "The attempted action would move a folder that is already being moved.", + "The folder the caller is trying to delete contains active resources.", + "The attempted action would violate the max deleted folder depth\nconstraint." + ], + "enum": [ + "ERROR_TYPE_UNSPECIFIED", + "ACTIVE_FOLDER_HEIGHT_VIOLATION", + "MAX_CHILD_FOLDERS_VIOLATION", + "FOLDER_NAME_UNIQUENESS_VIOLATION", + "RESOURCE_DELETED_VIOLATION", + "PARENT_DELETED_VIOLATION", + "CYCLE_INTRODUCED_VIOLATION", + "FOLDER_BEING_MOVED_VIOLATION", + "FOLDER_TO_DELETE_NON_EMPTY_VIOLATION", + "DELETED_FOLDER_HEIGHT_VIOLATION" + ] + } + }, + "id": "FolderOperationError", + "description": "A classification of the Folder Operation error." + }, + "FolderOperation": { + "properties": { + "destinationParent": { + "description": "The resource name of the folder or organization we are either creating\nthe folder under or moving the folder to.", + "type": "string" + }, + "operationType": { + "description": "The type of this operation.", + "type": "string", + "enumDescriptions": [ + "Operation type not specified.", + "A create folder operation.", + "A move folder operation." + ], + "enum": [ + "OPERATION_TYPE_UNSPECIFIED", + "CREATE", + "MOVE" + ] + }, + "sourceParent": { + "description": "The resource name of the folder's parent.\nOnly applicable when the operation_type is MOVE.", + "type": "string" + }, + "displayName": { + "description": "The display name of the folder.", + "type": "string" + } + }, + "id": "FolderOperation", + "description": "Metadata describing a long running folder operation", + "type": "object" + }, + "Policy": { + "properties": { + "etag": { + "format": "byte", + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" + }, + "auditConfigs": { + "items": { + "$ref": "AuditConfig" + }, + "type": "array", + "description": "Specifies cloud audit logging configuration for this policy." + }, + "bindings": { + "items": { + "$ref": "Binding" + }, + "type": "array", + "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error." + } + }, + "id": "Policy", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object" } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "canonicalName": "Cloud Resource Manager", "auth": { "oauth2": { @@ -844,5 +442,407 @@ "batchPath": "batch", "fullyEncodeReservedExpansion": true, "title": "Google Cloud Resource Manager API", - "ownerName": "Google" + "ownerName": "Google", + "resources": { + "folders": { + "methods": { + "move": { + "request": { + "$ref": "MoveFolderRequest" + }, + "description": "Moves a Folder under a new resource parent.\nReturns an Operation which can be used to track the progress of the\nfolder move workflow.\nUpon success the Operation.response field will be populated with the\nmoved Folder.\nUpon failure, a FolderOperationError categorizing the failure cause will\nbe returned - if the failure occurs synchronously then the\nFolderOperationError will be returned via the Status.details field\nand if it occurs asynchronously then the FolderOperation will be returned\nvia the the Operation.error field.\nIn addition, the Operation.metadata field will be populated with a\nFolderOperation message as an aid to stateless clients.\nFolder moves will be rejected if they violate either the naming, height\nor fanout constraints described in the [CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.move` permission on the\nfolder's current and proposed new parent.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "The resource name of the Folder to move.\nMust be of the form folders/{folder_id}" + } + }, + "flatPath": "v2beta1/folders/{foldersId}:move", + "path": "v2beta1/{+name}:move", + "id": "cloudresourcemanager.folders.move" + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified Folder.\nThe `resource` field should be the Folder's resource name,\ne.g. \"folders/1234\".\n\nThere are no permissions required for making this API call.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/folders/{foldersId}:testIamPermissions", + "id": "cloudresourcemanager.folders.testIamPermissions", + "path": "v2beta1/{+resource}:testIamPermissions" + }, + "delete": { + "description": "Requests deletion of a Folder. The Folder is moved into the\n[DELETE_REQUESTED] state immediately, and is deleted approximately 30 days\nlater. This method may only be called on an empty Folder in the [ACTIVE]\nstate, where a Folder is empty if it doesn't contain any Folders or\nProjects in the [ACTIVE] state.\nThe caller must have `resourcemanager.folders.delete` permission on the\nidentified folder.", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Folder" + }, + "httpMethod": "DELETE", + "parameters": { + "name": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "the resource name of the Folder to be deleted.\nMust be of the form `folders/{folder_id}`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/folders/{foldersId}", + "id": "cloudresourcemanager.folders.delete", + "path": "v2beta1/{+name}" + }, + "list": { + "flatPath": "v2beta1/folders", + "path": "v2beta1/folders", + "id": "cloudresourcemanager.folders.list", + "description": "Lists the Folders that are direct descendants of supplied parent resource.\nList provides a strongly consistent view of the Folders underneath\nthe specified parent resource.\nList returns Folders sorted based upon the (ascending) lexical ordering\nof their display_name.\nThe caller must have `resourcemanager.folders.list` permission on the\nidentified parent.", + "httpMethod": "GET", + "response": { + "$ref": "ListFoldersResponse" + }, + "parameterOrder": [], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of Folders to return in the response.\nThis field is optional.", + "type": "integer" + }, + "parent": { + "description": "The resource name of the Organization or Folder whose Folders are\nbeing listed.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.\nAccess to this method is controlled by checking the\n`resourcemanager.folders.list` permission on the `parent`.", + "type": "string", + "location": "query" + }, + "showDeleted": { + "description": "Controls whether Folders in the [DELETE_REQUESTED} state should\nbe returned.", + "type": "boolean", + "location": "query" + }, + "pageToken": { + "description": "A pagination token returned from a previous call to `ListFolders`\nthat indicates where this listing should continue from.\nThis field is optional.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, + "create": { + "id": "cloudresourcemanager.folders.create", + "path": "v2beta1/folders", + "description": "Creates a Folder in the resource hierarchy.\nReturns an Operation which can be used to track the progress of the\nfolder creation workflow.\nUpon success the Operation.response field will be populated with the\ncreated Folder.\n\nIn order to succeed, the addition of this new Folder must not violate\nthe Folder naming, height or fanout constraints.\n+ The Folder's display_name must be distinct from all other Folder's that\nshare its parent.\n+ The addition of the Folder must not cause the active Folder hierarchy\nto exceed a height of 4. Note, the full active + deleted Folder hierarchy\nis allowed to reach a height of 8; this provides additional headroom when\nmoving folders that contain deleted folders.\n+ The addition of the Folder must not cause the total number of Folders\nunder its parent to exceed 100.\n\nIf the operation fails due to a folder constraint violation,\na PreconditionFailure explaining the violation will be returned.\nIf the failure occurs synchronously then the PreconditionFailure\nwill be returned via the Status.details field and if it occurs\nasynchronously then the PreconditionFailure will be returned\nvia the the Operation.error field.\n\nThe caller must have `resourcemanager.folders.create` permission on the\nidentified parent.", + "request": { + "$ref": "Folder" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": { + "parent": { + "location": "query", + "description": "The resource name of the new Folder's parent.\nMust be of the form `folders/{folder_id}` or `organizations/{org_id}`.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/folders" + }, + "setIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta1/folders/{foldersId}:setIamPolicy", + "id": "cloudresourcemanager.folders.setIamPolicy", + "path": "v2beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on a Folder, replacing any existing policy.\nThe `resource` field should be the Folder's resource name, e.g.\n\"folders/1234\".\nThe caller must have `resourcemanager.folders.setIamPolicy` permission\non the identified folder." + }, + "getIamPolicy": { + "id": "cloudresourcemanager.folders.getIamPolicy", + "path": "v2beta1/{+resource}:getIamPolicy", + "description": "Gets the access control policy for a Folder. The returned policy may be\nempty if no such policy or resource exists. The `resource` field should\nbe the Folder's resource name, e.g. \"folders/1234\".\nThe caller must have `resourcemanager.folders.getIamPolicy` permission\non the identified folder.", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v2beta1/folders/{foldersId}:getIamPolicy" + }, + "search": { + "response": { + "$ref": "SearchFoldersResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": {}, + "flatPath": "v2beta1/folders:search", + "id": "cloudresourcemanager.folders.search", + "path": "v2beta1/folders:search", + "request": { + "$ref": "SearchFoldersRequest" + }, + "description": "Search for folders that match specific filter criteria.\nSearch provides an eventually consistent view of the folders a user has\naccess to which meet the specified filter criteria.\n\nThis will only return folders on which the caller has the\npermission `resourcemanager.folders.get`." + }, + "patch": { + "httpMethod": "PATCH", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Folder" + }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path", + "description": "Output only. The resource name of the Folder.\nIts format is `folders/{folder_id}`, for example: \"folders/1234\"." + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Fields to be updated.\nOnly the `display_name` can be updated.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta1/folders/{foldersId}", + "path": "v2beta1/{+name}", + "id": "cloudresourcemanager.folders.patch", + "description": "Updates a Folder, changing its display_name.\nChanges to the folder display_name will be rejected if they violate either\nthe display_name formatting rules or naming constraints described in\nthe [CreateFolder] documentation.\n+ The Folder's display name must start and end with a letter or digit,\nmay contain letters, digits, spaces, hyphens and underscores and can be\nno longer than 30 characters. This is captured by the regular expression:\n[\\p{L}\\p{N}]({\\p{L}\\p{N}_- ]{0,28}[\\p{L}\\p{N}])?.\nThe caller must have `resourcemanager.folders.update` permission on the\nidentified folder.\n\nIf the update fails due to the unique name constraint then a\nPreconditionFailure explaining this violation will be returned\nin the Status.details field.", + "request": { + "$ref": "Folder" + } + }, + "get": { + "description": "Retrieves a Folder identified by the supplied resource name.\nValid Folder resource names have the format `folders/{folder_id}`\n(for example, `folders/1234`).\nThe caller must have `resourcemanager.folders.get` permission on the\nidentified folder.", + "response": { + "$ref": "Folder" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The resource name of the Folder to retrieve.\nMust be of the form `folders/{folder_id}`.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "flatPath": "v2beta1/folders/{foldersId}", + "id": "cloudresourcemanager.folders.get", + "path": "v2beta1/{+name}" + }, + "undelete": { + "response": { + "$ref": "Folder" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The resource name of the Folder to undelete.\nMust be of the form `folders/{folder_id}`.", + "type": "string", + "required": true, + "pattern": "^folders/[^/]+$" + } + }, + "flatPath": "v2beta1/folders/{foldersId}:undelete", + "id": "cloudresourcemanager.folders.undelete", + "path": "v2beta1/{+name}:undelete", + "request": { + "$ref": "UndeleteFolderRequest" + }, + "description": "Cancels the deletion request for a Folder. This method may only be\ncalled on a Folder in the [DELETE_REQUESTED] state.\nIn order to succeed, the Folder's parent must be in the [ACTIVE] state.\nIn addition, reintroducing the folder into the tree must not violate\nfolder naming, height and fanout constraints described in the\n[CreateFolder] documentation.\nThe caller must have `resourcemanager.folders.undelete` permission on the\nidentified folder." + } + } + } + }, + "parameters": { + "quotaUser": { + "type": "string", + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "$.xgafv": { + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + } + }, + "version": "v2beta1" } diff --git a/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json index 7bd72ec9b..c26db730d 100644 --- a/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json +++ b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-api.json @@ -1,5 +1,4 @@ { - "batchPath": "batch", "fullyEncodeReservedExpansion": true, "title": "Cloud Tasks API", "ownerName": "Google", @@ -9,16 +8,13 @@ "locations": { "methods": { "get": { - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}", - "id": "cloudtasks.projects.locations.get", - "path": "v2beta2/{+name}", "description": "Get information about a location.", - "response": { - "$ref": "Location" - }, "parameterOrder": [ "name" ], + "response": { + "$ref": "Location" + }, "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -31,27 +27,25 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "location": "path" } - } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}", + "id": "cloudtasks.projects.locations.get", + "path": "v2beta2/{+name}" }, "list": { + "description": "Lists information about the supported locations for this service.", + "httpMethod": "GET", "response": { "$ref": "ListLocationsResponse" }, "parameterOrder": [ "name" ], - "httpMethod": "GET", "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, "filter": { - "location": "query", "description": "The standard list filter.", - "type": "string" + "type": "string", + "location": "query" }, "pageToken": { "description": "The standard list page token.", @@ -59,111 +53,31 @@ "location": "query" }, "name": { + "pattern": "^projects/[^/]+$", "location": "path", "description": "The resource that owns the locations collection, if applicable.", "type": "string", - "required": true, - "pattern": "^projects/[^/]+$" + "required": true + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v2beta2/projects/{projectsId}/locations", - "id": "cloudtasks.projects.locations.list", "path": "v2beta2/{+name}/locations", - "description": "Lists information about the supported locations for this service." + "id": "cloudtasks.projects.locations.list" } }, "resources": { "queues": { "methods": { - "resume": { - "request": { - "$ref": "ResumeQueueRequest" - }, - "description": "Resume a queue.\n\nThis method resumes a queue after it has been\nQueue.QueueState.PAUSED or Queue.QueueState.DISABLED. The state of\na queue is stored in Queue.queue_state; after calling this method it\nwill be set to Queue.QueueState.RUNNING.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).\n\nWARNING: Resuming many high-QPS queues at the same time can\nlead to target overloading. If you are resuming high-QPS\nqueues, follow the 500/50/5 pattern described in\n[Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).", - "response": { - "$ref": "Queue" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "path", - "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" - } - }, - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:resume", - "id": "cloudtasks.projects.locations.queues.resume", - "path": "v2beta2/{+name}:resume" - }, - "getIamPolicy": { - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.getIamPolicy`", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:getIamPolicy", - "id": "cloudtasks.projects.locations.queues.getIamPolicy", - "path": "v2beta2/{+resource}:getIamPolicy" - }, - "get": { - "description": "Gets a queue.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Queue" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required.\n\nThe resource name of the queue. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", - "path": "v2beta2/{+name}", - "id": "cloudtasks.projects.locations.queues.get" - }, "patch": { - "request": { - "$ref": "Queue" - }, - "description": "Updates a queue.\n\nThis method creates the queue if it does not exist and updates\nthe queue if it does exist.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", "response": { "$ref": "Queue" }, @@ -191,13 +105,42 @@ }, "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", "id": "cloudtasks.projects.locations.queues.patch", - "path": "v2beta2/{+name}" + "path": "v2beta2/{+name}", + "request": { + "$ref": "Queue" + }, + "description": "Updates a queue.\n\nThis method creates the queue if it does not exist and updates\nthe queue if it does exist.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy)." + }, + "get": { + "response": { + "$ref": "Queue" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path", + "description": "Required.\n\nThe resource name of the queue. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", + "id": "cloudtasks.projects.locations.queues.get", + "path": "v2beta2/{+name}", + "description": "Gets a queue." }, "purge": { + "description": "Purges a queue by deleting all of its tasks.\n\nAll tasks created before this method is called are permanently deleted.\n\nPurge operations can take up to one minute to take effect. Tasks\nmight be dispatched before the purge takes effect. A purge is irreversible.", "request": { "$ref": "PurgeQueueRequest" }, - "description": "Purges a queue by deleting all of its tasks.\n\nAll tasks created before this method is called are permanently deleted.\n\nPurge operations can take up to one minute to take effect. Tasks\nmight be dispatched before the purge takes effect. A purge is irreversible.", "httpMethod": "POST", "parameterOrder": [ "name" @@ -205,24 +148,26 @@ "response": { "$ref": "Queue" }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path", + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "parameters": { - "name": { - "location": "path", - "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" - } - }, "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:purge", "path": "v2beta2/{+name}:purge", "id": "cloudtasks.projects.locations.queues.purge" }, "testIamPermissions": { - "description": "Returns permissions that a caller has on a Queue.\nIf the resource does not exist, this will return an empty set of\npermissions, not a google.rpc.Code.NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "path": "v2beta2/{+resource}:testIamPermissions", + "id": "cloudtasks.projects.locations.queues.testIamPermissions", + "description": "Returns permissions that a caller has on a Queue.\nIf the resource does not exist, this will return an empty set of\npermissions, not a google.rpc.Code.NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.\n", "request": { "$ref": "TestIamPermissionsRequest" }, @@ -245,25 +190,20 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:testIamPermissions", - "path": "v2beta2/{+resource}:testIamPermissions", - "id": "cloudtasks.projects.locations.queues.testIamPermissions" + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:testIamPermissions" }, "pause": { - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:pause", - "id": "cloudtasks.projects.locations.queues.pause", - "path": "v2beta2/{+name}:pause", "description": "Pauses the queue.\n\nIf a queue is paused then the system will stop executing the\ntasks in the queue until it is resumed via\nCloudTasks.ResumeQueue. Tasks can still be added when the\nqueue is paused. The state of the queue is stored in\nQueue.queue_state; if paused it will be set to\nQueue.QueueState.PAUSED.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", "request": { "$ref": "PauseQueueRequest" }, - "response": { - "$ref": "Queue" - }, + "httpMethod": "POST", "parameterOrder": [ "name" ], - "httpMethod": "POST", + "response": { + "$ref": "Queue" + }, "parameters": { "name": { "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", @@ -275,55 +215,43 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ] + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:pause", + "path": "v2beta2/{+name}:pause", + "id": "cloudtasks.projects.locations.queues.pause" }, "delete": { + "httpMethod": "DELETE", "response": { "$ref": "Empty" }, "parameterOrder": [ "name" ], - "httpMethod": "DELETE", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", "location": "path", "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" + "required": true } }, "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}", - "id": "cloudtasks.projects.locations.queues.delete", "path": "v2beta2/{+name}", + "id": "cloudtasks.projects.locations.queues.delete", "description": "Deletes a queue.\n\nThis command will delete the queue even if it has tasks in it.\n\nNote: If you delete a queue, a queue with the same name can't be created\nfor 7 days.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy)." }, "list": { - "response": { - "$ref": "ListQueuesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { - "filter": { - "location": "query", - "description": "`filter` can be used to specify a subset of queues. Any Queue\nfield can be used as a filter and several operators as supported.\nFor example: `\u003c=, \u003c, \u003e=, \u003e, !=, =, :`. The filter syntax is the same as\ndescribed in\n[Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).\n\nSample filter \"app_engine_http_target: *\".\n\nNote that using filters might cause fewer queues than the\nrequested_page size to be returned.", - "type": "string" - }, "pageToken": { - "location": "query", "format": "byte", "description": "A token identifying the page of results to return.\n\nTo request the first page results, page_token must be empty. To\nrequest the next page of results, page_token must be the value of\nListQueuesResponse.next_page_token returned from the previous\ncall to CloudTasks.ListQueues method. It is an error to\nswitch the value of ListQueuesRequest.filter while iterating\nthrough pages.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "format": "int32", @@ -332,23 +260,66 @@ "location": "query" }, "parent": { - "location": "path", "description": "Required.\n\nThe location name.\nFor example: `projects/PROJECT_ID/locations/LOCATION_ID`", "type": "string", "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + }, + "filter": { + "location": "query", + "description": "`filter` can be used to specify a subset of queues. Any Queue\nfield can be used as a filter and several operators as supported.\nFor example: `\u003c=, \u003c, \u003e=, \u003e, !=, =, :`. The filter syntax is the same as\ndescribed in\n[Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).\n\nSample filter \"app_engine_http_target: *\".\n\nNote that using filters might cause fewer queues than the\nrequested_page size to be returned.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", + "path": "v2beta2/{+parent}/queues", + "id": "cloudtasks.projects.locations.queues.list", + "description": "Lists queues.\n\nQueues are returned in lexicographical order.", + "httpMethod": "GET", + "response": { + "$ref": "ListQueuesResponse" + }, + "parameterOrder": [ + "parent" + ] + }, + "create": { + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", + "id": "cloudtasks.projects.locations.queues.create", + "path": "v2beta2/{+parent}/queues", + "request": { + "$ref": "Queue" + }, + "description": "Creates a queue.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", + "response": { + "$ref": "Queue" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required.\n\nThe location name in which the queue will be created.\nFor example: `projects/PROJECT_ID/locations/LOCATION_ID`\n\nThe list of allowed locations can be obtained by calling Cloud\nTasks' implementation of\ngoogle.cloud.location.Locations.ListLocations.", + "type": "string", + "required": true, "pattern": "^projects/[^/]+/locations/[^/]+$" } - }, - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", - "id": "cloudtasks.projects.locations.queues.list", - "path": "v2beta2/{+parent}/queues", - "description": "Lists queues.\n\nQueues are returned in lexicographical order." + } }, "setIamPolicy": { "request": { "$ref": "SetIamPolicyRequest" }, - "description": "Sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.setIamPolicy`", + "description": "Sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.setIamPolicy`\n", "response": { "$ref": "Policy" }, @@ -361,77 +332,148 @@ ], "parameters": { "resource": { - "location": "path", "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", "type": "string", "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" } }, "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:setIamPolicy", "id": "cloudtasks.projects.locations.queues.setIamPolicy", "path": "v2beta2/{+resource}:setIamPolicy" }, - "create": { - "description": "Creates a queue.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).", - "request": { - "$ref": "Queue" - }, + "resume": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], "response": { "$ref": "Queue" }, - "parameterOrder": [ - "parent" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" ], - "httpMethod": "POST", "parameters": { - "parent": { - "description": "Required.\n\nThe location name in which the queue will be created.\nFor example: `projects/PROJECT_ID/locations/LOCATION_ID`\n\nThe list of allowed locations can be obtained by calling Cloud\nTasks' implementation of\ngoogle.cloud.location.Locations.ListLocations.", + "name": { + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`", "type": "string", "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path" + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:resume", + "path": "v2beta2/{+name}:resume", + "id": "cloudtasks.projects.locations.queues.resume", + "request": { + "$ref": "ResumeQueueRequest" + }, + "description": "Resume a queue.\n\nThis method resumes a queue after it has been\nQueue.QueueState.PAUSED or Queue.QueueState.DISABLED. The state of\na queue is stored in Queue.queue_state; after calling this method it\nwill be set to Queue.QueueState.RUNNING.\n\nWARNING: This method is only available to whitelisted\nusers. Using this method carries some risk. Read\n[Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)\ncarefully and then sign up for\n[whitelist access to this method](https://goo.gl/Fe5mUy).\n\nWARNING: Resuming many high-QPS queues at the same time can\nlead to target overloading. If you are resuming high-QPS\nqueues, follow the 500/50/5 pattern described in\n[Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf)." + }, + "getIamPolicy": { + "path": "v2beta2/{+resource}:getIamPolicy", + "id": "cloudtasks.projects.locations.queues.getIamPolicy", + "description": "Gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.getIamPolicy`\n", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", "location": "path" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues", - "id": "cloudtasks.projects.locations.queues.create", - "path": "v2beta2/{+parent}/queues" + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:getIamPolicy" } }, "resources": { "tasks": { "methods": { - "list": { - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks", - "id": "cloudtasks.projects.locations.queues.tasks.list", - "path": "v2beta2/{+parent}/tasks", - "description": "Lists the tasks in a queue.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default due to performance\nconsiderations; ListTasksRequest.response_view controls the\nsubset of information which is returned.", + "delete": { + "httpMethod": "DELETE", "response": { - "$ref": "ListTasksResponse" + "$ref": "Empty" }, "parameterOrder": [ - "parent" + "name" ], - "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "pageSize": { - "format": "int32", - "description": "Requested page size. Fewer tasks than requested might be returned.\n\nThe maximum page size is 1000. If unspecified, the page size will\nbe the maximum. Fewer tasks than requested might be returned,\neven if more tasks exist; use\nListTasksResponse.next_page_token to determine if more tasks\nexist.", - "type": "integer", - "location": "query" - }, - "parent": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path", + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true + } + }, + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", + "path": "v2beta2/{+name}", + "id": "cloudtasks.projects.locations.queues.tasks.delete", + "description": "Deletes a task.\n\nA task can be deleted if it is scheduled or dispatched. A task\ncannot be deleted if it has completed successfully or permanently\nfailed." + }, + "pull": { + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks:pull", + "path": "v2beta2/{+name}/tasks:pull", + "id": "cloudtasks.projects.locations.queues.tasks.pull", + "request": { + "$ref": "PullTasksRequest" + }, + "description": "Pulls tasks from a pull queue and acquires a lease on them for a\nspecified PullTasksRequest.lease_duration.\n\nThis method is invoked by the lease holder to obtain the\nlease. The lease holder must acknowledge the task via\nCloudTasks.AcknowledgeTask after they have performed the work\nassociated with the task.\n\nThe payload is intended to store data that the lease holder needs\nto perform the work associated with the task. To return the\npayloads in the PullTasksResponse, set\nPullTasksRequest.response_view to Task.View.FULL.", + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "PullTasksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { "location": "path", "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", "type": "string", "required": true, "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$" + } + } + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListTasksResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path", + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`" }, "pageToken": { "format": "byte", @@ -453,66 +495,55 @@ ], "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", "type": "string" - } - } - }, - "create": { - "request": { - "$ref": "CreateTaskRequest" - }, - "description": "Creates a task and adds it to a queue.\n\nTo add multiple tasks at the same time, use\n[HTTP batching](/storage/docs/json_api/v1/how-tos/batch)\nor the batching documentation for your client library, for example\nhttps://developers.google.com/api-client-library/python/guide/batch.\n\nTasks cannot be updated after creation; there is no UpdateTask command.", - "response": { - "$ref": "Task" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\nThe queue must already exist.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", - "location": "path" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested page size. Fewer tasks than requested might be returned.\n\nThe maximum page size is 1000. If unspecified, the page size will\nbe the maximum. Fewer tasks than requested might be returned,\neven if more tasks exist; use\nListTasksResponse.next_page_token to determine if more tasks\nexist.", + "type": "integer" } }, "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks", + "path": "v2beta2/{+parent}/tasks", + "id": "cloudtasks.projects.locations.queues.tasks.list", + "description": "Lists the tasks in a queue.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default due to performance\nconsiderations; ListTasksRequest.response_view controls the\nsubset of information which is returned." + }, + "create": { + "path": "v2beta2/{+parent}/tasks", "id": "cloudtasks.projects.locations.queues.tasks.create", - "path": "v2beta2/{+parent}/tasks" + "description": "Creates a task and adds it to a queue.\n\nTo add multiple tasks at the same time, use\n[HTTP batching](/storage/docs/json_api/v1/how-tos/batch)\nor the batching documentation for your client library, for example\nhttps://developers.google.com/api-client-library/python/guide/batch.\n\nTasks cannot be updated after creation; there is no UpdateTask command.", + "request": { + "$ref": "CreateTaskRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Task" + }, + "parameters": { + "parent": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", + "location": "path", + "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\nThe queue must already exist." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks" }, "run": { + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:run", + "path": "v2beta2/{+name}:run", + "id": "cloudtasks.projects.locations.queues.tasks.run", + "description": "Forces a task to run now.\n\nThis command is meant to be used for manual debugging. For\nexample, CloudTasks.RunTask can be used to retry a failed\ntask after a fix has been made or to manually force a task to be\ndispatched now.\n\nWhen this method is called, Cloud Tasks will dispatch the task to its\ntarget, even if the queue is Queue.QueueState.PAUSED.\n\nThe dispatched task is returned. That is, the task that is returned\ncontains the Task.task_status after the task is dispatched but\nbefore the task is received by its target.\n\nIf Cloud Tasks receives a successful response from the task's\nhandler, then the task will be deleted; otherwise the task's\nTask.schedule_time will be reset to the time that\nCloudTasks.RunTask was called plus the retry delay specified\nin the queue and task's RetryConfig.\n\nCloudTasks.RunTask returns google.rpc.Code.NOT_FOUND when\nit is called on a task that has already succeeded or permanently\nfailed. google.rpc.Code.FAILED_PRECONDITION is returned when\nCloudTasks.RunTask is called on task that is dispatched or\nalready running.", "request": { "$ref": "RunTaskRequest" }, - "description": "Forces a task to run now.\n\nThis command is meant to be used for manual debugging. For\nexample, CloudTasks.RunTask can be used to retry a failed\ntask after a fix has been made or to manually force a task to be\ndispatched now.\n\nWhen this method is called, Cloud Tasks will dispatch the task to its\ntarget, even if the queue is Queue.QueueState.PAUSED.\n\nThe dispatched task is returned. That is, the task that is returned\ncontains the Task.task_status after the task is dispatched but\nbefore the task is received by its target.\n\nIf Cloud Tasks receives a successful response from the task's\nhandler, then the task will be deleted; otherwise the task's\nTask.schedule_time will be reset to the time that\nCloudTasks.RunTask was called plus the retry delay specified\nin the queue and task's RetryConfig.\n\nCloudTasks.RunTask returns google.rpc.Code.NOT_FOUND when\nit is called on a task that has already succeeded or permanently\nfailed. google.rpc.Code.FAILED_PRECONDITION is returned when\nCloudTasks.RunTask is called on task that is dispatched or\nalready running.", - "response": { - "$ref": "Task" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:run", - "id": "cloudtasks.projects.locations.queues.tasks.run", - "path": "v2beta2/{+name}:run" - }, - "cancelLease": { "httpMethod": "POST", "parameterOrder": [ "name" @@ -520,38 +551,6 @@ "response": { "$ref": "Task" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:cancelLease", - "path": "v2beta2/{+name}:cancelLease", - "id": "cloudtasks.projects.locations.queues.tasks.cancelLease", - "request": { - "$ref": "CancelLeaseRequest" - }, - "description": "Cancel a pull task's lease.\n\nThe lease holder can use this method to cancel a task's lease\nby setting Task.schedule_time to now. This will make the task\navailable to be leased to the next caller of CloudTasks.PullTasks." - }, - "acknowledge": { - "description": "Acknowledges a pull task.\n\nThe lease holder, that is, the entity that received this task in\na PullTasksResponse, must call this method to indicate that\nthe work associated with the task has finished.\n\nThe lease holder must acknowledge a task within the\nPullTasksRequest.lease_duration or the lease will expire and\nthe task will become ready to be returned in a different\nPullTasksResponse. After the task is acknowledged, it will\nnot be returned by a later CloudTasks.PullTasks,\nCloudTasks.GetTask, or CloudTasks.ListTasks.", - "request": { - "$ref": "AcknowledgeTaskRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", "parameters": { "name": { "location": "path", @@ -563,12 +562,68 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "cancelLease": { + "description": "Cancel a pull task's lease.\n\nThe lease holder can use this method to cancel a task's lease\nby setting Task.schedule_time to now. This will make the task\navailable to be leased to the next caller of CloudTasks.PullTasks.", + "request": { + "$ref": "CancelLeaseRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" ], - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:acknowledge", + "response": { + "$ref": "Task" + }, + "parameters": { + "name": { + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:cancelLease", + "path": "v2beta2/{+name}:cancelLease", + "id": "cloudtasks.projects.locations.queues.tasks.cancelLease" + }, + "acknowledge": { + "path": "v2beta2/{+name}:acknowledge", "id": "cloudtasks.projects.locations.queues.tasks.acknowledge", - "path": "v2beta2/{+name}:acknowledge" + "description": "Acknowledges a pull task.\n\nThe lease holder, that is, the entity that received this task in\na PullTasksResponse, must call this method to indicate that\nthe work associated with the task has finished.\n\nThe lease holder must acknowledge a task within the\nPullTasksRequest.lease_duration or the lease will expire and\nthe task will become ready to be returned in a different\nPullTasksResponse. After the task is acknowledged, it will\nnot be returned by a later CloudTasks.PullTasks,\nCloudTasks.GetTask, or CloudTasks.ListTasks.", + "request": { + "$ref": "AcknowledgeTaskRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "parameters": { + "name": { + "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:acknowledge" }, "renewLease": { + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:renewLease", + "id": "cloudtasks.projects.locations.queues.tasks.renewLease", + "path": "v2beta2/{+name}:renewLease", "description": "Renew the current lease of a pull task.\n\nThe lease holder can use this method to extend the lease by a new\nduration, starting from now. The new task lease will be\nreturned in Task.schedule_time.", "request": { "$ref": "RenewLeaseRequest" @@ -582,39 +637,39 @@ "httpMethod": "POST", "parameters": { "name": { + "location": "path", "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", "type": "string", "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", - "location": "path" + "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:renewLease", - "id": "cloudtasks.projects.locations.queues.tasks.renewLease", - "path": "v2beta2/{+name}:renewLease" + ] }, "get": { + "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", + "path": "v2beta2/{+name}", + "id": "cloudtasks.projects.locations.queues.tasks.get", "description": "Gets a task.", - "response": { - "$ref": "Task" - }, + "httpMethod": "GET", "parameterOrder": [ "name" ], - "httpMethod": "GET", + "response": { + "$ref": "Task" + }, "parameters": { "responseView": { - "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", - "type": "string", "location": "query", "enum": [ "VIEW_UNSPECIFIED", "BASIC", "FULL" - ] + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string" }, "name": { "location": "path", @@ -626,63 +681,7 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", - "id": "cloudtasks.projects.locations.queues.tasks.get", - "path": "v2beta2/{+name}" - }, - "delete": { - "description": "Deletes a task.\n\nA task can be deleted if it is scheduled or dispatched. A task\ncannot be deleted if it has completed successfully or permanently\nfailed.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "Required.\n\nThe task name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$", - "location": "path" - } - }, - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}", - "id": "cloudtasks.projects.locations.queues.tasks.delete", - "path": "v2beta2/{+name}" - }, - "pull": { - "description": "Pulls tasks from a pull queue and acquires a lease on them for a\nspecified PullTasksRequest.lease_duration.\n\nThis method is invoked by the lease holder to obtain the\nlease. The lease holder must acknowledge the task via\nCloudTasks.AcknowledgeTask after they have performed the work\nassociated with the task.\n\nThe payload is intended to store data that the lease holder needs\nto perform the work associated with the task. To return the\npayloads in the PullTasksResponse, set\nPullTasksRequest.response_view to Task.View.FULL.", - "request": { - "$ref": "PullTasksRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "PullTasksResponse" - }, - "parameters": { - "name": { - "description": "Required.\n\nThe queue name. For example:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks:pull", - "path": "v2beta2/{+name}/tasks:pull", - "id": "cloudtasks.projects.locations.queues.tasks.pull" + ] } } } @@ -694,6 +693,27 @@ } }, "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, "$.xgafv": { "enumDescriptions": [ "v1 error format", @@ -708,30 +728,30 @@ "type": "string" }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "alt": { - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", "description": "Data format for response.", "default": "json", "enum": [ "json", "media", "proto" - ] + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" }, "access_token": { + "location": "query", "description": "OAuth access token.", - "type": "string", - "location": "query" + "type": "string" }, "key": { "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", @@ -739,9 +759,9 @@ "location": "query" }, "quotaUser": { - "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "description": "Pretty-print response.", @@ -755,44 +775,75 @@ "type": "string" }, "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "description": "OAuth 2.0 token for the current user.", "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" } }, "version": "v2beta2", "baseUrl": "https://cloudtasks.googleapis.com/", "kind": "discovery#restDescription", - "description": "Manages the execution of large numbers of distributed requests. Cloud Tasks is in Alpha.", "servicePath": "", + "description": "Manages the execution of large numbers of distributed requests. Cloud Tasks is in Alpha.", "basePath": "", - "documentationLink": "https://cloud.google.com/cloud-tasks/", - "revision": "20170918", "id": "cloudtasks:v2beta2", + "documentationLink": "https://cloud.google.com/cloud-tasks/", + "revision": "20170926", "discoveryVersion": "v1", "version_module": true, "schemas": { + "CancelLeaseRequest": { + "description": "Request message for canceling a lease using\nCloudTasks.CancelLease.", + "type": "object", + "properties": { + "scheduleTime": { + "format": "google-datetime", + "description": "Required.\n\nThe task's current schedule time, available in the Task.schedule_time\nreturned in PullTasksResponse.tasks or\nCloudTasks.RenewLease. This restriction is to check that\nthe caller is canceling the correct task.", + "type": "string" + }, + "responseView": { + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string", + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ] + } + }, + "id": "CancelLeaseRequest" + }, + "AttemptStatus": { + "description": "The status of a task attempt.", + "type": "object", + "properties": { + "responseStatus": { + "description": "Output only.\n\nThe response from the target for this attempt.\n\nIf the task has not been attempted or the task is currently running\nthen the response status is google.rpc.Code.UNKNOWN.", + "$ref": "Status" + }, + "responseTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that this attempt response was received.\n\n`response_time` will be truncated to the nearest microsecond.", + "type": "string" + }, + "scheduleTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that this attempt was scheduled.\n\n`schedule_time` will be truncated to the nearest microsecond.", + "type": "string" + }, + "dispatchTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that this attempt was dispatched.\n\n`dispatch_time` will be truncated to the nearest microsecond.", + "type": "string" + } + }, + "id": "AttemptStatus" + }, "PurgeQueueRequest": { "description": "Request message for CloudTasks.PurgeQueue.", "type": "object", @@ -805,45 +856,14 @@ "properties": {}, "id": "PauseQueueRequest" }, - "Task": { - "description": "A unit of scheduled work.", + "RunTaskRequest": { + "id": "RunTaskRequest", + "description": "Request message for forcing a task to run now using\nCloudTasks.RunTask.", "type": "object", "properties": { - "scheduleTime": { - "format": "google-datetime", - "description": "The time when the task is scheduled to be attempted.\n\nFor pull queues, this is the time when the task is available to\nbe leased; if a task is currently leased, this is the time when\nthe current lease expires, that is, the time that the task was\nleased plus the PullTasksRequest.lease_duration.\n\nFor App Engine queues, this is when the task will be attempted or retried.\n\n`schedule_time` will be truncated to the nearest microsecond.", - "type": "string" - }, - "createTime": { - "format": "google-datetime", - "description": "Output only.\n\nThe time that the task was created.\n\n`create_time` will be truncated to the nearest second.", - "type": "string" - }, - "pullMessage": { - "$ref": "PullMessage", - "description": "Pull message contains data that should be used by the caller of\nCloudTasks.PullTasks to process the task. Can be set only if\nQueue.pull_target is set.\n\nA pull task is a task that has PullMessage set." - }, - "name": { - "description": "The task name.\n\nThe task name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n* `TASK_ID` contain uppercase and lowercase letters, numbers,\n underscores, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d_-]+`. The maximum length is 500\n characters.\n\nOptionally caller-specified in CreateTaskRequest.", - "type": "string" - }, - "appEngineTaskTarget": { - "$ref": "AppEngineTaskTarget", - "description": "Deprecated. Use Task.app_engine_http_request." - }, - "taskStatus": { - "description": "Output only.\n\nTask status.", - "$ref": "TaskStatus" - }, - "appEngineHttpRequest": { - "$ref": "AppEngineHttpRequest", - "description": "App Engine HTTP request that is sent to the task's target. Can be set\nonly if Queue.app_engine_http_target is set.\n\nAn App Engine task is a task that has AppEngineHttpRequest set." - }, - "pullTaskTarget": { - "$ref": "PullTaskTarget", - "description": "Deprecated. Use Task.pull_message." - }, - "view": { + "responseView": { + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string", "enumDescriptions": [ "Unspecified. Defaults to BASIC.", "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", @@ -853,12 +873,9 @@ "VIEW_UNSPECIFIED", "BASIC", "FULL" - ], - "description": "Output only.\n\nThe view specifies which subset of the Task has been\nreturned.", - "type": "string" + ] } - }, - "id": "Task" + } }, "PullTasksResponse": { "description": "Response message for pulling tasks using CloudTasks.PullTasks.", @@ -874,11 +891,46 @@ }, "id": "PullTasksResponse" }, - "RunTaskRequest": { - "description": "Request message for forcing a task to run now using\nCloudTasks.RunTask.", + "Task": { + "id": "Task", + "description": "A unit of scheduled work.", "type": "object", "properties": { - "responseView": { + "pullMessage": { + "$ref": "PullMessage", + "description": "Pull message contains data that should be used by the caller of\nCloudTasks.PullTasks to process the task. Can be set only if\nQueue.pull_target is set.\n\nA pull task is a task that has PullMessage set." + }, + "createTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe time that the task was created.\n\n`create_time` will be truncated to the nearest second.", + "type": "string" + }, + "scheduleTime": { + "format": "google-datetime", + "description": "The time when the task is scheduled to be attempted.\n\nFor pull queues, this is the time when the task is available to\nbe leased; if a task is currently leased, this is the time when\nthe current lease expires, that is, the time that the task was\nleased plus the PullTasksRequest.lease_duration.\n\nFor App Engine queues, this is when the task will be attempted or retried.\n\n`schedule_time` will be truncated to the nearest microsecond.", + "type": "string" + }, + "name": { + "description": "The task name.\n\nThe task name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n* `TASK_ID` contain uppercase and lowercase letters, numbers,\n underscores, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d_-]+`. The maximum length is 500\n characters.\n\nOptionally caller-specified in CreateTaskRequest.", + "type": "string" + }, + "appEngineTaskTarget": { + "$ref": "AppEngineTaskTarget", + "description": "Deprecated. Use Task.app_engine_http_request." + }, + "taskStatus": { + "$ref": "TaskStatus", + "description": "Output only.\n\nTask status." + }, + "pullTaskTarget": { + "description": "Deprecated. Use Task.pull_message.", + "$ref": "PullTaskTarget" + }, + "appEngineHttpRequest": { + "description": "App Engine HTTP request that is sent to the task's target. Can be set\nonly if Queue.app_engine_http_target is set.\n\nAn App Engine task is a task that has AppEngineHttpRequest set.", + "$ref": "AppEngineHttpRequest" + }, + "view": { "enumDescriptions": [ "Unspecified. Defaults to BASIC.", "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", @@ -889,35 +941,32 @@ "BASIC", "FULL" ], - "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "description": "Output only.\n\nThe view specifies which subset of the Task has been\nreturned.", "type": "string" } - }, - "id": "RunTaskRequest" + } }, "PullMessage": { + "id": "PullMessage", "description": "The pull message contains data that can be used by the caller of\nCloudTasks.PullTasks to process the task.\n\nThis proto can only be used for tasks in a queue which has\nQueue.pull_target set.", "type": "object", "properties": { - "tag": { - "format": "byte", - "description": "A meta-data tag for this task.\n\nThis value is used by CloudTasks.PullTasks calls when\nPullTasksRequest.filter is `tag=\u003ctag\u003e`.\n\nThe tag must be less than 500 bytes.", - "type": "string" - }, "payload": { "format": "byte", "description": "A data payload consumed by the task worker to execute the task.", "type": "string" + }, + "tag": { + "format": "byte", + "description": "A meta-data tag for this task.\n\nThis value is used by CloudTasks.PullTasks calls when\nPullTasksRequest.filter is `tag=\u003ctag\u003e`.\n\nThe tag must be less than 500 bytes.", + "type": "string" } - }, - "id": "PullMessage" + } }, "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", @@ -925,7 +974,8 @@ }, "type": "object" }, - "type": "array" + "type": "array", + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use." }, "code": { "format": "int32", @@ -937,18 +987,19 @@ "type": "string" } }, - "id": "Status" + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." }, "Binding": { "description": "Associates `members` with a `role`.", "type": "object", "properties": { "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n" }, "role": { "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", @@ -958,35 +1009,35 @@ "id": "Binding" }, "RenewLeaseRequest": { - "description": "Request message for renewing a lease using CloudTasks.RenewLease.", - "type": "object", "properties": { - "scheduleTime": { - "format": "google-datetime", - "description": "Required.\n\nThe task's current schedule time, available in the Task.schedule_time\nreturned in PullTasksResponse.tasks or\nCloudTasks.RenewLease. This restriction is to check that\nthe caller is renewing the correct task.", - "type": "string" - }, "newLeaseDuration": { "format": "google-duration", "description": "Required.\n\nThe desired new lease duration, starting from now.\n\n\nThe maximum lease duration is 1 week.\n`new_lease_duration` will be truncated to the nearest second.", "type": "string" }, "responseView": { - "enumDescriptions": [ - "Unspecified. Defaults to BASIC.", - "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", - "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." - ], "enum": [ "VIEW_UNSPECIFIED", "BASIC", "FULL" ], "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string", + "enumDescriptions": [ + "Unspecified. Defaults to BASIC.", + "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", + "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." + ] + }, + "scheduleTime": { + "format": "google-datetime", + "description": "Required.\n\nThe task's current schedule time, available in the Task.schedule_time\nreturned in PullTasksResponse.tasks or\nCloudTasks.RenewLease. This restriction is to check that\nthe caller is renewing the correct task.", "type": "string" } }, - "id": "RenewLeaseRequest" + "id": "RenewLeaseRequest", + "description": "Request message for renewing a lease using CloudTasks.RenewLease.", + "type": "object" }, "TaskStatus": { "description": "Status of the task.", @@ -1002,8 +1053,8 @@ "type": "string" }, "firstAttemptStatus": { - "description": "Output only.\n\nThe status of the task's first attempt.\n\nOnly AttemptStatus.dispatch_time will be set.\nThe other AttemptStatus information is not retained by Cloud Tasks.\n\nThis field is not calculated for\n[pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).", - "$ref": "AttemptStatus" + "$ref": "AttemptStatus", + "description": "Output only.\n\nThe status of the task's first attempt.\n\nOnly AttemptStatus.dispatch_time will be set.\nThe other AttemptStatus information is not retained by Cloud Tasks.\n\nThis field is not calculated for\n[pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget)." }, "attemptResponseCount": { "format": "int64", @@ -1014,22 +1065,21 @@ "id": "TaskStatus" }, "AppEngineHttpRequest": { - "description": "App Engine HTTP request.\n\nThe message defines the HTTP request that is sent to an App Engine app when\nthe task is dispatched.\n\nThis proto can only be used for tasks in a queue which has\nQueue.app_engine_http_target set.\n\nUsing this type of target requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`\n\nThe task will be delivered to the App Engine app which belongs to the same\nproject as the queue. For more information, see\n[How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed)\nand how routing is affected by\n[dispatch files](/appengine/docs/python/config/dispatchref).\n\nThe AppEngineRouting used to construct the URL that the task is\ndelivered to can be set at the queue-level or task-level:\n\n* If set, AppEngineHttpTarget.app_engine_routing_override is used for\n all tasks in the queue, no matter what the setting is for the\n task-level app_engine_routing.\n\n\nThe `url` that the task will be sent to is:\n\n* `url =` AppEngineRouting.host `+` AppEngineHttpRequest.relative_url\n\nThe task will be sent to a task handler by an HTTP\nrequest using the specified AppEngineHttpRequest.http_method (for example\nPOST, HTTP GET, etc). The task attempt has succeeded if the task handler\nreturns an HTTP response code in the range [200 - 299]. Error 503 is\nconsidered an App Engine system error instead of an application error.\nRequests returning error 503 will be retried regardless of retry\nconfiguration and not counted against retry counts.\nAny other response code or a failure to receive a response before the\ndeadline is a failed attempt.", + "description": "App Engine HTTP request.\n\nThe message defines the HTTP request that is sent to an App Engine app when\nthe task is dispatched.\n\nThis proto can only be used for tasks in a queue which has\nQueue.app_engine_http_target set.\n\nUsing AppEngineHttpRequest requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`\n\nThe task will be delivered to the App Engine app which belongs to the same\nproject as the queue. For more information, see\n[How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed)\nand how routing is affected by\n[dispatch files](/appengine/docs/python/config/dispatchref).\n\nThe AppEngineRouting used to construct the URL that the task is\ndelivered to can be set at the queue-level or task-level:\n\n* If set, AppEngineHttpTarget.app_engine_routing_override is used for\n all tasks in the queue, no matter what the setting is for the\n task-level app_engine_routing.\n\n\nThe `url` that the task will be sent to is:\n\n* `url =` AppEngineRouting.host `+` AppEngineHttpRequest.relative_url\n\nThe task will be sent to a task handler by an HTTP\nrequest using the specified AppEngineHttpRequest.http_method (for example\nPOST, HTTP GET, etc). The task attempt has succeeded if the task handler\nreturns an HTTP response code in the range [200 - 299]. Error 503 is\nconsidered an App Engine system error instead of an application error.\nRequests returning error 503 will be retried regardless of retry\nconfiguration and not counted against retry counts.\nAny other response code or a failure to receive a response before the\ndeadline is a failed attempt.", "type": "object", "properties": { + "headers": { + "additionalProperties": { + "type": "string" + }, + "description": "HTTP request headers.\n\nThis map contains the header field names and values.\nHeaders can be set when the\n[task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\nRepeated headers are not supported but a header value can contain commas.\n\nCloud Tasks sets some headers to default values:\n\n* `User-Agent`: By default, this header is\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"`.\n This header can be modified, but Cloud Tasks will append\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"` to the\n modified `User-Agent`.\n\nIf the task has an AppEngineHttpRequest.payload, Cloud Tasks sets the\nfollowing headers:\n\n* `Content-Type`: By default, the `Content-Type` header is set to\n `\"application/octet-stream\"`. The default can be overridden by explictly\n setting `Content-Type` to a particular media type when the\n [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\n For example, `Content-Type` can be set to `\"application/json\"`.\n* `Content-Length`: This is computed by Cloud Tasks. This value is\n output only. It cannot be changed.\n\nThe headers below cannot be set or overridden:\n\n* `Host`\n* `X-Google-*`\n* `X-AppEngine-*`\n\nIn addition, some App Engine headers, which contain\ntask-specific information, are also be sent to the task handler; see\n[request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).", + "type": "object" + }, "appEngineRouting": { "$ref": "AppEngineRouting", "description": "Task-level setting for App Engine routing.\n\nIf set, AppEngineHttpTarget.app_engine_routing_override is used for\nall tasks in the queue, no matter what the setting is for the\ntask-level app_engine_routing." }, "httpMethod": { - "enumDescriptions": [ - "HTTP method unspecified", - "HTTP Post", - "HTTP Get", - "HTTP Head", - "HTTP Put", - "HTTP Delete" - ], "enum": [ "HTTP_METHOD_UNSPECIFIED", "POST", @@ -1039,7 +1089,15 @@ "DELETE" ], "description": "The HTTP method to use for the request. The default is POST.\n\nThe app's request handler for the task's target URL must be able to handle\nHTTP requests with this http_method, otherwise the task attempt will fail\nwith error code 405 \"Method Not Allowed\" because \"the method specified in\nthe Request-Line is not allowed for the resource identified by the\nRequest-URI\". See\n[Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)\nand the documentation for the request handlers in the language your app is\nwritten in e.g.\n[python RequestHandler](/appengine/docs/python/tools/webapp/requesthandlerclass).", - "type": "string" + "type": "string", + "enumDescriptions": [ + "HTTP method unspecified", + "HTTP Post", + "HTTP Get", + "HTTP Head", + "HTTP Put", + "HTTP Delete" + ] }, "payload": { "format": "byte", @@ -1049,34 +1107,10 @@ "relativeUrl": { "description": "The relative URL.\n\nThe relative URL must begin with \"/\" and must be a valid HTTP relative URL.\nIt can contain a path, query string arguments, and `#` fragments.\nIf the relative URL is empty, then the root path \"/\" will be used.\nNo spaces are allowed, and the maximum length allowed is 2083 characters.", "type": "string" - }, - "headers": { - "description": "HTTP request headers.\n\nThis map contains the header field names and values.\nHeaders can be set when the\n[task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\nRepeated headers are not supported but a header value can contain commas.\n\nCloud Tasks sets some headers to default values:\n\n* `User-Agent`: By default, this header is\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"`.\n This header can be modified, but Cloud Tasks will append\n `\"AppEngine-Google; (+http://code.google.com/appengine)\"` to the\n modified `User-Agent`.\n\nIf the task has an AppEngineHttpRequest.payload, Cloud Tasks sets the\nfollowing headers:\n\n* `Content-Type`: By default, the `Content-Type` header is set to\n `\"application/octet-stream\"`. The default can be overridden by explictly\n setting `Content-Type` to a particular media type when the\n [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).\n For example, `Content-Type` can be set to `\"application/json\"`.\n* `Content-Length`: This is computed by Cloud Tasks. This value is\n output only. It cannot be changed.\n\nThe headers below cannot be set or overridden:\n\n* `Host`\n* `X-Google-*`\n* `X-AppEngine-*`\n\nIn addition, some App Engine headers, which contain\ntask-specific information, are also be sent to the task handler; see\n[request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).", - "type": "object", - "additionalProperties": { - "type": "string" - } } }, "id": "AppEngineHttpRequest" }, - "PullTaskTarget": { - "description": "Deprecated. Use PullMessage.", - "type": "object", - "properties": { - "payload": { - "format": "byte", - "description": "Deprecated. Use PullMessage.payload.", - "type": "string" - }, - "tag": { - "format": "byte", - "description": "Deprecated. Use PullMessage.tag.", - "type": "string" - } - }, - "id": "PullTaskTarget" - }, "AppEngineQueueConfig": { "description": "Deprecated. Use AppEngineTarget.", "type": "object", @@ -1088,11 +1122,22 @@ }, "id": "AppEngineQueueConfig" }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", + "PullTaskTarget": { + "description": "Deprecated. Use PullMessage.", "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" + "properties": { + "tag": { + "format": "byte", + "description": "Deprecated. Use PullMessage.tag.", + "type": "string" + }, + "payload": { + "format": "byte", + "description": "Deprecated. Use PullMessage.payload.", + "type": "string" + } + }, + "id": "PullTaskTarget" }, "TestIamPermissionsResponse": { "description": "Response message for `TestIamPermissions` method.", @@ -1108,19 +1153,25 @@ }, "id": "TestIamPermissionsResponse" }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, "RetryConfig": { "description": "Retry config.\n\nThese settings determine retry behavior.\n\nIf a task does not complete successfully, meaning that an\nacknowledgement is not received from the handler before the\n[deadline](/appengine/docs/python/taskqueue/push/#the_task_deadline),\nthen it will be retried with exponential backoff according to the\nsettings in RetryConfig.", "type": "object", "properties": { - "unlimitedAttempts": { - "description": "If true, then the number of attempts is unlimited.", - "type": "boolean" - }, "taskAgeLimit": { "format": "google-duration", "description": "If positive, task_age_limit specifies the time limit for retrying a failed\ntask, measured from when the task was first run. If specified with\nRetryConfig.max_attempts, the task will be retried until both\nlimits are reached.\n\nIf zero, then the task age is unlimited. This field is zero by default.\n\n`task_age_limit` will be truncated to the nearest second.", "type": "string" }, + "unlimitedAttempts": { + "description": "If true, then the number of attempts is unlimited.", + "type": "boolean" + }, "minBackoff": { "format": "google-duration", "description": "The minimum amount of time to wait before retrying a task after\nit fails.\n\n* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),\n this field is 0.1 seconds by default.\n* For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this\n field is output only and always 0.\n\n`min_backoff` will be truncated to the nearest second.", @@ -1131,15 +1182,15 @@ "description": "The maximum amount of time to wait before retrying a task after\nit fails. The default is 1 hour.\n\n* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),\n this field is 1 hour by default.\n* For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this field\n is output only and always 0.\n\n`max_backoff` will be truncated to the nearest second.", "type": "string" }, + "maxAttempts": { + "type": "integer", + "format": "int32", + "description": "The maximum number of attempts for a task.\n\nCloud Tasks will attempt the task `max_attempts` times (that\nis, if the first attempt fails, then there will be\n`max_attempts - 1` retries). Must be \u003e 0." + }, "maxDoublings": { "format": "int32", "description": "The maximum number of times that the interval between failed task\nretries will be doubled before the increase becomes constant. The\nconstant is: 2**(max_doublings - 1) *\nRetryConfig.min_backoff.\n\n* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),\n this field is 16 by default.\n* For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this field\n is output only and always 0.", "type": "integer" - }, - "maxAttempts": { - "format": "int32", - "description": "The maximum number of attempts for a task.\n\nCloud Tasks will attempt the task `max_attempts` times (that\nis, if the first attempt fails, then there will be\n`max_attempts - 1` retries). Must be \u003e 0.", - "type": "integer" } }, "id": "RetryConfig" @@ -1151,7 +1202,6 @@ "id": "PullTarget" }, "ThrottleConfig": { - "description": "Throttle config.\n\nThese settings determine the throttling behavior.", "type": "object", "properties": { "maxOutstandingTasks": { @@ -1165,27 +1215,28 @@ "type": "number" }, "maxBurstSize": { + "type": "integer", "format": "int32", - "description": "Output only.\n\nThe max burst size limits how fast the queue is processed when\nmany tasks are in the queue and the rate is high. This field\nallows the queue to have a high rate so processing starts shortly\nafter a task is enqueued, but still limits resource usage when\nmany tasks are enqueued in a short period of time.\n\n* For App Engine queues, if\n ThrottleConfig.max_tasks_dispatched_per_second is 1, this\n field is 10; otherwise this field is\n ThrottleConfig.max_tasks_dispatched_per_second / 5.\n* For pull queues, this field is output only and always 10,000.\n\nNote: For App Engine queues that were created through\n`queue.yaml/xml`, `max_burst_size` might not have the same\nsettings as specified above; CloudTasks.UpdateQueue can be\nused to set `max_burst_size` only to the values specified above.\n\nThis field has the same meaning as\n[bucket_size in queue.yaml](/appengine/docs/standard/python/config/queueref#bucket_size).", - "type": "integer" + "description": "Output only.\n\nThe max burst size limits how fast the queue is processed when\nmany tasks are in the queue and the rate is high. This field\nallows the queue to have a high rate so processing starts shortly\nafter a task is enqueued, but still limits resource usage when\nmany tasks are enqueued in a short period of time.\n\n* For App Engine queues, if\n ThrottleConfig.max_tasks_dispatched_per_second is 1, this\n field is 10; otherwise this field is\n ThrottleConfig.max_tasks_dispatched_per_second / 5.\n* For pull queues, this field is output only and always 10,000.\n\nNote: For App Engine queues that were created through\n`queue.yaml/xml`, `max_burst_size` might not have the same\nsettings as specified above; CloudTasks.UpdateQueue can be\nused to set `max_burst_size` only to the values specified above.\n\nThis field has the same meaning as\n[bucket_size in queue.yaml](/appengine/docs/standard/python/config/queueref#bucket_size)." } }, - "id": "ThrottleConfig" + "id": "ThrottleConfig", + "description": "Throttle config.\n\nThese settings determine the throttling behavior." }, "ResumeQueueRequest": { - "description": "Request message for CloudTasks.ResumeQueue.", "type": "object", "properties": {}, - "id": "ResumeQueueRequest" + "id": "ResumeQueueRequest", + "description": "Request message for CloudTasks.ResumeQueue." }, "ListTasksResponse": { "description": "Response message for listing tasks using CloudTasks.ListTasks.", "type": "object", "properties": { "nextPageToken": { + "type": "string", "format": "byte", - "description": "A token to retrieve next page of results.\n\nTo return the next page of results, call\nCloudTasks.ListTasks with this value as the\nListTasksRequest.page_token.\n\nIf the next_page_token is empty, there are no more results.", - "type": "string" + "description": "A token to retrieve next page of results.\n\nTo return the next page of results, call\nCloudTasks.ListTasks with this value as the\nListTasksRequest.page_token.\n\nIf the next_page_token is empty, there are no more results." }, "tasks": { "description": "The list of tasks.", @@ -1198,16 +1249,9 @@ "id": "ListTasksResponse" }, "CreateTaskRequest": { - "description": "Request message for CloudTasks.CreateTask.", "type": "object", "properties": { - "task": { - "description": "Required.\n\nThe task to add.\n\nTask names have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.\nThe user can optionally specify a name for the task in\nTask.name. If a name is not specified then the system will\ngenerate a random unique task id, which will be returned in the\nresponse's Task.name.\n\nExplicitly specifying a Task.name enables task\nde-duplication. If a task's name is identical to the name of an\nexisting task or a task that was deleted or completed within the\nlast ~10 days then the call to CloudTasks.CreateTask will\nfail with google.rpc.Code.ALREADY_EXISTS. Because there is an\nextra lookup cost to identify duplicate task names, these\nCloudTasks.CreateTask calls have significantly increased\nlatency. Using hashed strings for the task id or for the prefix\nof the task id is recommended. Choosing task ids that are\nsequential or have sequential prefixes, for example using a\ntimestamp, causes an increase in latency and error rates in all\ntask commands. The infrastructure relies on an approximately\nuniform distribution of task ids to store and serve tasks\nefficiently.\n\nIf Task.schedule_time is not set or is in the past then Cloud\nTasks will set it to the current time.", - "$ref": "Task" - }, "responseView": { - "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", - "type": "string", "enumDescriptions": [ "Unspecified. Defaults to BASIC.", "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", @@ -1217,29 +1261,64 @@ "VIEW_UNSPECIFIED", "BASIC", "FULL" - ] + ], + "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", + "type": "string" + }, + "task": { + "$ref": "Task", + "description": "Required.\n\nThe task to add.\n\nTask names have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.\nThe user can optionally specify a name for the task in\nTask.name. If a name is not specified then the system will\ngenerate a random unique task id, which will be returned in the\nresponse's Task.name.\n\nExplicitly specifying a Task.name enables task\nde-duplication. If a task's name is identical to the name of an\nexisting task or a task that was deleted or completed within the\nlast ~10 days then the call to CloudTasks.CreateTask will\nfail with google.rpc.Code.ALREADY_EXISTS. Because there is an\nextra lookup cost to identify duplicate task names, these\nCloudTasks.CreateTask calls have significantly increased\nlatency. Using hashed strings for the task id or for the prefix\nof the task id is recommended. Choosing task ids that are\nsequential or have sequential prefixes, for example using a\ntimestamp, causes an increase in latency and error rates in all\ntask commands. The infrastructure relies on an approximately\nuniform distribution of task ids to store and serve tasks\nefficiently.\n\nIf Task.schedule_time is not set or is in the past then Cloud\nTasks will set it to the current time." } }, - "id": "CreateTaskRequest" - }, - "PullQueueConfig": { - "description": "Deprecated. Use PullTarget.", - "type": "object", - "properties": {}, - "id": "PullQueueConfig" + "id": "CreateTaskRequest", + "description": "Request message for CloudTasks.CreateTask." }, "Queue": { + "id": "Queue", "description": "A queue is a container of related tasks. Queues are configured to manage\nhow those tasks are dispatched. Configurable properties include rate limits,\nretry options, target types, and others.", "type": "object", "properties": { - "throttleConfig": { - "$ref": "ThrottleConfig", - "description": "Config for throttling task dispatches." + "appEngineHttpTarget": { + "description": "App Engine HTTP target.\n\nAn App Engine queue is a queue that has an AppEngineHttpTarget.", + "$ref": "AppEngineHttpTarget" + }, + "purgeTime": { + "format": "google-datetime", + "description": "Output only.\n\nThe last time this queue was purged. All tasks that were\ncreated before this time were purged.\n\nA queue can be purged using CloudTasks.PurgeQueue, the\n[App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).\n\nPurge time will be truncated to the nearest microsecond. Purge\ntime will be zero if the queue has never been purged.", + "type": "string" + }, + "retryConfig": { + "$ref": "RetryConfig", + "description": "Settings that determine the retry behavior.\n\n* For tasks created using Cloud Tasks: the queue-level retry settings\n apply to all tasks in the queue that were created using Cloud Tasks.\n Retry settings cannot be set on individual tasks.\n* For tasks created using the App Engine SDK: the queue-level retry\n settings apply to all tasks in the queue which do not have retry settings\n explicitly set on the task and were created by the App Engine SDK. See\n [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks)." + }, + "queueState": { + "enum": [ + "QUEUE_STATE_UNSPECIFIED", + "RUNNING", + "PAUSED", + "DISABLED" + ], + "description": "Output only.\n\nThe state of the queue.\n\n`queue_state` can only be changed by called\nCloudTasks.PauseQueue, CloudTasks.ResumeQueue, or uploading\n[queue.yaml](/appengine/docs/python/config/queueref).\nCloudTasks.UpdateQueue cannot be used to change `queue_state`.", + "type": "string", + "enumDescriptions": [ + "Unspecified state.", + "The queue is running. Tasks can be dispatched.", + "Tasks are paused by the user. If the queue is paused then Cloud\nTasks will stop delivering tasks from it, but more tasks can\nstill be added to it by the user. When a pull queue is paused,\nall CloudTasks.PullTasks calls will return a\n`FAILED_PRECONDITION` error.", + "The queue is disabled.\n\nA queue becomes `DISABLED` when\n[queue.yaml](/appengine/docs/python/config/queueref) or\n[queue.xml](appengine/docs/standard/java/config/queueref) is uploaded\nwhich does not contain the queue. You cannot directly disable a queue.\n\nWhen a queue is disabled, tasks can still be added to a queue\nbut the tasks are not dispatched and CloudTasks.PullTasks calls\nreturn a `FAILED_PRECONDITION` error.\n\nTo permanently delete this queue and all of its tasks, call\nCloudTasks.DeleteQueue." + ] + }, + "name": { + "type": "string", + "description": "The queue name.\n\nThe queue name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n\nCaller-specified and required in CreateQueueRequest, after which\nit becomes output only." }, "appEngineQueueConfig": { "description": "Deprecated. Use Queue.app_engine_http_target.", "$ref": "AppEngineQueueConfig" }, + "throttleConfig": { + "description": "Config for throttling task dispatches.", + "$ref": "ThrottleConfig" + }, "pullTarget": { "description": "Pull target.\n\nA pull queue is a queue that has a PullTarget.", "$ref": "PullTarget" @@ -1247,51 +1326,19 @@ "pullQueueConfig": { "description": "Deprecated. Use Queue.pull_target.", "$ref": "PullQueueConfig" - }, - "appEngineHttpTarget": { - "$ref": "AppEngineHttpTarget", - "description": "App Engine HTTP target.\n\nAn App Engine queue is a queue that has an AppEngineHttpTarget." - }, - "purgeTime": { - "format": "google-datetime", - "description": "Output only.\n\nThe last time this queue was purged. All tasks that were\ncreated before this time were purged.\n\nA queue can be purged using CloudTasks.PurgeQueue, the\n[App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).\n\nPurge time will be truncated to the nearest microsecond. Purge\ntime will be zero if the queue has never been purged.", - "type": "string" - }, - "queueState": { - "description": "Output only.\n\nThe state of the queue.\n\n`queue_state` can only be changed by called\nCloudTasks.PauseQueue, CloudTasks.ResumeQueue, or uploading\n[queue.yaml](/appengine/docs/python/config/queueref).\nCloudTasks.UpdateQueue cannot be used to change `queue_state`.", - "type": "string", - "enumDescriptions": [ - "Unspecified state.", - "The queue is running. Tasks can be dispatched.", - "Tasks are paused by the user. If the queue is paused then Cloud\nTasks will stop delivering tasks from it, but more tasks can\nstill be added to it by the user. When a pull queue is paused,\nall CloudTasks.PullTasks calls will return a\n`FAILED_PRECONDITION` error.", - "The queue is disabled.\n\nA queue becomes `DISABLED` when\n[queue.yaml](/appengine/docs/python/config/queueref) or\n[queue.xml](appengine/docs/standard/java/config/queueref) is uploaded\nwhich does not contain the queue. You cannot directly disable a queue.\n\nWhen a queue is disabled, tasks can still be added to a queue\nbut the tasks are not dispatched and CloudTasks.PullTasks calls\nreturn a `FAILED_PRECONDITION` error.\n\nTo permanently delete this queue and all of its tasks, call\nCloudTasks.DeleteQueue." - ], - "enum": [ - "QUEUE_STATE_UNSPECIFIED", - "RUNNING", - "PAUSED", - "DISABLED" - ] - }, - "retryConfig": { - "$ref": "RetryConfig", - "description": "Settings that determine the retry behavior.\n\n* For tasks created using Cloud Tasks: the queue-level retry settings\n apply to all tasks in the queue that were created using Cloud Tasks.\n Retry settings cannot be set on individual tasks.\n* For tasks created using the App Engine SDK: the queue-level retry\n settings apply to all tasks in the queue which do not have retry settings\n explicitly set on the task and were created by the App Engine SDK. See\n [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks)." - }, - "name": { - "description": "The queue name.\n\nThe queue name must have the following format:\n`projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`\n\n* `PROJECT_ID` can contain uppercase and lowercase letters,\n numbers, hyphens, colons, and periods; that is, it must match\n the regular expression: `[a-zA-Z\\\\d-:\\\\.]+`.\n* `QUEUE_ID` can contain uppercase and lowercase letters,\n numbers, and hyphens; that is, it must match the regular\n expression: `[a-zA-Z\\\\d-]+`. The maximum length is 100\n characters.\n\nCaller-specified and required in CreateQueueRequest, after which\nit becomes output only.", - "type": "string" } - }, - "id": "Queue" + } + }, + "PullQueueConfig": { + "description": "Deprecated. Use PullTarget.", + "type": "object", + "properties": {}, + "id": "PullQueueConfig" }, "PullTasksRequest": { "description": "Request message for pulling tasks using CloudTasks.PullTasks.", "type": "object", "properties": { - "filter": { - "description": "`filter` can be used to specify a subset of tasks to lease.\n\nWhen `filter` is set to `tag=\u003cmy-tag\u003e` then the\nPullTasksResponse will contain only tasks whose\nPullMessage.tag is equal to `\u003cmy-tag\u003e`. `\u003cmy-tag\u003e` can be\na bytes encoded as a string and must be less than 500 bytes.\nIf `\u003cmy-tag\u003e` includes whitespace or special characters (characters which\naren't letters, numbers, or underscores), then it must be double-quoted.\nDouble quotes and backslashes in quoted strings must be escaped by\npreceding it with a backslash (`\\`).\n\nWhen `filter` is set to `tag=oldest_tag()`, only tasks which have the same\ntag as the task with the oldest schedule_time will be returned.\n\nGrammar Syntax:\n\n* `filter = \"tag=\" comparable`\n\n* `comparable = tag | function`\n\n* `tag = string | bytes`\n\n* `function = \"oldest_tag()\"`\n\n\n\nThe `oldest_tag()` function returns tasks which have the same tag as the\noldest task (ordered by schedule time).", - "type": "string" - }, "leaseDuration": { "format": "google-duration", "description": "The duration of the lease.\n\nEach task returned in the PullTasksResponse will have its\nTask.schedule_time set to the current time plus the\n`lease_duration`. A task that has been returned in a\nPullTasksResponse is leased -- that task will not be\nreturned in a different PullTasksResponse before the\nTask.schedule_time.\n\nAfter the lease holder has successfully finished the work\nassociated with the task, the lease holder must call\nCloudTasks.AcknowledgeTask. If the task is not acknowledged\nvia CloudTasks.AcknowledgeTask before the\nTask.schedule_time then it will be returned in a later\nPullTasksResponse so that another lease holder can process\nit.\n\nThe maximum lease duration is 1 week.\n`lease_duration` will be truncated to the nearest second.", @@ -1303,18 +1350,22 @@ "type": "integer" }, "responseView": { + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", "type": "string", "enumDescriptions": [ "Unspecified. Defaults to BASIC.", "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." - ], - "enum": [ - "VIEW_UNSPECIFIED", - "BASIC", - "FULL" ] + }, + "filter": { + "description": "`filter` can be used to specify a subset of tasks to lease.\n\nWhen `filter` is set to `tag=\u003cmy-tag\u003e` then the\nPullTasksResponse will contain only tasks whose\nPullMessage.tag is equal to `\u003cmy-tag\u003e`. `\u003cmy-tag\u003e` can be\na bytes encoded as a string and must be less than 500 bytes.\nIf `\u003cmy-tag\u003e` includes whitespace or special characters (characters which\naren't letters, numbers, or underscores), then it must be double-quoted.\nDouble quotes and backslashes in quoted strings must be escaped by\npreceding it with a backslash (`\\`).\n\nWhen `filter` is set to `tag=oldest_tag()`, only tasks which have the same\ntag as the task with the oldest schedule_time will be returned.\n\nGrammar Syntax:\n\n* `filter = \"tag=\" comparable`\n\n* `comparable = tag | function`\n\n* `tag = string | bytes`\n\n* `function = \"oldest_tag()\"`\n\n\n\nThe `oldest_tag()` function returns tasks which have the same tag as the\noldest task (ordered by schedule time).", + "type": "string" } }, "id": "PullTasksRequest" @@ -1324,8 +1375,8 @@ "type": "object", "properties": { "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", + "$ref": "Policy" } }, "id": "SetIamPolicyRequest" @@ -1334,10 +1385,6 @@ "description": "App Engine Routing.\n\nFor more information about services, versions, and instances see\n[An Overview of App Engine](/appengine/docs/python/an-overview-of-app-engine),\n[Microservices Architecture on Google App Engine](/appengine/docs/python/microservices-on-app-engine),\n[App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed),\nand [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).", "type": "object", "properties": { - "host": { - "description": "Output only.\n\nThe host that the task is sent to. For more information, see\n[How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).\n\nThe host is constructed as:\n\n\n* `host = [application_domain_name]`\u003c/br\u003e\n `| [service] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [version] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [version_dot_service]+ '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_service] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_version] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`\n\n* `application_domain_name` = The domain name of the app, for\n example \u003capp-id\u003e.appspot.com, which is associated with the\n queue's project ID. Some tasks which were created using the App Engine\n SDK use a custom domain name.\n\n* `service =` AppEngineRouting.service\n\n* `version =` AppEngineRouting.version\n\n* `version_dot_service =`\n AppEngineRouting.version `+ '.' +` AppEngineRouting.service\n\n* `instance =` AppEngineRouting.instance\n\n* `instance_dot_service =`\n AppEngineRouting.instance `+ '.' +` AppEngineRouting.service\n\n* `instance_dot_version =`\n AppEngineRouting.instance `+ '.' +` AppEngineRouting.version\n\n* `instance_dot_version_dot_service =`\n AppEngineRouting.instance `+ '.' +`\n AppEngineRouting.version `+ '.' +` AppEngineRouting.service\n\nIf AppEngineRouting.service is empty, then the task will be sent\nto the service which is the default service when the task is attempted.\n\nIf AppEngineRouting.version is empty, then the task will be sent\nto the version which is the default version when the task is attempted.\n\nIf AppEngineRouting.instance is empty, then the task will be sent\nto an instance which is available when the task is attempted.\n\nWhen AppEngineRouting.service is \"default\",\nAppEngineRouting.version is \"default\", and\nAppEngineRouting.instance is empty, AppEngineRouting.host is\nshortened to just the `application_domain_name`.\n\nIf AppEngineRouting.service, AppEngineRouting.version, or\nAppEngineRouting.instance is invalid, then the task will be sent\nto the default version of the default service when the task is attempted.", - "type": "string" - }, "service": { "description": "App service.\n\nBy default, the task is sent to the service which is the default\nservice when the task is attempted (\"default\").\n\nFor some queues or tasks which were created using the App Engine Task Queue\nAPI, AppEngineRouting.host is not parsable into\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance. For example, some tasks which were created\nusing the App Engine SDK use a custom domain name; custom domains are not\nparsed by Cloud Tasks. If AppEngineRouting.host is not parsable, then\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance are the empty string.", "type": "string" @@ -1349,6 +1396,10 @@ "version": { "description": "App version.\n\nBy default, the task is sent to the version which is the default\nversion when the task is attempted (\"default\").\n\nFor some queues or tasks which were created using the App Engine Task Queue\nAPI, AppEngineRouting.host is not parsable into\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance. For example, some tasks which were created\nusing the App Engine SDK use a custom domain name; custom domains are not\nparsed by Cloud Tasks. If AppEngineRouting.host is not parsable, then\nAppEngineRouting.service, AppEngineRouting.version, and\nAppEngineRouting.instance are the empty string.", "type": "string" + }, + "host": { + "description": "Output only.\n\nThe host that the task is sent to. For more information, see\n[How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).\n\nThe host is constructed as:\n\n\n* `host = [application_domain_name]`\u003c/br\u003e\n `| [service] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [version] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [version_dot_service]+ '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_service] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_version] + '.' + [application_domain_name]`\u003c/br\u003e\n `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`\n\n* `application_domain_name` = The domain name of the app, for\n example \u003capp-id\u003e.appspot.com, which is associated with the\n queue's project ID. Some tasks which were created using the App Engine\n SDK use a custom domain name.\n\n* `service =` AppEngineRouting.service\n\n* `version =` AppEngineRouting.version\n\n* `version_dot_service =`\n AppEngineRouting.version `+ '.' +` AppEngineRouting.service\n\n* `instance =` AppEngineRouting.instance\n\n* `instance_dot_service =`\n AppEngineRouting.instance `+ '.' +` AppEngineRouting.service\n\n* `instance_dot_version =`\n AppEngineRouting.instance `+ '.' +` AppEngineRouting.version\n\n* `instance_dot_version_dot_service =`\n AppEngineRouting.instance `+ '.' +`\n AppEngineRouting.version `+ '.' +` AppEngineRouting.service\n\nIf AppEngineRouting.service is empty, then the task will be sent\nto the service which is the default service when the task is attempted.\n\nIf AppEngineRouting.version is empty, then the task will be sent\nto the version which is the default version when the task is attempted.\n\nIf AppEngineRouting.instance is empty, then the task will be sent\nto an instance which is available when the task is attempted.\n\nWhen AppEngineRouting.service is \"default\",\nAppEngineRouting.version is \"default\", and\nAppEngineRouting.instance is empty, AppEngineRouting.host is\nshortened to just the `application_domain_name`.\n\nIf AppEngineRouting.service, AppEngineRouting.version, or\nAppEngineRouting.instance is invalid, then the task will be sent\nto the default version of the default service when the task is attempted.", + "type": "string" } }, "id": "AppEngineRouting" @@ -1360,12 +1411,12 @@ "id": "Empty" }, "AppEngineHttpTarget": { - "description": "App Engine HTTP target.\n\nThe task will be delivered to the App Engine application hostname\nspecified by its AppEngineHttpTarget and AppEngineHttpRequest.\nThe documentation for AppEngineHttpRequest explains how the\ntask's host URL is constructed.\n\nUsing this type of queue configuration requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`", + "description": "App Engine HTTP target.\n\nThe task will be delivered to the App Engine application hostname\nspecified by its AppEngineHttpTarget and AppEngineHttpRequest.\nThe documentation for AppEngineHttpRequest explains how the\ntask's host URL is constructed.\n\nUsing AppEngineHttpTarget requires\n[`appengine.applications.get`](/appengine/docs/admin-api/access-control)\nGoogle IAM permission for the project\nand the following scope:\n\n`https://www.googleapis.com/auth/cloud-platform`", "type": "object", "properties": { "appEngineRoutingOverride": { - "description": "Overrides for the\ntask-level app_engine_routing.\n\nIf set, AppEngineHttpTarget.app_engine_routing_override is used for\nall tasks in the queue, no matter what the setting is for the\ntask-level app_engine_routing.", - "$ref": "AppEngineRouting" + "$ref": "AppEngineRouting", + "description": "Overrides for the\ntask-level app_engine_routing.\n\nIf set, AppEngineHttpTarget.app_engine_routing_override is used for\nall tasks in the queue, no matter what the setting is for the\ntask-level app_engine_routing." } }, "id": "AppEngineHttpTarget" @@ -1374,28 +1425,28 @@ "description": "A resource that represents Google Cloud Platform location.", "type": "object", "properties": { + "name": { + "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + }, "locationId": { "description": "The canonical id for this location. For example: `\"us-east1\"`.", "type": "string" }, "metadata": { - "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - } + }, + "description": "Service-specific metadata. For example the available capacity at the given\nlocation.", + "type": "object" }, "labels": { - "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", - "type": "object", "additionalProperties": { "type": "string" - } - }, - "name": { - "description": "Resource name for the location, which may vary between implementations.\nFor example: `\"projects/example-project/locations/us-east1\"`", - "type": "string" + }, + "description": "Cross-service attributes for the location. For example\n\n {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" } }, "id": "Location" @@ -1432,30 +1483,40 @@ "id": "ListQueuesResponse" }, "TestIamPermissionsRequest": { + "id": "TestIamPermissionsRequest", "description": "Request message for `TestIamPermissions` method.", "type": "object", "properties": { "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", "items": { "type": "string" }, + "type": "array", + "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions)." + } + } + }, + "ListLocationsResponse": { + "type": "object", + "properties": { + "nextPageToken": { + "type": "string", + "description": "The standard List next-page token." + }, + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, "type": "array" } }, - "id": "TestIamPermissionsRequest" + "id": "ListLocationsResponse", + "description": "The response message for Locations.ListLocations." }, "Policy": { - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", "type": "object", "properties": { - "bindings": { - "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", - "items": { - "$ref": "Binding" - }, - "type": "array" - }, "etag": { "format": "byte", "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", @@ -1465,37 +1526,25 @@ "format": "int32", "description": "Version of the `Policy`. The default version is 0.", "type": "integer" - } - }, - "id": "Policy" - }, - "ListLocationsResponse": { - "description": "The response message for Locations.ListLocations.", - "type": "object", - "properties": { - "locations": { - "description": "A list of locations that matches the specified filter in the request.", + }, + "bindings": { + "description": "Associates a list of `members` to a `role`.\n`bindings` with no members will result in an error.", "items": { - "$ref": "Location" + "$ref": "Binding" }, "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" } }, - "id": "ListLocationsResponse" + "id": "Policy", + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam)." }, "AppEngineTaskTarget": { + "id": "AppEngineTaskTarget", "description": "Deprecated. Use AppEngineHttpRequest.", "type": "object", "properties": { - "appEngineRouting": { - "$ref": "AppEngineRouting", - "description": "Deprecated. Use AppEngineHttpRequest.app_engine_routing." - }, "httpMethod": { + "type": "string", "enumDescriptions": [ "HTTP method unspecified", "HTTP Post", @@ -1512,13 +1561,12 @@ "PUT", "DELETE" ], - "description": "Deprecated. Use AppEngineHttpRequest.http_method.", - "type": "string" + "description": "Deprecated. Use AppEngineHttpRequest.http_method." }, "payload": { + "type": "string", "format": "byte", - "description": "Deprecated. Use AppEngineHttpRequest.payload.", - "type": "string" + "description": "Deprecated. Use AppEngineHttpRequest.payload." }, "relativeUrl": { "description": "Deprecated. Use AppEngineHttpRequest.relative_url.", @@ -1530,61 +1578,12 @@ "additionalProperties": { "type": "string" } + }, + "appEngineRouting": { + "$ref": "AppEngineRouting", + "description": "Deprecated. Use AppEngineHttpRequest.app_engine_routing." } - }, - "id": "AppEngineTaskTarget" - }, - "CancelLeaseRequest": { - "description": "Request message for canceling a lease using\nCloudTasks.CancelLease.", - "type": "object", - "properties": { - "scheduleTime": { - "format": "google-datetime", - "description": "Required.\n\nThe task's current schedule time, available in the Task.schedule_time\nreturned in PullTasksResponse.tasks or\nCloudTasks.RenewLease. This restriction is to check that\nthe caller is canceling the correct task.", - "type": "string" - }, - "responseView": { - "enumDescriptions": [ - "Unspecified. Defaults to BASIC.", - "The basic view omits fields which can be large or can contain\nsensitive data.\n\nThis view does not include the payload.", - "All information is returned.\n\nPayloads might be desirable to return only when needed, because\nthey can be large and because of the sensitivity of the data\nthat you choose to store in it.\n\nAuthorization for Task.View.FULL requires\n`cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)\npermission on the Queue.name resource." - ], - "enum": [ - "VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "description": "The response_view specifies which subset of the Task will be\nreturned.\n\nBy default response_view is Task.View.BASIC; not all\ninformation is retrieved by default because some data, such as\npayloads, might be desirable to return only when needed because\nof its large size or because of the sensitivity of data that it\ncontains.\n\nAuthorization for Task.View.FULL requires `cloudtasks.tasks.fullView`\n[Google IAM](/iam/) permission on the\nTask.name resource.", - "type": "string" - } - }, - "id": "CancelLeaseRequest" - }, - "AttemptStatus": { - "description": "The status of a task attempt.", - "type": "object", - "properties": { - "responseStatus": { - "description": "Output only.\n\nThe response from the target for this attempt.\n\nIf the task has not been attempted or the task is currently running\nthen the response status is google.rpc.Code.UNKNOWN.", - "$ref": "Status" - }, - "responseTime": { - "format": "google-datetime", - "description": "Output only.\n\nThe time that this attempt response was received.\n\n`response_time` will be truncated to the nearest microsecond.", - "type": "string" - }, - "scheduleTime": { - "format": "google-datetime", - "description": "Output only.\n\nThe time that this attempt was scheduled.\n\n`schedule_time` will be truncated to the nearest microsecond.", - "type": "string" - }, - "dispatchTime": { - "format": "google-datetime", - "description": "Output only.\n\nThe time that this attempt was dispatched.\n\n`dispatch_time` will be truncated to the nearest microsecond.", - "type": "string" - } - }, - "id": "AttemptStatus" + } } }, "protocol": "rest", @@ -1604,5 +1603,6 @@ }, "rootUrl": "https://cloudtasks.googleapis.com/", "ownerDomain": "google.com", - "name": "cloudtasks" + "name": "cloudtasks", + "batchPath": "batch" } diff --git a/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go index 0f6019539..a7541a54c 100644 --- a/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/vendor/google.golang.org/api/cloudtasks/v2beta2/cloudtasks-gen.go @@ -166,7 +166,7 @@ func (s *AcknowledgeTaskRequest) MarshalJSON() ([]byte, error) { // has // Queue.app_engine_http_target set. // -// Using this type of target +// Using AppEngineHttpRequest // requires // [`appengine.applications.get`](/appengine/docs/admin-api/acce // ss-control) @@ -350,7 +350,7 @@ func (s *AppEngineHttpRequest) MarshalJSON() ([]byte, error) { // The documentation for AppEngineHttpRequest explains how the // task's host URL is constructed. // -// Using this type of queue configuration +// Using AppEngineHttpTarget // requires // [`appengine.applications.get`](/appengine/docs/admin-api/acce // ss-control) @@ -3160,6 +3160,7 @@ type ProjectsLocationsQueuesGetIamPolicyCall struct { // specified resource parent: // // * `cloudtasks.queues.getIamPolicy` +// func (r *ProjectsLocationsQueuesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsQueuesGetIamPolicyCall { c := &ProjectsLocationsQueuesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -3253,7 +3254,7 @@ func (c *ProjectsLocationsQueuesGetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.getIamPolicy`", + // "description": "Gets the access control policy for a Queue.\nReturns an empty policy if the resource exists and does not have a policy\nset.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.getIamPolicy`\n", // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:getIamPolicy", // "httpMethod": "POST", // "id": "cloudtasks.projects.locations.queues.getIamPolicy", @@ -4139,6 +4140,7 @@ type ProjectsLocationsQueuesSetIamPolicyCall struct { // specified resource parent: // // * `cloudtasks.queues.setIamPolicy` +// func (r *ProjectsLocationsQueuesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsQueuesSetIamPolicyCall { c := &ProjectsLocationsQueuesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -4232,7 +4234,7 @@ func (c *ProjectsLocationsQueuesSetIamPolicyCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.setIamPolicy`", + // "description": "Sets the access control policy for a Queue. Replaces any existing\npolicy.\n\nAuthorization requires the following [Google IAM](/iam) permission on the\nspecified resource parent:\n\n* `cloudtasks.queues.setIamPolicy`\n", // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:setIamPolicy", // "httpMethod": "POST", // "id": "cloudtasks.projects.locations.queues.setIamPolicy", @@ -4284,6 +4286,7 @@ type ProjectsLocationsQueuesTestIamPermissionsCall struct { // UIs and command-line tools, not for authorization checking. This // operation // may "fail open" without warning. +// func (r *ProjectsLocationsQueuesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsQueuesTestIamPermissionsCall { c := &ProjectsLocationsQueuesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource @@ -4377,7 +4380,7 @@ func (c *ProjectsLocationsQueuesTestIamPermissionsCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Returns permissions that a caller has on a Queue.\nIf the resource does not exist, this will return an empty set of\npermissions, not a google.rpc.Code.NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + // "description": "Returns permissions that a caller has on a Queue.\nIf the resource does not exist, this will return an empty set of\npermissions, not a google.rpc.Code.NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.\n", // "flatPath": "v2beta2/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:testIamPermissions", // "httpMethod": "POST", // "id": "cloudtasks.projects.locations.queues.testIamPermissions", diff --git a/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json b/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json index 0262ce5b1..40b921462 100644 --- a/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json +++ b/vendor/google.golang.org/api/cloudtrace/v1/cloudtrace-api.json @@ -1,254 +1,16 @@ { - "ownerName": "Google", - "resources": { - "projects": { - "methods": { - "patchTraces": { - "parameters": { - "projectId": { - "description": "ID of the Cloud project where the trace data is stored.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.append" - ], - "flatPath": "v1/projects/{projectId}/traces", - "id": "cloudtrace.projects.patchTraces", - "path": "v1/projects/{projectId}/traces", - "description": "Sends new traces to Stackdriver Trace or updates existing traces. If the ID\nof a trace that you send matches that of an existing trace, any fields\nin the existing trace and its spans are overwritten by the provided values,\nand any new fields provided are merged with the existing trace data. If the\nID does not match, a new trace is created.", - "request": { - "$ref": "Traces" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "PATCH" - } - }, - "resources": { - "traces": { - "methods": { - "get": { - "description": "Gets a single trace by its ID.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "traceId" - ], - "response": { - "$ref": "Trace" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "ID of the Cloud project where the trace data is stored.", - "type": "string", - "required": true - }, - "traceId": { - "location": "path", - "description": "ID of the trace to return.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ], - "flatPath": "v1/projects/{projectId}/traces/{traceId}", - "path": "v1/projects/{projectId}/traces/{traceId}", - "id": "cloudtrace.projects.traces.get" - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "ListTracesResponse" - }, - "parameters": { - "endTime": { - "type": "string", - "location": "query", - "format": "google-datetime", - "description": "End of the time interval (inclusive) during which the trace data was\ncollected from the application." - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "Token identifying the page of results to return. If provided, use the\nvalue of the `next_page_token` field from a previous request. Optional." - }, - "startTime": { - "format": "google-datetime", - "description": "Start of the time interval (inclusive) during which the trace data was\ncollected from the application.", - "type": "string", - "location": "query" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum number of traces to return. If not specified or \u003c= 0, the\nimplementation selects a reasonable value. The implementation may\nreturn fewer traces than the requested page size. Optional.", - "type": "integer" - }, - "view": { - "description": "Type of data returned for traces in the list. Optional. Default is\n`MINIMAL`.", - "type": "string", - "location": "query", - "enum": [ - "VIEW_TYPE_UNSPECIFIED", - "MINIMAL", - "ROOTSPAN", - "COMPLETE" - ] - }, - "orderBy": { - "location": "query", - "description": "Field used to sort the returned traces. Optional.\nCan be one of the following:\n\n* `trace_id`\n* `name` (`name` field of root span in the trace)\n* `duration` (difference between `end_time` and `start_time` fields of\n the root span)\n* `start` (`start_time` field of the root span)\n\nDescending order can be specified by appending `desc` to the sort field\n(for example, `name desc`).\n\nOnly one sort field is permitted.", - "type": "string" - }, - "projectId": { - "location": "path", - "description": "ID of the Cloud project where the trace data is stored.", - "type": "string", - "required": true - }, - "filter": { - "location": "query", - "description": "An optional filter against labels for the request.\n\nBy default, searches use prefix matching. To specify exact match, prepend\na plus symbol (`+`) to the search term.\nMultiple terms are ANDed. Syntax:\n\n* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root\n span starts with `NAME_PREFIX`.\n* `+root:NAME` or `+NAME`: Return traces where any root span's name is\n exactly `NAME`.\n* `span:NAME_PREFIX`: Return traces where any span starts with\n `NAME_PREFIX`.\n* `+span:NAME`: Return traces where any span's name is exactly\n `NAME`.\n* `latency:DURATION`: Return traces whose overall latency is\n greater or equal to than `DURATION`. Accepted units are nanoseconds\n (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For\n example, `latency:24ms` returns traces whose overall latency\n is greater than or equal to 24 milliseconds.\n* `label:LABEL_KEY`: Return all traces containing the specified\n label key (exact match, case-sensitive) regardless of the key:value\n pair's value (including empty values).\n* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified\n label key (exact match, case-sensitive) whose value starts with\n `VALUE_PREFIX`. Both a key and a value must be specified.\n* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair\n exactly matching the specified text. Both a key and a value must be\n specified.\n* `method:VALUE`: Equivalent to `/http/method:VALUE`.\n* `url:VALUE`: Equivalent to `/http/url:VALUE`.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.readonly" - ], - "flatPath": "v1/projects/{projectId}/traces", - "path": "v1/projects/{projectId}/traces", - "id": "cloudtrace.projects.traces.list", - "description": "Returns of a list of traces that match the specified filter conditions." - } - } - } - } - } - }, - "parameters": { - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "default": "true", - "type": "boolean", - "location": "query", - "description": "Pretty-print response." - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." - }, - "upload_protocol": { - "type": "string", - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - } - }, - "version": "v1", - "baseUrl": "https://cloudtrace.googleapis.com/", - "servicePath": "", - "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", - "kind": "discovery#restDescription", "basePath": "", - "revision": "20170913", + "revision": "20170927", "documentationLink": "https://cloud.google.com/trace", "id": "cloudtrace:v1", "discoveryVersion": "v1", "version_module": true, "schemas": { "TraceSpan": { + "id": "TraceSpan", "description": "A span represents a single timed event within a trace. Spans can be nested\nand form a trace tree. Often, a trace contains a root span that describes the\nend-to-end latency of an operation and, optionally, one or more subspans for\nits suboperations. Spans do not need to be contiguous. There may be gaps\nbetween spans in a trace.", "type": "object", "properties": { - "name": { - "description": "Name of the span. Must be less than 128 bytes. The span name is sanitized\nand displayed in the Stackdriver Trace tool in the\n{% dynamic print site_values.console_name %}.\nThe name may be a method name or some other per-call site name.\nFor the same executable and the same call point, a best practice is\nto use a consistent name, which makes it easier to correlate\ncross-trace spans.", - "type": "string" - }, "spanId": { "format": "uint64", "description": "Identifier for the span. Must be a 64-bit integer other than 0 and\nunique within a trace.", @@ -270,18 +32,18 @@ "type": "string" }, "kind": { - "enumDescriptions": [ - "Unspecified.", - "Indicates that the span covers server-side handling of an RPC or other\nremote network request.", - "Indicates that the span covers the client-side wrapper around an RPC or\nother remote request." - ], "enum": [ "SPAN_KIND_UNSPECIFIED", "RPC_SERVER", "RPC_CLIENT" ], "description": "Distinguishes between spans generated in a particular context. For example,\ntwo spans with the same name may be distinguished using `RPC_CLIENT`\nand `RPC_SERVER` to identify queueing latency associated with the span.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Indicates that the span covers server-side handling of an RPC or other\nremote network request.", + "Indicates that the span covers the client-side wrapper around an RPC or\nother remote request." + ] }, "labels": { "additionalProperties": { @@ -289,9 +51,12 @@ }, "description": "Collection of labels associated with the span. Label keys must be less than\n128 bytes. Label values must be less than 16 kilobytes (10MB for\n`/stacktrace` values).\n\nSome predefined label keys exist, or you may create your own. When creating\nyour own, we recommend the following formats:\n\n* `/category/product/key` for agents of well-known products (e.g.\n `/db/mongodb/read_size`).\n* `short_host/path/key` for domain-specific keys (e.g.\n `foo.com/myproduct/bar`)\n\nPredefined labels include:\n\n* `/agent`\n* `/component`\n* `/error/message`\n* `/error/name`\n* `/http/client_city`\n* `/http/client_country`\n* `/http/client_protocol`\n* `/http/client_region`\n* `/http/host`\n* `/http/method`\n* `/http/redirected_url`\n* `/http/request/size`\n* `/http/response/size`\n* `/http/status_code`\n* `/http/url`\n* `/http/user_agent`\n* `/pid`\n* `/stacktrace`\n* `/tid`", "type": "object" + }, + "name": { + "description": "Name of the span. Must be less than 128 bytes. The span name is sanitized\nand displayed in the Stackdriver Trace tool in the\n{% dynamic print site_values.console_name %}.\nThe name may be a method name or some other per-call site name.\nFor the same executable and the same call point, a best practice is\nto use a consistent name, which makes it easier to correlate\ncross-trace spans.", + "type": "string" } - }, - "id": "TraceSpan" + } }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", @@ -300,24 +65,26 @@ "id": "Empty" }, "ListTracesResponse": { - "type": "object", "properties": { "nextPageToken": { "description": "If defined, indicates that there are more traces that match the request\nand that this value should be passed to the next request to continue\nretrieving additional traces.", "type": "string" }, "traces": { + "description": "List of trace records returned.", "items": { "$ref": "Trace" }, - "type": "array", - "description": "List of trace records returned." + "type": "array" } }, "id": "ListTracesResponse", - "description": "The response message for the `ListTraces` method." + "description": "The response message for the `ListTraces` method.", + "type": "object" }, "Trace": { + "description": "A trace describes how long it takes for an application to perform an\noperation. It consists of a set of spans, each of which represent a single\ntimed event within the operation.", + "type": "object", "properties": { "spans": { "description": "Collection of spans in the trace.", @@ -327,17 +94,15 @@ "type": "array" }, "projectId": { - "type": "string", - "description": "Project ID of the Cloud project where the trace data is stored." + "description": "Project ID of the Cloud project where the trace data is stored.", + "type": "string" }, "traceId": { "type": "string", "description": "Globally unique identifier for the trace. This identifier is a 128-bit\nnumeric value formatted as a 32-byte hex string." } }, - "id": "Trace", - "description": "A trace describes how long it takes for an application to perform an\noperation. It consists of a set of spans, each of which represent a single\ntimed event within the operation.", - "type": "object" + "id": "Trace" }, "Traces": { "description": "List of new or updated traces.", @@ -355,22 +120,22 @@ } }, "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, "protocol": "rest", "canonicalName": "Cloud Trace", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/trace.readonly": { - "description": "Read Trace data for a project or application" - }, "https://www.googleapis.com/auth/trace.append": { "description": "Write Trace data for a project or application" }, "https://www.googleapis.com/auth/cloud-platform": { "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/trace.readonly": { + "description": "Read Trace data for a project or application" } } } @@ -379,5 +144,241 @@ "ownerDomain": "google.com", "name": "cloudtrace", "batchPath": "batch", - "title": "Stackdriver Trace API" + "fullyEncodeReservedExpansion": true, + "title": "Stackdriver Trace API", + "ownerName": "Google", + "resources": { + "projects": { + "methods": { + "patchTraces": { + "description": "Sends new traces to Stackdriver Trace or updates existing traces. If the ID\nof a trace that you send matches that of an existing trace, any fields\nin the existing trace and its spans are overwritten by the provided values,\nand any new fields provided are merged with the existing trace data. If the\nID does not match, a new trace is created.", + "request": { + "$ref": "Traces" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "PATCH", + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the Cloud project where the trace data is stored.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.append" + ], + "flatPath": "v1/projects/{projectId}/traces", + "id": "cloudtrace.projects.patchTraces", + "path": "v1/projects/{projectId}/traces" + } + }, + "resources": { + "traces": { + "methods": { + "get": { + "description": "Gets a single trace by its ID.", + "httpMethod": "GET", + "response": { + "$ref": "Trace" + }, + "parameterOrder": [ + "projectId", + "traceId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "ID of the Cloud project where the trace data is stored.", + "type": "string", + "required": true + }, + "traceId": { + "location": "path", + "description": "ID of the trace to return.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/traces/{traceId}", + "path": "v1/projects/{projectId}/traces/{traceId}", + "id": "cloudtrace.projects.traces.get" + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.readonly" + ], + "parameters": { + "orderBy": { + "description": "Field used to sort the returned traces. Optional.\nCan be one of the following:\n\n* `trace_id`\n* `name` (`name` field of root span in the trace)\n* `duration` (difference between `end_time` and `start_time` fields of\n the root span)\n* `start` (`start_time` field of the root span)\n\nDescending order can be specified by appending `desc` to the sort field\n(for example, `name desc`).\n\nOnly one sort field is permitted.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "ID of the Cloud project where the trace data is stored.", + "type": "string", + "required": true + }, + "filter": { + "description": "An optional filter against labels for the request.\n\nBy default, searches use prefix matching. To specify exact match, prepend\na plus symbol (`+`) to the search term.\nMultiple terms are ANDed. Syntax:\n\n* `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root\n span starts with `NAME_PREFIX`.\n* `+root:NAME` or `+NAME`: Return traces where any root span's name is\n exactly `NAME`.\n* `span:NAME_PREFIX`: Return traces where any span starts with\n `NAME_PREFIX`.\n* `+span:NAME`: Return traces where any span's name is exactly\n `NAME`.\n* `latency:DURATION`: Return traces whose overall latency is\n greater or equal to than `DURATION`. Accepted units are nanoseconds\n (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For\n example, `latency:24ms` returns traces whose overall latency\n is greater than or equal to 24 milliseconds.\n* `label:LABEL_KEY`: Return all traces containing the specified\n label key (exact match, case-sensitive) regardless of the key:value\n pair's value (including empty values).\n* `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified\n label key (exact match, case-sensitive) whose value starts with\n `VALUE_PREFIX`. Both a key and a value must be specified.\n* `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair\n exactly matching the specified text. Both a key and a value must be\n specified.\n* `method:VALUE`: Equivalent to `/http/method:VALUE`.\n* `url:VALUE`: Equivalent to `/http/url:VALUE`.", + "type": "string", + "location": "query" + }, + "endTime": { + "location": "query", + "format": "google-datetime", + "description": "End of the time interval (inclusive) during which the trace data was\ncollected from the application.", + "type": "string" + }, + "pageToken": { + "description": "Token identifying the page of results to return. If provided, use the\nvalue of the `next_page_token` field from a previous request. Optional.", + "type": "string", + "location": "query" + }, + "startTime": { + "location": "query", + "format": "google-datetime", + "description": "Start of the time interval (inclusive) during which the trace data was\ncollected from the application.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "Maximum number of traces to return. If not specified or \u003c= 0, the\nimplementation selects a reasonable value. The implementation may\nreturn fewer traces than the requested page size. Optional.", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "VIEW_TYPE_UNSPECIFIED", + "MINIMAL", + "ROOTSPAN", + "COMPLETE" + ], + "description": "Type of data returned for traces in the list. Optional. Default is\n`MINIMAL`.", + "type": "string" + } + }, + "flatPath": "v1/projects/{projectId}/traces", + "path": "v1/projects/{projectId}/traces", + "id": "cloudtrace.projects.traces.list", + "description": "Returns of a list of traces that match the specified filter conditions.", + "httpMethod": "GET", + "response": { + "$ref": "ListTracesResponse" + }, + "parameterOrder": [ + "projectId" + ] + } + } + } + } + } + }, + "parameters": { + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Returns response with indentations and line breaks." + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json" + } + }, + "version": "v1", + "baseUrl": "https://cloudtrace.googleapis.com/", + "servicePath": "", + "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", + "kind": "discovery#restDescription" } diff --git a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json index 12be3b45d..0e3c46f30 100644 --- a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json +++ b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-api.json @@ -1,14 +1,189 @@ { - "servicePath": "", - "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", - "kind": "discovery#restDescription", "basePath": "", "id": "cloudtrace:v2", "documentationLink": "https://cloud.google.com/trace", - "revision": "20170913", + "revision": "20170927", "discoveryVersion": "v1", "version_module": true, "schemas": { + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "Span": { + "description": "A span represents a single operation within a trace. Spans can be\nnested to form a trace tree. Often, a trace contains a root span\nthat describes the end-to-end latency, and one or more subspans for\nits sub-operations. A trace can also contain multiple root spans,\nor none at all. Spans do not need to be contiguous—there may be\ngaps or overlaps between spans in a trace.", + "type": "object", + "properties": { + "parentSpanId": { + "description": "The [SPAN_ID] of this span's parent span. If this is a root span,\nthen this field must be empty.", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "The end time of the span. On the client side, this is the time kept by\nthe local machine where the span execution ends. On the server side, this\nis the time when the server application handler stops running.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The start time of the span. On the client side, this is the time kept by\nthe local machine where the span execution starts. On the server side, this\nis the time when the server's application handler starts running.", + "type": "string" + }, + "displayName": { + "description": "A description of the span's operation (up to 128 bytes).\nStackdriver Trace displays the description in the\n{% dynamic print site_values.console_name %}.\nFor example, the display name can be a qualified method name or a file name\nand a line number where the operation is called. A best practice is to use\nthe same display name within an application and at the same call point.\nThis makes it easier to correlate spans in different traces.", + "$ref": "TruncatableString" + }, + "timeEvents": { + "$ref": "TimeEvents", + "description": "The included time events. There can be up to 32 annotations and 128 network\nevents per span." + }, + "links": { + "$ref": "Links", + "description": "A maximum of 128 links are allowed per Span." + }, + "attributes": { + "description": "A set of attributes on the span. There is a limit of 32 attributes per\nspan.", + "$ref": "Attributes" + }, + "spanId": { + "description": "The [SPAN_ID] portion of the span's resource name.", + "type": "string" + }, + "childSpanCount": { + "format": "uint32", + "description": "An optional number of child spans that were generated while this span\nwas active. If set, allows implementation to detect missing child spans.", + "type": "integer" + }, + "sameProcessAsParentSpan": { + "description": "A highly recommended but not required flag that identifies when a trace\ncrosses a process boundary. True when the parent_span belongs to the\nsame process as the current span.", + "type": "boolean" + }, + "status": { + "$ref": "Status", + "description": "An optional final status for this span." + }, + "name": { + "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", + "type": "string" + }, + "stackTrace": { + "$ref": "StackTrace", + "description": "Stack trace captured at the start of the span." + } + }, + "id": "Span" + }, + "AttributeValue": { + "description": "The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.", + "type": "object", + "properties": { + "boolValue": { + "description": "A Boolean value represented by `true` or `false`.", + "type": "boolean" + }, + "stringValue": { + "$ref": "TruncatableString", + "description": "A string up to 256 bytes long." + }, + "intValue": { + "format": "int64", + "description": "A 64-bit signed integer.", + "type": "string" + } + }, + "id": "AttributeValue" + }, + "Attributes": { + "description": "A set of attributes, each in the format `[KEY]:[VALUE]`.", + "type": "object", + "properties": { + "droppedAttributesCount": { + "format": "int32", + "description": "The number of attributes that were discarded. Attributes can be discarded\nbecause their keys are too long or because there are too many attributes.\nIf this value is 0 then all attributes are valid.", + "type": "integer" + }, + "attributeMap": { + "additionalProperties": { + "$ref": "AttributeValue" + }, + "description": "The set of attributes. Each attribute's key can be up to 128 bytes\nlong. The value can be a string up to 256 bytes, an integer, or the\nBoolean values `true` and `false`. For example:\n\n \"/instance_id\": \"my-instance\"\n \"/http/user_agent\": \"\"\n \"/http/request_bytes\": 300\n \"abc.com/myattribute\": true", + "type": "object" + } + }, + "id": "Attributes" + }, + "Links": { + "description": "A collection of links, which are references from this span to a span\nin the same or different trace.", + "type": "object", + "properties": { + "droppedLinksCount": { + "format": "int32", + "description": "The number of dropped links after the maximum size was enforced. If\nthis value is 0, then no links were dropped.", + "type": "integer" + }, + "link": { + "description": "A collection of links.", + "items": { + "$ref": "Link" + }, + "type": "array" + } + }, + "id": "Links" + }, + "StackTrace": { + "description": "A call stack appearing in a trace.", + "type": "object", + "properties": { + "stackTraceHashId": { + "format": "uint64", + "description": "The hash ID is used to conserve network bandwidth for duplicate\nstack traces within a single trace.\n\nOften multiple spans will have identical stack traces.\nThe first occurrence of a stack trace should contain both the\n`stackFrame` content and a value in `stackTraceHashId`.\n\nSubsequent spans within the same request can refer\nto that stack trace by only setting `stackTraceHashId`.", + "type": "string" + }, + "stackFrames": { + "description": "Stack frames in this stack trace. A maximum of 128 frames are allowed.", + "$ref": "StackFrames" + } + }, + "id": "StackTrace" + }, + "TruncatableString": { + "description": "Represents a string that might be shortened to a specified length.", + "type": "object", + "properties": { + "truncatedByteCount": { + "format": "int32", + "description": "The number of bytes removed from the original string. If this\nvalue is 0, then the string was not shortened.", + "type": "integer" + }, + "value": { + "description": "The shortened string. For example, if the original string was 500\nbytes long and the limit of the string was 128 bytes, then this\nvalue contains the first 128 bytes of the 500-byte string. Note that\ntruncation always happens on the character boundary, to ensure that\ntruncated string is still valid UTF8. In case of multi-byte characters,\nsize of truncated string can be less than truncation limit.", + "type": "string" + } + }, + "id": "TruncatableString" + }, + "TimeEvent": { + "description": "A time-stamped annotation or network event in the Span.", + "type": "object", + "properties": { + "annotation": { + "$ref": "Annotation", + "description": "Text annotation with a set of attributes." + }, + "time": { + "format": "google-datetime", + "description": "The timestamp indicating the time the event occurred.", + "type": "string" + }, + "networkEvent": { + "$ref": "NetworkEvent", + "description": "An event describing an RPC message sent/received on the network." + } + }, + "id": "TimeEvent" + }, "NetworkEvent": { "description": "An event describing an RPC message sent or received on the network.", "type": "object", @@ -24,18 +199,18 @@ "type": "string" }, "type": { + "enumDescriptions": [ + "Unknown event type.", + "Indicates a sent RPC message.", + "Indicates a received RPC message." + ], "enum": [ "TYPE_UNSPECIFIED", "SENT", "RECV" ], "description": "Type of NetworkEvent. Indicates whether the RPC message was sent or\nreceived.", - "type": "string", - "enumDescriptions": [ - "Unknown event type.", - "Indicates a sent RPC message.", - "Indicates a received RPC message." - ] + "type": "string" }, "messageId": { "format": "uint64", @@ -43,20 +218,17 @@ "type": "string" }, "compressedMessageSize": { - "type": "string", "format": "uint64", - "description": "The number of compressed bytes sent or received." + "description": "The number of compressed bytes sent or received.", + "type": "string" } }, "id": "NetworkEvent" }, "StackFrame": { + "description": "Represents a single stack frame in a stack trace.", "type": "object", "properties": { - "functionName": { - "$ref": "TruncatableString", - "description": "The fully-qualified name that uniquely identifies the function or\nmethod that is active in this frame (up to 1024 bytes)." - }, "lineNumber": { "format": "int64", "description": "The line number in `file_name` where the function call appears.", @@ -67,13 +239,13 @@ "description": "The binary module from where the code was loaded." }, "columnNumber": { - "type": "string", "format": "int64", - "description": "The column number where the function call appears, if available.\nThis is important in JavaScript because of its anonymous functions." + "description": "The column number where the function call appears, if available.\nThis is important in JavaScript because of its anonymous functions.", + "type": "string" }, "fileName": { - "$ref": "TruncatableString", - "description": "The name of the source file where the function call appears (up to 256\nbytes)." + "description": "The name of the source file where the function call appears (up to 256\nbytes).", + "$ref": "TruncatableString" }, "sourceVersion": { "$ref": "TruncatableString", @@ -82,17 +254,19 @@ "originalFunctionName": { "$ref": "TruncatableString", "description": "An un-mangled function name, if `function_name` is\n[mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can\nbe fully-qualified (up to 1024 bytes)." + }, + "functionName": { + "$ref": "TruncatableString", + "description": "The fully-qualified name that uniquely identifies the function or\nmethod that is active in this frame (up to 1024 bytes)." } }, - "id": "StackFrame", - "description": "Represents a single stack frame in a stack trace." + "id": "StackFrame" }, "Link": { "description": "A pointer from the current span to another span in the same trace or in a\ndifferent trace. For example, this can be used in batching operations,\nwhere a single batch handler processes multiple requests from different\ntraces or when the handler receives a request from a different project.", "type": "object", "properties": { "type": { - "type": "string", "enumDescriptions": [ "The relationship of the two spans is unknown.", "The linked span is a child of the current span.", @@ -103,19 +277,20 @@ "CHILD_LINKED_SPAN", "PARENT_LINKED_SPAN" ], - "description": "The relationship of the current span relative to the linked span." + "description": "The relationship of the current span relative to the linked span.", + "type": "string" }, "attributes": { - "$ref": "Attributes", - "description": "A set of attributes on the link. There is a limit of 32 attributes per\nlink." + "description": "A set of attributes on the link. There is a limit of 32 attributes per\nlink.", + "$ref": "Attributes" }, "traceId": { - "type": "string", - "description": "`TRACE_ID` identifies a trace within a project." + "description": "`TRACE_ID` identifies a trace within a project.", + "type": "string" }, "spanId": { - "type": "string", - "description": "`SPAN_ID` identifies a span within a trace." + "description": "`SPAN_ID` identifies a span within a trace.", + "type": "string" } }, "id": "Link" @@ -124,13 +299,13 @@ "description": "Text annotation with a set of attributes.", "type": "object", "properties": { - "attributes": { - "$ref": "Attributes", - "description": "A set of attributes on the annotation. There is a limit of 4 attributes\nper Annotation." - }, "description": { - "$ref": "TruncatableString", - "description": "A user-supplied message describing the event. The maximum length for\nthe description is 256 bytes." + "description": "A user-supplied message describing the event. The maximum length for\nthe description is 256 bytes.", + "$ref": "TruncatableString" + }, + "attributes": { + "description": "A set of attributes on the annotation. There is a limit of 4 attributes\nper Annotation.", + "$ref": "Attributes" } }, "id": "Annotation" @@ -139,17 +314,17 @@ "description": "A collection of stack frames, which can be truncated.", "type": "object", "properties": { - "droppedFramesCount": { - "format": "int32", - "description": "The number of stack frames that were dropped because there\nwere too many stack frames.\nIf this value is 0, then no stack frames were dropped.", - "type": "integer" - }, "frame": { "description": "Stack frames in this call stack.", "items": { "$ref": "StackFrame" }, "type": "array" + }, + "droppedFramesCount": { + "format": "int32", + "description": "The number of stack frames that were dropped because there\nwere too many stack frames.\nIf this value is 0, then no stack frames were dropped.", + "type": "integer" } }, "id": "StackFrames" @@ -159,21 +334,21 @@ "type": "object", "properties": { "droppedNetworkEventsCount": { - "type": "integer", "format": "int32", - "description": "The number of dropped network events in all the included time events.\nIf the value is 0, then no network events were dropped." + "description": "The number of dropped network events in all the included time events.\nIf the value is 0, then no network events were dropped.", + "type": "integer" }, "droppedAnnotationsCount": { - "type": "integer", "format": "int32", - "description": "The number of dropped annotations in all the included time events.\nIf the value is 0, then no annotations were dropped." + "description": "The number of dropped annotations in all the included time events.\nIf the value is 0, then no annotations were dropped.", + "type": "integer" }, "timeEvent": { + "description": "A collection of `TimeEvent`s.", "items": { "$ref": "TimeEvent" }, - "type": "array", - "description": "A collection of `TimeEvent`s." + "type": "array" } }, "id": "TimeEvents" @@ -187,236 +362,58 @@ "description": "For example: main binary, kernel modules, and dynamic libraries\nsuch as libc.so, sharedlib.so (up to 256 bytes)." }, "buildId": { - "$ref": "TruncatableString", - "description": "A unique identifier for the module, usually a hash of its\ncontents (up to 128 bytes)." + "description": "A unique identifier for the module, usually a hash of its\ncontents (up to 128 bytes).", + "$ref": "TruncatableString" } }, "id": "Module" }, "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { - "type": "object", "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" }, "type": "array" }, "code": { - "type": "integer", "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code." + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" }, "message": { - "type": "string", - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" } }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." + "id": "Status" }, "BatchWriteSpansRequest": { "description": "The request message for the `BatchWriteSpans` method.", "type": "object", "properties": { "spans": { + "description": "A collection of spans.", "items": { "$ref": "Span" }, - "type": "array", - "description": "A collection of spans." - } - }, - "id": "BatchWriteSpansRequest" - }, - "Empty": { - "type": "object", - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." - }, - "Span": { - "type": "object", - "properties": { - "parentSpanId": { - "description": "The [SPAN_ID] of this span's parent span. If this is a root span,\nthen this field must be empty.", - "type": "string" - }, - "endTime": { - "format": "google-datetime", - "description": "The end time of the span. On the client side, this is the time kept by\nthe local machine where the span execution ends. On the server side, this\nis the time when the server application handler stops running.", - "type": "string" - }, - "startTime": { - "type": "string", - "format": "google-datetime", - "description": "The start time of the span. On the client side, this is the time kept by\nthe local machine where the span execution starts. On the server side, this\nis the time when the server's application handler starts running." - }, - "displayName": { - "$ref": "TruncatableString", - "description": "A description of the span's operation (up to 128 bytes).\nStackdriver Trace displays the description in the\n{% dynamic print site_values.console_name %}.\nFor example, the display name can be a qualified method name or a file name\nand a line number where the operation is called. A best practice is to use\nthe same display name within an application and at the same call point.\nThis makes it easier to correlate spans in different traces." - }, - "timeEvents": { - "$ref": "TimeEvents", - "description": "The included time events. There can be up to 32 annotations and 128 network\nevents per span." - }, - "links": { - "$ref": "Links", - "description": "A maximum of 128 links are allowed per Span." - }, - "attributes": { - "$ref": "Attributes", - "description": "A set of attributes on the span. There is a limit of 32 attributes per\nspan." - }, - "spanId": { - "description": "The [SPAN_ID] portion of the span's resource name.", - "type": "string" - }, - "childSpanCount": { - "type": "integer", - "format": "uint32", - "description": "An optional number of child spans that were generated while this span\nwas active. If set, allows implementation to detect missing child spans." - }, - "sameProcessAsParentSpan": { - "description": "A highly recommended but not required flag that identifies when a trace\ncrosses a process boundary. True when the parent_span belongs to the\nsame process as the current span.", - "type": "boolean" - }, - "status": { - "$ref": "Status", - "description": "An optional final status for this span." - }, - "name": { - "type": "string", - "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created." - }, - "stackTrace": { - "$ref": "StackTrace", - "description": "Stack trace captured at the start of the span." - } - }, - "id": "Span", - "description": "A span represents a single operation within a trace. Spans can be\nnested to form a trace tree. Often, a trace contains a root span\nthat describes the end-to-end latency, and one or more subspans for\nits sub-operations. A trace can also contain multiple root spans,\nor none at all. Spans do not need to be contiguous—there may be\ngaps or overlaps between spans in a trace." - }, - "AttributeValue": { - "type": "object", - "properties": { - "intValue": { - "format": "int64", - "description": "A 64-bit signed integer.", - "type": "string" - }, - "boolValue": { - "description": "A Boolean value represented by `true` or `false`.", - "type": "boolean" - }, - "stringValue": { - "$ref": "TruncatableString", - "description": "A string up to 256 bytes long." - } - }, - "id": "AttributeValue", - "description": "The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute." - }, - "Attributes": { - "description": "A set of attributes, each in the format `[KEY]:[VALUE]`.", - "type": "object", - "properties": { - "droppedAttributesCount": { - "type": "integer", - "format": "int32", - "description": "The number of attributes that were discarded. Attributes can be discarded\nbecause their keys are too long or because there are too many attributes.\nIf this value is 0 then all attributes are valid." - }, - "attributeMap": { - "type": "object", - "additionalProperties": { - "$ref": "AttributeValue" - }, - "description": "The set of attributes. Each attribute's key can be up to 128 bytes\nlong. The value can be a string up to 256 bytes, an integer, or the\nBoolean values `true` and `false`. For example:\n\n \"/instance_id\": \"my-instance\"\n \"/http/user_agent\": \"\"\n \"/http/request_bytes\": 300\n \"abc.com/myattribute\": true" - } - }, - "id": "Attributes" - }, - "Links": { - "type": "object", - "properties": { - "droppedLinksCount": { - "type": "integer", - "format": "int32", - "description": "The number of dropped links after the maximum size was enforced. If\nthis value is 0, then no links were dropped." - }, - "link": { - "description": "A collection of links.", - "items": { - "$ref": "Link" - }, "type": "array" } }, - "id": "Links", - "description": "A collection of links, which are references from this span to a span\nin the same or different trace." - }, - "TruncatableString": { - "type": "object", - "properties": { - "truncatedByteCount": { - "type": "integer", - "format": "int32", - "description": "The number of bytes removed from the original string. If this\nvalue is 0, then the string was not shortened." - }, - "value": { - "type": "string", - "description": "The shortened string. For example, if the original string was 500\nbytes long and the limit of the string was 128 bytes, then this\nvalue contains the first 128 bytes of the 500-byte string. Note that\ntruncation always happens on the character boundary, to ensure that\ntruncated string is still valid UTF8. In case of multi-byte characters,\nsize of truncated string can be less than truncation limit." - } - }, - "id": "TruncatableString", - "description": "Represents a string that might be shortened to a specified length." - }, - "StackTrace": { - "type": "object", - "properties": { - "stackFrames": { - "$ref": "StackFrames", - "description": "Stack frames in this stack trace. A maximum of 128 frames are allowed." - }, - "stackTraceHashId": { - "format": "uint64", - "description": "The hash ID is used to conserve network bandwidth for duplicate\nstack traces within a single trace.\n\nOften multiple spans will have identical stack traces.\nThe first occurrence of a stack trace should contain both the\n`stackFrame` content and a value in `stackTraceHashId`.\n\nSubsequent spans within the same request can refer\nto that stack trace by only setting `stackTraceHashId`.", - "type": "string" - } - }, - "id": "StackTrace", - "description": "A call stack appearing in a trace." - }, - "TimeEvent": { - "type": "object", - "properties": { - "annotation": { - "$ref": "Annotation", - "description": "One or more key:value pairs." - }, - "time": { - "type": "string", - "format": "google-datetime", - "description": "The timestamp indicating the time the event occurred." - }, - "networkEvent": { - "$ref": "NetworkEvent", - "description": "An event describing an RPC message sent/received on the network." - } - }, - "id": "TimeEvent", - "description": "A time-stamped annotation or network event in the Span." + "id": "BatchWriteSpansRequest" } }, "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, "canonicalName": "Cloud Trace", "auth": { @@ -435,6 +432,7 @@ "ownerDomain": "google.com", "name": "cloudtrace", "batchPath": "batch", + "fullyEncodeReservedExpansion": true, "title": "Stackdriver Trace API", "ownerName": "Google", "resources": { @@ -443,17 +441,17 @@ "traces": { "methods": { "batchWrite": { - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], + "description": "Sends new spans to Stackdriver Trace or updates existing traces. If the\nname of a trace that you send matches that of an existing trace, new spans\nare added to the existing trace. Attempt to update existing spans results\nundefined behavior. If the name does not match, a new trace is created\nwith given set of spans.", + "request": { + "$ref": "BatchWriteSpansRequest" + }, "response": { "$ref": "Empty" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/trace.append" + "parameterOrder": [ + "name" ], + "httpMethod": "POST", "parameters": { "name": { "location": "path", @@ -463,13 +461,13 @@ "pattern": "^projects/[^/]+$" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/trace.append" + ], "flatPath": "v2/projects/{projectsId}/traces:batchWrite", - "path": "v2/{+name}/traces:batchWrite", "id": "cloudtrace.projects.traces.batchWrite", - "request": { - "$ref": "BatchWriteSpansRequest" - }, - "description": "Sends new spans to Stackdriver Trace or updates existing traces. If the\nname of a trace that you send matches that of an existing trace, new spans\nare added to the existing trace. Attempt to update existing spans results\nundefined behavior. If the name does not match, a new trace is created\nwith given set of spans." + "path": "v2/{+name}/traces:batchWrite" } }, "resources": { @@ -477,32 +475,32 @@ "methods": { "create": { "flatPath": "v2/projects/{projectsId}/traces/{tracesId}/spans/{spansId}", - "path": "v2/{+name}", "id": "cloudtrace.projects.traces.spans.create", + "path": "v2/{+name}", + "description": "Creates a new Span.", "request": { "$ref": "Span" }, - "description": "Creates a new Span.", - "httpMethod": "PUT", + "response": { + "$ref": "Span" + }, "parameterOrder": [ "name" ], - "response": { - "$ref": "Span" + "httpMethod": "PUT", + "parameters": { + "name": { + "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/traces/[^/]+/spans/[^/]+$", + "location": "path" + } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/trace.append" - ], - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/traces/[^/]+/spans/[^/]+$", - "location": "path", - "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created." - } - } + ] } } } @@ -512,52 +510,62 @@ } }, "parameters": { - "upload_protocol": { - "type": "string", + "pp": { "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", + "description": "Pretty-print response.", "default": "true", "type": "boolean" }, - "fields": { + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" + }, + "bearer_token": { "location": "query", - "description": "Selector specifying which fields to include in a partial response.", + "description": "OAuth bearer token.", "type": "string" }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] - }, - "callback": { - "type": "string", - "location": "query", - "description": "JSONP" + "type": "string" }, "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -565,7 +573,13 @@ ], "location": "query", "description": "Data format for response.", - "default": "json" + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" }, "key": { "location": "query", @@ -573,32 +587,19 @@ "type": "string" }, "access_token": { + "description": "OAuth access token.", "type": "string", - "location": "query", - "description": "OAuth access token." + "location": "query" }, "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", "type": "string", - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" + "location": "query" } }, "version": "v2", - "baseUrl": "https://cloudtrace.googleapis.com/" + "baseUrl": "https://cloudtrace.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Send and retrieve trace data from Stackdriver Trace. Data is generated and available by default for all App Engine applications. Data from other applications can be written to Stackdriver Trace for display, reporting, and analysis.\n", + "servicePath": "" } diff --git a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go index 4138945b4..e4d28ce12 100644 --- a/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go +++ b/vendor/google.golang.org/api/cloudtrace/v2/cloudtrace-gen.go @@ -500,7 +500,7 @@ type Span struct { // Name: The resource name of the span in the following format: // - // projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique + // projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique // identifier for a trace within a project. // [SPAN_ID] is a unique identifier for a span within a trace, // assigned when the span is created. @@ -822,7 +822,7 @@ func (s *Status) MarshalJSON() ([]byte, error) { // TimeEvent: A time-stamped annotation or network event in the Span. type TimeEvent struct { - // Annotation: One or more key:value pairs. + // Annotation: Text annotation with a set of attributes. Annotation *Annotation `json:"annotation,omitempty"` // NetworkEvent: An event describing an RPC message sent/received on the @@ -1201,7 +1201,7 @@ func (c *ProjectsTracesSpansCreateCall) Do(opts ...googleapi.CallOption) (*Span, // ], // "parameters": { // "name": { - // "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", + // "description": "The resource name of the span in the following format:\n\n projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project.\n[SPAN_ID] is a unique identifier for a span within a trace,\nassigned when the span is created.", // "location": "path", // "pattern": "^projects/[^/]+/traces/[^/]+/spans/[^/]+$", // "required": true, diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json index ef46f589d..936a25308 100644 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json +++ b/vendor/google.golang.org/api/compute/v0.alpha/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/CwN9bOpaV-xhJ_YHqke_sIbhsB0\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/3cMXWrWKedeDcxyJugoWfBBTcik\"", "discoveryVersion": "v1", "id": "compute:alpha", "name": "compute", "version": "alpha", - "revision": "20170905", + "revision": "20170908", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -504,7 +504,7 @@ "properties": { "address": { "type": "string", - "description": "The static external IP address represented by this resource." + "description": "The static IP address represented by this resource." }, "addressType": { "type": "string", @@ -1941,6 +1941,10 @@ "description": "Lifetime of cookies in seconds if session_affinity is GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day.\n\nWhen the load balancing scheme is INTERNAL, this field is not used.", "format": "int32" }, + "appEngineBackend": { + "$ref": "BackendServiceAppEngineBackend", + "description": "Directs request to an App Engine app. cloudFunctionBackend and backends[] must be empty if this is set." + }, "backends": { "type": "array", "description": "The list of backends that serve this BackendService.", @@ -1952,6 +1956,10 @@ "$ref": "BackendServiceCdnPolicy", "description": "Cloud CDN configuration for this BackendService." }, + "cloudFunctionBackend": { + "$ref": "BackendServiceCloudFunctionBackend", + "description": "Directs request to a cloud function. appEngineBackend and backends[] must be empty if this is set." + }, "connectionDraining": { "$ref": "ConnectionDraining" }, @@ -2188,6 +2196,25 @@ } } }, + "BackendServiceAppEngineBackend": { + "id": "BackendServiceAppEngineBackend", + "type": "object", + "description": "Configuration of a App Engine backend.", + "properties": { + "appEngineService": { + "type": "string", + "description": "Optional. App Engine app service name." + }, + "targetProject": { + "type": "string", + "description": "Required. Project ID of the project hosting the app. This is the project ID of this project. Reference to another project is not allowed." + }, + "version": { + "type": "string", + "description": "Optional. Version of App Engine app service. When empty, App Engine will do its normal traffic split." + } + } + }, "BackendServiceCdnPolicy": { "id": "BackendServiceCdnPolicy", "type": "object", @@ -2211,6 +2238,21 @@ } } }, + "BackendServiceCloudFunctionBackend": { + "id": "BackendServiceCloudFunctionBackend", + "type": "object", + "description": "Configuration of a Cloud Function backend.", + "properties": { + "functionName": { + "type": "string", + "description": "Required. A cloud function name. Special value ?*? represents all cloud functions in the project." + }, + "targetProject": { + "type": "string", + "description": "Required. Project ID of the project hosting the cloud function." + } + } + }, "BackendServiceFailoverPolicy": { "id": "BackendServiceFailoverPolicy", "type": "object", @@ -4688,7 +4730,7 @@ "properties": { "type": { "type": "string", - "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", "MULTI_IP_SUBNET", @@ -6227,7 +6269,7 @@ }, "guestOsFeatures": { "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image.", "items": { "$ref": "GuestOsFeature" } @@ -15171,7 +15213,7 @@ }, "storageBytes": { "type": "string", - "description": "[Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", + "description": "[Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", "format": "int64" }, "storageBytesStatus": { @@ -29027,6 +29069,113 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "getIamPolicy": { + "id": "compute.licenseCodes.getIamPolicy", + "path": "{project}/global/licenseCodes/{resource}/getIamPolicy", + "httpMethod": "GET", + "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setIamPolicy": { + "id": "compute.licenseCodes.setIamPolicy", + "path": "{project}/global/licenseCodes/{resource}/setIamPolicy", + "httpMethod": "POST", + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "Policy" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "testIamPermissions": { + "id": "compute.licenseCodes.testIamPermissions", + "path": "{project}/global/licenseCodes/{resource}/testIamPermissions", + "httpMethod": "POST", + "description": "Returns permissions that a caller has on the specified resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "resource": { + "type": "string", + "description": "Name of the resource for this request.", + "required": true, + "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "resource" + ], + "request": { + "$ref": "TestPermissionsRequest" + }, + "response": { + "$ref": "TestPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] } } }, diff --git a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go index 23312414c..ca01e7d57 100644 --- a/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v0.alpha/compute-gen.go @@ -1409,7 +1409,7 @@ func (s *AccessConfig) MarshalJSON() ([]byte, error) { // Address: A reserved address resource. type Address struct { - // Address: The static external IP address represented by this resource. + // Address: The static IP address represented by this resource. Address string `json:"address,omitempty"` // AddressType: The type of address to reserve. If unspecified, defaults @@ -3771,12 +3771,20 @@ type BackendService struct { // When the load balancing scheme is INTERNAL, this field is not used. AffinityCookieTtlSec int64 `json:"affinityCookieTtlSec,omitempty"` + // AppEngineBackend: Directs request to an App Engine app. + // cloudFunctionBackend and backends[] must be empty if this is set. + AppEngineBackend *BackendServiceAppEngineBackend `json:"appEngineBackend,omitempty"` + // Backends: The list of backends that serve this BackendService. Backends []*Backend `json:"backends,omitempty"` // CdnPolicy: Cloud CDN configuration for this BackendService. CdnPolicy *BackendServiceCdnPolicy `json:"cdnPolicy,omitempty"` + // CloudFunctionBackend: Directs request to a cloud function. + // appEngineBackend and backends[] must be empty if this is set. + CloudFunctionBackend *BackendServiceCloudFunctionBackend `json:"cloudFunctionBackend,omitempty"` + ConnectionDraining *ConnectionDraining `json:"connectionDraining,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -4090,6 +4098,45 @@ func (s *BackendServiceAggregatedListWarningData) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendServiceAppEngineBackend: Configuration of a App Engine +// backend. +type BackendServiceAppEngineBackend struct { + // AppEngineService: Optional. App Engine app service name. + AppEngineService string `json:"appEngineService,omitempty"` + + // TargetProject: Required. Project ID of the project hosting the app. + // This is the project ID of this project. Reference to another project + // is not allowed. + TargetProject string `json:"targetProject,omitempty"` + + // Version: Optional. Version of App Engine app service. When empty, App + // Engine will do its normal traffic split. + Version string `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AppEngineService") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AppEngineService") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceAppEngineBackend) MarshalJSON() ([]byte, error) { + type noMethod BackendServiceAppEngineBackend + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BackendServiceCdnPolicy: Message containing Cloud CDN configuration // for a backend service. type BackendServiceCdnPolicy struct { @@ -4134,6 +4181,40 @@ func (s *BackendServiceCdnPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// BackendServiceCloudFunctionBackend: Configuration of a Cloud Function +// backend. +type BackendServiceCloudFunctionBackend struct { + // FunctionName: Required. A cloud function name. Special value ?*? + // represents all cloud functions in the project. + FunctionName string `json:"functionName,omitempty"` + + // TargetProject: Required. Project ID of the project hosting the cloud + // function. + TargetProject string `json:"targetProject,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FunctionName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FunctionName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BackendServiceCloudFunctionBackend) MarshalJSON() ([]byte, error) { + type noMethod BackendServiceCloudFunctionBackend + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type BackendServiceFailoverPolicy struct { // DisableConnectionDrainOnFailover: On failover or failback, this field // indicates whether connection drain will be honored. Setting this to @@ -8043,8 +8124,7 @@ type GuestOsFeature struct { // Type: The type of supported feature. Currently only // VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the // server might also populate this property with the value WINDOWS to - // indicate that this is a Windows image. This value is purely - // informational and does not enable or disable any features. + // indicate that this is a Windows image. // // Possible values: // "FEATURE_TYPE_UNSPECIFIED" @@ -10276,10 +10356,9 @@ type Image struct { // higher. Linux images with kernel versions 3.17 and higher will // support VIRTIO_SCSI_MULTIQUEUE. // - // For new Windows images, the server might also populate this field - // with the value WINDOWS, to indicate that this is a Windows image. - // This value is purely informational and does not enable or disable any - // features. + // For newer Windows images, the server might also populate this + // property with the value WINDOWS to indicate that this is a Windows + // image. GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -23698,7 +23777,7 @@ type Snapshot struct { // "UPLOADING" Status string `json:"status,omitempty"` - // StorageBytes: [Output Only] A size of the the storage used by the + // StorageBytes: [Output Only] A size of 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"` @@ -70661,6 +70740,453 @@ func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, er } +// method id "compute.licenseCodes.getIamPolicy": + +type LicenseCodesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be +// empty if no such policy or resource exists. +func (r *LicenseCodesService) GetIamPolicy(project string, resource string) *LicenseCodesGetIamPolicyCall { + c := &LicenseCodesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LicenseCodesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicenseCodesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *LicenseCodesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicenseCodesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LicenseCodesGetIamPolicyCall) Context(ctx context.Context) *LicenseCodesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LicenseCodesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LicenseCodesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenseCodes/{resource}/getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("GET", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.licenseCodes.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *LicenseCodesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. May be empty if no such policy or resource exists.", + // "httpMethod": "GET", + // "id": "compute.licenseCodes.getIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/licenseCodes/{resource}/getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.licenseCodes.setIamPolicy": + +type LicenseCodesSetIamPolicyCall struct { + s *Service + project string + resource string + policy *Policy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. +func (r *LicenseCodesService) SetIamPolicy(project string, resource string, policy *Policy) *LicenseCodesSetIamPolicyCall { + c := &LicenseCodesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.policy = policy + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LicenseCodesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicenseCodesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LicenseCodesSetIamPolicyCall) Context(ctx context.Context) *LicenseCodesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LicenseCodesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LicenseCodesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.policy) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenseCodes/{resource}/setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.licenseCodes.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *LicenseCodesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + // "httpMethod": "POST", + // "id": "compute.licenseCodes.setIamPolicy", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "[a-z0-9](?:[-a-z0-9_]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/licenseCodes/{resource}/setIamPolicy", + // "request": { + // "$ref": "Policy" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.licenseCodes.testIamPermissions": + +type LicenseCodesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the +// specified resource. +func (r *LicenseCodesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicenseCodesTestIamPermissionsCall { + c := &LicenseCodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LicenseCodesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicenseCodesTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LicenseCodesTestIamPermissionsCall) Context(ctx context.Context) *LicenseCodesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LicenseCodesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenseCodes/{resource}/testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.licenseCodes.testIamPermissions" call. +// Exactly one of *TestPermissionsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has on the specified resource.", + // "httpMethod": "POST", + // "id": "compute.licenseCodes.testIamPermissions", + // "parameterOrder": [ + // "project", + // "resource" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "resource": { + // "description": "Name of the resource for this request.", + // "location": "path", + // "pattern": "(?:[-a-z0-9_]{0,62}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/licenseCodes/{resource}/testIamPermissions", + // "request": { + // "$ref": "TestPermissionsRequest" + // }, + // "response": { + // "$ref": "TestPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + // method id "compute.licenses.delete": type LicensesDeleteCall struct { diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json index 4967d441d..10446d78f 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-api.json +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/QIBUrC-C0KuVnsoUFunufep6MGE\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/2Jt9iILNSBvotCe8YWfswUcsXKc\"", "discoveryVersion": "v1", "id": "compute:beta", "name": "compute", "version": "beta", - "revision": "20170905", + "revision": "20170908", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -454,6 +454,14 @@ "type": "string", "description": "An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance." }, + "publicPtrDomainName": { + "type": "string", + "description": "The DNS domain name for the public PTR record. This field can only be set when the set_public_ptr field is enabled." + }, + "setPublicPtr": { + "type": "boolean", + "description": "Specifies whether a public DNS ?PTR? record should be created to map the external IP address of the instance to a DNS domain name." + }, "type": { "type": "string", "description": "The type of configuration. The default and only option is ONE_TO_ONE_NAT.", @@ -474,7 +482,7 @@ "properties": { "address": { "type": "string", - "description": "The static external IP address represented by this resource." + "description": "The static IP address represented by this resource." }, "addressType": { "type": "string", @@ -4408,7 +4416,7 @@ "properties": { "type": { "type": "string", - "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", "MULTI_IP_SUBNET", @@ -5113,7 +5121,7 @@ }, "guestOsFeatures": { "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image.", "items": { "$ref": "GuestOsFeature" } @@ -9063,6 +9071,11 @@ "$ref": "AliasIpRange" } }, + "fingerprint": { + "type": "string", + "description": "Fingerprint hash of contents stored in this network interface. This field will be ignored when inserting an Instance or adding a NetworkInterface. An up-to-date fingerprint must be provided in order to update the NetworkInterface.", + "format": "byte" + }, "kind": { "type": "string", "description": "[Output Only] Type of the resource. Always compute#networkInterface for network interfaces.", @@ -12126,7 +12139,7 @@ }, "storageBytes": { "type": "string", - "description": "[Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", + "description": "[Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", "format": "int64" }, "storageBytesStatus": { @@ -12390,6 +12403,10 @@ "type": "object", "description": "A Subnetwork resource.", "properties": { + "allowSubnetCidrRoutesOverlap": { + "type": "boolean", + "description": "Whether this subnetwork can conflict with static routes. Setting this to true allows this subnetwork's primary and secondary ranges to conflict with routes that have already been configured on the corresponding network. Static routes will take precedence over the subnetwork route if the route prefix length is at least as large as the subnetwork prefix length.\n\nAlso, packets destined to IPs within subnetwork may contain private/sensitive data and are prevented from leaving the virtual network. Setting this field to true will disable this feature.\n\nThe default value is false and applies to all existing subnetworks and automatically created subnetworks.\n\nThis field cannot be set to true at resource creation time." + }, "creationTimestamp": { "type": "string", "description": "[Output Only] Creation timestamp in RFC3339 text format." @@ -12398,6 +12415,11 @@ "type": "string", "description": "An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time." }, + "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 Subnetwork. An up-to-date fingerprint must be provided in order to update the Subnetwork.", + "format": "byte" + }, "gatewayAddress": { "type": "string", "description": "[Output Only] The gateway address for default routes to reach destination addresses outside this subnetwork. This field can be set only at resource creation time." @@ -22977,6 +22999,118 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "updateAccessConfig": { + "id": "compute.instances.updateAccessConfig", + "path": "{project}/zones/{zone}/instances/{instance}/updateAccessConfig", + "httpMethod": "POST", + "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + "parameters": { + "instance": { + "type": "string", + "description": "The instance name for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "networkInterface": { + "type": "string", + "description": "The name of the network interface where the access config is attached.", + "required": true, + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "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/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "updateNetworkInterface": { + "id": "compute.instances.updateNetworkInterface", + "path": "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", + "httpMethod": "PATCH", + "description": "Updates an instance's network interface. This method follows PATCH semantics.", + "parameters": { + "instance": { + "type": "string", + "description": "The instance name for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "networkInterface": { + "type": "string", + "description": "The name of the network interface to update.", + "required": true, + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance", + "networkInterface" + ], + "request": { + "$ref": "NetworkInterface" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -28263,6 +28397,55 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "patch": { + "id": "compute.subnetworks.patch", + "path": "{project}/regions/{region}/subnetworks/{subnetwork}", + "httpMethod": "PATCH", + "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range and allow_subnet_cidr_routes_overlap. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "requestId": { + "type": "string", + "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query" + }, + "subnetwork": { + "type": "string", + "description": "Name of the Subnetwork resource to patch.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "subnetwork" + ], + "request": { + "$ref": "Subnetwork" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setIamPolicy": { "id": "compute.subnetworks.setIamPolicy", "path": "{project}/regions/{region}/subnetworks/{resource}/setIamPolicy", diff --git a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go index 10fb11787..71f1cfb7b 100644 --- a/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v0.beta/compute-gen.go @@ -1247,6 +1247,15 @@ type AccessConfig struct { // live in the same region as the zone of the instance. NatIP string `json:"natIP,omitempty"` + // PublicPtrDomainName: The DNS domain name for the public PTR record. + // This field can only be set when the set_public_ptr field is enabled. + PublicPtrDomainName string `json:"publicPtrDomainName,omitempty"` + + // SetPublicPtr: Specifies whether a public DNS ?PTR? record should be + // created to map the external IP address of the instance to a DNS + // domain name. + SetPublicPtr bool `json:"setPublicPtr,omitempty"` + // Type: The type of configuration. The default and only option is // ONE_TO_ONE_NAT. // @@ -1279,7 +1288,7 @@ func (s *AccessConfig) MarshalJSON() ([]byte, error) { // Address: A reserved address resource. type Address struct { - // Address: The static external IP address represented by this resource. + // Address: The static IP address represented by this resource. Address string `json:"address,omitempty"` // AddressType: The type of address to reserve. If unspecified, defaults @@ -7467,8 +7476,7 @@ type GuestOsFeature struct { // Type: The type of supported feature. Currently only // VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the // server might also populate this property with the value WINDOWS to - // indicate that this is a Windows image. This value is purely - // informational and does not enable or disable any features. + // indicate that this is a Windows image. // // Possible values: // "FEATURE_TYPE_UNSPECIFIED" @@ -8476,10 +8484,9 @@ type Image struct { // higher. Linux images with kernel versions 3.17 and higher will // support VIRTIO_SCSI_MULTIQUEUE. // - // For new Windows images, the server might also populate this field - // with the value WINDOWS, to indicate that this is a Windows image. - // This value is purely informational and does not enable or disable any - // features. + // For newer Windows images, the server might also populate this + // property with the value WINDOWS to indicate that this is a Windows + // image. GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -14438,6 +14445,12 @@ type NetworkInterface struct { // subnet-mode networks. AliasIpRanges []*AliasIpRange `json:"aliasIpRanges,omitempty"` + // Fingerprint: Fingerprint hash of contents stored in this network + // interface. This field will be ignored when inserting an Instance or + // adding a NetworkInterface. An up-to-date fingerprint must be provided + // in order to update the NetworkInterface. + Fingerprint string `json:"fingerprint,omitempty"` + // Kind: [Output Only] Type of the resource. Always // compute#networkInterface for network interfaces. Kind string `json:"kind,omitempty"` @@ -19088,7 +19101,7 @@ type Snapshot struct { // "UPLOADING" Status string `json:"status,omitempty"` - // StorageBytes: [Output Only] A size of the the storage used by the + // StorageBytes: [Output Only] A size of 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"` @@ -19499,6 +19512,23 @@ func (s *SslCertificateListWarningData) MarshalJSON() ([]byte, error) { // Subnetwork: A Subnetwork resource. type Subnetwork struct { + // AllowSubnetCidrRoutesOverlap: Whether this subnetwork can conflict + // with static routes. Setting this to true allows this subnetwork's + // primary and secondary ranges to conflict with routes that have + // already been configured on the corresponding network. Static routes + // will take precedence over the subnetwork route if the route prefix + // length is at least as large as the subnetwork prefix length. + // + // Also, packets destined to IPs within subnetwork may contain + // private/sensitive data and are prevented from leaving the virtual + // network. Setting this field to true will disable this feature. + // + // The default value is false and applies to all existing subnetworks + // and automatically created subnetworks. + // + // This field cannot be set to true at resource creation time. + AllowSubnetCidrRoutesOverlap bool `json:"allowSubnetCidrRoutesOverlap,omitempty"` + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` @@ -19508,6 +19538,12 @@ type Subnetwork struct { // resource creation time. 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 Subnetwork. An up-to-date + // fingerprint must be provided in order to update the Subnetwork. + Fingerprint string `json:"fingerprint,omitempty"` + // GatewayAddress: [Output Only] The gateway address for default routes // to reach destination addresses outside this subnetwork. This field // can be set only at resource creation time. @@ -19566,21 +19602,22 @@ type Subnetwork struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreationTimestamp") - // to unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AllowSubnetCidrRoutesOverlap") to unconditionally include in API + // requests. By default, fields with empty values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreationTimestamp") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "AllowSubnetCidrRoutesOverlap") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -55146,6 +55183,388 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes } +// method id "compute.instances.updateAccessConfig": + +type InstancesUpdateAccessConfigCall struct { + s *Service + project string + zone string + instance string + accessconfig *AccessConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateAccessConfig: Updates the specified access config from an +// instance's network interface with the data included in the request. +// This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. +func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { + c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.urlParams_.Set("networkInterface", networkInterface) + c.accessconfig = accessconfig + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesUpdateAccessConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateAccessConfig") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("POST", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.updateAccessConfig" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.", + // "httpMethod": "POST", + // "id": "compute.instances.updateAccessConfig", + // "parameterOrder": [ + // "project", + // "zone", + // "instance", + // "networkInterface" + // ], + // "parameters": { + // "instance": { + // "description": "The instance name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "networkInterface": { + // "description": "The name of the network interface where the access config is attached.", + // "location": "query", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/updateAccessConfig", + // "request": { + // "$ref": "AccessConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.updateNetworkInterface": + +type InstancesUpdateNetworkInterfaceCall struct { + s *Service + project string + zone string + instance string + networkinterface *NetworkInterface + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateNetworkInterface: Updates an instance's network interface. This +// method follows PATCH semantics. +func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { + c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.urlParams_.Set("networkInterface", networkInterface) + c.networkinterface = networkinterface + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkinterface) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.updateNetworkInterface" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an instance's network interface. This method follows PATCH semantics.", + // "httpMethod": "PATCH", + // "id": "compute.instances.updateNetworkInterface", + // "parameterOrder": [ + // "project", + // "zone", + // "instance", + // "networkInterface" + // ], + // "parameters": { + // "instance": { + // "description": "The instance name for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "networkInterface": { + // "description": "The name of the network interface to update.", + // "location": "query", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "The name of the zone for this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/updateNetworkInterface", + // "request": { + // "$ref": "NetworkInterface" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.interconnectAttachments.aggregatedList": type InterconnectAttachmentsAggregatedListCall struct { @@ -77404,6 +77823,191 @@ func (c *SubnetworksListCall) Pages(ctx context.Context, f func(*SubnetworkList) } } +// method id "compute.subnetworks.patch": + +type SubnetworksPatchCall struct { + s *Service + project string + region string + subnetwork string + subnetwork2 *Subnetwork + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified subnetwork with the data included in the +// request. Only the following fields within the subnetwork resource can +// be specified in the request: secondary_ip_range and +// allow_subnet_cidr_routes_overlap. It is also mandatory to specify the +// current fingeprint of the subnetwork resource being patched. +func (r *SubnetworksService) Patch(project string, region string, subnetwork string, subnetwork2 *Subnetwork) *SubnetworksPatchCall { + c := &SubnetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.subnetwork = subnetwork + c.subnetwork2 = subnetwork2 + return c +} + +// RequestId sets the optional parameter "requestId": An optional +// request ID to identify requests. Specify a unique request ID so that +// if you must retry your request, the server will know to ignore the +// request if it has already been completed. +// +// For example, consider a situation where you make an initial request +// and the request times out. If you make the request again with the +// same request ID, the server can check if original operation with the +// same request ID was received, and if so, will ignore the second +// request. This prevents clients from accidentally creating duplicate +// commitments. +// +// The request ID must be a valid UUID with the exception that zero UUID +// is not supported (00000000-0000-0000-0000-000000000000). +func (c *SubnetworksPatchCall) RequestId(requestId string) *SubnetworksPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SubnetworksPatchCall) Fields(s ...googleapi.Field) *SubnetworksPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *SubnetworksPatchCall) Context(ctx context.Context) *SubnetworksPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *SubnetworksPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *SubnetworksPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.subnetwork2) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/subnetworks/{subnetwork}") + urls += "?" + c.urlParams_.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "subnetwork": c.subnetwork, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.subnetworks.patch" call. +// Exactly one of *Operation or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified +// to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *SubnetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, &googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + } + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := json.NewDecoder(res.Body).Decode(target); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range and allow_subnet_cidr_routes_overlap. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched.", + // "httpMethod": "PATCH", + // "id": "compute.subnetworks.patch", + // "parameterOrder": [ + // "project", + // "region", + // "subnetwork" + // ], + // "parameters": { + // "project": { + // "description": "Project ID for this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "requestId": { + // "description": "An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.\n\nFor example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.\n\nThe request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + // "location": "query", + // "type": "string" + // }, + // "subnetwork": { + // "description": "Name of the Subnetwork resource to patch.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/subnetworks/{subnetwork}", + // "request": { + // "$ref": "Subnetwork" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + // method id "compute.subnetworks.setIamPolicy": type SubnetworksSetIamPolicyCall struct { diff --git a/vendor/google.golang.org/api/compute/v1/compute-api.json b/vendor/google.golang.org/api/compute/v1/compute-api.json index 95ca7af20..faef7b2f5 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-api.json +++ b/vendor/google.golang.org/api/compute/v1/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/bvUbOBPnfuX4gDZ5aBr7PZU4ZJM\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/cngOjaowRI92cKIanqfdVBHzE7E\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20170905", + "revision": "20170908", "title": "Compute Engine API", "description": "Creates and runs virtual machines on Google Cloud Platform.", "ownerDomain": "google.com", @@ -20,7 +20,7 @@ "basePath": "/compute/v1/projects/", "rootUrl": "https://www.googleapis.com/", "servicePath": "compute/v1/projects/", - "batchPath": "batch", + "batchPath": "batch/compute/v1", "parameters": { "alt": { "type": "string", @@ -336,7 +336,7 @@ "properties": { "address": { "type": "string", - "description": "The static external IP address represented by this resource." + "description": "The static IP address represented by this resource." }, "creationTimestamp": { "type": "string", @@ -2805,7 +2805,7 @@ "properties": { "type": { "type": "string", - "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "The type of supported feature. Currently only VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image.", "enum": [ "FEATURE_TYPE_UNSPECIFIED", "VIRTIO_SCSI_MULTIQUEUE", @@ -3296,7 +3296,7 @@ }, "guestOsFeatures": { "type": "array", - "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor new Windows images, the server might also populate this field with the value WINDOWS, to indicate that this is a Windows image. This value is purely informational and does not enable or disable any features.", + "description": "A list of features to enable on the guest OS. Applicable for bootable images only. Currently, only one feature can be enabled, VIRTIO_SCSI_MULTIQUEUE, which allows each virtual CPU to have its own queue. For Windows images, you can only enable VIRTIO_SCSI_MULTIQUEUE on images with driver version 1.2.0.1621 or higher. Linux images with kernel versions 3.17 and higher will support VIRTIO_SCSI_MULTIQUEUE.\n\nFor newer Windows images, the server might also populate this property with the value WINDOWS to indicate that this is a Windows image.", "items": { "$ref": "GuestOsFeature" } @@ -3390,6 +3390,18 @@ "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." }, + "sourceImage": { + "type": "string", + "description": "URL of the source image used to create this image. This can be a full or valid partial URL. You must provide exactly one of: \n- this property, or \n- the rawDisk.source property, or \n- the sourceDisk property in order to create an image." + }, + "sourceImageEncryptionKey": { + "$ref": "CustomerEncryptionKey", + "description": "The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key." + }, + "sourceImageId": { + "type": "string", + "description": "[Output Only] The ID value of the image used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given image name." + }, "sourceType": { "type": "string", "description": "The type of the image used to create this disk. The default and only value is RAW", @@ -7117,7 +7129,7 @@ }, "storageBytes": { "type": "string", - "description": "[Output Only] A size of the the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", + "description": "[Output Only] A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion.", "format": "int64" }, "storageBytesStatus": { diff --git a/vendor/google.golang.org/api/compute/v1/compute-gen.go b/vendor/google.golang.org/api/compute/v1/compute-gen.go index 422d803fa..7d4608efc 100644 --- a/vendor/google.golang.org/api/compute/v1/compute-gen.go +++ b/vendor/google.golang.org/api/compute/v1/compute-gen.go @@ -1033,7 +1033,7 @@ func (s *AccessConfig) MarshalJSON() ([]byte, error) { // Address: A reserved address resource. type Address struct { - // Address: The static external IP address represented by this resource. + // Address: The static IP address represented by this resource. Address string `json:"address,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -5049,8 +5049,7 @@ type GuestOsFeature struct { // Type: The type of supported feature. Currently only // VIRTIO_SCSI_MULTIQUEUE is supported. For newer Windows images, the // server might also populate this property with the value WINDOWS to - // indicate that this is a Windows image. This value is purely - // informational and does not enable or disable any features. + // indicate that this is a Windows image. // // Possible values: // "FEATURE_TYPE_UNSPECIFIED" @@ -5758,10 +5757,9 @@ type Image struct { // higher. Linux images with kernel versions 3.17 and higher will // support VIRTIO_SCSI_MULTIQUEUE. // - // For new Windows images, the server might also populate this field - // with the value WINDOWS, to indicate that this is a Windows image. - // This value is purely informational and does not enable or disable any - // features. + // For newer Windows images, the server might also populate this + // property with the value WINDOWS to indicate that this is a Windows + // image. GuestOsFeatures []*GuestOsFeature `json:"guestOsFeatures,omitempty"` // Id: [Output Only] The unique identifier for the resource. This @@ -5840,6 +5838,24 @@ type Image struct { // the current or a previous instance of a given disk name. SourceDiskId string `json:"sourceDiskId,omitempty"` + // SourceImage: URL of the source image used to create this image. This + // can be a full or valid partial URL. You must provide exactly one of: + // + // - this property, or + // - the rawDisk.source property, or + // - the sourceDisk property in order to create an image. + SourceImage string `json:"sourceImage,omitempty"` + + // SourceImageEncryptionKey: The customer-supplied encryption key of the + // source image. Required if the source image is protected by a + // customer-supplied encryption key. + SourceImageEncryptionKey *CustomerEncryptionKey `json:"sourceImageEncryptionKey,omitempty"` + + // SourceImageId: [Output Only] The ID value of the image used to create + // this image. This value may be used to determine whether the image was + // taken from the current or a previous instance of a given image name. + SourceImageId string `json:"sourceImageId,omitempty"` + // SourceType: The type of the image used to create this disk. The // default and only value is RAW // @@ -11638,7 +11654,7 @@ type Snapshot struct { // "UPLOADING" Status string `json:"status,omitempty"` - // StorageBytes: [Output Only] A size of the the storage used by the + // StorageBytes: [Output Only] A size of 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"` diff --git a/vendor/google.golang.org/api/container/v1/container-api.json b/vendor/google.golang.org/api/container/v1/container-api.json index 0a294556f..e709291c9 100644 --- a/vendor/google.golang.org/api/container/v1/container-api.json +++ b/vendor/google.golang.org/api/container/v1/container-api.json @@ -1,21 +1,38 @@ { - "ownerName": "Google", + "rootUrl": "https://container.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "container", + "batchPath": "batch", + "documentationLink": "https://cloud.google.com/container-engine/", + "id": "container:v1", + "revision": "20170915", + "title": "Google Container Engine API", "discoveryVersion": "v1", + "ownerName": "Google", "resources": { "projects": { "resources": { "zones": { "methods": { "getServerconfig": { + "response": { + "$ref": "ServerConfig" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "type": "string", - "required": true, - "location": "path" + "required": true }, "zone": { "location": "path", @@ -27,135 +44,102 @@ "flatPath": "v1/projects/{projectId}/zones/{zone}/serverconfig", "id": "container.projects.zones.getServerconfig", "path": "v1/projects/{projectId}/zones/{zone}/serverconfig", - "description": "Returns configuration info about the Container Engine service.", - "response": { - "$ref": "ServerConfig" - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "httpMethod": "GET" + "description": "Returns configuration info about the Container Engine service." } }, "resources": { - "operations": { + "clusters": { "methods": { - "cancel": { - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "httpMethod": "POST", - "parameters": { - "operationId": { - "description": "The server-assigned `name` of the operation.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - "id": "container.projects.zones.operations.cancel", - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", - "description": "Cancels the specified operation.", - "request": { - "$ref": "CancelOperationRequest" - } - }, - "get": { + "update": { "response": { "$ref": "Operation" }, "parameterOrder": [ "projectId", "zone", - "operationId" + "clusterId" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" ], - "httpMethod": "GET", "parameters": { - "operationId": { + "projectId": { "location": "path", - "description": "The server-assigned `name` of the operation.", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "type": "string", "required": true }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "id": "container.projects.zones.operations.get", - "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "description": "Gets the specified operation." + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.update", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "request": { + "$ref": "UpdateClusterRequest" + }, + "description": "Updates the settings of a specific cluster." }, - "list": { + "monitoring": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", + "id": "container.projects.zones.clusters.monitoring", + "request": { + "$ref": "SetMonitoringServiceRequest" + }, + "description": "Sets the monitoring service of a specific cluster.", + "httpMethod": "POST", "parameterOrder": [ "projectId", - "zone" + "zone", + "clusterId" ], - "httpMethod": "GET", "response": { - "$ref": "ListOperationsResponse" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "type": "string", - "required": true, - "location": "path" + "required": true }, "zone": { - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to upgrade." } + } + }, + "master": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", + "id": "container.projects.zones.clusters.master", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", + "request": { + "$ref": "UpdateMasterRequest" }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", - "id": "container.projects.zones.operations.list", - "path": "v1/projects/{projectId}/zones/{zone}/operations", - "description": "Lists all operations in a project in a specific zone or all zones." - } - } - }, - "clusters": { - "methods": { - "resourceLabels": { + "description": "Updates the master of a specific cluster.", "response": { "$ref": "Operation" }, @@ -169,34 +153,143 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "clusterId": { - "description": "The name of the cluster.", + "projectId": { "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to upgrade." + } + } + }, + "setMasterAuth": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "id": "container.projects.zones.clusters.setMasterAuth", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", + "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set the password.", + "request": { + "$ref": "SetMasterAuthRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "logging": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to upgrade." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", + "id": "container.projects.zones.clusters.logging", + "description": "Sets the logging service of a specific cluster.", + "request": { + "$ref": "SetLoggingServiceRequest" + } + }, + "list": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "zone" + ], + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { "projectId": { "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "type": "string", "required": true }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.", "type": "string", - "required": true, - "location": "path" + "required": true } }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "id": "container.projects.zones.clusters.resourceLabels", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "request": { - "$ref": "SetLabelsRequest" - }, - "description": "Sets labels on a cluster." + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", + "path": "v1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.list", + "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." }, "create": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.create", + "path": "v1/projects/{projectId}/zones/{zone}/clusters", "request": { "$ref": "CreateClusterRequest" }, @@ -214,68 +307,61 @@ ], "parameters": { "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "id": "container.projects.zones.clusters.create", - "path": "v1/projects/{projectId}/zones/{zone}/clusters" + } }, - "completeIpRotation": { - "id": "container.projects.zones.clusters.completeIpRotation", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - "request": { - "$ref": "CompleteIPRotationRequest" - }, - "description": "Completes master IP rotation.", - "response": { - "$ref": "Operation" - }, + "resourceLabels": { + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster." + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation" - }, - "setNetworkPolicy": { - "description": "Enables/Disables Network Policy for a cluster.", + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "id": "container.projects.zones.clusters.resourceLabels", + "description": "Sets labels on a cluster.", "request": { - "$ref": "SetNetworkPolicyRequest" - }, + "$ref": "SetLabelsRequest" + } + }, + "completeIpRotation": { "response": { "$ref": "Operation" }, @@ -286,42 +372,87 @@ ], "httpMethod": "POST", "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, "clusterId": { "location": "path", "description": "The name of the cluster.", "type": "string", "required": true - }, + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "id": "container.projects.zones.clusters.completeIpRotation", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "description": "Completes master IP rotation.", + "request": { + "$ref": "CompleteIPRotationRequest" + } + }, + "setNetworkPolicy": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", "type": "string", - "required": true, - "location": "path" + "required": true }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster." } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", "id": "container.projects.zones.clusters.setNetworkPolicy", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy" + "description": "Enables/Disables Network Policy for a cluster.", + "request": { + "$ref": "SetNetworkPolicyRequest" + } }, "legacyAbac": { - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, "parameters": { "projectId": { "location": "path", @@ -330,42 +461,46 @@ "required": true }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." }, "clusterId": { + "location": "path", "description": "The name of the cluster to update.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "id": "container.projects.zones.clusters.legacyAbac", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "id": "container.projects.zones.clusters.legacyAbac", "description": "Enables or disables the ABAC authorization mechanism on a cluster.", "request": { "$ref": "SetLegacyAbacRequest" } }, "get": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "id": "container.projects.zones.clusters.get", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "description": "Gets the details of a specific cluster.", + "response": { + "$ref": "Cluster" + }, "parameterOrder": [ "projectId", "zone", "clusterId" ], - "response": { - "$ref": "Cluster" - }, "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "projectId": { "location": "path", @@ -374,40 +509,40 @@ "required": true }, "zone": { + "location": "path", "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", - "required": true, - "location": "path" + "required": true }, "clusterId": { - "location": "path", - "description": "The name of the cluster to retrieve.", "type": "string", - "required": true + "required": true, + "location": "path", + "description": "The name of the cluster to retrieve." } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" + } }, "startIpRotation": { - "httpMethod": "POST", + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "id": "container.projects.zones.clusters.startIpRotation", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "request": { + "$ref": "StartIPRotationRequest" + }, + "description": "Start master IP rotation.", + "response": { + "$ref": "Operation" + }, "parameterOrder": [ "projectId", "zone", "clusterId" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - }, "projectId": { "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", @@ -415,28 +550,20 @@ "required": true }, "zone": { + "location": "path", "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", - "required": true, - "location": "path" + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "type": "string", + "required": true } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - "id": "container.projects.zones.clusters.startIpRotation", - "description": "Start master IP rotation.", - "request": { - "$ref": "StartIPRotationRequest" } }, "addons": { - "description": "Sets the addons of a specific cluster.", - "request": { - "$ref": "SetAddonsConfigRequest" - }, "response": { "$ref": "Operation" }, @@ -448,10 +575,10 @@ "httpMethod": "POST", "parameters": { "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "type": "string", - "required": true + "required": true, + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." }, "zone": { "location": "path", @@ -471,13 +598,13 @@ ], "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", "id": "container.projects.zones.clusters.addons", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons" + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/addons", + "description": "Sets the addons of a specific cluster.", + "request": { + "$ref": "SetAddonsConfigRequest" + } }, "setMaintenancePolicy": { - "description": "Sets the maintenance policy for a cluster.", - "request": { - "$ref": "SetMaintenancePolicyRequest" - }, "httpMethod": "POST", "parameterOrder": [ "projectId", @@ -488,23 +615,23 @@ "$ref": "Operation" }, "parameters": { - "clusterId": { - "description": "The name of the cluster to update.", - "type": "string", - "required": true, - "location": "path" - }, "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." }, "zone": { "location": "path", "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to update.", + "type": "string", + "required": true } }, "scopes": [ @@ -512,9 +639,22 @@ ], "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", - "id": "container.projects.zones.clusters.setMaintenancePolicy" + "id": "container.projects.zones.clusters.setMaintenancePolicy", + "description": "Sets the maintenance policy for a cluster.", + "request": { + "$ref": "SetMaintenancePolicyRequest" + } }, "delete": { + "httpMethod": "DELETE", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, "parameters": { "projectId": { "location": "path", @@ -523,10 +663,10 @@ "required": true }, "zone": { + "location": "path", "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", - "required": true, - "location": "path" + "required": true }, "clusterId": { "location": "path", @@ -541,391 +681,54 @@ "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "id": "container.projects.zones.clusters.delete", - "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, + "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time." + }, + "locations": { + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" - ] - }, - "locations": { + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to upgrade.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations", "id": "container.projects.zones.clusters.locations", "request": { "$ref": "SetLocationsRequest" }, - "description": "Sets the locations of a specific cluster.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/locations" - }, - "update": { - "description": "Updates the settings of a specific cluster.", - "request": { - "$ref": "UpdateClusterRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "PUT", - "parameters": { - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "id": "container.projects.zones.clusters.update", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" - }, - "monitoring": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "id": "container.projects.zones.clusters.monitoring", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/monitoring", - "request": { - "$ref": "SetMonitoringServiceRequest" - }, - "description": "Sets the monitoring service of a specific cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST" - }, - "master": { - "description": "Updates the master of a specific cluster.", - "request": { - "$ref": "UpdateMasterRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/master", - "id": "container.projects.zones.clusters.master" - }, - "setMasterAuth": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "parameters": { - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "id": "container.projects.zones.clusters.setMasterAuth", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMasterAuth", - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set the password.", - "request": { - "$ref": "SetMasterAuthRequest" - } - }, - "logging": { - "id": "container.projects.zones.clusters.logging", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging", - "request": { - "$ref": "SetLoggingServiceRequest" - }, - "description": "Sets the logging service of a specific cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/logging" - }, - "list": { - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters", - "path": "v1/projects/{projectId}/zones/{zone}/clusters", - "id": "container.projects.zones.clusters.list", - "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", - "httpMethod": "GET", - "response": { - "$ref": "ListClustersResponse" - }, - "parameterOrder": [ - "projectId", - "zone" - ] + "description": "Sets the locations of a specific cluster." } }, "resources": { "nodePools": { "methods": { - "create": { - "request": { - "$ref": "CreateNodePoolRequest" - }, - "description": "Creates a node pool for a cluster.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "id": "container.projects.zones.clusters.nodePools.create" - }, - "autoscaling": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterId": { - "description": "The name of the cluster to upgrade.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "description": "The name of the node pool to upgrade.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - "id": "container.projects.zones.clusters.nodePools.autoscaling", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", - "request": { - "$ref": "SetNodePoolAutoscalingRequest" - }, - "description": "Sets the autoscaling settings of a specific node pool.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST" - }, "get": { - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.get", - "description": "Retrieves the node pool requested.", "httpMethod": "GET", "parameterOrder": [ "projectId", @@ -941,10 +744,10 @@ ], "parameters": { "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", "type": "string", "required": true, - "location": "path" + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber)." }, "zone": { "location": "path", @@ -953,210 +756,217 @@ "required": true }, "clusterId": { + "location": "path", "description": "The name of the cluster.", "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "location": "path", - "description": "The name of the node pool.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}" - }, - "update": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "httpMethod": "POST", - "parameters": { - "clusterId": { - "location": "path", - "description": "The name of the cluster to upgrade.", - "type": "string", "required": true }, "nodePoolId": { - "description": "The name of the node pool to upgrade.", "type": "string", "required": true, - "location": "path" - }, - "projectId": { "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "id": "container.projects.zones.clusters.nodePools.update", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", - "description": "Updates the version and/or image type of a specific node pool.", - "request": { - "$ref": "UpdateNodePoolRequest" - } - }, - "setSize": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterId": { - "description": "The name of the cluster to update.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "description": "The name of the node pool to update.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", - "id": "container.projects.zones.clusters.nodePools.setSize", - "request": { - "$ref": "SetNodePoolSizeRequest" - }, - "description": "Sets the size of a specific node pool.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - } - }, - "setManagement": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to update.", - "type": "string", - "required": true - }, - "nodePoolId": { - "description": "The name of the node pool to update.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "id": "container.projects.zones.clusters.nodePools.setManagement", - "request": { - "$ref": "SetNodePoolManagementRequest" - }, - "description": "Sets the NodeManagement options for a node pool.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - } - }, - "delete": { - "description": "Deletes a node pool from a cluster.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "clusterId": { - "description": "The name of the cluster.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "description": "The name of the node pool to delete.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", - "type": "string", - "required": true, - "location": "path" - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string", - "required": true + "description": "The name of the node pool." } }, "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.delete" + "id": "container.projects.zones.clusters.nodePools.get", + "description": "Retrieves the node pool requested." + }, + "update": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/update", + "id": "container.projects.zones.clusters.nodePools.update", + "request": { + "$ref": "UpdateNodePoolRequest" + }, + "description": "Updates the version and/or image type of a specific node pool.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to upgrade." + }, + "nodePoolId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the node pool to upgrade." + } + } + }, + "delete": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "DELETE", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster.", + "type": "string", + "required": true + }, + "nodePoolId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the node pool to delete." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.delete", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "description": "Deletes a node pool from a cluster." + }, + "setManagement": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "id": "container.projects.zones.clusters.nodePools.setManagement", + "description": "Sets the NodeManagement options for a node pool.", + "request": { + "$ref": "SetNodePoolManagementRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "location": "path", + "description": "The name of the cluster to update.", + "type": "string", + "required": true + }, + "nodePoolId": { + "location": "path", + "description": "The name of the node pool to update.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setSize": { + "description": "Sets the size of a specific node pool.", + "request": { + "$ref": "SetNodePoolSizeRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to update." + }, + "nodePoolId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the node pool to update." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setSize", + "id": "container.projects.zones.clusters.nodePools.setSize" }, "list": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.list", + "description": "Lists the node pools for a cluster.", "httpMethod": "GET", "response": { "$ref": "ListNodePoolsResponse" @@ -1188,30 +998,19 @@ }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "id": "container.projects.zones.clusters.nodePools.list", - "description": "Lists the node pools for a cluster." + ] }, "rollback": { - "request": { - "$ref": "RollbackNodePoolUpgradeRequest" + "response": { + "$ref": "Operation" }, - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", - "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId", "nodePoolId" ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "httpMethod": "POST", "parameters": { "projectId": { "location": "path", @@ -1238,13 +1037,223 @@ "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "id": "container.projects.zones.clusters.nodePools.rollback", "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "id": "container.projects.zones.clusters.nodePools.rollback" + "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "request": { + "$ref": "RollbackNodePoolUpgradeRequest" + } + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.create", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "description": "Creates a node pool for a cluster.", + "request": { + "$ref": "CreateNodePoolRequest" + } + }, + "autoscaling": { + "description": "Sets the autoscaling settings of a specific node pool.", + "request": { + "$ref": "SetNodePoolAutoscalingRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string", + "required": true + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to upgrade." + }, + "nodePoolId": { + "location": "path", + "description": "The name of the node pool to upgrade.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling", + "id": "container.projects.zones.clusters.nodePools.autoscaling", + "path": "v1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/autoscaling" } } } } + }, + "operations": { + "methods": { + "cancel": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "id": "container.projects.zones.operations.cancel", + "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", + "description": "Cancels the specified operation.", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "httpMethod": "POST", + "parameters": { + "operationId": { + "location": "path", + "description": "The server-assigned `name` of the operation.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "httpMethod": "GET", + "parameters": { + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840)." + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides." + }, + "operationId": { + "location": "path", + "description": "The server-assigned `name` of the operation.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "id": "container.projects.zones.operations.get", + "path": "v1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "description": "Gets the specified operation." + }, + "list": { + "flatPath": "v1/projects/{projectId}/zones/{zone}/operations", + "path": "v1/projects/{projectId}/zones/{zone}/operations", + "id": "container.projects.zones.operations.list", + "description": "Lists all operations in a project in a specific zone or all zones.", + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true + }, + "zone": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } } } } @@ -1252,15 +1261,36 @@ } }, "parameters": { - "bearer_token": { - "description": "OAuth bearer token.", + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { "type": "string", - "location": "query" + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." + }, + "pp": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Pretty-print response." }, "oauth_token": { + "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" }, "upload_protocol": { "location": "query", @@ -1268,22 +1298,28 @@ "type": "string" }, "prettyPrint": { - "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", - "location": "query" + "location": "query", + "description": "Returns response with indentations and line breaks." }, "fields": { - "description": "Selector specifying which fields to include in a partial response.", "type": "string", - "location": "query" + "location": "query", + "description": "Selector specifying which fields to include in a partial response." }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -1293,15 +1329,10 @@ "1", "2" ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" + "description": "V1 error format." }, "alt": { + "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -1314,437 +1345,10 @@ "json", "media", "proto" - ], - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" + ] } }, "schemas": { - "UpdateNodePoolRequest": { - "id": "UpdateNodePoolRequest", - "description": "UpdateNodePoolRequests update a node pool's image and/or version.", - "type": "object", - "properties": { - "imageType": { - "description": "The desired image type for the node pool.", - "type": "string" - }, - "nodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", - "type": "string" - } - } - }, - "AcceleratorConfig": { - "id": "AcceleratorConfig", - "description": "AcceleratorConfig represents a Hardware Accelerator request.", - "type": "object", - "properties": { - "acceleratorType": { - "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus/#Introduction)", - "type": "string" - }, - "acceleratorCount": { - "format": "int64", - "description": "The number of the accelerator cards exposed to an instance.", - "type": "string" - } - } - }, - "LegacyAbac": { - "description": "Configuration for the legacy Attribute Based Access Control authorization\nmode.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether the ABAC authorizer is enabled for this cluster. When enabled,\nidentities in the system, including service accounts, nodes, and\ncontrollers, will have statically granted permissions beyond those\nprovided by the RBAC configuration or IAM.", - "type": "boolean" - } - }, - "id": "LegacyAbac" - }, - "SetAddonsConfigRequest": { - "description": "SetAddonsConfigRequest sets the addons associated with the cluster.", - "type": "object", - "properties": { - "addonsConfig": { - "$ref": "AddonsConfig", - "description": "The desired configurations for the various addons available to run in the\ncluster." - } - }, - "id": "SetAddonsConfigRequest" - }, - "SetLegacyAbacRequest": { - "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether ABAC authorization will be enabled in the cluster.", - "type": "boolean" - } - }, - "id": "SetLegacyAbacRequest" - }, - "AddonsConfig": { - "id": "AddonsConfig", - "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", - "type": "object", - "properties": { - "horizontalPodAutoscaling": { - "$ref": "HorizontalPodAutoscaling", - "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods." - }, - "httpLoadBalancing": { - "$ref": "HttpLoadBalancing", - "description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster." - }, - "kubernetesDashboard": { - "$ref": "KubernetesDashboard", - "description": "Configuration for the Kubernetes Dashboard." - } - } - }, - "SetLocationsRequest": { - "description": "SetLocationsRequest sets the locations of the cluster.", - "type": "object", - "properties": { - "locations": { - "description": "The desired list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "SetLocationsRequest" - }, - "SetNodePoolSizeRequest": { - "description": "SetNodePoolSizeRequest sets the size a node\npool.", - "type": "object", - "properties": { - "nodeCount": { - "format": "int32", - "description": "The desired node count for the pool.", - "type": "integer" - } - }, - "id": "SetNodePoolSizeRequest" - }, - "UpdateClusterRequest": { - "description": "UpdateClusterRequest updates the settings of a cluster.", - "type": "object", - "properties": { - "update": { - "description": "A description of the update.", - "$ref": "ClusterUpdate" - } - }, - "id": "UpdateClusterRequest" - }, - "Cluster": { - "id": "Cluster", - "description": "A Google Container Engine cluster.", - "type": "object", - "properties": { - "currentMasterVersion": { - "description": "[Output only] The current software version of the master endpoint.", - "type": "string" - }, - "nodeConfig": { - "description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used.", - "$ref": "NodeConfig" - }, - "addonsConfig": { - "$ref": "AddonsConfig", - "description": "Configurations for the various addons available to run in the cluster." - }, - "status": { - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the cluster is being created.", - "The RUNNING state indicates the cluster has been created and is fully\nusable.", - "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", - "The STOPPING state indicates the cluster is being deleted.", - "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RECONCILING", - "STOPPING", - "ERROR" - ], - "description": "[Output only] The current status of this cluster.", - "type": "string" - }, - "currentNodeVersion": { - "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", - "type": "string" - }, - "subnetwork": { - "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", - "type": "string" - }, - "name": { - "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", - "type": "string" - }, - "resourceLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The resource labels for the cluster to use to annotate any related\nGoogle Compute Engine resources.", - "type": "object" - }, - "maintenancePolicy": { - "$ref": "MaintenancePolicy", - "description": "Configure the maintenance policy for this cluster." - }, - "initialClusterVersion": { - "description": "The initial Kubernetes version for this cluster. Valid versions are those\nfound in validMasterVersions returned by getServerConfig. The version can\nbe upgraded over time; such upgrades are reflected in\ncurrentMasterVersion and currentNodeVersion.", - "type": "string" - }, - "ipAllocationPolicy": { - "description": "Configuration for cluster IP allocation.", - "$ref": "IPAllocationPolicy" - }, - "endpoint": { - "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information.", - "type": "string" - }, - "legacyAbac": { - "$ref": "LegacyAbac", - "description": "Configuration for the legacy ABAC authorization mode." - }, - "createTime": { - "description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, - "clusterIpv4Cidr": { - "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`.", - "type": "string" - }, - "initialNodeCount": { - "format": "int32", - "description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.", - "type": "integer" - }, - "locations": { - "description": "The list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located.", - "items": { - "type": "string" - }, - "type": "array" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "nodePools": { - "description": "The node pools associated with this cluster.\nThis field should not be set if \"node_config\" or \"initial_node_count\" are\nspecified.", - "items": { - "$ref": "NodePool" - }, - "type": "array" - }, - "instanceGroupUrls": { - "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\ncluster.", - "items": { - "type": "string" - }, - "type": "array" - }, - "servicesIpv4Cidr": { - "description": "[Output only] The IP address range of the Kubernetes services in\nthis cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`). Service addresses are\ntypically put in the last `/16` from the container CIDR.", - "type": "string" - }, - "networkPolicy": { - "description": "Configuration options for the NetworkPolicy feature.", - "$ref": "NetworkPolicy" - }, - "enableKubernetesAlpha": { - "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1alpha1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.", - "type": "boolean" - }, - "description": { - "description": "An optional description of this cluster.", - "type": "string" - }, - "currentNodeCount": { - "format": "int32", - "description": "[Output only] The number of nodes currently in the cluster.", - "type": "integer" - }, - "monitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* `monitoring.googleapis.com` - the Google Cloud Monitoring service.\n* `none` - no metrics will be exported from the cluster.\n* if left as an empty string, `monitoring.googleapis.com` will be used.", - "type": "string" - }, - "network": { - "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", - "type": "string" - }, - "labelFingerprint": { - "description": "The fingerprint of the set of labels for this cluster.", - "type": "string" - }, - "zone": { - "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", - "type": "string" - }, - "expireTime": { - "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, - "nodeIpv4CidrSize": { - "format": "int32", - "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", - "type": "integer" - }, - "loggingService": { - "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", - "type": "string" - }, - "masterAuthorizedNetworksConfig": { - "$ref": "MasterAuthorizedNetworksConfig", - "description": "Master authorized networks is a Beta feature.\nThe configuration options for master authorized networks feature." - }, - "statusMessage": { - "description": "[Output only] Additional information about the current status of this\ncluster, if available.", - "type": "string" - }, - "masterAuth": { - "$ref": "MasterAuth", - "description": "The authentication information for accessing the master endpoint." - } - } - }, - "CreateNodePoolRequest": { - "description": "CreateNodePoolRequest creates a node pool for a cluster.", - "type": "object", - "properties": { - "nodePool": { - "$ref": "NodePool", - "description": "The node pool to create." - } - }, - "id": "CreateNodePoolRequest" - }, - "MasterAuth": { - "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates.", - "type": "object", - "properties": { - "password": { - "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", - "type": "string" - }, - "clientCertificateConfig": { - "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued.", - "$ref": "ClientCertificateConfig" - }, - "clientKey": { - "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", - "type": "string" - }, - "clusterCaCertificate": { - "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", - "type": "string" - }, - "clientCertificate": { - "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", - "type": "string" - }, - "username": { - "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", - "type": "string" - } - }, - "id": "MasterAuth" - }, - "DailyMaintenanceWindow": { - "description": "Time window specified for daily maintenance operations.", - "type": "object", - "properties": { - "startTime": { - "description": "Time within the maintenance window to start the maintenance operations.\nTime format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)\nformat \"HH:MM”, where HH : [00-23] and MM : [00-59] GMT.", - "type": "string" - }, - "duration": { - "description": "[Output only] Duration of the time window, automatically chosen to be\nsmallest possible in the given scenario.\nDuration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)\nformat \"PTnHnMnS\".", - "type": "string" - } - }, - "id": "DailyMaintenanceWindow" - }, - "MaintenancePolicy": { - "description": "MaintenancePolicy defines the maintenance policy to be used for the cluster.", - "type": "object", - "properties": { - "window": { - "description": "Specifies the maintenance window in which maintenance may be performed.", - "$ref": "MaintenanceWindow" - } - }, - "id": "MaintenancePolicy" - }, - "ClientCertificateConfig": { - "id": "ClientCertificateConfig", - "description": "Configuration for client certificates on the cluster.", - "type": "object", - "properties": { - "issueClientCertificate": { - "description": "Issue a client certificate.", - "type": "boolean" - } - } - }, - "SetLoggingServiceRequest": { - "id": "SetLoggingServiceRequest", - "description": "SetLoggingServiceRequest sets the logging service of a cluster.", - "type": "object", - "properties": { - "loggingService": { - "description": "The logging service the cluster should use to write metrics.\nCurrently available options:\n\n* \"logging.googleapis.com\" - the Google Cloud Logging service\n* \"none\" - no metrics will be exported from the cluster", - "type": "string" - } - } - }, - "SetMaintenancePolicyRequest": { - "id": "SetMaintenancePolicyRequest", - "description": "SetMaintenancePolicyRequest sets the maintenance policy for a cluster.", - "type": "object", - "properties": { - "maintenancePolicy": { - "description": "The maintenance policy to be set for the cluster. An empty field\nclears the existing maintenance policy.", - "$ref": "MaintenancePolicy" - } - } - }, - "Empty": { - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {} - }, "ListNodePoolsResponse": { "description": "ListNodePoolsResponse is the result of ListNodePoolsRequest.", "type": "object", @@ -1772,65 +1376,28 @@ "id": "StartIPRotationRequest" }, "SetLabelsRequest": { - "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", "type": "object", "properties": { "resourceLabels": { - "description": "The labels to set for that cluster.", "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "The labels to set for that cluster." }, "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", - "type": "string" + "type": "string", + "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint." } }, - "id": "SetLabelsRequest" + "id": "SetLabelsRequest", + "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster" }, "NodePool": { "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload.", "type": "object", "properties": { - "statusMessage": { - "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", - "type": "string" - }, - "name": { - "description": "The name of the node pool.", - "type": "string" - }, - "autoscaling": { - "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present.", - "$ref": "NodePoolAutoscaling" - }, - "management": { - "$ref": "NodeManagement", - "description": "NodeManagement configuration for this NodePool." - }, - "initialNodeCount": { - "format": "int32", - "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", - "type": "integer" - }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" - }, - "instanceGroupUrls": { - "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\nnode pool.", - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "description": "[Output only] The version of the Kubernetes of this node.", - "type": "string" - }, "status": { - "description": "[Output only] The status of the nodes in this pool instance.", "type": "string", "enumDescriptions": [ "Not set.", @@ -1849,11 +1416,48 @@ "RECONCILING", "STOPPING", "ERROR" - ] + ], + "description": "[Output only] The status of the nodes in this pool instance." }, "config": { "$ref": "NodeConfig", "description": "The node configuration of the pool." + }, + "name": { + "type": "string", + "description": "The name of the node pool." + }, + "statusMessage": { + "type": "string", + "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available." + }, + "autoscaling": { + "$ref": "NodePoolAutoscaling", + "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present." + }, + "management": { + "$ref": "NodeManagement", + "description": "NodeManagement configuration for this NodePool." + }, + "initialNodeCount": { + "format": "int32", + "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", + "type": "integer" + }, + "selfLink": { + "type": "string", + "description": "[Output only] Server-defined URL for the resource." + }, + "version": { + "type": "string", + "description": "[Output only] The version of the Kubernetes of this node." + }, + "instanceGroupUrls": { + "items": { + "type": "string" + }, + "type": "array", + "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\nnode pool." } }, "id": "NodePool" @@ -1862,17 +1466,17 @@ "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", "type": "object", "properties": { - "upgradeOptions": { - "description": "Specifies the Auto Upgrade knobs for the node pool.", - "$ref": "AutoUpgradeOptions" - }, "autoRepair": { - "description": "A flag that specifies whether the node auto-repair is enabled for the node\npool. If enabled, the nodes in this node pool will be monitored and, if\nthey fail health checks too many times, an automatic repair action will be\ntriggered.", - "type": "boolean" + "type": "boolean", + "description": "A flag that specifies whether the node auto-repair is enabled for the node\npool. If enabled, the nodes in this node pool will be monitored and, if\nthey fail health checks too many times, an automatic repair action will be\ntriggered." }, "autoUpgrade": { - "description": "A flag that specifies whether node auto-upgrade is enabled for the node\npool. If enabled, node auto-upgrade helps keep the nodes in your node pool\nup to date with the latest release version of Kubernetes.", - "type": "boolean" + "type": "boolean", + "description": "A flag that specifies whether node auto-upgrade is enabled for the node\npool. If enabled, node auto-upgrade helps keep the nodes in your node pool\nup to date with the latest release version of Kubernetes." + }, + "upgradeOptions": { + "$ref": "AutoUpgradeOptions", + "description": "Specifies the Auto Upgrade knobs for the node pool." } }, "id": "NodeManagement" @@ -1888,30 +1492,62 @@ "type": "object", "properties": { "disabled": { - "description": "Whether the Kubernetes Dashboard is enabled for this cluster.", - "type": "boolean" + "type": "boolean", + "description": "Whether the Kubernetes Dashboard is enabled for this cluster." } }, "id": "KubernetesDashboard" }, "Operation": { - "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", "type": "object", "properties": { - "detail": { - "description": "Detailed operation progress, if available.", + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation\nis taking place." + }, + "status": { + "type": "string", + "enumDescriptions": [ + "Not set.", + "The operation has been created.", + "The operation is currently running.", + "The operation is done, either cancelled or completed.", + "The operation is aborting." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PENDING", + "RUNNING", + "DONE", + "ABORTING" + ], + "description": "The current status of the operation." + }, + "statusMessage": { + "description": "If an error has occurred, a textual description of the error.", "type": "string" }, - "endTime": { - "description": "[Output only] The time the operation completed, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "name": { + "description": "The server-assigned ID for the operation.", + "type": "string" + }, + "selfLink": { + "description": "Server-defined URL for the resource.", "type": "string" }, "targetLink": { "description": "Server-defined URL for the target of the operation.", "type": "string" }, + "endTime": { + "type": "string", + "description": "[Output only] The time the operation completed, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format." + }, + "detail": { + "type": "string", + "description": "Detailed operation progress, if available." + }, "operationType": { - "description": "The operation type.", "type": "string", "enumDescriptions": [ "Not set.", @@ -1929,7 +1565,8 @@ "Set labels.", "Set/generate master auth materials", "Set node pool size.", - "Updates network policy for a cluster." + "Updates network policy for a cluster.", + "Set the maintenance policy." ], "enum": [ "TYPE_UNSPECIFIED", @@ -1947,103 +1584,71 @@ "SET_LABELS", "SET_MASTER_AUTH", "SET_NODE_POOL_SIZE", - "SET_NETWORK_POLICY" - ] + "SET_NETWORK_POLICY", + "SET_MAINTENANCE_POLICY" + ], + "description": "The operation type." }, "startTime": { - "description": "[Output only] The time the operation started, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation\nis taking place.", - "type": "string" - }, - "status": { - "description": "The current status of the operation.", "type": "string", - "enumDescriptions": [ - "Not set.", - "The operation has been created.", - "The operation is currently running.", - "The operation is done, either cancelled or completed.", - "The operation is aborting." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PENDING", - "RUNNING", - "DONE", - "ABORTING" - ] - }, - "name": { - "description": "The server-assigned ID for the operation.", - "type": "string" - }, - "statusMessage": { - "description": "If an error has occurred, a textual description of the error.", - "type": "string" - }, - "selfLink": { - "description": "Server-defined URL for the resource.", - "type": "string" + "description": "[Output only] The time the operation started, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format." } }, - "id": "Operation" + "id": "Operation", + "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only." }, "MaintenanceWindow": { - "id": "MaintenanceWindow", - "description": "MaintenanceWindow defines the maintenance window to be used for the cluster.", "type": "object", "properties": { "dailyMaintenanceWindow": { "$ref": "DailyMaintenanceWindow", "description": "DailyMaintenanceWindow specifies a daily maintenance operation window." } - } + }, + "id": "MaintenanceWindow", + "description": "MaintenanceWindow defines the maintenance window to be used for the cluster." }, "RollbackNodePoolUpgradeRequest": { - "id": "RollbackNodePoolUpgradeRequest", "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.", "type": "object", - "properties": {} + "properties": {}, + "id": "RollbackNodePoolUpgradeRequest" }, "NetworkPolicy": { - "id": "NetworkPolicy", "description": "Configuration options for the NetworkPolicy feature.\nhttps://kubernetes.io/docs/concepts/services-networking/networkpolicies/", "type": "object", "properties": { - "enabled": { - "description": "Whether network policy is enabled on the cluster.", - "type": "boolean" - }, "provider": { + "enum": [ + "PROVIDER_UNSPECIFIED", + "CALICO" + ], "description": "The selected network policy provider.", "type": "string", "enumDescriptions": [ "Not set", "Tigera (Calico Felix)." - ], - "enum": [ - "PROVIDER_UNSPECIFIED", - "CALICO" ] + }, + "enabled": { + "type": "boolean", + "description": "Whether network policy is enabled on the cluster." } - } + }, + "id": "NetworkPolicy" }, "UpdateMasterRequest": { - "id": "UpdateMasterRequest", "description": "UpdateMasterRequest updates the master of the cluster.", "type": "object", "properties": { "masterVersion": { - "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", - "type": "string" + "type": "string", + "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version." } - } + }, + "id": "UpdateMasterRequest" }, "ListOperationsResponse": { - "id": "ListOperationsResponse", "description": "ListOperationsResponse is the result of ListOperationsRequest.", "type": "object", "properties": { @@ -2055,28 +1660,16 @@ "type": "array" }, "missingZones": { - "description": "If any zones are listed here, the list of operations returned\nmay be missing the operations from those zones.", "items": { "type": "string" }, - "type": "array" - } - } - }, - "SetMonitoringServiceRequest": { - "description": "SetMonitoringServiceRequest sets the monitoring service of a cluster.", - "type": "object", - "properties": { - "monitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", - "type": "string" + "type": "array", + "description": "If any zones are listed here, the list of operations returned\nmay be missing the operations from those zones." } }, - "id": "SetMonitoringServiceRequest" + "id": "ListOperationsResponse" }, "CidrBlock": { - "id": "CidrBlock", - "description": "CidrBlock contains an optional name and one CIDR block.", "type": "object", "properties": { "displayName": { @@ -2087,12 +1680,40 @@ "description": "cidr_block must be specified in CIDR notation.", "type": "string" } - } + }, + "id": "CidrBlock", + "description": "CidrBlock contains an optional name and one CIDR block." + }, + "SetMonitoringServiceRequest": { + "description": "SetMonitoringServiceRequest sets the monitoring service of a cluster.", + "type": "object", + "properties": { + "monitoringService": { + "type": "string", + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster" + } + }, + "id": "SetMonitoringServiceRequest" }, "ServerConfig": { "description": "Container Engine service configuration.", "type": "object", "properties": { + "validMasterVersions": { + "items": { + "type": "string" + }, + "type": "array", + "description": "List of valid master versions." + }, + "defaultImageType": { + "description": "Default image type.", + "type": "string" + }, + "defaultClusterVersion": { + "type": "string", + "description": "Version of Kubernetes the service deploys by default." + }, "validImageTypes": { "description": "List of valid image types.", "items": { @@ -2106,35 +1727,14 @@ "type": "string" }, "type": "array" - }, - "validMasterVersions": { - "description": "List of valid master versions.", - "items": { - "type": "string" - }, - "type": "array" - }, - "defaultImageType": { - "description": "Default image type.", - "type": "string" - }, - "defaultClusterVersion": { - "description": "Version of Kubernetes the service deploys by default.", - "type": "string" } }, "id": "ServerConfig" }, "NodeConfig": { - "id": "NodeConfig", "description": "Parameters that describe the nodes in a cluster.", "type": "object", "properties": { - "diskSizeGb": { - "format": "int32", - "description": "Size of the disk attached to each node, specified in GB.\nThe smallest allowed disk size is 10GB.\n\nIf unspecified, the default disk size is 100GB.", - "type": "integer" - }, "accelerators": { "description": "A list of hardware accelerators to be attached to each node.\nSee https://cloud.google.com/compute/docs/gpus for more information about\nsupport for GPUs.", "items": { @@ -2147,17 +1747,17 @@ "type": "string" }, "minCpuPlatform": { - "description": "Minimum cpu/platform to be used by this instance. The instance may be\nscheduled on the specified or newer cpu/platform. Applicable values are the\nfriendly names of CPU platforms, such as\n\u003ccode\u003eminCpuPlatform: "Intel Haswell"\u003c/code\u003e or\n\u003ccode\u003eminCpuPlatform: "Intel Sandy Bridge"\u003c/code\u003e. For more\ninformation, read \u003ca href=\"/compute/docs/instances/specify-min-cpu-platform\"\u003eSpecifying a Minimum CPU Platform\u003c/a\u003e.", - "type": "string" + "type": "string", + "description": "Minimum CPU platform to be used by this instance. The instance may be\nscheduled on the specified or newer CPU platform. Applicable values are the\nfriendly names of CPU platforms, such as\n\u003ccode\u003eminCpuPlatform: "Intel Haswell"\u003c/code\u003e or\n\u003ccode\u003eminCpuPlatform: "Intel Sandy Bridge"\u003c/code\u003e. For more\ninformation, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)" }, "preemptible": { "description": "Whether the nodes are created as preemptible VM instances. See:\nhttps://cloud.google.com/compute/docs/instances/preemptible for more\ninformation about preemptible VM instances.", "type": "boolean" }, "localSsdCount": { + "type": "integer", "format": "int32", - "description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependant upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits\nfor more information.", - "type": "integer" + "description": "The number of local SSD disks to be attached to the node.\n\nThe limit for this value is dependant upon the maximum number of\ndisks available on a machine per zone. See:\nhttps://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits\nfor more information." }, "metadata": { "additionalProperties": { @@ -2182,24 +1782,28 @@ "type": "string" }, "oauthScopes": { - "description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container Registry](/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container Registry](/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added." }, "labels": { + "type": "object", "additionalProperties": { "type": "string" }, - "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/", - "type": "object" + "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" + }, + "diskSizeGb": { + "format": "int32", + "description": "Size of the disk attached to each node, specified in GB.\nThe smallest allowed disk size is 10GB.\n\nIf unspecified, the default disk size is 100GB.", + "type": "integer" } - } + }, + "id": "NodeConfig" }, "AutoUpgradeOptions": { - "id": "AutoUpgradeOptions", - "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", "type": "object", "properties": { "description": { @@ -2207,21 +1811,22 @@ "type": "string" }, "autoUpgradeStartTime": { - "description": "[Output only] This field is set when upgrades are about to commence\nwith the approximate start time for the upgrades, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" + "type": "string", + "description": "[Output only] This field is set when upgrades are about to commence\nwith the approximate start time for the upgrades, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format." } - } + }, + "id": "AutoUpgradeOptions", + "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed." }, "ListClustersResponse": { - "description": "ListClustersResponse is the result of ListClustersRequest.", "type": "object", "properties": { "missingZones": { - "description": "If any zones are listed here, the list of clusters returned\nmay be missing those zones.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "If any zones are listed here, the list of clusters returned\nmay be missing those zones." }, "clusters": { "description": "A list of clusters in the project in the specified zone, or\nacross all ones.", @@ -2231,10 +1836,10 @@ "type": "array" } }, - "id": "ListClustersResponse" + "id": "ListClustersResponse", + "description": "ListClustersResponse is the result of ListClustersRequest." }, "HttpLoadBalancing": { - "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster.", "type": "object", "properties": { "disabled": { @@ -2242,43 +1847,42 @@ "type": "boolean" } }, - "id": "HttpLoadBalancing" + "id": "HttpLoadBalancing", + "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster." }, "SetNetworkPolicyRequest": { "description": "SetNetworkPolicyRequest enables/disables network policy for a cluster.", "type": "object", "properties": { "networkPolicy": { - "description": "Configuration options for the NetworkPolicy feature.", - "$ref": "NetworkPolicy" + "$ref": "NetworkPolicy", + "description": "Configuration options for the NetworkPolicy feature." } }, "id": "SetNetworkPolicyRequest" }, "NodePoolAutoscaling": { - "id": "NodePoolAutoscaling", - "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", "type": "object", "properties": { - "enabled": { - "description": "Is autoscaling enabled for this node pool.", - "type": "boolean" - }, "maxNodeCount": { "format": "int32", "description": "Maximum number of nodes in the NodePool. Must be \u003e= min_node_count. There\nhas to enough quota to scale up the cluster.", "type": "integer" }, "minNodeCount": { + "type": "integer", "format": "int32", - "description": "Minimum number of nodes in the NodePool. Must be \u003e= 1 and \u003c=\nmax_node_count.", - "type": "integer" + "description": "Minimum number of nodes in the NodePool. Must be \u003e= 1 and \u003c=\nmax_node_count." + }, + "enabled": { + "type": "boolean", + "description": "Is autoscaling enabled for this node pool." } - } + }, + "id": "NodePoolAutoscaling", + "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage." }, "SetMasterAuthRequest": { - "id": "SetMasterAuthRequest", - "description": "SetMasterAuthRequest updates the admin password of a cluster.", "type": "object", "properties": { "update": { @@ -2286,6 +1890,7 @@ "description": "A description of the update." }, "action": { + "type": "string", "enumDescriptions": [ "Operation is unknown and will error out", "Set the password to a user generated value.", @@ -2296,38 +1901,46 @@ "SET_PASSWORD", "GENERATE_PASSWORD" ], - "description": "The exact form of action to be taken on the master auth", - "type": "string" + "description": "The exact form of action to be taken on the master auth" } - } + }, + "id": "SetMasterAuthRequest", + "description": "SetMasterAuthRequest updates the admin password of a cluster." }, "IPAllocationPolicy": { - "description": "Configuration for controlling how IPs are allocated in the cluster.", "type": "object", "properties": { + "subnetworkName": { + "type": "string", + "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork." + }, + "servicesIpv4CidrBlock": { + "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, "clusterIpv4Cidr": { "description": "This field is deprecated, use cluster_ipv4_cidr_block.", "type": "string" }, "nodeIpv4Cidr": { - "description": "This field is deprecated, use node_ipv4_cidr_block.", - "type": "string" + "type": "string", + "description": "This field is deprecated, use node_ipv4_cidr_block." }, "clusterSecondaryRangeName": { - "description": "The name of the secondary range to be used for the cluster CIDR\nblock. The secondary range will be used for pod IP\naddresses. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases is true and\ncreate_subnetwork is false.", - "type": "string" + "type": "string", + "description": "The name of the secondary range to be used for the cluster CIDR\nblock. The secondary range will be used for pod IP\naddresses. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases is true and\ncreate_subnetwork is false." }, "clusterIpv4CidrBlock": { "description": "The IP address range for the cluster pod IPs. If this field is set, then\n`cluster.cluster_ipv4_cidr` must be left blank.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", "type": "string" }, "nodeIpv4CidrBlock": { - "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" + "type": "string", + "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use." }, "servicesIpv4Cidr": { - "description": "This field is deprecated, use services_ipv4_cidr_block.", - "type": "string" + "type": "string", + "description": "This field is deprecated, use services_ipv4_cidr_block." }, "servicesSecondaryRangeName": { "description": "The name of the secondary range to be used as for the services\nCIDR block. The secondary range will be used for service\nClusterIPs. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases is true and\ncreate_subnetwork is false.", @@ -2340,29 +1953,29 @@ "createSubnetwork": { "description": "Whether a new subnetwork will be created automatically for the cluster.\n\nThis field is only applicable when `use_ip_aliases` is true.", "type": "boolean" - }, - "subnetworkName": { - "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.", - "type": "string" - }, - "servicesIpv4CidrBlock": { - "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" } }, - "id": "IPAllocationPolicy" + "id": "IPAllocationPolicy", + "description": "Configuration for controlling how IPs are allocated in the cluster." }, "ClusterUpdate": { - "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", "type": "object", "properties": { + "desiredNodePoolId": { + "type": "string", + "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster." + }, + "desiredNodeVersion": { + "type": "string", + "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server." + }, "desiredMasterVersion": { "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", "type": "string" }, "desiredMasterAuthorizedNetworksConfig": { - "description": "Master authorized networks is a Beta feature.\nThe desired configuration options for master authorized networks feature.", - "$ref": "MasterAuthorizedNetworksConfig" + "$ref": "MasterAuthorizedNetworksConfig", + "description": "Master authorized networks is a Beta feature.\nThe desired configuration options for master authorized networks feature." }, "desiredNodePoolAutoscaling": { "$ref": "NodePoolAutoscaling", @@ -2376,56 +1989,31 @@ "type": "array" }, "desiredMonitoringService": { - "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster", - "type": "string" + "type": "string", + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* \"monitoring.googleapis.com\" - the Google Cloud Monitoring service\n* \"none\" - no metrics will be exported from the cluster" }, "desiredImageType": { - "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.", - "type": "string" + "type": "string", + "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well." }, "desiredAddonsConfig": { - "description": "Configurations for the various addons available to run in the cluster.", - "$ref": "AddonsConfig" - }, - "desiredNodePoolId": { - "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster.", - "type": "string" - }, - "desiredNodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", - "type": "string" + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." } }, - "id": "ClusterUpdate" + "id": "ClusterUpdate", + "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided." }, "HorizontalPodAutoscaling": { - "id": "HorizontalPodAutoscaling", "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", "type": "object", "properties": { "disabled": { - "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.\nWhen enabled, it ensures that a Heapster pod is running in the cluster,\nwhich is also used by the Cloud Monitoring service.", - "type": "boolean" + "type": "boolean", + "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.\nWhen enabled, it ensures that a Heapster pod is running in the cluster,\nwhich is also used by the Cloud Monitoring service." } - } - }, - "MasterAuthorizedNetworksConfig": { - "id": "MasterAuthorizedNetworksConfig", - "description": "Master authorized networks is a Beta feature.\nConfiguration options for the master authorized networks feature. Enabled\nmaster authorized networks will disallow all external traffic to access\nKubernetes master through HTTPS except traffic from the given CIDR blocks,\nGoogle Compute Engine Public IPs and Google Prod IPs.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether or not master authorized networks is enabled.", - "type": "boolean" - }, - "cidrBlocks": { - "description": "cidr_blocks define up to 10 external networks that could access\nKubernetes master through HTTPS.", - "items": { - "$ref": "CidrBlock" - }, - "type": "array" - } - } + }, + "id": "HorizontalPodAutoscaling" }, "SetNodePoolManagementRequest": { "description": "SetNodePoolManagementRequest sets the node management properties of a node\npool.", @@ -2438,8 +2026,25 @@ }, "id": "SetNodePoolManagementRequest" }, + "MasterAuthorizedNetworksConfig": { + "type": "object", + "properties": { + "cidrBlocks": { + "items": { + "$ref": "CidrBlock" + }, + "type": "array", + "description": "cidr_blocks define up to 10 external networks that could access\nKubernetes master through HTTPS." + }, + "enabled": { + "description": "Whether or not master authorized networks is enabled.", + "type": "boolean" + } + }, + "id": "MasterAuthorizedNetworksConfig", + "description": "Master authorized networks is a Beta feature.\nConfiguration options for the master authorized networks feature. Enabled\nmaster authorized networks will disallow all external traffic to access\nKubernetes master through HTTPS except traffic from the given CIDR blocks,\nGoogle Compute Engine Public IPs and Google Prod IPs." + }, "SetNodePoolAutoscalingRequest": { - "description": "SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool.", "type": "object", "properties": { "autoscaling": { @@ -2447,25 +2052,446 @@ "description": "Autoscaling configuration for the node pool." } }, - "id": "SetNodePoolAutoscalingRequest" + "id": "SetNodePoolAutoscalingRequest", + "description": "SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool." }, "CreateClusterRequest": { - "id": "CreateClusterRequest", - "description": "CreateClusterRequest creates a cluster.", "type": "object", "properties": { "cluster": { "$ref": "Cluster", "description": "A [cluster\nresource](/container-engine/reference/rest/v1/projects.zones.clusters)" } - } + }, + "id": "CreateClusterRequest", + "description": "CreateClusterRequest creates a cluster." + }, + "UpdateNodePoolRequest": { + "description": "UpdateNodePoolRequests update a node pool's image and/or version.", + "type": "object", + "properties": { + "nodeVersion": { + "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", + "type": "string" + }, + "imageType": { + "description": "The desired image type for the node pool.", + "type": "string" + } + }, + "id": "UpdateNodePoolRequest" + }, + "AcceleratorConfig": { + "type": "object", + "properties": { + "acceleratorType": { + "description": "The accelerator type resource name. List of supported accelerators\n[here](/compute/docs/gpus/#Introduction)", + "type": "string" + }, + "acceleratorCount": { + "format": "int64", + "description": "The number of the accelerator cards exposed to an instance.", + "type": "string" + } + }, + "id": "AcceleratorConfig", + "description": "AcceleratorConfig represents a Hardware Accelerator request." + }, + "LegacyAbac": { + "description": "Configuration for the legacy Attribute Based Access Control authorization\nmode.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the ABAC authorizer is enabled for this cluster. When enabled,\nidentities in the system, including service accounts, nodes, and\ncontrollers, will have statically granted permissions beyond those\nprovided by the RBAC configuration or IAM." + } + }, + "id": "LegacyAbac" + }, + "SetAddonsConfigRequest": { + "description": "SetAddonsConfigRequest sets the addons associated with the cluster.", + "type": "object", + "properties": { + "addonsConfig": { + "$ref": "AddonsConfig", + "description": "The desired configurations for the various addons available to run in the\ncluster." + } + }, + "id": "SetAddonsConfigRequest" + }, + "SetLegacyAbacRequest": { + "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether ABAC authorization will be enabled in the cluster.", + "type": "boolean" + } + }, + "id": "SetLegacyAbacRequest" + }, + "AddonsConfig": { + "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", + "type": "object", + "properties": { + "horizontalPodAutoscaling": { + "$ref": "HorizontalPodAutoscaling", + "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods." + }, + "httpLoadBalancing": { + "$ref": "HttpLoadBalancing", + "description": "Configuration for the HTTP (L7) load balancing controller addon, which\nmakes it easy to set up HTTP load balancers for services in a cluster." + }, + "kubernetesDashboard": { + "$ref": "KubernetesDashboard", + "description": "Configuration for the Kubernetes Dashboard." + }, + "networkPolicyConfig": { + "$ref": "NetworkPolicyConfig", + "description": "Configuration for NetworkPolicy. This only tracks whether the addon\nis enabled or not on the Master, it does not track whether network policy\nis enabled for the nodes." + } + }, + "id": "AddonsConfig" + }, + "SetLocationsRequest": { + "type": "object", + "properties": { + "locations": { + "description": "The desired list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located. Changing the locations a cluster is in will result\nin nodes being either created or removed from the cluster, depending on\nwhether locations are being added or removed.\n\nThis list must always include the cluster's primary zone.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "SetLocationsRequest", + "description": "SetLocationsRequest sets the locations of the cluster." + }, + "SetNodePoolSizeRequest": { + "description": "SetNodePoolSizeRequest sets the size a node\npool.", + "type": "object", + "properties": { + "nodeCount": { + "format": "int32", + "description": "The desired node count for the pool.", + "type": "integer" + } + }, + "id": "SetNodePoolSizeRequest" + }, + "NetworkPolicyConfig": { + "type": "object", + "properties": { + "disabled": { + "description": "Whether NetworkPolicy is enabled for this cluster.", + "type": "boolean" + } + }, + "id": "NetworkPolicyConfig", + "description": "Configuration for NetworkPolicy. This only tracks whether the addon\nis enabled or not on the Master, it does not track whether network policy\nis enabled for the nodes." + }, + "UpdateClusterRequest": { + "description": "UpdateClusterRequest updates the settings of a cluster.", + "type": "object", + "properties": { + "update": { + "$ref": "ClusterUpdate", + "description": "A description of the update." + } + }, + "id": "UpdateClusterRequest" + }, + "Cluster": { + "type": "object", + "properties": { + "nodeConfig": { + "$ref": "NodeConfig", + "description": "Parameters used in creating the cluster's nodes.\nSee `nodeConfig` for the description of its properties.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"initial_node_count\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.\nFor responses, this field will be populated with the node configuration of\nthe first node pool.\n\nIf unspecified, the defaults are used." + }, + "addonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "status": { + "type": "string", + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the cluster is being created.", + "The RUNNING state indicates the cluster has been created and is fully\nusable.", + "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the cluster is being deleted.", + "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RECONCILING", + "STOPPING", + "ERROR" + ], + "description": "[Output only] The current status of this cluster." + }, + "currentNodeVersion": { + "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", + "type": "string" + }, + "subnetwork": { + "type": "string", + "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected." + }, + "name": { + "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", + "type": "string" + }, + "resourceLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The resource labels for the cluster to use to annotate any related\nGoogle Compute Engine resources.", + "type": "object" + }, + "maintenancePolicy": { + "$ref": "MaintenancePolicy", + "description": "Configure the maintenance policy for this cluster." + }, + "initialClusterVersion": { + "description": "The initial Kubernetes version for this cluster. Valid versions are those\nfound in validMasterVersions returned by getServerConfig. The version can\nbe upgraded over time; such upgrades are reflected in\ncurrentMasterVersion and currentNodeVersion.", + "type": "string" + }, + "ipAllocationPolicy": { + "$ref": "IPAllocationPolicy", + "description": "Configuration for cluster IP allocation." + }, + "legacyAbac": { + "$ref": "LegacyAbac", + "description": "Configuration for the legacy ABAC authorization mode." + }, + "endpoint": { + "type": "string", + "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information." + }, + "createTime": { + "description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "clusterIpv4Cidr": { + "type": "string", + "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`." + }, + "initialNodeCount": { + "type": "integer", + "format": "int32", + "description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time." + }, + "nodePools": { + "items": { + "$ref": "NodePool" + }, + "type": "array", + "description": "The node pools associated with this cluster.\nThis field should not be set if \"node_config\" or \"initial_node_count\" are\nspecified." + }, + "locations": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located." + }, + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" + }, + "instanceGroupUrls": { + "items": { + "type": "string" + }, + "type": "array", + "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\ncluster." + }, + "servicesIpv4Cidr": { + "type": "string", + "description": "[Output only] The IP address range of the Kubernetes services in\nthis cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `1.2.3.4/29`). Service addresses are\ntypically put in the last `/16` from the container CIDR." + }, + "networkPolicy": { + "$ref": "NetworkPolicy", + "description": "Configuration options for the NetworkPolicy feature." + }, + "enableKubernetesAlpha": { + "type": "boolean", + "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1alpha1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation." + }, + "description": { + "type": "string", + "description": "An optional description of this cluster." + }, + "currentNodeCount": { + "type": "integer", + "format": "int32", + "description": "[Output only] The number of nodes currently in the cluster." + }, + "monitoringService": { + "description": "The monitoring service the cluster should use to write metrics.\nCurrently available options:\n\n* `monitoring.googleapis.com` - the Google Cloud Monitoring service.\n* `none` - no metrics will be exported from the cluster.\n* if left as an empty string, `monitoring.googleapis.com` will be used.", + "type": "string" + }, + "network": { + "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", + "type": "string" + }, + "labelFingerprint": { + "type": "string", + "description": "The fingerprint of the set of labels for this cluster." + }, + "zone": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", + "type": "string" + }, + "expireTime": { + "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, + "loggingService": { + "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", + "type": "string" + }, + "nodeIpv4CidrSize": { + "format": "int32", + "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", + "type": "integer" + }, + "masterAuthorizedNetworksConfig": { + "$ref": "MasterAuthorizedNetworksConfig", + "description": "Master authorized networks is a Beta feature.\nThe configuration options for master authorized networks feature." + }, + "statusMessage": { + "description": "[Output only] Additional information about the current status of this\ncluster, if available.", + "type": "string" + }, + "masterAuth": { + "$ref": "MasterAuth", + "description": "The authentication information for accessing the master endpoint." + }, + "currentMasterVersion": { + "type": "string", + "description": "[Output only] The current software version of the master endpoint." + } + }, + "id": "Cluster", + "description": "A Google Container Engine cluster." + }, + "CreateNodePoolRequest": { + "description": "CreateNodePoolRequest creates a node pool for a cluster.", + "type": "object", + "properties": { + "nodePool": { + "$ref": "NodePool", + "description": "The node pool to create." + } + }, + "id": "CreateNodePoolRequest" + }, + "MasterAuth": { + "type": "object", + "properties": { + "password": { + "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", + "type": "string" + }, + "clientCertificateConfig": { + "$ref": "ClientCertificateConfig", + "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued." + }, + "clientKey": { + "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", + "type": "string" + }, + "clusterCaCertificate": { + "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", + "type": "string" + }, + "clientCertificate": { + "type": "string", + "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint." + }, + "username": { + "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", + "type": "string" + } + }, + "id": "MasterAuth", + "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates." + }, + "DailyMaintenanceWindow": { + "description": "Time window specified for daily maintenance operations.", + "type": "object", + "properties": { + "startTime": { + "description": "Time within the maintenance window to start the maintenance operations.\nTime format should be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)\nformat \"HH:MM”, where HH : [00-23] and MM : [00-59] GMT.", + "type": "string" + }, + "duration": { + "type": "string", + "description": "[Output only] Duration of the time window, automatically chosen to be\nsmallest possible in the given scenario.\nDuration will be in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt)\nformat \"PTnHnMnS\"." + } + }, + "id": "DailyMaintenanceWindow" + }, + "MaintenancePolicy": { + "description": "MaintenancePolicy defines the maintenance policy to be used for the cluster.", + "type": "object", + "properties": { + "window": { + "$ref": "MaintenanceWindow", + "description": "Specifies the maintenance window in which maintenance may be performed." + } + }, + "id": "MaintenancePolicy" + }, + "ClientCertificateConfig": { + "type": "object", + "properties": { + "issueClientCertificate": { + "description": "Issue a client certificate.", + "type": "boolean" + } + }, + "id": "ClientCertificateConfig", + "description": "Configuration for client certificates on the cluster." + }, + "SetLoggingServiceRequest": { + "type": "object", + "properties": { + "loggingService": { + "type": "string", + "description": "The logging service the cluster should use to write metrics.\nCurrently available options:\n\n* \"logging.googleapis.com\" - the Google Cloud Logging service\n* \"none\" - no metrics will be exported from the cluster" + } + }, + "id": "SetLoggingServiceRequest", + "description": "SetLoggingServiceRequest sets the logging service of a cluster." + }, + "SetMaintenancePolicyRequest": { + "type": "object", + "properties": { + "maintenancePolicy": { + "$ref": "MaintenancePolicy", + "description": "The maintenance policy to be set for the cluster. An empty field\nclears the existing maintenance policy." + } + }, + "id": "SetMaintenancePolicyRequest", + "description": "SetMaintenancePolicyRequest sets the maintenance policy for a cluster." + }, + "Empty": { + "type": "object", + "properties": {}, + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "version": "v1", "baseUrl": "https://container.googleapis.com/", "canonicalName": "Container", @@ -2478,16 +2504,7 @@ } } }, - "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", "servicePath": "", - "kind": "discovery#restDescription", - "rootUrl": "https://container.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "container", - "batchPath": "batch", - "id": "container:v1", - "documentationLink": "https://cloud.google.com/container-engine/", - "revision": "20170908", - "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.", + "kind": "discovery#restDescription" } diff --git a/vendor/google.golang.org/api/container/v1/container-gen.go b/vendor/google.golang.org/api/container/v1/container-gen.go index 83cf38877..bd9360939 100644 --- a/vendor/google.golang.org/api/container/v1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1/container-gen.go @@ -188,6 +188,13 @@ type AddonsConfig struct { // KubernetesDashboard: Configuration for the Kubernetes Dashboard. KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` + // NetworkPolicyConfig: Configuration for NetworkPolicy. This only + // tracks whether the addon + // is enabled or not on the Master, it does not track whether network + // policy + // is enabled for the nodes. + NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. // "HorizontalPodAutoscaling") to unconditionally include in API // requests. By default, fields with empty values are omitted from API @@ -1420,6 +1427,38 @@ func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkPolicyConfig: Configuration for NetworkPolicy. This only +// tracks whether the addon +// is enabled or not on the Master, it does not track whether network +// policy +// is enabled for the nodes. +type NetworkPolicyConfig struct { + // Disabled: Whether NetworkPolicy is enabled for this cluster. + Disabled bool `json:"disabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkPolicyConfig) MarshalJSON() ([]byte, error) { + type noMethod NetworkPolicyConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NodeConfig: Parameters that describe the nodes in a cluster. type NodeConfig struct { // Accelerators: A list of hardware accelerators to be attached to each @@ -1500,18 +1539,18 @@ type NodeConfig struct { // The total size of all keys and values must be less than 512 KB. Metadata map[string]string `json:"metadata,omitempty"` - // MinCpuPlatform: Minimum cpu/platform to be used by this instance. The + // MinCpuPlatform: Minimum CPU platform to be used by this instance. The // instance may be - // scheduled on the specified or newer cpu/platform. Applicable values + // scheduled on the specified or newer CPU platform. Applicable values // are the // friendly names of CPU platforms, such as // minCpuPlatform: "Intel Haswell" // or // minCpuPlatform: "Intel Sandy Bridge". For // more - // information, read Specifying a - // Minimum CPU Platform. + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min- + // cpu-platform) MinCpuPlatform string `json:"minCpuPlatform,omitempty"` // OauthScopes: The set of Google API scopes to be made available on all @@ -1808,6 +1847,7 @@ type Operation struct { // "SET_MASTER_AUTH" - Set/generate master auth materials // "SET_NODE_POOL_SIZE" - Set node pool size. // "SET_NETWORK_POLICY" - Updates network policy for a cluster. + // "SET_MAINTENANCE_POLICY" - Set the maintenance policy. OperationType string `json:"operationType,omitempty"` // SelfLink: Server-defined URL for the resource. diff --git a/vendor/google.golang.org/api/container/v1beta1/container-api.json b/vendor/google.golang.org/api/container/v1beta1/container-api.json index 428fc589d..b1be90a0b 100644 --- a/vendor/google.golang.org/api/container/v1beta1/container-api.json +++ b/vendor/google.golang.org/api/container/v1beta1/container-api.json @@ -1,106 +1,12 @@ { - "canonicalName": "Container", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://container.googleapis.com/", - "ownerDomain": "google.com", - "name": "container", - "batchPath": "batch", - "title": "Google Container Engine API", "ownerName": "Google", "resources": { "projects": { "resources": { "zones": { - "methods": { - "getServerconfig": { - "response": { - "$ref": "ServerConfig" - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "httpMethod": "GET", - "parameters": { - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - }, - "name": { - "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", - "type": "string", - "location": "query" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", - "id": "container.projects.zones.getServerconfig", - "path": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", - "description": "Returns configuration info about the Container Engine service." - } - }, "resources": { "clusters": { "methods": { - "update": { - "id": "container.projects.zones.clusters.update", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", - "request": { - "$ref": "UpdateClusterRequest" - }, - "description": "Updates the settings of a specific cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "clusterId" - ], - "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - }, - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - }, - "clusterId": { - "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}" - }, "setMasterAuth": { "response": { "$ref": "Operation" @@ -112,6 +18,12 @@ ], "httpMethod": "POST", "parameters": { + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead." + }, "zone": { "location": "path", "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", @@ -123,12 +35,6 @@ "type": "string", "required": true, "location": "path" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" } }, "scopes": [ @@ -143,6 +49,7 @@ } }, "list": { + "description": "Lists all clusters owned by a project in either the specified zone or all\nzones.", "response": { "$ref": "ListClustersResponse" }, @@ -151,12 +58,15 @@ "zone" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", "type": "string", - "required": true, - "location": "path" + "required": true }, "zone": { "location": "path", @@ -170,78 +80,102 @@ "type": "string" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", "id": "container.projects.zones.clusters.list", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", - "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters" }, "resourceLabels": { - "response": { - "$ref": "Operation" + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", + "id": "container.projects.zones.clusters.resourceLabels", + "request": { + "$ref": "SetLabelsRequest" }, + "description": "Sets labels on a cluster.", + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "projectId": { - "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", "required": true, "location": "path" }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, "clusterId": { "location": "path", "description": "The name of the cluster.\nThis field is deprecated, use name instead.", "type": "string", "required": true } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "id": "container.projects.zones.clusters.resourceLabels", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/resourceLabels", - "description": "Sets labels on a cluster.", - "request": { - "$ref": "SetLabelsRequest" } }, "create": { - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", "request": { "$ref": "CreateClusterRequest" }, - "response": { - "$ref": "Operation" - }, + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", "type": "string", - "required": true, - "location": "path" + "required": true }, "zone": { + "location": "path", "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters", + "id": "container.projects.zones.clusters.create" + }, + "completeIpRotation": { + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", "required": true, "location": "path" } @@ -249,11 +183,13 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters", - "id": "container.projects.zones.clusters.create", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters" - }, - "completeIpRotation": { + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "id": "container.projects.zones.clusters.completeIpRotation", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", + "description": "Completes master IP rotation.", + "request": { + "$ref": "CompleteIPRotationRequest" + }, "response": { "$ref": "Operation" }, @@ -262,37 +198,7 @@ "zone", "clusterId" ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - "id": "container.projects.zones.clusters.completeIpRotation", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:completeIpRotation", - "request": { - "$ref": "CompleteIPRotationRequest" - }, - "description": "Completes master IP rotation." + "httpMethod": "POST" }, "get": { "response": { @@ -305,6 +211,18 @@ ], "httpMethod": "GET", "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, "name": { "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string", @@ -315,18 +233,6 @@ "type": "string", "required": true, "location": "path" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" } }, "scopes": [ @@ -338,22 +244,16 @@ "description": "Gets the details of a specific cluster." }, "legacyAbac": { - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, "parameters": { - "zone": { - "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - }, "clusterId": { "location": "path", "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", @@ -361,106 +261,116 @@ "required": true }, "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", "type": "string", - "required": true, - "location": "path" + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", - "id": "container.projects.zones.clusters.legacyAbac", "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/legacyAbac", + "id": "container.projects.zones.clusters.legacyAbac", "description": "Enables or disables the ABAC authorization mechanism on a cluster.", "request": { "$ref": "SetLegacyAbacRequest" } }, "setNetworkPolicy": { - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", - "id": "container.projects.zones.clusters.setNetworkPolicy", - "description": "Enables/Disables Network Policy for a cluster.", - "request": { - "$ref": "SetNetworkPolicyRequest" + "response": { + "$ref": "Operation" }, - "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameters": { - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", "type": "string", "required": true, "location": "path" }, - "zone": { + "clusterId": { "location": "path", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", "type": "string", "required": true }, - "clusterId": { - "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy" + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + "id": "container.projects.zones.clusters.setNetworkPolicy", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setNetworkPolicy", + "description": "Enables/Disables Network Policy for a cluster.", + "request": { + "$ref": "SetNetworkPolicyRequest" + } }, "startIpRotation": { "request": { "$ref": "StartIPRotationRequest" }, "description": "Start master IP rotation.", - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "projectId": { + "type": "string", + "required": true, "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead." + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", "type": "string", "required": true }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, "clusterId": { + "location": "path", "description": "The name of the cluster.\nThis field is deprecated, use name instead.", "type": "string", - "required": true, - "location": "path" + "required": true } }, "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", - "id": "container.projects.zones.clusters.startIpRotation", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation" + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:startIpRotation", + "id": "container.projects.zones.clusters.startIpRotation" }, "setMaintenancePolicy": { + "description": "Sets the maintenance policy for a cluster.", + "request": { + "$ref": "SetMaintenancePolicyRequest" + }, "response": { "$ref": "Operation" }, @@ -470,10 +380,13 @@ "clusterId" ], "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string", + "required": true, + "location": "path" + }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string", @@ -485,21 +398,14 @@ "description": "The name of the cluster to update.", "type": "string", "required": true - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string", - "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", "id": "container.projects.zones.clusters.setMaintenancePolicy", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy", - "request": { - "$ref": "SetMaintenancePolicyRequest" - }, - "description": "Sets the maintenance policy for a cluster." + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}:setMaintenancePolicy" }, "delete": { "response": { @@ -512,18 +418,6 @@ ], "httpMethod": "DELETE", "parameters": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, "name": { "location": "query", "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", @@ -534,6 +428,18 @@ "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", "type": "string", "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead." } }, "scopes": [ @@ -543,14 +449,59 @@ "id": "container.projects.zones.clusters.delete", "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time." + }, + "update": { + "request": { + "$ref": "UpdateClusterRequest" + }, + "description": "Updates the settings of a specific cluster.", + "httpMethod": "PUT", + "parameterOrder": [ + "projectId", + "zone", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "clusterId": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead." + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}", + "id": "container.projects.zones.clusters.update" } }, "resources": { "nodePools": { "methods": { - "setManagement": { + "get": { + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.get", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "description": "Retrieves the node pool requested.", "response": { - "$ref": "Operation" + "$ref": "NodePool" }, "parameterOrder": [ "projectId", @@ -558,56 +509,17 @@ "clusterId", "nodePoolId" ], - "httpMethod": "POST", + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "location": "path", - "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - }, - "nodePoolId": { - "description": "The name of the node pool to update.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", "type": "string", "required": true, "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "id": "container.projects.zones.clusters.nodePools.setManagement", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", - "request": { - "$ref": "SetNodePoolManagementRequest" - }, - "description": "Sets the NodeManagement options for a node pool." - }, - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { + }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", "type": "string", @@ -620,6 +532,56 @@ "type": "string", "required": true }, + "nodePoolId": { + "description": "The name of the node pool.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "name": { + "type": "string", + "location": "query", + "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'." + } + } + }, + "delete": { + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "id": "container.projects.zones.clusters.nodePools.delete", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", + "description": "Deletes a node pool from a cluster.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, "nodePoolId": { "description": "The name of the node pool to delete.\nThis field is deprecated, use name instead.", "type": "string", @@ -627,24 +589,59 @@ "location": "path" }, "name": { - "location": "query", "description": "The name (project, location, cluster, node pool id) of the node pool to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", - "type": "string" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", "type": "string", - "required": true, - "location": "path" + "location": "query" } + } + }, + "setManagement": { + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement", + "id": "container.projects.zones.clusters.nodePools.setManagement", + "request": { + "$ref": "SetNodePoolManagementRequest" + }, + "description": "Sets the NodeManagement options for a node pool.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "zone", + "clusterId", + "nodePoolId" + ], + "response": { + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.delete", - "description": "Deletes a node pool from a cluster." + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "clusterId": { + "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + }, + "nodePoolId": { + "location": "path", + "description": "The name of the node pool to update.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}/setManagement" }, "list": { "response": { @@ -660,11 +657,17 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "zone": { + "projectId": { + "type": "string", + "required": true, "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead." + }, + "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", "type": "string", - "required": true + "required": true, + "location": "path" }, "parent": { "location": "query", @@ -672,16 +675,10 @@ "type": "string" }, "clusterId": { - "location": "path", "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", - "type": "string", - "required": true + "required": true, + "location": "path" } }, "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", @@ -690,25 +687,32 @@ "description": "Lists the node pools for a cluster." }, "rollback": { - "httpMethod": "POST", + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "id": "container.projects.zones.clusters.nodePools.rollback", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", + "request": { + "$ref": "RollbackNodePoolUpgradeRequest" + }, + "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "response": { + "$ref": "Operation" + }, "parameterOrder": [ "projectId", "zone", "clusterId", "nodePoolId" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", "type": "string", - "required": true, - "location": "path" + "required": true }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", @@ -728,34 +732,31 @@ "type": "string", "required": true } - }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}:rollback", - "id": "container.projects.zones.clusters.nodePools.rollback", - "request": { - "$ref": "RollbackNodePoolUpgradeRequest" - }, - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed." + } }, "create": { - "response": { - "$ref": "Operation" + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", + "id": "container.projects.zones.clusters.nodePools.create", + "description": "Creates a node pool for a cluster.", + "request": { + "$ref": "CreateNodePoolRequest" }, + "httpMethod": "POST", "parameterOrder": [ "projectId", "zone", "clusterId" ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "response": { + "$ref": "Operation" + }, "parameters": { "projectId": { + "location": "path", "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", "type": "string", - "required": true, - "location": "path" + "required": true }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", @@ -770,63 +771,9 @@ "location": "path" } }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "id": "container.projects.zones.clusters.nodePools.create", - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools", - "request": { - "$ref": "CreateNodePoolRequest" - }, - "description": "Creates a node pool for a cluster." - }, - "get": { - "path": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}", - "id": "container.projects.zones.clusters.nodePools.get", - "description": "Retrieves the node pool requested.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "zone", - "clusterId", - "nodePoolId" - ], - "response": { - "$ref": "NodePool" - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "location": "query", - "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", - "type": "string" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterId": { - "description": "The name of the cluster.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "nodePoolId": { - "location": "path", - "description": "The name of the node pool.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/clusters/{clusterId}/nodePools/{nodePoolId}" + ] } } } @@ -834,6 +781,85 @@ }, "operations": { "methods": { + "get": { + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", + "id": "container.projects.zones.operations.get", + "description": "Gets the specified operation.", + "httpMethod": "GET", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "zone", + "operationId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "query", + "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", + "type": "string" + }, + "operationId": { + "type": "string", + "required": true, + "location": "path", + "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead." + }, + "projectId": { + "type": "string", + "required": true, + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead." + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "list": { + "id": "container.projects.zones.operations.list", + "path": "v1beta1/projects/{projectId}/zones/{zone}/operations", + "description": "Lists all operations in a project in a specific zone or all zones.", + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + }, + "parent": { + "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations" + }, "cancel": { "request": { "$ref": "CancelOperationRequest" @@ -852,336 +878,327 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { + "operationId": { + "location": "path", + "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, "zone": { "location": "path", "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the operation resides.\nThis field is deprecated, use name instead.", "type": "string", "required": true - }, - "operationId": { - "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" } }, "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}:cancel", "id": "container.projects.zones.operations.cancel" - }, - "get": { - "description": "Gets the specified operation.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "projectId", - "zone", - "operationId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "name": { - "location": "query", - "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", - "type": "string" - }, - "operationId": { - "description": "The server-assigned `name` of the operation.\nThis field is deprecated, use name instead.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}", - "id": "container.projects.zones.operations.get", - "path": "v1beta1/projects/{projectId}/zones/{zone}/operations/{operationId}" - }, - "list": { - "id": "container.projects.zones.operations.list", - "path": "v1beta1/projects/{projectId}/zones/{zone}/operations", - "description": "Lists all operations in a project in a specific zone or all zones.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "projectId", - "zone" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "zone": { - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.\nThis field is deprecated, use parent instead.", - "type": "string", - "required": true, - "location": "path" - }, - "parent": { - "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", - "type": "string", - "location": "query" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/operations" } } } + }, + "methods": { + "getServerconfig": { + "description": "Returns configuration info about the Container Engine service.", + "response": { + "$ref": "ServerConfig" + }, + "parameterOrder": [ + "projectId", + "zone" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "zone": { + "location": "path", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + }, + "name": { + "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "type": "string", + "location": "query" + }, + "projectId": { + "location": "path", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig", + "id": "container.projects.zones.getServerconfig", + "path": "v1beta1/projects/{projectId}/zones/{zone}/serverconfig" + } } }, "locations": { - "resources": { - "clusters": { - "resources": { - "nodePools": { - "methods": { - "rollback": { - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "location": "path", - "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", - "path": "v1beta1/{+name}:rollback", - "id": "container.projects.locations.clusters.nodePools.rollback", - "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", - "request": { - "$ref": "RollbackNodePoolUpgradeRequest" - } - }, - "create": { - "httpMethod": "POST", - "parameterOrder": [ - "parent" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path", - "description": "The parent (project, location, cluster id) where the node pool will be created.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", - "path": "v1beta1/{+parent}/nodePools", - "id": "container.projects.locations.clusters.nodePools.create", - "description": "Creates a node pool for a cluster.", - "request": { - "$ref": "CreateNodePoolRequest" - } - }, - "get": { - "response": { - "$ref": "NodePool" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "location": "path" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - }, - "clusterId": { - "location": "query", - "description": "The name of the cluster.\nThis field is deprecated, use name instead.", - "type": "string" - }, - "nodePoolId": { - "description": "The name of the node pool.\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", - "id": "container.projects.locations.clusters.nodePools.get", - "path": "v1beta1/{+name}", - "description": "Retrieves the node pool requested." - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "location": "path" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - }, - "zone": { - "location": "query", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" - }, - "clusterId": { - "description": "The name of the cluster.\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - }, - "nodePoolId": { - "description": "The name of the node pool to delete.\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", - "id": "container.projects.locations.clusters.nodePools.delete", - "path": "v1beta1/{+name}", - "description": "Deletes a node pool from a cluster." - }, - "setManagement": { - "request": { - "$ref": "SetNodePoolManagementRequest" - }, - "description": "Sets the NodeManagement options for a node pool.", - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement", - "path": "v1beta1/{+name}:setManagement", - "id": "container.projects.locations.clusters.nodePools.setManagement" - }, - "list": { - "response": { - "$ref": "ListNodePoolsResponse" - }, - "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", - "type": "string", - "location": "query" - }, - "clusterId": { - "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", - "type": "string", - "location": "query" - }, - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path", - "description": "The parent (project, location, cluster id) where the node pools will be listed.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", - "id": "container.projects.locations.clusters.nodePools.list", - "path": "v1beta1/{+parent}/nodePools", - "description": "Lists the node pools for a cluster." - } - } + "methods": { + "getServerConfig": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "type": "string", + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead." + }, + "zone": { + "type": "string", + "location": "query", + "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead." + }, + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path", + "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", + "type": "string", + "required": true } }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig", + "path": "v1beta1/{+name}/serverConfig", + "id": "container.projects.locations.getServerConfig", + "description": "Returns configuration info about the Container Engine service.", + "httpMethod": "GET", + "response": { + "$ref": "ServerConfig" + }, + "parameterOrder": [ + "name" + ] + } + }, + "resources": { + "clusters": { "methods": { + "update": { + "description": "Updates the settings of a specific cluster.", + "request": { + "$ref": "UpdateClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "id": "container.projects.locations.clusters.update", + "path": "v1beta1/{+name}" + }, + "setMasterAuth": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path", + "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth", + "path": "v1beta1/{+name}:setMasterAuth", + "id": "container.projects.locations.clusters.setMasterAuth", + "request": { + "$ref": "SetMasterAuthRequest" + }, + "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server." + }, + "list": { + "response": { + "$ref": "ListClustersResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path", + "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", + "id": "container.projects.locations.clusters.list", + "path": "v1beta1/{+parent}/clusters", + "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." + }, + "create": { + "request": { + "$ref": "CreateClusterRequest" + }, + "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", + "path": "v1beta1/{+parent}/clusters", + "id": "container.projects.locations.clusters.create" + }, + "completeIpRotation": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name (project, location, cluster id) of the cluster to complete IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation", + "id": "container.projects.locations.clusters.completeIpRotation", + "path": "v1beta1/{+name}:completeIpRotation", + "description": "Completes master IP rotation.", + "request": { + "$ref": "CompleteIPRotationRequest" + } + }, + "setNetworkPolicy": { + "id": "container.projects.locations.clusters.setNetworkPolicy", + "path": "v1beta1/{+name}:setNetworkPolicy", + "description": "Enables/Disables Network Policy for a cluster.", + "request": { + "$ref": "SetNetworkPolicyRequest" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, cluster id) of the cluster to set networking policy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy" + }, + "get": { + "response": { + "$ref": "Cluster" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "type": "string", + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead." + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", + "id": "container.projects.locations.clusters.get", + "path": "v1beta1/{+name}", + "description": "Gets the details of a specific cluster." + }, "startIpRotation": { "response": { "$ref": "Operation" @@ -1195,11 +1212,11 @@ ], "parameters": { "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path", "description": "The name (project, location, cluster id) of the cluster to start IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path" + "required": true } }, "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:startIpRotation", @@ -1211,32 +1228,32 @@ "description": "Start master IP rotation." }, "setMaintenancePolicy": { - "id": "container.projects.locations.clusters.setMaintenancePolicy", - "path": "v1beta1/{+name}:setMaintenancePolicy", - "request": { - "$ref": "SetMaintenancePolicyRequest" - }, - "description": "Sets the maintenance policy for a cluster.", - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "name" ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "response": { + "$ref": "Operation" + }, "parameters": { "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", "location": "path", "description": "The name (project, location, cluster id) of the cluster to set maintenance\npolicy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" } }, - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMaintenancePolicy" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMaintenancePolicy", + "path": "v1beta1/{+name}:setMaintenancePolicy", + "id": "container.projects.locations.clusters.setMaintenancePolicy", + "description": "Sets the maintenance policy for a cluster.", + "request": { + "$ref": "SetMaintenancePolicyRequest" + } }, "delete": { "description": "Deletes the cluster, including the Kubernetes endpoint and all worker\nnodes.\n\nFirewalls and routes that were configured during cluster creation\nare also deleted.\n\nOther Google Compute Engine resources that might be in use by the cluster\n(e.g. load balancer resources) will not be deleted if they weren't present\nat the initial create time.", @@ -1251,27 +1268,27 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "zone": { - "location": "query", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" - }, - "clusterId": { - "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - }, "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path", "description": "The name (project, location, cluster) of the cluster to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" }, "projectId": { "location": "query", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster to delete.\nThis field is deprecated, use name instead.", + "type": "string" } }, "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", @@ -1279,274 +1296,279 @@ "path": "v1beta1/{+name}" }, "setResourceLabels": { - "path": "v1beta1/{+name}:setResourceLabels", - "id": "container.projects.locations.clusters.setResourceLabels", - "description": "Sets labels on a cluster.", - "request": { - "$ref": "SetLabelsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], "response": { "$ref": "Operation" }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path", - "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string", - "required": true - } - }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels" + "parameters": { + "name": { + "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setResourceLabels", + "id": "container.projects.locations.clusters.setResourceLabels", + "path": "v1beta1/{+name}:setResourceLabels", + "request": { + "$ref": "SetLabelsRequest" + }, + "description": "Sets labels on a cluster." }, "setLegacyAbac": { - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], "response": { "$ref": "Operation" }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", "parameters": { "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", "location": "path", "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string", - "required": true + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setLegacyAbac", - "path": "v1beta1/{+name}:setLegacyAbac", "id": "container.projects.locations.clusters.setLegacyAbac", + "path": "v1beta1/{+name}:setLegacyAbac", "description": "Enables or disables the ABAC authorization mechanism on a cluster.", "request": { "$ref": "SetLegacyAbacRequest" } - }, - "update": { - "path": "v1beta1/{+name}", - "id": "container.projects.locations.clusters.update", - "description": "Updates the settings of a specific cluster.", - "request": { - "$ref": "UpdateClusterRequest" - }, - "httpMethod": "PUT", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path", - "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}" - }, - "setMasterAuth": { - "path": "v1beta1/{+name}:setMasterAuth", - "id": "container.projects.locations.clusters.setMasterAuth", - "description": "Used to set master auth materials. Currently supports :-\nChanging the admin password of a specific cluster.\nThis can be either via password generation or explicitly set.\nModify basic_auth.csv and reset the K8S API server.", - "request": { - "$ref": "SetMasterAuthRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setMasterAuth" - }, - "list": { - "response": { - "$ref": "ListClustersResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides, or \"-\" for all zones.\nThis field is deprecated, use parent instead.", - "type": "string", - "location": "query" + } + }, + "resources": { + "nodePools": { + "methods": { + "get": { + "description": "Retrieves the node pool requested.", + "response": { + "$ref": "NodePool" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "nodePoolId": { + "description": "The name of the node pool.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "name": { + "location": "path", + "description": "The name (project, location, cluster, node pool id) of the node pool to get.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$" + }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string", + "location": "query" + }, + "clusterId": { + "type": "string", + "location": "query", + "description": "The name of the cluster.\nThis field is deprecated, use name instead." + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", + "id": "container.projects.locations.clusters.nodePools.get", + "path": "v1beta1/{+name}" }, - "parent": { - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path", - "description": "The parent (project and location) where the clusters will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", - "type": "string", - "required": true + "setManagement": { + "httpMethod": "POST", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "name": { + "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:setManagement", + "path": "v1beta1/{+name}:setManagement", + "id": "container.projects.locations.clusters.nodePools.setManagement", + "description": "Sets the NodeManagement options for a node pool.", + "request": { + "$ref": "SetNodePoolManagementRequest" + } }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", - "id": "container.projects.locations.clusters.list", - "path": "v1beta1/{+parent}/clusters", - "description": "Lists all clusters owned by a project in either the specified zone or all\nzones." - }, - "create": { - "id": "container.projects.locations.clusters.create", - "path": "v1beta1/{+parent}/clusters", - "request": { - "$ref": "CreateClusterRequest" - }, - "description": "Creates a cluster, consisting of the specified number and type of Google\nCompute Engine instances.\n\nBy default, the cluster is created in the project's\n[default network](/compute/docs/networks-and-firewalls#networks).\n\nOne firewall is added for the cluster. After cluster creation,\nthe cluster creates routes for each node to allow the containers\non that node to communicate with all other instances in the\ncluster.\n\nFinally, an entry is added to the project's global metadata indicating\nwhich CIDR range is being used by the cluster.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "parent": { - "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters" - }, - "completeIpRotation": { - "id": "container.projects.locations.clusters.completeIpRotation", - "path": "v1beta1/{+name}:completeIpRotation", - "description": "Completes master IP rotation.", - "request": { - "$ref": "CompleteIPRotationRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path", - "description": "The name (project, location, cluster id) of the cluster to complete IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:completeIpRotation" - }, - "get": { - "path": "v1beta1/{+name}", - "id": "container.projects.locations.clusters.get", - "description": "Gets the details of a specific cluster.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Cluster" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "zone": { - "location": "query", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" + "delete": { + "description": "Deletes a node pool from a cluster.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "nodePoolId": { + "location": "query", + "description": "The name of the node pool to delete.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "name": { + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$", + "location": "path", + "description": "The name (project, location, cluster, node pool id) of the node pool to delete.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true + }, + "projectId": { + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}", + "path": "v1beta1/{+name}", + "id": "container.projects.locations.clusters.nodePools.delete" }, - "clusterId": { - "description": "The name of the cluster to retrieve.\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" + "list": { + "description": "Lists the node pools for a cluster.", + "httpMethod": "GET", + "response": { + "$ref": "ListNodePoolsResponse" + }, + "parameterOrder": [ + "parent" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "type": "string", + "location": "query", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead." + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "clusterId": { + "location": "query", + "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "parent": { + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path", + "description": "The parent (project, location, cluster id) where the node pools will be listed.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", + "path": "v1beta1/{+parent}/nodePools", + "id": "container.projects.locations.clusters.nodePools.list" }, - "name": { - "description": "The name (project, location, cluster) of the cluster to retrieve.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path" + "rollback": { + "request": { + "$ref": "RollbackNodePoolUpgradeRequest" + }, + "description": "Roll back the previously Aborted or Failed NodePool upgrade.\nThis will be an no-op if the last upgrade successfully completed.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/nodePools/[^/]+$" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools/{nodePoolsId}:rollback", + "id": "container.projects.locations.clusters.nodePools.rollback", + "path": "v1beta1/{+name}:rollback" }, - "projectId": { - "location": "query", - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string" + "create": { + "request": { + "$ref": "CreateNodePoolRequest" + }, + "description": "Creates a node pool for a cluster.", + "httpMethod": "POST", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "description": "The parent (project, location, cluster id) where the node pool will be created.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/nodePools", + "path": "v1beta1/{+parent}/nodePools", + "id": "container.projects.locations.clusters.nodePools.create" } - }, - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}" - }, - "setNetworkPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", - "location": "path", - "description": "The name (project, location, cluster id) of the cluster to set networking policy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:setNetworkPolicy", - "path": "v1beta1/{+name}:setNetworkPolicy", - "id": "container.projects.locations.clusters.setNetworkPolicy", - "description": "Enables/Disables Network Policy for a cluster.", - "request": { - "$ref": "SetNetworkPolicyRequest" } } } @@ -1561,43 +1583,35 @@ "response": { "$ref": "Empty" }, + "parameters": { + "name": { + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "location": "path", + "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'." + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", - "location": "path", - "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.", - "type": "string", - "required": true - } - }, "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "path": "v1beta1/{+name}:cancel", "id": "container.projects.locations.operations.cancel", + "description": "Cancels the specified operation.", "request": { "$ref": "CancelOperationRequest" - }, - "description": "Cancels the specified operation." + } }, "get": { + "httpMethod": "GET", "response": { "$ref": "Operation" }, "parameterOrder": [ "name" ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { - "zone": { - "location": "query", - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" - }, "name": { "description": "The name (project, location, operation id) of the operation to get.\nSpecified in the format 'projects/*/locations/*/operations/*'.", "type": "string", @@ -1614,87 +1628,58 @@ "location": "query", "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", "type": "string" + }, + "zone": { + "location": "query", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", - "id": "container.projects.locations.operations.get", "path": "v1beta1/{+name}", + "id": "container.projects.locations.operations.get", "description": "Gets the specified operation." }, "list": { - "response": { - "$ref": "ListOperationsResponse" - }, + "description": "Lists all operations in a project in a specific zone or all zones.", "parameterOrder": [ "parent" ], + "response": { + "$ref": "ListOperationsResponse" + }, "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", + "type": "string", + "location": "query" + }, "zone": { "location": "query", "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for, or `-` for all zones.\nThis field is deprecated, use parent instead.", "type": "string" }, "parent": { + "type": "string", + "required": true, "pattern": "^projects/[^/]+/locations/[^/]+$", "location": "path", - "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", - "type": "string", - "location": "query" + "description": "The parent (project and location) where the operations will be listed.\nSpecified in the format 'projects/*/locations/*'.\nLocation \"-\" matches all zones and all regions." } }, "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", "id": "container.projects.locations.operations.list", - "path": "v1beta1/{+parent}/operations", - "description": "Lists all operations in a project in a specific zone or all zones." + "path": "v1beta1/{+parent}/operations" } } } - }, - "methods": { - "getServerConfig": { - "id": "container.projects.locations.getServerConfig", - "path": "v1beta1/{+name}/serverConfig", - "description": "Returns configuration info about the Container Engine service.", - "response": { - "$ref": "ServerConfig" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name (project and location) of the server config to get\nSpecified in the format 'projects/*/locations/*'.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/locations/[^/]+$", - "location": "path" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string", - "location": "query" - }, - "zone": { - "location": "query", - "description": "The name of the Google Compute Engine [zone](/compute/docs/zones#available)\nto return operations for.\nThis field is deprecated, use name instead.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverConfig" - } } } } @@ -1723,6 +1708,8 @@ "type": "string" }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -1731,9 +1718,7 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" + ] }, "callback": { "location": "query", @@ -1741,25 +1726,25 @@ "type": "string" }, "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query" + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] }, "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string", - "location": "query" + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token." }, "access_token": { "description": "OAuth access token.", @@ -1767,15 +1752,15 @@ "location": "query" }, "quotaUser": { + "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" + "type": "string" }, "pp": { + "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean", - "location": "query" + "type": "boolean" }, "bearer_token": { "description": "OAuth bearer token.", @@ -1794,13 +1779,15 @@ "description": "The Google Container Engine API is used for building and managing container based applications, powered by the open source Kubernetes technology.", "kind": "discovery#restDescription", "basePath": "", - "documentationLink": "https://cloud.google.com/container-engine/", "id": "container:v1beta1", - "revision": "20170908", + "documentationLink": "https://cloud.google.com/container-engine/", + "revision": "20170915", "discoveryVersion": "v1", "version_module": true, "schemas": { "NodeManagement": { + "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", + "type": "object", "properties": { "autoRepair": { "description": "Whether the nodes will be automatically repaired.", @@ -1815,9 +1802,7 @@ "description": "Specifies the Auto Upgrade knobs for the node pool." } }, - "id": "NodeManagement", - "description": "NodeManagement defines the set of node management services turned on for the\nnode pool.", - "type": "object" + "id": "NodeManagement" }, "NodeTaint": { "description": "Kubernetes taint is comprised of three fields: key, value, and effect. Effect\ncan only be one of three types: NoSchedule, PreferNoSchedule or NoExecute.\n\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/configuration/taint-and-toleration/", @@ -1828,18 +1813,18 @@ "type": "string" }, "effect": { + "enumDescriptions": [ + "NoSchedule", + "PreferNoSchedule", + "NoExecute" + ], "enum": [ "NO_SCHEDULE", "PREFER_NO_SCHEDULE", "NO_EXECUTE" ], "description": "Effect for taint.", - "type": "string", - "enumDescriptions": [ - "NoSchedule", - "PreferNoSchedule", - "NoExecute" - ] + "type": "string" }, "value": { "description": "Value for taint.", @@ -1849,6 +1834,7 @@ "id": "NodeTaint" }, "CancelOperationRequest": { + "type": "object", "properties": { "name": { "description": "The name (project, location, operation id) of the operation to cancel.\nSpecified in the format 'projects/*/locations/*/operations/*'.", @@ -1868,30 +1854,12 @@ } }, "id": "CancelOperationRequest", - "description": "CancelOperationRequest cancels a single operation.", - "type": "object" - }, - "KubernetesDashboard": { - "properties": { - "disabled": { - "description": "Whether the Kubernetes Dashboard is enabled for this cluster.", - "type": "boolean" - } - }, - "id": "KubernetesDashboard", - "description": "Configuration for the Kubernetes Dashboard.", - "type": "object" + "description": "CancelOperationRequest cancels a single operation." }, "SetLegacyAbacRequest": { + "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", + "type": "object", "properties": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" - }, - "clusterId": { - "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", - "type": "string" - }, "name": { "description": "The name (project, location, cluster id) of the cluster to set legacy abac.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string" @@ -1903,15 +1871,55 @@ "projectId": { "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "clusterId": { + "description": "The name of the cluster to update.\nThis field is deprecated, use name instead.", + "type": "string" } }, - "id": "SetLegacyAbacRequest", - "description": "SetLegacyAbacRequest enables or disables the ABAC authorization mechanism for\na cluster.", - "type": "object" + "id": "SetLegacyAbacRequest" + }, + "KubernetesDashboard": { + "description": "Configuration for the Kubernetes Dashboard.", + "type": "object", + "properties": { + "disabled": { + "type": "boolean", + "description": "Whether the Kubernetes Dashboard is enabled for this cluster." + } + }, + "id": "KubernetesDashboard" }, "Operation": { + "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", + "type": "object", "properties": { + "selfLink": { + "description": "Server-defined URL for the resource.", + "type": "string" + }, + "detail": { + "type": "string", + "description": "Detailed operation progress, if available." + }, + "targetLink": { + "description": "Server-defined URL for the target of the operation.", + "type": "string" + }, + "location": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/regions-zones/regions-zones#available) or\n[region](/compute/docs/regions-zones/regions-zones#available) in which\nthe cluster resides.", + "type": "string" + }, + "endTime": { + "description": "[Output only] The time the operation completed, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" + }, "operationType": { + "type": "string", "enumDescriptions": [ "Not set.", "Cluster create.", @@ -1950,8 +1958,7 @@ "SET_NETWORK_POLICY", "SET_MAINTENANCE_POLICY" ], - "description": "The operation type.", - "type": "string" + "description": "The operation type." }, "startTime": { "description": "[Output only] The time the operation started, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", @@ -1962,6 +1969,8 @@ "type": "string" }, "status": { + "description": "The current status of the operation.", + "type": "string", "enumDescriptions": [ "Not set.", "The operation has been created.", @@ -1975,9 +1984,7 @@ "RUNNING", "DONE", "ABORTING" - ], - "description": "The current status of the operation.", - "type": "string" + ] }, "name": { "description": "The server-assigned ID for the operation.", @@ -1986,37 +1993,21 @@ "statusMessage": { "description": "If an error has occurred, a textual description of the error.", "type": "string" - }, - "selfLink": { - "description": "Server-defined URL for the resource.", - "type": "string" - }, - "detail": { - "description": "Detailed operation progress, if available.", - "type": "string" - }, - "targetLink": { - "description": "Server-defined URL for the target of the operation.", - "type": "string" - }, - "location": { - "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/regions-zones/regions-zones#available) or\n[region](/compute/docs/regions-zones/regions-zones#available) in which\nthe cluster resides.", - "type": "string" - }, - "endTime": { - "description": "[Output only] The time the operation completed, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" } }, - "id": "Operation", - "description": "This operation resource represents operations that may have happened or are\nhappening on the cluster. All fields are output only.", - "type": "object" + "id": "Operation" }, "AddonsConfig": { + "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", + "type": "object", "properties": { + "networkPolicyConfig": { + "$ref": "NetworkPolicyConfig", + "description": "Configuration for NetworkPolicy. This only tracks whether the addon\nis enabled or not on the Master, it does not track whether network policy\nis enabled for the nodes." + }, "horizontalPodAutoscaling": { - "$ref": "HorizontalPodAutoscaling", - "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods." + "description": "Configuration for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", + "$ref": "HorizontalPodAutoscaling" }, "httpLoadBalancing": { "$ref": "HttpLoadBalancing", @@ -2027,12 +2018,9 @@ "$ref": "KubernetesDashboard" } }, - "id": "AddonsConfig", - "description": "Configuration for the addons that can be automatically spun up in the\ncluster, enabling additional functionality.", - "type": "object" + "id": "AddonsConfig" }, "MaintenanceWindow": { - "description": "MaintenanceWindow defines the maintenance window to be used for the cluster.", "type": "object", "properties": { "dailyMaintenanceWindow": { @@ -2040,23 +2028,16 @@ "description": "DailyMaintenanceWindow specifies a daily maintenance operation window." } }, - "id": "MaintenanceWindow" + "id": "MaintenanceWindow", + "description": "MaintenanceWindow defines the maintenance window to be used for the cluster." }, "RollbackNodePoolUpgradeRequest": { "description": "RollbackNodePoolUpgradeRequest rollbacks the previously Aborted or Failed\nNodePool upgrade. This will be an no-op if the last upgrade successfully\ncompleted.", "type": "object", "properties": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" - }, - "clusterId": { - "description": "The name of the cluster to rollback.\nThis field is deprecated, use name instead.", - "type": "string" - }, "nodePoolId": { - "description": "The name of the node pool to rollback.\nThis field is deprecated, use name instead.", - "type": "string" + "type": "string", + "description": "The name of the node pool to rollback.\nThis field is deprecated, use name instead." }, "name": { "description": "The name (project, location, cluster, node pool id) of the node poll to\nrollback upgrade.\nSpecified in the format 'projects/*/locations/*/clusters/*/nodePools/*'.", @@ -2065,12 +2046,26 @@ "projectId": { "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", "type": "string" + }, + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead." + }, + "clusterId": { + "description": "The name of the cluster to rollback.\nThis field is deprecated, use name instead.", + "type": "string" } }, "id": "RollbackNodePoolUpgradeRequest" }, "UpdateClusterRequest": { + "description": "UpdateClusterRequest updates the settings of a cluster.", + "type": "object", "properties": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", + "type": "string" + }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", "type": "string" @@ -2080,75 +2075,68 @@ "type": "string" }, "update": { - "description": "A description of the update.", - "$ref": "ClusterUpdate" + "$ref": "ClusterUpdate", + "description": "A description of the update." }, "name": { "description": "The name (project, location, cluster) of the cluster to update.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string" } }, - "id": "UpdateClusterRequest", - "description": "UpdateClusterRequest updates the settings of a cluster.", - "type": "object" + "id": "UpdateClusterRequest" + }, + "NetworkPolicyConfig": { + "description": "Configuration for NetworkPolicy. This only tracks whether the addon\nis enabled or not on the Master, it does not track whether network policy\nis enabled for the nodes.", + "type": "object", + "properties": { + "disabled": { + "description": "Whether NetworkPolicy is enabled for this cluster.", + "type": "boolean" + } + }, + "id": "NetworkPolicyConfig" }, "NetworkPolicy": { + "description": "Configuration options for the NetworkPolicy feature.\nhttps://kubernetes.io/docs/concepts/services-networking/networkpolicies/", + "type": "object", "properties": { "enabled": { "description": "Whether network policy is enabled on the cluster.", "type": "boolean" }, "provider": { - "enum": [ - "PROVIDER_UNSPECIFIED", - "CALICO" - ], - "description": "The selected network policy provider.", "type": "string", "enumDescriptions": [ "Not set", "Tigera (Calico Felix)." - ] + ], + "enum": [ + "PROVIDER_UNSPECIFIED", + "CALICO" + ], + "description": "The selected network policy provider." } }, - "id": "NetworkPolicy", - "description": "Configuration options for the NetworkPolicy feature.\nhttps://kubernetes.io/docs/concepts/services-networking/networkpolicies/", - "type": "object" + "id": "NetworkPolicy" }, "Cluster": { + "type": "object", "properties": { - "ipAllocationPolicy": { - "$ref": "IPAllocationPolicy", - "description": "Configuration for cluster IP allocation." - }, - "location": { - "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/regions-zones/regions-zones#available) or\n[region](/compute/docs/regions-zones/regions-zones#available) in which\nthe cluster resides.", - "type": "string" - }, - "endpoint": { - "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information.", - "type": "string" - }, - "createTime": { - "description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", - "type": "string" - }, "clusterIpv4Cidr": { - "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`.", - "type": "string" + "type": "string", + "description": "The IP address range of the container pods in this cluster, in\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`). Leave blank to have\none automatically chosen or specify a `/14` block in `10.0.0.0/8`." }, "initialNodeCount": { + "type": "integer", "format": "int32", - "description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time.", - "type": "integer" + "description": "The number of nodes to create in this cluster. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.\nFor requests, this field should only be used in lieu of a\n\"node_pool\" object, since this configuration (along with the\n\"node_config\") will be used to create a \"NodePool\" object with an\nauto-generated name. Do not use this and a node_pool at the same time." }, - "selfLink": { - "description": "[Output only] Server-defined URL for the resource.", - "type": "string" + "nodePools": { + "description": "The node pools associated with this cluster.\nThis field should not be set if \"node_config\" or \"initial_node_count\" are\nspecified.", + "items": { + "$ref": "NodePool" + }, + "type": "array" }, "locations": { "description": "The list of Google Compute Engine\n[locations](/compute/docs/zones#available) in which the cluster's nodes\nshould be located.", @@ -2157,12 +2145,9 @@ }, "type": "array" }, - "nodePools": { - "description": "The node pools associated with this cluster.\nThis field should not be set if \"node_config\" or \"initial_node_count\" are\nspecified.", - "items": { - "$ref": "NodePool" - }, - "type": "array" + "selfLink": { + "description": "[Output only] Server-defined URL for the resource.", + "type": "string" }, "instanceGroupUrls": { "description": "[Output only] The resource URLs of [instance\ngroups](/compute/docs/instance-groups/) associated with this\ncluster.", @@ -2176,8 +2161,8 @@ "type": "string" }, "networkPolicy": { - "$ref": "NetworkPolicy", - "description": "Configuration options for the NetworkPolicy feature." + "description": "Configuration options for the NetworkPolicy feature.", + "$ref": "NetworkPolicy" }, "enableKubernetesAlpha": { "description": "Kubernetes alpha features are enabled on this cluster. This includes alpha\nAPI groups (e.g. v1beta1) and features that may not be production ready in\nthe kubernetes version of the master and nodes.\nThe cluster has no SLA for uptime and master/node upgrades are disabled.\nAlpha enabled clusters are automatically deleted thirty days after\ncreation.", @@ -2197,15 +2182,15 @@ "type": "string" }, "network": { - "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used.", - "type": "string" + "type": "string", + "description": "The name of the Google Compute Engine\n[network](/compute/docs/networks-and-firewalls#networks) to which the\ncluster is connected. If left unspecified, the `default` network\nwill be used." }, "zone": { "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use location instead.", "type": "string" }, - "loggingService": { - "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", + "expireTime": { + "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", "type": "string" }, "nodeIpv4CidrSize": { @@ -2213,8 +2198,8 @@ "description": "[Output only] The size of the address space on each node for hosting\ncontainers. This is provisioned from within the `container_ipv4_cidr`\nrange.", "type": "integer" }, - "expireTime": { - "description": "[Output only] The time the cluster will be automatically\ndeleted in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "loggingService": { + "description": "The logging service the cluster should use to write logs.\nCurrently available options:\n\n* `logging.googleapis.com` - the Google Cloud Logging service.\n* `none` - no logs will be exported from the cluster.\n* if left as an empty string,`logging.googleapis.com` will be used.", "type": "string" }, "masterAuthorizedNetworksConfig": { @@ -2230,8 +2215,8 @@ "description": "The authentication information for accessing the master endpoint." }, "currentMasterVersion": { - "description": "[Output only] The current software version of the master endpoint.", - "type": "string" + "type": "string", + "description": "[Output only] The current software version of the master endpoint." }, "nodeConfig": { "$ref": "NodeConfig", @@ -2242,6 +2227,14 @@ "description": "Configurations for the various addons available to run in the cluster." }, "status": { + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the cluster is being created.", + "The RUNNING state indicates the cluster has been created and is fully\nusable.", + "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the cluster is being deleted.", + "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." + ], "enum": [ "STATUS_UNSPECIFIED", "PROVISIONING", @@ -2251,45 +2244,56 @@ "ERROR" ], "description": "[Output only] The current status of this cluster.", - "type": "string", - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the cluster is being created.", - "The RUNNING state indicates the cluster has been created and is fully\nusable.", - "The RECONCILING state indicates that some work is actively being done on\nthe cluster, such as upgrading the master or node software. Details can\nbe found in the `statusMessage` field.", - "The STOPPING state indicates the cluster is being deleted.", - "The ERROR state indicates the cluster may be unusable. Details\ncan be found in the `statusMessage` field." - ] - }, - "subnetwork": { - "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", "type": "string" }, "currentNodeVersion": { "description": "[Output only] The current version of the node software components.\nIf they are currently at multiple versions because they're in the process\nof being upgraded, this reflects the minimum version of all nodes.", "type": "string" }, - "maintenancePolicy": { - "$ref": "MaintenancePolicy", - "description": "Configure the maintenance policy for this cluster." + "subnetwork": { + "description": "The name of the Google Compute Engine\n[subnetwork](/compute/docs/subnetworks) to which the\ncluster is connected.", + "type": "string" }, "name": { "description": "The name of this cluster. The name must be unique within this project\nand zone, and can be up to 40 characters with the following restrictions:\n\n* Lowercase letters, numbers, and hyphens only.\n* Must start with a letter.\n* Must end with a number or a letter.", "type": "string" }, + "maintenancePolicy": { + "$ref": "MaintenancePolicy", + "description": "Configure the maintenance policy for this cluster." + }, "initialClusterVersion": { "description": "The initial Kubernetes version for this cluster. Valid versions are those\nfound in validMasterVersions returned by getServerConfig. The version can\nbe upgraded over time; such upgrades are reflected in\ncurrentMasterVersion and currentNodeVersion.", "type": "string" + }, + "ipAllocationPolicy": { + "description": "Configuration for cluster IP allocation.", + "$ref": "IPAllocationPolicy" + }, + "location": { + "description": "[Output only] The name of the Google Compute Engine\n[zone](/compute/docs/regions-zones/regions-zones#available) or\n[region](/compute/docs/regions-zones/regions-zones#available) in which\nthe cluster resides.", + "type": "string" + }, + "endpoint": { + "type": "string", + "description": "[Output only] The IP address of this cluster's master endpoint.\nThe endpoint can be accessed from the internet at\n`https://username:password@endpoint/`.\n\nSee the `masterAuth` property of this resource for username and\npassword information." + }, + "createTime": { + "description": "[Output only] The time the cluster was created, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", + "type": "string" } }, "id": "Cluster", - "description": "A Google Container Engine cluster.", - "type": "object" + "description": "A Google Container Engine cluster." }, "CreateNodePoolRequest": { "description": "CreateNodePoolRequest creates a node pool for a cluster.", "type": "object", "properties": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", + "type": "string" + }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", "type": "string" @@ -2299,58 +2303,63 @@ "type": "string" }, "nodePool": { - "description": "The node pool to create.", - "$ref": "NodePool" + "$ref": "NodePool", + "description": "The node pool to create." }, "clusterId": { - "description": "The name of the cluster.\nThis field is deprecated, use parent instead.", - "type": "string" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use parent instead.", - "type": "string" + "type": "string", + "description": "The name of the cluster.\nThis field is deprecated, use parent instead." } }, "id": "CreateNodePoolRequest" }, "ListOperationsResponse": { + "description": "ListOperationsResponse is the result of ListOperationsRequest.", + "type": "object", "properties": { - "missingZones": { - "description": "If any zones are listed here, the list of operations returned\nmay be missing the operations from those zones.", - "items": { - "type": "string" - }, - "type": "array" - }, "operations": { "description": "A list of operations in the project in the specified zone.", "items": { "$ref": "Operation" }, "type": "array" + }, + "missingZones": { + "description": "If any zones are listed here, the list of operations returned\nmay be missing the operations from those zones.", + "items": { + "type": "string" + }, + "type": "array" } }, - "id": "ListOperationsResponse", - "description": "ListOperationsResponse is the result of ListOperationsRequest.", - "type": "object" + "id": "ListOperationsResponse" }, "CidrBlock": { - "description": "CidrBlock contains an optional name and one CIDR block.", - "type": "object", "properties": { - "cidrBlock": { - "description": "cidr_block must be specified in CIDR notation.", - "type": "string" - }, "displayName": { "description": "display_name is an optional field for users to identify CIDR blocks.", "type": "string" + }, + "cidrBlock": { + "description": "cidr_block must be specified in CIDR notation.", + "type": "string" } }, - "id": "CidrBlock" + "id": "CidrBlock", + "description": "CidrBlock contains an optional name and one CIDR block.", + "type": "object" }, "ServerConfig": { + "description": "Container Engine service configuration.", + "type": "object", "properties": { + "validMasterVersions": { + "description": "List of valid master versions.", + "items": { + "type": "string" + }, + "type": "array" + }, "defaultImageType": { "description": "Default image type.", "type": "string" @@ -2367,105 +2376,29 @@ "type": "array" }, "validNodeVersions": { - "description": "List of valid node upgrade target versions.", "items": { "type": "string" }, - "type": "array" - }, - "validMasterVersions": { - "description": "List of valid master versions.", - "items": { - "type": "string" - }, - "type": "array" + "type": "array", + "description": "List of valid node upgrade target versions." } }, - "id": "ServerConfig", - "description": "Container Engine service configuration.", - "type": "object" - }, - "MasterAuth": { - "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates.", - "type": "object", - "properties": { - "clientCertificate": { - "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", - "type": "string" - }, - "username": { - "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username.", - "type": "string" - }, - "password": { - "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", - "type": "string" - }, - "clientCertificateConfig": { - "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued.", - "$ref": "ClientCertificateConfig" - }, - "clientKey": { - "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", - "type": "string" - }, - "clusterCaCertificate": { - "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", - "type": "string" - } - }, - "id": "MasterAuth" + "id": "ServerConfig" }, "NodeConfig": { + "type": "object", "properties": { - "imageType": { - "description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used.", - "type": "string" - }, - "oauthScopes": { - "description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container Registry](/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added.", - "items": { - "type": "string" - }, - "type": "array" - }, - "taints": { - "description": "List of kubernetes taints to be applied to each node.\n\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/configuration/taint-and-toleration/", - "items": { - "$ref": "NodeTaint" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/", - "type": "object" - }, - "diskSizeGb": { - "format": "int32", - "description": "Size of the disk attached to each node, specified in GB.\nThe smallest allowed disk size is 10GB.\n\nIf unspecified, the default disk size is 100GB.", - "type": "integer" - }, - "accelerators": { - "description": "A list of hardware accelerators to be attached to each node.\nSee https://cloud.google.com/compute/docs/gpus for more information about\nsupport for GPUs.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, "machineType": { "description": "The name of a Google Compute Engine [machine\ntype](/compute/docs/machine-types) (e.g.\n`n1-standard-1`).\n\nIf unspecified, the default machine type is\n`n1-standard-1`.", "type": "string" }, "minCpuPlatform": { - "description": "Minimum cpu/platform to be used by this instance. The instance may be\nscheduled on the specified or newer cpu/platform. Applicable values are the\nfriendly names of CPU platforms, such as\n\u003ccode\u003eminCpuPlatform: "Intel Haswell"\u003c/code\u003e or\n\u003ccode\u003eminCpuPlatform: "Intel Sandy Bridge"\u003c/code\u003e. For more\ninformation, read \u003ca href=\"/compute/docs/instances/specify-min-cpu-platform\"\u003eSpecifying a Minimum CPU Platform\u003c/a\u003e.", + "description": "Minimum CPU platform to be used by this instance. The instance may be\nscheduled on the specified or newer CPU platform. Applicable values are the\nfriendly names of CPU platforms, such as\n\u003ccode\u003eminCpuPlatform: "Intel Haswell"\u003c/code\u003e or\n\u003ccode\u003eminCpuPlatform: "Intel Sandy Bridge"\u003c/code\u003e. For more\ninformation, read [how to specify min CPU platform](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)", "type": "string" }, "preemptible": { - "description": "Whether the nodes are created as preemptible VM instances. See:\nhttps://cloud.google.com/compute/docs/instances/preemptible for more\ninforamtion about preemptible VM instances.", - "type": "boolean" + "type": "boolean", + "description": "Whether the nodes are created as preemptible VM instances. See:\nhttps://cloud.google.com/compute/docs/instances/preemptible for more\ninforamtion about preemptible VM instances." }, "localSsdCount": { "format": "int32", @@ -2489,14 +2422,80 @@ "serviceAccount": { "description": "The Google Cloud Platform Service Account to be used by the node VMs. If\nno Service Account is specified, the \"default\" service account is used.", "type": "string" + }, + "imageType": { + "description": "The image type to use for this node. Note that for a given image type,\nthe latest version of it will be used.", + "type": "string" + }, + "oauthScopes": { + "description": "The set of Google API scopes to be made available on all of the\nnode VMs under the \"default\" service account.\n\nThe following scopes are recommended, but not required, and by default are\nnot included:\n\n* `https://www.googleapis.com/auth/compute` is required for mounting\npersistent storage on your nodes.\n* `https://www.googleapis.com/auth/devstorage.read_only` is required for\ncommunicating with **gcr.io**\n(the [Google Container Registry](/container-registry/)).\n\nIf unspecified, no scopes are added, unless Cloud Logging or Cloud\nMonitoring are enabled, in which case their required scopes will be added.", + "items": { + "type": "string" + }, + "type": "array" + }, + "taints": { + "description": "List of kubernetes taints to be applied to each node.\n\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/configuration/taint-and-toleration/", + "items": { + "$ref": "NodeTaint" + }, + "type": "array" + }, + "labels": { + "description": "The map of Kubernetes labels (key/value pairs) to be applied to each node.\nThese will added in addition to any default label(s) that\nKubernetes may apply to the node.\nIn case of conflict in label keys, the applied set may differ depending on\nthe Kubernetes version -- it's best to assume the behavior is undefined\nand conflicts should be avoided.\nFor more information, including usage and the valid values, see:\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "diskSizeGb": { + "format": "int32", + "description": "Size of the disk attached to each node, specified in GB.\nThe smallest allowed disk size is 10GB.\n\nIf unspecified, the default disk size is 100GB.", + "type": "integer" + }, + "accelerators": { + "description": "A list of hardware accelerators to be attached to each node.\nSee https://cloud.google.com/compute/docs/gpus for more information about\nsupport for GPUs.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" } }, "id": "NodeConfig", - "description": "Parameters that describe the nodes in a cluster.", - "type": "object" + "description": "Parameters that describe the nodes in a cluster." + }, + "MasterAuth": { + "type": "object", + "properties": { + "clientCertificateConfig": { + "description": "Configuration for client certificate authentication on the cluster. If no\nconfiguration is specified, a client certificate is issued.", + "$ref": "ClientCertificateConfig" + }, + "password": { + "description": "The password to use for HTTP basic authentication to the master endpoint.\nBecause the master endpoint is open to the Internet, you should create a\nstrong password. If a password is provided for cluster creation, username\nmust be non-empty.", + "type": "string" + }, + "clientKey": { + "description": "[Output only] Base64-encoded private key used by clients to authenticate\nto the cluster endpoint.", + "type": "string" + }, + "clusterCaCertificate": { + "description": "[Output only] Base64-encoded public certificate that is the root of\ntrust for the cluster.", + "type": "string" + }, + "clientCertificate": { + "description": "[Output only] Base64-encoded public certificate used by clients to\nauthenticate to the cluster endpoint.", + "type": "string" + }, + "username": { + "type": "string", + "description": "The username to use for HTTP basic authentication to the master endpoint.\nFor clusters v1.6.0 and later, you can disable basic authentication by\nproviding an empty username." + } + }, + "id": "MasterAuth", + "description": "The authentication information for accessing the master endpoint.\nAuthentication can be done using HTTP basic auth or using client\ncertificates." }, "DailyMaintenanceWindow": { - "description": "Time window specified for daily maintenance operations.", "type": "object", "properties": { "startTime": { @@ -2508,9 +2507,12 @@ "type": "string" } }, - "id": "DailyMaintenanceWindow" + "id": "DailyMaintenanceWindow", + "description": "Time window specified for daily maintenance operations." }, "AutoUpgradeOptions": { + "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", + "type": "object", "properties": { "autoUpgradeStartTime": { "description": "[Output only] This field is set when upgrades are about to commence\nwith the approximate start time for the upgrades, in\n[RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", @@ -2521,95 +2523,44 @@ "type": "string" } }, - "id": "AutoUpgradeOptions", - "description": "AutoUpgradeOptions defines the set of options for the user to control how\nthe Auto Upgrades will proceed.", - "type": "object" + "id": "AutoUpgradeOptions" }, "ListClustersResponse": { "description": "ListClustersResponse is the result of ListClustersRequest.", "type": "object", "properties": { - "missingZones": { - "description": "If any zones are listed here, the list of clusters returned\nmay be missing those zones.", - "items": { - "type": "string" - }, - "type": "array" - }, "clusters": { "description": "A list of clusters in the project in the specified zone, or\nacross all ones.", "items": { "$ref": "Cluster" }, "type": "array" + }, + "missingZones": { + "description": "If any zones are listed here, the list of clusters returned\nmay be missing those zones.", + "items": { + "type": "string" + }, + "type": "array" } }, "id": "ListClustersResponse" }, "HttpLoadBalancing": { + "type": "object", "properties": { "disabled": { - "description": "Whether the HTTP Load Balancing controller is enabled in the cluster.\nWhen enabled, it runs a small pod in the cluster that manages the load\nbalancers.", - "type": "boolean" + "type": "boolean", + "description": "Whether the HTTP Load Balancing controller is enabled in the cluster.\nWhen enabled, it runs a small pod in the cluster that manages the load\nbalancers." } }, "id": "HttpLoadBalancing", - "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster.", - "type": "object" - }, - "SetMasterAuthRequest": { - "properties": { - "update": { - "$ref": "MasterAuth", - "description": "A description of the update." - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" - }, - "name": { - "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string" - }, - "action": { - "enum": [ - "UNKNOWN", - "SET_PASSWORD", - "GENERATE_PASSWORD" - ], - "description": "The exact form of action to be taken on the master auth", - "type": "string", - "enumDescriptions": [ - "Operation is unknown and will error out", - "Set the password to a user generated value.", - "Generate a new password and set it to that." - ] - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead.", - "type": "string" - }, - "clusterId": { - "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", - "type": "string" - } - }, - "id": "SetMasterAuthRequest", - "description": "SetMasterAuthRequest updates the admin password of a cluster.", - "type": "object" + "description": "Configuration options for the HTTP (L7) load balancing controller addon,\nwhich makes it easy to set up HTTP load balancers for services in a cluster." }, "SetNetworkPolicyRequest": { "description": "SetNetworkPolicyRequest enables/disables network policy for a cluster.", "type": "object", "properties": { - "networkPolicy": { - "$ref": "NetworkPolicy", - "description": "Configuration options for the NetworkPolicy feature." - }, - "name": { - "description": "The name (project, location, cluster id) of the cluster to set networking policy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string" - }, "projectId": { "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", "type": "string" @@ -2621,10 +2572,59 @@ "clusterId": { "description": "The name of the cluster.\nThis field is deprecated, use name instead.", "type": "string" + }, + "networkPolicy": { + "description": "Configuration options for the NetworkPolicy feature.", + "$ref": "NetworkPolicy" + }, + "name": { + "description": "The name (project, location, cluster id) of the cluster to set networking policy.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" } }, "id": "SetNetworkPolicyRequest" }, + "SetMasterAuthRequest": { + "id": "SetMasterAuthRequest", + "description": "SetMasterAuthRequest updates the admin password of a cluster.", + "type": "object", + "properties": { + "name": { + "description": "The name (project, location, cluster) of the cluster to set auth.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" + }, + "action": { + "enumDescriptions": [ + "Operation is unknown and will error out", + "Set the password to a user generated value.", + "Generate a new password and set it to that." + ], + "enum": [ + "UNKNOWN", + "SET_PASSWORD", + "GENERATE_PASSWORD" + ], + "description": "The exact form of action to be taken on the master auth", + "type": "string" + }, + "projectId": { + "type": "string", + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use name instead." + }, + "clusterId": { + "description": "The name of the cluster to upgrade.\nThis field is deprecated, use name instead.", + "type": "string" + }, + "update": { + "$ref": "MasterAuth", + "description": "A description of the update." + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + } + } + }, "ClientCertificateConfig": { "description": "Configuration for client certificates on the cluster.", "type": "object", @@ -2637,6 +2637,8 @@ "id": "ClientCertificateConfig" }, "NodePoolAutoscaling": { + "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", + "type": "object", "properties": { "maxNodeCount": { "format": "int32", @@ -2653,93 +2655,26 @@ "type": "boolean" } }, - "id": "NodePoolAutoscaling", - "description": "NodePoolAutoscaling contains information required by cluster autoscaler to\nadjust the size of the node pool to the current cluster usage.", - "type": "object" + "id": "NodePoolAutoscaling" }, "MaintenancePolicy": { "description": "MaintenancePolicy defines the maintenance policy to be used for the cluster.", "type": "object", "properties": { "window": { - "description": "Specifies the maintenance window in which maintenance may be performed.", - "$ref": "MaintenanceWindow" + "$ref": "MaintenanceWindow", + "description": "Specifies the maintenance window in which maintenance may be performed." } }, "id": "MaintenancePolicy" }, - "IPAllocationPolicy": { - "description": "Configuration for controlling how IPs are allocated in the cluster.", + "ClusterUpdate": { + "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", "type": "object", "properties": { - "servicesIpv4CidrBlock": { - "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" - }, - "subnetworkName": { - "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.", - "type": "string" - }, - "clusterIpv4Cidr": { - "description": "This field is deprecated, use cluster_ipv4_cidr_block.", - "type": "string" - }, - "nodeIpv4Cidr": { - "description": "This field is deprecated, use node_ipv4_cidr_block.", - "type": "string" - }, - "clusterIpv4CidrBlock": { - "description": "The IP address range for the cluster pod IPs. If this field is set, then\n`cluster.cluster_ipv4_cidr` must be left blank.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" - }, - "clusterSecondaryRangeName": { - "description": "The name of the secondary range to be used for the cluster CIDR\nblock. The secondary range will be used for pod IP\naddresses. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases and\ncreate_subnetwork is false.", - "type": "string" - }, - "nodeIpv4CidrBlock": { - "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", - "type": "string" - }, - "servicesIpv4Cidr": { - "description": "This field is deprecated, use services_ipv4_cidr_block.", - "type": "string" - }, - "createSubnetwork": { - "description": "Whether a new subnetwork will be created automatically for the cluster.\n\nThis field is only applicable when `use_ip_aliases` is true.", - "type": "boolean" - }, - "useIpAliases": { - "description": "Whether alias IPs will be used for pod IPs in the cluster.", - "type": "boolean" - }, - "servicesSecondaryRangeName": { - "description": "The name of the secondary range to be used as for the services\nCIDR block. The secondary range will be used for service\nClusterIPs. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases and\ncreate_subnetwork is false.", - "type": "string" - } - }, - "id": "IPAllocationPolicy" - }, - "ClusterUpdate": { - "properties": { - "desiredAddonsConfig": { - "description": "Configurations for the various addons available to run in the cluster.", - "$ref": "AddonsConfig" - }, - "desiredNodePoolId": { - "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster.", - "type": "string" - }, - "desiredNodeVersion": { - "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", - "type": "string" - }, - "desiredMasterVersion": { - "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", - "type": "string" - }, "desiredMasterAuthorizedNetworksConfig": { - "description": "The desired configuration options for master authorized networks feature.", - "$ref": "MasterAuthorizedNetworksConfig" + "$ref": "MasterAuthorizedNetworksConfig", + "description": "The desired configuration options for master authorized networks feature." }, "desiredNodePoolAutoscaling": { "$ref": "NodePoolAutoscaling", @@ -2759,25 +2694,94 @@ "desiredImageType": { "description": "The desired image type for the node pool.\nNOTE: Set the \"desired_node_pool\" field as well.", "type": "string" + }, + "desiredAddonsConfig": { + "$ref": "AddonsConfig", + "description": "Configurations for the various addons available to run in the cluster." + }, + "desiredNodePoolId": { + "description": "The node pool to be upgraded. This field is mandatory if\n\"desired_node_version\", \"desired_image_family\" or\n\"desired_node_pool_autoscaling\" is specified and there is more than one\nnode pool on the cluster.", + "type": "string" + }, + "desiredNodeVersion": { + "description": "The Kubernetes version to change the nodes to (typically an\nupgrade). Use `-` to upgrade to the latest version supported by\nthe server.", + "type": "string" + }, + "desiredMasterVersion": { + "description": "The Kubernetes version to change the master to. The only valid value is the\nlatest supported version. Use \"-\" to have the server automatically select\nthe latest version.", + "type": "string" } }, - "id": "ClusterUpdate", - "description": "ClusterUpdate describes an update to the cluster. Exactly one update can\nbe applied to a cluster with each request, so at most one field can be\nprovided.", - "type": "object" + "id": "ClusterUpdate" + }, + "IPAllocationPolicy": { + "type": "object", + "properties": { + "nodeIpv4CidrBlock": { + "description": "The IP address range of the instance IPs in this cluster.\n\nThis is applicable only if `create_subnetwork` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "servicesIpv4Cidr": { + "description": "This field is deprecated, use services_ipv4_cidr_block.", + "type": "string" + }, + "servicesSecondaryRangeName": { + "description": "The name of the secondary range to be used as for the services\nCIDR block. The secondary range will be used for service\nClusterIPs. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases and\ncreate_subnetwork is false.", + "type": "string" + }, + "useIpAliases": { + "description": "Whether alias IPs will be used for pod IPs in the cluster.", + "type": "boolean" + }, + "createSubnetwork": { + "description": "Whether a new subnetwork will be created automatically for the cluster.\n\nThis field is only applicable when `use_ip_aliases` is true.", + "type": "boolean" + }, + "subnetworkName": { + "description": "A custom subnetwork name to be used if `create_subnetwork` is true. If\nthis field is empty, then an automatic name will be chosen for the new\nsubnetwork.", + "type": "string" + }, + "servicesIpv4CidrBlock": { + "description": "The IP address range of the services IPs in this cluster. If blank, a range\nwill be automatically chosen with the default size.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "clusterIpv4Cidr": { + "description": "This field is deprecated, use cluster_ipv4_cidr_block.", + "type": "string" + }, + "nodeIpv4Cidr": { + "description": "This field is deprecated, use node_ipv4_cidr_block.", + "type": "string" + }, + "clusterIpv4CidrBlock": { + "description": "The IP address range for the cluster pod IPs. If this field is set, then\n`cluster.cluster_ipv4_cidr` must be left blank.\n\nThis field is only applicable when `use_ip_aliases` is true.\n\nSet to blank to have a range chosen with the default size.\n\nSet to /netmask (e.g. `/14`) to have a range chosen with a specific\nnetmask.\n\nSet to a\n[CIDR](http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)\nnotation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g.\n`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range\nto use.", + "type": "string" + }, + "clusterSecondaryRangeName": { + "description": "The name of the secondary range to be used for the cluster CIDR\nblock. The secondary range will be used for pod IP\naddresses. This must be an existing secondary range associated\nwith the cluster subnetwork.\n\nThis field is only applicable with use_ip_aliases and\ncreate_subnetwork is false.", + "type": "string" + } + }, + "id": "IPAllocationPolicy", + "description": "Configuration for controlling how IPs are allocated in the cluster." }, "HorizontalPodAutoscaling": { + "id": "HorizontalPodAutoscaling", + "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", + "type": "object", "properties": { "disabled": { "description": "Whether the Horizontal Pod Autoscaling feature is enabled in the cluster.\nWhen enabled, it ensures that a Heapster pod is running in the cluster,\nwhich is also used by the Cloud Monitoring service.", "type": "boolean" } - }, - "id": "HorizontalPodAutoscaling", - "description": "Configuration options for the horizontal pod autoscaling feature, which\nincreases or decreases the number of replica pods a replication controller\nhas based on the resource usage of the existing pods.", - "type": "object" + } }, "SetMaintenancePolicyRequest": { "properties": { + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", + "type": "string" + }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.", "type": "string" @@ -2793,42 +2797,20 @@ "maintenancePolicy": { "description": "The maintenance policy to be set for the cluster. An empty field\nclears the existing maintenance policy.", "$ref": "MaintenancePolicy" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).", - "type": "string" } }, "id": "SetMaintenancePolicyRequest", "description": "SetMaintenancePolicyRequest sets the maintenance policy for a cluster.", "type": "object" }, - "MasterAuthorizedNetworksConfig": { - "properties": { - "enabled": { - "description": "Whether or not master authorized networks is enabled.", - "type": "boolean" - }, - "cidrBlocks": { - "description": "cidr_blocks define up to 10 external networks that could access\nKubernetes master through HTTPS.", - "items": { - "$ref": "CidrBlock" - }, - "type": "array" - } - }, - "id": "MasterAuthorizedNetworksConfig", - "description": "Configuration options for the master authorized networks feature. Enabled\nmaster authorized networks will disallow all external traffic to access\nKubernetes master through HTTPS except traffic from the given CIDR blocks,\nGoogle Compute Engine Public IPs and Google Prod IPs.", - "type": "object" - }, - "Empty": { - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" - }, "SetNodePoolManagementRequest": { + "description": "SetNodePoolManagementRequest sets the node management properties of a node\npool.", + "type": "object", "properties": { + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", + "type": "string" + }, "name": { "description": "The name (project, location, cluster, node pool id) of the node pool to set\nmanagement properties. Specified in the format\n'projects/*/locations/*/clusters/*/nodePools/*'.", "type": "string" @@ -2848,26 +2830,38 @@ "nodePoolId": { "description": "The name of the node pool to update.\nThis field is deprecated, use name instead.", "type": "string" - }, - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" } }, - "id": "SetNodePoolManagementRequest", - "description": "SetNodePoolManagementRequest sets the node management properties of a node\npool.", - "type": "object" + "id": "SetNodePoolManagementRequest" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "MasterAuthorizedNetworksConfig": { + "description": "Configuration options for the master authorized networks feature. Enabled\nmaster authorized networks will disallow all external traffic to access\nKubernetes master through HTTPS except traffic from the given CIDR blocks,\nGoogle Compute Engine Public IPs and Google Prod IPs.", + "type": "object", + "properties": { + "enabled": { + "description": "Whether or not master authorized networks is enabled.", + "type": "boolean" + }, + "cidrBlocks": { + "items": { + "$ref": "CidrBlock" + }, + "type": "array", + "description": "cidr_blocks define up to 10 external networks that could access\nKubernetes master through HTTPS." + } + }, + "id": "MasterAuthorizedNetworksConfig" }, "CreateClusterRequest": { + "description": "CreateClusterRequest creates a cluster.", + "type": "object", "properties": { - "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", - "type": "string" - }, - "parent": { - "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", - "type": "string" - }, "cluster": { "$ref": "Cluster", "description": "A [cluster\nresource](/container-engine/reference/rest/v1beta1/projects.zones.clusters)" @@ -2875,11 +2869,17 @@ "projectId": { "description": "The Google Developers Console [project ID or project\nnumber](https://support.google.com/cloud/answer/6158840).\nThis field is deprecated, use parent instead.", "type": "string" + }, + "zone": { + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use parent instead.", + "type": "string" + }, + "parent": { + "description": "The parent (project and location) where the cluster will be created.\nSpecified in the format 'projects/*/locations/*'.", + "type": "string" } }, - "id": "CreateClusterRequest", - "description": "CreateClusterRequest creates a cluster.", - "type": "object" + "id": "CreateClusterRequest" }, "ListNodePoolsResponse": { "properties": { @@ -2896,52 +2896,53 @@ "type": "object" }, "CompleteIPRotationRequest": { + "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", + "type": "object", "properties": { "name": { "description": "The name (project, location, cluster id) of the cluster to complete IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string" }, "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", - "type": "string" + "type": "string", + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead." }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" + "type": "string", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead." }, "clusterId": { - "description": "The name of the cluster.\nThis field is deprecated, use name instead.", - "type": "string" + "type": "string", + "description": "The name of the cluster.\nThis field is deprecated, use name instead." } }, - "id": "CompleteIPRotationRequest", - "description": "CompleteIPRotationRequest moves the cluster master back into single-IP mode.", - "type": "object" + "id": "CompleteIPRotationRequest" }, "StartIPRotationRequest": { "description": "StartIPRotationRequest creates a new IP for the cluster and then performs\na node upgrade on each node pool to point to the new IP.", "type": "object", "properties": { - "name": { - "description": "The name (project, location, cluster id) of the cluster to start IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string" - }, "projectId": { "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", "type": "string" }, "zone": { - "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", - "type": "string" + "type": "string", + "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead." }, "clusterId": { "description": "The name of the cluster.\nThis field is deprecated, use name instead.", "type": "string" + }, + "name": { + "description": "The name (project, location, cluster id) of the cluster to start IP rotation.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", + "type": "string" } }, "id": "StartIPRotationRequest" }, "AcceleratorConfig": { + "id": "AcceleratorConfig", "description": "AcceleratorConfig represents a Hardware Accelerator request.", "type": "object", "properties": { @@ -2954,92 +2955,45 @@ "description": "The number of the accelerator cards exposed to an instance.", "type": "string" } - }, - "id": "AcceleratorConfig" + } }, "SetLabelsRequest": { + "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", + "type": "object", "properties": { - "name": { - "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", - "type": "string" - }, - "resourceLabels": { - "additionalProperties": { - "type": "string" - }, - "description": "The labels to set for that cluster.", - "type": "object" - }, - "projectId": { - "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", - "type": "string" - }, "clusterId": { "description": "The name of the cluster.\nThis field is deprecated, use name instead.", "type": "string" }, "labelFingerprint": { - "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint.", - "type": "string" + "type": "string", + "description": "The fingerprint of the previous set of labels for this resource,\nused to detect conflicts. The fingerprint is initially generated by\nContainer Engine and changes after every request to modify or update\nlabels. You must always provide an up-to-date fingerprint hash when\nupdating or changing labels. Make a \u003ccode\u003eget()\u003c/code\u003e request to the\nresource to get the latest fingerprint." }, "zone": { "description": "The name of the Google Compute Engine\n[zone](/compute/docs/zones#available) in which the cluster\nresides.\nThis field is deprecated, use name instead.", "type": "string" - } - }, - "id": "SetLabelsRequest", - "description": "SetLabelsRequest sets the Google Cloud Platform labels on a Google Container\nEngine cluster, which will in turn set them for Google Compute Engine\nresources used by that cluster", - "type": "object" - }, - "NodePool": { - "properties": { - "status": { - "enumDescriptions": [ - "Not set.", - "The PROVISIONING state indicates the node pool is being created.", - "The RUNNING state indicates the node pool has been created\nand is fully usable.", - "The RUNNING_WITH_ERROR state indicates the node pool has been created\nand is partially usable. Some error state has occurred and some\nfunctionality may be impaired. Customer may need to reissue a request\nor trigger a new update.", - "The RECONCILING state indicates that some work is actively being done on\nthe node pool, such as upgrading node software. Details can\nbe found in the `statusMessage` field.", - "The STOPPING state indicates the node pool is being deleted.", - "The ERROR state indicates the node pool may be unusable. Details\ncan be found in the `statusMessage` field." - ], - "enum": [ - "STATUS_UNSPECIFIED", - "PROVISIONING", - "RUNNING", - "RUNNING_WITH_ERROR", - "RECONCILING", - "STOPPING", - "ERROR" - ], - "description": "[Output only] The status of the nodes in this pool instance.", - "type": "string" - }, - "config": { - "description": "The node configuration of the pool.", - "$ref": "NodeConfig" - }, - "statusMessage": { - "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", - "type": "string" }, "name": { - "description": "The name of the node pool.", + "description": "The name (project, location, cluster id) of the cluster to set labels.\nSpecified in the format 'projects/*/locations/*/clusters/*'.", "type": "string" }, - "autoscaling": { - "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present.", - "$ref": "NodePoolAutoscaling" - }, - "management": { - "$ref": "NodeManagement", - "description": "NodeManagement configuration for this NodePool." - }, - "initialNodeCount": { - "format": "int32", - "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", - "type": "integer" + "resourceLabels": { + "description": "The labels to set for that cluster.", + "type": "object", + "additionalProperties": { + "type": "string" + } }, + "projectId": { + "description": "The Google Developers Console [project ID or project\nnumber](https://developers.google.com/console/help/new/#projectnumber).\nThis field is deprecated, use name instead.", + "type": "string" + } + }, + "id": "SetLabelsRequest" + }, + "NodePool": { + "type": "object", + "properties": { "selfLink": { "description": "[Output only] Server-defined URL for the resource.", "type": "string" @@ -3054,16 +3008,77 @@ "version": { "description": "[Output only] The version of the Kubernetes of this node.", "type": "string" + }, + "status": { + "enum": [ + "STATUS_UNSPECIFIED", + "PROVISIONING", + "RUNNING", + "RUNNING_WITH_ERROR", + "RECONCILING", + "STOPPING", + "ERROR" + ], + "description": "[Output only] The status of the nodes in this pool instance.", + "type": "string", + "enumDescriptions": [ + "Not set.", + "The PROVISIONING state indicates the node pool is being created.", + "The RUNNING state indicates the node pool has been created\nand is fully usable.", + "The RUNNING_WITH_ERROR state indicates the node pool has been created\nand is partially usable. Some error state has occurred and some\nfunctionality may be impaired. Customer may need to reissue a request\nor trigger a new update.", + "The RECONCILING state indicates that some work is actively being done on\nthe node pool, such as upgrading node software. Details can\nbe found in the `statusMessage` field.", + "The STOPPING state indicates the node pool is being deleted.", + "The ERROR state indicates the node pool may be unusable. Details\ncan be found in the `statusMessage` field." + ] + }, + "config": { + "$ref": "NodeConfig", + "description": "The node configuration of the pool." + }, + "statusMessage": { + "description": "[Output only] Additional information about the current status of this\nnode pool instance, if available.", + "type": "string" + }, + "name": { + "description": "The name of the node pool.", + "type": "string" + }, + "autoscaling": { + "$ref": "NodePoolAutoscaling", + "description": "Autoscaler configuration for this NodePool. Autoscaler is enabled\nonly if a valid configuration is present." + }, + "management": { + "description": "NodeManagement configuration for this NodePool.", + "$ref": "NodeManagement" + }, + "initialNodeCount": { + "format": "int32", + "description": "The initial node count for the pool. You must ensure that your\nCompute Engine \u003ca href=\"/compute/docs/resource-quotas\"\u003eresource quota\u003c/a\u003e\nis sufficient for this number of instances. You must also have available\nfirewall and routes quota.", + "type": "integer" } }, "id": "NodePool", - "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload.", - "type": "object" + "description": "NodePool contains the name and configuration for a cluster's node pool.\nNode pools are a set of nodes (i.e. VM's), with a common configuration and\nspecification, under the control of the cluster master. They may have a set\nof Kubernetes labels applied to them, which may be used to reference them\nduring pod scheduling. They may also be resized up or down, to accommodate\nthe workload." } }, "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest" + "protocol": "rest", + "canonicalName": "Container", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://container.googleapis.com/", + "ownerDomain": "google.com", + "name": "container", + "batchPath": "batch", + "title": "Google Container Engine API" } diff --git a/vendor/google.golang.org/api/container/v1beta1/container-gen.go b/vendor/google.golang.org/api/container/v1beta1/container-gen.go index e78f2ae2c..6d1bb8ede 100644 --- a/vendor/google.golang.org/api/container/v1beta1/container-gen.go +++ b/vendor/google.golang.org/api/container/v1beta1/container-gen.go @@ -236,6 +236,13 @@ type AddonsConfig struct { // KubernetesDashboard: Configuration for the Kubernetes Dashboard. KubernetesDashboard *KubernetesDashboard `json:"kubernetesDashboard,omitempty"` + // NetworkPolicyConfig: Configuration for NetworkPolicy. This only + // tracks whether the addon + // is enabled or not on the Master, it does not track whether network + // policy + // is enabled for the nodes. + NetworkPolicyConfig *NetworkPolicyConfig `json:"networkPolicyConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. // "HorizontalPodAutoscaling") to unconditionally include in API // requests. By default, fields with empty values are omitted from API @@ -1556,6 +1563,38 @@ func (s *NetworkPolicy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// NetworkPolicyConfig: Configuration for NetworkPolicy. This only +// tracks whether the addon +// is enabled or not on the Master, it does not track whether network +// policy +// is enabled for the nodes. +type NetworkPolicyConfig struct { + // Disabled: Whether NetworkPolicy is enabled for this cluster. + Disabled bool `json:"disabled,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Disabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *NetworkPolicyConfig) MarshalJSON() ([]byte, error) { + type noMethod NetworkPolicyConfig + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // NodeConfig: Parameters that describe the nodes in a cluster. type NodeConfig struct { // Accelerators: A list of hardware accelerators to be attached to each @@ -1636,18 +1675,18 @@ type NodeConfig struct { // The total size of all keys and values must be less than 512 KB. Metadata map[string]string `json:"metadata,omitempty"` - // MinCpuPlatform: Minimum cpu/platform to be used by this instance. The + // MinCpuPlatform: Minimum CPU platform to be used by this instance. The // instance may be - // scheduled on the specified or newer cpu/platform. Applicable values + // scheduled on the specified or newer CPU platform. Applicable values // are the // friendly names of CPU platforms, such as // minCpuPlatform: "Intel Haswell" // or // minCpuPlatform: "Intel Sandy Bridge". For // more - // information, read Specifying a - // Minimum CPU Platform. + // information, read [how to specify min CPU + // platform](https://cloud.google.com/compute/docs/instances/specify-min- + // cpu-platform) MinCpuPlatform string `json:"minCpuPlatform,omitempty"` // OauthScopes: The set of Google API scopes to be made available on all diff --git a/vendor/google.golang.org/api/content/v2/content-api.json b/vendor/google.golang.org/api/content/v2/content-api.json index b5f6431fa..da6c8d913 100644 --- a/vendor/google.golang.org/api/content/v2/content-api.json +++ b/vendor/google.golang.org/api/content/v2/content-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/Ogd-A7sPcNqrkouPfVxTAQBSYIA\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/dPMCZ2Ey4YVlnyiRa2uPlyOUPp4\"", "discoveryVersion": "v1", "id": "content:v2", "name": "content", "canonicalName": "Shopping Content", "version": "v2", - "revision": "20170914", + "revision": "20170928", "title": "Content API for Shopping", "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.", "ownerDomain": "google.com", @@ -136,6 +136,13 @@ "websiteUrl": { "type": "string", "description": "The merchant's website." + }, + "youtubeChannelLinks": { + "type": "array", + "description": "List of linked YouTube channels that are active or pending approval. To create a new link request, add a new link with status active to the list. It will remain in a pending state until approved or rejected in the YT Creator Studio interface. To delete an active link, or to cancel a link request, remove it from the list.", + "items": { + "$ref": "AccountYouTubeChannelLink" + } } } }, @@ -383,6 +390,32 @@ } } }, + "AccountYouTubeChannelLink": { + "id": "AccountYouTubeChannelLink", + "type": "object", + "properties": { + "channelId": { + "type": "string", + "description": "Channel ID.", + "annotations": { + "required": [ + "content.accounts.insert", + "content.accounts.update" + ] + } + }, + "status": { + "type": "string", + "description": "Status of the link between this Merchant Center account and the YouTube channel. Upon retrieval, it represents the actual status of the link and can be either active if it was approved in YT Creator Studio or pending if it's pending approval. Upon insertion, it represents the intended status of the link. Re-uploading a link with status active when it's still pending or with status pending when it's already active will have no effect: the status will remain unchanged. Re-uploading a link with deprecated status inactive is equivalent to not submitting the link at all and will delete the link if it was active or cancel the link request if it was pending.", + "annotations": { + "required": [ + "content.accounts.insert", + "content.accounts.update" + ] + } + } + } + }, "AccountsAuthInfoResponse": { "id": "AccountsAuthInfoResponse", "type": "object", @@ -792,12 +825,7 @@ }, "contentLanguage": { "type": "string", - "description": "The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targetCountry.", - "annotations": { - "required": [ - "content.datafeeds.insert" - ] - } + "description": "[DEPRECATED] Please use target.language instead. The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targetCountry." }, "contentType": { "type": "string", @@ -839,7 +867,7 @@ }, "intendedDestinations": { "type": "array", - "description": "The list of intended destinations (corresponds to checked check boxes in Merchant Center).", + "description": "[DEPRECATED] Please use target.includedDestination instead. The list of intended destinations (corresponds to checked check boxes in Merchant Center).", "items": { "type": "string" } @@ -860,12 +888,13 @@ }, "targetCountry": { "type": "string", - "description": "The country where the items in the feed will be included in the search index, represented as a CLDR territory code.", - "annotations": { - "required": [ - "content.datafeeds.insert", - "content.datafeeds.update" - ] + "description": "[DEPRECATED] Please use target.country instead. The country where the items in the feed will be included in the search index, represented as a CLDR territory code." + }, + "targets": { + "type": "array", + "description": "The targets this feed should apply to (country, language, destinations).", + "items": { + "$ref": "DatafeedTarget" } } } @@ -939,6 +968,10 @@ "type": "object", "description": "The status of a datafeed, i.e., the result of the last retrieval of the datafeed computed asynchronously when the feed processing is finished.", "properties": { + "country": { + "type": "string", + "description": "The country for which the status is reported, represented as a CLDR territory code." + }, "datafeedId": { "type": "string", "description": "The ID of the feed for which the status is reported.", @@ -966,6 +999,10 @@ "description": "Identifies what kind of resource this is. Value: the fixed string \"content#datafeedStatus\".", "default": "content#datafeedStatus" }, + "language": { + "type": "string", + "description": "The two-letter ISO 639-1 language for which the status is reported." + }, "lastUploadDate": { "type": "string", "description": "The last date at which the feed was uploaded." @@ -1030,6 +1067,34 @@ } } }, + "DatafeedTarget": { + "id": "DatafeedTarget", + "type": "object", + "properties": { + "country": { + "type": "string", + "description": "The country where the items in the feed will be included in the search index, represented as a CLDR territory code." + }, + "excludedDestinations": { + "type": "array", + "description": "The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).", + "items": { + "type": "string" + } + }, + "includedDestinations": { + "type": "array", + "description": "The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in the excluded_destination field.", + "items": { + "type": "string" + } + }, + "language": { + "type": "string", + "description": "The two-letter ISO 639-1 language of the items in the feed. Must be a valid language for targets[].country." + } + } + }, "DatafeedsCustomBatchRequest": { "id": "DatafeedsCustomBatchRequest", "type": "object", @@ -1154,11 +1219,19 @@ "description": "An entry ID, unique within the batch request.", "format": "uint32" }, + "country": { + "type": "string", + "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that for multi-target datafeeds this parameter is required." + }, "datafeedId": { "type": "string", - "description": "The ID of the data feed to get or delete.", + "description": "The ID of the data feed to get.", "format": "uint64" }, + "language": { + "type": "string", + "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that for multi-target datafeeds this parameter is required." + }, "merchantId": { "type": "string", "description": "The ID of the managing account.", @@ -1788,6 +1861,10 @@ "$ref": "OrderCancellation" } }, + "channelType": { + "type": "string", + "description": "The channel type of the order: \"purchaseOnGoogle\" or \"googleExpress\"." + }, "id": { "type": "string", "description": "The id of the line item." @@ -2007,7 +2084,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier for the shipping. Optional." + "description": "The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values." }, "maxDaysInTransit": { "type": "integer", @@ -2068,7 +2145,7 @@ }, "type": { "type": "string", - "description": "The type of instrument (VISA, Mastercard, etc)." + "description": "The type of instrument.\n\nAcceptable values are: \n- \"AMEX\" \n- \"DISCOVER\" \n- \"JCB\" \n- \"MASTERCARD\" \n- \"UNIONPAY\" \n- \"VISA\" \n- \"\"" } } }, @@ -2196,7 +2273,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment." + "description": "The carrier handling the shipment.\n\nAcceptable values are: \n- \"gsx\" \n- \"ups\" \n- \"united parcel service\" \n- \"usps\" \n- \"united states postal service\" \n- \"fedex\" \n- \"dhl\" \n- \"ecourier\" \n- \"cxt\" \n- \"google\" \n- \"on trac\" \n- \"ontrac\" \n- \"on-trac\" \n- \"on_trac\" \n- \"delvic\" \n- \"dynamex\" \n- \"lasership\" \n- \"smartpost\" \n- \"fedex smartpost\" \n- \"mpx\" \n- \"uds\" \n- \"united delivery service\"" }, "creationDate": { "type": "string", @@ -2543,7 +2620,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "lineItems": { "type": "array", @@ -2554,7 +2631,37 @@ }, "shipmentId": { "type": "string", - "description": "The ID of the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The ID of the shipment." + }, + "shipmentInfos": { + "type": "array", + "description": "Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs).", + "items": { + "$ref": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo" + } + }, + "trackingId": { + "type": "string", + "description": "Deprecated. Please use shipmentInfo instead. The tracking id for the shipment." + } + } + }, + "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo": { + "id": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo", + "type": "object", + "properties": { + "carrier": { + "type": "string", + "description": "The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values." + }, + "shipmentId": { + "type": "string", + "description": "The ID of the shipment.", + "annotations": { + "required": [ + "content.orders.shiplineitems" + ] + } }, "trackingId": { "type": "string", @@ -2568,7 +2675,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment. Not updated if missing." + "description": "The carrier handling the shipment. Not updated if missing. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "shipmentId": { "type": "string", @@ -2766,7 +2873,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "lineItems": { "type": "array", @@ -2781,11 +2888,18 @@ }, "shipmentId": { "type": "string", - "description": "The ID of the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The ID of the shipment." + }, + "shipmentInfos": { + "type": "array", + "description": "Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs).", + "items": { + "$ref": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo" + } }, "trackingId": { "type": "string", - "description": "The tracking id for the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The tracking id for the shipment." } } }, @@ -2839,7 +2953,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment. Not updated if missing." + "description": "The carrier handling the shipment. Not updated if missing. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "operationId": { "type": "string", @@ -4490,8 +4604,8 @@ }, "force": { "type": "boolean", - "description": "Flag to delete sub-accounts with products. The default value of false will become active on September 28, 2017.", - "default": "true", + "description": "Flag to delete sub-accounts with products. The default value is false.", + "default": "false", "location": "query" }, "merchantId": { @@ -5200,12 +5314,22 @@ "httpMethod": "GET", "description": "Retrieves the status of a datafeed from your Merchant Center account. This method can only be called for non-multi-client accounts.", "parameters": { + "country": { + "type": "string", + "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", + "location": "query" + }, "datafeedId": { "type": "string", "required": true, "format": "uint64", "location": "path" }, + "language": { + "type": "string", + "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", + "location": "query" + }, "merchantId": { "type": "string", "required": true, diff --git a/vendor/google.golang.org/api/content/v2/content-gen.go b/vendor/google.golang.org/api/content/v2/content-gen.go index 70db2ba4a..0fc142fc4 100644 --- a/vendor/google.golang.org/api/content/v2/content-gen.go +++ b/vendor/google.golang.org/api/content/v2/content-gen.go @@ -230,6 +230,14 @@ type Account struct { // WebsiteUrl: The merchant's website. WebsiteUrl string `json:"websiteUrl,omitempty"` + // YoutubeChannelLinks: List of linked YouTube channels that are active + // or pending approval. To create a new link request, add a new link + // with status active to the list. It will remain in a pending state + // until approved or rejected in the YT Creator Studio interface. To + // delete an active link, or to cancel a link request, remove it from + // the list. + YoutubeChannelLinks []*AccountYouTubeChannelLink `json:"youtubeChannelLinks,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -627,6 +635,45 @@ func (s *AccountUser) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type AccountYouTubeChannelLink struct { + // ChannelId: Channel ID. + ChannelId string `json:"channelId,omitempty"` + + // Status: Status of the link between this Merchant Center account and + // the YouTube channel. Upon retrieval, it represents the actual status + // of the link and can be either active if it was approved in YT Creator + // Studio or pending if it's pending approval. Upon insertion, it + // represents the intended status of the link. Re-uploading a link with + // status active when it's still pending or with status pending when + // it's already active will have no effect: the status will remain + // unchanged. Re-uploading a link with deprecated status inactive is + // equivalent to not submitting the link at all and will delete the link + // if it was active or cancel the link request if it was pending. + Status string `json:"status,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChannelId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChannelId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AccountYouTubeChannelLink) MarshalJSON() ([]byte, error) { + type noMethod AccountYouTubeChannelLink + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type AccountsAuthInfoResponse struct { // AccountIdentifiers: The account identifiers corresponding to the // authenticated user. @@ -1339,8 +1386,9 @@ type Datafeed struct { // attributes are defined in the data feed. AttributeLanguage string `json:"attributeLanguage,omitempty"` - // ContentLanguage: The two-letter ISO 639-1 language of the items in - // the feed. Must be a valid language for targetCountry. + // ContentLanguage: [DEPRECATED] Please use target.language instead. The + // two-letter ISO 639-1 language of the items in the feed. Must be a + // valid language for targetCountry. ContentLanguage string `json:"contentLanguage,omitempty"` // ContentType: The type of data feed. For product inventory feeds, only @@ -1360,8 +1408,9 @@ type Datafeed struct { // Id: The ID of the data feed. Id int64 `json:"id,omitempty,string"` - // IntendedDestinations: The list of intended destinations (corresponds - // to checked check boxes in Merchant Center). + // IntendedDestinations: [DEPRECATED] Please use + // target.includedDestination instead. The list of intended destinations + // (corresponds to checked check boxes in Merchant Center). IntendedDestinations []string `json:"intendedDestinations,omitempty"` // Kind: Identifies what kind of resource this is. Value: the fixed @@ -1371,10 +1420,15 @@ type Datafeed struct { // Name: A descriptive name of the data feed. Name string `json:"name,omitempty"` - // TargetCountry: The country where the items in the feed will be - // included in the search index, represented as a CLDR territory code. + // TargetCountry: [DEPRECATED] Please use target.country instead. The + // country where the items in the feed will be included in the search + // index, represented as a CLDR territory code. TargetCountry string `json:"targetCountry,omitempty"` + // Targets: The targets this feed should apply to (country, language, + // destinations). + Targets []*DatafeedTarget `json:"targets,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` @@ -1507,6 +1561,10 @@ func (s *DatafeedFormat) MarshalJSON() ([]byte, error) { // last retrieval of the datafeed computed asynchronously when the feed // processing is finished. type DatafeedStatus struct { + // Country: The country for which the status is reported, represented as + // a CLDR territory code. + Country string `json:"country,omitempty"` + // DatafeedId: The ID of the feed for which the status is reported. DatafeedId uint64 `json:"datafeedId,omitempty,string"` @@ -1523,6 +1581,10 @@ type DatafeedStatus struct { // string "content#datafeedStatus". Kind string `json:"kind,omitempty"` + // Language: The two-letter ISO 639-1 language for which the status is + // reported. + Language string `json:"language,omitempty"` + // LastUploadDate: The last date at which the feed was uploaded. LastUploadDate string `json:"lastUploadDate,omitempty"` @@ -1536,7 +1598,7 @@ type DatafeedStatus struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DatafeedId") to + // ForceSendFields is a list of field names (e.g. "Country") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1544,7 +1606,7 @@ type DatafeedStatus struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatafeedId") to include in + // NullFields is a list of field names (e.g. "Country") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1632,6 +1694,48 @@ func (s *DatafeedStatusExample) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type DatafeedTarget struct { + // Country: The country where the items in the feed will be included in + // the search index, represented as a CLDR territory code. + Country string `json:"country,omitempty"` + + // ExcludedDestinations: The list of destinations to exclude for this + // target (corresponds to unchecked check boxes in Merchant Center). + ExcludedDestinations []string `json:"excludedDestinations,omitempty"` + + // IncludedDestinations: The list of destinations to include for this + // target (corresponds to checked check boxes in Merchant Center). + // Default destinations are always included unless provided in the + // excluded_destination field. + IncludedDestinations []string `json:"includedDestinations,omitempty"` + + // Language: The two-letter ISO 639-1 language of the items in the feed. + // Must be a valid language for targets[].country. + Language string `json:"language,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Country") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Country") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DatafeedTarget) MarshalJSON() ([]byte, error) { + type noMethod DatafeedTarget + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type DatafeedsCustomBatchRequest struct { // Entries: The request entries to be processed in the batch. Entries []*DatafeedsCustomBatchRequestEntry `json:"entries,omitempty"` @@ -1841,9 +1945,19 @@ type DatafeedstatusesCustomBatchRequestEntry struct { // BatchId: An entry ID, unique within the batch request. BatchId int64 `json:"batchId,omitempty"` - // DatafeedId: The ID of the data feed to get or delete. + // Country: The country for which to get the datafeed status. If this + // parameter is provided then language must also be provided. Note that + // for multi-target datafeeds this parameter is required. + Country string `json:"country,omitempty"` + + // DatafeedId: The ID of the data feed to get. DatafeedId uint64 `json:"datafeedId,omitempty,string"` + // Language: The language for which to get the datafeed status. If this + // parameter is provided then country must also be provided. Note that + // for multi-target datafeeds this parameter is required. + Language string `json:"language,omitempty"` + // MerchantId: The ID of the managing account. MerchantId uint64 `json:"merchantId,omitempty,string"` @@ -2849,6 +2963,10 @@ type OrderLineItem struct { // Cancellations: Cancellations of the line item. Cancellations []*OrderCancellation `json:"cancellations,omitempty"` + // ChannelType: The channel type of the order: "purchaseOnGoogle" or + // "googleExpress". + ChannelType string `json:"channelType,omitempty"` + // Id: The id of the line item. Id string `json:"id,omitempty"` @@ -3085,7 +3203,8 @@ func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { } type OrderLineItemShippingDetailsMethod struct { - // Carrier: The carrier for the shipping. Optional. + // Carrier: The carrier for the shipping. Optional. See + // shipments[].carrier for a list of acceptable values. Carrier string `json:"carrier,omitempty"` // MaxDaysInTransit: Maximum transit time. @@ -3137,7 +3256,16 @@ type OrderPaymentMethod struct { // PhoneNumber: The billing phone number. PhoneNumber string `json:"phoneNumber,omitempty"` - // Type: The type of instrument (VISA, Mastercard, etc). + // Type: The type of instrument. + // + // Acceptable values are: + // - "AMEX" + // - "DISCOVER" + // - "JCB" + // - "MASTERCARD" + // - "UNIONPAY" + // - "VISA" + // - "" Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "BillingAddress") to @@ -3343,6 +3471,30 @@ func (s *OrderReturn) MarshalJSON() ([]byte, error) { type OrderShipment struct { // Carrier: The carrier handling the shipment. + // + // Acceptable values are: + // - "gsx" + // - "ups" + // - "united parcel service" + // - "usps" + // - "united states postal service" + // - "fedex" + // - "dhl" + // - "ecourier" + // - "cxt" + // - "google" + // - "on trac" + // - "ontrac" + // - "on-trac" + // - "on_trac" + // - "delvic" + // - "dynamex" + // - "lasership" + // - "smartpost" + // - "fedex smartpost" + // - "mpx" + // - "uds" + // - "united delivery service" Carrier string `json:"carrier,omitempty"` // CreationDate: Date on which the shipment has been created, in ISO @@ -3966,16 +4118,25 @@ func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, err } type OrdersCustomBatchRequestEntryShipLineItems struct { - // Carrier: The carrier handling the shipment. + // Carrier: Deprecated. Please use shipmentInfo instead. The carrier + // handling the shipment. See shipments[].carrier in the Orders + // resource representation for a list of acceptable values. Carrier string `json:"carrier,omitempty"` // LineItems: Line items to ship. LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` - // ShipmentId: The ID of the shipment. + // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of + // the shipment. ShipmentId string `json:"shipmentId,omitempty"` - // TrackingId: The tracking id for the shipment. + // ShipmentInfos: Shipment information. This field is repeated because a + // single line item can be shipped in several packages (and have several + // tracking IDs). + ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` + + // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking + // id for the shipment. TrackingId string `json:"trackingId,omitempty"` // ForceSendFields is a list of field names (e.g. "Carrier") to @@ -4001,8 +4162,45 @@ func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { + // Carrier: The carrier handling the shipment. See shipments[].carrier + // in the Orders resource representation for a list of acceptable + // values. + Carrier string `json:"carrier,omitempty"` + + // ShipmentId: The ID of the shipment. + ShipmentId string `json:"shipmentId,omitempty"` + + // TrackingId: The tracking id for the shipment. + TrackingId string `json:"trackingId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Carrier") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Carrier") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { + type noMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type OrdersCustomBatchRequestEntryUpdateShipment struct { // Carrier: The carrier handling the shipment. Not updated if missing. + // See shipments[].carrier in the Orders resource representation for a + // list of acceptable values. Carrier string `json:"carrier,omitempty"` // ShipmentId: The ID of the shipment. @@ -4373,7 +4571,9 @@ func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) { } type OrdersShipLineItemsRequest struct { - // Carrier: The carrier handling the shipment. + // Carrier: Deprecated. Please use shipmentInfo instead. The carrier + // handling the shipment. See shipments[].carrier in the Orders + // resource representation for a list of acceptable values. Carrier string `json:"carrier,omitempty"` // LineItems: Line items to ship. @@ -4383,10 +4583,17 @@ type OrdersShipLineItemsRequest struct { // for a given order. OperationId string `json:"operationId,omitempty"` - // ShipmentId: The ID of the shipment. + // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of + // the shipment. ShipmentId string `json:"shipmentId,omitempty"` - // TrackingId: The tracking id for the shipment. + // ShipmentInfos: Shipment information. This field is repeated because a + // single line item can be shipped in several packages (and have several + // tracking IDs). + ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` + + // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking + // id for the shipment. TrackingId string `json:"trackingId,omitempty"` // ForceSendFields is a list of field names (e.g. "Carrier") to @@ -4519,6 +4726,8 @@ func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { type OrdersUpdateShipmentRequest struct { // Carrier: The carrier handling the shipment. Not updated if missing. + // See shipments[].carrier in the Orders resource representation for a + // list of acceptable values. Carrier string `json:"carrier,omitempty"` // OperationId: The ID of the operation. Unique across all operations @@ -7114,8 +7323,7 @@ func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall { } // Force sets the optional parameter "force": Flag to delete -// sub-accounts with products. The default value of false will become -// active on September 28, 2017. +// sub-accounts with products. The default value is false. func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall { c.urlParams_.Set("force", fmt.Sprint(force)) return c @@ -7199,8 +7407,8 @@ func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error { // "type": "boolean" // }, // "force": { - // "default": "true", - // "description": "Flag to delete sub-accounts with products. The default value of false will become active on September 28, 2017.", + // "default": "false", + // "description": "Flag to delete sub-accounts with products. The default value is false.", // "location": "query", // "type": "boolean" // }, @@ -10457,6 +10665,26 @@ func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *Dat return c } +// Country sets the optional parameter "country": The country for which +// to get the datafeed status. If this parameter is provided then +// language must also be provided. Note that this parameter is required +// for feeds targeting multiple countries and languages, since a feed +// may have a different status for each target. +func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall { + c.urlParams_.Set("country", country) + return c +} + +// Language sets the optional parameter "language": The language for +// which to get the datafeed status. If this parameter is provided then +// country must also be provided. Note that this parameter is required +// for feeds targeting multiple countries and languages, since a feed +// may have a different status for each target. +func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall { + c.urlParams_.Set("language", language) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. @@ -10560,12 +10788,22 @@ func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedSta // "datafeedId" // ], // "parameters": { + // "country": { + // "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", + // "location": "query", + // "type": "string" + // }, // "datafeedId": { // "format": "uint64", // "location": "path", // "required": true, // "type": "string" // }, + // "language": { + // "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.", + // "location": "query", + // "type": "string" + // }, // "merchantId": { // "format": "uint64", // "location": "path", diff --git a/vendor/google.golang.org/api/content/v2sandbox/content-api.json b/vendor/google.golang.org/api/content/v2sandbox/content-api.json index 6ff0df4e5..3c8f8519c 100644 --- a/vendor/google.golang.org/api/content/v2sandbox/content-api.json +++ b/vendor/google.golang.org/api/content/v2sandbox/content-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/w6LYVfU7tamoBXESYq-QJFacBzs\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/QmLvLWNsI9BfMK5wWeN2hMPf260\"", "discoveryVersion": "v1", "id": "content:v2sandbox", "name": "content", "canonicalName": "Shopping Content", "version": "v2sandbox", - "revision": "20170912", + "revision": "20170928", "title": "Content API for Shopping", "description": "Manages product items, inventory, and Merchant Center accounts for Google Shopping.", "ownerDomain": "google.com", @@ -332,6 +332,10 @@ "$ref": "OrderCancellation" } }, + "channelType": { + "type": "string", + "description": "The channel type of the order: \"purchaseOnGoogle\" or \"googleExpress\"." + }, "id": { "type": "string", "description": "The id of the line item." @@ -551,7 +555,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier for the shipping. Optional." + "description": "The carrier for the shipping. Optional. See shipments[].carrier for a list of acceptable values." }, "maxDaysInTransit": { "type": "integer", @@ -612,7 +616,7 @@ }, "type": { "type": "string", - "description": "The type of instrument (VISA, Mastercard, etc)." + "description": "The type of instrument.\n\nAcceptable values are: \n- \"AMEX\" \n- \"DISCOVER\" \n- \"JCB\" \n- \"MASTERCARD\" \n- \"UNIONPAY\" \n- \"VISA\" \n- \"\"" } } }, @@ -740,7 +744,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment." + "description": "The carrier handling the shipment.\n\nAcceptable values are: \n- \"gsx\" \n- \"ups\" \n- \"united parcel service\" \n- \"usps\" \n- \"united states postal service\" \n- \"fedex\" \n- \"dhl\" \n- \"ecourier\" \n- \"cxt\" \n- \"google\" \n- \"on trac\" \n- \"ontrac\" \n- \"on-trac\" \n- \"on_trac\" \n- \"delvic\" \n- \"dynamex\" \n- \"lasership\" \n- \"smartpost\" \n- \"fedex smartpost\" \n- \"mpx\" \n- \"uds\" \n- \"united delivery service\"" }, "creationDate": { "type": "string", @@ -1087,7 +1091,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "lineItems": { "type": "array", @@ -1098,7 +1102,37 @@ }, "shipmentId": { "type": "string", - "description": "The ID of the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The ID of the shipment." + }, + "shipmentInfos": { + "type": "array", + "description": "Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs).", + "items": { + "$ref": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo" + } + }, + "trackingId": { + "type": "string", + "description": "Deprecated. Please use shipmentInfo instead. The tracking id for the shipment." + } + } + }, + "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo": { + "id": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo", + "type": "object", + "properties": { + "carrier": { + "type": "string", + "description": "The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values." + }, + "shipmentId": { + "type": "string", + "description": "The ID of the shipment.", + "annotations": { + "required": [ + "content.orders.shiplineitems" + ] + } }, "trackingId": { "type": "string", @@ -1112,7 +1146,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment. Not updated if missing." + "description": "The carrier handling the shipment. Not updated if missing. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "shipmentId": { "type": "string", @@ -1310,7 +1344,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The carrier handling the shipment. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "lineItems": { "type": "array", @@ -1325,11 +1359,18 @@ }, "shipmentId": { "type": "string", - "description": "The ID of the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The ID of the shipment." + }, + "shipmentInfos": { + "type": "array", + "description": "Shipment information. This field is repeated because a single line item can be shipped in several packages (and have several tracking IDs).", + "items": { + "$ref": "OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo" + } }, "trackingId": { "type": "string", - "description": "The tracking id for the shipment." + "description": "Deprecated. Please use shipmentInfo instead. The tracking id for the shipment." } } }, @@ -1383,7 +1424,7 @@ "properties": { "carrier": { "type": "string", - "description": "The carrier handling the shipment. Not updated if missing." + "description": "The carrier handling the shipment. Not updated if missing. See shipments[].carrier in the Orders resource representation for a list of acceptable values." }, "operationId": { "type": "string", diff --git a/vendor/google.golang.org/api/content/v2sandbox/content-gen.go b/vendor/google.golang.org/api/content/v2sandbox/content-gen.go index 68d972032..c665d428d 100644 --- a/vendor/google.golang.org/api/content/v2sandbox/content-gen.go +++ b/vendor/google.golang.org/api/content/v2sandbox/content-gen.go @@ -413,6 +413,10 @@ type OrderLineItem struct { // Cancellations: Cancellations of the line item. Cancellations []*OrderCancellation `json:"cancellations,omitempty"` + // ChannelType: The channel type of the order: "purchaseOnGoogle" or + // "googleExpress". + ChannelType string `json:"channelType,omitempty"` + // Id: The id of the line item. Id string `json:"id,omitempty"` @@ -649,7 +653,8 @@ func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) { } type OrderLineItemShippingDetailsMethod struct { - // Carrier: The carrier for the shipping. Optional. + // Carrier: The carrier for the shipping. Optional. See + // shipments[].carrier for a list of acceptable values. Carrier string `json:"carrier,omitempty"` // MaxDaysInTransit: Maximum transit time. @@ -701,7 +706,16 @@ type OrderPaymentMethod struct { // PhoneNumber: The billing phone number. PhoneNumber string `json:"phoneNumber,omitempty"` - // Type: The type of instrument (VISA, Mastercard, etc). + // Type: The type of instrument. + // + // Acceptable values are: + // - "AMEX" + // - "DISCOVER" + // - "JCB" + // - "MASTERCARD" + // - "UNIONPAY" + // - "VISA" + // - "" Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "BillingAddress") to @@ -907,6 +921,30 @@ func (s *OrderReturn) MarshalJSON() ([]byte, error) { type OrderShipment struct { // Carrier: The carrier handling the shipment. + // + // Acceptable values are: + // - "gsx" + // - "ups" + // - "united parcel service" + // - "usps" + // - "united states postal service" + // - "fedex" + // - "dhl" + // - "ecourier" + // - "cxt" + // - "google" + // - "on trac" + // - "ontrac" + // - "on-trac" + // - "on_trac" + // - "delvic" + // - "dynamex" + // - "lasership" + // - "smartpost" + // - "fedex smartpost" + // - "mpx" + // - "uds" + // - "united delivery service" Carrier string `json:"carrier,omitempty"` // CreationDate: Date on which the shipment has been created, in ISO @@ -1530,16 +1568,25 @@ func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, err } type OrdersCustomBatchRequestEntryShipLineItems struct { - // Carrier: The carrier handling the shipment. + // Carrier: Deprecated. Please use shipmentInfo instead. The carrier + // handling the shipment. See shipments[].carrier in the Orders + // resource representation for a list of acceptable values. Carrier string `json:"carrier,omitempty"` // LineItems: Line items to ship. LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"` - // ShipmentId: The ID of the shipment. + // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of + // the shipment. ShipmentId string `json:"shipmentId,omitempty"` - // TrackingId: The tracking id for the shipment. + // ShipmentInfos: Shipment information. This field is repeated because a + // single line item can be shipped in several packages (and have several + // tracking IDs). + ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` + + // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking + // id for the shipment. TrackingId string `json:"trackingId,omitempty"` // ForceSendFields is a list of field names (e.g. "Carrier") to @@ -1565,8 +1612,45 @@ func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct { + // Carrier: The carrier handling the shipment. See shipments[].carrier + // in the Orders resource representation for a list of acceptable + // values. + Carrier string `json:"carrier,omitempty"` + + // ShipmentId: The ID of the shipment. + ShipmentId string `json:"shipmentId,omitempty"` + + // TrackingId: The tracking id for the shipment. + TrackingId string `json:"trackingId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Carrier") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Carrier") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) { + type noMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type OrdersCustomBatchRequestEntryUpdateShipment struct { // Carrier: The carrier handling the shipment. Not updated if missing. + // See shipments[].carrier in the Orders resource representation for a + // list of acceptable values. Carrier string `json:"carrier,omitempty"` // ShipmentId: The ID of the shipment. @@ -1937,7 +2021,9 @@ func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) { } type OrdersShipLineItemsRequest struct { - // Carrier: The carrier handling the shipment. + // Carrier: Deprecated. Please use shipmentInfo instead. The carrier + // handling the shipment. See shipments[].carrier in the Orders + // resource representation for a list of acceptable values. Carrier string `json:"carrier,omitempty"` // LineItems: Line items to ship. @@ -1947,10 +2033,17 @@ type OrdersShipLineItemsRequest struct { // for a given order. OperationId string `json:"operationId,omitempty"` - // ShipmentId: The ID of the shipment. + // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of + // the shipment. ShipmentId string `json:"shipmentId,omitempty"` - // TrackingId: The tracking id for the shipment. + // ShipmentInfos: Shipment information. This field is repeated because a + // single line item can be shipped in several packages (and have several + // tracking IDs). + ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"` + + // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking + // id for the shipment. TrackingId string `json:"trackingId,omitempty"` // ForceSendFields is a list of field names (e.g. "Carrier") to @@ -2083,6 +2176,8 @@ func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) { type OrdersUpdateShipmentRequest struct { // Carrier: The carrier handling the shipment. Not updated if missing. + // See shipments[].carrier in the Orders resource representation for a + // list of acceptable values. Carrier string `json:"carrier,omitempty"` // OperationId: The ID of the operation. Unique across all operations diff --git a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json index 054684e7c..192a32e3f 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-api.json @@ -1,38 +1,9 @@ { - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, - "protocol": "rest", - "version": "v1b3", - "baseUrl": "https://dataflow.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/compute": { - "description": "View and manage your Google Compute Engine resources" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/userinfo.email": { - "description": "View your email address" - }, - "https://www.googleapis.com/auth/compute.readonly": { - "description": "View your Google Compute Engine resources" - } - } - } - }, - "servicePath": "", - "description": "Manages Google Cloud Dataflow projects on Google Cloud Platform.", - "kind": "discovery#restDescription", - "rootUrl": "https://dataflow.googleapis.com/", "basePath": "", "ownerDomain": "google.com", "name": "dataflow", "batchPath": "batch", - "revision": "20170913", + "revision": "20170918", "documentationLink": "https://cloud.google.com/dataflow", "id": "dataflow:v1b3", "title": "Google Dataflow API", @@ -42,6 +13,19 @@ "projects": { "methods": { "workerMessages": { + "response": { + "$ref": "SendWorkerMessagesResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { "projectId": { "location": "path", @@ -50,618 +34,23 @@ "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], "flatPath": "v1b3/projects/{projectId}/WorkerMessages", "id": "dataflow.projects.workerMessages", "path": "v1b3/projects/{projectId}/WorkerMessages", - "description": "Send a worker_message to the service.", "request": { "$ref": "SendWorkerMessagesRequest" }, - "response": { - "$ref": "SendWorkerMessagesResponse" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST" + "description": "Send a worker_message to the service." } }, "resources": { - "jobs": { - "methods": { - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "location": { - "description": "The location that contains this job.", - "type": "string", - "location": "query" - }, - "view": { - "description": "The level of information requested in response.", - "type": "string", - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ] - }, - "jobId": { - "location": "path", - "description": "The job ID.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", - "path": "v1b3/projects/{projectId}/jobs/{jobId}", - "id": "dataflow.projects.jobs.get", - "description": "Gets the state of the specified Cloud Dataflow job." - }, - "update": { - "id": "dataflow.projects.jobs.update", - "path": "v1b3/projects/{projectId}/jobs/{jobId}", - "description": "Updates the state of an existing Cloud Dataflow job.", - "request": { - "$ref": "Job" - }, - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "httpMethod": "PUT", - "parameters": { - "jobId": { - "description": "The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - }, - "location": { - "description": "The location that contains this job.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}" - }, - "aggregated": { - "id": "dataflow.projects.jobs.aggregated", - "path": "v1b3/projects/{projectId}/jobs:aggregated", - "description": "List the jobs of a project across all regions.", - "response": { - "$ref": "ListJobsResponse" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "projectId": { - "description": "The project which owns the jobs.", - "type": "string", - "required": true, - "location": "path" - }, - "filter": { - "location": "query", - "enum": [ - "UNKNOWN", - "ALL", - "TERMINATED", - "ACTIVE" - ], - "description": "The kind of filter to use.", - "type": "string" - }, - "location": { - "description": "The location that contains this job.", - "type": "string", - "location": "query" - }, - "pageToken": { - "type": "string", - "location": "query", - "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list." - }, - "pageSize": { - "format": "int32", - "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", - "type": "integer", - "location": "query" - }, - "view": { - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ], - "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", - "type": "string" - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs:aggregated" - }, - "list": { - "response": { - "$ref": "ListJobsResponse" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "projectId": { - "description": "The project which owns the jobs.", - "type": "string", - "required": true, - "location": "path" - }, - "filter": { - "location": "query", - "enum": [ - "UNKNOWN", - "ALL", - "TERMINATED", - "ACTIVE" - ], - "description": "The kind of filter to use.", - "type": "string" - }, - "location": { - "location": "query", - "description": "The location that contains this job.", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", - "type": "integer", - "location": "query" - }, - "view": { - "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", - "type": "string", - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ] - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs", - "id": "dataflow.projects.jobs.list", - "path": "v1b3/projects/{projectId}/jobs", - "description": "List the jobs of a project in a given region." - }, - "create": { - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "view": { - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ], - "description": "The level of information requested in response.", - "type": "string" - }, - "projectId": { - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - }, - "location": { - "description": "The location that contains this job.", - "type": "string", - "location": "query" - }, - "replaceJobId": { - "location": "query", - "description": "Deprecated. This field is now in the Job message.", - "type": "string" - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs", - "id": "dataflow.projects.jobs.create", - "path": "v1b3/projects/{projectId}/jobs", - "request": { - "$ref": "Job" - }, - "description": "Creates a Cloud Dataflow job." - }, - "getMetrics": { - "description": "Request the job status.", - "response": { - "$ref": "JobMetrics" - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "jobId": { - "description": "The job to get messages for.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "A project id.", - "type": "string", - "required": true - }, - "location": { - "description": "The location which contains the job specified by job_id.", - "type": "string", - "location": "query" - }, - "startTime": { - "location": "query", - "format": "google-datetime", - "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", - "type": "string" - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", - "id": "dataflow.projects.jobs.getMetrics", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics" - } - }, - "resources": { - "messages": { - "methods": { - "list": { - "description": "Request the job status.", - "response": { - "$ref": "ListJobMessagesResponse" - }, - "parameterOrder": [ - "projectId", - "jobId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "projectId": { - "description": "A project id.", - "type": "string", - "required": true, - "location": "path" - }, - "jobId": { - "description": "The job to get messages about.", - "type": "string", - "required": true, - "location": "path" - }, - "location": { - "type": "string", - "location": "query", - "description": "The location which contains the job specified by job_id." - }, - "endTime": { - "type": "string", - "location": "query", - "format": "google-datetime", - "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available)." - }, - "startTime": { - "location": "query", - "format": "google-datetime", - "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", - "type": "string" - }, - "pageToken": { - "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", - "type": "integer", - "location": "query" - }, - "minimumImportance": { - "description": "Filter to only get messages with importance \u003e= level", - "type": "string", - "location": "query", - "enum": [ - "JOB_MESSAGE_IMPORTANCE_UNKNOWN", - "JOB_MESSAGE_DEBUG", - "JOB_MESSAGE_DETAILED", - "JOB_MESSAGE_BASIC", - "JOB_MESSAGE_WARNING", - "JOB_MESSAGE_ERROR" - ] - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", - "id": "dataflow.projects.jobs.messages.list", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages" - } - } - }, - "workItems": { - "methods": { - "lease": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "LeaseWorkItemResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "jobId": { - "location": "path", - "description": "Identifies the workflow job this worker belongs to.", - "type": "string", - "required": true - }, - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "Identifies the project this worker belongs to." - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", - "id": "dataflow.projects.jobs.workItems.lease", - "request": { - "$ref": "LeaseWorkItemRequest" - }, - "description": "Leases a dataflow WorkItem to run." - }, - "reportStatus": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "jobId": { - "location": "path", - "description": "The job which the WorkItem is part of.", - "type": "string", - "required": true - }, - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "The project which owns the WorkItem's job." - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", - "id": "dataflow.projects.jobs.workItems.reportStatus", - "request": { - "$ref": "ReportWorkItemStatusRequest" - }, - "description": "Reports the status of dataflow WorkItems leased by a worker.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "ReportWorkItemStatusResponse" - } - } - } - }, - "debug": { - "methods": { - "sendCapture": { - "description": "Send encoded debug capture data for component.", - "request": { - "$ref": "SendDebugCaptureRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "SendDebugCaptureResponse" - }, - "parameters": { - "jobId": { - "location": "path", - "description": "The job id.", - "type": "string", - "required": true - }, - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "The project id." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", - "id": "dataflow.projects.jobs.debug.sendCapture" - }, - "getConfig": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "jobId" - ], - "response": { - "$ref": "GetDebugConfigResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { - "jobId": { - "description": "The job id.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "The project id.", - "type": "string", - "required": true - } - }, - "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", - "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", - "id": "dataflow.projects.jobs.debug.getConfig", - "request": { - "$ref": "GetDebugConfigRequest" - }, - "description": "Get encoded debug configuration for component. Not cacheable." - } - } - } - } - }, "locations": { "methods": { "workerMessages": { - "parameters": { - "projectId": { - "location": "path", - "description": "The project to send the WorkerMessages to.", - "type": "string", - "required": true - }, - "location": { - "location": "path", - "description": "The location which contains the job", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", - "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", - "id": "dataflow.projects.locations.workerMessages", - "description": "Send a worker_message to the service.", "request": { "$ref": "SendWorkerMessagesRequest" }, + "description": "Send a worker_message to the service.", "httpMethod": "POST", "parameterOrder": [ "projectId", @@ -669,17 +58,36 @@ ], "response": { "$ref": "SendWorkerMessagesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "location": { + "location": "path", + "description": "The location which contains the job", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The project to send the WorkerMessages to.", + "type": "string", + "required": true + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", + "path": "v1b3/projects/{projectId}/locations/{location}/WorkerMessages", + "id": "dataflow.projects.locations.workerMessages" } }, "resources": { "templates": { "methods": { "launch": { - "description": "Launch a template.", - "request": { - "$ref": "LaunchTemplateParameters" - }, "response": { "$ref": "LaunchTemplateResponse" }, @@ -689,16 +97,11 @@ ], "httpMethod": "POST", "parameters": { - "validateOnly": { - "location": "query", - "description": "If true, the request is validated but not actually executed.\nDefaults to false.", - "type": "boolean" - }, "projectId": { - "location": "path", "description": "Required. The ID of the Cloud Platform project that the job belongs to.", "type": "string", - "required": true + "required": true, + "location": "path" }, "gcsPath": { "location": "query", @@ -710,6 +113,11 @@ "type": "string", "required": true, "location": "path" + }, + "validateOnly": { + "description": "If true, the request is validated but not actually executed.\nDefaults to false.", + "type": "boolean", + "location": "query" } }, "scopes": [ @@ -720,17 +128,21 @@ ], "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:launch", "id": "dataflow.projects.locations.templates.launch", - "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch" + "path": "v1b3/projects/{projectId}/locations/{location}/templates:launch", + "description": "Launch a template.", + "request": { + "$ref": "LaunchTemplateParameters" + } }, "get": { - "response": { - "$ref": "GetTemplateResponse" - }, + "httpMethod": "GET", "parameterOrder": [ "projectId", "location" ], - "httpMethod": "GET", + "response": { + "$ref": "GetTemplateResponse" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", @@ -745,169 +157,73 @@ "required": true }, "view": { + "description": "The view to retrieve. Defaults to METADATA_ONLY.", + "type": "string", "location": "query", "enum": [ "METADATA_ONLY" - ], - "description": "The view to retrieve. Defaults to METADATA_ONLY.", - "type": "string" + ] }, - "projectId": { - "type": "string", - "required": true, - "location": "path", - "description": "Required. The ID of the Cloud Platform project that the job belongs to." - }, - "gcsPath": { - "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get", - "id": "dataflow.projects.locations.templates.get", - "path": "v1b3/projects/{projectId}/locations/{location}/templates:get", - "description": "Get the template associated with a template." - }, - "create": { - "request": { - "$ref": "CreateJobFromTemplateRequest" - }, - "description": "Creates a Cloud Dataflow job from a template.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "location" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "parameters": { "projectId": { "location": "path", "description": "Required. The ID of the Cloud Platform project that the job belongs to.", "type": "string", "required": true }, - "location": { - "location": "path", - "description": "The location to which to direct the request.", - "type": "string", - "required": true + "gcsPath": { + "location": "query", + "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", + "type": "string" } }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates:get", + "path": "v1b3/projects/{projectId}/locations/{location}/templates:get", + "id": "dataflow.projects.locations.templates.get", + "description": "Get the template associated with a template." + }, + "create": { "flatPath": "v1b3/projects/{projectId}/locations/{location}/templates", + "id": "dataflow.projects.locations.templates.create", "path": "v1b3/projects/{projectId}/locations/{location}/templates", - "id": "dataflow.projects.locations.templates.create" + "request": { + "$ref": "CreateJobFromTemplateRequest" + }, + "description": "Creates a Cloud Dataflow job from a template.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "location" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "description": "The location to which to direct the request.", + "type": "string", + "required": true, + "location": "path" + } + } } } }, "jobs": { "methods": { - "update": { - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "location", - "jobId" - ], - "httpMethod": "PUT", - "parameters": { - "location": { - "description": "The location that contains this job.", - "type": "string", - "required": true, - "location": "path" - }, - "jobId": { - "location": "path", - "description": "The job ID.", - "type": "string", - "required": true - }, - "projectId": { - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "id": "dataflow.projects.locations.jobs.update", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "description": "Updates the state of an existing Cloud Dataflow job.", - "request": { - "$ref": "Job" - } - }, - "create": { - "description": "Creates a Cloud Dataflow job.", - "request": { - "$ref": "Job" - }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "location" - ], - "response": { - "$ref": "Job" - }, - "parameters": { - "location": { - "description": "The location that contains this job.", - "type": "string", - "required": true, - "location": "path" - }, - "replaceJobId": { - "location": "query", - "description": "Deprecated. This field is now in the Job message.", - "type": "string" - }, - "view": { - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ], - "description": "The level of information requested in response.", - "type": "string" - }, - "projectId": { - "location": "path", - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs", - "id": "dataflow.projects.locations.jobs.create" - }, "getMetrics": { + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", "id": "dataflow.projects.locations.jobs.getMetrics", "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics", "description": "Request the job status.", @@ -927,6 +243,18 @@ "https://www.googleapis.com/auth/userinfo.email" ], "parameters": { + "location": { + "description": "The location which contains the job specified by job_id.", + "type": "string", + "required": true, + "location": "path" + }, + "startTime": { + "location": "query", + "format": "google-datetime", + "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", + "type": "string" + }, "jobId": { "description": "The job to get messages for.", "type": "string", @@ -938,35 +266,24 @@ "description": "A project id.", "type": "string", "required": true - }, - "location": { - "type": "string", - "required": true, - "location": "path", - "description": "The location which contains the job specified by job_id." - }, - "startTime": { - "format": "google-datetime", - "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", - "type": "string", - "location": "query" } - }, - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/metrics" + } }, "list": { - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", - "id": "dataflow.projects.locations.jobs.list", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs", - "description": "List the jobs of a project in a given region.", - "response": { - "$ref": "ListJobsResponse" - }, + "httpMethod": "GET", "parameterOrder": [ "projectId", "location" ], - "httpMethod": "GET", + "response": { + "$ref": "ListJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { "filter": { "location": "query", @@ -980,38 +297,84 @@ "type": "string" }, "location": { - "type": "string", - "required": true, "location": "path", - "description": "The location that contains this job." + "description": "The location that contains this job.", + "type": "string", + "required": true }, "pageToken": { + "location": "query", "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { - "location": "query", "format": "int32", "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", - "type": "integer" + "type": "integer", + "location": "query" }, "view": { - "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", - "type": "string", "location": "query", "enum": [ "JOB_VIEW_UNKNOWN", "JOB_VIEW_SUMMARY", "JOB_VIEW_ALL", "JOB_VIEW_DESCRIPTION" - ] + ], + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", + "type": "string" }, "projectId": { + "location": "path", + "description": "The project which owns the jobs.", + "type": "string", + "required": true + } + }, + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs", + "id": "dataflow.projects.locations.jobs.list", + "description": "List the jobs of a project in a given region." + }, + "get": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "location", + "jobId" + ], + "httpMethod": "GET", + "parameters": { + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response.", + "type": "string" + }, + "jobId": { + "description": "The job ID.", "type": "string", "required": true, - "location": "path", - "description": "The project which owns the jobs." + "location": "path" + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "description": "The location that contains this job.", + "type": "string", + "required": true, + "location": "path" } }, "scopes": [ @@ -1019,11 +382,18 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" - ] + ], + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", + "id": "dataflow.projects.locations.jobs.get", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", + "description": "Gets the state of the specified Cloud Dataflow job." }, - "get": { - "description": "Gets the state of the specified Cloud Dataflow job.", - "httpMethod": "GET", + "update": { + "description": "Updates the state of an existing Cloud Dataflow job.", + "request": { + "$ref": "Job" + }, + "httpMethod": "PUT", "parameterOrder": [ "projectId", "location", @@ -1039,17 +409,6 @@ "type": "string", "required": true }, - "view": { - "description": "The level of information requested in response.", - "type": "string", - "location": "query", - "enum": [ - "JOB_VIEW_UNKNOWN", - "JOB_VIEW_SUMMARY", - "JOB_VIEW_ALL", - "JOB_VIEW_DESCRIPTION" - ] - }, "jobId": { "location": "path", "description": "The job ID.", @@ -1071,7 +430,60 @@ ], "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}", - "id": "dataflow.projects.locations.jobs.get" + "id": "dataflow.projects.locations.jobs.update" + }, + "create": { + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs", + "id": "dataflow.projects.locations.jobs.create", + "description": "Creates a Cloud Dataflow job.", + "request": { + "$ref": "Job" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "location" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "view": { + "description": "The level of information requested in response.", + "type": "string", + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ] + }, + "projectId": { + "location": "path", + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + }, + "location": { + "description": "The location that contains this job.", + "type": "string", + "required": true, + "location": "path" + }, + "replaceJobId": { + "location": "query", + "description": "Deprecated. This field is now in the Job message.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ] } }, "resources": { @@ -1082,33 +494,33 @@ "request": { "$ref": "ReportWorkItemStatusRequest" }, - "httpMethod": "POST", + "response": { + "$ref": "ReportWorkItemStatusResponse" + }, "parameterOrder": [ "projectId", "location", "jobId" ], - "response": { - "$ref": "ReportWorkItemStatusResponse" - }, + "httpMethod": "POST", "parameters": { - "jobId": { - "description": "The job which the WorkItem is part of.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "The project which owns the WorkItem's job.", - "type": "string", - "required": true, - "location": "path" - }, "location": { "description": "The location which contains the WorkItem's job.", "type": "string", "required": true, "location": "path" + }, + "jobId": { + "location": "path", + "description": "The job which the WorkItem is part of.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The project which owns the WorkItem's job.", + "type": "string", + "required": true } }, "scopes": [ @@ -1118,25 +530,23 @@ "https://www.googleapis.com/auth/userinfo.email" ], "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus", - "id": "dataflow.projects.locations.jobs.workItems.reportStatus" + "id": "dataflow.projects.locations.jobs.workItems.reportStatus", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:reportStatus" }, "lease": { - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", - "id": "dataflow.projects.locations.jobs.workItems.lease", "request": { "$ref": "LeaseWorkItemRequest" }, "description": "Leases a dataflow WorkItem to run.", - "httpMethod": "POST", + "response": { + "$ref": "LeaseWorkItemResponse" + }, "parameterOrder": [ "projectId", "location", "jobId" ], - "response": { - "$ref": "LeaseWorkItemResponse" - }, + "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", @@ -1157,33 +567,43 @@ "required": true }, "projectId": { + "location": "path", "description": "Identifies the project this worker belongs to.", "type": "string", - "required": true, - "location": "path" + "required": true } }, - "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease" + "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease", + "id": "dataflow.projects.locations.jobs.workItems.lease", + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/workItems:lease" } } }, "debug": { "methods": { "sendCapture": { - "description": "Send encoded debug capture data for component.", - "request": { - "$ref": "SendDebugCaptureRequest" + "response": { + "$ref": "SendDebugCaptureResponse" }, - "httpMethod": "POST", "parameterOrder": [ "projectId", "location", "jobId" ], - "response": { - "$ref": "SendDebugCaptureResponse" - }, + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { + "location": { + "location": "path", + "description": "The location which contains the job specified by job_id.", + "type": "string", + "required": true + }, "jobId": { "location": "path", "description": "The job id.", @@ -1195,25 +615,21 @@ "description": "The project id.", "type": "string", "required": true - }, - "location": { - "location": "path", - "description": "The location which contains the job specified by job_id.", - "type": "string", - "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", + "id": "dataflow.projects.locations.jobs.debug.sendCapture", "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/sendCapture", - "id": "dataflow.projects.locations.jobs.debug.sendCapture" + "request": { + "$ref": "SendDebugCaptureRequest" + }, + "description": "Send encoded debug capture data for component." }, "getConfig": { + "request": { + "$ref": "GetDebugConfigRequest" + }, + "description": "Get encoded debug configuration for component. Not cacheable.", "response": { "$ref": "GetDebugConfigResponse" }, @@ -1223,6 +639,12 @@ "jobId" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], "parameters": { "location": { "location": "path", @@ -1231,31 +653,21 @@ "required": true }, "jobId": { - "type": "string", - "required": true, "location": "path", - "description": "The job id." + "description": "The job id.", + "type": "string", + "required": true }, "projectId": { + "description": "The project id.", "type": "string", "required": true, - "location": "path", - "description": "The project id." + "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], "flatPath": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", "id": "dataflow.projects.locations.jobs.debug.getConfig", - "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig", - "description": "Get encoded debug configuration for component. Not cacheable.", - "request": { - "$ref": "GetDebugConfigRequest" - } + "path": "v1b3/projects/{projectId}/locations/{location}/jobs/{jobId}/debug/getConfig" } } }, @@ -1272,24 +684,11 @@ ], "httpMethod": "GET", "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", - "type": "integer" - }, - "minimumImportance": { - "enum": [ - "JOB_MESSAGE_IMPORTANCE_UNKNOWN", - "JOB_MESSAGE_DEBUG", - "JOB_MESSAGE_DETAILED", - "JOB_MESSAGE_BASIC", - "JOB_MESSAGE_WARNING", - "JOB_MESSAGE_ERROR" - ], - "description": "Filter to only get messages with importance \u003e= level", + "jobId": { + "location": "path", + "description": "The job to get messages about.", "type": "string", - "location": "query" + "required": true }, "projectId": { "description": "A project id.", @@ -1297,34 +696,47 @@ "required": true, "location": "path" }, - "jobId": { - "description": "The job to get messages about.", + "location": { + "description": "The location which contains the job specified by job_id.", "type": "string", "required": true, "location": "path" }, "endTime": { - "location": "query", "format": "google-datetime", "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", - "type": "string" - }, - "location": { - "location": "path", - "description": "The location which contains the job specified by job_id.", "type": "string", - "required": true - }, - "startTime": { - "type": "string", - "location": "query", - "format": "google-datetime", - "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages)." + "location": "query" }, "pageToken": { - "location": "query", "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", - "type": "string" + "type": "string", + "location": "query" + }, + "startTime": { + "format": "google-datetime", + "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", + "type": "integer", + "location": "query" + }, + "minimumImportance": { + "description": "Filter to only get messages with importance \u003e= level", + "type": "string", + "location": "query", + "enum": [ + "JOB_MESSAGE_IMPORTANCE_UNKNOWN", + "JOB_MESSAGE_DEBUG", + "JOB_MESSAGE_DETAILED", + "JOB_MESSAGE_BASIC", + "JOB_MESSAGE_WARNING", + "JOB_MESSAGE_ERROR" + ] } }, "scopes": [ @@ -1346,70 +758,23 @@ }, "templates": { "methods": { - "launch": { - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], - "response": { - "$ref": "LaunchTemplateResponse" - }, - "parameters": { - "validateOnly": { - "description": "If true, the request is validated but not actually executed.\nDefaults to false.", - "type": "boolean", - "location": "query" - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - }, - "gcsPath": { - "location": "query", - "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", - "type": "string" - }, - "location": { - "location": "query", - "description": "The location to which to direct the request.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/compute", - "https://www.googleapis.com/auth/compute.readonly", - "https://www.googleapis.com/auth/userinfo.email" - ], - "flatPath": "v1b3/projects/{projectId}/templates:launch", - "path": "v1b3/projects/{projectId}/templates:launch", - "id": "dataflow.projects.templates.launch", - "description": "Launch a template.", - "request": { - "$ref": "LaunchTemplateParameters" - } - }, "get": { - "path": "v1b3/projects/{projectId}/templates:get", - "id": "dataflow.projects.templates.get", "description": "Get the template associated with a template.", - "httpMethod": "GET", - "parameterOrder": [ - "projectId" - ], "response": { "$ref": "GetTemplateResponse" }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", "parameters": { "view": { - "description": "The view to retrieve. Defaults to METADATA_ONLY.", - "type": "string", "location": "query", "enum": [ "METADATA_ONLY" - ] + ], + "description": "The view to retrieve. Defaults to METADATA_ONLY.", + "type": "string" }, "projectId": { "location": "path", @@ -1418,14 +783,14 @@ "required": true }, "gcsPath": { + "location": "query", "description": "Required. A Cloud Storage path to the template from which to\ncreate the job.\nMust be a valid Cloud Storage URL, beginning with `gs://`.", - "type": "string", - "location": "query" + "type": "string" }, "location": { + "description": "The location to which to direct the request.", "type": "string", - "location": "query", - "description": "The location to which to direct the request." + "location": "query" } }, "scopes": [ @@ -1434,7 +799,9 @@ "https://www.googleapis.com/auth/compute.readonly", "https://www.googleapis.com/auth/userinfo.email" ], - "flatPath": "v1b3/projects/{projectId}/templates:get" + "flatPath": "v1b3/projects/{projectId}/templates:get", + "id": "dataflow.projects.templates.get", + "path": "v1b3/projects/{projectId}/templates:get" }, "create": { "flatPath": "v1b3/projects/{projectId}/templates", @@ -1465,6 +832,610 @@ "required": true } } + }, + "launch": { + "description": "Launch a template.", + "request": { + "$ref": "LaunchTemplateParameters" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "LaunchTemplateResponse" + }, + "parameters": { + "location": { + "location": "query", + "description": "The location to which to direct the request.", + "type": "string" + }, + "validateOnly": { + "description": "If true, the request is validated but not actually executed.\nDefaults to false.", + "type": "boolean", + "location": "query" + }, + "projectId": { + "description": "Required. The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "gcsPath": { + "description": "Required. A Cloud Storage path to the template from which to create\nthe job.\nMust be valid Cloud Storage URL, beginning with 'gs://'.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/templates:launch", + "path": "v1b3/projects/{projectId}/templates:launch", + "id": "dataflow.projects.templates.launch" + } + } + }, + "jobs": { + "methods": { + "list": { + "description": "List the jobs of a project in a given region.", + "response": { + "$ref": "ListJobsResponse" + }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "description": "The project which owns the jobs.", + "type": "string", + "required": true, + "location": "path" + }, + "filter": { + "location": "query", + "enum": [ + "UNKNOWN", + "ALL", + "TERMINATED", + "ACTIVE" + ], + "description": "The kind of filter to use.", + "type": "string" + }, + "location": { + "description": "The location that contains this job.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", + "type": "integer", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs", + "id": "dataflow.projects.jobs.list", + "path": "v1b3/projects/{projectId}/jobs" + }, + "create": { + "flatPath": "v1b3/projects/{projectId}/jobs", + "path": "v1b3/projects/{projectId}/jobs", + "id": "dataflow.projects.jobs.create", + "description": "Creates a Cloud Dataflow job.", + "request": { + "$ref": "Job" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "Job" + }, + "parameters": { + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response.", + "type": "string" + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "description": "The location that contains this job.", + "type": "string", + "location": "query" + }, + "replaceJobId": { + "location": "query", + "description": "Deprecated. This field is now in the Job message.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ] + }, + "getMetrics": { + "description": "Request the job status.", + "response": { + "$ref": "JobMetrics" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "GET", + "parameters": { + "location": { + "location": "query", + "description": "The location which contains the job specified by job_id.", + "type": "string" + }, + "startTime": { + "location": "query", + "format": "google-datetime", + "description": "Return only metric data that has changed since this time.\nDefault is to return all information about all metrics for the job.", + "type": "string" + }, + "jobId": { + "description": "The job to get messages for.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "A project id.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/metrics", + "id": "dataflow.projects.jobs.getMetrics", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/metrics" + }, + "get": { + "description": "Gets the state of the specified Cloud Dataflow job.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "view": { + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ], + "description": "The level of information requested in response.", + "type": "string" + }, + "jobId": { + "location": "path", + "description": "The job ID.", + "type": "string", + "required": true + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "location": { + "location": "query", + "description": "The location that contains this job.", + "type": "string" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", + "id": "dataflow.projects.jobs.get", + "path": "v1b3/projects/{projectId}/jobs/{jobId}" + }, + "update": { + "httpMethod": "PUT", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "location": { + "description": "The location that contains this job.", + "type": "string", + "location": "query" + }, + "jobId": { + "location": "path", + "description": "The job ID.", + "type": "string", + "required": true + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}", + "path": "v1b3/projects/{projectId}/jobs/{jobId}", + "id": "dataflow.projects.jobs.update", + "request": { + "$ref": "Job" + }, + "description": "Updates the state of an existing Cloud Dataflow job." + }, + "aggregated": { + "flatPath": "v1b3/projects/{projectId}/jobs:aggregated", + "path": "v1b3/projects/{projectId}/jobs:aggregated", + "id": "dataflow.projects.jobs.aggregated", + "description": "List the jobs of a project across all regions.", + "httpMethod": "GET", + "response": { + "$ref": "ListJobsResponse" + }, + "parameterOrder": [ + "projectId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "projectId": { + "description": "The project which owns the jobs.", + "type": "string", + "required": true, + "location": "path" + }, + "filter": { + "description": "The kind of filter to use.", + "type": "string", + "location": "query", + "enum": [ + "UNKNOWN", + "ALL", + "TERMINATED", + "ACTIVE" + ] + }, + "location": { + "location": "query", + "description": "The location that contains this job.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Set this to the 'next_page_token' field of a previous response\nto request additional results in a long list.", + "type": "string" + }, + "pageSize": { + "format": "int32", + "description": "If there are many jobs, limit response to at most this many.\nThe actual number of jobs returned will be the lesser of max_responses\nand an unspecified server-defined limit.", + "type": "integer", + "location": "query" + }, + "view": { + "description": "Level of information requested in response. Default is `JOB_VIEW_SUMMARY`.", + "type": "string", + "location": "query", + "enum": [ + "JOB_VIEW_UNKNOWN", + "JOB_VIEW_SUMMARY", + "JOB_VIEW_ALL", + "JOB_VIEW_DESCRIPTION" + ] + } + } + } + }, + "resources": { + "workItems": { + "methods": { + "reportStatus": { + "request": { + "$ref": "ReportWorkItemStatusRequest" + }, + "description": "Reports the status of dataflow WorkItems leased by a worker.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "ReportWorkItemStatusResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "jobId": { + "location": "path", + "description": "The job which the WorkItem is part of.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The project which owns the WorkItem's job.", + "type": "string", + "required": true + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:reportStatus", + "id": "dataflow.projects.jobs.workItems.reportStatus" + }, + "lease": { + "request": { + "$ref": "LeaseWorkItemRequest" + }, + "description": "Leases a dataflow WorkItem to run.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "LeaseWorkItemResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "jobId": { + "description": "Identifies the workflow job this worker belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Identifies the project this worker belongs to.", + "type": "string", + "required": true + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/workItems:lease", + "id": "dataflow.projects.jobs.workItems.lease" + } + } + }, + "debug": { + "methods": { + "sendCapture": { + "description": "Send encoded debug capture data for component.", + "request": { + "$ref": "SendDebugCaptureRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "SendDebugCaptureResponse" + }, + "parameters": { + "jobId": { + "location": "path", + "description": "The job id.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The project id.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/sendCapture", + "id": "dataflow.projects.jobs.debug.sendCapture" + }, + "getConfig": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "jobId" + ], + "response": { + "$ref": "GetDebugConfigResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ], + "parameters": { + "jobId": { + "location": "path", + "description": "The job id.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "The project id.", + "type": "string", + "required": true + } + }, + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/debug/getConfig", + "id": "dataflow.projects.jobs.debug.getConfig", + "request": { + "$ref": "GetDebugConfigRequest" + }, + "description": "Get encoded debug configuration for component. Not cacheable." + } + } + }, + "messages": { + "methods": { + "list": { + "flatPath": "v1b3/projects/{projectId}/jobs/{jobId}/messages", + "id": "dataflow.projects.jobs.messages.list", + "path": "v1b3/projects/{projectId}/jobs/{jobId}/messages", + "description": "Request the job status.", + "response": { + "$ref": "ListJobMessagesResponse" + }, + "parameterOrder": [ + "projectId", + "jobId" + ], + "httpMethod": "GET", + "parameters": { + "jobId": { + "location": "path", + "description": "The job to get messages about.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "A project id.", + "type": "string", + "required": true + }, + "location": { + "location": "query", + "description": "The location which contains the job specified by job_id.", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "Return only messages with timestamps \u003c end_time. The default is now\n(i.e. return up to the latest messages available).", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "If supplied, this should be the value of next_page_token returned\nby an earlier call. This will cause the next page of results to\nbe returned.", + "type": "string" + }, + "startTime": { + "location": "query", + "format": "google-datetime", + "description": "If specified, return only messages with timestamps \u003e= start_time.\nThe default is the job creation time (i.e. beginning of messages).", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "If specified, determines the maximum number of messages to\nreturn. If unspecified, the service may choose an appropriate\ndefault, or may return an arbitrarily large number of results.", + "type": "integer" + }, + "minimumImportance": { + "location": "query", + "enum": [ + "JOB_MESSAGE_IMPORTANCE_UNKNOWN", + "JOB_MESSAGE_DEBUG", + "JOB_MESSAGE_DETAILED", + "JOB_MESSAGE_BASIC", + "JOB_MESSAGE_WARNING", + "JOB_MESSAGE_ERROR" + ], + "description": "Filter to only get messages with importance \u003e= level", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly", + "https://www.googleapis.com/auth/userinfo.email" + ] + } + } } } } @@ -1472,35 +1443,17 @@ } }, "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "type": "boolean", - "location": "query", - "description": "Returns response with indentations and line breaks." - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "callback": { + "uploadType": { "location": "query", - "description": "JSONP", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, "$.xgafv": { - "description": "V1 error format.", - "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -1509,57 +1462,405 @@ "enum": [ "1", "2" - ] + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" }, "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query" + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] }, "key": { + "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" }, - "access_token": { - "type": "string", - "location": "query", - "description": "OAuth access token." - }, "quotaUser": { - "type": "string", "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" }, "pp": { - "default": "true", - "type": "boolean", "location": "query", - "description": "Pretty-print response." + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" }, "oauth_token": { "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" }, - "bearer_token": { - "description": "OAuth bearer token.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" } }, "schemas": { + "Environment": { + "description": "Describes the environment in which a Dataflow Job runs.", + "type": "object", + "properties": { + "serviceAccountEmail": { + "description": "Identity to run virtual machines as. Defaults to the default account.", + "type": "string" + }, + "sdkPipelineOptions": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The Cloud Dataflow SDK pipeline options specified by the user. These\noptions are passed through the service and are used to recreate the\nSDK pipeline options on the worker in a language agnostic and platform\nindependent way.", + "type": "object" + }, + "userAgent": { + "description": "A description of the process that generated the request.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + }, + "clusterManagerApiService": { + "description": "The type of cluster manager API to use. If unknown or\nunspecified, the service will attempt to choose a reasonable\ndefault. This should be in the form of the API service name,\ne.g. \"compute.googleapis.com\".", + "type": "string" + }, + "tempStoragePrefix": { + "description": "The prefix of the resources the system should use for temporary\nstorage. The system will append the suffix \"/temp-{JOBNAME} to\nthis resource prefix, where {JOBNAME} is the value of the\njob_name field. The resulting bucket and object prefix is used\nas the prefix of the resources used to store temporary data\nneeded during the job execution. NOTE: This will override the\nvalue in taskrunner_settings.\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "type": "string" + }, + "workerPools": { + "description": "The worker pools. At least one \"harness\" worker pool must be\nspecified in order for the job to have workers.", + "items": { + "$ref": "WorkerPool" + }, + "type": "array" + }, + "dataset": { + "description": "The dataset for the current project where various workflow\nrelated tables are stored.\n\nThe supported resource type is:\n\nGoogle BigQuery:\n bigquery.googleapis.com/{dataset}", + "type": "string" + }, + "experiments": { + "description": "The list of experiments to enable.", + "items": { + "type": "string" + }, + "type": "array" + }, + "version": { + "description": "A structure describing which components and their versions of the service\nare required in order to run the job.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + }, + "internalExperiments": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Experimental settings.", + "type": "object" + } + }, + "id": "Environment" + }, + "StreamingComputationTask": { + "description": "A task which describes what action should be performed for the specified\nstreaming computation ranges.", + "type": "object", + "properties": { + "dataDisks": { + "description": "Describes the set of data disks this task should apply to.", + "items": { + "$ref": "MountedDataDisk" + }, + "type": "array" + }, + "taskType": { + "description": "A type of streaming computation task.", + "type": "string", + "enumDescriptions": [ + "The streaming computation task is unknown, or unspecified.", + "Stop processing specified streaming computation range(s).", + "Start processing specified streaming computation range(s)." + ], + "enum": [ + "STREAMING_COMPUTATION_TASK_UNKNOWN", + "STREAMING_COMPUTATION_TASK_STOP", + "STREAMING_COMPUTATION_TASK_START" + ] + }, + "computationRanges": { + "description": "Contains ranges of a streaming computation this task should apply to.", + "items": { + "$ref": "StreamingComputationRanges" + }, + "type": "array" + } + }, + "id": "StreamingComputationTask" + }, + "SendDebugCaptureRequest": { + "description": "Request to send encoded debug information.", + "type": "object", + "properties": { + "componentId": { + "description": "The internal component id for which debug information is sent.", + "type": "string" + }, + "workerId": { + "description": "The worker id, i.e., VM hostname.", + "type": "string" + }, + "location": { + "description": "The location which contains the job specified by job_id.", + "type": "string" + }, + "data": { + "description": "The encoded debug information.", + "type": "string" + } + }, + "id": "SendDebugCaptureRequest" + }, + "GetDebugConfigResponse": { + "description": "Response to a get debug configuration request.", + "type": "object", + "properties": { + "config": { + "description": "The encoded debug configuration for the requested component.", + "type": "string" + } + }, + "id": "GetDebugConfigResponse" + }, + "ComponentTransform": { + "description": "Description of a transform executed as part of an execution stage.", + "type": "object", + "properties": { + "userName": { + "description": "Human-readable name for this transform; may be user or system generated.", + "type": "string" + }, + "originalTransform": { + "description": "User name for the original user transform with which this transform is\nmost closely associated.", + "type": "string" + }, + "name": { + "description": "Dataflow service generated name for this source.", + "type": "string" + } + }, + "id": "ComponentTransform" + }, + "StreamingSetupTask": { + "description": "A task which initializes part of a streaming Dataflow job.", + "type": "object", + "properties": { + "streamingComputationTopology": { + "$ref": "TopologyConfig", + "description": "The global topology of the streaming Dataflow job." + }, + "drain": { + "description": "The user has requested drain.", + "type": "boolean" + }, + "workerHarnessPort": { + "format": "int32", + "description": "The TCP port used by the worker to communicate with the Dataflow\nworker harness.", + "type": "integer" + }, + "receiveWorkPort": { + "format": "int32", + "description": "The TCP port on which the worker should listen for messages from\nother streaming computation workers.", + "type": "integer" + } + }, + "id": "StreamingSetupTask" + }, + "PubsubLocation": { + "description": "Identifies a pubsub location to use for transferring data into or\nout of a streaming Dataflow job.", + "type": "object", + "properties": { + "timestampLabel": { + "description": "If set, contains a pubsub label from which to extract record timestamps.\nIf left empty, record timestamps will be generated upon arrival.", + "type": "string" + }, + "topic": { + "description": "A pubsub topic, in the form of\n\"pubsub.googleapis.com/topics/\u003cproject-id\u003e/\u003ctopic-name\u003e\"", + "type": "string" + }, + "subscription": { + "description": "A pubsub subscription, in the form of\n\"pubsub.googleapis.com/subscriptions/\u003cproject-id\u003e/\u003csubscription-name\u003e\"", + "type": "string" + }, + "dropLateData": { + "description": "Indicates whether the pipeline allows late-arriving data.", + "type": "boolean" + }, + "trackingSubscription": { + "description": "If set, specifies the pubsub subscription that will be used for tracking\ncustom time timestamps for watermark estimation.", + "type": "string" + }, + "withAttributes": { + "description": "If true, then the client has requested to get pubsub attributes.", + "type": "boolean" + }, + "idLabel": { + "description": "If set, contains a pubsub label from which to extract record ids.\nIf left empty, record deduplication will be strictly best effort.", + "type": "string" + } + }, + "id": "PubsubLocation" + }, + "WorkerHealthReport": { + "description": "WorkerHealthReport contains information about the health of a worker.\n\nThe VM should be identified by the labels attached to the WorkerMessage that\nthis health ping belongs to.", + "type": "object", + "properties": { + "pods": { + "description": "The pods running on the worker. See:\nhttp://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod\n\nThis field is used by the worker to send the status of the indvidual\ncontainers running on each worker.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } + }, + "type": "array" + }, + "vmStartupTime": { + "format": "google-datetime", + "description": "The time the VM was booted.", + "type": "string" + }, + "reportInterval": { + "format": "google-duration", + "description": "The interval at which the worker is sending health reports.\nThe default value of 0 should be interpreted as the field is not being\nexplicitly set by the worker.", + "type": "string" + }, + "vmIsHealthy": { + "description": "Whether the VM is healthy.", + "type": "boolean" + } + }, + "id": "WorkerHealthReport" + }, + "JobMessage": { + "description": "A particular message pertaining to a Dataflow job.", + "type": "object", + "properties": { + "messageImportance": { + "description": "Importance level of the message.", + "type": "string", + "enumDescriptions": [ + "The message importance isn't specified, or is unknown.", + "The message is at the 'debug' level: typically only useful for\nsoftware engineers working on the code the job is running.\nTypically, Dataflow pipeline runners do not display log messages\nat this level by default.", + "The message is at the 'detailed' level: somewhat verbose, but\npotentially useful to users. Typically, Dataflow pipeline\nrunners do not display log messages at this level by default.\nThese messages are displayed by default in the Dataflow\nmonitoring UI.", + "The message is at the 'basic' level: useful for keeping\ntrack of the execution of a Dataflow pipeline. Typically,\nDataflow pipeline runners display log messages at this level by\ndefault, and these messages are displayed by default in the\nDataflow monitoring UI.", + "The message is at the 'warning' level: indicating a condition\npertaining to a job which may require human intervention.\nTypically, Dataflow pipeline runners display log messages at this\nlevel by default, and these messages are displayed by default in\nthe Dataflow monitoring UI.", + "The message is at the 'error' level: indicating a condition\npreventing a job from succeeding. Typically, Dataflow pipeline\nrunners display log messages at this level by default, and these\nmessages are displayed by default in the Dataflow monitoring UI." + ], + "enum": [ + "JOB_MESSAGE_IMPORTANCE_UNKNOWN", + "JOB_MESSAGE_DEBUG", + "JOB_MESSAGE_DETAILED", + "JOB_MESSAGE_BASIC", + "JOB_MESSAGE_WARNING", + "JOB_MESSAGE_ERROR" + ] + }, + "messageText": { + "description": "The text of the message.", + "type": "string" + }, + "time": { + "format": "google-datetime", + "description": "The timestamp of the message.", + "type": "string" + }, + "id": { + "description": "Deprecated.", + "type": "string" + } + }, + "id": "JobMessage" + }, + "ParameterMetadata": { + "description": "Metadata for a specific parameter.", + "type": "object", + "properties": { + "helpText": { + "description": "Required. The help text to display for the parameter.", + "type": "string" + }, + "isOptional": { + "description": "Optional. Whether the parameter is optional. Defaults to false.", + "type": "boolean" + }, + "name": { + "description": "Required. The name of the parameter.", + "type": "string" + }, + "regexes": { + "description": "Optional. Regexes that the parameter must match.", + "items": { + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "Required. The label to display for the parameter.", + "type": "string" + } + }, + "id": "ParameterMetadata" + }, + "MultiOutputInfo": { + "description": "Information about an output of a multi-output DoFn.", + "type": "object", + "properties": { + "tag": { + "description": "The id of the tag the user code will emit to this output by; this\nshould correspond to the tag of some SideInputInfo.", + "type": "string" + } + }, + "id": "MultiOutputInfo" + }, "SourceSplitRequest": { "description": "Represents the operation to split a high-level Source specification\ninto bundles (parts for parallel processing).\n\nAt a high level, splitting of a source into bundles happens as follows:\nSourceSplitRequest is applied to the source. If it returns\nSOURCE_SPLIT_OUTCOME_USE_CURRENT, no further splitting happens and the source\nis used \"as is\". Otherwise, splitting is applied recursively to each\nproduced DerivedSource.\n\nAs an optimization, for any Source, if its does_not_need_splitting is\ntrue, the framework assumes that splitting this source would return\nSOURCE_SPLIT_OUTCOME_USE_CURRENT, and doesn't initiate a SourceSplitRequest.\nThis applies both to the initial source being split and to bundles\nproduced from it.", "type": "object", @@ -1569,66 +1870,38 @@ "description": "Hints for tuning the splitting process." }, "source": { - "$ref": "Source", - "description": "Specification of the source to be split." + "description": "Specification of the source to be split.", + "$ref": "Source" } }, "id": "SourceSplitRequest" }, "SourceGetMetadataResponse": { - "properties": { - "metadata": { - "description": "The computed metadata.", - "$ref": "SourceMetadata" - } - }, - "id": "SourceGetMetadataResponse", "description": "The result of a SourceGetMetadataOperation.", - "type": "object" - }, - "AutoscalingEvent": { - "description": "A structured message reporting an autoscaling decision made by the Dataflow\nservice.", "type": "object", "properties": { - "currentNumWorkers": { - "format": "int64", - "description": "The current number of workers the job has.", - "type": "string" + "metadata": { + "$ref": "SourceMetadata", + "description": "The computed metadata." + } + }, + "id": "SourceGetMetadataResponse" + }, + "ShellTask": { + "description": "A task which consists of a shell command for the worker to execute.", + "type": "object", + "properties": { + "exitCode": { + "format": "int32", + "description": "Exit code for the task.", + "type": "integer" }, - "time": { - "format": "google-datetime", - "description": "The time this event was emitted to indicate a new target or current\nnum_workers value.", - "type": "string" - }, - "description": { - "$ref": "StructuredMessage", - "description": "A message describing why the system decided to adjust the current\nnumber of workers, why it failed, or why the system decided to\nnot make any changes to the number of workers." - }, - "eventType": { - "description": "The type of autoscaling event to report.", - "type": "string", - "enumDescriptions": [ - "Default type for the enum. Value should never be returned.", - "The TARGET_NUM_WORKERS_CHANGED type should be used when the target\nworker pool size has changed at the start of an actuation. An event\nshould always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects\na change in the target_num_workers.", - "The CURRENT_NUM_WORKERS_CHANGED type should be used when actual worker\npool size has been changed, but the target_num_workers has not changed.", - "The ACTUATION_FAILURE type should be used when we want to report\nan error to the user indicating why the current number of workers\nin the pool could not be changed.\nDisplayed in the current status and history widgets.", - "Used when we want to report to the user a reason why we are\nnot currently adjusting the number of workers.\nShould specify both target_num_workers, current_num_workers and a\ndecision_message." - ], - "enum": [ - "TYPE_UNKNOWN", - "TARGET_NUM_WORKERS_CHANGED", - "CURRENT_NUM_WORKERS_CHANGED", - "ACTUATION_FAILURE", - "NO_CHANGE" - ] - }, - "targetNumWorkers": { - "format": "int64", - "description": "The target number of workers the worker pool wants to resize to use.", + "command": { + "description": "The shell command to run.", "type": "string" } }, - "id": "AutoscalingEvent" + "id": "ShellTask" }, "MetricShortId": { "description": "The metric short id is returned to the user alongside an offset into\nReportWorkItemStatusRequest", @@ -1647,28 +1920,76 @@ }, "id": "MetricShortId" }, - "ShellTask": { + "AutoscalingEvent": { + "description": "A structured message reporting an autoscaling decision made by the Dataflow\nservice.", "type": "object", "properties": { - "exitCode": { - "format": "int32", - "description": "Exit code for the task.", - "type": "integer" + "time": { + "format": "google-datetime", + "description": "The time this event was emitted to indicate a new target or current\nnum_workers value.", + "type": "string" }, - "command": { - "description": "The shell command to run.", + "description": { + "$ref": "StructuredMessage", + "description": "A message describing why the system decided to adjust the current\nnumber of workers, why it failed, or why the system decided to\nnot make any changes to the number of workers." + }, + "eventType": { + "enumDescriptions": [ + "Default type for the enum. Value should never be returned.", + "The TARGET_NUM_WORKERS_CHANGED type should be used when the target\nworker pool size has changed at the start of an actuation. An event\nshould always be specified as TARGET_NUM_WORKERS_CHANGED if it reflects\na change in the target_num_workers.", + "The CURRENT_NUM_WORKERS_CHANGED type should be used when actual worker\npool size has been changed, but the target_num_workers has not changed.", + "The ACTUATION_FAILURE type should be used when we want to report\nan error to the user indicating why the current number of workers\nin the pool could not be changed.\nDisplayed in the current status and history widgets.", + "Used when we want to report to the user a reason why we are\nnot currently adjusting the number of workers.\nShould specify both target_num_workers, current_num_workers and a\ndecision_message." + ], + "enum": [ + "TYPE_UNKNOWN", + "TARGET_NUM_WORKERS_CHANGED", + "CURRENT_NUM_WORKERS_CHANGED", + "ACTUATION_FAILURE", + "NO_CHANGE" + ], + "description": "The type of autoscaling event to report.", + "type": "string" + }, + "targetNumWorkers": { + "format": "int64", + "description": "The target number of workers the worker pool wants to resize to use.", + "type": "string" + }, + "currentNumWorkers": { + "format": "int64", + "description": "The current number of workers the job has.", "type": "string" } }, - "id": "ShellTask", - "description": "A task which consists of a shell command for the worker to execute." + "id": "AutoscalingEvent" }, "TaskRunnerSettings": { "description": "Taskrunner configuration settings.", "type": "object", "properties": { - "dataflowApiVersion": { - "description": "The API version of endpoint, e.g. \"v1b3\"", + "taskUser": { + "description": "The UNIX user ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"root\".", + "type": "string" + }, + "vmId": { + "description": "The ID string of the VM.", + "type": "string" + }, + "alsologtostderr": { + "description": "Whether to also send taskrunner log info to stderr.", + "type": "boolean" + }, + "taskGroup": { + "description": "The UNIX group ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"wheel\".", + "type": "string" + }, + "harnessCommand": { + "description": "The command to launch the worker harness.", + "type": "string" + }, + "logDir": { + "description": "The directory on the VM to store logs.", "type": "string" }, "oauthScopes": { @@ -1678,6 +1999,10 @@ }, "type": "array" }, + "dataflowApiVersion": { + "description": "The API version of endpoint, e.g. \"v1b3\"", + "type": "string" + }, "logUploadLocation": { "description": "Indicates where to put logs. If this is not specified, the logs\nwill not be uploaded.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", "type": "string" @@ -1698,14 +2023,14 @@ "description": "The file to store preprocessing commands in.", "type": "string" }, - "baseTaskDir": { - "type": "string", - "description": "The location on the worker for task-specific subdirectories." - }, "tempStoragePrefix": { "description": "The prefix of the resources the taskrunner should use for\ntemporary storage.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", "type": "string" }, + "baseTaskDir": { + "description": "The location on the worker for task-specific subdirectories.", + "type": "string" + }, "baseUrl": { "description": "The base URL for the taskrunner to use when accessing Google Cloud APIs.\n\nWhen workers access Google Cloud APIs, they logically do so via\nrelative URLs. If this field is specified, it supplies the base\nURL to use for resolving these relative URLs. The normative\nalgorithm used is defined by RFC 1808, \"Relative Uniform Resource\nLocators\".\n\nIf not specified, the default value is \"http://www.googleapis.com/\"", "type": "string" @@ -1721,30 +2046,6 @@ "parallelWorkerSettings": { "description": "The settings to pass to the parallel worker harness.", "$ref": "WorkerSettings" - }, - "vmId": { - "description": "The ID string of the VM.", - "type": "string" - }, - "taskUser": { - "description": "The UNIX user ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"root\".", - "type": "string" - }, - "alsologtostderr": { - "type": "boolean", - "description": "Whether to also send taskrunner log info to stderr." - }, - "taskGroup": { - "type": "string", - "description": "The UNIX group ID on the worker VM to use for tasks launched by\ntaskrunner; e.g. \"wheel\"." - }, - "harnessCommand": { - "description": "The command to launch the worker harness.", - "type": "string" - }, - "logDir": { - "description": "The directory on the VM to store logs.", - "type": "string" } }, "id": "TaskRunnerSettings" @@ -1753,6 +2054,14 @@ "description": "Position defines a position within a collection of data. The value\ncan be either the end position, a key (used with ordered\ncollections), a byte offset, or a record index.", "type": "object", "properties": { + "end": { + "description": "Position is past all other positions. Also useful for the end\nposition of an unbounded range.", + "type": "boolean" + }, + "key": { + "description": "Position is a string key, ordered lexicographically.", + "type": "string" + }, "recordIndex": { "format": "int64", "description": "Position is a record index.", @@ -1763,42 +2072,17 @@ "type": "string" }, "concatPosition": { - "description": "CloudPosition is a concat position.", - "$ref": "ConcatPosition" + "$ref": "ConcatPosition", + "description": "CloudPosition is a concat position." }, "byteOffset": { "format": "int64", "description": "Position is a byte offset.", "type": "string" - }, - "end": { - "type": "boolean", - "description": "Position is past all other positions. Also useful for the end\nposition of an unbounded range." - }, - "key": { - "type": "string", - "description": "Position is a string key, ordered lexicographically." } }, "id": "Position" }, - "SplitInt64": { - "description": "A representation of an int64, n, that is immune to precision loss when\nencoded in JSON.", - "type": "object", - "properties": { - "lowBits": { - "format": "uint32", - "description": "The low order bits: n & 0xffffffff.", - "type": "integer" - }, - "highBits": { - "format": "int32", - "description": "The high order bits, including the sign: n \u003e\u003e 32.", - "type": "integer" - } - }, - "id": "SplitInt64" - }, "Source": { "description": "A source that records can be read and decoded from.", "type": "object", @@ -1817,8 +2101,8 @@ }, "spec": { "additionalProperties": { - "type": "any", - "description": "Properties of the object." + "description": "Properties of the object.", + "type": "any" }, "description": "The source to read from, plus its parameters.", "type": "object" @@ -1830,19 +2114,116 @@ "baseSpecs": { "description": "While splitting, sources may specify the produced bundles\nas differences against another source, in order to save backend-side\nmemory and allow bigger jobs. For details, see SourceSplitRequest.\nTo support this use case, the full set of parameters of the source\nis logically obtained by taking the latest explicitly specified value\nof each parameter in the order:\nbase_specs (later items win), spec (overrides anything in base_specs).", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "type": "object" + } }, "type": "array" } }, "id": "Source" }, - "WorkerPool": { + "SplitInt64": { + "description": "A representation of an int64, n, that is immune to precision loss when\nencoded in JSON.", + "type": "object", "properties": { + "highBits": { + "format": "int32", + "description": "The high order bits, including the sign: n \u003e\u003e 32.", + "type": "integer" + }, + "lowBits": { + "format": "uint32", + "description": "The low order bits: n & 0xffffffff.", + "type": "integer" + } + }, + "id": "SplitInt64" + }, + "WorkerPool": { + "description": "Describes one particular pool of Cloud Dataflow workers to be\ninstantiated by the Cloud Dataflow service in order to perform the\ncomputations required by a job. Note that a workflow job may use\nmultiple pools, in order to match the various computational\nrequirements of the various stages of the job.", + "type": "object", + "properties": { + "kind": { + "description": "The kind of the worker pool; currently only `harness` and `shuffle`\nare supported.", + "type": "string" + }, + "dataDisks": { + "description": "Data disks that are used by a VM in this workflow.", + "items": { + "$ref": "Disk" + }, + "type": "array" + }, + "subnetwork": { + "description": "Subnetwork to which VMs will be assigned, if desired. Expected to be of\nthe form \"regions/REGION/subnetworks/SUBNETWORK\".", + "type": "string" + }, + "ipConfiguration": { + "enumDescriptions": [ + "The configuration is unknown, or unspecified.", + "Workers should have public IP addresses.", + "Workers should have private IP addresses." + ], + "enum": [ + "WORKER_IP_UNSPECIFIED", + "WORKER_IP_PUBLIC", + "WORKER_IP_PRIVATE" + ], + "description": "Configuration for VM IPs.", + "type": "string" + }, + "autoscalingSettings": { + "description": "Settings for autoscaling of this WorkerPool.", + "$ref": "AutoscalingSettings" + }, + "taskrunnerSettings": { + "$ref": "TaskRunnerSettings", + "description": "Settings passed through to Google Compute Engine workers when\nusing the standard Dataflow task runner. Users should ignore\nthis field." + }, + "metadata": { + "description": "Metadata to set on the Google Compute Engine VMs.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "defaultPackageSet": { + "description": "The default package set to install. This allows the service to\nselect a default set of packages which are useful to worker\nharnesses written in a particular language.", + "type": "string", + "enumDescriptions": [ + "The default set of packages to stage is unknown, or unspecified.", + "Indicates that no packages should be staged at the worker unless\nexplicitly specified by the job.", + "Stage packages typically useful to workers written in Java.", + "Stage pacakges typically useful to workers written in Python." + ], + "enum": [ + "DEFAULT_PACKAGE_SET_UNKNOWN", + "DEFAULT_PACKAGE_SET_NONE", + "DEFAULT_PACKAGE_SET_JAVA", + "DEFAULT_PACKAGE_SET_PYTHON" + ] + }, + "network": { + "description": "Network to which VMs will be assigned. If empty or unspecified,\nthe service will use the network \"default\".", + "type": "string" + }, + "zone": { + "description": "Zone to run the worker pools in. If empty or unspecified, the service\nwill attempt to choose a reasonable default.", + "type": "string" + }, + "numWorkers": { + "format": "int32", + "description": "Number of Google Compute Engine workers in this pool needed to\nexecute the job. If zero or unspecified, the service will\nattempt to choose a reasonable default.", + "type": "integer" + }, + "numThreadsPerWorker": { + "format": "int32", + "description": "The number of threads per worker harness. If empty or unspecified, the\nservice will choose a number of threads (according to the number of cores\non the selected machine type for batch, or 1 by convention for streaming).", + "type": "integer" + }, "diskSourceImage": { "description": "Fully qualified source image for disks.", "type": "string" @@ -1855,6 +2236,7 @@ "type": "array" }, "teardownPolicy": { + "description": "Sets the policy for determining when to turndown worker pool.\nAllowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and\n`TEARDOWN_NEVER`.\n`TEARDOWN_ALWAYS` means workers are always torn down regardless of whether\nthe job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down\nif the job succeeds. `TEARDOWN_NEVER` means the workers are never torn\ndown.\n\nIf the workers are not torn down by the service, they will\ncontinue to run and use Google Compute Engine VM resources in the\nuser's project until they are explicitly terminated by the user.\nBecause of this, Google recommends using the `TEARDOWN_ALWAYS`\npolicy except for small, manually supervised test jobs.\n\nIf unknown or unspecified, the service will attempt to choose a reasonable\ndefault.", "type": "string", "enumDescriptions": [ "The teardown policy isn't specified, or is unknown.", @@ -1867,8 +2249,7 @@ "TEARDOWN_ALWAYS", "TEARDOWN_ON_SUCCESS", "TEARDOWN_NEVER" - ], - "description": "Sets the policy for determining when to turndown worker pool.\nAllowed values are: `TEARDOWN_ALWAYS`, `TEARDOWN_ON_SUCCESS`, and\n`TEARDOWN_NEVER`.\n`TEARDOWN_ALWAYS` means workers are always torn down regardless of whether\nthe job succeeds. `TEARDOWN_ON_SUCCESS` means workers are torn down\nif the job succeeds. `TEARDOWN_NEVER` means the workers are never torn\ndown.\n\nIf the workers are not torn down by the service, they will\ncontinue to run and use Google Compute Engine VM resources in the\nuser's project until they are explicitly terminated by the user.\nBecause of this, Google recommends using the `TEARDOWN_ALWAYS`\npolicy except for small, manually supervised test jobs.\n\nIf unknown or unspecified, the service will attempt to choose a reasonable\ndefault." + ] }, "onHostMaintenance": { "description": "The action to take on host maintenance, as defined by the Google\nCompute Engine API.", @@ -1888,8 +2269,8 @@ "type": "integer" }, "workerHarnessContainerImage": { - "type": "string", - "description": "Required. Docker container image that executes the Cloud Dataflow worker\nharness, residing in Google Container Registry." + "description": "Required. Docker container image that executes the Cloud Dataflow worker\nharness, residing in Google Container Registry.", + "type": "string" }, "diskType": { "description": "Type of root disk for VMs. If empty or unspecified, the service will\nattempt to choose a reasonable default.", @@ -1898,89 +2279,9 @@ "machineType": { "description": "Machine type (e.g. \"n1-standard-1\"). If empty or unspecified, the\nservice will attempt to choose a reasonable default.", "type": "string" - }, - "kind": { - "description": "The kind of the worker pool; currently only `harness` and `shuffle`\nare supported.", - "type": "string" - }, - "dataDisks": { - "description": "Data disks that are used by a VM in this workflow.", - "items": { - "$ref": "Disk" - }, - "type": "array" - }, - "subnetwork": { - "description": "Subnetwork to which VMs will be assigned, if desired. Expected to be of\nthe form \"regions/REGION/subnetworks/SUBNETWORK\".", - "type": "string" - }, - "ipConfiguration": { - "enum": [ - "WORKER_IP_UNSPECIFIED", - "WORKER_IP_PUBLIC", - "WORKER_IP_PRIVATE" - ], - "description": "Configuration for VM IPs.", - "type": "string", - "enumDescriptions": [ - "The configuration is unknown, or unspecified.", - "Workers should have public IP addresses.", - "Workers should have private IP addresses." - ] - }, - "autoscalingSettings": { - "$ref": "AutoscalingSettings", - "description": "Settings for autoscaling of this WorkerPool." - }, - "taskrunnerSettings": { - "$ref": "TaskRunnerSettings", - "description": "Settings passed through to Google Compute Engine workers when\nusing the standard Dataflow task runner. Users should ignore\nthis field." - }, - "metadata": { - "description": "Metadata to set on the Google Compute Engine VMs.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "network": { - "type": "string", - "description": "Network to which VMs will be assigned. If empty or unspecified,\nthe service will use the network \"default\"." - }, - "defaultPackageSet": { - "enumDescriptions": [ - "The default set of packages to stage is unknown, or unspecified.", - "Indicates that no packages should be staged at the worker unless\nexplicitly specified by the job.", - "Stage packages typically useful to workers written in Java.", - "Stage pacakges typically useful to workers written in Python." - ], - "enum": [ - "DEFAULT_PACKAGE_SET_UNKNOWN", - "DEFAULT_PACKAGE_SET_NONE", - "DEFAULT_PACKAGE_SET_JAVA", - "DEFAULT_PACKAGE_SET_PYTHON" - ], - "description": "The default package set to install. This allows the service to\nselect a default set of packages which are useful to worker\nharnesses written in a particular language.", - "type": "string" - }, - "numThreadsPerWorker": { - "format": "int32", - "description": "The number of threads per worker harness. If empty or unspecified, the\nservice will choose a number of threads (according to the number of cores\non the selected machine type for batch, or 1 by convention for streaming).", - "type": "integer" - }, - "numWorkers": { - "format": "int32", - "description": "Number of Google Compute Engine workers in this pool needed to\nexecute the job. If zero or unspecified, the service will\nattempt to choose a reasonable default.", - "type": "integer" - }, - "zone": { - "description": "Zone to run the worker pools in. If empty or unspecified, the service\nwill attempt to choose a reasonable default.", - "type": "string" } }, - "id": "WorkerPool", - "description": "Describes one particular pool of Cloud Dataflow workers to be\ninstantiated by the Cloud Dataflow service in order to perform the\ncomputations required by a job. Note that a workflow job may use\nmultiple pools, in order to match the various computational\nrequirements of the various stages of the job.", - "type": "object" + "id": "WorkerPool" }, "SourceOperationRequest": { "description": "A work item that represents the different operations that can be\nperformed on a user-defined Source specification.", @@ -1991,8 +2292,8 @@ "description": "Information about a request to get metadata about a source." }, "split": { - "description": "Information about a request to split a source.", - "$ref": "SourceSplitRequest" + "$ref": "SourceSplitRequest", + "description": "Information about a request to split a source." } }, "id": "SourceOperationRequest" @@ -2020,17 +2321,57 @@ "id": "StructuredMessage" }, "WorkItem": { - "id": "WorkItem", "description": "WorkItem represents basic information about a WorkItem to be executed\nin the cloud.", "type": "object", "properties": { + "initialReportIndex": { + "format": "int64", + "description": "The initial index to use when reporting the status of the WorkItem.", + "type": "string" + }, + "shellTask": { + "description": "Additional information for ShellTask WorkItems.", + "$ref": "ShellTask" + }, + "streamingComputationTask": { + "description": "Additional information for StreamingComputationTask WorkItems.", + "$ref": "StreamingComputationTask" + }, + "jobId": { + "description": "Identifies the workflow job this WorkItem belongs to.", + "type": "string" + }, + "id": { + "format": "int64", + "description": "Identifies this WorkItem.", + "type": "string" + }, + "configuration": { + "description": "Work item-specific configuration as an opaque blob.", + "type": "string" + }, + "mapTask": { + "$ref": "MapTask", + "description": "Additional information for MapTask WorkItems." + }, + "seqMapTask": { + "description": "Additional information for SeqMapTask WorkItems.", + "$ref": "SeqMapTask" + }, + "packages": { + "description": "Any required packages that need to be fetched in order to execute\nthis WorkItem.", + "items": { + "$ref": "Package" + }, + "type": "array" + }, "projectId": { - "type": "string", - "description": "Identifies the cloud project this WorkItem belongs to." + "description": "Identifies the cloud project this WorkItem belongs to.", + "type": "string" }, "sourceOperationTask": { - "$ref": "SourceOperationRequest", - "description": "Additional information for source operation WorkItems." + "description": "Additional information for source operation WorkItems.", + "$ref": "SourceOperationRequest" }, "reportStatusInterval": { "format": "google-duration", @@ -2041,57 +2382,17 @@ "description": "Additional information for StreamingSetupTask WorkItems.", "$ref": "StreamingSetupTask" }, + "streamingConfigTask": { + "description": "Additional information for StreamingConfigTask WorkItems.", + "$ref": "StreamingConfigTask" + }, "leaseExpireTime": { "format": "google-datetime", "description": "Time when the lease on this Work will expire.", "type": "string" - }, - "streamingConfigTask": { - "$ref": "StreamingConfigTask", - "description": "Additional information for StreamingConfigTask WorkItems." - }, - "initialReportIndex": { - "format": "int64", - "description": "The initial index to use when reporting the status of the WorkItem.", - "type": "string" - }, - "shellTask": { - "$ref": "ShellTask", - "description": "Additional information for ShellTask WorkItems." - }, - "streamingComputationTask": { - "$ref": "StreamingComputationTask", - "description": "Additional information for StreamingComputationTask WorkItems." - }, - "jobId": { - "type": "string", - "description": "Identifies the workflow job this WorkItem belongs to." - }, - "id": { - "format": "int64", - "description": "Identifies this WorkItem.", - "type": "string" - }, - "configuration": { - "type": "string", - "description": "Work item-specific configuration as an opaque blob." - }, - "mapTask": { - "$ref": "MapTask", - "description": "Additional information for MapTask WorkItems." - }, - "seqMapTask": { - "$ref": "SeqMapTask", - "description": "Additional information for SeqMapTask WorkItems." - }, - "packages": { - "description": "Any required packages that need to be fetched in order to execute\nthis WorkItem.", - "items": { - "$ref": "Package" - }, - "type": "array" } - } + }, + "id": "WorkItem" }, "ResourceUtilizationReport": { "description": "Worker metrics exported from workers. This contains resource utilization\nmetrics accumulated from a variety of sources. For more information, see\ngo/df-resource-signals.", @@ -2108,6 +2409,7 @@ "id": "ResourceUtilizationReport" }, "ReportedParallelism": { + "description": "Represents the level of parallelism in a WorkItem's input,\nreported by the worker.", "type": "object", "properties": { "isInfinite": { @@ -2120,20 +2422,18 @@ "type": "number" } }, - "id": "ReportedParallelism", - "description": "Represents the level of parallelism in a WorkItem's input,\nreported by the worker." + "id": "ReportedParallelism" }, "TopologyConfig": { - "id": "TopologyConfig", "description": "Global topology of the streaming Dataflow job, including all\ncomputations and their sharded locations.", "type": "object", "properties": { "userStageToComputationNameMap": { - "description": "Maps user stage names to stable computation names.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Maps user stage names to stable computation names.", + "type": "object" }, "computations": { "description": "The computations associated with a streaming Dataflow job.", @@ -2159,7 +2459,8 @@ "description": "The size (in bits) of keys that will be assigned to source messages.", "type": "integer" } - } + }, + "id": "TopologyConfig" }, "SourceSplitOptions": { "description": "Hints for splitting a Source into bundles (parts for parallel\nprocessing) using SourceSplitRequest.", @@ -2183,8 +2484,8 @@ "type": "object", "properties": { "source": { - "$ref": "Source", - "description": "The source to read from." + "description": "The source to read from.", + "$ref": "Source" } }, "id": "ReadInstruction" @@ -2193,14 +2494,6 @@ "description": "Provides data to pass through to the worker harness.", "type": "object", "properties": { - "workerId": { - "type": "string", - "description": "The ID of the worker running this pipeline." - }, - "tempStoragePrefix": { - "description": "The prefix of the resources the system should use for temporary\nstorage.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", - "type": "string" - }, "baseUrl": { "description": "The base URL for accessing Google Cloud APIs.\n\nWhen workers access Google Cloud APIs, they logically do so via\nrelative URLs. If this field is specified, it supplies the base\nURL to use for resolving these relative URLs. The normative\nalgorithm used is defined by RFC 1808, \"Relative Uniform Resource\nLocators\".\n\nIf not specified, the default value is \"http://www.googleapis.com/\"", "type": "string" @@ -2216,10 +2509,36 @@ "shuffleServicePath": { "description": "The Shuffle service path relative to the root URL, for example,\n\"shuffle/v1beta1\".", "type": "string" + }, + "workerId": { + "description": "The ID of the worker running this pipeline.", + "type": "string" + }, + "tempStoragePrefix": { + "description": "The prefix of the resources the system should use for temporary\nstorage.\n\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", + "type": "string" } }, "id": "WorkerSettings" }, + "DataDiskAssignment": { + "description": "Data disk assignment for a given VM instance.", + "type": "object", + "properties": { + "vmInstance": { + "description": "VM instance name the data disks mounted to, for example\n\"myproject-1014-104817-4c2-harness-0\".", + "type": "string" + }, + "dataDisks": { + "description": "Mounted data disks. The order is important a data disk's 0-based index in\nthis list defines which persistent directory the disk is mounted to, for\nexample the list of { \"myproject-1014-104817-4c2-harness-0-disk-0\" },\n{ \"myproject-1014-104817-4c2-harness-0-disk-1\" }.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "DataDiskAssignment" + }, "StreamingStageLocation": { "description": "Identifies the location of a streaming computation stage, for\nstage-to-stage communication.", "type": "object", @@ -2231,31 +2550,13 @@ }, "id": "StreamingStageLocation" }, - "DataDiskAssignment": { - "description": "Data disk assignment for a given VM instance.", - "type": "object", - "properties": { - "vmInstance": { - "type": "string", - "description": "VM instance name the data disks mounted to, for example\n\"myproject-1014-104817-4c2-harness-0\"." - }, - "dataDisks": { - "description": "Mounted data disks. The order is important a data disk's 0-based index in\nthis list defines which persistent directory the disk is mounted to, for\nexample the list of { \"myproject-1014-104817-4c2-harness-0-disk-0\" },\n{ \"myproject-1014-104817-4c2-harness-0-disk-1\" }.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "DataDiskAssignment" - }, "ApproximateSplitRequest": { "description": "A suggestion by the service to the worker to dynamically split the WorkItem.", "type": "object", "properties": { "position": { - "description": "A Position at which to split the work item.", - "$ref": "Position" + "$ref": "Position", + "description": "A Position at which to split the work item." }, "fractionConsumed": { "format": "double", @@ -2269,18 +2570,14 @@ "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, "type": "array" }, @@ -2288,25 +2585,21 @@ "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" } }, "id": "Status" }, "ExecutionStageState": { - "id": "ExecutionStageState", "description": "A message describing the state of a particular execution stage.", "type": "object", "properties": { - "executionStageName": { - "description": "The name of the execution stage.", - "type": "string" - }, - "currentStateTime": { - "type": "string", - "format": "google-datetime", - "description": "The time at which the stage transitioned to this state." - }, "executionStageState": { + "description": "Executions stage states allow the same set of values as JobState.", + "type": "string", "enumDescriptions": [ "The job's run state isn't specified.", "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", @@ -2332,23 +2625,31 @@ "JOB_STATE_DRAINED", "JOB_STATE_PENDING", "JOB_STATE_CANCELLING" - ], - "description": "Executions stage states allow the same set of values as JobState.", + ] + }, + "executionStageName": { + "description": "The name of the execution stage.", + "type": "string" + }, + "currentStateTime": { + "format": "google-datetime", + "description": "The time at which the stage transitioned to this state.", "type": "string" } - } + }, + "id": "ExecutionStageState" }, "StreamLocation": { "description": "Describes a stream of data, either as input to be processed or as\noutput of a streaming Dataflow job.", "type": "object", "properties": { "customSourceLocation": { - "description": "The stream is a custom source.", - "$ref": "CustomSourceLocation" + "$ref": "CustomSourceLocation", + "description": "The stream is a custom source." }, "sideInputLocation": { - "$ref": "StreamingSideInputLocation", - "description": "The stream is a streaming side input." + "description": "The stream is a streaming side input.", + "$ref": "StreamingSideInputLocation" }, "pubsubLocation": { "$ref": "PubsubLocation", @@ -2362,6 +2663,8 @@ "id": "StreamLocation" }, "SendWorkerMessagesResponse": { + "description": "The response to the worker messages.", + "type": "object", "properties": { "workerMessageResponses": { "description": "The servers response to the worker messages.", @@ -2371,11 +2674,10 @@ "type": "array" } }, - "id": "SendWorkerMessagesResponse", - "description": "The response to the worker messages.", - "type": "object" + "id": "SendWorkerMessagesResponse" }, "LeaseWorkItemResponse": { + "description": "Response to a request to lease WorkItems.", "type": "object", "properties": { "workItems": { @@ -2386,23 +2688,18 @@ "type": "array" } }, - "id": "LeaseWorkItemResponse", - "description": "Response to a request to lease WorkItems." + "id": "LeaseWorkItemResponse" }, "TransformSummary": { "description": "Description of the type, names/ids, and input/outputs for a transform.", "type": "object", "properties": { - "id": { - "description": "SDK generated id of this transform instance.", - "type": "string" - }, "displayData": { + "description": "Transform-specific display data.", "items": { "$ref": "DisplayData" }, - "type": "array", - "description": "Transform-specific display data." + "type": "array" }, "outputCollectionName": { "description": "User names for all collection outputs to this transform.", @@ -2447,55 +2744,59 @@ "name": { "description": "User provided name for this transform instance.", "type": "string" + }, + "id": { + "description": "SDK generated id of this transform instance.", + "type": "string" } }, "id": "TransformSummary" }, "StreamingComputationConfig": { - "id": "StreamingComputationConfig", "description": "Configuration information for a single streaming computation.", "type": "object", "properties": { + "computationId": { + "description": "Unique identifier for this computation.", + "type": "string" + }, + "stageName": { + "description": "Stage name of this computation.", + "type": "string" + }, + "systemName": { + "description": "System defined name for this computation.", + "type": "string" + }, "instructions": { "description": "Instructions that comprise the computation.", "items": { "$ref": "ParallelInstruction" }, "type": "array" - }, - "computationId": { - "description": "Unique identifier for this computation.", - "type": "string" - }, - "stageName": { - "type": "string", - "description": "Stage name of this computation." - }, - "systemName": { - "description": "System defined name for this computation.", - "type": "string" } - } + }, + "id": "StreamingComputationConfig" }, "Sink": { "description": "A sink that records can be encoded and written to.", "type": "object", "properties": { "codec": { + "description": "The codec to use to encode data written to the sink.", + "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "description": "The codec to use to encode data written to the sink.", - "type": "object" + } }, "spec": { + "description": "The sink to write to, plus its parameters.", + "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "description": "The sink to write to, plus its parameters.", - "type": "object" + } } }, "id": "Sink" @@ -2513,11 +2814,11 @@ "description": "The runtime environment for the job." }, "parameters": { + "description": "The runtime parameters to pass to the job.", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "The runtime parameters to pass to the job.", - "type": "object" + } } }, "id": "LaunchTemplateParameters" @@ -2541,20 +2842,20 @@ "type": "object", "properties": { "valueCombiningFn": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, "description": "The value combining function to invoke.", - "type": "object" - }, - "inputElementCodec": { "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "description": "The codec to use for interpreting an element in the input PTable." + } + }, + "inputElementCodec": { + "description": "The codec to use for interpreting an element in the input PTable.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } }, "originalCombineValuesInputStoreName": { "description": "If this instruction includes a combining function this is the name of the\nintermediate store between the GBK and the CombineValues.", @@ -2572,13 +2873,15 @@ "type": "string" }, "input": { - "description": "Describes the input to the partial group-by-key instruction.", - "$ref": "InstructionInput" + "$ref": "InstructionInput", + "description": "Describes the input to the partial group-by-key instruction." } }, "id": "PartialGroupByKeyInstruction" }, "InstructionInput": { + "description": "An input of an instruction, as a reference to an output of a\nproducer instruction.", + "type": "object", "properties": { "producerInstructionIndex": { "format": "int32", @@ -2591,14 +2894,20 @@ "type": "integer" } }, - "id": "InstructionInput", - "description": "An input of an instruction, as a reference to an output of a\nproducer instruction.", - "type": "object" + "id": "InstructionInput" }, "StageSource": { "description": "Description of an input or output of an execution stage.", "type": "object", "properties": { + "userName": { + "description": "Human-readable name for this source; may be user or system generated.", + "type": "string" + }, + "originalTransformOrCollection": { + "description": "User name for the original user transform or collection with which this\nsource is most closely associated.", + "type": "string" + }, "sizeBytes": { "format": "int64", "description": "Size of the source, if measurable.", @@ -2607,14 +2916,6 @@ "name": { "description": "Dataflow service generated name for this source.", "type": "string" - }, - "userName": { - "description": "Human-readable name for this source; may be user or system generated.", - "type": "string" - }, - "originalTransformOrCollection": { - "description": "User name for the original user transform or collection with which this\nsource is most closely associated.", - "type": "string" } }, "id": "StageSource" @@ -2634,6 +2935,7 @@ "id": "StringList" }, "DisplayData": { + "description": "Data provided with a pipeline or transform to provide descriptive info.", "type": "object", "properties": { "timestampValue": { @@ -2641,28 +2943,28 @@ "description": "Contains value if the data is of timestamp type.", "type": "string" }, - "boolValue": { - "description": "Contains value if the data is of a boolean type.", - "type": "boolean" - }, "javaClassValue": { "description": "Contains value if the data is of java class type.", "type": "string" }, + "boolValue": { + "description": "Contains value if the data is of a boolean type.", + "type": "boolean" + }, "strValue": { "description": "Contains value if the data is of string type.", "type": "string" }, - "durationValue": { - "format": "google-duration", - "description": "Contains value if the data is of duration type.", - "type": "string" - }, "int64Value": { "format": "int64", "description": "Contains value if the data is of int64 type.", "type": "string" }, + "durationValue": { + "format": "google-duration", + "description": "Contains value if the data is of duration type.", + "type": "string" + }, "namespace": { "description": "The namespace for the key. This is usually a class name or programming\nlanguage namespace (i.e. python module) which defines the display data.\nThis allows a dax monitoring system to specially handle the data\nand perform custom rendering.", "type": "string" @@ -2680,33 +2982,32 @@ "description": "A possible additional shorter value to display.\nFor example a java_class_name_value of com.mypackage.MyDoFn\nwill be stored with MyDoFn as the short_str_value and\ncom.mypackage.MyDoFn as the java_class_name value.\nshort_str_value can be displayed and java_class_name_value\nwill be displayed as a tooltip.", "type": "string" }, - "url": { - "description": "An optional full URL.", - "type": "string" - }, "label": { "description": "An optional label to display in a dax UI for the element.", "type": "string" + }, + "url": { + "description": "An optional full URL.", + "type": "string" } }, - "id": "DisplayData", - "description": "Data provided with a pipeline or transform to provide descriptive info." + "id": "DisplayData" }, "LeaseWorkItemRequest": { "description": "Request to lease WorkItems.", "type": "object", "properties": { - "workerCapabilities": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Worker capabilities. WorkItems might be limited to workers with specific\ncapabilities." - }, "workerId": { "description": "Identifies the worker leasing work -- typically the ID of the\nvirtual machine running the worker.", "type": "string" }, + "workerCapabilities": { + "description": "Worker capabilities. WorkItems might be limited to workers with specific\ncapabilities.", + "items": { + "type": "string" + }, + "type": "array" + }, "requestedLeaseDuration": { "format": "google-duration", "description": "The initial lease period.", @@ -2717,16 +3018,16 @@ "description": "The current timestamp at the worker.", "type": "string" }, + "location": { + "description": "The location which contains the WorkItem's job.", + "type": "string" + }, "workItemTypes": { "description": "Filter for WorkItem type.", "items": { "type": "string" }, "type": "array" - }, - "location": { - "description": "The location which contains the WorkItem's job.", - "type": "string" } }, "id": "LeaseWorkItemRequest" @@ -2751,19 +3052,19 @@ "id": "GetDebugConfigRequest" }, "GetTemplateResponse": { + "description": "The response to a GetTemplate request.", "type": "object", "properties": { "metadata": { - "description": "The template metadata describing the template name, available\nparameters, etc.", - "$ref": "TemplateMetadata" + "$ref": "TemplateMetadata", + "description": "The template metadata describing the template name, available\nparameters, etc." }, "status": { - "description": "The status of the get template request. Any problems with the\nrequest will be indicated in the error_details.", - "$ref": "Status" + "$ref": "Status", + "description": "The status of the get template request. Any problems with the\nrequest will be indicated in the error_details." } }, - "id": "GetTemplateResponse", - "description": "The response to a GetTemplate request." + "id": "GetTemplateResponse" }, "Parameter": { "description": "Structured data associated with this message.", @@ -2798,17 +3099,16 @@ "type": "string" }, "workItemStatuses": { + "description": "The order is unimportant, except that the order of the\nWorkItemServiceState messages in the ReportWorkItemStatusResponse\ncorresponds to the order of WorkItemStatus messages here.", "items": { "$ref": "WorkItemStatus" }, - "type": "array", - "description": "The order is unimportant, except that the order of the\nWorkItemServiceState messages in the ReportWorkItemStatusResponse\ncorresponds to the order of WorkItemStatus messages here." + "type": "array" } }, "id": "ReportWorkItemStatusRequest" }, "PipelineDescription": { - "id": "PipelineDescription", "description": "A descriptive representation of submitted pipeline as well as the executed\nform. This data is provided by the Dataflow service for ease of visualizing\nthe pipeline and interpretting Dataflow provided metrics.", "type": "object", "properties": { @@ -2833,17 +3133,13 @@ }, "type": "array" } - } + }, + "id": "PipelineDescription" }, "StreamingConfigTask": { "description": "A task that carries configuration information for streaming computations.", "type": "object", "properties": { - "windmillServicePort": { - "format": "int64", - "description": "If present, the worker must use this port to communicate with Windmill\nService dispatchers. Only applicable when windmill_service_endpoint is\nspecified.", - "type": "string" - }, "streamingComputationConfigs": { "description": "Set of computation configuration information.", "items": { @@ -2852,20 +3148,27 @@ "type": "array" }, "windmillServiceEndpoint": { - "type": "string", - "description": "If present, the worker must use this endpoint to communicate with Windmill\nService dispatchers, otherwise the worker must continue to use whatever\nendpoint it had been using." + "description": "If present, the worker must use this endpoint to communicate with Windmill\nService dispatchers, otherwise the worker must continue to use whatever\nendpoint it had been using.", + "type": "string" }, "userStepToStateFamilyNameMap": { + "description": "Map from user step names to state families.", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "Map from user step names to state families.", - "type": "object" + } + }, + "windmillServicePort": { + "format": "int64", + "description": "If present, the worker must use this port to communicate with Windmill\nService dispatchers. Only applicable when windmill_service_endpoint is\nspecified.", + "type": "string" } }, "id": "StreamingConfigTask" }, "JobExecutionInfo": { + "description": "Additional information about how a Cloud Dataflow job will be executed that\nisn't contained in the submitted job.", + "type": "object", "properties": { "stages": { "additionalProperties": { @@ -2875,29 +3178,27 @@ "type": "object" } }, - "id": "JobExecutionInfo", - "description": "Additional information about how a Cloud Dataflow job will be executed that\nisn't contained in the submitted job.", - "type": "object" + "id": "JobExecutionInfo" }, "Step": { "description": "Defines a particular step within a Cloud Dataflow job.\n\nA job consists of multiple steps, each of which performs some\nspecific operation as part of the overall job. Data is typically\npassed from one step to another as part of the job.\n\nHere's an example of a sequence of steps which together implement a\nMap-Reduce job:\n\n * Read a collection of data from some source, parsing the\n collection's elements.\n\n * Validate the elements.\n\n * Apply a user-defined function to map each element to some value\n and extract an element-specific key value.\n\n * Group elements with the same key into a single element with\n that key, transforming a multiply-keyed collection into a\n uniquely-keyed collection.\n\n * Write the elements out to some data sink.\n\nNote that the Cloud Dataflow service may be used to run many different\ntypes of jobs, not just Map-Reduce.", "type": "object", "properties": { - "properties": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "Named properties associated with the step. Each kind of\npredefined step has its own required set of properties.\nMust be provided on Create. Only retrieved with JOB_VIEW_ALL." - }, "name": { - "type": "string", - "description": "The name that identifies the step. This must be unique for each\nstep with respect to all other steps in the Cloud Dataflow job." + "description": "The name that identifies the step. This must be unique for each\nstep with respect to all other steps in the Cloud Dataflow job.", + "type": "string" }, "kind": { "description": "The kind of step in the Cloud Dataflow job.", "type": "string" + }, + "properties": { + "description": "Named properties associated with the step. Each kind of\npredefined step has its own required set of properties.\nMust be provided on Create. Only retrieved with JOB_VIEW_ALL.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + } } }, "id": "Step" @@ -2917,10 +3218,6 @@ "description": "Describes the data disk used by a workflow job.", "type": "object", "properties": { - "mountPoint": { - "type": "string", - "description": "Directory in a VM where disk is mounted." - }, "diskType": { "description": "Disk storage type, as defined by Google Compute Engine. This\nmust be a disk type appropriate to the project and zone in which\nthe workers will run. If unknown or unspecified, the service\nwill attempt to choose a reasonable default.\n\nFor example, the standard persistent disk type is a resource name\ntypically ending in \"pd-standard\". If SSD persistent disks are\navailable, the resource name typically ends with \"pd-ssd\". The\nactual valid values are defined the Google Compute Engine API,\nnot by the Cloud Dataflow API; consult the Google Compute Engine\ndocumentation for more information about determining the set of\navailable disk types for a particular project and zone.\n\nGoogle Compute Engine Disk types are local to a particular\nproject in a particular zone, and so the resource name will\ntypically look something like this:\n\ncompute.googleapis.com/projects/project-id/zones/zone/diskTypes/pd-standard", "type": "string" @@ -2929,19 +3226,23 @@ "format": "int32", "description": "Size of disk in GB. If zero or unspecified, the service will\nattempt to choose a reasonable default.", "type": "integer" + }, + "mountPoint": { + "description": "Directory in a VM where disk is mounted.", + "type": "string" } }, "id": "Disk" }, "CounterMetadata": { + "description": "CounterMetadata includes all static non-name non-value counter attributes.", + "type": "object", "properties": { "description": { "description": "Human-readable description of the counter semantics.", "type": "string" }, "kind": { - "description": "Counter aggregation kind.", - "type": "string", "enumDescriptions": [ "Counter aggregation kind was not set.", "Aggregated value is the sum of all contributed values.", @@ -2963,19 +3264,11 @@ "AND", "SET", "DISTRIBUTION" - ] + ], + "description": "Counter aggregation kind.", + "type": "string" }, "standardUnits": { - "enum": [ - "BYTES", - "BYTES_PER_SEC", - "MILLISECONDS", - "MICROSECONDS", - "NANOSECONDS", - "TIMESTAMP_MSEC", - "TIMESTAMP_USEC", - "TIMESTAMP_NSEC" - ], "description": "System defined Units, see above enum.", "type": "string", "enumDescriptions": [ @@ -2987,6 +3280,16 @@ "Counter returns a timestamp in milliseconds.", "Counter returns a timestamp in microseconds.", "Counter returns a timestamp in nanoseconds." + ], + "enum": [ + "BYTES", + "BYTES_PER_SEC", + "MILLISECONDS", + "MICROSECONDS", + "NANOSECONDS", + "TIMESTAMP_MSEC", + "TIMESTAMP_USEC", + "TIMESTAMP_NSEC" ] }, "otherUnits": { @@ -2994,16 +3297,12 @@ "type": "string" } }, - "id": "CounterMetadata", - "description": "CounterMetadata includes all static non-name non-value counter attributes.", - "type": "object" + "id": "CounterMetadata" }, "ListJobMessagesResponse": { + "description": "Response to a request to list job messages.", + "type": "object", "properties": { - "nextPageToken": { - "description": "The token to obtain the next page of results if there are more.", - "type": "string" - }, "autoscalingEvents": { "description": "Autoscaling events in ascending timestamp order.", "items": { @@ -3017,32 +3316,34 @@ "$ref": "JobMessage" }, "type": "array" + }, + "nextPageToken": { + "description": "The token to obtain the next page of results if there are more.", + "type": "string" } }, - "id": "ListJobMessagesResponse", - "description": "Response to a request to list job messages.", - "type": "object" + "id": "ListJobMessagesResponse" }, "ApproximateReportedProgress": { "description": "A progress measurement of a WorkItem by a worker.", "type": "object", "properties": { - "position": { - "description": "A Position within the work to represent a progress.", - "$ref": "Position" - }, - "fractionConsumed": { - "type": "number", - "format": "double", - "description": "Completion as fraction of the input consumed, from 0.0 (beginning, nothing\nconsumed), to 1.0 (end of the input, entire input consumed)." - }, "consumedParallelism": { - "$ref": "ReportedParallelism", - "description": "Total amount of parallelism in the portion of input of this task that has\nalready been consumed and is no longer active. In the first two examples\nabove (see remaining_parallelism), the value should be 29 or 2\nrespectively. The sum of remaining_parallelism and consumed_parallelism\nshould equal the total amount of parallelism in this work item. If\nspecified, must be finite." + "description": "Total amount of parallelism in the portion of input of this task that has\nalready been consumed and is no longer active. In the first two examples\nabove (see remaining_parallelism), the value should be 29 or 2\nrespectively. The sum of remaining_parallelism and consumed_parallelism\nshould equal the total amount of parallelism in this work item. If\nspecified, must be finite.", + "$ref": "ReportedParallelism" }, "remainingParallelism": { - "$ref": "ReportedParallelism", - "description": "Total amount of parallelism in the input of this task that remains,\n(i.e. can be delegated to this task and any new tasks via dynamic\nsplitting). Always at least 1 for non-finished work items and 0 for\nfinished.\n\n\"Amount of parallelism\" refers to how many non-empty parts of the input\ncan be read in parallel. This does not necessarily equal number\nof records. An input that can be read in parallel down to the\nindividual records is called \"perfectly splittable\".\nAn example of non-perfectly parallelizable input is a block-compressed\nfile format where a block of records has to be read as a whole,\nbut different blocks can be read in parallel.\n\nExamples:\n* If we are processing record #30 (starting at 1) out of 50 in a perfectly\n splittable 50-record input, this value should be 21 (20 remaining + 1\n current).\n* If we are reading through block 3 in a block-compressed file consisting\n of 5 blocks, this value should be 3 (since blocks 4 and 5 can be\n processed in parallel by new tasks via dynamic splitting and the current\n task remains processing block 3).\n* If we are reading through the last block in a block-compressed file,\n or reading or processing the last record in a perfectly splittable\n input, this value should be 1, because apart from the current task, no\n additional remainder can be split off." + "description": "Total amount of parallelism in the input of this task that remains,\n(i.e. can be delegated to this task and any new tasks via dynamic\nsplitting). Always at least 1 for non-finished work items and 0 for\nfinished.\n\n\"Amount of parallelism\" refers to how many non-empty parts of the input\ncan be read in parallel. This does not necessarily equal number\nof records. An input that can be read in parallel down to the\nindividual records is called \"perfectly splittable\".\nAn example of non-perfectly parallelizable input is a block-compressed\nfile format where a block of records has to be read as a whole,\nbut different blocks can be read in parallel.\n\nExamples:\n* If we are processing record #30 (starting at 1) out of 50 in a perfectly\n splittable 50-record input, this value should be 21 (20 remaining + 1\n current).\n* If we are reading through block 3 in a block-compressed file consisting\n of 5 blocks, this value should be 3 (since blocks 4 and 5 can be\n processed in parallel by new tasks via dynamic splitting and the current\n task remains processing block 3).\n* If we are reading through the last block in a block-compressed file,\n or reading or processing the last record in a perfectly splittable\n input, this value should be 1, because apart from the current task, no\n additional remainder can be split off.", + "$ref": "ReportedParallelism" + }, + "position": { + "$ref": "Position", + "description": "A Position within the work to represent a progress." + }, + "fractionConsumed": { + "format": "double", + "description": "Completion as fraction of the input consumed, from 0.0 (beginning, nothing\nconsumed), to 1.0 (end of the input, entire input consumed).", + "type": "number" } }, "id": "ApproximateReportedProgress" @@ -3052,16 +3353,18 @@ "type": "object", "properties": { "elements": { + "description": "Elements of the list.", "items": { "$ref": "SplitInt64" }, - "type": "array", - "description": "Elements of the list." + "type": "array" } }, "id": "IntegerList" }, "StateFamilyConfig": { + "description": "State family configuration.", + "type": "object", "properties": { "stateFamily": { "description": "The state family value.", @@ -3072,34 +3375,18 @@ "type": "boolean" } }, - "id": "StateFamilyConfig", - "description": "State family configuration.", - "type": "object" + "id": "StateFamilyConfig" }, "ResourceUtilizationReportResponse": { + "description": "Service-side response to WorkerMessage reporting resource utilization.", "type": "object", "properties": {}, - "id": "ResourceUtilizationReportResponse", - "description": "Service-side response to WorkerMessage reporting resource utilization." + "id": "ResourceUtilizationReportResponse" }, "SourceSplitResponse": { "description": "The response to a SourceSplitRequest.", "type": "object", "properties": { - "bundles": { - "items": { - "$ref": "DerivedSource" - }, - "type": "array", - "description": "If outcome is SPLITTING_HAPPENED, then this is a list of bundles\ninto which the source was split. Otherwise this field is ignored.\nThis list can be empty, which means the source represents an empty input." - }, - "shards": { - "description": "DEPRECATED in favor of bundles.", - "items": { - "$ref": "SourceSplitShard" - }, - "type": "array" - }, "outcome": { "enumDescriptions": [ "The source split outcome is unknown, or unspecified.", @@ -3113,6 +3400,20 @@ ], "description": "Indicates whether splitting happened and produced a list of bundles.\nIf this is USE_CURRENT_SOURCE_AS_IS, the current source should\nbe processed \"as is\" without splitting. \"bundles\" is ignored in this case.\nIf this is SPLITTING_HAPPENED, then \"bundles\" contains a list of\nbundles into which the source was split.", "type": "string" + }, + "bundles": { + "description": "If outcome is SPLITTING_HAPPENED, then this is a list of bundles\ninto which the source was split. Otherwise this field is ignored.\nThis list can be empty, which means the source represents an empty input.", + "items": { + "$ref": "DerivedSource" + }, + "type": "array" + }, + "shards": { + "description": "DEPRECATED in favor of bundles.", + "items": { + "$ref": "SourceSplitShard" + }, + "type": "array" } }, "id": "SourceSplitResponse" @@ -3121,6 +3422,22 @@ "description": "Describes a particular operation comprising a MapTask.", "type": "object", "properties": { + "flatten": { + "$ref": "FlattenInstruction", + "description": "Additional information for Flatten instructions." + }, + "originalName": { + "description": "System-defined name for the operation in the original workflow graph.", + "type": "string" + }, + "systemName": { + "description": "System-defined name of this operation.\nUnique across the workflow.", + "type": "string" + }, + "write": { + "description": "Additional information for Write instructions.", + "$ref": "WriteInstruction" + }, "partialGroupByKey": { "$ref": "PartialGroupByKeyInstruction", "description": "Additional information for PartialGroupByKey instructions." @@ -3137,52 +3454,19 @@ "type": "string" }, "parDo": { - "$ref": "ParDoInstruction", - "description": "Additional information for ParDo instructions." + "description": "Additional information for ParDo instructions.", + "$ref": "ParDoInstruction" }, "read": { - "$ref": "ReadInstruction", - "description": "Additional information for Read instructions." - }, - "flatten": { - "$ref": "FlattenInstruction", - "description": "Additional information for Flatten instructions." - }, - "originalName": { - "description": "System-defined name for the operation in the original workflow graph.", - "type": "string" - }, - "systemName": { - "description": "System-defined name of this operation.\nUnique across the workflow.", - "type": "string" - }, - "write": { - "$ref": "WriteInstruction", - "description": "Additional information for Write instructions." + "description": "Additional information for Read instructions.", + "$ref": "ReadInstruction" } }, "id": "ParallelInstruction" }, - "KeyRangeDataDiskAssignment": { - "description": "Data disk assignment information for a specific key-range of a sharded\ncomputation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", - "type": "object", - "properties": { - "dataDisk": { - "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", - "type": "string" - }, - "start": { - "description": "The start (inclusive) of the key range.", - "type": "string" - }, - "end": { - "description": "The end (exclusive) of the key range.", - "type": "string" - } - }, - "id": "KeyRangeDataDiskAssignment" - }, "Package": { + "description": "The packages that must be installed in order for a worker to run the\nsteps of the Cloud Dataflow job that will be assigned to its worker\npool.\n\nThis is the mechanism by which the Cloud Dataflow SDK causes code to\nbe loaded onto the workers. For example, the Cloud Dataflow Java SDK\nmight use this to install jars containing the user's code and all of the\nvarious dependencies (libraries, data files, etc.) required in order\nfor that code to run.", + "type": "object", "properties": { "location": { "description": "The resource to read the package from. The supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}\n bucket.storage.googleapis.com/", @@ -3193,21 +3477,31 @@ "type": "string" } }, - "id": "Package", - "description": "The packages that must be installed in order for a worker to run the\nsteps of the Cloud Dataflow job that will be assigned to its worker\npool.\n\nThis is the mechanism by which the Cloud Dataflow SDK causes code to\nbe loaded onto the workers. For example, the Cloud Dataflow Java SDK\nmight use this to install jars containing the user's code and all of the\nvarious dependencies (libraries, data files, etc.) required in order\nfor that code to run.", - "type": "object" + "id": "Package" + }, + "KeyRangeDataDiskAssignment": { + "description": "Data disk assignment information for a specific key-range of a sharded\ncomputation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", + "type": "object", + "properties": { + "end": { + "description": "The end (exclusive) of the key range.", + "type": "string" + }, + "dataDisk": { + "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", + "type": "string" + }, + "start": { + "description": "The start (inclusive) of the key range.", + "type": "string" + } + }, + "id": "KeyRangeDataDiskAssignment" }, "ParDoInstruction": { "description": "An instruction that does a ParDo operation.\nTakes one main input and zero or more side inputs, and produces\nzero or more outputs.\nRuns user code.", "type": "object", "properties": { - "sideInputs": { - "description": "Zero or more side inputs.", - "items": { - "$ref": "SideInputInfo" - }, - "type": "array" - }, "multiOutputInfos": { "description": "Information about each of the outputs, if user_fn is a MultiDoFn.", "items": { @@ -3216,88 +3510,69 @@ "type": "array" }, "userFn": { - "description": "The user function to invoke.", - "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - } + }, + "description": "The user function to invoke.", + "type": "object" }, "input": { - "$ref": "InstructionInput", - "description": "The input." + "description": "The input.", + "$ref": "InstructionInput" }, "numOutputs": { "format": "int32", "description": "The number of outputs.", "type": "integer" + }, + "sideInputs": { + "description": "Zero or more side inputs.", + "items": { + "$ref": "SideInputInfo" + }, + "type": "array" } }, "id": "ParDoInstruction" }, - "MetricUpdate": { - "description": "Describes the state of a metric.", - "type": "object", - "properties": { - "meanSum": { - "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the sum of the aggregated values and is used in combination\nwith mean_count below to obtain the actual mean aggregate value.\nThe only possible value types are Long and Double.", - "type": "any" - }, - "updateTime": { - "format": "google-datetime", - "description": "Timestamp associated with the metric value. Optional when workers are\nreporting work progress; it will be filled in responses from the\nmetrics API.", - "type": "string" - }, - "name": { - "description": "Name of the metric.", - "$ref": "MetricStructuredName" - }, - "distribution": { - "description": "A struct value describing properties of a distribution of numeric values.", - "type": "any" - }, - "set": { - "description": "Worker-computed aggregate value for the \"Set\" aggregation kind. The only\npossible value type is a list of Values whose type can be Long, Double,\nor String, according to the metric's type. All Values in the list must\nbe of the same type.", - "type": "any" - }, - "internal": { - "description": "Worker-computed aggregate value for internal use by the Dataflow\nservice.", - "type": "any" - }, - "cumulative": { - "description": "True if this metric is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this metric is reported\nas a delta that is not associated with any WorkItem.", - "type": "boolean" - }, - "kind": { - "description": "Metric aggregation kind. The possible metric aggregation kinds are\n\"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", \"Or\", and \"Distribution\".\nThe specified aggregation kind is case-insensitive.\n\nIf omitted, this is not an aggregated value but instead\na single metric sample value.", - "type": "string" - }, - "scalar": { - "description": "Worker-computed aggregate value for aggregation kinds \"Sum\", \"Max\", \"Min\",\n\"And\", and \"Or\". The possible value types are Long, Double, and Boolean.", - "type": "any" - }, - "meanCount": { - "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the count of the aggregated values and is used in combination\nwith mean_sum above to obtain the actual mean aggregate value.\nThe only possible value type is Long.", - "type": "any" - } - }, - "id": "MetricUpdate" - }, "CounterStructuredName": { "description": "Identifies a counter within a per-job namespace. Counters whose structured\nnames are the same get merged into a single value for the job.", "type": "object", "properties": { + "portion": { + "enumDescriptions": [ + "Counter portion has not been set.", + "Counter reports a key.", + "Counter reports a value." + ], + "enum": [ + "ALL", + "KEY", + "VALUE" + ], + "description": "Portion of this counter, either key or value.", + "type": "string" + }, + "originalShuffleStepName": { + "description": "The GroupByKey step name from the original graph.", + "type": "string" + }, + "originalStepName": { + "description": "System generated name of the original step in the user's graph, before\noptimization.", + "type": "string" + }, "workerId": { "description": "ID of a particular worker.", "type": "string" }, "originNamespace": { - "type": "string", - "description": "A string containing a more specific namespace of the counter's origin." + "description": "A string containing a more specific namespace of the counter's origin.", + "type": "string" }, "sideInput": { - "description": "ID of a side input being read from/written to. Side inputs are identified\nby a pair of (reader, input_index). The reader is usually equal to the\noriginal name, but it may be different, if a ParDo emits it's Iterator /\nMap side input object.", - "$ref": "SideInputId" + "$ref": "SideInputId", + "description": "ID of a side input being read from/written to. Side inputs are identified\nby a pair of (reader, input_index). The reader is usually equal to the\noriginal name, but it may be different, if a ParDo emits it's Iterator /\nMap side input object." }, "name": { "description": "Counter name. Not necessarily globally-unique, but unique within the\ncontext of the other fields.\nRequired.", @@ -3322,28 +3597,6 @@ "componentStepName": { "description": "Name of the optimized step being executed by the workers.", "type": "string" - }, - "portion": { - "enumDescriptions": [ - "Counter portion has not been set.", - "Counter reports a key.", - "Counter reports a value." - ], - "enum": [ - "ALL", - "KEY", - "VALUE" - ], - "description": "Portion of this counter, either key or value.", - "type": "string" - }, - "originalShuffleStepName": { - "description": "The GroupByKey step name from the original graph.", - "type": "string" - }, - "originalStepName": { - "description": "System generated name of the original step in the user's graph, before\noptimization.", - "type": "string" } }, "id": "CounterStructuredName" @@ -3353,28 +3606,76 @@ "type": "object", "properties": { "reason": { - "description": "Optional reason to be attached for the shutdown notice.\nFor example: \"PREEMPTION\" would indicate the VM is being shut down because\nof preemption. Other possible reasons may be added in the future.", + "description": "The reason for the worker shutdown.\nCurrent possible values are:\n \"UNKNOWN\": shutdown reason is unknown.\n \"PREEMPTION\": shutdown reason is preemption.\nOther possible reasons may be added in the future.\nNote that this must match the names of the enum specified in\ngoogle3/cloud/dataflow/router/protos/cloud_worker_messages_service.proto.", "type": "string" } }, "id": "WorkerShutdownNotice" }, + "MetricUpdate": { + "description": "Describes the state of a metric.", + "type": "object", + "properties": { + "kind": { + "description": "Metric aggregation kind. The possible metric aggregation kinds are\n\"Sum\", \"Max\", \"Min\", \"Mean\", \"Set\", \"And\", \"Or\", and \"Distribution\".\nThe specified aggregation kind is case-insensitive.\n\nIf omitted, this is not an aggregated value but instead\na single metric sample value.", + "type": "string" + }, + "scalar": { + "description": "Worker-computed aggregate value for aggregation kinds \"Sum\", \"Max\", \"Min\",\n\"And\", and \"Or\". The possible value types are Long, Double, and Boolean.", + "type": "any" + }, + "meanCount": { + "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the count of the aggregated values and is used in combination\nwith mean_sum above to obtain the actual mean aggregate value.\nThe only possible value type is Long.", + "type": "any" + }, + "meanSum": { + "description": "Worker-computed aggregate value for the \"Mean\" aggregation kind.\nThis holds the sum of the aggregated values and is used in combination\nwith mean_count below to obtain the actual mean aggregate value.\nThe only possible value types are Long and Double.", + "type": "any" + }, + "updateTime": { + "format": "google-datetime", + "description": "Timestamp associated with the metric value. Optional when workers are\nreporting work progress; it will be filled in responses from the\nmetrics API.", + "type": "string" + }, + "name": { + "$ref": "MetricStructuredName", + "description": "Name of the metric." + }, + "distribution": { + "description": "A struct value describing properties of a distribution of numeric values.", + "type": "any" + }, + "set": { + "description": "Worker-computed aggregate value for the \"Set\" aggregation kind. The only\npossible value type is a list of Values whose type can be Long, Double,\nor String, according to the metric's type. All Values in the list must\nbe of the same type.", + "type": "any" + }, + "internal": { + "description": "Worker-computed aggregate value for internal use by the Dataflow\nservice.", + "type": "any" + }, + "cumulative": { + "description": "True if this metric is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this metric is reported\nas a delta that is not associated with any WorkItem.", + "type": "boolean" + } + }, + "id": "MetricUpdate" + }, "ApproximateProgress": { "description": "Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest.", "type": "object", "properties": { - "position": { - "$ref": "Position", - "description": "Obsolete." - }, "percentComplete": { "format": "float", "description": "Obsolete.", "type": "number" }, "remainingTime": { - "type": "string", "format": "google-duration", + "description": "Obsolete.", + "type": "string" + }, + "position": { + "$ref": "Position", "description": "Obsolete." } }, @@ -3385,16 +3686,16 @@ "type": "object", "properties": { "workerShutdownNoticeResponse": { - "description": "Service's response to shutdown notice (currently empty).", - "$ref": "WorkerShutdownNoticeResponse" + "$ref": "WorkerShutdownNoticeResponse", + "description": "Service's response to shutdown notice (currently empty)." }, "workerMetricsResponse": { "$ref": "ResourceUtilizationReportResponse", "description": "Service's response to reporting worker metrics (currently empty)." }, "workerHealthReportResponse": { - "description": "The service's response to a worker's health report.", - "$ref": "WorkerHealthReportResponse" + "$ref": "WorkerHealthReportResponse", + "description": "The service's response to a worker's health report." } }, "id": "WorkerMessageResponse" @@ -3422,28 +3723,20 @@ "id": "TemplateMetadata" }, "WorkerMessage": { + "description": "WorkerMessage provides information to the backend about a worker.", "type": "object", "properties": { - "time": { - "format": "google-datetime", - "description": "The timestamp of the worker_message.", - "type": "string" - }, - "workerShutdownNotice": { - "description": "Shutdown notice by workers.", - "$ref": "WorkerShutdownNotice" - }, "workerHealthReport": { - "$ref": "WorkerHealthReport", - "description": "The health of a worker." + "description": "The health of a worker.", + "$ref": "WorkerHealthReport" }, "workerMessageCode": { "description": "A worker message code.", "$ref": "WorkerMessageCode" }, "workerMetrics": { - "$ref": "ResourceUtilizationReport", - "description": "Resource metrics reported by workers." + "description": "Resource metrics reported by workers.", + "$ref": "ResourceUtilizationReport" }, "labels": { "additionalProperties": { @@ -3451,10 +3744,18 @@ }, "description": "Labels are used to group WorkerMessages.\nFor example, a worker_message about a particular container\nmight have the labels:\n{ \"JOB_ID\": \"2015-04-22\",\n \"WORKER_ID\": \"wordcount-vm-2015…\"\n \"CONTAINER_TYPE\": \"worker\",\n \"CONTAINER_ID\": \"ac1234def\"}\nLabel tags typically correspond to Label enum values. However, for ease\nof development other strings can be used as tags. LABEL_UNSPECIFIED should\nnot be used here.", "type": "object" + }, + "time": { + "format": "google-datetime", + "description": "The timestamp of the worker_message.", + "type": "string" + }, + "workerShutdownNotice": { + "$ref": "WorkerShutdownNotice", + "description": "Shutdown notice by workers." } }, - "id": "WorkerMessage", - "description": "WorkerMessage provides information to the backend about a worker." + "id": "WorkerMessage" }, "JobMetrics": { "description": "JobMetrics contains a collection of metrics descibing the detailed progress\nof a Dataflow job. Metrics correspond to user-defined and system-defined\nmetrics in the job.\n\nThis resource captures only the most recent values of each metric;\ntime-series data can be queried for them (under the same metric names)\nfrom Cloud Monitoring.", @@ -3497,79 +3798,78 @@ "id": "FloatingPointList" }, "CounterUpdate": { - "id": "CounterUpdate", "description": "An update to a Counter sent from a worker.", "type": "object", "properties": { - "integer": { - "$ref": "SplitInt64", - "description": "Integer value for Sum, Max, Min." - }, - "structuredNameAndMetadata": { - "description": "Counter structured name and metadata.", - "$ref": "CounterStructuredNameAndMetadata" - }, - "integerList": { - "$ref": "IntegerList", - "description": "List of integers, for Set." - }, - "integerMean": { - "$ref": "IntegerMean", - "description": "Integer mean aggregation value for Mean." - }, - "floatingPoint": { - "format": "double", - "description": "Floating point value for Sum, Max, Min.", - "type": "number" - }, - "internal": { - "description": "Value for internally-defined counters used by the Dataflow service.", - "type": "any" - }, - "cumulative": { - "description": "True if this counter is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this counter is reported\nas a delta.", - "type": "boolean" - }, "floatingPointMean": { - "$ref": "FloatingPointMean", - "description": "Floating point mean aggregation value for Mean." + "description": "Floating point mean aggregation value for Mean.", + "$ref": "FloatingPointMean" }, "boolean": { "description": "Boolean value for And, Or.", "type": "boolean" }, "nameAndKind": { - "description": "Counter name and aggregation type.", - "$ref": "NameAndKind" + "$ref": "NameAndKind", + "description": "Counter name and aggregation type." + }, + "stringList": { + "description": "List of strings, for Set.", + "$ref": "StringList" }, "distribution": { "description": "Distribution data", "$ref": "DistributionUpdate" }, - "stringList": { - "$ref": "StringList", - "description": "List of strings, for Set." - }, "shortId": { "format": "int64", "description": "The service-generated short identifier for this counter.\nThe short_id -\u003e (name, metadata) mapping is constant for the lifetime of\na job.", "type": "string" }, "floatingPointList": { - "$ref": "FloatingPointList", - "description": "List of floating point numbers, for Set." + "description": "List of floating point numbers, for Set.", + "$ref": "FloatingPointList" + }, + "integer": { + "description": "Integer value for Sum, Max, Min.", + "$ref": "SplitInt64" + }, + "structuredNameAndMetadata": { + "$ref": "CounterStructuredNameAndMetadata", + "description": "Counter structured name and metadata." + }, + "integerList": { + "$ref": "IntegerList", + "description": "List of integers, for Set." + }, + "integerMean": { + "description": "Integer mean aggregation value for Mean.", + "$ref": "IntegerMean" + }, + "floatingPoint": { + "format": "double", + "description": "Floating point value for Sum, Max, Min.", + "type": "number" + }, + "cumulative": { + "description": "True if this counter is reported as the total cumulative aggregate\nvalue accumulated since the worker started working on this WorkItem.\nBy default this is false, indicating that this counter is reported\nas a delta.", + "type": "boolean" + }, + "internal": { + "description": "Value for internally-defined counters used by the Dataflow service.", + "type": "any" } - } + }, + "id": "CounterUpdate" }, "SourceMetadata": { - "id": "SourceMetadata", "description": "Metadata about a Source useful for automatically optimizing\nand tuning the pipeline, etc.", "type": "object", "properties": { "estimatedSizeBytes": { - "type": "string", "format": "int64", - "description": "An estimate of the total size (in bytes) of the data that would be\nread from this source. This estimate is in terms of external storage\nsize, before any decompression or other processing done by the reader." + "description": "An estimate of the total size (in bytes) of the data that would be\nread from this source. This estimate is in terms of external storage\nsize, before any decompression or other processing done by the reader.", + "type": "string" }, "infinite": { "description": "Specifies that the size of this source is known to be infinite\n(this is a streaming source).", @@ -3579,7 +3879,8 @@ "description": "Whether this source is known to produce key/value pairs with\nthe (encoded) keys in lexicographically sorted order.", "type": "boolean" } - } + }, + "id": "SourceMetadata" }, "DistributionUpdate": { "description": "A metric value representing a distribution.", @@ -3589,14 +3890,14 @@ "$ref": "SplitInt64", "description": "The count of the number of elements present in the distribution." }, - "sumOfSquares": { - "type": "number", - "format": "double", - "description": "Use a double since the sum of squares is likely to overflow int64." - }, "min": { - "$ref": "SplitInt64", - "description": "The minimum value present in the distribution." + "description": "The minimum value present in the distribution.", + "$ref": "SplitInt64" + }, + "sumOfSquares": { + "format": "double", + "description": "Use a double since the sum of squares is likely to overflow int64.", + "type": "number" }, "sum": { "$ref": "SplitInt64", @@ -3605,10 +3906,37 @@ "max": { "description": "The maximum value present in the distribution.", "$ref": "SplitInt64" + }, + "histogram": { + "description": "(Optional) Histogram of value counts for the distribution.", + "$ref": "Histogram" } }, "id": "DistributionUpdate" }, + "SourceFork": { + "description": "DEPRECATED in favor of DynamicSourceSplit.", + "type": "object", + "properties": { + "residual": { + "description": "DEPRECATED", + "$ref": "SourceSplitShard" + }, + "residualSource": { + "$ref": "DerivedSource", + "description": "DEPRECATED" + }, + "primary": { + "$ref": "SourceSplitShard", + "description": "DEPRECATED" + }, + "primarySource": { + "$ref": "DerivedSource", + "description": "DEPRECATED" + } + }, + "id": "SourceFork" + }, "WorkerHealthReportResponse": { "description": "WorkerHealthReportResponse contains information returned to the worker\nin response to a health ping.", "type": "object", @@ -3621,37 +3949,10 @@ }, "id": "WorkerHealthReportResponse" }, - "SourceFork": { - "description": "DEPRECATED in favor of DynamicSourceSplit.", - "type": "object", - "properties": { - "residual": { - "$ref": "SourceSplitShard", - "description": "DEPRECATED" - }, - "residualSource": { - "description": "DEPRECATED", - "$ref": "DerivedSource" - }, - "primary": { - "$ref": "SourceSplitShard", - "description": "DEPRECATED" - }, - "primarySource": { - "$ref": "DerivedSource", - "description": "DEPRECATED" - } - }, - "id": "SourceFork" - }, "WorkItemStatus": { "description": "Conveys a worker's progress through the work described by a WorkItem.", "type": "object", "properties": { - "stopPosition": { - "$ref": "Position", - "description": "A worker may split an active map task in two parts, \"primary\" and\n\"residual\", continuing to process the primary part and returning the\nresidual part into the pool of available work.\nThis event is called a \"dynamic split\" and is critical to the dynamic\nwork rebalancing feature. The two obtained sub-tasks are called\n\"parts\" of the split.\nThe parts, if concatenated, must represent the same input as would\nbe read by the current task if the split did not happen.\nThe exact way in which the original task is decomposed into the two\nparts is specified either as a position demarcating them\n(stop_position), or explicitly as two DerivedSources, if this\ntask consumes a user-defined source type (dynamic_source_split).\n\nThe \"current\" task is adjusted as a result of the split: after a task\nwith range [A, B) sends a stop_position update at C, its range is\nconsidered to be [A, C), e.g.:\n* Progress should be interpreted relative to the new range, e.g.\n \"75% completed\" means \"75% of [A, C) completed\"\n* The worker should interpret proposed_stop_position relative to the\n new range, e.g. \"split at 68%\" should be interpreted as\n \"split at 68% of [A, C)\".\n* If the worker chooses to split again using stop_position, only\n stop_positions in [A, C) will be accepted.\n* Etc.\ndynamic_source_split has similar semantics: e.g., if a task with\nsource S splits using dynamic_source_split into {P, R}\n(where P and R must be together equivalent to S), then subsequent\nprogress and proposed_stop_position should be interpreted relative\nto P, and in a potential subsequent dynamic_source_split into {P', R'},\nP' and R' must be together equivalent to P, etc." - }, "completed": { "description": "True if the WorkItem was completed (successfully or unsuccessfully).", "type": "boolean" @@ -3695,16 +3996,16 @@ "type": "array" }, "dynamicSourceSplit": { - "$ref": "DynamicSourceSplit", - "description": "See documentation of stop_position." + "description": "See documentation of stop_position.", + "$ref": "DynamicSourceSplit" }, "sourceOperationResponse": { "description": "If the work item represented a SourceOperationRequest, and the work\nis completed, contains the result of the operation.", "$ref": "SourceOperationResponse" }, "progress": { - "$ref": "ApproximateProgress", - "description": "DEPRECATED in favor of reported_progress." + "description": "DEPRECATED in favor of reported_progress.", + "$ref": "ApproximateProgress" }, "requestedLeaseDuration": { "format": "google-duration", @@ -3715,6 +4016,10 @@ "format": "int64", "description": "The report index. When a WorkItem is leased, the lease will\ncontain an initial report index. When a WorkItem's status is\nreported to the system, the report should be sent with\nthat report index, and the response will contain the index the\nworker should use for the next report. Reports received with\nunexpected index values will be rejected by the service.\n\nIn order to preserve idempotency, the worker should not alter the\ncontents of a report, even if the worker must submit the same\nreport multiple times before getting back a response. The worker\nshould not submit a subsequent report until the response for the\nprevious report had been received from the service.", "type": "string" + }, + "stopPosition": { + "description": "A worker may split an active map task in two parts, \"primary\" and\n\"residual\", continuing to process the primary part and returning the\nresidual part into the pool of available work.\nThis event is called a \"dynamic split\" and is critical to the dynamic\nwork rebalancing feature. The two obtained sub-tasks are called\n\"parts\" of the split.\nThe parts, if concatenated, must represent the same input as would\nbe read by the current task if the split did not happen.\nThe exact way in which the original task is decomposed into the two\nparts is specified either as a position demarcating them\n(stop_position), or explicitly as two DerivedSources, if this\ntask consumes a user-defined source type (dynamic_source_split).\n\nThe \"current\" task is adjusted as a result of the split: after a task\nwith range [A, B) sends a stop_position update at C, its range is\nconsidered to be [A, C), e.g.:\n* Progress should be interpreted relative to the new range, e.g.\n \"75% completed\" means \"75% of [A, C) completed\"\n* The worker should interpret proposed_stop_position relative to the\n new range, e.g. \"split at 68%\" should be interpreted as\n \"split at 68% of [A, C)\".\n* If the worker chooses to split again using stop_position, only\n stop_positions in [A, C) will be accepted.\n* Etc.\ndynamic_source_split has similar semantics: e.g., if a task with\nsource S splits using dynamic_source_split into {P, R}\n(where P and R must be together equivalent to S), then subsequent\nprogress and proposed_stop_position should be interpreted relative\nto P, and in a potential subsequent dynamic_source_split into {P', R'},\nP' and R' must be together equivalent to P, etc.", + "$ref": "Position" } }, "id": "WorkItemStatus" @@ -3723,49 +4028,61 @@ "description": "Description of an interstitial value between transforms in an execution\nstage.", "type": "object", "properties": { + "userName": { + "description": "Human-readable name for this transform; may be user or system generated.", + "type": "string" + }, "originalTransformOrCollection": { - "type": "string", - "description": "User name for the original user transform or collection with which this\nsource is most closely associated." + "description": "User name for the original user transform or collection with which this\nsource is most closely associated.", + "type": "string" }, "name": { "description": "Dataflow service generated name for this source.", "type": "string" - }, - "userName": { - "description": "Human-readable name for this transform; may be user or system generated.", - "type": "string" } }, "id": "ComponentSource" }, + "Histogram": { + "description": "Histogram of value counts for a distribution.\n\nBuckets have an inclusive lower bound and exclusive upper bound and use\n\"1,2,5 bucketing\": The first bucket range is from [0,1) and all subsequent\nbucket boundaries are powers of ten multiplied by 1, 2, or 5. Thus, bucket\nboundaries are 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, ...\nNegative values are not supported.", + "type": "object", + "properties": { + "firstBucketOffset": { + "format": "int32", + "description": "Starting index of first stored bucket. The non-inclusive upper-bound of\nthe ith bucket is given by:\n pow(10,(i-first_bucket_offset)/3) * (1,2,5)[(i-first_bucket_offset)%3]", + "type": "integer" + }, + "bucketCounts": { + "description": "Counts of values in each bucket. For efficiency, prefix and trailing\nbuckets with count = 0 are elided. Buckets can store the full range of\nvalues of an unsigned long, with ULLONG_MAX falling into the 59th bucket\nwith range [1e19, 2e19).", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "id": "Histogram" + }, "WorkItemServiceState": { "description": "The Dataflow service's idea of the current state of a WorkItem\nbeing processed by a worker.", "type": "object", "properties": { - "suggestedStopPoint": { - "description": "DEPRECATED in favor of split_request.", - "$ref": "ApproximateProgress" - }, - "splitRequest": { - "$ref": "ApproximateSplitRequest", - "description": "The progress point in the WorkItem where the Dataflow service\nsuggests that the worker truncate the task." - }, "suggestedStopPosition": { - "$ref": "Position", - "description": "Obsolete, always empty." + "description": "Obsolete, always empty.", + "$ref": "Position" }, "reportStatusInterval": { - "type": "string", "format": "google-duration", - "description": "New recommended reporting interval." + "description": "New recommended reporting interval.", + "type": "string" }, "harnessData": { + "description": "Other data returned by the service, specific to the particular\nworker harness.", "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "description": "Other data returned by the service, specific to the particular\nworker harness." + } }, "leaseExpireTime": { "format": "google-datetime", @@ -3783,6 +4100,14 @@ "format": "int64", "description": "The index value to use for the next report sent by the worker.\nNote: If the report call fails for whatever reason, the worker should\nreuse this index for subsequent report attempts.", "type": "string" + }, + "suggestedStopPoint": { + "description": "DEPRECATED in favor of split_request.", + "$ref": "ApproximateProgress" + }, + "splitRequest": { + "description": "The progress point in the WorkItem where the Dataflow service\nsuggests that the worker truncate the task.", + "$ref": "ApproximateSplitRequest" } }, "id": "WorkItemServiceState" @@ -3813,13 +4138,13 @@ "description": "Information about an output of a SeqMapTask.", "type": "object", "properties": { - "sink": { - "description": "The sink to write the output value to.", - "$ref": "Sink" - }, "tag": { "description": "The id of the TupleTag the user code will tag the output value by.", "type": "string" + }, + "sink": { + "description": "The sink to write the output value to.", + "$ref": "Sink" } }, "id": "SeqMapTaskOutputInfo" @@ -3842,14 +4167,6 @@ "description": "Location information for a specific key-range of a sharded computation.\nCurrently we only support UTF-8 character splits to simplify encoding into\nJSON.", "type": "object", "properties": { - "dataDisk": { - "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", - "type": "string" - }, - "start": { - "description": "The start (inclusive) of the key range.", - "type": "string" - }, "end": { "description": "The end (exclusive) of the key range.", "type": "string" @@ -3861,11 +4178,20 @@ "deliveryEndpoint": { "description": "The physical location of this range assignment to be used for\nstreaming computation cross-worker message delivery.", "type": "string" + }, + "dataDisk": { + "description": "The name of the data disk where data for this range is stored.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", + "type": "string" + }, + "start": { + "description": "The start (inclusive) of the key range.", + "type": "string" } }, "id": "KeyRangeLocation" }, "SourceGetMetadataRequest": { + "description": "A request to compute the SourceMetadata of a Source.", "type": "object", "properties": { "source": { @@ -3873,8 +4199,7 @@ "$ref": "Source" } }, - "id": "SourceGetMetadataRequest", - "description": "A request to compute the SourceMetadata of a Source." + "id": "SourceGetMetadataRequest" }, "NameAndKind": { "description": "Basic metadata about a counter.", @@ -3917,17 +4242,6 @@ "description": "Describes a particular function to invoke.", "type": "object", "properties": { - "name": { - "description": "The user-provided name of the SeqDo operation.", - "type": "string" - }, - "outputInfos": { - "description": "Information about each of the outputs.", - "items": { - "$ref": "SeqMapTaskOutputInfo" - }, - "type": "array" - }, "inputs": { "description": "Information about each of the inputs.", "items": { @@ -3936,8 +4250,8 @@ "type": "array" }, "stageName": { - "type": "string", - "description": "System-defined name of the stage containing the SeqDo operation.\nUnique across the workflow." + "description": "System-defined name of the stage containing the SeqDo operation.\nUnique across the workflow.", + "type": "string" }, "systemName": { "description": "System-defined name of the SeqDo operation.\nUnique across the workflow.", @@ -3950,18 +4264,31 @@ }, "description": "The user function to invoke.", "type": "object" + }, + "name": { + "description": "The user-provided name of the SeqDo operation.", + "type": "string" + }, + "outputInfos": { + "description": "Information about each of the outputs.", + "items": { + "$ref": "SeqMapTaskOutputInfo" + }, + "type": "array" } }, "id": "SeqMapTask" }, "WorkerMessageCode": { + "description": "A message code is used to report status and error messages to the service.\nThe message codes are intended to be machine readable. The service will\ntake care of translating these into user understandable messages if\nnecessary.\n\nExample use cases:\n 1. Worker processes reporting successful startup.\n 2. Worker processes reporting specific errors (e.g. package staging\n failure).", + "type": "object", "properties": { "parameters": { "description": "Parameters contains specific information about the code.\n\nThis is a struct to allow parameters of different types.\n\nExamples:\n 1. For a \"HARNESS_STARTED\" message parameters might provide the name\n of the worker and additional data like timing information.\n 2. For a \"GCS_DOWNLOAD_ERROR\" parameters might contain fields listing\n the GCS objects being downloaded and fields containing errors.\n\nIn general complex data structures should be avoided. If a worker\nneeds to send a specific and complicated data structure then please\nconsider defining a new proto and adding it to the data oneof in\nWorkerMessageResponse.\n\nConventions:\n Parameters should only be used for information that isn't typically passed\n as a label.\n hostname and other worker identifiers should almost always be passed\n as labels since they will be included on most messages.", "type": "object", "additionalProperties": { - "type": "any", - "description": "Properties of the object." + "description": "Properties of the object.", + "type": "any" } }, "code": { @@ -3969,9 +4296,7 @@ "type": "string" } }, - "id": "WorkerMessageCode", - "description": "A message code is used to report status and error messages to the service.\nThe message codes are intended to be machine readable. The service will\ntake care of translating these into user understandable messages if\nnecessary.\n\nExample use cases:\n 1. Worker processes reporting successful startup.\n 2. Worker processes reporting specific errors (e.g. package staging\n failure).", - "type": "object" + "id": "WorkerMessageCode" }, "CustomSourceLocation": { "description": "Identifies the location of a custom souce.", @@ -3985,6 +4310,7 @@ "id": "CustomSourceLocation" }, "MapTask": { + "description": "MapTask consists of an ordered set of instructions, each of which\ndescribes one particular low-level operation for the worker to\nperform in order to accomplish the MapTask's WorkItem.\n\nEach instruction must appear in the list before any instructions which\ndepends on its output.", "type": "object", "properties": { "stageName": { @@ -3992,8 +4318,8 @@ "type": "string" }, "systemName": { - "type": "string", - "description": "System-defined name of this MapTask.\nUnique across the workflow." + "description": "System-defined name of this MapTask.\nUnique across the workflow.", + "type": "string" }, "instructions": { "description": "The instructions in the MapTask.", @@ -4003,8 +4329,7 @@ "type": "array" } }, - "id": "MapTask", - "description": "MapTask consists of an ordered set of instructions, each of which\ndescribes one particular low-level operation for the worker to\nperform in order to accomplish the MapTask's WorkItem.\n\nEach instruction must appear in the list before any instructions which\ndepends on its output." + "id": "MapTask" }, "FloatingPointMean": { "description": "A representation of a floating point mean metric contribution.", @@ -4023,6 +4348,8 @@ "id": "FloatingPointMean" }, "ReportWorkItemStatusResponse": { + "description": "Response from a request to report the status of WorkItems.", + "type": "object", "properties": { "workItemServiceStates": { "description": "A set of messages indicating the service-side state for each\nWorkItem whose status was reported, in the same order as the\nWorkItemStatus messages in the ReportWorkItemStatusRequest which\nresulting in this response.", @@ -4032,19 +4359,12 @@ "type": "array" } }, - "id": "ReportWorkItemStatusResponse", - "description": "Response from a request to report the status of WorkItems.", - "type": "object" + "id": "ReportWorkItemStatusResponse" }, "InstructionOutput": { - "id": "InstructionOutput", "description": "An output of an instruction.", "type": "object", "properties": { - "name": { - "description": "The user-provided name of this output.", - "type": "string" - }, "originalName": { "description": "System-defined name for this output in the original workflow graph.\nOutputs that do not contribute to an original instruction do not set this.", "type": "string" @@ -4068,16 +4388,21 @@ }, "description": "The codec to use to encode data being written via this output.", "type": "object" + }, + "name": { + "description": "The user-provided name of this output.", + "type": "string" } - } + }, + "id": "InstructionOutput" }, "CreateJobFromTemplateRequest": { "description": "A request to create a Cloud Dataflow job from a template.", "type": "object", "properties": { "environment": { - "$ref": "RuntimeEnvironment", - "description": "The runtime environment for the job." + "description": "The runtime environment for the job.", + "$ref": "RuntimeEnvironment" }, "location": { "description": "The location to which to direct the request.", @@ -4105,13 +4430,13 @@ "description": "A representation of an integer mean metric contribution.", "type": "object", "properties": { - "sum": { - "$ref": "SplitInt64", - "description": "The sum of all values being aggregated." - }, "count": { "$ref": "SplitInt64", "description": "The number of values being aggregated." + }, + "sum": { + "$ref": "SplitInt64", + "description": "The sum of all values being aggregated." } }, "id": "IntegerMean" @@ -4145,12 +4470,12 @@ "description": "All configuration data for a particular Computation.", "type": "object", "properties": { - "keyRanges": { + "outputs": { + "description": "The outputs from the computation.", "items": { - "$ref": "KeyRangeLocation" + "$ref": "StreamLocation" }, - "type": "array", - "description": "The key ranges processed by the computation." + "type": "array" }, "stateFamilies": { "description": "The state family values.", @@ -4159,16 +4484,9 @@ }, "type": "array" }, - "outputs": { - "items": { - "$ref": "StreamLocation" - }, - "type": "array", - "description": "The outputs from the computation." - }, "systemStageName": { - "type": "string", - "description": "The system stage name." + "description": "The system stage name.", + "type": "string" }, "computationId": { "description": "The ID of the computation.", @@ -4180,6 +4498,13 @@ "$ref": "StreamLocation" }, "type": "array" + }, + "keyRanges": { + "description": "The key ranges processed by the computation.", + "items": { + "$ref": "KeyRangeLocation" + }, + "type": "array" } }, "id": "ComputationTopology" @@ -4217,27 +4542,27 @@ "id": "RuntimeEnvironment" }, "MountedDataDisk": { + "description": "Describes mounted data disk.", + "type": "object", "properties": { "dataDisk": { "description": "The name of the data disk.\nThis name is local to the Google Cloud Platform project and uniquely\nidentifies the disk within that project, for example\n\"myproject-1014-104817-4c2-harness-0-disk-1\".", "type": "string" } }, - "id": "MountedDataDisk", - "description": "Describes mounted data disk.", - "type": "object" + "id": "MountedDataDisk" }, "StreamingSideInputLocation": { "description": "Identifies the location of a streaming side input.", "type": "object", "properties": { - "stateFamily": { - "description": "Identifies the state family where this side input is stored.", - "type": "string" - }, "tag": { "description": "Identifies the particular side input within the streaming Dataflow job.", "type": "string" + }, + "stateFamily": { + "description": "Identifies the state family where this side input is stored.", + "type": "string" } }, "id": "StreamingSideInputLocation" @@ -4253,10 +4578,143 @@ }, "id": "LaunchTemplateResponse" }, + "DerivedSource": { + "description": "Specification of one of the bundles produced as a result of splitting\na Source (e.g. when executing a SourceSplitRequest, or when\nsplitting an active task using WorkItemStatus.dynamic_source_split),\nrelative to the source being split.", + "type": "object", + "properties": { + "derivationMode": { + "enumDescriptions": [ + "The source derivation is unknown, or unspecified.", + "Produce a completely independent Source with no base.", + "Produce a Source based on the Source being split.", + "Produce a Source based on the base of the Source being split." + ], + "enum": [ + "SOURCE_DERIVATION_MODE_UNKNOWN", + "SOURCE_DERIVATION_MODE_INDEPENDENT", + "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT", + "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" + ], + "description": "What source to base the produced source on (if any).", + "type": "string" + }, + "source": { + "description": "Specification of the source.", + "$ref": "Source" + } + }, + "id": "DerivedSource" + }, + "DynamicSourceSplit": { + "description": "When a task splits using WorkItemStatus.dynamic_source_split, this\nmessage describes the two parts of the split relative to the\ndescription of the current task's input.", + "type": "object", + "properties": { + "residual": { + "$ref": "DerivedSource", + "description": "Residual part (returned to the pool of work).\nSpecified relative to the previously-current source." + }, + "primary": { + "description": "Primary part (continued to be processed by worker).\nSpecified relative to the previously-current source.\nBecomes current.", + "$ref": "DerivedSource" + } + }, + "id": "DynamicSourceSplit" + }, "Job": { "description": "Defines a job to be run by the Cloud Dataflow service.", "type": "object", "properties": { + "currentStateTime": { + "format": "google-datetime", + "description": "The timestamp associated with the current state.", + "type": "string" + }, + "transformNameMapping": { + "description": "The map of transform name prefixes of the job to be replaced to the\ncorresponding name prefixes of the new job.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for this job.\n\nThe labels map can contain no more than 64 entries. Entries of the labels\nmap are UTF8 strings that comply with the following restrictions:\n\n* Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62}\n* Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}\n* Both keys and values are additionally constrained to be \u003c= 128 bytes in\nsize.", + "type": "object" + }, + "environment": { + "description": "The environment for the job.", + "$ref": "Environment" + }, + "createTime": { + "format": "google-datetime", + "description": "The timestamp when the job was initially created. Immutable and set by the\nCloud Dataflow service.", + "type": "string" + }, + "stageStates": { + "description": "This field may be mutated by the Cloud Dataflow service;\ncallers cannot mutate it.", + "items": { + "$ref": "ExecutionStageState" + }, + "type": "array" + }, + "type": { + "description": "The type of Cloud Dataflow job.", + "type": "string", + "enumDescriptions": [ + "The type of the job is unspecified, or unknown.", + "A batch job with a well-defined end point: data is read, data is\nprocessed, data is written, and the job is done.", + "A continuously streaming job with no end: data is read,\nprocessed, and written continuously." + ], + "enum": [ + "JOB_TYPE_UNKNOWN", + "JOB_TYPE_BATCH", + "JOB_TYPE_STREAMING" + ] + }, + "projectId": { + "description": "The ID of the Cloud Platform project that the job belongs to.", + "type": "string" + }, + "pipelineDescription": { + "$ref": "PipelineDescription", + "description": "Preliminary field: The format of this data may change at any time.\nA description of the user pipeline and stages through which it is executed.\nCreated by Cloud Dataflow service. Only retrieved with\nJOB_VIEW_DESCRIPTION or JOB_VIEW_ALL." + }, + "replaceJobId": { + "description": "If this job is an update of an existing job, this field is the job ID\nof the job it replaced.\n\nWhen sending a `CreateJobRequest`, you can update a job by specifying it\nhere. The job named here is stopped, and its intermediate state is\ntransferred to this job.", + "type": "string" + }, + "requestedState": { + "enumDescriptions": [ + "The job's run state isn't specified.", + "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", + "`JOB_STATE_RUNNING` indicates that the job is currently running.", + "`JOB_STATE_DONE` indicates that the job has successfully completed.\nThis is a terminal job state. This state may be set by the Cloud Dataflow\nservice, as a transition from `JOB_STATE_RUNNING`. It may also be set via a\nCloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal\nstate.", + "`JOB_STATE_FAILED` indicates that the job has failed. This is a\nterminal job state. This state may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_RUNNING`.", + "`JOB_STATE_CANCELLED` indicates that the job has been explicitly\ncancelled. This is a terminal job state. This state may only be\nset via a Cloud Dataflow `UpdateJob` call, and only if the job has not\nyet reached another terminal state.", + "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", + "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", + "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", + "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", + "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." + ], + "enum": [ + "JOB_STATE_UNKNOWN", + "JOB_STATE_STOPPED", + "JOB_STATE_RUNNING", + "JOB_STATE_DONE", + "JOB_STATE_FAILED", + "JOB_STATE_CANCELLED", + "JOB_STATE_UPDATED", + "JOB_STATE_DRAINING", + "JOB_STATE_DRAINED", + "JOB_STATE_PENDING", + "JOB_STATE_CANCELLING" + ], + "description": "The job's requested state.\n\n`UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` and\n`JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` may\nalso be used to directly set a job's requested state to\n`JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating the\njob if it has not already reached a terminal state.", + "type": "string" + }, "tempFiles": { "description": "A set of files the system should be aware of that are used\nfor temporary storage. These temporary files will be\nremoved on job completion.\nNo duplicates are allowed.\nNo file patterns are supported.\n\nThe supported files are:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", "items": { @@ -4265,8 +4723,8 @@ "type": "array" }, "clientRequestId": { - "type": "string", - "description": "The client's unique identifier of the job, re-used across retried attempts.\nIf this field is set, the service will ensure its uniqueness.\nThe request to create a job will fail if the service has knowledge of a\npreviously submitted job with the same client's ID and job name.\nThe caller may use this field to ensure idempotence of job\ncreation across retried attempts to create a job.\nBy default, the field is empty and, in that case, the service ignores it." + "description": "The client's unique identifier of the job, re-used across retried attempts.\nIf this field is set, the service will ensure its uniqueness.\nThe request to create a job will fail if the service has knowledge of a\npreviously submitted job with the same client's ID and job name.\nThe caller may use this field to ensure idempotence of job\ncreation across retried attempts to create a job.\nBy default, the field is empty and, in that case, the service ignores it.", + "type": "string" }, "name": { "description": "The user-specified Cloud Dataflow job name.\n\nOnly one Job with a given name may exist in a project at any\ngiven time. If a caller attempts to create a Job with the same\nname as an already-existing Job, the attempt returns the\nexisting Job.\n\nThe name must match the regular expression\n`[a-z]([-a-z0-9]{0,38}[a-z0-9])?`", @@ -4322,145 +4780,12 @@ ] }, "location": { - "type": "string", - "description": "The location that contains this job." - }, - "currentStateTime": { - "format": "google-datetime", - "description": "The timestamp associated with the current state.", + "description": "The location that contains this job.", "type": "string" - }, - "transformNameMapping": { - "additionalProperties": { - "type": "string" - }, - "description": "The map of transform name prefixes of the job to be replaced to the\ncorresponding name prefixes of the new job.", - "type": "object" - }, - "environment": { - "$ref": "Environment", - "description": "The environment for the job." - }, - "createTime": { - "format": "google-datetime", - "description": "The timestamp when the job was initially created. Immutable and set by the\nCloud Dataflow service.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "User-defined labels for this job.\n\nThe labels map can contain no more than 64 entries. Entries of the labels\nmap are UTF8 strings that comply with the following restrictions:\n\n* Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62}\n* Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}\n* Both keys and values are additionally constrained to be \u003c= 128 bytes in\nsize.", - "type": "object" - }, - "stageStates": { - "description": "This field may be mutated by the Cloud Dataflow service;\ncallers cannot mutate it.", - "items": { - "$ref": "ExecutionStageState" - }, - "type": "array" - }, - "type": { - "enumDescriptions": [ - "The type of the job is unspecified, or unknown.", - "A batch job with a well-defined end point: data is read, data is\nprocessed, data is written, and the job is done.", - "A continuously streaming job with no end: data is read,\nprocessed, and written continuously." - ], - "enum": [ - "JOB_TYPE_UNKNOWN", - "JOB_TYPE_BATCH", - "JOB_TYPE_STREAMING" - ], - "description": "The type of Cloud Dataflow job.", - "type": "string" - }, - "projectId": { - "description": "The ID of the Cloud Platform project that the job belongs to.", - "type": "string" - }, - "pipelineDescription": { - "description": "Preliminary field: The format of this data may change at any time.\nA description of the user pipeline and stages through which it is executed.\nCreated by Cloud Dataflow service. Only retrieved with\nJOB_VIEW_DESCRIPTION or JOB_VIEW_ALL.", - "$ref": "PipelineDescription" - }, - "replaceJobId": { - "description": "If this job is an update of an existing job, this field is the job ID\nof the job it replaced.\n\nWhen sending a `CreateJobRequest`, you can update a job by specifying it\nhere. The job named here is stopped, and its intermediate state is\ntransferred to this job.", - "type": "string" - }, - "requestedState": { - "type": "string", - "enumDescriptions": [ - "The job's run state isn't specified.", - "`JOB_STATE_STOPPED` indicates that the job has not\nyet started to run.", - "`JOB_STATE_RUNNING` indicates that the job is currently running.", - "`JOB_STATE_DONE` indicates that the job has successfully completed.\nThis is a terminal job state. This state may be set by the Cloud Dataflow\nservice, as a transition from `JOB_STATE_RUNNING`. It may also be set via a\nCloud Dataflow `UpdateJob` call, if the job has not yet reached a terminal\nstate.", - "`JOB_STATE_FAILED` indicates that the job has failed. This is a\nterminal job state. This state may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_RUNNING`.", - "`JOB_STATE_CANCELLED` indicates that the job has been explicitly\ncancelled. This is a terminal job state. This state may only be\nset via a Cloud Dataflow `UpdateJob` call, and only if the job has not\nyet reached another terminal state.", - "`JOB_STATE_UPDATED` indicates that the job was successfully updated,\nmeaning that this job was stopped and another job was started, inheriting\nstate from this one. This is a terminal job state. This state may only be\nset by the Cloud Dataflow service, and only as a transition from\n`JOB_STATE_RUNNING`.", - "`JOB_STATE_DRAINING` indicates that the job is in the process of draining.\nA draining job has stopped pulling from its input sources and is processing\nany data that remains in-flight. This state may be set via a Cloud Dataflow\n`UpdateJob` call, but only as a transition from `JOB_STATE_RUNNING`. Jobs\nthat are draining may only transition to `JOB_STATE_DRAINED`,\n`JOB_STATE_CANCELLED`, or `JOB_STATE_FAILED`.", - "`JOB_STATE_DRAINED` indicates that the job has been drained.\nA drained job terminated by stopping pulling from its input sources and\nprocessing any data that remained in-flight when draining was requested.\nThis state is a terminal state, may only be set by the Cloud Dataflow\nservice, and only as a transition from `JOB_STATE_DRAINING`.", - "'JOB_STATE_PENDING' indicates that the job has been created but is not yet\nrunning. Jobs that are pending may only transition to `JOB_STATE_RUNNING`,\nor `JOB_STATE_FAILED`.", - "'JOB_STATE_CANCELLING' indicates that the job has been explicitly cancelled\nand is in the process of stopping. Jobs that are cancelling may only\ntransition to 'JOB_STATE_CANCELLED' or 'JOB_STATE_FAILED'." - ], - "enum": [ - "JOB_STATE_UNKNOWN", - "JOB_STATE_STOPPED", - "JOB_STATE_RUNNING", - "JOB_STATE_DONE", - "JOB_STATE_FAILED", - "JOB_STATE_CANCELLED", - "JOB_STATE_UPDATED", - "JOB_STATE_DRAINING", - "JOB_STATE_DRAINED", - "JOB_STATE_PENDING", - "JOB_STATE_CANCELLING" - ], - "description": "The job's requested state.\n\n`UpdateJob` may be used to switch between the `JOB_STATE_STOPPED` and\n`JOB_STATE_RUNNING` states, by setting requested_state. `UpdateJob` may\nalso be used to directly set a job's requested state to\n`JOB_STATE_CANCELLED` or `JOB_STATE_DONE`, irrevocably terminating the\njob if it has not already reached a terminal state." } }, "id": "Job" }, - "DynamicSourceSplit": { - "description": "When a task splits using WorkItemStatus.dynamic_source_split, this\nmessage describes the two parts of the split relative to the\ndescription of the current task's input.", - "type": "object", - "properties": { - "residual": { - "$ref": "DerivedSource", - "description": "Residual part (returned to the pool of work).\nSpecified relative to the previously-current source." - }, - "primary": { - "$ref": "DerivedSource", - "description": "Primary part (continued to be processed by worker).\nSpecified relative to the previously-current source.\nBecomes current." - } - }, - "id": "DynamicSourceSplit" - }, - "DerivedSource": { - "description": "Specification of one of the bundles produced as a result of splitting\na Source (e.g. when executing a SourceSplitRequest, or when\nsplitting an active task using WorkItemStatus.dynamic_source_split),\nrelative to the source being split.", - "type": "object", - "properties": { - "derivationMode": { - "enum": [ - "SOURCE_DERIVATION_MODE_UNKNOWN", - "SOURCE_DERIVATION_MODE_INDEPENDENT", - "SOURCE_DERIVATION_MODE_CHILD_OF_CURRENT", - "SOURCE_DERIVATION_MODE_SIBLING_OF_CURRENT" - ], - "description": "What source to base the produced source on (if any).", - "type": "string", - "enumDescriptions": [ - "The source derivation is unknown, or unspecified.", - "Produce a completely independent Source with no base.", - "Produce a Source based on the Source being split.", - "Produce a Source based on the base of the Source being split." - ] - }, - "source": { - "$ref": "Source", - "description": "Specification of the source." - } - }, - "id": "DerivedSource" - }, "SideInputId": { "description": "Uniquely identifies a side input.", "type": "object", @@ -4478,19 +4803,25 @@ "id": "SideInputId" }, "SourceOperationResponse": { + "description": "The result of a SourceOperationRequest, specified in\nReportWorkItemStatusRequest.source_operation when the work item\nis completed.", "type": "object", "properties": { - "getMetadata": { - "description": "A response to a request to get metadata about a source.", - "$ref": "SourceGetMetadataResponse" - }, "split": { - "$ref": "SourceSplitResponse", - "description": "A response to a request to split a source." + "description": "A response to a request to split a source.", + "$ref": "SourceSplitResponse" + }, + "getMetadata": { + "$ref": "SourceGetMetadataResponse", + "description": "A response to a request to get metadata about a source." } }, - "id": "SourceOperationResponse", - "description": "The result of a SourceOperationRequest, specified in\nReportWorkItemStatusRequest.source_operation when the work item\nis completed." + "id": "SourceOperationResponse" + }, + "SendDebugCaptureResponse": { + "description": "Response to a send capture request.\nnothing", + "type": "object", + "properties": {}, + "id": "SendDebugCaptureResponse" }, "SideInputInfo": { "description": "Information about a side input of a DoFn or an input of a SeqDoFn.", @@ -4502,8 +4833,8 @@ }, "kind": { "additionalProperties": { - "type": "any", - "description": "Properties of the object." + "description": "Properties of the object.", + "type": "any" }, "description": "How to interpret the source element(s) as a side input value.", "type": "object" @@ -4518,34 +4849,28 @@ }, "id": "SideInputInfo" }, - "SendDebugCaptureResponse": { - "description": "Response to a send capture request.\nnothing", - "type": "object", - "properties": {}, - "id": "SendDebugCaptureResponse" - }, - "WriteInstruction": { - "description": "An instruction that writes records.\nTakes one input, produces no outputs.", + "CounterStructuredNameAndMetadata": { + "description": "A single message which encapsulates structured name and metadata for a given\ncounter.", "type": "object", "properties": { - "input": { - "description": "The input.", - "$ref": "InstructionInput" + "name": { + "description": "Structured name of the counter.", + "$ref": "CounterStructuredName" }, - "sink": { - "$ref": "Sink", - "description": "The sink to write to." + "metadata": { + "description": "Metadata associated with a counter", + "$ref": "CounterMetadata" } }, - "id": "WriteInstruction" + "id": "CounterStructuredNameAndMetadata" }, "ConcatPosition": { "description": "A position that encapsulates an inner position and an index for the inner\nposition. A ConcatPosition can be used by a reader of a source that\nencapsulates a set of other sources.", "type": "object", "properties": { "position": { - "description": "Position within the inner source.", - "$ref": "Position" + "$ref": "Position", + "description": "Position within the inner source." }, "index": { "format": "int32", @@ -4555,48 +4880,24 @@ }, "id": "ConcatPosition" }, - "CounterStructuredNameAndMetadata": { - "id": "CounterStructuredNameAndMetadata", - "description": "A single message which encapsulates structured name and metadata for a given\ncounter.", + "WriteInstruction": { + "description": "An instruction that writes records.\nTakes one input, produces no outputs.", "type": "object", "properties": { - "name": { - "description": "Structured name of the counter.", - "$ref": "CounterStructuredName" + "input": { + "$ref": "InstructionInput", + "description": "The input." }, - "metadata": { - "$ref": "CounterMetadata", - "description": "Metadata associated with a counter" + "sink": { + "description": "The sink to write to.", + "$ref": "Sink" } - } - }, - "AutoscalingSettings": { - "id": "AutoscalingSettings", - "description": "Settings for WorkerPool autoscaling.", - "type": "object", - "properties": { - "algorithm": { - "enumDescriptions": [ - "The algorithm is unknown, or unspecified.", - "Disable autoscaling.", - "Increase worker count over time to reduce job execution time." - ], - "enum": [ - "AUTOSCALING_ALGORITHM_UNKNOWN", - "AUTOSCALING_ALGORITHM_NONE", - "AUTOSCALING_ALGORITHM_BASIC" - ], - "description": "The algorithm to use for autoscaling.", - "type": "string" - }, - "maxNumWorkers": { - "format": "int32", - "description": "The maximum number of workers to cap scaling at.", - "type": "integer" - } - } + }, + "id": "WriteInstruction" }, "StreamingComputationRanges": { + "description": "Describes full or partial data disk assignment information of the computation\nranges.", + "type": "object", "properties": { "computationId": { "description": "The ID of the computation.", @@ -4610,24 +4911,55 @@ "type": "array" } }, - "id": "StreamingComputationRanges", - "description": "Describes full or partial data disk assignment information of the computation\nranges.", - "type": "object" + "id": "StreamingComputationRanges" + }, + "AutoscalingSettings": { + "description": "Settings for WorkerPool autoscaling.", + "type": "object", + "properties": { + "algorithm": { + "description": "The algorithm to use for autoscaling.", + "type": "string", + "enumDescriptions": [ + "The algorithm is unknown, or unspecified.", + "Disable autoscaling.", + "Increase worker count over time to reduce job execution time." + ], + "enum": [ + "AUTOSCALING_ALGORITHM_UNKNOWN", + "AUTOSCALING_ALGORITHM_NONE", + "AUTOSCALING_ALGORITHM_BASIC" + ] + }, + "maxNumWorkers": { + "format": "int32", + "description": "The maximum number of workers to cap scaling at.", + "type": "integer" + } + }, + "id": "AutoscalingSettings" }, "ExecutionStageSummary": { "description": "Description of the composing transforms, names/ids, and input/outputs of a\nstage of execution. Some composing transforms and sources may have been\ngenerated by the Dataflow service during execution planning.", "type": "object", "properties": { + "inputSource": { + "description": "Input sources for this stage.", + "items": { + "$ref": "StageSource" + }, + "type": "array" + }, "id": { "description": "Dataflow service generated id for this stage.", "type": "string" }, "componentTransform": { + "description": "Transforms that comprise this execution stage.", "items": { "$ref": "ComponentTransform" }, - "type": "array", - "description": "Transforms that comprise this execution stage." + "type": "array" }, "componentSource": { "description": "Collections produced and consumed by component transforms of this stage.", @@ -4637,8 +4969,6 @@ "type": "array" }, "kind": { - "description": "Type of tranform this stage is executing.", - "type": "string", "enumDescriptions": [ "Unrecognized transform type.", "ParDo transform.", @@ -4660,7 +4990,9 @@ "CONSTANT_KIND", "SINGLETON_KIND", "SHUFFLE_KIND" - ] + ], + "description": "Type of tranform this stage is executing.", + "type": "string" }, "outputSource": { "description": "Output sources for this stage.", @@ -4672,13 +5004,6 @@ "name": { "description": "Dataflow service generated name for this stage.", "type": "string" - }, - "inputSource": { - "description": "Input sources for this stage.", - "items": { - "$ref": "StageSource" - }, - "type": "array" } }, "id": "ExecutionStageSummary" @@ -4688,11 +5013,11 @@ "type": "object", "properties": { "workerMessages": { + "description": "The WorkerMessages to send.", "items": { "$ref": "WorkerMessage" }, - "type": "array", - "description": "The WorkerMessages to send." + "type": "array" }, "location": { "description": "The location which contains the job", @@ -4702,6 +5027,7 @@ "id": "SendWorkerMessagesRequest" }, "SourceSplitShard": { + "description": "DEPRECATED in favor of DerivedSource.", "type": "object", "properties": { "derivationMode": { @@ -4721,22 +5047,16 @@ "type": "string" }, "source": { - "description": "DEPRECATED", - "$ref": "Source" + "$ref": "Source", + "description": "DEPRECATED" } }, - "id": "SourceSplitShard", - "description": "DEPRECATED in favor of DerivedSource." + "id": "SourceSplitShard" }, "CPUTime": { "description": "Modeled after information exposed by /proc/stat.", "type": "object", "properties": { - "rate": { - "format": "double", - "description": "Average CPU utilization rate (% non-idle cpu / second) since previous\nsample.", - "type": "number" - }, "timestamp": { "format": "google-datetime", "description": "Timestamp of the measurement.", @@ -4746,339 +5066,43 @@ "format": "uint64", "description": "Total active CPU time across all cores (ie., non-idle) in milliseconds\nsince start-up.", "type": "string" + }, + "rate": { + "format": "double", + "description": "Average CPU utilization rate (% non-idle cpu / second) since previous\nsample.", + "type": "number" } }, "id": "CPUTime" - }, - "Environment": { - "description": "Describes the environment in which a Dataflow Job runs.", - "type": "object", - "properties": { - "sdkPipelineOptions": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The Cloud Dataflow SDK pipeline options specified by the user. These\noptions are passed through the service and are used to recreate the\nSDK pipeline options on the worker in a language agnostic and platform\nindependent way.", - "type": "object" + } + }, + "protocol": "rest", + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, + "version": "v1b3", + "baseUrl": "https://dataflow.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" }, - "userAgent": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "A description of the process that generated the request.", - "type": "object" + "https://www.googleapis.com/auth/userinfo.email": { + "description": "View your email address" }, - "clusterManagerApiService": { - "description": "The type of cluster manager API to use. If unknown or\nunspecified, the service will attempt to choose a reasonable\ndefault. This should be in the form of the API service name,\ne.g. \"compute.googleapis.com\".", - "type": "string" + "https://www.googleapis.com/auth/compute.readonly": { + "description": "View your Google Compute Engine resources" }, - "tempStoragePrefix": { - "description": "The prefix of the resources the system should use for temporary\nstorage. The system will append the suffix \"/temp-{JOBNAME} to\nthis resource prefix, where {JOBNAME} is the value of the\njob_name field. The resulting bucket and object prefix is used\nas the prefix of the resources used to store temporary data\nneeded during the job execution. NOTE: This will override the\nvalue in taskrunner_settings.\nThe supported resource type is:\n\nGoogle Cloud Storage:\n\n storage.googleapis.com/{bucket}/{object}\n bucket.storage.googleapis.com/{object}", - "type": "string" - }, - "workerPools": { - "description": "The worker pools. At least one \"harness\" worker pool must be\nspecified in order for the job to have workers.", - "items": { - "$ref": "WorkerPool" - }, - "type": "array" - }, - "dataset": { - "description": "The dataset for the current project where various workflow\nrelated tables are stored.\n\nThe supported resource type is:\n\nGoogle BigQuery:\n bigquery.googleapis.com/{dataset}", - "type": "string" - }, - "experiments": { - "description": "The list of experiments to enable.", - "items": { - "type": "string" - }, - "type": "array" - }, - "version": { - "description": "A structure describing which components and their versions of the service\nare required in order to run the job.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - } - }, - "internalExperiments": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Experimental settings.", - "type": "object" - }, - "serviceAccountEmail": { - "description": "Identity to run virtual machines as. Defaults to the default account.", - "type": "string" - } - }, - "id": "Environment" - }, - "StreamingComputationTask": { - "properties": { - "dataDisks": { - "description": "Describes the set of data disks this task should apply to.", - "items": { - "$ref": "MountedDataDisk" - }, - "type": "array" - }, - "taskType": { - "description": "A type of streaming computation task.", - "type": "string", - "enumDescriptions": [ - "The streaming computation task is unknown, or unspecified.", - "Stop processing specified streaming computation range(s).", - "Start processing specified streaming computation range(s)." - ], - "enum": [ - "STREAMING_COMPUTATION_TASK_UNKNOWN", - "STREAMING_COMPUTATION_TASK_STOP", - "STREAMING_COMPUTATION_TASK_START" - ] - }, - "computationRanges": { - "items": { - "$ref": "StreamingComputationRanges" - }, - "type": "array", - "description": "Contains ranges of a streaming computation this task should apply to." - } - }, - "id": "StreamingComputationTask", - "description": "A task which describes what action should be performed for the specified\nstreaming computation ranges.", - "type": "object" - }, - "SendDebugCaptureRequest": { - "id": "SendDebugCaptureRequest", - "description": "Request to send encoded debug information.", - "type": "object", - "properties": { - "location": { - "description": "The location which contains the job specified by job_id.", - "type": "string" - }, - "data": { - "type": "string", - "description": "The encoded debug information." - }, - "componentId": { - "description": "The internal component id for which debug information is sent.", - "type": "string" - }, - "workerId": { - "description": "The worker id, i.e., VM hostname.", - "type": "string" + "https://www.googleapis.com/auth/compute": { + "description": "View and manage your Google Compute Engine resources" } } - }, - "GetDebugConfigResponse": { - "description": "Response to a get debug configuration request.", - "type": "object", - "properties": { - "config": { - "description": "The encoded debug configuration for the requested component.", - "type": "string" - } - }, - "id": "GetDebugConfigResponse" - }, - "ComponentTransform": { - "description": "Description of a transform executed as part of an execution stage.", - "type": "object", - "properties": { - "name": { - "description": "Dataflow service generated name for this source.", - "type": "string" - }, - "userName": { - "description": "Human-readable name for this transform; may be user or system generated.", - "type": "string" - }, - "originalTransform": { - "description": "User name for the original user transform with which this transform is\nmost closely associated.", - "type": "string" - } - }, - "id": "ComponentTransform" - }, - "StreamingSetupTask": { - "description": "A task which initializes part of a streaming Dataflow job.", - "type": "object", - "properties": { - "streamingComputationTopology": { - "$ref": "TopologyConfig", - "description": "The global topology of the streaming Dataflow job." - }, - "drain": { - "description": "The user has requested drain.", - "type": "boolean" - }, - "workerHarnessPort": { - "format": "int32", - "description": "The TCP port used by the worker to communicate with the Dataflow\nworker harness.", - "type": "integer" - }, - "receiveWorkPort": { - "format": "int32", - "description": "The TCP port on which the worker should listen for messages from\nother streaming computation workers.", - "type": "integer" - } - }, - "id": "StreamingSetupTask" - }, - "PubsubLocation": { - "properties": { - "subscription": { - "description": "A pubsub subscription, in the form of\n\"pubsub.googleapis.com/subscriptions/\u003cproject-id\u003e/\u003csubscription-name\u003e\"", - "type": "string" - }, - "dropLateData": { - "description": "Indicates whether the pipeline allows late-arriving data.", - "type": "boolean" - }, - "trackingSubscription": { - "description": "If set, specifies the pubsub subscription that will be used for tracking\ncustom time timestamps for watermark estimation.", - "type": "string" - }, - "withAttributes": { - "description": "If true, then the client has requested to get pubsub attributes.", - "type": "boolean" - }, - "idLabel": { - "description": "If set, contains a pubsub label from which to extract record ids.\nIf left empty, record deduplication will be strictly best effort.", - "type": "string" - }, - "topic": { - "description": "A pubsub topic, in the form of\n\"pubsub.googleapis.com/topics/\u003cproject-id\u003e/\u003ctopic-name\u003e\"", - "type": "string" - }, - "timestampLabel": { - "description": "If set, contains a pubsub label from which to extract record timestamps.\nIf left empty, record timestamps will be generated upon arrival.", - "type": "string" - } - }, - "id": "PubsubLocation", - "description": "Identifies a pubsub location to use for transferring data into or\nout of a streaming Dataflow job.", - "type": "object" - }, - "WorkerHealthReport": { - "type": "object", - "properties": { - "pods": { - "description": "The pods running on the worker. See:\nhttp://kubernetes.io/v1.1/docs/api-reference/v1/definitions.html#_v1_pod\n\nThis field is used by the worker to send the status of the indvidual\ncontainers running on each worker.", - "items": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "vmStartupTime": { - "format": "google-datetime", - "description": "The time the VM was booted.", - "type": "string" - }, - "reportInterval": { - "format": "google-duration", - "description": "The interval at which the worker is sending health reports.\nThe default value of 0 should be interpreted as the field is not being\nexplicitly set by the worker.", - "type": "string" - }, - "vmIsHealthy": { - "description": "Whether the VM is healthy.", - "type": "boolean" - } - }, - "id": "WorkerHealthReport", - "description": "WorkerHealthReport contains information about the health of a worker.\n\nThe VM should be identified by the labels attached to the WorkerMessage that\nthis health ping belongs to." - }, - "JobMessage": { - "type": "object", - "properties": { - "messageImportance": { - "enumDescriptions": [ - "The message importance isn't specified, or is unknown.", - "The message is at the 'debug' level: typically only useful for\nsoftware engineers working on the code the job is running.\nTypically, Dataflow pipeline runners do not display log messages\nat this level by default.", - "The message is at the 'detailed' level: somewhat verbose, but\npotentially useful to users. Typically, Dataflow pipeline\nrunners do not display log messages at this level by default.\nThese messages are displayed by default in the Dataflow\nmonitoring UI.", - "The message is at the 'basic' level: useful for keeping\ntrack of the execution of a Dataflow pipeline. Typically,\nDataflow pipeline runners display log messages at this level by\ndefault, and these messages are displayed by default in the\nDataflow monitoring UI.", - "The message is at the 'warning' level: indicating a condition\npertaining to a job which may require human intervention.\nTypically, Dataflow pipeline runners display log messages at this\nlevel by default, and these messages are displayed by default in\nthe Dataflow monitoring UI.", - "The message is at the 'error' level: indicating a condition\npreventing a job from succeeding. Typically, Dataflow pipeline\nrunners display log messages at this level by default, and these\nmessages are displayed by default in the Dataflow monitoring UI." - ], - "enum": [ - "JOB_MESSAGE_IMPORTANCE_UNKNOWN", - "JOB_MESSAGE_DEBUG", - "JOB_MESSAGE_DETAILED", - "JOB_MESSAGE_BASIC", - "JOB_MESSAGE_WARNING", - "JOB_MESSAGE_ERROR" - ], - "description": "Importance level of the message.", - "type": "string" - }, - "messageText": { - "type": "string", - "description": "The text of the message." - }, - "time": { - "format": "google-datetime", - "description": "The timestamp of the message.", - "type": "string" - }, - "id": { - "type": "string", - "description": "Deprecated." - } - }, - "id": "JobMessage", - "description": "A particular message pertaining to a Dataflow job." - }, - "ParameterMetadata": { - "description": "Metadata for a specific parameter.", - "type": "object", - "properties": { - "isOptional": { - "description": "Optional. Whether the parameter is optional. Defaults to false.", - "type": "boolean" - }, - "name": { - "description": "Required. The name of the parameter.", - "type": "string" - }, - "regexes": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Optional. Regexes that the parameter must match." - }, - "label": { - "description": "Required. The label to display for the parameter.", - "type": "string" - }, - "helpText": { - "description": "Required. The help text to display for the parameter.", - "type": "string" - } - }, - "id": "ParameterMetadata" - }, - "MultiOutputInfo": { - "description": "Information about an output of a multi-output DoFn.", - "type": "object", - "properties": { - "tag": { - "description": "The id of the tag the user code will emit to this output by; this\nshould correspond to the tag of some SideInputInfo.", - "type": "string" - } - }, - "id": "MultiOutputInfo" } - } + }, + "kind": "discovery#restDescription", + "description": "Manages Google Cloud Dataflow projects on Google Cloud Platform.", + "servicePath": "", + "rootUrl": "https://dataflow.googleapis.com/" } diff --git a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go index 89e38aa88..a3a16ea10 100644 --- a/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go +++ b/vendor/google.golang.org/api/dataflow/v1b3/dataflow-gen.go @@ -1327,6 +1327,9 @@ type DistributionUpdate struct { // distribution. Count *SplitInt64 `json:"count,omitempty"` + // Histogram: (Optional) Histogram of value counts for the distribution. + Histogram *Histogram `json:"histogram,omitempty"` + // Max: The maximum value present in the distribution. Max *SplitInt64 `json:"max,omitempty"` @@ -1922,6 +1925,57 @@ func (s *GetTemplateResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Histogram: Histogram of value counts for a distribution. +// +// Buckets have an inclusive lower bound and exclusive upper bound and +// use +// "1,2,5 bucketing": The first bucket range is from [0,1) and all +// subsequent +// bucket boundaries are powers of ten multiplied by 1, 2, or 5. Thus, +// bucket +// boundaries are 0, 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, +// ... +// Negative values are not supported. +type Histogram struct { + // BucketCounts: Counts of values in each bucket. For efficiency, prefix + // and trailing + // buckets with count = 0 are elided. Buckets can store the full range + // of + // values of an unsigned long, with ULLONG_MAX falling into the 59th + // bucket + // with range [1e19, 2e19). + BucketCounts googleapi.Int64s `json:"bucketCounts,omitempty"` + + // FirstBucketOffset: Starting index of first stored bucket. The + // non-inclusive upper-bound of + // the ith bucket is given by: + // pow(10,(i-first_bucket_offset)/3) * + // (1,2,5)[(i-first_bucket_offset)%3] + FirstBucketOffset int64 `json:"firstBucketOffset,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BucketCounts") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BucketCounts") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Histogram) MarshalJSON() ([]byte, error) { + type noMethod Histogram + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // InstructionInput: An input of an instruction, as a reference to an // output of a // producer instruction. @@ -6486,10 +6540,15 @@ func (s *WorkerSettings) MarshalJSON() ([]byte, error) { // being // shut down. type WorkerShutdownNotice struct { - // Reason: Optional reason to be attached for the shutdown notice. - // For example: "PREEMPTION" would indicate the VM is being shut down - // because - // of preemption. Other possible reasons may be added in the future. + // Reason: The reason for the worker shutdown. + // Current possible values are: + // "UNKNOWN": shutdown reason is unknown. + // "PREEMPTION": shutdown reason is preemption. + // Other possible reasons may be added in the future. + // Note that this must match the names of the enum specified + // in + // google3/cloud/dataflow/router/protos/cloud_worker_messages_service. + // proto. Reason string `json:"reason,omitempty"` // ForceSendFields is a list of field names (e.g. "Reason") to diff --git a/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json b/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json index b8a0674ea..c770cff75 100644 --- a/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json +++ b/vendor/google.golang.org/api/dataproc/v1/dataproc-api.json @@ -1,4 +1,28 @@ { + "baseUrl": "https://dataproc.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "kind": "discovery#restDescription", + "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", + "servicePath": "", + "rootUrl": "https://dataproc.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "dataproc", + "batchPath": "batch", + "id": "dataproc:v1", + "documentationLink": "https://cloud.google.com/dataproc/", + "revision": "20170926", + "title": "Google Cloud Dataproc API", + "ownerName": "Google", + "discoveryVersion": "v1", "resources": { "projects": { "resources": { @@ -6,14 +30,64 @@ "resources": { "operations": { "methods": { - "get": { - "httpMethod": "GET", + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "response": { + "$ref": "Empty" + }, "parameterOrder": [ "name" ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel", + "id": "dataproc.projects.regions.operations.cancel", + "path": "v1/{+name}:cancel" + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", + "id": "dataproc.projects.regions.operations.delete", + "path": "v1/{+name}" + }, + "get": { "response": { "$ref": "Operation" }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", "parameters": { "name": { "description": "The name of the operation resource.", @@ -27,11 +101,14 @@ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", - "path": "v1/{+name}", "id": "dataproc.projects.regions.operations.get", + "path": "v1/{+name}", "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." }, "list": { + "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations", + "id": "dataproc.projects.regions.operations.list", + "path": "v1/{+name}", "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", "response": { "$ref": "ListOperationsResponse" @@ -40,238 +117,110 @@ "name" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "pageSize": { - "location": "query", - "format": "int32", - "description": "The standard list page size.", - "type": "integer" - }, "filter": { - "location": "query", "description": "The standard list filter.", - "type": "string" - }, - "pageToken": { - "description": "The standard list page token.", "type": "string", "location": "query" }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, "name": { "description": "The name of the operation's parent resource.", "type": "string", "required": true, "pattern": "^projects/[^/]+/regions/[^/]+/operations$", "location": "path" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations", - "id": "dataproc.projects.regions.operations.list", - "path": "v1/{+name}" - }, - "cancel": { - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel", - "id": "dataproc.projects.regions.operations.cancel", - "path": "v1/{+name}:cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", - "id": "dataproc.projects.regions.operations.delete", - "path": "v1/{+name}" + } } } }, "jobs": { "methods": { - "cancel": { - "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "id": "dataproc.projects.regions.jobs.cancel", - "request": { - "$ref": "CancelJobRequest" - }, - "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "jobId": { - "description": "Required. The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - } - } - }, "get": { "description": "Gets the resource representation for a job in a project.", - "httpMethod": "GET", + "response": { + "$ref": "Job" + }, "parameterOrder": [ "projectId", "region", "jobId" ], - "response": { - "$ref": "Job" - }, + "httpMethod": "GET", "parameters": { - "jobId": { + "region": { "location": "path", - "description": "Required. The job ID.", + "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", "required": true }, + "jobId": { + "description": "Required. The job ID.", + "type": "string", + "required": true, + "location": "path" + }, "projectId": { "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", "required": true - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.get" + "id": "dataproc.projects.regions.jobs.get", + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}" }, "patch": { - "response": { + "description": "Updates a job in a project.", + "request": { "$ref": "Job" }, + "httpMethod": "PATCH", "parameterOrder": [ "projectId", "region", "jobId" ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "response": { + "$ref": "Job" + }, "parameters": { + "jobId": { + "location": "path", + "description": "Required. The job ID.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + }, "updateMask": { "location": "query", "format": "google-fieldmask", "description": "Required. Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", "type": "string" }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - }, - "jobId": { - "description": "Required. The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.patch", - "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "request": { - "$ref": "Job" - }, - "description": "Updates a job in a project." - }, - "submit": { - "description": "Submits a job to a cluster.", - "request": { - "$ref": "SubmitJobRequest" - }, - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "region" - ], - "httpMethod": "POST", - "parameters": { - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" - }, "region": { "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", @@ -282,33 +231,61 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/projects/{projectId}/regions/{region}/jobs:submit", - "id": "dataproc.projects.regions.jobs.submit", - "path": "v1/projects/{projectId}/regions/{region}/jobs:submit" - }, - "delete": { "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.delete", + "id": "dataproc.projects.regions.jobs.patch" + }, + "submit": { + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "region" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs:submit", + "path": "v1/projects/{projectId}/regions/{region}/jobs:submit", + "id": "dataproc.projects.regions.jobs.submit", + "request": { + "$ref": "SubmitJobRequest" + }, + "description": "Submits a job to a cluster." + }, + "delete": { "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.", - "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, "parameterOrder": [ "projectId", "region", "jobId" ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], + "httpMethod": "DELETE", "parameters": { "region": { + "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", - "required": true, - "location": "path" + "required": true }, "jobId": { "location": "path", @@ -317,14 +294,21 @@ "required": true }, "projectId": { - "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", "type": "string", - "required": true + "required": true, + "location": "path" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.delete", + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}" }, "list": { + "description": "Lists regions/{region}/jobs in a project.", "response": { "$ref": "ListJobsResponse" }, @@ -335,41 +319,41 @@ "httpMethod": "GET", "parameters": { "region": { - "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", - "required": true - }, - "clusterName": { - "location": "query", - "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "type": "string" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", "required": true, "location": "path" }, - "filter": { - "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", + "clusterName": { + "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", "type": "string", "location": "query" }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + }, + "filter": { + "location": "query", + "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", + "type": "string" + }, "jobStateMatcher": { + "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", + "type": "string", "location": "query", "enum": [ "ALL", "ACTIVE", "NON_ACTIVE" - ], - "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", - "type": "string" + ] }, "pageToken": { - "location": "query", "description": "Optional. The page token, returned by a previous call, to request the next page of results.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { "format": "int32", @@ -383,17 +367,54 @@ ], "flatPath": "v1/projects/{projectId}/regions/{region}/jobs", "id": "dataproc.projects.regions.jobs.list", - "path": "v1/projects/{projectId}/regions/{region}/jobs", - "description": "Lists regions/{region}/jobs in a project." + "path": "v1/projects/{projectId}/regions/{region}/jobs" + }, + "cancel": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "POST", + "parameters": { + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "jobId": { + "description": "Required. The job ID.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "id": "dataproc.projects.regions.jobs.cancel", + "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.", + "request": { + "$ref": "CancelJobRequest" + } } } }, "clusters": { "methods": { "list": { - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.list", - "path": "v1/projects/{projectId}/regions/{region}/clusters", "description": "Lists all regions/{region}/clusters in a project.", "response": { "$ref": "ListClustersResponse" @@ -403,23 +424,10 @@ "region" ], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { - "filter": { - "location": "query", - "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", - "type": "string" - }, - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "pageToken": { - "description": "Optional. The standard List page token.", - "type": "string", - "location": "query" - }, "pageSize": { "format": "int32", "description": "Optional. The standard List page size.", @@ -427,17 +435,36 @@ "location": "query" }, "projectId": { - "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", "type": "string", - "required": true + "required": true, + "location": "path" + }, + "filter": { + "location": "query", + "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", + "type": "string" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "description": "Optional. The standard List page token.", + "type": "string", + "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.list", + "path": "v1/projects/{projectId}/regions/{region}/clusters" }, "create": { + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", + "path": "v1/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.create", "description": "Creates a cluster in a project.", "request": { "$ref": "Cluster" @@ -451,65 +478,28 @@ "$ref": "Operation" }, "parameters": { - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" - }, "region": { "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", "required": true + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters", - "path": "v1/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.create" - }, - "get": { - "description": "Gets the resource representation for a cluster in a project.", - "response": { - "$ref": "Cluster" - }, - "parameterOrder": [ - "projectId", - "region", - "clusterName" - ], - "httpMethod": "GET", - "parameters": { - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true - }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - }, - "clusterName": { - "description": "Required. The cluster name.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.get", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}" + ] }, "patch": { + "request": { + "$ref": "Cluster" + }, + "description": "Updates a cluster in a project.", "httpMethod": "PATCH", "parameterOrder": [ "projectId", @@ -523,6 +513,12 @@ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.", + "type": "string", + "required": true + }, "updateMask": { "format": "google-fieldmask", "description": "Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:\n{\n \"config\":{\n \"workerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, only the following fields can be updated:\u003ctable\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003elabels\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eUpdate labels\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize primary worker group\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.secondary_worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e \u003ctd\u003eResize secondary worker group\u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/table\u003e", @@ -540,41 +536,29 @@ "type": "string", "required": true, "location": "path" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.", - "type": "string", - "required": true, - "location": "path" } }, "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.patch", - "request": { - "$ref": "Cluster" - }, - "description": "Updates a cluster in a project." + "id": "dataproc.projects.regions.clusters.patch" }, - "delete": { - "httpMethod": "DELETE", + "get": { + "description": "Gets the resource representation for a cluster in a project.", + "httpMethod": "GET", "parameterOrder": [ "projectId", "region", "clusterName" ], "response": { - "$ref": "Operation" + "$ref": "Cluster" }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { "region": { - "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", - "required": true + "required": true, + "location": "path" }, "clusterName": { "location": "path", @@ -583,38 +567,43 @@ "required": true }, "projectId": { + "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", "type": "string", - "required": true, - "location": "path" + "required": true } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.delete", - "description": "Deletes a cluster in a project." + "id": "dataproc.projects.regions.clusters.get" }, "diagnose": { - "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", - "id": "dataproc.projects.regions.clusters.diagnose", - "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", "request": { "$ref": "DiagnoseClusterRequest" }, "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", - "response": { - "$ref": "Operation" - }, + "httpMethod": "POST", "parameterOrder": [ "projectId", "region", "clusterName" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + }, "region": { "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", @@ -626,11 +615,46 @@ "description": "Required. The cluster name.", "type": "string", "required": true - }, + } + }, + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "id": "dataproc.projects.regions.clusters.diagnose" + }, + "delete": { + "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.delete", + "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "description": "Deletes a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region", + "clusterName" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { "projectId": { - "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", "type": "string", + "required": true, + "location": "path" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "clusterName": { + "location": "path", + "description": "Required. The cluster name.", + "type": "string", "required": true } } @@ -643,64 +667,20 @@ } }, "parameters": { - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ] - }, - "alt": { - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, "key": { - "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" + "type": "string", + "location": "query" }, "access_token": { + "location": "query", "description": "OAuth access token.", - "type": "string", - "location": "query" + "type": "string" }, "quotaUser": { - "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "location": "query", @@ -708,16 +688,16 @@ "default": "true", "type": "boolean" }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, "oauth_token": { "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", @@ -728,760 +708,53 @@ "default": "true", "type": "boolean", "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" } }, "schemas": { - "DiagnoseClusterRequest": { - "description": "A request to collect cluster diagnostic information.", - "type": "object", - "properties": {}, - "id": "DiagnoseClusterRequest" - }, - "DiskConfig": { - "description": "Specifies the config of disk options for a group of VM instances.", - "type": "object", - "properties": { - "bootDiskSizeGb": { - "format": "int32", - "description": "Optional. Size in GB of the boot disk (default is 500GB).", - "type": "integer" - }, - "numLocalSsds": { - "format": "int32", - "description": "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", - "type": "integer" - } - }, - "id": "DiskConfig" - }, - "ClusterOperationMetadata": { - "description": "Metadata describing the operation.", - "type": "object", - "properties": { - "description": { - "description": "Output-only. Short description of operation.", - "type": "string" - }, - "warnings": { - "description": "Output-only. Errors encountered during operation execution.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "description": "Output-only. Labels associated with the operation", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "status": { - "description": "Output-only. Current operation status.", - "$ref": "ClusterOperationStatus" - }, - "statusHistory": { - "description": "Output-only. The previous operation status.", - "items": { - "$ref": "ClusterOperationStatus" - }, - "type": "array" - }, - "clusterName": { - "description": "Output-only. Name of the cluster for the operation.", - "type": "string" - }, - "clusterUuid": { - "description": "Output-only. Cluster UUID for the operation.", - "type": "string" - }, - "operationType": { - "description": "Output-only. The operation type.", - "type": "string" - } - }, - "id": "ClusterOperationMetadata" - }, - "HiveJob": { - "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", - "type": "object", - "properties": { - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scriptVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", - "type": "object" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", - "type": "object" - }, - "continueOnFailure": { - "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains Hive queries.", - "type": "string" - } - }, - "id": "HiveJob" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "DiagnoseClusterResults": { - "description": "The location of diagnostic output.", - "type": "object", - "properties": { - "outputUri": { - "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", - "type": "string" - } - }, - "id": "DiagnoseClusterResults" - }, - "ClusterConfig": { - "description": "The cluster config.", - "type": "object", - "properties": { - "initializationActions": { - "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", - "items": { - "$ref": "NodeInitializationAction" - }, - "type": "array" - }, - "configBucket": { - "description": "Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", - "type": "string" - }, - "workerConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster." - }, - "gceClusterConfig": { - "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster.", - "$ref": "GceClusterConfig" - }, - "softwareConfig": { - "$ref": "SoftwareConfig", - "description": "Optional. The config settings for software inside the cluster." - }, - "masterConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster." - }, - "secondaryWorkerConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster." - } - }, - "id": "ClusterConfig" - }, - "PySparkJob": { - "description": "A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN.", - "type": "object", - "properties": { - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - }, - "type": "array" - }, - "fileUris": { - "description": "Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "pythonFileUris": { - "description": "Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mainPythonFileUri": { - "description": "Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.", - "type": "string" - }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "PySparkJob" - }, - "GceClusterConfig": { - "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "type": "object", - "properties": { - "networkUri": { - "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault", - "type": "string" - }, - "zoneUri": { - "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", - "type": "string" - }, - "internalIpOnly": { - "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", - "type": "boolean" - }, - "metadata": { - "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "serviceAccountScopes": { - "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", - "items": { - "type": "string" - }, - "type": "array" - }, - "tags": { - "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccount": { - "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", - "type": "string" - }, - "subnetworkUri": { - "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", - "type": "string" - } - }, - "id": "GceClusterConfig" - }, - "ClusterMetrics": { - "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", - "type": "object", - "properties": { - "yarnMetrics": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "The YARN metrics.", - "type": "object" - }, - "hdfsMetrics": { - "description": "The HDFS metrics.", - "type": "object", - "additionalProperties": { - "format": "int64", - "type": "string" - } - } - }, - "id": "ClusterMetrics" - }, - "AcceleratorConfig": { - "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", - "type": "object", - "properties": { - "acceleratorCount": { - "format": "int32", - "description": "The number of the accelerator cards of this type exposed to this instance.", - "type": "integer" - }, - "acceleratorTypeUri": { - "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", - "type": "string" - } - }, - "id": "AcceleratorConfig" - }, - "LoggingConfig": { - "description": "The runtime logging config of the job.", - "type": "object", - "properties": { - "driverLogLevels": { - "additionalProperties": { - "type": "string", - "enum": [ - "LEVEL_UNSPECIFIED", - "ALL", - "TRACE", - "DEBUG", - "INFO", - "WARN", - "ERROR", - "FATAL", - "OFF" - ] - }, - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", - "type": "object" - } - }, - "id": "LoggingConfig" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", - "type": "object", - "properties": { - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", - "type": "string" - }, - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - } - }, - "id": "Operation" - }, - "JobReference": { - "description": "Encapsulates the full scoping used to reference a job.", - "type": "object", - "properties": { - "jobId": { - "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", - "type": "string" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string" - } - }, - "id": "JobReference" - }, - "SubmitJobRequest": { - "description": "A request to submit a job.", - "type": "object", - "properties": { - "job": { - "description": "Required. The job resource.", - "$ref": "Job" - } - }, - "id": "SubmitJobRequest" - }, - "Status": { - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - } - }, - "id": "Status" - }, - "JobScheduling": { - "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", - "type": "object", - "properties": { - "maxFailuresPerHour": { - "format": "int32", - "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", - "type": "integer" - } - }, - "id": "JobScheduling" - }, - "InstanceGroupConfig": { - "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "type": "object", - "properties": { - "accelerators": { - "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "numInstances": { - "format": "int32", - "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "type": "integer" - }, - "diskConfig": { - "description": "Optional. Disk option config settings.", - "$ref": "DiskConfig" - }, - "managedGroupConfig": { - "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", - "$ref": "ManagedGroupConfig" - }, - "isPreemptible": { - "description": "Optional. Specifies that this instance group contains preemptible instances.", - "type": "boolean" - }, - "imageUri": { - "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", - "type": "string" - }, - "machineTypeUri": { - "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", - "type": "string" - }, - "instanceNames": { - "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "InstanceGroupConfig" - }, - "NodeInitializationAction": { - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "type": "object", - "properties": { - "executableFile": { - "description": "Required. Google Cloud Storage URI of executable file.", - "type": "string" - }, - "executionTimeout": { - "format": "google-duration", - "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", - "type": "string" - } - }, - "id": "NodeInitializationAction" - }, - "ListJobsResponse": { - "description": "A list of jobs in a project.", - "type": "object", - "properties": { - "jobs": { - "description": "Output-only. Jobs list.", - "items": { - "$ref": "Job" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", - "type": "string" - } - }, - "id": "ListJobsResponse" - }, - "CancelJobRequest": { - "description": "A request to cancel a job.", - "type": "object", - "properties": {}, - "id": "CancelJobRequest" - }, - "SparkSqlJob": { - "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", - "type": "object", - "properties": { - "scriptVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", - "type": "object" - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "type": "object" - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains SQL queries.", - "type": "string" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - } - }, - "id": "SparkSqlJob" - }, - "Cluster": { - "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.", - "type": "object", - "properties": { - "labels": { - "description": "Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "metrics": { - "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", - "$ref": "ClusterMetrics" - }, - "status": { - "description": "Output-only. Cluster status.", - "$ref": "ClusterStatus" - }, - "config": { - "$ref": "ClusterConfig", - "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." - }, - "statusHistory": { - "description": "Output-only. The previous cluster status.", - "items": { - "$ref": "ClusterStatus" - }, - "type": "array" - }, - "clusterUuid": { - "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", - "type": "string" - }, - "clusterName": { - "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", - "type": "string" - }, - "projectId": { - "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", - "type": "string" - } - }, - "id": "Cluster" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListOperationsResponse" - }, - "SoftwareConfig": { - "description": "Specifies the selection and config of software inside the cluster.", - "type": "object", - "properties": { - "properties": { - "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "imageVersion": { - "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", - "type": "string" - } - }, - "id": "SoftwareConfig" - }, - "JobPlacement": { - "description": "Cloud Dataproc job config.", - "type": "object", - "properties": { - "clusterUuid": { - "description": "Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.", - "type": "string" - }, - "clusterName": { - "description": "Required. The name of the cluster where the job will be submitted.", - "type": "string" - } - }, - "id": "JobPlacement" - }, - "ClusterStatus": { - "description": "The status of a cluster and its instances.", - "type": "object", - "properties": { - "detail": { - "description": "Output-only. Optional details of cluster's state.", - "type": "string" - }, - "state": { - "enumDescriptions": [ - "The cluster state is unknown.", - "The cluster is being created and set up. It is not ready for use.", - "The cluster is currently running and healthy. It is ready for use.", - "The cluster encountered an error. It is not ready for use.", - "The cluster is being deleted. It cannot be used.", - "The cluster is being updated. It continues to accept and process jobs." - ], - "enum": [ - "UNKNOWN", - "CREATING", - "RUNNING", - "ERROR", - "DELETING", - "UPDATING" - ], - "description": "Output-only. The cluster's state.", - "type": "string" - }, - "substate": { - "enumDescriptions": [ - "", - "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", - "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." - ], - "enum": [ - "UNSPECIFIED", - "UNHEALTHY", - "STALE_STATUS" - ], - "description": "Output-only. Additional state information that includes status reported by the agent.", - "type": "string" - }, - "stateStartTime": { - "format": "google-datetime", - "description": "Output-only. Time when this state was entered.", - "type": "string" - } - }, - "id": "ClusterStatus" - }, - "PigJob": { - "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", - "type": "object", - "properties": { - "continueOnFailure": { - "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryList": { - "description": "A list of queries.", - "$ref": "QueryList" - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains the Pig queries.", - "type": "string" - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "scriptVariables": { - "description": "Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "Optional. The runtime log config for job execution." - }, - "properties": { - "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "PigJob" - }, "ListClustersResponse": { "description": "The list of all clusters in a project.", "type": "object", @@ -1504,48 +777,36 @@ "description": "A Cloud Dataproc job resource.", "type": "object", "properties": { - "status": { - "$ref": "JobStatus", - "description": "Output-only. The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields." - }, - "placement": { - "description": "Required. Job information, including how, when, and where to run the job.", - "$ref": "JobPlacement" - }, - "driverControlFilesUri": { - "description": "Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", - "type": "string" - }, "scheduling": { "$ref": "JobScheduling", "description": "Optional. Job scheduling configuration." }, "pigJob": { - "description": "Job is a Pig job.", - "$ref": "PigJob" + "$ref": "PigJob", + "description": "Job is a Pig job." }, "hiveJob": { "description": "Job is a Hive job.", "$ref": "HiveJob" }, "labels": { - "description": "Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", + "type": "object" }, "driverOutputResourceUri": { "description": "Output-only. A URI pointing to the location of the stdout of the job's driver program.", "type": "string" }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." + "description": "Job is a Spark job.", + "$ref": "SparkJob" + }, + "sparkSqlJob": { + "description": "Job is a SparkSql job.", + "$ref": "SparkSqlJob" }, "statusHistory": { "description": "Output-only. The previous job status.", @@ -1562,16 +823,28 @@ "type": "array" }, "pysparkJob": { - "description": "Job is a Pyspark job.", - "$ref": "PySparkJob" + "$ref": "PySparkJob", + "description": "Job is a Pyspark job." }, "reference": { "description": "Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e.", "$ref": "JobReference" }, "hadoopJob": { - "$ref": "HadoopJob", - "description": "Job is a Hadoop job." + "description": "Job is a Hadoop job.", + "$ref": "HadoopJob" + }, + "placement": { + "description": "Required. Job information, including how, when, and where to run the job.", + "$ref": "JobPlacement" + }, + "status": { + "description": "Output-only. The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields.", + "$ref": "JobStatus" + }, + "driverControlFilesUri": { + "description": "Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", + "type": "string" } }, "id": "Job" @@ -1580,28 +853,6 @@ "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN.", "type": "object", "properties": { - "mainJarFileUri": { - "description": "The HCFS URI of the jar file that contains the main class.", - "type": "string" - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" - }, - "properties": { - "description": "Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, "args": { "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", "items": { @@ -1626,6 +877,28 @@ "type": "string" }, "type": "array" + }, + "mainJarFileUri": { + "description": "The HCFS URI of the jar file that contains the main class.", + "type": "string" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" + }, + "properties": { + "description": "Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "id": "SparkJob" @@ -1639,8 +912,6 @@ "type": "string" }, "state": { - "description": "Output-only. A state message specifying the overall job state.", - "type": "string", "enumDescriptions": [ "The job state is unknown.", "The job is pending; it has been submitted, but is not yet running.", @@ -1664,7 +935,9 @@ "DONE", "ERROR", "ATTEMPT_FAILURE" - ] + ], + "description": "Output-only. A state message specifying the overall job state.", + "type": "string" }, "substate": { "enumDescriptions": [ @@ -1755,8 +1028,6 @@ "type": "number" }, "state": { - "description": "Required. The application state.", - "type": "string", "enumDescriptions": [ "Status is unspecified.", "Status is NEW.", @@ -1778,7 +1049,9 @@ "FINISHED", "FAILED", "KILLED" - ] + ], + "description": "Required. The application state.", + "type": "string" }, "name": { "description": "Required. The application name.", @@ -1805,6 +1078,17 @@ "description": "A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).", "type": "object", "properties": { + "mainClass": { + "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, "mainJarFileUri": { "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", "type": "string" @@ -1817,8 +1101,8 @@ "type": "array" }, "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." }, "properties": { "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", @@ -1840,50 +1124,766 @@ "type": "string" }, "type": "array" + } + }, + "id": "HadoopJob" + }, + "DiagnoseClusterRequest": { + "description": "A request to collect cluster diagnostic information.", + "type": "object", + "properties": {}, + "id": "DiagnoseClusterRequest" + }, + "DiskConfig": { + "description": "Specifies the config of disk options for a group of VM instances.", + "type": "object", + "properties": { + "bootDiskSizeGb": { + "format": "int32", + "description": "Optional. Size in GB of the boot disk (default is 500GB).", + "type": "integer" }, - "mainClass": { - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "numLocalSsds": { + "format": "int32", + "description": "Optional. Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are not attached, the boot disk is used to store runtime logs and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If one or more SSDs are attached, this runtime bulk data is spread across them, and the boot disk contains only basic config and installed binaries.", + "type": "integer" + } + }, + "id": "DiskConfig" + }, + "ClusterOperationMetadata": { + "description": "Metadata describing the operation.", + "type": "object", + "properties": { + "labels": { + "description": "Output-only. Labels associated with the operation", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "status": { + "$ref": "ClusterOperationStatus", + "description": "Output-only. Current operation status." + }, + "statusHistory": { + "description": "Output-only. The previous operation status.", + "items": { + "$ref": "ClusterOperationStatus" + }, + "type": "array" + }, + "clusterName": { + "description": "Output-only. Name of the cluster for the operation.", "type": "string" }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", + "clusterUuid": { + "description": "Output-only. Cluster UUID for the operation.", + "type": "string" + }, + "operationType": { + "description": "Output-only. The operation type.", + "type": "string" + }, + "description": { + "description": "Output-only. Short description of operation.", + "type": "string" + }, + "warnings": { + "description": "Output-only. Errors encountered during operation execution.", "items": { "type": "string" }, "type": "array" } }, - "id": "HadoopJob" + "id": "ClusterOperationMetadata" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:\nservice Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n}\nThe JSON representation for Empty is empty JSON object {}.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "HiveJob": { + "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scriptVariables": { + "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains Hive queries.", + "type": "string" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + } + }, + "id": "HiveJob" + }, + "DiagnoseClusterResults": { + "description": "The location of diagnostic output.", + "type": "object", + "properties": { + "outputUri": { + "description": "Output-only. The Google Cloud Storage URI of the diagnostic output. The output report is a plain text file with a summary of collected diagnostics.", + "type": "string" + } + }, + "id": "DiagnoseClusterResults" + }, + "ClusterConfig": { + "description": "The cluster config.", + "type": "object", + "properties": { + "masterConfig": { + "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster.", + "$ref": "InstanceGroupConfig" + }, + "secondaryWorkerConfig": { + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster." + }, + "initializationActions": { + "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's role metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", + "items": { + "$ref": "NodeInitializationAction" + }, + "type": "array" + }, + "configBucket": { + "description": "Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", + "type": "string" + }, + "workerConfig": { + "description": "Optional. The Google Compute Engine config settings for worker instances in a cluster.", + "$ref": "InstanceGroupConfig" + }, + "gceClusterConfig": { + "description": "Required. The shared Google Compute Engine config settings for all instances in a cluster.", + "$ref": "GceClusterConfig" + }, + "softwareConfig": { + "description": "Optional. The config settings for software inside the cluster.", + "$ref": "SoftwareConfig" + } + }, + "id": "ClusterConfig" + }, + "PySparkJob": { + "description": "A Cloud Dataproc job for running Apache PySpark (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) applications on YARN.", + "type": "object", + "properties": { + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileUris": { + "description": "Optional. HCFS URIs of files to be copied to the working directory of Python drivers and distributed tasks. Useful for naively parallel tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pythonFileUris": { + "description": "Optional. HCFS file URIs of Python files to pass to the PySpark framework. Supported file types: .py, .egg, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mainPythonFileUri": { + "description": "Required. The HCFS URI of the main Python file to use as the driver. Must be a .py file.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of .jar, .tar, .tar.gz, .tgz, and .zip.", + "items": { + "type": "string" + }, + "type": "array" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Python driver and tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "description": "Optional. A mapping of property names to values, used to configure PySpark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "id": "PySparkJob" + }, + "GceClusterConfig": { + "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", + "type": "object", + "properties": { + "serviceAccount": { + "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", + "type": "string" + }, + "subnetworkUri": { + "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", + "type": "string" + }, + "networkUri": { + "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault", + "type": "string" + }, + "zoneUri": { + "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", + "type": "object" + }, + "internalIpOnly": { + "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", + "type": "boolean" + }, + "serviceAccountScopes": { + "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", + "items": { + "type": "string" + }, + "type": "array" + }, + "tags": { + "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "GceClusterConfig" + }, + "AcceleratorConfig": { + "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", + "type": "object", + "properties": { + "acceleratorCount": { + "format": "int32", + "description": "The number of the accelerator cards of this type exposed to this instance.", + "type": "integer" + }, + "acceleratorTypeUri": { + "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", + "type": "string" + } + }, + "id": "AcceleratorConfig" + }, + "ClusterMetrics": { + "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "type": "object", + "properties": { + "yarnMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The YARN metrics.", + "type": "object" + }, + "hdfsMetrics": { + "additionalProperties": { + "format": "int64", + "type": "string" + }, + "description": "The HDFS metrics.", + "type": "object" + } + }, + "id": "ClusterMetrics" + }, + "LoggingConfig": { + "description": "The runtime logging config of the job.", + "type": "object", + "properties": { + "driverLogLevels": { + "additionalProperties": { + "enum": [ + "LEVEL_UNSPECIFIED", + "ALL", + "TRACE", + "DEBUG", + "INFO", + "WARN", + "ERROR", + "FATAL", + "OFF" + ], + "type": "string" + }, + "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", + "type": "object" + } + }, + "id": "LoggingConfig" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + } + }, + "id": "Operation" + }, + "JobReference": { + "description": "Encapsulates the full scoping used to reference a job.", + "type": "object", + "properties": { + "jobId": { + "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string" + } + }, + "id": "JobReference" + }, + "SubmitJobRequest": { + "description": "A request to submit a job.", + "type": "object", + "properties": { + "job": { + "description": "Required. The job resource.", + "$ref": "Job" + } + }, + "id": "SubmitJobRequest" + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "JobScheduling": { + "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", + "type": "object", + "properties": { + "maxFailuresPerHour": { + "format": "int32", + "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", + "type": "integer" + } + }, + "id": "JobScheduling" + }, + "InstanceGroupConfig": { + "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", + "type": "object", + "properties": { + "machineTypeUri": { + "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", + "type": "string" + }, + "imageUri": { + "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", + "type": "string" + }, + "isPreemptible": { + "description": "Optional. Specifies that this instance group contains preemptible instances.", + "type": "boolean" + }, + "managedGroupConfig": { + "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", + "$ref": "ManagedGroupConfig" + }, + "instanceNames": { + "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", + "items": { + "type": "string" + }, + "type": "array" + }, + "accelerators": { + "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "numInstances": { + "format": "int32", + "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "type": "integer" + }, + "diskConfig": { + "description": "Optional. Disk option config settings.", + "$ref": "DiskConfig" + } + }, + "id": "InstanceGroupConfig" + }, + "NodeInitializationAction": { + "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", + "type": "object", + "properties": { + "executionTimeout": { + "format": "google-duration", + "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", + "type": "string" + }, + "executableFile": { + "description": "Required. Google Cloud Storage URI of executable file.", + "type": "string" + } + }, + "id": "NodeInitializationAction" + }, + "ListJobsResponse": { + "description": "A list of jobs in a project.", + "type": "object", + "properties": { + "jobs": { + "description": "Output-only. Jobs list.", + "items": { + "$ref": "Job" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", + "type": "string" + } + }, + "id": "ListJobsResponse" + }, + "CancelJobRequest": { + "description": "A request to cancel a job.", + "type": "object", + "properties": {}, + "id": "CancelJobRequest" + }, + "SparkSqlJob": { + "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", + "type": "object", + "properties": { + "scriptVariables": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", + "type": "object" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains SQL queries.", + "type": "string" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + } + }, + "id": "SparkSqlJob" + }, + "Cluster": { + "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", + "type": "object" + }, + "status": { + "$ref": "ClusterStatus", + "description": "Output-only. Cluster status." + }, + "metrics": { + "$ref": "ClusterMetrics", + "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release." + }, + "config": { + "$ref": "ClusterConfig", + "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." + }, + "statusHistory": { + "description": "Output-only. The previous cluster status.", + "items": { + "$ref": "ClusterStatus" + }, + "type": "array" + }, + "clusterName": { + "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", + "type": "string" + }, + "clusterUuid": { + "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", + "type": "string" + }, + "projectId": { + "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", + "type": "string" + } + }, + "id": "Cluster" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "id": "ListOperationsResponse" + }, + "JobPlacement": { + "description": "Cloud Dataproc job config.", + "type": "object", + "properties": { + "clusterUuid": { + "description": "Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.", + "type": "string" + }, + "clusterName": { + "description": "Required. The name of the cluster where the job will be submitted.", + "type": "string" + } + }, + "id": "JobPlacement" + }, + "SoftwareConfig": { + "description": "Specifies the selection and config of software inside the cluster.", + "type": "object", + "properties": { + "imageVersion": { + "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", + "type": "string" + }, + "properties": { + "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "id": "SoftwareConfig" + }, + "ClusterStatus": { + "description": "The status of a cluster and its instances.", + "type": "object", + "properties": { + "substate": { + "description": "Output-only. Additional state information that includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", + "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "UNHEALTHY", + "STALE_STATUS" + ] + }, + "stateStartTime": { + "format": "google-datetime", + "description": "Output-only. Time when this state was entered.", + "type": "string" + }, + "detail": { + "description": "Output-only. Optional details of cluster's state.", + "type": "string" + }, + "state": { + "description": "Output-only. The cluster's state.", + "type": "string", + "enumDescriptions": [ + "The cluster state is unknown.", + "The cluster is being created and set up. It is not ready for use.", + "The cluster is currently running and healthy. It is ready for use.", + "The cluster encountered an error. It is not ready for use.", + "The cluster is being deleted. It cannot be used.", + "The cluster is being updated. It continues to accept and process jobs." + ], + "enum": [ + "UNKNOWN", + "CREATING", + "RUNNING", + "ERROR", + "DELETING", + "UPDATING" + ] + } + }, + "id": "ClusterStatus" + }, + "PigJob": { + "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scriptVariables": { + "description": "Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "loggingConfig": { + "$ref": "LoggingConfig", + "description": "Optional. The runtime log config for job execution." + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", + "type": "object" + }, + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains the Pig queries.", + "type": "string" + } + }, + "id": "PigJob" } }, + "icons": { + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" + }, "protocol": "rest", - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "version": "v1", - "baseUrl": "https://dataproc.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "servicePath": "", - "description": "Manages Hadoop-based clusters and jobs on Google Cloud Platform.", - "kind": "discovery#restDescription", - "rootUrl": "https://dataproc.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "dataproc", - "batchPath": "batch", - "id": "dataproc:v1", - "documentationLink": "https://cloud.google.com/dataproc/", - "revision": "20170912", - "title": "Google Cloud Dataproc API", - "ownerName": "Google", - "discoveryVersion": "v1" + "version": "v1" } diff --git a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json index d49353eeb..38b0fe315 100644 --- a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json +++ b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-api.json @@ -1,39 +1,601 @@ { - "batchPath": "batch", - "documentationLink": "https://cloud.google.com/dataproc/", - "id": "dataproc:v1beta2", - "revision": "20170912", "title": "Google Cloud Dataproc API", - "ownerName": "Google", "discoveryVersion": "v1", + "ownerName": "Google", "version_module": true, "resources": { "projects": { "resources": { "regions": { "resources": { + "operations": { + "methods": { + "cancel": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel", + "id": "dataproc.projects.regions.operations.cancel", + "path": "v1beta2/{+name}:cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED." + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", + "id": "dataproc.projects.regions.operations.delete", + "path": "v1beta2/{+name}", + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED." + }, + "get": { + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", + "path": "v1beta2/{+name}", + "id": "dataproc.projects.regions.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", + "location": "path" + } + } + }, + "list": { + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations", + "id": "dataproc.projects.regions.operations.list", + "path": "v1beta2/{+name}", + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "name": { + "description": "The name of the operation's parent resource.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/operations$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "jobs": { + "methods": { + "cancel": { + "request": { + "$ref": "CancelJobRequest" + }, + "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.", + "httpMethod": "POST", + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "jobId": { + "description": "Required. The job ID.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", + "id": "dataproc.projects.regions.jobs.cancel" + }, + "get": { + "description": "Gets the resource representation for a job in a project.", + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + }, + "jobId": { + "location": "path", + "description": "Required. The job ID.", + "type": "string", + "required": true + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.get", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}" + }, + "patch": { + "description": "Updates a job in a project.", + "request": { + "$ref": "Job" + }, + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "PATCH", + "parameters": { + "jobId": { + "description": "Required. The job ID.", + "type": "string", + "required": true, + "location": "path" + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + }, + "updateMask": { + "location": "query", + "format": "google-fieldmask", + "description": "Required. Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", + "type": "string" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.patch", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}" + }, + "submit": { + "description": "Submits a job to a cluster.", + "request": { + "$ref": "SubmitJobRequest" + }, + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "POST", + "parameters": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit", + "id": "dataproc.projects.regions.jobs.submit", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "projectId", + "region", + "jobId" + ], + "httpMethod": "DELETE", + "parameters": { + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "jobId": { + "location": "path", + "description": "Required. The job ID.", + "type": "string", + "required": true + }, + "projectId": { + "location": "path", + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "id": "dataproc.projects.regions.jobs.delete", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", + "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION." + }, + "list": { + "httpMethod": "GET", + "response": { + "$ref": "ListJobsResponse" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional. The number of results to return in each response.", + "type": "integer" + }, + "region": { + "location": "path", + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true + }, + "clusterName": { + "location": "query", + "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "filter": { + "location": "query", + "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", + "type": "string" + }, + "jobStateMatcher": { + "location": "query", + "enum": [ + "ALL", + "ACTIVE", + "NON_ACTIVE" + ], + "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "Optional. The page token, returned by a previous call, to request the next page of results.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs", + "path": "v1beta2/projects/{projectId}/regions/{region}/jobs", + "id": "dataproc.projects.regions.jobs.list", + "description": "Lists regions/{region}/jobs in a project." + } + } + }, + "workflowTemplates": { + "methods": { + "get": { + "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.", + "response": { + "$ref": "WorkflowTemplate" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "version": { + "format": "int32", + "description": "Optional The version of workflow template to retrieve. Only previously instatiated versions can be retrieved.If unspecified, retrieves the current version.", + "type": "integer", + "location": "query" + }, + "name": { + "description": "Required The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}", + "id": "dataproc.projects.regions.workflowTemplates.get", + "path": "v1beta2/{+name}" + }, + "update": { + "response": { + "$ref": "WorkflowTemplate" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "PUT", + "parameters": { + "name": { + "location": "path", + "description": "Output-only The \"resource name\" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}", + "id": "dataproc.projects.regions.workflowTemplates.update", + "path": "v1beta2/{+name}", + "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.", + "request": { + "$ref": "WorkflowTemplate" + } + }, + "delete": { + "description": "Deletes a workflow template. It does not cancel in-progress workflows.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "parameters": { + "version": { + "location": "query", + "format": "int32", + "description": "Optional The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.", + "type": "integer" + }, + "name": { + "description": "Required The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}", + "id": "dataproc.projects.regions.workflowTemplates.delete", + "path": "v1beta2/{+name}" + }, + "list": { + "description": "Lists workflows that match the specified filter in the request.", + "response": { + "$ref": "ListWorkflowTemplatesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "pageToken": { + "description": "Optional The page token, returned by a previous call, to request the next page of results.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Optional The maximum number of results to return in each response.", + "type": "integer", + "location": "query" + }, + "parent": { + "description": "Required The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates", + "id": "dataproc.projects.regions.workflowTemplates.list", + "path": "v1beta2/{+parent}/workflowTemplates" + }, + "create": { + "description": "Creates new workflow template.", + "request": { + "$ref": "WorkflowTemplate" + }, + "response": { + "$ref": "WorkflowTemplate" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "location": "path", + "description": "Required The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates", + "id": "dataproc.projects.regions.workflowTemplates.create", + "path": "v1beta2/{+parent}/workflowTemplates" + }, + "instantiate": { + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:instantiate", + "id": "dataproc.projects.regions.workflowTemplates.instantiate", + "path": "v1beta2/{+name}:instantiate", + "request": { + "$ref": "InstantiateWorkflowTemplateRequest" + }, + "description": "Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling google.cloud.dataproc.v1beta2.OperationService.GetOperation. The Operation will complete when entire workflow is finished.The running workflow can be aborted via google.cloud.dataproc.v1beta2.OperationService.CancelOperation.The google.cloud.dataproc.v1beta2.Operation.metadata will always be google.cloud.dataproc.v1beta2.WorkflowMetadata.The google.cloud.dataproc.v1beta2.Operation.result will always be google.protobuf.Empty.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "Required The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$" + } + } + } + } + }, "clusters": { "methods": { "patch": { - "description": "Updates a cluster in a project.", - "request": { - "$ref": "Cluster" + "response": { + "$ref": "Operation" }, - "httpMethod": "PATCH", "parameterOrder": [ "projectId", "region", "clusterName" ], - "response": { - "$ref": "Operation" - }, + "httpMethod": "PATCH", "parameters": { "updateMask": { + "location": "query", "format": "google-fieldmask", "description": "Required. Specifies the path, relative to \u003ccode\u003eCluster\u003c/code\u003e, of the field to update. For example, to change the number of workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003econfig.worker_config.num_instances\u003c/code\u003e, and the PATCH request body would specify the new value, as follows:\n{\n \"config\":{\n \"workerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be \u003ccode\u003econfig.secondary_worker_config.num_instances\u003c/code\u003e, and the PATCH request body would be set as follows:\n{\n \"config\":{\n \"secondaryWorkerConfig\":{\n \"numInstances\":\"5\"\n }\n }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e currently only some fields can be updated: |Mask|Purpose| |labels|Updates labels| |config.worker_config.num_instances|Resize primary worker group| |config.secondary_worker_config.num_instances|Resize secondary worker group|", - "type": "string", - "location": "query" + "type": "string" }, "region": { "description": "Required. The Cloud Dataproc region in which to handle the request.", @@ -42,16 +604,16 @@ "location": "path" }, "clusterName": { + "location": "path", "description": "Required. The cluster name.", "type": "string", - "required": true, - "location": "path" + "required": true }, "gracefulDecommissionTimeout": { + "location": "query", "format": "google-duration", "description": "Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day.Only supported on Dataproc image versions 1.2 and higher.", - "type": "string", - "location": "query" + "type": "string" }, "projectId": { "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.", @@ -64,28 +626,33 @@ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.patch", "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.patch" + "description": "Updates a cluster in a project.", + "request": { + "$ref": "Cluster" + } }, "get": { - "response": { - "$ref": "Cluster" - }, + "description": "Gets the resource representation for a cluster in a project.", "parameterOrder": [ "projectId", "region", "clusterName" ], + "response": { + "$ref": "Cluster" + }, "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "region": { - "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", - "required": true + "required": true, + "location": "path" }, "clusterName": { "description": "Required. The cluster name.", @@ -102,23 +669,53 @@ }, "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", "id": "dataproc.projects.regions.clusters.get", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "description": "Gets the resource representation for a cluster in a project." + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}" }, - "diagnose": { - "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", + "testIamPermissions": { "request": { - "$ref": "DiagnoseClusterRequest" + "$ref": "TestIamPermissionsRequest" }, + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], "response": { - "$ref": "Operation" + "$ref": "TestIamPermissionsResponse" }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:testIamPermissions", + "path": "v1beta2/{+resource}:testIamPermissions", + "id": "dataproc.projects.regions.clusters.testIamPermissions" + }, + "delete": { + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", + "id": "dataproc.projects.regions.clusters.delete", + "description": "Deletes a cluster in a project.", + "httpMethod": "DELETE", "parameterOrder": [ "projectId", "region", "clusterName" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "region": { "description": "Required. The Cloud Dataproc region in which to handle the request.", @@ -133,42 +730,36 @@ "location": "path" }, "projectId": { + "location": "path", "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", "type": "string", - "required": true, - "location": "path" + "required": true } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", - "id": "dataproc.projects.regions.clusters.diagnose", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose" + } }, - "delete": { - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}", - "id": "dataproc.projects.regions.clusters.delete", - "description": "Deletes a cluster in a project.", - "httpMethod": "DELETE", - "response": { - "$ref": "Operation" + "diagnose": { + "request": { + "$ref": "DiagnoseClusterRequest" }, + "description": "Gets cluster diagnostic information. After the operation completes, the Operation.response field contains DiagnoseClusterOutputLocation.", + "httpMethod": "POST", "parameterOrder": [ "projectId", "region", "clusterName" ], + "response": { + "$ref": "Operation" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "region": { + "location": "path", "description": "Required. The Cloud Dataproc region in which to handle the request.", "type": "string", - "required": true, - "location": "path" + "required": true }, "clusterName": { "location": "path", @@ -182,12 +773,12 @@ "required": true, "location": "path" } - } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose", + "id": "dataproc.projects.regions.clusters.diagnose" }, "list": { - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.list", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters", "description": "Lists all regions/{region}/clusters in a project.", "response": { "$ref": "ListClustersResponse" @@ -214,9 +805,9 @@ "required": true }, "filter": { + "location": "query", "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *", - "type": "string", - "location": "query" + "type": "string" }, "region": { "location": "path", @@ -225,429 +816,291 @@ "required": true }, "pageToken": { - "location": "query", "description": "Optional. The standard List page token.", + "type": "string", + "location": "query" + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.list", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters" + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:setIamPolicy", + "id": "dataproc.projects.regions.clusters.setIamPolicy", + "path": "v1beta2/{+resource}:setIamPolicy" + }, + "create": { + "request": { + "$ref": "Cluster" + }, + "description": "Creates a cluster in a project.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "projectId", + "region" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", + "type": "string", + "required": true, + "location": "path" + }, + "region": { + "description": "Required. The Cloud Dataproc region in which to handle the request.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters", + "id": "dataproc.projects.regions.clusters.create", + "path": "v1beta2/projects/{projectId}/regions/{region}/clusters" + }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "httpMethod": "GET", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:getIamPolicy", + "path": "v1beta2/{+resource}:getIamPolicy", + "id": "dataproc.projects.regions.clusters.getIamPolicy" + } + } + } + } + }, + "locations": { + "resources": { + "workflowTemplates": { + "methods": { + "list": { + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates", + "id": "dataproc.projects.locations.workflowTemplates.list", + "path": "v1beta2/{+parent}/workflowTemplates", + "description": "Lists workflows that match the specified filter in the request.", + "response": { + "$ref": "ListWorkflowTemplatesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Optional The maximum number of results to return in each response.", + "type": "integer" + }, + "parent": { + "location": "path", + "description": "Required The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$" + }, + "pageToken": { + "location": "query", + "description": "Optional The page token, returned by a previous call, to request the next page of results.", "type": "string" } } }, "create": { + "request": { + "$ref": "WorkflowTemplate" + }, + "description": "Creates new workflow template.", + "response": { + "$ref": "WorkflowTemplate" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "parent": { + "description": "Required The \"resource name\" of the region, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates", + "id": "dataproc.projects.locations.workflowTemplates.create", + "path": "v1beta2/{+parent}/workflowTemplates" + }, + "instantiate": { + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:instantiate", + "id": "dataproc.projects.locations.workflowTemplates.instantiate", + "path": "v1beta2/{+name}:instantiate", + "request": { + "$ref": "InstantiateWorkflowTemplateRequest" + }, + "description": "Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling google.cloud.dataproc.v1beta2.OperationService.GetOperation. The Operation will complete when entire workflow is finished.The running workflow can be aborted via google.cloud.dataproc.v1beta2.OperationService.CancelOperation.The google.cloud.dataproc.v1beta2.Operation.metadata will always be google.cloud.dataproc.v1beta2.WorkflowMetadata.The google.cloud.dataproc.v1beta2.Operation.result will always be google.protobuf.Empty.", "response": { "$ref": "Operation" }, - "parameterOrder": [ - "projectId", - "region" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters", - "id": "dataproc.projects.regions.clusters.create", - "path": "v1beta2/projects/{projectId}/regions/{region}/clusters", - "request": { - "$ref": "Cluster" - }, - "description": "Creates a cluster in a project." - } - } - }, - "operations": { - "methods": { - "cancel": { - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel", - "id": "dataproc.projects.regions.operations.cancel", - "path": "v1beta2/{+name}:cancel", - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", - "response": { - "$ref": "Empty" - }, "parameterOrder": [ "name" ], "httpMethod": "POST", - "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "name": { - "description": "The name of the operation resource to be deleted.", + "description": "Required The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", "type": "string", "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$", "location": "path" } - }, - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", - "path": "v1beta2/{+name}", - "id": "dataproc.projects.regions.operations.delete", - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED." + } }, "get": { - "httpMethod": "GET", "response": { - "$ref": "Operation" + "$ref": "WorkflowTemplate" }, "parameterOrder": [ "name" ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { "name": { "location": "path", - "description": "The name of the operation resource.", + "description": "Required The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", "type": "string", "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$" - } - }, - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}", - "path": "v1beta2/{+name}", - "id": "dataproc.projects.regions.operations.get", - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service." - }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" + "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$" }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "required": true, - "pattern": "^projects/[^/]+/regions/[^/]+/operations$", - "location": "path" - }, - "pageSize": { + "version": { "location": "query", "format": "int32", - "description": "The standard list page size.", + "description": "Optional The version of workflow template to retrieve. Only previously instatiated versions can be retrieved.If unspecified, retrieves the current version.", "type": "integer" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations", + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}", + "id": "dataproc.projects.locations.workflowTemplates.get", "path": "v1beta2/{+name}", - "id": "dataproc.projects.regions.operations.list" - } - } - }, - "jobs": { - "methods": { - "patch": { - "description": "Updates a job in a project.", - "request": { - "$ref": "Job" - }, - "response": { - "$ref": "Job" - }, + "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter." + }, + "update": { + "httpMethod": "PUT", "parameterOrder": [ - "projectId", - "region", - "jobId" + "name" + ], + "response": { + "$ref": "WorkflowTemplate" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" ], - "httpMethod": "PATCH", "parameters": { - "updateMask": { - "format": "google-fieldmask", - "description": "Required. Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.", - "type": "string", - "location": "query" - }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", + "name": { + "location": "path", + "description": "Output-only The \"resource name\" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", "type": "string", "required": true, - "location": "path" - }, - "jobId": { - "description": "Required. The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true + "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.patch", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}" - }, - "get": { - "description": "Gets the resource representation for a job in a project.", - "httpMethod": "GET", - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "parameters": { - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "jobId": { - "location": "path", - "description": "Required. The job ID.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.get" - }, - "submit": { + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}", + "path": "v1beta2/{+name}", + "id": "dataproc.projects.locations.workflowTemplates.update", "request": { - "$ref": "SubmitJobRequest" + "$ref": "WorkflowTemplate" }, - "description": "Submits a job to a cluster.", - "httpMethod": "POST", - "parameterOrder": [ - "projectId", - "region" - ], - "response": { - "$ref": "Job" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit", - "id": "dataproc.projects.regions.jobs.submit" + "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version." }, "delete": { + "description": "Deletes a workflow template. It does not cancel in-progress workflows.", "response": { "$ref": "Empty" }, "parameterOrder": [ - "projectId", - "region", - "jobId" + "name" ], "httpMethod": "DELETE", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true, - "location": "path" - }, - "jobId": { - "description": "Required. The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "id": "dataproc.projects.regions.jobs.delete", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}", - "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION." - }, - "list": { - "httpMethod": "GET", - "response": { - "$ref": "ListJobsResponse" - }, - "parameterOrder": [ - "projectId", - "region" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "filter": { - "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or INACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *", - "type": "string", - "location": "query" - }, - "jobStateMatcher": { + "version": { "location": "query", - "enum": [ - "ALL", - "ACTIVE", - "NON_ACTIVE" - ], - "description": "Optional. Specifies enumerated categories of jobs to list (default = match ALL jobs).", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "Optional. The page token, returned by a previous call, to request the next page of results.", - "type": "string" - }, - "pageSize": { "format": "int32", - "description": "Optional. The number of results to return in each response.", - "type": "integer", - "location": "query" + "description": "Optional The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.", + "type": "integer" }, - "region": { - "description": "Required. The Cloud Dataproc region in which to handle the request.", + "name": { + "location": "path", + "description": "Required The \"resource name\" of the workflow template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", "type": "string", "required": true, - "location": "path" - }, - "clusterName": { - "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.", - "type": "string", - "location": "query" - }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true, - "location": "path" + "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$" } }, - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs", - "id": "dataproc.projects.regions.jobs.list", - "description": "Lists regions/{region}/jobs in a project." - }, - "cancel": { - "response": { - "$ref": "Job" - }, - "parameterOrder": [ - "projectId", - "region", - "jobId" - ], - "httpMethod": "POST", - "parameters": { - "region": { - "location": "path", - "description": "Required. The Cloud Dataproc region in which to handle the request.", - "type": "string", - "required": true - }, - "jobId": { - "description": "Required. The job ID.", - "type": "string", - "required": true, - "location": "path" - }, - "projectId": { - "location": "path", - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "id": "dataproc.projects.regions.jobs.cancel", - "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel", - "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.", - "request": { - "$ref": "CancelJobRequest" - } + "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}", + "id": "dataproc.projects.locations.workflowTemplates.delete", + "path": "v1beta2/{+name}" } } } @@ -657,6 +1110,27 @@ } }, "parameters": { + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", @@ -674,12 +1148,7 @@ "location": "query" }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "callback": { - "description": "JSONP", "type": "string", "location": "query" }, @@ -696,7 +1165,13 @@ "2" ] }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "alt": { + "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -709,53 +1184,165 @@ "json", "media", "proto" - ], - "type": "string" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" + ] }, "access_token": { "description": "OAuth access token.", "type": "string", "location": "query" }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string", "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" } }, "schemas": { - "ClusterOperationStatus": { - "description": "The status of the operation.", + "JobScheduling": { + "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", "type": "object", "properties": { - "details": { - "description": "Output-only.A message containing any operation metadata details.", + "maxFailuresPerHour": { + "format": "int32", + "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", + "type": "integer" + } + }, + "id": "JobScheduling" + }, + "Cluster": { + "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.", + "type": "object", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", + "type": "object" + }, + "metrics": { + "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "$ref": "ClusterMetrics" + }, + "status": { + "$ref": "ClusterStatus", + "description": "Output-only. Cluster status." + }, + "statusHistory": { + "description": "Output-only. The previous cluster status.", + "items": { + "$ref": "ClusterStatus" + }, + "type": "array" + }, + "config": { + "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated.", + "$ref": "ClusterConfig" + }, + "clusterUuid": { + "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", "type": "string" }, + "clusterName": { + "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", + "type": "string" + }, + "projectId": { + "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", + "type": "string" + } + }, + "id": "Cluster" + }, + "TestIamPermissionsResponse": { + "description": "Response message for TestIamPermissions method.", + "type": "object", + "properties": { + "permissions": { + "description": "A subset of TestPermissionsRequest.permissions that the caller is allowed.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsResponse" + }, + "SoftwareConfig": { + "description": "Specifies the selection and config of software inside the cluster.", + "type": "object", + "properties": { + "properties": { + "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "imageVersion": { + "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", + "type": "string" + } + }, + "id": "SoftwareConfig" + }, + "ClusterSelector": { + "description": "A selector that chooses target cluster for jobs based on metadata.", + "type": "object", + "properties": { + "zone": { + "description": "Required The cluster target zone.", + "type": "string" + }, + "clusterLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "Required The cluster labels. Cluster must have all labels to match.", + "type": "object" + } + }, + "id": "ClusterSelector" + }, + "WorkflowTemplatePlacement": { + "description": "Specifies workflow execution target.Either managed_cluster or cluster_selector is required.", + "type": "object", + "properties": { + "clusterSelector": { + "$ref": "ClusterSelector", + "description": "Optional A selector that chooses target cluster for jobs based on metadata.The selector is evaluated at the time each job is submitted." + }, + "managedCluster": { + "$ref": "ManagedCluster", + "description": "Optional A cluster that is managed by the workflow." + } + }, + "id": "WorkflowTemplatePlacement" + }, + "ClusterOperation": { + "type": "object", + "properties": { + "error": { + "description": "Output-only Error, if operation failed.", + "type": "string" + }, + "operationId": { + "description": "Output-only The id of the cluster operation.", + "type": "string" + }, + "done": { + "description": "Output-only Indicates the operation is done.", + "type": "boolean" + } + }, + "id": "ClusterOperation" + }, + "WorkflowMetadata": { + "description": "A Cloud Dataproc workflow template resource.", + "type": "object", + "properties": { "state": { - "description": "Output-only. A message containing the operation state.", - "type": "string", "enumDescriptions": [ "Unused.", "The operation has been created.", @@ -767,133 +1354,151 @@ "PENDING", "RUNNING", "DONE" - ] - }, - "innerState": { - "description": "Output-only. A message containing the detailed operation state.", + ], + "description": "Output-only The workflow state.", "type": "string" }, - "stateStartTime": { - "format": "google-datetime", - "description": "Output-only. The time this state was entered.", + "clusterName": { + "description": "Output-only The name of the managed cluster.", "type": "string" + }, + "createCluster": { + "$ref": "ClusterOperation", + "description": "Output-only The create cluster operation metadata." + }, + "graph": { + "description": "Output-only The workflow graph.", + "$ref": "WorkflowGraph" + }, + "version": { + "format": "int32", + "description": "Output-only The version of template at the time of workflow instantiation.", + "type": "integer" + }, + "template": { + "description": "Output-only The \"resource name\" of the template.", + "type": "string" + }, + "deleteCluster": { + "$ref": "ClusterOperation", + "description": "Output-only The delete cluster operation metadata." } }, - "id": "ClusterOperationStatus" + "id": "WorkflowMetadata" }, - "HadoopJob": { - "description": "A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).", + "SparkJob": { + "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN.", "type": "object", "properties": { + "mainJarFileUri": { + "description": "The HCFS URI of the jar file that contains the main class.", + "type": "string" + }, "jarFileUris": { - "description": "Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", "items": { "type": "string" }, "type": "array" }, "loggingConfig": { - "$ref": "LoggingConfig", - "description": "Optional. The runtime log config for job execution." + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" }, "properties": { - "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", - "type": "object", "additionalProperties": { "type": "string" - } + }, + "description": "Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", + "type": "object" }, "args": { - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", "items": { "type": "string" }, "type": "array" }, "fileUris": { - "description": "Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", + "description": "Optional. HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", "items": { "type": "string" }, "type": "array" }, "mainClass": { - "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", "type": "string" }, "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mainJarFileUri": { - "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", - "type": "string" - } - }, - "id": "HadoopJob" - }, - "QueryList": { - "description": "A list of queries to run on a cluster.", - "type": "object", - "properties": { - "queries": { - "description": "Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", "items": { "type": "string" }, "type": "array" } }, - "id": "QueryList" + "id": "SparkJob" }, - "YarnApplication": { - "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "JobStatus": { + "description": "Cloud Dataproc job status.", "type": "object", "properties": { - "trackingUrl": { - "description": "Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", + "substate": { + "description": "Output-only. Additional state information, which includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The Job is submitted to the agent.Applies to RUNNING state.", + "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", + "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "SUBMITTED", + "QUEUED", + "STALE_STATUS" + ] + }, + "stateStartTime": { + "format": "google-datetime", + "description": "Output-only. The time when this state was entered.", "type": "string" }, - "progress": { - "format": "float", - "description": "Required. The numerical progress of the application, from 1 to 100.", - "type": "number" + "details": { + "description": "Output-only. Optional job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e.", + "type": "string" }, "state": { + "description": "Output-only. A state message specifying the overall job state.", + "type": "string", "enumDescriptions": [ - "Status is unspecified.", - "Status is NEW.", - "Status is NEW_SAVING.", - "Status is SUBMITTED.", - "Status is ACCEPTED.", - "Status is RUNNING.", - "Status is FINISHED.", - "Status is FAILED.", - "Status is KILLED." + "The job state is unknown.", + "The job is pending; it has been submitted, but is not yet running.", + "Job has been received by the service and completed initial setup; it will soon be submitted to the cluster.", + "The job is running on the cluster.", + "A CancelJob request has been received, but is pending.", + "Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.", + "The job cancellation was successful.", + "The job has completed successfully.", + "The job has completed, but encountered an error.", + "Job attempt has failed. The detail field contains failure details for this attempt.Applies to restartable jobs only." ], "enum": [ "STATE_UNSPECIFIED", - "NEW", - "NEW_SAVING", - "SUBMITTED", - "ACCEPTED", + "PENDING", + "SETUP_DONE", "RUNNING", - "FINISHED", - "FAILED", - "KILLED" - ], - "description": "Required. The application state.", - "type": "string" - }, - "name": { - "description": "Required. The application name.", - "type": "string" + "CANCEL_PENDING", + "CANCEL_STARTED", + "CANCELLED", + "DONE", + "ERROR", + "ATTEMPT_FAILURE" + ] } }, - "id": "YarnApplication" + "id": "JobStatus" }, "DiagnoseClusterRequest": { "description": "A request to collect cluster diagnostic information.", @@ -940,14 +1545,14 @@ }, "type": "array" }, - "clusterUuid": { - "description": "Output-only. Cluster UUID for the operation.", - "type": "string" - }, "clusterName": { "description": "Output-only. Name of the cluster for the operation.", "type": "string" }, + "clusterUuid": { + "description": "Output-only. Cluster UUID for the operation.", + "type": "string" + }, "operationType": { "description": "Output-only. The operation type.", "type": "string" @@ -972,17 +1577,822 @@ "properties": {}, "id": "Empty" }, - "HiveJob": { - "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", + "GceClusterConfig": { + "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", "type": "object", "properties": { + "networkUri": { + "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault", + "type": "string" + }, + "zoneUri": { + "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", + "type": "string" + }, + "metadata": { + "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "internalIpOnly": { + "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", + "type": "boolean" + }, + "serviceAccountScopes": { + "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", + "items": { + "type": "string" + }, + "type": "array" + }, + "tags": { + "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", + "items": { + "type": "string" + }, + "type": "array" + }, + "serviceAccount": { + "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", + "type": "string" + }, + "subnetworkUri": { + "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", + "type": "string" + } + }, + "id": "GceClusterConfig" + }, + "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources.A Policy consists of a list of bindings. A Binding binds a list of members to a role, where the members can be user accounts, Google groups, Google domains, and service accounts. A role is a named list of permissions defined by IAM.Example\n{\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n}\nFor a description of IAM and its features, see the IAM developer's guide (https://cloud.google.com/iam).", + "type": "object", + "properties": { + "etag": { + "format": "byte", + "description": "etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to getIamPolicy, and systems are expected to put that etag in the request to setIamPolicy to ensure that their change will be applied to the same version of the policy.If no etag is provided in the call to setIamPolicy, then the existing policy is overwritten blindly.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the Policy. The default version is 0.", + "type": "integer" + }, + "bindings": { + "description": "Associates a list of members to a role. bindings with no members will result in an error.", + "items": { + "$ref": "Binding" + }, + "type": "array" + } + }, + "id": "Policy" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "type": "object", + "properties": { + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" + }, + "metadata": { + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "type": "string" + } + }, + "id": "Operation" + }, + "ListWorkflowTemplatesResponse": { + "description": "A response to a request to list workflow templates in a project.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Output-only This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListWorkflowTemplatesRequest\u003c/code\u003e.", + "type": "string" + }, + "templates": { + "description": "Output-only WorkflowTemplates list.", + "items": { + "$ref": "WorkflowTemplate" + }, + "type": "array" + } + }, + "id": "ListWorkflowTemplatesResponse" + }, + "JobReference": { + "description": "Encapsulates the full scoping used to reference a job.", + "type": "object", + "properties": { + "jobId": { + "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", + "type": "string" + }, + "projectId": { + "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", + "type": "string" + } + }, + "id": "JobReference" + }, + "Status": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + } + }, + "id": "Status" + }, + "Binding": { + "description": "Associates members with a role.", + "type": "object", + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource. members can have the following values:\nallUsers: A special identifier that represents anyone who is on the internet; with or without a Google account.\nallAuthenticatedUsers: A special identifier that represents anyone who is authenticated with a Google account or a service account.\nuser:{emailid}: An email address that represents a specific Google account. For example, alice@gmail.com or joe@example.com.\nserviceAccount:{emailid}: An email address that represents a service account. For example, my-other-app@appspot.gserviceaccount.com.\ngroup:{emailid}: An email address that represents a Google group. For example, admins@example.com.\ndomain:{domain}: A Google Apps domain name that represents all the users of that domain. For example, google.com or example.com.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. Required", + "type": "string" + } + }, + "id": "Binding" + }, + "InstanceGroupConfig": { + "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", + "type": "object", + "properties": { + "diskConfig": { + "description": "Optional. Disk option config settings.", + "$ref": "DiskConfig" + }, + "machineTypeUri": { + "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", + "type": "string" + }, + "imageUri": { + "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", + "type": "string" + }, + "managedGroupConfig": { + "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", + "$ref": "ManagedGroupConfig" + }, + "isPreemptible": { + "description": "Optional. Specifies that this instance group contains preemptible instances.", + "type": "boolean" + }, + "instanceNames": { + "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", + "items": { + "type": "string" + }, + "type": "array" + }, + "accelerators": { + "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", + "items": { + "$ref": "AcceleratorConfig" + }, + "type": "array" + }, + "numInstances": { + "format": "int32", + "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", + "type": "integer" + } + }, + "id": "InstanceGroupConfig" + }, + "ListJobsResponse": { + "description": "A list of jobs in a project.", + "type": "object", + "properties": { + "jobs": { + "description": "Output-only. Jobs list.", + "items": { + "$ref": "Job" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", + "type": "string" + } + }, + "id": "ListJobsResponse" + }, + "NodeInitializationAction": { + "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", + "type": "object", + "properties": { + "executionTimeout": { + "format": "google-duration", + "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", + "type": "string" + }, + "executableFile": { + "description": "Required. Google Cloud Storage URI of executable file.", + "type": "string" + } + }, + "id": "NodeInitializationAction" + }, + "CancelJobRequest": { + "description": "A request to cancel a job.", + "type": "object", + "properties": {}, + "id": "CancelJobRequest" + }, + "SparkSqlJob": { + "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", + "type": "object", + "properties": { + "scriptVariables": { + "description": "Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", + "type": "object" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains SQL queries.", + "type": "string" + } + }, + "id": "SparkSqlJob" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "id": "ListOperationsResponse" + }, + "JobPlacement": { + "description": "Cloud Dataproc job config.", + "type": "object", + "properties": { + "clusterUuid": { + "description": "Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.", + "type": "string" + }, + "clusterName": { + "description": "Required. The name of the cluster where the job will be submitted.", + "type": "string" + } + }, + "id": "JobPlacement" + }, + "PigJob": { + "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryList": { + "$ref": "QueryList", + "description": "A list of queries." + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains the Pig queries.", + "type": "string" + }, + "jarFileUris": { + "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", + "items": { + "type": "string" + }, + "type": "array" + }, "scriptVariables": { "additionalProperties": { "type": "string" }, - "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", + "description": "Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", "type": "object" }, + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", + "type": "object" + } + }, + "id": "PigJob" + }, + "ClusterStatus": { + "description": "The status of a cluster and its instances.", + "type": "object", + "properties": { + "substate": { + "description": "Output-only. Additional state information that includes status reported by the agent.", + "type": "string", + "enumDescriptions": [ + "", + "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", + "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." + ], + "enum": [ + "UNSPECIFIED", + "UNHEALTHY", + "STALE_STATUS" + ] + }, + "stateStartTime": { + "format": "google-datetime", + "description": "Output-only. Time when this state was entered.", + "type": "string" + }, + "detail": { + "description": "Output-only. Optional details of cluster's state.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "The cluster state is unknown.", + "The cluster is being created and set up. It is not ready for use.", + "The cluster is currently running and healthy. It is ready for use.", + "The cluster encountered an error. It is not ready for use.", + "The cluster is being deleted. It cannot be used.", + "The cluster is being updated. It continues to accept and process jobs." + ], + "enum": [ + "UNKNOWN", + "CREATING", + "RUNNING", + "ERROR", + "DELETING", + "UPDATING" + ], + "description": "Output-only. The cluster's state.", + "type": "string" + } + }, + "id": "ClusterStatus" + }, + "WorkflowTemplate": { + "description": "A Cloud Dataproc workflow template resource.", + "type": "object", + "properties": { + "id": { + "description": "Required The template id.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Optional Used to perform a consistent read-modify-write.This field should be left blank for a CreateWorkflowTemplate request. It is required for an UpdateWorkflowTemplate request, and must match the current server version. A typical update template flow would fetch the current template with a GetWorkflowTemplate request, which will return the current template with the version field filled in with the current server version. The user updates other fields in the template, then returns it as part of the UpdateWorkflowTemplate request.", + "type": "integer" + }, + "jobs": { + "description": "Required The Directed Acyclic Graph of Jobs to submit.", + "items": { + "$ref": "OrderedJob" + }, + "type": "array" + }, + "createTime": { + "format": "google-datetime", + "description": "Output-only The time template was created.", + "type": "string" + }, + "labels": { + "description": "Optional The labels to associate with this template. These labels will be propagated to all jobs and clusters created by the workflow instance.Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be associated with a template.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "placement": { + "$ref": "WorkflowTemplatePlacement", + "description": "Required WorkflowTemplate scheduling information." + }, + "updateTime": { + "format": "google-datetime", + "description": "Output-only The time template was last updated.", + "type": "string" + }, + "name": { + "description": "Output-only The \"resource name\" of the template, as described in https://cloud.google.com/apis/design/resource_names of the form projects/{project_id}/regions/{region}/workflowTemplates/{template_id}", + "type": "string" + } + }, + "id": "WorkflowTemplate" + }, + "ListClustersResponse": { + "description": "The list of all clusters in a project.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Output-only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListClustersRequest\u003c/code\u003e.", + "type": "string" + }, + "clusters": { + "description": "Output-only. The clusters in the project.", + "items": { + "$ref": "Cluster" + }, + "type": "array" + } + }, + "id": "ListClustersResponse" + }, + "Job": { + "description": "A Cloud Dataproc job resource.", + "type": "object", + "properties": { + "pigJob": { + "description": "Job is a Pig job.", + "$ref": "PigJob" + }, + "hiveJob": { + "description": "Job is a Hive job.", + "$ref": "HiveJob" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", + "type": "object" + }, + "driverOutputResourceUri": { + "description": "Output-only. A URI pointing to the location of the stdout of the job's driver program.", + "type": "string" + }, + "sparkSqlJob": { + "description": "Job is a SparkSql job.", + "$ref": "SparkSqlJob" + }, + "sparkJob": { + "description": "Job is a Spark job.", + "$ref": "SparkJob" + }, + "statusHistory": { + "description": "Output-only. The previous job status.", + "items": { + "$ref": "JobStatus" + }, + "type": "array" + }, + "yarnApplications": { + "description": "Output-only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "items": { + "$ref": "YarnApplication" + }, + "type": "array" + }, + "pysparkJob": { + "$ref": "PySparkJob", + "description": "Job is a Pyspark job." + }, + "reference": { + "$ref": "JobReference", + "description": "Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e." + }, + "hadoopJob": { + "$ref": "HadoopJob", + "description": "Job is a Hadoop job." + }, + "placement": { + "$ref": "JobPlacement", + "description": "Required. Job information, including how, when, and where to run the job." + }, + "status": { + "description": "Output-only. The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields.", + "$ref": "JobStatus" + }, + "driverControlFilesUri": { + "description": "Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", + "type": "string" + }, + "scheduling": { + "$ref": "JobScheduling", + "description": "Optional. Job scheduling configuration." + } + }, + "id": "Job" + }, + "ManagedGroupConfig": { + "description": "Specifies the resources used to actively manage an instance group.", + "type": "object", + "properties": { + "instanceGroupManagerName": { + "description": "Output-only. The name of the Instance Group Manager for this group.", + "type": "string" + }, + "instanceTemplateName": { + "description": "Output-only. The name of the Instance Template used for the Managed Instance Group.", + "type": "string" + } + }, + "id": "ManagedGroupConfig" + }, + "LifecycleConfig": { + "description": "Specifies the cluster auto delete related schedule configuration.", + "type": "object", + "properties": { + "idleDeleteTtl": { + "format": "google-duration", + "description": "Optional. The longest duration that cluster would keep alive while staying idle; passing this threshold will cause cluster to be auto-deleted.", + "type": "string" + }, + "autoDeleteTtl": { + "format": "google-duration", + "description": "Optional. The life duration of cluster, the cluster will be auto-deleted at the end of this duration.", + "type": "string" + }, + "autoDeleteTime": { + "format": "google-datetime", + "description": "Optional. The time when cluster will be auto-deleted.", + "type": "string" + } + }, + "id": "LifecycleConfig" + }, + "ClusterOperationStatus": { + "description": "The status of the operation.", + "type": "object", + "properties": { + "details": { + "description": "Output-only.A message containing any operation metadata details.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Unused.", + "The operation has been created.", + "The operation is running.", + "The operation is done; either cancelled or completed." + ], + "enum": [ + "UNKNOWN", + "PENDING", + "RUNNING", + "DONE" + ], + "description": "Output-only. A message containing the operation state.", + "type": "string" + }, + "innerState": { + "description": "Output-only. A message containing the detailed operation state.", + "type": "string" + }, + "stateStartTime": { + "format": "google-datetime", + "description": "Output-only. The time this state was entered.", + "type": "string" + } + }, + "id": "ClusterOperationStatus" + }, + "ManagedCluster": { + "description": "Cluster that is managed by the workflow.", + "type": "object", + "properties": { + "labels": { + "description": "Optional The labels to associate with this cluster.Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given cluster.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "config": { + "description": "Required The cluster configuration.", + "$ref": "ClusterConfig" + }, + "clusterName": { + "description": "Required The cluster name. Cluster names within a project must be unique. Names from deleted clusters can be reused.", + "type": "string" + } + }, + "id": "ManagedCluster" + }, + "HadoopJob": { + "description": "A Cloud Dataproc job for running Apache Hadoop MapReduce (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop YARN (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).", + "type": "object", + "properties": { + "mainJarFileUri": { + "description": "The HCFS URI of the jar file containing the main class. Examples: 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar' 'hdfs:/tmp/test-samples/custom-wordcount.jar' 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'", + "type": "string" + }, + "jarFileUris": { + "description": "Optional. Jar file URIs to add to the CLASSPATHs of the Hadoop driver and tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "loggingConfig": { + "description": "Optional. The runtime log config for job execution.", + "$ref": "LoggingConfig" + }, + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of property names to values, used to configure Hadoop. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site and classes in user code.", + "type": "object" + }, + "args": { + "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as -libjars or -Dfoo=bar, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", + "items": { + "type": "string" + }, + "type": "array" + }, + "fileUris": { + "description": "Optional. HCFS (Hadoop Compatible Filesystem) URIs of files to be copied to the working directory of Hadoop drivers and distributed tasks. Useful for naively parallel tasks.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mainClass": { + "description": "The name of the driver's main class. The jar file containing the class must be in the default CLASSPATH or specified in jar_file_uris.", + "type": "string" + }, + "archiveUris": { + "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, or .zip.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "HadoopJob" + }, + "QueryList": { + "description": "A list of queries to run on a cluster.", + "type": "object", + "properties": { + "queries": { + "description": "Required. The queries to execute. You do not need to terminate a query with a semicolon. Multiple queries can be specified in one string by separating each with a semicolon. Here is an example of an Cloud Dataproc API snippet that uses a QueryList to specify a HiveJob:\n\"hiveJob\": {\n \"queryList\": {\n \"queries\": [\n \"query1\",\n \"query2\",\n \"query3;query4\",\n ]\n }\n}\n", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "QueryList" + }, + "YarnApplication": { + "description": "A YARN application created by a job. Application information is a subset of \u003ccode\u003eorg.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto\u003c/code\u003e.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", + "type": "object", + "properties": { + "trackingUrl": { + "description": "Optional. The HTTP URL of the ApplicationMaster, HistoryServer, or TimelineServer that provides application-specific information. The URL uses the internal hostname, and requires a proxy server for resolution and, possibly, access.", + "type": "string" + }, + "progress": { + "format": "float", + "description": "Required. The numerical progress of the application, from 1 to 100.", + "type": "number" + }, + "state": { + "description": "Required. The application state.", + "type": "string", + "enumDescriptions": [ + "Status is unspecified.", + "Status is NEW.", + "Status is NEW_SAVING.", + "Status is SUBMITTED.", + "Status is ACCEPTED.", + "Status is RUNNING.", + "Status is FINISHED.", + "Status is FAILED.", + "Status is KILLED." + ], + "enum": [ + "STATE_UNSPECIFIED", + "NEW", + "NEW_SAVING", + "SUBMITTED", + "ACCEPTED", + "RUNNING", + "FINISHED", + "FAILED", + "KILLED" + ] + }, + "name": { + "description": "Required. The application name.", + "type": "string" + } + }, + "id": "YarnApplication" + }, + "SetIamPolicyRequest": { + "description": "Request message for SetIamPolicy method.", + "type": "object", + "properties": { + "policy": { + "description": "REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.", + "$ref": "Policy" + } + }, + "id": "SetIamPolicyRequest" + }, + "HiveJob": { + "description": "A Cloud Dataproc job for running Apache Hive (https://hive.apache.org/) queries on YARN.", + "type": "object", + "properties": { + "continueOnFailure": { + "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", + "type": "boolean" + }, + "queryList": { + "description": "A list of queries.", + "$ref": "QueryList" + }, + "queryFileUri": { + "description": "The HCFS URI of the script that contains Hive queries.", + "type": "string" + }, "jarFileUris": { "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.", "items": { @@ -990,24 +2400,19 @@ }, "type": "array" }, - "properties": { + "scriptVariables": { "additionalProperties": { "type": "string" }, - "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "description": "Optional. Mapping of query variable names to values (equivalent to the Hive command: SET name=\"value\";).", "type": "object" }, - "continueOnFailure": { - "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains Hive queries.", - "type": "string" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." + "properties": { + "description": "Optional. A mapping of property names and values, used to configure Hive. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and classes in user code.", + "type": "object", + "additionalProperties": { + "type": "string" + } } }, "id": "HiveJob" @@ -1023,14 +2428,24 @@ }, "id": "DiagnoseClusterResults" }, + "WorkflowGraph": { + "description": "The workflow graph.", + "type": "object", + "properties": { + "nodes": { + "description": "Output-only The workflow nodes.", + "items": { + "$ref": "WorkflowNode" + }, + "type": "array" + } + }, + "id": "WorkflowGraph" + }, "ClusterConfig": { "description": "The cluster config.", "type": "object", "properties": { - "lifecycleConfig": { - "description": "Optional. The config setting for auto delete cluster schedule.", - "$ref": "LifecycleConfig" - }, "initializationActions": { "description": "Optional. Commands to execute on each node after config is completed. By default, executables are run on master and all worker nodes. You can test a node's \u003ccode\u003erole\u003c/code\u003e metadata to run an executable on a master or worker node, as shown below using curl (you can also use wget):\nROLE=$(curl -H Metadata-Flavor:Google http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)\nif [[ \"${ROLE}\" == 'Master' ]]; then\n ... master specific actions ...\nelse\n ... worker specific actions ...\nfi\n", "items": { @@ -1038,6 +2453,10 @@ }, "type": "array" }, + "lifecycleConfig": { + "description": "Optional. The config setting for auto delete cluster schedule.", + "$ref": "LifecycleConfig" + }, "configBucket": { "description": "Optional. A Google Cloud Storage staging bucket used for sharing generated SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc will determine an appropriate Cloud Storage location (US, ASIA, or EU) for your cluster's staging bucket according to the Google Compute Engine zone where your cluster is deployed, and then it will create and manage this project-level, per-location bucket for you.", "type": "string" @@ -1051,16 +2470,16 @@ "$ref": "GceClusterConfig" }, "softwareConfig": { - "$ref": "SoftwareConfig", - "description": "Optional. The config settings for software inside the cluster." + "description": "Optional. The config settings for software inside the cluster.", + "$ref": "SoftwareConfig" }, "masterConfig": { - "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster.", - "$ref": "InstanceGroupConfig" + "$ref": "InstanceGroupConfig", + "description": "Optional. The Google Compute Engine config settings for the master instance in a cluster." }, "secondaryWorkerConfig": { - "$ref": "InstanceGroupConfig", - "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster." + "description": "Optional. The Google Compute Engine config settings for additional worker instances in a cluster.", + "$ref": "InstanceGroupConfig" } }, "id": "ClusterConfig" @@ -1122,54 +2541,6 @@ }, "id": "PySparkJob" }, - "GceClusterConfig": { - "description": "Common config settings for resources of Google Compute Engine cluster instances, applicable to all instances in the cluster.", - "type": "object", - "properties": { - "networkUri": { - "description": "Optional. The Google Compute Engine network to be used for machine communications. Cannot be specified with subnetwork_uri. If neither network_uri nor subnetwork_uri is specified, the \"default\" network of the project is used, if it exists. Cannot be a \"Custom Subnet Network\" (see Using Subnetworks for more information).A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default\nprojects/[project_id]/regions/global/default\ndefault", - "type": "string" - }, - "zoneUri": { - "description": "Optional. The zone where the Google Compute Engine cluster will be located. On a create request, it is required in the \"global\" region. If omitted in a non-global Cloud Dataproc region, the service will pick a zone in the corresponding Compute Engine region. On a get request, zone will always be present.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]\nprojects/[project_id]/zones/[zone]\nus-central1-f", - "type": "string" - }, - "internalIpOnly": { - "description": "Optional. If true, all instances in the cluster will only have internal IP addresses. By default, clusters are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each instance. This internal_ip_only restriction can only be enabled for subnetwork enabled networks, and all off-cluster dependencies must be configured to be accessible without external IP addresses.", - "type": "boolean" - }, - "metadata": { - "description": "The Google Compute Engine metadata entries to add to all instances (see Project and instance metadata (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "serviceAccountScopes": { - "description": "Optional. The URIs of service account scopes to be included in Google Compute Engine instances. The following base set of scopes is always included:\nhttps://www.googleapis.com/auth/cloud.useraccounts.readonly\nhttps://www.googleapis.com/auth/devstorage.read_write\nhttps://www.googleapis.com/auth/logging.writeIf no scopes are specified, the following defaults are also provided:\nhttps://www.googleapis.com/auth/bigquery\nhttps://www.googleapis.com/auth/bigtable.admin.table\nhttps://www.googleapis.com/auth/bigtable.data\nhttps://www.googleapis.com/auth/devstorage.full_control", - "items": { - "type": "string" - }, - "type": "array" - }, - "tags": { - "description": "The Google Compute Engine tags to add to all instances (see Tagging instances).", - "items": { - "type": "string" - }, - "type": "array" - }, - "serviceAccount": { - "description": "Optional. The service account of the instances. Defaults to the default Google Compute Engine service account. Custom service accounts need permissions equivalent to the folloing IAM roles:\nroles/logging.logWriter\nroles/storage.objectAdmin(see https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example: [account_id]@[project_id].iam.gserviceaccount.com", - "type": "string" - }, - "subnetworkUri": { - "description": "Optional. The Google Compute Engine subnetwork to be used for machine communications. Cannot be specified with network_uri.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0\nprojects/[project_id]/regions/us-east1/sub0\nsub0", - "type": "string" - } - }, - "id": "GceClusterConfig" - }, "ClusterMetrics": { "description": "Contains cluster daemon metrics, such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", "type": "object", @@ -1197,24 +2568,41 @@ "description": "Specifies the type and number of accelerator cards attached to the instances of an instance group (see GPUs on Compute Engine).", "type": "object", "properties": { + "acceleratorTypeUri": { + "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", + "type": "string" + }, "acceleratorCount": { "format": "int32", "description": "The number of the accelerator cards of this type exposed to this instance.", "type": "integer" - }, - "acceleratorTypeUri": { - "description": "Full URL, partial URI, or short name of the accelerator type resource to expose to this instance. See Google Compute Engine AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)Examples * https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80", - "type": "string" } }, "id": "AcceleratorConfig" }, + "TestIamPermissionsRequest": { + "description": "Request message for TestIamPermissions method.", + "type": "object", + "properties": { + "permissions": { + "description": "The set of permissions to check for the resource. Permissions with wildcards (such as '*' or 'storage.*') are not allowed. For more information see IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestIamPermissionsRequest" + }, "LoggingConfig": { "description": "The runtime logging config of the job.", "type": "object", "properties": { "driverLogLevels": { + "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", + "type": "object", "additionalProperties": { + "type": "string", "enum": [ "LEVEL_UNSPECIFIED", "ALL", @@ -1225,64 +2613,125 @@ "ERROR", "FATAL", "OFF" - ], - "type": "string" - }, - "description": "The per-package log levels for the driver. This may include \"root\" package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'", - "type": "object" + ] + } } }, "id": "LoggingConfig" }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a network API call.", + "OrderedJob": { + "type": "object", + "properties": { + "labels": { + "description": "Optional The labels to associate with this job.Label keys must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}{0,62}Label values must be between 1 and 63 characters long, and must conform to the following regular expression: \\p{Ll}\\p{Lo}\\p{N}_-{0,63}No more than 64 labels can be associated with a given job.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "sparkSqlJob": { + "description": "Job is a SparkSql job.", + "$ref": "SparkSqlJob" + }, + "sparkJob": { + "description": "Job is a Spark job.", + "$ref": "SparkJob" + }, + "pysparkJob": { + "description": "Job is a Pyspark job.", + "$ref": "PySparkJob" + }, + "scheduling": { + "description": "Optional Job scheduling configuration.", + "$ref": "JobScheduling" + }, + "pigJob": { + "description": "Job is a Pig job.", + "$ref": "PigJob" + }, + "stepId": { + "description": "Required The step id. The id must be unique among all jobs within the template.The step id is used as prefix for job id, as job workflow-step-id label, and in prerequisite_step_ids field from other steps.", + "type": "string" + }, + "hadoopJob": { + "$ref": "HadoopJob", + "description": "Job is a Hadoop job." + }, + "prerequisiteStepIds": { + "description": "Optional The optional list of prerequisite job step_ids. If not specified, the job will start at the beginning of workflow.", + "items": { + "type": "string" + }, + "type": "array" + }, + "hiveJob": { + "description": "Job is a Hive job.", + "$ref": "HiveJob" + } + }, + "id": "OrderedJob" + }, + "WorkflowNode": { + "description": "The workflow node.", "type": "object", "properties": { "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "Status" + "description": "Output-only The error detail.", + "type": "string" }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" + "stepId": { + "description": "Output-only The name of the node.", + "type": "string" + }, + "jobId": { + "description": "Output-only The job id; populated after the node enters RUNNING state.", + "type": "string" + }, + "prerequisiteStepIds": { + "description": "Output-only Node's prerequisite nodes.", + "items": { + "type": "string" }, - "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", - "type": "object" + "type": "array" }, - "done": { - "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should have the format of operations/some/unique/name.", + "state": { + "enumDescriptions": [ + "", + "The node is awaiting prerequisite node to finish.", + "The node is runnable but not running.", + "The node is running.", + "The node completed successfully.", + "The node failed. A node can be marked FAILED because its ancestor or peer failed." + ], + "enum": [ + "NODE_STATUS_UNSPECIFIED", + "BLOCKED", + "RUNNABLE", + "RUNNING", + "COMPLETED", + "FAILED" + ], + "description": "Output-only The node state.", "type": "string" } }, - "id": "Operation" + "id": "WorkflowNode" }, - "JobReference": { - "description": "Encapsulates the full scoping used to reference a job.", + "InstantiateWorkflowTemplateRequest": { + "description": "A request to instantiate a workflow template.", "type": "object", "properties": { - "jobId": { - "description": "Optional. The job ID, which must be unique within the project. The job ID is generated by the server upon job submission or provided by the user as a means to perform retries without creating duplicate jobs. The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens (-). The maximum length is 100 characters.", + "instanceId": { + "description": "Optional A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.", "type": "string" }, - "projectId": { - "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.", - "type": "string" + "version": { + "format": "int32", + "description": "Optional The version of workflow template to instantiate. If specified, the workflow will be instantiated only if the current version of the workflow template has the supplied version.This option cannot be used to instantiate a previous version of workflow template.", + "type": "integer" } }, - "id": "JobReference" + "id": "InstantiateWorkflowTemplateRequest" }, "SubmitJobRequest": { "description": "A request to submit a job.", @@ -1294,613 +2743,13 @@ } }, "id": "SubmitJobRequest" - }, - "Status": { - "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). The error model is designed to be:\nSimple to use and understand for most users\nFlexible enough to meet unexpected needsOverviewThe Status message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of google.rpc.Code, but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers understand and resolve the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package google.rpc that can be used for common error conditions.Language mappingThe Status message is the logical representation of the error model, but it is not necessarily the actual wire format. When the Status message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.Other usesThe error model and the Status message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.Example uses of this error model include:\nPartial errors. If a service needs to return partial errors to the client, it may embed the Status in the normal response to indicate the partial errors.\nWorkflow errors. A typical workflow has multiple steps. Each step may have a Status message for error reporting.\nBatch operations. If a client uses batch request and batch response, the Status message should be used directly inside batch response, one for each error sub-response.\nAsynchronous operations. If an API call embeds asynchronous operation results in its response, the status of those operations should be represented directly using the Status message.\nLogging. If some API errors are stored in logs, the message Status could be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", - "type": "string" - }, - "details": { - "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - } - }, - "id": "Status" - }, - "JobScheduling": { - "description": "Job scheduling options.Beta Feature: These options are available for testing purposes only. They may be changed before final release.", - "type": "object", - "properties": { - "maxFailuresPerHour": { - "format": "int32", - "description": "Optional. Maximum number of times per hour a driver may be restarted as a result of driver terminating with non-zero code before job is reported failed.A job may be reported as thrashing if driver exits with non-zero code 4 times within 10 minute window.Maximum value is 10.", - "type": "integer" - } - }, - "id": "JobScheduling" - }, - "InstanceGroupConfig": { - "description": "Optional. The config settings for Google Compute Engine resources in an instance group, such as a master or worker group.", - "type": "object", - "properties": { - "managedGroupConfig": { - "description": "Output-only. The config for Google Compute Engine Instance Group Manager that manages this group. This is only used for preemptible instance groups.", - "$ref": "ManagedGroupConfig" - }, - "isPreemptible": { - "description": "Optional. Specifies that this instance group contains preemptible instances.", - "type": "boolean" - }, - "imageUri": { - "description": "Output-only. The Google Compute Engine image resource used for cluster instances. Inferred from SoftwareConfig.image_version.", - "type": "string" - }, - "machineTypeUri": { - "description": "Optional. The Google Compute Engine machine type used for cluster instances.A full URL, partial URI, or short name are valid. Examples:\nhttps://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nprojects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2\nn1-standard-2", - "type": "string" - }, - "instanceNames": { - "description": "Optional. The list of instance names. Cloud Dataproc derives the names from cluster_name, num_instances, and the instance group if not set by user (recommended practice is to let Cloud Dataproc derive the name).", - "items": { - "type": "string" - }, - "type": "array" - }, - "accelerators": { - "description": "Optional. The Google Compute Engine accelerator configuration for these instances.Beta Feature: This feature is still under development. It may be changed before final release.", - "items": { - "$ref": "AcceleratorConfig" - }, - "type": "array" - }, - "numInstances": { - "format": "int32", - "description": "Optional. The number of VM instances in the instance group. For master instance groups, must be set to 1.", - "type": "integer" - }, - "diskConfig": { - "$ref": "DiskConfig", - "description": "Optional. Disk option config settings." - } - }, - "id": "InstanceGroupConfig" - }, - "NodeInitializationAction": { - "description": "Specifies an executable to run on a fully configured node and a timeout period for executable completion.", - "type": "object", - "properties": { - "executableFile": { - "description": "Required. Google Cloud Storage URI of executable file.", - "type": "string" - }, - "executionTimeout": { - "format": "google-duration", - "description": "Optional. Amount of time executable has to complete. Default is 10 minutes. Cluster creation fails with an explanatory error message (the name of the executable that caused the error and the exceeded timeout period) if the executable is not completed at end of the timeout period.", - "type": "string" - } - }, - "id": "NodeInitializationAction" - }, - "ListJobsResponse": { - "description": "A list of jobs in a project.", - "type": "object", - "properties": { - "jobs": { - "description": "Output-only. Jobs list.", - "items": { - "$ref": "Job" - }, - "type": "array" - }, - "nextPageToken": { - "description": "Optional. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListJobsRequest\u003c/code\u003e.", - "type": "string" - } - }, - "id": "ListJobsResponse" - }, - "CancelJobRequest": { - "description": "A request to cancel a job.", - "type": "object", - "properties": {}, - "id": "CancelJobRequest" - }, - "SparkSqlJob": { - "description": "A Cloud Dataproc job for running Apache Spark SQL (http://spark.apache.org/sql/) queries.", - "type": "object", - "properties": { - "queryFileUri": { - "description": "The HCFS URI of the script that contains SQL queries.", - "type": "string" - }, - "queryList": { - "description": "A list of queries.", - "$ref": "QueryList" - }, - "scriptVariables": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Mapping of query variable names to values (equivalent to the Spark SQL command: SET name=\"value\";).", - "type": "object" - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to be added to the Spark CLASSPATH.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "Optional. The runtime log config for job execution." - }, - "properties": { - "description": "Optional. A mapping of property names to values, used to configure Spark SQL's SparkConf. Properties that conflict with values set by the Cloud Dataproc API may be overwritten.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "SparkSqlJob" - }, - "Cluster": { - "description": "Describes the identifying information, config, and status of a cluster of Google Compute Engine instances.", - "type": "object", - "properties": { - "projectId": { - "description": "Required. The Google Cloud Platform project ID that the cluster belongs to.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. The labels to associate with this cluster. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", - "type": "object" - }, - "metrics": { - "$ref": "ClusterMetrics", - "description": "Contains cluster daemon metrics such as HDFS and YARN stats.Beta Feature: This report is available for testing purposes only. It may be changed before final release." - }, - "status": { - "description": "Output-only. Cluster status.", - "$ref": "ClusterStatus" - }, - "statusHistory": { - "description": "Output-only. The previous cluster status.", - "items": { - "$ref": "ClusterStatus" - }, - "type": "array" - }, - "config": { - "$ref": "ClusterConfig", - "description": "Required. The cluster config. Note that Cloud Dataproc may set default values, and values may change when clusters are updated." - }, - "clusterUuid": { - "description": "Output-only. A cluster UUID (Unique Universal Identifier). Cloud Dataproc generates this value when it creates the cluster.", - "type": "string" - }, - "clusterName": { - "description": "Required. The cluster name. Cluster names within a project must be unique. Names of deleted clusters can be reused.", - "type": "string" - } - }, - "id": "Cluster" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "id": "ListOperationsResponse" - }, - "SoftwareConfig": { - "description": "Specifies the selection and config of software inside the cluster.", - "type": "object", - "properties": { - "imageVersion": { - "description": "Optional. The version of software inside the cluster. It must match the regular expression [0-9]+\\.[0-9]+. If unspecified, it defaults to the latest version (see Cloud Dataproc Versioning).", - "type": "string" - }, - "properties": { - "description": "Optional. The properties to set on daemon config files.Property keys are specified in prefix:property format, such as core:fs.defaultFS. The following are supported prefixes and their mappings:\ncapacity-scheduler: capacity-scheduler.xml\ncore: core-site.xml\ndistcp: distcp-default.xml\nhdfs: hdfs-site.xml\nhive: hive-site.xml\nmapred: mapred-site.xml\npig: pig.properties\nspark: spark-defaults.conf\nyarn: yarn-site.xmlFor more information, see Cluster properties.", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "id": "SoftwareConfig" - }, - "JobPlacement": { - "description": "Cloud Dataproc job config.", - "type": "object", - "properties": { - "clusterUuid": { - "description": "Output-only. A cluster UUID generated by the Cloud Dataproc service when the job is submitted.", - "type": "string" - }, - "clusterName": { - "description": "Required. The name of the cluster where the job will be submitted.", - "type": "string" - } - }, - "id": "JobPlacement" - }, - "ClusterStatus": { - "description": "The status of a cluster and its instances.", - "type": "object", - "properties": { - "detail": { - "description": "Output-only. Optional details of cluster's state.", - "type": "string" - }, - "state": { - "description": "Output-only. The cluster's state.", - "type": "string", - "enumDescriptions": [ - "The cluster state is unknown.", - "The cluster is being created and set up. It is not ready for use.", - "The cluster is currently running and healthy. It is ready for use.", - "The cluster encountered an error. It is not ready for use.", - "The cluster is being deleted. It cannot be used.", - "The cluster is being updated. It continues to accept and process jobs." - ], - "enum": [ - "UNKNOWN", - "CREATING", - "RUNNING", - "ERROR", - "DELETING", - "UPDATING" - ] - }, - "substate": { - "enumDescriptions": [ - "", - "The cluster is known to be in an unhealthy state (for example, critical daemons are not running or HDFS capacity is exhausted).Applies to RUNNING state.", - "The agent-reported status is out of date (may occur if Cloud Dataproc loses communication with Agent).Applies to RUNNING state." - ], - "enum": [ - "UNSPECIFIED", - "UNHEALTHY", - "STALE_STATUS" - ], - "description": "Output-only. Additional state information that includes status reported by the agent.", - "type": "string" - }, - "stateStartTime": { - "format": "google-datetime", - "description": "Output-only. Time when this state was entered.", - "type": "string" - } - }, - "id": "ClusterStatus" - }, - "PigJob": { - "description": "A Cloud Dataproc job for running Apache Pig (https://pig.apache.org/) queries on YARN.", - "type": "object", - "properties": { - "scriptVariables": { - "description": "Optional. Mapping of query variable names to values (equivalent to the Pig command: name=[value]).", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATH of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "description": "Optional. The runtime log config for job execution.", - "$ref": "LoggingConfig" - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure Pig. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and classes in user code.", - "type": "object" - }, - "continueOnFailure": { - "description": "Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.", - "type": "boolean" - }, - "queryFileUri": { - "description": "The HCFS URI of the script that contains the Pig queries.", - "type": "string" - }, - "queryList": { - "$ref": "QueryList", - "description": "A list of queries." - } - }, - "id": "PigJob" - }, - "ListClustersResponse": { - "description": "The list of all clusters in a project.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Output-only. This token is included in the response if there are more results to fetch. To fetch additional results, provide this value as the page_token in a subsequent \u003ccode\u003eListClustersRequest\u003c/code\u003e.", - "type": "string" - }, - "clusters": { - "description": "Output-only. The clusters in the project.", - "items": { - "$ref": "Cluster" - }, - "type": "array" - } - }, - "id": "ListClustersResponse" - }, - "SparkJob": { - "description": "A Cloud Dataproc job for running Apache Spark (http://spark.apache.org/) applications on YARN.", - "type": "object", - "properties": { - "mainJarFileUri": { - "description": "The HCFS URI of the jar file that contains the main class.", - "type": "string" - }, - "jarFileUris": { - "description": "Optional. HCFS URIs of jar files to add to the CLASSPATHs of the Spark driver and tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "loggingConfig": { - "$ref": "LoggingConfig", - "description": "Optional. The runtime log config for job execution." - }, - "properties": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. A mapping of property names to values, used to configure Spark. Properties that conflict with values set by the Cloud Dataproc API may be overwritten. Can include properties set in /etc/spark/conf/spark-defaults.conf and classes in user code.", - "type": "object" - }, - "args": { - "description": "Optional. The arguments to pass to the driver. Do not include arguments, such as --conf, that can be set as job properties, since a collision may occur that causes an incorrect job submission.", - "items": { - "type": "string" - }, - "type": "array" - }, - "fileUris": { - "description": "Optional. HCFS URIs of files to be copied to the working directory of Spark drivers and distributed tasks. Useful for naively parallel tasks.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mainClass": { - "description": "The name of the driver's main class. The jar file that contains the class must be in the default CLASSPATH or specified in jar_file_uris.", - "type": "string" - }, - "archiveUris": { - "description": "Optional. HCFS URIs of archives to be extracted in the working directory of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz, .tgz, and .zip.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "SparkJob" - }, - "Job": { - "description": "A Cloud Dataproc job resource.", - "type": "object", - "properties": { - "hadoopJob": { - "description": "Job is a Hadoop job.", - "$ref": "HadoopJob" - }, - "placement": { - "$ref": "JobPlacement", - "description": "Required. Job information, including how, when, and where to run the job." - }, - "status": { - "$ref": "JobStatus", - "description": "Output-only. The job status. Additional application-specific status information may be contained in the \u003ccode\u003etype_job\u003c/code\u003e and \u003ccode\u003eyarn_applications\u003c/code\u003e fields." - }, - "driverControlFilesUri": { - "description": "Output-only. If present, the location of miscellaneous control files which may be used as part of job setup and handling. If not present, control files may be placed in the same location as driver_output_uri.", - "type": "string" - }, - "scheduling": { - "description": "Optional. Job scheduling configuration.", - "$ref": "JobScheduling" - }, - "pigJob": { - "$ref": "PigJob", - "description": "Job is a Pig job." - }, - "hiveJob": { - "description": "Job is a Hive job.", - "$ref": "HiveJob" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. The labels to associate with this job. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty, but, if present, must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a job.", - "type": "object" - }, - "driverOutputResourceUri": { - "description": "Output-only. A URI pointing to the location of the stdout of the job's driver program.", - "type": "string" - }, - "statusHistory": { - "description": "Output-only. The previous job status.", - "items": { - "$ref": "JobStatus" - }, - "type": "array" - }, - "sparkJob": { - "$ref": "SparkJob", - "description": "Job is a Spark job." - }, - "sparkSqlJob": { - "$ref": "SparkSqlJob", - "description": "Job is a SparkSql job." - }, - "yarnApplications": { - "description": "Output-only. The collection of YARN applications spun up by this job.Beta Feature: This report is available for testing purposes only. It may be changed before final release.", - "items": { - "$ref": "YarnApplication" - }, - "type": "array" - }, - "pysparkJob": { - "description": "Job is a Pyspark job.", - "$ref": "PySparkJob" - }, - "reference": { - "description": "Optional. The fully qualified reference to the job, which can be used to obtain the equivalent REST path of the job resource. If this property is not specified when a job is created, the server generates a \u003ccode\u003ejob_id\u003c/code\u003e.", - "$ref": "JobReference" - } - }, - "id": "Job" - }, - "JobStatus": { - "description": "Cloud Dataproc job status.", - "type": "object", - "properties": { - "substate": { - "enumDescriptions": [ - "", - "The Job is submitted to the agent.Applies to RUNNING state.", - "The Job has been received and is awaiting execution (it may be waiting for a condition to be met). See the \"details\" field for the reason for the delay.Applies to RUNNING state.", - "The agent-reported status is out of date, which may be caused by a loss of communication between the agent and Cloud Dataproc. If the agent does not send a timely update, the job will fail.Applies to RUNNING state." - ], - "enum": [ - "UNSPECIFIED", - "SUBMITTED", - "QUEUED", - "STALE_STATUS" - ], - "description": "Output-only. Additional state information, which includes status reported by the agent.", - "type": "string" - }, - "stateStartTime": { - "format": "google-datetime", - "description": "Output-only. The time when this state was entered.", - "type": "string" - }, - "details": { - "description": "Output-only. Optional job state details, such as an error description if the state is \u003ccode\u003eERROR\u003c/code\u003e.", - "type": "string" - }, - "state": { - "enumDescriptions": [ - "The job state is unknown.", - "The job is pending; it has been submitted, but is not yet running.", - "Job has been received by the service and completed initial setup; it will soon be submitted to the cluster.", - "The job is running on the cluster.", - "A CancelJob request has been received, but is pending.", - "Transient in-flight resources have been canceled, and the request to cancel the running job has been issued to the cluster.", - "The job cancellation was successful.", - "The job has completed successfully.", - "The job has completed, but encountered an error.", - "Job attempt has failed. The detail field contains failure details for this attempt.Applies to restartable jobs only." - ], - "enum": [ - "STATE_UNSPECIFIED", - "PENDING", - "SETUP_DONE", - "RUNNING", - "CANCEL_PENDING", - "CANCEL_STARTED", - "CANCELLED", - "DONE", - "ERROR", - "ATTEMPT_FAILURE" - ], - "description": "Output-only. A state message specifying the overall job state.", - "type": "string" - } - }, - "id": "JobStatus" - }, - "LifecycleConfig": { - "description": "Specifies the cluster auto delete related schedule configuration.", - "type": "object", - "properties": { - "idleDeleteTtl": { - "format": "google-duration", - "description": "Optional. The longest duration that cluster would keep alive while staying idle; passing this threshold will cause cluster to be auto-deleted.", - "type": "string" - }, - "autoDeleteTtl": { - "format": "google-duration", - "description": "Optional. The life duration of cluster, the cluster will be auto-deleted at the end of this duration.", - "type": "string" - }, - "autoDeleteTime": { - "format": "google-datetime", - "description": "Optional. The time when cluster will be auto-deleted.", - "type": "string" - } - }, - "id": "LifecycleConfig" - }, - "ManagedGroupConfig": { - "description": "Specifies the resources used to actively manage an instance group.", - "type": "object", - "properties": { - "instanceGroupManagerName": { - "description": "Output-only. The name of the Instance Group Manager for this group.", - "type": "string" - }, - "instanceTemplateName": { - "description": "Output-only. The name of the Instance Template used for the Managed Instance Group.", - "type": "string" - } - }, - "id": "ManagedGroupConfig" } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "version": "v1beta2", "baseUrl": "https://dataproc.googleapis.com/", "auth": { @@ -1918,5 +2767,9 @@ "rootUrl": "https://dataproc.googleapis.com/", "basePath": "", "ownerDomain": "google.com", - "name": "dataproc" + "name": "dataproc", + "batchPath": "batch", + "documentationLink": "https://cloud.google.com/dataproc/", + "id": "dataproc:v1beta2", + "revision": "20170926" } diff --git a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go index 78b463499..6266bb7e0 100644 --- a/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go +++ b/vendor/google.golang.org/api/dataproc/v1beta2/dataproc-gen.go @@ -77,6 +77,7 @@ func (s *Service) userAgent() string { func NewProjectsService(s *Service) *ProjectsService { rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) rs.Regions = NewProjectsRegionsService(s) return rs } @@ -84,14 +85,38 @@ func NewProjectsService(s *Service) *ProjectsService { type ProjectsService struct { s *Service + Locations *ProjectsLocationsService + Regions *ProjectsRegionsService } +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.WorkflowTemplates = NewProjectsLocationsWorkflowTemplatesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + WorkflowTemplates *ProjectsLocationsWorkflowTemplatesService +} + +func NewProjectsLocationsWorkflowTemplatesService(s *Service) *ProjectsLocationsWorkflowTemplatesService { + rs := &ProjectsLocationsWorkflowTemplatesService{s: s} + return rs +} + +type ProjectsLocationsWorkflowTemplatesService struct { + s *Service +} + func NewProjectsRegionsService(s *Service) *ProjectsRegionsService { rs := &ProjectsRegionsService{s: s} rs.Clusters = NewProjectsRegionsClustersService(s) rs.Jobs = NewProjectsRegionsJobsService(s) rs.Operations = NewProjectsRegionsOperationsService(s) + rs.WorkflowTemplates = NewProjectsRegionsWorkflowTemplatesService(s) return rs } @@ -103,6 +128,8 @@ type ProjectsRegionsService struct { Jobs *ProjectsRegionsJobsService Operations *ProjectsRegionsOperationsService + + WorkflowTemplates *ProjectsRegionsWorkflowTemplatesService } func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService { @@ -132,6 +159,15 @@ type ProjectsRegionsOperationsService struct { s *Service } +func NewProjectsRegionsWorkflowTemplatesService(s *Service) *ProjectsRegionsWorkflowTemplatesService { + rs := &ProjectsRegionsWorkflowTemplatesService{s: s} + return rs +} + +type ProjectsRegionsWorkflowTemplatesService struct { + s *Service +} + // AcceleratorConfig: Specifies the type and number of accelerator cards // attached to the instances of an instance group (see GPUs on Compute // Engine). @@ -172,6 +208,54 @@ func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Binding: Associates members with a role. +type Binding struct { + // Members: Specifies the identities requesting access for a Cloud + // Platform resource. members can have the following values: + // allUsers: A special identifier that represents anyone who is on the + // internet; with or without a Google account. + // allAuthenticatedUsers: A special identifier that represents anyone + // who is authenticated with a Google account or a service + // account. + // user:{emailid}: An email address that represents a specific Google + // account. For example, alice@gmail.com or + // joe@example.com. + // serviceAccount:{emailid}: An email address that represents a service + // account. For example, + // my-other-app@appspot.gserviceaccount.com. + // group:{emailid}: An email address that represents a Google group. + // For example, admins@example.com. + // domain:{domain}: A Google Apps domain name that represents all the + // users of that domain. For example, google.com or example.com. + Members []string `json:"members,omitempty"` + + // Role: Role that is assigned to members. For example, roles/viewer, + // roles/editor, or roles/owner. Required + Role string `json:"role,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Members") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Members") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Binding) MarshalJSON() ([]byte, error) { + type noMethod Binding + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // CancelJobRequest: A request to cancel a job. type CancelJobRequest struct { } @@ -348,6 +432,39 @@ func (s *ClusterMetrics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type ClusterOperation struct { + // Done: Output-only Indicates the operation is done. + Done bool `json:"done,omitempty"` + + // Error: Output-only Error, if operation failed. + Error string `json:"error,omitempty"` + + // OperationId: Output-only The id of the cluster operation. + OperationId string `json:"operationId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClusterOperation) MarshalJSON() ([]byte, error) { + type noMethod ClusterOperation + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ClusterOperationMetadata: Metadata describing the operation. type ClusterOperationMetadata struct { // ClusterName: Output-only. Name of the cluster for the operation. @@ -442,6 +559,39 @@ func (s *ClusterOperationStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ClusterSelector: A selector that chooses target cluster for jobs +// based on metadata. +type ClusterSelector struct { + // ClusterLabels: Required The cluster labels. Cluster must have all + // labels to match. + ClusterLabels map[string]string `json:"clusterLabels,omitempty"` + + // Zone: Required The cluster target zone. + Zone string `json:"zone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterLabels") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClusterLabels") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ClusterSelector) MarshalJSON() ([]byte, error) { + type noMethod ClusterSelector + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ClusterStatus: The status of a cluster and its instances. type ClusterStatus struct { // Detail: Output-only. Optional details of cluster's state. @@ -898,6 +1048,48 @@ func (s *InstanceGroupConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstantiateWorkflowTemplateRequest: A request to instantiate a +// workflow template. +type InstantiateWorkflowTemplateRequest struct { + // InstanceId: Optional A tag that prevents multiple concurrent workflow + // instances with the same tag from running. This mitigates risk of + // concurrent instances started due to retries.It is recommended to + // always set this value to a UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag + // must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), + // and hyphens (-). The maximum length is 40 characters. + InstanceId string `json:"instanceId,omitempty"` + + // Version: Optional The version of workflow template to instantiate. If + // specified, the workflow will be instantiated only if the current + // version of the workflow template has the supplied version.This option + // cannot be used to instantiate a previous version of workflow + // template. + Version int64 `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InstanceId") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InstanceId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstantiateWorkflowTemplateRequest) MarshalJSON() ([]byte, error) { + type noMethod InstantiateWorkflowTemplateRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Job: A Cloud Dataproc job resource. type Job struct { // DriverControlFilesUri: Output-only. If present, the location of @@ -1318,6 +1510,45 @@ func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ListWorkflowTemplatesResponse: A response to a request to list +// workflow templates in a project. +type ListWorkflowTemplatesResponse struct { + // NextPageToken: Output-only This token is included in the response if + // there are more results to fetch. To fetch additional results, provide + // this value as the page_token in a subsequent + // ListWorkflowTemplatesRequest. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Templates: Output-only WorkflowTemplates list. + Templates []*WorkflowTemplate `json:"templates,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ListWorkflowTemplatesResponse) MarshalJSON() ([]byte, error) { + type noMethod ListWorkflowTemplatesResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // LoggingConfig: The runtime logging config of the job. type LoggingConfig struct { // DriverLogLevels: The per-package log levels for the driver. This may @@ -1349,6 +1580,46 @@ func (s *LoggingConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ManagedCluster: Cluster that is managed by the workflow. +type ManagedCluster struct { + // ClusterName: Required The cluster name. Cluster names within a + // project must be unique. Names from deleted clusters can be reused. + ClusterName string `json:"clusterName,omitempty"` + + // Config: Required The cluster configuration. + Config *ClusterConfig `json:"config,omitempty"` + + // Labels: Optional The labels to associate with this cluster.Label keys + // must be between 1 and 63 characters long, and must conform to the + // following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values + // must be between 1 and 63 characters long, and must conform to the + // following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more + // than 64 labels can be associated with a given cluster. + Labels map[string]string `json:"labels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClusterName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ManagedCluster) MarshalJSON() ([]byte, error) { + type noMethod ManagedCluster + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ManagedGroupConfig: Specifies the resources used to actively manage // an instance group. type ManagedGroupConfig struct { @@ -1484,6 +1755,70 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type OrderedJob struct { + // HadoopJob: Job is a Hadoop job. + HadoopJob *HadoopJob `json:"hadoopJob,omitempty"` + + // HiveJob: Job is a Hive job. + HiveJob *HiveJob `json:"hiveJob,omitempty"` + + // Labels: Optional The labels to associate with this job.Label keys + // must be between 1 and 63 characters long, and must conform to the + // following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be + // between 1 and 63 characters long, and must conform to the following + // regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 64 labels + // can be associated with a given job. + Labels map[string]string `json:"labels,omitempty"` + + // PigJob: Job is a Pig job. + PigJob *PigJob `json:"pigJob,omitempty"` + + // PrerequisiteStepIds: Optional The optional list of prerequisite job + // step_ids. If not specified, the job will start at the beginning of + // workflow. + PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"` + + // PysparkJob: Job is a Pyspark job. + PysparkJob *PySparkJob `json:"pysparkJob,omitempty"` + + // Scheduling: Optional Job scheduling configuration. + Scheduling *JobScheduling `json:"scheduling,omitempty"` + + // SparkJob: Job is a Spark job. + SparkJob *SparkJob `json:"sparkJob,omitempty"` + + // SparkSqlJob: Job is a SparkSql job. + SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"` + + // StepId: Required The step id. The id must be unique among all jobs + // within the template.The step id is used as prefix for job id, as job + // workflow-step-id label, and in prerequisite_step_ids field from other + // steps. + StepId string `json:"stepId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "HadoopJob") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "HadoopJob") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *OrderedJob) MarshalJSON() ([]byte, error) { + type noMethod OrderedJob + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PigJob: A Cloud Dataproc job for running Apache Pig // (https://pig.apache.org/) queries on YARN. type PigJob struct { @@ -1542,6 +1877,77 @@ func (s *PigJob) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// Policy: Defines an Identity and Access Management (IAM) policy. It is +// used to specify access control policies for Cloud Platform +// resources.A Policy consists of a list of bindings. A Binding binds a +// list of members to a role, where the members can be user accounts, +// Google groups, Google domains, and service accounts. A role is a +// named list of permissions defined by IAM.Example +// { +// "bindings": [ +// { +// "role": "roles/owner", +// "members": [ +// "user:mike@example.com", +// "group:admins@example.com", +// "domain:google.com", +// "serviceAccount:my-other-app@appspot.gserviceaccount.com", +// ] +// }, +// { +// "role": "roles/viewer", +// "members": ["user:sean@example.com"] +// } +// ] +// } +// For a description of IAM and its features, see the IAM developer's +// guide (https://cloud.google.com/iam). +type Policy struct { + // Bindings: Associates a list of members to a role. bindings with no + // members will result in an error. + Bindings []*Binding `json:"bindings,omitempty"` + + // Etag: etag is used for optimistic concurrency control as a way to + // help prevent simultaneous updates of a policy from overwriting each + // other. It is strongly suggested that systems make use of the etag in + // the read-modify-write cycle to perform policy updates in order to + // avoid race conditions: An etag is returned in the response to + // getIamPolicy, and systems are expected to put that etag in the + // request to setIamPolicy to ensure that their change will be applied + // to the same version of the policy.If no etag is provided in the call + // to setIamPolicy, then the existing policy is overwritten blindly. + Etag string `json:"etag,omitempty"` + + // Version: Version of the Policy. The default version is 0. + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Bindings") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Bindings") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *Policy) MarshalJSON() ([]byte, error) { + type noMethod Policy + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PySparkJob: A Cloud Dataproc job for running Apache PySpark // (https://spark.apache.org/docs/0.9.0/python-programming-guide.html) // applications on YARN. @@ -1646,6 +2052,37 @@ func (s *QueryList) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SetIamPolicyRequest: Request message for SetIamPolicy method. +type SetIamPolicyRequest struct { + // Policy: REQUIRED: The complete policy to be applied to the resource. + // The size of the policy is limited to a few 10s of KB. An empty policy + // is a valid policy but certain Cloud Platform services (such as + // Projects) might reject them. + Policy *Policy `json:"policy,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Policy") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type noMethod SetIamPolicyRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SoftwareConfig: Specifies the selection and config of software inside // the cluster. type SoftwareConfig struct { @@ -1907,6 +2344,308 @@ func (s *SubmitJobRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// TestIamPermissionsRequest: Request message for TestIamPermissions +// method. +type TestIamPermissionsRequest struct { + // Permissions: The set of permissions to check for the resource. + // Permissions with wildcards (such as '*' or 'storage.*') are not + // allowed. For more information see IAM Overview + // (https://cloud.google.com/iam/docs/overview#permissions). + Permissions []string `json:"permissions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { + type noMethod TestIamPermissionsRequest + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// TestIamPermissionsResponse: Response message for TestIamPermissions +// method. +type TestIamPermissionsResponse struct { + // Permissions: A subset of TestPermissionsRequest.permissions that the + // caller is allowed. + Permissions []string `json:"permissions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Permissions") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Permissions") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type noMethod TestIamPermissionsResponse + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkflowGraph: The workflow graph. +type WorkflowGraph struct { + // Nodes: Output-only The workflow nodes. + Nodes []*WorkflowNode `json:"nodes,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Nodes") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Nodes") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkflowGraph) MarshalJSON() ([]byte, error) { + type noMethod WorkflowGraph + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkflowMetadata: A Cloud Dataproc workflow template resource. +type WorkflowMetadata struct { + // ClusterName: Output-only The name of the managed cluster. + ClusterName string `json:"clusterName,omitempty"` + + // CreateCluster: Output-only The create cluster operation metadata. + CreateCluster *ClusterOperation `json:"createCluster,omitempty"` + + // DeleteCluster: Output-only The delete cluster operation metadata. + DeleteCluster *ClusterOperation `json:"deleteCluster,omitempty"` + + // Graph: Output-only The workflow graph. + Graph *WorkflowGraph `json:"graph,omitempty"` + + // State: Output-only The workflow state. + // + // Possible values: + // "UNKNOWN" - Unused. + // "PENDING" - The operation has been created. + // "RUNNING" - The operation is running. + // "DONE" - The operation is done; either cancelled or completed. + State string `json:"state,omitempty"` + + // Template: Output-only The "resource name" of the template. + Template string `json:"template,omitempty"` + + // Version: Output-only The version of template at the time of workflow + // instantiation. + Version int64 `json:"version,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterName") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClusterName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkflowMetadata) MarshalJSON() ([]byte, error) { + type noMethod WorkflowMetadata + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkflowNode: The workflow node. +type WorkflowNode struct { + // Error: Output-only The error detail. + Error string `json:"error,omitempty"` + + // JobId: Output-only The job id; populated after the node enters + // RUNNING state. + JobId string `json:"jobId,omitempty"` + + // PrerequisiteStepIds: Output-only Node's prerequisite nodes. + PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"` + + // State: Output-only The node state. + // + // Possible values: + // "NODE_STATUS_UNSPECIFIED" + // "BLOCKED" - The node is awaiting prerequisite node to finish. + // "RUNNABLE" - The node is runnable but not running. + // "RUNNING" - The node is running. + // "COMPLETED" - The node completed successfully. + // "FAILED" - The node failed. A node can be marked FAILED because its + // ancestor or peer failed. + State string `json:"state,omitempty"` + + // StepId: Output-only The name of the node. + StepId string `json:"stepId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Error") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkflowNode) MarshalJSON() ([]byte, error) { + type noMethod WorkflowNode + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkflowTemplate: A Cloud Dataproc workflow template resource. +type WorkflowTemplate struct { + // CreateTime: Output-only The time template was created. + CreateTime string `json:"createTime,omitempty"` + + // Id: Required The template id. + Id string `json:"id,omitempty"` + + // Jobs: Required The Directed Acyclic Graph of Jobs to submit. + Jobs []*OrderedJob `json:"jobs,omitempty"` + + // Labels: Optional The labels to associate with this template. These + // labels will be propagated to all jobs and clusters created by the + // workflow instance.Label keys must contain 1 to 63 characters, and + // must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label + // values may be empty, but, if present, must contain 1 to 63 + // characters, and must conform to RFC 1035 + // (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be + // associated with a template. + Labels map[string]string `json:"labels,omitempty"` + + // Name: Output-only The "resource name" of the template, as described + // in https://cloud.google.com/apis/design/resource_names of the form + // projects/{project_id}/regions/{region}/workflowTemplates/{template_id} + Name string `json:"name,omitempty"` + + // Placement: Required WorkflowTemplate scheduling information. + Placement *WorkflowTemplatePlacement `json:"placement,omitempty"` + + // UpdateTime: Output-only The time template was last updated. + UpdateTime string `json:"updateTime,omitempty"` + + // Version: Optional Used to perform a consistent read-modify-write.This + // field should be left blank for a CreateWorkflowTemplate request. It + // is required for an UpdateWorkflowTemplate request, and must match the + // current server version. A typical update template flow would fetch + // the current template with a GetWorkflowTemplate request, which will + // return the current template with the version field filled in with the + // current server version. The user updates other fields in the + // template, then returns it as part of the UpdateWorkflowTemplate + // request. + Version int64 `json:"version,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *WorkflowTemplate) MarshalJSON() ([]byte, error) { + type noMethod WorkflowTemplate + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// WorkflowTemplatePlacement: Specifies workflow execution target.Either +// managed_cluster or cluster_selector is required. +type WorkflowTemplatePlacement struct { + // ClusterSelector: Optional A selector that chooses target cluster for + // jobs based on metadata.The selector is evaluated at the time each job + // is submitted. + ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"` + + // ManagedCluster: Optional A cluster that is managed by the workflow. + ManagedCluster *ManagedCluster `json:"managedCluster,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ClusterSelector") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ClusterSelector") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *WorkflowTemplatePlacement) MarshalJSON() ([]byte, error) { + type noMethod WorkflowTemplatePlacement + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // YarnApplication: A YARN application created by a job. Application // information is a subset of // org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto” @@ -1398,6 +1427,7 @@ type Operation struct { // - “organizations/” ResourceContainer string `json:"resourceContainer,omitempty"` + // Resources: The resources that are involved in the operation. Resources []*ResourceInfo `json:"resources,omitempty"` // StartTime: Required. Start time of the operation. @@ -1405,7 +1435,9 @@ type Operation struct { // UserLabels: User defined labels for the resource that this operation // is associated - // with. + // with. Only a combination of 1000 user labels per consumer project + // are + // allowed. UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. "ConsumerId") to @@ -1431,6 +1463,7 @@ func (s *Operation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// QuotaError: Represents error information for QuotaOperation. type QuotaError struct { // Code: Error code. // @@ -1636,7 +1669,7 @@ type QuotaOperation struct { // QuotaMode: Quota mode for this operation. // // Possible values: - // "UNSPECIFIED" + // "UNSPECIFIED" - Guard against implicit default. Must not be used. // "NORMAL" - For AllocateQuota request, allocates quota for the // amount specified in // the service configuration or specified using the quota metrics. If @@ -1707,28 +1740,6 @@ func (s *QuotaOperation) MarshalJSON() ([]byte, error) { // QuotaProperties: Represents the properties needed for quota // operations. type QuotaProperties struct { - // LimitByIds: LimitType IDs that should be used for checking quota. Key - // in this map - // should be a valid LimitType string, and the value is the ID to be - // used. For - // example, an entry will cause all user quota limits to use - // 123 - // as the user ID. See google/api/quota.proto for the definition of - // LimitType. - // CLIENT_PROJECT: Not supported. - // USER: Value of this entry will be used for enforcing user-level - // quota - // limits. If none specified, caller IP passed in the - // servicecontrol.googleapis.com/caller_ip label will be used - // instead. - // If the server cannot resolve a value for this LimitType, an - // error - // will be thrown. No validation will be performed on this - // ID. - // Deprecated: use servicecontrol.googleapis.com/user label to send user - // ID. - LimitByIds map[string]string `json:"limitByIds,omitempty"` - // QuotaMode: Quota mode for this operation. // // Possible values: @@ -1751,7 +1762,7 @@ type QuotaProperties struct { // operation. QuotaMode string `json:"quotaMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "LimitByIds") to + // ForceSendFields is a list of field names (e.g. "QuotaMode") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, // non-interface field appearing in ForceSendFields will be sent to the @@ -1759,7 +1770,7 @@ type QuotaProperties struct { // used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LimitByIds") to include in + // NullFields is a list of field names (e.g. "QuotaMode") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -1904,6 +1915,7 @@ func (s *ReportError) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ReportInfo: Contains additional info about the report operation. type ReportInfo struct { // OperationId: The Operation.operation_id value from the request. OperationId string `json:"operationId,omitempty"` @@ -2058,18 +2070,33 @@ type RequestMetadata struct { // CallerIp: The IP address of the caller. // For caller from internet, this will be public IPv4 or IPv6 // address. - // For caller from GCE VM with external IP address, this will be the - // VM's - // external IP address. For caller from GCE VM without external IP - // address, if - // the VM is in the same GCP organization (or project) as the - // accessed - // resource, `caller_ip` will be the GCE VM's internal IPv4 address, - // otherwise - // it will be redacted to "gce-internal-ip". + // For caller from a Compute Engine VM with external IP address, + // this + // will be the VM's external IP address. For caller from a + // Compute + // Engine VM without external IP address, if the VM is in the + // same + // organization (or project) as the accessed resource, `caller_ip` + // will + // be the VM's internal IPv4 address, otherwise the `caller_ip` will + // be + // redacted to "gce-internal-ip". // See https://cloud.google.com/compute/docs/vpc/ for more information. CallerIp string `json:"callerIp,omitempty"` + // CallerNetwork: The network of the caller. + // Set only if the network host project is part of the same GCP + // organization + // (or project) as the accessed resource. + // See https://cloud.google.com/compute/docs/vpc/ for more + // information. + // This is a scheme-less URI full resource name. For example: + // + // + // "//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ + // ID" + CallerNetwork string `json:"callerNetwork,omitempty"` + // CallerSuppliedUserAgent: The user agent of the caller. // This information is not authenticated and should be treated // accordingly. @@ -2108,8 +2135,7 @@ func (s *RequestMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// ResourceInfo: DO NOT USE. -// This definition is not ready for use yet. +// ResourceInfo: Describes a resource associated with this operation. type ResourceInfo struct { // ResourceContainer: The identifier of the parent of this resource // instance. @@ -2147,6 +2173,8 @@ func (s *ResourceInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StartReconciliationRequest: Request message for +// QuotaController.StartReconciliation. type StartReconciliationRequest struct { // ReconciliationOperation: Operation that describes the quota // reconciliation. @@ -2184,6 +2212,8 @@ func (s *StartReconciliationRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StartReconciliationResponse: Response message for +// QuotaController.StartReconciliation. type StartReconciliationResponse struct { // OperationId: The same operation_id value used in the // StartReconciliationRequest. Used @@ -2377,20 +2407,16 @@ type ServicesAllocateQuotaCall struct { // // This method requires the // `servicemanagement.services.quota` -// permission on the specified service. For more information, -// see -// [Google Cloud IAM](https://cloud.google.com/iam). +// permission on the specified service. For more information, see +// [Cloud IAM](https://cloud.google.com/iam). // -// **NOTE:** the client code **must** fail-open if the server returns -// one -// of the following quota errors: -// - `PROJECT_STATUS_UNAVAILABLE` -// - `SERVICE_STATUS_UNAVAILABLE` -// - `BILLING_STATUS_UNAVAILABLE` -// - `QUOTA_SYSTEM_UNAVAILABLE` -// -// The server may inject above errors to prohibit any hard dependency -// on the quota system. +// **NOTE:** The client **must** fail-open on server errors +// `INTERNAL`, +// `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure +// system +// reliability, the server may inject these errors to prohibit any +// hard +// dependency on the quota functionality. func (r *ServicesService) AllocateQuota(serviceName string, allocatequotarequest *AllocateQuotaRequest) *ServicesAllocateQuotaCall { c := &ServicesAllocateQuotaCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.serviceName = serviceName @@ -2484,7 +2510,7 @@ func (c *ServicesAllocateQuotaCall) Do(opts ...googleapi.CallOption) (*AllocateQ } return ret, nil // { - // "description": "Attempts to allocate quota for the specified consumer. It should be called\nbefore the operation is executed.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system.", + // "description": "Attempts to allocate quota for the specified consumer. It should be called\nbefore the operation is executed.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** The client **must** fail-open on server errors `INTERNAL`,\n`UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system\nreliability, the server may inject these errors to prohibit any hard\ndependency on the quota functionality.", // "flatPath": "v1/services/{serviceName}:allocateQuota", // "httpMethod": "POST", // "id": "servicecontrol.services.allocateQuota", @@ -2825,20 +2851,17 @@ type ServicesReleaseQuotaCall struct { // // This method requires the // `servicemanagement.services.quota` -// permission on the specified service. For more information, -// see -// [Google Cloud IAM](https://cloud.google.com/iam). +// permission on the specified service. For more information, see +// [Cloud IAM](https://cloud.google.com/iam). // -// **NOTE:** the client code **must** fail-open if the server returns -// one -// of the following quota errors: -// - `PROJECT_STATUS_UNAVAILABLE` -// - `SERVICE_STATUS_UNAVAILABLE` -// - `BILLING_STATUS_UNAVAILABLE` -// - `QUOTA_SYSTEM_UNAVAILABLE` // -// The server may inject above errors to prohibit any hard dependency -// on the quota system. +// **NOTE:** The client **must** fail-open on server errors +// `INTERNAL`, +// `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure +// system +// reliability, the server may inject these errors to prohibit any +// hard +// dependency on the quota functionality. func (r *ServicesService) ReleaseQuota(serviceName string, releasequotarequest *ReleaseQuotaRequest) *ServicesReleaseQuotaCall { c := &ServicesReleaseQuotaCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.serviceName = serviceName @@ -2932,7 +2955,7 @@ func (c *ServicesReleaseQuotaCall) Do(opts ...googleapi.CallOption) (*ReleaseQuo } return ret, nil // { - // "description": "Releases previously allocated quota done through AllocateQuota method.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Google Cloud IAM](https://cloud.google.com/iam).\n\n**NOTE:** the client code **must** fail-open if the server returns one\nof the following quota errors:\n- `PROJECT_STATUS_UNAVAILABLE`\n- `SERVICE_STATUS_UNAVAILABLE`\n- `BILLING_STATUS_UNAVAILABLE`\n- `QUOTA_SYSTEM_UNAVAILABLE`\n\nThe server may inject above errors to prohibit any hard dependency\non the quota system.", + // "description": "Releases previously allocated quota done through AllocateQuota method.\n\nThis method requires the `servicemanagement.services.quota`\npermission on the specified service. For more information, see\n[Cloud IAM](https://cloud.google.com/iam).\n\n\n**NOTE:** The client **must** fail-open on server errors `INTERNAL`,\n`UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system\nreliability, the server may inject these errors to prohibit any hard\ndependency on the quota functionality.", // "flatPath": "v1/services/{serviceName}:releaseQuota", // "httpMethod": "POST", // "id": "servicecontrol.services.releaseQuota", diff --git a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json index 84c980e6d..6bf82b2f7 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-api.json @@ -1,888 +1,320 @@ { - "name": "servicemanagement", - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Service Management API", - "ownerName": "Google", - "resources": { - "services": { - "methods": { - "testIamPermissions": { - "path": "v1/{+resource}:testIamPermissions", - "id": "servicemanagement.services.testIamPermissions", - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^services/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services/{servicesId}:testIamPermissions" - }, - "getConfig": { - "description": "Gets a service configuration (version) for a managed service.", - "httpMethod": "GET", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Service" - }, - "parameters": { - "view": { - "location": "query", - "enum": [ - "BASIC", - "FULL" - ], - "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", - "type": "string" - }, - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" - }, - "configId": { - "type": "string", - "location": "query", - "description": "The id of the service configuration resource." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services/{serviceName}/config", - "path": "v1/services/{serviceName}/config", - "id": "servicemanagement.services.getConfig" - }, - "delete": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "serviceName": { - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/services/{serviceName}", - "id": "servicemanagement.services.delete", - "path": "v1/services/{serviceName}", - "description": "Deletes a managed service. This method will change the service to the\n`Soft-Delete` state for 30 days. Within this period, service producers may\ncall UndeleteService to restore the service.\nAfter 30 days, the service will be permanently deleted.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e" - }, - "enable": { - "flatPath": "v1/services/{serviceName}:enable", - "path": "v1/services/{serviceName}:enable", - "id": "servicemanagement.services.enable", - "description": "Enables a service for a project, so it can be used\nfor the project. See\n[Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: EnableServiceResponse\u003e", - "request": { - "$ref": "EnableServiceRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "serviceName": { - "location": "path", - "description": "Name of the service to enable. Specifying an unknown service name will\ncause the request to fail.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "setIamPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^services/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "flatPath": "v1/services/{servicesId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "servicemanagement.services.setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - } - }, - "disable": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "serviceName": { - "location": "path", - "description": "Name of the service to disable. Specifying an unknown service name\nwill cause the request to fail.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/services/{serviceName}:disable", - "id": "servicemanagement.services.disable", - "path": "v1/services/{serviceName}:disable", - "request": { - "$ref": "DisableServiceRequest" - }, - "description": "Disables a service for a project, so it can no longer be\nbe used for the project. It prevents accidental usage that may cause\nunexpected billing charges or security leaks.\n\nOperation\u003cresponse: DisableServiceResponse\u003e" - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^services/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services/{servicesId}:getIamPolicy", - "id": "servicemanagement.services.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy" - }, - "undelete": { - "description": "Revives a previously deleted managed service. The method restores the\nservice using the configuration at the time the service was deleted.\nThe target service must exist and must have been deleted within the\nlast 30 days.\n\nOperation\u003cresponse: UndeleteServiceResponse\u003e", - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "serviceName": { - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/services/{serviceName}:undelete", - "path": "v1/services/{serviceName}:undelete", - "id": "servicemanagement.services.undelete" - }, - "list": { - "response": { - "$ref": "ListServicesResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "producerProjectId": { - "type": "string", - "location": "query", - "description": "Include services produced by the specified project." - }, - "consumerId": { - "description": "Include services consumed by the specified consumer.\n\nThe Google Service Management implementation accepts the following\nforms:\n- project:\u003cproject_id\u003e", - "type": "string", - "location": "query" - }, - "pageToken": { - "location": "query", - "description": "Token identifying which result to start with; returned by a previous list\ncall.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Requested size of the next page of data.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services", - "id": "servicemanagement.services.list", - "path": "v1/services", - "description": "Lists managed services.\n\nReturns all public services. For authenticated users, also returns all\nservices the calling user has \"servicemanagement.services.get\" permission\nfor.\n\n**BETA:** If the caller specifies the `consumer_id`, it returns only the\nservices enabled on the consumer. The `consumer_id` must have the format\nof \"project:{PROJECT-ID}\"." - }, - "create": { - "id": "servicemanagement.services.create", - "path": "v1/services", - "request": { - "$ref": "ManagedService" - }, - "description": "Creates a new managed service.\nPlease note one producer project can own no more than 20 services.\n\nOperation\u003cresponse: ManagedService\u003e", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": {}, - "flatPath": "v1/services" - }, - "generateConfigReport": { - "flatPath": "v1/services:generateConfigReport", - "id": "servicemanagement.services.generateConfigReport", - "path": "v1/services:generateConfigReport", - "description": "Generates and returns a report (errors, warnings and changes from\nexisting configurations) associated with\nGenerateConfigReportRequest.new_value\n\nIf GenerateConfigReportRequest.old_value is specified,\nGenerateConfigReportRequest will contain a single ChangeReport based on the\ncomparison between GenerateConfigReportRequest.new_value and\nGenerateConfigReportRequest.old_value.\nIf GenerateConfigReportRequest.old_value is not specified, this method\nwill compare GenerateConfigReportRequest.new_value with the last pushed\nservice configuration.", - "request": { - "$ref": "GenerateConfigReportRequest" - }, - "response": { - "$ref": "GenerateConfigReportResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ] - }, - "get": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "parameters": { - "serviceName": { - "description": "The name of the service. See the `ServiceManager` overview for naming\nrequirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/services/{serviceName}", - "id": "servicemanagement.services.get", - "path": "v1/services/{serviceName}", - "description": "Gets a managed service. Authentication is required unless the service is\npublic.", - "response": { - "$ref": "ManagedService" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "GET" - } - }, - "resources": { - "configs": { - "methods": { - "submit": { - "request": { - "$ref": "SubmitConfigSourceRequest" - }, - "description": "Creates a new service configuration (version) for a managed service based\non\nuser-supplied configuration source files (for example: OpenAPI\nSpecification). This method stores the source configurations as well as the\ngenerated service configuration. To rollout the service configuration to\nother services,\nplease call CreateServiceRollout.\n\nOperation\u003cresponse: SubmitConfigSourceResponse\u003e", - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "serviceName": { - "type": "string", - "required": true, - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`." - } - }, - "flatPath": "v1/services/{serviceName}/configs:submit", - "path": "v1/services/{serviceName}/configs:submit", - "id": "servicemanagement.services.configs.submit" - }, - "get": { - "response": { - "$ref": "Service" - }, - "parameterOrder": [ - "serviceName", - "configId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "parameters": { - "configId": { - "location": "path", - "description": "The id of the service configuration resource.", - "type": "string", - "required": true - }, - "view": { - "enum": [ - "BASIC", - "FULL" - ], - "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", - "type": "string", - "location": "query" - }, - "serviceName": { - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/services/{serviceName}/configs/{configId}", - "id": "servicemanagement.services.configs.get", - "path": "v1/services/{serviceName}/configs/{configId}", - "description": "Gets a service configuration (version) for a managed service." - }, - "list": { - "id": "servicemanagement.services.configs.list", - "path": "v1/services/{serviceName}/configs", - "description": "Lists the history of the service configuration for a managed service,\nfrom the newest to the oldest.", - "response": { - "$ref": "ListServiceConfigsResponse" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "parameters": { - "serviceName": { - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - }, - "pageToken": { - "location": "query", - "description": "The token of the page to retrieve.", - "type": "string" - }, - "pageSize": { - "format": "int32", - "description": "The max number of items to include in the response list.", - "type": "integer", - "location": "query" - } - }, - "flatPath": "v1/services/{serviceName}/configs" - }, - "create": { - "id": "servicemanagement.services.configs.create", - "path": "v1/services/{serviceName}/configs", - "request": { - "$ref": "Service" - }, - "description": "Creates a new service configuration (version) for a managed service.\nThis method only stores the service configuration. To roll out the service\nconfiguration to backend systems please call\nCreateServiceRollout.", - "response": { - "$ref": "Service" - }, - "parameterOrder": [ - "serviceName" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/services/{serviceName}/configs" - } - } - }, - "consumers": { - "methods": { - "setIamPolicy": { - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "parameters": { - "resource": { - "pattern": "^services/[^/]+/consumers/[^/]+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "servicemanagement.services.consumers.setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - } - }, - "testIamPermissions": { - "id": "servicemanagement.services.consumers.testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^services/[^/]+/consumers/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:testIamPermissions" - }, - "getIamPolicy": { - "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:getIamPolicy", - "id": "servicemanagement.services.consumers.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "response": { - "$ref": "Policy" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true, - "pattern": "^services/[^/]+/consumers/[^/]+$", - "location": "path" - } - } - } - } - }, - "rollouts": { - "methods": { - "get": { - "response": { - "$ref": "Rollout" - }, - "parameterOrder": [ - "serviceName", - "rolloutId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "parameters": { - "serviceName": { - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - }, - "rolloutId": { - "location": "path", - "description": "The id of the rollout resource.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/services/{serviceName}/rollouts/{rolloutId}", - "id": "servicemanagement.services.rollouts.get", - "path": "v1/services/{serviceName}/rollouts/{rolloutId}", - "description": "Gets a service configuration rollout." - }, - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "ListServiceRolloutsResponse" - }, - "parameters": { - "filter": { - "location": "query", - "description": "Use `filter` to return subset of rollouts.\nThe following filters are supported:\n -- To limit the results to only those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',\n use filter='status=SUCCESS'\n -- To limit the results to those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'\n or 'FAILED', use filter='status=CANCELLED OR status=FAILED'", - "type": "string" - }, - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true, - "location": "path" - }, - "pageToken": { - "location": "query", - "description": "The token of the page to retrieve.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The max number of items to include in the response list.", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/service.management", - "https://www.googleapis.com/auth/service.management.readonly" - ], - "flatPath": "v1/services/{serviceName}/rollouts", - "path": "v1/services/{serviceName}/rollouts", - "id": "servicemanagement.services.rollouts.list", - "description": "Lists the history of the service configuration rollouts for a managed\nservice, from the newest to the oldest." - }, - "create": { - "path": "v1/services/{serviceName}/rollouts", - "id": "servicemanagement.services.rollouts.create", - "description": "Creates a new service configuration rollout. Based on rollout, the\nGoogle Service Management will roll out the service configurations to\ndifferent backend services. For example, the logging configuration will be\npushed to Google Cloud Logging.\n\nPlease note that any previous pending and running Rollouts and associated\nOperations will be automatically cancelled so that the latest Rollout will\nnot be blocked by previous Rollouts.\n\nOperation\u003cresponse: Rollout\u003e", - "request": { - "$ref": "Rollout" - }, - "httpMethod": "POST", - "parameterOrder": [ - "serviceName" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "serviceName": { - "location": "path", - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "flatPath": "v1/services/{serviceName}/rollouts" - } - } - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "httpMethod": "GET", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^operations/.+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "flatPath": "v1/operations/{operationsId}", - "path": "v1/{+name}", - "id": "servicemanagement.operations.get" - }, - "list": { - "description": "Lists service operations that match the specified filter in the request.", - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "parameters": { - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "name": { - "description": "Not used.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "The maximum number of operations to return. If unspecified, defaults to\n50. The maximum value is 100.", - "type": "integer", - "location": "query" - }, - "filter": { - "description": "A string for filtering Operations.\n The following filter fields are supported:\n\n * serviceName: Required. Only `=` operator is allowed.\n * startTime: The time this job was started, in ISO 8601 format.\n Allowed operators are `\u003e=`, `\u003e`, `\u003c=`, and `\u003c`.\n * status: Can be `done`, `in_progress`, or `failed`. Allowed\n operators are `=`, and `!=`.\n\n Filter expression supports conjunction (AND) and disjunction (OR)\n logical operators. However, the serviceName restriction must be at the\n top-level and can only be combined with other restrictions via the AND\n logical operator.\n\n Examples:\n\n * `serviceName={some-service}.googleapis.com`\n * `serviceName={some-service}.googleapis.com AND startTime\u003e=\"2017-02-01\"`\n * `serviceName={some-service}.googleapis.com AND status=done`\n * `serviceName={some-service}.googleapis.com AND (status=done OR startTime\u003e=\"2017-02-01\")`", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], - "flatPath": "v1/operations", - "id": "servicemanagement.operations.list", - "path": "v1/operations" - } - } - } - }, - "parameters": { - "upload_protocol": { - "type": "string", - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "uploadType": { - "type": "string", - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format." - }, - "alt": { - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" - }, - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - } - }, - "version": "v1", - "baseUrl": "https://servicemanagement.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.", - "servicePath": "", "basePath": "", "id": "servicemanagement:v1", + "revision": "20170926", "documentationLink": "https://cloud.google.com/service-management/", - "revision": "20170916", "discoveryVersion": "v1", "schemas": { + "LogDescriptor": { + "description": "A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer", + "type": "object", + "properties": { + "labels": { + "description": "The set of labels that are available to describe a specific log entry.\nRuntime requests that contain labels not specified here are\nconsidered invalid.", + "items": { + "$ref": "LabelDescriptor" + }, + "type": "array" + }, + "name": { + "description": "The name of the log. It must be less than 512 characters long and can\ninclude the following characters: upper- and lower-case alphanumeric\ncharacters [A-Za-z0-9], and punctuation characters including\nslash, underscore, hyphen, period [/_-.].", + "type": "string" + }, + "displayName": { + "description": "The human-readable name for this log. This information appears on\nthe user interface and should be concise.", + "type": "string" + }, + "description": { + "description": "A human-readable description of this log. This information appears in\nthe documentation and can contain details.", + "type": "string" + } + }, + "id": "LogDescriptor" + }, + "ConfigFile": { + "description": "Generic specification of a source configuration file", + "type": "object", + "properties": { + "filePath": { + "description": "The file name of the configuration file (full or relative path).", + "type": "string" + }, + "fileType": { + "enumDescriptions": [ + "Unknown file type.", + "YAML-specification of service.", + "OpenAPI specification, serialized in JSON.", + "OpenAPI specification, serialized in YAML.", + "FileDescriptorSet, generated by protoc.\n\nTo generate, use protoc with imports and source info included.\nFor an example test.proto file, the following command would put the value\nin a new file named out.pb.\n\n$protoc --include_imports --include_source_info test.proto -o out.pb", + "Uncompiled Proto file. Used for storage and display purposes only,\ncurrently server-side compilation is not supported. Should match the\ninputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A\nfile of this type can only be included if at least one file of type\nFILE_DESCRIPTOR_SET_PROTO is included." + ], + "enum": [ + "FILE_TYPE_UNSPECIFIED", + "SERVICE_CONFIG_YAML", + "OPEN_API_JSON", + "OPEN_API_YAML", + "FILE_DESCRIPTOR_SET_PROTO", + "PROTO_FILE" + ], + "description": "The type of configuration file this represents.", + "type": "string" + }, + "fileContents": { + "format": "byte", + "description": "The bytes that constitute the file.", + "type": "string" + } + }, + "id": "ConfigFile" + }, + "MonitoredResourceDescriptor": { + "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", + "type": "object", + "properties": { + "labels": { + "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`.", + "items": { + "$ref": "LabelDescriptor" + }, + "type": "array" + }, + "name": { + "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", + "type": "string" + }, + "description": { + "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation.", + "type": "string" + }, + "displayName": { + "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`.", + "type": "string" + }, + "type": { + "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", + "type": "string" + } + }, + "id": "MonitoredResourceDescriptor" + }, + "CustomErrorRule": { + "description": "A custom error rule.", + "type": "object", + "properties": { + "isErrorType": { + "description": "Mark this message as possible payload in error response. Otherwise,\nobjects of this type will be filtered when they appear in error payload.", + "type": "boolean" + }, + "selector": { + "description": "Selects messages to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + } + }, + "id": "CustomErrorRule" + }, + "MediaDownload": { + "type": "object", + "properties": { + "maxDirectDownloadSize": { + "format": "int64", + "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes.", + "type": "string" + }, + "dropzone": { + "type": "string", + "description": "Name of the Scotty dropzone to use for the current API." + }, + "useDirectDownload": { + "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "type": "boolean" + }, + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", + "type": "boolean" + }, + "enabled": { + "description": "Whether download is enabled.", + "type": "boolean" + }, + "downloadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download.", + "type": "string" + } + }, + "id": "MediaDownload", + "description": "Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods." + }, + "CustomAuthRequirements": { + "properties": { + "provider": { + "description": "A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice).", + "type": "string" + } + }, + "id": "CustomAuthRequirements", + "description": "Configuration for a custom authentication provider.", + "type": "object" + }, + "ChangeReport": { + "description": "Change report associated with a particular service configuration.\n\nIt contains a list of ConfigChanges based on the comparison between\ntwo service configurations.", + "type": "object", + "properties": { + "configChanges": { + "items": { + "$ref": "ConfigChange" + }, + "type": "array", + "description": "List of changes between two service configurations.\nThe changes will be alphabetically sorted based on the identifier\nof each change.\nA ConfigChange identifier is a dot separated path to the configuration.\nExample: visibility.rules[selector='LibraryService.CreateBook'].restriction" + } + }, + "id": "ChangeReport" + }, + "DisableServiceRequest": { + "description": "Request message for DisableService method.", + "type": "object", + "properties": { + "consumerId": { + "description": "The identity of consumer resource which service disablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id.", + "type": "string" + } + }, + "id": "DisableServiceRequest" + }, + "SubmitConfigSourceResponse": { + "description": "Response message for SubmitConfigSource method.", + "type": "object", + "properties": { + "serviceConfig": { + "description": "The generated service configuration.", + "$ref": "Service" + } + }, + "id": "SubmitConfigSourceResponse" + }, + "MediaUpload": { + "description": "Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", + "type": "object", + "properties": { + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of an\nupload should be sent to the backend. These notifications will not be seen\nby the client and will not consume quota.", + "type": "boolean" + }, + "progressNotification": { + "type": "boolean", + "description": "Whether to receive a notification for progress changes of media upload." + }, + "enabled": { + "description": "Whether upload is enabled.", + "type": "boolean" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "startNotification": { + "description": "Whether to receive a notification on the start of media upload.", + "type": "boolean" + }, + "uploadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the upload service if one is used for upload.", + "type": "string" + }, + "maxSize": { + "format": "int64", + "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", + "type": "string" + }, + "mimeTypes": { + "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "MediaUpload" + }, + "BillingDestination": { + "type": "object", + "properties": { + "monitoredResource": { + "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section.", + "type": "string" + }, + "metrics": { + "description": "Names of the metrics to report to this billing destination.\nEach name must be defined in Service.metrics section.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "BillingDestination", + "description": "Configuration of a specific billing destination (Currently only support\nbill against consumer project)." + }, + "Advice": { + "id": "Advice", + "description": "Generated advice about this change, used for providing more\ninformation about how a change will affect the existing service.", + "type": "object", + "properties": { + "description": { + "description": "Useful description for why this advice was applied and what actions should\nbe taken to mitigate any implied risks.", + "type": "string" + } + } + }, + "ManagedService": { + "properties": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements.", + "type": "string" + }, + "producerProjectId": { + "description": "ID of the project that produces and owns this service.", + "type": "string" + } + }, + "id": "ManagedService", + "description": "The full representation of a Service that is managed by\nGoogle Service Management.", + "type": "object" + }, + "UsageRule": { + "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", + "type": "object", + "properties": { + "selector": { + "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "skipServiceControl": { + "description": "True, if the method should skip service control. If so, no control plane\nfeature (like quota and billing) will be enabled.", + "type": "boolean" + }, + "allowUnregisteredCalls": { + "description": "True, if the method allows unregistered calls; false otherwise.", + "type": "boolean" + } + }, + "id": "UsageRule" + }, "AuthRequirement": { "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "type": "object", "properties": { - "providerId": { - "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth", - "type": "string" - }, "audiences": { "description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", "type": "string" + }, + "providerId": { + "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth", + "type": "string" } }, "id": "AuthRequirement" }, "TrafficPercentStrategy": { + "id": "TrafficPercentStrategy", + "description": "Strategy that specifies how clients of Google Service Controller want to\nsend traffic to use different config versions. This is generally\nused by API proxy to split traffic based on your configured precentage for\neach config version.\n\nOne example of how to gradually rollout a new service configuration using\nthis\nstrategy:\nDay 1\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160206\"\n traffic_percent_strategy {\n percentages: {\n \"example.googleapis.com/20160201\": 70.00\n \"example.googleapis.com/20160206\": 30.00\n }\n }\n }\n\nDay 2\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160207\"\n traffic_percent_strategy: {\n percentages: {\n \"example.googleapis.com/20160206\": 100.00\n }\n }\n }", "type": "object", "properties": { "percentages": { @@ -893,17 +325,15 @@ "description": "Maps service configuration IDs to their corresponding traffic percentage.\nKey is the service configuration ID, Value is the traffic percentage\nwhich must be greater than 0.0 and the sum must equal to 100.0.", "type": "object" } - }, - "id": "TrafficPercentStrategy", - "description": "Strategy that specifies how clients of Google Service Controller want to\nsend traffic to use different config versions. This is generally\nused by API proxy to split traffic based on your configured precentage for\neach config version.\n\nOne example of how to gradually rollout a new service configuration using\nthis\nstrategy:\nDay 1\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160206\"\n traffic_percent_strategy {\n percentages: {\n \"example.googleapis.com/20160201\": 70.00\n \"example.googleapis.com/20160206\": 30.00\n }\n }\n }\n\nDay 2\n\n Rollout {\n id: \"example.googleapis.com/rollout_20160207\"\n traffic_percent_strategy: {\n percentages: {\n \"example.googleapis.com/20160206\": 100.00\n }\n }\n }" + } }, "Documentation": { "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.", "type": "object", "properties": { "summary": { - "description": "A short summary of what the service does. Can only be provided by\nplain text.", - "type": "string" + "type": "string", + "description": "A short summary of what the service does. Can only be provided by\nplain text." }, "documentationRootUrl": { "type": "string", @@ -931,8 +361,6 @@ "id": "Documentation" }, "AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", - "type": "object", "properties": { "logType": { "enumDescriptions": [ @@ -958,53 +386,25 @@ "type": "array" } }, - "id": "AuditLogConfig" + "id": "AuditLogConfig", + "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", + "type": "object" }, "ConfigSource": { + "id": "ConfigSource", "description": "Represents a source file which is used to generate the service configuration\ndefined by `google.api.Service`.", "type": "object", "properties": { + "id": { + "type": "string", + "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead." + }, "files": { "description": "Set of source configuration files that are used to generate a service\nconfiguration (`google.api.Service`).", "items": { "$ref": "ConfigFile" }, "type": "array" - }, - "id": { - "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", - "type": "string" - } - }, - "id": "ConfigSource" - }, - "AuthenticationRule": { - "id": "AuthenticationRule", - "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.", - "type": "object", - "properties": { - "requirements": { - "description": "Requirements for additional authentication providers.", - "items": { - "$ref": "AuthRequirement" - }, - "type": "array" - }, - "allowWithoutCredential": { - "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject.", - "type": "boolean" - }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - }, - "customAuth": { - "description": "Configuration for custom authentication.", - "$ref": "CustomAuthRequirements" - }, - "oauth": { - "$ref": "OAuthRequirements", - "description": "The requirements for OAuth credentials." } } }, @@ -1012,6 +412,11 @@ "description": "A backend rule provides configuration for an individual API element.", "type": "object", "properties": { + "minDeadline": { + "format": "double", + "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", + "type": "number" + }, "address": { "description": "The address of the API backend.", "type": "string" @@ -1024,15 +429,51 @@ "format": "double", "description": "The number of seconds to wait for a response from a request. The default\ndeadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.", "type": "number" - }, - "minDeadline": { - "format": "double", - "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", - "type": "number" } }, "id": "BackendRule" }, + "AuthenticationRule": { + "type": "object", + "properties": { + "allowWithoutCredential": { + "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject.", + "type": "boolean" + }, + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "customAuth": { + "$ref": "CustomAuthRequirements", + "description": "Configuration for custom authentication." + }, + "oauth": { + "$ref": "OAuthRequirements", + "description": "The requirements for OAuth credentials." + }, + "requirements": { + "items": { + "$ref": "AuthRequirement" + }, + "type": "array", + "description": "Requirements for additional authentication providers." + } + }, + "id": "AuthenticationRule", + "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored." + }, + "UndeleteServiceResponse": { + "description": "Response message for UndeleteService method.", + "type": "object", + "properties": { + "service": { + "description": "Revived service resource.", + "$ref": "ManagedService" + } + }, + "id": "UndeleteServiceResponse" + }, "Policy": { "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", "type": "object", @@ -1067,36 +508,9 @@ }, "id": "Policy" }, - "UndeleteServiceResponse": { - "description": "Response message for UndeleteService method.", - "type": "object", - "properties": { - "service": { - "$ref": "ManagedService", - "description": "Revived service resource." - } - }, - "id": "UndeleteServiceResponse" - }, "Api": { - "id": "Api", - "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.", "type": "object", "properties": { - "options": { - "description": "Any metadata attached to the interface.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "methods": { - "description": "The methods of this interface, in unspecified order.", - "items": { - "$ref": "Method" - }, - "type": "array" - }, "name": { "description": "The fully qualified name of this interface, including package name\nfollowed by the interface's simple name.", "type": "string" @@ -1127,13 +541,26 @@ "$ref": "Mixin" }, "type": "array" + }, + "options": { + "description": "Any metadata attached to the interface.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, + "methods": { + "description": "The methods of this interface, in unspecified order.", + "items": { + "$ref": "Method" + }, + "type": "array" } - } + }, + "id": "Api", + "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology." }, "MetricRule": { - "id": "MetricRule", - "description": "Bind API methods to metrics. Binding a method to a metric causes that\nmetric's configured quota behaviors to apply to the method call.", - "type": "object", "properties": { "metricCosts": { "additionalProperties": { @@ -1144,21 +571,24 @@ "type": "object" }, "selector": { - "type": "string", - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details." + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" } - } + }, + "id": "MetricRule", + "description": "Bind API methods to metrics. Binding a method to a metric causes that\nmetric's configured quota behaviors to apply to the method call.", + "type": "object" }, "Authentication": { "description": "`Authentication` defines the authentication configuration for an API.\n\nExample for an API targeted for external use:\n\n name: calendar.googleapis.com\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", "type": "object", "properties": { "rules": { - "description": "A list of authentication rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "AuthenticationRule" }, - "type": "array" + "type": "array", + "description": "A list of authentication rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." }, "providers": { "description": "Defines a set of authentication providers that a service supports.", @@ -1179,16 +609,16 @@ "type": "boolean" }, "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" + } }, "name": { - "type": "string", - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`." + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" }, "error": { "$ref": "Status", @@ -1206,15 +636,9 @@ "id": "Operation" }, "Page": { + "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure.", "type": "object", "properties": { - "subpages": { - "description": "Subpages of this page. The order of subpages specified here will be\nhonored in the generated docset.", - "items": { - "$ref": "Page" - }, - "type": "array" - }, "name": { "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`.", "type": "string" @@ -1222,34 +646,40 @@ "content": { "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", "type": "string" + }, + "subpages": { + "description": "Subpages of this page. The order of subpages specified here will be\nhonored in the generated docset.", + "items": { + "$ref": "Page" + }, + "type": "array" } }, - "id": "Page", - "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure." + "id": "Page" }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "type": "array" - }, "code": { - "type": "integer", "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code." + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" }, "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" } }, "id": "Status" @@ -1258,10 +688,6 @@ "description": "Associates `members` with a `role`.", "type": "object", "properties": { - "condition": { - "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL.", - "$ref": "Expr" - }, "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", "items": { @@ -1272,6 +698,10 @@ "role": { "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", "type": "string" + }, + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL." } }, "id": "Binding" @@ -1280,17 +710,13 @@ "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "type": "object", "properties": { - "audiences": { - "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", - "type": "string" - }, "authorizationUrl": { "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.", "type": "string" }, "issuer": { - "type": "string", - "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com" + "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com", + "type": "string" }, "id": { "description": "The unique identifier of the auth provider. It will be referred to by\n`AuthRequirement.provider_id`.\n\nExample: \"bookstore_auth\".", @@ -1299,13 +725,34 @@ "jwksUri": { "description": "URL of the provider's public key set to validate signature of the JWT. See\n[OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).\nOptional if the key set document:\n - can be retrieved from\n [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html\n of the issuer.\n - can be inferred from the email domain of the issuer (e.g. a Google service account).\n\nExample: https://www.googleapis.com/oauth2/v1/certs", "type": "string" + }, + "audiences": { + "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", + "type": "string" } }, "id": "AuthProvider" }, "Service": { + "id": "Service", + "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", "type": "object", "properties": { + "context": { + "$ref": "Context", + "description": "Context configuration." + }, + "enums": { + "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", + "items": { + "$ref": "Enum" + }, + "type": "array" + }, + "id": { + "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", + "type": "string" + }, "usage": { "$ref": "Usage", "description": "Configuration controlling usage of this service." @@ -1322,8 +769,8 @@ "description": "Auth configuration." }, "experimental": { - "$ref": "Experimental", - "description": "Experimental configuration." + "description": "Experimental configuration.", + "$ref": "Experimental" }, "control": { "$ref": "Control", @@ -1335,12 +782,8 @@ "type": "integer" }, "monitoring": { - "description": "Monitoring configuration.", - "$ref": "Monitoring" - }, - "producerProjectId": { - "description": "The Google project that owns this service.", - "type": "string" + "$ref": "Monitoring", + "description": "Monitoring configuration." }, "systemTypes": { "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF.", @@ -1349,38 +792,39 @@ }, "type": "array" }, + "producerProjectId": { + "description": "The Google project that owns this service.", + "type": "string" + }, "visibility": { - "$ref": "Visibility", - "description": "API visibility configuration." + "description": "API visibility configuration.", + "$ref": "Visibility" }, "quota": { "$ref": "Quota", "description": "Quota configuration." }, + "billing": { + "description": "Billing configuration.", + "$ref": "Billing" + }, "name": { "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`.", "type": "string" }, "customError": { - "description": "Custom error configuration.", - "$ref": "CustomError" + "$ref": "CustomError", + "description": "Custom error configuration." }, "title": { "description": "The product title for this service.", "type": "string" }, "endpoints": { + "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs.", "items": { "$ref": "Endpoint" }, - "type": "array", - "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs." - }, - "logs": { - "description": "Defines the logs used by this service.", - "items": { - "$ref": "LogDescriptor" - }, "type": "array" }, "apis": { @@ -1390,29 +834,36 @@ }, "type": "array" }, + "logs": { + "description": "Defines the logs used by this service.", + "items": { + "$ref": "LogDescriptor" + }, + "type": "array" + }, "types": { + "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32", "items": { "$ref": "Type" }, - "type": "array", - "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32" + "type": "array" }, "sourceInfo": { - "$ref": "SourceInfo", - "description": "Output only. The source information for this configuration if available." + "description": "Output only. The source information for this configuration if available.", + "$ref": "SourceInfo" }, "http": { - "$ref": "Http", - "description": "HTTP configuration." + "description": "HTTP configuration.", + "$ref": "Http" + }, + "backend": { + "description": "API backend configuration.", + "$ref": "Backend" }, "systemParameters": { "$ref": "SystemParameters", "description": "System parameter configuration." }, - "backend": { - "$ref": "Backend", - "description": "API backend configuration." - }, "documentation": { "$ref": "Documentation", "description": "Additional API documentation." @@ -1427,33 +878,21 @@ "logging": { "$ref": "Logging", "description": "Logging configuration." - }, - "enums": { - "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", - "items": { - "$ref": "Enum" - }, - "type": "array" - }, - "context": { - "$ref": "Context", - "description": "Context configuration." - }, - "id": { - "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", - "type": "string" } - }, - "id": "Service", - "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth" + } }, "EnumValue": { "description": "Enum value definition.", "type": "object", "properties": { + "number": { + "format": "int32", + "description": "Enum value number.", + "type": "integer" + }, "name": { - "description": "Enum value name.", - "type": "string" + "type": "string", + "description": "Enum value name." }, "options": { "description": "Protocol buffer options.", @@ -1461,17 +900,11 @@ "$ref": "Option" }, "type": "array" - }, - "number": { - "format": "int32", - "description": "Enum value number.", - "type": "integer" } }, "id": "EnumValue" }, "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { "nextPageToken": { @@ -1486,25 +919,33 @@ "type": "array" } }, - "id": "ListOperationsResponse" + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations." }, "CustomHttpPattern": { - "id": "CustomHttpPattern", "description": "A custom pattern is used for defining custom HTTP verb.", "type": "object", "properties": { - "path": { - "description": "The path matched by this custom verb.", - "type": "string" - }, "kind": { "description": "The name of this custom HTTP verb.", "type": "string" + }, + "path": { + "description": "The path matched by this custom verb.", + "type": "string" } - } + }, + "id": "CustomHttpPattern" }, "OperationMetadata": { + "description": "The metadata associated with a long running operation resource.", + "type": "object", "properties": { + "progressPercentage": { + "format": "int32", + "description": "Percentage of completion of this operation, ranging from 0 to 100.", + "type": "integer" + }, "startTime": { "format": "google-datetime", "description": "The start time of the operation.", @@ -1523,31 +964,24 @@ "type": "string" }, "type": "array" - }, - "progressPercentage": { - "format": "int32", - "description": "Percentage of completion of this operation, ranging from 0 to 100.", - "type": "integer" } }, - "id": "OperationMetadata", - "description": "The metadata associated with a long running operation resource.", - "type": "object" + "id": "OperationMetadata" }, "SystemParameterRule": { "description": "Define a system parameter rule mapping system parameter definitions to\nmethods.", "type": "object", "properties": { "parameters": { + "description": "Define parameters. Multiple names may be defined for a parameter.\nFor a given method call, only one of them should be used. If multiple\nnames are used the behavior is implementation-dependent.\nIf none of the specified names are present the behavior is\nparameter-dependent.", "items": { "$ref": "SystemParameter" }, - "type": "array", - "description": "Define parameters. Multiple names may be defined for a parameter.\nFor a given method call, only one of them should be used. If multiple\nnames are used the behavior is implementation-dependent.\nIf none of the specified names are present the behavior is\nparameter-dependent." + "type": "array" }, "selector": { - "type": "string", - "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details." + "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", + "type": "string" } }, "id": "SystemParameterRule" @@ -1556,42 +990,6 @@ "description": "`HttpRule` defines the mapping of an RPC method to one or more HTTP\nREST API methods. The mapping specifies how different portions of the RPC\nrequest message are mapped to URL path, URL query parameters, and\nHTTP request body. The mapping is typically specified as an\n`google.api.http` annotation on the RPC method,\nsee \"google/api/annotations.proto\" for details.\n\nThe mapping consists of a field specifying the path template and\nmethod kind. The path template can refer to fields in the request\nmessage, as in the example below which describes a REST GET\noperation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\nThe same http annotation can alternatively be expressed inside the\n`GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: \u003cproto_package_name\u003e.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\nThis definition enables an automatic, bidrectional mapping of HTTP\nJSON to RPC. Example:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\nIn general, not only fields but also field paths can be referenced\nfrom a path pattern. Fields mapped to the path pattern cannot be\nrepeated and must have a primitive (non-message) type.\n\nAny fields in the request message which are not bound by the path\npattern automatically become (optional) HTTP query\nparameters. Assume the following definition of the request message:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to HTTP parameters must have a\nprimitive type or a repeated primitive type. Message types are not\nallowed. In the case of a repeated type, the parameter can be\nrepeated in the URL, as in `...?param=A¶m=B`.\n\nFor HTTP method kinds which allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice of\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\nThis enables the following two alternative HTTP JSON to RPC\nmappings:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n# Rules for HTTP mapping\n\nThe rules for mapping HTTP path, query parameters, and body fields\nto the request message are as follows:\n\n1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it indicates there is no HTTP request body.\n2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n3. URL query parameters found in the HTTP request are mapped to (c) fields.\n4. Any body sent with an HTTP request can contain only (b) fields.\n\nThe syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single path segment. The syntax `**` matches zero\nor more path segments, which must be the last part of the path except the\n`Verb`. The syntax `LITERAL` matches literal text in the path.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path, all characters\nexcept `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the\nDiscovery Document as `{var}`.\n\nIf a variable contains one or more path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path, all\ncharacters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables\nshow up in the Discovery Document as `{+var}`.\n\nNOTE: While the single segment variable matches the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2\nSimple String Expansion, the multi segment variable **does not** match\nRFC 6570 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs.\n\nNOTE: the field paths in variables and in the `body` must not refer to\nrepeated fields or map fields.", "type": "object", "properties": { - "selector": { - "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - }, - "custom": { - "$ref": "CustomHttpPattern", - "description": "The custom pattern is used for specifying an HTTP method that is not\nincluded in the `pattern` field, such as HEAD, or \"*\" to leave the\nHTTP method unspecified for this rule. The wild-card rule is useful\nfor services that provide content to Web (HTML) clients." - }, - "get": { - "description": "Used for listing and getting information about resources.", - "type": "string" - }, - "patch": { - "description": "Used for updating a resource.", - "type": "string" - }, - "put": { - "description": "Used for updating a resource.", - "type": "string" - }, - "delete": { - "description": "Used for deleting a resource.", - "type": "string" - }, - "body": { - "description": "The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type.", - "type": "string" - }, - "post": { - "description": "Used for creating a resource.", - "type": "string" - }, - "mediaDownload": { - "$ref": "MediaDownload", - "description": "Use this only for Scotty Requests. Do not use this for bytestream methods.\nFor media support, add instead [][google.bytestream.RestByteStream] as an\nAPI to your configuration." - }, "additionalBindings": { "description": "Additional HTTP bindings for the selector. Nested bindings must\nnot contain an `additional_bindings` field themselves (that is,\nthe nesting may only be one level deep).", "items": { @@ -1604,8 +1002,44 @@ "type": "string" }, "mediaUpload": { - "$ref": "MediaUpload", - "description": "Use this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration for Bytestream methods." + "description": "Use this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration for Bytestream methods.", + "$ref": "MediaUpload" + }, + "selector": { + "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "custom": { + "$ref": "CustomHttpPattern", + "description": "The custom pattern is used for specifying an HTTP method that is not\nincluded in the `pattern` field, such as HEAD, or \"*\" to leave the\nHTTP method unspecified for this rule. The wild-card rule is useful\nfor services that provide content to Web (HTML) clients." + }, + "patch": { + "description": "Used for updating a resource.", + "type": "string" + }, + "get": { + "type": "string", + "description": "Used for listing and getting information about resources." + }, + "put": { + "description": "Used for updating a resource.", + "type": "string" + }, + "delete": { + "description": "Used for deleting a resource.", + "type": "string" + }, + "body": { + "type": "string", + "description": "The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type." + }, + "mediaDownload": { + "$ref": "MediaDownload", + "description": "Use this only for Scotty Requests. Do not use this for bytestream methods.\nFor media support, add instead [][google.bytestream.RestByteStream] as an\nAPI to your configuration." + }, + "post": { + "description": "Used for creating a resource.", + "type": "string" } }, "id": "HttpRule" @@ -1619,8 +1053,8 @@ "type": "string" }, "selector": { - "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" + "type": "string", + "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details." } }, "id": "VisibilityRule" @@ -1629,22 +1063,21 @@ "description": "Configuration of a specific monitoring destination (the producer project\nor the consumer project).", "type": "object", "properties": { + "monitoredResource": { + "type": "string", + "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section." + }, "metrics": { "description": "Names of the metrics to report to this monitoring destination.\nEach name must be defined in Service.metrics section.", "items": { "type": "string" }, "type": "array" - }, - "monitoredResource": { - "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section.", - "type": "string" } }, "id": "MonitoringDestination" }, "Visibility": { - "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate.", "type": "object", "properties": { "rules": { @@ -1655,17 +1088,33 @@ "type": "array" } }, - "id": "Visibility" + "id": "Visibility", + "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate." }, - "ConfigChange": { - "description": "Output generated from semantically comparing two versions of a service\nconfiguration.\n\nIncludes detailed information about a field that have changed with\napplicable advice about potential consequences for the change, such as\nbackwards-incompatibility.", + "SystemParameters": { + "id": "SystemParameters", + "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters.", + "type": "object", + "properties": { + "rules": { + "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "items": { + "$ref": "SystemParameterRule" + }, + "type": "array" + } + } + }, + "ConfigChange": { "type": "object", "properties": { - "newValue": { - "description": "Value of the changed object in the new Service configuration,\nin JSON format. This field will not be populated if ChangeType == REMOVED.", - "type": "string" - }, "changeType": { + "enum": [ + "CHANGE_TYPE_UNSPECIFIED", + "ADDED", + "REMOVED", + "MODIFIED" + ], "description": "The type for this change, either ADDED, REMOVED, or MODIFIED.", "type": "string", "enumDescriptions": [ @@ -1673,12 +1122,6 @@ "The changed object exists in the 'new' service configuration, but not\nin the 'old' service configuration.", "The changed object exists in the 'old' service configuration, but not\nin the 'new' service configuration.", "The changed object exists in both service configurations, but its value\nis different." - ], - "enum": [ - "CHANGE_TYPE_UNSPECIFIED", - "ADDED", - "REMOVED", - "MODIFIED" ] }, "element": { @@ -1693,49 +1136,49 @@ "type": "array" }, "oldValue": { - "description": "Value of the changed object in the old Service configuration,\nin JSON format. This field will not be populated if ChangeType == ADDED.", + "type": "string", + "description": "Value of the changed object in the old Service configuration,\nin JSON format. This field will not be populated if ChangeType == ADDED." + }, + "newValue": { + "description": "Value of the changed object in the new Service configuration,\nin JSON format. This field will not be populated if ChangeType == REMOVED.", "type": "string" } }, - "id": "ConfigChange" + "id": "ConfigChange", + "description": "Output generated from semantically comparing two versions of a service\nconfiguration.\n\nIncludes detailed information about a field that have changed with\napplicable advice about potential consequences for the change, such as\nbackwards-incompatibility." }, - "SystemParameters": { + "Quota": { "properties": { - "rules": { - "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "metricRules": { + "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics.", "items": { - "$ref": "SystemParameterRule" + "$ref": "MetricRule" + }, + "type": "array" + }, + "limits": { + "description": "List of `QuotaLimit` definitions for the service.", + "items": { + "$ref": "QuotaLimit" }, "type": "array" } }, - "id": "SystemParameters", - "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters.", + "id": "Quota", + "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", "type": "object" }, "Rollout": { "description": "A rollout resource that defines how service configuration versions are pushed\nto control plane systems. Typically, you create a new version of the\nservice config, and then create a Rollout to push the service config.", "type": "object", "properties": { - "serviceName": { - "description": "The name of the service associated with this Rollout.", - "type": "string" - }, - "trafficPercentStrategy": { - "$ref": "TrafficPercentStrategy", - "description": "Google Service Control selects service configurations based on\ntraffic percentage." - }, - "createdBy": { - "description": "The user who created the Rollout. Readonly.", - "type": "string" - }, "rolloutId": { "description": "Optional unique identifier of this Rollout. Only lower case letters, digits\n and '-' are allowed.\n\nIf not specified by client, the server will generate one. The generated id\nwill have the form of \u003cdate\u003e\u003crevision number\u003e, where \"date\" is the create\ndate in ISO 8601 format. \"revision number\" is a monotonically increasing\npositive number that is reset every day for each service.\nAn example of the generated rollout_id is '2016-02-16r1'", "type": "string" }, "deleteServiceStrategy": { - "$ref": "DeleteServiceStrategy", - "description": "The strategy associated with a rollout to delete a `ManagedService`.\nReadonly." + "description": "The strategy associated with a rollout to delete a `ManagedService`.\nReadonly.", + "$ref": "DeleteServiceStrategy" }, "createTime": { "format": "google-datetime", @@ -1743,6 +1186,8 @@ "type": "string" }, "status": { + "description": "The status of this rollout. Readonly. In case of a failed rollout,\nthe system will automatically rollback to the current Rollout\nversion. Readonly.", + "type": "string", "enumDescriptions": [ "No status specified.", "The Rollout is in progress.", @@ -1760,34 +1205,23 @@ "FAILED", "PENDING", "FAILED_ROLLED_BACK" - ], - "description": "The status of this rollout. Readonly. In case of a failed rollout,\nthe system will automatically rollback to the current Rollout\nversion. Readonly.", + ] + }, + "serviceName": { + "type": "string", + "description": "The name of the service associated with this Rollout." + }, + "trafficPercentStrategy": { + "$ref": "TrafficPercentStrategy", + "description": "Google Service Control selects service configurations based on\ntraffic percentage." + }, + "createdBy": { + "description": "The user who created the Rollout. Readonly.", "type": "string" } }, "id": "Rollout" }, - "Quota": { - "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", - "type": "object", - "properties": { - "limits": { - "items": { - "$ref": "QuotaLimit" - }, - "type": "array", - "description": "List of `QuotaLimit` definitions for the service." - }, - "metricRules": { - "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics.", - "items": { - "$ref": "MetricRule" - }, - "type": "array" - } - }, - "id": "Quota" - }, "GenerateConfigReportRequest": { "type": "object", "properties": { @@ -1812,7 +1246,6 @@ "description": "Request message for GenerateConfigReport method." }, "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", "type": "object", "properties": { "updateMask": { @@ -1825,7 +1258,14 @@ "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." } }, - "id": "SetIamPolicyRequest" + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method." + }, + "DeleteServiceStrategy": { + "id": "DeleteServiceStrategy", + "description": "Strategy used to delete a service. This strategy is a placeholder only\nused by the system generated rollout to delete a service.", + "type": "object", + "properties": {} }, "Step": { "type": "object", @@ -1858,13 +1298,8 @@ "id": "Step", "description": "Represents the status of one operation step." }, - "DeleteServiceStrategy": { - "description": "Strategy used to delete a service. This strategy is a placeholder only\nused by the system generated rollout to delete a service.", - "type": "object", - "properties": {}, - "id": "DeleteServiceStrategy" - }, "LoggingDestination": { + "description": "Configuration of a specific logging destination (the producer project\nor the consumer project).", "type": "object", "properties": { "logs": { @@ -1879,22 +1314,21 @@ "type": "string" } }, - "id": "LoggingDestination", - "description": "Configuration of a specific logging destination (the producer project\nor the consumer project)." + "id": "LoggingDestination" }, "Option": { "properties": { - "value": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type.", - "type": "object" - }, "name": { "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`.", "type": "string" + }, + "value": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type.", + "type": "object" } }, "id": "Option", @@ -1902,7 +1336,6 @@ "type": "object" }, "Logging": { - "id": "Logging", "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history", "type": "object", "properties": { @@ -1920,12 +1353,81 @@ }, "type": "array" } - } + }, + "id": "Logging" + }, + "QuotaLimit": { + "properties": { + "duration": { + "description": "Duration of this limit in textual notation. Example: \"100s\", \"24h\", \"1d\".\nFor duration longer than a day, only multiple of days is supported. We\nsupport only \"100s\" and \"1d\" for now. Additional support will be added in\nthe future. \"0\" indicates indefinite duration.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "freeTier": { + "format": "int64", + "description": "Free tier value displayed in the Developers Console for this limit.\nThe free tier is the number of tokens that will be subtracted from the\nbilled amount when billing is enabled.\nThis field can only be set on a limit with duration \"1d\", in a billable\ngroup; it is invalid on any other limit. If this field is not set, it\ndefaults to 0, indicating that there is no free tier for this service.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "defaultLimit": { + "format": "int64", + "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "displayName": { + "type": "string", + "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration." + }, + "description": { + "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", + "type": "string" + }, + "metric": { + "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only.", + "type": "string" + }, + "values": { + "description": "Tiered limit values, currently only STANDARD is supported.", + "type": "object", + "additionalProperties": { + "format": "int64", + "type": "string" + } + }, + "unit": { + "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only.", + "type": "string" + }, + "maxLimit": { + "format": "int64", + "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only.", + "type": "string" + }, + "name": { + "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit.", + "type": "string" + } + }, + "id": "QuotaLimit", + "description": "`QuotaLimit` defines a specific limit that applies over a specified duration\nfor a limit type. There can be at most one limit for a duration and limit\ntype combination defined within a `QuotaGroup`.", + "type": "object" }, "Method": { - "description": "Method represents a method of an API interface.", "type": "object", "properties": { + "responseTypeUrl": { + "type": "string", + "description": "The URL of the output message type." + }, + "options": { + "description": "Any metadata attached to the method.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, + "responseStreaming": { + "description": "If true, the response is streamed.", + "type": "boolean" + }, "name": { "description": "The simple name of this method.", "type": "string" @@ -1949,96 +1451,28 @@ ], "description": "The source syntax of this method.", "type": "string" - }, - "responseTypeUrl": { - "description": "The URL of the output message type.", - "type": "string" - }, - "options": { - "description": "Any metadata attached to the method.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, - "responseStreaming": { - "description": "If true, the response is streamed.", - "type": "boolean" } }, - "id": "Method" - }, - "QuotaLimit": { - "description": "`QuotaLimit` defines a specific limit that applies over a specified duration\nfor a limit type. There can be at most one limit for a duration and limit\ntype combination defined within a `QuotaGroup`.", - "type": "object", - "properties": { - "duration": { - "description": "Duration of this limit in textual notation. Example: \"100s\", \"24h\", \"1d\".\nFor duration longer than a day, only multiple of days is supported. We\nsupport only \"100s\" and \"1d\" for now. Additional support will be added in\nthe future. \"0\" indicates indefinite duration.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "freeTier": { - "format": "int64", - "description": "Free tier value displayed in the Developers Console for this limit.\nThe free tier is the number of tokens that will be subtracted from the\nbilled amount when billing is enabled.\nThis field can only be set on a limit with duration \"1d\", in a billable\ngroup; it is invalid on any other limit. If this field is not set, it\ndefaults to 0, indicating that there is no free tier for this service.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "defaultLimit": { - "type": "string", - "format": "int64", - "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only." - }, - "displayName": { - "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration.", - "type": "string" - }, - "metric": { - "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only.", - "type": "string" - }, - "description": { - "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", - "type": "string" - }, - "values": { - "additionalProperties": { - "format": "int64", - "type": "string" - }, - "description": "Tiered limit values, currently only STANDARD is supported.", - "type": "object" - }, - "unit": { - "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only.", - "type": "string" - }, - "maxLimit": { - "format": "int64", - "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only.", - "type": "string" - }, - "name": { - "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit.", - "type": "string" - } - }, - "id": "QuotaLimit" + "id": "Method", + "description": "Method represents a method of an API interface." }, "ListServiceRolloutsResponse": { + "description": "Response message for ListServiceRollouts method.", + "type": "object", "properties": { - "rollouts": { - "items": { - "$ref": "Rollout" - }, - "type": "array", - "description": "The list of rollout resources." - }, "nextPageToken": { "description": "The token of the next page of results.", "type": "string" + }, + "rollouts": { + "description": "The list of rollout resources.", + "items": { + "$ref": "Rollout" + }, + "type": "array" } }, - "id": "ListServiceRolloutsResponse", - "description": "Response message for ListServiceRollouts method.", - "type": "object" + "id": "ListServiceRolloutsResponse" }, "ConfigRef": { "type": "object", @@ -2052,22 +1486,36 @@ "description": "Represents a service configuration with its name and id." }, "Mixin": { + "type": "object", "properties": { - "root": { - "description": "If non-empty specifies a path under which inherited HTTP paths\nare rooted.", - "type": "string" - }, "name": { "description": "The fully qualified name of the interface which is included.", "type": "string" + }, + "root": { + "description": "If non-empty specifies a path under which inherited HTTP paths\nare rooted.", + "type": "string" } }, "id": "Mixin", - "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }", - "type": "object" + "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }" }, "FlowOperationMetadata": { + "id": "FlowOperationMetadata", + "description": "The metadata associated with a long running operation resource.", + "type": "object", "properties": { + "flowName": { + "description": "The name of the top-level flow corresponding to this operation.\nMust be equal to the \"name\" field for a FlowName enum.", + "type": "string" + }, + "resourceNames": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The full name of the resources that this flow is directly associated with." + }, "deadline": { "format": "google-datetime", "description": "Deadline for the flow to complete, to prevent orphaned Operations.\n\nIf the flow has not completed by this time, it may be terminated by\nthe engine, or force-failed by Operation lookup.\n\nNote that this is not a hard deadline after which the Flow will\ndefinitely be failed, rather it is a deadline after which it is reasonable\nto suspect a problem and other parts of the system may kill operation\nto ensure we don't have orphans.\nsee also: go/prevent-orphaned-operations", @@ -2087,26 +1535,32 @@ "CANCELLED" ] }, + "operationType": { + "format": "int32", + "description": "Operation type which is a flow type and subtype info as that is missing in\nour datastore otherwise. This maps to the ordinal value of the enum:\njcg/api/tenant/operations/OperationNamespace.java", + "type": "integer" + }, "startTime": { "format": "google-datetime", "description": "The start time of the operation.", "type": "string" }, - "resourceNames": { - "description": "The full name of the resources that this flow is directly associated with.", - "items": { - "type": "string" - }, - "type": "array" - }, - "flowName": { - "description": "The name of the top-level flow corresponding to this operation.\nMust be equal to the \"name\" field for a FlowName enum.", + "surface": { + "enumDescriptions": [ + "", + "", + "", + "TenancyUnit, ServiceNetworking fall under this" + ], + "enum": [ + "UNSPECIFIED_OP_SERVICE", + "SERVICE_MANAGEMENT", + "SERVICE_USAGE", + "SERVICE_CONSUMER_MANAGEMENT" + ], "type": "string" } - }, - "id": "FlowOperationMetadata", - "description": "The metadata associated with a long running operation resource.", - "type": "object" + } }, "CustomError": { "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError", @@ -2130,6 +1584,8 @@ "id": "CustomError" }, "Http": { + "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", + "type": "object", "properties": { "rules": { "description": "A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", @@ -2143,30 +1599,27 @@ "type": "boolean" } }, - "id": "Http", - "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", - "type": "object" + "id": "Http" }, "SourceInfo": { - "description": "Source information used to create a Service Config", "type": "object", "properties": { "sourceFiles": { "description": "All files used during config generation.", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, "type": "array" } }, - "id": "SourceInfo" + "id": "SourceInfo", + "description": "Source information used to create a Service Config" }, "Control": { - "type": "object", "properties": { "environment": { "description": "The service control environment to use. If empty, no control plane\nfeature (like quota and billing) will be enabled.", @@ -2174,7 +1627,8 @@ } }, "id": "Control", - "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc." + "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc.", + "type": "object" }, "SystemParameter": { "description": "Define a parameter's name and location. The parameter may be passed as either\nan HTTP header or a URL query parameter, and if both are passed the behavior\nis implementation-dependent.", @@ -2185,8 +1639,8 @@ "type": "string" }, "httpHeader": { - "type": "string", - "description": "Define the HTTP header name to use for the parameter. It is case\ninsensitive." + "description": "Define the HTTP header name to use for the parameter. It is case\ninsensitive.", + "type": "string" }, "name": { "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", @@ -2195,74 +1649,35 @@ }, "id": "SystemParameter" }, - "Field": { - "description": "A single field of a message type.", + "Monitoring": { + "id": "Monitoring", + "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count", "type": "object", "properties": { - "oneofIndex": { - "format": "int32", - "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", - "type": "integer" + "consumerDestinations": { + "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array" }, - "packed": { - "description": "Whether to use alternative packed wire representation.", - "type": "boolean" - }, - "cardinality": { - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], - "description": "The field cardinality.", - "type": "string", - "enumDescriptions": [ - "For fields with unknown cardinality.", - "For optional fields.", - "For required fields. Proto2 syntax only.", - "For repeated fields." - ] - }, - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", + "producerDestinations": { + "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array" + } + } + }, + "Field": { + "type": "object", + "properties": { + "jsonName": { + "description": "The field JSON name.", "type": "string" }, - "name": { - "description": "The field name.", - "type": "string" - }, - "typeUrl": { - "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", - "type": "string" - }, - "number": { - "format": "int32", - "description": "The field number.", - "type": "integer" - }, "kind": { - "enumDescriptions": [ - "Field type unknown.", - "Field type double.", - "Field type float.", - "Field type int64.", - "Field type uint64.", - "Field type int32.", - "Field type fixed64.", - "Field type fixed32.", - "Field type bool.", - "Field type string.", - "Field type group. Proto2 syntax only, and deprecated.", - "Field type message.", - "Field type bytes.", - "Field type uint32.", - "Field type enum.", - "Field type sfixed32.", - "Field type sfixed64.", - "Field type sint32.", - "Field type sint64." - ], "enum": [ "TYPE_UNKNOWN", "TYPE_DOUBLE", @@ -2285,11 +1700,28 @@ "TYPE_SINT64" ], "description": "The field type.", - "type": "string" - }, - "jsonName": { - "description": "The field JSON name.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Field type unknown.", + "Field type double.", + "Field type float.", + "Field type int64.", + "Field type uint64.", + "Field type int32.", + "Field type fixed64.", + "Field type fixed32.", + "Field type bool.", + "Field type string.", + "Field type group. Proto2 syntax only, and deprecated.", + "Field type message.", + "Field type bytes.", + "Field type uint32.", + "Field type enum.", + "Field type sfixed32.", + "Field type sfixed64.", + "Field type sint32.", + "Field type sint64." + ] }, "options": { "description": "The protocol buffer options.", @@ -2297,33 +1729,54 @@ "$ref": "Option" }, "type": "array" - } - }, - "id": "Field" - }, - "Monitoring": { - "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count", - "type": "object", - "properties": { - "consumerDestinations": { - "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array" }, - "producerDestinations": { - "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array" + "oneofIndex": { + "format": "int32", + "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", + "type": "integer" + }, + "packed": { + "description": "Whether to use alternative packed wire representation.", + "type": "boolean" + }, + "cardinality": { + "description": "The field cardinality.", + "type": "string", + "enumDescriptions": [ + "For fields with unknown cardinality.", + "For optional fields.", + "For required fields. Proto2 syntax only.", + "For repeated fields." + ], + "enum": [ + "CARDINALITY_UNKNOWN", + "CARDINALITY_OPTIONAL", + "CARDINALITY_REQUIRED", + "CARDINALITY_REPEATED" + ] + }, + "defaultValue": { + "description": "The string value of the default value of this field. Proto2 syntax only.", + "type": "string" + }, + "name": { + "description": "The field name.", + "type": "string" + }, + "typeUrl": { + "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", + "type": "string" + }, + "number": { + "format": "int32", + "description": "The field number.", + "type": "integer" } }, - "id": "Monitoring" + "id": "Field", + "description": "A single field of a message type." }, "TestIamPermissionsRequest": { - "type": "object", "properties": { "permissions": { "description": "The set of permissions to check for the `resource`. Permissions with\nwildcards (such as '*' or 'storage.*') are not allowed. For more\ninformation see\n[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", @@ -2334,9 +1787,11 @@ } }, "id": "TestIamPermissionsRequest", - "description": "Request message for `TestIamPermissions` method." + "description": "Request message for `TestIamPermissions` method.", + "type": "object" }, "Enum": { + "description": "Enum type definition.", "type": "object", "properties": { "enumvalue": { @@ -2358,60 +1813,41 @@ "type": "array" }, "syntax": { - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], "enum": [ "SYNTAX_PROTO2", "SYNTAX_PROTO3" ], "description": "The source syntax.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ] }, "sourceContext": { "$ref": "SourceContext", "description": "The source context." } }, - "id": "Enum", - "description": "Enum type definition." + "id": "Enum" }, - "LabelDescriptor": { - "description": "A description of a label.", + "EnableServiceRequest": { + "id": "EnableServiceRequest", + "description": "Request message for EnableService method.", "type": "object", "properties": { - "key": { - "description": "The label key.", - "type": "string" - }, - "description": { - "description": "A human-readable description for the label.", - "type": "string" - }, - "valueType": { - "enumDescriptions": [ - "A variable-length string. This is the default.", - "Boolean; true or false.", - "A 64-bit signed integer." - ], - "enum": [ - "STRING", - "BOOL", - "INT64" - ], - "description": "The type of data that can be assigned to the label.", - "type": "string" + "consumerId": { + "type": "string", + "description": "The identity of consumer resource which service enablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id." } - }, - "id": "LabelDescriptor" + } }, "Diagnostic": { "type": "object", "properties": { "location": { - "type": "string", - "description": "File name and line number of the error or warning." + "description": "File name and line number of the error or warning.", + "type": "string" }, "kind": { "enumDescriptions": [ @@ -2433,44 +1869,39 @@ "id": "Diagnostic", "description": "Represents a diagnostic message (error or warning)" }, - "EnableServiceRequest": { - "description": "Request message for EnableService method.", + "LabelDescriptor": { + "id": "LabelDescriptor", + "description": "A description of a label.", "type": "object", "properties": { - "consumerId": { - "description": "The identity of consumer resource which service enablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id.", + "key": { + "description": "The label key.", "type": "string" + }, + "description": { + "description": "A human-readable description for the label.", + "type": "string" + }, + "valueType": { + "description": "The type of data that can be assigned to the label.", + "type": "string", + "enumDescriptions": [ + "A variable-length string. This is the default.", + "Boolean; true or false.", + "A 64-bit signed integer." + ], + "enum": [ + "STRING", + "BOOL", + "INT64" + ] } - }, - "id": "EnableServiceRequest" + } }, "Type": { "description": "A protocol buffer message type.", "type": "object", "properties": { - "sourceContext": { - "$ref": "SourceContext", - "description": "The source context." - }, - "syntax": { - "description": "The source syntax.", - "type": "string", - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ] - }, - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, "fields": { "description": "The list of fields.", "items": { @@ -2483,24 +1914,52 @@ "type": "string" }, "oneofs": { - "description": "The list of types appearing in `oneof` definitions in this type.", "items": { "type": "string" }, + "type": "array", + "description": "The list of types appearing in `oneof` definitions in this type." + }, + "sourceContext": { + "$ref": "SourceContext", + "description": "The source context." + }, + "syntax": { + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax.", + "type": "string" + }, + "options": { + "description": "The protocol buffer options.", + "items": { + "$ref": "Option" + }, "type": "array" } }, "id": "Type" }, "GenerateConfigReportResponse": { + "description": "Response message for GenerateConfigReport method.", "type": "object", "properties": { + "serviceName": { + "type": "string", + "description": "Name of the service this report belongs to." + }, "changeReports": { + "description": "list of ChangeReport, each corresponding to comparison between two\nservice configurations.", "items": { "$ref": "ChangeReport" }, - "type": "array", - "description": "list of ChangeReport, each corresponding to comparison between two\nservice configurations." + "type": "array" }, "id": { "description": "ID of the service configuration this report belongs to.", @@ -2512,16 +1971,13 @@ "$ref": "Diagnostic" }, "type": "array" - }, - "serviceName": { - "type": "string", - "description": "Name of the service this report belongs to." } }, - "id": "GenerateConfigReportResponse", - "description": "Response message for GenerateConfigReport method." + "id": "GenerateConfigReportResponse" }, "ListServiceConfigsResponse": { + "description": "Response message for ListServiceConfigs method.", + "type": "object", "properties": { "serviceConfigs": { "description": "The list of service configuration resources.", @@ -2531,35 +1987,33 @@ "type": "array" }, "nextPageToken": { - "description": "The token of the next page of results.", - "type": "string" + "type": "string", + "description": "The token of the next page of results." } }, - "id": "ListServiceConfigsResponse", - "description": "Response message for ListServiceConfigs method.", - "type": "object" + "id": "ListServiceConfigsResponse" }, "Experimental": { - "id": "Experimental", "description": "Experimental service configuration. These configuration options can\nonly be used by whitelisted users.", "type": "object", "properties": { "authorization": { - "description": "Authorization configuration.", - "$ref": "AuthorizationConfig" + "$ref": "AuthorizationConfig", + "description": "Authorization configuration." } - } + }, + "id": "Experimental" }, "Backend": { "description": "`Backend` defines the backend configuration for a service.", "type": "object", "properties": { "rules": { + "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "BackendRule" }, - "type": "array", - "description": "A list of API backend rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + "type": "array" } }, "id": "Backend" @@ -2589,39 +2043,27 @@ } }, "SubmitConfigSourceRequest": { - "description": "Request message for SubmitConfigSource method.", - "type": "object", "properties": { "configSource": { - "$ref": "ConfigSource", - "description": "The source configuration for the service." + "description": "The source configuration for the service.", + "$ref": "ConfigSource" }, "validateOnly": { "description": "Optional. If set, this will result in the generation of a\n`google.api.Service` configuration based on the `ConfigSource` provided,\nbut the generated config and the sources will NOT be persisted.", "type": "boolean" } }, - "id": "SubmitConfigSourceRequest" - }, - "AuthorizationConfig": { - "properties": { - "provider": { - "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com.", - "type": "string" - } - }, - "id": "AuthorizationConfig", - "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com", + "id": "SubmitConfigSourceRequest", + "description": "Request message for SubmitConfigSource method.", "type": "object" }, "DocumentationRule": { - "id": "DocumentationRule", "description": "A documentation rule provides information about individual API elements.", "type": "object", "properties": { "description": { - "type": "string", - "description": "Description of the selected API(s)." + "description": "Description of the selected API(s).", + "type": "string" }, "deprecationDescription": { "description": "Deprecation description of the selected element(s). It can be provided if an\nelement is marked as `deprecated`.", @@ -2631,10 +2073,21 @@ "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", "type": "string" } - } + }, + "id": "DocumentationRule" + }, + "AuthorizationConfig": { + "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com", + "type": "object", + "properties": { + "provider": { + "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com.", + "type": "string" + } + }, + "id": "AuthorizationConfig" }, "ContextRule": { - "id": "ContextRule", "description": "A context rule provides information about the context for an individual API\nelement.", "type": "object", "properties": { @@ -2650,11 +2103,23 @@ "type": "array" }, "requested": { - "description": "A list of full type names of requested contexts.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "A list of full type names of requested contexts." + } + }, + "id": "ContextRule" + }, + "SourceContext": { + "id": "SourceContext", + "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", + "type": "object", + "properties": { + "fileName": { + "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`.", + "type": "string" } } }, @@ -2662,34 +2127,6 @@ "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable.", "type": "object", "properties": { - "metricKind": { - "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "type": "string", - "enumDescriptions": [ - "Do not use this default value.", - "An instantaneous measurement of a value.", - "The change in a value during a time interval.", - "A value accumulated over a time interval. Cumulative\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." - ], - "enum": [ - "METRIC_KIND_UNSPECIFIED", - "GAUGE", - "DELTA", - "CUMULATIVE" - ] - }, - "displayName": { - "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\".", - "type": "string" - }, - "description": { - "description": "A detailed description of the metric, which can be used in documentation.", - "type": "string" - }, - "unit": { - "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", - "type": "string" - }, "labels": { "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed.", "items": { @@ -2706,6 +2143,7 @@ "type": "string" }, "valueType": { + "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", "type": "string", "enumDescriptions": [ "Do not use this default value.", @@ -2724,35 +2162,55 @@ "STRING", "DISTRIBUTION", "MONEY" + ] + }, + "metricKind": { + "enumDescriptions": [ + "Do not use this default value.", + "An instantaneous measurement of a value.", + "The change in a value during a time interval.", + "A value accumulated over a time interval. Cumulative\nmeasurements in a time series should have the same start time\nand increasing end times, until an event resets the cumulative\nvalue to zero and sets a new start time for the following\npoints." ], - "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported." + "enum": [ + "METRIC_KIND_UNSPECIFIED", + "GAUGE", + "DELTA", + "CUMULATIVE" + ], + "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", + "type": "string" + }, + "description": { + "description": "A detailed description of the metric, which can be used in documentation.", + "type": "string" + }, + "displayName": { + "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\".", + "type": "string" + }, + "unit": { + "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", + "type": "string" } }, "id": "MetricDescriptor" }, - "SourceContext": { - "properties": { - "fileName": { - "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`.", - "type": "string" - } - }, - "id": "SourceContext", - "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", - "type": "object" - }, - "Expr": { - "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", + "Billing": { + "description": "Billing related configuration of the service.\n\nThe following example shows how to configure monitored resources and metrics\nfor billing:\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/borrowed_count\n metric_kind: DELTA\n value_type: INT64\n billing:\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/borrowed_count", "type": "object", "properties": { - "location": { - "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", - "type": "string" - }, + "consumerDestinations": { + "description": "Billing configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations per service, each one must have\na different monitored resource type. A metric can be used in at most\none consumer destination.", + "items": { + "$ref": "BillingDestination" + }, + "type": "array" + } + }, + "id": "Billing" + }, + "Expr": { + "properties": { "description": { "description": "An optional description of the expression. This is a longer text which\ndescribes the expression, e.g. when hovered over it in a UI.", "type": "string" @@ -2760,12 +2218,21 @@ "expression": { "description": "Textual representation of an expression in\nCommon Expression Language syntax.\n\nThe application context of the containing message determines which\nwell-known feature set of CEL is supported.", "type": "string" + }, + "location": { + "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "An optional title for the expression, i.e. a short string describing\nits purpose. This can be used e.g. in UIs which allow to enter the\nexpression.", + "type": "string" } }, - "id": "Expr" + "id": "Expr", + "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", + "type": "object" }, "ListServicesResponse": { - "id": "ListServicesResponse", "description": "Response message for `ListServices` method.", "type": "object", "properties": { @@ -2780,10 +2247,20 @@ }, "type": "array" } - } + }, + "id": "ListServicesResponse" }, "Endpoint": { + "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", + "type": "object", "properties": { + "features": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The list of features enabled on this endpoint." + }, "apis": { "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", "items": { @@ -2792,38 +2269,28 @@ "type": "array" }, "allowCors": { - "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.", - "type": "boolean" + "type": "boolean", + "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed." }, "aliases": { + "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on.", "items": { "type": "string" }, - "type": "array", - "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on." - }, - "name": { - "description": "The canonical name of this endpoint.", - "type": "string" + "type": "array" }, "target": { "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".", "type": "string" }, - "features": { - "description": "The list of features enabled on this endpoint.", - "items": { - "type": "string" - }, - "type": "array" + "name": { + "description": "The canonical name of this endpoint.", + "type": "string" } }, - "id": "Endpoint", - "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", - "type": "object" + "id": "Endpoint" }, "OAuthRequirements": { - "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions.", "type": "object", "properties": { "canonicalScopes": { @@ -2831,12 +2298,20 @@ "type": "string" } }, - "id": "OAuthRequirements" + "id": "OAuthRequirements", + "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions." }, "Usage": { "description": "Configuration controlling usage of a service.", "type": "object", "properties": { + "rules": { + "description": "A list of usage rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "items": { + "$ref": "UsageRule" + }, + "type": "array" + }, "requirements": { "items": { "type": "string" @@ -2847,24 +2322,19 @@ "producerNotificationChannel": { "description": "The full resource name of a channel used for sending notifications to the\nservice producer.\n\nGoogle Service Management currently only supports\n[Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification\nchannel. To use Google Cloud Pub/Sub as the channel, this must be the name\nof a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format\ndocumented in https://cloud.google.com/pubsub/docs/overview.", "type": "string" - }, - "rules": { - "description": "A list of usage rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "UsageRule" - }, - "type": "array" } }, "id": "Usage" }, "GetIamPolicyRequest": { - "properties": {}, - "id": "GetIamPolicyRequest", "description": "Request message for `GetIamPolicy` method.", - "type": "object" + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" }, "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", "properties": { "permissions": { "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", @@ -2874,9 +2344,7 @@ "type": "array" } }, - "id": "TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object" + "id": "TestIamPermissionsResponse" }, "Context": { "description": "`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`.", @@ -2891,287 +2359,13 @@ } }, "id": "Context" - }, - "LogDescriptor": { - "description": "A description of a log type. Example in YAML format:\n\n - name: library.googleapis.com/activity_history\n description: The history of borrowing and returning library items.\n display_name: Activity\n labels:\n - key: /customer_id\n description: Identifier of a library customer", - "type": "object", - "properties": { - "labels": { - "description": "The set of labels that are available to describe a specific log entry.\nRuntime requests that contain labels not specified here are\nconsidered invalid.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "name": { - "description": "The name of the log. It must be less than 512 characters long and can\ninclude the following characters: upper- and lower-case alphanumeric\ncharacters [A-Za-z0-9], and punctuation characters including\nslash, underscore, hyphen, period [/_-.].", - "type": "string" - }, - "displayName": { - "description": "The human-readable name for this log. This information appears on\nthe user interface and should be concise.", - "type": "string" - }, - "description": { - "description": "A human-readable description of this log. This information appears in\nthe documentation and can contain details.", - "type": "string" - } - }, - "id": "LogDescriptor" - }, - "ConfigFile": { - "description": "Generic specification of a source configuration file", - "type": "object", - "properties": { - "fileContents": { - "format": "byte", - "description": "The bytes that constitute the file.", - "type": "string" - }, - "filePath": { - "description": "The file name of the configuration file (full or relative path).", - "type": "string" - }, - "fileType": { - "enumDescriptions": [ - "Unknown file type.", - "YAML-specification of service.", - "OpenAPI specification, serialized in JSON.", - "OpenAPI specification, serialized in YAML.", - "FileDescriptorSet, generated by protoc.\n\nTo generate, use protoc with imports and source info included.\nFor an example test.proto file, the following command would put the value\nin a new file named out.pb.\n\n$protoc --include_imports --include_source_info test.proto -o out.pb", - "Uncompiled Proto file. Used for storage and display purposes only,\ncurrently server-side compilation is not supported. Should match the\ninputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A\nfile of this type can only be included if at least one file of type\nFILE_DESCRIPTOR_SET_PROTO is included." - ], - "enum": [ - "FILE_TYPE_UNSPECIFIED", - "SERVICE_CONFIG_YAML", - "OPEN_API_JSON", - "OPEN_API_YAML", - "FILE_DESCRIPTOR_SET_PROTO", - "PROTO_FILE" - ], - "description": "The type of configuration file this represents.", - "type": "string" - } - }, - "id": "ConfigFile" - }, - "MonitoredResourceDescriptor": { - "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", - "type": "object", - "properties": { - "labels": { - "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - }, - "name": { - "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", - "type": "string" - }, - "description": { - "type": "string", - "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation." - }, - "displayName": { - "type": "string", - "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`." - }, - "type": { - "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", - "type": "string" - } - }, - "id": "MonitoredResourceDescriptor" - }, - "CustomErrorRule": { - "description": "A custom error rule.", - "type": "object", - "properties": { - "isErrorType": { - "description": "Mark this message as possible payload in error response. Otherwise,\nobjects of this type will be filtered when they appear in error payload.", - "type": "boolean" - }, - "selector": { - "description": "Selects messages to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "CustomErrorRule" - }, - "MediaDownload": { - "description": "Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", - "type": "object", - "properties": { - "enabled": { - "description": "Whether download is enabled.", - "type": "boolean" - }, - "downloadService": { - "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download.", - "type": "string" - }, - "completeNotification": { - "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", - "type": "boolean" - }, - "maxDirectDownloadSize": { - "format": "int64", - "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes.", - "type": "string" - }, - "dropzone": { - "description": "Name of the Scotty dropzone to use for the current API.", - "type": "string" - }, - "useDirectDownload": { - "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", - "type": "boolean" - } - }, - "id": "MediaDownload" - }, - "CustomAuthRequirements": { - "type": "object", - "properties": { - "provider": { - "description": "A configuration string containing connection information for the\nauthentication provider, typically formatted as a SmartService string\n(go/smartservice).", - "type": "string" - } - }, - "id": "CustomAuthRequirements", - "description": "Configuration for a custom authentication provider." - }, - "ChangeReport": { - "properties": { - "configChanges": { - "description": "List of changes between two service configurations.\nThe changes will be alphabetically sorted based on the identifier\nof each change.\nA ConfigChange identifier is a dot separated path to the configuration.\nExample: visibility.rules[selector='LibraryService.CreateBook'].restriction", - "items": { - "$ref": "ConfigChange" - }, - "type": "array" - } - }, - "id": "ChangeReport", - "description": "Change report associated with a particular service configuration.\n\nIt contains a list of ConfigChanges based on the comparison between\ntwo service configurations.", - "type": "object" - }, - "DisableServiceRequest": { - "description": "Request message for DisableService method.", - "type": "object", - "properties": { - "consumerId": { - "type": "string", - "description": "The identity of consumer resource which service disablement will be\napplied to.\n\nThe Google Service Management implementation accepts the following\nforms:\n- \"project:\u003cproject_id\u003e\"\n\nNote: this is made compatible with\ngoogle.api.servicecontrol.v1.Operation.consumer_id." - } - }, - "id": "DisableServiceRequest" - }, - "SubmitConfigSourceResponse": { - "description": "Response message for SubmitConfigSource method.", - "type": "object", - "properties": { - "serviceConfig": { - "$ref": "Service", - "description": "The generated service configuration." - } - }, - "id": "SubmitConfigSourceResponse" - }, - "MediaUpload": { - "id": "MediaUpload", - "description": "Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", - "type": "object", - "properties": { - "startNotification": { - "description": "Whether to receive a notification on the start of media upload.", - "type": "boolean" - }, - "uploadService": { - "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the upload service if one is used for upload.", - "type": "string" - }, - "mimeTypes": { - "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", - "items": { - "type": "string" - }, - "type": "array" - }, - "maxSize": { - "format": "int64", - "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", - "type": "string" - }, - "completeNotification": { - "description": "A boolean that determines whether a notification for the completion of an\nupload should be sent to the backend. These notifications will not be seen\nby the client and will not consume quota.", - "type": "boolean" - }, - "progressNotification": { - "description": "Whether to receive a notification for progress changes of media upload.", - "type": "boolean" - }, - "enabled": { - "description": "Whether upload is enabled.", - "type": "boolean" - }, - "dropzone": { - "description": "Name of the Scotty dropzone to use for the current API.", - "type": "string" - } - } - }, - "Advice": { - "description": "Generated advice about this change, used for providing more\ninformation about how a change will affect the existing service.", - "type": "object", - "properties": { - "description": { - "description": "Useful description for why this advice was applied and what actions should\nbe taken to mitigate any implied risks.", - "type": "string" - } - }, - "id": "Advice" - }, - "ManagedService": { - "properties": { - "producerProjectId": { - "description": "ID of the project that produces and owns this service.", - "type": "string" - }, - "serviceName": { - "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements.", - "type": "string" - } - }, - "id": "ManagedService", - "description": "The full representation of a Service that is managed by\nGoogle Service Management.", - "type": "object" - }, - "UsageRule": { - "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", - "type": "object", - "properties": { - "skipServiceControl": { - "description": "True, if the method should skip service control. If so, no control plane\nfeature (like quota and billing) will be enabled.", - "type": "boolean" - }, - "allowUnregisteredCalls": { - "description": "True, if the method allows unregistered calls; false otherwise.", - "type": "boolean" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "UsageRule" } }, + "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest", "canonicalName": "Service Management", "auth": { "oauth2": { @@ -3192,5 +2386,867 @@ } }, "rootUrl": "https://servicemanagement.googleapis.com/", - "ownerDomain": "google.com" + "ownerDomain": "google.com", + "name": "servicemanagement", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Service Management API", + "ownerName": "Google", + "resources": { + "services": { + "methods": { + "list": { + "description": "Lists managed services.\n\nReturns all public services. For authenticated users, also returns all\nservices the calling user has \"servicemanagement.services.get\" permission\nfor.\n\n**BETA:** If the caller specifies the `consumer_id`, it returns only the\nservices enabled on the consumer. The `consumer_id` must have the format\nof \"project:{PROJECT-ID}\".", + "httpMethod": "GET", + "response": { + "$ref": "ListServicesResponse" + }, + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "consumerId": { + "location": "query", + "description": "Include services consumed by the specified consumer.\n\nThe Google Service Management implementation accepts the following\nforms:\n- project:\u003cproject_id\u003e", + "type": "string" + }, + "pageToken": { + "description": "Token identifying which result to start with; returned by a previous list\ncall.", + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "Requested size of the next page of data.", + "type": "integer", + "location": "query" + }, + "producerProjectId": { + "location": "query", + "description": "Include services produced by the specified project.", + "type": "string" + } + }, + "flatPath": "v1/services", + "path": "v1/services", + "id": "servicemanagement.services.list" + }, + "create": { + "flatPath": "v1/services", + "id": "servicemanagement.services.create", + "path": "v1/services", + "description": "Creates a new managed service.\nPlease note one producer project can own no more than 20 services.\n\nOperation\u003cresponse: ManagedService\u003e", + "request": { + "$ref": "ManagedService" + }, + "response": { + "$ref": "Operation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ] + }, + "generateConfigReport": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "GenerateConfigReportResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services:generateConfigReport", + "path": "v1/services:generateConfigReport", + "id": "servicemanagement.services.generateConfigReport", + "description": "Generates and returns a report (errors, warnings and changes from\nexisting configurations) associated with\nGenerateConfigReportRequest.new_value\n\nIf GenerateConfigReportRequest.old_value is specified,\nGenerateConfigReportRequest will contain a single ChangeReport based on the\ncomparison between GenerateConfigReportRequest.new_value and\nGenerateConfigReportRequest.old_value.\nIf GenerateConfigReportRequest.old_value is not specified, this method\nwill compare GenerateConfigReportRequest.new_value with the last pushed\nservice configuration.", + "request": { + "$ref": "GenerateConfigReportRequest" + } + }, + "get": { + "response": { + "$ref": "ManagedService" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "GET", + "parameters": { + "serviceName": { + "description": "The name of the service. See the `ServiceManager` overview for naming\nrequirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{serviceName}", + "id": "servicemanagement.services.get", + "path": "v1/services/{serviceName}", + "description": "Gets a managed service. Authentication is required unless the service is\npublic." + }, + "testIamPermissions": { + "flatPath": "v1/services/{servicesId}:testIamPermissions", + "id": "servicemanagement.services.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^services/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ] + }, + "getConfig": { + "description": "Gets a service configuration (version) for a managed service.", + "httpMethod": "GET", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Service" + }, + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + }, + "configId": { + "description": "The id of the service configuration resource.", + "type": "string", + "location": "query" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{serviceName}/config", + "path": "v1/services/{serviceName}/config", + "id": "servicemanagement.services.getConfig" + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "parameters": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{serviceName}", + "path": "v1/services/{serviceName}", + "id": "servicemanagement.services.delete", + "description": "Deletes a managed service. This method will change the service to the\n`Soft-Delete` state for 30 days. Within this period, service producers may\ncall UndeleteService to restore the service.\nAfter 30 days, the service will be permanently deleted.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e" + }, + "enable": { + "description": "Enables a service for a project, so it can be used\nfor the project. See\n[Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: EnableServiceResponse\u003e", + "request": { + "$ref": "EnableServiceRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "serviceName": { + "description": "Name of the service to enable. Specifying an unknown service name will\ncause the request to fail.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{serviceName}:enable", + "path": "v1/services/{serviceName}:enable", + "id": "servicemanagement.services.enable" + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^services/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{servicesId}:setIamPolicy", + "id": "servicemanagement.services.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy" + }, + "disable": { + "request": { + "$ref": "DisableServiceRequest" + }, + "description": "Disables a service for a project, so it can no longer be\nbe used for the project. It prevents accidental usage that may cause\nunexpected billing charges or security leaks.\n\nOperation\u003cresponse: DisableServiceResponse\u003e", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "description": "Name of the service to disable. Specifying an unknown service name\nwill cause the request to fail.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/services/{serviceName}:disable", + "id": "servicemanagement.services.disable", + "path": "v1/services/{serviceName}:disable" + }, + "getIamPolicy": { + "flatPath": "v1/services/{servicesId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "servicemanagement.services.getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "resource": { + "pattern": "^services/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true + } + } + }, + "undelete": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}:undelete", + "id": "servicemanagement.services.undelete", + "path": "v1/services/{serviceName}:undelete", + "description": "Revives a previously deleted managed service. The method restores the\nservice using the configuration at the time the service was deleted.\nThe target service must exist and must have been deleted within the\nlast 30 days.\n\nOperation\u003cresponse: UndeleteServiceResponse\u003e", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST" + } + }, + "resources": { + "configs": { + "methods": { + "get": { + "response": { + "$ref": "Service" + }, + "parameterOrder": [ + "serviceName", + "configId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true, + "location": "path" + }, + "configId": { + "description": "The id of the service configuration resource.", + "type": "string", + "required": true, + "location": "path" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "FULL" + ], + "description": "Specifies which parts of the Service Config should be returned in the\nresponse.", + "type": "string" + } + }, + "flatPath": "v1/services/{serviceName}/configs/{configId}", + "id": "servicemanagement.services.configs.get", + "path": "v1/services/{serviceName}/configs/{configId}", + "description": "Gets a service configuration (version) for a managed service." + }, + "list": { + "description": "Lists the history of the service configuration for a managed service,\nfrom the newest to the oldest.", + "response": { + "$ref": "ListServiceConfigsResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + }, + "pageToken": { + "location": "query", + "description": "The token of the page to retrieve.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The max number of items to include in the response list.", + "type": "integer" + } + }, + "flatPath": "v1/services/{serviceName}/configs", + "id": "servicemanagement.services.configs.list", + "path": "v1/services/{serviceName}/configs" + }, + "create": { + "description": "Creates a new service configuration (version) for a managed service.\nThis method only stores the service configuration. To roll out the service\nconfiguration to backend systems please call\nCreateServiceRollout.", + "request": { + "$ref": "Service" + }, + "response": { + "$ref": "Service" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{serviceName}/configs", + "id": "servicemanagement.services.configs.create", + "path": "v1/services/{serviceName}/configs" + }, + "submit": { + "description": "Creates a new service configuration (version) for a managed service based\non\nuser-supplied configuration source files (for example: OpenAPI\nSpecification). This method stores the source configurations as well as the\ngenerated service configuration. To rollout the service configuration to\nother services,\nplease call CreateServiceRollout.\n\nOperation\u003cresponse: SubmitConfigSourceResponse\u003e", + "request": { + "$ref": "SubmitConfigSourceRequest" + }, + "httpMethod": "POST", + "parameterOrder": [ + "serviceName" + ], + "response": { + "$ref": "Operation" + }, + "parameters": { + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/services/{serviceName}/configs:submit", + "path": "v1/services/{serviceName}/configs:submit", + "id": "servicemanagement.services.configs.submit" + } + } + }, + "consumers": { + "methods": { + "getIamPolicy": { + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^services/[^/]+/consumers/[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:getIamPolicy", + "id": "servicemanagement.services.consumers.getIamPolicy", + "path": "v1/{+resource}:getIamPolicy" + }, + "setIamPolicy": { + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "resource": { + "type": "string", + "required": true, + "pattern": "^services/[^/]+/consumers/[^/]+$", + "location": "path", + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field." + } + }, + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:setIamPolicy", + "id": "servicemanagement.services.consumers.setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy." + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource.\nIf the resource does not exist, this will return an empty set of\npermissions, not a NOT_FOUND error.\n\nNote: This operation is designed to be used for building permission-aware\nUIs and command-line tools, not for authorization checking. This operation\nmay \"fail open\" without warning.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^services/[^/]+/consumers/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "flatPath": "v1/services/{servicesId}/consumers/{consumersId}:testIamPermissions", + "id": "servicemanagement.services.consumers.testIamPermissions", + "path": "v1/{+resource}:testIamPermissions" + } + } + }, + "rollouts": { + "methods": { + "get": { + "httpMethod": "GET", + "response": { + "$ref": "Rollout" + }, + "parameterOrder": [ + "serviceName", + "rolloutId" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "serviceName": { + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true + }, + "rolloutId": { + "location": "path", + "description": "The id of the rollout resource.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/services/{serviceName}/rollouts/{rolloutId}", + "path": "v1/services/{serviceName}/rollouts/{rolloutId}", + "id": "servicemanagement.services.rollouts.get", + "description": "Gets a service configuration rollout." + }, + "list": { + "response": { + "$ref": "ListServiceRolloutsResponse" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", + "https://www.googleapis.com/auth/service.management", + "https://www.googleapis.com/auth/service.management.readonly" + ], + "parameters": { + "filter": { + "location": "query", + "description": "Use `filter` to return subset of rollouts.\nThe following filters are supported:\n -- To limit the results to only those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',\n use filter='status=SUCCESS'\n -- To limit the results to those in\n [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'\n or 'FAILED', use filter='status=CANCELLED OR status=FAILED'", + "type": "string" + }, + "serviceName": { + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "description": "The token of the page to retrieve.", + "type": "string", + "location": "query" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The max number of items to include in the response list.", + "type": "integer" + } + }, + "flatPath": "v1/services/{serviceName}/rollouts", + "id": "servicemanagement.services.rollouts.list", + "path": "v1/services/{serviceName}/rollouts", + "description": "Lists the history of the service configuration rollouts for a managed\nservice, from the newest to the oldest." + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "serviceName" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "serviceName": { + "type": "string", + "required": true, + "location": "path", + "description": "The name of the service. See the [overview](/service-management/overview)\nfor naming requirements. For example: `example.googleapis.com`." + } + }, + "flatPath": "v1/services/{serviceName}/rollouts", + "id": "servicemanagement.services.rollouts.create", + "path": "v1/services/{serviceName}/rollouts", + "request": { + "$ref": "Rollout" + }, + "description": "Creates a new service configuration rollout. Based on rollout, the\nGoogle Service Management will roll out the service configurations to\ndifferent backend services. For example, the logging configuration will be\npushed to Google Cloud Logging.\n\nPlease note that any previous pending and running Rollouts and associated\nOperations will be automatically cancelled so that the latest Rollout will\nnot be blocked by previous Rollouts.\n\nOperation\u003cresponse: Rollout\u003e" + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "flatPath": "v1/operations/{operationsId}", + "id": "servicemanagement.operations.get", + "path": "v1/{+name}", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^operations/.+$" + } + } + }, + "list": { + "description": "Lists service operations that match the specified filter in the request.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "filter": { + "description": "A string for filtering Operations.\n The following filter fields are supported:\n\n * serviceName: Required. Only `=` operator is allowed.\n * startTime: The time this job was started, in ISO 8601 format.\n Allowed operators are `\u003e=`, `\u003e`, `\u003c=`, and `\u003c`.\n * status: Can be `done`, `in_progress`, or `failed`. Allowed\n operators are `=`, and `!=`.\n\n Filter expression supports conjunction (AND) and disjunction (OR)\n logical operators. However, the serviceName restriction must be at the\n top-level and can only be combined with other restrictions via the AND\n logical operator.\n\n Examples:\n\n * `serviceName={some-service}.googleapis.com`\n * `serviceName={some-service}.googleapis.com AND startTime\u003e=\"2017-02-01\"`\n * `serviceName={some-service}.googleapis.com AND status=done`\n * `serviceName={some-service}.googleapis.com AND (status=done OR startTime\u003e=\"2017-02-01\")`", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "location": "query", + "description": "Not used.", + "type": "string" + }, + "pageSize": { + "location": "query", + "format": "int32", + "description": "The maximum number of operations to return. If unspecified, defaults to\n50. The maximum value is 100.", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], + "flatPath": "v1/operations", + "id": "servicemanagement.operations.list", + "path": "v1/operations" + } + } + } + }, + "parameters": { + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + } + }, + "version": "v1", + "baseUrl": "https://servicemanagement.googleapis.com/", + "kind": "discovery#restDescription", + "description": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.", + "servicePath": "" } diff --git a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go index e87d45372..3b78d9420 100644 --- a/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go +++ b/vendor/google.golang.org/api/servicemanagement/v1/servicemanagement-gen.go @@ -830,6 +830,100 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return nil } +// Billing: Billing related configuration of the service. +// +// The following example shows how to configure monitored resources and +// metrics +// for billing: +// monitored_resources: +// - type: library.googleapis.com/branch +// labels: +// - key: /city +// description: The city where the library branch is located +// in. +// - key: /name +// description: The name of the branch. +// metrics: +// - name: library.googleapis.com/book/borrowed_count +// metric_kind: DELTA +// value_type: INT64 +// billing: +// consumer_destinations: +// - monitored_resource: library.googleapis.com/branch +// metrics: +// - library.googleapis.com/book/borrowed_count +type Billing struct { + // ConsumerDestinations: Billing configurations for sending metrics to + // the consumer project. + // There can be multiple consumer destinations per service, each one + // must have + // a different monitored resource type. A metric can be used in at + // most + // one consumer destination. + ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ConsumerDestinations") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConsumerDestinations") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Billing) MarshalJSON() ([]byte, error) { + type noMethod Billing + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BillingDestination: Configuration of a specific billing destination +// (Currently only support +// bill against consumer project). +type BillingDestination struct { + // Metrics: Names of the metrics to report to this billing + // destination. + // Each name must be defined in Service.metrics section. + Metrics []string `json:"metrics,omitempty"` + + // MonitoredResource: The monitored resource type. The type must be + // defined in + // Service.monitored_resources section. + MonitoredResource string `json:"monitoredResource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Metrics") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Metrics") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BillingDestination) MarshalJSON() ([]byte, error) { + type noMethod BillingDestination + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Binding: Associates `members` with a `role`. type Binding struct { // Condition: The condition that is associated with this binding. @@ -2107,6 +2201,13 @@ type FlowOperationMetadata struct { // Must be equal to the "name" field for a FlowName enum. FlowName string `json:"flowName,omitempty"` + // OperationType: Operation type which is a flow type and subtype info + // as that is missing in + // our datastore otherwise. This maps to the ordinal value of the + // enum: + // jcg/api/tenant/operations/OperationNamespace.java + OperationType int64 `json:"operationType,omitempty"` + // ResourceNames: The full name of the resources that this flow is // directly associated with. ResourceNames []string `json:"resourceNames,omitempty"` @@ -2114,6 +2215,14 @@ type FlowOperationMetadata struct { // StartTime: The start time of the operation. StartTime string `json:"startTime,omitempty"` + // Possible values: + // "UNSPECIFIED_OP_SERVICE" + // "SERVICE_MANAGEMENT" + // "SERVICE_USAGE" + // "SERVICE_CONSUMER_MANAGEMENT" - TenancyUnit, ServiceNetworking fall + // under this + Surface string `json:"surface,omitempty"` + // ForceSendFields is a list of field names (e.g. "CancelState") to // unconditionally include in API requests. By default, fields with // empty values are omitted from API requests. However, any non-pointer, @@ -4531,6 +4640,9 @@ type Service struct { // Backend: API backend configuration. Backend *Backend `json:"backend,omitempty"` + // Billing: Billing configuration. + Billing *Billing `json:"billing,omitempty"` + // ConfigVersion: The semantic version of the service configuration. The // config version // affects the interpretation of the service configuration. For diff --git a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json index c805a2b04..5eac365d2 100644 --- a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json +++ b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-api.json @@ -1,26 +1,221 @@ { + "servicePath": "", + "description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", + "kind": "discovery#restDescription", "basePath": "", - "revision": "20170916", - "documentationLink": "https://cloud.google.com/service-management/", "id": "serviceuser:v1", + "documentationLink": "https://cloud.google.com/service-management/", + "revision": "20170926", "discoveryVersion": "v1", "version_module": true, "schemas": { + "BillingDestination": { + "description": "Configuration of a specific billing destination (Currently only support\nbill against consumer project).", + "type": "object", + "properties": { + "monitoredResource": { + "description": "The monitored resource type. The type must be defined in\nService.monitored_resources section.", + "type": "string" + }, + "metrics": { + "description": "Names of the metrics to report to this billing destination.\nEach name must be defined in Service.metrics section.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "BillingDestination" + }, + "UsageRule": { + "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true", + "type": "object", + "properties": { + "skipServiceControl": { + "description": "True, if the method should skip service control. If so, no control plane\nfeature (like quota and billing) will be enabled.", + "type": "boolean" + }, + "allowUnregisteredCalls": { + "description": "True, if the method allows unregistered calls; false otherwise.", + "type": "boolean" + }, + "selector": { + "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", + "type": "string" + } + }, + "id": "UsageRule" + }, + "AuthRequirement": { + "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", + "type": "object", + "properties": { + "audiences": { + "description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", + "type": "string" + }, + "providerId": { + "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth", + "type": "string" + } + }, + "id": "AuthRequirement" + }, + "Documentation": { + "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation.", + "type": "object", + "properties": { + "summary": { + "description": "A short summary of what the service does. Can only be provided by\nplain text.", + "type": "string" + }, + "documentationRootUrl": { + "description": "The URL to the root of documentation.", + "type": "string" + }, + "overview": { + "description": "Declares a single overview page. For example:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n overview: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nThis is a shortcut for the following declaration (using pages style):\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nNote: you cannot specify both `overview` field and `pages` field.", + "type": "string" + }, + "rules": { + "description": "A list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "items": { + "$ref": "DocumentationRule" + }, + "type": "array" + }, + "pages": { + "description": "The top level pages for the documentation set.", + "items": { + "$ref": "Page" + }, + "type": "array" + } + }, + "id": "Documentation" + }, + "BackendRule": { + "description": "A backend rule provides configuration for an individual API element.", + "type": "object", + "properties": { + "minDeadline": { + "format": "double", + "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", + "type": "number" + }, + "address": { + "description": "The address of the API backend.", + "type": "string" + }, + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "deadline": { + "format": "double", + "description": "The number of seconds to wait for a response from a request. The default\ndeadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.", + "type": "number" + } + }, + "id": "BackendRule" + }, + "AuthenticationRule": { + "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.", + "type": "object", + "properties": { + "requirements": { + "description": "Requirements for additional authentication providers.", + "items": { + "$ref": "AuthRequirement" + }, + "type": "array" + }, + "allowWithoutCredential": { + "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject.", + "type": "boolean" + }, + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" + }, + "customAuth": { + "$ref": "CustomAuthRequirements", + "description": "Configuration for custom authentication." + }, + "oauth": { + "description": "The requirements for OAuth credentials.", + "$ref": "OAuthRequirements" + } + }, + "id": "AuthenticationRule" + }, + "Api": { + "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology.", + "type": "object", + "properties": { + "syntax": { + "description": "The source syntax of the service.", + "type": "string", + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ] + }, + "sourceContext": { + "description": "Source context for the protocol buffer service represented by this\nmessage.", + "$ref": "SourceContext" + }, + "version": { + "description": "A version string for this interface. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version is\nomitted, it defaults to zero. If the entire version field is empty, the\nmajor version is derived from the package name, as outlined below. If the\nfield is not empty, the version in the package name will be verified to be\nconsistent with what is provided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\ninterface, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, non-GA interfaces.\n", + "type": "string" + }, + "mixins": { + "description": "Included interfaces. See Mixin.", + "items": { + "$ref": "Mixin" + }, + "type": "array" + }, + "options": { + "description": "Any metadata attached to the interface.", + "items": { + "$ref": "Option" + }, + "type": "array" + }, + "methods": { + "description": "The methods of this interface, in unspecified order.", + "items": { + "$ref": "Method" + }, + "type": "array" + }, + "name": { + "description": "The fully qualified name of this interface, including package name\nfollowed by the interface's simple name.", + "type": "string" + } + }, + "id": "Api" + }, "MetricRule": { "description": "Bind API methods to metrics. Binding a method to a metric causes that\nmetric's configured quota behaviors to apply to the method call.", "type": "object", "properties": { "metricCosts": { - "type": "object", "additionalProperties": { - "type": "string", - "format": "int64" + "format": "int64", + "type": "string" }, - "description": "Metrics to update when the selected methods are called, and the associated\ncost applied to each metric.\n\nThe key of the map is the metric name, and the values are the amount\nincreased for the metric against which the quota limits are defined.\nThe value must not be negative." + "description": "Metrics to update when the selected methods are called, and the associated\ncost applied to each metric.\n\nThe key of the map is the metric name, and the values are the amount\nincreased for the metric against which the quota limits are defined.\nThe value must not be negative.", + "type": "object" }, "selector": { - "type": "string", - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details." + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" } }, "id": "MetricRule" @@ -29,19 +224,19 @@ "description": "`Authentication` defines the authentication configuration for an API.\n\nExample for an API targeted for external use:\n\n name: calendar.googleapis.com\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", "type": "object", "properties": { + "providers": { + "description": "Defines a set of authentication providers that a service supports.", + "items": { + "$ref": "AuthProvider" + }, + "type": "array" + }, "rules": { "description": "A list of authentication rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "AuthenticationRule" }, "type": "array" - }, - "providers": { - "items": { - "$ref": "AuthProvider" - }, - "type": "array", - "description": "Defines a set of authentication providers that a service supports." } }, "id": "Authentication" @@ -50,13 +245,17 @@ "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, "response": { - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`." + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" }, "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", @@ -68,15 +267,11 @@ }, "metadata": { "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" }, "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", "type": "object" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" } }, "id": "Operation" @@ -85,20 +280,20 @@ "description": "Represents a documentation page. A page can contain subpages to represent\nnested documentation set structure.", "type": "object", "properties": { - "content": { - "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", - "type": "string" - }, "subpages": { + "description": "Subpages of this page. The order of subpages specified here will be\nhonored in the generated docset.", "items": { "$ref": "Page" }, - "type": "array", - "description": "Subpages of this page. The order of subpages specified here will be\nhonored in the generated docset." + "type": "array" }, "name": { - "type": "string", - "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`." + "description": "The name of the page. It will be used as an identity of the page to\ngenerate URI of the page, text of the link to this page in navigation,\netc. The full page name (start from the root page name to this page\nconcatenated with `.`) can be used as reference to the page in your\ndocumentation. For example:\n\u003cpre\u003e\u003ccode\u003epages:\n- name: Tutorial\n content: (== include tutorial.md ==)\n subpages:\n - name: Java\n content: (== include tutorial_java.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nYou can reference `Java` page using Markdown reference link syntax:\n`Java`.", + "type": "string" + }, + "content": { + "description": "The Markdown content of the page. You can use \u003ccode\u003e(== include {path} ==)\u003c/code\u003e\nto include content from a Markdown file.", + "type": "string" } }, "id": "Page" @@ -107,17 +302,6 @@ "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "type": "object", - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - } - }, - "type": "array" - }, "code": { "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", @@ -126,24 +310,36 @@ "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "type": "array" } }, "id": "Status" }, "AuthProvider": { + "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", "type": "object", "properties": { "audiences": { - "type": "string", - "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com" + "description": "The list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com", + "type": "string" }, "authorizationUrl": { - "type": "string", - "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec." + "description": "Redirect URL if JWT token is required but no present or is expired.\nImplement authorizationUrl of securityDefinitions in OpenAPI spec.", + "type": "string" }, "issuer": { - "type": "string", - "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com" + "description": "Identifies the principal that issued the JWT. See\nhttps://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1\nUsually a URL or an email address.\n\nExample: https://securetoken.google.com\nExample: 1234567-compute@developer.gserviceaccount.com", + "type": "string" }, "id": { "description": "The unique identifier of the auth provider. It will be referred to by\n`AuthRequirement.provider_id`.\n\nExample: \"bookstore_auth\".", @@ -154,46 +350,50 @@ "type": "string" } }, - "id": "AuthProvider", - "description": "Configuration for an anthentication provider, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32)." + "id": "AuthProvider" }, "Service": { + "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth", "type": "object", "properties": { - "backend": { - "$ref": "Backend", - "description": "API backend configuration." + "http": { + "description": "HTTP configuration.", + "$ref": "Http" }, "systemParameters": { "$ref": "SystemParameters", "description": "System parameter configuration." }, + "backend": { + "description": "API backend configuration.", + "$ref": "Backend" + }, "documentation": { - "$ref": "Documentation", - "description": "Additional API documentation." + "description": "Additional API documentation.", + "$ref": "Documentation" }, "logging": { - "$ref": "Logging", - "description": "Logging configuration." + "description": "Logging configuration.", + "$ref": "Logging" }, "monitoredResources": { + "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations.", "items": { "$ref": "MonitoredResourceDescriptor" }, - "type": "array", - "description": "Defines the monitored resources used by this service. This is required\nby the Service.monitoring and Service.logging configurations." + "type": "array" + }, + "enums": { + "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum", + "items": { + "$ref": "Enum" + }, + "type": "array" }, "context": { "$ref": "Context", "description": "Context configuration." }, - "enums": { - "items": { - "$ref": "Enum" - }, - "type": "array", - "description": "A list of all enum types included in this API service. Enums\nreferenced directly or indirectly by the `apis` are automatically\nincluded. Enums which are not referenced but shall be included\nshould be listed here by name. Example:\n\n enums:\n - name: google.someapi.v1.SomeEnum" - }, "id": { "description": "A unique ID for a specific instance of this message, typically assigned\nby the client for tracking purpose. If empty, the server may choose to\ngenerate one instead.", "type": "string" @@ -210,16 +410,16 @@ "type": "array" }, "authentication": { - "$ref": "Authentication", - "description": "Auth configuration." + "description": "Auth configuration.", + "$ref": "Authentication" }, "experimental": { - "$ref": "Experimental", - "description": "Experimental configuration." + "description": "Experimental configuration.", + "$ref": "Experimental" }, "control": { - "$ref": "Control", - "description": "Configuration for the service control plane." + "description": "Configuration for the service control plane.", + "$ref": "Control" }, "configVersion": { "format": "uint32", @@ -227,53 +427,50 @@ "type": "integer" }, "monitoring": { - "$ref": "Monitoring", - "description": "Monitoring configuration." + "description": "Monitoring configuration.", + "$ref": "Monitoring" }, "producerProjectId": { "description": "The Google project that owns this service.", "type": "string" }, "systemTypes": { + "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF.", "items": { "$ref": "Type" }, - "type": "array", - "description": "A list of all proto message types included in this API service.\nIt serves similar purpose as [google.api.Service.types], except that\nthese types are not needed by user-defined APIs. Therefore, they will not\nshow up in the generated discovery doc. This field should only be used\nto define system APIs in ESF." + "type": "array" }, "visibility": { "$ref": "Visibility", "description": "API visibility configuration." }, "quota": { - "$ref": "Quota", - "description": "Quota configuration." + "description": "Quota configuration.", + "$ref": "Quota" }, "name": { - "type": "string", - "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`." + "description": "The DNS address at which this service is available,\ne.g. `calendar.googleapis.com`.", + "type": "string" + }, + "billing": { + "description": "Billing configuration.", + "$ref": "Billing" }, "customError": { - "$ref": "CustomError", - "description": "Custom error configuration." + "description": "Custom error configuration.", + "$ref": "CustomError" }, "title": { "description": "The product title for this service.", "type": "string" }, "endpoints": { + "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs.", "items": { "$ref": "Endpoint" }, - "type": "array", - "description": "Configuration for network endpoints. If this is empty, then an endpoint\nwith the same name as the service is automatically generated to service all\ndefined APIs." - }, - "apis": { - "items": { - "$ref": "Api" - }, - "type": "array", - "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files." + "type": "array" }, "logs": { "description": "Defines the logs used by this service.", @@ -282,49 +479,52 @@ }, "type": "array" }, + "apis": { + "description": "A list of API interfaces exported by this service. Only the `name` field\nof the google.protobuf.Api needs to be provided by the configuration\nauthor, as the remaining fields will be derived from the IDL during the\nnormalization process. It is an error to specify an API interface here\nwhich cannot be resolved against the associated IDL files.", + "items": { + "$ref": "Api" + }, + "type": "array" + }, "types": { + "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32", "items": { "$ref": "Type" }, - "type": "array", - "description": "A list of all proto message types included in this API service.\nTypes referenced directly or indirectly by the `apis` are\nautomatically included. Messages which are not referenced but\nshall be included, such as types used by the `google.protobuf.Any` type,\nshould be listed here by name. Example:\n\n types:\n - name: google.protobuf.Int32" + "type": "array" }, "sourceInfo": { - "$ref": "SourceInfo", - "description": "Output only. The source information for this configuration if available." - }, - "http": { - "$ref": "Http", - "description": "HTTP configuration." + "description": "Output only. The source information for this configuration if available.", + "$ref": "SourceInfo" } }, - "id": "Service", - "description": "`Service` is the root object of Google service configuration schema. It\ndescribes basic information about a service, such as the name and the\ntitle, and delegates other aspects to sub-sections. Each sub-section is\neither a proto message or a repeated proto message that configures a\nspecific aspect, such as auth. See each proto message definition for details.\n\nExample:\n\n type: google.api.Service\n config_version: 3\n name: calendar.googleapis.com\n title: Google Calendar API\n apis:\n - name: google.calendar.v3.Calendar\n authentication:\n providers:\n - id: google_calendar_auth\n jwks_uri: https://www.googleapis.com/oauth2/v1/certs\n issuer: https://securetoken.google.com\n rules:\n - selector: \"*\"\n requirements:\n provider_id: google_calendar_auth" + "id": "Service" }, "EnumValue": { "description": "Enum value definition.", "type": "object", "properties": { - "name": { - "type": "string", - "description": "Enum value name." - }, "options": { + "description": "Protocol buffer options.", "items": { "$ref": "Option" }, - "type": "array", - "description": "Protocol buffer options." + "type": "array" }, "number": { - "type": "integer", "format": "int32", - "description": "Enum value number." + "description": "Enum value number.", + "type": "integer" + }, + "name": { + "description": "Enum value name.", + "type": "string" } }, "id": "EnumValue" }, "CustomHttpPattern": { + "description": "A custom pattern is used for defining custom HTTP verb.", "type": "object", "properties": { "kind": { @@ -336,24 +536,18 @@ "type": "string" } }, - "id": "CustomHttpPattern", - "description": "A custom pattern is used for defining custom HTTP verb." + "id": "CustomHttpPattern" }, "OperationMetadata": { "description": "The metadata associated with a long running operation resource.", "type": "object", "properties": { - "startTime": { - "format": "google-datetime", - "description": "The start time of the operation.", - "type": "string" - }, "steps": { + "description": "Detailed status information for each step. The order is undetermined.", "items": { "$ref": "Step" }, - "type": "array", - "description": "Detailed status information for each step. The order is undetermined." + "type": "array" }, "resourceNames": { "description": "The full name of the resources that this operation is directly\nassociated with.", @@ -363,57 +557,81 @@ "type": "array" }, "progressPercentage": { - "type": "integer", "format": "int32", - "description": "Percentage of completion of this operation, ranging from 0 to 100." + "description": "Percentage of completion of this operation, ranging from 0 to 100.", + "type": "integer" + }, + "startTime": { + "format": "google-datetime", + "description": "The start time of the operation.", + "type": "string" } }, "id": "OperationMetadata" }, + "PublishedService": { + "description": "The published version of a Service that is managed by\nGoogle Service Management.", + "type": "object", + "properties": { + "service": { + "description": "The service's published configuration.", + "$ref": "Service" + }, + "name": { + "description": "The resource name of the service.\n\nA valid name would be:\n- services/serviceuser.googleapis.com", + "type": "string" + } + }, + "id": "PublishedService" + }, "SystemParameterRule": { "description": "Define a system parameter rule mapping system parameter definitions to\nmethods.", "type": "object", "properties": { + "selector": { + "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", + "type": "string" + }, "parameters": { "description": "Define parameters. Multiple names may be defined for a parameter.\nFor a given method call, only one of them should be used. If multiple\nnames are used the behavior is implementation-dependent.\nIf none of the specified names are present the behavior is\nparameter-dependent.", "items": { "$ref": "SystemParameter" }, "type": "array" - }, - "selector": { - "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", - "type": "string" } }, "id": "SystemParameterRule" }, - "PublishedService": { + "VisibilityRule": { + "description": "A visibility rule provides visibility configuration for an individual API\nelement.", "type": "object", "properties": { - "service": { - "$ref": "Service", - "description": "The service's published configuration." + "restriction": { + "description": "A comma-separated list of visibility labels that apply to the `selector`.\nAny of the listed labels can be used to grant the visibility.\n\nIf a rule has multiple labels, removing one of the labels but not all of\nthem can break clients.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: GOOGLE_INTERNAL, TRUSTED_TESTER\n\nRemoving GOOGLE_INTERNAL from this restriction will break clients that\nrely on this method and only had access to it through GOOGLE_INTERNAL.", + "type": "string" }, - "name": { - "type": "string", - "description": "The resource name of the service.\n\nA valid name would be:\n- services/serviceuser.googleapis.com" + "selector": { + "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" } }, - "id": "PublishedService", - "description": "The published version of a Service that is managed by\nGoogle Service Management." + "id": "VisibilityRule" }, "HttpRule": { "description": "`HttpRule` defines the mapping of an RPC method to one or more HTTP\nREST API methods. The mapping specifies how different portions of the RPC\nrequest message are mapped to URL path, URL query parameters, and\nHTTP request body. The mapping is typically specified as an\n`google.api.http` annotation on the RPC method,\nsee \"google/api/annotations.proto\" for details.\n\nThe mapping consists of a field specifying the path template and\nmethod kind. The path template can refer to fields in the request\nmessage, as in the example below which describes a REST GET\noperation on a resource collection of messages:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}/{sub.subfield}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n SubMessage sub = 2; // `sub.subfield` is url-mapped\n }\n message Message {\n string text = 1; // content of the resource\n }\n\nThe same http annotation can alternatively be expressed inside the\n`GRPC API Configuration` YAML file.\n\n http:\n rules:\n - selector: \u003cproto_package_name\u003e.Messaging.GetMessage\n get: /v1/messages/{message_id}/{sub.subfield}\n\nThis definition enables an automatic, bidrectional mapping of HTTP\nJSON to RPC. Example:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456/foo` | `GetMessage(message_id: \"123456\" sub: SubMessage(subfield: \"foo\"))`\n\nIn general, not only fields but also field paths can be referenced\nfrom a path pattern. Fields mapped to the path pattern cannot be\nrepeated and must have a primitive (non-message) type.\n\nAny fields in the request message which are not bound by the path\npattern automatically become (optional) HTTP query\nparameters. Assume the following definition of the request message:\n\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http).get = \"/v1/messages/{message_id}\";\n }\n }\n message GetMessageRequest {\n message SubMessage {\n string subfield = 1;\n }\n string message_id = 1; // mapped to the URL\n int64 revision = 2; // becomes a parameter\n SubMessage sub = 3; // `sub.subfield` becomes a parameter\n }\n\n\nThis enables a HTTP JSON to RPC mapping as below:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))`\n\nNote that fields which are mapped to HTTP parameters must have a\nprimitive type or a repeated primitive type. Message types are not\nallowed. In the case of a repeated type, the parameter can be\nrepeated in the URL, as in `...?param=A¶m=B`.\n\nFor HTTP method kinds which allow a request body, the `body` field\nspecifies the mapping. Consider a REST update method on the\nmessage resource collection:\n\n\n service Messaging {\n rpc UpdateMessage(UpdateMessageRequest) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"message\"\n };\n }\n }\n message UpdateMessageRequest {\n string message_id = 1; // mapped to the URL\n Message message = 2; // mapped to the body\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled, where the\nrepresentation of the JSON in the request body is determined by\nprotos JSON encoding:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })`\n\nThe special name `*` can be used in the body mapping to define that\nevery field not bound by the path template should be mapped to the\nrequest body. This enables the following alternative definition of\nthe update method:\n\n service Messaging {\n rpc UpdateMessage(Message) returns (Message) {\n option (google.api.http) = {\n put: \"/v1/messages/{message_id}\"\n body: \"*\"\n };\n }\n }\n message Message {\n string message_id = 1;\n string text = 2;\n }\n\n\nThe following HTTP JSON to RPC mapping is enabled:\n\nHTTP | RPC\n-----|-----\n`PUT /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")`\n\nNote that when using `*` in the body mapping, it is not possible to\nhave HTTP parameters, as all fields not bound by the path end in\nthe body. This makes this option more rarely used in practice of\ndefining REST APIs. The common usage of `*` is in custom methods\nwhich don't use the URL at all for transferring data.\n\nIt is possible to define multiple HTTP methods for one RPC by using\nthe `additional_bindings` option. Example:\n\n service Messaging {\n rpc GetMessage(GetMessageRequest) returns (Message) {\n option (google.api.http) = {\n get: \"/v1/messages/{message_id}\"\n additional_bindings {\n get: \"/v1/users/{user_id}/messages/{message_id}\"\n }\n };\n }\n }\n message GetMessageRequest {\n string message_id = 1;\n string user_id = 2;\n }\n\n\nThis enables the following two alternative HTTP JSON to RPC\nmappings:\n\nHTTP | RPC\n-----|-----\n`GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")`\n`GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")`\n\n# Rules for HTTP mapping\n\nThe rules for mapping HTTP path, query parameters, and body fields\nto the request message are as follows:\n\n1. The `body` field specifies either `*` or a field path, or is\n omitted. If omitted, it indicates there is no HTTP request body.\n2. Leaf fields (recursive expansion of nested messages in the\n request) can be classified into three types:\n (a) Matched in the URL template.\n (b) Covered by body (if body is `*`, everything except (a) fields;\n else everything under the body field)\n (c) All other fields.\n3. URL query parameters found in the HTTP request are mapped to (c) fields.\n4. Any body sent with an HTTP request can contain only (b) fields.\n\nThe syntax of the path template is as follows:\n\n Template = \"/\" Segments [ Verb ] ;\n Segments = Segment { \"/\" Segment } ;\n Segment = \"*\" | \"**\" | LITERAL | Variable ;\n Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ;\n FieldPath = IDENT { \".\" IDENT } ;\n Verb = \":\" LITERAL ;\n\nThe syntax `*` matches a single path segment. The syntax `**` matches zero\nor more path segments, which must be the last part of the path except the\n`Verb`. The syntax `LITERAL` matches literal text in the path.\n\nThe syntax `Variable` matches part of the URL path as specified by its\ntemplate. A variable template must not contain other variables. If a variable\nmatches a single path segment, its template may be omitted, e.g. `{var}`\nis equivalent to `{var=*}`.\n\nIf a variable contains exactly one path segment, such as `\"{var}\"` or\n`\"{var=*}\"`, when such a variable is expanded into a URL path, all characters\nexcept `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the\nDiscovery Document as `{var}`.\n\nIf a variable contains one or more path segments, such as `\"{var=foo/*}\"`\nor `\"{var=**}\"`, when such a variable is expanded into a URL path, all\ncharacters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables\nshow up in the Discovery Document as `{+var}`.\n\nNOTE: While the single segment variable matches the semantics of\n[RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2\nSimple String Expansion, the multi segment variable **does not** match\nRFC 6570 Reserved Expansion. The reason is that the Reserved Expansion\ndoes not expand special characters like `?` and `#`, which would lead\nto invalid URLs.\n\nNOTE: the field paths in variables and in the `body` must not refer to\nrepeated fields or map fields.", "type": "object", "properties": { + "responseBody": { + "description": "The name of the response field whose value is mapped to the HTTP body of\nresponse. Other response fields are ignored. This field is optional. When\nnot set, the response message will be used as HTTP body of response.\nNOTE: the referred field must be not a repeated field and must be present\nat the top-level of response message type.", + "type": "string" + }, "mediaUpload": { - "$ref": "MediaUpload", - "description": "Use this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration for Bytestream methods." + "description": "Use this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead\n[][google.bytestream.RestByteStream] as an API to your\nconfiguration for Bytestream methods.", + "$ref": "MediaUpload" }, "selector": { - "type": "string", - "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details." + "description": "Selects methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" }, "custom": { "$ref": "CustomHttpPattern", @@ -427,70 +645,36 @@ "description": "Used for updating a resource.", "type": "string" }, - "authorizations": { - "items": { - "$ref": "AuthorizationRule" - }, - "type": "array", - "description": "Specifies the permission(s) required for an API element for the overall\nAPI request to succeed. It is typically used to mark request message fields\nthat contain the name of the resource and indicates the permissions that\nwill be checked on that resource." - }, "put": { - "type": "string", - "description": "Used for updating a resource." + "description": "Used for updating a resource.", + "type": "string" }, "delete": { - "type": "string", - "description": "Used for deleting a resource." + "description": "Used for deleting a resource.", + "type": "string" }, "body": { "description": "The name of the request field whose value is mapped to the HTTP body, or\n`*` for mapping all fields not captured by the path pattern to the HTTP\nbody. NOTE: the referred field must not be a repeated field and must be\npresent at the top-level of request message type.", "type": "string" }, - "mediaDownload": { - "$ref": "MediaDownload", - "description": "Use this only for Scotty Requests. Do not use this for bytestream methods.\nFor media support, add instead [][google.bytestream.RestByteStream] as an\nAPI to your configuration." - }, "post": { "description": "Used for creating a resource.", "type": "string" }, - "restMethodName": { - "type": "string", - "description": "DO NOT USE. This is an experimental field.\n\nOptional. The rest method name is by default derived from the URL\npattern. If specified, this field overrides the default method name.\nExample:\n\n rpc CreateResource(CreateResourceRequest)\n returns (CreateResourceResponse) {\n option (google.api.http) = {\n post: \"/v1/resources\",\n body: \"resource\",\n rest_method_name: \"insert\"\n };\n }\n\nThis method has the automatically derived rest method name\n\"create\", but for backwards compatibility with apiary, it is specified as\ninsert." + "mediaDownload": { + "description": "Use this only for Scotty Requests. Do not use this for bytestream methods.\nFor media support, add instead [][google.bytestream.RestByteStream] as an\nAPI to your configuration.", + "$ref": "MediaDownload" }, "additionalBindings": { + "description": "Additional HTTP bindings for the selector. Nested bindings must\nnot contain an `additional_bindings` field themselves (that is,\nthe nesting may only be one level deep).", "items": { "$ref": "HttpRule" }, - "type": "array", - "description": "Additional HTTP bindings for the selector. Nested bindings must\nnot contain an `additional_bindings` field themselves (that is,\nthe nesting may only be one level deep)." - }, - "restCollection": { - "description": "DO NOT USE. This is an experimental field.\n\nOptional. The REST collection name is by default derived from the URL\npattern. If specified, this field overrides the default collection name.\nExample:\n\n rpc AddressesAggregatedList(AddressesAggregatedListRequest)\n returns (AddressesAggregatedListResponse) {\n option (google.api.http) = {\n get: \"/v1/projects/{project_id}/aggregated/addresses\"\n rest_collection: \"projects.addresses\"\n };\n }\n\nThis method has the automatically derived collection name\n\"projects.aggregated\". Because, semantically, this rpc is actually an\noperation on the \"projects.addresses\" collection, the `rest_collection`\nfield is configured to override the derived collection name.", - "type": "string" - }, - "responseBody": { - "type": "string", - "description": "The name of the response field whose value is mapped to the HTTP body of\nresponse. Other response fields are ignored. This field is optional. When\nnot set, the response message will be used as HTTP body of response.\nNOTE: the referred field must be not a repeated field and must be present\nat the top-level of response message type." + "type": "array" } }, "id": "HttpRule" }, - "VisibilityRule": { - "description": "A visibility rule provides visibility configuration for an individual API\nelement.", - "type": "object", - "properties": { - "restriction": { - "type": "string", - "description": "A comma-separated list of visibility labels that apply to the `selector`.\nAny of the listed labels can be used to grant the visibility.\n\nIf a rule has multiple labels, removing one of the labels but not all of\nthem can break clients.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: GOOGLE_INTERNAL, TRUSTED_TESTER\n\nRemoving GOOGLE_INTERNAL from this restriction will break clients that\nrely on this method and only had access to it through GOOGLE_INTERNAL." - }, - "selector": { - "description": "Selects methods, messages, fields, enums, etc. to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "VisibilityRule" - }, "MonitoringDestination": { "description": "Configuration of a specific monitoring destination (the producer project\nor the consumer project).", "type": "object", @@ -500,16 +684,17 @@ "type": "string" }, "metrics": { + "description": "Names of the metrics to report to this monitoring destination.\nEach name must be defined in Service.metrics section.", "items": { "type": "string" }, - "type": "array", - "description": "Names of the metrics to report to this monitoring destination.\nEach name must be defined in Service.metrics section." + "type": "array" } }, "id": "MonitoringDestination" }, "Visibility": { + "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate.", "type": "object", "properties": { "rules": { @@ -520,48 +705,49 @@ "type": "array" } }, - "id": "Visibility", - "description": "`Visibility` defines restrictions for the visibility of service\nelements. Restrictions are specified using visibility labels\n(e.g., TRUSTED_TESTER) that are elsewhere linked to users and projects.\n\nUsers and projects can have access to more than one visibility label. The\neffective visibility for multiple labels is the union of each label's\nelements, plus any unrestricted elements.\n\nIf an element and its parents have no restrictions, visibility is\nunconditionally granted.\n\nExample:\n\n visibility:\n rules:\n - selector: google.calendar.Calendar.EnhancedSearch\n restriction: TRUSTED_TESTER\n - selector: google.calendar.Calendar.Delegate\n restriction: GOOGLE_INTERNAL\n\nHere, all methods are publicly visible except for the restricted methods\nEnhancedSearch and Delegate." + "id": "Visibility" }, "SystemParameters": { + "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters.", "type": "object", "properties": { "rules": { + "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "SystemParameterRule" }, - "type": "array", - "description": "Define system parameters.\n\nThe parameters defined here will override the default parameters\nimplemented by the system. If this field is missing from the service\nconfig, default system parameters will be used. Default system parameters\nand names is implementation-dependent.\n\nExample: define api key for all methods\n\n system_parameters\n rules:\n - selector: \"*\"\n parameters:\n - name: api_key\n url_query_parameter: api_key\n\n\nExample: define 2 api key names for a specific method.\n\n system_parameters\n rules:\n - selector: \"/ListShelves\"\n parameters:\n - name: api_key\n http_header: Api-Key1\n - name: api_key\n http_header: Api-Key2\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + "type": "array" } }, - "id": "SystemParameters", - "description": "### System parameter configuration\n\nA system parameter is a special kind of parameter defined by the API\nsystem, not by an individual API. It is typically mapped to an HTTP header\nand/or a URL query parameter. This configuration specifies which methods\nchange the names of the system parameters." + "id": "SystemParameters" }, "Quota": { + "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64", "type": "object", "properties": { "limits": { + "description": "List of `QuotaLimit` definitions for the service.", "items": { "$ref": "QuotaLimit" }, - "type": "array", - "description": "List of `QuotaLimit` definitions for the service." + "type": "array" }, "metricRules": { + "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics.", "items": { "$ref": "MetricRule" }, - "type": "array", - "description": "List of `MetricRule` definitions, each one mapping a selected method to one\nor more metrics." + "type": "array" } }, - "id": "Quota", - "description": "Quota configuration helps to achieve fairness and budgeting in service\nusage.\n\nThe quota configuration works this way:\n- The service configuration defines a set of metrics.\n- For API calls, the quota.metric_rules maps methods to metrics with\n corresponding costs.\n- The quota.limits defines limits on the metrics, which will be used for\n quota checks at runtime.\n\nAn example quota configuration in yaml format:\n\n quota:\n\n - name: apiWriteQpsPerProject\n metric: library.googleapis.com/write_calls\n unit: \"1/min/{project}\" # rate limit for consumer projects\n values:\n STANDARD: 10000\n\n\n # The metric rules bind all methods to the read_calls metric,\n # except for the UpdateBook and DeleteBook methods. These two methods\n # are mapped to the write_calls metric, with the UpdateBook method\n # consuming at twice rate as the DeleteBook method.\n metric_rules:\n - selector: \"*\"\n metric_costs:\n library.googleapis.com/read_calls: 1\n - selector: google.example.library.v1.LibraryService.UpdateBook\n metric_costs:\n library.googleapis.com/write_calls: 2\n - selector: google.example.library.v1.LibraryService.DeleteBook\n metric_costs:\n library.googleapis.com/write_calls: 1\n\n Corresponding Metric definition:\n\n metrics:\n - name: library.googleapis.com/read_calls\n display_name: Read requests\n metric_kind: DELTA\n value_type: INT64\n\n - name: library.googleapis.com/write_calls\n display_name: Write requests\n metric_kind: DELTA\n value_type: INT64" + "id": "Quota" }, "Step": { + "description": "Represents the status of one operation step.", "type": "object", "properties": { "status": { + "description": "The status code.", "type": "string", "enumDescriptions": [ "Unspecifed code.", @@ -578,18 +764,17 @@ "IN_PROGRESS", "FAILED", "CANCELLED" - ], - "description": "The status code." + ] }, "description": { "description": "The short description of the step.", "type": "string" } }, - "id": "Step", - "description": "Represents the status of one operation step." + "id": "Step" }, "LoggingDestination": { + "description": "Configuration of a specific logging destination (the producer project\nor the consumer project).", "type": "object", "properties": { "logs": { @@ -604,45 +789,44 @@ "type": "string" } }, - "id": "LoggingDestination", - "description": "Configuration of a specific logging destination (the producer project\nor the consumer project)." + "id": "LoggingDestination" }, "Option": { + "description": "A protocol buffer option, which can be attached to a message, field,\nenumeration, etc.", "type": "object", "properties": { - "name": { - "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`.", - "type": "string" - }, "value": { - "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type." + "description": "The option's value packed in an Any message. If the value is a primitive,\nthe corresponding wrapper type defined in google/protobuf/wrappers.proto\nshould be used. If the value is an enum, it should be stored as an int32\nvalue using the google.protobuf.Int32Value type.", + "type": "object" + }, + "name": { + "description": "The option's name. For protobuf built-in options (options defined in\ndescriptor.proto), this is the short name. For example, `\"map_entry\"`.\nFor custom options, it should be the fully-qualified name. For example,\n`\"google.api.http\"`.", + "type": "string" } }, - "id": "Option", - "description": "A protocol buffer option, which can be attached to a message, field,\nenumeration, etc." + "id": "Option" }, "Logging": { "description": "Logging configuration of the service.\n\nThe following example shows how to configure logs to be sent to the\nproducer and consumer projects. In the example, the `activity_history`\nlog is sent to both the producer and consumer projects, whereas the\n`purchase_history` log is only sent to the producer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n logs:\n - name: activity_history\n labels:\n - key: /customer_id\n - name: purchase_history\n logging:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history\n - purchase_history\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n logs:\n - activity_history", "type": "object", "properties": { + "consumerDestinations": { + "description": "Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination.", + "items": { + "$ref": "LoggingDestination" + }, + "type": "array" + }, "producerDestinations": { "description": "Logging configurations for sending logs to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none producer destination.", "items": { "$ref": "LoggingDestination" }, "type": "array" - }, - "consumerDestinations": { - "items": { - "$ref": "LoggingDestination" - }, - "type": "array", - "description": "Logging configurations for sending logs to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A log can be used in at most\none consumer destination." } }, "id": "Logging" @@ -661,38 +845,38 @@ "type": "string" }, "defaultLimit": { - "type": "string", "format": "int64", - "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only." + "description": "Default number of tokens that can be consumed during the specified\nduration. This is the number of tokens assigned when a client\napplication developer activates the service for his/her project.\n\nSpecifying a value of 0 will block all requests. This can be used if you\nare provisioning quota to selected consumers and blocking others.\nSimilarly, a value of -1 will indicate an unlimited quota. No other\nnegative values are allowed.\n\nUsed by group-based quotas only.", + "type": "string" }, "description": { "description": "Optional. User-visible, extended description for this quota limit.\nShould be used only when more context is needed to understand this limit\nthan provided by the limit's display name (see: `display_name`).", "type": "string" }, - "displayName": { - "type": "string", - "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration." - }, "metric": { "description": "The name of the metric this quota limit applies to. The quota limits with\nthe same metric will be checked together during runtime. The metric must be\ndefined within the service config.\n\nUsed by metric-based quotas only.", "type": "string" }, + "displayName": { + "description": "User-visible display name for this limit.\nOptional. If not set, the UI will provide a default display name based on\nthe quota configuration. This field can be used to override the default\ndisplay name generated from the configuration.", + "type": "string" + }, "values": { + "description": "Tiered limit values, currently only STANDARD is supported.", "type": "object", "additionalProperties": { "format": "int64", "type": "string" - }, - "description": "Tiered limit values, currently only STANDARD is supported." + } }, "unit": { - "type": "string", - "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only." + "description": "Specify the unit of the quota limit. It uses the same syntax as\nMetric.unit. The supported unit kinds are determined by the quota\nbackend system.\n\nThe [Google Service Control](https://cloud.google.com/service-control)\nsupports the following unit components:\n* One of the time intevals:\n * \"/min\" for quota every minute.\n * \"/d\" for quota every 24 hours, starting 00:00 US Pacific Time.\n * Otherwise the quota won't be reset by time, such as storage limit.\n* One and only one of the granted containers:\n * \"/{project}\" quota for a project\n\nHere are some examples:\n* \"1/min/{project}\" for quota per minute per project.\n\nNote: the order of unit components is insignificant.\nThe \"1\" at the beginning is required to follow the metric unit syntax.\n\nUsed by metric-based quotas only.", + "type": "string" }, "maxLimit": { - "type": "string", "format": "int64", - "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only." + "description": "Maximum number of tokens that can be consumed during the specified\nduration. Client application developers can override the default limit up\nto this maximum. If specified, this value cannot be set to a value less\nthan the default limit. If not specified, it is set to the default limit.\n\nTo allow clients to apply overrides with no upper bound, set this to -1,\nindicating unlimited maximum quota.\n\nUsed by group-based quotas only.", + "type": "string" }, "name": { "description": "Name of the quota limit. The name is used to refer to the limit when\noverriding the default limit on per-consumer basis.\n\nFor metric-based quota limits, the name must be provided, and it must be\nunique within the service. The name can only include alphanumeric\ncharacters as well as '-'.\n\nThe maximum length of the limit name is 64 characters.\n\nThe name of a limit is used as a unique identifier for this limit.\nTherefore, once a limit has been put into use, its name should be\nimmutable. You can use the display_name field to provide a user-friendly\nname for the limit. The display name can be evolved over time without\naffecting the identity of the limit.", @@ -705,30 +889,6 @@ "description": "Method represents a method of an API interface.", "type": "object", "properties": { - "name": { - "description": "The simple name of this method.", - "type": "string" - }, - "requestTypeUrl": { - "description": "A URL of the input message type.", - "type": "string" - }, - "requestStreaming": { - "type": "boolean", - "description": "If true, the request is streamed." - }, - "syntax": { - "type": "string", - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ], - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "description": "The source syntax of this method." - }, "responseTypeUrl": { "description": "The URL of the output message type.", "type": "string" @@ -741,67 +901,92 @@ "type": "array" }, "responseStreaming": { - "type": "boolean", - "description": "If true, the response is streamed." + "description": "If true, the response is streamed.", + "type": "boolean" + }, + "name": { + "description": "The simple name of this method.", + "type": "string" + }, + "requestTypeUrl": { + "description": "A URL of the input message type.", + "type": "string" + }, + "requestStreaming": { + "description": "If true, the request is streamed.", + "type": "boolean" + }, + "syntax": { + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], + "enum": [ + "SYNTAX_PROTO2", + "SYNTAX_PROTO3" + ], + "description": "The source syntax of this method.", + "type": "string" } }, "id": "Method" }, "Mixin": { + "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }", "type": "object", "properties": { - "name": { - "type": "string", - "description": "The fully qualified name of the interface which is included." - }, "root": { "description": "If non-empty specifies a path under which inherited HTTP paths\nare rooted.", "type": "string" + }, + "name": { + "description": "The fully qualified name of the interface which is included.", + "type": "string" } }, - "id": "Mixin", - "description": "Declares an API Interface to be included in this interface. The including\ninterface must redeclare all the methods from the included interface, but\ndocumentation and options are inherited as follows:\n\n- If after comment and whitespace stripping, the documentation\n string of the redeclared method is empty, it will be inherited\n from the original method.\n\n- Each annotation belonging to the service config (http,\n visibility) which is not set in the redeclared method will be\n inherited.\n\n- If an http annotation is inherited, the path pattern will be\n modified as follows. Any version prefix will be replaced by the\n version of the including interface plus the root path if\n specified.\n\nExample of a simple mixin:\n\n package google.acl.v1;\n service AccessControl {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v1/{resource=**}:getAcl\";\n }\n }\n\n package google.storage.v2;\n service Storage {\n // rpc GetAcl(GetAclRequest) returns (Acl);\n\n // Get a data record.\n rpc GetData(GetDataRequest) returns (Data) {\n option (google.api.http).get = \"/v2/{resource=**}\";\n }\n }\n\nExample of a mixin configuration:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n\nThe mixin construct implies that all methods in `AccessControl` are\nalso declared with same name and request/response types in\n`Storage`. A documentation generator or annotation processor will\nsee the effective `Storage.GetAcl` method after inherting\ndocumentation and annotations as follows:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/{resource=**}:getAcl\";\n }\n ...\n }\n\nNote how the version in the path pattern changed from `v1` to `v2`.\n\nIf the `root` field in the mixin is specified, it should be a\nrelative path under which inherited HTTP paths are placed. Example:\n\n apis:\n - name: google.storage.v2.Storage\n mixins:\n - name: google.acl.v1.AccessControl\n root: acls\n\nThis implies the following inherited HTTP annotation:\n\n service Storage {\n // Get the underlying ACL object.\n rpc GetAcl(GetAclRequest) returns (Acl) {\n option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\";\n }\n ...\n }" + "id": "Mixin" }, "CustomError": { + "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError", "type": "object", "properties": { - "rules": { - "description": "The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", - "items": { - "$ref": "CustomErrorRule" - }, - "type": "array" - }, "types": { "description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", "items": { "type": "string" }, "type": "array" + }, + "rules": { + "description": "The list of custom error rules that apply to individual API messages.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", + "items": { + "$ref": "CustomErrorRule" + }, + "type": "array" } }, - "id": "CustomError", - "description": "Customize service error responses. For example, list any service\nspecific protobuf types that can appear in error detail lists of\nerror responses.\n\nExample:\n\n custom_error:\n types:\n - google.foo.v1.CustomError\n - google.foo.v1.AnotherError" + "id": "CustomError" }, "Http": { + "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods.", "type": "object", "properties": { + "fullyDecodeReservedExpansion": { + "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches.", + "type": "boolean" + }, "rules": { "description": "A list of HTTP configuration rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "HttpRule" }, "type": "array" - }, - "fullyDecodeReservedExpansion": { - "type": "boolean", - "description": "When set to true, URL path parmeters will be fully URI-decoded except in\ncases of single segment matches in reserved expansion, where \"%2F\" will be\nleft encoded.\n\nThe default behavior is to not decode RFC 6570 reserved characters in multi\nsegment matches." } }, - "id": "Http", - "description": "Defines the HTTP configuration for an API service. It contains a list of\nHttpRule, each specifying the mapping of an RPC method\nto one or more HTTP REST API methods." + "id": "Http" }, "SourceInfo": { + "description": "Source information used to create a Service Config", "type": "object", "properties": { "sourceFiles": { @@ -816,10 +1001,10 @@ "type": "array" } }, - "id": "SourceInfo", - "description": "Source information used to create a Service Config" + "id": "SourceInfo" }, "Control": { + "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc.", "type": "object", "properties": { "environment": { @@ -827,75 +1012,57 @@ "type": "string" } }, - "id": "Control", - "description": "Selects and configures the service controller used by the service. The\nservice controller handles features like abuse, quota, billing, logging,\nmonitoring, etc." + "id": "Control" }, "SystemParameter": { "description": "Define a parameter's name and location. The parameter may be passed as either\nan HTTP header or a URL query parameter, and if both are passed the behavior\nis implementation-dependent.", "type": "object", "properties": { + "urlQueryParameter": { + "description": "Define the URL query parameter name to use for the parameter. It is case\nsensitive.", + "type": "string" + }, "httpHeader": { "description": "Define the HTTP header name to use for the parameter. It is case\ninsensitive.", "type": "string" }, "name": { - "type": "string", - "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive." - }, - "urlQueryParameter": { - "type": "string", - "description": "Define the URL query parameter name to use for the parameter. It is case\nsensitive." + "description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", + "type": "string" } }, "id": "SystemParameter" }, + "Monitoring": { + "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count", + "type": "object", + "properties": { + "consumerDestinations": { + "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination.", + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array" + }, + "producerDestinations": { + "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", + "items": { + "$ref": "MonitoringDestination" + }, + "type": "array" + } + }, + "id": "Monitoring" + }, "Field": { "description": "A single field of a message type.", "type": "object", "properties": { - "defaultValue": { - "description": "The string value of the default value of this field. Proto2 syntax only.", - "type": "string" - }, - "name": { - "type": "string", - "description": "The field name." - }, - "typeUrl": { - "type": "string", - "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`." - }, - "number": { - "format": "int32", - "description": "The field number.", - "type": "integer" - }, "jsonName": { "description": "The field JSON name.", "type": "string" }, "kind": { - "enum": [ - "TYPE_UNKNOWN", - "TYPE_DOUBLE", - "TYPE_FLOAT", - "TYPE_INT64", - "TYPE_UINT64", - "TYPE_INT32", - "TYPE_FIXED64", - "TYPE_FIXED32", - "TYPE_BOOL", - "TYPE_STRING", - "TYPE_GROUP", - "TYPE_MESSAGE", - "TYPE_BYTES", - "TYPE_UINT32", - "TYPE_ENUM", - "TYPE_SFIXED32", - "TYPE_SFIXED64", - "TYPE_SINT32", - "TYPE_SINT64" - ], "description": "The field type.", "type": "string", "enumDescriptions": [ @@ -918,31 +1085,46 @@ "Field type sfixed64.", "Field type sint32.", "Field type sint64." + ], + "enum": [ + "TYPE_UNKNOWN", + "TYPE_DOUBLE", + "TYPE_FLOAT", + "TYPE_INT64", + "TYPE_UINT64", + "TYPE_INT32", + "TYPE_FIXED64", + "TYPE_FIXED32", + "TYPE_BOOL", + "TYPE_STRING", + "TYPE_GROUP", + "TYPE_MESSAGE", + "TYPE_BYTES", + "TYPE_UINT32", + "TYPE_ENUM", + "TYPE_SFIXED32", + "TYPE_SFIXED64", + "TYPE_SINT32", + "TYPE_SINT64" ] }, "options": { + "description": "The protocol buffer options.", "items": { "$ref": "Option" }, - "type": "array", - "description": "The protocol buffer options." + "type": "array" }, "oneofIndex": { - "type": "integer", "format": "int32", - "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list." + "description": "The index of the field type in `Type.oneofs`, for message or enumeration\ntypes. The first type has index 1; zero means the type is not in the list.", + "type": "integer" }, "packed": { - "type": "boolean", - "description": "Whether to use alternative packed wire representation." + "description": "Whether to use alternative packed wire representation.", + "type": "boolean" }, "cardinality": { - "enum": [ - "CARDINALITY_UNKNOWN", - "CARDINALITY_OPTIONAL", - "CARDINALITY_REQUIRED", - "CARDINALITY_REPEATED" - ], "description": "The field cardinality.", "type": "string", "enumDescriptions": [ @@ -950,35 +1132,49 @@ "For optional fields.", "For required fields. Proto2 syntax only.", "For repeated fields." + ], + "enum": [ + "CARDINALITY_UNKNOWN", + "CARDINALITY_OPTIONAL", + "CARDINALITY_REQUIRED", + "CARDINALITY_REPEATED" ] + }, + "defaultValue": { + "description": "The string value of the default value of this field. Proto2 syntax only.", + "type": "string" + }, + "name": { + "description": "The field name.", + "type": "string" + }, + "typeUrl": { + "description": "The field type URL, without the scheme, for message or enumeration\ntypes. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", + "type": "string" + }, + "number": { + "format": "int32", + "description": "The field number.", + "type": "integer" } }, "id": "Field" }, - "Monitoring": { + "Enum": { + "description": "Enum type definition.", "type": "object", "properties": { - "producerDestinations": { - "description": "Monitoring configurations for sending metrics to the producer project.\nThere can be multiple producer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none producer destination.", + "enumvalue": { + "description": "Enum value definitions.", "items": { - "$ref": "MonitoringDestination" + "$ref": "EnumValue" }, "type": "array" }, - "consumerDestinations": { - "items": { - "$ref": "MonitoringDestination" - }, - "type": "array", - "description": "Monitoring configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations, each one must have a\ndifferent monitored resource type. A metric can be used in at most\none consumer destination." - } - }, - "id": "Monitoring", - "description": "Monitoring configuration of the service.\n\nThe example below shows how to configure monitored resources and metrics\nfor monitoring. In the example, a monitored resource and two metrics are\ndefined. The `library.googleapis.com/book/returned_count` metric is sent\nto both producer and consumer projects, whereas the\n`library.googleapis.com/book/overdue_count` metric is only sent to the\nconsumer project.\n\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/returned_count\n metric_kind: DELTA\n value_type: INT64\n labels:\n - key: /customer_id\n - name: library.googleapis.com/book/overdue_count\n metric_kind: GAUGE\n value_type: INT64\n labels:\n - key: /customer_id\n monitoring:\n producer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/returned_count\n - library.googleapis.com/book/overdue_count" - }, - "Enum": { - "type": "object", - "properties": { + "name": { + "description": "Enum type name.", + "type": "string" + }, "options": { "description": "Protocol buffer options.", "items": { @@ -987,42 +1183,39 @@ "type": "array" }, "syntax": { + "enumDescriptions": [ + "Syntax `proto2`.", + "Syntax `proto3`." + ], "enum": [ "SYNTAX_PROTO2", "SYNTAX_PROTO3" ], "description": "The source syntax.", - "type": "string", - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ] + "type": "string" }, "sourceContext": { "$ref": "SourceContext", "description": "The source context." - }, - "enumvalue": { - "items": { - "$ref": "EnumValue" - }, - "type": "array", - "description": "Enum value definitions." - }, - "name": { - "description": "Enum type name.", - "type": "string" } }, - "id": "Enum", - "description": "Enum type definition." + "id": "Enum" + }, + "EnableServiceRequest": { + "description": "Request message for EnableService method.", + "type": "object", + "properties": {}, + "id": "EnableServiceRequest" }, "LabelDescriptor": { "description": "A description of a label.", "type": "object", "properties": { + "description": { + "description": "A human-readable description for the label.", + "type": "string" + }, "valueType": { - "type": "string", "enumDescriptions": [ "A variable-length string. This is the default.", "Boolean; true or false.", @@ -1033,58 +1226,44 @@ "BOOL", "INT64" ], - "description": "The type of data that can be assigned to the label." + "description": "The type of data that can be assigned to the label.", + "type": "string" }, "key": { "description": "The label key.", "type": "string" - }, - "description": { - "type": "string", - "description": "A human-readable description for the label." } }, "id": "LabelDescriptor" }, - "EnableServiceRequest": { - "description": "Request message for EnableService method.", - "type": "object", - "properties": {}, - "id": "EnableServiceRequest" - }, "Type": { + "description": "A protocol buffer message type.", "type": "object", "properties": { - "options": { - "description": "The protocol buffer options.", - "items": { - "$ref": "Option" - }, - "type": "array" - }, "fields": { + "description": "The list of fields.", "items": { "$ref": "Field" }, - "type": "array", - "description": "The list of fields." + "type": "array" }, "name": { "description": "The fully qualified message name.", "type": "string" }, "oneofs": { + "description": "The list of types appearing in `oneof` definitions in this type.", "items": { "type": "string" }, - "type": "array", - "description": "The list of types appearing in `oneof` definitions in this type." + "type": "array" }, "sourceContext": { "$ref": "SourceContext", "description": "The source context." }, "syntax": { + "description": "The source syntax.", "type": "string", "enumDescriptions": [ "Syntax `proto2`.", @@ -1093,25 +1272,31 @@ "enum": [ "SYNTAX_PROTO2", "SYNTAX_PROTO3" - ], - "description": "The source syntax." + ] + }, + "options": { + "description": "The protocol buffer options.", + "items": { + "$ref": "Option" + }, + "type": "array" } }, - "id": "Type", - "description": "A protocol buffer message type." + "id": "Type" }, "Experimental": { "description": "Experimental service configuration. These configuration options can\nonly be used by whitelisted users.", "type": "object", "properties": { "authorization": { - "$ref": "AuthorizationConfig", - "description": "Authorization configuration." + "description": "Authorization configuration.", + "$ref": "AuthorizationConfig" } }, "id": "Experimental" }, "Backend": { + "description": "`Backend` defines the backend configuration for a service.", "type": "object", "properties": { "rules": { @@ -1122,10 +1307,21 @@ "type": "array" } }, - "id": "Backend", - "description": "`Backend` defines the backend configuration for a service." + "id": "Backend" + }, + "AuthorizationConfig": { + "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com", + "type": "object", + "properties": { + "provider": { + "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com.", + "type": "string" + } + }, + "id": "AuthorizationConfig" }, "DocumentationRule": { + "description": "A documentation rule provides information about individual API elements.", "type": "object", "properties": { "description": { @@ -1137,37 +1333,22 @@ "type": "string" }, "selector": { - "type": "string", - "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used." + "description": "The selector is a comma-separated list of patterns. Each pattern is a\nqualified name of the element which may end in \"*\", indicating a wildcard.\nWildcards are only allowed at the end and for a whole component of the\nqualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". To\nspecify a default for all applicable elements, the whole pattern \"*\"\nis used.", + "type": "string" } }, - "id": "DocumentationRule", - "description": "A documentation rule provides information about individual API elements." - }, - "AuthorizationConfig": { - "type": "object", - "properties": { - "provider": { - "type": "string", - "description": "The name of the authorization provider, such as\nfirebaserules.googleapis.com." - } - }, - "id": "AuthorizationConfig", - "description": "Configuration of authorization.\n\nThis section determines the authorization provider, if unspecified, then no\nauthorization check will be done.\n\nExample:\n\n experimental:\n authorization:\n provider: firebaserules.googleapis.com" + "id": "DocumentationRule" }, "ContextRule": { + "description": "A context rule provides information about the context for an individual API\nelement.", "type": "object", "properties": { - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - }, "provided": { + "description": "A list of full type names of provided contexts.", "items": { "type": "string" }, - "type": "array", - "description": "A list of full type names of provided contexts." + "type": "array" }, "requested": { "description": "A list of full type names of requested contexts.", @@ -1175,20 +1356,55 @@ "type": "string" }, "type": "array" + }, + "selector": { + "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", + "type": "string" } }, - "id": "ContextRule", - "description": "A context rule provides information about the context for an individual API\nelement." + "id": "ContextRule" }, "MetricDescriptor": { "description": "Defines a metric type and its schema. Once a metric descriptor is created,\ndeleting or altering it stops data collection and makes the metric type's\nexisting data unusable.", "type": "object", "properties": { + "displayName": { + "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\".", + "type": "string" + }, + "description": { + "description": "A detailed description of the metric, which can be used in documentation.", + "type": "string" + }, + "unit": { + "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", + "type": "string" + }, + "labels": { + "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed.", + "items": { + "$ref": "LabelDescriptor" + }, + "type": "array" + }, + "name": { + "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project `my-project-id`:\n\n \"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"", + "type": "string" + }, "type": { - "type": "string", - "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined custom metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"" + "description": "The metric type, including its DNS name prefix. The type is not\nURL-encoded. All user-defined custom metric types have the DNS name\n`custom.googleapis.com`. Metric types should use a natural hierarchical\ngrouping. For example:\n\n \"custom.googleapis.com/invoice/paid/amount\"\n \"appengine.googleapis.com/http/server/response_latencies\"", + "type": "string" }, "valueType": { + "enumDescriptions": [ + "Do not use this default value.", + "The value is a boolean.\nThis value type can be used only if the metric kind is `GAUGE`.", + "The value is a signed 64-bit integer.", + "The value is a double precision floating point number.", + "The value is a text string.\nThis value type can be used only if the metric kind is `GAUGE`.", + "The value is a `Distribution`.", + "The value is money." + ], "enum": [ "VALUE_TYPE_UNSPECIFIED", "BOOL", @@ -1199,19 +1415,9 @@ "MONEY" ], "description": "Whether the measurement is an integer, a floating-point number, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", - "type": "string", - "enumDescriptions": [ - "Do not use this default value.", - "The value is a boolean.\nThis value type can be used only if the metric kind is `GAUGE`.", - "The value is a signed 64-bit integer.", - "The value is a double precision floating point number.", - "The value is a text string.\nThis value type can be used only if the metric kind is `GAUGE`.", - "The value is a `Distribution`.", - "The value is money." - ] + "type": "string" }, "metricKind": { - "type": "string", "enumDescriptions": [ "Do not use this default value.", "An instantaneous measurement of a value.", @@ -1224,92 +1430,44 @@ "DELTA", "CUMULATIVE" ], - "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported." - }, - "description": { - "type": "string", - "description": "A detailed description of the metric, which can be used in documentation." - }, - "displayName": { - "type": "string", - "description": "A concise name for the metric, which can be displayed in user interfaces.\nUse sentence case without an ending period, for example \"Request count\"." - }, - "unit": { - "description": "The unit in which the metric value is reported. It is only applicable\nif the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The\nsupported units are a subset of [The Unified Code for Units of\nMeasure](http://unitsofmeasure.org/ucum.html) standard:\n\n**Basic units (UNIT)**\n\n* `bit` bit\n* `By` byte\n* `s` second\n* `min` minute\n* `h` hour\n* `d` day\n\n**Prefixes (PREFIX)**\n\n* `k` kilo (10**3)\n* `M` mega (10**6)\n* `G` giga (10**9)\n* `T` tera (10**12)\n* `P` peta (10**15)\n* `E` exa (10**18)\n* `Z` zetta (10**21)\n* `Y` yotta (10**24)\n* `m` milli (10**-3)\n* `u` micro (10**-6)\n* `n` nano (10**-9)\n* `p` pico (10**-12)\n* `f` femto (10**-15)\n* `a` atto (10**-18)\n* `z` zepto (10**-21)\n* `y` yocto (10**-24)\n* `Ki` kibi (2**10)\n* `Mi` mebi (2**20)\n* `Gi` gibi (2**30)\n* `Ti` tebi (2**40)\n\n**Grammar**\n\nThe grammar includes the dimensionless unit `1`, such as `1/s`.\n\nThe grammar also includes these connectors:\n\n* `/` division (as an infix operator, e.g. `1/s`).\n* `.` multiplication (as an infix operator, e.g. `GBy.d`)\n\nThe grammar for a unit is as follows:\n\n Expression = Component { \".\" Component } { \"/\" Component } ;\n\n Component = [ PREFIX ] UNIT [ Annotation ]\n | Annotation\n | \"1\"\n ;\n\n Annotation = \"{\" NAME \"}\" ;\n\nNotes:\n\n* `Annotation` is just a comment if it follows a `UNIT` and is\n equivalent to `1` if it is used alone. For examples,\n `{requests}/s == 1/s`, `By{transmitted}/s == By/s`.\n* `NAME` is a sequence of non-blank printable ASCII characters not\n containing '{' or '}'.", - "type": "string" - }, - "labels": { - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array", - "description": "The set of labels that can be used to describe a specific\ninstance of this metric type. For example, the\n`appengine.googleapis.com/http/server/response_latencies` metric\ntype has a label for the HTTP response code, `response_code`, so\nyou can look at latencies for successful responses or just\nfor responses that failed." - }, - "name": { - "description": "The resource name of the metric descriptor. Depending on the\nimplementation, the name typically includes: (1) the parent resource name\nthat defines the scope of the metric type or of its data; and (2) the\nmetric's URL-encoded type, which also appears in the `type` field of this\ndescriptor. For example, following is the resource name of a custom\nmetric within the GCP project `my-project-id`:\n\n \"projects/my-project-id/metricDescriptors/custom.googleapis.com%2Finvoice%2Fpaid%2Famount\"", + "description": "Whether the metric records instantaneous values, changes to a value, etc.\nSome combinations of `metric_kind` and `value_type` might not be supported.", "type": "string" } }, "id": "MetricDescriptor" }, "SourceContext": { + "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined.", "type": "object", "properties": { "fileName": { - "type": "string", - "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`." + "description": "The path-qualified name of the .proto file that contained the associated\nprotobuf element. For example: `\"google/protobuf/source_context.proto\"`.", + "type": "string" } }, - "id": "SourceContext", - "description": "`SourceContext` represents information about the source of a\nprotobuf element, like the file in which it is defined." + "id": "SourceContext" }, - "Endpoint": { + "Billing": { + "description": "Billing related configuration of the service.\n\nThe following example shows how to configure monitored resources and metrics\nfor billing:\n monitored_resources:\n - type: library.googleapis.com/branch\n labels:\n - key: /city\n description: The city where the library branch is located in.\n - key: /name\n description: The name of the branch.\n metrics:\n - name: library.googleapis.com/book/borrowed_count\n metric_kind: DELTA\n value_type: INT64\n billing:\n consumer_destinations:\n - monitored_resource: library.googleapis.com/branch\n metrics:\n - library.googleapis.com/book/borrowed_count", "type": "object", "properties": { - "apis": { - "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", + "consumerDestinations": { + "description": "Billing configurations for sending metrics to the consumer project.\nThere can be multiple consumer destinations per service, each one must have\na different monitored resource type. A metric can be used in at most\none consumer destination.", "items": { - "type": "string" - }, - "type": "array" - }, - "allowCors": { - "type": "boolean", - "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed." - }, - "aliases": { - "items": { - "type": "string" - }, - "type": "array", - "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on." - }, - "target": { - "type": "string", - "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\"." - }, - "name": { - "type": "string", - "description": "The canonical name of this endpoint." - }, - "features": { - "description": "The list of features enabled on this endpoint.", - "items": { - "type": "string" + "$ref": "BillingDestination" }, "type": "array" } }, - "id": "Endpoint", - "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true" + "id": "Billing" }, "ListEnabledServicesResponse": { "description": "Response message for `ListEnabledServices` method.", "type": "object", "properties": { "nextPageToken": { - "type": "string", - "description": "Token that can be passed to `ListEnabledServices` to resume a paginated\nquery." + "description": "Token that can be passed to `ListEnabledServices` to resume a paginated\nquery.", + "type": "string" }, "services": { "description": "Services enabled for the specified parent.", @@ -1321,41 +1479,81 @@ }, "id": "ListEnabledServicesResponse" }, + "Endpoint": { + "description": "`Endpoint` describes a network endpoint that serves a set of APIs.\nA service may expose any number of endpoints, and all endpoints share the\nsame service configuration, such as quota configuration and monitoring\nconfiguration.\n\nExample service configuration:\n\n name: library-example.googleapis.com\n endpoints:\n # Below entry makes 'google.example.library.v1.Library'\n # API be served from endpoint address library-example.googleapis.com.\n # It also allows HTTP OPTIONS calls to be passed to the backend, for\n # it to decide whether the subsequent cross-origin request is\n # allowed to proceed.\n - name: library-example.googleapis.com\n allow_cors: true", + "type": "object", + "properties": { + "apis": { + "description": "The list of APIs served by this endpoint.\n\nIf no APIs are specified this translates to \"all APIs\" exported by the\nservice, as defined in the top-level service configuration.", + "items": { + "type": "string" + }, + "type": "array" + }, + "allowCors": { + "description": "Allowing\n[CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka\ncross-domain traffic, would allow the backends served from this endpoint to\nreceive and respond to HTTP OPTIONS requests. The response will be used by\nthe browser to determine whether the subsequent cross-origin request is\nallowed to proceed.", + "type": "boolean" + }, + "aliases": { + "description": "DEPRECATED: This field is no longer supported. Instead of using aliases,\nplease specify multiple google.api.Endpoint for each of the intented\nalias.\n\nAdditional names that this endpoint will be hosted on.", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "The canonical name of this endpoint.", + "type": "string" + }, + "target": { + "description": "The specification of an Internet routable address of API frontend that will\nhandle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary).\nIt should be either a valid IPv4 address or a fully-qualified domain name.\nFor example, \"8.8.8.8\" or \"myservice.appspot.com\".", + "type": "string" + }, + "features": { + "description": "The list of features enabled on this endpoint.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "Endpoint" + }, "OAuthRequirements": { "description": "OAuth scopes are a way to define data and permissions on data. For example,\nthere are scopes defined for \"Read-only access to Google Calendar\" and\n\"Access to Cloud Platform\". Users can consent to a scope for an application,\ngiving it permission to access that data on their behalf.\n\nOAuth scope specifications should be fairly coarse grained; a user will need\nto see and understand the text description of what your scope means.\n\nIn most cases: use one or at most two OAuth scopes for an entire family of\nproducts. If your product has multiple APIs, you should probably be sharing\nthe OAuth scope across all of those APIs.\n\nWhen you need finer grained OAuth consent screens: talk with your product\nmanagement about how developers will use them in practice.\n\nPlease note that even though each of the canonical scopes is enough for a\nrequest to be accepted and passed to the backend, a request can still fail\ndue to the backend requiring additional scopes or permissions.", "type": "object", "properties": { "canonicalScopes": { - "type": "string", - "description": "The list of publicly documented OAuth scopes that are allowed access. An\nOAuth token containing any of these scopes will be accepted.\n\nExample:\n\n canonical_scopes: https://www.googleapis.com/auth/calendar,\n https://www.googleapis.com/auth/calendar.read" + "description": "The list of publicly documented OAuth scopes that are allowed access. An\nOAuth token containing any of these scopes will be accepted.\n\nExample:\n\n canonical_scopes: https://www.googleapis.com/auth/calendar,\n https://www.googleapis.com/auth/calendar.read", + "type": "string" } }, "id": "OAuthRequirements" }, "Usage": { + "description": "Configuration controlling usage of a service.", "type": "object", "properties": { - "requirements": { - "items": { - "type": "string" - }, - "type": "array", - "description": "Requirements that must be satisfied before a consumer project can use the\nservice. Each requirement is of the form \u003cservice.name\u003e/\u003crequirement-id\u003e;\nfor example 'serviceusage.googleapis.com/billing-enabled'." - }, "producerNotificationChannel": { - "type": "string", - "description": "The full resource name of a channel used for sending notifications to the\nservice producer.\n\nGoogle Service Management currently only supports\n[Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification\nchannel. To use Google Cloud Pub/Sub as the channel, this must be the name\nof a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format\ndocumented in https://cloud.google.com/pubsub/docs/overview." + "description": "The full resource name of a channel used for sending notifications to the\nservice producer.\n\nGoogle Service Management currently only supports\n[Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification\nchannel. To use Google Cloud Pub/Sub as the channel, this must be the name\nof a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format\ndocumented in https://cloud.google.com/pubsub/docs/overview.", + "type": "string" }, "rules": { + "description": "A list of usage rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order.", "items": { "$ref": "UsageRule" }, - "type": "array", - "description": "A list of usage rules that apply to individual API methods.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." + "type": "array" + }, + "requirements": { + "description": "Requirements that must be satisfied before a consumer project can use the\nservice. Each requirement is of the form \u003cservice.name\u003e/\u003crequirement-id\u003e;\nfor example 'serviceusage.googleapis.com/billing-enabled'.", + "items": { + "type": "string" + }, + "type": "array" } }, - "id": "Usage", - "description": "Configuration controlling usage of a service." + "id": "Usage" }, "Context": { "description": "`Context` defines which contexts an API requests.\n\nExample:\n\n context:\n rules:\n - selector: \"*\"\n requested:\n - google.rpc.context.ProjectContext\n - google.rpc.context.OriginContext\n\nThe above specifies that all methods in the API request\n`google.rpc.context.ProjectContext` and\n`google.rpc.context.OriginContext`.\n\nAvailable context types are defined in package\n`google.rpc.context`.", @@ -1391,12 +1589,42 @@ "type": "string" }, "description": { - "type": "string", - "description": "A human-readable description of this log. This information appears in\nthe documentation and can contain details." + "description": "A human-readable description of this log. This information appears in\nthe documentation and can contain details.", + "type": "string" } }, "id": "LogDescriptor" }, + "MonitoredResourceDescriptor": { + "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", + "type": "object", + "properties": { + "labels": { + "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`.", + "items": { + "$ref": "LabelDescriptor" + }, + "type": "array" + }, + "name": { + "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", + "type": "string" + }, + "description": { + "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation.", + "type": "string" + }, + "displayName": { + "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`.", + "type": "string" + }, + "type": { + "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", + "type": "string" + } + }, + "id": "MonitoredResourceDescriptor" + }, "CustomErrorRule": { "description": "A custom error rule.", "type": "object", @@ -1412,68 +1640,6 @@ }, "id": "CustomErrorRule" }, - "MonitoredResourceDescriptor": { - "description": "An object that describes the schema of a MonitoredResource object using a\ntype name and a set of labels. For example, the monitored resource\ndescriptor for Google Compute Engine VM instances has a type of\n`\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and\n`\"zone\"` to identify particular VM instances.\n\nDifferent APIs can support different monitored resource types. APIs generally\nprovide a `list` method that returns the monitored resource descriptors used\nby the API.", - "type": "object", - "properties": { - "name": { - "description": "Optional. The resource name of the monitored resource descriptor:\n`\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where\n{type} is the value of the `type` field in this object and\n{project_id} is a project ID that provides API-specific context for\naccessing the type. APIs that do not use project information can use the\nresource name format `\"monitoredResourceDescriptors/{type}\"`.", - "type": "string" - }, - "description": { - "type": "string", - "description": "Optional. A detailed description of the monitored resource type that might\nbe used in documentation." - }, - "displayName": { - "description": "Optional. A concise name for the monitored resource type that might be\ndisplayed in user interfaces. It should be a Title Cased Noun Phrase,\nwithout any article or other determiners. For example,\n`\"Google Cloud SQL Database\"`.", - "type": "string" - }, - "type": { - "description": "Required. The monitored resource type. For example, the type\n`\"cloudsql_database\"` represents databases in Google Cloud SQL.\nThe maximum length of this value is 256 characters.", - "type": "string" - }, - "labels": { - "description": "Required. A set of labels used to describe instances of this monitored\nresource type. For example, an individual Google Cloud SQL database is\nidentified by values for the labels `\"database_id\"` and `\"zone\"`.", - "items": { - "$ref": "LabelDescriptor" - }, - "type": "array" - } - }, - "id": "MonitoredResourceDescriptor" - }, - "MediaDownload": { - "type": "object", - "properties": { - "completeNotification": { - "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", - "type": "boolean" - }, - "enabled": { - "type": "boolean", - "description": "Whether download is enabled." - }, - "downloadService": { - "type": "string", - "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download." - }, - "maxDirectDownloadSize": { - "type": "string", - "format": "int64", - "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes." - }, - "dropzone": { - "type": "string", - "description": "Name of the Scotty dropzone to use for the current API." - }, - "useDirectDownload": { - "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", - "type": "boolean" - } - }, - "id": "MediaDownload", - "description": "Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods." - }, "CustomAuthRequirements": { "description": "Configuration for a custom authentication provider.", "type": "object", @@ -1485,28 +1651,46 @@ }, "id": "CustomAuthRequirements" }, - "DisableServiceRequest": { - "type": "object", - "properties": {}, - "id": "DisableServiceRequest", - "description": "Request message for DisableService method." - }, - "AuthorizationRule": { + "MediaDownload": { + "description": "Defines the Media configuration for a service in case of a download.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", "type": "object", "properties": { - "selector": { - "type": "string", - "description": "Selects the API elements to which this rule applies.\n\nRefer to selector for syntax details." + "enabled": { + "description": "Whether download is enabled.", + "type": "boolean" }, - "permissions": { - "type": "string", - "description": "The required permissions. The acceptable values vary depend on the\nauthorization system used. For Google APIs, it should be a comma-separated\nGoogle IAM permission values. When multiple permissions are listed, the\nsemantics is not defined by the system. Additional documentation must\nbe provided manually." + "downloadService": { + "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the download service if one is used for download.", + "type": "string" + }, + "completeNotification": { + "description": "A boolean that determines whether a notification for the completion of a\ndownload should be sent to the backend.", + "type": "boolean" + }, + "maxDirectDownloadSize": { + "format": "int64", + "description": "Optional maximum acceptable size for direct download.\nThe size is specified in bytes.", + "type": "string" + }, + "dropzone": { + "description": "Name of the Scotty dropzone to use for the current API.", + "type": "string" + }, + "useDirectDownload": { + "description": "A boolean that determines if direct download from ESF should be used for\ndownload of this media.", + "type": "boolean" } }, - "id": "AuthorizationRule", - "description": "Authorization rule for API services.\n\nIt specifies the permission(s) required for an API element for the overall\nAPI request to succeed. It is typically used to mark request message fields\nthat contain the name of the resource and indicates the permissions that\nwill be checked on that resource.\n\nFor example:\n\n package google.storage.v1;\n\n message CopyObjectRequest {\n string source = 1 [\n (google.api.authz).permissions = \"storage.objects.get\"];\n\n string destination = 2 [\n (google.api.authz).permissions =\n \"storage.objects.create,storage.objects.update\"];\n }" + "id": "MediaDownload" + }, + "DisableServiceRequest": { + "description": "Request message for DisableService method.", + "type": "object", + "properties": {}, + "id": "DisableServiceRequest" }, "SearchServicesResponse": { + "description": "Response message for SearchServices method.", "type": "object", "properties": { "nextPageToken": { @@ -1521,232 +1705,57 @@ "type": "array" } }, - "id": "SearchServicesResponse", - "description": "Response message for SearchServices method." + "id": "SearchServicesResponse" }, "MediaUpload": { + "description": "Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods.", "type": "object", "properties": { + "maxSize": { + "format": "int64", + "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes.", + "type": "string" + }, "mimeTypes": { + "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns.", "items": { "type": "string" }, - "type": "array", - "description": "An array of mimetype patterns. Esf will only accept uploads that match one\nof the given patterns." - }, - "maxSize": { - "type": "string", - "format": "int64", - "description": "Optional maximum acceptable size for an upload.\nThe size is specified in bytes." + "type": "array" }, "completeNotification": { - "type": "boolean", - "description": "A boolean that determines whether a notification for the completion of an\nupload should be sent to the backend. These notifications will not be seen\nby the client and will not consume quota." - }, - "enabled": { - "type": "boolean", - "description": "Whether upload is enabled." + "description": "A boolean that determines whether a notification for the completion of an\nupload should be sent to the backend. These notifications will not be seen\nby the client and will not consume quota.", + "type": "boolean" }, "progressNotification": { "description": "Whether to receive a notification for progress changes of media upload.", "type": "boolean" }, + "enabled": { + "description": "Whether upload is enabled.", + "type": "boolean" + }, "dropzone": { "description": "Name of the Scotty dropzone to use for the current API.", "type": "string" }, "startNotification": { - "type": "boolean", - "description": "Whether to receive a notification on the start of media upload." + "description": "Whether to receive a notification on the start of media upload.", + "type": "boolean" }, "uploadService": { "description": "DO NOT USE FIELDS BELOW THIS LINE UNTIL THIS WARNING IS REMOVED.\n\nSpecify name of the upload service if one is used for upload.", "type": "string" } }, - "id": "MediaUpload", - "description": "Defines the Media configuration for a service in case of an upload.\nUse this only for Scotty Requests. Do not use this for media support using\nBytestream, add instead [][google.bytestream.RestByteStream] as an API to\nyour configuration for Bytestream methods." - }, - "UsageRule": { - "type": "object", - "properties": { - "selector": { - "description": "Selects the methods to which this rule applies. Use '*' to indicate all\nmethods in all APIs.\n\nRefer to selector for syntax details.", - "type": "string" - }, - "skipServiceControl": { - "description": "True, if the method should skip service control. If so, no control plane\nfeature (like quota and billing) will be enabled.", - "type": "boolean" - }, - "allowUnregisteredCalls": { - "type": "boolean", - "description": "True, if the method allows unregistered calls; false otherwise." - } - }, - "id": "UsageRule", - "description": "Usage configuration rules for the service.\n\nNOTE: Under development.\n\n\nUse this rule to configure unregistered calls for the service. Unregistered\ncalls are calls that do not contain consumer project identity.\n(Example: calls that do not contain an API key).\nBy default, API methods do not allow unregistered calls, and each method call\nmust be identified by a consumer project identity. Use this rule to\nallow/disallow unregistered calls.\n\nExample of an API that wants to allow unregistered calls for entire service.\n\n usage:\n rules:\n - selector: \"*\"\n allow_unregistered_calls: true\n\nExample of a method that wants to allow unregistered calls.\n\n usage:\n rules:\n - selector: \"google.example.library.v1.LibraryService.CreateBook\"\n allow_unregistered_calls: true" - }, - "AuthRequirement": { - "description": "User-defined authentication requirements, including support for\n[JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", - "type": "object", - "properties": { - "audiences": { - "type": "string", - "description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is\nimplemented and accepted in all the runtime components.\n\nThe list of JWT\n[audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).\nthat are allowed to access. A JWT containing any of these audiences will\nbe accepted. When this setting is absent, only JWTs with audience\n\"https://Service_name/API_name\"\nwill be accepted. For example, if no audiences are in the setting,\nLibraryService API will only accept JWTs with the following audience\n\"https://library-example.googleapis.com/google.example.library.v1.LibraryService\".\n\nExample:\n\n audiences: bookstore_android.apps.googleusercontent.com,\n bookstore_web.apps.googleusercontent.com" - }, - "providerId": { - "description": "id from authentication provider.\n\nExample:\n\n provider_id: bookstore_auth", - "type": "string" - } - }, - "id": "AuthRequirement" - }, - "Documentation": { - "type": "object", - "properties": { - "summary": { - "type": "string", - "description": "A short summary of what the service does. Can only be provided by\nplain text." - }, - "documentationRootUrl": { - "type": "string", - "description": "The URL to the root of documentation." - }, - "overview": { - "description": "Declares a single overview page. For example:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n overview: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nThis is a shortcut for the following declaration (using pages style):\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: ...\n pages:\n - name: Overview\n content: (== include overview.md ==)\n\u003c/code\u003e\u003c/pre\u003e\nNote: you cannot specify both `overview` field and `pages` field.", - "type": "string" - }, - "rules": { - "items": { - "$ref": "DocumentationRule" - }, - "type": "array", - "description": "A list of documentation rules that apply to individual API elements.\n\n**NOTE:** All service configuration rules follow \"last one wins\" order." - }, - "pages": { - "items": { - "$ref": "Page" - }, - "type": "array", - "description": "The top level pages for the documentation set." - } - }, - "id": "Documentation", - "description": "`Documentation` provides the information for describing a service.\n\nExample:\n\u003cpre\u003e\u003ccode\u003edocumentation:\n summary: \u003e\n The Google Calendar API gives access\n to most calendar features.\n pages:\n - name: Overview\n content: (== include google/foo/overview.md ==)\n - name: Tutorial\n content: (== include google/foo/tutorial.md ==)\n subpages;\n - name: Java\n content: (== include google/foo/tutorial_java.md ==)\n rules:\n - selector: google.calendar.Calendar.Get\n description: \u003e\n ...\n - selector: google.calendar.Calendar.Put\n description: \u003e\n ...\n\u003c/code\u003e\u003c/pre\u003e\nDocumentation is provided in markdown syntax. In addition to\nstandard markdown features, definition lists, tables and fenced\ncode blocks are supported. Section headers can be provided and are\ninterpreted relative to the section nesting of the context where\na documentation fragment is embedded.\n\nDocumentation from the IDL is merged with documentation defined\nvia the config at normalization time, where documentation provided\nby config rules overrides IDL provided.\n\nA number of constructs specific to the API platform are supported\nin documentation text.\n\nIn order to reference a proto element, the following\nnotation can be used:\n\u003cpre\u003e\u003ccode\u003e[fully.qualified.proto.name][]\u003c/code\u003e\u003c/pre\u003e\nTo override the display text used for the link, this can be used:\n\u003cpre\u003e\u003ccode\u003e[display text][fully.qualified.proto.name]\u003c/code\u003e\u003c/pre\u003e\nText can be excluded from doc using the following notation:\n\u003cpre\u003e\u003ccode\u003e(-- internal comment --)\u003c/code\u003e\u003c/pre\u003e\nComments can be made conditional using a visibility label. The below\ntext will be only rendered if the `BETA` label is available:\n\u003cpre\u003e\u003ccode\u003e(--BETA: comment for BETA users --)\u003c/code\u003e\u003c/pre\u003e\nA few directives are available in documentation. Note that\ndirectives must appear on a single line to be properly\nidentified. The `include` directive includes a markdown file from\nan external source:\n\u003cpre\u003e\u003ccode\u003e(== include path/to/file ==)\u003c/code\u003e\u003c/pre\u003e\nThe `resource_for` directive marks a message to be the resource of\na collection in REST view. If it is not specified, tools attempt\nto infer the resource from the operations in a collection:\n\u003cpre\u003e\u003ccode\u003e(== resource_for v1.shelves.books ==)\u003c/code\u003e\u003c/pre\u003e\nThe directive `suppress_warning` does not directly affect documentation\nand is documented together with service config validation." - }, - "BackendRule": { - "type": "object", - "properties": { - "deadline": { - "format": "double", - "description": "The number of seconds to wait for a response from a request. The default\ndeadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.", - "type": "number" - }, - "minDeadline": { - "format": "double", - "description": "Minimum deadline in seconds needed for this method. Calls having deadline\nvalue lower than this will be rejected.", - "type": "number" - }, - "address": { - "description": "The address of the API backend.", - "type": "string" - }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "BackendRule", - "description": "A backend rule provides configuration for an individual API element." - }, - "AuthenticationRule": { - "description": "Authentication rules for the service.\n\nBy default, if a method has any authentication requirements, every request\nmust include a valid credential matching one of the requirements.\nIt's an error to include more than one kind of credential in a single\nrequest.\n\nIf a method doesn't have any auth requirements, request credentials will be\nignored.", - "type": "object", - "properties": { - "customAuth": { - "$ref": "CustomAuthRequirements", - "description": "Configuration for custom authentication." - }, - "oauth": { - "$ref": "OAuthRequirements", - "description": "The requirements for OAuth credentials." - }, - "requirements": { - "items": { - "$ref": "AuthRequirement" - }, - "type": "array", - "description": "Requirements for additional authentication providers." - }, - "allowWithoutCredential": { - "type": "boolean", - "description": "Whether to allow requests without a credential. The credential can be\nan OAuth token, Google cookies (first-party auth) or EndUserCreds.\n\nFor requests without credentials, if the service control environment is\nspecified, each incoming request **must** be associated with a service\nconsumer. This can be done by passing an API key that belongs to a consumer\nproject." - }, - "selector": { - "description": "Selects the methods to which this rule applies.\n\nRefer to selector for syntax details.", - "type": "string" - } - }, - "id": "AuthenticationRule" - }, - "Api": { - "type": "object", - "properties": { - "methods": { - "items": { - "$ref": "Method" - }, - "type": "array", - "description": "The methods of this interface, in unspecified order." - }, - "name": { - "description": "The fully qualified name of this interface, including package name\nfollowed by the interface's simple name.", - "type": "string" - }, - "sourceContext": { - "$ref": "SourceContext", - "description": "Source context for the protocol buffer service represented by this\nmessage." - }, - "syntax": { - "enum": [ - "SYNTAX_PROTO2", - "SYNTAX_PROTO3" - ], - "description": "The source syntax of the service.", - "type": "string", - "enumDescriptions": [ - "Syntax `proto2`.", - "Syntax `proto3`." - ] - }, - "version": { - "type": "string", - "description": "A version string for this interface. If specified, must have the form\n`major-version.minor-version`, as in `1.10`. If the minor version is\nomitted, it defaults to zero. If the entire version field is empty, the\nmajor version is derived from the package name, as outlined below. If the\nfield is not empty, the version in the package name will be verified to be\nconsistent with what is provided here.\n\nThe versioning schema uses [semantic\nversioning](http://semver.org) where the major version number\nindicates a breaking change and the minor version an additive,\nnon-breaking change. Both version numbers are signals to users\nwhat to expect from different versions, and should be carefully\nchosen based on the product plan.\n\nThe major version is also reflected in the package name of the\ninterface, which must end in `v\u003cmajor-version\u003e`, as in\n`google.feature.v1`. For major versions 0 and 1, the suffix can\nbe omitted. Zero major versions must only be used for\nexperimental, non-GA interfaces.\n" - }, - "mixins": { - "items": { - "$ref": "Mixin" - }, - "type": "array", - "description": "Included interfaces. See Mixin." - }, - "options": { - "description": "Any metadata attached to the interface.", - "items": { - "$ref": "Option" - }, - "type": "array" - } - }, - "id": "Api", - "description": "Api is a light-weight descriptor for an API Interface.\n\nInterfaces are also described as \"protocol buffer services\" in some contexts,\nsuch as by the \"service\" keyword in a .proto file, but they are different\nfrom API Services, which represent a concrete implementation of an interface\nas opposed to simply a description of methods and bindings. They are also\nsometimes simply referred to as \"APIs\" in other contexts, such as the name of\nthis message itself. See https://cloud.google.com/apis/design/glossary for\ndetailed terminology." + "id": "MediaUpload" } }, + "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest", "canonicalName": "Service User", "auth": { "oauth2": { @@ -1775,13 +1784,20 @@ "services": { "methods": { "disable": { - "response": { - "$ref": "Operation" + "flatPath": "v1/projects/{projectsId}/services/{servicesId}:disable", + "path": "v1/{+name}:disable", + "id": "serviceuser.projects.services.disable", + "request": { + "$ref": "DisableServiceRequest" }, + "description": "Disable a service so it can no longer be used with a\nproject. This prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", + "httpMethod": "POST", "parameterOrder": [ "name" ], - "httpMethod": "POST", + "response": { + "$ref": "Operation" + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/service.management" @@ -1794,20 +1810,9 @@ "required": true, "pattern": "^projects/[^/]+/services/[^/]+$" } - }, - "flatPath": "v1/projects/{projectsId}/services/{servicesId}:disable", - "id": "serviceuser.projects.services.disable", - "path": "v1/{+name}:disable", - "request": { - "$ref": "DisableServiceRequest" - }, - "description": "Disable a service so it can no longer be used with a\nproject. This prevents unintended usage that may cause unexpected billing\ncharges or security leaks.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e" + } }, "enable": { - "description": "Enable a service so it can be used with a project.\nSee [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e", - "request": { - "$ref": "EnableServiceRequest" - }, "response": { "$ref": "Operation" }, @@ -1815,6 +1820,10 @@ "name" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/service.management" + ], "parameters": { "name": { "location": "path", @@ -1824,13 +1833,13 @@ "pattern": "^projects/[^/]+/services/[^/]+$" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/service.management" - ], "flatPath": "v1/projects/{projectsId}/services/{servicesId}:enable", "id": "serviceuser.projects.services.enable", - "path": "v1/{+name}:enable" + "path": "v1/{+name}:enable", + "request": { + "$ref": "EnableServiceRequest" + }, + "description": "Enable a service so it can be used with a project.\nSee [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for\nmore information.\n\nOperation\u003cresponse: google.protobuf.Empty\u003e" }, "list": { "flatPath": "v1/projects/{projectsId}/services", @@ -1838,30 +1847,30 @@ "id": "serviceuser.projects.services.list", "description": "List enabled services for the specified consumer.", "httpMethod": "GET", - "parameterOrder": [ - "parent" - ], "response": { "$ref": "ListEnabledServicesResponse" }, + "parameterOrder": [ + "parent" + ], "parameters": { - "parent": { - "type": "string", - "required": true, - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "List enabled services for the specified parent.\n\nAn example valid parent would be:\n- projects/my-project" - }, "pageToken": { "location": "query", "description": "Token identifying which result to start with; returned by a previous list\ncall.", "type": "string" }, "pageSize": { - "type": "integer", - "location": "query", "format": "int32", - "description": "Requested size of the next page of data." + "description": "Requested size of the next page of data.", + "type": "integer", + "location": "query" + }, + "parent": { + "location": "path", + "description": "List enabled services for the specified parent.\n\nAn example valid parent would be:\n- projects/my-project", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" } }, "scopes": [ @@ -1876,94 +1885,108 @@ "services": { "methods": { "search": { - "httpMethod": "GET", - "parameterOrder": [], "response": { "$ref": "SearchServicesResponse" }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "Requested size of the next page of data.", + "type": "integer" + }, + "pageToken": { + "location": "query", + "description": "Token identifying which result to start with; returned by a previous list\ncall.", + "type": "string" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "parameters": { - "pageToken": { - "type": "string", - "location": "query", - "description": "Token identifying which result to start with; returned by a previous list\ncall." - }, - "pageSize": { - "type": "integer", - "location": "query", - "format": "int32", - "description": "Requested size of the next page of data." - } - }, "flatPath": "v1/services:search", - "path": "v1/services:search", "id": "serviceuser.services.search", + "path": "v1/services:search", "description": "Search available services.\n\nWhen no filter is specified, returns all accessible services. For\nauthenticated users, also returns all services the calling user has\n\"servicemanagement.services.bind\" permission for." } } } }, "parameters": { - "pp": { - "default": "true", - "type": "boolean", + "key": { "location": "query", - "description": "Pretty-print response." - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string" }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, "oauth_token": { + "description": "OAuth 2.0 token for the current user.", "type": "string", - "location": "query", - "description": "OAuth 2.0 token for the current user." + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" }, "upload_protocol": { - "type": "string", "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" }, "prettyPrint": { + "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", - "location": "query", - "description": "Returns response with indentations and line breaks." + "location": "query" }, "fields": { - "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "string", + "location": "query" }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], "location": "query", "enum": [ "1", "2" ], "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] - }, - "callback": { - "type": "string", - "location": "query", - "description": "JSONP" + "type": "string" }, "alt": { - "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", "Media download with context-dependent Content-Type", @@ -1976,27 +1999,10 @@ "json", "media", "proto" - ] - }, - "key": { - "type": "string", - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token." - }, - "access_token": { - "type": "string", - "location": "query", - "description": "OAuth access token." - }, - "quotaUser": { - "type": "string", - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." + ], + "type": "string" } }, "version": "v1", - "baseUrl": "https://serviceuser.googleapis.com/", - "description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", - "servicePath": "", - "kind": "discovery#restDescription" + "baseUrl": "https://serviceuser.googleapis.com/" } diff --git a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go index 53f21fe1a..ace605a74 100644 --- a/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go +++ b/vendor/google.golang.org/api/serviceuser/v1/serviceuser-gen.go @@ -521,68 +521,6 @@ func (s *AuthorizationConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// AuthorizationRule: Authorization rule for API services. -// -// It specifies the permission(s) required for an API element for the -// overall -// API request to succeed. It is typically used to mark request message -// fields -// that contain the name of the resource and indicates the permissions -// that -// will be checked on that resource. -// -// For example: -// -// package google.storage.v1; -// -// message CopyObjectRequest { -// string source = 1 [ -// (google.api.authz).permissions = "storage.objects.get"]; -// -// string destination = 2 [ -// (google.api.authz).permissions = -// "storage.objects.create,storage.objects.update"]; -// } -type AuthorizationRule struct { - // Permissions: The required permissions. The acceptable values vary - // depend on the - // authorization system used. For Google APIs, it should be a - // comma-separated - // Google IAM permission values. When multiple permissions are listed, - // the - // semantics is not defined by the system. Additional documentation - // must - // be provided manually. - Permissions string `json:"permissions,omitempty"` - - // Selector: Selects the API elements to which this rule applies. - // - // Refer to selector for syntax details. - Selector string `json:"selector,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with - // empty values are omitted from API requests. However, any non-pointer, - // non-interface field appearing in ForceSendFields will be sent to the - // server regardless of whether the field is empty or not. This may be - // used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Permissions") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *AuthorizationRule) MarshalJSON() ([]byte, error) { - type noMethod AuthorizationRule - raw := noMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // Backend: `Backend` defines the backend configuration for a service. type Backend struct { // Rules: A list of API backend rules that apply to individual API @@ -676,6 +614,100 @@ func (s *BackendRule) UnmarshalJSON(data []byte) error { return nil } +// Billing: Billing related configuration of the service. +// +// The following example shows how to configure monitored resources and +// metrics +// for billing: +// monitored_resources: +// - type: library.googleapis.com/branch +// labels: +// - key: /city +// description: The city where the library branch is located +// in. +// - key: /name +// description: The name of the branch. +// metrics: +// - name: library.googleapis.com/book/borrowed_count +// metric_kind: DELTA +// value_type: INT64 +// billing: +// consumer_destinations: +// - monitored_resource: library.googleapis.com/branch +// metrics: +// - library.googleapis.com/book/borrowed_count +type Billing struct { + // ConsumerDestinations: Billing configurations for sending metrics to + // the consumer project. + // There can be multiple consumer destinations per service, each one + // must have + // a different monitored resource type. A metric can be used in at + // most + // one consumer destination. + ConsumerDestinations []*BillingDestination `json:"consumerDestinations,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ConsumerDestinations") to unconditionally include in API requests. + // By default, fields with empty values are omitted from API requests. + // However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConsumerDestinations") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *Billing) MarshalJSON() ([]byte, error) { + type noMethod Billing + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// BillingDestination: Configuration of a specific billing destination +// (Currently only support +// bill against consumer project). +type BillingDestination struct { + // Metrics: Names of the metrics to report to this billing + // destination. + // Each name must be defined in Service.metrics section. + Metrics []string `json:"metrics,omitempty"` + + // MonitoredResource: The monitored resource type. The type must be + // defined in + // Service.monitored_resources section. + MonitoredResource string `json:"monitoredResource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Metrics") to + // unconditionally include in API requests. By default, fields with + // empty values are omitted from API requests. However, any non-pointer, + // non-interface field appearing in ForceSendFields will be sent to the + // server regardless of whether the field is empty or not. This may be + // used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Metrics") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *BillingDestination) MarshalJSON() ([]byte, error) { + type noMethod BillingDestination + raw := noMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // Context: `Context` defines which contexts an API // requests. // @@ -1744,15 +1776,6 @@ type HttpRule struct { // the nesting may only be one level deep). AdditionalBindings []*HttpRule `json:"additionalBindings,omitempty"` - // Authorizations: Specifies the permission(s) required for an API - // element for the overall - // API request to succeed. It is typically used to mark request message - // fields - // that contain the name of the resource and indicates the permissions - // that - // will be checked on that resource. - Authorizations []*AuthorizationRule `json:"authorizations,omitempty"` - // Body: The name of the request field whose value is mapped to the HTTP // body, or // `*` for mapping all fields not captured by the path pattern to the @@ -1811,54 +1834,6 @@ type HttpRule struct { // at the top-level of response message type. ResponseBody string `json:"responseBody,omitempty"` - // RestCollection: DO NOT USE. This is an experimental field. - // - // Optional. The REST collection name is by default derived from the - // URL - // pattern. If specified, this field overrides the default collection - // name. - // Example: - // - // rpc AddressesAggregatedList(AddressesAggregatedListRequest) - // returns (AddressesAggregatedListResponse) { - // option (google.api.http) = { - // get: "/v1/projects/{project_id}/aggregated/addresses" - // rest_collection: "projects.addresses" - // }; - // } - // - // This method has the automatically derived collection - // name - // "projects.aggregated". Because, semantically, this rpc is actually - // an - // operation on the "projects.addresses" collection, the - // `rest_collection` - // field is configured to override the derived collection name. - RestCollection string `json:"restCollection,omitempty"` - - // RestMethodName: DO NOT USE. This is an experimental field. - // - // Optional. The rest method name is by default derived from the - // URL - // pattern. If specified, this field overrides the default method - // name. - // Example: - // - // rpc CreateResource(CreateResourceRequest) - // returns (CreateResourceResponse) { - // option (google.api.http) = { - // post: "/v1/resources", - // body: "resource", - // rest_method_name: "insert" - // }; - // } - // - // This method has the automatically derived rest method name - // "create", but for backwards compatibility with apiary, it is - // specified as - // insert. - RestMethodName string `json:"restMethodName,omitempty"` - // Selector: Selects methods to which this rule applies. // // Refer to selector for syntax details. @@ -3515,6 +3490,9 @@ type Service struct { // Backend: API backend configuration. Backend *Backend `json:"backend,omitempty"` + // Billing: Billing configuration. + Billing *Billing `json:"billing,omitempty"` + // ConfigVersion: The semantic version of the service configuration. The // config version // affects the interpretation of the service configuration. For diff --git a/vendor/google.golang.org/api/sheets/v4/sheets-api.json b/vendor/google.golang.org/api/sheets/v4/sheets-api.json index 8c9766963..22456fb59 100644 --- a/vendor/google.golang.org/api/sheets/v4/sheets-api.json +++ b/vendor/google.golang.org/api/sheets/v4/sheets-api.json @@ -1,35 +1,57 @@ { - "canonicalName": "Sheets", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/spreadsheets": { - "description": "View and manage your spreadsheets in Google Drive" - }, - "https://www.googleapis.com/auth/drive.file": { - "description": "View and manage Google Drive files and folders that you have opened or created with this app" - }, - "https://www.googleapis.com/auth/spreadsheets.readonly": { - "description": "View your Google Spreadsheets" - }, - "https://www.googleapis.com/auth/drive.readonly": { - "description": "View the files in your Google Drive" - }, - "https://www.googleapis.com/auth/drive": { - "description": "View and manage the files in your Google Drive" - } - } - } - }, - "rootUrl": "https://sheets.googleapis.com/", - "ownerDomain": "google.com", - "name": "sheets", - "batchPath": "batch", - "title": "Google Sheets API", "ownerName": "Google", "resources": { "spreadsheets": { "methods": { + "batchUpdate": { + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId" + ], + "response": { + "$ref": "BatchUpdateSpreadsheetResponse" + }, + "parameters": { + "spreadsheetId": { + "description": "The spreadsheet to apply the updates to.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", + "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", + "id": "sheets.spreadsheets.batchUpdate", + "description": "Applies one or more updates to the spreadsheet.\n\nEach request is validated before\nbeing applied. If any request is not valid then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how\nthey are applied. The replies will mirror the requests. For example,\nif you applied 4 updates and the 3rd one had a reply, then the\nresponse will have 2 empty replies, the actual reply, and another empty\nreply, in that order.\n\nDue to the collaborative nature of spreadsheets, it is not guaranteed that\nthe spreadsheet will reflect exactly your changes after this completes,\nhowever it is guaranteed that the updates in the request will be\napplied together atomically. Your changes may be altered with respect to\ncollaborator changes. If there are no collaborators, the spreadsheet\nshould reflect your changes.", + "request": { + "$ref": "BatchUpdateSpreadsheetRequest" + } + }, + "create": { + "description": "Creates a spreadsheet, returning the newly created spreadsheet.", + "request": { + "$ref": "Spreadsheet" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Spreadsheet" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets", + "path": "v4/spreadsheets", + "id": "sheets.spreadsheets.create" + }, "getByDataFilter": { "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nThis method differs from GetSpreadsheet in that it allows selecting\nwhich subsets of spreadsheet data to return by specifying a\ndataFilters parameter.\nMultiple DataFilters can be specified. Specifying one or\nmore data filters will return the portions of the spreadsheet that\nintersect ranges matched by any of the filters.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nparameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.", "request": { @@ -44,10 +66,10 @@ "httpMethod": "POST", "parameters": { "spreadsheetId": { - "type": "string", - "required": true, "location": "path", - "description": "The spreadsheet to request." + "description": "The spreadsheet to request.", + "type": "string", + "required": true } }, "scopes": [ @@ -60,32 +82,12 @@ "path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter" }, "get": { - "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nURL parameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.\n\nTo retrieve only subsets of the spreadsheet, use the\nranges URL parameter.\nMultiple ranges can be specified. Limiting the range will\nreturn only the portions of the spreadsheet that intersect the requested\nranges. Ranges are specified using A1 notation.", - "response": { - "$ref": "Spreadsheet" - }, + "httpMethod": "GET", "parameterOrder": [ "spreadsheetId" ], - "httpMethod": "GET", - "parameters": { - "includeGridData": { - "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", - "type": "boolean", - "location": "query" - }, - "ranges": { - "description": "The ranges to retrieve from the spreadsheet.", - "type": "string", - "repeated": true, - "location": "query" - }, - "spreadsheetId": { - "description": "The spreadsheet to request.", - "type": "string", - "required": true, - "location": "path" - } + "response": { + "$ref": "Spreadsheet" }, "scopes": [ "https://www.googleapis.com/auth/drive", @@ -94,70 +96,85 @@ "https://www.googleapis.com/auth/spreadsheets", "https://www.googleapis.com/auth/spreadsheets.readonly" ], - "flatPath": "v4/spreadsheets/{spreadsheetId}", - "id": "sheets.spreadsheets.get", - "path": "v4/spreadsheets/{spreadsheetId}" - }, - "batchUpdate": { - "request": { - "$ref": "BatchUpdateSpreadsheetRequest" - }, - "description": "Applies one or more updates to the spreadsheet.\n\nEach request is validated before\nbeing applied. If any request is not valid then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how\nthey are applied. The replies will mirror the requests. For example,\nif you applied 4 updates and the 3rd one had a reply, then the\nresponse will have 2 empty replies, the actual reply, and another empty\nreply, in that order.\n\nDue to the collaborative nature of spreadsheets, it is not guaranteed that\nthe spreadsheet will reflect exactly your changes after this completes,\nhowever it is guaranteed that the updates in the request will be\napplied together atomically. Your changes may be altered with respect to\ncollaborator changes. If there are no collaborators, the spreadsheet\nshould reflect your changes.", - "response": { - "$ref": "BatchUpdateSpreadsheetResponse" - }, - "parameterOrder": [ - "spreadsheetId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], "parameters": { "spreadsheetId": { "location": "path", - "description": "The spreadsheet to apply the updates to.", + "description": "The spreadsheet to request.", "type": "string", "required": true + }, + "includeGridData": { + "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", + "type": "boolean", + "location": "query" + }, + "ranges": { + "repeated": true, + "location": "query", + "description": "The ranges to retrieve from the spreadsheet.", + "type": "string" } }, - "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", - "id": "sheets.spreadsheets.batchUpdate", - "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate" - }, - "create": { - "description": "Creates a spreadsheet, returning the newly created spreadsheet.", - "request": { - "$ref": "Spreadsheet" - }, - "response": { - "$ref": "Spreadsheet" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], - "flatPath": "v4/spreadsheets", - "id": "sheets.spreadsheets.create", - "path": "v4/spreadsheets" + "flatPath": "v4/spreadsheets/{spreadsheetId}", + "path": "v4/spreadsheets/{spreadsheetId}", + "id": "sheets.spreadsheets.get", + "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nURL parameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.\n\nTo retrieve only subsets of the spreadsheet, use the\nranges URL parameter.\nMultiple ranges can be specified. Limiting the range will\nreturn only the portions of the spreadsheet that intersect the requested\nranges. Ranges are specified using A1 notation." } }, "resources": { "developerMetadata": { "methods": { "search": { + "id": "sheets.spreadsheets.developerMetadata.search", + "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", + "request": { + "$ref": "SearchDeveloperMetadataRequest" + }, + "description": "Returns all developer metadata matching the specified DataFilter.\nIf the provided DataFilter represents a DeveloperMetadataLookup object,\nthis will return all DeveloperMetadata entries selected by it. If the\nDataFilter represents a location in a spreadsheet, this will return all\ndeveloper metadata associated with locations intersecting that region.", + "response": { + "$ref": "SearchDeveloperMetadataResponse" + }, + "parameterOrder": [ + "spreadsheetId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "parameters": { + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to retrieve metadata from.", + "type": "string", + "required": true + } + }, + "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "spreadsheetId", + "metadataId" + ], + "response": { + "$ref": "DeveloperMetadata" + }, "parameters": { "spreadsheetId": { "description": "The ID of the spreadsheet to retrieve metadata from.", "type": "string", "required": true, "location": "path" + }, + "metadataId": { + "format": "int32", + "description": "The ID of the developer metadata to retrieve.", + "type": "integer", + "required": true, + "location": "path" } }, "scopes": [ @@ -165,60 +182,20 @@ "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/spreadsheets" ], - "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", - "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", - "id": "sheets.spreadsheets.developerMetadata.search", - "description": "Returns all developer metadata matching the specified DataFilter.\nIf the provided DataFilter represents a DeveloperMetadataLookup object,\nthis will return all DeveloperMetadata entries selected by it. If the\nDataFilter represents a location in a spreadsheet, this will return all\ndeveloper metadata associated with locations intersecting that region.", - "request": { - "$ref": "SearchDeveloperMetadataRequest" - }, - "httpMethod": "POST", - "parameterOrder": [ - "spreadsheetId" - ], - "response": { - "$ref": "SearchDeveloperMetadataResponse" - } - }, - "get": { - "description": "Returns the developer metadata with the specified id.\nThe caller must specify the spreadsheet ID and the developer metadata's\nunique metadataId.", - "response": { - "$ref": "DeveloperMetadata" - }, - "parameterOrder": [ - "spreadsheetId", - "metadataId" - ], - "httpMethod": "GET", - "parameters": { - "spreadsheetId": { - "location": "path", - "description": "The ID of the spreadsheet to retrieve metadata from.", - "type": "string", - "required": true - }, - "metadataId": { - "location": "path", - "format": "int32", - "description": "The ID of the developer metadata to retrieve.", - "type": "integer", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", + "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", "id": "sheets.spreadsheets.developerMetadata.get", - "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}" + "description": "Returns the developer metadata with the specified id.\nThe caller must specify the spreadsheet ID and the developer metadata's\nunique metadataId." } } }, "values": { "methods": { "get": { + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "id": "sheets.spreadsheets.values.get", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.", "response": { "$ref": "ValueRange" }, @@ -235,22 +212,6 @@ "https://www.googleapis.com/auth/spreadsheets.readonly" ], "parameters": { - "majorDimension": { - "location": "query", - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", - "type": "string" - }, - "spreadsheetId": { - "location": "path", - "description": "The ID of the spreadsheet to retrieve data from.", - "type": "string", - "required": true - }, "range": { "description": "The A1 notation of the values to retrieve.", "type": "string", @@ -258,31 +219,49 @@ "location": "path" }, "dateTimeRenderOption": { + "location": "query", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" ], "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "type": "string", - "location": "query" + "type": "string" }, "valueRenderOption": { - "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string", - "location": "query", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" - ] + ], + "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string", + "location": "query" + }, + "majorDimension": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", + "type": "string", + "location": "query" + }, + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to retrieve data from.", + "type": "string", + "required": true } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "id": "sheets.spreadsheets.values.get", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range." + } }, "update": { + "id": "sheets.spreadsheets.values.update", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", + "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.", + "request": { + "$ref": "ValueRange" + }, "response": { "$ref": "UpdateValuesResponse" }, @@ -291,29 +270,13 @@ "range" ], "httpMethod": "PUT", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" - ], "parameters": { - "includeValuesInResponse": { - "location": "query", - "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).", - "type": "boolean" - }, - "range": { - "description": "The A1 notation of the values to update.", + "spreadsheetId": { + "description": "The ID of the spreadsheet to update.", "type": "string", "required": true, "location": "path" }, - "spreadsheetId": { - "location": "path", - "description": "The ID of the spreadsheet to update.", - "type": "string", - "required": true - }, "responseValueRenderOption": { "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", "type": "string", @@ -335,24 +298,41 @@ "type": "string" }, "responseDateTimeRenderOption": { - "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", - "type": "string", "location": "query", "enum": [ "SERIAL_NUMBER", "FORMATTED_STRING" - ] + ], + "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", + "type": "string" + }, + "includeValuesInResponse": { + "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).", + "type": "boolean", + "location": "query" + }, + "range": { + "location": "path", + "description": "The A1 notation of the values to update.", + "type": "string", + "required": true } }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "id": "sheets.spreadsheets.values.update", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", - "request": { - "$ref": "ValueRange" - }, - "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption." + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ], + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}" }, "batchUpdateByDataFilter": { + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", + "id": "sheets.spreadsheets.values.batchUpdateByDataFilter", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", + "request": { + "$ref": "BatchUpdateValuesByDataFilterRequest" + }, + "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nDataFilterValueRanges.", "response": { "$ref": "BatchUpdateValuesByDataFilterResponse" }, @@ -367,33 +347,21 @@ ], "parameters": { "spreadsheetId": { + "description": "The ID of the spreadsheet to update.", "type": "string", "required": true, - "location": "path", - "description": "The ID of the spreadsheet to update." + "location": "path" } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", - "id": "sheets.spreadsheets.values.batchUpdateByDataFilter", - "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", - "request": { - "$ref": "BatchUpdateValuesByDataFilterRequest" - }, - "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nDataFilterValueRanges." + } }, "batchUpdate": { - "httpMethod": "POST", - "parameterOrder": [ - "spreadsheetId" - ], "response": { "$ref": "BatchUpdateValuesResponse" }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/spreadsheets" + "parameterOrder": [ + "spreadsheetId" ], + "httpMethod": "POST", "parameters": { "spreadsheetId": { "location": "path", @@ -402,54 +370,20 @@ "required": true } }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", - "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", - "id": "sheets.spreadsheets.values.batchUpdate", - "request": { - "$ref": "BatchUpdateValuesRequest" - }, - "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges." - }, - "clear": { - "response": { - "$ref": "ClearValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId", - "range" - ], - "httpMethod": "POST", - "parameters": { - "spreadsheetId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the spreadsheet to update." - }, - "range": { - "location": "path", - "description": "The A1 notation of the values to clear.", - "type": "string", - "required": true - } - }, "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/spreadsheets" ], - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", - "id": "sheets.spreadsheets.values.clear", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", - "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", + "id": "sheets.spreadsheets.values.batchUpdate", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", + "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.", "request": { - "$ref": "ClearValuesRequest" + "$ref": "BatchUpdateValuesRequest" } }, "batchGet": { - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", - "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", - "id": "sheets.spreadsheets.values.batchGet", "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.", "httpMethod": "GET", "response": { @@ -458,28 +392,35 @@ "parameterOrder": [ "spreadsheetId" ], + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], "parameters": { "majorDimension": { - "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", - "type": "string", "location": "query", "enum": [ "DIMENSION_UNSPECIFIED", "ROWS", "COLUMNS" - ] + ], + "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", + "type": "string" }, "ranges": { - "location": "query", "description": "The A1 notation of the values to retrieve.", "type": "string", - "repeated": true + "repeated": true, + "location": "query" }, "spreadsheetId": { + "location": "path", "description": "The ID of the spreadsheet to retrieve data from.", "type": "string", - "required": true, - "location": "path" + "required": true }, "dateTimeRenderOption": { "enum": [ @@ -491,34 +432,34 @@ "location": "query" }, "valueRenderOption": { + "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string", "location": "query", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" - ], - "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string" + ] } }, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.file", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ] + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", + "id": "sheets.spreadsheets.values.batchGet" }, - "batchClearByDataFilter": { + "clear": { + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", + "id": "sheets.spreadsheets.values.clear", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", "request": { - "$ref": "BatchClearValuesByDataFilterRequest" + "$ref": "ClearValuesRequest" }, - "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more\nDataFilters. Ranges matching any of the specified data\nfilters will be cleared. Only values are cleared -- all other properties\nof the cell (such as formatting, data validation, etc..) are kept.", + "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", "response": { - "$ref": "BatchClearValuesByDataFilterResponse" + "$ref": "ClearValuesResponse" }, "parameterOrder": [ - "spreadsheetId" + "spreadsheetId", + "range" ], "httpMethod": "POST", "scopes": [ @@ -532,78 +473,95 @@ "description": "The ID of the spreadsheet to update.", "type": "string", "required": true + }, + "range": { + "location": "path", + "description": "The A1 notation of the values to clear.", + "type": "string", + "required": true } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", - "id": "sheets.spreadsheets.values.batchClearByDataFilter", - "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter" + } }, - "append": { - "id": "sheets.spreadsheets.values.append", - "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", - "request": { - "$ref": "ValueRange" - }, - "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/api/guides/values#appending_values)\nand\n[sample code](/sheets/api/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.", - "response": { - "$ref": "AppendValuesResponse" - }, - "parameterOrder": [ - "spreadsheetId", - "range" - ], + "batchClearByDataFilter": { "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId" + ], + "response": { + "$ref": "BatchClearValuesByDataFilterResponse" + }, "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/spreadsheets" ], "parameters": { - "range": { - "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.", - "type": "string", - "required": true, - "location": "path" - }, - "includeValuesInResponse": { - "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values.", - "type": "boolean", - "location": "query" - }, "spreadsheetId": { "description": "The ID of the spreadsheet to update.", "type": "string", "required": true, "location": "path" + } + }, + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", + "id": "sheets.spreadsheets.values.batchClearByDataFilter", + "request": { + "$ref": "BatchClearValuesByDataFilterRequest" + }, + "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more\nDataFilters. Ranges matching any of the specified data\nfilters will be cleared. Only values are cleared -- all other properties\nof the cell (such as formatting, data validation, etc..) are kept." + }, + "append": { + "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", + "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", + "id": "sheets.spreadsheets.values.append", + "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/api/guides/values#appending_values)\nand\n[sample code](/sheets/api/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.", + "request": { + "$ref": "ValueRange" + }, + "httpMethod": "POST", + "parameterOrder": [ + "spreadsheetId", + "range" + ], + "response": { + "$ref": "AppendValuesResponse" + }, + "parameters": { + "spreadsheetId": { + "location": "path", + "description": "The ID of the spreadsheet to update.", + "type": "string", + "required": true }, "responseValueRenderOption": { + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string", "location": "query", "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" - ], - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string" + ] }, "insertDataOption": { + "description": "How the input data should be inserted.", + "type": "string", + "location": "query", "enum": [ "OVERWRITE", "INSERT_ROWS" - ], - "description": "How the input data should be inserted.", - "type": "string", - "location": "query" + ] }, "valueInputOption": { - "description": "How the input data should be interpreted.", - "type": "string", "location": "query", "enum": [ "INPUT_VALUE_OPTION_UNSPECIFIED", "RAW", "USER_ENTERED" - ] + ], + "description": "How the input data should be interpreted.", + "type": "string" }, "responseDateTimeRenderOption": { "location": "query", @@ -613,17 +571,26 @@ ], "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", "type": "string" + }, + "includeValuesInResponse": { + "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values.", + "type": "boolean", + "location": "query" + }, + "range": { + "location": "path", + "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.", + "type": "string", + "required": true } }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append" + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.file", + "https://www.googleapis.com/auth/spreadsheets" + ] }, "batchGetByDataFilter": { - "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", - "id": "sheets.spreadsheets.values.batchGetByDataFilter", - "request": { - "$ref": "BatchGetValuesByDataFilterRequest" - }, - "description": "Returns one or more ranges of values from a spreadsheet that match the\nspecified data filters. The caller must specify the spreadsheet ID and\none or more DataFilters. Ranges that match any of the data\nfilters in the request will be returned.", "httpMethod": "POST", "parameterOrder": [ "spreadsheetId" @@ -631,20 +598,26 @@ "response": { "$ref": "BatchGetValuesByDataFilterResponse" }, + "parameters": { + "spreadsheetId": { + "description": "The ID of the spreadsheet to retrieve data from.", + "type": "string", + "required": true, + "location": "path" + } + }, "scopes": [ "https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/spreadsheets" ], - "parameters": { - "spreadsheetId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the spreadsheet to retrieve data from." - } - }, - "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter" + "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", + "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", + "id": "sheets.spreadsheets.values.batchGetByDataFilter", + "description": "Returns one or more ranges of values from a spreadsheet that match the\nspecified data filters. The caller must specify the spreadsheet ID and\none or more DataFilters. Ranges that match any of the data\nfilters in the request will be returned.", + "request": { + "$ref": "BatchGetValuesByDataFilterRequest" + } }, "batchClear": { "response": { @@ -661,10 +634,10 @@ ], "parameters": { "spreadsheetId": { - "location": "path", "description": "The ID of the spreadsheet to update.", "type": "string", - "required": true + "required": true, + "location": "path" } }, "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", @@ -684,20 +657,20 @@ "request": { "$ref": "CopySheetToAnotherSpreadsheetRequest" }, - "httpMethod": "POST", + "response": { + "$ref": "SheetProperties" + }, "parameterOrder": [ "spreadsheetId", "sheetId" ], - "response": { - "$ref": "SheetProperties" - }, + "httpMethod": "POST", "parameters": { "spreadsheetId": { - "location": "path", "description": "The ID of the spreadsheet containing the sheet to copy.", "type": "string", - "required": true + "required": true, + "location": "path" }, "sheetId": { "location": "path", @@ -713,8 +686,8 @@ "https://www.googleapis.com/auth/spreadsheets" ], "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", - "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", - "id": "sheets.spreadsheets.sheets.copyTo" + "id": "sheets.spreadsheets.sheets.copyTo", + "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo" } } } @@ -722,31 +695,10 @@ } }, "parameters": { - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "bearer_token": { - "type": "string", - "location": "query", - "description": "OAuth bearer token." - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, "upload_protocol": { - "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" + "type": "string", + "location": "query" }, "prettyPrint": { "location": "query", @@ -754,15 +706,15 @@ "default": "true", "type": "boolean" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" }, "$.xgafv": { "enumDescriptions": [ @@ -783,8 +735,6 @@ "type": "string" }, "alt": { - "description": "Data format for response.", - "default": "json", "enum": [ "json", "media", @@ -796,15 +746,38 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query" - }, - "access_token": { "location": "query", - "description": "OAuth access token.", - "type": "string" + "description": "Data format for response.", + "default": "json" }, "key": { + "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" } @@ -812,31 +785,965 @@ "version": "v4", "baseUrl": "https://sheets.googleapis.com/", "servicePath": "", - "description": "Reads and writes Google Sheets.", "kind": "discovery#restDescription", + "description": "Reads and writes Google Sheets.", "basePath": "", - "id": "sheets:v4", - "revision": "20170915", + "revision": "20170922", "documentationLink": "https://developers.google.com/sheets/", + "id": "sheets:v4", "discoveryVersion": "v1", "version_module": true, "schemas": { + "BasicChartSeries": { + "description": "A single series of data in a chart.\nFor example, if charting stock prices over time, multiple series may exist,\none for the \"Open Price\", \"High Price\", \"Low Price\" and \"Close Price\".", + "type": "object", + "properties": { + "type": { + "enumDescriptions": [ + "Default value, do not use.", + "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", + "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e.", + "A \u003ca href=\"/chart/interactive/docs/gallery/steppedareachart\"\u003estepped area chart\u003c/a\u003e." + ], + "enum": [ + "BASIC_CHART_TYPE_UNSPECIFIED", + "BAR", + "LINE", + "AREA", + "COLUMN", + "SCATTER", + "COMBO", + "STEPPED_AREA" + ], + "description": "The type of this series. Valid only if the\nchartType is\nCOMBO.\nDifferent types will change the way the series is visualized.\nOnly LINE, AREA,\nand COLUMN are supported.", + "type": "string" + }, + "series": { + "$ref": "ChartData", + "description": "The data being visualized in this chart series." + }, + "targetAxis": { + "enumDescriptions": [ + "Default value, do not use.", + "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", + "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", + "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." + ], + "enum": [ + "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", + "BOTTOM_AXIS", + "LEFT_AXIS", + "RIGHT_AXIS" + ], + "description": "The minor axis that will specify the range of values for this series.\nFor example, if charting stocks over time, the \"Volume\" series\nmay want to be pinned to the right with the prices pinned to the left,\nbecause the scale of trading volume is different than the scale of\nprices.\nIt is an error to specify an axis that isn't a valid minor axis\nfor the chart's type.", + "type": "string" + } + }, + "id": "BasicChartSeries" + }, + "Borders": { + "description": "The borders of the cell.", + "type": "object", + "properties": { + "right": { + "$ref": "Border", + "description": "The right border of the cell." + }, + "bottom": { + "$ref": "Border", + "description": "The bottom border of the cell." + }, + "top": { + "$ref": "Border", + "description": "The top border of the cell." + }, + "left": { + "description": "The left border of the cell.", + "$ref": "Border" + } + }, + "id": "Borders" + }, + "AutoResizeDimensionsRequest": { + "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", + "type": "object", + "properties": { + "dimensions": { + "$ref": "DimensionRange", + "description": "The dimensions to automatically resize." + } + }, + "id": "AutoResizeDimensionsRequest" + }, + "UpdateBordersRequest": { + "description": "Updates the borders of a range.\nIf a field is not set in the request, that means the border remains as-is.\nFor example, with two subsequent UpdateBordersRequest:\n\n 1. range: A1:A5 `{ top: RED, bottom: WHITE }`\n 2. range: A1:A5 `{ left: BLUE }`\n\nThat would result in A1:A5 having a borders of\n`{ top: RED, bottom: WHITE, left: BLUE }`.\nIf you want to clear a border, explicitly set the style to\nNONE.", + "type": "object", + "properties": { + "bottom": { + "$ref": "Border", + "description": "The border to put at the bottom of the range." + }, + "innerVertical": { + "description": "The vertical border to put within the range.", + "$ref": "Border" + }, + "right": { + "$ref": "Border", + "description": "The border to put at the right of the range." + }, + "range": { + "$ref": "GridRange", + "description": "The range whose borders should be updated." + }, + "innerHorizontal": { + "description": "The horizontal border to put within the range.", + "$ref": "Border" + }, + "top": { + "$ref": "Border", + "description": "The border to put at the top of the range." + }, + "left": { + "$ref": "Border", + "description": "The border to put at the left of the range." + } + }, + "id": "UpdateBordersRequest" + }, + "CellFormat": { + "description": "The format of a cell.", + "type": "object", + "properties": { + "hyperlinkDisplayType": { + "enumDescriptions": [ + "The default value: the hyperlink is rendered. Do not use this.", + "A hyperlink should be explicitly rendered.", + "A hyperlink should not be rendered." + ], + "enum": [ + "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED", + "LINKED", + "PLAIN_TEXT" + ], + "description": "How a hyperlink, if it exists, should be displayed in the cell.", + "type": "string" + }, + "horizontalAlignment": { + "enumDescriptions": [ + "The horizontal alignment is not specified. Do not use this.", + "The text is explicitly aligned to the left of the cell.", + "The text is explicitly aligned to the center of the cell.", + "The text is explicitly aligned to the right of the cell." + ], + "enum": [ + "HORIZONTAL_ALIGN_UNSPECIFIED", + "LEFT", + "CENTER", + "RIGHT" + ], + "description": "The horizontal alignment of the value in the cell.", + "type": "string" + }, + "textFormat": { + "$ref": "TextFormat", + "description": "The format of the text in the cell (unless overridden by a format run)." + }, + "backgroundColor": { + "$ref": "Color", + "description": "The background color of the cell." + }, + "verticalAlignment": { + "enumDescriptions": [ + "The vertical alignment is not specified. Do not use this.", + "The text is explicitly aligned to the top of the cell.", + "The text is explicitly aligned to the middle of the cell.", + "The text is explicitly aligned to the bottom of the cell." + ], + "enum": [ + "VERTICAL_ALIGN_UNSPECIFIED", + "TOP", + "MIDDLE", + "BOTTOM" + ], + "description": "The vertical alignment of the value in the cell.", + "type": "string" + }, + "padding": { + "description": "The padding of the cell.", + "$ref": "Padding" + }, + "textDirection": { + "description": "The direction of the text in the cell.", + "type": "string", + "enumDescriptions": [ + "The text direction is not specified. Do not use this.", + "The text direction of left-to-right was set by the user.", + "The text direction of right-to-left was set by the user." + ], + "enum": [ + "TEXT_DIRECTION_UNSPECIFIED", + "LEFT_TO_RIGHT", + "RIGHT_TO_LEFT" + ] + }, + "borders": { + "description": "The borders of the cell.", + "$ref": "Borders" + }, + "textRotation": { + "description": "The rotation applied to text in a cell", + "$ref": "TextRotation" + }, + "wrapStrategy": { + "description": "The wrap strategy for the value in the cell.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Lines that are longer than the cell width will be written in the next\ncell over, so long as that cell is empty. If the next cell over is\nnon-empty, this behaves the same as CLIP. The text will never wrap\nto the next line unless the user manually inserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline that is very long. \u003c- Text continues into next cell\n | Next newline. |", + "This wrap strategy represents the old Google Sheets wrap strategy where\nwords that are longer than a line are clipped rather than broken. This\nstrategy is not supported on all platforms and is being phased out.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is clipped.\n | word. |", + "Lines that are longer than the cell width will be clipped.\nThe text will never wrap to the next line unless the user manually\ninserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline t| \u003c- Text is clipped\n | Next newline. |", + "Words that are longer than a line are wrapped at the character level\nrather than clipped.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is broken.\n | ong word. |" + ], + "enum": [ + "WRAP_STRATEGY_UNSPECIFIED", + "OVERFLOW_CELL", + "LEGACY_WRAP", + "CLIP", + "WRAP" + ] + }, + "numberFormat": { + "description": "A format describing how number values should be represented to the user.", + "$ref": "NumberFormat" + } + }, + "id": "CellFormat" + }, + "ClearValuesResponse": { + "properties": { + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + }, + "clearedRange": { + "description": "The range (in A1 notation) that was cleared.\n(If the request was for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual range\n that was cleared, bounded to the sheet's limits.)", + "type": "string" + } + }, + "id": "ClearValuesResponse", + "description": "The response when clearing a range of values in a spreadsheet.", + "type": "object" + }, + "DeleteConditionalFormatRuleRequest": { + "description": "Deletes a conditional format rule at the given index.\nAll subsequent rules' indexes are decremented.", + "type": "object", + "properties": { + "index": { + "format": "int32", + "description": "The zero-based index of the rule to be deleted.", + "type": "integer" + }, + "sheetId": { + "format": "int32", + "description": "The sheet the rule is being deleted from.", + "type": "integer" + } + }, + "id": "DeleteConditionalFormatRuleRequest" + }, + "DeleteNamedRangeRequest": { + "description": "Removes the named range with the given ID from the spreadsheet.", + "type": "object", + "properties": { + "namedRangeId": { + "description": "The ID of the named range to delete.", + "type": "string" + } + }, + "id": "DeleteNamedRangeRequest" + }, + "AddBandingResponse": { + "description": "The result of adding a banded range.", + "type": "object", + "properties": { + "bandedRange": { + "description": "The banded range that was added.", + "$ref": "BandedRange" + } + }, + "id": "AddBandingResponse" + }, + "ChartData": { + "description": "The data included in a domain or series.", + "type": "object", + "properties": { + "sourceRange": { + "description": "The source ranges of the data.", + "$ref": "ChartSourceRange" + } + }, + "id": "ChartData" + }, + "BatchGetValuesResponse": { + "properties": { + "valueRanges": { + "description": "The requested values. The order of the ValueRanges is the same as the\norder of the requested ranges.", + "items": { + "$ref": "ValueRange" + }, + "type": "array" + }, + "spreadsheetId": { + "description": "The ID of the spreadsheet the data was retrieved from.", + "type": "string" + } + }, + "id": "BatchGetValuesResponse", + "description": "The response when retrieving more than one range of values in a spreadsheet.", + "type": "object" + }, + "UpdateBandingRequest": { + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `bandedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "bandedRange": { + "$ref": "BandedRange", + "description": "The banded range to update with the new properties." + } + }, + "id": "UpdateBandingRequest", + "description": "Updates properties of the supplied banded range.", + "type": "object" + }, + "Color": { + "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", + "type": "object", + "properties": { + "red": { + "format": "float", + "description": "The amount of red in the color as a value in the interval [0, 1].", + "type": "number" + }, + "alpha": { + "format": "float", + "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", + "type": "number" + }, + "blue": { + "format": "float", + "description": "The amount of blue in the color as a value in the interval [0, 1].", + "type": "number" + }, + "green": { + "format": "float", + "description": "The amount of green in the color as a value in the interval [0, 1].", + "type": "number" + } + }, + "id": "Color" + }, + "PivotGroup": { + "description": "A single grouping (either row or column) in a pivot table.", + "type": "object", + "properties": { + "valueBucket": { + "description": "The bucket of the opposite pivot group to sort by.\nIf not specified, sorting is alphabetical by this group's values.", + "$ref": "PivotGroupSortValueBucket" + }, + "valueMetadata": { + "description": "Metadata about values in the grouping.", + "items": { + "$ref": "PivotGroupValueMetadata" + }, + "type": "array" + }, + "showTotals": { + "description": "True if the pivot table should include the totals for this grouping.", + "type": "boolean" + }, + "sourceColumnOffset": { + "format": "int32", + "description": "The column offset of the source range that this grouping is based on.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this group refers to column `C`, whereas the offset `1` would refer\nto column `D`.", + "type": "integer" + }, + "sortOrder": { + "enumDescriptions": [ + "Default value, do not use this.", + "Sort ascending.", + "Sort descending." + ], + "enum": [ + "SORT_ORDER_UNSPECIFIED", + "ASCENDING", + "DESCENDING" + ], + "description": "The order the values in this group should be sorted.", + "type": "string" + } + }, + "id": "PivotGroup" + }, + "PivotTable": { + "description": "A pivot table.", + "type": "object", + "properties": { + "rows": { + "description": "Each row grouping in the pivot table.", + "items": { + "$ref": "PivotGroup" + }, + "type": "array" + }, + "valueLayout": { + "enum": [ + "HORIZONTAL", + "VERTICAL" + ], + "description": "Whether values should be listed horizontally (as columns)\nor vertically (as rows).", + "type": "string", + "enumDescriptions": [ + "Values are laid out horizontally (as columns).", + "Values are laid out vertically (as rows)." + ] + }, + "values": { + "description": "A list of values to include in the pivot table.", + "items": { + "$ref": "PivotValue" + }, + "type": "array" + }, + "source": { + "$ref": "GridRange", + "description": "The range the pivot table is reading data from." + }, + "columns": { + "description": "Each column grouping in the pivot table.", + "items": { + "$ref": "PivotGroup" + }, + "type": "array" + }, + "criteria": { + "description": "An optional mapping of filters per source column offset.\n\nThe filters will be applied before aggregating data into the pivot table.\nThe map's key is the column offset of the source range that you want to\nfilter, and the value is the criteria for that column.\n\nFor example, if the source was `C10:E15`, a key of `0` will have the filter\nfor column `C`, whereas the key `1` is for column `D`.", + "type": "object", + "additionalProperties": { + "$ref": "PivotFilterCriteria" + } + } + }, + "id": "PivotTable" + }, + "ChartSourceRange": { + "description": "Source ranges for a chart.", + "type": "object", + "properties": { + "sources": { + "description": "The ranges of data for a series or domain.\nExactly one dimension must have a length of 1,\nand all sources in the list must have the same dimension\nwith length 1.\nThe domain (if it exists) & all series must have the same number\nof source ranges. If using more than one source range, then the source\nrange at a given offset must be contiguous across the domain and series.\n\nFor example, these are valid configurations:\n\n domain sources: A1:A5\n series1 sources: B1:B5\n series2 sources: D6:D10\n\n domain sources: A1:A5, C10:C12\n series1 sources: B1:B5, D10:D12\n series2 sources: C1:C5, E10:E12", + "items": { + "$ref": "GridRange" + }, + "type": "array" + } + }, + "id": "ChartSourceRange" + }, + "SearchDeveloperMetadataResponse": { + "description": "A reply to a developer metadata search request.", + "type": "object", + "properties": { + "matchedDeveloperMetadata": { + "description": "The metadata matching the criteria of the search request.", + "items": { + "$ref": "MatchedDeveloperMetadata" + }, + "type": "array" + } + }, + "id": "SearchDeveloperMetadataResponse" + }, + "ValueRange": { + "description": "Data within a range of the spreadsheet.", + "type": "object", + "properties": { + "range": { + "description": "The range the values cover, in A1 notation.\nFor output, this range indicates the entire requested range,\neven though the values will exclude trailing rows and columns.\nWhen appending values, this field represents the range to search for a\ntable, after which values will be appended.", + "type": "string" + }, + "values": { + "description": "The data that was read or to be written. This is an array of arrays,\nthe outer array representing all the data and each inner array\nrepresenting a major dimension. Each item in the inner array\ncorresponds with one cell.\n\nFor output, empty trailing rows and columns will not be included.\n\nFor input, supported value types are: bool, string, and double.\nNull values will be skipped.\nTo set a cell to an empty value, set the string value to an empty string.", + "items": { + "items": { + "type": "any" + }, + "type": "array" + }, + "type": "array" + }, + "majorDimension": { + "description": "The major dimension of the values.\n\nFor output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.\n\nFor input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`\nwill set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`\nthen `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.\n\nWhen writing, if this field is not set, it defaults to ROWS.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ] + } + }, + "id": "ValueRange" + }, + "AppendCellsRequest": { + "description": "Adds new cells after the last row with data in a sheet,\ninserting new rows into the sheet if necessary.", + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "rows": { + "description": "The data to append.", + "items": { + "$ref": "RowData" + }, + "type": "array" + }, + "sheetId": { + "format": "int32", + "description": "The sheet ID to append the data to.", + "type": "integer" + } + }, + "id": "AppendCellsRequest" + }, + "AddBandingRequest": { + "description": "Adds a new banded range to the spreadsheet.", + "type": "object", + "properties": { + "bandedRange": { + "description": "The banded range to add. The bandedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)", + "$ref": "BandedRange" + } + }, + "id": "AddBandingRequest" + }, + "Response": { + "description": "A single response from an update.", + "type": "object", + "properties": { + "addProtectedRange": { + "description": "A reply from adding a protected range.", + "$ref": "AddProtectedRangeResponse" + }, + "duplicateSheet": { + "$ref": "DuplicateSheetResponse", + "description": "A reply from duplicating a sheet." + }, + "updateEmbeddedObjectPosition": { + "$ref": "UpdateEmbeddedObjectPositionResponse", + "description": "A reply from updating an embedded object's position." + }, + "deleteConditionalFormatRule": { + "$ref": "DeleteConditionalFormatRuleResponse", + "description": "A reply from deleting a conditional format rule." + }, + "duplicateFilterView": { + "description": "A reply from duplicating a filter view.", + "$ref": "DuplicateFilterViewResponse" + }, + "addChart": { + "$ref": "AddChartResponse", + "description": "A reply from adding a chart." + }, + "updateDeveloperMetadata": { + "description": "A reply from updating a developer metadata entry.", + "$ref": "UpdateDeveloperMetadataResponse" + }, + "findReplace": { + "$ref": "FindReplaceResponse", + "description": "A reply from doing a find/replace." + }, + "addSheet": { + "$ref": "AddSheetResponse", + "description": "A reply from adding a sheet." + }, + "createDeveloperMetadata": { + "description": "A reply from creating a developer metadata entry.", + "$ref": "CreateDeveloperMetadataResponse" + }, + "updateConditionalFormatRule": { + "$ref": "UpdateConditionalFormatRuleResponse", + "description": "A reply from updating a conditional format rule." + }, + "addNamedRange": { + "description": "A reply from adding a named range.", + "$ref": "AddNamedRangeResponse" + }, + "deleteDeveloperMetadata": { + "$ref": "DeleteDeveloperMetadataResponse", + "description": "A reply from deleting a developer metadata entry." + }, + "addFilterView": { + "$ref": "AddFilterViewResponse", + "description": "A reply from adding a filter view." + }, + "addBanding": { + "$ref": "AddBandingResponse", + "description": "A reply from adding a banded range." + } + }, + "id": "Response" + }, + "EmbeddedChart": { + "description": "A chart embedded in a sheet.", + "type": "object", + "properties": { + "spec": { + "description": "The specification of the chart.", + "$ref": "ChartSpec" + }, + "chartId": { + "format": "int32", + "description": "The ID of the chart.", + "type": "integer" + }, + "position": { + "$ref": "EmbeddedObjectPosition", + "description": "The position of the chart." + } + }, + "id": "EmbeddedChart" + }, + "TextFormatRun": { + "description": "A run of a text format. The format of this run continues until the start\nindex of the next run.\nWhen updating, all fields must be set.", + "type": "object", + "properties": { + "startIndex": { + "format": "int32", + "description": "The character index where this run starts.", + "type": "integer" + }, + "format": { + "description": "The format of this run. Absent values inherit the cell's format.", + "$ref": "TextFormat" + } + }, + "id": "TextFormatRun" + }, + "InsertRangeRequest": { + "description": "Inserts cells into a range, shifting the existing cells over or down.", + "type": "object", + "properties": { + "shiftDimension": { + "description": "The dimension which will be shifted when inserting cells.\nIf ROWS, existing cells will be shifted down.\nIf COLUMNS, existing cells will be shifted right.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ] + }, + "range": { + "$ref": "GridRange", + "description": "The range to insert new cells into." + } + }, + "id": "InsertRangeRequest" + }, + "AddNamedRangeResponse": { + "description": "The result of adding a named range.", + "type": "object", + "properties": { + "namedRange": { + "$ref": "NamedRange", + "description": "The named range to add." + } + }, + "id": "AddNamedRangeResponse" + }, + "BatchUpdateValuesByDataFilterResponse": { + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object", + "properties": { + "totalUpdatedCells": { + "format": "int32", + "description": "The total number of cells updated.", + "type": "integer" + }, + "totalUpdatedColumns": { + "format": "int32", + "description": "The total number of columns where at least one cell in the column was\nupdated.", + "type": "integer" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + }, + "totalUpdatedRows": { + "format": "int32", + "description": "The total number of rows where at least one cell in the row was updated.", + "type": "integer" + }, + "responses": { + "description": "The response for each range updated.", + "items": { + "$ref": "UpdateValuesByDataFilterResponse" + }, + "type": "array" + }, + "totalUpdatedSheets": { + "format": "int32", + "description": "The total number of sheets where at least one cell in the sheet was\nupdated.", + "type": "integer" + } + }, + "id": "BatchUpdateValuesByDataFilterResponse" + }, + "RowData": { + "description": "Data about each cell in a row.", + "type": "object", + "properties": { + "values": { + "description": "The values in the row, one per column.", + "items": { + "$ref": "CellData" + }, + "type": "array" + } + }, + "id": "RowData" + }, + "Border": { + "description": "A border along a cell.", + "type": "object", + "properties": { + "width": { + "format": "int32", + "description": "The width of the border, in pixels.\nDeprecated; the width is determined by the \"style\" field.", + "type": "integer" + }, + "style": { + "enumDescriptions": [ + "The style is not specified. Do not use this.", + "The border is dotted.", + "The border is dashed.", + "The border is a thin solid line.", + "The border is a medium solid line.", + "The border is a thick solid line.", + "No border.\nUsed only when updating a border in order to erase it.", + "The border is two solid lines." + ], + "enum": [ + "STYLE_UNSPECIFIED", + "DOTTED", + "DASHED", + "SOLID", + "SOLID_MEDIUM", + "SOLID_THICK", + "NONE", + "DOUBLE" + ], + "description": "The style of the border.", + "type": "string" + }, + "color": { + "$ref": "Color", + "description": "The color of the border." + } + }, + "id": "Border" + }, + "GridData": { + "properties": { + "startRow": { + "format": "int32", + "description": "The first row this GridData refers to, zero-based.", + "type": "integer" + }, + "columnMetadata": { + "description": "Metadata about the requested columns in the grid, starting with the column\nin start_column.", + "items": { + "$ref": "DimensionProperties" + }, + "type": "array" + }, + "startColumn": { + "format": "int32", + "description": "The first column this GridData refers to, zero-based.", + "type": "integer" + }, + "rowMetadata": { + "description": "Metadata about the requested rows in the grid, starting with the row\nin start_row.", + "items": { + "$ref": "DimensionProperties" + }, + "type": "array" + }, + "rowData": { + "description": "The data in the grid, one entry per row,\nstarting with the row in startRow.\nThe values in RowData will correspond to columns starting\nat start_column.", + "items": { + "$ref": "RowData" + }, + "type": "array" + } + }, + "id": "GridData", + "description": "Data in the grid, as well as metadata about the dimensions.", + "type": "object" + }, + "UpdateNamedRangeRequest": { + "properties": { + "namedRange": { + "description": "The named range to update with the new properties.", + "$ref": "NamedRange" + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `namedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + } + }, + "id": "UpdateNamedRangeRequest", + "description": "Updates properties of the named range with the specified\nnamedRangeId.", + "type": "object" + }, + "FindReplaceRequest": { + "description": "Finds and replaces data in cells over a range, sheet, or all sheets.", + "type": "object", + "properties": { + "replacement": { + "description": "The value to use as the replacement.", + "type": "string" + }, + "range": { + "description": "The range to find/replace over.", + "$ref": "GridRange" + }, + "sheetId": { + "format": "int32", + "description": "The sheet to find/replace over.", + "type": "integer" + }, + "allSheets": { + "description": "True to find/replace over all sheets.", + "type": "boolean" + }, + "matchCase": { + "description": "True if the search is case sensitive.", + "type": "boolean" + }, + "includeFormulas": { + "description": "True if the search should include cells with formulas.\nFalse to skip cells with formulas.", + "type": "boolean" + }, + "matchEntireCell": { + "description": "True if the find value should match the entire cell.", + "type": "boolean" + }, + "find": { + "description": "The value to search.", + "type": "string" + }, + "searchByRegex": { + "description": "True if the find value is a regex.\nThe regular expression and replacement should follow Java regex rules\nat https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.\nThe replacement string is allowed to refer to capturing groups.\nFor example, if one cell has the contents `\"Google Sheets\"` and another\nhas `\"Google Docs\"`, then searching for `\"o.* (.*)\"` with a replacement of\n`\"$1 Rocks\"` would change the contents of the cells to\n`\"GSheets Rocks\"` and `\"GDocs Rocks\"` respectively.", + "type": "boolean" + } + }, + "id": "FindReplaceRequest" + }, + "AddSheetRequest": { + "description": "Adds a new sheet.\nWhen a sheet is added at a given index,\nall subsequent sheets' indexes are incremented.\nTo add an object sheet, use AddChartRequest instead and specify\nEmbeddedObjectPosition.sheetId or\nEmbeddedObjectPosition.newSheet.", + "type": "object", + "properties": { + "properties": { + "$ref": "SheetProperties", + "description": "The properties the new sheet should have.\nAll properties are optional.\nThe sheetId field is optional; if one is not\nset, an id will be randomly generated. (It is an error to specify the ID\nof a sheet that already exists.)" + } + }, + "id": "AddSheetRequest" + }, + "UpdateCellsRequest": { + "description": "Updates all cells in a range with new data.", + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "rows": { + "description": "The data to write.", + "items": { + "$ref": "RowData" + }, + "type": "array" + }, + "start": { + "description": "The coordinate to start writing data at.\nAny number of rows and columns (including a different number of\ncolumns per row) may be written.", + "$ref": "GridCoordinate" + }, + "range": { + "$ref": "GridRange", + "description": "The range to write data to.\n\nIf the data in rows does not cover the entire requested range,\nthe fields matching those set in fields will be cleared." + } + }, + "id": "UpdateCellsRequest" + }, + "RandomizeRangeRequest": { + "properties": { + "range": { + "$ref": "GridRange", + "description": "The range to randomize." + } + }, + "id": "RandomizeRangeRequest", + "description": "Randomizes the order of the rows in a range.", + "type": "object" + }, + "DeleteConditionalFormatRuleResponse": { + "properties": { + "rule": { + "description": "The rule that was deleted.", + "$ref": "ConditionalFormatRule" + } + }, + "id": "DeleteConditionalFormatRuleResponse", + "description": "The result of deleting a conditional format rule.", + "type": "object" + }, "DeleteRangeRequest": { "description": "Deletes a range of cells, shifting other cells into the deleted area.", "type": "object", "properties": { "shiftDimension": { - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], "description": "The dimension from which deleted cells will be replaced with.\nIf ROWS, existing cells will be shifted upward to\nreplace the deleted cells. If COLUMNS, existing cells\nwill be shifted left to replace the deleted cells.", "type": "string", "enumDescriptions": [ "The default value, do not use.", "Operates on the rows of a sheet.", "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" ] }, "range": { @@ -872,28 +1779,28 @@ "description": "Updates properties of the sheet with the specified\nsheetId.", "type": "object", "properties": { + "properties": { + "$ref": "SheetProperties", + "description": "The properties to update." + }, "fields": { "format": "google-fieldmask", "description": "The fields that should be updated. At least one field must be specified.\nThe root `properties` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", "type": "string" - }, - "properties": { - "$ref": "SheetProperties", - "description": "The properties to update." } }, "id": "UpdateSheetPropertiesRequest" }, "UnmergeCellsRequest": { + "description": "Unmerges cells in the given range.", + "type": "object", "properties": { "range": { - "description": "The range within which all cells should be unmerged.\nIf the range spans multiple merges, all will be unmerged.\nThe range must not partially span any merge.", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The range within which all cells should be unmerged.\nIf the range spans multiple merges, all will be unmerged.\nThe range must not partially span any merge." } }, - "id": "UnmergeCellsRequest", - "description": "Unmerges cells in the given range.", - "type": "object" + "id": "UnmergeCellsRequest" }, "GridProperties": { "description": "Properties of a grid.", @@ -919,28 +1826,40 @@ "type": "integer" }, "columnCount": { - "type": "integer", "format": "int32", - "description": "The number of columns in the grid." + "description": "The number of columns in the grid.", + "type": "integer" } }, "id": "GridProperties" }, "UpdateEmbeddedObjectPositionResponse": { - "properties": { - "position": { - "$ref": "EmbeddedObjectPosition", - "description": "The new position of the embedded object." - } - }, - "id": "UpdateEmbeddedObjectPositionResponse", "description": "The result of updating an embedded object's position.", - "type": "object" - }, - "Sheet": { - "description": "A sheet in a spreadsheet.", "type": "object", "properties": { + "position": { + "description": "The new position of the embedded object.", + "$ref": "EmbeddedObjectPosition" + } + }, + "id": "UpdateEmbeddedObjectPositionResponse" + }, + "Sheet": { + "properties": { + "merges": { + "description": "The ranges that are merged together.", + "items": { + "$ref": "GridRange" + }, + "type": "array" + }, + "data": { + "description": "Data in the grid, if this is a grid sheet.\nThe number of GridData objects returned is dependent on the number of\nranges requested on this sheet. For example, if this is representing\n`Sheet1`, and the spreadsheet was requested with ranges\n`Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a\nstartRow/startColumn of `0`,\nwhile the second one will have `startRow 14` (zero-based row 15),\nand `startColumn 3` (zero-based column D).", + "items": { + "$ref": "GridData" + }, + "type": "array" + }, "bandedRanges": { "description": "The banded (i.e. alternating colors) ranges on this sheet.", "items": { @@ -949,15 +1868,15 @@ "type": "array" }, "charts": { + "description": "The specifications of every chart on this sheet.", "items": { "$ref": "EmbeddedChart" }, - "type": "array", - "description": "The specifications of every chart on this sheet." + "type": "array" }, "properties": { - "$ref": "SheetProperties", - "description": "The properties of the sheet." + "description": "The properties of the sheet.", + "$ref": "SheetProperties" }, "filterViews": { "description": "The filter views in this sheet.", @@ -981,32 +1900,20 @@ "type": "array" }, "conditionalFormats": { + "description": "The conditional format rules in this sheet.", "items": { "$ref": "ConditionalFormatRule" }, - "type": "array", - "description": "The conditional format rules in this sheet." + "type": "array" }, "basicFilter": { "$ref": "BasicFilter", "description": "The filter on this sheet, if any." - }, - "merges": { - "description": "The ranges that are merged together.", - "items": { - "$ref": "GridRange" - }, - "type": "array" - }, - "data": { - "description": "Data in the grid, if this is a grid sheet.\nThe number of GridData objects returned is dependent on the number of\nranges requested on this sheet. For example, if this is representing\n`Sheet1`, and the spreadsheet was requested with ranges\n`Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a\nstartRow/startColumn of `0`,\nwhile the second one will have `startRow 14` (zero-based row 15),\nand `startColumn 3` (zero-based column D).", - "items": { - "$ref": "GridData" - }, - "type": "array" } }, - "id": "Sheet" + "id": "Sheet", + "description": "A sheet in a spreadsheet.", + "type": "object" }, "SortSpec": { "description": "A sort order associated with a specific column or row.", @@ -1018,7 +1925,6 @@ "type": "integer" }, "sortOrder": { - "type": "string", "enumDescriptions": [ "Default value, do not use this.", "Sort ascending.", @@ -1029,7 +1935,8 @@ "ASCENDING", "DESCENDING" ], - "description": "The order data should be sorted." + "description": "The order data should be sorted.", + "type": "string" } }, "id": "SortSpec" @@ -1043,30 +1950,28 @@ "description": "The format to apply.\nConditional formatting can only apply a subset of formatting:\nbold, italic,\nstrikethrough,\nforeground color &\nbackground color." }, "condition": { - "$ref": "BooleanCondition", - "description": "The condition of the rule. If the condition evaluates to true,\nthe format will be applied." + "description": "The condition of the rule. If the condition evaluates to true,\nthe format will be applied.", + "$ref": "BooleanCondition" } }, "id": "BooleanRule" }, "PivotGroupValueMetadata": { - "description": "Metadata about a value in a pivot grouping.", - "type": "object", "properties": { - "value": { - "$ref": "ExtendedValue", - "description": "The calculated value the metadata corresponds to.\n(Note that formulaValue is not valid,\n because the values will be calculated.)" - }, "collapsed": { "description": "True if the data corresponding to the value is collapsed.", "type": "boolean" + }, + "value": { + "$ref": "ExtendedValue", + "description": "The calculated value the metadata corresponds to.\n(Note that formulaValue is not valid,\n because the values will be calculated.)" } }, - "id": "PivotGroupValueMetadata" + "id": "PivotGroupValueMetadata", + "description": "Metadata about a value in a pivot grouping.", + "type": "object" }, "FilterCriteria": { - "description": "Criteria for showing/hiding rows in a filter or filter view.", - "type": "object", "properties": { "condition": { "description": "A condition that must be true for values to be shown.\n(This does not override hiddenValues -- if a value is listed there,\n it will still be hidden.)", @@ -1080,11 +1985,11 @@ "type": "array" } }, - "id": "FilterCriteria" + "id": "FilterCriteria", + "description": "Criteria for showing/hiding rows in a filter or filter view.", + "type": "object" }, "Editors": { - "description": "The editors of a protected range.", - "type": "object", "properties": { "users": { "description": "The email addresses of users with edit access to the protected range.", @@ -1094,8 +1999,8 @@ "type": "array" }, "domainUsersCanEdit": { - "type": "boolean", - "description": "True if anyone in the document's domain has edit access to the protected\nrange. Domain protection is only supported on documents within a domain." + "description": "True if anyone in the document's domain has edit access to the protected\nrange. Domain protection is only supported on documents within a domain.", + "type": "boolean" }, "groups": { "description": "The email addresses of groups with edit access to the protected range.", @@ -1105,20 +2010,17 @@ "type": "array" } }, - "id": "Editors" + "id": "Editors", + "description": "The editors of a protected range.", + "type": "object" }, "UpdateConditionalFormatRuleRequest": { "description": "Updates a conditional format rule at the given index,\nor moves a conditional format rule to another index.", "type": "object", "properties": { - "newIndex": { - "format": "int32", - "description": "The zero-based new index the rule should end up at.", - "type": "integer" - }, "rule": { - "$ref": "ConditionalFormatRule", - "description": "The rule that should replace the rule at the given index." + "description": "The rule that should replace the rule at the given index.", + "$ref": "ConditionalFormatRule" }, "index": { "format": "int32", @@ -1129,16 +2031,20 @@ "format": "int32", "description": "The sheet of the rule to move. Required if new_index is set,\nunused otherwise.", "type": "integer" + }, + "newIndex": { + "format": "int32", + "description": "The zero-based new index the rule should end up at.", + "type": "integer" } }, "id": "UpdateConditionalFormatRuleRequest" }, "DataValidationRule": { - "type": "object", "properties": { "condition": { - "description": "The condition that data in the cell must match.", - "$ref": "BooleanCondition" + "$ref": "BooleanCondition", + "description": "The condition that data in the cell must match." }, "showCustomUi": { "description": "True if the UI should be customized based on the kind of condition.\nIf true, \"List\" conditions will show a dropdown.", @@ -1154,7 +2060,8 @@ } }, "id": "DataValidationRule", - "description": "A data validation rule." + "description": "A data validation rule.", + "type": "object" }, "BasicChartDomain": { "properties": { @@ -1163,8 +2070,8 @@ "type": "boolean" }, "domain": { - "description": "The data of the domain. For example, if charting stock prices over time,\nthis is the data representing the dates.", - "$ref": "ChartData" + "$ref": "ChartData", + "description": "The data of the domain. For example, if charting stock prices over time,\nthis is the data representing the dates." } }, "id": "BasicChartDomain", @@ -1176,8 +2083,8 @@ "type": "object", "properties": { "coordinate": { - "description": "The coordinate at which the data should start being inserted.", - "$ref": "GridCoordinate" + "$ref": "GridCoordinate", + "description": "The coordinate at which the data should start being inserted." }, "delimiter": { "description": "The delimiter in the data.", @@ -1188,8 +2095,6 @@ "type": "string" }, "type": { - "description": "How the data should be pasted.", - "type": "string", "enumDescriptions": [ "Paste values, formulas, formats, and merges.", "Paste the values ONLY without formats, formulas, or merges.", @@ -1207,7 +2112,9 @@ "PASTE_FORMULA", "PASTE_DATA_VALIDATION", "PASTE_CONDITIONAL_FORMATTING" - ] + ], + "description": "How the data should be pasted.", + "type": "string" }, "html": { "description": "True if the data is HTML.", @@ -1217,7 +2124,6 @@ "id": "PasteDataRequest" }, "UpdateDeveloperMetadataResponse": { - "id": "UpdateDeveloperMetadataResponse", "description": "The response from updating developer metadata.", "type": "object", "properties": { @@ -1228,78 +2134,79 @@ }, "type": "array" } - } + }, + "id": "UpdateDeveloperMetadataResponse" }, "AppendDimensionRequest": { "description": "Appends rows or columns to the end of a sheet.", "type": "object", "properties": { - "length": { - "format": "int32", - "description": "The number of rows or columns to append.", - "type": "integer" - }, "sheetId": { "format": "int32", "description": "The sheet to append rows or columns to.", "type": "integer" }, "dimension": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], "description": "Whether rows or columns should be appended.", "type": "string", "enumDescriptions": [ "The default value, do not use.", "Operates on the rows of a sheet.", "Operates on the columns of a sheet." - ], - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" ] + }, + "length": { + "format": "int32", + "description": "The number of rows or columns to append.", + "type": "integer" } }, "id": "AppendDimensionRequest" }, "AddNamedRangeRequest": { - "description": "Adds a named range to the spreadsheet.", - "type": "object", "properties": { "namedRange": { "description": "The named range to add. The namedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)", "$ref": "NamedRange" } }, - "id": "AddNamedRangeRequest" + "id": "AddNamedRangeRequest", + "description": "Adds a named range to the spreadsheet.", + "type": "object" }, "CreateDeveloperMetadataResponse": { - "description": "The response from creating developer metadata.", - "type": "object", "properties": { "developerMetadata": { "description": "The developer metadata that was created.", "$ref": "DeveloperMetadata" } }, - "id": "CreateDeveloperMetadataResponse" + "id": "CreateDeveloperMetadataResponse", + "description": "The response from creating developer metadata.", + "type": "object" }, "UpdateEmbeddedObjectPositionRequest": { "description": "Update an embedded object's position (such as a moving or resizing a\nchart or image).", "type": "object", "properties": { - "objectId": { - "format": "int32", - "description": "The ID of the object to moved.", - "type": "integer" - }, "newPosition": { - "description": "An explicit position to move the embedded object to.\nIf newPosition.sheetId is set,\na new sheet with that ID will be created.\nIf newPosition.newSheet is set to true,\na new sheet will be created with an ID that will be chosen for you.", - "$ref": "EmbeddedObjectPosition" + "$ref": "EmbeddedObjectPosition", + "description": "An explicit position to move the embedded object to.\nIf newPosition.sheetId is set,\na new sheet with that ID will be created.\nIf newPosition.newSheet is set to true,\na new sheet will be created with an ID that will be chosen for you." }, "fields": { "format": "google-fieldmask", "description": "The fields of OverlayPosition\nthat should be updated when setting a new position. Used only if\nnewPosition.overlayPosition\nis set, in which case at least one field must\nbe specified. The root `newPosition.overlayPosition` is implied and\nshould not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", "type": "string" + }, + "objectId": { + "format": "int32", + "description": "The ID of the object to moved.", + "type": "integer" } }, "id": "UpdateEmbeddedObjectPositionRequest" @@ -1320,44 +2227,11 @@ }, "id": "TextRotation" }, - "UpdateDeveloperMetadataRequest": { - "description": "A request to update properties of developer metadata.\nUpdates the properties of the developer metadata selected by the filters to\nthe values provided in the DeveloperMetadata resource. Callers must\nspecify the properties they wish to update in the fields parameter, as well\nas specify at least one DataFilter matching the metadata they wish to\nupdate.", - "type": "object", - "properties": { - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `developerMetadata` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - }, - "developerMetadata": { - "$ref": "DeveloperMetadata", - "description": "The value that all metadata matched by the data filters will be updated to." - }, - "dataFilters": { - "description": "The filters matching the developer metadata entries to update.", - "items": { - "$ref": "DataFilter" - }, - "type": "array" - } - }, - "id": "UpdateDeveloperMetadataRequest" - }, "PieChartSpec": { - "description": "A \u003ca href=\"/chart/interactive/docs/gallery/piechart\"\u003epie chart\u003c/a\u003e.", - "type": "object", "properties": { - "threeDimensional": { - "description": "True if the pie is three dimensional.", - "type": "boolean" - }, - "domain": { - "description": "The data that covers the domain of the pie chart.", - "$ref": "ChartData" - }, "series": { - "description": "The data that covers the one and only series of the pie chart.", - "$ref": "ChartData" + "$ref": "ChartData", + "description": "The data that covers the one and only series of the pie chart." }, "pieHole": { "format": "double", @@ -1365,6 +2239,15 @@ "type": "number" }, "legendPosition": { + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered.", + "Each pie slice has a label attached to it." + ], "enum": [ "PIE_CHART_LEGEND_POSITION_UNSPECIFIED", "BOTTOM_LEGEND", @@ -1375,19 +2258,43 @@ "LABELED_LEGEND" ], "description": "Where the legend of the pie chart should be drawn.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered.", - "Each pie slice has a label attached to it." - ] + "type": "string" + }, + "threeDimensional": { + "description": "True if the pie is three dimensional.", + "type": "boolean" + }, + "domain": { + "$ref": "ChartData", + "description": "The data that covers the domain of the pie chart." } }, - "id": "PieChartSpec" + "id": "PieChartSpec", + "description": "A \u003ca href=\"/chart/interactive/docs/gallery/piechart\"\u003epie chart\u003c/a\u003e.", + "type": "object" + }, + "UpdateDeveloperMetadataRequest": { + "properties": { + "dataFilters": { + "description": "The filters matching the developer metadata entries to update.", + "items": { + "$ref": "DataFilter" + }, + "type": "array" + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated. At least one field must be specified.\nThe root `developerMetadata` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", + "type": "string" + }, + "developerMetadata": { + "$ref": "DeveloperMetadata", + "description": "The value that all metadata matched by the data filters will be updated to." + } + }, + "id": "UpdateDeveloperMetadataRequest", + "description": "A request to update properties of developer metadata.\nUpdates the properties of the developer metadata selected by the filters to\nthe values provided in the DeveloperMetadata resource. Callers must\nspecify the properties they wish to update in the fields parameter, as well\nas specify at least one DataFilter matching the metadata they wish to\nupdate.", + "type": "object" }, "UpdateFilterViewRequest": { "description": "Updates properties of the filter view.", @@ -1409,6 +2316,10 @@ "description": "A rule describing a conditional format.", "type": "object", "properties": { + "gradientRule": { + "$ref": "GradientRule", + "description": "The formatting will vary based on the gradients in the rule." + }, "booleanRule": { "$ref": "BooleanRule", "description": "The formatting is either \"on\" or \"off\" according to the rule." @@ -1419,10 +2330,6 @@ "$ref": "GridRange" }, "type": "array" - }, - "gradientRule": { - "$ref": "GradientRule", - "description": "The formatting will vary based on the gradients in the rule." } }, "id": "ConditionalFormatRule" @@ -1458,8 +2365,8 @@ "$ref": "GridRange" }, "destination": { - "description": "The location to paste to. If the range covers a span that's\na multiple of the source's height or width, then the\ndata will be repeated to fill in the destination range.\nIf the range is smaller than the source range, the entire\nsource data will still be copied (beyond the end of the destination range).", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The location to paste to. If the range covers a span that's\na multiple of the source's height or width, then the\ndata will be repeated to fill in the destination range.\nIf the range is smaller than the source range, the entire\nsource data will still be copied (beyond the end of the destination range)." }, "pasteOrientation": { "enum": [ @@ -1477,6 +2384,7 @@ "id": "CopyPasteRequest" }, "BooleanCondition": { + "description": "A condition that can evaluate to true or false.\nBooleanConditions are used by conditional formatting,\ndata validation, and the criteria in filters.", "type": "object", "properties": { "values": { @@ -1553,66 +2461,131 @@ "type": "string" } }, - "id": "BooleanCondition", - "description": "A condition that can evaluate to true or false.\nBooleanConditions are used by conditional formatting,\ndata validation, and the criteria in filters." + "id": "BooleanCondition" }, "Request": { + "description": "A single kind of update to apply to a spreadsheet.", + "type": "object", "properties": { + "updateBanding": { + "$ref": "UpdateBandingRequest", + "description": "Updates a banded range" + }, + "addProtectedRange": { + "description": "Adds a protected range.", + "$ref": "AddProtectedRangeRequest" + }, + "deleteNamedRange": { + "$ref": "DeleteNamedRangeRequest", + "description": "Deletes a named range." + }, + "duplicateSheet": { + "$ref": "DuplicateSheetRequest", + "description": "Duplicates a sheet." + }, + "deleteSheet": { + "description": "Deletes a sheet.", + "$ref": "DeleteSheetRequest" + }, + "unmergeCells": { + "$ref": "UnmergeCellsRequest", + "description": "Unmerges merged cells." + }, + "updateEmbeddedObjectPosition": { + "$ref": "UpdateEmbeddedObjectPositionRequest", + "description": "Updates an embedded object's (e.g. chart, image) position." + }, + "updateDimensionProperties": { + "description": "Updates dimensions' properties.", + "$ref": "UpdateDimensionPropertiesRequest" + }, + "updateDeveloperMetadata": { + "$ref": "UpdateDeveloperMetadataRequest", + "description": "Updates an existing developer metadata entry" + }, + "pasteData": { + "$ref": "PasteDataRequest", + "description": "Pastes data (HTML or delimited) into a sheet." + }, + "setBasicFilter": { + "$ref": "SetBasicFilterRequest", + "description": "Sets the basic filter on a sheet." + }, + "addConditionalFormatRule": { + "$ref": "AddConditionalFormatRuleRequest", + "description": "Adds a new conditional format rule." + }, + "addNamedRange": { + "$ref": "AddNamedRangeRequest", + "description": "Adds a named range." + }, + "updateCells": { + "$ref": "UpdateCellsRequest", + "description": "Updates many cells at once." + }, + "updateSpreadsheetProperties": { + "$ref": "UpdateSpreadsheetPropertiesRequest", + "description": "Updates the spreadsheet's properties." + }, + "deleteEmbeddedObject": { + "$ref": "DeleteEmbeddedObjectRequest", + "description": "Deletes an embedded object (e.g, chart, image) in a sheet." + }, "updateFilterView": { - "description": "Updates the properties of a filter view.", - "$ref": "UpdateFilterViewRequest" + "$ref": "UpdateFilterViewRequest", + "description": "Updates the properties of a filter view." }, "addBanding": { - "description": "Adds a new banded range", - "$ref": "AddBandingRequest" + "$ref": "AddBandingRequest", + "description": "Adds a new banded range" }, "autoResizeDimensions": { - "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", - "$ref": "AutoResizeDimensionsRequest" + "$ref": "AutoResizeDimensionsRequest", + "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension." }, "appendCells": { - "description": "Appends cells after the last row with data in a sheet.", - "$ref": "AppendCellsRequest" + "$ref": "AppendCellsRequest", + "description": "Appends cells after the last row with data in a sheet." }, "cutPaste": { "description": "Cuts data from one area and pastes it to another.", "$ref": "CutPasteRequest" }, "mergeCells": { - "$ref": "MergeCellsRequest", - "description": "Merges cells together." + "description": "Merges cells together.", + "$ref": "MergeCellsRequest" }, "updateNamedRange": { - "$ref": "UpdateNamedRangeRequest", - "description": "Updates a named range." + "description": "Updates a named range.", + "$ref": "UpdateNamedRangeRequest" }, "updateSheetProperties": { "description": "Updates a sheet's properties.", "$ref": "UpdateSheetPropertiesRequest" }, + "deleteDimension": { + "description": "Deletes rows or columns in a sheet.", + "$ref": "DeleteDimensionRequest" + }, "autoFill": { "description": "Automatically fills in more data based on existing data.", "$ref": "AutoFillRequest" }, - "deleteDimension": { - "$ref": "DeleteDimensionRequest", - "description": "Deletes rows or columns in a sheet." - }, "sortRange": { "$ref": "SortRangeRequest", "description": "Sorts data in a range." }, "deleteProtectedRange": { - "$ref": "DeleteProtectedRangeRequest", - "description": "Deletes a protected range." + "description": "Deletes a protected range.", + "$ref": "DeleteProtectedRangeRequest" }, "duplicateFilterView": { "$ref": "DuplicateFilterViewRequest", "description": "Duplicates a filter view." }, "addChart": { - "$ref": "AddChartRequest", - "description": "Adds a chart." + "description": "Adds a chart.", + "$ref": "AddChartRequest" }, "findReplace": { "$ref": "FindReplaceRequest", @@ -1623,20 +2596,20 @@ "description": "Updates a chart's specifications." }, "textToColumns": { - "$ref": "TextToColumnsRequest", - "description": "Converts a column of text into many columns of text." + "description": "Converts a column of text into many columns of text.", + "$ref": "TextToColumnsRequest" + }, + "addSheet": { + "description": "Adds a sheet.", + "$ref": "AddSheetRequest" }, "updateProtectedRange": { "description": "Updates a protected range.", "$ref": "UpdateProtectedRangeRequest" }, - "addSheet": { - "$ref": "AddSheetRequest", - "description": "Adds a sheet." - }, "deleteFilterView": { - "$ref": "DeleteFilterViewRequest", - "description": "Deletes a filter view from a sheet." + "description": "Deletes a filter view from a sheet.", + "$ref": "DeleteFilterViewRequest" }, "copyPaste": { "$ref": "CopyPasteRequest", @@ -1647,24 +2620,24 @@ "description": "Inserts new rows or columns in a sheet." }, "deleteRange": { - "description": "Deletes a range of cells from a sheet, shifting the remaining cells.", - "$ref": "DeleteRangeRequest" + "$ref": "DeleteRangeRequest", + "description": "Deletes a range of cells from a sheet, shifting the remaining cells." }, "deleteBanding": { - "$ref": "DeleteBandingRequest", - "description": "Removes a banded range" + "description": "Removes a banded range", + "$ref": "DeleteBandingRequest" }, "addFilterView": { "description": "Adds a filter view.", "$ref": "AddFilterViewRequest" }, "setDataValidation": { - "description": "Sets data validation for one or more cells.", - "$ref": "SetDataValidationRequest" + "$ref": "SetDataValidationRequest", + "description": "Sets data validation for one or more cells." }, "updateBorders": { - "description": "Updates the borders in a range of cells.", - "$ref": "UpdateBordersRequest" + "$ref": "UpdateBordersRequest", + "description": "Updates the borders in a range of cells." }, "deleteConditionalFormatRule": { "$ref": "DeleteConditionalFormatRuleRequest", @@ -1682,17 +2655,17 @@ "description": "Appends dimensions to the end of a sheet.", "$ref": "AppendDimensionRequest" }, + "createDeveloperMetadata": { + "$ref": "CreateDeveloperMetadataRequest", + "description": "Creates new developer metadata" + }, "updateConditionalFormatRule": { "$ref": "UpdateConditionalFormatRuleRequest", "description": "Updates an existing conditional format rule." }, - "createDeveloperMetadata": { - "description": "Creates new developer metadata", - "$ref": "CreateDeveloperMetadataRequest" - }, "insertRange": { - "$ref": "InsertRangeRequest", - "description": "Inserts new cells in a sheet, shifting the existing cells." + "description": "Inserts new cells in a sheet, shifting the existing cells.", + "$ref": "InsertRangeRequest" }, "moveDimension": { "$ref": "MoveDimensionRequest", @@ -1705,80 +2678,24 @@ "randomizeRange": { "description": "Randomizes the order of the rows in a range.", "$ref": "RandomizeRangeRequest" - }, - "updateBanding": { - "$ref": "UpdateBandingRequest", - "description": "Updates a banded range" - }, - "addProtectedRange": { - "description": "Adds a protected range.", - "$ref": "AddProtectedRangeRequest" - }, - "deleteNamedRange": { - "$ref": "DeleteNamedRangeRequest", - "description": "Deletes a named range." - }, - "duplicateSheet": { - "description": "Duplicates a sheet.", - "$ref": "DuplicateSheetRequest" - }, - "unmergeCells": { - "description": "Unmerges merged cells.", - "$ref": "UnmergeCellsRequest" - }, - "deleteSheet": { - "$ref": "DeleteSheetRequest", - "description": "Deletes a sheet." - }, - "updateEmbeddedObjectPosition": { - "description": "Updates an embedded object's (e.g. chart, image) position.", - "$ref": "UpdateEmbeddedObjectPositionRequest" - }, - "updateDeveloperMetadata": { - "$ref": "UpdateDeveloperMetadataRequest", - "description": "Updates an existing developer metadata entry" - }, - "updateDimensionProperties": { - "description": "Updates dimensions' properties.", - "$ref": "UpdateDimensionPropertiesRequest" - }, - "pasteData": { - "$ref": "PasteDataRequest", - "description": "Pastes data (HTML or delimited) into a sheet." - }, - "setBasicFilter": { - "description": "Sets the basic filter on a sheet.", - "$ref": "SetBasicFilterRequest" - }, - "addConditionalFormatRule": { - "$ref": "AddConditionalFormatRuleRequest", - "description": "Adds a new conditional format rule." - }, - "updateCells": { - "$ref": "UpdateCellsRequest", - "description": "Updates many cells at once." - }, - "addNamedRange": { - "description": "Adds a named range.", - "$ref": "AddNamedRangeRequest" - }, - "updateSpreadsheetProperties": { - "description": "Updates the spreadsheet's properties.", - "$ref": "UpdateSpreadsheetPropertiesRequest" - }, - "deleteEmbeddedObject": { - "$ref": "DeleteEmbeddedObjectRequest", - "description": "Deletes an embedded object (e.g, chart, image) in a sheet." } }, - "id": "Request", - "description": "A single kind of update to apply to a spreadsheet.", - "type": "object" + "id": "Request" }, "GridRange": { "description": "A range on a sheet.\nAll indexes are zero-based.\nIndexes are half open, e.g the start index is inclusive\nand the end index is exclusive -- [start_index, end_index).\nMissing indexes indicate the range is unbounded on that side.\n\nFor example, if `\"Sheet1\"` is sheet ID 0, then:\n\n `Sheet1!A1:A1 == sheet_id: 0,\n start_row_index: 0, end_row_index: 1,\n start_column_index: 0, end_column_index: 1`\n\n `Sheet1!A3:B4 == sheet_id: 0,\n start_row_index: 2, end_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A:B == sheet_id: 0,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1!A5:B == sheet_id: 0,\n start_row_index: 4,\n start_column_index: 0, end_column_index: 2`\n\n `Sheet1 == sheet_id:0`\n\nThe start index must always be less than or equal to the end index.\nIf the start index equals the end index, then the range is empty.\nEmpty ranges are typically not meaningful and are usually rendered in the\nUI as `#REF!`.", "type": "object", "properties": { + "startColumnIndex": { + "format": "int32", + "description": "The start column (inclusive) of the range, or not set if unbounded.", + "type": "integer" + }, + "sheetId": { + "format": "int32", + "description": "The sheet this range is on.", + "type": "integer" + }, "endColumnIndex": { "format": "int32", "description": "The end column (exclusive) of the range, or not set if unbounded.", @@ -1793,16 +2710,6 @@ "format": "int32", "description": "The start row (inclusive) of the range, or not set if unbounded.", "type": "integer" - }, - "startColumnIndex": { - "format": "int32", - "description": "The start column (inclusive) of the range, or not set if unbounded.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The sheet this range is on.", - "type": "integer" } }, "id": "GridRange" @@ -1811,13 +2718,6 @@ "description": "The specification for a basic chart. See BasicChartType for the list\nof charts this supports.", "type": "object", "properties": { - "domains": { - "items": { - "$ref": "BasicChartDomain" - }, - "type": "array", - "description": "The domain of data this is charting.\nOnly a single domain is supported." - }, "lineSmoothing": { "description": "Gets whether all lines should be rendered smooth or straight by default.\nApplies to Line charts.", "type": "boolean" @@ -1828,6 +2728,8 @@ "type": "integer" }, "stackedType": { + "description": "The stacked type for charts that support vertical stacking.\nApplies to Area, Bar, Column, and Stepped Area charts.", + "type": "string", "enumDescriptions": [ "Default value, do not use.", "Series are not stacked.", @@ -1839,9 +2741,7 @@ "NOT_STACKED", "STACKED", "PERCENT_STACKED" - ], - "description": "The stacked type for charts that support vertical stacking.\nApplies to Area, Bar, Column, and Stepped Area charts.", - "type": "string" + ] }, "axis": { "description": "The axis on the chart.", @@ -1854,10 +2754,6 @@ "description": "True to make the chart 3D.\nApplies to Bar and Column charts.", "type": "boolean" }, - "interpolateNulls": { - "description": "If some values in a series are missing, gaps may appear in the chart (e.g,\nsegments of lines in a line chart will be missing). To eliminate these\ngaps set this to true.\nApplies to Line, Area, and Combo charts.", - "type": "boolean" - }, "chartType": { "description": "The type of the chart.", "type": "string", @@ -1882,6 +2778,10 @@ "STEPPED_AREA" ] }, + "interpolateNulls": { + "description": "If some values in a series are missing, gaps may appear in the chart (e.g,\nsegments of lines in a line chart will be missing). To eliminate these\ngaps set this to true.\nApplies to Line, Area, and Combo charts.", + "type": "boolean" + }, "series": { "description": "The data this chart is visualizing.", "items": { @@ -1890,6 +2790,14 @@ "type": "array" }, "legendPosition": { + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered." + ], "enum": [ "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED", "BOTTOM_LEGEND", @@ -1899,15 +2807,14 @@ "NO_LEGEND" ], "description": "The position of the chart legend.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered." - ] + "type": "string" + }, + "domains": { + "description": "The domain of data this is charting.\nOnly a single domain is supported.", + "items": { + "$ref": "BasicChartDomain" + }, + "type": "array" } }, "id": "BasicChartSpec" @@ -1917,33 +2824,62 @@ "type": "object", "properties": { "rule": { - "$ref": "DataValidationRule", - "description": "The data validation rule to set on each cell in the range,\nor empty to clear the data validation in the range." + "description": "The data validation rule to set on each cell in the range,\nor empty to clear the data validation in the range.", + "$ref": "DataValidationRule" }, "range": { - "$ref": "GridRange", - "description": "The range the data validation rule should apply to." + "description": "The range the data validation rule should apply to.", + "$ref": "GridRange" } }, "id": "SetDataValidationRequest" }, "BubbleChartSpec": { - "description": "A \u003ca href=\"/chart/interactive/docs/gallery/bubblechart\"\u003ebubble chart\u003c/a\u003e.", - "type": "object", "properties": { + "bubbleMaxRadiusSize": { + "format": "int32", + "description": "The max radius size of the bubbles, in pixels.\nIf specified, the field must be a positive value.", + "type": "integer" + }, + "series": { + "description": "The data contianing the bubble y-values. These values locate the bubbles\nin the chart vertically.", + "$ref": "ChartData" + }, + "legendPosition": { + "enum": [ + "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED", + "BOTTOM_LEGEND", + "LEFT_LEGEND", + "RIGHT_LEGEND", + "TOP_LEGEND", + "NO_LEGEND", + "INSIDE_LEGEND" + ], + "description": "Where the legend of the chart should be drawn.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The legend is rendered on the bottom of the chart.", + "The legend is rendered on the left of the chart.", + "The legend is rendered on the right of the chart.", + "The legend is rendered on the top of the chart.", + "No legend is rendered.", + "The legend is rendered inside the chart area." + ] + }, "bubbleOpacity": { "format": "float", "description": "The opacity of the bubbles between 0 and 1.0.\n0 is fully transparent and 1 is fully opaque.", "type": "number" }, + "domain": { + "description": "The data containing the bubble x-values. These values locate the bubbles\nin the chart horizontally.", + "$ref": "ChartData" + }, "bubbleSizes": { "description": "The data contianing the bubble sizes. Bubble sizes are used to draw\nthe bubbles at different sizes relative to each other.\nIf specified, group_ids must also be specified. This field is\noptional.", "$ref": "ChartData" }, - "domain": { - "$ref": "ChartData", - "description": "The data containing the bubble x-values. These values locate the bubbles\nin the chart horizontally." - }, "bubbleTextStyle": { "$ref": "TextFormat", "description": "The format of the text inside the bubbles.\nUnderline and Strikethrough are not supported." @@ -1964,85 +2900,56 @@ "format": "int32", "description": "The minimum radius size of the bubbles, in pixels.\nIf specific, the field must be a positive value.", "type": "integer" - }, - "bubbleMaxRadiusSize": { - "format": "int32", - "description": "The max radius size of the bubbles, in pixels.\nIf specified, the field must be a positive value.", - "type": "integer" - }, - "series": { - "$ref": "ChartData", - "description": "The data contianing the bubble y-values. These values locate the bubbles\nin the chart vertically." - }, - "legendPosition": { - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The legend is rendered on the bottom of the chart.", - "The legend is rendered on the left of the chart.", - "The legend is rendered on the right of the chart.", - "The legend is rendered on the top of the chart.", - "No legend is rendered.", - "The legend is rendered inside the chart area." - ], - "enum": [ - "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED", - "BOTTOM_LEGEND", - "LEFT_LEGEND", - "RIGHT_LEGEND", - "TOP_LEGEND", - "NO_LEGEND", - "INSIDE_LEGEND" - ], - "description": "Where the legend of the chart should be drawn." } }, - "id": "BubbleChartSpec" + "id": "BubbleChartSpec", + "description": "A \u003ca href=\"/chart/interactive/docs/gallery/bubblechart\"\u003ebubble chart\u003c/a\u003e.", + "type": "object" }, "CellData": { "properties": { - "pivotTable": { - "$ref": "PivotTable", - "description": "A pivot table anchored at this cell. The size of pivot table itself\nis computed dynamically based on its data, grouping, filters, values,\netc. Only the top-left cell of the pivot table contains the pivot table\ndefinition. The other cells will contain the calculated values of the\nresults of the pivot in their effective_value fields." - }, - "userEnteredFormat": { - "$ref": "CellFormat", - "description": "The format the user entered for the cell.\n\nWhen writing, the new format will be merged with the existing format." - }, - "effectiveFormat": { - "$ref": "CellFormat", - "description": "The effective format being used by the cell.\nThis includes the results of applying any conditional formatting and,\nif the cell contains a formula, the computed number format.\nIf the effective format is the default format, effective format will\nnot be written.\nThis field is read-only." - }, - "note": { - "description": "Any note on the cell.", - "type": "string" + "dataValidation": { + "$ref": "DataValidationRule", + "description": "A data validation rule on the cell, if any.\n\nWhen writing, the new data validation rule will overwrite any prior rule." }, "userEnteredValue": { "$ref": "ExtendedValue", "description": "The value the user entered in the cell. e.g, `1234`, `'Hello'`, or `=NOW()`\nNote: Dates, Times and DateTimes are represented as doubles in\nserial number format." }, - "dataValidation": { - "$ref": "DataValidationRule", - "description": "A data validation rule on the cell, if any.\n\nWhen writing, the new data validation rule will overwrite any prior rule." - }, "effectiveValue": { "description": "The effective value of the cell. For cells with formulas, this will be\nthe calculated value. For cells with literals, this will be\nthe same as the user_entered_value.\nThis field is read-only.", "$ref": "ExtendedValue" }, + "textFormatRuns": { + "description": "Runs of rich text applied to subsections of the cell. Runs are only valid\non user entered strings, not formulas, bools, or numbers.\nRuns start at specific indexes in the text and continue until the next\nrun. Properties of a run will continue unless explicitly changed\nin a subsequent run (and properties of the first run will continue\nthe properties of the cell unless explicitly changed).\n\nWhen writing, the new runs will overwrite any prior runs. When writing a\nnew user_entered_value, previous runs will be erased.", + "items": { + "$ref": "TextFormatRun" + }, + "type": "array" + }, "formattedValue": { "description": "The formatted value of the cell.\nThis is the value as it's shown to the user.\nThis field is read-only.", "type": "string" }, - "textFormatRuns": { - "items": { - "$ref": "TextFormatRun" - }, - "type": "array", - "description": "Runs of rich text applied to subsections of the cell. Runs are only valid\non user entered strings, not formulas, bools, or numbers.\nRuns start at specific indexes in the text and continue until the next\nrun. Properties of a run will continue unless explicitly changed\nin a subsequent run (and properties of the first run will continue\nthe properties of the cell unless explicitly changed).\n\nWhen writing, the new runs will overwrite any prior runs. When writing a\nnew user_entered_value, previous runs will be erased." - }, "hyperlink": { "description": "A hyperlink this cell points to, if any.\nThis field is read-only. (To set it, use a `=HYPERLINK` formula\nin the userEnteredValue.formulaValue\nfield.)", "type": "string" + }, + "pivotTable": { + "$ref": "PivotTable", + "description": "A pivot table anchored at this cell. The size of pivot table itself\nis computed dynamically based on its data, grouping, filters, values,\netc. Only the top-left cell of the pivot table contains the pivot table\ndefinition. The other cells will contain the calculated values of the\nresults of the pivot in their effective_value fields." + }, + "userEnteredFormat": { + "description": "The format the user entered for the cell.\n\nWhen writing, the new format will be merged with the existing format.", + "$ref": "CellFormat" + }, + "note": { + "description": "Any note on the cell.", + "type": "string" + }, + "effectiveFormat": { + "description": "The effective format being used by the cell.\nThis includes the results of applying any conditional formatting and,\nif the cell contains a formula, the computed number format.\nIf the effective format is the default format, effective format will\nnot be written.\nThis field is read-only.", + "$ref": "CellFormat" } }, "id": "CellData", @@ -2053,19 +2960,9 @@ "description": "The request for updating more than one range of values in a spreadsheet.", "type": "object", "properties": { - "responseDateTimeRenderOption": { - "enumDescriptions": [ - "Instructs date, time, datetime, and duration fields to be output\nas doubles in \"serial number\" format, as popularized by Lotus 1-2-3.\nThe whole number portion of the value (left of the decimal) counts\nthe days since December 30th 1899. The fractional portion (right of\nthe decimal) counts the time as a fraction of the day. For example,\nJanuary 1st 1900 at noon would be 2.5, 2 because it's 2 days after\nDecember 30st 1899, and .5 because noon is half a day. February 1st\n1900 at 3pm would be 33.625. This correctly treats the year 1900 as\nnot a leap year.", - "Instructs date, time, datetime, and duration fields to be output\nas strings in their given number format (which is dependent\non the spreadsheet locale)." - ], - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" - ], - "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is\nDateTimeRenderOption.SERIAL_NUMBER.", - "type": "string" - }, "responseValueRenderOption": { + "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string", "enumDescriptions": [ "Values will be calculated & formatted in the reply according to the\ncell's formatting. Formatting is based on the spreadsheet's locale,\nnot the requesting user's locale.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return `\"$1.23\"`.", "Values will be calculated, but not formatted in the reply.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return the number `1.23`.", @@ -2075,9 +2972,7 @@ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" - ], - "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", - "type": "string" + ] }, "includeValuesInResponse": { "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values. The `updatedData` field within\neach of the BatchUpdateValuesResponse.responses will contain\nthe updated values. If the range to write was larger than than the range\nactually written, the response will include all values in the requested\nrange (excluding trailing empty rows and columns).", @@ -2103,24 +2998,27 @@ ], "description": "How the input data should be interpreted.", "type": "string" + }, + "responseDateTimeRenderOption": { + "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is\nDateTimeRenderOption.SERIAL_NUMBER.", + "type": "string", + "enumDescriptions": [ + "Instructs date, time, datetime, and duration fields to be output\nas doubles in \"serial number\" format, as popularized by Lotus 1-2-3.\nThe whole number portion of the value (left of the decimal) counts\nthe days since December 30th 1899. The fractional portion (right of\nthe decimal) counts the time as a fraction of the day. For example,\nJanuary 1st 1900 at noon would be 2.5, 2 because it's 2 days after\nDecember 30st 1899, and .5 because noon is half a day. February 1st\n1900 at 3pm would be 33.625. This correctly treats the year 1900 as\nnot a leap year.", + "Instructs date, time, datetime, and duration fields to be output\nas strings in their given number format (which is dependent\non the spreadsheet locale)." + ], + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ] } }, "id": "BatchUpdateValuesByDataFilterRequest" }, "BatchUpdateSpreadsheetRequest": { - "description": "The request for updating any aspect of a spreadsheet.", - "type": "object", "properties": { - "requests": { - "description": "A list of updates to apply to the spreadsheet.\nRequests will be applied in the order they are specified.\nIf any request is not valid, no requests will be applied.", - "items": { - "$ref": "Request" - }, - "type": "array" - }, "responseIncludeGridData": { - "type": "boolean", - "description": "True if grid data should be returned. Meaningful only if\nif include_spreadsheet_response is 'true'.\nThis parameter is ignored if a field mask was set in the request." + "description": "True if grid data should be returned. Meaningful only if\nif include_spreadsheet_response is 'true'.\nThis parameter is ignored if a field mask was set in the request.", + "type": "boolean" }, "responseRanges": { "description": "Limits the ranges included in the response spreadsheet.\nMeaningful only if include_spreadsheet_response is 'true'.", @@ -2132,56 +3030,28 @@ "includeSpreadsheetInResponse": { "description": "Determines if the update response should include the spreadsheet\nresource.", "type": "boolean" + }, + "requests": { + "description": "A list of updates to apply to the spreadsheet.\nRequests will be applied in the order they are specified.\nIf any request is not valid, no requests will be applied.", + "items": { + "$ref": "Request" + }, + "type": "array" } }, - "id": "BatchUpdateSpreadsheetRequest" - }, - "Padding": { - "description": "The amount of padding around the cell, in pixels.\nWhen updating padding, every field must be specified.", - "type": "object", - "properties": { - "bottom": { - "format": "int32", - "description": "The bottom padding of the cell.", - "type": "integer" - }, - "top": { - "type": "integer", - "format": "int32", - "description": "The top padding of the cell." - }, - "left": { - "format": "int32", - "description": "The left padding of the cell.", - "type": "integer" - }, - "right": { - "format": "int32", - "description": "The right padding of the cell.", - "type": "integer" - } - }, - "id": "Padding" + "id": "BatchUpdateSpreadsheetRequest", + "description": "The request for updating any aspect of a spreadsheet.", + "type": "object" }, "BasicChartAxis": { "description": "An axis of the chart.\nA chart may not have more than one axis per\naxis position.", "type": "object", "properties": { - "format": { - "description": "The format of the title.\nOnly valid if the axis is not associated with the domain.", - "$ref": "TextFormat" - }, "title": { "description": "The title of this axis. If set, this overrides any title inferred\nfrom headers of the data.", "type": "string" }, "position": { - "enumDescriptions": [ - "Default value, do not use.", - "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", - "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", - "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." - ], "enum": [ "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", "BOTTOM_AXIS", @@ -2189,34 +3059,71 @@ "RIGHT_AXIS" ], "description": "The position of this axis.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", + "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", + "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." + ] + }, + "format": { + "description": "The format of the title.\nOnly valid if the axis is not associated with the domain.", + "$ref": "TextFormat" } }, "id": "BasicChartAxis" }, + "Padding": { + "description": "The amount of padding around the cell, in pixels.\nWhen updating padding, every field must be specified.", + "type": "object", + "properties": { + "right": { + "format": "int32", + "description": "The right padding of the cell.", + "type": "integer" + }, + "bottom": { + "format": "int32", + "description": "The bottom padding of the cell.", + "type": "integer" + }, + "top": { + "format": "int32", + "description": "The top padding of the cell.", + "type": "integer" + }, + "left": { + "format": "int32", + "description": "The left padding of the cell.", + "type": "integer" + } + }, + "id": "Padding" + }, "DeleteDimensionRequest": { + "description": "Deletes the dimensions from the sheet.", "type": "object", "properties": { "range": { - "$ref": "DimensionRange", - "description": "The dimensions to delete from the sheet." + "description": "The dimensions to delete from the sheet.", + "$ref": "DimensionRange" } }, - "id": "DeleteDimensionRequest", - "description": "Deletes the dimensions from the sheet." + "id": "DeleteDimensionRequest" }, "UpdateChartSpecRequest": { "description": "Updates a chart's specifications.\n(This does not move or resize a chart. To move or resize a chart, use\n UpdateEmbeddedObjectPositionRequest.)", "type": "object", "properties": { "chartId": { - "type": "integer", "format": "int32", - "description": "The ID of the chart to update." + "description": "The ID of the chart to update.", + "type": "integer" }, "spec": { - "description": "The specification to apply to the chart.", - "$ref": "ChartSpec" + "$ref": "ChartSpec", + "description": "The specification to apply to the chart." } }, "id": "UpdateChartSpecRequest" @@ -2233,38 +3140,10 @@ }, "id": "DeleteFilterViewRequest" }, - "DeleteDeveloperMetadataResponse": { - "description": "The response from deleting developer metadata.", - "type": "object", - "properties": { - "deletedDeveloperMetadata": { - "description": "The metadata that was deleted.", - "items": { - "$ref": "DeveloperMetadata" - }, - "type": "array" - } - }, - "id": "DeleteDeveloperMetadataResponse" - }, "BatchGetValuesByDataFilterRequest": { "description": "The request for retrieving a range of values in a spreadsheet selected by a\nset of DataFilters.", "type": "object", "properties": { - "majorDimension": { - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen a request that selects that range and sets `majorDimension=ROWS` will\nreturn `[[1,2],[3,4]]`,\nwhereas a request that sets `majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", - "type": "string", - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ] - }, "dataFilters": { "description": "The data filters used to match the ranges of values to retrieve. Ranges\nthat match any of the specified data filters will be included in the\nresponse.", "items": { @@ -2285,45 +3164,52 @@ "type": "string" }, "valueRenderOption": { + "enumDescriptions": [ + "Values will be calculated & formatted in the reply according to the\ncell's formatting. Formatting is based on the spreadsheet's locale,\nnot the requesting user's locale.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return `\"$1.23\"`.", + "Values will be calculated, but not formatted in the reply.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return the number `1.23`.", + "Values will not be calculated. The reply will include the formulas.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen A2 would return `\"=A1\"`." + ], "enum": [ "FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA" ], "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", + "type": "string" + }, + "majorDimension": { + "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen a request that selects that range and sets `majorDimension=ROWS` will\nreturn `[[1,2],[3,4]]`,\nwhereas a request that sets `majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", "type": "string", "enumDescriptions": [ - "Values will be calculated & formatted in the reply according to the\ncell's formatting. Formatting is based on the spreadsheet's locale,\nnot the requesting user's locale.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return `\"$1.23\"`.", - "Values will be calculated, but not formatted in the reply.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return the number `1.23`.", - "Values will not be calculated. The reply will include the formulas.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen A2 would return `\"=A1\"`." + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ], + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" ] } }, "id": "BatchGetValuesByDataFilterRequest" }, - "BatchUpdateValuesResponse": { - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", + "DeleteDeveloperMetadataResponse": { + "properties": { + "deletedDeveloperMetadata": { + "description": "The metadata that was deleted.", + "items": { + "$ref": "DeveloperMetadata" + }, + "type": "array" + } + }, + "id": "DeleteDeveloperMetadataResponse", + "description": "The response from deleting developer metadata.", + "type": "object" + }, + "BatchUpdateValuesResponse": { "properties": { - "totalUpdatedCells": { - "format": "int32", - "description": "The total number of cells updated.", - "type": "integer" - }, - "totalUpdatedColumns": { - "type": "integer", - "format": "int32", - "description": "The total number of columns where at least one cell in the column was\nupdated." - }, - "spreadsheetId": { - "type": "string", - "description": "The spreadsheet the updates were applied to." - }, - "totalUpdatedRows": { - "format": "int32", - "description": "The total number of rows where at least one cell in the row was updated.", - "type": "integer" - }, "responses": { "description": "One UpdateValuesResponse per requested range, in the same order as\nthe requests appeared.", "items": { @@ -2335,17 +3221,38 @@ "format": "int32", "description": "The total number of sheets where at least one cell in the sheet was\nupdated.", "type": "integer" + }, + "totalUpdatedCells": { + "format": "int32", + "description": "The total number of cells updated.", + "type": "integer" + }, + "totalUpdatedColumns": { + "format": "int32", + "description": "The total number of columns where at least one cell in the column was\nupdated.", + "type": "integer" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + }, + "totalUpdatedRows": { + "format": "int32", + "description": "The total number of rows where at least one cell in the row was updated.", + "type": "integer" } }, - "id": "BatchUpdateValuesResponse" + "id": "BatchUpdateValuesResponse", + "description": "The response when updating a range of values in a spreadsheet.", + "type": "object" }, "SortRangeRequest": { "description": "Sorts data in rows based on a sort order per column.", "type": "object", "properties": { "range": { - "$ref": "GridRange", - "description": "The range to sort." + "description": "The range to sort.", + "$ref": "GridRange" }, "sortSpecs": { "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", @@ -2358,12 +3265,8 @@ "id": "SortRangeRequest" }, "MergeCellsRequest": { - "description": "Merges all cells in the range.", - "type": "object", "properties": { "mergeType": { - "description": "How the cells should be merged.", - "type": "string", "enumDescriptions": [ "Create a single merge from the range", "Create a merge for each column in the range", @@ -2373,29 +3276,33 @@ "MERGE_ALL", "MERGE_COLUMNS", "MERGE_ROWS" - ] + ], + "description": "How the cells should be merged.", + "type": "string" }, "range": { "$ref": "GridRange", "description": "The range of cells to merge." } }, - "id": "MergeCellsRequest" + "id": "MergeCellsRequest", + "description": "Merges all cells in the range.", + "type": "object" }, "MatchedDeveloperMetadata": { "description": "A developer metadata entry and the data filters specified in the original\nrequest that matched it.", "type": "object", "properties": { - "developerMetadata": { - "description": "The developer metadata matching the specified filters.", - "$ref": "DeveloperMetadata" - }, "dataFilters": { + "description": "All filters matching the returned developer metadata.", "items": { "$ref": "DataFilter" }, - "type": "array", - "description": "All filters matching the returned developer metadata." + "type": "array" + }, + "developerMetadata": { + "description": "The developer metadata matching the specified filters.", + "$ref": "DeveloperMetadata" } }, "id": "MatchedDeveloperMetadata" @@ -2405,14 +3312,13 @@ "type": "object", "properties": { "protectedRange": { - "description": "The protected range to be added. The\nprotectedRangeId field is optional; if\none is not set, an id will be randomly generated. (It is an error to\nspecify the ID of a range that already exists.)", - "$ref": "ProtectedRange" + "$ref": "ProtectedRange", + "description": "The protected range to be added. The\nprotectedRangeId field is optional; if\none is not set, an id will be randomly generated. (It is an error to\nspecify the ID of a range that already exists.)" } }, "id": "AddProtectedRangeRequest" }, "BatchClearValuesRequest": { - "type": "object", "properties": { "ranges": { "description": "The ranges to clear, in A1 notation.", @@ -2423,35 +3329,27 @@ } }, "id": "BatchClearValuesRequest", - "description": "The request for clearing more than one range of values in a spreadsheet." + "description": "The request for clearing more than one range of values in a spreadsheet.", + "type": "object" }, "DuplicateFilterViewResponse": { - "description": "The result of a filter view being duplicated.", - "type": "object", "properties": { "filter": { "$ref": "FilterView", "description": "The newly created filter." } }, - "id": "DuplicateFilterViewResponse" + "id": "DuplicateFilterViewResponse", + "description": "The result of a filter view being duplicated.", + "type": "object" }, "DeveloperMetadata": { - "id": "DeveloperMetadata", - "description": "Developer metadata associated with a location or object in a spreadsheet.\nDeveloper metadata may be used to associate arbitrary data with various\nparts of a spreadsheet and will remain associated at those locations as they\nmove around and the spreadsheet is edited. For example, if developer\nmetadata is associated with row 5 and another row is then subsequently\ninserted above row 5, that original metadata will still be associated with\nthe row it was first associated with (what is now row 6). If the associated\nobject is deleted its metadata will be deleted too.", - "type": "object", "properties": { - "metadataValue": { - "description": "Data associated with the metadata's key.", - "type": "string" - }, "metadataKey": { "description": "The metadata key. There may be multiple metadata in a spreadsheet with the\nsame key. Developer metadata must always have a key specified.", "type": "string" }, "visibility": { - "description": "The metadata visibility. Developer metadata must always have a visibility\nspecified.", - "type": "string", "enumDescriptions": [ "Default value.", "Document-visible metadata is accessible from any developer project with\naccess to the document.", @@ -2461,18 +3359,27 @@ "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED", "DOCUMENT", "PROJECT" - ] + ], + "description": "The metadata visibility. Developer metadata must always have a visibility\nspecified.", + "type": "string" }, "location": { - "description": "The location where the metadata is associated.", - "$ref": "DeveloperMetadataLocation" + "$ref": "DeveloperMetadataLocation", + "description": "The location where the metadata is associated." }, "metadataId": { "format": "int32", "description": "The spreadsheet-scoped unique ID that identifies the metadata. IDs may be\nspecified when metadata is created, otherwise one will be randomly\ngenerated and assigned. Must be positive.", "type": "integer" + }, + "metadataValue": { + "description": "Data associated with the metadata's key.", + "type": "string" } - } + }, + "id": "DeveloperMetadata", + "description": "Developer metadata associated with a location or object in a spreadsheet.\nDeveloper metadata may be used to associate arbitrary data with various\nparts of a spreadsheet and will remain associated at those locations as they\nmove around and the spreadsheet is edited. For example, if developer\nmetadata is associated with row 5 and another row is then subsequently\ninserted above row 5, that original metadata will still be associated with\nthe row it was first associated with (what is now row 6). If the associated\nobject is deleted its metadata will be deleted too.", + "type": "object" }, "DuplicateSheetResponse": { "description": "The result of duplicating a sheet.", @@ -2486,6 +3393,7 @@ "id": "DuplicateSheetResponse" }, "TextToColumnsRequest": { + "description": "Splits a column of text into multiple columns,\nbased on a delimiter in each cell.", "type": "object", "properties": { "delimiter": { @@ -2493,6 +3401,8 @@ "type": "string" }, "delimiterType": { + "description": "The delimiter type to use.", + "type": "string", "enumDescriptions": [ "Default value. This value must not be used.", "\",\"", @@ -2508,17 +3418,14 @@ "PERIOD", "SPACE", "CUSTOM" - ], - "description": "The delimiter type to use.", - "type": "string" + ] }, "source": { "description": "The source data range. This must span exactly one column.", "$ref": "GridRange" } }, - "id": "TextToColumnsRequest", - "description": "Splits a column of text into multiple columns,\nbased on a delimiter in each cell." + "id": "TextToColumnsRequest" }, "ClearBasicFilterRequest": { "description": "Clears the basic filter, if any exists on the sheet.", @@ -2533,6 +3440,7 @@ "id": "ClearBasicFilterRequest" }, "BatchUpdateSpreadsheetResponse": { + "description": "The reply for batch updating a spreadsheet.", "type": "object", "properties": { "updatedSpreadsheet": { @@ -2551,12 +3459,9 @@ "type": "string" } }, - "id": "BatchUpdateSpreadsheetResponse", - "description": "The reply for batch updating a spreadsheet." + "id": "BatchUpdateSpreadsheetResponse" }, "DeleteBandingRequest": { - "description": "Removes the banded range with the given ID from the spreadsheet.", - "type": "object", "properties": { "bandedRangeId": { "format": "int32", @@ -2564,23 +3469,25 @@ "type": "integer" } }, - "id": "DeleteBandingRequest" + "id": "DeleteBandingRequest", + "description": "Removes the banded range with the given ID from the spreadsheet.", + "type": "object" }, "AppendValuesResponse": { "description": "The response when updating a range of values in a spreadsheet.", "type": "object", "properties": { - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - }, "updates": { - "$ref": "UpdateValuesResponse", - "description": "Information about the updates that were applied." + "description": "Information about the updates that were applied.", + "$ref": "UpdateValuesResponse" }, "tableRange": { "description": "The range (in A1 notation) of the table that values are being appended to\n(before the values were appended).\nEmpty if no table was found.", "type": "string" + }, + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" } }, "id": "AppendValuesResponse" @@ -2595,8 +3502,8 @@ "type": "integer" }, "source": { - "description": "The source dimensions to move.", - "$ref": "DimensionRange" + "$ref": "DimensionRange", + "description": "The source dimensions to move." } }, "id": "MoveDimensionRequest" @@ -2606,15 +3513,13 @@ "type": "object", "properties": { "filter": { - "$ref": "FilterView", - "description": "The filter to add. The filterViewId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a filter that already exists.)" + "description": "The filter to add. The filterViewId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a filter that already exists.)", + "$ref": "FilterView" } }, "id": "AddFilterViewRequest" }, "PivotFilterCriteria": { - "description": "Criteria for showing/hiding rows in a pivot table.", - "type": "object", "properties": { "visibleValues": { "description": "Values that should be included. Values not listed here are excluded.", @@ -2624,7 +3529,9 @@ "type": "array" } }, - "id": "PivotFilterCriteria" + "id": "PivotFilterCriteria", + "description": "Criteria for showing/hiding rows in a pivot table.", + "type": "object" }, "AddConditionalFormatRuleRequest": { "description": "Adds a new conditional format rule at the given index.\nAll subsequent rules' indexes are incremented.", @@ -2642,42 +3549,36 @@ }, "id": "AddConditionalFormatRuleRequest" }, + "CreateDeveloperMetadataRequest": { + "description": "A request to create developer metadata.", + "type": "object", + "properties": { + "developerMetadata": { + "$ref": "DeveloperMetadata", + "description": "The developer metadata to create." + } + }, + "id": "CreateDeveloperMetadataRequest" + }, "ChartSpec": { - "id": "ChartSpec", "description": "The specifications of a chart.", "type": "object", "properties": { - "orgChart": { - "$ref": "OrgChartSpec", - "description": "An org chart specification." - }, - "pieChart": { - "$ref": "PieChartSpec", - "description": "A pie chart specification." - }, - "titleTextFormat": { - "description": "The title text format.\nStrikethrough and underline are not supported.", - "$ref": "TextFormat" - }, - "title": { - "description": "The title of the chart.", - "type": "string" - }, "altText": { "description": "The alternative text that describes the chart. This is often used\nfor accessibility.", "type": "string" }, "histogramChart": { - "description": "A histogram chart specification.", - "$ref": "HistogramChartSpec" + "$ref": "HistogramChartSpec", + "description": "A histogram chart specification." }, "candlestickChart": { - "description": "A candlestick chart specification.", - "$ref": "CandlestickChartSpec" + "$ref": "CandlestickChartSpec", + "description": "A candlestick chart specification." }, "bubbleChart": { - "description": "A bubble chart specification.", - "$ref": "BubbleChartSpec" + "$ref": "BubbleChartSpec", + "description": "A bubble chart specification." }, "fontName": { "description": "The name of the font to use by default for all chart text (e.g. title,\naxis labels, legend). If a font is specified for a specific part of the\nchart it will override this font name.", @@ -2688,13 +3589,6 @@ "type": "boolean" }, "hiddenDimensionStrategy": { - "enumDescriptions": [ - "Default value, do not use.", - "Charts will skip hidden rows and columns.", - "Charts will skip hidden rows only.", - "Charts will skip hidden columns only.", - "Charts will not skip any hidden rows or columns." - ], "enum": [ "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED", "SKIP_HIDDEN_ROWS_AND_COLUMNS", @@ -2703,7 +3597,14 @@ "SHOW_ALL" ], "description": "Determines how the charts will use hidden rows or columns.", - "type": "string" + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "Charts will skip hidden rows and columns.", + "Charts will skip hidden rows only.", + "Charts will skip hidden columns only.", + "Charts will not skip any hidden rows or columns." + ] }, "backgroundColor": { "description": "The background color of the entire chart.\nNot applicable to Org charts.", @@ -2712,30 +3613,36 @@ "basicChart": { "description": "A basic chart specification, can be one of many kinds of charts.\nSee BasicChartType for the list of all\ncharts this supports.", "$ref": "BasicChartSpec" - } - } - }, - "CreateDeveloperMetadataRequest": { - "properties": { - "developerMetadata": { - "description": "The developer metadata to create.", - "$ref": "DeveloperMetadata" + }, + "orgChart": { + "$ref": "OrgChartSpec", + "description": "An org chart specification." + }, + "pieChart": { + "description": "A pie chart specification.", + "$ref": "PieChartSpec" + }, + "titleTextFormat": { + "$ref": "TextFormat", + "description": "The title text format.\nStrikethrough and underline are not supported." + }, + "title": { + "description": "The title of the chart.", + "type": "string" } }, - "id": "CreateDeveloperMetadataRequest", - "description": "A request to create developer metadata.", - "type": "object" + "id": "ChartSpec" }, "BatchGetValuesByDataFilterResponse": { "description": "The response when retrieving more than one range of values in a spreadsheet\nselected by DataFilters.", "type": "object", "properties": { "valueRanges": { + "description": "The requested values with the list of data filters that matched them.", "items": { "$ref": "MatchedValueRange" }, - "type": "array", - "description": "The requested values with the list of data filters that matched them." + "type": "array" }, "spreadsheetId": { "description": "The ID of the spreadsheet the data was retrieved from.", @@ -2745,13 +3652,8 @@ "id": "BatchGetValuesByDataFilterResponse" }, "NumberFormat": { - "id": "NumberFormat", - "description": "The number format of a cell.", - "type": "object", "properties": { "type": { - "description": "The type of the number format.\nWhen writing, this field must be set.", - "type": "string", "enumDescriptions": [ "The number format is not specified\nand is based on the contents of the cell.\nDo not explicitly use this.", "Text formatting, e.g `1000.12`", @@ -2773,13 +3675,18 @@ "TIME", "DATE_TIME", "SCIENTIFIC" - ] + ], + "description": "The type of the number format.\nWhen writing, this field must be set.", + "type": "string" }, "pattern": { "description": "Pattern string used for formatting. If not set, a default pattern based on\nthe user's locale will be used if necessary for the given type.\nSee the [Date and Number Formats guide](/sheets/api/guides/formats) for more\ninformation about the supported patterns.", "type": "string" } - } + }, + "id": "NumberFormat", + "description": "The number format of a cell.", + "type": "object" }, "DataFilterValueRange": { "description": "A range of values whose location is specified by a DataFilter.", @@ -2790,14 +3697,14 @@ "description": "The data filter describing the location of the values in the spreadsheet." }, "values": { + "description": "The data to be written. If the provided values exceed any of the ranges\nmatched by the data filter then the request will fail. If the provided\nvalues are less than the matched ranges only the specified values will be\nwritten, existing values in the matched ranges will remain unaffected.", "items": { "items": { "type": "any" }, "type": "array" }, - "type": "array", - "description": "The data to be written. If the provided values exceed any of the ranges\nmatched by the data filter then the request will fail. If the provided\nvalues are less than the matched ranges only the specified values will be\nwritten, existing values in the matched ranges will remain unaffected." + "type": "array" }, "majorDimension": { "enumDescriptions": [ @@ -2817,6 +3724,7 @@ "id": "DataFilterValueRange" }, "CandlestickDomain": { + "description": "The domain of a CandlestickChart.", "type": "object", "properties": { "data": { @@ -2828,20 +3736,17 @@ "type": "boolean" } }, - "id": "CandlestickDomain", - "description": "The domain of a CandlestickChart." + "id": "CandlestickDomain" }, "SheetProperties": { - "description": "Properties of a sheet.", - "type": "object", "properties": { "title": { "description": "The name of the sheet.", "type": "string" }, "tabColor": { - "$ref": "Color", - "description": "The color of the tab in the UI." + "description": "The color of the tab in the UI.", + "$ref": "Color" }, "index": { "format": "int32", @@ -2861,6 +3766,10 @@ "description": "True if the sheet is hidden in the UI, false if it's visible.", "type": "boolean" }, + "gridProperties": { + "description": "Additional properties of the sheet if this sheet is a grid.\n(If the sheet is an object sheet, containing a chart or image, then\nthis field will be absent.)\nWhen writing it is an error to set any grid properties on non-grid sheets.", + "$ref": "GridProperties" + }, "sheetType": { "enumDescriptions": [ "Default value, do not use.", @@ -2874,15 +3783,14 @@ ], "description": "The type of sheet. Defaults to GRID.\nThis field cannot be changed once set.", "type": "string" - }, - "gridProperties": { - "$ref": "GridProperties", - "description": "Additional properties of the sheet if this sheet is a grid.\n(If the sheet is an object sheet, containing a chart or image, then\nthis field will be absent.)\nWhen writing it is an error to set any grid properties on non-grid sheets." } }, - "id": "SheetProperties" + "id": "SheetProperties", + "description": "Properties of a sheet.", + "type": "object" }, "UpdateDimensionPropertiesRequest": { + "description": "Updates properties of dimensions within the specified range.", "type": "object", "properties": { "properties": { @@ -2899,19 +3807,22 @@ "type": "string" } }, - "id": "UpdateDimensionPropertiesRequest", - "description": "Updates properties of dimensions within the specified range." + "id": "UpdateDimensionPropertiesRequest" }, "SourceAndDestination": { "description": "A combination of a source range and how to extend that source.", "type": "object", "properties": { + "fillLength": { + "format": "int32", + "description": "The number of rows or columns that data should be filled into.\nPositive numbers expand beyond the last row or last column\nof the source. Negative numbers expand before the first row\nor first column of the source.", + "type": "integer" + }, "source": { "description": "The location of the data to use as the source of the autofill.", "$ref": "GridRange" }, "dimension": { - "type": "string", "enumDescriptions": [ "The default value, do not use.", "Operates on the rows of a sheet.", @@ -2922,18 +3833,56 @@ "ROWS", "COLUMNS" ], - "description": "The dimension that data should be filled into." - }, - "fillLength": { - "format": "int32", - "description": "The number of rows or columns that data should be filled into.\nPositive numbers expand beyond the last row or last column\nof the source. Negative numbers expand before the first row\nor first column of the source.", - "type": "integer" + "description": "The dimension that data should be filled into.", + "type": "string" } }, "id": "SourceAndDestination" }, + "OrgChartSpec": { + "description": "An \u003ca href=\"/chart/interactive/docs/gallery/orgchart\"\u003eorg chart\u003c/a\u003e.\nOrg charts require a unique set of labels in labels and may\noptionally include parent_labels and tooltips.\nparent_labels contain, for each node, the label identifying the parent\nnode. tooltips contain, for each node, an optional tooltip.\n\nFor example, to describe an OrgChart with Alice as the CEO, Bob as the\nPresident (reporting to Alice) and Cathy as VP of Sales (also reporting to\nAlice), have labels contain \"Alice\", \"Bob\", \"Cathy\",\nparent_labels contain \"\", \"Alice\", \"Alice\" and tooltips contain\n\"CEO\", \"President\", \"VP Sales\".", + "type": "object", + "properties": { + "parentLabels": { + "$ref": "ChartData", + "description": "The data containing the label of the parent for the corresponding node.\nA blank value indicates that the node has no parent and is a top-level\nnode.\nThis field is optional." + }, + "nodeSize": { + "enum": [ + "ORG_CHART_LABEL_SIZE_UNSPECIFIED", + "SMALL", + "MEDIUM", + "LARGE" + ], + "description": "The size of the org chart nodes.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The small org chart node size.", + "The medium org chart node size.", + "The large org chart node size." + ] + }, + "labels": { + "$ref": "ChartData", + "description": "The data containing the labels for all the nodes in the chart. Labels\nmust be unique." + }, + "nodeColor": { + "description": "The color of the org chart nodes.", + "$ref": "Color" + }, + "tooltips": { + "description": "The data containing the tooltip for the corresponding node. A blank value\nresults in no tooltip being displayed for the node.\nThis field is optional.", + "$ref": "ChartData" + }, + "selectedNodeColor": { + "description": "The color of the selected org chart nodes.", + "$ref": "Color" + } + }, + "id": "OrgChartSpec" + }, "FilterView": { - "id": "FilterView", "description": "A filter view.", "type": "object", "properties": { @@ -2958,8 +3907,8 @@ "type": "string" }, "range": { - "description": "The range this filter view covers.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The range this filter view covers.\n\nWhen writing, only one of range or named_range_id\nmay be set." }, "sortSpecs": { "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", @@ -2968,52 +3917,11 @@ }, "type": "array" } - } - }, - "OrgChartSpec": { - "description": "An \u003ca href=\"/chart/interactive/docs/gallery/orgchart\"\u003eorg chart\u003c/a\u003e.\nOrg charts require a unique set of labels in labels and may\noptionally include parent_labels and tooltips.\nparent_labels contain, for each node, the label identifying the parent\nnode. tooltips contain, for each node, an optional tooltip.\n\nFor example, to describe an OrgChart with Alice as the CEO, Bob as the\nPresident (reporting to Alice) and Cathy as VP of Sales (also reporting to\nAlice), have labels contain \"Alice\", \"Bob\", \"Cathy\",\nparent_labels contain \"\", \"Alice\", \"Alice\" and tooltips contain\n\"CEO\", \"President\", \"VP Sales\".", - "type": "object", - "properties": { - "tooltips": { - "$ref": "ChartData", - "description": "The data containing the tooltip for the corresponding node. A blank value\nresults in no tooltip being displayed for the node.\nThis field is optional." - }, - "selectedNodeColor": { - "$ref": "Color", - "description": "The color of the selected org chart nodes." - }, - "parentLabels": { - "$ref": "ChartData", - "description": "The data containing the label of the parent for the corresponding node.\nA blank value indicates that the node has no parent and is a top-level\nnode.\nThis field is optional." - }, - "labels": { - "$ref": "ChartData", - "description": "The data containing the labels for all the nodes in the chart. Labels\nmust be unique." - }, - "nodeSize": { - "enumDescriptions": [ - "Default value, do not use.", - "The small org chart node size.", - "The medium org chart node size.", - "The large org chart node size." - ], - "enum": [ - "ORG_CHART_LABEL_SIZE_UNSPECIFIED", - "SMALL", - "MEDIUM", - "LARGE" - ], - "description": "The size of the org chart nodes.", - "type": "string" - }, - "nodeColor": { - "description": "The color of the org chart nodes.", - "$ref": "Color" - } }, - "id": "OrgChartSpec" + "id": "FilterView" }, "SearchDeveloperMetadataRequest": { + "description": "A request to retrieve all developer metadata matching the set of specified\ncriteria.", "type": "object", "properties": { "dataFilters": { @@ -3024,11 +3932,16 @@ "type": "array" } }, - "id": "SearchDeveloperMetadataRequest", - "description": "A request to retrieve all developer metadata matching the set of specified\ncriteria." + "id": "SearchDeveloperMetadataRequest" }, "BandingProperties": { + "description": "Properties referring a single dimension (either row or column). If both\nBandedRange.row_properties and BandedRange.column_properties are\nset, the fill colors are applied to cells according to the following rules:\n\n* header_color and footer_color take priority over band colors.\n* first_band_color takes priority over second_band_color.\n* row_properties takes priority over column_properties.\n\nFor example, the first row color takes priority over the first column\ncolor, but the first column color takes priority over the second row color.\nSimilarly, the row header takes priority over the column header in the\ntop left cell, but the column header takes priority over the first row\ncolor if the row header is not set.", + "type": "object", "properties": { + "secondBandColor": { + "description": "The second color that is alternating. (Required)", + "$ref": "Color" + }, "footerColor": { "description": "The color of the last row or column. If this field is not set, the last\nrow or column will be filled with either first_band_color or\nsecond_band_color, depending on the color of the previous row or\ncolumn.", "$ref": "Color" @@ -3038,20 +3951,13 @@ "$ref": "Color" }, "firstBandColor": { - "description": "The first color that is alternating. (Required)", - "$ref": "Color" - }, - "secondBandColor": { "$ref": "Color", - "description": "The second color that is alternating. (Required)" + "description": "The first color that is alternating. (Required)" } }, - "id": "BandingProperties", - "description": "Properties referring a single dimension (either row or column). If both\nBandedRange.row_properties and BandedRange.column_properties are\nset, the fill colors are applied to cells according to the following rules:\n\n* header_color and footer_color take priority over band colors.\n* first_band_color takes priority over second_band_color.\n* row_properties takes priority over column_properties.\n\nFor example, the first row color takes priority over the first column\ncolor, but the first column color takes priority over the second row color.\nSimilarly, the row header takes priority over the column header in the\ntop left cell, but the column header takes priority over the first row\ncolor if the row header is not set.", - "type": "object" + "id": "BandingProperties" }, "AddProtectedRangeResponse": { - "id": "AddProtectedRangeResponse", "description": "The result of adding a new protected range.", "type": "object", "properties": { @@ -3059,11 +3965,10 @@ "$ref": "ProtectedRange", "description": "The newly added protected range." } - } + }, + "id": "AddProtectedRangeResponse" }, "BasicFilter": { - "description": "The default filter associated with a sheet.", - "type": "object", "properties": { "criteria": { "additionalProperties": { @@ -3073,8 +3978,8 @@ "type": "object" }, "range": { - "$ref": "GridRange", - "description": "The range the filter covers." + "description": "The range the filter covers.", + "$ref": "GridRange" }, "sortSpecs": { "description": "The sort order per column. Later specifications are used when values\nare equal in the earlier specifications.", @@ -3084,26 +3989,42 @@ "type": "array" } }, - "id": "BasicFilter" + "id": "BasicFilter", + "description": "The default filter associated with a sheet.", + "type": "object" }, "CandlestickSeries": { + "description": "The series of a CandlestickData.", "type": "object", "properties": { "data": { - "description": "The data of the CandlestickSeries.", - "$ref": "ChartData" + "$ref": "ChartData", + "description": "The data of the CandlestickSeries." } }, - "id": "CandlestickSeries", - "description": "The series of a CandlestickData." + "id": "CandlestickSeries" }, "HistogramChartSpec": { - "id": "HistogramChartSpec", "description": "A \u003ca href=\"/chart/interactive/docs/gallery/histogram\"\u003ehistogram chart\u003c/a\u003e.\nA histogram chart groups data items into bins, displaying each bin as a\ncolumn of stacked items. Histograms are used to display the distribution\nof a dataset. Each column of items represents a range into which those\nitems fall. The number of bins can be chosen automatically or specified\nexplicitly.", "type": "object", "properties": { + "outlierPercentile": { + "format": "double", + "description": "The outlier percentile is used to ensure that outliers do not adversely\naffect the calculation of bucket sizes. For example, setting an outlier\npercentile of 0.05 indicates that the top and bottom 5% of values when\ncalculating buckets. The values are still included in the chart, they will\nbe added to the first or last buckets instead of their own buckets.\nMust be between 0.0 and 0.5.", + "type": "number" + }, + "showItemDividers": { + "description": "Whether horizontal divider lines should be displayed between items in each\ncolumn.", + "type": "boolean" + }, + "series": { + "description": "The series for a histogram may be either a single series of values to be\nbucketed or multiple series, each of the same length, containing the name\nof the series followed by the values to be bucketed for that series.", + "items": { + "$ref": "HistogramSeries" + }, + "type": "array" + }, "legendPosition": { - "type": "string", "enumDescriptions": [ "Default value, do not use.", "The legend is rendered on the bottom of the chart.", @@ -3122,44 +4043,39 @@ "NO_LEGEND", "INSIDE_LEGEND" ], - "description": "The position of the chart legend." + "description": "The position of the chart legend.", + "type": "string" }, "bucketSize": { "format": "double", "description": "By default the bucket size (the range of values stacked in a single\ncolumn) is chosen automatically, but it may be overridden here.\nE.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc.\nCannot be negative.\nThis field is optional.", "type": "number" - }, - "outlierPercentile": { - "format": "double", - "description": "The outlier percentile is used to ensure that outliers do not adversely\naffect the calculation of bucket sizes. For example, setting an outlier\npercentile of 0.05 indicates that the top and bottom 5% of values when\ncalculating buckets. The values are still included in the chart, they will\nbe added to the first or last buckets instead of their own buckets.\nMust be between 0.0 and 0.5.", - "type": "number" - }, - "showItemDividers": { - "description": "Whether horizontal divider lines should be displayed between items in each\ncolumn.", - "type": "boolean" - }, - "series": { - "description": "The series for a histogram may be either a single series of values to be\nbucketed or multiple series, each of the same length, containing the name\nof the series followed by the values to be bucketed for that series.", - "items": { - "$ref": "HistogramSeries" - }, - "type": "array" } - } + }, + "id": "HistogramChartSpec" }, "UpdateValuesResponse": { "description": "The response when updating a range of values in a spreadsheet.", "type": "object", "properties": { + "updatedRange": { + "description": "The range (in A1 notation) that updates were applied to.", + "type": "string" + }, + "updatedCells": { + "format": "int32", + "description": "The number of cells updated.", + "type": "integer" + }, + "updatedData": { + "description": "The values of the cells after updates were applied.\nThis is only included if the request's `includeValuesInResponse` field\nwas `true`.", + "$ref": "ValueRange" + }, "updatedRows": { "format": "int32", "description": "The number of rows where at least one cell in the row was updated.", "type": "integer" }, - "updatedData": { - "$ref": "ValueRange", - "description": "The values of the cells after updates were applied.\nThis is only included if the request's `includeValuesInResponse` field\nwas `true`." - }, "updatedColumns": { "format": "int32", "description": "The number of columns where at least one cell in the column was updated.", @@ -3168,19 +4084,68 @@ "spreadsheetId": { "description": "The spreadsheet the updates were applied to.", "type": "string" - }, - "updatedRange": { - "description": "The range (in A1 notation) that updates were applied to.", - "type": "string" - }, - "updatedCells": { - "format": "int32", - "description": "The number of cells updated.", - "type": "integer" } }, "id": "UpdateValuesResponse" }, + "PivotValue": { + "properties": { + "formula": { + "description": "A custom formula to calculate the value. The formula must start\nwith an `=` character.", + "type": "string" + }, + "summarizeFunction": { + "enumDescriptions": [ + "The default, do not use.", + "Corresponds to the `SUM` function.", + "Corresponds to the `COUNTA` function.", + "Corresponds to the `COUNT` function.", + "Corresponds to the `COUNTUNIQUE` function.", + "Corresponds to the `AVERAGE` function.", + "Corresponds to the `MAX` function.", + "Corresponds to the `MIN` function.", + "Corresponds to the `MEDIAN` function.", + "Corresponds to the `PRODUCT` function.", + "Corresponds to the `STDEV` function.", + "Corresponds to the `STDEVP` function.", + "Corresponds to the `VAR` function.", + "Corresponds to the `VARP` function.", + "Indicates the formula should be used as-is.\nOnly valid if PivotValue.formula was set." + ], + "enum": [ + "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED", + "SUM", + "COUNTA", + "COUNT", + "COUNTUNIQUE", + "AVERAGE", + "MAX", + "MIN", + "MEDIAN", + "PRODUCT", + "STDEV", + "STDEVP", + "VAR", + "VARP", + "CUSTOM" + ], + "description": "A function to summarize the value.\nIf formula is set, the only supported values are\nSUM and\nCUSTOM.\nIf sourceColumnOffset is set, then `CUSTOM`\nis not supported.", + "type": "string" + }, + "sourceColumnOffset": { + "format": "int32", + "description": "The column offset of the source range that this value reads from.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this value refers to column `C`, whereas the offset `1` would\nrefer to column `D`.", + "type": "integer" + }, + "name": { + "description": "A name to use for the value. This is only used if formula was set.\nOtherwise, the column name is used.", + "type": "string" + } + }, + "id": "PivotValue", + "description": "The definition of how a value in a pivot table should be calculated.", + "type": "object" + }, "ErrorValue": { "description": "An error in a cell.", "type": "object", @@ -3220,64 +4185,6 @@ }, "id": "ErrorValue" }, - "PivotValue": { - "description": "The definition of how a value in a pivot table should be calculated.", - "type": "object", - "properties": { - "sourceColumnOffset": { - "type": "integer", - "format": "int32", - "description": "The column offset of the source range that this value reads from.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this value refers to column `C`, whereas the offset `1` would\nrefer to column `D`." - }, - "name": { - "type": "string", - "description": "A name to use for the value. This is only used if formula was set.\nOtherwise, the column name is used." - }, - "formula": { - "description": "A custom formula to calculate the value. The formula must start\nwith an `=` character.", - "type": "string" - }, - "summarizeFunction": { - "description": "A function to summarize the value.\nIf formula is set, the only supported values are\nSUM and\nCUSTOM.\nIf sourceColumnOffset is set, then `CUSTOM`\nis not supported.", - "type": "string", - "enumDescriptions": [ - "The default, do not use.", - "Corresponds to the `SUM` function.", - "Corresponds to the `COUNTA` function.", - "Corresponds to the `COUNT` function.", - "Corresponds to the `COUNTUNIQUE` function.", - "Corresponds to the `AVERAGE` function.", - "Corresponds to the `MAX` function.", - "Corresponds to the `MIN` function.", - "Corresponds to the `MEDIAN` function.", - "Corresponds to the `PRODUCT` function.", - "Corresponds to the `STDEV` function.", - "Corresponds to the `STDEVP` function.", - "Corresponds to the `VAR` function.", - "Corresponds to the `VARP` function.", - "Indicates the formula should be used as-is.\nOnly valid if PivotValue.formula was set." - ], - "enum": [ - "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED", - "SUM", - "COUNTA", - "COUNT", - "COUNTUNIQUE", - "AVERAGE", - "MAX", - "MIN", - "MEDIAN", - "PRODUCT", - "STDEV", - "STDEVP", - "VAR", - "VARP", - "CUSTOM" - ] - } - }, - "id": "PivotValue" - }, "CopySheetToAnotherSpreadsheetRequest": { "description": "The request to copy a sheet across spreadsheets.", "type": "object", @@ -3290,34 +4197,34 @@ "id": "CopySheetToAnotherSpreadsheetRequest" }, "PivotGroupSortValueBucket": { - "description": "Information about which values in a pivot group should be used for sorting.", - "type": "object", "properties": { - "buckets": { - "items": { - "$ref": "ExtendedValue" - }, - "type": "array", - "description": "Determines the bucket from which values are chosen to sort.\n\nFor example, in a pivot table with one row group & two column groups,\nthe row group can list up to two values. The first value corresponds\nto a value within the first column group, and the second value\ncorresponds to a value in the second column group. If no values\nare listed, this would indicate that the row should be sorted according\nto the \"Grand Total\" over the column groups. If a single value is listed,\nthis would correspond to using the \"Total\" of that bucket." - }, "valuesIndex": { "format": "int32", "description": "The offset in the PivotTable.values list which the values in this\ngrouping should be sorted by.", "type": "integer" + }, + "buckets": { + "description": "Determines the bucket from which values are chosen to sort.\n\nFor example, in a pivot table with one row group & two column groups,\nthe row group can list up to two values. The first value corresponds\nto a value within the first column group, and the second value\ncorresponds to a value in the second column group. If no values\nare listed, this would indicate that the row should be sorted according\nto the \"Grand Total\" over the column groups. If a single value is listed,\nthis would correspond to using the \"Total\" of that bucket.", + "items": { + "$ref": "ExtendedValue" + }, + "type": "array" } }, - "id": "PivotGroupSortValueBucket" + "id": "PivotGroupSortValueBucket", + "description": "Information about which values in a pivot group should be used for sorting.", + "type": "object" }, "DeleteDeveloperMetadataRequest": { + "description": "A request to delete developer metadata.", "type": "object", "properties": { "dataFilter": { - "$ref": "DataFilter", - "description": "The data filter describing the criteria used to select which developer\nmetadata entry to delete." + "description": "The data filter describing the criteria used to select which developer\nmetadata entry to delete.", + "$ref": "DataFilter" } }, - "id": "DeleteDeveloperMetadataRequest", - "description": "A request to delete developer metadata." + "id": "DeleteDeveloperMetadataRequest" }, "CandlestickChartSpec": { "description": "A \u003ca href=\"/chart/interactive/docs/gallery/candlestickchart\"\u003ecandlestick chart\u003c/a\u003e.", @@ -3338,6 +4245,7 @@ "id": "CandlestickChartSpec" }, "BatchClearValuesByDataFilterResponse": { + "description": "The response when clearing a range of values selected with\nDataFilters in a spreadsheet.", "type": "object", "properties": { "clearedRanges": { @@ -3352,43 +4260,40 @@ "type": "string" } }, - "id": "BatchClearValuesByDataFilterResponse", - "description": "The response when clearing a range of values selected with\nDataFilters in a spreadsheet." + "id": "BatchClearValuesByDataFilterResponse" }, "CandlestickData": { - "type": "object", "properties": { - "openSeries": { - "$ref": "CandlestickSeries", - "description": "The range data (vertical axis) for the open/initial value for each\ncandle. This is the bottom of the candle body. If less than the close\nvalue the candle will be filled. Otherwise the candle will be hollow." - }, "highSeries": { - "$ref": "CandlestickSeries", - "description": "The range data (vertical axis) for the high/maximum value for each\ncandle. This is the top of the candle's center line." + "description": "The range data (vertical axis) for the high/maximum value for each\ncandle. This is the top of the candle's center line.", + "$ref": "CandlestickSeries" }, "closeSeries": { "$ref": "CandlestickSeries", "description": "The range data (vertical axis) for the close/final value for each candle.\nThis is the top of the candle body. If greater than the open value the\ncandle will be filled. Otherwise the candle will be hollow." }, "lowSeries": { - "description": "The range data (vertical axis) for the low/minimum value for each candle.\nThis is the bottom of the candle's center line.", + "$ref": "CandlestickSeries", + "description": "The range data (vertical axis) for the low/minimum value for each candle.\nThis is the bottom of the candle's center line." + }, + "openSeries": { + "description": "The range data (vertical axis) for the open/initial value for each\ncandle. This is the bottom of the candle body. If less than the close\nvalue the candle will be filled. Otherwise the candle will be hollow.", "$ref": "CandlestickSeries" } }, "id": "CandlestickData", - "description": "The Candlestick chart data, each containing the low, open, close, and high\nvalues for a series." + "description": "The Candlestick chart data, each containing the low, open, close, and high\nvalues for a series.", + "type": "object" }, "EmbeddedObjectPosition": { - "description": "The position of an embedded object such as a chart.", - "type": "object", "properties": { "newSheet": { "description": "If true, the embedded object will be put on a new sheet whose ID\nis chosen for you. Used only when writing.", "type": "boolean" }, "overlayPosition": { - "description": "The position at which the object is overlaid on top of a grid.", - "$ref": "OverlayPosition" + "$ref": "OverlayPosition", + "description": "The position at which the object is overlaid on top of a grid." }, "sheetId": { "format": "int32", @@ -3396,57 +4301,29 @@ "type": "integer" } }, - "id": "EmbeddedObjectPosition" + "id": "EmbeddedObjectPosition", + "description": "The position of an embedded object such as a chart.", + "type": "object" }, "DeleteProtectedRangeRequest": { "description": "Deletes the protected range with the given ID.", "type": "object", "properties": { "protectedRangeId": { - "type": "integer", "format": "int32", - "description": "The ID of the protected range to delete." + "description": "The ID of the protected range to delete.", + "type": "integer" } }, "id": "DeleteProtectedRangeRequest" }, "DeveloperMetadataLookup": { - "id": "DeveloperMetadataLookup", "description": "Selects DeveloperMetadata that matches all of the specified fields. For\nexample, if only a metadata ID is specified this will consider the\nDeveloperMetadata with that particular unique ID. If a metadata key is\nspecified, all developer metadata with that key will be considered. If a\nkey, visibility, and location type are all specified, then all\ndeveloper metadata with that key, visibility, and associated with a\nlocation of that type will be considered. In general, this\nselects all DeveloperMetadata that matches the intersection of all the\nspecified fields; any field or combination of fields may be specified.", "type": "object", "properties": { - "metadataKey": { - "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.metadata_key.", - "type": "string" - }, - "visibility": { - "enum": [ - "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED", - "DOCUMENT", - "PROJECT" - ], - "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.visibility. If left unspecified, all developer\nmetadata visibile to the requesting project will be considered.", - "type": "string", - "enumDescriptions": [ - "Default value.", - "Document-visible metadata is accessible from any developer project with\naccess to the document.", - "Project-visible metadata is only visible to and accessible by the developer\nproject that created the metadata." - ] - }, - "metadataId": { - "format": "int32", - "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.metadata_id.", - "type": "integer" - }, - "metadataValue": { - "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.metadata_value.", - "type": "string" - }, - "metadataLocation": { - "description": "Limits the selected developer metadata to those entries associated with\nthe specified location. This field either matches exact locations or all\nintersecting locations according the specified\nlocationMatchingStrategy.", - "$ref": "DeveloperMetadataLocation" - }, "locationMatchingStrategy": { + "description": "Determines how this lookup matches the location. If this field is\nspecified as EXACT, only developer metadata associated on the exact\nlocation specified will be matched. If this field is specified to INTERSECTING,\ndeveloper metadata associated on intersecting locations will also be\nmatched. If left unspecified, this field will assume a default value of\nINTERSECTING.\nIf this field is specified, a metadataLocation\nmust also be specified.", + "type": "string", "enumDescriptions": [ "Default value. This value must not be used.", "Indicates that a specified location should be matched exactly. For\nexample, if row three were specified as a location this matching strategy\nwould only match developer metadata also associated on row three. Metadata\nassociated on other locations would not be considered.", @@ -3456,11 +4333,20 @@ "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED", "EXACT_LOCATION", "INTERSECTING_LOCATION" - ], - "description": "Determines how this lookup matches the location. If this field is\nspecified as EXACT, only developer metadata associated on the exact\nlocation specified will be matched. If this field is specified to INTERSECTING,\ndeveloper metadata associated on intersecting locations will also be\nmatched. If left unspecified, this field will assume a default value of\nINTERSECTING.\nIf this field is specified, a metadataLocation\nmust also be specified.", - "type": "string" + ] + }, + "metadataLocation": { + "description": "Limits the selected developer metadata to those entries associated with\nthe specified location. This field either matches exact locations or all\nintersecting locations according the specified\nlocationMatchingStrategy.", + "$ref": "DeveloperMetadataLocation" }, "locationType": { + "enumDescriptions": [ + "Default value.", + "Developer metadata associated on an entire row dimension.", + "Developer metadata associated on an entire column dimension.", + "Developer metadata associated on an entire sheet.", + "Developer metadata associated on the entire spreadsheet." + ], "enum": [ "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED", "ROW", @@ -3469,32 +4355,53 @@ "SPREADSHEET" ], "description": "Limits the selected developer metadata to those entries which are\nassociated with locations of the specified type. For example, specifying\nthis as ROW will only consider\ndeveloper metadata associated on rows. If left unspecified, all location\ntypes will be considered. This field cannot be specified as\nSPREADSHEET when the\nlocationMatchingStrategy is\nspecified as INTERSECTING or when the\nmetadataLocation is specified as a\nnon-spreadsheet location: spreadsheet metadata cannot intersect any other\ndeveloper metadata location. This field also must be left unspecified when the\nlocationMatchingStrategy is\nspecified as EXACT.", - "type": "string", + "type": "string" + }, + "metadataKey": { + "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.metadata_key.", + "type": "string" + }, + "metadataId": { + "format": "int32", + "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.metadata_id.", + "type": "integer" + }, + "visibility": { "enumDescriptions": [ "Default value.", - "Developer metadata associated on an entire row dimension.", - "Developer metadata associated on an entire column dimension.", - "Developer metadata associated on an entire sheet.", - "Developer metadata associated on the entire spreadsheet." - ] + "Document-visible metadata is accessible from any developer project with\naccess to the document.", + "Project-visible metadata is only visible to and accessible by the developer\nproject that created the metadata." + ], + "enum": [ + "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED", + "DOCUMENT", + "PROJECT" + ], + "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.visibility. If left unspecified, all developer\nmetadata visibile to the requesting project will be considered.", + "type": "string" + }, + "metadataValue": { + "description": "Limits the selected developer metadata to that which has a matching\nDeveloperMetadata.metadata_value.", + "type": "string" } - } + }, + "id": "DeveloperMetadataLookup" }, "AutoFillRequest": { "description": "Fills in more data based on existing data.", "type": "object", "properties": { + "useAlternateSeries": { + "description": "True if we should generate data with the \"alternate\" series.\nThis differs based on the type and amount of source data.", + "type": "boolean" + }, "sourceAndDestination": { - "description": "The source and destination areas to autofill.\nThis explicitly lists the source of the autofill and where to\nextend that data.", - "$ref": "SourceAndDestination" + "$ref": "SourceAndDestination", + "description": "The source and destination areas to autofill.\nThis explicitly lists the source of the autofill and where to\nextend that data." }, "range": { "$ref": "GridRange", "description": "The range to autofill. This will examine the range and detect\nthe location that has data and automatically fill that data\nin to the rest of the range." - }, - "useAlternateSeries": { - "description": "True if we should generate data with the \"alternate\" series.\nThis differs based on the type and amount of source data.", - "type": "boolean" } }, "id": "AutoFillRequest" @@ -3506,8 +4413,8 @@ "description": "An optional midway interpolation point." }, "maxpoint": { - "$ref": "InterpolationPoint", - "description": "The final interpolation point." + "description": "The final interpolation point.", + "$ref": "InterpolationPoint" }, "minpoint": { "$ref": "InterpolationPoint", @@ -3519,15 +4426,15 @@ "type": "object" }, "SetBasicFilterRequest": { + "description": "Sets the basic filter associated with a sheet.", + "type": "object", "properties": { "filter": { - "description": "The filter to set.", - "$ref": "BasicFilter" + "$ref": "BasicFilter", + "description": "The filter to set." } }, - "id": "SetBasicFilterRequest", - "description": "Sets the basic filter associated with a sheet.", - "type": "object" + "id": "SetBasicFilterRequest" }, "ClearValuesRequest": { "description": "The request for clearing a range of values in a spreadsheet.", @@ -3588,16 +4495,16 @@ "description": "The request for retrieving a Spreadsheet.", "type": "object", "properties": { - "dataFilters": { - "items": { - "$ref": "DataFilter" - }, - "type": "array", - "description": "The DataFilters used to select which ranges to retrieve from\nthe spreadsheet." - }, "includeGridData": { "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", "type": "boolean" + }, + "dataFilters": { + "description": "The DataFilters used to select which ranges to retrieve from\nthe spreadsheet.", + "items": { + "$ref": "DataFilter" + }, + "type": "array" } }, "id": "GetSpreadsheetByDataFilterRequest" @@ -3618,16 +4525,6 @@ "description": "The result of the find/replace.", "type": "object", "properties": { - "occurrencesChanged": { - "format": "int32", - "description": "The number of occurrences (possibly multiple within a cell) changed.\nFor example, if replacing `\"e\"` with `\"o\"` in `\"Google Sheets\"`, this would\nbe `\"3\"` because `\"Google Sheets\"` -\u003e `\"Googlo Shoots\"`.", - "type": "integer" - }, - "rowsChanged": { - "format": "int32", - "description": "The number of rows changed.", - "type": "integer" - }, "sheetsChanged": { "format": "int32", "description": "The number of sheets changed.", @@ -3642,19 +4539,22 @@ "format": "int32", "description": "The number of non-formula cells changed.", "type": "integer" + }, + "occurrencesChanged": { + "format": "int32", + "description": "The number of occurrences (possibly multiple within a cell) changed.\nFor example, if replacing `\"e\"` with `\"o\"` in `\"Google Sheets\"`, this would\nbe `\"3\"` because `\"Google Sheets\"` -\u003e `\"Googlo Shoots\"`.", + "type": "integer" + }, + "rowsChanged": { + "format": "int32", + "description": "The number of rows changed.", + "type": "integer" } }, "id": "FindReplaceResponse" }, "UpdateValuesByDataFilterResponse": { - "description": "The response when updating a range of values by a data filter in a\nspreadsheet.", - "type": "object", "properties": { - "updatedColumns": { - "format": "int32", - "description": "The number of columns where at least one cell in the column was updated.", - "type": "integer" - }, "updatedRange": { "description": "The range (in A1 notation) that updates were applied to.", "type": "string" @@ -3669,28 +4569,23 @@ "description": "The data filter that selected the range that was updated." }, "updatedData": { - "description": "The values of the cells in the range matched by the dataFilter after all\nupdates were applied. This is only included if the request's\n`includeValuesInResponse` field was `true`.", - "$ref": "ValueRange" + "$ref": "ValueRange", + "description": "The values of the cells in the range matched by the dataFilter after all\nupdates were applied. This is only included if the request's\n`includeValuesInResponse` field was `true`." }, "updatedRows": { "format": "int32", "description": "The number of rows where at least one cell in the row was updated.", "type": "integer" - } - }, - "id": "UpdateValuesByDataFilterResponse" - }, - "DuplicateFilterViewRequest": { - "type": "object", - "properties": { - "filterId": { + }, + "updatedColumns": { "format": "int32", - "description": "The ID of the filter being duplicated.", + "description": "The number of columns where at least one cell in the column was updated.", "type": "integer" } }, - "id": "DuplicateFilterViewRequest", - "description": "Duplicates a particular filter view." + "id": "UpdateValuesByDataFilterResponse", + "description": "The response when updating a range of values by a data filter in a\nspreadsheet.", + "type": "object" }, "DeleteSheetRequest": { "description": "Deletes the requested sheet.", @@ -3704,20 +4599,55 @@ }, "id": "DeleteSheetRequest" }, + "DuplicateFilterViewRequest": { + "description": "Duplicates a particular filter view.", + "type": "object", + "properties": { + "filterId": { + "format": "int32", + "description": "The ID of the filter being duplicated.", + "type": "integer" + } + }, + "id": "DuplicateFilterViewRequest" + }, + "MatchedValueRange": { + "description": "A value range that was matched by one or more data filers.", + "type": "object", + "properties": { + "valueRange": { + "$ref": "ValueRange", + "description": "The values matched by the DataFilter." + }, + "dataFilters": { + "description": "The DataFilters from the request that matched the range of\nvalues.", + "items": { + "$ref": "DataFilter" + }, + "type": "array" + } + }, + "id": "MatchedValueRange" + }, "DeveloperMetadataLocation": { "description": "A location where metadata may be associated in a spreadsheet.", "type": "object", "properties": { + "dimensionRange": { + "description": "Represents the row or column when metadata is associated with\na dimension. The specified DimensionRange must represent a single row\nor column; it cannot be unbounded or span multiple rows or columns.", + "$ref": "DimensionRange" + }, "sheetId": { "format": "int32", "description": "The ID of the sheet when metadata is associated with an entire sheet.", "type": "integer" }, "spreadsheet": { - "type": "boolean", - "description": "True when metadata is associated with an entire spreadsheet." + "description": "True when metadata is associated with an entire spreadsheet.", + "type": "boolean" }, "locationType": { + "description": "The type of location this object represents. This field is read-only.", "type": "string", "enumDescriptions": [ "Default value.", @@ -3732,68 +4662,73 @@ "COLUMN", "SHEET", "SPREADSHEET" - ], - "description": "The type of location this object represents. This field is read-only." - }, - "dimensionRange": { - "description": "Represents the row or column when metadata is associated with\na dimension. The specified DimensionRange must represent a single row\nor column; it cannot be unbounded or span multiple rows or columns.", - "$ref": "DimensionRange" + ] } }, "id": "DeveloperMetadataLocation" }, - "MatchedValueRange": { - "type": "object", - "properties": { - "valueRange": { - "description": "The values matched by the DataFilter.", - "$ref": "ValueRange" - }, - "dataFilters": { - "description": "The DataFilters from the request that matched the range of\nvalues.", - "items": { - "$ref": "DataFilter" - }, - "type": "array" - } - }, - "id": "MatchedValueRange", - "description": "A value range that was matched by one or more data filers." - }, "UpdateConditionalFormatRuleResponse": { + "description": "The result of updating a conditional format rule.", "type": "object", "properties": { - "oldRule": { - "$ref": "ConditionalFormatRule", - "description": "The old (deleted) rule. Not set if a rule was moved\n(because it is the same as new_rule)." - }, "newIndex": { "format": "int32", "description": "The index of the new rule.", "type": "integer" }, "newRule": { - "description": "The new rule that replaced the old rule (if replacing),\nor the rule that was moved (if moved)", - "$ref": "ConditionalFormatRule" + "$ref": "ConditionalFormatRule", + "description": "The new rule that replaced the old rule (if replacing),\nor the rule that was moved (if moved)" }, "oldIndex": { - "type": "integer", "format": "int32", - "description": "The old index of the rule. Not set if a rule was replaced\n(because it is the same as new_index)." + "description": "The old index of the rule. Not set if a rule was replaced\n(because it is the same as new_index).", + "type": "integer" + }, + "oldRule": { + "description": "The old (deleted) rule. Not set if a rule was moved\n(because it is the same as new_rule).", + "$ref": "ConditionalFormatRule" } }, - "id": "UpdateConditionalFormatRuleResponse", - "description": "The result of updating a conditional format rule." + "id": "UpdateConditionalFormatRuleResponse" + }, + "ConditionValue": { + "description": "The value of the condition.", + "type": "object", + "properties": { + "userEnteredValue": { + "description": "A value the condition is based on.\nThe value will be parsed as if the user typed into a cell.\nFormulas are supported (and must begin with an `=`).", + "type": "string" + }, + "relativeDate": { + "enum": [ + "RELATIVE_DATE_UNSPECIFIED", + "PAST_YEAR", + "PAST_MONTH", + "PAST_WEEK", + "YESTERDAY", + "TODAY", + "TOMORROW" + ], + "description": "A relative date (based on the current date).\nValid only if the type is\nDATE_BEFORE,\nDATE_AFTER,\nDATE_ON_OR_BEFORE or\nDATE_ON_OR_AFTER.\n\nRelative dates are not supported in data validation.\nThey are supported only in conditional formatting and\nconditional filters.", + "type": "string", + "enumDescriptions": [ + "Default value, do not use.", + "The value is one year before today.", + "The value is one month before today.", + "The value is one week before today.", + "The value is yesterday.", + "The value is today.", + "The value is tomorrow." + ] + } + }, + "id": "ConditionValue" }, "DuplicateSheetRequest": { "description": "Duplicates the contents of a sheet.", "type": "object", "properties": { - "sourceSheetId": { - "format": "int32", - "description": "The sheet to duplicate.", - "type": "integer" - }, "newSheetId": { "format": "int32", "description": "If set, the ID of the new sheet. If not set, an ID is chosen.\nIf set, the ID must not conflict with any existing sheet ID.\nIf set, it must be non-negative.", @@ -3807,52 +4742,19 @@ "newSheetName": { "description": "The name of the new sheet. If empty, a new name is chosen for you.", "type": "string" + }, + "sourceSheetId": { + "format": "int32", + "description": "The sheet to duplicate.", + "type": "integer" } }, "id": "DuplicateSheetRequest" }, - "ConditionValue": { - "id": "ConditionValue", - "description": "The value of the condition.", - "type": "object", - "properties": { - "userEnteredValue": { - "description": "A value the condition is based on.\nThe value will be parsed as if the user typed into a cell.\nFormulas are supported (and must begin with an `=`).", - "type": "string" - }, - "relativeDate": { - "description": "A relative date (based on the current date).\nValid only if the type is\nDATE_BEFORE,\nDATE_AFTER,\nDATE_ON_OR_BEFORE or\nDATE_ON_OR_AFTER.\n\nRelative dates are not supported in data validation.\nThey are supported only in conditional formatting and\nconditional filters.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "The value is one year before today.", - "The value is one month before today.", - "The value is one week before today.", - "The value is yesterday.", - "The value is today.", - "The value is tomorrow." - ], - "enum": [ - "RELATIVE_DATE_UNSPECIFIED", - "PAST_YEAR", - "PAST_MONTH", - "PAST_WEEK", - "YESTERDAY", - "TODAY", - "TOMORROW" - ] - } - } - }, "ExtendedValue": { - "id": "ExtendedValue", "description": "The kinds of value that a cell in a spreadsheet can have.", "type": "object", "properties": { - "errorValue": { - "description": "Represents an error.\nThis field is read-only.", - "$ref": "ErrorValue" - }, "formulaValue": { "description": "Represents a formula.", "type": "string" @@ -3869,28 +4771,75 @@ "format": "double", "description": "Represents a double value.\nNote: Dates, Times and DateTimes are represented as doubles in\n\"serial number\" format.", "type": "number" - } - } - }, - "AddChartRequest": { - "description": "Adds a chart to a sheet in the spreadsheet.", - "type": "object", - "properties": { - "chart": { - "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed. The chartId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a chart that already exists.)", - "$ref": "EmbeddedChart" + }, + "errorValue": { + "description": "Represents an error.\nThis field is read-only.", + "$ref": "ErrorValue" } }, - "id": "AddChartRequest" + "id": "ExtendedValue" + }, + "BandedRange": { + "description": "A banded (alternating colors) range in a sheet.", + "type": "object", + "properties": { + "range": { + "description": "The range over which these properties are applied.", + "$ref": "GridRange" + }, + "bandedRangeId": { + "format": "int32", + "description": "The id of the banded range.", + "type": "integer" + }, + "columnProperties": { + "$ref": "BandingProperties", + "description": "Properties for column bands. These properties will be applied on a column-\nby-column basis throughout all the columns in the range. At least one of\nrow_properties or column_properties must be specified." + }, + "rowProperties": { + "$ref": "BandingProperties", + "description": "Properties for row bands. These properties will be applied on a row-by-row\nbasis throughout all the rows in the range. At least one of\nrow_properties or column_properties must be specified." + } + }, + "id": "BandedRange" + }, + "HistogramSeries": { + "description": "A histogram series containing the series color and data.", + "type": "object", + "properties": { + "barColor": { + "description": "The color of the column representing this series in each bucket.\nThis field is optional.", + "$ref": "Color" + }, + "data": { + "description": "The data for this histogram series.", + "$ref": "ChartData" + } + }, + "id": "HistogramSeries" + }, + "BatchClearValuesResponse": { + "description": "The response when clearing a range of values in a spreadsheet.", + "type": "object", + "properties": { + "spreadsheetId": { + "description": "The spreadsheet the updates were applied to.", + "type": "string" + }, + "clearedRanges": { + "description": "The ranges that were cleared, in A1 notation.\n(If the requests were for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual ranges\n that were cleared, bounded to the sheet's limits.)", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "BatchClearValuesResponse" }, "Spreadsheet": { "description": "Resource that represents a spreadsheet.", "type": "object", "properties": { - "spreadsheetUrl": { - "description": "The url of the spreadsheet.\nThis field is read-only.", - "type": "string" - }, "properties": { "$ref": "SpreadsheetProperties", "description": "Overall properties of a spreadsheet." @@ -3919,68 +4868,28 @@ "$ref": "Sheet" }, "type": "array" + }, + "spreadsheetUrl": { + "description": "The url of the spreadsheet.\nThis field is read-only.", + "type": "string" } }, "id": "Spreadsheet" }, - "BatchClearValuesResponse": { - "description": "The response when clearing a range of values in a spreadsheet.", + "AddChartRequest": { + "description": "Adds a chart to a sheet in the spreadsheet.", "type": "object", "properties": { - "clearedRanges": { - "description": "The ranges that were cleared, in A1 notation.\n(If the requests were for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual ranges\n that were cleared, bounded to the sheet's limits.)", - "items": { - "type": "string" - }, - "type": "array" - }, - "spreadsheetId": { - "type": "string", - "description": "The spreadsheet the updates were applied to." + "chart": { + "description": "The chart that should be added to the spreadsheet, including the position\nwhere it should be placed. The chartId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a chart that already exists.)", + "$ref": "EmbeddedChart" } }, - "id": "BatchClearValuesResponse" - }, - "HistogramSeries": { - "id": "HistogramSeries", - "description": "A histogram series containing the series color and data.", - "type": "object", - "properties": { - "barColor": { - "$ref": "Color", - "description": "The color of the column representing this series in each bucket.\nThis field is optional." - }, - "data": { - "$ref": "ChartData", - "description": "The data for this histogram series." - } - } - }, - "BandedRange": { - "description": "A banded (alternating colors) range in a sheet.", - "type": "object", - "properties": { - "range": { - "$ref": "GridRange", - "description": "The range over which these properties are applied." - }, - "bandedRangeId": { - "format": "int32", - "description": "The id of the banded range.", - "type": "integer" - }, - "columnProperties": { - "$ref": "BandingProperties", - "description": "Properties for column bands. These properties will be applied on a column-\nby-column basis throughout all the columns in the range. At least one of\nrow_properties or column_properties must be specified." - }, - "rowProperties": { - "$ref": "BandingProperties", - "description": "Properties for row bands. These properties will be applied on a row-by-row\nbasis throughout all the rows in the range. At least one of\nrow_properties or column_properties must be specified." - } - }, - "id": "BandedRange" + "id": "AddChartRequest" }, "UpdateProtectedRangeRequest": { + "description": "Updates an existing protected range with the specified\nprotectedRangeId.", + "type": "object", "properties": { "fields": { "format": "google-fieldmask", @@ -3992,36 +4901,38 @@ "$ref": "ProtectedRange" } }, - "id": "UpdateProtectedRangeRequest", - "description": "Updates an existing protected range with the specified\nprotectedRangeId.", - "type": "object" + "id": "UpdateProtectedRangeRequest" }, "DataFilter": { - "description": "Filter that describes what data should be selected or returned from a\nrequest.", - "type": "object", "properties": { + "a1Range": { + "description": "Selects data that matches the specified A1 range.", + "type": "string" + }, "gridRange": { "description": "Selects data that matches the range described by the GridRange.", "$ref": "GridRange" }, "developerMetadataLookup": { - "description": "Selects data associated with the developer metadata matching the criteria\ndescribed by this DeveloperMetadataLookup.", - "$ref": "DeveloperMetadataLookup" - }, - "a1Range": { - "description": "Selects data that matches the specified A1 range.", - "type": "string" + "$ref": "DeveloperMetadataLookup", + "description": "Selects data associated with the developer metadata matching the criteria\ndescribed by this DeveloperMetadataLookup." } }, - "id": "DataFilter" + "id": "DataFilter", + "description": "Filter that describes what data should be selected or returned from a\nrequest.", + "type": "object" }, "TextFormat": { "description": "The format of a run of text in a cell.\nAbsent values indicate that the field isn't specified.", "type": "object", "properties": { + "underline": { + "description": "True if the text is underlined.", + "type": "boolean" + }, "bold": { - "type": "boolean", - "description": "True if the text is bold." + "description": "True if the text is bold.", + "type": "boolean" }, "foregroundColor": { "description": "The foreground color of the text.", @@ -4031,22 +4942,18 @@ "description": "The font family.", "type": "string" }, - "strikethrough": { - "description": "True if the text has a strikethrough.", - "type": "boolean" - }, "italic": { "description": "True if the text is italicized.", "type": "boolean" }, + "strikethrough": { + "description": "True if the text has a strikethrough.", + "type": "boolean" + }, "fontSize": { "format": "int32", "description": "The size of the font.", "type": "integer" - }, - "underline": { - "description": "True if the text is underlined.", - "type": "boolean" } }, "id": "TextFormat" @@ -4067,8 +4974,8 @@ "type": "object", "properties": { "filter": { - "description": "The newly added filter view.", - "$ref": "FilterView" + "$ref": "FilterView", + "description": "The newly added filter view." } }, "id": "AddFilterViewResponse" @@ -4091,28 +4998,10 @@ "id": "IterativeCalculationSettings" }, "SpreadsheetProperties": { - "description": "Properties of a spreadsheet.", - "type": "object", "properties": { - "title": { - "description": "The title of the spreadsheet.", - "type": "string" - }, - "timeZone": { - "description": "The time zone of the spreadsheet, in CLDR format such as\n`America/New_York`. If the time zone isn't recognized, this may\nbe a custom time zone such as `GMT-07:00`.", - "type": "string" - }, - "locale": { - "description": "The locale of the spreadsheet in one of the following formats:\n\n* an ISO 639-1 language code such as `en`\n\n* an ISO 639-2 language code such as `fil`, if no 639-1 code exists\n\n* a combination of the ISO language code and country code, such as `en_US`\n\nNote: when updating this field, not all locales/languages are supported.", - "type": "string" - }, "iterativeCalculationSettings": { - "description": "Determines whether and how circular references are resolved with iterative\ncalculation. Absence of this field means that circular references will\nresult in calculation errors.", - "$ref": "IterativeCalculationSettings" - }, - "defaultFormat": { - "$ref": "CellFormat", - "description": "The default format of all cells in the spreadsheet.\nCellData.effectiveFormat will not be set if the\ncell's format is equal to this default format.\nThis field is read-only." + "$ref": "IterativeCalculationSettings", + "description": "Determines whether and how circular references are resolved with iterative\ncalculation. Absence of this field means that circular references will\nresult in calculation errors." }, "autoRecalc": { "enumDescriptions": [ @@ -4129,75 +5018,91 @@ ], "description": "The amount of time to wait before volatile functions are recalculated.", "type": "string" + }, + "defaultFormat": { + "$ref": "CellFormat", + "description": "The default format of all cells in the spreadsheet.\nCellData.effectiveFormat will not be set if the\ncell's format is equal to this default format.\nThis field is read-only." + }, + "title": { + "description": "The title of the spreadsheet.", + "type": "string" + }, + "timeZone": { + "description": "The time zone of the spreadsheet, in CLDR format such as\n`America/New_York`. If the time zone isn't recognized, this may\nbe a custom time zone such as `GMT-07:00`.", + "type": "string" + }, + "locale": { + "description": "The locale of the spreadsheet in one of the following formats:\n\n* an ISO 639-1 language code such as `en`\n\n* an ISO 639-2 language code such as `fil`, if no 639-1 code exists\n\n* a combination of the ISO language code and country code, such as `en_US`\n\nNote: when updating this field, not all locales/languages are supported.", + "type": "string" } }, - "id": "SpreadsheetProperties" + "id": "SpreadsheetProperties", + "description": "Properties of a spreadsheet.", + "type": "object" }, "OverlayPosition": { "description": "The location an object is overlaid on top of a grid.", "type": "object", "properties": { - "anchorCell": { - "$ref": "GridCoordinate", - "description": "The cell the object is anchored to." - }, - "heightPixels": { - "type": "integer", - "format": "int32", - "description": "The height of the object, in pixels. Defaults to 371." - }, - "offsetYPixels": { - "format": "int32", - "description": "The vertical offset, in pixels, that the object is offset\nfrom the anchor cell.", - "type": "integer" - }, "widthPixels": { - "type": "integer", "format": "int32", - "description": "The width of the object, in pixels. Defaults to 600." + "description": "The width of the object, in pixels. Defaults to 600.", + "type": "integer" }, "offsetXPixels": { "format": "int32", "description": "The horizontal offset, in pixels, that the object is offset\nfrom the anchor cell.", "type": "integer" + }, + "anchorCell": { + "description": "The cell the object is anchored to.", + "$ref": "GridCoordinate" + }, + "heightPixels": { + "format": "int32", + "description": "The height of the object, in pixels. Defaults to 371.", + "type": "integer" + }, + "offsetYPixels": { + "format": "int32", + "description": "The vertical offset, in pixels, that the object is offset\nfrom the anchor cell.", + "type": "integer" } }, "id": "OverlayPosition" }, "RepeatCellRequest": { + "description": "Updates all cells in the range to the values in the given Cell object.\nOnly the fields listed in the fields field are updated; others are\nunchanged.\n\nIf writing a cell with a formula, the formula's ranges will automatically\nincrement for each field in the range.\nFor example, if writing a cell with formula `=A1` into range B2:C4,\nB2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,\nC2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.\n\nTo keep the formula's ranges static, use the `$` indicator.\nFor example, use the formula `=$A$1` to prevent both the row and the\ncolumn from incrementing.", "type": "object", "properties": { + "range": { + "description": "The range to repeat the cell in.", + "$ref": "GridRange" + }, "fields": { "format": "google-fieldmask", "description": "The fields that should be updated. At least one field must be specified.\nThe root `cell` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", "type": "string" }, "cell": { - "description": "The data to write.", - "$ref": "CellData" - }, - "range": { - "$ref": "GridRange", - "description": "The range to repeat the cell in." + "$ref": "CellData", + "description": "The data to write." } }, - "id": "RepeatCellRequest", - "description": "Updates all cells in the range to the values in the given Cell object.\nOnly the fields listed in the fields field are updated; others are\nunchanged.\n\nIf writing a cell with a formula, the formula's ranges will automatically\nincrement for each field in the range.\nFor example, if writing a cell with formula `=A1` into range B2:C4,\nB2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,\nC2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.\n\nTo keep the formula's ranges static, use the `$` indicator.\nFor example, use the formula `=$A$1` to prevent both the row and the\ncolumn from incrementing." + "id": "RepeatCellRequest" }, "AddChartResponse": { + "description": "The result of adding a chart to a spreadsheet.", "type": "object", "properties": { "chart": { - "$ref": "EmbeddedChart", - "description": "The newly added chart." + "description": "The newly added chart.", + "$ref": "EmbeddedChart" } }, - "id": "AddChartResponse", - "description": "The result of adding a chart to a spreadsheet." + "id": "AddChartResponse" }, "InsertDimensionRequest": { - "description": "Inserts rows or columns in a sheet at a particular index.", - "type": "object", "properties": { "inheritFromBefore": { "description": "Whether dimension properties should be extended from the dimensions\nbefore or after the newly inserted dimensions.\nTrue to inherit from the dimensions before (in which case the start\nindex must be greater than 0), and false to inherit from the dimensions\nafter.\n\nFor example, if row index 0 has red background and row index 1\nhas a green background, then inserting 2 rows at index 1 can inherit\neither the green or red background. If `inheritFromBefore` is true,\nthe two new rows will be red (because the row before the insertion point\nwas red), whereas if `inheritFromBefore` is false, the two new rows will\nbe green (because the row after the insertion point was green).", @@ -4208,40 +5113,85 @@ "description": "The dimensions to insert. Both the start and end indexes must be bounded." } }, - "id": "InsertDimensionRequest" + "id": "InsertDimensionRequest", + "description": "Inserts rows or columns in a sheet at a particular index.", + "type": "object" }, "UpdateSpreadsheetPropertiesRequest": { "description": "Updates properties of a spreadsheet.", "type": "object", "properties": { - "properties": { - "$ref": "SpreadsheetProperties", - "description": "The properties to update." - }, "fields": { "format": "google-fieldmask", "description": "The fields that should be updated. At least one field must be specified.\nThe root 'properties' is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", "type": "string" + }, + "properties": { + "description": "The properties to update.", + "$ref": "SpreadsheetProperties" } }, "id": "UpdateSpreadsheetPropertiesRequest" }, + "ProtectedRange": { + "description": "A protected range.", + "type": "object", + "properties": { + "description": { + "description": "The description of this protected range.", + "type": "string" + }, + "unprotectedRanges": { + "description": "The list of unprotected ranges within a protected sheet.\nUnprotected ranges are only supported on protected sheets.", + "items": { + "$ref": "GridRange" + }, + "type": "array" + }, + "namedRangeId": { + "description": "The named range this protected range is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", + "type": "string" + }, + "protectedRangeId": { + "format": "int32", + "description": "The ID of the protected range.\nThis field is read-only.", + "type": "integer" + }, + "warningOnly": { + "description": "True if this protected range will show a warning when editing.\nWarning-based protection means that every user can edit data in the\nprotected range, except editing will prompt a warning asking the user\nto confirm the edit.\n\nWhen writing: if this field is true, then editors is ignored.\nAdditionally, if this field is changed from true to false and the\n`editors` field is not set (nor included in the field mask), then\nthe editors will be set to all the editors in the document.", + "type": "boolean" + }, + "requestingUserCanEdit": { + "description": "True if the user who requested this protected range can edit the\nprotected area.\nThis field is read-only.", + "type": "boolean" + }, + "range": { + "description": "The range that is being protected.\nThe range may be fully unbounded, in which case this is considered\na protected sheet.\n\nWhen writing, only one of range or named_range_id\nmay be set.", + "$ref": "GridRange" + }, + "editors": { + "$ref": "Editors", + "description": "The users and groups with edit access to the protected range.\nThis field is only visible to users with edit access to the protected\nrange and the document.\nEditors are not supported with warning_only protection." + } + }, + "id": "ProtectedRange" + }, "BatchUpdateValuesRequest": { "description": "The request for updating more than one range of values in a spreadsheet.", "type": "object", "properties": { "responseValueRenderOption": { - "enum": [ - "FORMATTED_VALUE", - "UNFORMATTED_VALUE", - "FORMULA" - ], "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", "type": "string", "enumDescriptions": [ "Values will be calculated & formatted in the reply according to the\ncell's formatting. Formatting is based on the spreadsheet's locale,\nnot the requesting user's locale.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return `\"$1.23\"`.", "Values will be calculated, but not formatted in the reply.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen `A2` would return the number `1.23`.", "Values will not be calculated. The reply will include the formulas.\nFor example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency,\nthen A2 would return `\"=A1\"`." + ], + "enum": [ + "FORMATTED_VALUE", + "UNFORMATTED_VALUE", + "FORMULA" ] }, "includeValuesInResponse": { @@ -4270,63 +5220,20 @@ "type": "string" }, "responseDateTimeRenderOption": { + "enum": [ + "SERIAL_NUMBER", + "FORMATTED_STRING" + ], "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is\nDateTimeRenderOption.SERIAL_NUMBER.", "type": "string", "enumDescriptions": [ "Instructs date, time, datetime, and duration fields to be output\nas doubles in \"serial number\" format, as popularized by Lotus 1-2-3.\nThe whole number portion of the value (left of the decimal) counts\nthe days since December 30th 1899. The fractional portion (right of\nthe decimal) counts the time as a fraction of the day. For example,\nJanuary 1st 1900 at noon would be 2.5, 2 because it's 2 days after\nDecember 30st 1899, and .5 because noon is half a day. February 1st\n1900 at 3pm would be 33.625. This correctly treats the year 1900 as\nnot a leap year.", "Instructs date, time, datetime, and duration fields to be output\nas strings in their given number format (which is dependent\non the spreadsheet locale)." - ], - "enum": [ - "SERIAL_NUMBER", - "FORMATTED_STRING" ] } }, "id": "BatchUpdateValuesRequest" }, - "ProtectedRange": { - "description": "A protected range.", - "type": "object", - "properties": { - "requestingUserCanEdit": { - "description": "True if the user who requested this protected range can edit the\nprotected area.\nThis field is read-only.", - "type": "boolean" - }, - "editors": { - "$ref": "Editors", - "description": "The users and groups with edit access to the protected range.\nThis field is only visible to users with edit access to the protected\nrange and the document.\nEditors are not supported with warning_only protection." - }, - "range": { - "$ref": "GridRange", - "description": "The range that is being protected.\nThe range may be fully unbounded, in which case this is considered\na protected sheet.\n\nWhen writing, only one of range or named_range_id\nmay be set." - }, - "description": { - "type": "string", - "description": "The description of this protected range." - }, - "unprotectedRanges": { - "description": "The list of unprotected ranges within a protected sheet.\nUnprotected ranges are only supported on protected sheets.", - "items": { - "$ref": "GridRange" - }, - "type": "array" - }, - "namedRangeId": { - "description": "The named range this protected range is backed by, if any.\n\nWhen writing, only one of range or named_range_id\nmay be set.", - "type": "string" - }, - "protectedRangeId": { - "format": "int32", - "description": "The ID of the protected range.\nThis field is read-only.", - "type": "integer" - }, - "warningOnly": { - "description": "True if this protected range will show a warning when editing.\nWarning-based protection means that every user can edit data in the\nprotected range, except editing will prompt a warning asking the user\nto confirm the edit.\n\nWhen writing: if this field is true, then editors is ignored.\nAdditionally, if this field is changed from true to false and the\n`editors` field is not set (nor included in the field mask), then\nthe editors will be set to all the editors in the document.", - "type": "boolean" - } - }, - "id": "ProtectedRange" - }, "DimensionProperties": { "description": "Properties about a dimension.", "type": "object", @@ -4337,46 +5244,46 @@ "type": "integer" }, "hiddenByUser": { - "type": "boolean", - "description": "True if this dimension is explicitly hidden." + "description": "True if this dimension is explicitly hidden.", + "type": "boolean" }, "hiddenByFilter": { "description": "True if this dimension is being filtered.\nThis field is read-only.", "type": "boolean" }, "developerMetadata": { + "description": "The developer metadata associated with a single row or column.", "items": { "$ref": "DeveloperMetadata" }, - "type": "array", - "description": "The developer metadata associated with a single row or column." + "type": "array" } }, "id": "DimensionProperties" }, + "NamedRange": { + "description": "A named range.", + "type": "object", + "properties": { + "name": { + "description": "The name of the named range.", + "type": "string" + }, + "namedRangeId": { + "description": "The ID of the named range.", + "type": "string" + }, + "range": { + "$ref": "GridRange", + "description": "The range this represents." + } + }, + "id": "NamedRange" + }, "DimensionRange": { "description": "A range along a single dimension on a sheet.\nAll indexes are zero-based.\nIndexes are half open: the start index is inclusive\nand the end index is exclusive.\nMissing indexes indicate the range is unbounded on that side.", "type": "object", "properties": { - "sheetId": { - "type": "integer", - "format": "int32", - "description": "The sheet this span is on." - }, - "dimension": { - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The dimension of the span.", - "type": "string" - }, "endIndex": { "format": "int32", "description": "The end (exclusive) of the span, or not set if unbounded.", @@ -4386,46 +5293,36 @@ "format": "int32", "description": "The start (inclusive) of the span, or not set if unbounded.", "type": "integer" + }, + "sheetId": { + "format": "int32", + "description": "The sheet this span is on.", + "type": "integer" + }, + "dimension": { + "enum": [ + "DIMENSION_UNSPECIFIED", + "ROWS", + "COLUMNS" + ], + "description": "The dimension of the span.", + "type": "string", + "enumDescriptions": [ + "The default value, do not use.", + "Operates on the rows of a sheet.", + "Operates on the columns of a sheet." + ] } }, "id": "DimensionRange" }, - "NamedRange": { - "type": "object", - "properties": { - "namedRangeId": { - "type": "string", - "description": "The ID of the named range." - }, - "range": { - "description": "The range this represents.", - "$ref": "GridRange" - }, - "name": { - "description": "The name of the named range.", - "type": "string" - } - }, - "id": "NamedRange", - "description": "A named range." - }, "CutPasteRequest": { - "type": "object", "properties": { "destination": { - "description": "The top-left coordinate where the data should be pasted.", - "$ref": "GridCoordinate" + "$ref": "GridCoordinate", + "description": "The top-left coordinate where the data should be pasted." }, "pasteType": { - "enum": [ - "PASTE_NORMAL", - "PASTE_VALUES", - "PASTE_FORMAT", - "PASTE_NO_BORDERS", - "PASTE_FORMULA", - "PASTE_DATA_VALIDATION", - "PASTE_CONDITIONAL_FORMATTING" - ], "description": "What kind of data to paste. All the source data will be cut, regardless\nof what is pasted.", "type": "string", "enumDescriptions": [ @@ -4436,954 +5333,57 @@ "Paste the formulas only.", "Paste the data validation only.", "Paste the conditional formatting rules only." + ], + "enum": [ + "PASTE_NORMAL", + "PASTE_VALUES", + "PASTE_FORMAT", + "PASTE_NO_BORDERS", + "PASTE_FORMULA", + "PASTE_DATA_VALIDATION", + "PASTE_CONDITIONAL_FORMATTING" ] }, "source": { - "description": "The source data to cut.", - "$ref": "GridRange" + "$ref": "GridRange", + "description": "The source data to cut." } }, "id": "CutPasteRequest", - "description": "Moves data from the source to the destination." - }, - "Borders": { - "description": "The borders of the cell.", - "type": "object", - "properties": { - "left": { - "description": "The left border of the cell.", - "$ref": "Border" - }, - "right": { - "$ref": "Border", - "description": "The right border of the cell." - }, - "bottom": { - "$ref": "Border", - "description": "The bottom border of the cell." - }, - "top": { - "$ref": "Border", - "description": "The top border of the cell." - } - }, - "id": "Borders" - }, - "BasicChartSeries": { - "description": "A single series of data in a chart.\nFor example, if charting stock prices over time, multiple series may exist,\none for the \"Open Price\", \"High Price\", \"Low Price\" and \"Close Price\".", - "type": "object", - "properties": { - "type": { - "enum": [ - "BASIC_CHART_TYPE_UNSPECIFIED", - "BAR", - "LINE", - "AREA", - "COLUMN", - "SCATTER", - "COMBO", - "STEPPED_AREA" - ], - "description": "The type of this series. Valid only if the\nchartType is\nCOMBO.\nDifferent types will change the way the series is visualized.\nOnly LINE, AREA,\nand COLUMN are supported.", - "type": "string", - "enumDescriptions": [ - "Default value, do not use.", - "A \u003ca href=\"/chart/interactive/docs/gallery/barchart\"\u003ebar chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/linechart\"\u003eline chart\u003c/a\u003e.", - "An \u003ca href=\"/chart/interactive/docs/gallery/areachart\"\u003earea chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/columnchart\"\u003ecolumn chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/scatterchart\"\u003escatter chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/combochart\"\u003ecombo chart\u003c/a\u003e.", - "A \u003ca href=\"/chart/interactive/docs/gallery/steppedareachart\"\u003estepped area chart\u003c/a\u003e." - ] - }, - "series": { - "$ref": "ChartData", - "description": "The data being visualized in this chart series." - }, - "targetAxis": { - "enumDescriptions": [ - "Default value, do not use.", - "The axis rendered at the bottom of a chart.\nFor most charts, this is the standard major axis.\nFor bar charts, this is a minor axis.", - "The axis rendered at the left of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is the standard major axis.", - "The axis rendered at the right of a chart.\nFor most charts, this is a minor axis.\nFor bar charts, this is an unusual major axis." - ], - "enum": [ - "BASIC_CHART_AXIS_POSITION_UNSPECIFIED", - "BOTTOM_AXIS", - "LEFT_AXIS", - "RIGHT_AXIS" - ], - "description": "The minor axis that will specify the range of values for this series.\nFor example, if charting stocks over time, the \"Volume\" series\nmay want to be pinned to the right with the prices pinned to the left,\nbecause the scale of trading volume is different than the scale of\nprices.\nIt is an error to specify an axis that isn't a valid minor axis\nfor the chart's type.", - "type": "string" - } - }, - "id": "BasicChartSeries" - }, - "AutoResizeDimensionsRequest": { - "description": "Automatically resizes one or more dimensions based on the contents\nof the cells in that dimension.", - "type": "object", - "properties": { - "dimensions": { - "$ref": "DimensionRange", - "description": "The dimensions to automatically resize." - } - }, - "id": "AutoResizeDimensionsRequest" - }, - "UpdateBordersRequest": { - "description": "Updates the borders of a range.\nIf a field is not set in the request, that means the border remains as-is.\nFor example, with two subsequent UpdateBordersRequest:\n\n 1. range: A1:A5 `{ top: RED, bottom: WHITE }`\n 2. range: A1:A5 `{ left: BLUE }`\n\nThat would result in A1:A5 having a borders of\n`{ top: RED, bottom: WHITE, left: BLUE }`.\nIf you want to clear a border, explicitly set the style to\nNONE.", - "type": "object", - "properties": { - "bottom": { - "$ref": "Border", - "description": "The border to put at the bottom of the range." - }, - "innerVertical": { - "description": "The vertical border to put within the range.", - "$ref": "Border" - }, - "right": { - "$ref": "Border", - "description": "The border to put at the right of the range." - }, - "range": { - "description": "The range whose borders should be updated.", - "$ref": "GridRange" - }, - "innerHorizontal": { - "description": "The horizontal border to put within the range.", - "$ref": "Border" - }, - "top": { - "description": "The border to put at the top of the range.", - "$ref": "Border" - }, - "left": { - "$ref": "Border", - "description": "The border to put at the left of the range." - } - }, - "id": "UpdateBordersRequest" - }, - "CellFormat": { - "id": "CellFormat", - "description": "The format of a cell.", - "type": "object", - "properties": { - "numberFormat": { - "$ref": "NumberFormat", - "description": "A format describing how number values should be represented to the user." - }, - "hyperlinkDisplayType": { - "type": "string", - "enumDescriptions": [ - "The default value: the hyperlink is rendered. Do not use this.", - "A hyperlink should be explicitly rendered.", - "A hyperlink should not be rendered." - ], - "enum": [ - "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED", - "LINKED", - "PLAIN_TEXT" - ], - "description": "How a hyperlink, if it exists, should be displayed in the cell." - }, - "horizontalAlignment": { - "enumDescriptions": [ - "The horizontal alignment is not specified. Do not use this.", - "The text is explicitly aligned to the left of the cell.", - "The text is explicitly aligned to the center of the cell.", - "The text is explicitly aligned to the right of the cell." - ], - "enum": [ - "HORIZONTAL_ALIGN_UNSPECIFIED", - "LEFT", - "CENTER", - "RIGHT" - ], - "description": "The horizontal alignment of the value in the cell.", - "type": "string" - }, - "textFormat": { - "description": "The format of the text in the cell (unless overridden by a format run).", - "$ref": "TextFormat" - }, - "backgroundColor": { - "$ref": "Color", - "description": "The background color of the cell." - }, - "verticalAlignment": { - "type": "string", - "enumDescriptions": [ - "The vertical alignment is not specified. Do not use this.", - "The text is explicitly aligned to the top of the cell.", - "The text is explicitly aligned to the middle of the cell.", - "The text is explicitly aligned to the bottom of the cell." - ], - "enum": [ - "VERTICAL_ALIGN_UNSPECIFIED", - "TOP", - "MIDDLE", - "BOTTOM" - ], - "description": "The vertical alignment of the value in the cell." - }, - "padding": { - "$ref": "Padding", - "description": "The padding of the cell." - }, - "textDirection": { - "enumDescriptions": [ - "The text direction is not specified. Do not use this.", - "The text direction of left-to-right was set by the user.", - "The text direction of right-to-left was set by the user." - ], - "enum": [ - "TEXT_DIRECTION_UNSPECIFIED", - "LEFT_TO_RIGHT", - "RIGHT_TO_LEFT" - ], - "description": "The direction of the text in the cell.", - "type": "string" - }, - "borders": { - "description": "The borders of the cell.", - "$ref": "Borders" - }, - "wrapStrategy": { - "enum": [ - "WRAP_STRATEGY_UNSPECIFIED", - "OVERFLOW_CELL", - "LEGACY_WRAP", - "CLIP", - "WRAP" - ], - "description": "The wrap strategy for the value in the cell.", - "type": "string", - "enumDescriptions": [ - "The default value, do not use.", - "Lines that are longer than the cell width will be written in the next\ncell over, so long as that cell is empty. If the next cell over is\nnon-empty, this behaves the same as CLIP. The text will never wrap\nto the next line unless the user manually inserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline that is very long. \u003c- Text continues into next cell\n | Next newline. |", - "This wrap strategy represents the old Google Sheets wrap strategy where\nwords that are longer than a line are clipped rather than broken. This\nstrategy is not supported on all platforms and is being phased out.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is clipped.\n | word. |", - "Lines that are longer than the cell width will be clipped.\nThe text will never wrap to the next line unless the user manually\ninserts a new line.\nExample:\n\n | First sentence. |\n | Manual newline t| \u003c- Text is clipped\n | Next newline. |", - "Words that are longer than a line are wrapped at the character level\nrather than clipped.\nExample:\n\n | Cell has a |\n | loooooooooo| \u003c- Word is broken.\n | ong word. |" - ] - }, - "textRotation": { - "$ref": "TextRotation", - "description": "The rotation applied to text in a cell" - } - } - }, - "ClearValuesResponse": { - "id": "ClearValuesResponse", - "description": "The response when clearing a range of values in a spreadsheet.", - "type": "object", - "properties": { - "clearedRange": { - "description": "The range (in A1 notation) that was cleared.\n(If the request was for an unbounded range or a ranger larger\n than the bounds of the sheet, this will be the actual range\n that was cleared, bounded to the sheet's limits.)", - "type": "string" - }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - } - } - }, - "DeleteConditionalFormatRuleRequest": { - "type": "object", - "properties": { - "index": { - "format": "int32", - "description": "The zero-based index of the rule to be deleted.", - "type": "integer" - }, - "sheetId": { - "format": "int32", - "description": "The sheet the rule is being deleted from.", - "type": "integer" - } - }, - "id": "DeleteConditionalFormatRuleRequest", - "description": "Deletes a conditional format rule at the given index.\nAll subsequent rules' indexes are decremented." - }, - "AddBandingResponse": { - "id": "AddBandingResponse", - "description": "The result of adding a banded range.", - "type": "object", - "properties": { - "bandedRange": { - "description": "The banded range that was added.", - "$ref": "BandedRange" - } - } - }, - "DeleteNamedRangeRequest": { - "description": "Removes the named range with the given ID from the spreadsheet.", - "type": "object", - "properties": { - "namedRangeId": { - "description": "The ID of the named range to delete.", - "type": "string" - } - }, - "id": "DeleteNamedRangeRequest" - }, - "ChartData": { - "type": "object", - "properties": { - "sourceRange": { - "description": "The source ranges of the data.", - "$ref": "ChartSourceRange" - } - }, - "id": "ChartData", - "description": "The data included in a domain or series." - }, - "BatchGetValuesResponse": { - "properties": { - "valueRanges": { - "description": "The requested values. The order of the ValueRanges is the same as the\norder of the requested ranges.", - "items": { - "$ref": "ValueRange" - }, - "type": "array" - }, - "spreadsheetId": { - "description": "The ID of the spreadsheet the data was retrieved from.", - "type": "string" - } - }, - "id": "BatchGetValuesResponse", - "description": "The response when retrieving more than one range of values in a spreadsheet.", + "description": "Moves data from the source to the destination.", "type": "object" - }, - "UpdateBandingRequest": { - "description": "Updates properties of the supplied banded range.", - "type": "object", - "properties": { - "bandedRange": { - "description": "The banded range to update with the new properties.", - "$ref": "BandedRange" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `bandedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - } - }, - "id": "UpdateBandingRequest" - }, - "Color": { - "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", - "type": "object", - "properties": { - "alpha": { - "format": "float", - "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", - "type": "number" - }, - "blue": { - "format": "float", - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "type": "number" - }, - "green": { - "format": "float", - "description": "The amount of green in the color as a value in the interval [0, 1].", - "type": "number" - }, - "red": { - "format": "float", - "description": "The amount of red in the color as a value in the interval [0, 1].", - "type": "number" - } - }, - "id": "Color" - }, - "PivotGroup": { - "description": "A single grouping (either row or column) in a pivot table.", - "type": "object", - "properties": { - "valueBucket": { - "$ref": "PivotGroupSortValueBucket", - "description": "The bucket of the opposite pivot group to sort by.\nIf not specified, sorting is alphabetical by this group's values." - }, - "valueMetadata": { - "description": "Metadata about values in the grouping.", - "items": { - "$ref": "PivotGroupValueMetadata" - }, - "type": "array" - }, - "showTotals": { - "description": "True if the pivot table should include the totals for this grouping.", - "type": "boolean" - }, - "sourceColumnOffset": { - "format": "int32", - "description": "The column offset of the source range that this grouping is based on.\n\nFor example, if the source was `C10:E15`, a `sourceColumnOffset` of `0`\nmeans this group refers to column `C`, whereas the offset `1` would refer\nto column `D`.", - "type": "integer" - }, - "sortOrder": { - "enumDescriptions": [ - "Default value, do not use this.", - "Sort ascending.", - "Sort descending." - ], - "enum": [ - "SORT_ORDER_UNSPECIFIED", - "ASCENDING", - "DESCENDING" - ], - "description": "The order the values in this group should be sorted.", - "type": "string" - } - }, - "id": "PivotGroup" - }, - "PivotTable": { - "id": "PivotTable", - "description": "A pivot table.", - "type": "object", - "properties": { - "criteria": { - "description": "An optional mapping of filters per source column offset.\n\nThe filters will be applied before aggregating data into the pivot table.\nThe map's key is the column offset of the source range that you want to\nfilter, and the value is the criteria for that column.\n\nFor example, if the source was `C10:E15`, a key of `0` will have the filter\nfor column `C`, whereas the key `1` is for column `D`.", - "type": "object", - "additionalProperties": { - "$ref": "PivotFilterCriteria" - } - }, - "rows": { - "description": "Each row grouping in the pivot table.", - "items": { - "$ref": "PivotGroup" - }, - "type": "array" - }, - "valueLayout": { - "enum": [ - "HORIZONTAL", - "VERTICAL" - ], - "description": "Whether values should be listed horizontally (as columns)\nor vertically (as rows).", - "type": "string", - "enumDescriptions": [ - "Values are laid out horizontally (as columns).", - "Values are laid out vertically (as rows)." - ] - }, - "values": { - "description": "A list of values to include in the pivot table.", - "items": { - "$ref": "PivotValue" - }, - "type": "array" - }, - "source": { - "$ref": "GridRange", - "description": "The range the pivot table is reading data from." - }, - "columns": { - "description": "Each column grouping in the pivot table.", - "items": { - "$ref": "PivotGroup" - }, - "type": "array" - } - } - }, - "ChartSourceRange": { - "description": "Source ranges for a chart.", - "type": "object", - "properties": { - "sources": { - "description": "The ranges of data for a series or domain.\nExactly one dimension must have a length of 1,\nand all sources in the list must have the same dimension\nwith length 1.\nThe domain (if it exists) & all series must have the same number\nof source ranges. If using more than one source range, then the source\nrange at a given offset must be contiguous across the domain and series.\n\nFor example, these are valid configurations:\n\n domain sources: A1:A5\n series1 sources: B1:B5\n series2 sources: D6:D10\n\n domain sources: A1:A5, C10:C12\n series1 sources: B1:B5, D10:D12\n series2 sources: C1:C5, E10:E12", - "items": { - "$ref": "GridRange" - }, - "type": "array" - } - }, - "id": "ChartSourceRange" - }, - "SearchDeveloperMetadataResponse": { - "description": "A reply to a developer metadata search request.", - "type": "object", - "properties": { - "matchedDeveloperMetadata": { - "description": "The metadata matching the criteria of the search request.", - "items": { - "$ref": "MatchedDeveloperMetadata" - }, - "type": "array" - } - }, - "id": "SearchDeveloperMetadataResponse" - }, - "AppendCellsRequest": { - "description": "Adds new cells after the last row with data in a sheet,\ninserting new rows into the sheet if necessary.", - "type": "object", - "properties": { - "sheetId": { - "format": "int32", - "description": "The sheet ID to append the data to.", - "type": "integer" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - }, - "rows": { - "items": { - "$ref": "RowData" - }, - "type": "array", - "description": "The data to append." - } - }, - "id": "AppendCellsRequest" - }, - "ValueRange": { - "type": "object", - "properties": { - "range": { - "description": "The range the values cover, in A1 notation.\nFor output, this range indicates the entire requested range,\neven though the values will exclude trailing rows and columns.\nWhen appending values, this field represents the range to search for a\ntable, after which values will be appended.", - "type": "string" - }, - "values": { - "description": "The data that was read or to be written. This is an array of arrays,\nthe outer array representing all the data and each inner array\nrepresenting a major dimension. Each item in the inner array\ncorresponds with one cell.\n\nFor output, empty trailing rows and columns will not be included.\n\nFor input, supported value types are: bool, string, and double.\nNull values will be skipped.\nTo set a cell to an empty value, set the string value to an empty string.", - "items": { - "items": { - "type": "any" - }, - "type": "array" - }, - "type": "array" - }, - "majorDimension": { - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ], - "description": "The major dimension of the values.\n\nFor output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.\n\nFor input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]`\nwill set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS`\nthen `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.\n\nWhen writing, if this field is not set, it defaults to ROWS.", - "type": "string", - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ] - } - }, - "id": "ValueRange", - "description": "Data within a range of the spreadsheet." - }, - "AddBandingRequest": { - "description": "Adds a new banded range to the spreadsheet.", - "type": "object", - "properties": { - "bandedRange": { - "description": "The banded range to add. The bandedRangeId\nfield is optional; if one is not set, an id will be randomly generated. (It\nis an error to specify the ID of a range that already exists.)", - "$ref": "BandedRange" - } - }, - "id": "AddBandingRequest" - }, - "Response": { - "description": "A single response from an update.", - "type": "object", - "properties": { - "addNamedRange": { - "$ref": "AddNamedRangeResponse", - "description": "A reply from adding a named range." - }, - "deleteDeveloperMetadata": { - "description": "A reply from deleting a developer metadata entry.", - "$ref": "DeleteDeveloperMetadataResponse" - }, - "addFilterView": { - "$ref": "AddFilterViewResponse", - "description": "A reply from adding a filter view." - }, - "addBanding": { - "$ref": "AddBandingResponse", - "description": "A reply from adding a banded range." - }, - "addProtectedRange": { - "$ref": "AddProtectedRangeResponse", - "description": "A reply from adding a protected range." - }, - "duplicateSheet": { - "$ref": "DuplicateSheetResponse", - "description": "A reply from duplicating a sheet." - }, - "updateEmbeddedObjectPosition": { - "description": "A reply from updating an embedded object's position.", - "$ref": "UpdateEmbeddedObjectPositionResponse" - }, - "deleteConditionalFormatRule": { - "$ref": "DeleteConditionalFormatRuleResponse", - "description": "A reply from deleting a conditional format rule." - }, - "duplicateFilterView": { - "$ref": "DuplicateFilterViewResponse", - "description": "A reply from duplicating a filter view." - }, - "addChart": { - "$ref": "AddChartResponse", - "description": "A reply from adding a chart." - }, - "updateDeveloperMetadata": { - "$ref": "UpdateDeveloperMetadataResponse", - "description": "A reply from updating a developer metadata entry." - }, - "findReplace": { - "description": "A reply from doing a find/replace.", - "$ref": "FindReplaceResponse" - }, - "addSheet": { - "description": "A reply from adding a sheet.", - "$ref": "AddSheetResponse" - }, - "createDeveloperMetadata": { - "$ref": "CreateDeveloperMetadataResponse", - "description": "A reply from creating a developer metadata entry." - }, - "updateConditionalFormatRule": { - "$ref": "UpdateConditionalFormatRuleResponse", - "description": "A reply from updating a conditional format rule." - } - }, - "id": "Response" - }, - "InsertRangeRequest": { - "type": "object", - "properties": { - "shiftDimension": { - "description": "The dimension which will be shifted when inserting cells.\nIf ROWS, existing cells will be shifted down.\nIf COLUMNS, existing cells will be shifted right.", - "type": "string", - "enumDescriptions": [ - "The default value, do not use.", - "Operates on the rows of a sheet.", - "Operates on the columns of a sheet." - ], - "enum": [ - "DIMENSION_UNSPECIFIED", - "ROWS", - "COLUMNS" - ] - }, - "range": { - "description": "The range to insert new cells into.", - "$ref": "GridRange" - } - }, - "id": "InsertRangeRequest", - "description": "Inserts cells into a range, shifting the existing cells over or down." - }, - "TextFormatRun": { - "properties": { - "startIndex": { - "format": "int32", - "description": "The character index where this run starts.", - "type": "integer" - }, - "format": { - "$ref": "TextFormat", - "description": "The format of this run. Absent values inherit the cell's format." - } - }, - "id": "TextFormatRun", - "description": "A run of a text format. The format of this run continues until the start\nindex of the next run.\nWhen updating, all fields must be set.", - "type": "object" - }, - "EmbeddedChart": { - "description": "A chart embedded in a sheet.", - "type": "object", - "properties": { - "chartId": { - "format": "int32", - "description": "The ID of the chart.", - "type": "integer" - }, - "position": { - "$ref": "EmbeddedObjectPosition", - "description": "The position of the chart." - }, - "spec": { - "$ref": "ChartSpec", - "description": "The specification of the chart." - } - }, - "id": "EmbeddedChart" - }, - "AddNamedRangeResponse": { - "type": "object", - "properties": { - "namedRange": { - "description": "The named range to add.", - "$ref": "NamedRange" - } - }, - "id": "AddNamedRangeResponse", - "description": "The result of adding a named range." - }, - "BatchUpdateValuesByDataFilterResponse": { - "id": "BatchUpdateValuesByDataFilterResponse", - "description": "The response when updating a range of values in a spreadsheet.", - "type": "object", - "properties": { - "totalUpdatedRows": { - "format": "int32", - "description": "The total number of rows where at least one cell in the row was updated.", - "type": "integer" - }, - "responses": { - "description": "The response for each range updated.", - "items": { - "$ref": "UpdateValuesByDataFilterResponse" - }, - "type": "array" - }, - "totalUpdatedSheets": { - "format": "int32", - "description": "The total number of sheets where at least one cell in the sheet was\nupdated.", - "type": "integer" - }, - "totalUpdatedCells": { - "type": "integer", - "format": "int32", - "description": "The total number of cells updated." - }, - "totalUpdatedColumns": { - "format": "int32", - "description": "The total number of columns where at least one cell in the column was\nupdated.", - "type": "integer" - }, - "spreadsheetId": { - "description": "The spreadsheet the updates were applied to.", - "type": "string" - } - } - }, - "RowData": { - "description": "Data about each cell in a row.", - "type": "object", - "properties": { - "values": { - "items": { - "$ref": "CellData" - }, - "type": "array", - "description": "The values in the row, one per column." - } - }, - "id": "RowData" - }, - "GridData": { - "id": "GridData", - "description": "Data in the grid, as well as metadata about the dimensions.", - "type": "object", - "properties": { - "rowMetadata": { - "description": "Metadata about the requested rows in the grid, starting with the row\nin start_row.", - "items": { - "$ref": "DimensionProperties" - }, - "type": "array" - }, - "rowData": { - "description": "The data in the grid, one entry per row,\nstarting with the row in startRow.\nThe values in RowData will correspond to columns starting\nat start_column.", - "items": { - "$ref": "RowData" - }, - "type": "array" - }, - "startRow": { - "format": "int32", - "description": "The first row this GridData refers to, zero-based.", - "type": "integer" - }, - "columnMetadata": { - "description": "Metadata about the requested columns in the grid, starting with the column\nin start_column.", - "items": { - "$ref": "DimensionProperties" - }, - "type": "array" - }, - "startColumn": { - "format": "int32", - "description": "The first column this GridData refers to, zero-based.", - "type": "integer" - } - } - }, - "Border": { - "description": "A border along a cell.", - "type": "object", - "properties": { - "style": { - "description": "The style of the border.", - "type": "string", - "enumDescriptions": [ - "The style is not specified. Do not use this.", - "The border is dotted.", - "The border is dashed.", - "The border is a thin solid line.", - "The border is a medium solid line.", - "The border is a thick solid line.", - "No border.\nUsed only when updating a border in order to erase it.", - "The border is two solid lines." - ], - "enum": [ - "STYLE_UNSPECIFIED", - "DOTTED", - "DASHED", - "SOLID", - "SOLID_MEDIUM", - "SOLID_THICK", - "NONE", - "DOUBLE" - ] - }, - "color": { - "$ref": "Color", - "description": "The color of the border." - }, - "width": { - "format": "int32", - "description": "The width of the border, in pixels.\nDeprecated; the width is determined by the \"style\" field.", - "type": "integer" - } - }, - "id": "Border" - }, - "FindReplaceRequest": { - "type": "object", - "properties": { - "matchCase": { - "description": "True if the search is case sensitive.", - "type": "boolean" - }, - "allSheets": { - "description": "True to find/replace over all sheets.", - "type": "boolean" - }, - "includeFormulas": { - "description": "True if the search should include cells with formulas.\nFalse to skip cells with formulas.", - "type": "boolean" - }, - "matchEntireCell": { - "description": "True if the find value should match the entire cell.", - "type": "boolean" - }, - "searchByRegex": { - "type": "boolean", - "description": "True if the find value is a regex.\nThe regular expression and replacement should follow Java regex rules\nat https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.\nThe replacement string is allowed to refer to capturing groups.\nFor example, if one cell has the contents `\"Google Sheets\"` and another\nhas `\"Google Docs\"`, then searching for `\"o.* (.*)\"` with a replacement of\n`\"$1 Rocks\"` would change the contents of the cells to\n`\"GSheets Rocks\"` and `\"GDocs Rocks\"` respectively." - }, - "find": { - "description": "The value to search.", - "type": "string" - }, - "replacement": { - "description": "The value to use as the replacement.", - "type": "string" - }, - "range": { - "description": "The range to find/replace over.", - "$ref": "GridRange" - }, - "sheetId": { - "format": "int32", - "description": "The sheet to find/replace over.", - "type": "integer" - } - }, - "id": "FindReplaceRequest", - "description": "Finds and replaces data in cells over a range, sheet, or all sheets." - }, - "UpdateNamedRangeRequest": { - "description": "Updates properties of the named range with the specified\nnamedRangeId.", - "type": "object", - "properties": { - "namedRange": { - "description": "The named range to update with the new properties.", - "$ref": "NamedRange" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated. At least one field must be specified.\nThe root `namedRange` is implied and should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - } - }, - "id": "UpdateNamedRangeRequest" - }, - "AddSheetRequest": { - "properties": { - "properties": { - "$ref": "SheetProperties", - "description": "The properties the new sheet should have.\nAll properties are optional.\nThe sheetId field is optional; if one is not\nset, an id will be randomly generated. (It is an error to specify the ID\nof a sheet that already exists.)" - } - }, - "id": "AddSheetRequest", - "description": "Adds a new sheet.\nWhen a sheet is added at a given index,\nall subsequent sheets' indexes are incremented.\nTo add an object sheet, use AddChartRequest instead and specify\nEmbeddedObjectPosition.sheetId or\nEmbeddedObjectPosition.newSheet.", - "type": "object" - }, - "UpdateCellsRequest": { - "properties": { - "range": { - "$ref": "GridRange", - "description": "The range to write data to.\n\nIf the data in rows does not cover the entire requested range,\nthe fields matching those set in fields will be cleared." - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields of CellData that should be updated.\nAt least one field must be specified.\nThe root is the CellData; 'row.values.' should not be specified.\nA single `\"*\"` can be used as short-hand for listing every field.", - "type": "string" - }, - "rows": { - "description": "The data to write.", - "items": { - "$ref": "RowData" - }, - "type": "array" - }, - "start": { - "description": "The coordinate to start writing data at.\nAny number of rows and columns (including a different number of\ncolumns per row) may be written.", - "$ref": "GridCoordinate" - } - }, - "id": "UpdateCellsRequest", - "description": "Updates all cells in a range with new data.", - "type": "object" - }, - "DeleteConditionalFormatRuleResponse": { - "id": "DeleteConditionalFormatRuleResponse", - "description": "The result of deleting a conditional format rule.", - "type": "object", - "properties": { - "rule": { - "$ref": "ConditionalFormatRule", - "description": "The rule that was deleted." - } - } - }, - "RandomizeRangeRequest": { - "description": "Randomizes the order of the rows in a range.", - "type": "object", - "properties": { - "range": { - "$ref": "GridRange", - "description": "The range to randomize." - } - }, - "id": "RandomizeRangeRequest" } }, "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest" + "protocol": "rest", + "canonicalName": "Sheets", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/drive.file": { + "description": "View and manage Google Drive files and folders that you have opened or created with this app" + }, + "https://www.googleapis.com/auth/spreadsheets.readonly": { + "description": "View your Google Spreadsheets" + }, + "https://www.googleapis.com/auth/drive.readonly": { + "description": "View the files in your Google Drive" + }, + "https://www.googleapis.com/auth/drive": { + "description": "View and manage the files in your Google Drive" + }, + "https://www.googleapis.com/auth/spreadsheets": { + "description": "View and manage your spreadsheets in Google Drive" + } + } + } + }, + "rootUrl": "https://sheets.googleapis.com/", + "ownerDomain": "google.com", + "name": "sheets", + "batchPath": "batch", + "title": "Google Sheets API" } diff --git a/vendor/google.golang.org/api/slides/v1/slides-api.json b/vendor/google.golang.org/api/slides/v1/slides-api.json index cbb6da34c..586ec9fc8 100644 --- a/vendor/google.golang.org/api/slides/v1/slides-api.json +++ b/vendor/google.golang.org/api/slides/v1/slides-api.json @@ -1,1905 +1,292 @@ { - "description": "An API for creating and editing Google Slides presentations.", + "rootUrl": "https://slides.googleapis.com/", + "ownerDomain": "google.com", + "name": "slides", + "batchPath": "batch", + "title": "Google Slides API", + "ownerName": "Google", + "resources": { + "presentations": { + "methods": { + "get": { + "flatPath": "v1/presentations/{presentationsId}", + "id": "slides.presentations.get", + "path": "v1/presentations/{+presentationId}", + "description": "Gets the latest version of the specified presentation.", + "response": { + "$ref": "Presentation" + }, + "parameterOrder": [ + "presentationId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/presentations.readonly" + ], + "parameters": { + "presentationId": { + "pattern": "^[^/]+$", + "location": "path", + "description": "The ID of the presentation to retrieve.", + "type": "string", + "required": true + } + } + }, + "batchUpdate": { + "httpMethod": "POST", + "parameterOrder": [ + "presentationId" + ], + "response": { + "$ref": "BatchUpdatePresentationResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/spreadsheets", + "https://www.googleapis.com/auth/spreadsheets.readonly" + ], + "parameters": { + "presentationId": { + "location": "path", + "description": "The presentation to apply the updates to.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/presentations/{presentationId}:batchUpdate", + "path": "v1/presentations/{presentationId}:batchUpdate", + "id": "slides.presentations.batchUpdate", + "request": { + "$ref": "BatchUpdatePresentationRequest" + }, + "description": "Applies one or more updates to the presentation.\n\nEach request is validated before\nbeing applied. If any request is not valid, then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how they are applied. Other requests do\nnot need to return information; these each return an empty reply.\nThe order of replies matches that of the requests.\n\nFor example, suppose you call batchUpdate with four updates, and only the\nthird one returns information. The response would have two empty replies:\nthe reply to the third request, and another empty reply, in that order.\n\nBecause other users may be editing the presentation, the presentation\nmight not exactly reflect your changes: your changes may\nbe altered with respect to collaborator changes. If there are no\ncollaborators, the presentation should reflect your changes. In any case,\nthe updates in your request are guaranteed to be applied together\natomically." + }, + "create": { + "description": "Creates a new presentation using the title given in the request. Other\nfields in the request are ignored.\nReturns the created presentation.", + "request": { + "$ref": "Presentation" + }, + "response": { + "$ref": "Presentation" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/presentations" + ], + "flatPath": "v1/presentations", + "id": "slides.presentations.create", + "path": "v1/presentations" + } + }, + "resources": { + "pages": { + "methods": { + "get": { + "response": { + "$ref": "Page" + }, + "parameterOrder": [ + "presentationId", + "pageObjectId" + ], + "httpMethod": "GET", + "parameters": { + "presentationId": { + "location": "path", + "description": "The ID of the presentation to retrieve.", + "type": "string", + "required": true + }, + "pageObjectId": { + "description": "The object ID of the page to retrieve.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/presentations.readonly" + ], + "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}", + "id": "slides.presentations.pages.get", + "path": "v1/presentations/{presentationId}/pages/{pageObjectId}", + "description": "Gets the latest version of the specified page in the presentation." + }, + "getThumbnail": { + "parameterOrder": [ + "presentationId", + "pageObjectId" + ], + "httpMethod": "GET", + "response": { + "$ref": "Thumbnail" + }, + "scopes": [ + "https://www.googleapis.com/auth/drive", + "https://www.googleapis.com/auth/drive.readonly", + "https://www.googleapis.com/auth/presentations", + "https://www.googleapis.com/auth/presentations.readonly" + ], + "parameters": { + "thumbnailProperties.thumbnailSize": { + "location": "query", + "enum": [ + "THUMBNAIL_SIZE_UNSPECIFIED", + "LARGE" + ], + "description": "The optional thumbnail image size.\n\nIf you don't specify the size, the server chooses a default size of the\nimage.", + "type": "string" + }, + "thumbnailProperties.mimeType": { + "enum": [ + "PNG" + ], + "description": "The optional mime type of the thumbnail image.\n\nIf you don't specify the mime type, the default mime type will be PNG.", + "type": "string", + "location": "query" + }, + "presentationId": { + "type": "string", + "required": true, + "location": "path", + "description": "The ID of the presentation to retrieve." + }, + "pageObjectId": { + "description": "The object ID of the page whose thumbnail to retrieve.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", + "id": "slides.presentations.pages.getThumbnail", + "path": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", + "description": "Generates a thumbnail of the latest version of the specified page in the\npresentation and returns a URL to the thumbnail image." + } + } + } + } + } + }, + "parameters": { + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "quotaUser": { + "type": "string", + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ] + } + }, + "version": "v1", + "baseUrl": "https://slides.googleapis.com/", "kind": "discovery#restDescription", + "description": "An API for creating and editing Google Slides presentations.", "servicePath": "", "basePath": "", - "revision": "20170914", - "documentationLink": "https://developers.google.com/slides/", "id": "slides:v1", + "revision": "20170922", + "documentationLink": "https://developers.google.com/slides/", "discoveryVersion": "v1", "version_module": true, "schemas": { - "DeleteTextRequest": { - "description": "Deletes text from a shape or a table cell.", - "type": "object", - "properties": { - "textRange": { - "$ref": "Range", - "description": "The range of text to delete, based on TextElement indexes.\n\nThere is always an implicit newline character at the end of a shape's or\ntable cell's text that cannot be deleted. `Range.Type.ALL` will use the\ncorrect bounds, but care must be taken when specifying explicit bounds for\nrange types `FROM_START_INDEX` and `FIXED_RANGE`. For example, if the text\nis \"ABC\", followed by an implicit newline, then the maximum value is 2 for\n`text_range.start_index` and 3 for `text_range.end_index`.\n\nDeleting text that crosses a paragraph boundary may result in changes\nto paragraph styles and lists as the two paragraphs are merged.\n\nRanges that include only one code unit of a surrogate pair are expanded to\ninclude both code units." - }, - "objectId": { - "description": "The object ID of the shape or table from which the text will be deleted.", - "type": "string" - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The optional table cell location if the text is to be deleted from a table\ncell. If present, the object_id must refer to a table." - } - }, - "id": "DeleteTextRequest" - }, - "UpdatePageElementTransformRequest": { - "description": "Updates the transform of a page element.\n\nUpdating the transform of a group will change the absolute transform of the\npage elements in that group, which can change their visual appearance. See\nthe documentation for PageElement.transform for more details.", - "type": "object", - "properties": { - "applyMode": { - "enumDescriptions": [ - "Unspecified mode.", - "Applies the new AffineTransform matrix to the existing one, and\nreplaces the existing one with the resulting concatenation.", - "Replaces the existing AffineTransform matrix with the new one." - ], - "enum": [ - "APPLY_MODE_UNSPECIFIED", - "RELATIVE", - "ABSOLUTE" - ], - "description": "The apply mode of the transform update.", - "type": "string" - }, - "transform": { - "description": "The input transform matrix used to update the page element.", - "$ref": "AffineTransform" - }, - "objectId": { - "description": "The object ID of the page element to update.", - "type": "string" - } - }, - "id": "UpdatePageElementTransformRequest" - }, - "DeleteObjectRequest": { - "id": "DeleteObjectRequest", - "description": "Deletes an object, either pages or\npage elements, from the\npresentation.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the page or page element to delete.\n\nIf after a delete operation a group contains\nonly 1 or no page elements, the group is also deleted.\n\nIf a placeholder is deleted on a layout, any empty inheriting shapes are\nalso deleted.", - "type": "string" - } - } - }, - "Dimension": { - "description": "A magnitude in a single direction in the specified units.", - "type": "object", - "properties": { - "magnitude": { - "format": "double", - "description": "The magnitude.", - "type": "number" - }, - "unit": { - "description": "The units for magnitude.", - "type": "string", - "enumDescriptions": [ - "The units are unknown.", - "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", - "A point, 1/72 of an inch." - ], - "enum": [ - "UNIT_UNSPECIFIED", - "EMU", - "PT" - ] - } - }, - "id": "Dimension" - }, - "TextElement": { - "description": "A TextElement describes the content of a range of indices in the text content\nof a Shape or TableCell.", - "type": "object", - "properties": { - "textRun": { - "description": "A TextElement representing a run of text where all of the characters\nin the run have the same TextStyle.\n\nThe `start_index` and `end_index` of TextRuns will always be fully\ncontained in the index range of a single `paragraph_marker` TextElement.\nIn other words, a TextRun will never span multiple paragraphs.", - "$ref": "TextRun" - }, - "autoText": { - "$ref": "AutoText", - "description": "A TextElement representing a spot in the text that is dynamically\nreplaced with content that can change over time." - }, - "paragraphMarker": { - "$ref": "ParagraphMarker", - "description": "A marker representing the beginning of a new paragraph.\n\nThe `start_index` and `end_index` of this TextElement represent the\nrange of the paragraph. Other TextElements with an index range contained\ninside this paragraph's range are considered to be part of this\nparagraph. The range of indices of two separate paragraphs will never\noverlap." - }, - "endIndex": { - "type": "integer", - "format": "int32", - "description": "The zero-based end index of this text element, exclusive, in Unicode code\nunits." - }, - "startIndex": { - "type": "integer", - "format": "int32", - "description": "The zero-based start index of this text element, in Unicode code units." - } - }, - "id": "TextElement" - }, - "LineFill": { - "description": "The fill of the line.", - "type": "object", - "properties": { - "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" - } - }, - "id": "LineFill" - }, - "VideoProperties": { - "description": "The properties of the Video.", - "type": "object", - "properties": { - "outline": { - "$ref": "Outline", - "description": "The outline of the video. The default outline matches the defaults for new\nvideos created in the Slides editor." - } - }, - "id": "VideoProperties" - }, - "InsertTableRowsRequest": { - "description": "Inserts rows into a table.", - "type": "object", - "properties": { - "insertBelow": { - "type": "boolean", - "description": "Whether to insert new rows below the reference cell location.\n\n- `True`: insert below the cell.\n- `False`: insert above the cell." - }, - "number": { - "format": "int32", - "description": "The number of rows to be inserted. Maximum 20 per request.", - "type": "integer" - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The reference table cell location from which rows will be inserted.\n\nA new row will be inserted above (or below) the row where the reference\ncell is. If the reference cell is a merged cell, a new row will be\ninserted above (or below) the merged cell." - }, - "tableObjectId": { - "description": "The table to insert rows into.", - "type": "string" - } - }, - "id": "InsertTableRowsRequest" - }, - "LayoutProperties": { - "properties": { - "masterObjectId": { - "description": "The object ID of the master that this layout is based on.", - "type": "string" - }, - "name": { - "description": "The name of the layout.", - "type": "string" - }, - "displayName": { - "description": "The human-readable name of the layout.", - "type": "string" - } - }, - "id": "LayoutProperties", - "description": "The properties of Page are only\nrelevant for pages with page_type LAYOUT.", - "type": "object" - }, - "Presentation": { - "description": "A Google Slides presentation.", - "type": "object", - "properties": { - "locale": { - "description": "The locale of the presentation, as an IETF BCP 47 language tag.", - "type": "string" - }, - "masters": { - "description": "The slide masters in the presentation. A slide master contains all common\npage elements and the common properties for a set of layouts. They serve\nthree purposes:\n\n- Placeholder shapes on a master contain the default text styles and shape\n properties of all placeholder shapes on pages that use that master.\n- The master page properties define the common page properties inherited by\n its layouts.\n- Any other shapes on the master slide will appear on all slides using that\n master, regardless of their layout.", - "items": { - "$ref": "Page" - }, - "type": "array" - }, - "pageSize": { - "$ref": "Size", - "description": "The size of pages in the presentation." - }, - "presentationId": { - "description": "The ID of the presentation.", - "type": "string" - }, - "slides": { - "description": "The slides in the presentation.\nA slide inherits properties from a slide layout.", - "items": { - "$ref": "Page" - }, - "type": "array" - }, - "revisionId": { - "description": "The revision ID of the presentation. Can be used in update requests\nto assert that the presentation revision hasn't changed since the last\nread operation. Only populated if the user has edit access to the\npresentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", - "type": "string" - }, - "notesMaster": { - "description": "The notes master in the presentation. It serves three purposes:\n\n- Placeholder shapes on a notes master contain the default text styles and\n shape properties of all placeholder shapes on notes pages. Specifically,\n a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a\n `BODY` placeholder shape contains the speaker notes.\n- The notes master page properties define the common page properties\n inherited by all notes pages.\n- Any other shapes on the notes master will appear on all notes pages.\n\nThe notes master is read-only.", - "$ref": "Page" - }, - "title": { - "description": "The title of the presentation.", - "type": "string" - }, - "layouts": { - "description": "The layouts in the presentation. A layout is a template that determines\nhow content is arranged and styled on the slides that inherit from that\nlayout.", - "items": { - "$ref": "Page" - }, - "type": "array" - } - }, - "id": "Presentation" - }, - "LineProperties": { - "type": "object", - "properties": { - "weight": { - "$ref": "Dimension", - "description": "The thickness of the line." - }, - "lineFill": { - "$ref": "LineFill", - "description": "The fill of the line. The default line fill matches the defaults for new\nlines created in the Slides editor." - }, - "link": { - "$ref": "Link", - "description": "The hyperlink destination of the line. If unset, there is no link." - }, - "dashStyle": { - "description": "The dash style of the line.", - "type": "string", - "enumDescriptions": [ - "Unspecified dash style.", - "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", - "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", - "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", - "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", - "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", - "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." - ], - "enum": [ - "DASH_STYLE_UNSPECIFIED", - "SOLID", - "DOT", - "DASH", - "DASH_DOT", - "LONG_DASH", - "LONG_DASH_DOT" - ] - }, - "endArrow": { - "enumDescriptions": [ - "An unspecified arrow style.", - "No arrow.", - "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", - "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", - "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", - "Filled square.", - "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", - "Hollow arrow.", - "Hollow circle.", - "Hollow square.", - "Hollow diamond." - ], - "enum": [ - "ARROW_STYLE_UNSPECIFIED", - "NONE", - "STEALTH_ARROW", - "FILL_ARROW", - "FILL_CIRCLE", - "FILL_SQUARE", - "FILL_DIAMOND", - "OPEN_ARROW", - "OPEN_CIRCLE", - "OPEN_SQUARE", - "OPEN_DIAMOND" - ], - "description": "The style of the arrow at the end of the line.", - "type": "string" - }, - "startArrow": { - "type": "string", - "enumDescriptions": [ - "An unspecified arrow style.", - "No arrow.", - "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", - "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", - "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", - "Filled square.", - "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", - "Hollow arrow.", - "Hollow circle.", - "Hollow square.", - "Hollow diamond." - ], - "enum": [ - "ARROW_STYLE_UNSPECIFIED", - "NONE", - "STEALTH_ARROW", - "FILL_ARROW", - "FILL_CIRCLE", - "FILL_SQUARE", - "FILL_DIAMOND", - "OPEN_ARROW", - "OPEN_CIRCLE", - "OPEN_SQUARE", - "OPEN_DIAMOND" - ], - "description": "The style of the arrow at the beginning of the line." - } - }, - "id": "LineProperties", - "description": "The properties of the Line.\n\nWhen unset, these fields default to values that match the appearance of\nnew lines created in the Slides editor." - }, - "OpaqueColor": { - "description": "A themeable solid color value.", - "type": "object", - "properties": { - "rgbColor": { - "description": "An opaque RGB color.", - "$ref": "RgbColor" - }, - "themeColor": { - "enumDescriptions": [ - "Unspecified theme color. This value should not be used.", - "Represents the first dark color.", - "Represents the first light color.", - "Represents the second dark color.", - "Represents the second light color.", - "Represents the first accent color.", - "Represents the second accent color.", - "Represents the third accent color.", - "Represents the fourth accent color.", - "Represents the fifth accent color.", - "Represents the sixth accent color.", - "Represents the color to use for hyperlinks.", - "Represents the color to use for visited hyperlinks.", - "Represents the first text color.", - "Represents the first background color.", - "Represents the second text color.", - "Represents the second background color." - ], - "enum": [ - "THEME_COLOR_TYPE_UNSPECIFIED", - "DARK1", - "LIGHT1", - "DARK2", - "LIGHT2", - "ACCENT1", - "ACCENT2", - "ACCENT3", - "ACCENT4", - "ACCENT5", - "ACCENT6", - "HYPERLINK", - "FOLLOWED_HYPERLINK", - "TEXT1", - "BACKGROUND1", - "TEXT2", - "BACKGROUND2" - ], - "description": "An opaque theme color.", - "type": "string" - } - }, - "id": "OpaqueColor" - }, - "ImageProperties": { - "type": "object", - "properties": { - "cropProperties": { - "description": "The crop properties of the image. If not set, the image is not cropped.\nThis property is read-only.", - "$ref": "CropProperties" - }, - "recolor": { - "$ref": "Recolor", - "description": "The recolor effect of the image. If not set, the image is not recolored.\nThis property is read-only." - }, - "outline": { - "description": "The outline of the image. If not set, the the image has no outline.", - "$ref": "Outline" - }, - "brightness": { - "format": "float", - "description": "The brightness effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", - "type": "number" - }, - "transparency": { - "format": "float", - "description": "The transparency effect of the image. The value should be in the interval\n[0.0, 1.0], where 0 means no effect and 1 means completely transparent.\nThis property is read-only.", - "type": "number" - }, - "shadow": { - "description": "The shadow of the image. If not set, the image has no shadow. This property\nis read-only.", - "$ref": "Shadow" - }, - "link": { - "$ref": "Link", - "description": "The hyperlink destination of the image. If unset, there is no link." - }, - "contrast": { - "format": "float", - "description": "The contrast effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", - "type": "number" - } - }, - "id": "ImageProperties", - "description": "The properties of the Image." - }, - "ReplaceAllShapesWithImageResponse": { - "properties": { - "occurrencesChanged": { - "format": "int32", - "description": "The number of shapes replaced with images.", - "type": "integer" - } - }, - "id": "ReplaceAllShapesWithImageResponse", - "description": "The result of replacing shapes with an image.", - "type": "object" - }, - "Line": { - "description": "A PageElement kind representing a\nline, curved connector, or bent connector.", - "type": "object", - "properties": { - "lineType": { - "enumDescriptions": [ - "An unspecified line type.", - "Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType\n'straightConnector1'.", - "Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector2'.", - "Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector3'.", - "Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector4'.", - "Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector5'.", - "Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector2'.", - "Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector3'.", - "Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector4'.", - "Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector5'." - ], - "enum": [ - "TYPE_UNSPECIFIED", - "STRAIGHT_CONNECTOR_1", - "BENT_CONNECTOR_2", - "BENT_CONNECTOR_3", - "BENT_CONNECTOR_4", - "BENT_CONNECTOR_5", - "CURVED_CONNECTOR_2", - "CURVED_CONNECTOR_3", - "CURVED_CONNECTOR_4", - "CURVED_CONNECTOR_5" - ], - "description": "The type of the line.", - "type": "string" - }, - "lineProperties": { - "$ref": "LineProperties", - "description": "The properties of the line." - } - }, - "id": "Line" - }, - "CreateSheetsChartRequest": { - "description": "Creates an embedded Google Sheets chart.\n\nNOTE: Chart creation requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", - "type": "object", - "properties": { - "linkingMode": { - "enumDescriptions": [ - "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", - "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." - ], - "enum": [ - "NOT_LINKED_IMAGE", - "LINKED" - ], - "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", - "type": "string" - }, - "spreadsheetId": { - "description": "The ID of the Google Sheets spreadsheet that contains the chart.", - "type": "string" - }, - "chartId": { - "format": "int32", - "description": "The ID of the specific chart in the Google Sheets spreadsheet.", - "type": "integer" - }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf specified, the ID must be unique among all pages and page elements in\nthe presentation. The ID should start with a word character [a-zA-Z0-9_]\nand then followed by any number of the following characters [a-zA-Z0-9_-:].\nThe length of the ID should not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", - "type": "string" - }, - "elementProperties": { - "$ref": "PageElementProperties", - "description": "The element properties for the chart.\n\nWhen the aspect ratio of the provided size does not match the chart aspect\nratio, the chart is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation." - } - }, - "id": "CreateSheetsChartRequest" - }, - "BatchUpdatePresentationResponse": { - "description": "Response message from a batch update.", - "type": "object", - "properties": { - "replies": { - "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", - "items": { - "$ref": "Response" - }, - "type": "array" - }, - "presentationId": { - "description": "The presentation the updates were applied to.", - "type": "string" - } - }, - "id": "BatchUpdatePresentationResponse" - }, - "CreateImageResponse": { - "description": "The result of creating an image.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created image.", - "type": "string" - } - }, - "id": "CreateImageResponse" - }, - "SlideProperties": { - "properties": { - "masterObjectId": { - "description": "The object ID of the master that this slide is based on.", - "type": "string" - }, - "layoutObjectId": { - "description": "The object ID of the layout that this slide is based on.", - "type": "string" - }, - "notesPage": { - "$ref": "Page", - "description": "The notes page that this slide is associated with. It defines the visual\nappearance of a notes page when printing or exporting slides with speaker\nnotes. A notes page inherits properties from the\nnotes master.\nThe placeholder shape with type BODY on the notes page contains the speaker\nnotes for this slide. The ID of this shape is identified by the\nspeakerNotesObjectId field.\nThe notes page is read-only except for the text content and styles of the\nspeaker notes shape." - } - }, - "id": "SlideProperties", - "description": "The properties of Page that are only\nrelevant for pages with page_type SLIDE.", - "type": "object" - }, - "MasterProperties": { - "description": "The properties of Page that are only\nrelevant for pages with page_type MASTER.", - "type": "object", - "properties": { - "displayName": { - "description": "The human-readable name of the master.", - "type": "string" - } - }, - "id": "MasterProperties" - }, - "Response": { - "id": "Response", - "description": "A single response from an update.", - "type": "object", - "properties": { - "createTable": { - "$ref": "CreateTableResponse", - "description": "The result of creating a table." - }, - "replaceAllText": { - "$ref": "ReplaceAllTextResponse", - "description": "The result of replacing text." - }, - "createSlide": { - "description": "The result of creating a slide.", - "$ref": "CreateSlideResponse" - }, - "duplicateObject": { - "$ref": "DuplicateObjectResponse", - "description": "The result of duplicating an object." - }, - "createShape": { - "$ref": "CreateShapeResponse", - "description": "The result of creating a shape." - }, - "createLine": { - "description": "The result of creating a line.", - "$ref": "CreateLineResponse" - }, - "createImage": { - "$ref": "CreateImageResponse", - "description": "The result of creating an image." - }, - "createVideo": { - "description": "The result of creating a video.", - "$ref": "CreateVideoResponse" - }, - "replaceAllShapesWithSheetsChart": { - "description": "The result of replacing all shapes matching some criteria with a Google\nSheets chart.", - "$ref": "ReplaceAllShapesWithSheetsChartResponse" - }, - "createSheetsChart": { - "$ref": "CreateSheetsChartResponse", - "description": "The result of creating a Google Sheets chart." - }, - "replaceAllShapesWithImage": { - "$ref": "ReplaceAllShapesWithImageResponse", - "description": "The result of replacing all shapes matching some criteria with an\nimage." - } - } - }, - "SubstringMatchCriteria": { - "description": "A criteria that matches a specific string of text in a shape or table.", - "type": "object", - "properties": { - "matchCase": { - "description": "Indicates whether the search should respect case:\n\n- `True`: the search is case sensitive.\n- `False`: the search is case insensitive.", - "type": "boolean" - }, - "text": { - "description": "The text to search for in the shape or table.", - "type": "string" - } - }, - "id": "SubstringMatchCriteria" - }, - "LayoutReference": { - "description": "Slide layout reference. This may reference either:\n\n- A predefined layout\n- One of the layouts in the presentation.", - "type": "object", - "properties": { - "predefinedLayout": { - "description": "Predefined layout.", - "type": "string", - "enumDescriptions": [ - "Unspecified layout.", - "Blank layout, with no placeholders.", - "Layout with a caption at the bottom.", - "Layout with a title and a subtitle.", - "Layout with a title and body.", - "Layout with a title and two columns.", - "Layout with only a title.", - "Layout with a section title.", - "Layout with a title and subtitle on one side and description on the other.", - "Layout with one title and one body, arranged in a single column.", - "Layout with a main point.", - "Layout with a big number heading." - ], - "enum": [ - "PREDEFINED_LAYOUT_UNSPECIFIED", - "BLANK", - "CAPTION_ONLY", - "TITLE", - "TITLE_AND_BODY", - "TITLE_AND_TWO_COLUMNS", - "TITLE_ONLY", - "SECTION_HEADER", - "SECTION_TITLE_AND_DESCRIPTION", - "ONE_COLUMN_TEXT", - "MAIN_POINT", - "BIG_NUMBER" - ] - }, - "layoutId": { - "description": "Layout ID: the object ID of one of the layouts in the presentation.", - "type": "string" - } - }, - "id": "LayoutReference" - }, - "TextRun": { - "properties": { - "style": { - "$ref": "TextStyle", - "description": "The styling applied to this run." - }, - "content": { - "description": "The text of this run.", - "type": "string" - } - }, - "id": "TextRun", - "description": "A TextElement kind that represents a run of text that all has the same\nstyling.", - "type": "object" - }, - "TableRange": { - "description": "A table range represents a reference to a subset of a table.\n\nIt's important to note that the cells specified by a table range do not\nnecessarily form a rectangle. For example, let's say we have a 3 x 3 table\nwhere all the cells of the last row are merged together. The table looks\nlike this:\n\n \n [ ]\n\nA table range with location = (0, 0), row span = 3 and column span = 2\nspecifies the following cells:\n\n x x \n [ x ]", - "type": "object", - "properties": { - "rowSpan": { - "format": "int32", - "description": "The row span of the table range.", - "type": "integer" - }, - "location": { - "description": "The starting location of the table range.", - "$ref": "TableCellLocation" - }, - "columnSpan": { - "format": "int32", - "description": "The column span of the table range.", - "type": "integer" - } - }, - "id": "TableRange" - }, - "CreateTableRequest": { - "properties": { - "elementProperties": { - "$ref": "PageElementProperties", - "description": "The element properties for the table.\n\nThe table will be created at the provided size, subject to a minimum size.\nIf no size is provided, the table will be automatically sized.\n\nTable transforms must have a scale of 1 and no shear components. If no\ntransform is provided, the table will be centered on the page." - }, - "rows": { - "format": "int32", - "description": "Number of rows in the table.", - "type": "integer" - }, - "columns": { - "format": "int32", - "description": "Number of columns in the table.", - "type": "integer" - }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - } - }, - "id": "CreateTableRequest", - "description": "Creates a new table.", - "type": "object" - }, - "CreateTableResponse": { - "id": "CreateTableResponse", - "description": "The result of creating a table.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created table.", - "type": "string" - } - } - }, - "Table": { - "description": "A PageElement kind representing a\ntable.", - "type": "object", - "properties": { - "columns": { - "format": "int32", - "description": "Number of columns in the table.", - "type": "integer" - }, - "tableRows": { - "description": "Properties and contents of each row.\n\nCells that span multiple rows are contained in only one of these rows and\nhave a row_span greater\nthan 1.", - "items": { - "$ref": "TableRow" - }, - "type": "array" - }, - "rows": { - "format": "int32", - "description": "Number of rows in the table.", - "type": "integer" - }, - "tableColumns": { - "description": "Properties of each column.", - "items": { - "$ref": "TableColumnProperties" - }, - "type": "array" - } - }, - "id": "Table" - }, - "PageBackgroundFill": { - "description": "The page background fill.", - "type": "object", - "properties": { - "propertyState": { - "description": "The background fill property state.\n\nUpdating the fill on a page will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a page, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", - "type": "string", - "enumDescriptions": [ - "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", - "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", - "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ], - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ] - }, - "stretchedPictureFill": { - "description": "Stretched picture fill.", - "$ref": "StretchedPictureFill" - }, - "solidFill": { - "description": "Solid color fill.", - "$ref": "SolidFill" - } - }, - "id": "PageBackgroundFill" - }, - "SheetsChart": { - "description": "A PageElement kind representing\na linked chart embedded from Google Sheets.", - "type": "object", - "properties": { - "sheetsChartProperties": { - "description": "The properties of the Sheets chart.", - "$ref": "SheetsChartProperties" - }, - "contentUrl": { - "description": "The URL of an image of the embedded chart, with a default lifetime of 30\nminutes. This URL is tagged with the account of the requester. Anyone with\nthe URL effectively accesses the image as the original requester. Access to\nthe image may be lost if the presentation's sharing settings change.", - "type": "string" - }, - "spreadsheetId": { - "description": "The ID of the Google Sheets spreadsheet that contains the source chart.", - "type": "string" - }, - "chartId": { - "format": "int32", - "description": "The ID of the specific chart in the Google Sheets spreadsheet that is\nembedded.", - "type": "integer" - } - }, - "id": "SheetsChart" - }, - "SolidFill": { - "description": "A solid color fill. The page or page element is filled entirely with the\nspecified color value.\n\nIf any field is unset, its value may be inherited from a parent placeholder\nif it exists.", - "type": "object", - "properties": { - "color": { - "$ref": "OpaqueColor", - "description": "The color value of the solid fill." - }, - "alpha": { - "format": "float", - "description": "The fraction of this `color` that should be applied to the pixel.\nThat is, the final pixel color is defined by the equation:\n\n pixel color = alpha * (color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color.", - "type": "number" - } - }, - "id": "SolidFill" - }, - "ThemeColorPair": { - "description": "A pair mapping a theme color type to the concrete color it represents.", - "type": "object", - "properties": { - "color": { - "description": "The concrete color corresponding to the theme color type above.", - "$ref": "RgbColor" - }, - "type": { - "description": "The type of the theme color.", - "type": "string", - "enumDescriptions": [ - "Unspecified theme color. This value should not be used.", - "Represents the first dark color.", - "Represents the first light color.", - "Represents the second dark color.", - "Represents the second light color.", - "Represents the first accent color.", - "Represents the second accent color.", - "Represents the third accent color.", - "Represents the fourth accent color.", - "Represents the fifth accent color.", - "Represents the sixth accent color.", - "Represents the color to use for hyperlinks.", - "Represents the color to use for visited hyperlinks.", - "Represents the first text color.", - "Represents the first background color.", - "Represents the second text color.", - "Represents the second background color." - ], - "enum": [ - "THEME_COLOR_TYPE_UNSPECIFIED", - "DARK1", - "LIGHT1", - "DARK2", - "LIGHT2", - "ACCENT1", - "ACCENT2", - "ACCENT3", - "ACCENT4", - "ACCENT5", - "ACCENT6", - "HYPERLINK", - "FOLLOWED_HYPERLINK", - "TEXT1", - "BACKGROUND1", - "TEXT2", - "BACKGROUND2" - ] - } - }, - "id": "ThemeColorPair" - }, - "OptionalColor": { - "properties": { - "opaqueColor": { - "description": "If set, this will be used as an opaque color. If unset, this represents\na transparent color.", - "$ref": "OpaqueColor" - } - }, - "id": "OptionalColor", - "description": "A color that can either be fully opaque or fully transparent.", - "type": "object" - }, - "PageElementProperties": { - "description": "Common properties for a page element.\n\nNote: When you initially create a\nPageElement, the API may modify\nthe values of both `size` and `transform`, but the\nvisual size will be unchanged.", - "type": "object", - "properties": { - "transform": { - "$ref": "AffineTransform", - "description": "The transform for the element." - }, - "pageObjectId": { - "description": "The object ID of the page where the element is located.", - "type": "string" - }, - "size": { - "description": "The size of the element.", - "$ref": "Size" - } - }, - "id": "PageElementProperties" - }, - "SheetsChartProperties": { - "properties": { - "chartImageProperties": { - "description": "The properties of the embedded chart image.", - "$ref": "ImageProperties" - } - }, - "id": "SheetsChartProperties", - "description": "The properties of the SheetsChart.", - "type": "object" - }, - "StretchedPictureFill": { - "description": "The stretched picture fill. The page or page element is filled entirely with\nthe specified picture. The picture is stretched to fit its container.", - "type": "object", - "properties": { - "size": { - "$ref": "Size", - "description": "The original size of the picture fill. This field is read-only." - }, - "contentUrl": { - "description": "Reading the content_url:\n\nAn URL to a picture with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the picture as the original requester. Access to the\npicture may be lost if the presentation's sharing settings change.\n\nWriting the content_url:\n\nThe picture is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Pictures must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", - "type": "string" - } - }, - "id": "StretchedPictureFill" - }, - "DeleteTableColumnRequest": { - "description": "Deletes a column from a table.", - "type": "object", - "properties": { - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The reference table cell location from which a column will be deleted.\n\nThe column this cell spans will be deleted. If this is a merged cell,\nmultiple columns will be deleted. If no columns remain in the table after\nthis deletion, the whole table is deleted." - }, - "tableObjectId": { - "description": "The table to delete columns from.", - "type": "string" - } - }, - "id": "DeleteTableColumnRequest" - }, - "UpdateTextStyleRequest": { - "description": "Update the styling of text in a Shape or\nTable.", - "type": "object", - "properties": { - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the text style to bold, set `fields` to `\"bold\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - }, - "textRange": { - "description": "The range of text to style.\n\nThe range may be extended to include adjacent newlines.\n\nIf the range fully contains a paragraph belonging to a list, the\nparagraph's bullet is also updated with the matching text style.", - "$ref": "Range" - }, - "objectId": { - "description": "The object ID of the shape or table with the text to be styled.", - "type": "string" - }, - "style": { - "description": "The style(s) to set on the text.\n\nIf the value for a particular style matches that of the parent, that style\nwill be set to inherit.\n\nCertain text style changes may cause other changes meant to mirror the\nbehavior of the Slides editor. See the documentation of\nTextStyle for more information.", - "$ref": "TextStyle" - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The location of the cell in the table containing the text to style. If\n`object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not." - } - }, - "id": "UpdateTextStyleRequest" - }, - "List": { - "description": "A List describes the look and feel of bullets belonging to paragraphs\nassociated with a list. A paragraph that is part of a list has an implicit\nreference to that list's ID.", - "type": "object", - "properties": { - "listId": { - "description": "The ID of the list.", - "type": "string" - }, - "nestingLevel": { - "additionalProperties": { - "$ref": "NestingLevel" - }, - "description": "A map of nesting levels to the properties of bullets at the associated\nlevel. A list has at most nine levels of nesting, so the possible values\nfor the keys of this map are 0 through 8, inclusive.", - "type": "object" - } - }, - "id": "List" - }, - "WeightedFontFamily": { - "description": "Represents a font family and weight used to style a TextRun.", - "type": "object", - "properties": { - "weight": { - "format": "int32", - "description": "The rendered weight of the text. This field can have any value that is a\nmultiple of `100` between `100` and `900`, inclusive. This range\ncorresponds to the numerical values described in the CSS 2.1\nSpecification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness),\nwith non-numerical values disallowed. Weights greater than or equal to\n`700` are considered bold, and weights less than `700`are not bold. The\ndefault value is `400` (\"normal\").", - "type": "integer" - }, - "fontFamily": { - "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.", - "type": "string" - } - }, - "id": "WeightedFontFamily" - }, - "PageElement": { - "description": "A visual element rendered on a page.", - "type": "object", - "properties": { - "transform": { - "description": "The transform of the page element.\n\nThe visual appearance of the page element is determined by its absolute\ntransform. To compute the absolute transform, preconcatenate a page\nelement's transform with the transforms of all of its parent groups. If the\npage element is not in a group, its absolute transform is the same as the\nvalue in this field.\n\nThe initial transform for the newly created Group is always the identity transform.", - "$ref": "AffineTransform" - }, - "objectId": { - "description": "The object ID for this page element. Object IDs used by\ngoogle.apps.slides.v1.Page and\ngoogle.apps.slides.v1.PageElement share the same namespace.", - "type": "string" - }, - "shape": { - "$ref": "Shape", - "description": "A generic shape." - }, - "line": { - "$ref": "Line", - "description": "A line page element." - }, - "description": { - "description": "The description of the page element. Combined with title to display alt\ntext.", - "type": "string" - }, - "elementGroup": { - "$ref": "Group", - "description": "A collection of page elements joined as a single unit." - }, - "image": { - "$ref": "Image", - "description": "An image page element." - }, - "size": { - "$ref": "Size", - "description": "The size of the page element." - }, - "sheetsChart": { - "$ref": "SheetsChart", - "description": "A linked chart embedded from Google Sheets. Unlinked charts are\nrepresented as images." - }, - "title": { - "description": "The title of the page element. Combined with description to display alt\ntext.", - "type": "string" - }, - "video": { - "$ref": "Video", - "description": "A video page element." - }, - "wordArt": { - "description": "A word art page element.", - "$ref": "WordArt" - }, - "table": { - "$ref": "Table", - "description": "A table page element." - } - }, - "id": "PageElement" - }, - "CreateImageRequest": { - "type": "object", - "properties": { - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - }, - "elementProperties": { - "description": "The element properties for the image.\n\nWhen the aspect ratio of the provided size does not match the image aspect\nratio, the image is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation.", - "$ref": "PageElementProperties" - }, - "url": { - "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", - "type": "string" - } - }, - "id": "CreateImageRequest", - "description": "Creates an image." - }, - "CreateParagraphBulletsRequest": { - "description": "Creates bullets for all of the paragraphs that overlap with the given\ntext index range.\n\nThe nesting level of each paragraph will be determined by counting leading\ntabs in front of each paragraph. To avoid excess space between the bullet and\nthe corresponding paragraph, these leading tabs are removed by this request.\nThis may change the indices of parts of the text.\n\nIf the paragraph immediately before paragraphs being updated is in a list\nwith a matching preset, the paragraphs being updated are added to that\npreceding list.", - "type": "object", - "properties": { - "textRange": { - "description": "The range of text to apply the bullet presets to, based on TextElement indexes.", - "$ref": "Range" - }, - "objectId": { - "description": "The object ID of the shape or table containing the text to add bullets to.", - "type": "string" - }, - "bulletPreset": { - "enum": [ - "BULLET_DISC_CIRCLE_SQUARE", - "BULLET_DIAMONDX_ARROW3D_SQUARE", - "BULLET_CHECKBOX", - "BULLET_ARROW_DIAMOND_DISC", - "BULLET_STAR_CIRCLE_SQUARE", - "BULLET_ARROW3D_CIRCLE_SQUARE", - "BULLET_LEFTTRIANGLE_DIAMOND_DISC", - "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE", - "BULLET_DIAMOND_CIRCLE_SQUARE", - "NUMBERED_DIGIT_ALPHA_ROMAN", - "NUMBERED_DIGIT_ALPHA_ROMAN_PARENS", - "NUMBERED_DIGIT_NESTED", - "NUMBERED_UPPERALPHA_ALPHA_ROMAN", - "NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT", - "NUMBERED_ZERODIGIT_ALPHA_ROMAN" - ], - "description": "The kinds of bullet glyphs to be used. Defaults to the\n`BULLET_DISC_CIRCLE_SQUARE` preset.", - "type": "string", - "enumDescriptions": [ - "A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the\nfirst 3 list nesting levels.", - "A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels.", - "A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `STAR`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", - "A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph\nfor the first 3 list nesting levels.", - "A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet\nglyph for the first 3 list nesting levels.", - "A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph\nfor the first 3 list nesting levels.", - "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", - "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by parenthesis.", - "A numbered list with `DIGIT` numeric glyphs separated by periods, where\neach nesting level uses the previous nesting level's glyph as a prefix.\nFor example: '1.', '1.1.', '2.', '2.2.'.", - "A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", - "A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` numeric glyphs\nfor the first 3 list nesting levels, followed by periods.", - "A numbered list with `ZERODIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods." - ] - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table." - } - }, - "id": "CreateParagraphBulletsRequest" - }, - "Size": { - "description": "A width and height.", - "type": "object", - "properties": { - "width": { - "description": "The width of the object.", - "$ref": "Dimension" - }, - "height": { - "$ref": "Dimension", - "description": "The height of the object." - } - }, - "id": "Size" - }, - "TextStyle": { - "description": "Represents the styling that can be applied to a TextRun.\n\nIf this text is contained in a shape with a parent placeholder, then these text styles may be\ninherited from the parent. Which text styles are inherited depend on the\nnesting level of lists:\n\n* A text run in a paragraph that is not in a list will inherit its text style\n from the the newline character in the paragraph at the 0 nesting level of\n the list inside the parent placeholder.\n* A text run in a paragraph that is in a list will inherit its text style\n from the newline character in the paragraph at its corresponding nesting\n level of the list inside the parent placeholder.\n\nInherited text styles are represented as unset fields in this message. If\ntext is contained in a shape without a parent placeholder, unsetting these\nfields will revert the style to a value matching the defaults in the Slides\neditor.", - "type": "object", - "properties": { - "smallCaps": { - "description": "Whether or not the text is in small capital letters.", - "type": "boolean" - }, - "backgroundColor": { - "description": "The background color of the text. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set.", - "$ref": "OptionalColor" - }, - "underline": { - "description": "Whether or not the text is underlined.", - "type": "boolean" - }, - "link": { - "description": "The hyperlink destination of the text. If unset, there is no link. Links\nare not inherited from parent text.\n\nChanging the link in an update request causes some other changes to the\ntext style of the range:\n\n* When setting a link, the text foreground color will be set to\n ThemeColorType.HYPERLINK and the text will\n be underlined. If these fields are modified in the same\n request, those values will be used instead of the link defaults.\n* Setting a link on a text range that overlaps with an existing link will\n also update the existing link to point to the new URL.\n* Links are not settable on newline characters. As a result, setting a link\n on a text range that crosses a paragraph boundary, such as `\"ABC\\n123\"`,\n will separate the newline character(s) into their own text runs. The\n link will be applied separately to the runs before and after the newline.\n* Removing a link will update the text style of the range to match the\n style of the preceding text (or the default text styles if the preceding\n text is another link) unless different styles are being set in the same\n request.", - "$ref": "Link" - }, - "foregroundColor": { - "description": "The color of the text itself. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set.", - "$ref": "OptionalColor" - }, - "bold": { - "description": "Whether or not the text is rendered as bold.", - "type": "boolean" - }, - "fontFamily": { - "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.\n\nSome fonts can affect the weight of the text. If an update request\nspecifies values for both `font_family` and `bold`, the explicitly-set\n`bold` value is used.", - "type": "string" - }, - "strikethrough": { - "type": "boolean", - "description": "Whether or not the text is struck through." - }, - "italic": { - "description": "Whether or not the text is italicized.", - "type": "boolean" - }, - "fontSize": { - "$ref": "Dimension", - "description": "The size of the text's font. When read, the `font_size` will specified in\npoints." - }, - "baselineOffset": { - "description": "The text's vertical offset from its normal position.\n\nText with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically\nrendered in a smaller font size, computed based on the `font_size` field.\nThe `font_size` itself is not affected by changes in this field.", - "type": "string", - "enumDescriptions": [ - "The text's baseline offset is inherited from the parent.", - "The text is not vertically offset.", - "The text is vertically offset upwards (superscript).", - "The text is vertically offset downwards (subscript)." - ], - "enum": [ - "BASELINE_OFFSET_UNSPECIFIED", - "NONE", - "SUPERSCRIPT", - "SUBSCRIPT" - ] - }, - "weightedFontFamily": { - "description": "The font family and rendered weight of the text.\n\nThis field is an extension of `font_family` meant to support explicit font\nweights without breaking backwards compatibility. As such, when reading the\nstyle of a range of text, the value of `weighted_font_family#font_family`\nwill always be equal to that of `font_family`. However, when writing, if\nboth fields are included in the field mask (either explicitly or through\nthe wildcard `\"*\"`), their values are reconciled as follows:\n\n* If `font_family` is set and `weighted_font_family` is not, the value of\n `font_family` is applied with weight `400` (\"normal\").\n* If both fields are set, the value of `font_family` must match that of\n `weighted_font_family#font_family`. If so, the font family and weight of\n `weighted_font_family` is applied. Otherwise, a 400 bad request error is\n returned.\n* If `weighted_font_family` is set and `font_family` is not, the font\n family and weight of `weighted_font_family` is applied.\n* If neither field is set, the font family and weight of the text inherit\n from the parent. Note that these properties cannot inherit separately\n from each other.\n\nIf an update request specifies values for both `weighted_font_family` and\n`bold`, the `weighted_font_family` is applied first, then `bold`.\n\nIf `weighted_font_family#weight` is not set, it defaults to `400`.\n\nIf `weighted_font_family` is set, then `weighted_font_family#font_family`\nmust also be set with a non-empty value. Otherwise, a 400 bad request error\nis returned.", - "$ref": "WeightedFontFamily" - } - }, - "id": "TextStyle" - }, - "UpdateVideoPropertiesRequest": { - "id": "UpdateVideoPropertiesRequest", - "description": "Update the properties of a Video.", - "type": "object", - "properties": { - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `videoProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the video outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - }, - "objectId": { - "description": "The object ID of the video the updates are applied to.", - "type": "string" - }, - "videoProperties": { - "$ref": "VideoProperties", - "description": "The video properties to update." - } - } - }, - "Request": { - "description": "A single kind of update to apply to a presentation.", - "type": "object", - "properties": { - "insertText": { - "$ref": "InsertTextRequest", - "description": "Inserts text into a shape or table cell." - }, - "deleteText": { - "description": "Deletes text from a shape or a table cell.", - "$ref": "DeleteTextRequest" - }, - "updatePageProperties": { - "$ref": "UpdatePagePropertiesRequest", - "description": "Updates the properties of a Page." - }, - "createShape": { - "description": "Creates a new shape.", - "$ref": "CreateShapeRequest" - }, - "deleteParagraphBullets": { - "$ref": "DeleteParagraphBulletsRequest", - "description": "Deletes bullets from paragraphs." - }, - "insertTableColumns": { - "$ref": "InsertTableColumnsRequest", - "description": "Inserts columns into a table." - }, - "refreshSheetsChart": { - "$ref": "RefreshSheetsChartRequest", - "description": "Refreshes a Google Sheets chart." - }, - "createTable": { - "$ref": "CreateTableRequest", - "description": "Creates a new table." - }, - "updateTableCellProperties": { - "$ref": "UpdateTableCellPropertiesRequest", - "description": "Updates the properties of a TableCell." - }, - "deleteObject": { - "$ref": "DeleteObjectRequest", - "description": "Deletes a page or page element from the presentation." - }, - "updateParagraphStyle": { - "description": "Updates the styling of paragraphs within a Shape or Table.", - "$ref": "UpdateParagraphStyleRequest" - }, - "deleteTableColumn": { - "$ref": "DeleteTableColumnRequest", - "description": "Deletes a column from a table." - }, - "duplicateObject": { - "$ref": "DuplicateObjectRequest", - "description": "Duplicates a slide or page element." - }, - "createLine": { - "$ref": "CreateLineRequest", - "description": "Creates a line." - }, - "updateVideoProperties": { - "$ref": "UpdateVideoPropertiesRequest", - "description": "Updates the properties of a Video." - }, - "createImage": { - "description": "Creates an image.", - "$ref": "CreateImageRequest" - }, - "createParagraphBullets": { - "description": "Creates bullets for paragraphs.", - "$ref": "CreateParagraphBulletsRequest" - }, - "createVideo": { - "description": "Creates a video.", - "$ref": "CreateVideoRequest" - }, - "createSheetsChart": { - "$ref": "CreateSheetsChartRequest", - "description": "Creates an embedded Google Sheets chart." - }, - "replaceAllShapesWithSheetsChart": { - "description": "Replaces all shapes matching some criteria with a Google Sheets chart.", - "$ref": "ReplaceAllShapesWithSheetsChartRequest" - }, - "updatePageElementTransform": { - "$ref": "UpdatePageElementTransformRequest", - "description": "Updates the transform of a page element." - }, - "updateTextStyle": { - "$ref": "UpdateTextStyleRequest", - "description": "Updates the styling of text within a Shape or Table." - }, - "replaceAllShapesWithImage": { - "description": "Replaces all shapes matching some criteria with an image.", - "$ref": "ReplaceAllShapesWithImageRequest" - }, - "replaceAllText": { - "$ref": "ReplaceAllTextRequest", - "description": "Replaces all instances of specified text." - }, - "updateImageProperties": { - "$ref": "UpdateImagePropertiesRequest", - "description": "Updates the properties of an Image." - }, - "createSlide": { - "description": "Creates a new slide.", - "$ref": "CreateSlideRequest" - }, - "insertTableRows": { - "$ref": "InsertTableRowsRequest", - "description": "Inserts rows into a table." - }, - "updateLineProperties": { - "$ref": "UpdateLinePropertiesRequest", - "description": "Updates the properties of a Line." - }, - "updateSlidesPosition": { - "$ref": "UpdateSlidesPositionRequest", - "description": "Updates the position of a set of slides in the presentation." - }, - "deleteTableRow": { - "$ref": "DeleteTableRowRequest", - "description": "Deletes a row from a table." - }, - "updateShapeProperties": { - "$ref": "UpdateShapePropertiesRequest", - "description": "Updates the properties of a Shape." - } - }, - "id": "Request" - }, - "UpdateImagePropertiesRequest": { - "id": "UpdateImagePropertiesRequest", - "description": "Update the properties of an Image.", - "type": "object", - "properties": { - "imageProperties": { - "$ref": "ImageProperties", - "description": "The image properties to update." - }, - "objectId": { - "description": "The object ID of the image the updates are applied to.", - "type": "string" - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `imageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the image outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - } - } - }, - "ParagraphStyle": { - "id": "ParagraphStyle", - "description": "Styles that apply to a whole paragraph.\n\nIf this text is contained in a shape with a parent placeholder, then these paragraph styles may be\ninherited from the parent. Which paragraph styles are inherited depend on the\nnesting level of lists:\n\n* A paragraph not in a list will inherit its paragraph style from the\n paragraph at the 0 nesting level of the list inside the parent placeholder.\n* A paragraph in a list will inherit its paragraph style from the paragraph\n at its corresponding nesting level of the list inside the parent\n placeholder.\n\nInherited paragraph styles are represented as unset fields in this message.", - "type": "object", - "properties": { - "indentStart": { - "description": "The amount indentation for the paragraph on the side that corresponds to\nthe start of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent.", - "$ref": "Dimension" - }, - "spaceAbove": { - "$ref": "Dimension", - "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent." - }, - "indentFirstLine": { - "$ref": "Dimension", - "description": "The amount of indentation for the start of the first line of the paragraph.\nIf unset, the value is inherited from the parent." - }, - "lineSpacing": { - "format": "float", - "description": "The amount of space between lines, as a percentage of normal, where normal\nis represented as 100.0. If unset, the value is inherited from the parent.", - "type": "number" - }, - "alignment": { - "description": "The text alignment for this paragraph.", - "type": "string", - "enumDescriptions": [ - "The paragraph alignment is inherited from the parent.", - "The paragraph is aligned to the start of the line. Left-aligned for\nLTR text, right-aligned otherwise.", - "The paragraph is centered.", - "The paragraph is aligned to the end of the line. Right-aligned for\nLTR text, left-aligned otherwise.", - "The paragraph is justified." - ], - "enum": [ - "ALIGNMENT_UNSPECIFIED", - "START", - "CENTER", - "END", - "JUSTIFIED" - ] - }, - "spaceBelow": { - "$ref": "Dimension", - "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent." - }, - "direction": { - "type": "string", - "enumDescriptions": [ - "The text direction is inherited from the parent.", - "The text goes from left to right.", - "The text goes from right to left." - ], - "enum": [ - "TEXT_DIRECTION_UNSPECIFIED", - "LEFT_TO_RIGHT", - "RIGHT_TO_LEFT" - ], - "description": "The text direction of this paragraph. If unset, the value defaults to\nLEFT_TO_RIGHT since\ntext direction is not inherited." - }, - "spacingMode": { - "enum": [ - "SPACING_MODE_UNSPECIFIED", - "NEVER_COLLAPSE", - "COLLAPSE_LISTS" - ], - "description": "The spacing mode for the paragraph.", - "type": "string", - "enumDescriptions": [ - "The spacing mode is inherited from the parent.", - "Paragraph spacing is always rendered.", - "Paragraph spacing is skipped between list elements." - ] - }, - "indentEnd": { - "$ref": "Dimension", - "description": "The amount indentation for the paragraph on the side that corresponds to\nthe end of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent." - } - } - }, - "ReplaceAllShapesWithSheetsChartResponse": { - "id": "ReplaceAllShapesWithSheetsChartResponse", - "description": "The result of replacing shapes with a Google Sheets chart.", - "type": "object", - "properties": { - "occurrencesChanged": { - "format": "int32", - "description": "The number of shapes replaced with charts.", - "type": "integer" - } - } - }, - "TableCellProperties": { - "description": "The properties of the TableCell.", - "type": "object", - "properties": { - "tableCellBackgroundFill": { - "description": "The background fill of the table cell. The default fill matches the fill\nfor newly created table cells in the Slides editor.", - "$ref": "TableCellBackgroundFill" - } - }, - "id": "TableCellProperties" - }, - "RefreshSheetsChartRequest": { - "type": "object", - "properties": { - "objectId": { - "type": "string", - "description": "The object ID of the chart to refresh." - } - }, - "id": "RefreshSheetsChartRequest", - "description": "Refreshes an embedded Google Sheets chart by replacing it with the latest\nversion of the chart from Google Sheets.\n\nNOTE: Refreshing charts requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes." - }, - "Outline": { - "description": "The outline of a PageElement.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", - "type": "object", - "properties": { - "outlineFill": { - "$ref": "OutlineFill", - "description": "The fill of the outline." - }, - "weight": { - "$ref": "Dimension", - "description": "The thickness of the outline." - }, - "dashStyle": { - "enumDescriptions": [ - "Unspecified dash style.", - "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", - "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", - "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", - "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", - "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", - "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." - ], - "enum": [ - "DASH_STYLE_UNSPECIFIED", - "SOLID", - "DOT", - "DASH", - "DASH_DOT", - "LONG_DASH", - "LONG_DASH_DOT" - ], - "description": "The dash style of the outline.", - "type": "string" - }, - "propertyState": { - "type": "string", - "enumDescriptions": [ - "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", - "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", - "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ], - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], - "description": "The outline property state.\n\nUpdating the the outline on a page element will implicitly update this\nfield to`RENDERED`, unless another value is specified in the same request.\nTo have no outline on a page element, set this field to `NOT_RENDERED`. In\nthis case, any other outline fields set in the same request will be\nignored." - } - }, - "id": "Outline" - }, - "NotesProperties": { - "description": "The properties of Page that are only\nrelevant for pages with page_type NOTES.", - "type": "object", - "properties": { - "speakerNotesObjectId": { - "type": "string", - "description": "The object ID of the shape on this notes page that contains the speaker\nnotes for the corresponding slide.\nThe actual shape may not always exist on the notes page. Inserting text\nusing this object ID will automatically create the shape. In this case, the\nactual shape may have different object ID. The `GetPresentation` or\n`GetPage` action will always return the latest object ID." - } - }, - "id": "NotesProperties" - }, - "ShapeProperties": { - "description": "The properties of a Shape.\n\nIf the shape is a placeholder shape as determined by the\nplaceholder field, then these\nproperties may be inherited from a parent placeholder shape.\nDetermining the rendered value of the property depends on the corresponding\nproperty_state field value.", - "type": "object", - "properties": { - "outline": { - "description": "The outline of the shape. If unset, the outline is inherited from a\nparent placeholder if it exists. If the shape has no parent, then the\ndefault outline depends on the shape type, matching the defaults for\nnew shapes created in the Slides editor.", - "$ref": "Outline" - }, - "shadow": { - "$ref": "Shadow", - "description": "The shadow properties of the shape. If unset, the shadow is inherited from\na parent placeholder if it exists. If the shape has no parent, then the\ndefault shadow matches the defaults for new shapes created in the Slides\neditor. This property is read-only." - }, - "shapeBackgroundFill": { - "description": "The background fill of the shape. If unset, the background fill is\ninherited from a parent placeholder if it exists. If the shape has no\nparent, then the default background fill depends on the shape type,\nmatching the defaults for new shapes created in the Slides editor.", - "$ref": "ShapeBackgroundFill" - }, - "link": { - "$ref": "Link", - "description": "The hyperlink destination of the shape. If unset, there is no link. Links\nare not inherited from parent placeholders." - } - }, - "id": "ShapeProperties" - }, - "TableColumnProperties": { - "properties": { - "columnWidth": { - "description": "Width of a column.", - "$ref": "Dimension" - } - }, - "id": "TableColumnProperties", - "description": "Properties of each column in a table.", - "type": "object" - }, - "TableRow": { - "description": "Properties and contents of each row in a table.", - "type": "object", - "properties": { - "tableCells": { - "description": "Properties and contents of each cell.\n\nCells that span multiple columns are represented only once with a\ncolumn_span greater\nthan 1. As a result, the length of this collection does not always match\nthe number of columns of the entire table.", - "items": { - "$ref": "TableCell" - }, - "type": "array" - }, - "rowHeight": { - "description": "Height of a row.", - "$ref": "Dimension" - } - }, - "id": "TableRow" - }, - "UpdateTableCellPropertiesRequest": { - "description": "Update the properties of a TableCell.", - "type": "object", - "properties": { - "tableCellProperties": { - "$ref": "TableCellProperties", - "description": "The table cell properties to update." - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `tableCellProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the table cell background solid fill color, set\n`fields` to `\"tableCellBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - }, - "tableRange": { - "description": "The table range representing the subset of the table to which the updates\nare applied. If a table range is not specified, the updates will apply to\nthe entire table.", - "$ref": "TableRange" - }, - "objectId": { - "description": "The object ID of the table.", - "type": "string" - } - }, - "id": "UpdateTableCellPropertiesRequest" - }, - "CreateSlideRequest": { - "id": "CreateSlideRequest", - "description": "Creates a new slide.", - "type": "object", - "properties": { - "insertionIndex": { - "format": "int32", - "description": "The optional zero-based index indicating where to insert the slides.\n\nIf you don't specify an index, the new slide is created at the end.", - "type": "integer" - }, - "placeholderIdMappings": { - "description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholder(s)\nthat will be created on the new slide from that specified layout. Can only\nbe used when `slide_layout_reference` is specified.", - "items": { - "$ref": "LayoutPlaceholderIdMapping" - }, - "type": "array" - }, - "slideLayoutReference": { - "$ref": "LayoutReference", - "description": "Layout reference of the slide to be inserted, based on the *current\nmaster*, which is one of the following:\n\n- The master of the previous slide index.\n- The master of the first slide, if the insertion_index is zero.\n- The first master in the presentation, if there are no slides.\n\nIf the LayoutReference is not found in the current master, a 400 bad\nrequest error is returned.\n\nIf you don't specify a layout reference, then the new slide will use the\npredefined layout `BLANK`." - }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - } - } - }, - "BatchUpdatePresentationRequest": { - "id": "BatchUpdatePresentationRequest", - "description": "Request message for PresentationsService.BatchUpdatePresentation.", - "type": "object", - "properties": { - "requests": { - "description": "A list of updates to apply to the presentation.", - "items": { - "$ref": "Request" - }, - "type": "array" - }, - "writeControl": { - "description": "Provides control over how write requests are executed.", - "$ref": "WriteControl" - } - } - }, - "TextContent": { - "description": "The general text content. The text must reside in a compatible shape (e.g.\ntext box or rectangle) or a table cell in a page.", - "type": "object", - "properties": { - "textElements": { - "description": "The text contents broken down into its component parts, including styling\ninformation. This property is read-only.", - "items": { - "$ref": "TextElement" - }, - "type": "array" - }, - "lists": { - "additionalProperties": { - "$ref": "List" - }, - "description": "The bulleted lists contained in this text, keyed by list ID.", - "type": "object" - } - }, - "id": "TextContent" - }, - "CreateSheetsChartResponse": { - "description": "The result of creating an embedded Google Sheets chart.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created chart.", - "type": "string" - } - }, - "id": "CreateSheetsChartResponse" - }, - "WriteControl": { - "description": "Provides control over how write requests are executed.", - "type": "object", - "properties": { - "requiredRevisionId": { - "description": "The revision ID of the presentation required for the write request. If\nspecified and the `required_revision_id` doesn't exactly match the\npresentation's current `revision_id`, the request will not be processed and\nwill return a 400 bad request error.", - "type": "string" - } - }, - "id": "WriteControl" - }, - "DeleteParagraphBulletsRequest": { - "description": "Deletes bullets from all of the paragraphs that overlap with the given text\nindex range.\n\nThe nesting level of each paragraph will be visually preserved by adding\nindent to the start of the corresponding paragraph.", - "type": "object", - "properties": { - "textRange": { - "$ref": "Range", - "description": "The range of text to delete bullets from, based on TextElement indexes." - }, - "objectId": { - "description": "The object ID of the shape or table containing the text to delete bullets\nfrom.", - "type": "string" - }, - "cellLocation": { - "$ref": "TableCellLocation", - "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table." - } - }, - "id": "DeleteParagraphBulletsRequest" - }, - "ParagraphMarker": { - "description": "A TextElement kind that represents the beginning of a new paragraph.", - "type": "object", - "properties": { - "style": { - "$ref": "ParagraphStyle", - "description": "The paragraph's style" - }, - "bullet": { - "$ref": "Bullet", - "description": "The bullet for this paragraph. If not present, the paragraph does not\nbelong to a list." - } - }, - "id": "ParagraphMarker" - }, - "InsertTableColumnsRequest": { - "description": "Inserts columns into a table.\n\nOther columns in the table will be resized to fit the new column.", - "type": "object", - "properties": { - "number": { - "format": "int32", - "description": "The number of columns to be inserted. Maximum 20 per request.", - "type": "integer" - }, - "cellLocation": { - "description": "The reference table cell location from which columns will be inserted.\n\nA new column will be inserted to the left (or right) of the column where\nthe reference cell is. If the reference cell is a merged cell, a new\ncolumn will be inserted to the left (or right) of the merged cell.", - "$ref": "TableCellLocation" - }, - "insertRight": { - "description": "Whether to insert new columns to the right of the reference cell location.\n\n- `True`: insert to the right.\n- `False`: insert to the left.", - "type": "boolean" - }, - "tableObjectId": { - "type": "string", - "description": "The table to insert columns into." - } - }, - "id": "InsertTableColumnsRequest" - }, - "Thumbnail": { - "type": "object", - "properties": { - "height": { - "format": "int32", - "description": "The positive height in pixels of the thumbnail image.", - "type": "integer" - }, - "contentUrl": { - "description": "The content URL of the thumbnail image.\n\nThe URL to the image has a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the image as the original requester. Access to the\nimage may be lost if the presentation's sharing settings change.\nThe mime type of the thumbnail image is the same as specified in the\n`GetPageThumbnailRequest`.", - "type": "string" - }, - "width": { - "format": "int32", - "description": "The positive width in pixels of the thumbnail image.", - "type": "integer" - } - }, - "id": "Thumbnail", - "description": "The thumbnail of a page." - }, - "LayoutPlaceholderIdMapping": { - "type": "object", - "properties": { - "objectId": { - "description": "A user-supplied object ID for the placeholder identified above that to be\ncreated onto a slide.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" - }, - "layoutPlaceholder": { - "$ref": "Placeholder", - "description": "The placeholder on a layout that will be applied to a slide. Only type and index are needed. For example, a\npredefined `TITLE_AND_BODY` layout may usually have a TITLE placeholder\nwith index 0 and a BODY placeholder with index 0." - }, - "layoutPlaceholderObjectId": { - "description": "The object ID of the placeholder on a layout that will be applied\nto a slide.", - "type": "string" - } - }, - "id": "LayoutPlaceholderIdMapping", - "description": "The user-specified ID mapping for a placeholder that will be created on a\nslide from a specified layout." - }, - "UpdateShapePropertiesRequest": { - "description": "Update the properties of a Shape.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the shape the updates are applied to.", - "type": "string" - }, - "shapeProperties": { - "$ref": "ShapeProperties", - "description": "The shape properties to update." - }, - "fields": { - "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `shapeProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the shape background solid fill color, set `fields`\nto `\"shapeBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", - "type": "string" - } - }, - "id": "UpdateShapePropertiesRequest" - }, "WordArt": { "description": "A PageElement kind representing\nword art.", "type": "object", "properties": { "renderedText": { - "type": "string", - "description": "The text rendered as word art." + "description": "The text rendered as word art.", + "type": "string" } }, "id": "WordArt" @@ -1909,14 +296,13 @@ "type": "object", "properties": { "recolorStops": { + "description": "The recolor effect is represented by a gradient, which is a list of color\nstops.\n\nThe colors in the gradient will replace the corresponding colors at\nthe same position in the color palette and apply to the image. This\nproperty is read-only.", "items": { "$ref": "ColorStop" }, - "type": "array", - "description": "The recolor effect is represented by a gradient, which is a list of color\nstops.\n\nThe colors in the gradient will replace the corresponding colors at\nthe same position in the color palette and apply to the image. This\nproperty is read-only." + "type": "array" }, "name": { - "type": "string", "enumDescriptions": [ "No recolor effect. The default value.", "A recolor effect that lightens the image using the page's first available\ncolor from its color scheme.", @@ -1971,15 +357,18 @@ "SEPIA", "CUSTOM" ], - "description": "The name of the recolor effect.\n\nThe name is determined from the `recolor_stops` by matching the gradient\nagainst the colors in the page's current color scheme. This property is\nread-only." + "description": "The name of the recolor effect.\n\nThe name is determined from the `recolor_stops` by matching the gradient\nagainst the colors in the page's current color scheme. This property is\nread-only.", + "type": "string" } }, "id": "Recolor" }, "Link": { - "description": "A hypertext link.", - "type": "object", "properties": { + "pageObjectId": { + "description": "If set, indicates this is a link to the specific page in this\npresentation with this ID. A page with this ID may not exist.", + "type": "string" + }, "slideIndex": { "format": "int32", "description": "If set, indicates this is a link to the slide at this zero-based index\nin the presentation. There may not be a slide at this index.", @@ -2006,24 +395,15 @@ "url": { "description": "If set, indicates this is a link to the external web page at this URL.", "type": "string" - }, - "pageObjectId": { - "description": "If set, indicates this is a link to the specific page in this\npresentation with this ID. A page with this ID may not exist.", - "type": "string" } }, - "id": "Link" + "id": "Link", + "description": "A hypertext link.", + "type": "object" }, "RgbColor": { - "id": "RgbColor", - "description": "An RGB color.", "type": "object", "properties": { - "red": { - "format": "float", - "description": "The red component of the color, from 0.0 to 1.0.", - "type": "number" - }, "blue": { "format": "float", "description": "The blue component of the color, from 0.0 to 1.0.", @@ -2033,48 +413,55 @@ "format": "float", "description": "The green component of the color, from 0.0 to 1.0.", "type": "number" + }, + "red": { + "format": "float", + "description": "The red component of the color, from 0.0 to 1.0.", + "type": "number" } - } + }, + "id": "RgbColor", + "description": "An RGB color." }, "CreateShapeResponse": { + "description": "The result of creating a shape.", "type": "object", "properties": { "objectId": { - "description": "The object ID of the created shape.", - "type": "string" + "type": "string", + "description": "The object ID of the created shape." } }, - "id": "CreateShapeResponse", - "description": "The result of creating a shape." + "id": "CreateShapeResponse" }, "CreateLineRequest": { - "description": "Creates a line.", - "type": "object", "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, "elementProperties": { "description": "The element properties for the line.", "$ref": "PageElementProperties" }, "lineCategory": { + "enum": [ + "STRAIGHT", + "BENT", + "CURVED" + ], "description": "The category of line to be created.", "type": "string", "enumDescriptions": [ "Straight connectors, including straight connector 1. The is the default\ncategory when one is not specified.", "Bent connectors, including bent connector 2 to 5.", "Curved connectors, including curved connector 2 to 5." - ], - "enum": [ - "STRAIGHT", - "BENT", - "CURVED" ] - }, - "objectId": { - "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", - "type": "string" } }, - "id": "CreateLineRequest" + "id": "CreateLineRequest", + "description": "Creates a line.", + "type": "object" }, "CreateSlideResponse": { "description": "The result of creating a slide.", @@ -2088,10 +475,10 @@ "id": "CreateSlideResponse" }, "CreateShapeRequest": { - "description": "Creates a new shape.", "type": "object", "properties": { "shapeType": { + "description": "The shape type.", "type": "string", "enumDescriptions": [ "The shape type that is not predefined.", @@ -2382,8 +769,7 @@ "ELLIPSE_RIBBON_2", "CLOUD_CALLOUT", "CUSTOM" - ], - "description": "The shape type." + ] }, "objectId": { "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", @@ -2394,73 +780,60 @@ "description": "The element properties for the shape." } }, - "id": "CreateShapeRequest" + "id": "CreateShapeRequest", + "description": "Creates a new shape." }, "Video": { - "description": "A PageElement kind representing a\nvideo.", - "type": "object", "properties": { "source": { - "enum": [ - "SOURCE_UNSPECIFIED", - "YOUTUBE" - ], - "description": "The video source.", "type": "string", "enumDescriptions": [ "The video source is unspecified.", "The video source is YouTube." - ] + ], + "enum": [ + "SOURCE_UNSPECIFIED", + "YOUTUBE" + ], + "description": "The video source." }, "id": { "description": "The video source's unique identifier for this video.", "type": "string" }, "url": { - "type": "string", - "description": "An URL to a video. The URL is valid as long as the source video\nexists and sharing settings do not change." + "description": "An URL to a video. The URL is valid as long as the source video\nexists and sharing settings do not change.", + "type": "string" }, "videoProperties": { "$ref": "VideoProperties", "description": "The properties of the video." } }, - "id": "Video" + "id": "Video", + "description": "A PageElement kind representing a\nvideo.", + "type": "object" }, "PageProperties": { - "type": "object", "properties": { - "colorScheme": { - "$ref": "ColorScheme", - "description": "The color scheme of the page. If unset, the color scheme is inherited from\na parent page. If the page has no parent, the color scheme uses a default\nSlides color scheme. This field is read-only." - }, "pageBackgroundFill": { "$ref": "PageBackgroundFill", "description": "The background fill of the page. If unset, the background fill is inherited\nfrom a parent page if it exists. If the page has no parent, then the\nbackground fill defaults to the corresponding fill in the Slides editor." + }, + "colorScheme": { + "$ref": "ColorScheme", + "description": "The color scheme of the page. If unset, the color scheme is inherited from\na parent page. If the page has no parent, the color scheme uses a default\nSlides color scheme. This field is read-only." } }, "id": "PageProperties", - "description": "The properties of the Page.\n\nThe page will inherit properties from the parent page. Depending on the page\ntype the hierarchy is defined in either\nSlideProperties or\nLayoutProperties." - }, - "NestingLevel": { - "description": "Contains properties describing the look and feel of a list bullet at a given\nlevel of nesting.", - "type": "object", - "properties": { - "bulletStyle": { - "description": "The style of a bullet at this level of nesting.", - "$ref": "TextStyle" - } - }, - "id": "NestingLevel" + "description": "The properties of the Page.\n\nThe page will inherit properties from the parent page. Depending on the page\ntype the hierarchy is defined in either\nSlideProperties or\nLayoutProperties.", + "type": "object" }, "TableCell": { + "id": "TableCell", "description": "Properties and contents of each table cell.", "type": "object", "properties": { - "tableCellProperties": { - "description": "The properties of the table cell.", - "$ref": "TableCellProperties" - }, "rowSpan": { "format": "int32", "description": "Row span of the cell.", @@ -2478,17 +851,26 @@ "text": { "$ref": "TextContent", "description": "The text content of the cell." + }, + "tableCellProperties": { + "$ref": "TableCellProperties", + "description": "The properties of the table cell." } - }, - "id": "TableCell" + } }, - "UpdateLinePropertiesRequest": { + "NestingLevel": { + "description": "Contains properties describing the look and feel of a list bullet at a given\nlevel of nesting.", "type": "object", "properties": { - "objectId": { - "description": "The object ID of the line the update is applied to.", - "type": "string" - }, + "bulletStyle": { + "$ref": "TextStyle", + "description": "The style of a bullet at this level of nesting." + } + }, + "id": "NestingLevel" + }, + "UpdateLinePropertiesRequest": { + "properties": { "lineProperties": { "$ref": "LineProperties", "description": "The line properties to update." @@ -2497,10 +879,40 @@ "format": "google-fieldmask", "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `lineProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the line solid fill color, set `fields` to\n`\"lineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", "type": "string" + }, + "objectId": { + "type": "string", + "description": "The object ID of the line the update is applied to." } }, "id": "UpdateLinePropertiesRequest", - "description": "Updates the properties of a Line." + "description": "Updates the properties of a Line.", + "type": "object" + }, + "TableCellBackgroundFill": { + "description": "The table cell background fill.", + "type": "object", + "properties": { + "solidFill": { + "description": "Solid color fill.", + "$ref": "SolidFill" + }, + "propertyState": { + "description": "The background fill property state.\n\nUpdating the the fill on a table cell will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no fill on a table cell, set this field to `NOT_RENDERED`. In this\ncase, any other fill fields set in the same request will be ignored.", + "type": "string", + "enumDescriptions": [ + "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", + "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", + "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." + ], + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ] + } + }, + "id": "TableCellBackgroundFill" }, "UpdateSlidesPositionRequest": { "description": "Updates the position of slides in the presentation.", @@ -2521,32 +933,9 @@ }, "id": "UpdateSlidesPositionRequest" }, - "TableCellBackgroundFill": { - "description": "The table cell background fill.", - "type": "object", - "properties": { - "solidFill": { - "$ref": "SolidFill", - "description": "Solid color fill." - }, - "propertyState": { - "enum": [ - "RENDERED", - "NOT_RENDERED", - "INHERIT" - ], - "description": "The background fill property state.\n\nUpdating the the fill on a table cell will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no fill on a table cell, set this field to `NOT_RENDERED`. In this\ncase, any other fill fields set in the same request will be ignored.", - "type": "string", - "enumDescriptions": [ - "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", - "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", - "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." - ] - } - }, - "id": "TableCellBackgroundFill" - }, "UpdatePagePropertiesRequest": { + "description": "Updates the properties of a Page.", + "type": "object", "properties": { "pageProperties": { "$ref": "PageProperties", @@ -2562,9 +951,7 @@ "type": "string" } }, - "id": "UpdatePagePropertiesRequest", - "description": "Updates the properties of a Page.", - "type": "object" + "id": "UpdatePagePropertiesRequest" }, "Group": { "description": "A PageElement kind representing a\njoined collection of PageElements.", @@ -2581,14 +968,20 @@ "id": "Group" }, "Placeholder": { + "description": "The placeholder information that uniquely identifies a placeholder shape.", "type": "object", "properties": { + "parentObjectId": { + "description": "The object ID of this shape's parent placeholder.\nIf unset, the parent placeholder shape does not exist, so the shape does\nnot inherit properties from any other shape.", + "type": "string" + }, "index": { "format": "int32", "description": "The index of the placeholder. If the same placeholder types are present in\nthe same page, they would have different index values.", "type": "integer" }, "type": { + "description": "The type of the placeholder.", "type": "string", "enumDescriptions": [ "Default value, signifies it is not a placeholder.", @@ -2627,18 +1020,13 @@ "TABLE", "TITLE", "SLIDE_IMAGE" - ], - "description": "The type of the placeholder." - }, - "parentObjectId": { - "description": "The object ID of this shape's parent placeholder.\nIf unset, the parent placeholder shape does not exist, so the shape does\nnot inherit properties from any other shape.", - "type": "string" + ] } }, - "id": "Placeholder", - "description": "The placeholder information that uniquely identifies a placeholder shape." + "id": "Placeholder" }, "DuplicateObjectRequest": { + "description": "Duplicates a slide or page element.\n\nWhen duplicating a slide, the duplicate slide will be created immediately\nfollowing the specified slide. When duplicating a page element, the duplicate\nwill be placed on the same page at the same position as the original.", "type": "object", "properties": { "objectId": { @@ -2646,30 +1034,29 @@ "type": "string" }, "objectIds": { + "description": "The object being duplicated may contain other objects, for example when\nduplicating a slide or a group page element. This map defines how the IDs\nof duplicated objects are generated: the keys are the IDs of the original\nobjects and its values are the IDs that will be assigned to the\ncorresponding duplicate object. The ID of the source object's duplicate\nmay be specified in this map as well, using the same value of the\n`object_id` field as a key and the newly desired ID as the value.\n\nAll keys must correspond to existing IDs in the presentation. All values\nmust be unique in the presentation and must start with an alphanumeric\ncharacter or an underscore (matches regex `[a-zA-Z0-9_]`); remaining\ncharacters may include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`). The length of the new ID must not be less than 5 or\ngreater than 50.\n\nIf any IDs of source objects are omitted from the map, a new random ID will\nbe assigned. If the map is empty or unset, all duplicate objects will\nreceive a new random ID.", + "type": "object", "additionalProperties": { "type": "string" - }, - "description": "The object being duplicated may contain other objects, for example when\nduplicating a slide or a group page element. This map defines how the IDs\nof duplicated objects are generated: the keys are the IDs of the original\nobjects and its values are the IDs that will be assigned to the\ncorresponding duplicate object. The ID of the source object's duplicate\nmay be specified in this map as well, using the same value of the\n`object_id` field as a key and the newly desired ID as the value.\n\nAll keys must correspond to existing IDs in the presentation. All values\nmust be unique in the presentation and must start with an alphanumeric\ncharacter or an underscore (matches regex `[a-zA-Z0-9_]`); remaining\ncharacters may include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`). The length of the new ID must not be less than 5 or\ngreater than 50.\n\nIf any IDs of source objects are omitted from the map, a new random ID will\nbe assigned. If the map is empty or unset, all duplicate objects will\nreceive a new random ID.", - "type": "object" + } } }, - "id": "DuplicateObjectRequest", - "description": "Duplicates a slide or page element.\n\nWhen duplicating a slide, the duplicate slide will be created immediately\nfollowing the specified slide. When duplicating a page element, the duplicate\nwill be placed on the same page at the same position as the original." + "id": "DuplicateObjectRequest" }, "ReplaceAllTextRequest": { "description": "Replaces all instances of text matching a criteria with replace text.", "type": "object", "properties": { "containsText": { - "$ref": "SubstringMatchCriteria", - "description": "Finds text in a shape matching this substring." + "description": "Finds text in a shape matching this substring.", + "$ref": "SubstringMatchCriteria" }, "pageObjectIds": { - "description": "If non-empty, limits the matches to page elements only on the given pages.\n\nReturns a 400 bad request error if given the page object ID of a\nnotes master,\nor if a page with that object ID doesn't exist in the presentation.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "If non-empty, limits the matches to page elements only on the given pages.\n\nReturns a 400 bad request error if given the page object ID of a\nnotes master,\nor if a page with that object ID doesn't exist in the presentation." }, "replaceText": { "description": "The text that will replace the matched text.", @@ -2682,17 +1069,9 @@ "description": "A page in a presentation.", "type": "object", "properties": { - "masterProperties": { - "$ref": "MasterProperties", - "description": "Master specific properties. Only set if page_type = MASTER." - }, - "objectId": { - "description": "The object ID for this page. Object IDs used by\nPage and\nPageElement share the same namespace.", - "type": "string" - }, "revisionId": { - "description": "The revision ID of the presentation containing this page. Can be used in\nupdate requests to assert that the presentation revision hasn't changed\nsince the last read operation. Only populated if the user has edit access\nto the presentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes.", - "type": "string" + "type": "string", + "description": "The revision ID of the presentation containing this page. Can be used in\nupdate requests to assert that the presentation revision hasn't changed\nsince the last read operation. Only populated if the user has edit access\nto the presentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes." }, "layoutProperties": { "description": "Layout specific properties. Only set if page_type = LAYOUT.", @@ -2706,14 +1085,6 @@ "type": "array" }, "pageType": { - "type": "string", - "enumDescriptions": [ - "A slide page.", - "A master slide page.", - "A layout page.", - "A notes page.", - "A notes master page." - ], "enum": [ "SLIDE", "MASTER", @@ -2721,30 +1092,45 @@ "NOTES", "NOTES_MASTER" ], - "description": "The type of the page." + "description": "The type of the page.", + "type": "string", + "enumDescriptions": [ + "A slide page.", + "A master slide page.", + "A layout page.", + "A notes page.", + "A notes master page." + ] }, "notesProperties": { "$ref": "NotesProperties", "description": "Notes specific properties. Only set if page_type = NOTES." }, - "slideProperties": { - "description": "Slide specific properties. Only set if page_type = SLIDE.", - "$ref": "SlideProperties" - }, "pageProperties": { "description": "The properties of the page.", "$ref": "PageProperties" + }, + "slideProperties": { + "$ref": "SlideProperties", + "description": "Slide specific properties. Only set if page_type = SLIDE." + }, + "masterProperties": { + "$ref": "MasterProperties", + "description": "Master specific properties. Only set if page_type = MASTER." + }, + "objectId": { + "description": "The object ID for this page. Object IDs used by\nPage and\nPageElement share the same namespace.", + "type": "string" } }, "id": "Page" }, "ShapeBackgroundFill": { + "id": "ShapeBackgroundFill", "description": "The shape background fill.", "type": "object", "properties": { "propertyState": { - "description": "The background fill property state.\n\nUpdating the the fill on a shape will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a shape, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", - "type": "string", "enumDescriptions": [ "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", @@ -2754,17 +1140,25 @@ "RENDERED", "NOT_RENDERED", "INHERIT" - ] + ], + "description": "The background fill property state.\n\nUpdating the the fill on a shape will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a shape, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", + "type": "string" }, "solidFill": { "$ref": "SolidFill", "description": "Solid color fill." } - }, - "id": "ShapeBackgroundFill" + } }, "CropProperties": { + "description": "The crop properties of an object enclosed in a container. For example, an\nImage.\n\nThe crop properties is represented by the offsets of four edges which define\na crop rectangle. The offsets are measured in percentage from the\ncorresponding edges of the object's original bounding rectangle towards\ninside, relative to the object's original dimensions.\n\n- If the offset is in the interval (0, 1), the corresponding edge of crop\nrectangle is positioned inside of the object's original bounding rectangle.\n- If the offset is negative or greater than 1, the corresponding edge of crop\nrectangle is positioned outside of the object's original bounding rectangle.\n- If the left edge of the crop rectangle is on the right side of its right\nedge, the object will be flipped horizontally.\n- If the top edge of the crop rectangle is below its bottom edge, the object\nwill be flipped vertically.\n- If all offsets and rotation angle is 0, the object is not cropped.\n\nAfter cropping, the content in the crop rectangle will be stretched to fit\nits container.", + "type": "object", "properties": { + "bottomOffset": { + "format": "float", + "description": "The offset specifies the bottom edge of the crop rectangle that is located\nabove the original bounding rectangle bottom edge, relative to the object's\noriginal height.", + "type": "number" + }, "angle": { "format": "float", "description": "The rotation angle of the crop window around its center, in radians.\nRotation angle is applied after the offset.", @@ -2784,23 +1178,15 @@ "format": "float", "description": "The offset specifies the right edge of the crop rectangle that is located\nto the left of the original bounding rectangle right edge, relative to the\nobject's original width.", "type": "number" - }, - "bottomOffset": { - "format": "float", - "description": "The offset specifies the bottom edge of the crop rectangle that is located\nabove the original bounding rectangle bottom edge, relative to the object's\noriginal height.", - "type": "number" } }, - "id": "CropProperties", - "description": "The crop properties of an object enclosed in a container. For example, an\nImage.\n\nThe crop properties is represented by the offsets of four edges which define\na crop rectangle. The offsets are measured in percentage from the\ncorresponding edges of the object's original bounding rectangle towards\ninside, relative to the object's original dimensions.\n\n- If the offset is in the interval (0, 1), the corresponding edge of crop\nrectangle is positioned inside of the object's original bounding rectangle.\n- If the offset is negative or greater than 1, the corresponding edge of crop\nrectangle is positioned outside of the object's original bounding rectangle.\n- If the left edge of the crop rectangle is on the right side of its right\nedge, the object will be flipped horizontally.\n- If the top edge of the crop rectangle is below its bottom edge, the object\nwill be flipped vertically.\n- If all offsets and rotation angle is 0, the object is not cropped.\n\nAfter cropping, the content in the crop rectangle will be stretched to fit\nits container.", - "type": "object" + "id": "CropProperties" }, "ReplaceAllShapesWithSheetsChartRequest": { - "id": "ReplaceAllShapesWithSheetsChartRequest", - "description": "Replaces all shapes that match the given criteria with the provided Google\nSheets chart. The chart will be scaled and centered to fit within the bounds\nof the original shape.\n\nNOTE: Replacing shapes with a chart requires at least one of the\nspreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.", "type": "object", "properties": { "linkingMode": { + "type": "string", "enumDescriptions": [ "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." @@ -2809,8 +1195,7 @@ "NOT_LINKED_IMAGE", "LINKED" ], - "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", - "type": "string" + "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked." }, "spreadsheetId": { "description": "The ID of the Google Sheets spreadsheet that contains the chart.", @@ -2832,7 +1217,9 @@ "$ref": "SubstringMatchCriteria", "description": "The criteria that the shapes must match in order to be replaced. The\nrequest will replace all of the shapes that contain the given text." } - } + }, + "id": "ReplaceAllShapesWithSheetsChartRequest", + "description": "Replaces all shapes that match the given criteria with the provided Google\nSheets chart. The chart will be scaled and centered to fit within the bounds\nof the original shape.\n\nNOTE: Replacing shapes with a chart requires at least one of the\nspreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes." }, "ColorStop": { "description": "A color and position in a gradient band.", @@ -2849,19 +1236,20 @@ "description": "The alpha value of this color in the gradient band. Defaults to 1.0,\nfully opaque." }, "color": { - "$ref": "OpaqueColor", - "description": "The color of the gradient stop." + "description": "The color of the gradient stop.", + "$ref": "OpaqueColor" } }, "id": "ColorStop" }, "Range": { + "description": "Specifies a contiguous range of an indexed collection, such as characters in\ntext.", "type": "object", "properties": { "endIndex": { + "type": "integer", "format": "int32", - "description": "The optional zero-based index of the end of the collection.\nRequired for `FIXED_RANGE` ranges.", - "type": "integer" + "description": "The optional zero-based index of the end of the collection.\nRequired for `FIXED_RANGE` ranges." }, "startIndex": { "format": "int32", @@ -2869,6 +1257,12 @@ "type": "integer" }, "type": { + "enum": [ + "RANGE_TYPE_UNSPECIFIED", + "FIXED_RANGE", + "FROM_START_INDEX", + "ALL" + ], "description": "The type of range.", "type": "string", "enumDescriptions": [ @@ -2876,21 +1270,19 @@ "A fixed range. Both the `start_index` and\n`end_index` must be specified.", "Starts the range at `start_index` and continues until the\nend of the collection. The `end_index` must not be specified.", "Sets the range to be the whole length of the collection. Both the\n`start_index` and the `end_index` must not be\nspecified." - ], - "enum": [ - "RANGE_TYPE_UNSPECIFIED", - "FIXED_RANGE", - "FROM_START_INDEX", - "ALL" ] } }, - "id": "Range", - "description": "Specifies a contiguous range of an indexed collection, such as characters in\ntext." + "id": "Range" }, "CreateVideoRequest": { + "description": "Creates a video.", "type": "object", "properties": { + "id": { + "type": "string", + "description": "The video source's unique identifier for this video.\n\ne.g. For YouTube video https://www.youtube.com/watch?v=7U3axjORYZ0,\nthe ID is 7U3axjORYZ0." + }, "source": { "enumDescriptions": [ "The video source is unspecified.", @@ -2910,17 +1302,11 @@ "elementProperties": { "$ref": "PageElementProperties", "description": "The element properties for the video." - }, - "id": { - "description": "The video source's unique identifier for this video.\n\ne.g. For YouTube video https://www.youtube.com/watch?v=7U3axjORYZ0,\nthe ID is 7U3axjORYZ0.", - "type": "string" } }, - "id": "CreateVideoRequest", - "description": "Creates a video." + "id": "CreateVideoRequest" }, "DuplicateObjectResponse": { - "description": "The response of duplicating an object.", "type": "object", "properties": { "objectId": { @@ -2928,11 +1314,29 @@ "description": "The ID of the new duplicate object." } }, - "id": "DuplicateObjectResponse" + "id": "DuplicateObjectResponse", + "description": "The response of duplicating an object." }, "ReplaceAllShapesWithImageRequest": { + "description": "Replaces all shapes that match the given criteria with the provided image.", "type": "object", "properties": { + "imageUrl": { + "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", + "type": "string" + }, + "replaceMethod": { + "enum": [ + "CENTER_INSIDE", + "CENTER_CROP" + ], + "description": "The replace method.", + "type": "string", + "enumDescriptions": [ + "Scales and centers the image to fit within the bounds of the original\nshape and maintains the image's aspect ratio. The rendered size of the\nimage may be smaller than the size of the shape. This is the default\nmethod when one is not specified.", + "Scales and centers the image to fill the bounds of the original shape.\nThe image may be cropped in order to fill the shape. The rendered size of\nthe image will be the same as that of the original shape." + ] + }, "pageObjectIds": { "description": "If non-empty, limits the matches to page elements only on the given pages.\n\nReturns a 400 bad request error if given the page object ID of a\nnotes page or a\nnotes master, or if a\npage with that object ID doesn't exist in the presentation.", "items": { @@ -2943,89 +1347,17 @@ "containsText": { "description": "If set, this request will replace all of the shapes that contain the\ngiven text.", "$ref": "SubstringMatchCriteria" - }, - "imageUrl": { - "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", - "type": "string" - }, - "replaceMethod": { - "enumDescriptions": [ - "Scales and centers the image to fit within the bounds of the original\nshape and maintains the image's aspect ratio. The rendered size of the\nimage may be smaller than the size of the shape. This is the default\nmethod when one is not specified.", - "Scales and centers the image to fill the bounds of the original shape.\nThe image may be cropped in order to fill the shape. The rendered size of\nthe image will be the same as that of the original shape." - ], - "enum": [ - "CENTER_INSIDE", - "CENTER_CROP" - ], - "description": "The replace method.", - "type": "string" } }, - "id": "ReplaceAllShapesWithImageRequest", - "description": "Replaces all shapes that match the given criteria with the provided image." + "id": "ReplaceAllShapesWithImageRequest" }, "Shadow": { + "description": "The shadow properties of a page element.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", + "type": "object", "properties": { - "blurRadius": { - "description": "The radius of the shadow blur. The larger the radius, the more diffuse the\nshadow becomes.", - "$ref": "Dimension" - }, - "transform": { - "$ref": "AffineTransform", - "description": "Transform that encodes the translate, scale, and skew of the shadow,\nrelative to the alignment position." - }, - "type": { - "enumDescriptions": [ - "Unspecified shadow type.", - "Outer shadow." - ], - "enum": [ - "SHADOW_TYPE_UNSPECIFIED", - "OUTER" - ], - "description": "The type of the shadow.", - "type": "string" - }, - "alignment": { - "enumDescriptions": [ - "Unspecified.", - "Top left.", - "Top center.", - "Top right.", - "Left center.", - "Center.", - "Right center.", - "Bottom left.", - "Bottom center.", - "Bottom right." - ], - "enum": [ - "RECTANGLE_POSITION_UNSPECIFIED", - "TOP_LEFT", - "TOP_CENTER", - "TOP_RIGHT", - "LEFT_CENTER", - "CENTER", - "RIGHT_CENTER", - "BOTTOM_LEFT", - "BOTTOM_CENTER", - "BOTTOM_RIGHT" - ], - "description": "The alignment point of the shadow, that sets the origin for translate,\nscale and skew of the shadow.", - "type": "string" - }, - "alpha": { - "format": "float", - "description": "The alpha of the shadow's color, from 0.0 to 1.0.", - "type": "number" - }, - "color": { - "description": "The shadow color value.", - "$ref": "OpaqueColor" - }, "rotateWithShape": { - "description": "Whether the shadow should rotate with the shape.", - "type": "boolean" + "type": "boolean", + "description": "Whether the shadow should rotate with the shape." }, "propertyState": { "type": "string", @@ -3040,14 +1372,68 @@ "INHERIT" ], "description": "The shadow property state.\n\nUpdating the the shadow on a page element will implicitly update this field\nto `RENDERED`, unless another value is specified in the same request. To\nhave no shadow on a page element, set this field to `NOT_RENDERED`. In this\ncase, any other shadow fields set in the same request will be ignored." + }, + "blurRadius": { + "$ref": "Dimension", + "description": "The radius of the shadow blur. The larger the radius, the more diffuse the\nshadow becomes." + }, + "transform": { + "$ref": "AffineTransform", + "description": "Transform that encodes the translate, scale, and skew of the shadow,\nrelative to the alignment position." + }, + "type": { + "type": "string", + "enumDescriptions": [ + "Unspecified shadow type.", + "Outer shadow." + ], + "enum": [ + "SHADOW_TYPE_UNSPECIFIED", + "OUTER" + ], + "description": "The type of the shadow." + }, + "alignment": { + "enum": [ + "RECTANGLE_POSITION_UNSPECIFIED", + "TOP_LEFT", + "TOP_CENTER", + "TOP_RIGHT", + "LEFT_CENTER", + "CENTER", + "RIGHT_CENTER", + "BOTTOM_LEFT", + "BOTTOM_CENTER", + "BOTTOM_RIGHT" + ], + "description": "The alignment point of the shadow, that sets the origin for translate,\nscale and skew of the shadow.", + "type": "string", + "enumDescriptions": [ + "Unspecified.", + "Top left.", + "Top center.", + "Top right.", + "Left center.", + "Center.", + "Right center.", + "Bottom left.", + "Bottom center.", + "Bottom right." + ] + }, + "alpha": { + "format": "float", + "description": "The alpha of the shadow's color, from 0.0 to 1.0.", + "type": "number" + }, + "color": { + "$ref": "OpaqueColor", + "description": "The shadow color value." } }, - "id": "Shadow", - "description": "The shadow properties of a page element.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", - "type": "object" + "id": "Shadow" }, "DeleteTableRowRequest": { - "description": "Deletes a row from a table.", "type": "object", "properties": { "cellLocation": { @@ -3059,53 +1445,43 @@ "type": "string" } }, - "id": "DeleteTableRowRequest" + "id": "DeleteTableRowRequest", + "description": "Deletes a row from a table." }, "Bullet": { "description": "Describes the bullet of a paragraph.", "type": "object", "properties": { + "nestingLevel": { + "type": "integer", + "format": "int32", + "description": "The nesting level of this paragraph in the list." + }, + "bulletStyle": { + "$ref": "TextStyle", + "description": "The paragraph specific text style applied to this bullet." + }, "listId": { "description": "The ID of the list this paragraph belongs to.", "type": "string" }, "glyph": { - "type": "string", - "description": "The rendered bullet glyph for this paragraph." - }, - "nestingLevel": { - "format": "int32", - "description": "The nesting level of this paragraph in the list.", - "type": "integer" - }, - "bulletStyle": { - "$ref": "TextStyle", - "description": "The paragraph specific text style applied to this bullet." + "description": "The rendered bullet glyph for this paragraph.", + "type": "string" } }, "id": "Bullet" }, "OutlineFill": { + "description": "The fill of the outline.", + "type": "object", "properties": { "solidFill": { "$ref": "SolidFill", "description": "Solid color fill." } }, - "id": "OutlineFill", - "description": "The fill of the outline.", - "type": "object" - }, - "CreateLineResponse": { - "description": "The result of creating a line.", - "type": "object", - "properties": { - "objectId": { - "description": "The object ID of the created line.", - "type": "string" - } - }, - "id": "CreateLineResponse" + "id": "OutlineFill" }, "TableCellLocation": { "description": "A location of a single table cell within a table.", @@ -3117,13 +1493,24 @@ "type": "integer" }, "rowIndex": { + "type": "integer", "format": "int32", - "description": "The 0-based row index.", - "type": "integer" + "description": "The 0-based row index." } }, "id": "TableCellLocation" }, + "CreateLineResponse": { + "description": "The result of creating a line.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created line.", + "type": "string" + } + }, + "id": "CreateLineResponse" + }, "ReplaceAllTextResponse": { "description": "The result of replacing text.", "type": "object", @@ -3140,14 +1527,6 @@ "description": "Updates the styling for all of the paragraphs within a Shape or Table that\noverlap with the given text index range.", "type": "object", "properties": { - "textRange": { - "$ref": "Range", - "description": "The range of text containing the paragraph(s) to style." - }, - "objectId": { - "description": "The object ID of the shape or table with the text to be styled.", - "type": "string" - }, "style": { "$ref": "ParagraphStyle", "description": "The paragraph's style." @@ -3157,8 +1536,16 @@ "description": "The location of the cell in the table containing the paragraph(s) to\nstyle. If `object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not." }, "fields": { + "type": "string", "format": "google-fieldmask", - "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the paragraph alignment, set `fields` to\n`\"alignment\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the paragraph alignment, set `fields` to\n`\"alignment\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset." + }, + "textRange": { + "$ref": "Range", + "description": "The range of text containing the paragraph(s) to style." + }, + "objectId": { + "description": "The object ID of the shape or table with the text to be styled.", "type": "string" } }, @@ -3187,8 +1574,8 @@ "description": "Placeholders are shapes that are inherit from corresponding placeholders on\nlayouts and masters.\n\nIf set, the shape is a placeholder shape and any inherited properties\ncan be resolved by looking at the parent placeholder identified by the\nPlaceholder.parent_object_id field." }, "text": { - "$ref": "TextContent", - "description": "The text content of the shape." + "description": "The text content of the shape.", + "$ref": "TextContent" }, "shapeType": { "enumDescriptions": [ @@ -3485,8 +1872,8 @@ "type": "string" }, "shapeProperties": { - "$ref": "ShapeProperties", - "description": "The properties of the shape." + "description": "The properties of the shape.", + "$ref": "ShapeProperties" } }, "id": "Shape" @@ -3500,39 +1887,26 @@ "description": "The properties of the image." }, "contentUrl": { - "description": "An URL to an image with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the image as the original requester. Access to the\nimage may be lost if the presentation's sharing settings change.", - "type": "string" + "type": "string", + "description": "An URL to an image with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the image as the original requester. Access to the\nimage may be lost if the presentation's sharing settings change." } }, "id": "Image" }, - "InsertTextRequest": { - "description": "Inserts text into a shape or a table cell.", - "type": "object", - "properties": { - "text": { - "description": "The text to be inserted.\n\nInserting a newline character will implicitly create a new\nParagraphMarker at that index.\nThe paragraph style of the new paragraph will be copied from the paragraph\nat the current insertion index, including lists and bullets.\n\nText styles for inserted text will be determined automatically, generally\npreserving the styling of neighboring text. In most cases, the text will be\nadded to the TextRun that exists at the\ninsertion index.\n\nSome control characters (U+0000-U+0008, U+000C-U+001F) and characters\nfrom the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF)\nwill be stripped out of the inserted text.", - "type": "string" - }, - "objectId": { - "description": "The object ID of the shape or table where the text will be inserted.", - "type": "string" - }, - "insertionIndex": { - "format": "int32", - "description": "The index where the text will be inserted, in Unicode code units, based\non TextElement indexes.\n\nThe index is zero-based and is computed from the start of the string.\nThe index may be adjusted to prevent insertions inside Unicode grapheme\nclusters. In these cases, the text will be inserted immediately after the\ngrapheme cluster.", - "type": "integer" - }, - "cellLocation": { - "description": "The optional table cell location if the text is to be inserted into a table\ncell. If present, the object_id must refer to a table.", - "$ref": "TableCellLocation" - } - }, - "id": "InsertTextRequest" - }, "AffineTransform": { + "description": "AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ]\nto transform source coordinates (x,y) into destination coordinates (x', y')\naccording to:\n\n x' x = shear_y scale_y translate_y \n 1 [ 1 ]\n\nAfter transformation,\n\n x' = scale_x * x + shear_x * y + translate_x;\n y' = scale_y * y + shear_y * x + translate_y;\n\nThis message is therefore composed of these six matrix elements.", "type": "object", "properties": { + "scaleY": { + "format": "double", + "description": "The Y coordinate scaling element.", + "type": "number" + }, + "translateY": { + "format": "double", + "description": "The Y coordinate translation element.", + "type": "number" + }, "translateX": { "format": "double", "description": "The X coordinate translation element.", @@ -3566,22 +1940,36 @@ "format": "double", "description": "The X coordinate shearing element.", "type": "number" - }, - "scaleY": { - "format": "double", - "description": "The Y coordinate scaling element.", - "type": "number" - }, - "translateY": { - "format": "double", - "description": "The Y coordinate translation element.", - "type": "number" } }, - "id": "AffineTransform", - "description": "AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ]\nto transform source coordinates (x,y) into destination coordinates (x', y')\naccording to:\n\n x' x = shear_y scale_y translate_y \n 1 [ 1 ]\n\nAfter transformation,\n\n x' = scale_x * x + shear_x * y + translate_x;\n y' = scale_y * y + shear_y * x + translate_y;\n\nThis message is therefore composed of these six matrix elements." + "id": "AffineTransform" + }, + "InsertTextRequest": { + "id": "InsertTextRequest", + "description": "Inserts text into a shape or a table cell.", + "type": "object", + "properties": { + "text": { + "description": "The text to be inserted.\n\nInserting a newline character will implicitly create a new\nParagraphMarker at that index.\nThe paragraph style of the new paragraph will be copied from the paragraph\nat the current insertion index, including lists and bullets.\n\nText styles for inserted text will be determined automatically, generally\npreserving the styling of neighboring text. In most cases, the text will be\nadded to the TextRun that exists at the\ninsertion index.\n\nSome control characters (U+0000-U+0008, U+000C-U+001F) and characters\nfrom the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF)\nwill be stripped out of the inserted text.", + "type": "string" + }, + "objectId": { + "description": "The object ID of the shape or table where the text will be inserted.", + "type": "string" + }, + "insertionIndex": { + "format": "int32", + "description": "The index where the text will be inserted, in Unicode code units, based\non TextElement indexes.\n\nThe index is zero-based and is computed from the start of the string.\nThe index may be adjusted to prevent insertions inside Unicode grapheme\nclusters. In these cases, the text will be inserted immediately after the\ngrapheme cluster.", + "type": "integer" + }, + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The optional table cell location if the text is to be inserted into a table\ncell. If present, the object_id must refer to a table." + } + } }, "AutoText": { + "description": "A TextElement kind that represents auto text.", "type": "object", "properties": { "content": { @@ -3589,15 +1977,15 @@ "type": "string" }, "type": { - "enum": [ - "TYPE_UNSPECIFIED", - "SLIDE_NUMBER" - ], "description": "The type of this auto text.", "type": "string", "enumDescriptions": [ "An unspecified autotext type.", "Type for autotext that represents the current slide number." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "SLIDE_NUMBER" ] }, "style": { @@ -3605,33 +1993,1913 @@ "description": "The styling applied to this auto text." } }, - "id": "AutoText", - "description": "A TextElement kind that represents auto text." + "id": "AutoText" }, "CreateVideoResponse": { "description": "The result of creating a video.", "type": "object", "properties": { "objectId": { - "description": "The object ID of the created video.", - "type": "string" + "type": "string", + "description": "The object ID of the created video." } }, "id": "CreateVideoResponse" + }, + "UpdatePageElementTransformRequest": { + "description": "Updates the transform of a page element.\n\nUpdating the transform of a group will change the absolute transform of the\npage elements in that group, which can change their visual appearance. See\nthe documentation for PageElement.transform for more details.", + "type": "object", + "properties": { + "transform": { + "description": "The input transform matrix used to update the page element.", + "$ref": "AffineTransform" + }, + "objectId": { + "description": "The object ID of the page element to update.", + "type": "string" + }, + "applyMode": { + "description": "The apply mode of the transform update.", + "type": "string", + "enumDescriptions": [ + "Unspecified mode.", + "Applies the new AffineTransform matrix to the existing one, and\nreplaces the existing one with the resulting concatenation.", + "Replaces the existing AffineTransform matrix with the new one." + ], + "enum": [ + "APPLY_MODE_UNSPECIFIED", + "RELATIVE", + "ABSOLUTE" + ] + } + }, + "id": "UpdatePageElementTransformRequest" + }, + "DeleteTextRequest": { + "description": "Deletes text from a shape or a table cell.", + "type": "object", + "properties": { + "textRange": { + "description": "The range of text to delete, based on TextElement indexes.\n\nThere is always an implicit newline character at the end of a shape's or\ntable cell's text that cannot be deleted. `Range.Type.ALL` will use the\ncorrect bounds, but care must be taken when specifying explicit bounds for\nrange types `FROM_START_INDEX` and `FIXED_RANGE`. For example, if the text\nis \"ABC\", followed by an implicit newline, then the maximum value is 2 for\n`text_range.start_index` and 3 for `text_range.end_index`.\n\nDeleting text that crosses a paragraph boundary may result in changes\nto paragraph styles and lists as the two paragraphs are merged.\n\nRanges that include only one code unit of a surrogate pair are expanded to\ninclude both code units.", + "$ref": "Range" + }, + "objectId": { + "description": "The object ID of the shape or table from which the text will be deleted.", + "type": "string" + }, + "cellLocation": { + "description": "The optional table cell location if the text is to be deleted from a table\ncell. If present, the object_id must refer to a table.", + "$ref": "TableCellLocation" + } + }, + "id": "DeleteTextRequest" + }, + "DeleteObjectRequest": { + "type": "object", + "properties": { + "objectId": { + "type": "string", + "description": "The object ID of the page or page element to delete.\n\nIf after a delete operation a group contains\nonly 1 or no page elements, the group is also deleted.\n\nIf a placeholder is deleted on a layout, any empty inheriting shapes are\nalso deleted." + } + }, + "id": "DeleteObjectRequest", + "description": "Deletes an object, either pages or\npage elements, from the\npresentation." + }, + "TextElement": { + "description": "A TextElement describes the content of a range of indices in the text content\nof a Shape or TableCell.", + "type": "object", + "properties": { + "paragraphMarker": { + "$ref": "ParagraphMarker", + "description": "A marker representing the beginning of a new paragraph.\n\nThe `start_index` and `end_index` of this TextElement represent the\nrange of the paragraph. Other TextElements with an index range contained\ninside this paragraph's range are considered to be part of this\nparagraph. The range of indices of two separate paragraphs will never\noverlap." + }, + "endIndex": { + "format": "int32", + "description": "The zero-based end index of this text element, exclusive, in Unicode code\nunits.", + "type": "integer" + }, + "startIndex": { + "format": "int32", + "description": "The zero-based start index of this text element, in Unicode code units.", + "type": "integer" + }, + "textRun": { + "$ref": "TextRun", + "description": "A TextElement representing a run of text where all of the characters\nin the run have the same TextStyle.\n\nThe `start_index` and `end_index` of TextRuns will always be fully\ncontained in the index range of a single `paragraph_marker` TextElement.\nIn other words, a TextRun will never span multiple paragraphs." + }, + "autoText": { + "$ref": "AutoText", + "description": "A TextElement representing a spot in the text that is dynamically\nreplaced with content that can change over time." + } + }, + "id": "TextElement" + }, + "Dimension": { + "description": "A magnitude in a single direction in the specified units.", + "type": "object", + "properties": { + "magnitude": { + "format": "double", + "description": "The magnitude.", + "type": "number" + }, + "unit": { + "description": "The units for magnitude.", + "type": "string", + "enumDescriptions": [ + "The units are unknown.", + "An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter\nand thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", + "A point, 1/72 of an inch." + ], + "enum": [ + "UNIT_UNSPECIFIED", + "EMU", + "PT" + ] + } + }, + "id": "Dimension" + }, + "LineFill": { + "description": "The fill of the line.", + "type": "object", + "properties": { + "solidFill": { + "$ref": "SolidFill", + "description": "Solid color fill." + } + }, + "id": "LineFill" + }, + "VideoProperties": { + "properties": { + "outline": { + "$ref": "Outline", + "description": "The outline of the video. The default outline matches the defaults for new\nvideos created in the Slides editor." + } + }, + "id": "VideoProperties", + "description": "The properties of the Video.", + "type": "object" + }, + "InsertTableRowsRequest": { + "id": "InsertTableRowsRequest", + "description": "Inserts rows into a table.", + "type": "object", + "properties": { + "number": { + "format": "int32", + "description": "The number of rows to be inserted. Maximum 20 per request.", + "type": "integer" + }, + "cellLocation": { + "description": "The reference table cell location from which rows will be inserted.\n\nA new row will be inserted above (or below) the row where the reference\ncell is. If the reference cell is a merged cell, a new row will be\ninserted above (or below) the merged cell.", + "$ref": "TableCellLocation" + }, + "tableObjectId": { + "description": "The table to insert rows into.", + "type": "string" + }, + "insertBelow": { + "description": "Whether to insert new rows below the reference cell location.\n\n- `True`: insert below the cell.\n- `False`: insert above the cell.", + "type": "boolean" + } + } + }, + "LayoutProperties": { + "description": "The properties of Page are only\nrelevant for pages with page_type LAYOUT.", + "type": "object", + "properties": { + "masterObjectId": { + "description": "The object ID of the master that this layout is based on.", + "type": "string" + }, + "name": { + "description": "The name of the layout.", + "type": "string" + }, + "displayName": { + "description": "The human-readable name of the layout.", + "type": "string" + } + }, + "id": "LayoutProperties" + }, + "LineProperties": { + "description": "The properties of the Line.\n\nWhen unset, these fields default to values that match the appearance of\nnew lines created in the Slides editor.", + "type": "object", + "properties": { + "lineFill": { + "$ref": "LineFill", + "description": "The fill of the line. The default line fill matches the defaults for new\nlines created in the Slides editor." + }, + "dashStyle": { + "description": "The dash style of the line.", + "type": "string", + "enumDescriptions": [ + "Unspecified dash style.", + "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", + "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", + "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", + "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", + "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", + "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." + ], + "enum": [ + "DASH_STYLE_UNSPECIFIED", + "SOLID", + "DOT", + "DASH", + "DASH_DOT", + "LONG_DASH", + "LONG_DASH_DOT" + ] + }, + "link": { + "$ref": "Link", + "description": "The hyperlink destination of the line. If unset, there is no link." + }, + "endArrow": { + "enum": [ + "ARROW_STYLE_UNSPECIFIED", + "NONE", + "STEALTH_ARROW", + "FILL_ARROW", + "FILL_CIRCLE", + "FILL_SQUARE", + "FILL_DIAMOND", + "OPEN_ARROW", + "OPEN_CIRCLE", + "OPEN_SQUARE", + "OPEN_DIAMOND" + ], + "description": "The style of the arrow at the end of the line.", + "type": "string", + "enumDescriptions": [ + "An unspecified arrow style.", + "No arrow.", + "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", + "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", + "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", + "Filled square.", + "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", + "Hollow arrow.", + "Hollow circle.", + "Hollow square.", + "Hollow diamond." + ] + }, + "startArrow": { + "enum": [ + "ARROW_STYLE_UNSPECIFIED", + "NONE", + "STEALTH_ARROW", + "FILL_ARROW", + "FILL_CIRCLE", + "FILL_SQUARE", + "FILL_DIAMOND", + "OPEN_ARROW", + "OPEN_CIRCLE", + "OPEN_SQUARE", + "OPEN_DIAMOND" + ], + "description": "The style of the arrow at the beginning of the line.", + "type": "string", + "enumDescriptions": [ + "An unspecified arrow style.", + "No arrow.", + "Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value\n'stealth'.", + "Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", + "Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", + "Filled square.", + "Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", + "Hollow arrow.", + "Hollow circle.", + "Hollow square.", + "Hollow diamond." + ] + }, + "weight": { + "description": "The thickness of the line.", + "$ref": "Dimension" + } + }, + "id": "LineProperties" + }, + "Presentation": { + "id": "Presentation", + "description": "A Google Slides presentation.", + "type": "object", + "properties": { + "presentationId": { + "description": "The ID of the presentation.", + "type": "string" + }, + "slides": { + "description": "The slides in the presentation.\nA slide inherits properties from a slide layout.", + "items": { + "$ref": "Page" + }, + "type": "array" + }, + "revisionId": { + "type": "string", + "description": "The revision ID of the presentation. Can be used in update requests\nto assert that the presentation revision hasn't changed since the last\nread operation. Only populated if the user has edit access to the\npresentation.\n\nThe format of the revision ID may change over time, so it should be treated\nopaquely. A returned revision ID is only guaranteed to be valid for 24\nhours after it has been returned and cannot be shared across users. If the\nrevision ID is unchanged between calls, then the presentation has not\nchanged. Conversely, a changed ID (for the same presentation and user)\nusually means the presentation has been updated; however, a changed ID can\nalso be due to internal factors such as ID format changes." + }, + "notesMaster": { + "$ref": "Page", + "description": "The notes master in the presentation. It serves three purposes:\n\n- Placeholder shapes on a notes master contain the default text styles and\n shape properties of all placeholder shapes on notes pages. Specifically,\n a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a\n `BODY` placeholder shape contains the speaker notes.\n- The notes master page properties define the common page properties\n inherited by all notes pages.\n- Any other shapes on the notes master will appear on all notes pages.\n\nThe notes master is read-only." + }, + "title": { + "description": "The title of the presentation.", + "type": "string" + }, + "layouts": { + "description": "The layouts in the presentation. A layout is a template that determines\nhow content is arranged and styled on the slides that inherit from that\nlayout.", + "items": { + "$ref": "Page" + }, + "type": "array" + }, + "masters": { + "description": "The slide masters in the presentation. A slide master contains all common\npage elements and the common properties for a set of layouts. They serve\nthree purposes:\n\n- Placeholder shapes on a master contain the default text styles and shape\n properties of all placeholder shapes on pages that use that master.\n- The master page properties define the common page properties inherited by\n its layouts.\n- Any other shapes on the master slide will appear on all slides using that\n master, regardless of their layout.", + "items": { + "$ref": "Page" + }, + "type": "array" + }, + "locale": { + "type": "string", + "description": "The locale of the presentation, as an IETF BCP 47 language tag." + }, + "pageSize": { + "$ref": "Size", + "description": "The size of pages in the presentation." + } + } + }, + "OpaqueColor": { + "properties": { + "rgbColor": { + "$ref": "RgbColor", + "description": "An opaque RGB color." + }, + "themeColor": { + "enumDescriptions": [ + "Unspecified theme color. This value should not be used.", + "Represents the first dark color.", + "Represents the first light color.", + "Represents the second dark color.", + "Represents the second light color.", + "Represents the first accent color.", + "Represents the second accent color.", + "Represents the third accent color.", + "Represents the fourth accent color.", + "Represents the fifth accent color.", + "Represents the sixth accent color.", + "Represents the color to use for hyperlinks.", + "Represents the color to use for visited hyperlinks.", + "Represents the first text color.", + "Represents the first background color.", + "Represents the second text color.", + "Represents the second background color." + ], + "enum": [ + "THEME_COLOR_TYPE_UNSPECIFIED", + "DARK1", + "LIGHT1", + "DARK2", + "LIGHT2", + "ACCENT1", + "ACCENT2", + "ACCENT3", + "ACCENT4", + "ACCENT5", + "ACCENT6", + "HYPERLINK", + "FOLLOWED_HYPERLINK", + "TEXT1", + "BACKGROUND1", + "TEXT2", + "BACKGROUND2" + ], + "description": "An opaque theme color.", + "type": "string" + } + }, + "id": "OpaqueColor", + "description": "A themeable solid color value.", + "type": "object" + }, + "ImageProperties": { + "description": "The properties of the Image.", + "type": "object", + "properties": { + "recolor": { + "$ref": "Recolor", + "description": "The recolor effect of the image. If not set, the image is not recolored.\nThis property is read-only." + }, + "cropProperties": { + "$ref": "CropProperties", + "description": "The crop properties of the image. If not set, the image is not cropped.\nThis property is read-only." + }, + "outline": { + "description": "The outline of the image. If not set, the the image has no outline.", + "$ref": "Outline" + }, + "brightness": { + "format": "float", + "description": "The brightness effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", + "type": "number" + }, + "transparency": { + "format": "float", + "description": "The transparency effect of the image. The value should be in the interval\n[0.0, 1.0], where 0 means no effect and 1 means completely transparent.\nThis property is read-only.", + "type": "number" + }, + "shadow": { + "$ref": "Shadow", + "description": "The shadow of the image. If not set, the image has no shadow. This property\nis read-only." + }, + "contrast": { + "format": "float", + "description": "The contrast effect of the image. The value should be in the interval\n[-1.0, 1.0], where 0 means no effect. This property is read-only.", + "type": "number" + }, + "link": { + "description": "The hyperlink destination of the image. If unset, there is no link.", + "$ref": "Link" + } + }, + "id": "ImageProperties" + }, + "ReplaceAllShapesWithImageResponse": { + "description": "The result of replacing shapes with an image.", + "type": "object", + "properties": { + "occurrencesChanged": { + "format": "int32", + "description": "The number of shapes replaced with images.", + "type": "integer" + } + }, + "id": "ReplaceAllShapesWithImageResponse" + }, + "Line": { + "id": "Line", + "description": "A PageElement kind representing a\nline, curved connector, or bent connector.", + "type": "object", + "properties": { + "lineProperties": { + "$ref": "LineProperties", + "description": "The properties of the line." + }, + "lineType": { + "enumDescriptions": [ + "An unspecified line type.", + "Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType\n'straightConnector1'.", + "Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector2'.", + "Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector3'.", + "Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector4'.", + "Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'bentConnector5'.", + "Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector2'.", + "Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector3'.", + "Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector4'.", + "Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType\n'curvedConnector5'." + ], + "enum": [ + "TYPE_UNSPECIFIED", + "STRAIGHT_CONNECTOR_1", + "BENT_CONNECTOR_2", + "BENT_CONNECTOR_3", + "BENT_CONNECTOR_4", + "BENT_CONNECTOR_5", + "CURVED_CONNECTOR_2", + "CURVED_CONNECTOR_3", + "CURVED_CONNECTOR_4", + "CURVED_CONNECTOR_5" + ], + "description": "The type of the line.", + "type": "string" + } + } + }, + "CreateSheetsChartRequest": { + "type": "object", + "properties": { + "objectId": { + "description": "A user-supplied object ID.\n\nIf specified, the ID must be unique among all pages and page elements in\nthe presentation. The ID should start with a word character [a-zA-Z0-9_]\nand then followed by any number of the following characters [a-zA-Z0-9_-:].\nThe length of the ID should not be less than 5 or greater than 50.\nIf empty, a unique identifier will be generated.", + "type": "string" + }, + "elementProperties": { + "$ref": "PageElementProperties", + "description": "The element properties for the chart.\n\nWhen the aspect ratio of the provided size does not match the chart aspect\nratio, the chart is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation." + }, + "linkingMode": { + "enumDescriptions": [ + "The chart is not associated with the source spreadsheet and cannot be\nupdated. A chart that is not linked will be inserted as an image.", + "Linking the chart allows it to be updated, and other collaborators will\nsee a link to the spreadsheet." + ], + "enum": [ + "NOT_LINKED_IMAGE", + "LINKED" + ], + "description": "The mode with which the chart is linked to the source spreadsheet. When\nnot specified, the chart will be an image that is not linked.", + "type": "string" + }, + "spreadsheetId": { + "description": "The ID of the Google Sheets spreadsheet that contains the chart.", + "type": "string" + }, + "chartId": { + "format": "int32", + "description": "The ID of the specific chart in the Google Sheets spreadsheet.", + "type": "integer" + } + }, + "id": "CreateSheetsChartRequest", + "description": "Creates an embedded Google Sheets chart.\n\nNOTE: Chart creation requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes." + }, + "BatchUpdatePresentationResponse": { + "description": "Response message from a batch update.", + "type": "object", + "properties": { + "presentationId": { + "description": "The presentation the updates were applied to.", + "type": "string" + }, + "replies": { + "description": "The reply of the updates. This maps 1:1 with the updates, although\nreplies to some requests may be empty.", + "items": { + "$ref": "Response" + }, + "type": "array" + } + }, + "id": "BatchUpdatePresentationResponse" + }, + "CreateImageResponse": { + "description": "The result of creating an image.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created image.", + "type": "string" + } + }, + "id": "CreateImageResponse" + }, + "SlideProperties": { + "type": "object", + "properties": { + "notesPage": { + "$ref": "Page", + "description": "The notes page that this slide is associated with. It defines the visual\nappearance of a notes page when printing or exporting slides with speaker\nnotes. A notes page inherits properties from the\nnotes master.\nThe placeholder shape with type BODY on the notes page contains the speaker\nnotes for this slide. The ID of this shape is identified by the\nspeakerNotesObjectId field.\nThe notes page is read-only except for the text content and styles of the\nspeaker notes shape." + }, + "masterObjectId": { + "description": "The object ID of the master that this slide is based on.", + "type": "string" + }, + "layoutObjectId": { + "description": "The object ID of the layout that this slide is based on.", + "type": "string" + } + }, + "id": "SlideProperties", + "description": "The properties of Page that are only\nrelevant for pages with page_type SLIDE." + }, + "MasterProperties": { + "id": "MasterProperties", + "description": "The properties of Page that are only\nrelevant for pages with page_type MASTER.", + "type": "object", + "properties": { + "displayName": { + "description": "The human-readable name of the master.", + "type": "string" + } + } + }, + "Response": { + "description": "A single response from an update.", + "type": "object", + "properties": { + "duplicateObject": { + "description": "The result of duplicating an object.", + "$ref": "DuplicateObjectResponse" + }, + "createShape": { + "$ref": "CreateShapeResponse", + "description": "The result of creating a shape." + }, + "createLine": { + "description": "The result of creating a line.", + "$ref": "CreateLineResponse" + }, + "createImage": { + "description": "The result of creating an image.", + "$ref": "CreateImageResponse" + }, + "createVideo": { + "$ref": "CreateVideoResponse", + "description": "The result of creating a video." + }, + "replaceAllShapesWithSheetsChart": { + "$ref": "ReplaceAllShapesWithSheetsChartResponse", + "description": "The result of replacing all shapes matching some criteria with a Google\nSheets chart." + }, + "createSheetsChart": { + "description": "The result of creating a Google Sheets chart.", + "$ref": "CreateSheetsChartResponse" + }, + "replaceAllShapesWithImage": { + "description": "The result of replacing all shapes matching some criteria with an\nimage.", + "$ref": "ReplaceAllShapesWithImageResponse" + }, + "createTable": { + "$ref": "CreateTableResponse", + "description": "The result of creating a table." + }, + "replaceAllText": { + "$ref": "ReplaceAllTextResponse", + "description": "The result of replacing text." + }, + "createSlide": { + "$ref": "CreateSlideResponse", + "description": "The result of creating a slide." + } + }, + "id": "Response" + }, + "SubstringMatchCriteria": { + "description": "A criteria that matches a specific string of text in a shape or table.", + "type": "object", + "properties": { + "text": { + "description": "The text to search for in the shape or table.", + "type": "string" + }, + "matchCase": { + "description": "Indicates whether the search should respect case:\n\n- `True`: the search is case sensitive.\n- `False`: the search is case insensitive.", + "type": "boolean" + } + }, + "id": "SubstringMatchCriteria" + }, + "LayoutReference": { + "id": "LayoutReference", + "description": "Slide layout reference. This may reference either:\n\n- A predefined layout\n- One of the layouts in the presentation.", + "type": "object", + "properties": { + "predefinedLayout": { + "enumDescriptions": [ + "Unspecified layout.", + "Blank layout, with no placeholders.", + "Layout with a caption at the bottom.", + "Layout with a title and a subtitle.", + "Layout with a title and body.", + "Layout with a title and two columns.", + "Layout with only a title.", + "Layout with a section title.", + "Layout with a title and subtitle on one side and description on the other.", + "Layout with one title and one body, arranged in a single column.", + "Layout with a main point.", + "Layout with a big number heading." + ], + "enum": [ + "PREDEFINED_LAYOUT_UNSPECIFIED", + "BLANK", + "CAPTION_ONLY", + "TITLE", + "TITLE_AND_BODY", + "TITLE_AND_TWO_COLUMNS", + "TITLE_ONLY", + "SECTION_HEADER", + "SECTION_TITLE_AND_DESCRIPTION", + "ONE_COLUMN_TEXT", + "MAIN_POINT", + "BIG_NUMBER" + ], + "description": "Predefined layout.", + "type": "string" + }, + "layoutId": { + "description": "Layout ID: the object ID of one of the layouts in the presentation.", + "type": "string" + } + } + }, + "TextRun": { + "description": "A TextElement kind that represents a run of text that all has the same\nstyling.", + "type": "object", + "properties": { + "style": { + "$ref": "TextStyle", + "description": "The styling applied to this run." + }, + "content": { + "description": "The text of this run.", + "type": "string" + } + }, + "id": "TextRun" + }, + "TableRange": { + "description": "A table range represents a reference to a subset of a table.\n\nIt's important to note that the cells specified by a table range do not\nnecessarily form a rectangle. For example, let's say we have a 3 x 3 table\nwhere all the cells of the last row are merged together. The table looks\nlike this:\n\n \n [ ]\n\nA table range with location = (0, 0), row span = 3 and column span = 2\nspecifies the following cells:\n\n x x \n [ x ]", + "type": "object", + "properties": { + "rowSpan": { + "type": "integer", + "format": "int32", + "description": "The row span of the table range." + }, + "location": { + "description": "The starting location of the table range.", + "$ref": "TableCellLocation" + }, + "columnSpan": { + "format": "int32", + "description": "The column span of the table range.", + "type": "integer" + } + }, + "id": "TableRange" + }, + "CreateTableRequest": { + "description": "Creates a new table.", + "type": "object", + "properties": { + "rows": { + "format": "int32", + "description": "Number of rows in the table.", + "type": "integer" + }, + "columns": { + "format": "int32", + "description": "Number of columns in the table.", + "type": "integer" + }, + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "elementProperties": { + "$ref": "PageElementProperties", + "description": "The element properties for the table.\n\nThe table will be created at the provided size, subject to a minimum size.\nIf no size is provided, the table will be automatically sized.\n\nTable transforms must have a scale of 1 and no shear components. If no\ntransform is provided, the table will be centered on the page." + } + }, + "id": "CreateTableRequest" + }, + "CreateTableResponse": { + "properties": { + "objectId": { + "description": "The object ID of the created table.", + "type": "string" + } + }, + "id": "CreateTableResponse", + "description": "The result of creating a table.", + "type": "object" + }, + "Table": { + "description": "A PageElement kind representing a\ntable.", + "type": "object", + "properties": { + "rows": { + "format": "int32", + "description": "Number of rows in the table.", + "type": "integer" + }, + "tableColumns": { + "description": "Properties of each column.", + "items": { + "$ref": "TableColumnProperties" + }, + "type": "array" + }, + "columns": { + "format": "int32", + "description": "Number of columns in the table.", + "type": "integer" + }, + "tableRows": { + "description": "Properties and contents of each row.\n\nCells that span multiple rows are contained in only one of these rows and\nhave a row_span greater\nthan 1.", + "items": { + "$ref": "TableRow" + }, + "type": "array" + } + }, + "id": "Table" + }, + "PageBackgroundFill": { + "type": "object", + "properties": { + "propertyState": { + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], + "description": "The background fill property state.\n\nUpdating the fill on a page will implicitly update this field to\n`RENDERED`, unless another value is specified in the same request. To\nhave no fill on a page, set this field to `NOT_RENDERED`. In this case,\nany other fill fields set in the same request will be ignored.", + "type": "string", + "enumDescriptions": [ + "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", + "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", + "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." + ] + }, + "stretchedPictureFill": { + "$ref": "StretchedPictureFill", + "description": "Stretched picture fill." + }, + "solidFill": { + "$ref": "SolidFill", + "description": "Solid color fill." + } + }, + "id": "PageBackgroundFill", + "description": "The page background fill." + }, + "SheetsChart": { + "description": "A PageElement kind representing\na linked chart embedded from Google Sheets.", + "type": "object", + "properties": { + "spreadsheetId": { + "description": "The ID of the Google Sheets spreadsheet that contains the source chart.", + "type": "string" + }, + "chartId": { + "type": "integer", + "format": "int32", + "description": "The ID of the specific chart in the Google Sheets spreadsheet that is\nembedded." + }, + "sheetsChartProperties": { + "description": "The properties of the Sheets chart.", + "$ref": "SheetsChartProperties" + }, + "contentUrl": { + "description": "The URL of an image of the embedded chart, with a default lifetime of 30\nminutes. This URL is tagged with the account of the requester. Anyone with\nthe URL effectively accesses the image as the original requester. Access to\nthe image may be lost if the presentation's sharing settings change.", + "type": "string" + } + }, + "id": "SheetsChart" + }, + "SolidFill": { + "description": "A solid color fill. The page or page element is filled entirely with the\nspecified color value.\n\nIf any field is unset, its value may be inherited from a parent placeholder\nif it exists.", + "type": "object", + "properties": { + "color": { + "$ref": "OpaqueColor", + "description": "The color value of the solid fill." + }, + "alpha": { + "format": "float", + "description": "The fraction of this `color` that should be applied to the pixel.\nThat is, the final pixel color is defined by the equation:\n\n pixel color = alpha * (color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color.", + "type": "number" + } + }, + "id": "SolidFill" + }, + "ThemeColorPair": { + "description": "A pair mapping a theme color type to the concrete color it represents.", + "type": "object", + "properties": { + "color": { + "description": "The concrete color corresponding to the theme color type above.", + "$ref": "RgbColor" + }, + "type": { + "enumDescriptions": [ + "Unspecified theme color. This value should not be used.", + "Represents the first dark color.", + "Represents the first light color.", + "Represents the second dark color.", + "Represents the second light color.", + "Represents the first accent color.", + "Represents the second accent color.", + "Represents the third accent color.", + "Represents the fourth accent color.", + "Represents the fifth accent color.", + "Represents the sixth accent color.", + "Represents the color to use for hyperlinks.", + "Represents the color to use for visited hyperlinks.", + "Represents the first text color.", + "Represents the first background color.", + "Represents the second text color.", + "Represents the second background color." + ], + "enum": [ + "THEME_COLOR_TYPE_UNSPECIFIED", + "DARK1", + "LIGHT1", + "DARK2", + "LIGHT2", + "ACCENT1", + "ACCENT2", + "ACCENT3", + "ACCENT4", + "ACCENT5", + "ACCENT6", + "HYPERLINK", + "FOLLOWED_HYPERLINK", + "TEXT1", + "BACKGROUND1", + "TEXT2", + "BACKGROUND2" + ], + "description": "The type of the theme color.", + "type": "string" + } + }, + "id": "ThemeColorPair" + }, + "OptionalColor": { + "description": "A color that can either be fully opaque or fully transparent.", + "type": "object", + "properties": { + "opaqueColor": { + "$ref": "OpaqueColor", + "description": "If set, this will be used as an opaque color. If unset, this represents\na transparent color." + } + }, + "id": "OptionalColor" + }, + "PageElementProperties": { + "properties": { + "transform": { + "$ref": "AffineTransform", + "description": "The transform for the element." + }, + "pageObjectId": { + "description": "The object ID of the page where the element is located.", + "type": "string" + }, + "size": { + "description": "The size of the element.", + "$ref": "Size" + } + }, + "id": "PageElementProperties", + "description": "Common properties for a page element.\n\nNote: When you initially create a\nPageElement, the API may modify\nthe values of both `size` and `transform`, but the\nvisual size will be unchanged.", + "type": "object" + }, + "SheetsChartProperties": { + "properties": { + "chartImageProperties": { + "$ref": "ImageProperties", + "description": "The properties of the embedded chart image." + } + }, + "id": "SheetsChartProperties", + "description": "The properties of the SheetsChart.", + "type": "object" + }, + "StretchedPictureFill": { + "description": "The stretched picture fill. The page or page element is filled entirely with\nthe specified picture. The picture is stretched to fit its container.", + "type": "object", + "properties": { + "contentUrl": { + "description": "Reading the content_url:\n\nAn URL to a picture with a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the picture as the original requester. Access to the\npicture may be lost if the presentation's sharing settings change.\n\nWriting the content_url:\n\nThe picture is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Pictures must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", + "type": "string" + }, + "size": { + "$ref": "Size", + "description": "The original size of the picture fill. This field is read-only." + } + }, + "id": "StretchedPictureFill" + }, + "DeleteTableColumnRequest": { + "description": "Deletes a column from a table.", + "type": "object", + "properties": { + "cellLocation": { + "$ref": "TableCellLocation", + "description": "The reference table cell location from which a column will be deleted.\n\nThe column this cell spans will be deleted. If this is a merged cell,\nmultiple columns will be deleted. If no columns remain in the table after\nthis deletion, the whole table is deleted." + }, + "tableObjectId": { + "description": "The table to delete columns from.", + "type": "string" + } + }, + "id": "DeleteTableColumnRequest" + }, + "UpdateTextStyleRequest": { + "properties": { + "style": { + "$ref": "TextStyle", + "description": "The style(s) to set on the text.\n\nIf the value for a particular style matches that of the parent, that style\nwill be set to inherit.\n\nCertain text style changes may cause other changes meant to mirror the\nbehavior of the Slides editor. See the documentation of\nTextStyle for more information." + }, + "cellLocation": { + "description": "The location of the cell in the table containing the text to style. If\n`object_id` refers to a table, `cell_location` must have a value.\nOtherwise, it must not.", + "$ref": "TableCellLocation" + }, + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `style` is implied and\nshould not be specified. A single `\"*\"` can be used as short-hand for\nlisting every field.\n\nFor example, to update the text style to bold, set `fields` to `\"bold\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" + }, + "textRange": { + "description": "The range of text to style.\n\nThe range may be extended to include adjacent newlines.\n\nIf the range fully contains a paragraph belonging to a list, the\nparagraph's bullet is also updated with the matching text style.", + "$ref": "Range" + }, + "objectId": { + "type": "string", + "description": "The object ID of the shape or table with the text to be styled." + } + }, + "id": "UpdateTextStyleRequest", + "description": "Update the styling of text in a Shape or\nTable.", + "type": "object" + }, + "List": { + "id": "List", + "description": "A List describes the look and feel of bullets belonging to paragraphs\nassociated with a list. A paragraph that is part of a list has an implicit\nreference to that list's ID.", + "type": "object", + "properties": { + "nestingLevel": { + "description": "A map of nesting levels to the properties of bullets at the associated\nlevel. A list has at most nine levels of nesting, so the possible values\nfor the keys of this map are 0 through 8, inclusive.", + "type": "object", + "additionalProperties": { + "$ref": "NestingLevel" + } + }, + "listId": { + "description": "The ID of the list.", + "type": "string" + } + } + }, + "WeightedFontFamily": { + "description": "Represents a font family and weight used to style a TextRun.", + "type": "object", + "properties": { + "weight": { + "format": "int32", + "description": "The rendered weight of the text. This field can have any value that is a\nmultiple of `100` between `100` and `900`, inclusive. This range\ncorresponds to the numerical values described in the CSS 2.1\nSpecification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness),\nwith non-numerical values disallowed. Weights greater than or equal to\n`700` are considered bold, and weights less than `700`are not bold. The\ndefault value is `400` (\"normal\").", + "type": "integer" + }, + "fontFamily": { + "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.", + "type": "string" + } + }, + "id": "WeightedFontFamily" + }, + "PageElement": { + "properties": { + "video": { + "$ref": "Video", + "description": "A video page element." + }, + "wordArt": { + "$ref": "WordArt", + "description": "A word art page element." + }, + "table": { + "description": "A table page element.", + "$ref": "Table" + }, + "objectId": { + "description": "The object ID for this page element. Object IDs used by\ngoogle.apps.slides.v1.Page and\ngoogle.apps.slides.v1.PageElement share the same namespace.", + "type": "string" + }, + "transform": { + "$ref": "AffineTransform", + "description": "The transform of the page element.\n\nThe visual appearance of the page element is determined by its absolute\ntransform. To compute the absolute transform, preconcatenate a page\nelement's transform with the transforms of all of its parent groups. If the\npage element is not in a group, its absolute transform is the same as the\nvalue in this field.\n\nThe initial transform for the newly created Group is always the identity transform." + }, + "shape": { + "$ref": "Shape", + "description": "A generic shape." + }, + "line": { + "description": "A line page element.", + "$ref": "Line" + }, + "description": { + "description": "The description of the page element. Combined with title to display alt\ntext.", + "type": "string" + }, + "elementGroup": { + "description": "A collection of page elements joined as a single unit.", + "$ref": "Group" + }, + "image": { + "description": "An image page element.", + "$ref": "Image" + }, + "size": { + "description": "The size of the page element.", + "$ref": "Size" + }, + "sheetsChart": { + "description": "A linked chart embedded from Google Sheets. Unlinked charts are\nrepresented as images.", + "$ref": "SheetsChart" + }, + "title": { + "description": "The title of the page element. Combined with description to display alt\ntext.", + "type": "string" + } + }, + "id": "PageElement", + "description": "A visual element rendered on a page.", + "type": "object" + }, + "CreateImageRequest": { + "description": "Creates an image.", + "type": "object", + "properties": { + "url": { + "description": "The image URL.\n\nThe image is fetched once at insertion time and a copy is stored for\ndisplay inside the presentation. Images must be less than 50MB in size,\ncannot exceed 25 megapixels, and must be in either in PNG, JPEG, or GIF\nformat.\n\nThe provided URL can be at maximum 2K bytes large.", + "type": "string" + }, + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "elementProperties": { + "description": "The element properties for the image.\n\nWhen the aspect ratio of the provided size does not match the image aspect\nratio, the image is scaled and centered with respect to the size in order\nto maintain aspect ratio. The provided transform is applied after this\noperation.", + "$ref": "PageElementProperties" + } + }, + "id": "CreateImageRequest" + }, + "CreateParagraphBulletsRequest": { + "description": "Creates bullets for all of the paragraphs that overlap with the given\ntext index range.\n\nThe nesting level of each paragraph will be determined by counting leading\ntabs in front of each paragraph. To avoid excess space between the bullet and\nthe corresponding paragraph, these leading tabs are removed by this request.\nThis may change the indices of parts of the text.\n\nIf the paragraph immediately before paragraphs being updated is in a list\nwith a matching preset, the paragraphs being updated are added to that\npreceding list.", + "type": "object", + "properties": { + "textRange": { + "description": "The range of text to apply the bullet presets to, based on TextElement indexes.", + "$ref": "Range" + }, + "objectId": { + "description": "The object ID of the shape or table containing the text to add bullets to.", + "type": "string" + }, + "bulletPreset": { + "description": "The kinds of bullet glyphs to be used. Defaults to the\n`BULLET_DISC_CIRCLE_SQUARE` preset.", + "type": "string", + "enumDescriptions": [ + "A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the\nfirst 3 list nesting levels.", + "A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels.", + "A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `STAR`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for\nthe first 3 list nesting levels.", + "A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph\nfor the first 3 list nesting levels.", + "A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet\nglyph for the first 3 list nesting levels.", + "A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph\nfor the first 3 list nesting levels.", + "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", + "A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by parenthesis.", + "A numbered list with `DIGIT` numeric glyphs separated by periods, where\neach nesting level uses the previous nesting level's glyph as a prefix.\nFor example: '1.', '1.1.', '2.', '2.2.'.", + "A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods.", + "A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` numeric glyphs\nfor the first 3 list nesting levels, followed by periods.", + "A numbered list with `ZERODIGIT`, `ALPHA` and `ROMAN` numeric glyphs for\nthe first 3 list nesting levels, followed by periods." + ], + "enum": [ + "BULLET_DISC_CIRCLE_SQUARE", + "BULLET_DIAMONDX_ARROW3D_SQUARE", + "BULLET_CHECKBOX", + "BULLET_ARROW_DIAMOND_DISC", + "BULLET_STAR_CIRCLE_SQUARE", + "BULLET_ARROW3D_CIRCLE_SQUARE", + "BULLET_LEFTTRIANGLE_DIAMOND_DISC", + "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE", + "BULLET_DIAMOND_CIRCLE_SQUARE", + "NUMBERED_DIGIT_ALPHA_ROMAN", + "NUMBERED_DIGIT_ALPHA_ROMAN_PARENS", + "NUMBERED_DIGIT_NESTED", + "NUMBERED_UPPERALPHA_ALPHA_ROMAN", + "NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT", + "NUMBERED_ZERODIGIT_ALPHA_ROMAN" + ] + }, + "cellLocation": { + "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table.", + "$ref": "TableCellLocation" + } + }, + "id": "CreateParagraphBulletsRequest" + }, + "Size": { + "description": "A width and height.", + "type": "object", + "properties": { + "width": { + "$ref": "Dimension", + "description": "The width of the object." + }, + "height": { + "description": "The height of the object.", + "$ref": "Dimension" + } + }, + "id": "Size" + }, + "TextStyle": { + "properties": { + "fontFamily": { + "description": "The font family of the text.\n\nThe font family can be any font from the Font menu in Slides or from\n[Google Fonts] (https://fonts.google.com/). If the font name is\nunrecognized, the text is rendered in `Arial`.\n\nSome fonts can affect the weight of the text. If an update request\nspecifies values for both `font_family` and `bold`, the explicitly-set\n`bold` value is used.", + "type": "string" + }, + "strikethrough": { + "description": "Whether or not the text is struck through.", + "type": "boolean" + }, + "italic": { + "type": "boolean", + "description": "Whether or not the text is italicized." + }, + "fontSize": { + "$ref": "Dimension", + "description": "The size of the text's font. When read, the `font_size` will specified in\npoints." + }, + "baselineOffset": { + "enumDescriptions": [ + "The text's baseline offset is inherited from the parent.", + "The text is not vertically offset.", + "The text is vertically offset upwards (superscript).", + "The text is vertically offset downwards (subscript)." + ], + "enum": [ + "BASELINE_OFFSET_UNSPECIFIED", + "NONE", + "SUPERSCRIPT", + "SUBSCRIPT" + ], + "description": "The text's vertical offset from its normal position.\n\nText with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically\nrendered in a smaller font size, computed based on the `font_size` field.\nThe `font_size` itself is not affected by changes in this field.", + "type": "string" + }, + "weightedFontFamily": { + "description": "The font family and rendered weight of the text.\n\nThis field is an extension of `font_family` meant to support explicit font\nweights without breaking backwards compatibility. As such, when reading the\nstyle of a range of text, the value of `weighted_font_family#font_family`\nwill always be equal to that of `font_family`. However, when writing, if\nboth fields are included in the field mask (either explicitly or through\nthe wildcard `\"*\"`), their values are reconciled as follows:\n\n* If `font_family` is set and `weighted_font_family` is not, the value of\n `font_family` is applied with weight `400` (\"normal\").\n* If both fields are set, the value of `font_family` must match that of\n `weighted_font_family#font_family`. If so, the font family and weight of\n `weighted_font_family` is applied. Otherwise, a 400 bad request error is\n returned.\n* If `weighted_font_family` is set and `font_family` is not, the font\n family and weight of `weighted_font_family` is applied.\n* If neither field is set, the font family and weight of the text inherit\n from the parent. Note that these properties cannot inherit separately\n from each other.\n\nIf an update request specifies values for both `weighted_font_family` and\n`bold`, the `weighted_font_family` is applied first, then `bold`.\n\nIf `weighted_font_family#weight` is not set, it defaults to `400`.\n\nIf `weighted_font_family` is set, then `weighted_font_family#font_family`\nmust also be set with a non-empty value. Otherwise, a 400 bad request error\nis returned.", + "$ref": "WeightedFontFamily" + }, + "smallCaps": { + "description": "Whether or not the text is in small capital letters.", + "type": "boolean" + }, + "backgroundColor": { + "$ref": "OptionalColor", + "description": "The background color of the text. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set." + }, + "underline": { + "description": "Whether or not the text is underlined.", + "type": "boolean" + }, + "link": { + "description": "The hyperlink destination of the text. If unset, there is no link. Links\nare not inherited from parent text.\n\nChanging the link in an update request causes some other changes to the\ntext style of the range:\n\n* When setting a link, the text foreground color will be set to\n ThemeColorType.HYPERLINK and the text will\n be underlined. If these fields are modified in the same\n request, those values will be used instead of the link defaults.\n* Setting a link on a text range that overlaps with an existing link will\n also update the existing link to point to the new URL.\n* Links are not settable on newline characters. As a result, setting a link\n on a text range that crosses a paragraph boundary, such as `\"ABC\\n123\"`,\n will separate the newline character(s) into their own text runs. The\n link will be applied separately to the runs before and after the newline.\n* Removing a link will update the text style of the range to match the\n style of the preceding text (or the default text styles if the preceding\n text is another link) unless different styles are being set in the same\n request.", + "$ref": "Link" + }, + "foregroundColor": { + "$ref": "OptionalColor", + "description": "The color of the text itself. If set, the color is either opaque or\ntransparent, depending on if the `opaque_color` field in it is set." + }, + "bold": { + "description": "Whether or not the text is rendered as bold.", + "type": "boolean" + } + }, + "id": "TextStyle", + "description": "Represents the styling that can be applied to a TextRun.\n\nIf this text is contained in a shape with a parent placeholder, then these text styles may be\ninherited from the parent. Which text styles are inherited depend on the\nnesting level of lists:\n\n* A text run in a paragraph that is not in a list will inherit its text style\n from the the newline character in the paragraph at the 0 nesting level of\n the list inside the parent placeholder.\n* A text run in a paragraph that is in a list will inherit its text style\n from the newline character in the paragraph at its corresponding nesting\n level of the list inside the parent placeholder.\n\nInherited text styles are represented as unset fields in this message. If\ntext is contained in a shape without a parent placeholder, unsetting these\nfields will revert the style to a value matching the defaults in the Slides\neditor.", + "type": "object" + }, + "UpdateVideoPropertiesRequest": { + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `videoProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the video outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" + }, + "objectId": { + "description": "The object ID of the video the updates are applied to.", + "type": "string" + }, + "videoProperties": { + "description": "The video properties to update.", + "$ref": "VideoProperties" + } + }, + "id": "UpdateVideoPropertiesRequest", + "description": "Update the properties of a Video." + }, + "Request": { + "description": "A single kind of update to apply to a presentation.", + "type": "object", + "properties": { + "refreshSheetsChart": { + "$ref": "RefreshSheetsChartRequest", + "description": "Refreshes a Google Sheets chart." + }, + "updateTableCellProperties": { + "$ref": "UpdateTableCellPropertiesRequest", + "description": "Updates the properties of a TableCell." + }, + "createTable": { + "description": "Creates a new table.", + "$ref": "CreateTableRequest" + }, + "deleteObject": { + "$ref": "DeleteObjectRequest", + "description": "Deletes a page or page element from the presentation." + }, + "updateParagraphStyle": { + "$ref": "UpdateParagraphStyleRequest", + "description": "Updates the styling of paragraphs within a Shape or Table." + }, + "duplicateObject": { + "$ref": "DuplicateObjectRequest", + "description": "Duplicates a slide or page element." + }, + "deleteTableColumn": { + "$ref": "DeleteTableColumnRequest", + "description": "Deletes a column from a table." + }, + "updateVideoProperties": { + "$ref": "UpdateVideoPropertiesRequest", + "description": "Updates the properties of a Video." + }, + "createLine": { + "$ref": "CreateLineRequest", + "description": "Creates a line." + }, + "createImage": { + "$ref": "CreateImageRequest", + "description": "Creates an image." + }, + "createParagraphBullets": { + "$ref": "CreateParagraphBulletsRequest", + "description": "Creates bullets for paragraphs." + }, + "createVideo": { + "description": "Creates a video.", + "$ref": "CreateVideoRequest" + }, + "replaceAllShapesWithSheetsChart": { + "$ref": "ReplaceAllShapesWithSheetsChartRequest", + "description": "Replaces all shapes matching some criteria with a Google Sheets chart." + }, + "createSheetsChart": { + "$ref": "CreateSheetsChartRequest", + "description": "Creates an embedded Google Sheets chart." + }, + "updatePageElementTransform": { + "description": "Updates the transform of a page element.", + "$ref": "UpdatePageElementTransformRequest" + }, + "updateTextStyle": { + "description": "Updates the styling of text within a Shape or Table.", + "$ref": "UpdateTextStyleRequest" + }, + "replaceAllShapesWithImage": { + "$ref": "ReplaceAllShapesWithImageRequest", + "description": "Replaces all shapes matching some criteria with an image." + }, + "replaceAllText": { + "$ref": "ReplaceAllTextRequest", + "description": "Replaces all instances of specified text." + }, + "updateImageProperties": { + "$ref": "UpdateImagePropertiesRequest", + "description": "Updates the properties of an Image." + }, + "insertTableRows": { + "$ref": "InsertTableRowsRequest", + "description": "Inserts rows into a table." + }, + "createSlide": { + "$ref": "CreateSlideRequest", + "description": "Creates a new slide." + }, + "updateLineProperties": { + "$ref": "UpdateLinePropertiesRequest", + "description": "Updates the properties of a Line." + }, + "updateSlidesPosition": { + "description": "Updates the position of a set of slides in the presentation.", + "$ref": "UpdateSlidesPositionRequest" + }, + "deleteTableRow": { + "description": "Deletes a row from a table.", + "$ref": "DeleteTableRowRequest" + }, + "updateShapeProperties": { + "$ref": "UpdateShapePropertiesRequest", + "description": "Updates the properties of a Shape." + }, + "insertText": { + "$ref": "InsertTextRequest", + "description": "Inserts text into a shape or table cell." + }, + "deleteText": { + "$ref": "DeleteTextRequest", + "description": "Deletes text from a shape or a table cell." + }, + "updatePageProperties": { + "$ref": "UpdatePagePropertiesRequest", + "description": "Updates the properties of a Page." + }, + "deleteParagraphBullets": { + "$ref": "DeleteParagraphBulletsRequest", + "description": "Deletes bullets from paragraphs." + }, + "createShape": { + "$ref": "CreateShapeRequest", + "description": "Creates a new shape." + }, + "insertTableColumns": { + "$ref": "InsertTableColumnsRequest", + "description": "Inserts columns into a table." + } + }, + "id": "Request" + }, + "UpdateImagePropertiesRequest": { + "description": "Update the properties of an Image.", + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `imageProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the image outline color, set `fields` to\n`\"outline.outlineFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" + }, + "imageProperties": { + "$ref": "ImageProperties", + "description": "The image properties to update." + }, + "objectId": { + "description": "The object ID of the image the updates are applied to.", + "type": "string" + } + }, + "id": "UpdateImagePropertiesRequest" + }, + "ParagraphStyle": { + "description": "Styles that apply to a whole paragraph.\n\nIf this text is contained in a shape with a parent placeholder, then these paragraph styles may be\ninherited from the parent. Which paragraph styles are inherited depend on the\nnesting level of lists:\n\n* A paragraph not in a list will inherit its paragraph style from the\n paragraph at the 0 nesting level of the list inside the parent placeholder.\n* A paragraph in a list will inherit its paragraph style from the paragraph\n at its corresponding nesting level of the list inside the parent\n placeholder.\n\nInherited paragraph styles are represented as unset fields in this message.", + "type": "object", + "properties": { + "spaceAbove": { + "$ref": "Dimension", + "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent." + }, + "alignment": { + "enum": [ + "ALIGNMENT_UNSPECIFIED", + "START", + "CENTER", + "END", + "JUSTIFIED" + ], + "description": "The text alignment for this paragraph.", + "type": "string", + "enumDescriptions": [ + "The paragraph alignment is inherited from the parent.", + "The paragraph is aligned to the start of the line. Left-aligned for\nLTR text, right-aligned otherwise.", + "The paragraph is centered.", + "The paragraph is aligned to the end of the line. Right-aligned for\nLTR text, left-aligned otherwise.", + "The paragraph is justified." + ] + }, + "lineSpacing": { + "format": "float", + "description": "The amount of space between lines, as a percentage of normal, where normal\nis represented as 100.0. If unset, the value is inherited from the parent.", + "type": "number" + }, + "indentFirstLine": { + "description": "The amount of indentation for the start of the first line of the paragraph.\nIf unset, the value is inherited from the parent.", + "$ref": "Dimension" + }, + "spaceBelow": { + "$ref": "Dimension", + "description": "The amount of extra space above the paragraph. If unset, the value is\ninherited from the parent." + }, + "direction": { + "enumDescriptions": [ + "The text direction is inherited from the parent.", + "The text goes from left to right.", + "The text goes from right to left." + ], + "enum": [ + "TEXT_DIRECTION_UNSPECIFIED", + "LEFT_TO_RIGHT", + "RIGHT_TO_LEFT" + ], + "description": "The text direction of this paragraph. If unset, the value defaults to\nLEFT_TO_RIGHT since\ntext direction is not inherited.", + "type": "string" + }, + "indentEnd": { + "description": "The amount indentation for the paragraph on the side that corresponds to\nthe end of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent.", + "$ref": "Dimension" + }, + "spacingMode": { + "enumDescriptions": [ + "The spacing mode is inherited from the parent.", + "Paragraph spacing is always rendered.", + "Paragraph spacing is skipped between list elements." + ], + "enum": [ + "SPACING_MODE_UNSPECIFIED", + "NEVER_COLLAPSE", + "COLLAPSE_LISTS" + ], + "description": "The spacing mode for the paragraph.", + "type": "string" + }, + "indentStart": { + "$ref": "Dimension", + "description": "The amount indentation for the paragraph on the side that corresponds to\nthe start of the text, based on the current text direction. If unset, the\nvalue is inherited from the parent." + } + }, + "id": "ParagraphStyle" + }, + "ReplaceAllShapesWithSheetsChartResponse": { + "type": "object", + "properties": { + "occurrencesChanged": { + "format": "int32", + "description": "The number of shapes replaced with charts.", + "type": "integer" + } + }, + "id": "ReplaceAllShapesWithSheetsChartResponse", + "description": "The result of replacing shapes with a Google Sheets chart." + }, + "TableCellProperties": { + "description": "The properties of the TableCell.", + "type": "object", + "properties": { + "tableCellBackgroundFill": { + "$ref": "TableCellBackgroundFill", + "description": "The background fill of the table cell. The default fill matches the fill\nfor newly created table cells in the Slides editor." + } + }, + "id": "TableCellProperties" + }, + "RefreshSheetsChartRequest": { + "description": "Refreshes an embedded Google Sheets chart by replacing it with the latest\nversion of the chart from Google Sheets.\n\nNOTE: Refreshing charts requires at least one of the spreadsheets.readonly,\nspreadsheets, drive.readonly, or drive OAuth scopes.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the chart to refresh.", + "type": "string" + } + }, + "id": "RefreshSheetsChartRequest" + }, + "Outline": { + "properties": { + "outlineFill": { + "$ref": "OutlineFill", + "description": "The fill of the outline." + }, + "weight": { + "$ref": "Dimension", + "description": "The thickness of the outline." + }, + "dashStyle": { + "enum": [ + "DASH_STYLE_UNSPECIFIED", + "SOLID", + "DOT", + "DASH", + "DASH_DOT", + "LONG_DASH", + "LONG_DASH_DOT" + ], + "description": "The dash style of the outline.", + "type": "string", + "enumDescriptions": [ + "Unspecified dash style.", + "Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'.\nThis is the default dash style.", + "Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", + "Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", + "Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'dashDot'.", + "Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal\nvalue 'lgDash'.", + "Alternating large dashes and dots. Corresponds to ECMA-376\nST_PresetLineDashVal value 'lgDashDot'." + ] + }, + "propertyState": { + "enum": [ + "RENDERED", + "NOT_RENDERED", + "INHERIT" + ], + "description": "The outline property state.\n\nUpdating the the outline on a page element will implicitly update this\nfield to`RENDERED`, unless another value is specified in the same request.\nTo have no outline on a page element, set this field to `NOT_RENDERED`. In\nthis case, any other outline fields set in the same request will be\nignored.", + "type": "string", + "enumDescriptions": [ + "If a property's state is RENDERED, then the element has the corresponding\nproperty when rendered on a page. If the element is a placeholder shape as\ndetermined by the placeholder\nfield, and it inherits from a placeholder shape, the corresponding field\nmay be unset, meaning that the property value is inherited from a parent\nplaceholder. If the element does not inherit, then the field will contain\nthe rendered value. This is the default value.", + "If a property's state is NOT_RENDERED, then the element does not have the\ncorresponding property when rendered on a page. However, the field may\nstill be set so it can be inherited by child shapes. To remove a property\nfrom a rendered element, set its property_state to NOT_RENDERED.", + "If a property's state is INHERIT, then the property state uses the value of\ncorresponding `property_state` field on the parent shape. Elements that do\nnot inherit will never have an INHERIT property state." + ] + } + }, + "id": "Outline", + "description": "The outline of a PageElement.\n\nIf these fields are unset, they may be inherited from a parent placeholder\nif it exists. If there is no parent, the fields will default to the value\nused for new page elements created in the Slides editor, which may depend on\nthe page element kind.", + "type": "object" + }, + "NotesProperties": { + "description": "The properties of Page that are only\nrelevant for pages with page_type NOTES.", + "type": "object", + "properties": { + "speakerNotesObjectId": { + "description": "The object ID of the shape on this notes page that contains the speaker\nnotes for the corresponding slide.\nThe actual shape may not always exist on the notes page. Inserting text\nusing this object ID will automatically create the shape. In this case, the\nactual shape may have different object ID. The `GetPresentation` or\n`GetPage` action will always return the latest object ID.", + "type": "string" + } + }, + "id": "NotesProperties" + }, + "ShapeProperties": { + "description": "The properties of a Shape.\n\nIf the shape is a placeholder shape as determined by the\nplaceholder field, then these\nproperties may be inherited from a parent placeholder shape.\nDetermining the rendered value of the property depends on the corresponding\nproperty_state field value.", + "type": "object", + "properties": { + "outline": { + "$ref": "Outline", + "description": "The outline of the shape. If unset, the outline is inherited from a\nparent placeholder if it exists. If the shape has no parent, then the\ndefault outline depends on the shape type, matching the defaults for\nnew shapes created in the Slides editor." + }, + "shadow": { + "$ref": "Shadow", + "description": "The shadow properties of the shape. If unset, the shadow is inherited from\na parent placeholder if it exists. If the shape has no parent, then the\ndefault shadow matches the defaults for new shapes created in the Slides\neditor. This property is read-only." + }, + "shapeBackgroundFill": { + "$ref": "ShapeBackgroundFill", + "description": "The background fill of the shape. If unset, the background fill is\ninherited from a parent placeholder if it exists. If the shape has no\nparent, then the default background fill depends on the shape type,\nmatching the defaults for new shapes created in the Slides editor." + }, + "link": { + "$ref": "Link", + "description": "The hyperlink destination of the shape. If unset, there is no link. Links\nare not inherited from parent placeholders." + } + }, + "id": "ShapeProperties" + }, + "TableColumnProperties": { + "description": "Properties of each column in a table.", + "type": "object", + "properties": { + "columnWidth": { + "description": "Width of a column.", + "$ref": "Dimension" + } + }, + "id": "TableColumnProperties" + }, + "TableRow": { + "type": "object", + "properties": { + "tableCells": { + "items": { + "$ref": "TableCell" + }, + "type": "array", + "description": "Properties and contents of each cell.\n\nCells that span multiple columns are represented only once with a\ncolumn_span greater\nthan 1. As a result, the length of this collection does not always match\nthe number of columns of the entire table." + }, + "rowHeight": { + "description": "Height of a row.", + "$ref": "Dimension" + } + }, + "id": "TableRow", + "description": "Properties and contents of each row in a table." + }, + "UpdateTableCellPropertiesRequest": { + "description": "Update the properties of a TableCell.", + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `tableCellProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the table cell background solid fill color, set\n`fields` to `\"tableCellBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" + }, + "tableRange": { + "description": "The table range representing the subset of the table to which the updates\nare applied. If a table range is not specified, the updates will apply to\nthe entire table.", + "$ref": "TableRange" + }, + "objectId": { + "description": "The object ID of the table.", + "type": "string" + }, + "tableCellProperties": { + "$ref": "TableCellProperties", + "description": "The table cell properties to update." + } + }, + "id": "UpdateTableCellPropertiesRequest" + }, + "CreateSlideRequest": { + "description": "Creates a new slide.", + "type": "object", + "properties": { + "slideLayoutReference": { + "$ref": "LayoutReference", + "description": "Layout reference of the slide to be inserted, based on the *current\nmaster*, which is one of the following:\n\n- The master of the previous slide index.\n- The master of the first slide, if the insertion_index is zero.\n- The first master in the presentation, if there are no slides.\n\nIf the LayoutReference is not found in the current master, a 400 bad\nrequest error is returned.\n\nIf you don't specify a layout reference, then the new slide will use the\npredefined layout `BLANK`." + }, + "objectId": { + "description": "A user-supplied object ID.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "insertionIndex": { + "format": "int32", + "description": "The optional zero-based index indicating where to insert the slides.\n\nIf you don't specify an index, the new slide is created at the end.", + "type": "integer" + }, + "placeholderIdMappings": { + "description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholder(s)\nthat will be created on the new slide from that specified layout. Can only\nbe used when `slide_layout_reference` is specified.", + "items": { + "$ref": "LayoutPlaceholderIdMapping" + }, + "type": "array" + } + }, + "id": "CreateSlideRequest" + }, + "BatchUpdatePresentationRequest": { + "type": "object", + "properties": { + "writeControl": { + "$ref": "WriteControl", + "description": "Provides control over how write requests are executed." + }, + "requests": { + "description": "A list of updates to apply to the presentation.", + "items": { + "$ref": "Request" + }, + "type": "array" + } + }, + "id": "BatchUpdatePresentationRequest", + "description": "Request message for PresentationsService.BatchUpdatePresentation." + }, + "TextContent": { + "description": "The general text content. The text must reside in a compatible shape (e.g.\ntext box or rectangle) or a table cell in a page.", + "type": "object", + "properties": { + "textElements": { + "description": "The text contents broken down into its component parts, including styling\ninformation. This property is read-only.", + "items": { + "$ref": "TextElement" + }, + "type": "array" + }, + "lists": { + "additionalProperties": { + "$ref": "List" + }, + "description": "The bulleted lists contained in this text, keyed by list ID.", + "type": "object" + } + }, + "id": "TextContent" + }, + "CreateSheetsChartResponse": { + "description": "The result of creating an embedded Google Sheets chart.", + "type": "object", + "properties": { + "objectId": { + "description": "The object ID of the created chart.", + "type": "string" + } + }, + "id": "CreateSheetsChartResponse" + }, + "WriteControl": { + "description": "Provides control over how write requests are executed.", + "type": "object", + "properties": { + "requiredRevisionId": { + "description": "The revision ID of the presentation required for the write request. If\nspecified and the `required_revision_id` doesn't exactly match the\npresentation's current `revision_id`, the request will not be processed and\nwill return a 400 bad request error.", + "type": "string" + } + }, + "id": "WriteControl" + }, + "DeleteParagraphBulletsRequest": { + "properties": { + "textRange": { + "description": "The range of text to delete bullets from, based on TextElement indexes.", + "$ref": "Range" + }, + "objectId": { + "description": "The object ID of the shape or table containing the text to delete bullets\nfrom.", + "type": "string" + }, + "cellLocation": { + "description": "The optional table cell location if the text to be modified is in a table\ncell. If present, the object_id must refer to a table.", + "$ref": "TableCellLocation" + } + }, + "id": "DeleteParagraphBulletsRequest", + "description": "Deletes bullets from all of the paragraphs that overlap with the given text\nindex range.\n\nThe nesting level of each paragraph will be visually preserved by adding\nindent to the start of the corresponding paragraph.", + "type": "object" + }, + "ParagraphMarker": { + "description": "A TextElement kind that represents the beginning of a new paragraph.", + "type": "object", + "properties": { + "style": { + "$ref": "ParagraphStyle", + "description": "The paragraph's style" + }, + "bullet": { + "$ref": "Bullet", + "description": "The bullet for this paragraph. If not present, the paragraph does not\nbelong to a list." + } + }, + "id": "ParagraphMarker" + }, + "Thumbnail": { + "properties": { + "width": { + "format": "int32", + "description": "The positive width in pixels of the thumbnail image.", + "type": "integer" + }, + "height": { + "format": "int32", + "description": "The positive height in pixels of the thumbnail image.", + "type": "integer" + }, + "contentUrl": { + "description": "The content URL of the thumbnail image.\n\nThe URL to the image has a default lifetime of 30 minutes.\nThis URL is tagged with the account of the requester. Anyone with the URL\neffectively accesses the image as the original requester. Access to the\nimage may be lost if the presentation's sharing settings change.\nThe mime type of the thumbnail image is the same as specified in the\n`GetPageThumbnailRequest`.", + "type": "string" + } + }, + "id": "Thumbnail", + "description": "The thumbnail of a page.", + "type": "object" + }, + "InsertTableColumnsRequest": { + "id": "InsertTableColumnsRequest", + "description": "Inserts columns into a table.\n\nOther columns in the table will be resized to fit the new column.", + "type": "object", + "properties": { + "number": { + "format": "int32", + "description": "The number of columns to be inserted. Maximum 20 per request.", + "type": "integer" + }, + "cellLocation": { + "description": "The reference table cell location from which columns will be inserted.\n\nA new column will be inserted to the left (or right) of the column where\nthe reference cell is. If the reference cell is a merged cell, a new\ncolumn will be inserted to the left (or right) of the merged cell.", + "$ref": "TableCellLocation" + }, + "insertRight": { + "description": "Whether to insert new columns to the right of the reference cell location.\n\n- `True`: insert to the right.\n- `False`: insert to the left.", + "type": "boolean" + }, + "tableObjectId": { + "description": "The table to insert columns into.", + "type": "string" + } + } + }, + "LayoutPlaceholderIdMapping": { + "description": "The user-specified ID mapping for a placeholder that will be created on a\nslide from a specified layout.", + "type": "object", + "properties": { + "objectId": { + "description": "A user-supplied object ID for the placeholder identified above that to be\ncreated onto a slide.\n\nIf you specify an ID, it must be unique among all pages and page elements\nin the presentation. The ID must start with an alphanumeric character or an\nunderscore (matches regex `[a-zA-Z0-9_]`); remaining characters\nmay include those as well as a hyphen or colon (matches regex\n`[a-zA-Z0-9_-:]`).\nThe length of the ID must not be less than 5 or greater than 50.\n\nIf you don't specify an ID, a unique one is generated.", + "type": "string" + }, + "layoutPlaceholder": { + "$ref": "Placeholder", + "description": "The placeholder on a layout that will be applied to a slide. Only type and index are needed. For example, a\npredefined `TITLE_AND_BODY` layout may usually have a TITLE placeholder\nwith index 0 and a BODY placeholder with index 0." + }, + "layoutPlaceholderObjectId": { + "description": "The object ID of the placeholder on a layout that will be applied\nto a slide.", + "type": "string" + } + }, + "id": "LayoutPlaceholderIdMapping" + }, + "UpdateShapePropertiesRequest": { + "type": "object", + "properties": { + "fields": { + "format": "google-fieldmask", + "description": "The fields that should be updated.\n\nAt least one field must be specified. The root `shapeProperties` is\nimplied and should not be specified. A single `\"*\"` can be used as\nshort-hand for listing every field.\n\nFor example to update the shape background solid fill color, set `fields`\nto `\"shapeBackgroundFill.solidFill.color\"`.\n\nTo reset a property to its default value, include its field name in the\nfield mask but leave the field itself unset.", + "type": "string" + }, + "objectId": { + "description": "The object ID of the shape the updates are applied to.", + "type": "string" + }, + "shapeProperties": { + "description": "The shape properties to update.", + "$ref": "ShapeProperties" + } + }, + "id": "UpdateShapePropertiesRequest", + "description": "Update the properties of a Shape." } }, - "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" - }, "protocol": "rest", + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, "canonicalName": "Slides", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/presentations.readonly": { - "description": "View your Google Slides presentations" - }, "https://www.googleapis.com/auth/spreadsheets.readonly": { "description": "View your Google Spreadsheets" }, @@ -3646,279 +3914,11 @@ }, "https://www.googleapis.com/auth/presentations": { "description": "View and manage your Google Slides presentations" + }, + "https://www.googleapis.com/auth/presentations.readonly": { + "description": "View your Google Slides presentations" } } } - }, - "rootUrl": "https://slides.googleapis.com/", - "ownerDomain": "google.com", - "name": "slides", - "batchPath": "batch", - "title": "Google Slides API", - "ownerName": "Google", - "resources": { - "presentations": { - "methods": { - "get": { - "description": "Gets the latest version of the specified presentation.", - "response": { - "$ref": "Presentation" - }, - "parameterOrder": [ - "presentationId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/presentations.readonly" - ], - "parameters": { - "presentationId": { - "description": "The ID of the presentation to retrieve.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/presentations/{presentationsId}", - "id": "slides.presentations.get", - "path": "v1/presentations/{+presentationId}" - }, - "batchUpdate": { - "response": { - "$ref": "BatchUpdatePresentationResponse" - }, - "parameterOrder": [ - "presentationId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/spreadsheets", - "https://www.googleapis.com/auth/spreadsheets.readonly" - ], - "parameters": { - "presentationId": { - "description": "The presentation to apply the updates to.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/presentations/{presentationId}:batchUpdate", - "id": "slides.presentations.batchUpdate", - "path": "v1/presentations/{presentationId}:batchUpdate", - "request": { - "$ref": "BatchUpdatePresentationRequest" - }, - "description": "Applies one or more updates to the presentation.\n\nEach request is validated before\nbeing applied. If any request is not valid, then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how they are applied. Other requests do\nnot need to return information; these each return an empty reply.\nThe order of replies matches that of the requests.\n\nFor example, suppose you call batchUpdate with four updates, and only the\nthird one returns information. The response would have two empty replies:\nthe reply to the third request, and another empty reply, in that order.\n\nBecause other users may be editing the presentation, the presentation\nmight not exactly reflect your changes: your changes may\nbe altered with respect to collaborator changes. If there are no\ncollaborators, the presentation should reflect your changes. In any case,\nthe updates in your request are guaranteed to be applied together\natomically." - }, - "create": { - "description": "Creates a new presentation using the title given in the request. Other\nfields in the request are ignored.\nReturns the created presentation.", - "request": { - "$ref": "Presentation" - }, - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "Presentation" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/presentations" - ], - "flatPath": "v1/presentations", - "path": "v1/presentations", - "id": "slides.presentations.create" - } - }, - "resources": { - "pages": { - "methods": { - "getThumbnail": { - "response": { - "$ref": "Thumbnail" - }, - "parameterOrder": [ - "presentationId", - "pageObjectId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/presentations.readonly" - ], - "parameters": { - "thumbnailProperties.thumbnailSize": { - "location": "query", - "enum": [ - "THUMBNAIL_SIZE_UNSPECIFIED", - "LARGE" - ], - "description": "The optional thumbnail image size.\n\nIf you don't specify the size, the server chooses a default size of the\nimage.", - "type": "string" - }, - "thumbnailProperties.mimeType": { - "description": "The optional mime type of the thumbnail image.\n\nIf you don't specify the mime type, the default mime type will be PNG.", - "type": "string", - "location": "query", - "enum": [ - "PNG" - ] - }, - "presentationId": { - "location": "path", - "description": "The ID of the presentation to retrieve.", - "type": "string", - "required": true - }, - "pageObjectId": { - "location": "path", - "description": "The object ID of the page whose thumbnail to retrieve.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", - "id": "slides.presentations.pages.getThumbnail", - "path": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", - "description": "Generates a thumbnail of the latest version of the specified page in the\npresentation and returns a URL to the thumbnail image." - }, - "get": { - "description": "Gets the latest version of the specified page in the presentation.", - "response": { - "$ref": "Page" - }, - "parameterOrder": [ - "presentationId", - "pageObjectId" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/drive", - "https://www.googleapis.com/auth/drive.readonly", - "https://www.googleapis.com/auth/presentations", - "https://www.googleapis.com/auth/presentations.readonly" - ], - "parameters": { - "pageObjectId": { - "description": "The object ID of the page to retrieve.", - "type": "string", - "required": true, - "location": "path" - }, - "presentationId": { - "type": "string", - "required": true, - "location": "path", - "description": "The ID of the presentation to retrieve." - } - }, - "flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}", - "id": "slides.presentations.pages.get", - "path": "v1/presentations/{presentationId}/pages/{pageObjectId}" - } - } - } - } - } - }, - "parameters": { - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "$.xgafv": { - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" - }, - "quotaUser": { - "type": "string", - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters." - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - } - }, - "version": "v1", - "baseUrl": "https://slides.googleapis.com/" + } } diff --git a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json index c615c4ec2..e7a1fd398 100644 --- a/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json +++ b/vendor/google.golang.org/api/sourcerepo/v1/sourcerepo-api.json @@ -1,35 +1,88 @@ { - "canonicalName": "Cloud Source Repositories", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/source.read_write": { - "description": "Manage the contents of your source code repositories" - }, - "https://www.googleapis.com/auth/source.full_control": { - "description": "Manage your source code repositories" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - }, - "https://www.googleapis.com/auth/source.read_only": { - "description": "View the contents of your source code repositories" - } - } - } - }, - "rootUrl": "https://sourcerepo.googleapis.com/", - "ownerDomain": "google.com", - "name": "sourcerepo", - "batchPath": "batch", - "title": "Cloud Source Repositories API", "ownerName": "Google", "resources": { "projects": { "resources": { "repos": { "methods": { + "list": { + "response": { + "$ref": "ListReposResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "format": "int32", + "description": "Maximum number of repositories to return; between 1 and 500.\nIf not set or zero, defaults to 100 at the server.", + "type": "integer", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "Resume listing repositories where a prior ListReposResponse\nleft off. This is an opaque token that must be obtained from\na recent, prior ListReposResponse's next_page_token field.", + "type": "string" + }, + "name": { + "location": "path", + "description": "The project ID whose repos should be listed. Values are of the form\n`projects/\u003cproject\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.full_control", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "flatPath": "v1/projects/{projectsId}/repos", + "id": "sourcerepo.projects.repos.list", + "path": "v1/{+name}/repos", + "description": "Returns all repos belonging to a project. The sizes of the repos are\nnot set by ListRepos. To get the size of a repo, use GetRepo." + }, + "setIamPolicy": { + "request": { + "$ref": "SetIamPolicyRequest" + }, + "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", + "httpMethod": "POST", + "parameterOrder": [ + "resource" + ], + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/source.full_control", + "https://www.googleapis.com/auth/source.read_only", + "https://www.googleapis.com/auth/source.read_write" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/repos/.+$", + "location": "path" + } + }, + "flatPath": "v1/projects/{projectsId}/repos/{reposId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "sourcerepo.projects.repos.setIamPolicy" + }, "create": { + "flatPath": "v1/projects/{projectsId}/repos", + "id": "sourcerepo.projects.repos.create", + "path": "v1/{+parent}/repos", + "description": "Creates a repo in the given project with the given name.\n\nIf the named repository already exists, `CreateRepo` returns\n`ALREADY_EXISTS`.", + "request": { + "$ref": "Repo" + }, "response": { "$ref": "Repo" }, @@ -37,12 +90,6 @@ "parent" ], "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.full_control", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], "parameters": { "parent": { "description": "The project in which to create the repo. Values are of the form\n`projects/\u003cproject\u003e`.", @@ -52,54 +99,21 @@ "location": "path" } }, - "flatPath": "v1/projects/{projectsId}/repos", - "id": "sourcerepo.projects.repos.create", - "path": "v1/{+parent}/repos", - "request": { - "$ref": "Repo" - }, - "description": "Creates a repo in the given project with the given name.\n\nIf the named repository already exists, `CreateRepo` returns\n`ALREADY_EXISTS`." - }, - "setIamPolicy": { - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "pattern": "^projects/[^/]+/repos/.+$", - "location": "path", - "description": "REQUIRED: The resource for which the policy is being specified.\nSee the operation documentation for the appropriate value for this field.", - "type": "string", - "required": true - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/source.full_control", "https://www.googleapis.com/auth/source.read_only", "https://www.googleapis.com/auth/source.read_write" - ], - "flatPath": "v1/projects/{projectsId}/repos/{reposId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "sourcerepo.projects.repos.setIamPolicy", - "description": "Sets the access control policy on the specified resource. Replaces any\nexisting policy.", - "request": { - "$ref": "SetIamPolicyRequest" - } + ] }, "getIamPolicy": { - "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset.", - "response": { - "$ref": "Policy" - }, "httpMethod": "GET", "parameterOrder": [ "resource" ], + "response": { + "$ref": "Policy" + }, "parameters": { "resource": { "description": "REQUIRED: The resource for which the policy is being requested.\nSee the operation documentation for the appropriate value for this field.", @@ -116,19 +130,27 @@ "https://www.googleapis.com/auth/source.read_write" ], "flatPath": "v1/projects/{projectsId}/repos/{reposId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", "id": "sourcerepo.projects.repos.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy" + "description": "Gets the access control policy for a resource.\nReturns an empty policy if the resource exists and does not have a policy\nset." }, "get": { - "path": "v1/{+name}", - "id": "sourcerepo.projects.repos.get", "description": "Returns information about a repo.", - "httpMethod": "GET", + "response": { + "$ref": "Repo" + }, "parameterOrder": [ "name" ], - "response": { - "$ref": "Repo" + "httpMethod": "GET", + "parameters": { + "name": { + "location": "path", + "description": "The name of the requested repository. Values are of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/repos/.+$" + } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", @@ -136,16 +158,9 @@ "https://www.googleapis.com/auth/source.read_only", "https://www.googleapis.com/auth/source.read_write" ], - "parameters": { - "name": { - "pattern": "^projects/[^/]+/repos/.+$", - "location": "path", - "description": "The name of the requested repository. Values are of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/projects/{projectsId}/repos/{reposId}" + "flatPath": "v1/projects/{projectsId}/repos/{reposId}", + "id": "sourcerepo.projects.repos.get", + "path": "v1/{+name}" }, "testIamPermissions": { "response": { @@ -205,45 +220,6 @@ "flatPath": "v1/projects/{projectsId}/repos/{reposId}", "path": "v1/{+name}", "id": "sourcerepo.projects.repos.delete" - }, - "list": { - "response": { - "$ref": "ListReposResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/source.full_control", - "https://www.googleapis.com/auth/source.read_only", - "https://www.googleapis.com/auth/source.read_write" - ], - "parameters": { - "pageToken": { - "description": "Resume listing repositories where a prior ListReposResponse\nleft off. This is an opaque token that must be obtained from\na recent, prior ListReposResponse's next_page_token field.", - "type": "string", - "location": "query" - }, - "name": { - "pattern": "^projects/[^/]+$", - "location": "path", - "description": "The project ID whose repos should be listed. Values are of the form\n`projects/\u003cproject\u003e`.", - "type": "string", - "required": true - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "Maximum number of repositories to return; between 1 and 500.\nIf not set or zero, defaults to 100 at the server.", - "type": "integer" - } - }, - "flatPath": "v1/projects/{projectsId}/repos", - "id": "sourcerepo.projects.repos.list", - "path": "v1/{+name}/repos", - "description": "Returns all repos belonging to a project. The sizes of the repos are\nnot set by ListRepos. To get the size of a repo, use GetRepo." } } } @@ -252,30 +228,30 @@ }, "parameters": { "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { + "location": "query", "description": "Returns response with indentations and line breaks.", "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" + "type": "boolean" }, "uploadType": { "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, "callback": { - "location": "query", "description": "JSONP", - "type": "string" + "type": "string", + "location": "query" }, "$.xgafv": { "enumDescriptions": [ @@ -317,41 +293,50 @@ "location": "query" }, "quotaUser": { - "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "bearer_token": { + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "oauth_token": { "location": "query", - "description": "OAuth bearer token.", + "description": "OAuth 2.0 token for the current user.", "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" } }, "version": "v1", "baseUrl": "https://sourcerepo.googleapis.com/", - "servicePath": "", "kind": "discovery#restDescription", "description": "Access source code repositories hosted by Google.", + "servicePath": "", "basePath": "", - "id": "sourcerepo:v1", - "documentationLink": "https://cloud.google.com/source-repositories/docs/apis", "revision": "20170908", + "documentationLink": "https://cloud.google.com/source-repositories/docs/apis", + "id": "sourcerepo:v1", "discoveryVersion": "v1", "version_module": true, "schemas": { "AuditConfig": { + "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", + "type": "object", "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.\nNext ID: 4", + "items": { + "$ref": "AuditLogConfig" + }, + "type": "array" + }, "exemptedMembers": { "items": { "type": "string" @@ -361,42 +346,33 @@ "service": { "description": "Specifies a service that will be enabled for audit logging.\nFor example, `storage.googleapis.com`, `cloudsql.googleapis.com`.\n`allServices` is a special value that covers all services.", "type": "string" - }, - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.\nNext ID: 4", - "items": { - "$ref": "AuditLogConfig" - }, - "type": "array" } }, - "id": "AuditConfig", - "description": "Specifies the audit configuration for a service.\nThe configuration determines which permission types are logged, and what\nidentities, if any, are exempted from logging.\nAn AuditConfig must have one or more AuditLogConfigs.\n\nIf there are AuditConfigs for both `allServices` and a specific service,\nthe union of the two AuditConfigs is used for that service: the log_types\nspecified in each AuditConfig are enabled, and the exempted_members in each\nAuditConfig are exempted.\n\nExample Policy with multiple AuditConfigs:\n\n {\n \"audit_configs\": [\n {\n \"service\": \"allServices\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n },\n {\n \"log_type\": \"ADMIN_READ\",\n }\n ]\n },\n {\n \"service\": \"fooservice.googleapis.com\"\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n },\n {\n \"log_type\": \"DATA_WRITE\",\n \"exempted_members\": [\n \"user:bar@gmail.com\"\n ]\n }\n ]\n }\n ]\n }\n\nFor fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ\nlogging. It also exempts foo@gmail.com from DATA_READ logging, and\nbar@gmail.com from DATA_WRITE logging.", - "type": "object" + "id": "AuditConfig" }, "SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "type": "object", "properties": { - "policy": { - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them.", - "$ref": "Policy" - }, "updateMask": { "format": "google-fieldmask", "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only\nthe fields in the mask will be modified. If no mask is provided, the\nfollowing default mask is used:\npaths: \"bindings, etag\"\nThis field is only used by Cloud IAM.", "type": "string" + }, + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." } }, - "id": "SetIamPolicyRequest", - "description": "Request message for `SetIamPolicy` method.", - "type": "object" + "id": "SetIamPolicyRequest" }, "Binding": { "description": "Associates `members` with a `role`.", "type": "object", "properties": { "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL." + "description": "The condition that is associated with this binding.\nNOTE: an unsatisfied condition will not allow user access via current\nbinding. Different bindings, including their conditions, are examined\nindependently.\nThis field is GOOGLE_INTERNAL.", + "$ref": "Expr" }, "members": { "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", @@ -418,7 +394,28 @@ "properties": {}, "id": "Empty" }, + "MirrorConfig": { + "description": "Configuration to automatically mirror a repository from another\nhosting service, for example GitHub or BitBucket.", + "type": "object", + "properties": { + "webhookId": { + "description": "ID of the webhook listening to updates to trigger mirroring.\nRemoving this webook from the other hosting service will stop\nGoogle Cloud Source Repositories from receiving notifications,\nand thereby disabling mirroring.", + "type": "string" + }, + "deployKeyId": { + "description": "ID of the SSH deploy key at the other hosting service.\nRemoving this key from the other service would deauthorize\nGoogle Cloud Source Repositories from mirroring.", + "type": "string" + }, + "url": { + "description": "URL of the main repository at the other hosting service.", + "type": "string" + } + }, + "id": "MirrorConfig" + }, "Expr": { + "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", + "type": "object", "properties": { "location": { "description": "An optional string indicating the location of the expression for error\nreporting, e.g. a file name and a position in the file.", @@ -437,33 +434,16 @@ "type": "string" } }, - "id": "Expr", - "description": "Represents an expression text. Example:\n\n title: \"User account presence\"\n description: \"Determines whether the request has a user account\"\n expression: \"size(request.user) \u003e 0\"", - "type": "object" - }, - "MirrorConfig": { - "properties": { - "url": { - "description": "URL of the main repository at the other hosting service.", - "type": "string" - }, - "webhookId": { - "description": "ID of the webhook listening to updates to trigger mirroring.\nRemoving this webook from the other hosting service will stop\nGoogle Cloud Source Repositories from receiving notifications,\nand thereby disabling mirroring.", - "type": "string" - }, - "deployKeyId": { - "description": "ID of the SSH deploy key at the other hosting service.\nRemoving this key from the other service would deauthorize\nGoogle Cloud Source Repositories from mirroring.", - "type": "string" - } - }, - "id": "MirrorConfig", - "description": "Configuration to automatically mirror a repository from another\nhosting service, for example GitHub or BitBucket.", - "type": "object" + "id": "Expr" }, "Repo": { "description": "A repository (or repo) is a Git repository storing versioned source content.", "type": "object", "properties": { + "mirrorConfig": { + "description": "How this repository mirrors a repository managed by another service.", + "$ref": "MirrorConfig" + }, "url": { "description": "URL to clone the repository from Google Cloud Source Repositories.", "type": "string" @@ -476,33 +456,13 @@ "name": { "description": "Resource name of the repository, of the form\n`projects/\u003cproject\u003e/repos/\u003crepo\u003e`. The repo name may contain slashes.\neg, `projects/myproject/repos/name/with/slash`", "type": "string" - }, - "mirrorConfig": { - "description": "How this repository mirrors a repository managed by another service.", - "$ref": "MirrorConfig" } }, "id": "Repo" }, - "ListReposResponse": { - "properties": { - "nextPageToken": { - "description": "If non-empty, additional repositories exist within the project. These\ncan be retrieved by including this value in the next ListReposRequest's\npage_token field.", - "type": "string" - }, - "repos": { - "description": "The listed repos.", - "items": { - "$ref": "Repo" - }, - "type": "array" - } - }, - "id": "ListReposResponse", - "description": "Response for ListRepos. The size is not set in the returned repositories.", - "type": "object" - }, "TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "type": "object", "properties": { "permissions": { "description": "A subset of `TestPermissionsRequest.permissions` that the caller is\nallowed.", @@ -512,22 +472,37 @@ "type": "array" } }, - "id": "TestIamPermissionsResponse", - "description": "Response message for `TestIamPermissions` method.", - "type": "object" + "id": "TestIamPermissionsResponse" + }, + "ListReposResponse": { + "description": "Response for ListRepos. The size is not set in the returned repositories.", + "type": "object", + "properties": { + "repos": { + "description": "The listed repos.", + "items": { + "$ref": "Repo" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If non-empty, additional repositories exist within the project. These\ncan be retrieved by including this value in the next ListReposRequest's\npage_token field.", + "type": "string" + } + }, + "id": "ListReposResponse" }, "AuditLogConfig": { "description": "Provides the configuration for logging a type of permissions.\nExample:\n\n {\n \"audit_log_configs\": [\n {\n \"log_type\": \"DATA_READ\",\n \"exempted_members\": [\n \"user:foo@gmail.com\"\n ]\n },\n {\n \"log_type\": \"DATA_WRITE\",\n }\n ]\n }\n\nThis enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting\nfoo@gmail.com from DATA_READ logging.", "type": "object", "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, "logType": { + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], "enum": [ "LOG_TYPE_UNSPECIFIED", "ADMIN_READ", @@ -535,13 +510,14 @@ "DATA_READ" ], "description": "The log type that this config enables.", - "type": "string", - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ] + "type": "string" + }, + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of\npermission.\nFollows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" } }, "id": "AuditLogConfig" @@ -561,17 +537,9 @@ "id": "TestIamPermissionsRequest" }, "Policy": { + "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", + "type": "object", "properties": { - "etag": { - "format": "byte", - "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", - "type": "string" - }, - "version": { - "format": "int32", - "description": "Version of the `Policy`. The default version is 0.", - "type": "integer" - }, "auditConfigs": { "description": "Specifies cloud audit logging configuration for this policy.", "items": { @@ -588,16 +556,48 @@ }, "iamOwned": { "type": "boolean" + }, + "etag": { + "format": "byte", + "description": "`etag` is used for optimistic concurrency control as a way to help\nprevent simultaneous updates of a policy from overwriting each other.\nIt is strongly suggested that systems make use of the `etag` in the\nread-modify-write cycle to perform policy updates in order to avoid race\nconditions: An `etag` is returned in the response to `getIamPolicy`, and\nsystems are expected to put that etag in the request to `setIamPolicy` to\nensure that their change will be applied to the same version of the policy.\n\nIf no `etag` is provided in the call to `setIamPolicy`, then the existing\npolicy is overwritten blindly.", + "type": "string" + }, + "version": { + "format": "int32", + "description": "Version of the `Policy`. The default version is 0.", + "type": "integer" } }, - "id": "Policy", - "description": "Defines an Identity and Access Management (IAM) policy. It is used to\nspecify access control policies for Cloud Platform resources.\n\n\nA `Policy` consists of a list of `bindings`. A `Binding` binds a list of\n`members` to a `role`, where the members can be user accounts, Google groups,\nGoogle domains, and service accounts. A `role` is a named list of permissions\ndefined by IAM.\n\n**Example**\n\n {\n \"bindings\": [\n {\n \"role\": \"roles/owner\",\n \"members\": [\n \"user:mike@example.com\",\n \"group:admins@example.com\",\n \"domain:google.com\",\n \"serviceAccount:my-other-app@appspot.gserviceaccount.com\",\n ]\n },\n {\n \"role\": \"roles/viewer\",\n \"members\": [\"user:sean@example.com\"]\n }\n ]\n }\n\nFor a description of IAM and its features, see the\n[IAM developer's guide](https://cloud.google.com/iam).", - "type": "object" + "id": "Policy" } }, "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" }, - "protocol": "rest" + "protocol": "rest", + "canonicalName": "Cloud Source Repositories", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/source.read_write": { + "description": "Manage the contents of your source code repositories" + }, + "https://www.googleapis.com/auth/source.full_control": { + "description": "Manage your source code repositories" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, + "https://www.googleapis.com/auth/source.read_only": { + "description": "View the contents of your source code repositories" + } + } + } + }, + "rootUrl": "https://sourcerepo.googleapis.com/", + "ownerDomain": "google.com", + "name": "sourcerepo", + "batchPath": "batch", + "title": "Cloud Source Repositories API" } diff --git a/vendor/google.golang.org/api/spanner/v1/spanner-api.json b/vendor/google.golang.org/api/spanner/v1/spanner-api.json index 5487261e3..56870e3fa 100644 --- a/vendor/google.golang.org/api/spanner/v1/spanner-api.json +++ b/vendor/google.golang.org/api/spanner/v1/spanner-api.json @@ -1,465 +1,16 @@ { + "version": "v1", + "baseUrl": "https://spanner.googleapis.com/", + "description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.", + "kind": "discovery#restDescription", + "servicePath": "", + "basePath": "", + "revision": "20170914", + "documentationLink": "https://cloud.google.com/spanner/", + "id": "spanner:v1", + "discoveryVersion": "v1", + "version_module": true, "schemas": { - "CreateSessionRequest": { - "description": "The request for CreateSession.", - "type": "object", - "properties": { - "session": { - "description": "The session to create.", - "$ref": "Session" - } - }, - "id": "CreateSessionRequest" - }, - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object", - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } - }, - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status" - }, - "ResultSet": { - "description": "Results from Read or\nExecuteSql.", - "type": "object", - "properties": { - "metadata": { - "$ref": "ResultSetMetadata", - "description": "Metadata about the result set, such as row type information." - }, - "stats": { - "$ref": "ResultSetStats", - "description": "Query plan and execution statistics for the query that produced this\nresult set. These can be requested by setting\nExecuteSqlRequest.query_mode." - }, - "rows": { - "description": "Each element in `rows` is a row whose format is defined by\nmetadata.row_type. The ith element\nin each row matches the ith field in\nmetadata.row_type. Elements are\nencoded based on type as described\nhere.", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "any" - } - } - } - }, - "id": "ResultSet" - }, - "Binding": { - "description": "Associates `members` with a `role`.", - "type": "object", - "properties": { - "members": { - "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", - "type": "array", - "items": { - "type": "string" - } - }, - "role": { - "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", - "type": "string" - } - }, - "id": "Binding" - }, - "UpdateDatabaseDdlRequest": { - "description": "Enqueues the given DDL statements to be applied, in order but not\nnecessarily all at once, to the database schema at some point (or\npoints) in the future. The server checks that the statements\nare executable (syntactically valid, name tables that exist, etc.)\nbefore enqueueing them, but they may still fail upon\nlater execution (e.g., if a statement from another batch of\nstatements is applied first and it conflicts in some way, or if\nthere is some data-related problem like a `NULL` value in a column to\nwhich `NOT NULL` would be added). If a statement fails, all\nsubsequent statements in the batch are automatically cancelled.\n\nEach batch of statements is assigned a name which can be used with\nthe Operations API to monitor\nprogress. See the\noperation_id field for more\ndetails.", - "type": "object", - "properties": { - "operationId": { - "description": "If empty, the new update request is assigned an\nautomatically-generated operation ID. Otherwise, `operation_id`\nis used to construct the name of the resulting\nOperation.\n\nSpecifying an explicit operation ID simplifies determining\nwhether the statements were executed in the event that the\nUpdateDatabaseDdl call is replayed,\nor the return value is otherwise lost: the database and\n`operation_id` fields can be combined to form the\nname of the resulting\nlongrunning.Operation: `\u003cdatabase\u003e/operations/\u003coperation_id\u003e`.\n\n`operation_id` should be unique within the database, and must be\na valid identifier: `a-z*`. Note that\nautomatically-generated operation IDs always begin with an\nunderscore. If the named operation already exists,\nUpdateDatabaseDdl returns\n`ALREADY_EXISTS`.", - "type": "string" - }, - "statements": { - "description": "DDL statements to be applied to the database.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "UpdateDatabaseDdlRequest" - }, - "PartialResultSet": { - "description": "Partial results from a streaming read or SQL query. Streaming reads and\nSQL queries better tolerate large result sets, large rows, and large\nvalues, but are a little trickier to consume.", - "type": "object", - "properties": { - "chunkedValue": { - "description": "If true, then the final value in values is chunked, and must\nbe combined with more values from subsequent `PartialResultSet`s\nto obtain a complete field value.", - "type": "boolean" - }, - "metadata": { - "description": "Metadata about the result set, such as row type information.\nOnly present in the first response.", - "$ref": "ResultSetMetadata" - }, - "values": { - "description": "A streamed result set consists of a stream of values, which might\nbe split into many `PartialResultSet` messages to accommodate\nlarge rows and/or large values. Every N complete values defines a\nrow, where N is equal to the number of entries in\nmetadata.row_type.fields.\n\nMost values are encoded based on type as described\nhere.\n\nIt is possible that the last value in values is \"chunked\",\nmeaning that the rest of the value is sent in subsequent\n`PartialResultSet`(s). This is denoted by the chunked_value\nfield. Two or more chunked values can be merged to form a\ncomplete value as follows:\n\n * `bool/number/null`: cannot be chunked\n * `string`: concatenate the strings\n * `list`: concatenate the lists. If the last element in a list is a\n `string`, `list`, or `object`, merge it with the first element in\n the next list by applying these rules recursively.\n * `object`: concatenate the (field name, field value) pairs. If a\n field name is duplicated, then apply these rules recursively\n to merge the field values.\n\nSome examples of merging:\n\n # Strings are concatenated.\n \"foo\", \"bar\" =\u003e \"foobar\"\n\n # Lists of non-strings are concatenated.\n [2, 3], [4] =\u003e [2, 3, 4]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are strings.\n [\"a\", \"b\"], [\"c\", \"d\"] =\u003e [\"a\", \"bc\", \"d\"]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are lists. Recursively, the last and first elements\n # of the inner lists are merged because they are strings.\n [\"a\", [\"b\", \"c\"]], [[\"d\"], \"e\"] =\u003e [\"a\", [\"b\", \"cd\"], \"e\"]\n\n # Non-overlapping object fields are combined.\n {\"a\": \"1\"}, {\"b\": \"2\"} =\u003e {\"a\": \"1\", \"b\": 2\"}\n\n # Overlapping object fields are merged.\n {\"a\": \"1\"}, {\"a\": \"2\"} =\u003e {\"a\": \"12\"}\n\n # Examples of merging objects containing lists of strings.\n {\"a\": [\"1\"]}, {\"a\": [\"2\"]} =\u003e {\"a\": [\"12\"]}\n\nFor a more complete example, suppose a streaming SQL query is\nyielding a result set whose rows contain a single string\nfield. The following `PartialResultSet`s might be yielded:\n\n {\n \"metadata\": { ... }\n \"values\": [\"Hello\", \"W\"]\n \"chunked_value\": true\n \"resume_token\": \"Af65...\"\n }\n {\n \"values\": [\"orl\"]\n \"chunked_value\": true\n \"resume_token\": \"Bqp2...\"\n }\n {\n \"values\": [\"d\"]\n \"resume_token\": \"Zx1B...\"\n }\n\nThis sequence of `PartialResultSet`s encodes two rows, one\ncontaining the field value `\"Hello\"`, and a second containing the\nfield value `\"World\" = \"W\" + \"orl\" + \"d\"`.", - "type": "array", - "items": { - "type": "any" - } - }, - "resumeToken": { - "description": "Streaming calls might be interrupted for a variety of reasons, such\nas TCP connection loss. If this occurs, the stream of results can\nbe resumed by re-sending the original request and including\n`resume_token`. Note that executing any other transaction in the\nsame session invalidates the token.", - "format": "byte", - "type": "string" - }, - "stats": { - "$ref": "ResultSetStats", - "description": "Query plan and execution statistics for the query that produced this\nstreaming result set. These can be requested by setting\nExecuteSqlRequest.query_mode and are sent\nonly once with the last response in the stream." - } - }, - "id": "PartialResultSet" - }, - "ListOperationsResponse": { - "description": "The response message for Operations.ListOperations.", - "type": "object", - "properties": { - "operations": { - "description": "A list of operations that matches the specified filter in the request.", - "type": "array", - "items": { - "$ref": "Operation" - } - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - } - }, - "id": "ListOperationsResponse" - }, - "UpdateInstanceMetadata": { - "description": "Metadata type for the operation returned by\nUpdateInstance.", - "type": "object", - "properties": { - "cancelTime": { - "description": "The time at which this operation was cancelled. If set, this operation is\nin the process of undoing itself (which is guaranteed to succeed) and\ncannot be cancelled again.", - "format": "google-datetime", - "type": "string" - }, - "endTime": { - "description": "The time at which this operation failed or was completed successfully.", - "format": "google-datetime", - "type": "string" - }, - "instance": { - "$ref": "Instance", - "description": "The desired end state of the update." - }, - "startTime": { - "description": "The time at which UpdateInstance\nrequest was received.", - "format": "google-datetime", - "type": "string" - } - }, - "id": "UpdateInstanceMetadata" - }, - "ResultSetMetadata": { - "description": "Metadata about a ResultSet or PartialResultSet.", - "type": "object", - "properties": { - "rowType": { - "description": "Indicates the field names and types for the rows in the result\nset. For example, a SQL query like `\"SELECT UserId, UserName FROM\nUsers\"` could return a `row_type` value like:\n\n \"fields\": [\n { \"name\": \"UserId\", \"type\": { \"code\": \"INT64\" } },\n { \"name\": \"UserName\", \"type\": { \"code\": \"STRING\" } },\n ]", - "$ref": "StructType" - }, - "transaction": { - "description": "If the read or SQL query began a transaction as a side-effect, the\ninformation about the new transaction is yielded here.", - "$ref": "Transaction" - } - }, - "id": "ResultSetMetadata" - }, - "TransactionSelector": { - "description": "This message is used to select the transaction in which a\nRead or\nExecuteSql call runs.\n\nSee TransactionOptions for more information about transactions.", - "type": "object", - "properties": { - "singleUse": { - "description": "Execute the read or SQL query in a temporary transaction.\nThis is the most efficient way to execute a transaction that\nconsists of a single SQL query.", - "$ref": "TransactionOptions" - }, - "begin": { - "description": "Begin a new transaction and execute this read or SQL query in\nit. The transaction ID of the new transaction is returned in\nResultSetMetadata.transaction, which is a Transaction.", - "$ref": "TransactionOptions" - }, - "id": { - "description": "Execute the read or SQL query in a previously-started transaction.", - "format": "byte", - "type": "string" - } - }, - "id": "TransactionSelector" - }, - "Mutation": { - "description": "A modification to one or more Cloud Spanner rows. Mutations can be\napplied to a Cloud Spanner database by sending them in a\nCommit call.", - "type": "object", - "properties": { - "insert": { - "$ref": "Write", - "description": "Insert new rows in a table. If any of the rows already exist,\nthe write or transaction fails with error `ALREADY_EXISTS`." - }, - "insertOrUpdate": { - "$ref": "Write", - "description": "Like insert, except that if the row already exists, then\nits column values are overwritten with the ones provided. Any\ncolumn values not explicitly written are preserved." - }, - "update": { - "description": "Update existing rows in a table. If any of the rows does not\nalready exist, the transaction fails with error `NOT_FOUND`.", - "$ref": "Write" - }, - "replace": { - "description": "Like insert, except that if the row already exists, it is\ndeleted, and the column values provided are inserted\ninstead. Unlike insert_or_update, this means any values not\nexplicitly written become `NULL`.", - "$ref": "Write" - }, - "delete": { - "$ref": "Delete", - "description": "Delete rows from a table. Succeeds whether or not the named\nrows were present." - } - }, - "id": "Mutation" - }, - "KeySet": { - "description": "`KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All\nthe keys are expected to be in the same table or index. The keys need\nnot be sorted in any particular way.\n\nIf the same key is specified multiple times in the set (for example\nif two ranges, two keys, or a key and a range overlap), Cloud Spanner\nbehaves as if the key were only specified once.", - "type": "object", - "properties": { - "ranges": { - "description": "A list of key ranges. See KeyRange for more information about\nkey range specifications.", - "type": "array", - "items": { - "$ref": "KeyRange" - } - }, - "keys": { - "description": "A list of specific keys. Entries in `keys` should have exactly as\nmany elements as there are columns in the primary or index key\nwith which this `KeySet` is used. Individual key values are\nencoded as described here.", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "any" - } - } - }, - "all": { - "description": "For convenience `all` can be set to `true` to indicate that this\n`KeySet` matches all keys in the table or index. Note that any keys\nspecified in `keys` or `ranges` are only yielded once.", - "type": "boolean" - } - }, - "id": "KeySet" - }, - "GetDatabaseDdlResponse": { - "description": "The response for GetDatabaseDdl.", - "type": "object", - "properties": { - "statements": { - "description": "A list of formatted DDL statements defining the schema of the database\nspecified in the request.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "GetDatabaseDdlResponse" - }, - "Database": { - "description": "A Cloud Spanner database.", - "type": "object", - "properties": { - "state": { - "description": "Output only. The current database state.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "The database is still being created. Operations on the database may fail\nwith `FAILED_PRECONDITION` in this state.", - "The database is fully created and ready for use." - ], - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "READY" - ] - }, - "name": { - "description": "Required. The name of the database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`,\nwhere `\u003cdatabase\u003e` is as specified in the `CREATE DATABASE`\nstatement. This name can be passed to other API methods to\nidentify the database.", - "type": "string" - } - }, - "id": "Database" - }, - "SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "type": "object", - "properties": { - "policy": { - "$ref": "Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." - } - }, - "id": "SetIamPolicyRequest" - }, - "ListDatabasesResponse": { - "description": "The response for ListDatabases.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "`next_page_token` can be sent in a subsequent\nListDatabases call to fetch more\nof the matching databases.", - "type": "string" - }, - "databases": { - "description": "Databases that matched the request.", - "type": "array", - "items": { - "$ref": "Database" - } - } - }, - "id": "ListDatabasesResponse" - }, - "Instance": { - "description": "An isolated set of Cloud Spanner resources on which databases can be hosted.", - "type": "object", - "properties": { - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud\nresources into groups that reflect a customer's organizational needs and\ndeployment strategies. Cloud Labels can be used to filter collections of\nresources. They can be used to control how resource metrics are aggregated.\nAnd they can be used as arguments to policy management rules (e.g. route,\nfirewall, load balancing, etc.).\n\n * Label keys must be between 1 and 63 characters long and must conform to\n the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.\n * Label values must be between 0 and 63 characters long and must conform\n to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.\n * No more than 64 labels can be associated with a given resource.\n\nSee https://goo.gl/xmQnxf for more information on and examples of labels.\n\nIf you plan to use labels in your own code, please note that additional\ncharacters may be allowed in the future. And so you are advised to use an\ninternal label representation, such as JSON, which doesn't rely upon\nspecific characters being disallowed. For example, representing labels\nas the string: name + \"_\" + value would prove problematic if we were to\nallow \"_\" in a future release.", - "type": "object" - }, - "config": { - "description": "Required. The name of the instance's configuration. Values are of the form\n`projects/\u003cproject\u003e/instanceConfigs/\u003cconfiguration\u003e`. See\nalso InstanceConfig and\nListInstanceConfigs.", - "type": "string" - }, - "state": { - "description": "Output only. The current instance state. For\nCreateInstance, the state must be\neither omitted or set to `CREATING`. For\nUpdateInstance, the state must be\neither omitted or set to `READY`.", - "type": "string", - "enumDescriptions": [ - "Not specified.", - "The instance is still being created. Resources may not be\navailable yet, and operations such as database creation may not\nwork.", - "The instance is fully created and ready to do work such as\ncreating databases." - ], - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "READY" - ] - }, - "name": { - "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", - "type": "string" - }, - "displayName": { - "description": "Required. The descriptive name for this instance as it appears in UIs.\nMust be unique per project and between 4 and 30 characters in length.", - "type": "string" - }, - "nodeCount": { - "description": "Required. The number of nodes allocated to this instance. This may be zero\nin API responses for instances that are not yet in state `READY`.\n\nEach Spanner node can provide up to 10,000 QPS of reads or 2000 QPS of\nwrites (writing single rows at 1KB data per row), and 2 TiB storage.\n\nFor optimal performance, we recommend provisioning enough nodes to keep\noverall CPU utilization under 75%.\n\nA minimum of 3 nodes is recommended for production environments. This\nminimum is required for SLAs to apply to your instance.\n\nNote that Cloud Spanner performance is highly dependent on workload, schema\ndesign, and dataset characteristics. The performance numbers above are\nestimates, and assume [best practices](https://cloud.google.com/spanner/docs/bulk-loading)\nare followed.", - "format": "int32", - "type": "integer" - } - }, - "id": "Instance" - }, - "RollbackRequest": { - "description": "The request for Rollback.", - "type": "object", - "properties": { - "transactionId": { - "description": "Required. The transaction to roll back.", - "format": "byte", - "type": "string" - } - }, - "id": "RollbackRequest" - }, - "Transaction": { - "description": "A transaction.", - "type": "object", - "properties": { - "readTimestamp": { - "description": "For snapshot read-only transactions, the read timestamp chosen\nfor the transaction. Not returned by default: see\nTransactionOptions.ReadOnly.return_read_timestamp.", - "format": "google-datetime", - "type": "string" - }, - "id": { - "description": "`id` may be used to identify the transaction in subsequent\nRead,\nExecuteSql,\nCommit, or\nRollback calls.\n\nSingle-use read-only transactions do not have IDs, because\nsingle-use transactions do not support multiple requests.", - "format": "byte", - "type": "string" - } - }, - "id": "Transaction" - }, - "UpdateDatabaseDdlMetadata": { - "description": "Metadata type for the operation returned by\nUpdateDatabaseDdl.", - "type": "object", - "properties": { - "commitTimestamps": { - "description": "Reports the commit timestamps of all statements that have\nsucceeded so far, where `commit_timestamps[i]` is the commit\ntimestamp for the statement `statements[i]`.", - "type": "array", - "items": { - "format": "google-datetime", - "type": "string" - } - }, - "database": { - "description": "The database being modified.", - "type": "string" - }, - "statements": { - "description": "For an update this list contains all the statements. For an\nindividual statement, this list contains only that statement.", - "type": "array", - "items": { - "type": "string" - } - } - }, - "id": "UpdateDatabaseDdlMetadata" - }, - "StructType": { - "description": "`StructType` defines the fields of a STRUCT type.", - "type": "object", - "properties": { - "fields": { - "description": "The list of fields that make up this struct. Order is\nsignificant, because values of this struct type are represented as\nlists, where the order of field values matches the order of\nfields in the StructType. In turn, the order of fields\nmatches the order of columns in a read request, or the order of\nfields in the `SELECT` clause of a query.", - "type": "array", - "items": { - "$ref": "Field" - } - } - }, - "id": "StructType" - }, - "QueryPlan": { - "description": "Contains an ordered list of nodes appearing in the query plan.", - "type": "object", - "properties": { - "planNodes": { - "description": "The nodes in the query plan. Plan nodes are returned in pre-order starting\nwith the plan root. Each PlanNode's `id` corresponds to its index in\n`plan_nodes`.", - "type": "array", - "items": { - "$ref": "PlanNode" - } - } - }, - "id": "QueryPlan" - }, "Field": { "description": "Message representing a single field of a struct.", "type": "object", @@ -476,23 +27,23 @@ "id": "Field" }, "ResultSetStats": { - "description": "Additional statistics about a ResultSet or PartialResultSet.", "type": "object", "properties": { - "queryPlan": { - "$ref": "QueryPlan", - "description": "QueryPlan for the query associated with this result." - }, "queryStats": { + "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" }, - "description": "Aggregated statistics from the execution of the query. Only present when\nthe query is profiled. For example, a query could return the statistics as\nfollows:\n\n {\n \"rows_returned\": \"3\",\n \"elapsed_time\": \"1.22 secs\",\n \"cpu_time\": \"1.19 secs\"\n }", - "type": "object" + "description": "Aggregated statistics from the execution of the query. Only present when\nthe query is profiled. For example, a query could return the statistics as\nfollows:\n\n {\n \"rows_returned\": \"3\",\n \"elapsed_time\": \"1.22 secs\",\n \"cpu_time\": \"1.19 secs\"\n }" + }, + "queryPlan": { + "description": "QueryPlan for the query associated with this result.", + "$ref": "QueryPlan" } }, - "id": "ResultSetStats" + "id": "ResultSetStats", + "description": "Additional statistics about a ResultSet or PartialResultSet." }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", @@ -509,6 +60,7 @@ "id": "TestIamPermissionsRequest" }, "CommitResponse": { + "id": "CommitResponse", "description": "The response for Commit.", "type": "object", "properties": { @@ -517,19 +69,18 @@ "format": "google-datetime", "type": "string" } - }, - "id": "CommitResponse" + } }, "Type": { + "id": "Type", "description": "`Type` indicates the type of a Cloud Spanner value, as might be stored in a\ntable cell or returned from an SQL query.", "type": "object", "properties": { "arrayElementType": { - "description": "If code == ARRAY, then `array_element_type`\nis the type of the array elements.", - "$ref": "Type" + "$ref": "Type", + "description": "If code == ARRAY, then `array_element_type`\nis the type of the array elements." }, "code": { - "description": "Required. The TypeCode for this type.", "type": "string", "enumDescriptions": [ "Not specified.", @@ -554,14 +105,14 @@ "BYTES", "ARRAY", "STRUCT" - ] + ], + "description": "Required. The TypeCode for this type." }, "structType": { "$ref": "StructType", "description": "If code == STRUCT, then `struct_type`\nprovides type information for the struct's fields." } - }, - "id": "Type" + } }, "PlanNode": { "description": "Node information for nodes appearing in a QueryPlan.plan_nodes.", @@ -592,9 +143,11 @@ "format": "int32", "type": "integer" }, + "displayName": { + "description": "The display name for the node.", + "type": "string" + }, "kind": { - "description": "Used to determine the type of node. May be needed for visualizing\ndifferent kinds of nodes differently. For example, If the node is a\nSCALAR node, it will have a condensed representation\nwhich can be used to directly embed a description of the node in its\nparent.", - "type": "string", "enumDescriptions": [ "Not specified.", "Denotes a Relational operator node in the expression tree. Relational\noperators represent iterative processing of rows during query execution.\nFor example, a `TableScan` operation that reads rows from a table.", @@ -604,10 +157,8 @@ "KIND_UNSPECIFIED", "RELATIONAL", "SCALAR" - ] - }, - "displayName": { - "description": "The display name for the node.", + ], + "description": "Used to determine the type of node. May be needed for visualizing\ndifferent kinds of nodes differently. For example, If the node is a\nSCALAR node, it will have a condensed representation\nwhich can be used to directly embed a description of the node in its\nparent.", "type": "string" }, "childLinks": { @@ -621,9 +172,16 @@ "id": "PlanNode" }, "CreateInstanceMetadata": { - "description": "Metadata type for the operation returned by\nCreateInstance.", - "type": "object", "properties": { + "instance": { + "description": "The instance being created.", + "$ref": "Instance" + }, + "startTime": { + "description": "The time at which the\nCreateInstance request was\nreceived.", + "format": "google-datetime", + "type": "string" + }, "cancelTime": { "description": "The time at which this operation was cancelled. If set, this operation is\nin the process of undoing itself (which is guaranteed to succeed) and\ncannot be cancelled again.", "format": "google-datetime", @@ -633,18 +191,11 @@ "description": "The time at which this operation failed or was completed successfully.", "format": "google-datetime", "type": "string" - }, - "instance": { - "description": "The instance being created.", - "$ref": "Instance" - }, - "startTime": { - "description": "The time at which the\nCreateInstance request was\nreceived.", - "format": "google-datetime", - "type": "string" } }, - "id": "CreateInstanceMetadata" + "id": "CreateInstanceMetadata", + "description": "Metadata type for the operation returned by\nCreateInstance.", + "type": "object" }, "ChildLink": { "description": "Metadata associated with a parent-child relationship appearing in a\nPlanNode.", @@ -667,6 +218,7 @@ "id": "ChildLink" }, "Delete": { + "id": "Delete", "description": "Arguments to delete operations.", "type": "object", "properties": { @@ -675,45 +227,10 @@ "type": "string" }, "keySet": { - "$ref": "KeySet", - "description": "Required. The primary keys of the rows within table to delete." + "description": "Required. The primary keys of the rows within table to delete.", + "$ref": "KeySet" } - }, - "id": "Delete" - }, - "CommitRequest": { - "description": "The request for Commit.", - "type": "object", - "properties": { - "singleUseTransaction": { - "$ref": "TransactionOptions", - "description": "Execute mutations in a temporary transaction. Note that unlike\ncommit of a previously-started transaction, commit with a\ntemporary transaction is non-idempotent. That is, if the\n`CommitRequest` is sent to Cloud Spanner more than once (for\ninstance, due to retries in the application, or in the\ntransport library), it is possible that the mutations are\nexecuted more than once. If this is undesirable, use\nBeginTransaction and\nCommit instead." - }, - "mutations": { - "description": "The mutations to be executed when this transaction commits. All\nmutations are applied atomically, in the order they appear in\nthis list.", - "type": "array", - "items": { - "$ref": "Mutation" - } - }, - "transactionId": { - "description": "Commit a previously-started transaction.", - "format": "byte", - "type": "string" - } - }, - "id": "CommitRequest" - }, - "BeginTransactionRequest": { - "description": "The request for BeginTransaction.", - "type": "object", - "properties": { - "options": { - "$ref": "TransactionOptions", - "description": "Required. Options for the new transaction." - } - }, - "id": "BeginTransactionRequest" + } }, "ListInstanceConfigsResponse": { "description": "The response for ListInstanceConfigs.", @@ -733,11 +250,39 @@ }, "id": "ListInstanceConfigsResponse" }, - "GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", + "BeginTransactionRequest": { + "id": "BeginTransactionRequest", + "description": "The request for BeginTransaction.", "type": "object", - "properties": {}, - "id": "GetIamPolicyRequest" + "properties": { + "options": { + "description": "Required. Options for the new transaction.", + "$ref": "TransactionOptions" + } + } + }, + "CommitRequest": { + "id": "CommitRequest", + "description": "The request for Commit.", + "type": "object", + "properties": { + "singleUseTransaction": { + "$ref": "TransactionOptions", + "description": "Execute mutations in a temporary transaction. Note that unlike\ncommit of a previously-started transaction, commit with a\ntemporary transaction is non-idempotent. That is, if the\n`CommitRequest` is sent to Cloud Spanner more than once (for\ninstance, due to retries in the application, or in the\ntransport library), it is possible that the mutations are\nexecuted more than once. If this is undesirable, use\nBeginTransaction and\nCommit instead." + }, + "mutations": { + "description": "The mutations to be executed when this transaction commits. All\nmutations are applied atomically, in the order they appear in\nthis list.", + "type": "array", + "items": { + "$ref": "Mutation" + } + }, + "transactionId": { + "type": "string", + "description": "Commit a previously-started transaction.", + "format": "byte" + } + } }, "TestIamPermissionsResponse": { "description": "Response message for `TestIamPermissions` method.", @@ -753,6 +298,12 @@ }, "id": "TestIamPermissionsResponse" }, + "GetIamPolicyRequest": { + "description": "Request message for `GetIamPolicy` method.", + "type": "object", + "properties": {}, + "id": "GetIamPolicyRequest" + }, "CreateDatabaseMetadata": { "description": "Metadata type for the operation returned by\nCreateDatabase.", "type": "object", @@ -765,39 +316,25 @@ "id": "CreateDatabaseMetadata" }, "ListSessionsResponse": { - "description": "The response for ListSessions.", - "type": "object", "properties": { + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent\nListSessions call to fetch more of the matching\nsessions.", + "type": "string" + }, "sessions": { "description": "The list of requested sessions.", "type": "array", "items": { "$ref": "Session" } - }, - "nextPageToken": { - "description": "`next_page_token` can be sent in a subsequent\nListSessions call to fetch more of the matching\nsessions.", - "type": "string" } }, - "id": "ListSessionsResponse" + "id": "ListSessionsResponse", + "description": "The response for ListSessions.", + "type": "object" }, "Session": { - "description": "A session in the Cloud Spanner API.", - "type": "object", "properties": { - "labels": { - "description": "The labels for the session.\n\n * Label keys must be between 1 and 63 characters long and must conform to\n the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.\n * Label values must be between 0 and 63 characters long and must conform\n to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.\n * No more than 20 labels can be associated with a given session.", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "createTime": { - "description": "Output only. The timestamp when the session is created.", - "format": "google-datetime", - "type": "string" - }, "name": { "description": "The name of the session.", "type": "string" @@ -806,9 +343,23 @@ "description": "Output only. The approximate timestamp when the session is last used. It is\ntypically earlier than the actual last use time.", "format": "google-datetime", "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The labels for the session.\n\n * Label keys must be between 1 and 63 characters long and must conform to\n the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.\n * Label values must be between 0 and 63 characters long and must conform\n to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.\n * No more than 20 labels can be associated with a given session.", + "type": "object" + }, + "createTime": { + "description": "Output only. The timestamp when the session is created.", + "format": "google-datetime", + "type": "string" } }, - "id": "Session" + "id": "Session", + "description": "A session in the Cloud Spanner API.", + "type": "object" }, "ListInstancesResponse": { "description": "The response for ListInstances.", @@ -833,11 +384,11 @@ "type": "object", "properties": { "startClosed": { - "description": "If the start is closed, then the range includes all rows whose\nfirst `len(start_closed)` key columns exactly match `start_closed`.", "type": "array", "items": { "type": "any" - } + }, + "description": "If the start is closed, then the range includes all rows whose\nfirst `len(start_closed)` key columns exactly match `start_closed`." }, "startOpen": { "description": "If the start is open, then the range excludes rows whose first\n`len(start_open)` key columns exactly match `start_open`.", @@ -872,12 +423,12 @@ "type": "string" }, "subqueries": { + "description": "A mapping of (subquery variable name) -\u003e (subquery node id) for cases\nwhere the `description` string of this node references a `SCALAR`\nsubquery contained in the expression subtree rooted at this node. The\nreferenced `SCALAR` subquery may not necessarily be a direct child of\nthis node.", + "type": "object", "additionalProperties": { "format": "int32", "type": "integer" - }, - "description": "A mapping of (subquery variable name) -\u003e (subquery node id) for cases\nwhere the `description` string of this node references a `SCALAR`\nsubquery contained in the expression subtree rooted at this node. The\nreferenced `SCALAR` subquery may not necessarily be a direct child of\nthis node.", - "type": "object" + } } }, "id": "ShortRepresentation" @@ -928,8 +479,8 @@ "description": "Transaction may write.\n\nAuthorization to begin a read-write transaction requires\n`spanner.databases.beginOrRollbackReadWriteTransaction` permission\non the `session` resource." }, "readOnly": { - "description": "Transaction will not write.\n\nAuthorization to begin a read-only transaction requires\n`spanner.databases.beginReadOnlyTransaction` permission\non the `session` resource.", - "$ref": "ReadOnly" + "$ref": "ReadOnly", + "description": "Transaction will not write.\n\nAuthorization to begin a read-only transaction requires\n`spanner.databases.beginReadOnlyTransaction` permission\non the `session` resource." } }, "id": "TransactionOptions" @@ -938,16 +489,16 @@ "description": "The request for CreateDatabase.", "type": "object", "properties": { - "createStatement": { - "description": "Required. A `CREATE DATABASE` statement, which specifies the ID of the\nnew database. The database ID must conform to the regular expression\n`a-z*[a-z0-9]` and be between 2 and 30 characters in length.\nIf the database ID is a reserved word or if it contains a hyphen, the\ndatabase ID must be enclosed in backticks (`` ` ``).", - "type": "string" - }, "extraStatements": { "description": "An optional list of DDL statements to run inside the newly created\ndatabase. Statements can create tables, indexes, etc. These\nstatements execute atomically with the creation of the database:\nif there is an error in any statement, the database is not created.", "type": "array", "items": { "type": "string" } + }, + "createStatement": { + "description": "Required. A `CREATE DATABASE` statement, which specifies the ID of the\nnew database. The database ID must conform to the regular expression\n`a-z*[a-z0-9]` and be between 2 and 30 characters in length.\nIf the database ID is a reserved word or if it contains a hyphen, the\ndatabase ID must be enclosed in backticks (`` ` ``).", + "type": "string" } }, "id": "CreateDatabaseRequest" @@ -971,20 +522,6 @@ "description": "Message type to initiate a read-only transaction.", "type": "object", "properties": { - "maxStaleness": { - "description": "Read data at a timestamp \u003e= `NOW - max_staleness`\nseconds. Guarantees that all writes that have committed more\nthan the specified number of seconds ago are visible. Because\nCloud Spanner chooses the exact timestamp, this mode works even if\nthe client's local clock is substantially skewed from Cloud Spanner\ncommit timestamps.\n\nUseful for reading the freshest data available at a nearby\nreplica, while bounding the possible staleness if the local\nreplica has fallen behind.\n\nNote that this option can only be used in single-use\ntransactions.", - "format": "google-duration", - "type": "string" - }, - "readTimestamp": { - "description": "Executes all reads at the given timestamp. Unlike other modes,\nreads at a specific timestamp are repeatable; the same read at\nthe same timestamp always returns the same data. If the\ntimestamp is in the future, the read will block until the\nspecified timestamp, modulo the read's deadline.\n\nUseful for large scale consistent reads such as mapreduces, or\nfor coordinating many reads against a consistent snapshot of the\ndata.", - "format": "google-datetime", - "type": "string" - }, - "returnReadTimestamp": { - "description": "If true, the Cloud Spanner-selected read timestamp is included in\nthe Transaction message that describes the transaction.", - "type": "boolean" - }, "exactStaleness": { "description": "Executes all reads at a timestamp that is `exact_staleness`\nold. The timestamp is chosen soon after the read is started.\n\nGuarantees that all writes that have committed more than the\nspecified number of seconds ago are visible. Because Cloud Spanner\nchooses the exact timestamp, this mode works even if the client's\nlocal clock is substantially skewed from Cloud Spanner commit\ntimestamps.\n\nUseful for reading at nearby replicas without the distributed\ntimestamp negotiation overhead of `max_staleness`.", "format": "google-duration", @@ -998,6 +535,20 @@ "description": "Executes all reads at a timestamp \u003e= `min_read_timestamp`.\n\nThis is useful for requesting fresher data than some previous\nread, or data that is fresh enough to observe the effects of some\npreviously committed transaction whose timestamp is known.\n\nNote that this option can only be used in single-use transactions.", "format": "google-datetime", "type": "string" + }, + "maxStaleness": { + "description": "Read data at a timestamp \u003e= `NOW - max_staleness`\nseconds. Guarantees that all writes that have committed more\nthan the specified number of seconds ago are visible. Because\nCloud Spanner chooses the exact timestamp, this mode works even if\nthe client's local clock is substantially skewed from Cloud Spanner\ncommit timestamps.\n\nUseful for reading the freshest data available at a nearby\nreplica, while bounding the possible staleness if the local\nreplica has fallen behind.\n\nNote that this option can only be used in single-use\ntransactions.", + "format": "google-duration", + "type": "string" + }, + "readTimestamp": { + "description": "Executes all reads at the given timestamp. Unlike other modes,\nreads at a specific timestamp are repeatable; the same read at\nthe same timestamp always returns the same data. If the\ntimestamp is in the future, the read will block until the\nspecified timestamp, modulo the read's deadline.\n\nUseful for large scale consistent reads such as mapreduces, or\nfor coordinating many reads against a consistent snapshot of the\ndata.", + "format": "google-datetime", + "type": "string" + }, + "returnReadTimestamp": { + "description": "If true, the Cloud Spanner-selected read timestamp is included in\nthe Transaction message that describes the transaction.", + "type": "boolean" } }, "id": "ReadOnly" @@ -1006,17 +557,24 @@ "description": "The request for ExecuteSql and\nExecuteStreamingSql.", "type": "object", "properties": { + "paramTypes": { + "type": "object", + "additionalProperties": { + "$ref": "Type" + }, + "description": "It is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in params as JSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL query parameters. See the\ndefinition of Type for more information\nabout SQL types." + }, "sql": { "description": "Required. The SQL query string.", "type": "string" }, "params": { + "description": "The SQL query string can contain parameter placeholders. A parameter\nplaceholder consists of `'@'` followed by the parameter\nname. Parameter names consist of any combination of letters,\nnumbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The same\nparameter name can be used more than once, for example:\n `\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute an SQL query with unbound parameters.\n\nParameter values are specified using `params`, which is a JSON\nobject whose keys are parameter names, and whose values are the\ncorresponding parameter values.", + "type": "object", "additionalProperties": { "description": "Properties of the object.", "type": "any" - }, - "description": "The SQL query string can contain parameter placeholders. A parameter\nplaceholder consists of `'@'` followed by the parameter\nname. Parameter names consist of any combination of letters,\nnumbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The same\nparameter name can be used more than once, for example:\n `\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute an SQL query with unbound parameters.\n\nParameter values are specified using `params`, which is a JSON\nobject whose keys are parameter names, and whose values are the\ncorresponding parameter values.", - "type": "object" + } }, "queryMode": { "description": "Used to control the amount of debugging information returned in\nResultSetStats.", @@ -1037,16 +595,9 @@ "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency." }, "resumeToken": { + "type": "string", "description": "If this request is resuming a previously interrupted SQL query\nexecution, `resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new SQL query execution to resume where the last one left\noff. The rest of the request parameters must exactly match the\nrequest that yielded this token.", - "format": "byte", - "type": "string" - }, - "paramTypes": { - "description": "It is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in params as JSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL query parameters. See the\ndefinition of Type for more information\nabout SQL types.", - "type": "object", - "additionalProperties": { - "$ref": "Type" - } + "format": "byte" } }, "id": "ExecuteSqlRequest" @@ -1079,16 +630,9 @@ "description": "The request for Read and\nStreamingRead.", "type": "object", "properties": { - "columns": { - "description": "The columns of table to be returned for each row matching\nthis request.", - "type": "array", - "items": { - "type": "string" - } - }, "transaction": { - "$ref": "TransactionSelector", - "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency." + "description": "The transaction to use. If none is provided, the default is a\ntemporary read-only transaction with strong concurrency.", + "$ref": "TransactionSelector" }, "resumeToken": { "description": "If this request is resuming a previously interrupted read,\n`resume_token` should be copied from the last\nPartialResultSet yielded before the interruption. Doing this\nenables the new read to resume where the last read left off. The\nrest of the request parameters must exactly match the request\nthat yielded this token.", @@ -1109,8 +653,15 @@ "type": "string" }, "keySet": { - "$ref": "KeySet", - "description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the\nprimary keys of the rows in table to be yielded, unless index\nis present. If index is present, then key_set instead names\nindex keys in index.\n\nRows are yielded in table primary key order (if index is empty)\nor index key order (if index is non-empty).\n\nIt is not an error for the `key_set` to name rows that do not\nexist in the database. Read yields nothing for nonexistent rows." + "description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the\nprimary keys of the rows in table to be yielded, unless index\nis present. If index is present, then key_set instead names\nindex keys in index.\n\nRows are yielded in table primary key order (if index is empty)\nor index key order (if index is non-empty).\n\nIt is not an error for the `key_set` to name rows that do not\nexist in the database. Read yields nothing for nonexistent rows.", + "$ref": "KeySet" + }, + "columns": { + "description": "The columns of table to be returned for each row matching\nthis request.", + "type": "array", + "items": { + "type": "string" + } } }, "id": "ReadRequest" @@ -1119,10 +670,6 @@ "description": "Arguments to insert, update, insert_or_update, and\nreplace operations.", "type": "object", "properties": { - "table": { - "description": "Required. The table whose rows will be written.", - "type": "string" - }, "columns": { "description": "The names of the columns in table to be written.\n\nThe list of columns must contain enough columns to allow\nCloud Spanner to derive values for all primary key columns in the\nrow(s) to be modified.", "type": "array", @@ -1139,20 +686,31 @@ "type": "any" } } + }, + "table": { + "description": "Required. The table whose rows will be written.", + "type": "string" } }, "id": "Write" }, "ReadWrite": { - "description": "Message type to initiate a read-write transaction. Currently this\ntransaction type has no options.", - "type": "object", "properties": {}, - "id": "ReadWrite" + "id": "ReadWrite", + "description": "Message type to initiate a read-write transaction. Currently this\ntransaction type has no options.", + "type": "object" }, "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + }, "done": { "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" @@ -1172,17 +730,470 @@ "error": { "$ref": "Status", "description": "The error result of the operation in case of failure or cancellation." + } + }, + "id": "Operation", + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call." + }, + "ResultSet": { + "id": "ResultSet", + "description": "Results from Read or\nExecuteSql.", + "type": "object", + "properties": { + "rows": { + "description": "Each element in `rows` is a row whose format is defined by\nmetadata.row_type. The ith element\nin each row matches the ith field in\nmetadata.row_type. Elements are\nencoded based on type as described\nhere.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "any" + } + } }, "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", + "$ref": "ResultSetMetadata", + "description": "Metadata about the result set, such as row type information." + }, + "stats": { + "description": "Query plan and execution statistics for the query that produced this\nresult set. These can be requested by setting\nExecuteSqlRequest.query_mode.", + "$ref": "ResultSetStats" + } + } + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "additionalProperties": { + "type": "any", + "description": "Properties of the object. Contains field @type with type URL." + }, + "type": "object" + } + }, + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + } + }, + "id": "Status" + }, + "CreateSessionRequest": { + "description": "The request for CreateSession.", + "type": "object", + "properties": { + "session": { + "description": "The session to create.", + "$ref": "Session" + } + }, + "id": "CreateSessionRequest" + }, + "UpdateDatabaseDdlRequest": { + "description": "Enqueues the given DDL statements to be applied, in order but not\nnecessarily all at once, to the database schema at some point (or\npoints) in the future. The server checks that the statements\nare executable (syntactically valid, name tables that exist, etc.)\nbefore enqueueing them, but they may still fail upon\nlater execution (e.g., if a statement from another batch of\nstatements is applied first and it conflicts in some way, or if\nthere is some data-related problem like a `NULL` value in a column to\nwhich `NOT NULL` would be added). If a statement fails, all\nsubsequent statements in the batch are automatically cancelled.\n\nEach batch of statements is assigned a name which can be used with\nthe Operations API to monitor\nprogress. See the\noperation_id field for more\ndetails.", + "type": "object", + "properties": { + "statements": { + "description": "DDL statements to be applied to the database.", + "type": "array", + "items": { + "type": "string" + } + }, + "operationId": { + "type": "string", + "description": "If empty, the new update request is assigned an\nautomatically-generated operation ID. Otherwise, `operation_id`\nis used to construct the name of the resulting\nOperation.\n\nSpecifying an explicit operation ID simplifies determining\nwhether the statements were executed in the event that the\nUpdateDatabaseDdl call is replayed,\nor the return value is otherwise lost: the database and\n`operation_id` fields can be combined to form the\nname of the resulting\nlongrunning.Operation: `\u003cdatabase\u003e/operations/\u003coperation_id\u003e`.\n\n`operation_id` should be unique within the database, and must be\na valid identifier: `a-z*`. Note that\nautomatically-generated operation IDs always begin with an\nunderscore. If the named operation already exists,\nUpdateDatabaseDdl returns\n`ALREADY_EXISTS`." + } + }, + "id": "UpdateDatabaseDdlRequest" + }, + "Binding": { + "description": "Associates `members` with a `role`.", + "type": "object", + "properties": { + "members": { + "description": "Specifies the identities requesting access for a Cloud Platform resource.\n`members` can have the following values:\n\n* `allUsers`: A special identifier that represents anyone who is\n on the internet; with or without a Google account.\n\n* `allAuthenticatedUsers`: A special identifier that represents anyone\n who is authenticated with a Google account or a service account.\n\n* `user:{emailid}`: An email address that represents a specific Google\n account. For example, `alice@gmail.com` or `joe@example.com`.\n\n\n* `serviceAccount:{emailid}`: An email address that represents a service\n account. For example, `my-other-app@appspot.gserviceaccount.com`.\n\n* `group:{emailid}`: An email address that represents a Google group.\n For example, `admins@example.com`.\n\n\n* `domain:{domain}`: A Google Apps domain name that represents all the\n users of that domain. For example, `google.com` or `example.com`.\n\n", + "type": "array", + "items": { + "type": "string" + } + }, + "role": { + "description": "Role that is assigned to `members`.\nFor example, `roles/viewer`, `roles/editor`, or `roles/owner`.\nRequired", + "type": "string" + } + }, + "id": "Binding" + }, + "PartialResultSet": { + "description": "Partial results from a streaming read or SQL query. Streaming reads and\nSQL queries better tolerate large result sets, large rows, and large\nvalues, but are a little trickier to consume.", + "type": "object", + "properties": { + "chunkedValue": { + "description": "If true, then the final value in values is chunked, and must\nbe combined with more values from subsequent `PartialResultSet`s\nto obtain a complete field value.", + "type": "boolean" + }, + "metadata": { + "$ref": "ResultSetMetadata", + "description": "Metadata about the result set, such as row type information.\nOnly present in the first response." + }, + "values": { + "type": "array", + "items": { "type": "any" + }, + "description": "A streamed result set consists of a stream of values, which might\nbe split into many `PartialResultSet` messages to accommodate\nlarge rows and/or large values. Every N complete values defines a\nrow, where N is equal to the number of entries in\nmetadata.row_type.fields.\n\nMost values are encoded based on type as described\nhere.\n\nIt is possible that the last value in values is \"chunked\",\nmeaning that the rest of the value is sent in subsequent\n`PartialResultSet`(s). This is denoted by the chunked_value\nfield. Two or more chunked values can be merged to form a\ncomplete value as follows:\n\n * `bool/number/null`: cannot be chunked\n * `string`: concatenate the strings\n * `list`: concatenate the lists. If the last element in a list is a\n `string`, `list`, or `object`, merge it with the first element in\n the next list by applying these rules recursively.\n * `object`: concatenate the (field name, field value) pairs. If a\n field name is duplicated, then apply these rules recursively\n to merge the field values.\n\nSome examples of merging:\n\n # Strings are concatenated.\n \"foo\", \"bar\" =\u003e \"foobar\"\n\n # Lists of non-strings are concatenated.\n [2, 3], [4] =\u003e [2, 3, 4]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are strings.\n [\"a\", \"b\"], [\"c\", \"d\"] =\u003e [\"a\", \"bc\", \"d\"]\n\n # Lists are concatenated, but the last and first elements are merged\n # because they are lists. Recursively, the last and first elements\n # of the inner lists are merged because they are strings.\n [\"a\", [\"b\", \"c\"]], [[\"d\"], \"e\"] =\u003e [\"a\", [\"b\", \"cd\"], \"e\"]\n\n # Non-overlapping object fields are combined.\n {\"a\": \"1\"}, {\"b\": \"2\"} =\u003e {\"a\": \"1\", \"b\": 2\"}\n\n # Overlapping object fields are merged.\n {\"a\": \"1\"}, {\"a\": \"2\"} =\u003e {\"a\": \"12\"}\n\n # Examples of merging objects containing lists of strings.\n {\"a\": [\"1\"]}, {\"a\": [\"2\"]} =\u003e {\"a\": [\"12\"]}\n\nFor a more complete example, suppose a streaming SQL query is\nyielding a result set whose rows contain a single string\nfield. The following `PartialResultSet`s might be yielded:\n\n {\n \"metadata\": { ... }\n \"values\": [\"Hello\", \"W\"]\n \"chunked_value\": true\n \"resume_token\": \"Af65...\"\n }\n {\n \"values\": [\"orl\"]\n \"chunked_value\": true\n \"resume_token\": \"Bqp2...\"\n }\n {\n \"values\": [\"d\"]\n \"resume_token\": \"Zx1B...\"\n }\n\nThis sequence of `PartialResultSet`s encodes two rows, one\ncontaining the field value `\"Hello\"`, and a second containing the\nfield value `\"World\" = \"W\" + \"orl\" + \"d\"`." + }, + "resumeToken": { + "type": "string", + "description": "Streaming calls might be interrupted for a variety of reasons, such\nas TCP connection loss. If this occurs, the stream of results can\nbe resumed by re-sending the original request and including\n`resume_token`. Note that executing any other transaction in the\nsame session invalidates the token.", + "format": "byte" + }, + "stats": { + "description": "Query plan and execution statistics for the query that produced this\nstreaming result set. These can be requested by setting\nExecuteSqlRequest.query_mode and are sent\nonly once with the last response in the stream.", + "$ref": "ResultSetStats" + } + }, + "id": "PartialResultSet" + }, + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "description": "The response message for Operations.ListOperations.", + "type": "object", + "properties": { + "operations": { + "type": "array", + "items": { + "$ref": "Operation" + }, + "description": "A list of operations that matches the specified filter in the request." + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + } + }, + "UpdateInstanceMetadata": { + "description": "Metadata type for the operation returned by\nUpdateInstance.", + "type": "object", + "properties": { + "cancelTime": { + "description": "The time at which this operation was cancelled. If set, this operation is\nin the process of undoing itself (which is guaranteed to succeed) and\ncannot be cancelled again.", + "format": "google-datetime", + "type": "string" + }, + "endTime": { + "description": "The time at which this operation failed or was completed successfully.", + "format": "google-datetime", + "type": "string" + }, + "instance": { + "$ref": "Instance", + "description": "The desired end state of the update." + }, + "startTime": { + "description": "The time at which UpdateInstance\nrequest was received.", + "format": "google-datetime", + "type": "string" + } + }, + "id": "UpdateInstanceMetadata" + }, + "ResultSetMetadata": { + "id": "ResultSetMetadata", + "description": "Metadata about a ResultSet or PartialResultSet.", + "type": "object", + "properties": { + "transaction": { + "description": "If the read or SQL query began a transaction as a side-effect, the\ninformation about the new transaction is yielded here.", + "$ref": "Transaction" + }, + "rowType": { + "$ref": "StructType", + "description": "Indicates the field names and types for the rows in the result\nset. For example, a SQL query like `\"SELECT UserId, UserName FROM\nUsers\"` could return a `row_type` value like:\n\n \"fields\": [\n { \"name\": \"UserId\", \"type\": { \"code\": \"INT64\" } },\n { \"name\": \"UserName\", \"type\": { \"code\": \"STRING\" } },\n ]" + } + } + }, + "TransactionSelector": { + "description": "This message is used to select the transaction in which a\nRead or\nExecuteSql call runs.\n\nSee TransactionOptions for more information about transactions.", + "type": "object", + "properties": { + "singleUse": { + "$ref": "TransactionOptions", + "description": "Execute the read or SQL query in a temporary transaction.\nThis is the most efficient way to execute a transaction that\nconsists of a single SQL query." + }, + "begin": { + "$ref": "TransactionOptions", + "description": "Begin a new transaction and execute this read or SQL query in\nit. The transaction ID of the new transaction is returned in\nResultSetMetadata.transaction, which is a Transaction." + }, + "id": { + "description": "Execute the read or SQL query in a previously-started transaction.", + "format": "byte", + "type": "string" + } + }, + "id": "TransactionSelector" + }, + "KeySet": { + "description": "`KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All\nthe keys are expected to be in the same table or index. The keys need\nnot be sorted in any particular way.\n\nIf the same key is specified multiple times in the set (for example\nif two ranges, two keys, or a key and a range overlap), Cloud Spanner\nbehaves as if the key were only specified once.", + "type": "object", + "properties": { + "ranges": { + "description": "A list of key ranges. See KeyRange for more information about\nkey range specifications.", + "type": "array", + "items": { + "$ref": "KeyRange" + } + }, + "keys": { + "description": "A list of specific keys. Entries in `keys` should have exactly as\nmany elements as there are columns in the primary or index key\nwith which this `KeySet` is used. Individual key values are\nencoded as described here.", + "type": "array", + "items": { + "type": "array", + "items": { + "type": "any" + } + } + }, + "all": { + "description": "For convenience `all` can be set to `true` to indicate that this\n`KeySet` matches all keys in the table or index. Note that any keys\nspecified in `keys` or `ranges` are only yielded once.", + "type": "boolean" + } + }, + "id": "KeySet" + }, + "Mutation": { + "description": "A modification to one or more Cloud Spanner rows. Mutations can be\napplied to a Cloud Spanner database by sending them in a\nCommit call.", + "type": "object", + "properties": { + "update": { + "$ref": "Write", + "description": "Update existing rows in a table. If any of the rows does not\nalready exist, the transaction fails with error `NOT_FOUND`." + }, + "replace": { + "$ref": "Write", + "description": "Like insert, except that if the row already exists, it is\ndeleted, and the column values provided are inserted\ninstead. Unlike insert_or_update, this means any values not\nexplicitly written become `NULL`." + }, + "delete": { + "description": "Delete rows from a table. Succeeds whether or not the named\nrows were present.", + "$ref": "Delete" + }, + "insert": { + "$ref": "Write", + "description": "Insert new rows in a table. If any of the rows already exist,\nthe write or transaction fails with error `ALREADY_EXISTS`." + }, + "insertOrUpdate": { + "description": "Like insert, except that if the row already exists, then\nits column values are overwritten with the ones provided. Any\ncolumn values not explicitly written are preserved.", + "$ref": "Write" + } + }, + "id": "Mutation" + }, + "GetDatabaseDdlResponse": { + "description": "The response for GetDatabaseDdl.", + "type": "object", + "properties": { + "statements": { + "description": "A list of formatted DDL statements defining the schema of the database\nspecified in the request.", + "type": "array", + "items": { + "type": "string" } } }, - "id": "Operation" + "id": "GetDatabaseDdlResponse" + }, + "Database": { + "properties": { + "state": { + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY" + ], + "description": "Output only. The current database state.", + "type": "string", + "enumDescriptions": [ + "Not specified.", + "The database is still being created. Operations on the database may fail\nwith `FAILED_PRECONDITION` in this state.", + "The database is fully created and ready for use." + ] + }, + "name": { + "description": "Required. The name of the database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`,\nwhere `\u003cdatabase\u003e` is as specified in the `CREATE DATABASE`\nstatement. This name can be passed to other API methods to\nidentify the database.", + "type": "string" + } + }, + "id": "Database", + "description": "A Cloud Spanner database.", + "type": "object" + }, + "Instance": { + "id": "Instance", + "description": "An isolated set of Cloud Spanner resources on which databases can be hosted.", + "type": "object", + "properties": { + "displayName": { + "description": "Required. The descriptive name for this instance as it appears in UIs.\nMust be unique per project and between 4 and 30 characters in length.", + "type": "string" + }, + "nodeCount": { + "description": "Required. The number of nodes allocated to this instance. This may be zero\nin API responses for instances that are not yet in state `READY`.\n\nEach Spanner node can provide up to 10,000 QPS of reads or 2000 QPS of\nwrites (writing single rows at 1KB data per row), and 2 TiB storage.\n\nFor optimal performance, we recommend provisioning enough nodes to keep\noverall CPU utilization under 75%.\n\nA minimum of 3 nodes is recommended for production environments. This\nminimum is required for SLAs to apply to your instance.\n\nNote that Cloud Spanner performance is highly dependent on workload, schema\ndesign, and dataset characteristics. The performance numbers above are\nestimates, and assume [best practices](https://cloud.google.com/spanner/docs/bulk-loading)\nare followed.", + "format": "int32", + "type": "integer" + }, + "labels": { + "description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud\nresources into groups that reflect a customer's organizational needs and\ndeployment strategies. Cloud Labels can be used to filter collections of\nresources. They can be used to control how resource metrics are aggregated.\nAnd they can be used as arguments to policy management rules (e.g. route,\nfirewall, load balancing, etc.).\n\n * Label keys must be between 1 and 63 characters long and must conform to\n the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`.\n * Label values must be between 0 and 63 characters long and must conform\n to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`.\n * No more than 64 labels can be associated with a given resource.\n\nSee https://goo.gl/xmQnxf for more information on and examples of labels.\n\nIf you plan to use labels in your own code, please note that additional\ncharacters may be allowed in the future. And so you are advised to use an\ninternal label representation, such as JSON, which doesn't rely upon\nspecific characters being disallowed. For example, representing labels\nas the string: name + \"_\" + value would prove problematic if we were to\nallow \"_\" in a future release.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "config": { + "description": "Required. The name of the instance's configuration. Values are of the form\n`projects/\u003cproject\u003e/instanceConfigs/\u003cconfiguration\u003e`. See\nalso InstanceConfig and\nListInstanceConfigs.", + "type": "string" + }, + "state": { + "enumDescriptions": [ + "Not specified.", + "The instance is still being created. Resources may not be\navailable yet, and operations such as database creation may not\nwork.", + "The instance is fully created and ready to do work such as\ncreating databases." + ], + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "READY" + ], + "description": "Output only. The current instance state. For\nCreateInstance, the state must be\neither omitted or set to `CREATING`. For\nUpdateInstance, the state must be\neither omitted or set to `READY`.", + "type": "string" + }, + "name": { + "type": "string", + "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length." + } + } + }, + "ListDatabasesResponse": { + "description": "The response for ListDatabases.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "`next_page_token` can be sent in a subsequent\nListDatabases call to fetch more\nof the matching databases.", + "type": "string" + }, + "databases": { + "description": "Databases that matched the request.", + "type": "array", + "items": { + "$ref": "Database" + } + } + }, + "id": "ListDatabasesResponse" + }, + "SetIamPolicyRequest": { + "type": "object", + "properties": { + "policy": { + "$ref": "Policy", + "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of\nthe policy is limited to a few 10s of KB. An empty policy is a\nvalid policy but certain Cloud Platform services (such as Projects)\nmight reject them." + } + }, + "id": "SetIamPolicyRequest", + "description": "Request message for `SetIamPolicy` method." + }, + "RollbackRequest": { + "description": "The request for Rollback.", + "type": "object", + "properties": { + "transactionId": { + "description": "Required. The transaction to roll back.", + "format": "byte", + "type": "string" + } + }, + "id": "RollbackRequest" + }, + "Transaction": { + "description": "A transaction.", + "type": "object", + "properties": { + "id": { + "description": "`id` may be used to identify the transaction in subsequent\nRead,\nExecuteSql,\nCommit, or\nRollback calls.\n\nSingle-use read-only transactions do not have IDs, because\nsingle-use transactions do not support multiple requests.", + "format": "byte", + "type": "string" + }, + "readTimestamp": { + "type": "string", + "description": "For snapshot read-only transactions, the read timestamp chosen\nfor the transaction. Not returned by default: see\nTransactionOptions.ReadOnly.return_read_timestamp.", + "format": "google-datetime" + } + }, + "id": "Transaction" + }, + "UpdateDatabaseDdlMetadata": { + "properties": { + "commitTimestamps": { + "type": "array", + "items": { + "format": "google-datetime", + "type": "string" + }, + "description": "Reports the commit timestamps of all statements that have\nsucceeded so far, where `commit_timestamps[i]` is the commit\ntimestamp for the statement `statements[i]`." + }, + "database": { + "description": "The database being modified.", + "type": "string" + }, + "statements": { + "type": "array", + "items": { + "type": "string" + }, + "description": "For an update this list contains all the statements. For an\nindividual statement, this list contains only that statement." + } + }, + "id": "UpdateDatabaseDdlMetadata", + "description": "Metadata type for the operation returned by\nUpdateDatabaseDdl.", + "type": "object" + }, + "QueryPlan": { + "properties": { + "planNodes": { + "description": "The nodes in the query plan. Plan nodes are returned in pre-order starting\nwith the plan root. Each PlanNode's `id` corresponds to its index in\n`plan_nodes`.", + "type": "array", + "items": { + "$ref": "PlanNode" + } + } + }, + "id": "QueryPlan", + "description": "Contains an ordered list of nodes appearing in the query plan.", + "type": "object" + }, + "StructType": { + "properties": { + "fields": { + "description": "The list of fields that make up this struct. Order is\nsignificant, because values of this struct type are represented as\nlists, where the order of field values matches the order of\nfields in the StructType. In turn, the order of fields\nmatches the order of columns in a read request, or the order of\nfields in the `SELECT` clause of a query.", + "type": "array", + "items": { + "$ref": "Field" + } + } + }, + "id": "StructType", + "description": "`StructType` defines the fields of a STRUCT type.", + "type": "object" } }, "icons": { @@ -1194,14 +1205,14 @@ "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/spanner.data": { - "description": "View and manage the contents of your Spanner databases" - }, "https://www.googleapis.com/auth/cloud-platform": { "description": "View and manage your data across Google Cloud Platform services" }, "https://www.googleapis.com/auth/spanner.admin": { "description": "Administer your Spanner databases" + }, + "https://www.googleapis.com/auth/spanner.data": { + "description": "View and manage the contents of your Spanner databases" } } } @@ -1215,62 +1226,9 @@ "resources": { "projects": { "resources": { - "instances": { + "instanceConfigs": { "methods": { "list": { - "response": { - "$ref": "ListInstancesResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Number of instances to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.", - "format": "int32", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "Required. The name of the project for which a list of instances is\nrequested. Values are of the form `projects/\u003cproject\u003e`.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "filter": { - "location": "query", - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * name\n * display_name\n * labels.key where key is the name of a label\n\nSome examples of using filters are:\n\n * name:* --\u003e The instance has a name.\n * name:Howl --\u003e The instance's name contains the string \"howl\".\n * name:HOWL --\u003e Equivalent to above.\n * NAME:howl --\u003e Equivalent to above.\n * labels.env:* --\u003e The instance has the label \"env\".\n * labels.env:dev --\u003e The instance has the label \"env\" and the value of\n the label contains the string \"dev\".\n * name:howl labels.env:dev --\u003e The instance's name contains \"howl\" and\n it has the label \"env\" with its value\n containing \"dev\".", - "type": "string" - }, - "pageToken": { - "location": "query", - "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListInstancesResponse.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances", - "path": "v1/{+parent}/instances", - "id": "spanner.projects.instances.list", - "description": "Lists all instances in the given project." - }, - "create": { - "description": "Creates an instance and begins preparing it to begin serving. The\nreturned long-running operation\ncan be used to track the progress of preparing the new\ninstance. The instance name is assigned by the caller. If the\nnamed instance already exists, `CreateInstance` returns\n`ALREADY_EXISTS`.\n\nImmediately upon completion of this request:\n\n * The instance is readable via the API, with all requested attributes\n but no allocated resources. Its state is `CREATING`.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation renders the instance immediately unreadable\n via the API.\n * The instance can be deleted.\n * All other attempts to modify the instance are rejected.\n\nUpon completion of the returned operation:\n\n * Billing for all successfully-allocated resources begins (some types\n may have lower than the requested levels).\n * Databases can be created in the instance.\n * The instance's allocated resource levels are readable via the API.\n * The instance's state becomes `READY`.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track creation of the instance. The\nmetadata field type is\nCreateInstanceMetadata.\nThe response field type is\nInstance, if successful.", - "request": { - "$ref": "CreateInstanceRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" @@ -1278,75 +1236,70 @@ "parameters": { "parent": { "location": "path", - "description": "Required. The name of the project in which to create the instance. Values\nare of the form `projects/\u003cproject\u003e`.", + "description": "Required. The name of the project for which a list of supported instance\nconfigurations is requested. Values are of the form\n`projects/\u003cproject\u003e`.", "required": true, "type": "string", "pattern": "^projects/[^/]+$" + }, + "pageToken": { + "location": "query", + "description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListInstanceConfigsResponse.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Number of instance configurations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.", + "format": "int32", + "type": "integer" } }, - "flatPath": "v1/projects/{projectsId}/instances", - "path": "v1/{+parent}/instances", - "id": "spanner.projects.instances.create" - }, - "setIamPolicy": { - "description": "Sets the access control policy on an instance resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.instances.setIamPolicy` on\nresource.", - "request": { - "$ref": "SetIamPolicyRequest" - }, + "flatPath": "v1/projects/{projectsId}/instanceConfigs", + "path": "v1/{+parent}/instanceConfigs", + "id": "spanner.projects.instanceConfigs.list", + "description": "Lists the supported instance configurations for a given project.", "response": { - "$ref": "Policy" + "$ref": "ListInstanceConfigsResponse" }, "parameterOrder": [ - "resource" + "parent" ], - "httpMethod": "POST", + "httpMethod": "GET" + }, + "get": { + "response": { + "$ref": "InstanceConfig" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" ], "parameters": { - "resource": { - "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", + "name": { + "description": "Required. The name of the requested instance configuration. Values are of\nthe form `projects/\u003cproject\u003e/instanceConfigs/\u003cconfig\u003e`.", "required": true, "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+$", + "pattern": "^projects/[^/]+/instanceConfigs/[^/]+$", "location": "path" } }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:setIamPolicy", - "path": "v1/{+resource}:setIamPolicy", - "id": "spanner.projects.instances.setIamPolicy" - }, - "getIamPolicy": { - "request": { - "$ref": "GetIamPolicyRequest" - }, - "description": "Gets the access control policy for an instance resource. Returns an empty\npolicy if an instance exists but does not have a policy set.\n\nAuthorization requires `spanner.instances.getIamPolicy` on\nresource.", - "httpMethod": "POST", - "parameterOrder": [ - "resource" - ], - "response": { - "$ref": "Policy" - }, - "parameters": { - "resource": { - "location": "path", - "description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:getIamPolicy", - "id": "spanner.projects.instances.getIamPolicy", - "path": "v1/{+resource}:getIamPolicy" - }, + "flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", + "path": "v1/{+name}", + "id": "spanner.projects.instanceConfigs.get", + "description": "Gets information about a particular instance configuration." + } + } + }, + "instances": { + "methods": { "get": { + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", + "path": "v1/{+name}", + "id": "spanner.projects.instances.get", + "description": "Gets information about a particular instance.", "response": { "$ref": "Instance" }, @@ -1356,27 +1309,23 @@ "httpMethod": "GET", "parameters": { "name": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", "description": "Required. The name of the requested instance. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" + "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.get", - "description": "Gets information about a particular instance." + ] }, "patch": { + "description": "Updates an instance, and begins allocating or releasing resources\nas requested. The returned long-running\noperation can be used to track the\nprogress of updating the instance. If the named instance does not\nexist, returns `NOT_FOUND`.\n\nImmediately upon completion of this request:\n\n * For resource types for which a decrease in the instance's allocation\n has been requested, billing is based on the newly-requested level.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation sets its metadata's\n cancel_time, and begins\n restoring resources to their pre-request values. The operation\n is guaranteed to succeed at undoing all resource changes,\n after which point it terminates with a `CANCELLED` status.\n * All other attempts to modify the instance are rejected.\n * Reading the instance via the API continues to give the pre-request\n resource levels.\n\nUpon completion of the returned operation:\n\n * Billing begins for all successfully-allocated resources (some types\n may have lower than the requested levels).\n * All newly-reserved resources are available for serving the instance's\n tables.\n * The instance's new resource levels are readable via the API.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track the instance modification. The\nmetadata field type is\nUpdateInstanceMetadata.\nThe response field type is\nInstance, if successful.\n\nAuthorization requires `spanner.instances.update` permission on\nresource name.", "request": { "$ref": "UpdateInstanceRequest" }, - "description": "Updates an instance, and begins allocating or releasing resources\nas requested. The returned long-running\noperation can be used to track the\nprogress of updating the instance. If the named instance does not\nexist, returns `NOT_FOUND`.\n\nImmediately upon completion of this request:\n\n * For resource types for which a decrease in the instance's allocation\n has been requested, billing is based on the newly-requested level.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation sets its metadata's\n cancel_time, and begins\n restoring resources to their pre-request values. The operation\n is guaranteed to succeed at undoing all resource changes,\n after which point it terminates with a `CANCELLED` status.\n * All other attempts to modify the instance are rejected.\n * Reading the instance via the API continues to give the pre-request\n resource levels.\n\nUpon completion of the returned operation:\n\n * Billing begins for all successfully-allocated resources (some types\n may have lower than the requested levels).\n * All newly-reserved resources are available for serving the instance's\n tables.\n * The instance's new resource levels are readable via the API.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track the instance modification. The\nmetadata field type is\nUpdateInstanceMetadata.\nThe response field type is\nInstance, if successful.\n\nAuthorization requires `spanner.instances.update` permission on\nresource name.", "response": { "$ref": "Operation" }, @@ -1384,31 +1333,24 @@ "name" ], "httpMethod": "PATCH", - "parameters": { - "name": { - "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" ], + "parameters": { + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "Required. A unique identifier for the instance, which cannot be changed\nafter the instance is created. Values are of the form\n`projects/\u003cproject\u003e/instances/a-z*[a-z0-9]`. The final\nsegment of the name must be between 6 and 30 characters in length.", + "required": true, + "type": "string" + } + }, "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", "path": "v1/{+name}", "id": "spanner.projects.instances.patch" }, "testIamPermissions": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "id": "spanner.projects.instances.testIamPermissions", - "description": "Returns permissions that the caller has on the specified instance resource.\n\nAttempting this RPC on a non-existent Cloud Spanner instance resource will\nresult in a NOT_FOUND error if the user has `spanner.instances.list`\npermission on the containing Google Cloud Project. Otherwise returns an\nempty set of permissions.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, "response": { "$ref": "TestIamPermissionsResponse" }, @@ -1416,10 +1358,6 @@ "resource" ], "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], "parameters": { "resource": { "location": "path", @@ -1428,12 +1366,20 @@ "type": "string", "pattern": "^projects/[^/]+/instances/[^/]+$" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "id": "spanner.projects.instances.testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "description": "Returns permissions that the caller has on the specified instance resource.\n\nAttempting this RPC on a non-existent Cloud Spanner instance resource will\nresult in a NOT_FOUND error if the user has `spanner.instances.list`\npermission on the containing Google Cloud Project. Otherwise returns an\nempty set of permissions." }, "delete": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.delete", "description": "Deletes an instance.\n\nImmediately upon completion of the request:\n\n * Billing ceases for all of the instance's reserved resources.\n\nSoon afterward:\n\n * The instance and *all of its databases* immediately and\n irrevocably disappear from the API. All data in the databases\n is permanently deleted.", "response": { "$ref": "Empty" @@ -1451,6 +1397,138 @@ "pattern": "^projects/[^/]+/instances/[^/]+$" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}", + "path": "v1/{+name}", + "id": "spanner.projects.instances.delete" + }, + "list": { + "response": { + "$ref": "ListInstancesResponse" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "GET", + "parameters": { + "parent": { + "location": "path", + "description": "Required. The name of the project for which a list of instances is\nrequested. Values are of the form `projects/\u003cproject\u003e`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + }, + "filter": { + "type": "string", + "location": "query", + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * name\n * display_name\n * labels.key where key is the name of a label\n\nSome examples of using filters are:\n\n * name:* --\u003e The instance has a name.\n * name:Howl --\u003e The instance's name contains the string \"howl\".\n * name:HOWL --\u003e Equivalent to above.\n * NAME:howl --\u003e Equivalent to above.\n * labels.env:* --\u003e The instance has the label \"env\".\n * labels.env:dev --\u003e The instance has the label \"env\" and the value of\n the label contains the string \"dev\".\n * name:howl labels.env:dev --\u003e The instance's name contains \"howl\" and\n it has the label \"env\" with its value\n containing \"dev\"." + }, + "pageToken": { + "location": "query", + "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListInstancesResponse.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Number of instances to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.", + "format": "int32", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances", + "path": "v1/{+parent}/instances", + "id": "spanner.projects.instances.list", + "description": "Lists all instances in the given project." + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "parameters": { + "parent": { + "location": "path", + "description": "Required. The name of the project in which to create the instance. Values\nare of the form `projects/\u003cproject\u003e`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+$" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances", + "path": "v1/{+parent}/instances", + "id": "spanner.projects.instances.create", + "request": { + "$ref": "CreateInstanceRequest" + }, + "description": "Creates an instance and begins preparing it to begin serving. The\nreturned long-running operation\ncan be used to track the progress of preparing the new\ninstance. The instance name is assigned by the caller. If the\nnamed instance already exists, `CreateInstance` returns\n`ALREADY_EXISTS`.\n\nImmediately upon completion of this request:\n\n * The instance is readable via the API, with all requested attributes\n but no allocated resources. Its state is `CREATING`.\n\nUntil completion of the returned operation:\n\n * Cancelling the operation renders the instance immediately unreadable\n via the API.\n * The instance can be deleted.\n * All other attempts to modify the instance are rejected.\n\nUpon completion of the returned operation:\n\n * Billing for all successfully-allocated resources begins (some types\n may have lower than the requested levels).\n * Databases can be created in the instance.\n * The instance's allocated resource levels are readable via the API.\n * The instance's state becomes `READY`.\n\nThe returned long-running operation will\nhave a name of the format `\u003cinstance_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track creation of the instance. The\nmetadata field type is\nCreateInstanceMetadata.\nThe response field type is\nInstance, if successful." + }, + "setIamPolicy": { + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:setIamPolicy", + "path": "v1/{+resource}:setIamPolicy", + "id": "spanner.projects.instances.setIamPolicy", + "description": "Sets the access control policy on an instance resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.instances.setIamPolicy` on\nresource.", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "resource": { + "location": "path", + "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+$" + } + } + }, + "getIamPolicy": { + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}:getIamPolicy", + "path": "v1/{+resource}:getIamPolicy", + "id": "spanner.projects.instances.getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "description": "Gets the access control policy for an instance resource. Returns an empty\npolicy if an instance exists but does not have a policy set.\n\nAuthorization requires `spanner.instances.getIamPolicy` on\nresource.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" @@ -1458,229 +1536,240 @@ } }, "resources": { - "operations": { - "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "POST", - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be cancelled.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}:cancel", - "path": "v1/{+name}:cancel", - "id": "spanner.projects.instances.operations.cancel" - }, - "delete": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", - "id": "spanner.projects.instances.operations.delete", - "path": "v1/{+name}", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource to be deleted.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] - }, - "list": { - "response": { - "$ref": "ListOperationsResponse" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The name of the operation's parent resource.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/operations$", - "location": "path" - }, - "pageToken": { - "description": "The standard list page token.", - "type": "string", - "location": "query" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "type": "integer", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations", - "path": "v1/{+name}", - "id": "spanner.projects.instances.operations.list", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." - }, - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.operations.get" - } - } - }, "databases": { "methods": { - "list": { - "description": "Lists Cloud Spanner databases.", - "response": { - "$ref": "ListDatabasesResponse" - }, - "parameterOrder": [ - "parent" - ], + "get": { + "description": "Gets the state of a Cloud Spanner database.", "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Database" + }, + "parameters": { + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "Required. The name of the requested database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`.", + "required": true, + "type": "string" + } + }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", + "id": "spanner.projects.instances.databases.get", + "path": "v1/{+name}" + }, + "dropDatabase": { + "description": "Drops (aka deletes) a Cloud Spanner database.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "database" + ], + "httpMethod": "DELETE", "parameters": { - "pageSize": { - "description": "Number of databases to be returned in the response. If 0 or less,\ndefaults to the server's maximum allowed page size.", - "format": "int32", - "type": "integer", - "location": "query" - }, - "parent": { + "database": { "location": "path", - "description": "Required. The instance whose databases should be listed.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", + "description": "Required. The database to be dropped.", "required": true, "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+$" - }, - "pageToken": { - "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListDatabasesResponse.", - "type": "string", - "location": "query" + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" } }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", - "path": "v1/{+parent}/databases", - "id": "spanner.projects.instances.databases.list" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", + "path": "v1/{+database}", + "id": "spanner.projects.instances.databases.dropDatabase" }, - "create": { - "request": { - "$ref": "CreateDatabaseRequest" - }, - "description": "Creates a new Cloud Spanner database and starts to prepare it for serving.\nThe returned long-running operation will\nhave a name of the format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track preparation of the database. The\nmetadata field type is\nCreateDatabaseMetadata. The\nresponse field type is\nDatabase, if successful.", + "updateDdl": { "response": { "$ref": "Operation" }, "parameterOrder": [ - "parent" + "database" ], - "httpMethod": "POST", - "parameters": { - "parent": { - "description": "Required. The name of the instance that will serve the new database.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+$", - "location": "path" - } - }, + "httpMethod": "PATCH", "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", - "path": "v1/{+parent}/databases", - "id": "spanner.projects.instances.databases.create" + "parameters": { + "database": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "Required. The database to update.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", + "path": "v1/{+database}/ddl", + "id": "spanner.projects.instances.databases.updateDdl", + "description": "Updates the schema of a Cloud Spanner database by\ncreating/altering/dropping tables, columns, indexes, etc. The returned\nlong-running operation will have a name of\nthe format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and can be used to\ntrack execution of the schema change(s). The\nmetadata field type is\nUpdateDatabaseDdlMetadata. The operation has no response.", + "request": { + "$ref": "UpdateDatabaseDdlRequest" + } }, - "setIamPolicy": { - "httpMethod": "POST", + "testIamPermissions": { + "description": "Returns permissions that the caller has on the specified database resource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will result in\na NOT_FOUND error if the user has `spanner.databases.list` permission on\nthe containing Cloud Spanner instance. Otherwise returns an empty set of\npermissions.", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, "parameterOrder": [ "resource" ], - "response": { - "$ref": "Policy" - }, + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], "parameters": { "resource": { - "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", "required": true, "type": "string", "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" + "location": "path", + "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources." + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions", + "path": "v1/{+resource}:testIamPermissions", + "id": "spanner.projects.instances.databases.testIamPermissions" + }, + "getDdl": { + "parameters": { + "database": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "Required. The database whose schema we wish to get.", + "required": true, + "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/spanner.admin" ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy", - "id": "spanner.projects.instances.databases.setIamPolicy", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", + "path": "v1/{+database}/ddl", + "id": "spanner.projects.instances.databases.getDdl", + "description": "Returns the schema of a Cloud Spanner database as a list of formatted\nDDL statements. This method does not show pending schema updates, those may\nbe queried using the Operations API.", + "response": { + "$ref": "GetDatabaseDdlResponse" + }, + "parameterOrder": [ + "database" + ], + "httpMethod": "GET" + }, + "list": { + "id": "spanner.projects.instances.databases.list", + "path": "v1/{+parent}/databases", + "description": "Lists Cloud Spanner databases.", + "httpMethod": "GET", + "parameterOrder": [ + "parent" + ], + "response": { + "$ref": "ListDatabasesResponse" + }, + "parameters": { + "parent": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "location": "path", + "description": "Required. The instance whose databases should be listed.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`." + }, + "pageToken": { + "location": "query", + "description": "If non-empty, `page_token` should contain a\nnext_page_token from a\nprevious ListDatabasesResponse.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "Number of databases to be returned in the response. If 0 or less,\ndefaults to the server's maximum allowed page size.", + "format": "int32", + "type": "integer" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases" + }, + "create": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "parent" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "parent": { + "location": "path", + "description": "Required. The name of the instance that will serve the new database.\nValues are of the form `projects/\u003cproject\u003e/instances/\u003cinstance\u003e`.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", + "path": "v1/{+parent}/databases", + "id": "spanner.projects.instances.databases.create", + "description": "Creates a new Cloud Spanner database and starts to prepare it for serving.\nThe returned long-running operation will\nhave a name of the format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and\ncan be used to track preparation of the database. The\nmetadata field type is\nCreateDatabaseMetadata. The\nresponse field type is\nDatabase, if successful.", + "request": { + "$ref": "CreateDatabaseRequest" + } + }, + "setIamPolicy": { "path": "v1/{+resource}:setIamPolicy", + "id": "spanner.projects.instances.databases.setIamPolicy", "request": { "$ref": "SetIamPolicyRequest" }, - "description": "Sets the access control policy on a database resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.databases.setIamPolicy` permission on\nresource." + "description": "Sets the access control policy on a database resource. Replaces any\nexisting policy.\n\nAuthorization requires `spanner.databases.setIamPolicy` permission on\nresource.", + "response": { + "$ref": "Policy" + }, + "parameterOrder": [ + "resource" + ], + "httpMethod": "POST", + "parameters": { + "resource": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path", + "description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for databases resources.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy" }, "getIamPolicy": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy", "path": "v1/{+resource}:getIamPolicy", "id": "spanner.projects.instances.databases.getIamPolicy", "description": "Gets the access control policy for a database resource. Returns an empty\npolicy if a database exists but does not have a policy set.\n\nAuthorization requires `spanner.databases.getIamPolicy` permission on\nresource.", @@ -1706,218 +1795,14 @@ "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", "location": "path" } - } - }, - "get": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", - "id": "spanner.projects.instances.databases.get", - "path": "v1/{+name}", - "description": "Gets the state of a Cloud Spanner database.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Database" }, - "parameters": { - "name": { - "description": "Required. The name of the requested database. Values are of the form\n`projects/\u003cproject\u003e/instances/\u003cinstance\u003e/databases/\u003cdatabase\u003e`.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] - }, - "dropDatabase": { - "description": "Drops (aka deletes) a Cloud Spanner database.", - "httpMethod": "DELETE", - "parameterOrder": [ - "database" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "database": { - "location": "path", - "description": "Required. The database to be dropped.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", - "id": "spanner.projects.instances.databases.dropDatabase", - "path": "v1/{+database}" - }, - "updateDdl": { - "description": "Updates the schema of a Cloud Spanner database by\ncreating/altering/dropping tables, columns, indexes, etc. The returned\nlong-running operation will have a name of\nthe format `\u003cdatabase_name\u003e/operations/\u003coperation_id\u003e` and can be used to\ntrack execution of the schema change(s). The\nmetadata field type is\nUpdateDatabaseDdlMetadata. The operation has no response.", - "request": { - "$ref": "UpdateDatabaseDdlRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "database" - ], - "httpMethod": "PATCH", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "database": { - "description": "Required. The database to update.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", - "path": "v1/{+database}/ddl", - "id": "spanner.projects.instances.databases.updateDdl" - }, - "testIamPermissions": { - "description": "Returns permissions that the caller has on the specified database resource.\n\nAttempting this RPC on a non-existent Cloud Spanner database will result in\na NOT_FOUND error if the user has `spanner.databases.list` permission on\nthe containing Cloud Spanner instance. Otherwise returns an empty set of\npermissions.", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "parameterOrder": [ - "resource" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e` for instance resources and `projects/\u003cproject ID\u003e/instances/\u003cinstance ID\u003e/databases/\u003cdatabase ID\u003e` for database resources.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions", - "path": "v1/{+resource}:testIamPermissions", - "id": "spanner.projects.instances.databases.testIamPermissions" - }, - "getDdl": { - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", - "id": "spanner.projects.instances.databases.getDdl", - "path": "v1/{+database}/ddl", - "description": "Returns the schema of a Cloud Spanner database as a list of formatted\nDDL statements. This method does not show pending schema updates, those may\nbe queried using the Operations API.", - "httpMethod": "GET", - "parameterOrder": [ - "database" - ], - "response": { - "$ref": "GetDatabaseDdlResponse" - }, - "parameters": { - "database": { - "location": "path", - "description": "Required. The database whose schema we wish to get.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ] + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy" } }, "resources": { "operations": { "methods": { - "list": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "parameters": { - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - }, - "name": { - "location": "path", - "description": "The name of the operation's parent resource.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations$" - }, - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "pageSize": { - "location": "query", - "description": "The standard list page size.", - "format": "int32", - "type": "integer" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations", - "id": "spanner.projects.instances.databases.operations.list", - "path": "v1/{+name}", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." - }, - "get": { - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Operation" - }, - "parameters": { - "name": { - "location": "path", - "description": "The name of the operation resource.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", - "id": "spanner.projects.instances.databases.operations.get", - "path": "v1/{+name}", - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." - }, "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", "response": { "$ref": "Empty" }, @@ -1931,30 +1816,27 @@ ], "parameters": { "name": { - "location": "path", "description": "The name of the operation resource to be cancelled.", "required": true, "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$" + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", + "location": "path" } }, "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}:cancel", "path": "v1/{+name}:cancel", - "id": "spanner.projects.instances.databases.operations.cancel" + "id": "spanner.projects.instances.databases.operations.cancel", + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`." }, "delete": { "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "response": { - "$ref": "Empty" - }, + "httpMethod": "DELETE", "parameterOrder": [ "name" ], - "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], + "response": { + "$ref": "Empty" + }, "parameters": { "name": { "description": "The name of the operation resource to be deleted.", @@ -1964,16 +1846,300 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", + "id": "spanner.projects.instances.databases.operations.delete", + "path": "v1/{+name}" + }, + "list": { + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "filter": { + "description": "The standard list filter.", + "type": "string", + "location": "query" + }, + "name": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations$", + "location": "path", + "description": "The name of the operation's parent resource.", + "required": true, + "type": "string" + }, + "pageToken": { + "description": "The standard list page token.", + "type": "string", + "location": "query" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "type": "integer", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations", + "path": "v1/{+name}", + "id": "spanner.projects.instances.databases.operations.list", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." + }, + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$" + } + }, "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", "path": "v1/{+name}", - "id": "spanner.projects.instances.databases.operations.delete" + "id": "spanner.projects.instances.databases.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." } } }, "sessions": { "methods": { + "list": { + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", + "id": "spanner.projects.instances.databases.sessions.list", + "path": "v1/{+database}/sessions", + "description": "Lists all sessions in a given database.", + "httpMethod": "GET", + "parameterOrder": [ + "database" + ], + "response": { + "$ref": "ListSessionsResponse" + }, + "parameters": { + "filter": { + "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * labels.key where key is the name of a label\n\nSome examples of using filters are:\n\n * labels.env:* --\u003e The session has the label \"env\".\n * labels.env:dev --\u003e The session has the label \"env\" and the value of\n the label contains the string \"dev\".", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "If non-empty, `page_token` should contain a\nnext_page_token from a previous\nListSessionsResponse.", + "type": "string" + }, + "pageSize": { + "type": "integer", + "location": "query", + "description": "Number of sessions to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.", + "format": "int32" + }, + "database": { + "description": "Required. The database in which to list sessions.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ] + }, + "executeSql": { + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql", + "path": "v1/{+session}:executeSql", + "id": "spanner.projects.instances.databases.sessions.executeSql", + "description": "Executes an SQL query, returning all rows in a single reply. This\nmethod cannot be used to return a result set larger than 10 MiB;\nif the query yields more data than that, the query fails with\na `FAILED_PRECONDITION` error.\n\nQueries inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be fetched in streaming fashion by calling\nExecuteStreamingSql instead.", + "request": { + "$ref": "ExecuteSqlRequest" + }, + "response": { + "$ref": "ResultSet" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "description": "Required. The session in which the SQL query should be performed.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path" + } + } + }, + "rollback": { + "parameters": { + "session": { + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the transaction to roll back is running." + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:rollback", + "path": "v1/{+session}:rollback", + "id": "spanner.projects.instances.databases.sessions.rollback", + "request": { + "$ref": "RollbackRequest" + }, + "description": "Rolls back a transaction, releasing any locks it holds. It is a good\nidea to call this for any transaction that includes one or more\nRead or ExecuteSql requests and\nultimately decides not to commit.\n\n`Rollback` returns `OK` if it successfully aborts the transaction, the\ntransaction was already aborted, or the transaction is not\nfound. `Rollback` never returns `ABORTED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST" + }, + "streamingRead": { + "httpMethod": "POST", + "parameterOrder": [ + "session" + ], + "response": { + "$ref": "PartialResultSet" + }, + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the read should be performed.", + "required": true, + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:streamingRead", + "id": "spanner.projects.instances.databases.sessions.streamingRead", + "path": "v1/{+session}:streamingRead", + "request": { + "$ref": "ReadRequest" + }, + "description": "Like Read, except returns the result set as a\nstream. Unlike Read, there is no limit on the\nsize of the returned result set. However, no individual row in\nthe result set can exceed 100 MiB, and no column value can exceed\n10 MiB." + }, + "create": { + "request": { + "$ref": "CreateSessionRequest" + }, + "description": "Creates a new session. A session can be used to perform\ntransactions that read and/or modify data in a Cloud Spanner database.\nSessions are meant to be reused for many consecutive\ntransactions.\n\nSessions can only execute one transaction at a time. To execute\nmultiple concurrent read-write/write-only transactions, create\nmultiple sessions. Note that standalone reads and queries use a\ntransaction internally, and count toward the one transaction\nlimit.\n\nCloud Spanner limits the number of sessions that can exist at any given\ntime; thus, it is a good idea to delete idle and/or unneeded sessions.\nAside from explicit deletes, Cloud Spanner can delete sessions for which no\noperations are sent for more than an hour. If a session is deleted,\nrequests to it return `NOT_FOUND`.\n\nIdle sessions can be kept alive by sending a trivial SQL query\nperiodically, e.g., `\"SELECT 1\"`.", + "response": { + "$ref": "Session" + }, + "parameterOrder": [ + "database" + ], + "httpMethod": "POST", + "parameters": { + "database": { + "description": "Required. The database in which the new session is created.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", + "path": "v1/{+database}/sessions", + "id": "spanner.projects.instances.databases.sessions.create" + }, + "read": { + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:read", + "path": "v1/{+session}:read", + "id": "spanner.projects.instances.databases.sessions.read", + "description": "Reads rows from the database using key lookups and scans, as a\nsimple key/value style alternative to\nExecuteSql. This method cannot be used to\nreturn a result set larger than 10 MiB; if the read matches more\ndata than that, the read fails with a `FAILED_PRECONDITION`\nerror.\n\nReads inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be yielded in streaming fashion by calling\nStreamingRead instead.", + "request": { + "$ref": "ReadRequest" + }, + "response": { + "$ref": "ResultSet" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "description": "Required. The session in which the read should be performed.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path" + } + } + }, + "get": { + "path": "v1/{+name}", + "id": "spanner.projects.instances.databases.sessions.get", + "description": "Gets a session. Returns `NOT_FOUND` if the session does not exist.\nThis is mainly useful for determining whether a session is still\nalive.", + "response": { + "$ref": "Session" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "Required. The name of the session to retrieve.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}" + }, "delete": { - "description": "Ends a session, releasing server resources associated with it.", "response": { "$ref": "Empty" }, @@ -1996,13 +2162,68 @@ }, "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", "path": "v1/{+name}", - "id": "spanner.projects.instances.databases.sessions.delete" + "id": "spanner.projects.instances.databases.sessions.delete", + "description": "Ends a session, releasing server resources associated with it." + }, + "executeStreamingSql": { + "response": { + "$ref": "PartialResultSet" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", + "location": "path", + "description": "Required. The session in which the SQL query should be performed.", + "required": true, + "type": "string" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeStreamingSql", + "path": "v1/{+session}:executeStreamingSql", + "id": "spanner.projects.instances.databases.sessions.executeStreamingSql", + "description": "Like ExecuteSql, except returns the result\nset as a stream. Unlike ExecuteSql, there\nis no limit on the size of the returned result set. However, no\nindividual row in the result set can exceed 100 MiB, and no\ncolumn value can exceed 10 MiB.", + "request": { + "$ref": "ExecuteSqlRequest" + } + }, + "beginTransaction": { + "path": "v1/{+session}:beginTransaction", + "id": "spanner.projects.instances.databases.sessions.beginTransaction", + "description": "Begins a new transaction. This step can often be skipped:\nRead, ExecuteSql and\nCommit can begin a new transaction as a\nside-effect.", + "request": { + "$ref": "BeginTransactionRequest" + }, + "response": { + "$ref": "Transaction" + }, + "parameterOrder": [ + "session" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.data" + ], + "parameters": { + "session": { + "location": "path", + "description": "Required. The session in which the transaction runs.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction" }, "commit": { - "request": { - "$ref": "CommitRequest" - }, - "description": "Commits a transaction. The request includes the mutations to be\napplied to rows in the database.\n\n`Commit` might return an `ABORTED` error. This can occur at any time;\ncommonly, the cause is conflicts with concurrent\ntransactions. However, it can also happen for a variety of other\nreasons. If `Commit` returns `ABORTED`, the caller should re-attempt\nthe transaction from the beginning, re-using the same session.", "httpMethod": "POST", "parameterOrder": [ "session" @@ -2025,349 +2246,139 @@ ], "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:commit", "id": "spanner.projects.instances.databases.sessions.commit", - "path": "v1/{+session}:commit" - }, - "beginTransaction": { - "response": { - "$ref": "Transaction" - }, - "parameterOrder": [ - "session" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "session": { - "description": "Required. The session in which the transaction runs.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction", - "path": "v1/{+session}:beginTransaction", - "id": "spanner.projects.instances.databases.sessions.beginTransaction", - "description": "Begins a new transaction. This step can often be skipped:\nRead, ExecuteSql and\nCommit can begin a new transaction as a\nside-effect.", + "path": "v1/{+session}:commit", "request": { - "$ref": "BeginTransactionRequest" - } - }, - "executeStreamingSql": { - "description": "Like ExecuteSql, except returns the result\nset as a stream. Unlike ExecuteSql, there\nis no limit on the size of the returned result set. However, no\nindividual row in the result set can exceed 100 MiB, and no\ncolumn value can exceed 10 MiB.", - "request": { - "$ref": "ExecuteSqlRequest" + "$ref": "CommitRequest" }, - "response": { - "$ref": "PartialResultSet" - }, - "parameterOrder": [ - "session" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "session": { - "description": "Required. The session in which the SQL query should be performed.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeStreamingSql", - "path": "v1/{+session}:executeStreamingSql", - "id": "spanner.projects.instances.databases.sessions.executeStreamingSql" - }, - "executeSql": { - "request": { - "$ref": "ExecuteSqlRequest" - }, - "description": "Executes an SQL query, returning all rows in a single reply. This\nmethod cannot be used to return a result set larger than 10 MiB;\nif the query yields more data than that, the query fails with\na `FAILED_PRECONDITION` error.\n\nQueries inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be fetched in streaming fashion by calling\nExecuteStreamingSql instead.", - "httpMethod": "POST", - "parameterOrder": [ - "session" - ], - "response": { - "$ref": "ResultSet" - }, - "parameters": { - "session": { - "description": "Required. The session in which the SQL query should be performed.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql", - "id": "spanner.projects.instances.databases.sessions.executeSql", - "path": "v1/{+session}:executeSql" - }, - "list": { - "description": "Lists all sessions in a given database.", - "response": { - "$ref": "ListSessionsResponse" - }, - "parameterOrder": [ - "database" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Number of sessions to be returned in the response. If 0 or less, defaults\nto the server's maximum allowed page size.", - "format": "int32", - "type": "integer", - "location": "query" - }, - "database": { - "location": "path", - "description": "Required. The database in which to list sessions.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - }, - "filter": { - "description": "An expression for filtering the results of the request. Filter rules are\ncase insensitive. The fields eligible for filtering are:\n\n * labels.key where key is the name of a label\n\nSome examples of using filters are:\n\n * labels.env:* --\u003e The session has the label \"env\".\n * labels.env:dev --\u003e The session has the label \"env\" and the value of\n the label contains the string \"dev\".", - "type": "string", - "location": "query" - }, - "pageToken": { - "description": "If non-empty, `page_token` should contain a\nnext_page_token from a previous\nListSessionsResponse.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", - "path": "v1/{+database}/sessions", - "id": "spanner.projects.instances.databases.sessions.list" - }, - "streamingRead": { - "request": { - "$ref": "ReadRequest" - }, - "description": "Like Read, except returns the result set as a\nstream. Unlike Read, there is no limit on the\nsize of the returned result set. However, no individual row in\nthe result set can exceed 100 MiB, and no column value can exceed\n10 MiB.", - "response": { - "$ref": "PartialResultSet" - }, - "parameterOrder": [ - "session" - ], - "httpMethod": "POST", - "parameters": { - "session": { - "description": "Required. The session in which the read should be performed.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:streamingRead", - "path": "v1/{+session}:streamingRead", - "id": "spanner.projects.instances.databases.sessions.streamingRead" - }, - "rollback": { - "request": { - "$ref": "RollbackRequest" - }, - "description": "Rolls back a transaction, releasing any locks it holds. It is a good\nidea to call this for any transaction that includes one or more\nRead or ExecuteSql requests and\nultimately decides not to commit.\n\n`Rollback` returns `OK` if it successfully aborts the transaction, the\ntransaction was already aborted, or the transaction is not\nfound. `Rollback` never returns `ABORTED`.", - "httpMethod": "POST", - "parameterOrder": [ - "session" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "session": { - "location": "path", - "description": "Required. The session in which the transaction to roll back is running.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:rollback", - "id": "spanner.projects.instances.databases.sessions.rollback", - "path": "v1/{+session}:rollback" - }, - "create": { - "description": "Creates a new session. A session can be used to perform\ntransactions that read and/or modify data in a Cloud Spanner database.\nSessions are meant to be reused for many consecutive\ntransactions.\n\nSessions can only execute one transaction at a time. To execute\nmultiple concurrent read-write/write-only transactions, create\nmultiple sessions. Note that standalone reads and queries use a\ntransaction internally, and count toward the one transaction\nlimit.\n\nCloud Spanner limits the number of sessions that can exist at any given\ntime; thus, it is a good idea to delete idle and/or unneeded sessions.\nAside from explicit deletes, Cloud Spanner can delete sessions for which no\noperations are sent for more than an hour. If a session is deleted,\nrequests to it return `NOT_FOUND`.\n\nIdle sessions can be kept alive by sending a trivial SQL query\nperiodically, e.g., `\"SELECT 1\"`.", - "request": { - "$ref": "CreateSessionRequest" - }, - "response": { - "$ref": "Session" - }, - "parameterOrder": [ - "database" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "database": { - "location": "path", - "description": "Required. The database in which the new session is created.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", - "path": "v1/{+database}/sessions", - "id": "spanner.projects.instances.databases.sessions.create" - }, - "read": { - "response": { - "$ref": "ResultSet" - }, - "parameterOrder": [ - "session" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "session": { - "location": "path", - "description": "Required. The session in which the read should be performed.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:read", - "path": "v1/{+session}:read", - "id": "spanner.projects.instances.databases.sessions.read", - "description": "Reads rows from the database using key lookups and scans, as a\nsimple key/value style alternative to\nExecuteSql. This method cannot be used to\nreturn a result set larger than 10 MiB; if the read matches more\ndata than that, the read fails with a `FAILED_PRECONDITION`\nerror.\n\nReads inside read-write transactions might return `ABORTED`. If\nthis occurs, the application should restart the transaction from\nthe beginning. See Transaction for more details.\n\nLarger result sets can be yielded in streaming fashion by calling\nStreamingRead instead.", - "request": { - "$ref": "ReadRequest" - } - }, - "get": { - "description": "Gets a session. Returns `NOT_FOUND` if the session does not exist.\nThis is mainly useful for determining whether a session is still\nalive.", - "response": { - "$ref": "Session" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.data" - ], - "parameters": { - "name": { - "description": "Required. The name of the session to retrieve.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", - "path": "v1/{+name}", - "id": "spanner.projects.instances.databases.sessions.get" + "description": "Commits a transaction. The request includes the mutations to be\napplied to rows in the database.\n\n`Commit` might return an `ABORTED` error. This can occur at any time;\ncommonly, the cause is conflicts with concurrent\ntransactions. However, it can also happen for a variety of other\nreasons. If `Commit` returns `ABORTED`, the caller should re-attempt\nthe transaction from the beginning, re-using the same session." } } } } - } - } - }, - "instanceConfigs": { - "methods": { - "list": { - "description": "Lists the supported instance configurations for a given project.", - "response": { - "$ref": "ListInstanceConfigsResponse" - }, - "parameterOrder": [ - "parent" - ], - "httpMethod": "GET", - "parameters": { - "pageSize": { - "description": "Number of instance configurations to be returned in the response. If 0 or\nless, defaults to the server's maximum allowed page size.", - "format": "int32", - "type": "integer", - "location": "query" - }, - "parent": { - "description": "Required. The name of the project for which a list of supported instance\nconfigurations is requested. Values are of the form\n`projects/\u003cproject\u003e`.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+$", - "location": "path" - }, - "pageToken": { - "description": "If non-empty, `page_token` should contain a\nnext_page_token\nfrom a previous ListInstanceConfigsResponse.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instanceConfigs", - "path": "v1/{+parent}/instanceConfigs", - "id": "spanner.projects.instanceConfigs.list" }, - "get": { - "response": { - "$ref": "InstanceConfig" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "parameters": { - "name": { - "location": "path", - "description": "Required. The name of the requested instance configuration. Values are of\nthe form `projects/\u003cproject\u003e/instanceConfigs/\u003cconfig\u003e`.", - "required": true, - "type": "string", - "pattern": "^projects/[^/]+/instanceConfigs/[^/]+$" + "operations": { + "methods": { + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "description": "The name of the operation's parent resource.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/operations$", + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "pageSize": { + "location": "query", + "description": "The standard list page size.", + "format": "int32", + "type": "integer" + }, + "filter": { + "type": "string", + "location": "query", + "description": "The standard list filter." + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations", + "path": "v1/{+name}", + "id": "spanner.projects.instances.operations.list" + }, + "get": { + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "name": { + "description": "The name of the operation resource.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", + "path": "v1/{+name}", + "id": "spanner.projects.instances.operations.get", + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice." + }, + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}:cancel", + "path": "v1/{+name}:cancel", + "id": "spanner.projects.instances.operations.cancel" + }, + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "required": true, + "type": "string", + "pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$" + } + }, + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", + "path": "v1/{+name}", + "id": "spanner.projects.instances.operations.delete", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/spanner.admin" - ], - "flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", - "path": "v1/{+name}", - "id": "spanner.projects.instanceConfigs.get", - "description": "Gets information about a particular instance configuration." + } } } } @@ -2376,9 +2387,9 @@ }, "parameters": { "upload_protocol": { + "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" + "type": "string" }, "prettyPrint": { "location": "query", @@ -2386,17 +2397,24 @@ "type": "boolean", "default": "true" }, - "uploadType": { + "fields": { "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -2405,16 +2423,11 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + ] }, "alt": { + "description": "Data format for response.", + "default": "json", "enum": [ "json", "media", @@ -2426,9 +2439,7 @@ "Media download with context-dependent Content-Type", "Responses with Content-Type of application/x-protobuf" ], - "location": "query", - "description": "Data format for response.", - "default": "json" + "location": "query" }, "key": { "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", @@ -2436,9 +2447,9 @@ "location": "query" }, "access_token": { + "location": "query", "description": "OAuth access token.", - "type": "string", - "location": "query" + "type": "string" }, "quotaUser": { "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", @@ -2446,31 +2457,20 @@ "location": "query" }, "pp": { - "location": "query", "description": "Pretty-print response.", "type": "boolean", - "default": "true" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" + "default": "true", + "location": "query" }, "bearer_token": { "location": "query", "description": "OAuth bearer token.", "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "type": "string", + "location": "query" } - }, - "version": "v1", - "baseUrl": "https://spanner.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.", - "servicePath": "", - "basePath": "", - "revision": "20170914", - "documentationLink": "https://cloud.google.com/spanner/", - "id": "spanner:v1", - "discoveryVersion": "v1", - "version_module": true + } } diff --git a/vendor/google.golang.org/api/speech/v1/speech-api.json b/vendor/google.golang.org/api/speech/v1/speech-api.json index bd4f24f8e..f0c13198b 100644 --- a/vendor/google.golang.org/api/speech/v1/speech-api.json +++ b/vendor/google.golang.org/api/speech/v1/speech-api.json @@ -1,271 +1,228 @@ { - "rootUrl": "https://speech.googleapis.com/", - "ownerDomain": "google.com", - "name": "speech", - "batchPath": "batch", - "title": "Google Cloud Speech API", - "ownerName": "Google", - "resources": { - "speech": { - "methods": { - "longrunningrecognize": { - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1/speech:longrunningrecognize", - "id": "speech.speech.longrunningrecognize", - "path": "v1/speech:longrunningrecognize", - "request": { - "$ref": "LongRunningRecognizeRequest" - }, - "description": "Performs asynchronous speech recognition: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains\na `LongRunningRecognizeResponse` message." - }, - "recognize": { - "id": "speech.speech.recognize", - "path": "v1/speech:recognize", - "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", - "request": { - "$ref": "RecognizeRequest" - }, - "response": { - "$ref": "RecognizeResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/speech:recognize" - } - } - }, - "operations": { - "methods": { - "cancel": { - "path": "v1/operations/{+name}:cancel", - "id": "speech.operations.cancel", - "request": { - "$ref": "CancelOperationRequest" - }, - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "httpMethod": "POST", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^[^/]+$", - "location": "path", - "description": "The name of the operation resource to be cancelled.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/operations/{operationsId}:cancel" - }, - "delete": { - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", - "parameterOrder": [ - "name" - ], - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "pattern": "^[^/]+$", - "location": "path", - "description": "The name of the operation resource to be deleted.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/operations/{operationsId}", - "id": "speech.operations.delete", - "path": "v1/operations/{+name}" - }, - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - } - }, - "flatPath": "v1/operations/{operationsId}", - "id": "speech.operations.get", - "path": "v1/operations/{+name}" - }, - "list": { - "parameterOrder": [], - "httpMethod": "GET", - "response": { - "$ref": "ListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "pageToken": { - "location": "query", - "description": "The standard list page token.", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "type": "string", - "location": "query" - }, - "pageSize": { - "format": "int32", - "description": "The standard list page size.", - "type": "integer", - "location": "query" - }, - "filter": { - "description": "The standard list filter.", - "type": "string", - "location": "query" - } - }, - "flatPath": "v1/operations", - "id": "speech.operations.list", - "path": "v1/operations", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - } - }, - "version": "v1", "baseUrl": "https://speech.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Converts audio to text by applying powerful neural network models.", "servicePath": "", + "description": "Converts audio to text by applying powerful neural network models.", + "kind": "discovery#restDescription", "basePath": "", - "revision": "20170918", "documentationLink": "https://cloud.google.com/speech/", + "revision": "20170925", "id": "speech:v1", "discoveryVersion": "v1", "version_module": true, "schemas": { + "LongRunningRecognizeRequest": { + "description": "The top-level message sent by the client for the `LongRunningRecognize`\nmethod.", + "type": "object", + "properties": { + "audio": { + "description": "*Required* The audio data to be recognized.", + "$ref": "RecognitionAudio" + }, + "config": { + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request.", + "$ref": "RecognitionConfig" + } + }, + "id": "LongRunningRecognizeRequest" + }, + "RecognizeResponse": { + "description": "The only message returned to the client by the `Recognize` method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.", + "type": "object", + "properties": { + "results": { + "description": "*Output-only* Sequential list of transcription results corresponding to\nsequential portions of audio.", + "items": { + "$ref": "SpeechRecognitionResult" + }, + "type": "array" + } + }, + "id": "RecognizeResponse" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "type": "object", + "properties": {}, + "id": "CancelOperationRequest" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "Operation" + }, + "RecognitionConfig": { + "description": "Provides information to the recognizer that specifies how to process the\nrequest.", + "type": "object", + "properties": { + "sampleRateHertz": { + "format": "int32", + "description": "*Required* Sample rate in Hertz of the audio data sent in all\n`RecognitionAudio` messages. Valid values are: 8000-48000.\n16000 is optimal. For best results, set the sampling rate of the audio\nsource to 16000 Hz. If that's not possible, use the native sample rate of\nthe audio source (instead of re-sampling).", + "type": "integer" + }, + "enableWordTimeOffsets": { + "description": "*Optional* If `true`, the top result includes a list of words and\nthe start and end time offsets (timestamps) for those words. If\n`false`, no word-level time offset information is returned. The default is\n`false`.", + "type": "boolean" + }, + "maxAlternatives": { + "format": "int32", + "description": "*Optional* Maximum number of recognition hypotheses to be returned.\nSpecifically, the maximum number of `SpeechRecognitionAlternative` messages\nwithin each `SpeechRecognitionResult`.\nThe server may return fewer than `max_alternatives`.\nValid values are `0`-`30`. A value of `0` or `1` will return a maximum of\none. If omitted, will return a maximum of one.", + "type": "integer" + }, + "languageCode": { + "description": "*Required* The language of the supplied audio as a\n[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.\nExample: \"en-US\".\nSee [Language Support](https://cloud.google.com/speech/docs/languages)\nfor a list of the currently supported language codes.", + "type": "string" + }, + "encoding": { + "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.", + "type": "string", + "enumDescriptions": [ + "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", + "Uncompressed 16-bit signed little-endian samples (Linear PCM).", + "[`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio\nCodec) is the recommended encoding because it is\nlossless--therefore recognition is not compromised--and\nrequires only about half the bandwidth of `LINEAR16`. `FLAC` stream\nencoding supports 16-bit and 24-bit samples, however, not all fields in\n`STREAMINFO` are supported.", + "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", + "Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.", + "Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.", + "Opus encoded audio frames in Ogg container\n([OggOpus](https://wiki.xiph.org/OggOpus)).\n`sample_rate_hertz` must be 16000.", + "Although the use of lossy encodings is not recommended, if a very low\nbitrate encoding is required, `OGG_OPUS` is highly preferred over\nSpeex encoding. The [Speex](https://speex.org/) encoding supported by\nCloud Speech API has a header byte in each block, as in MIME type\n`audio/x-speex-with-header-byte`.\nIt is a variant of the RTP Speex encoding defined in\n[RFC 5574](https://tools.ietf.org/html/rfc5574).\nThe stream is a sequence of blocks, one block per RTP packet. Each block\nstarts with a byte containing the length of the block, in bytes, followed\nby one or more frames of Speex data, padded to an integral number of\nbytes (octets) as specified in RFC 5574. In other words, each RTP header\nis replaced with a single byte containing the block length. Only Speex\nwideband is supported. `sample_rate_hertz` must be 16000." + ], + "enum": [ + "ENCODING_UNSPECIFIED", + "LINEAR16", + "FLAC", + "MULAW", + "AMR", + "AMR_WB", + "OGG_OPUS", + "SPEEX_WITH_HEADER_BYTE" + ] + }, + "profanityFilter": { + "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", + "type": "boolean" + }, + "speechContexts": { + "description": "*Optional* A means to provide context to assist the speech recognition.", + "items": { + "$ref": "SpeechContext" + }, + "type": "array" + } + }, + "id": "RecognitionConfig" + }, + "WordInfo": { + "description": "Word-specific information for recognized words. Word information is only\nincluded in the response when certain request parameters are set, such\nas `enable_word_time_offsets`.", + "type": "object", + "properties": { + "endTime": { + "format": "google-duration", + "description": "*Output-only* Time offset relative to the beginning of the audio,\nand corresponding to the end of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.", + "type": "string" + }, + "startTime": { + "format": "google-duration", + "description": "*Output-only* Time offset relative to the beginning of the audio,\nand corresponding to the start of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.", + "type": "string" + }, + "word": { + "description": "*Output-only* The word corresponding to this set of information.", + "type": "string" + } + }, + "id": "WordInfo" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "id": "Status" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "RecognizeRequest": { + "description": "The top-level message sent by the client for the `Recognize` method.", + "type": "object", + "properties": { + "audio": { + "$ref": "RecognitionAudio", + "description": "*Required* The audio data to be recognized." + }, + "config": { + "$ref": "RecognitionConfig", + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." + } + }, + "id": "RecognizeRequest" + }, + "SpeechContext": { + "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results.", + "type": "object", + "properties": { + "phrases": { + "description": "*Optional* A list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech/limits#content).", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "SpeechContext" + }, "SpeechRecognitionAlternative": { "description": "Alternative hypotheses (a.k.a. n-best list).", "type": "object", @@ -307,20 +264,6 @@ }, "id": "ListOperationsResponse" }, - "SpeechContext": { - "properties": { - "phrases": { - "description": "*Optional* A list of strings containing words and phrases \"hints\" so that\nthe speech recognition is more likely to recognize them. This can be used\nto improve the accuracy for specific words and phrases, for example, if\nspecific commands are typically spoken by the user. This can also be used\nto add additional words to the vocabulary of the recognizer. See\n[usage limits](https://cloud.google.com/speech/limits#content).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "SpeechContext", - "description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases\nin the results.", - "type": "object" - }, "SpeechRecognitionResult": { "description": "A speech recognition result corresponding to a portion of the audio.", "type": "object", @@ -339,221 +282,22 @@ "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).", "type": "object", "properties": { - "uri": { - "description": "URI that points to a file that contains audio data bytes as specified in\n`RecognitionConfig`. Currently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).", - "type": "string" - }, "content": { "format": "byte", "description": "The audio data bytes encoded as specified in\n`RecognitionConfig`. Note: as with all bytes fields, protobuffers use a\npure binary representation, whereas JSON representations use base64.", "type": "string" + }, + "uri": { + "description": "URI that points to a file that contains audio data bytes as specified in\n`RecognitionConfig`. Currently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).", + "type": "string" } }, "id": "RecognitionAudio" - }, - "LongRunningRecognizeRequest": { - "description": "The top-level message sent by the client for the `LongRunningRecognize`\nmethod.", - "type": "object", - "properties": { - "audio": { - "description": "*Required* The audio data to be recognized.", - "$ref": "RecognitionAudio" - }, - "config": { - "$ref": "RecognitionConfig", - "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." - } - }, - "id": "LongRunningRecognizeRequest" - }, - "RecognizeResponse": { - "properties": { - "results": { - "description": "*Output-only* Sequential list of transcription results corresponding to\nsequential portions of audio.", - "items": { - "$ref": "SpeechRecognitionResult" - }, - "type": "array" - } - }, - "id": "RecognizeResponse", - "description": "The only message returned to the client by the `Recognize` method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.", - "type": "object" - }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "type": "object", - "properties": {}, - "id": "CancelOperationRequest" - }, - "Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - }, - "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." - }, - "metadata": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object" - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - } - }, - "id": "Operation" - }, - "RecognitionConfig": { - "properties": { - "maxAlternatives": { - "format": "int32", - "description": "*Optional* Maximum number of recognition hypotheses to be returned.\nSpecifically, the maximum number of `SpeechRecognitionAlternative` messages\nwithin each `SpeechRecognitionResult`.\nThe server may return fewer than `max_alternatives`.\nValid values are `0`-`30`. A value of `0` or `1` will return a maximum of\none. If omitted, will return a maximum of one.", - "type": "integer" - }, - "languageCode": { - "description": "*Required* The language of the supplied audio as a\n[BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.\nExample: \"en-US\".\nSee [Language Support](https://cloud.google.com/speech/docs/languages)\nfor a list of the currently supported language codes.", - "type": "string" - }, - "profanityFilter": { - "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", - "type": "boolean" - }, - "speechContexts": { - "description": "*Optional* A means to provide context to assist the speech recognition.", - "items": { - "$ref": "SpeechContext" - }, - "type": "array" - }, - "encoding": { - "enum": [ - "ENCODING_UNSPECIFIED", - "LINEAR16", - "FLAC", - "MULAW", - "AMR", - "AMR_WB", - "OGG_OPUS", - "SPEEX_WITH_HEADER_BYTE" - ], - "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.", - "type": "string", - "enumDescriptions": [ - "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", - "Uncompressed 16-bit signed little-endian samples (Linear PCM).", - "[`FLAC`](https://xiph.org/flac/documentation.html) (Free Lossless Audio\nCodec) is the recommended encoding because it is\nlossless--therefore recognition is not compromised--and\nrequires only about half the bandwidth of `LINEAR16`. `FLAC` stream\nencoding supports 16-bit and 24-bit samples, however, not all fields in\n`STREAMINFO` are supported.", - "8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", - "Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.", - "Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.", - "Opus encoded audio frames in Ogg container\n([OggOpus](https://wiki.xiph.org/OggOpus)).\n`sample_rate_hertz` must be 16000.", - "Although the use of lossy encodings is not recommended, if a very low\nbitrate encoding is required, `OGG_OPUS` is highly preferred over\nSpeex encoding. The [Speex](https://speex.org/) encoding supported by\nCloud Speech API has a header byte in each block, as in MIME type\n`audio/x-speex-with-header-byte`.\nIt is a variant of the RTP Speex encoding defined in\n[RFC 5574](https://tools.ietf.org/html/rfc5574).\nThe stream is a sequence of blocks, one block per RTP packet. Each block\nstarts with a byte containing the length of the block, in bytes, followed\nby one or more frames of Speex data, padded to an integral number of\nbytes (octets) as specified in RFC 5574. In other words, each RTP header\nis replaced with a single byte containing the block length. Only Speex\nwideband is supported. `sample_rate_hertz` must be 16000." - ] - }, - "sampleRateHertz": { - "format": "int32", - "description": "*Required* Sample rate in Hertz of the audio data sent in all\n`RecognitionAudio` messages. Valid values are: 8000-48000.\n16000 is optimal. For best results, set the sampling rate of the audio\nsource to 16000 Hz. If that's not possible, use the native sample rate of\nthe audio source (instead of re-sampling).", - "type": "integer" - }, - "enableWordTimeOffsets": { - "description": "*Optional* If `true`, the top result includes a list of words and\nthe start and end time offsets (timestamps) for those words. If\n`false`, no word-level time offset information is returned. The default is\n`false`.", - "type": "boolean" - } - }, - "id": "RecognitionConfig", - "description": "Provides information to the recognizer that specifies how to process the\nrequest.", - "type": "object" - }, - "WordInfo": { - "description": "Word-specific information for recognized words. Word information is only\nincluded in the response when certain request parameters are set, such\nas `enable_word_time_offsets`.", - "type": "object", - "properties": { - "endTime": { - "format": "google-duration", - "description": "*Output-only* Time offset relative to the beginning of the audio,\nand corresponding to the end of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.", - "type": "string" - }, - "startTime": { - "format": "google-duration", - "description": "*Output-only* Time offset relative to the beginning of the audio,\nand corresponding to the start of the spoken word.\nThis field is only set if `enable_word_time_offsets=true` and only\nin the top hypothesis.\nThis is an experimental feature and the accuracy of the time offset can\nvary.", - "type": "string" - }, - "word": { - "description": "*Output-only* The word corresponding to this set of information.", - "type": "string" - } - }, - "id": "WordInfo" - }, - "Status": { - "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - }, - "type": "array" - }, - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - } - }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "RecognizeRequest": { - "properties": { - "audio": { - "$ref": "RecognitionAudio", - "description": "*Required* The audio data to be recognized." - }, - "config": { - "$ref": "RecognitionConfig", - "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." - } - }, - "id": "RecognizeRequest", - "description": "The top-level message sent by the client for the `Recognize` method.", - "type": "object" } }, "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, "protocol": "rest", "canonicalName": "Speech", @@ -565,5 +309,261 @@ } } } - } + }, + "rootUrl": "https://speech.googleapis.com/", + "ownerDomain": "google.com", + "name": "speech", + "batchPath": "batch", + "title": "Google Cloud Speech API", + "ownerName": "Google", + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "response": { + "$ref": "Operation" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/operations/{operationsId}", + "id": "speech.operations.get", + "path": "v1/operations/{+name}" + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The standard list page size.", + "type": "integer" + }, + "filter": { + "location": "query", + "description": "The standard list filter.", + "type": "string" + }, + "pageToken": { + "location": "query", + "description": "The standard list page token.", + "type": "string" + }, + "name": { + "location": "query", + "description": "The name of the operation's parent resource.", + "type": "string" + } + }, + "flatPath": "v1/operations", + "path": "v1/operations", + "id": "speech.operations.list" + }, + "cancel": { + "request": { + "$ref": "CancelOperationRequest" + }, + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^[^/]+$", + "location": "path" + } + }, + "flatPath": "v1/operations/{operationsId}:cancel", + "id": "speech.operations.cancel", + "path": "v1/operations/{+name}:cancel" + }, + "delete": { + "flatPath": "v1/operations/{operationsId}", + "path": "v1/operations/{+name}", + "id": "speech.operations.delete", + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", + "httpMethod": "DELETE", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true, + "pattern": "^[^/]+$" + } + } + } + } + }, + "speech": { + "methods": { + "longrunningrecognize": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1/speech:longrunningrecognize", + "path": "v1/speech:longrunningrecognize", + "id": "speech.speech.longrunningrecognize", + "request": { + "$ref": "LongRunningRecognizeRequest" + }, + "description": "Performs asynchronous speech recognition: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains\na `LongRunningRecognizeResponse` message." + }, + "recognize": { + "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", + "request": { + "$ref": "RecognizeRequest" + }, + "response": { + "$ref": "RecognizeResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/speech:recognize", + "id": "speech.speech.recognize", + "path": "v1/speech:recognize" + } + } + } + }, + "parameters": { + "pp": { + "location": "query", + "description": "Pretty-print response.", + "default": "true", + "type": "boolean" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + } + }, + "version": "v1" } diff --git a/vendor/google.golang.org/api/speech/v1beta1/speech-api.json b/vendor/google.golang.org/api/speech/v1beta1/speech-api.json index d8abc2f15..2c1cdc7f2 100644 --- a/vendor/google.golang.org/api/speech/v1beta1/speech-api.json +++ b/vendor/google.golang.org/api/speech/v1beta1/speech-api.json @@ -1,59 +1,29 @@ { - "discoveryVersion": "v1", "version_module": true, "schemas": { - "RecognitionAudio": { - "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).", - "type": "object", - "properties": { - "uri": { - "description": "URI that points to a file that contains audio data bytes as specified in\n`RecognitionConfig`. Currently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).", - "type": "string" - }, - "content": { - "format": "byte", - "description": "The audio data bytes encoded as specified in\n`RecognitionConfig`. Note: as with all bytes fields, protobuffers use a\npure binary representation, whereas JSON representations use base64.", - "type": "string" - } - }, - "id": "RecognitionAudio" - }, - "AsyncRecognizeRequest": { - "description": "The top-level message sent by the client for the `AsyncRecognize` method.", - "type": "object", - "properties": { - "audio": { - "description": "*Required* The audio data to be recognized.", - "$ref": "RecognitionAudio" - }, - "config": { - "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request.", - "$ref": "RecognitionConfig" - } - }, - "id": "AsyncRecognizeRequest" - }, "Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", "properties": { "done": { "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" }, "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" + } }, "name": { "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", "type": "string" }, "error": { - "$ref": "Status", - "description": "The error result of the operation in case of failure or cancellation." + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "Status" }, "metadata": { "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", @@ -64,9 +34,7 @@ } } }, - "id": "Operation", - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object" + "id": "Operation" }, "RecognitionConfig": { "description": "Provides information to the recognizer that specifies how to process the\nrequest.", @@ -86,7 +54,17 @@ "description": "*Optional* The language of the supplied audio as a BCP-47 language tag.\nExample: \"en-GB\" https://www.rfc-editor.org/rfc/bcp/bcp47.txt\nIf omitted, defaults to \"en-US\". See\n[Language Support](https://cloud.google.com/speech/docs/languages)\nfor a list of the currently supported language codes.", "type": "string" }, + "profanityFilter": { + "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", + "type": "boolean" + }, + "speechContext": { + "description": "*Optional* A means to provide context to assist the speech recognition.", + "$ref": "SpeechContext" + }, "encoding": { + "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.", + "type": "string", "enumDescriptions": [ "Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", "Uncompressed 16-bit signed little-endian samples (Linear PCM).\nThis is the only encoding that may be used by `AsyncRecognize`.", @@ -102,50 +80,38 @@ "MULAW", "AMR", "AMR_WB" - ], - "description": "*Required* Encoding of audio data sent in all `RecognitionAudio` messages.", - "type": "string" - }, - "profanityFilter": { - "description": "*Optional* If set to `true`, the server will attempt to filter out\nprofanities, replacing all but the initial character in each filtered word\nwith asterisks, e.g. \"f***\". If set to `false` or omitted, profanities\nwon't be filtered out.", - "type": "boolean" - }, - "speechContext": { - "$ref": "SpeechContext", - "description": "*Optional* A means to provide context to assist the speech recognition." + ] } }, "id": "RecognitionConfig" }, "SyncRecognizeRequest": { + "description": "The top-level message sent by the client for the `SyncRecognize` method.", + "type": "object", "properties": { "audio": { - "description": "*Required* The audio data to be recognized.", - "$ref": "RecognitionAudio" + "$ref": "RecognitionAudio", + "description": "*Required* The audio data to be recognized." }, "config": { - "$ref": "RecognitionConfig", - "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request.", + "$ref": "RecognitionConfig" } }, - "id": "SyncRecognizeRequest", - "description": "The top-level message sent by the client for the `SyncRecognize` method.", - "type": "object" + "id": "SyncRecognizeRequest" }, "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", "properties": { - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" - }, "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, "type": "array" }, @@ -153,11 +119,13 @@ "format": "int32", "description": "The status code, which should be an enum value of google.rpc.Code.", "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" } }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", - "type": "object" + "id": "Status" }, "SyncRecognizeResponse": { "description": "The only message returned to the client by `SyncRecognize`. method. It\ncontains the result as zero or more sequential `SpeechRecognitionResult`\nmessages.", @@ -174,25 +142,25 @@ "id": "SyncRecognizeResponse" }, "Empty": { - "properties": {}, - "id": "Empty", "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" + "type": "object", + "properties": {}, + "id": "Empty" }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, "operations": { "description": "A list of operations that matches the specified filter in the request.", "items": { "$ref": "Operation" }, "type": "array" - }, - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" } }, "id": "ListOperationsResponse" @@ -212,6 +180,8 @@ "id": "SpeechContext" }, "SpeechRecognitionAlternative": { + "description": "Alternative hypotheses (a.k.a. n-best list).", + "type": "object", "properties": { "confidence": { "format": "float", @@ -223,11 +193,11 @@ "type": "string" } }, - "id": "SpeechRecognitionAlternative", - "description": "Alternative hypotheses (a.k.a. n-best list).", - "type": "object" + "id": "SpeechRecognitionAlternative" }, "SpeechRecognitionResult": { + "description": "A speech recognition result corresponding to a portion of the audio.", + "type": "object", "properties": { "alternatives": { "description": "*Output-only* May contain one or more recognition hypotheses (up to the\nmaximum specified in `max_alternatives`).", @@ -237,9 +207,38 @@ "type": "array" } }, - "id": "SpeechRecognitionResult", - "description": "A speech recognition result corresponding to a portion of the audio.", - "type": "object" + "id": "SpeechRecognitionResult" + }, + "RecognitionAudio": { + "description": "Contains audio data in the encoding specified in the `RecognitionConfig`.\nEither `content` or `uri` must be supplied. Supplying both or neither\nreturns google.rpc.Code.INVALID_ARGUMENT. See\n[audio limits](https://cloud.google.com/speech/limits#content).", + "type": "object", + "properties": { + "content": { + "format": "byte", + "description": "The audio data bytes encoded as specified in\n`RecognitionConfig`. Note: as with all bytes fields, protobuffers use a\npure binary representation, whereas JSON representations use base64.", + "type": "string" + }, + "uri": { + "description": "URI that points to a file that contains audio data bytes as specified in\n`RecognitionConfig`. Currently, only Google Cloud Storage URIs are\nsupported, which must be specified in the following format:\n`gs://bucket_name/object_name` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](https://cloud.google.com/storage/docs/reference-uris).", + "type": "string" + } + }, + "id": "RecognitionAudio" + }, + "AsyncRecognizeRequest": { + "description": "The top-level message sent by the client for the `AsyncRecognize` method.", + "type": "object", + "properties": { + "audio": { + "description": "*Required* The audio data to be recognized.", + "$ref": "RecognitionAudio" + }, + "config": { + "$ref": "RecognitionConfig", + "description": "*Required* Provides information to the recognizer that specifies how to\nprocess the request." + } + }, + "id": "AsyncRecognizeRequest" } }, "icons": { @@ -264,57 +263,19 @@ "title": "Google Cloud Speech API", "ownerName": "Google", "resources": { - "speech": { - "methods": { - "asyncrecognize": { - "flatPath": "v1beta1/speech:asyncrecognize", - "id": "speech.speech.asyncrecognize", - "path": "v1beta1/speech:asyncrecognize", - "description": "Performs asynchronous speech recognition: receive results via the\n[google.longrunning.Operations]\n(/speech/reference/rest/v1beta1/operations#Operation)\ninterface. Returns either an\n`Operation.error` or an `Operation.response` which contains\nan `AsyncRecognizeResponse` message.", - "request": { - "$ref": "AsyncRecognizeRequest" - }, - "response": { - "$ref": "Operation" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "syncrecognize": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "SyncRecognizeResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "flatPath": "v1beta1/speech:syncrecognize", - "path": "v1beta1/speech:syncrecognize", - "id": "speech.speech.syncrecognize", - "request": { - "$ref": "SyncRecognizeRequest" - }, - "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed." - } - } - }, "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", - "httpMethod": "POST", "response": { "$ref": "Empty" }, "parameterOrder": [ "name" ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "name": { "description": "The name of the operation resource to be cancelled.", @@ -324,14 +285,13 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1beta1/operations/{operationsId}:cancel", + "id": "speech.operations.cancel", "path": "v1beta1/operations/{+name}:cancel", - "id": "speech.operations.cancel" + "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`." }, "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", "response": { "$ref": "Empty" }, @@ -339,9 +299,6 @@ "name" ], "httpMethod": "DELETE", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "parameters": { "name": { "description": "The name of the operation resource to be deleted.", @@ -351,12 +308,17 @@ "location": "path" } }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "flatPath": "v1beta1/operations/{operationsId}", "id": "speech.operations.delete", - "path": "v1beta1/operations/{+name}", - "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`." + "path": "v1beta1/operations/{+name}" }, "get": { + "flatPath": "v1beta1/operations/{operationsId}", + "id": "speech.operations.get", + "path": "v1beta1/operations/{+name}", "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", "response": { "$ref": "Operation" @@ -365,28 +327,26 @@ "name" ], "httpMethod": "GET", - "parameters": { - "name": { - "description": "The name of the operation resource.", - "type": "string", - "required": true, - "pattern": "^[^/]+$", - "location": "path" - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1beta1/operations/{operationsId}", - "id": "speech.operations.get", - "path": "v1beta1/operations/{+name}" + "parameters": { + "name": { + "location": "path", + "description": "The name of the operation resource.", + "type": "string", + "required": true, + "pattern": "^[^/]+$" + } + } }, "list": { + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "httpMethod": "GET", + "parameterOrder": [], "response": { "$ref": "ListOperationsResponse" }, - "parameterOrder": [], - "httpMethod": "GET", "parameters": { "pageSize": { "location": "query", @@ -395,9 +355,9 @@ "type": "integer" }, "filter": { - "location": "query", "description": "The standard list filter.", - "type": "string" + "type": "string", + "location": "query" }, "pageToken": { "description": "The standard list page token.", @@ -405,52 +365,96 @@ "location": "query" }, "name": { + "location": "query", "description": "The name of the operation's parent resource.", - "type": "string", - "location": "query" + "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "flatPath": "v1beta1/operations", - "id": "speech.operations.list", "path": "v1beta1/operations", - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id." + "id": "speech.operations.list" + } + } + }, + "speech": { + "methods": { + "asyncrecognize": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {}, + "flatPath": "v1beta1/speech:asyncrecognize", + "path": "v1beta1/speech:asyncrecognize", + "id": "speech.speech.asyncrecognize", + "request": { + "$ref": "AsyncRecognizeRequest" + }, + "description": "Performs asynchronous speech recognition: receive results via the\n[google.longrunning.Operations]\n(/speech/reference/rest/v1beta1/operations#Operation)\ninterface. Returns either an\n`Operation.error` or an `Operation.response` which contains\nan `AsyncRecognizeResponse` message." + }, + "syncrecognize": { + "description": "Performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", + "request": { + "$ref": "SyncRecognizeRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "SyncRecognizeResponse" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1beta1/speech:syncrecognize", + "path": "v1beta1/speech:syncrecognize", + "id": "speech.speech.syncrecognize" } } } }, "parameters": { - "uploadType": { + "fields": { "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string", "location": "query" }, - "callback": { - "location": "query", - "description": "JSONP", - "type": "string" - }, "$.xgafv": { - "enum": [ - "1", - "2" - ], "description": "V1 error format.", "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "description": "JSONP", + "type": "string", "location": "query" }, "alt": { + "enum": [ + "json", + "media", + "proto" + ], "type": "string", "enumDescriptions": [ "Responses with Content-Type of application/json", @@ -459,27 +463,22 @@ ], "location": "query", "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ] - }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" + "default": "json" }, "key": { - "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" + "type": "string", + "location": "query" + }, + "access_token": { + "description": "OAuth access token.", + "type": "string", + "location": "query" }, "quotaUser": { - "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "location": "query", @@ -487,21 +486,21 @@ "default": "true", "type": "boolean" }, + "bearer_token": { + "location": "query", + "description": "OAuth bearer token.", + "type": "string" + }, "oauth_token": { "description": "OAuth 2.0 token for the current user.", "type": "string", "location": "query" }, - "bearer_token": { - "description": "OAuth bearer token.", + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", "default": "true", @@ -511,11 +510,12 @@ }, "version": "v1beta1", "baseUrl": "https://speech.googleapis.com/", - "servicePath": "", - "description": "Converts audio to text by applying powerful neural network models.", "kind": "discovery#restDescription", + "description": "Converts audio to text by applying powerful neural network models.", + "servicePath": "", "basePath": "", "id": "speech:v1beta1", + "revision": "20170925", "documentationLink": "https://cloud.google.com/speech/", - "revision": "20170918" + "discoveryVersion": "v1" } diff --git a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json index 223b69d27..f2c8065ec 100644 --- a/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json +++ b/vendor/google.golang.org/api/storagetransfer/v1/storagetransfer-api.json @@ -1,103 +1,41 @@ { - "version": "v1", - "baseUrl": "https://storagetransfer.googleapis.com/", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", - "kind": "discovery#restDescription", - "servicePath": "", - "rootUrl": "https://storagetransfer.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "storagetransfer", - "batchPath": "batch", - "id": "storagetransfer:v1", - "documentationLink": "https://cloud.google.com/storage/transfer", - "revision": "20170918", - "title": "Google Storage Transfer API", - "discoveryVersion": "v1", "ownerName": "Google", + "discoveryVersion": "v1", "version_module": true, "resources": { "googleServiceAccounts": { "methods": { "get": { "description": "Returns the Google service account that is used by Storage Transfer\nService to access buckets in the project where transfers\nrun or in other projects. Each Google service account is associated\nwith one Google Cloud Platform Console project. Users\nshould add this service account to the Google Cloud Storage bucket\nACLs to grant access to Storage Transfer Service. This service\naccount is created and owned by Storage Transfer Service and can\nonly be used by Storage Transfer Service.", - "response": { - "$ref": "GoogleServiceAccount" - }, + "httpMethod": "GET", "parameterOrder": [ "projectId" ], - "httpMethod": "GET", - "parameters": { - "projectId": { - "location": "path", - "description": "The ID of the Google Cloud Platform Console project that the Google service\naccount is associated with.\nRequired.", - "type": "string", - "required": true - } + "response": { + "$ref": "GoogleServiceAccount" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], + "parameters": { + "projectId": { + "description": "The ID of the Google Cloud Platform Console project that the Google service\naccount is associated with.\nRequired.", + "type": "string", + "required": true, + "location": "path" + } + }, "flatPath": "v1/googleServiceAccounts/{projectId}", - "id": "storagetransfer.googleServiceAccounts.get", - "path": "v1/googleServiceAccounts/{projectId}" + "path": "v1/googleServiceAccounts/{projectId}", + "id": "storagetransfer.googleServiceAccounts.get" } } }, "transferOperations": { "methods": { - "list": { - "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", - "httpMethod": "GET", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "ListOperationsResponse" - }, - "parameters": { - "pageToken": { - "description": "The list page token.", - "type": "string", - "location": "query" - }, - "name": { - "description": "The value `transferOperations`.", - "type": "string", - "required": true, - "pattern": "^transferOperations$", - "location": "path" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The list page size. The max allowed value is 256.", - "type": "integer" - }, - "filter": { - "type": "string", - "location": "query", - "description": "A list of query parameters specified as JSON text in the form of {\\\"project_id\\\" : \\\"my_project_id\\\", \\\"job_names\\\" : [\\\"jobid1\\\", \\\"jobid2\\\",...], \\\"operation_names\\\" : [\\\"opid1\\\", \\\"opid2\\\",...], \\\"transfer_statuses\\\":[\\\"status1\\\", \\\"status2\\\",...]}. Since `job_names`, `operation_names`, and `transfer_statuses` support multiple values, they must be specified with array notation. `job_names`, `operation_names`, and `transfer_statuses` are optional." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/transferOperations", - "path": "v1/{+name}", - "id": "storagetransfer.transferOperations.list" - }, "resume": { + "path": "v1/{+name}:resume", + "id": "storagetransfer.transferOperations.resume", "description": "Resumes a transfer operation that is paused.", "request": { "$ref": "ResumeTransferOperationRequest" @@ -121,44 +59,37 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/transferOperations/{transferOperationsId}:resume", - "path": "v1/{+name}:resume", - "id": "storagetransfer.transferOperations.resume" + "flatPath": "v1/transferOperations/{transferOperationsId}:resume" }, "cancel": { + "path": "v1/{+name}:cancel", + "id": "storagetransfer.transferOperations.cancel", + "description": "Cancels a transfer. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation.", + "httpMethod": "POST", "response": { "$ref": "Empty" }, "parameterOrder": [ "name" ], - "httpMethod": "POST", - "parameters": { - "name": { - "type": "string", - "required": true, - "pattern": "^transferOperations/.+$", - "location": "path", - "description": "The name of the operation resource to be cancelled." - } - }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/transferOperations/{transferOperationsId}:cancel", - "id": "storagetransfer.transferOperations.cancel", - "path": "v1/{+name}:cancel", - "description": "Cancels a transfer. Use the get method to check whether the cancellation succeeded or whether the operation completed despite cancellation." + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "type": "string", + "required": true, + "pattern": "^transferOperations/.+$", + "location": "path" + } + }, + "flatPath": "v1/transferOperations/{transferOperationsId}:cancel" }, "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", - "response": { - "$ref": "Operation" - }, - "parameterOrder": [ - "name" + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" ], - "httpMethod": "GET", "parameters": { "name": { "description": "The name of the operation resource.", @@ -168,20 +99,19 @@ "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], "flatPath": "v1/transferOperations/{transferOperationsId}", + "path": "v1/{+name}", "id": "storagetransfer.transferOperations.get", - "path": "v1/{+name}" + "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", + "httpMethod": "GET", + "parameterOrder": [ + "name" + ], + "response": { + "$ref": "Operation" + } }, "pause": { - "path": "v1/{+name}:pause", - "id": "storagetransfer.transferOperations.pause", - "request": { - "$ref": "PauseTransferOperationRequest" - }, - "description": "Pauses a transfer operation.", "httpMethod": "POST", "parameterOrder": [ "name" @@ -194,113 +124,172 @@ ], "parameters": { "name": { - "pattern": "^transferOperations/.+$", - "location": "path", "description": "The name of the transfer operation.\nRequired.", "type": "string", - "required": true - } - }, - "flatPath": "v1/transferOperations/{transferOperationsId}:pause" - }, - "delete": { - "httpMethod": "DELETE", - "parameterOrder": [ - "name" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "name": { - "description": "The name of the operation resource to be deleted.", - "type": "string", "required": true, "pattern": "^transferOperations/.+$", "location": "path" } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/transferOperations/{transferOperationsId}", - "path": "v1/{+name}", - "id": "storagetransfer.transferOperations.delete", - "description": "This method is not supported and the server returns `UNIMPLEMENTED`." - } - } - }, - "transferJobs": { - "methods": { - "list": { - "description": "Lists transfer jobs.", - "response": { - "$ref": "ListTransferJobsResponse" + "flatPath": "v1/transferOperations/{transferOperationsId}:pause", + "path": "v1/{+name}:pause", + "id": "storagetransfer.transferOperations.pause", + "request": { + "$ref": "PauseTransferOperationRequest" }, - "parameterOrder": [], - "httpMethod": "GET", + "description": "Pauses a transfer operation." + }, + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "name" + ], "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": { + "name": { + "pattern": "^transferOperations/.+$", + "location": "path", + "description": "The name of the operation resource to be deleted.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/transferOperations/{transferOperationsId}", + "path": "v1/{+name}", + "id": "storagetransfer.transferOperations.delete", + "description": "This method is not supported and the server returns `UNIMPLEMENTED`." + }, + "list": { + "id": "storagetransfer.transferOperations.list", + "path": "v1/{+name}", + "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", + "response": { + "$ref": "ListOperationsResponse" + }, + "parameterOrder": [ + "name" + ], + "httpMethod": "GET", + "parameters": { + "filter": { + "description": "A list of query parameters specified as JSON text in the form of {\\\"project_id\\\" : \\\"my_project_id\\\", \\\"job_names\\\" : [\\\"jobid1\\\", \\\"jobid2\\\",...], \\\"operation_names\\\" : [\\\"opid1\\\", \\\"opid2\\\",...], \\\"transfer_statuses\\\":[\\\"status1\\\", \\\"status2\\\",...]}. Since `job_names`, `operation_names`, and `transfer_statuses` support multiple values, they must be specified with array notation. `job_names`, `operation_names`, and `transfer_statuses` are optional.", + "type": "string", + "location": "query" + }, + "pageToken": { + "description": "The list page token.", + "type": "string", + "location": "query" + }, + "name": { + "description": "The value `transferOperations`.", + "type": "string", + "required": true, + "pattern": "^transferOperations$", + "location": "path" + }, "pageSize": { "format": "int32", "description": "The list page size. The max allowed value is 256.", "type": "integer", "location": "query" - }, + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferOperations" + } + } + }, + "transferJobs": { + "methods": { + "create": { + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "flatPath": "v1/transferJobs", + "id": "storagetransfer.transferJobs.create", + "path": "v1/transferJobs", + "description": "Creates a transfer job that runs periodically.", + "request": { + "$ref": "TransferJob" + }, + "response": { + "$ref": "TransferJob" + }, + "parameterOrder": [], + "httpMethod": "POST" + }, + "list": { + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { "filter": { "location": "query", "description": "A list of query parameters specified as JSON text in the form of\n{\"project_id\":\"my_project_id\",\n\"job_names\":[\"jobid1\",\"jobid2\",...],\n\"job_statuses\":[\"status1\",\"status2\",...]}.\nSince `job_names` and `job_statuses` support multiple values, their values\nmust be specified with array notation. `project_id` is required. `job_names`\nand `job_statuses` are optional. The valid values for `job_statuses` are\ncase-insensitive: `ENABLED`, `DISABLED`, and `DELETED`.", "type": "string" }, "pageToken": { - "location": "query", "description": "The list page token.", - "type": "string" + "type": "string", + "location": "query" + }, + "pageSize": { + "format": "int32", + "description": "The list page size. The max allowed value is 256.", + "type": "integer", + "location": "query" } }, "flatPath": "v1/transferJobs", + "path": "v1/transferJobs", "id": "storagetransfer.transferJobs.list", - "path": "v1/transferJobs" + "description": "Lists transfer jobs.", + "httpMethod": "GET", + "response": { + "$ref": "ListTransferJobsResponse" + }, + "parameterOrder": [] }, "get": { + "id": "storagetransfer.transferJobs.get", + "path": "v1/{+jobName}", "description": "Gets a transfer job.", - "httpMethod": "GET", - "parameterOrder": [ - "jobName" - ], "response": { "$ref": "TransferJob" }, + "parameterOrder": [ + "jobName" + ], + "httpMethod": "GET", "parameters": { "projectId": { - "location": "query", "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", - "type": "string" + "type": "string", + "location": "query" }, "jobName": { + "pattern": "^transferJobs/.+$", + "location": "path", "description": "The job to get.\nRequired.", "type": "string", - "required": true, - "pattern": "^transferJobs/.+$", - "location": "path" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/transferJobs/{transferJobsId}", - "path": "v1/{+jobName}", - "id": "storagetransfer.transferJobs.get" + "flatPath": "v1/transferJobs/{transferJobsId}" }, "patch": { - "id": "storagetransfer.transferJobs.patch", - "path": "v1/{+jobName}", - "description": "Updates a transfer job. Updating a job's transfer spec does not affect\ntransfer operations that are running already. Updating the scheduling\nof a job is not allowed.", - "request": { - "$ref": "UpdateTransferJobRequest" - }, "response": { "$ref": "TransferJob" }, @@ -310,55 +299,77 @@ "httpMethod": "PATCH", "parameters": { "jobName": { + "pattern": "^transferJobs/.+$", "location": "path", "description": "The name of job to update.\nRequired.", "type": "string", - "required": true, - "pattern": "^transferJobs/.+$" + "required": true } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/transferJobs/{transferJobsId}" - }, - "create": { - "flatPath": "v1/transferJobs", - "path": "v1/transferJobs", - "id": "storagetransfer.transferJobs.create", - "description": "Creates a transfer job that runs periodically.", + "flatPath": "v1/transferJobs/{transferJobsId}", + "id": "storagetransfer.transferJobs.patch", + "path": "v1/{+jobName}", + "description": "Updates a transfer job. Updating a job's transfer spec does not affect\ntransfer operations that are running already. Updating the scheduling\nof a job is not allowed.", "request": { - "$ref": "TransferJob" - }, - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "TransferJob" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "$ref": "UpdateTransferJobRequest" + } } } } }, "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "type": "string", + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ] + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "alt": { + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string" + }, "key": { "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string" }, "access_token": { - "location": "query", "description": "OAuth access token.", - "type": "string" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", "type": "string", "location": "query" }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, "pp": { "location": "query", "description": "Pretty-print response.", @@ -371,67 +382,174 @@ "type": "string" }, "oauth_token": { - "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, "prettyPrint": { "description": "Returns response with indentations and line breaks.", "default": "true", "type": "boolean", "location": "query" }, - "uploadType": { - "type": "string", - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." - }, "fields": { + "location": "query", "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" + "type": "string" }, - "$.xgafv": { - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], + "uploadType": { "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format." - }, - "callback": { - "type": "string", - "location": "query", - "description": "JSONP" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json" + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" } }, "schemas": { + "Schedule": { + "id": "Schedule", + "description": "Transfers can be scheduled to recur or to run just once.", + "type": "object", + "properties": { + "scheduleEndDate": { + "description": "The last day the recurring transfer will be run. If `scheduleEndDate`\nis the same as `scheduleStartDate`, the transfer will be executed only\nonce.", + "$ref": "Date" + }, + "startTimeOfDay": { + "$ref": "TimeOfDay", + "description": "The time in UTC at which the transfer will be scheduled to start in a day.\nTransfers may start later than this time. If not specified, recurring and\none-time transfers that are scheduled to run today will run immediately;\nrecurring transfers that are scheduled to run on a future date will start\nat approximately midnight UTC on that date. Note that when configuring a\ntransfer with the Cloud Platform Console, the transfer's start time in a\nday is specified in your local timezone." + }, + "scheduleStartDate": { + "description": "The first day the recurring transfer is scheduled to run. If\n`scheduleStartDate` is in the past, the transfer will run for the first\ntime on the following day.\nRequired.", + "$ref": "Date" + } + } + }, + "Date": { + "id": "Date", + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", + "type": "object", + "properties": { + "day": { + "format": "int32", + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "type": "integer" + }, + "year": { + "format": "int32", + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "type": "integer" + }, + "month": { + "format": "int32", + "description": "Month of year. Must be from 1 to 12.", + "type": "integer" + } + } + }, + "TransferOperation": { + "description": "A description of the execution of a transfer.", + "type": "object", + "properties": { + "endTime": { + "format": "google-datetime", + "description": "End time of this transfer execution.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Start time of this transfer execution.", + "type": "string" + }, + "transferJobName": { + "description": "The name of the transfer job that triggers this transfer operation.", + "type": "string" + }, + "transferSpec": { + "$ref": "TransferSpec", + "description": "Transfer specification.\nRequired." + }, + "status": { + "description": "Status of the transfer operation.", + "type": "string", + "enumDescriptions": [ + "Zero is an illegal value.", + "In progress.", + "Paused.", + "Completed successfully.", + "Terminated due to an unrecoverable failure.", + "Aborted by the user." + ], + "enum": [ + "STATUS_UNSPECIFIED", + "IN_PROGRESS", + "PAUSED", + "SUCCESS", + "FAILED", + "ABORTED" + ] + }, + "counters": { + "$ref": "TransferCounters", + "description": "Information about the progress of the transfer operation." + }, + "errorBreakdowns": { + "description": "Summarizes errors encountered with sample error log entries.", + "items": { + "$ref": "ErrorSummary" + }, + "type": "array" + }, + "name": { + "description": "A globally unique ID assigned by the system.", + "type": "string" + }, + "projectId": { + "description": "The ID of the Google Cloud Platform Console project that owns the operation.\nRequired.", + "type": "string" + } + }, + "id": "TransferOperation" + }, + "AwsS3Data": { + "id": "AwsS3Data", + "description": "An AwsS3Data can be a data source, but not a data sink.\nIn an AwsS3Data, an object's name is the S3 object's key name.", + "type": "object", + "properties": { + "bucketName": { + "description": "S3 Bucket name (see\n[Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).\nRequired.", + "type": "string" + }, + "awsAccessKey": { + "$ref": "AwsAccessKey", + "description": "AWS access key used to sign the API requests to the AWS S3 bucket.\nPermissions on the bucket must be granted to the access ID of the\nAWS access key.\nRequired." + } + } + }, + "AwsAccessKey": { + "description": "AWS access key (see\n[AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", + "type": "object", + "properties": { + "accessKeyId": { + "description": "AWS access key ID.\nRequired.", + "type": "string" + }, + "secretAccessKey": { + "description": "AWS secret access key. This field is not returned in RPC responses.\nRequired.", + "type": "string" + } + }, + "id": "AwsAccessKey" + }, + "Empty": { + "id": "Empty", + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {} + }, "PauseTransferOperationRequest": { "description": "Request passed to PauseTransferOperation.", "type": "object", @@ -443,44 +561,9 @@ "description": "A collection of counters that report the progress of a transfer operation.", "type": "object", "properties": { - "bytesDeletedFromSink": { + "objectsFromSourceSkippedBySync": { "format": "int64", - "description": "Bytes that are deleted from the data sink.", - "type": "string" - }, - "bytesFailedToDeleteFromSink": { - "format": "int64", - "description": "Bytes that failed to be deleted from the data sink.", - "type": "string" - }, - "bytesFromSourceFailed": { - "format": "int64", - "description": "Bytes in the data source that failed during the transfer.", - "type": "string" - }, - "objectsFromSourceFailed": { - "format": "int64", - "description": "Objects in the data source that failed during the transfer.", - "type": "string" - }, - "objectsCopiedToSink": { - "format": "int64", - "description": "Objects that are copied to the data sink.", - "type": "string" - }, - "bytesFoundOnlyFromSink": { - "format": "int64", - "description": "Bytes found only in the data sink that are scheduled to be deleted.", - "type": "string" - }, - "objectsDeletedFromSource": { - "format": "int64", - "description": "Objects that are deleted from the data source.", - "type": "string" - }, - "bytesCopiedToSink": { - "format": "int64", - "description": "Bytes that are copied to the data sink.", + "description": "Objects in the data source that are not transferred because they already\nexist in the data sink.", "type": "string" }, "bytesFoundFromSource": { @@ -488,21 +571,16 @@ "description": "Bytes found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures.", "type": "string" }, - "objectsFromSourceSkippedBySync": { - "type": "string", + "objectsFoundFromSource": { "format": "int64", - "description": "Objects in the data source that are not transferred because they already\nexist in the data sink." + "description": "Objects found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures.", + "type": "string" }, "bytesDeletedFromSource": { "format": "int64", "description": "Bytes that are deleted from the data source.", "type": "string" }, - "objectsFoundFromSource": { - "type": "string", - "format": "int64", - "description": "Objects found in the data source that are scheduled to be transferred,\nwhich will be copied, excluded based on conditions, or skipped due to\nfailures." - }, "objectsFailedToDeleteFromSink": { "format": "int64", "description": "Objects that failed to be deleted from the data sink.", @@ -522,15 +600,54 @@ "format": "int64", "description": "Bytes in the data source that are not transferred because they already\nexist in the data sink.", "type": "string" + }, + "bytesDeletedFromSink": { + "format": "int64", + "description": "Bytes that are deleted from the data sink.", + "type": "string" + }, + "bytesFailedToDeleteFromSink": { + "format": "int64", + "description": "Bytes that failed to be deleted from the data sink.", + "type": "string" + }, + "bytesFromSourceFailed": { + "format": "int64", + "description": "Bytes in the data source that failed during the transfer.", + "type": "string" + }, + "objectsCopiedToSink": { + "format": "int64", + "description": "Objects that are copied to the data sink.", + "type": "string" + }, + "objectsFromSourceFailed": { + "format": "int64", + "description": "Objects in the data source that failed during the transfer.", + "type": "string" + }, + "bytesFoundOnlyFromSink": { + "format": "int64", + "description": "Bytes found only in the data sink that are scheduled to be deleted.", + "type": "string" + }, + "objectsDeletedFromSource": { + "format": "int64", + "description": "Objects that are deleted from the data source.", + "type": "string" + }, + "bytesCopiedToSink": { + "format": "int64", + "description": "Bytes that are copied to the data sink.", + "type": "string" } } }, "ErrorSummary": { + "description": "A summary of errors by error code, plus a count and sample error log\nentries.", "type": "object", "properties": { "errorCode": { - "description": "Required.", - "type": "string", "enumDescriptions": [ "Not an error; returned on success\n\nHTTP Mapping: 200 OK", "The operation was cancelled, typically by the caller.\n\nHTTP Mapping: 499 Client Closed Request", @@ -568,12 +685,14 @@ "INTERNAL", "UNAVAILABLE", "DATA_LOSS" - ] + ], + "description": "Required.", + "type": "string" }, "errorCount": { - "type": "string", "format": "int64", - "description": "Count of this type of error.\nRequired." + "description": "Count of this type of error.\nRequired.", + "type": "string" }, "errorLogEntries": { "description": "Error samples.", @@ -583,10 +702,10 @@ "type": "array" } }, - "id": "ErrorSummary", - "description": "A summary of errors by error code, plus a count and sample error log\nentries." + "id": "ErrorSummary" }, "HttpData": { + "id": "HttpData", "description": "An HttpData specifies a list of objects on the web to be transferred over\nHTTP. The information of the objects to be transferred is contained in a\nfile referenced by a URL. The first line in the file must be\n\"TsvHttpData-1.0\", which specifies the format of the file. Subsequent lines\nspecify the information of the list of objects, one object per list entry.\nEach entry has the following tab-delimited fields:\n\n* HTTP URL - The location of the object.\n\n* Length - The size of the object in bytes.\n\n* MD5 - The base64-encoded MD5 hash of the object.\n\nFor an example of a valid TSV file, see\n[Transferring data from URLs](https://cloud.google.com/storage/transfer/create-url-list).\n\nWhen transferring data based on a URL list, keep the following in mind:\n\n* When an object located at `http(s)://hostname:port/\u003cURL-path\u003e` is transferred\nto a data sink, the name of the object at the data sink is\n`\u003chostname\u003e/\u003cURL-path\u003e`.\n\n* If the specified size of an object does not match the actual size of the\nobject fetched, the object will not be transferred.\n\n* If the specified MD5 does not match the MD5 computed from the transferred\nbytes, the object transfer will fail. For more information, see\n[Generating MD5 hashes](https://cloud.google.com/storage/transfer/#md5)\n\n* Ensure that each URL you specify is publicly accessible. For\nexample, in Google Cloud Storage you can\n[share an object publicly]\n(https://cloud.google.com/storage/docs/cloud-console#_sharingdata) and get\na link to it.\n\n* Storage Transfer Service obeys `robots.txt` rules and requires the source\nHTTP server to support `Range` requests and to return a `Content-Length`\nheader in each response.\n\n* [ObjectConditions](#ObjectConditions) have no effect when filtering objects\nto transfer.", "type": "object", "properties": { @@ -594,16 +713,15 @@ "description": "The URL that points to the file that stores the object list entries.\nThis file must allow public access. Currently, only URLs with HTTP and\nHTTPS schemes are supported.\nRequired.", "type": "string" } - }, - "id": "HttpData" + } }, "GcsData": { "description": "In a GcsData, an object's name is the Google Cloud Storage object's name and\nits `lastModificationTime` refers to the object's updated time, which changes\nwhen the content or the metadata of the object is updated.", "type": "object", "properties": { "bucketName": { - "type": "string", - "description": "Google Cloud Storage bucket name (see\n[Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nRequired." + "description": "Google Cloud Storage bucket name (see\n[Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).\nRequired.", + "type": "string" } }, "id": "GcsData" @@ -627,12 +745,13 @@ "id": "ListTransferJobsResponse" }, "UpdateTransferJobRequest": { + "id": "UpdateTransferJobRequest", "description": "Request passed to UpdateTransferJob.", "type": "object", "properties": { "transferJob": { - "description": "The job to update. `transferJob` is expected to specify only three fields:\n`description`, `transferSpec`, and `status`. An UpdateTransferJobRequest\nthat specifies other fields will be rejected with an error\n`INVALID_ARGUMENT`.\nRequired.", - "$ref": "TransferJob" + "$ref": "TransferJob", + "description": "The job to update. `transferJob` is expected to specify only three fields:\n`description`, `transferSpec`, and `status`. An UpdateTransferJobRequest\nthat specifies other fields will be rejected with an error\n`INVALID_ARGUMENT`.\nRequired." }, "projectId": { "description": "The ID of the Google Cloud Platform Console project that owns the job.\nRequired.", @@ -643,10 +762,11 @@ "description": "The field mask of the fields in `transferJob` that are to be updated in\nthis request. Fields in `transferJob` that can be updated are:\n`description`, `transferSpec`, and `status`. To update the `transferSpec`\nof the job, a complete transfer specification has to be provided. An\nincomplete specification which misses any required fields will be rejected\nwith the error `INVALID_ARGUMENT`.", "type": "string" } - }, - "id": "UpdateTransferJobRequest" + } }, "ObjectConditions": { + "id": "ObjectConditions", + "description": "Conditions that determine which objects will be transferred.", "type": "object", "properties": { "excludePrefixes": { @@ -662,9 +782,9 @@ "type": "string" }, "maxTimeElapsedSinceLastModification": { - "type": "string", "format": "google-duration", - "description": "`maxTimeElapsedSinceLastModification` is the complement to\n`minTimeElapsedSinceLastModification`." + "description": "`maxTimeElapsedSinceLastModification` is the complement to\n`minTimeElapsedSinceLastModification`.", + "type": "string" }, "includePrefixes": { "description": "If `includePrefixes` is specified, objects that satisfy the object\nconditions must have names that start with one of the `includePrefixes`\nand that do not start with any of the `excludePrefixes`. If `includePrefixes`\nis not specified, all objects except those that have names starting with\none of the `excludePrefixes` must satisfy the object conditions.\n\nRequirements:\n\n * Each include-prefix and exclude-prefix can contain any sequence of\n Unicode characters, of max length 1024 bytes when UTF8-encoded, and\n must not contain Carriage Return or Line Feed characters. Wildcard\n matching and regular expression matching are not supported.\n\n * Each include-prefix and exclude-prefix must omit the leading slash.\n For example, to include the `requests.gz` object in a transfer from\n `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include\n prefix as `logs/y=2015/requests.gz`.\n\n * None of the include-prefix or the exclude-prefix values can be empty,\n if specified.\n\n * Each include-prefix must include a distinct portion of the object\n namespace, i.e., no include-prefix may be a prefix of another\n include-prefix.\n\n * Each exclude-prefix must exclude a distinct portion of the object\n namespace, i.e., no exclude-prefix may be a prefix of another\n exclude-prefix.\n\n * If `includePrefixes` is specified, then each exclude-prefix must start\n with the value of a path explicitly included by `includePrefixes`.\n\nThe max size of `includePrefixes` is 1000.", @@ -673,33 +793,24 @@ }, "type": "array" } - }, - "id": "ObjectConditions", - "description": "Conditions that determine which objects will be transferred." + } }, "Operation": { + "id": "Operation", "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", "type": "object", "properties": { - "metadata": { - "additionalProperties": { - "type": "any", - "description": "Properties of the object. Contains field @type with type URL." - }, - "description": "Represents the transfer operation object.", - "type": "object" - }, "done": { "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", "type": "boolean" }, "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`." + } }, "name": { "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should have the format of `transferOperations/some/unique/name`.", @@ -708,29 +819,43 @@ "error": { "$ref": "Status", "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "description": "Represents the transfer operation object.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + } + }, + "TransferOptions": { + "description": "TransferOptions uses three boolean parameters to define the actions\nto be performed on objects in a transfer.", + "type": "object", + "properties": { + "deleteObjectsFromSourceAfterTransfer": { + "description": "Whether objects should be deleted from the source after they are\ntransferred to the sink. Note that this option and\n`deleteObjectsUniqueInSink` are mutually exclusive.", + "type": "boolean" + }, + "deleteObjectsUniqueInSink": { + "description": "Whether objects that exist only in the sink should be deleted. Note that\nthis option and `deleteObjectsFromSourceAfterTransfer` are mutually\nexclusive.", + "type": "boolean" + }, + "overwriteObjectsAlreadyExistingInSink": { + "description": "Whether overwriting objects that already exist in the sink is allowed.", + "type": "boolean" } }, - "id": "Operation" + "id": "TransferOptions" }, "TransferSpec": { "description": "Configuration for running a transfer.", "type": "object", "properties": { - "awsS3DataSource": { - "$ref": "AwsS3Data", - "description": "An AWS S3 data source." - }, - "httpDataSource": { - "$ref": "HttpData", - "description": "An HTTP URL data source." - }, - "objectConditions": { - "$ref": "ObjectConditions", - "description": "Only objects that satisfy these object conditions are included in the set\nof data source and data sink objects. Object conditions based on\nobjects' `lastModificationTime` do not exclude objects in a data sink." - }, "gcsDataSink": { - "description": "A Google Cloud Storage data sink.", - "$ref": "GcsData" + "$ref": "GcsData", + "description": "A Google Cloud Storage data sink." }, "gcsDataSource": { "description": "A Google Cloud Storage data source.", @@ -739,43 +864,33 @@ "transferOptions": { "$ref": "TransferOptions", "description": "If the option `deleteObjectsUniqueInSink` is `true`, object conditions\nbased on objects' `lastModificationTime` are ignored and do not exclude\nobjects in a data source or a data sink." + }, + "awsS3DataSource": { + "description": "An AWS S3 data source.", + "$ref": "AwsS3Data" + }, + "httpDataSource": { + "$ref": "HttpData", + "description": "An HTTP URL data source." + }, + "objectConditions": { + "$ref": "ObjectConditions", + "description": "Only objects that satisfy these object conditions are included in the set\nof data source and data sink objects. Object conditions based on\nobjects' `lastModificationTime` do not exclude objects in a data sink." } }, "id": "TransferSpec" }, - "TransferOptions": { - "description": "TransferOptions uses three boolean parameters to define the actions\nto be performed on objects in a transfer.", - "type": "object", - "properties": { - "overwriteObjectsAlreadyExistingInSink": { - "type": "boolean", - "description": "Whether overwriting objects that already exist in the sink is allowed." - }, - "deleteObjectsFromSourceAfterTransfer": { - "description": "Whether objects should be deleted from the source after they are\ntransferred to the sink. Note that this option and\n`deleteObjectsUniqueInSink` are mutually exclusive.", - "type": "boolean" - }, - "deleteObjectsUniqueInSink": { - "description": "Whether objects that exist only in the sink should be deleted. Note that\nthis option and `deleteObjectsFromSourceAfterTransfer` are mutually\nexclusive.", - "type": "boolean" - } - }, - "id": "TransferOptions" - }, "ResumeTransferOperationRequest": { + "id": "ResumeTransferOperationRequest", "description": "Request passed to ResumeTransferOperation.", "type": "object", - "properties": {}, - "id": "ResumeTransferOperationRequest" + "properties": {} }, "Status": { + "id": "Status", + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", "properties": { - "code": { - "format": "int32", - "description": "The status code, which should be an enum value of google.rpc.Code.", - "type": "integer" - }, "message": { "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", "type": "string" @@ -790,25 +905,28 @@ "type": "object" }, "type": "array" + }, + "code": { + "format": "int32", + "description": "The status code, which should be an enum value of google.rpc.Code.", + "type": "integer" } - }, - "id": "Status", - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons." + } }, "ListOperationsResponse": { "description": "The response message for Operations.ListOperations.", "type": "object", "properties": { - "nextPageToken": { - "description": "The standard List next-page token.", - "type": "string" - }, "operations": { "description": "A list of operations that matches the specified filter in the request.", "items": { "$ref": "Operation" }, "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" } }, "id": "ListOperationsResponse" @@ -825,14 +943,10 @@ "id": "GoogleServiceAccount" }, "TimeOfDay": { + "id": "TimeOfDay", "description": "Represents a time of day. The date and time zone are either not significant\nor are specified elsewhere. An API may choose to allow leap seconds. Related\ntypes are google.type.Date and `google.protobuf.Timestamp`.", "type": "object", "properties": { - "minutes": { - "format": "int32", - "description": "Minutes of hour of day. Must be from 0 to 59.", - "type": "integer" - }, "hours": { "format": "int32", "description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose\nto allow the value \"24:00:00\" for scenarios like business closing time.", @@ -844,12 +958,16 @@ "type": "integer" }, "seconds": { - "type": "integer", "format": "int32", - "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds." + "description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may\nallow the value 60 if it allows leap-seconds.", + "type": "integer" + }, + "minutes": { + "format": "int32", + "description": "Minutes of hour of day. Must be from 0 to 59.", + "type": "integer" } - }, - "id": "TimeOfDay" + } }, "ErrorLogEntry": { "id": "ErrorLogEntry", @@ -870,7 +988,6 @@ } }, "TransferJob": { - "id": "TransferJob", "description": "This resource represents the configuration of a transfer job that runs\nperiodically.", "type": "object", "properties": { @@ -878,15 +995,15 @@ "description": "A description provided by the user for the job. Its max length is 1024\nbytes when Unicode-encoded.", "type": "string" }, + "transferSpec": { + "description": "Transfer specification.", + "$ref": "TransferSpec" + }, "creationTime": { "format": "google-datetime", "description": "This field cannot be changed by user requests.", "type": "string" }, - "transferSpec": { - "description": "Transfer specification.", - "$ref": "TransferSpec" - }, "status": { "enumDescriptions": [ "Zero is an illegal value.", @@ -904,19 +1021,14 @@ "type": "string" }, "schedule": { - "description": "Schedule specification.", - "$ref": "Schedule" - }, - "deletionTime": { - "format": "google-datetime", - "description": "This field cannot be changed by user requests.", - "type": "string" + "$ref": "Schedule", + "description": "Schedule specification." }, "name": { "description": "A globally unique name assigned by Storage Transfer Service when the\njob is created. This field should be left empty in requests to create a new\ntransfer job; otherwise, the requests result in an `INVALID_ARGUMENT`\nerror.", "type": "string" }, - "lastModificationTime": { + "deletionTime": { "format": "google-datetime", "description": "This field cannot be changed by user requests.", "type": "string" @@ -924,154 +1036,42 @@ "projectId": { "description": "The ID of the Google Cloud Platform Console project that owns the job.", "type": "string" - } - } - }, - "Schedule": { - "type": "object", - "properties": { - "scheduleEndDate": { - "$ref": "Date", - "description": "The last day the recurring transfer will be run. If `scheduleEndDate`\nis the same as `scheduleStartDate`, the transfer will be executed only\nonce." }, - "startTimeOfDay": { - "$ref": "TimeOfDay", - "description": "The time in UTC at which the transfer will be scheduled to start in a day.\nTransfers may start later than this time. If not specified, recurring and\none-time transfers that are scheduled to run today will run immediately;\nrecurring transfers that are scheduled to run on a future date will start\nat approximately midnight UTC on that date. Note that when configuring a\ntransfer with the Cloud Platform Console, the transfer's start time in a\nday is specified in your local timezone." - }, - "scheduleStartDate": { - "description": "The first day the recurring transfer is scheduled to run. If\n`scheduleStartDate` is in the past, the transfer will run for the first\ntime on the following day.\nRequired.", - "$ref": "Date" - } - }, - "id": "Schedule", - "description": "Transfers can be scheduled to recur or to run just once." - }, - "Date": { - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", - "type": "object", - "properties": { - "day": { - "format": "int32", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", - "type": "integer" - }, - "year": { - "format": "int32", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", - "type": "integer" - }, - "month": { - "format": "int32", - "description": "Month of year. Must be from 1 to 12.", - "type": "integer" - } - }, - "id": "Date" - }, - "TransferOperation": { - "description": "A description of the execution of a transfer.", - "type": "object", - "properties": { - "errorBreakdowns": { - "description": "Summarizes errors encountered with sample error log entries.", - "items": { - "$ref": "ErrorSummary" - }, - "type": "array" - }, - "name": { - "type": "string", - "description": "A globally unique ID assigned by the system." - }, - "projectId": { - "description": "The ID of the Google Cloud Platform Console project that owns the operation.\nRequired.", - "type": "string" - }, - "endTime": { - "type": "string", + "lastModificationTime": { "format": "google-datetime", - "description": "End time of this transfer execution." - }, - "startTime": { - "format": "google-datetime", - "description": "Start time of this transfer execution.", - "type": "string" - }, - "transferJobName": { - "description": "The name of the transfer job that triggers this transfer operation.", - "type": "string" - }, - "transferSpec": { - "$ref": "TransferSpec", - "description": "Transfer specification.\nRequired." - }, - "status": { - "enum": [ - "STATUS_UNSPECIFIED", - "IN_PROGRESS", - "PAUSED", - "SUCCESS", - "FAILED", - "ABORTED" - ], - "description": "Status of the transfer operation.", - "type": "string", - "enumDescriptions": [ - "Zero is an illegal value.", - "In progress.", - "Paused.", - "Completed successfully.", - "Terminated due to an unrecoverable failure.", - "Aborted by the user." - ] - }, - "counters": { - "$ref": "TransferCounters", - "description": "Information about the progress of the transfer operation." - } - }, - "id": "TransferOperation" - }, - "AwsS3Data": { - "description": "An AwsS3Data can be a data source, but not a data sink.\nIn an AwsS3Data, an object's name is the S3 object's key name.", - "type": "object", - "properties": { - "bucketName": { - "description": "S3 Bucket name (see\n[Creating a bucket](http://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).\nRequired.", - "type": "string" - }, - "awsAccessKey": { - "$ref": "AwsAccessKey", - "description": "AWS access key used to sign the API requests to the AWS S3 bucket.\nPermissions on the bucket must be granted to the access ID of the\nAWS access key.\nRequired." - } - }, - "id": "AwsS3Data" - }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object", - "properties": {}, - "id": "Empty" - }, - "AwsAccessKey": { - "description": "AWS access key (see\n[AWS Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).", - "type": "object", - "properties": { - "accessKeyId": { - "description": "AWS access key ID.\nRequired.", - "type": "string" - }, - "secretAccessKey": { - "description": "AWS secret access key. This field is not returned in RPC responses.\nRequired.", + "description": "This field cannot be changed by user requests.", "type": "string" } }, - "id": "AwsAccessKey" + "id": "TransferJob" } }, "protocol": "rest", "icons": { "x32": "http://www.google.com/images/icons/product/search-32.gif", "x16": "http://www.google.com/images/icons/product/search-16.gif" - } + }, + "version": "v1", + "baseUrl": "https://storagetransfer.googleapis.com/", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "servicePath": "", + "description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets.", + "kind": "discovery#restDescription", + "rootUrl": "https://storagetransfer.googleapis.com/", + "basePath": "", + "ownerDomain": "google.com", + "name": "storagetransfer", + "batchPath": "batch", + "revision": "20170921", + "id": "storagetransfer:v1", + "documentationLink": "https://cloud.google.com/storage/transfer", + "title": "Google Storage Transfer API" } diff --git a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json index 7d281d2f9..d7c6e71e5 100644 --- a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json +++ b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-api.json @@ -1,33 +1,54 @@ { + "basePath": "", + "id": "streetviewpublish:v1", + "documentationLink": "https://developers.google.com/streetview/publish/", + "revision": "20170928", + "discoveryVersion": "v1", + "version_module": true, "schemas": { - "Status": { - "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "PhotoResponse": { + "description": "Response payload for a single\nPhoto\nin batch operations including\nBatchGetPhotos\nand\nBatchUpdatePhotos.", "type": "object", "properties": { - "details": { - "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", - "type": "array", - "items": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "type": "object" - } + "status": { + "description": "The status for the operation to get or update a single photo in the batch\nrequest.", + "$ref": "Status" }, - "code": { - "description": "The status code, which should be an enum value of google.rpc.Code.", - "format": "int32", - "type": "integer" - }, - "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" + "photo": { + "$ref": "Photo", + "description": "The Photo resource, if the request\nwas successful." } }, - "id": "Status" + "id": "PhotoResponse" + }, + "Connection": { + "description": "A connection is the link from a source photo to a destination photo.", + "type": "object", + "properties": { + "target": { + "$ref": "PhotoId", + "description": "Required. The destination of the connection from the containing photo to\nanother photo." + } + }, + "id": "Connection" + }, + "BatchUpdatePhotosResponse": { + "description": "Response to batch update of metadata of one or more\nPhotos.", + "type": "object", + "properties": { + "results": { + "description": "List of results for each individual\nPhoto updated, in the same order as\nthe request.", + "type": "array", + "items": { + "$ref": "PhotoResponse" + } + } + }, + "id": "BatchUpdatePhotosResponse" }, "BatchDeletePhotosResponse": { + "description": "Response to batch delete of one or more\nPhotos.", + "type": "object", "properties": { "status": { "description": "The status for the operation to delete a single\nPhoto in the batch request.", @@ -37,9 +58,40 @@ } } }, - "id": "BatchDeletePhotosResponse", - "description": "Response to batch delete of one or more\nPhotos.", - "type": "object" + "id": "BatchDeletePhotosResponse" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", + "type": "object", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", + "type": "string" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + } + } + }, + "id": "Status" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" }, "Level": { "description": "Level information containing level number and its corresponding name.", @@ -57,11 +109,30 @@ }, "id": "Level" }, - "Empty": { - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "BatchGetPhotosResponse": { + "description": "Response to batch get of Photos.", "type": "object", - "properties": {}, - "id": "Empty" + "properties": { + "results": { + "description": "List of results for each individual\nPhoto requested, in the same order as\nthe requests in\nBatchGetPhotos.", + "type": "array", + "items": { + "$ref": "PhotoResponse" + } + } + }, + "id": "BatchGetPhotosResponse" + }, + "Place": { + "description": "Place metadata for an entity.", + "type": "object", + "properties": { + "placeId": { + "description": "Place identifier, as described in\nhttps://developers.google.com/places/place-id.", + "type": "string" + } + }, + "id": "Place" }, "UploadRef": { "description": "Upload reference for media files.", @@ -74,32 +145,25 @@ }, "id": "UploadRef" }, - "Place": { + "LatLng": { + "id": "LatLng", + "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", + "type": "object", "properties": { - "placeId": { - "description": "Required. Place identifier, as described in\nhttps://developers.google.com/places/place-id.", - "type": "string" + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" } - }, - "id": "Place", - "description": "Place metadata for an entity.", - "type": "object" - }, - "BatchGetPhotosResponse": { - "properties": { - "results": { - "description": "List of results for each individual\nPhoto requested, in the same order as\nthe requests in\nBatchGetPhotos.", - "type": "array", - "items": { - "$ref": "PhotoResponse" - } - } - }, - "id": "BatchGetPhotosResponse", - "description": "Response to batch get of Photos.", - "type": "object" + } }, "BatchDeletePhotosRequest": { + "id": "BatchDeletePhotosRequest", "description": "Request to delete multiple Photos.", "type": "object", "properties": { @@ -110,27 +174,11 @@ "type": "string" } } - }, - "id": "BatchDeletePhotosRequest" - }, - "LatLng": { - "description": "An object representing a latitude/longitude pair. This is expressed as a pair\nof doubles representing degrees latitude and degrees longitude. Unless\nspecified otherwise, this must conform to the\n\u003ca href=\"http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf\"\u003eWGS84\nstandard\u003c/a\u003e. Values must be within normalized ranges.\n\nExample of normalization code in Python:\n\n def NormalizeLongitude(longitude):\n \"\"\"Wraps decimal degrees longitude to [-180.0, 180.0].\"\"\"\n q, r = divmod(longitude, 360.0)\n if r \u003e 180.0 or (r == 180.0 and q \u003c= -1.0):\n return r - 360.0\n return r\n\n def NormalizeLatLng(latitude, longitude):\n \"\"\"Wraps decimal degrees latitude and longitude to\n [-90.0, 90.0] and [-180.0, 180.0], respectively.\"\"\"\n r = latitude % 360.0\n if r \u003c= 90.0:\n return r, NormalizeLongitude(longitude)\n elif r \u003e= 270.0:\n return r - 360, NormalizeLongitude(longitude)\n else:\n return 180 - r, NormalizeLongitude(longitude + 180.0)\n\n assert 180.0 == NormalizeLongitude(180.0)\n assert -180.0 == NormalizeLongitude(-180.0)\n assert -179.0 == NormalizeLongitude(181.0)\n assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)\n assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)\n assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)\n assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)\n assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)\n assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)\n assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)\n assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)\n assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)", - "type": "object", - "properties": { - "longitude": { - "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", - "format": "double", - "type": "number" - }, - "latitude": { - "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", - "format": "double", - "type": "number" - } - }, - "id": "LatLng" + } }, "UpdatePhotoRequest": { + "description": "Request to update the metadata of a\nPhoto. Updating the pixels of a photo\nis not supported.", + "type": "object", "properties": { "photo": { "$ref": "Photo", @@ -142,12 +190,9 @@ "type": "string" } }, - "id": "UpdatePhotoRequest", - "description": "Request to update the metadata of a\nPhoto. Updating the pixels of a photo\nis not supported.", - "type": "object" + "id": "UpdatePhotoRequest" }, "PhotoId": { - "description": "Identifier for a Photo.", "type": "object", "properties": { "id": { @@ -155,12 +200,17 @@ "type": "string" } }, - "id": "PhotoId" + "id": "PhotoId", + "description": "Identifier for a Photo." }, "Pose": { "description": "Raw pose measurement for an entity.", "type": "object", "properties": { + "level": { + "description": "Level (the floor in a building) used to configure vertical navigation.", + "$ref": "Level" + }, "heading": { "description": "Compass heading, measured at the center of the photo in degrees clockwise\nfrom North. Value must be \u003e=0 and \u003c360.\nNaN indicates an unmeasured quantity.", "format": "double", @@ -177,17 +227,13 @@ "type": "number" }, "latLngPair": { - "description": "Latitude and longitude pair of the pose, as explained here:\nhttps://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng\nWhen creating a Photo, if the\nlatitude and longitude pair are not provided here, the geolocation from the\nexif header will be used. If the latitude and longitude pair is not\nprovided and cannot be found in the exif header, the create photo process\nwill fail.", - "$ref": "LatLng" + "$ref": "LatLng", + "description": "Latitude and longitude pair of the pose, as explained here:\nhttps://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng\nWhen creating a Photo, if the\nlatitude and longitude pair are not provided here, the geolocation from the\nexif header will be used. If the latitude and longitude pair is not\nprovided and cannot be found in the exif header, the create photo process\nwill fail." }, "roll": { + "type": "number", "description": "Roll, measured in degrees. Value must be \u003e= 0 and \u003c360. A value of 0\nmeans level with the horizon.\nNaN indicates an unmeasured quantity.", - "format": "double", - "type": "number" - }, - "level": { - "$ref": "Level", - "description": "Level (the floor in a building) used to configure vertical navigation." + "format": "double" } }, "id": "Pose" @@ -197,46 +243,41 @@ "type": "object", "properties": { "updatePhotoRequests": { - "description": "Required. List of\nUpdatePhotoRequests.", "type": "array", "items": { "$ref": "UpdatePhotoRequest" - } + }, + "description": "Required. List of\nUpdatePhotoRequests." } }, "id": "BatchUpdatePhotosRequest" }, "ListPhotosResponse": { + "description": "Response to list all photos that belong to a user.", + "type": "object", "properties": { - "nextPageToken": { - "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", - "type": "string" - }, "photos": { - "description": "List of photos. The maximum number of items returned is based on the\npageSize field\nin the request.", "type": "array", "items": { "$ref": "Photo" - } + }, + "description": "List of photos. The maximum number of items returned is based on the\npageSize field\nin the request." + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more\nresults in the list.", + "type": "string" } }, - "id": "ListPhotosResponse", - "description": "Response to list all photos that belong to a user.", - "type": "object" + "id": "ListPhotosResponse" }, "Photo": { + "description": "Photo is used to store 360 photos along with photo metadata.", + "type": "object", "properties": { "downloadUrl": { "description": "Output only. The download URL for the photo bytes. This field is set only\nwhen\nGetPhotoRequest.view\nis set to\nPhotoView.INCLUDE_DOWNLOAD_URL.", "type": "string" }, - "places": { - "description": "Places where this photo belongs.", - "type": "array", - "items": { - "$ref": "Place" - } - }, "connections": { "description": "Connections to other photos. A connection represents the link from this\nphoto to another photo.", "type": "array", @@ -244,87 +285,52 @@ "$ref": "Connection" } }, + "places": { + "description": "Places where this photo belongs.", + "type": "array", + "items": { + "$ref": "Place" + } + }, "uploadReference": { "$ref": "UploadRef", - "description": "Required when creating a photo. Input only. The resource URL where the photo\nbytes are uploaded to." - }, - "pose": { - "$ref": "Pose", - "description": "Pose of the photo." + "description": "Required when creating a photo. Input only. The resource URL where the\nphoto bytes are uploaded to." }, "photoId": { "$ref": "PhotoId", "description": "Required when updating a photo. Output only when creating a photo.\nIdentifier for the photo, which is unique among all photos in\nGoogle." }, + "pose": { + "$ref": "Pose", + "description": "Pose of the photo." + }, "shareLink": { "description": "Output only. The share link for the photo.", "type": "string" }, - "thumbnailUrl": { - "description": "Output only. The thumbnail URL for showing a preview of the given photo.", - "type": "string" - }, "captureTime": { "description": "Absolute time when the photo was captured.\nWhen the photo has no exif timestamp, this is used to set a timestamp in\nthe photo metadata.", "format": "google-datetime", "type": "string" }, + "thumbnailUrl": { + "description": "Output only. The thumbnail URL for showing a preview of the given photo.", + "type": "string" + }, "viewCount": { "description": "Output only. View count of the photo.", "format": "int64", "type": "string" } }, - "id": "Photo", - "description": "Photo is used to store 360 photos along with photo metadata.", - "type": "object" - }, - "PhotoResponse": { - "description": "Response payload for a single\nPhoto\nin batch operations including\nBatchGetPhotos\nand\nBatchUpdatePhotos.", - "type": "object", - "properties": { - "photo": { - "description": "The Photo resource, if the request\nwas successful.", - "$ref": "Photo" - }, - "status": { - "description": "The status for the operation to get or update a single photo in the batch\nrequest.", - "$ref": "Status" - } - }, - "id": "PhotoResponse" - }, - "Connection": { - "properties": { - "target": { - "$ref": "PhotoId", - "description": "Required. The destination of the connection from the containing photo to\nanother photo." - } - }, - "id": "Connection", - "description": "A connection is the link from a source photo to a destination photo.", - "type": "object" - }, - "BatchUpdatePhotosResponse": { - "description": "Response to batch update of metadata of one or more\nPhotos.", - "type": "object", - "properties": { - "results": { - "description": "List of results for each individual\nPhoto updated, in the same order as\nthe request.", - "type": "array", - "items": { - "$ref": "PhotoResponse" - } - } - }, - "id": "BatchUpdatePhotosResponse" + "id": "Photo" } }, - "protocol": "rest", "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" }, + "protocol": "rest", "canonicalName": "Street View Publish", "auth": { "oauth2": { @@ -343,9 +349,124 @@ "title": "Street View Publish API", "ownerName": "Google", "resources": { + "photos": { + "methods": { + "batchUpdate": { + "response": { + "$ref": "BatchUpdatePhotosResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ], + "flatPath": "v1/photos:batchUpdate", + "path": "v1/photos:batchUpdate", + "id": "streetviewpublish.photos.batchUpdate", + "request": { + "$ref": "BatchUpdatePhotosRequest" + }, + "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e" + }, + "batchDelete": { + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "BatchDeletePhotosResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ], + "parameters": {}, + "flatPath": "v1/photos:batchDelete", + "id": "streetviewpublish.photos.batchDelete", + "path": "v1/photos:batchDelete", + "description": "Deletes a list of Photos and their\nmetadata.\n\nNote that if\nBatchDeletePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchDeletePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchDeletePhotosResponse.results.\nSee\nDeletePhoto\nfor specific failures that can occur per photo.", + "request": { + "$ref": "BatchDeletePhotosRequest" + } + }, + "batchGet": { + "flatPath": "v1/photos:batchGet", + "id": "streetviewpublish.photos.batchGet", + "path": "v1/photos:batchGet", + "description": "Gets the metadata of the specified\nPhoto batch.\n\nNote that if\nBatchGetPhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchGetPhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchGetPhotosResponse.results.\nSee\nGetPhoto\nfor specific failures that can occur per photo.", + "httpMethod": "GET", + "response": { + "$ref": "BatchGetPhotosResponse" + }, + "parameterOrder": [], + "parameters": { + "view": { + "location": "query", + "enum": [ + "BASIC", + "INCLUDE_DOWNLOAD_URL" + ], + "description": "Specifies if a download URL for the photo bytes should be returned in the\nPhoto response.", + "type": "string" + }, + "photoIds": { + "location": "query", + "description": "Required. IDs of the Photos. For HTTP\nGET requests, the URL query parameter should be\n`photoIds=\u003cid1\u003e&photoIds=\u003cid2\u003e&...`.", + "type": "string", + "repeated": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ] + }, + "list": { + "flatPath": "v1/photos", + "path": "v1/photos", + "id": "streetviewpublish.photos.list", + "description": "Lists all the Photos that belong to\nthe user.", + "response": { + "$ref": "ListPhotosResponse" + }, + "parameterOrder": [], + "httpMethod": "GET", + "parameters": { + "filter": { + "location": "query", + "description": "The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.\n\nThe only filter supported at the moment is `placeId`.", + "type": "string" + }, + "pageToken": { + "type": "string", + "location": "query", + "description": "The\nnextPageToken\nvalue returned from a previous\nListPhotos\nrequest, if any." + }, + "pageSize": { + "location": "query", + "description": "The maximum number of photos to return.\n`pageSize` must be non-negative. If `pageSize` is zero or is not provided,\nthe default page size of 100 will be used.\nThe number of photos returned in the response may be less than `pageSize`\nif the number of photos that belong to the user is less than `pageSize`.", + "format": "int32", + "type": "integer" + }, + "view": { + "location": "query", + "enum": [ + "BASIC", + "INCLUDE_DOWNLOAD_URL" + ], + "description": "Specifies if a download URL for the photos bytes should be returned in the\nPhotos response.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ] + } + } + }, "photo": { "methods": { "delete": { + "path": "v1/photo/{photoId}", + "id": "streetviewpublish.photo.delete", + "description": "Deletes a Photo and its metadata.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.NOT_FOUND if the photo ID does not exist.", "response": { "$ref": "Empty" }, @@ -364,13 +485,9 @@ "scopes": [ "https://www.googleapis.com/auth/streetviewpublish" ], - "flatPath": "v1/photo/{photoId}", - "path": "v1/photo/{photoId}", - "id": "streetviewpublish.photo.delete", - "description": "Deletes a Photo and its metadata.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.NOT_FOUND if the photo ID does not exist." + "flatPath": "v1/photo/{photoId}" }, "get": { - "description": "Gets the metadata of the specified\nPhoto.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested Photo.\n* google.rpc.Code.NOT_FOUND if the requested\nPhoto does not exist.", "response": { "$ref": "Photo" }, @@ -378,9 +495,6 @@ "photoId" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], "parameters": { "photoId": { "location": "path", @@ -389,20 +503,28 @@ "type": "string" }, "view": { - "location": "query", "enum": [ "BASIC", "INCLUDE_DOWNLOAD_URL" ], "description": "Specifies if a download URL for the photo bytes should be returned in the\nPhoto response.", - "type": "string" + "type": "string", + "location": "query" } }, + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ], "flatPath": "v1/photo/{photoId}", "path": "v1/photo/{photoId}", - "id": "streetviewpublish.photo.get" + "id": "streetviewpublish.photo.get", + "description": "Gets the metadata of the specified\nPhoto.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested Photo.\n* google.rpc.Code.NOT_FOUND if the requested\nPhoto does not exist." }, "update": { + "description": "Updates the metadata of a Photo, such\nas pose, place association, connections, etc. Changing the pixels of a\nphoto is not supported.\n\nOnly the fields specified in the\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the requested photo does not exist.", + "request": { + "$ref": "Photo" + }, "response": { "$ref": "Photo" }, @@ -410,6 +532,9 @@ "id" ], "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/streetviewpublish" + ], "parameters": { "id": { "location": "path", @@ -418,222 +543,56 @@ "type": "string" }, "updateMask": { - "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo\nmetadata will be entirely replaced with the\nnew Photo metadata in this request.\nThe update fails if invalid fields are specified. Multiple fields can be\nspecified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latLngPair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and `UpdatePhotoRequest.photo.connections` is empty,\nall connections will be removed.\u003c/aside\u003e", - "format": "google-fieldmask", "type": "string", - "location": "query" + "location": "query", + "description": "Mask that identifies fields on the photo metadata to update.\nIf not present, the old Photo\nmetadata will be entirely replaced with the\nnew Photo metadata in this request.\nThe update fails if invalid fields are specified. Multiple fields can be\nspecified in a comma-delimited list.\n\nThe following fields are valid:\n\n* `pose.heading`\n* `pose.latLngPair`\n* `pose.pitch`\n* `pose.roll`\n* `pose.level`\n* `pose.altitude`\n* `connections`\n* `places`\n\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e Repeated fields in\nupdateMask\nmean the entire set of repeated values will be replaced with the new\ncontents. For example, if\nupdateMask\ncontains `connections` and `UpdatePhotoRequest.photo.connections` is empty,\nall connections will be removed.\u003c/aside\u003e", + "format": "google-fieldmask" } }, - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], "flatPath": "v1/photo/{id}", "path": "v1/photo/{id}", - "id": "streetviewpublish.photo.update", - "request": { - "$ref": "Photo" - }, - "description": "Updates the metadata of a Photo, such\nas pose, place association, connections, etc. Changing the pixels of a\nphoto is not supported.\n\nOnly the fields specified in the\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e\n\nThis method returns the following error codes:\n\n* google.rpc.Code.PERMISSION_DENIED if the requesting user did not\ncreate the requested photo.\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the requested photo does not exist." + "id": "streetviewpublish.photo.update" }, "create": { + "flatPath": "v1/photo", + "path": "v1/photo", + "id": "streetviewpublish.photo.create", "request": { "$ref": "Photo" }, - "description": "After the client finishes uploading the photo with the returned\nUploadRef,\nCreatePhoto\npublishes the uploaded Photo to\nStreet View on Google Maps.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the upload reference does not exist.\n* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the\nstorage limit.", - "httpMethod": "POST", - "parameterOrder": [], + "description": "After the client finishes uploading the photo with the returned\nUploadRef,\nCreatePhoto\npublishes the uploaded Photo to\nStreet View on Google Maps.\n\nCurrently, the only way to set heading, pitch, and roll in CreatePhoto is\nthrough the [Photo Sphere XMP\nmetadata](https://developers.google.com/streetview/spherical-metadata) in\nthe photo bytes. The `pose.heading`, `pose.pitch`, `pose.roll`,\n`pose.altitude`, and `pose.level` fields in Pose are ignored for\nCreatePhoto.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the upload reference does not exist.\n* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the\nstorage limit.", "response": { "$ref": "Photo" }, + "parameterOrder": [], + "httpMethod": "POST", "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/streetviewpublish" - ], - "flatPath": "v1/photo", - "id": "streetviewpublish.photo.create", - "path": "v1/photo" + ] }, "startUpload": { - "path": "v1/photo:startUpload", - "id": "streetviewpublish.photo.startUpload", - "description": "Creates an upload session to start uploading photo bytes. The upload URL of\nthe returned UploadRef is used to\nupload the bytes for the Photo.\n\nIn addition to the photo requirements shown in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604,\nthe photo must also meet the following requirements:\n\n* Photo Sphere XMP metadata must be included in the photo medadata. See\nhttps://developers.google.com/streetview/spherical-metadata for the\nrequired fields.\n* The pixel size of the photo must meet the size requirements listed in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, and\nthe photo must be a full 360 horizontally.\n\nAfter the upload is complete, the\nUploadRef is used with\nCreatePhoto\nto create the Photo object entry.", - "request": { - "$ref": "Empty" - }, "response": { "$ref": "UploadRef" }, "parameterOrder": [], "httpMethod": "POST", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/streetviewpublish" ], - "parameters": {}, - "flatPath": "v1/photo:startUpload" - } - } - }, - "photos": { - "methods": { - "batchUpdate": { - "path": "v1/photos:batchUpdate", - "id": "streetviewpublish.photos.batchUpdate", - "description": "Updates the metadata of Photos, such\nas pose, place association, connections, etc. Changing the pixels of photos\nis not supported.\n\nNote that if\nBatchUpdatePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchUpdatePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchUpdatePhotosResponse.results.\nSee\nUpdatePhoto\nfor specific failures that can occur per photo.\n\nOnly the fields specified in\nupdateMask\nfield are used. If `updateMask` is not present, the update applies to all\nfields.\n\n\u003caside class=\"note\"\u003e\u003cb\u003eNote:\u003c/b\u003e To update\nPose.altitude,\nPose.latLngPair has to be\nfilled as well. Otherwise, the request will fail.\u003c/aside\u003e", + "flatPath": "v1/photo:startUpload", + "path": "v1/photo:startUpload", + "id": "streetviewpublish.photo.startUpload", "request": { - "$ref": "BatchUpdatePhotosRequest" + "$ref": "Empty" }, - "response": { - "$ref": "BatchUpdatePhotosResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], - "parameters": {}, - "flatPath": "v1/photos:batchUpdate" - }, - "batchDelete": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "BatchDeletePhotosResponse" - }, - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], - "flatPath": "v1/photos:batchDelete", - "id": "streetviewpublish.photos.batchDelete", - "path": "v1/photos:batchDelete", - "request": { - "$ref": "BatchDeletePhotosRequest" - }, - "description": "Deletes a list of Photos and their\nmetadata.\n\nNote that if\nBatchDeletePhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchDeletePhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchDeletePhotosResponse.results.\nSee\nDeletePhoto\nfor specific failures that can occur per photo." - }, - "batchGet": { - "response": { - "$ref": "BatchGetPhotosResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], - "parameters": { - "view": { - "location": "query", - "enum": [ - "BASIC", - "INCLUDE_DOWNLOAD_URL" - ], - "description": "Specifies if a download URL for the photo bytes should be returned in the\nPhoto response.", - "type": "string" - }, - "photoIds": { - "repeated": true, - "location": "query", - "description": "Required. IDs of the Photos. For HTTP\nGET requests, the URL query parameter should be\n`photoIds=\u003cid1\u003e&photoIds=\u003cid2\u003e&...`.", - "type": "string" - } - }, - "flatPath": "v1/photos:batchGet", - "path": "v1/photos:batchGet", - "id": "streetviewpublish.photos.batchGet", - "description": "Gets the metadata of the specified\nPhoto batch.\n\nNote that if\nBatchGetPhotos\nfails, either critical fields are missing or there was an authentication\nerror. Even if\nBatchGetPhotos\nsucceeds, there may have been failures for single photos in the batch.\nThese failures will be specified in each\nPhotoResponse.status\nin\nBatchGetPhotosResponse.results.\nSee\nGetPhoto\nfor specific failures that can occur per photo." - }, - "list": { - "path": "v1/photos", - "id": "streetviewpublish.photos.list", - "description": "Lists all the Photos that belong to\nthe user.", - "response": { - "$ref": "ListPhotosResponse" - }, - "parameterOrder": [], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/streetviewpublish" - ], - "parameters": { - "pageToken": { - "description": "The\nnextPageToken\nvalue returned from a previous\nListPhotos\nrequest, if any.", - "type": "string", - "location": "query" - }, - "pageSize": { - "description": "The maximum number of photos to return.\n`pageSize` must be non-negative. If `pageSize` is zero or is not provided,\nthe default page size of 100 will be used.\nThe number of photos returned in the response may be less than `pageSize`\nif the number of photos that belong to the user is less than `pageSize`.", - "format": "int32", - "type": "integer", - "location": "query" - }, - "view": { - "enum": [ - "BASIC", - "INCLUDE_DOWNLOAD_URL" - ], - "description": "Specifies if a download URL for the photos bytes should be returned in the\nPhotos response.", - "type": "string", - "location": "query" - }, - "filter": { - "location": "query", - "description": "The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.", - "type": "string" - } - }, - "flatPath": "v1/photos" + "description": "Creates an upload session to start uploading photo bytes. The upload URL of\nthe returned UploadRef is used to\nupload the bytes for the Photo.\n\nIn addition to the photo requirements shown in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604,\nthe photo must also meet the following requirements:\n\n* Photo Sphere XMP metadata must be included in the photo medadata. See\nhttps://developers.google.com/streetview/spherical-metadata for the\nrequired fields.\n* The pixel size of the photo must meet the size requirements listed in\nhttps://support.google.com/maps/answer/7012050?hl=en&ref_topic=6275604, and\nthe photo must be a full 360 horizontally.\n\nAfter the upload is complete, the\nUploadRef is used with\nCreatePhoto\nto create the Photo object entry." } } } }, "parameters": { - "alt": { - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string", - "location": "query" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "type": "boolean", - "default": "true" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "oauth_token": { - "location": "query", - "description": "OAuth 2.0 token for the current user.", - "type": "string" - }, "upload_protocol": { "location": "query", "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", @@ -645,16 +604,16 @@ "default": "true", "location": "query" }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "type": "string", + "location": "query" + }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, "callback": { "location": "query", "description": "JSONP", @@ -672,17 +631,58 @@ "v2 error format" ], "location": "query" + }, + "alt": { + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string", + "location": "query" + }, + "pp": { + "location": "query", + "description": "Pretty-print response.", + "type": "boolean", + "default": "true" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "type": "string", + "location": "query", + "description": "OAuth 2.0 token for the current user." } }, "version": "v1", "baseUrl": "https://streetviewpublish.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Publishes 360 photos to Google Maps, along with position, orientation, and connectivity metadata. Apps can offer an interface for positioning, connecting, and uploading user-generated Street View images.\n", "servicePath": "", - "basePath": "", - "id": "streetviewpublish:v1", - "documentationLink": "https://developers.google.com/streetview/publish/", - "revision": "20170919", - "discoveryVersion": "v1", - "version_module": true + "kind": "discovery#restDescription", + "description": "Publishes 360 photos to Google Maps, along with position, orientation, and connectivity metadata. Apps can offer an interface for positioning, connecting, and uploading user-generated Street View images.\n" } diff --git a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go index e0e7d0b22..836c8cd5e 100644 --- a/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go +++ b/vendor/google.golang.org/api/streetviewpublish/v1/streetviewpublish-gen.go @@ -541,8 +541,8 @@ type Photo struct { ThumbnailUrl string `json:"thumbnailUrl,omitempty"` // UploadReference: Required when creating a photo. Input only. The - // resource URL where the photo - // bytes are uploaded to. + // resource URL where the + // photo bytes are uploaded to. UploadReference *UploadRef `json:"uploadReference,omitempty"` // ViewCount: Output only. View count of the photo. @@ -644,7 +644,7 @@ func (s *PhotoResponse) MarshalJSON() ([]byte, error) { // Place: Place metadata for an entity. type Place struct { - // PlaceId: Required. Place identifier, as described + // PlaceId: Place identifier, as described // in // https://developers.google.com/places/place-id. PlaceId string `json:"placeId,omitempty"` @@ -996,6 +996,18 @@ type PhotoCreateCall struct { // publishes the uploaded Photo to // Street View on Google Maps. // +// Currently, the only way to set heading, pitch, and roll in +// CreatePhoto is +// through the [Photo Sphere +// XMP +// metadata](https://developers.google.com/streetview/spherical-metad +// ata) in +// the photo bytes. The `pose.heading`, `pose.pitch`, +// `pose.roll`, +// `pose.altitude`, and `pose.level` fields in Pose are ignored +// for +// CreatePhoto. +// // This method returns the following error codes: // // * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. @@ -1092,7 +1104,7 @@ func (c *PhotoCreateCall) Do(opts ...googleapi.CallOption) (*Photo, error) { } return ret, nil // { - // "description": "After the client finishes uploading the photo with the returned\nUploadRef,\nCreatePhoto\npublishes the uploaded Photo to\nStreet View on Google Maps.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the upload reference does not exist.\n* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the\nstorage limit.", + // "description": "After the client finishes uploading the photo with the returned\nUploadRef,\nCreatePhoto\npublishes the uploaded Photo to\nStreet View on Google Maps.\n\nCurrently, the only way to set heading, pitch, and roll in CreatePhoto is\nthrough the [Photo Sphere XMP\nmetadata](https://developers.google.com/streetview/spherical-metadata) in\nthe photo bytes. The `pose.heading`, `pose.pitch`, `pose.roll`,\n`pose.altitude`, and `pose.level` fields in Pose are ignored for\nCreatePhoto.\n\nThis method returns the following error codes:\n\n* google.rpc.Code.INVALID_ARGUMENT if the request is malformed.\n* google.rpc.Code.NOT_FOUND if the upload reference does not exist.\n* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the\nstorage limit.", // "flatPath": "v1/photo", // "httpMethod": "POST", // "id": "streetviewpublish.photo.create", @@ -2246,6 +2258,8 @@ func (r *PhotosService) List() *PhotosListCall { // Filter sets the optional parameter "filter": The filter expression. // For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. +// +// The only filter supported at the moment is `placeId`. func (c *PhotosListCall) Filter(filter string) *PhotosListCall { c.urlParams_.Set("filter", filter) return c @@ -2386,7 +2400,7 @@ func (c *PhotosListCall) Do(opts ...googleapi.CallOption) (*ListPhotosResponse, // "parameterOrder": [], // "parameters": { // "filter": { - // "description": "The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.", + // "description": "The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.\n\nThe only filter supported at the moment is `placeId`.", // "location": "query", // "type": "string" // }, diff --git a/vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-api.json b/vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-api.json index fe121d5f7..dec04c5f7 100644 --- a/vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-api.json +++ b/vendor/google.golang.org/api/taskqueue/v1beta2/taskqueue-api.json @@ -20,7 +20,7 @@ "basePath": "/taskqueue/v1beta2/projects/", "rootUrl": "https://www.googleapis.com/", "servicePath": "taskqueue/v1beta2/projects/", - "batchPath": "batch", + "batchPath": "batch/taskqueue/v1beta2", "parameters": { "alt": { "type": "string", diff --git a/vendor/google.golang.org/api/testing/v1/testing-api.json b/vendor/google.golang.org/api/testing/v1/testing-api.json index 1b5fc349b..bb55fb5a8 100644 --- a/vendor/google.golang.org/api/testing/v1/testing-api.json +++ b/vendor/google.golang.org/api/testing/v1/testing-api.json @@ -1,78 +1,51 @@ { + "ownerDomain": "google.com", + "name": "testing", + "batchPath": "batch", + "id": "testing:v1", + "documentationLink": "https://developers.google.com/cloud-test-lab/", + "revision": "20170922", "title": "Google Cloud Testing API", - "discoveryVersion": "v1", "ownerName": "Google", + "discoveryVersion": "v1", "resources": { "projects": { "resources": { "testMatrices": { "methods": { - "get": { - "httpMethod": "GET", - "response": { - "$ref": "TestMatrix" - }, - "parameterOrder": [ - "projectId", - "testMatrixId" - ], - "parameters": { - "projectId": { - "location": "path", - "description": "Cloud project that owns the test matrix.", - "type": "string", - "required": true - }, - "testMatrixId": { - "description": "Unique test matrix id which was assigned by the service.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only" - ], - "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}", - "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}", - "id": "testing.projects.testMatrices.get", - "description": "Check the status of a test matrix.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist" - }, "create": { + "id": "testing.projects.testMatrices.create", + "path": "v1/projects/{projectId}/testMatrices", "description": "Request to run a matrix of tests according to the given specifications.\nUnsupported environments will be returned in the state UNSUPPORTED.\nMatrices are limited to at most 200 supported executions.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to write to project\n- INVALID_ARGUMENT - if the request is malformed or if the matrix expands\n to more than 200 supported executions", "request": { "$ref": "TestMatrix" }, - "httpMethod": "POST", - "parameterOrder": [ - "projectId" - ], "response": { "$ref": "TestMatrix" }, + "parameterOrder": [ + "projectId" + ], + "httpMethod": "POST", "parameters": { "projectId": { - "location": "path", "description": "The GCE project under which this job will run.", "type": "string", - "required": true + "required": true, + "location": "path" }, "requestId": { + "location": "query", "description": "A string id used to detect duplicated requests.\nIds are automatically scoped to a project, so\nusers should ensure the ID is unique per-project.\nA UUID is recommended.\n\nOptional, but strongly recommended.", - "type": "string", - "location": "query" + "type": "string" } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], - "flatPath": "v1/projects/{projectId}/testMatrices", - "path": "v1/projects/{projectId}/testMatrices", - "id": "testing.projects.testMatrices.create" + "flatPath": "v1/projects/{projectId}/testMatrices" }, "cancel": { - "description": "Cancels unfinished test executions in a test matrix.\nThis call returns immediately and cancellation proceeds asychronously.\nIf the matrix is already final, this operation will have no effect.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist", "response": { "$ref": "CancelTestMatrixResponse" }, @@ -81,6 +54,9 @@ "testMatrixId" ], "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], "parameters": { "projectId": { "description": "Cloud project that owns the test.", @@ -89,18 +65,48 @@ "location": "path" }, "testMatrixId": { + "location": "path", "description": "Test matrix that will be canceled.", "type": "string", + "required": true + } + }, + "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", + "id": "testing.projects.testMatrices.cancel", + "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", + "description": "Cancels unfinished test executions in a test matrix.\nThis call returns immediately and cancellation proceeds asychronously.\nIf the matrix is already final, this operation will have no effect.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist" + }, + "get": { + "httpMethod": "GET", + "parameterOrder": [ + "projectId", + "testMatrixId" + ], + "response": { + "$ref": "TestMatrix" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ], + "parameters": { + "projectId": { + "description": "Cloud project that owns the test matrix.", + "type": "string", "required": true, "location": "path" + }, + "testMatrixId": { + "location": "path", + "description": "Unique test matrix id which was assigned by the service.", + "type": "string", + "required": true } }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ], - "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", - "id": "testing.projects.testMatrices.cancel", - "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel" + "flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}", + "path": "v1/projects/{projectId}/testMatrices/{testMatrixId}", + "id": "testing.projects.testMatrices.get", + "description": "Check the status of a test matrix.\n\nMay return any of the following canonical error codes:\n\n- PERMISSION_DENIED - if the user is not authorized to read project\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the Test Matrix does not exist" } } } @@ -109,8 +115,6 @@ "testEnvironmentCatalog": { "methods": { "get": { - "id": "testing.testEnvironmentCatalog.get", - "path": "v1/testEnvironmentCatalog/{environmentType}", "description": "Get the catalog of supported test environments.\n\nMay return any of the following canonical error codes:\n\n- INVALID_ARGUMENT - if the request is malformed\n- NOT_FOUND - if the environment type does not exist\n- INTERNAL - if an internal error occurred", "response": { "$ref": "TestEnvironmentCatalog" @@ -126,6 +130,7 @@ "description": "For authorization, the cloud project requesting the TestEnvironmentCatalog.\nOptional" }, "environmentType": { + "description": "The type of environment that should be listed.\nRequired", "type": "string", "required": true, "location": "path", @@ -133,27 +138,43 @@ "ENVIRONMENT_TYPE_UNSPECIFIED", "ANDROID", "NETWORK_CONFIGURATION" - ], - "description": "The type of environment that should be listed.\nRequired" + ] } }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-platform.read-only" ], - "flatPath": "v1/testEnvironmentCatalog/{environmentType}" + "flatPath": "v1/testEnvironmentCatalog/{environmentType}", + "id": "testing.testEnvironmentCatalog.get", + "path": "v1/testEnvironmentCatalog/{environmentType}" } } } }, "parameters": { - "callback": { + "upload_protocol": { + "type": "string", "location": "query", - "description": "JSONP", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")." + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, "$.xgafv": { - "location": "query", "enum": [ "1", "2" @@ -163,7 +184,13 @@ "enumDescriptions": [ "v1 error format", "v2 error format" - ] + ], + "location": "query" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" }, "alt": { "enum": [ @@ -202,39 +229,778 @@ "default": "true", "type": "boolean" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string", - "location": "query" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, - "uploadType": { "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "description": "OAuth bearer token.", + "type": "string" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", "type": "string" } }, "schemas": { + "AndroidModel": { + "description": "A description of an Android device tests may be run on.", + "type": "object", + "properties": { + "tags": { + "description": "Tags for this dimension.\nExamples: \"default\", \"preview\", \"deprecated\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The unique opaque id for this model.\nUse this for invoking the TestExecutionService.\n@OutputOnly", + "type": "string" + }, + "manufacturer": { + "description": "The manufacturer of this device.\n@OutputOnly", + "type": "string" + }, + "brand": { + "description": "The company that this device is branded with.\nExample: \"Google\", \"Samsung\"\n@OutputOnly", + "type": "string" + }, + "screenX": { + "format": "int32", + "description": "Screen size in the horizontal (X) dimension measured in pixels.\n@OutputOnly", + "type": "integer" + }, + "codename": { + "type": "string", + "description": "The name of the industrial design.\nThis corresponds to android.os.Build.DEVICE\n@OutputOnly" + }, + "screenY": { + "format": "int32", + "description": "Screen size in the vertical (Y) dimension measured in pixels.\n@OutputOnly", + "type": "integer" + }, + "form": { + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "A software stack that simulates the device", + "Actual hardware" + ], + "enum": [ + "DEVICE_FORM_UNSPECIFIED", + "VIRTUAL", + "PHYSICAL" + ], + "description": "Whether this device is virtual or physical.\n@OutputOnly", + "type": "string" + }, + "screenDensity": { + "type": "integer", + "format": "int32", + "description": "Screen density in DPI.\nThis corresponds to ro.sf.lcd_density\n@OutputOnly" + }, + "supportedVersionIds": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The set of Android versions this device supports.\n@OutputOnly" + }, + "supportedAbis": { + "description": "The list of supported ABIs for this device.\nThis corresponds to either android.os.Build.SUPPORTED_ABIS (for API level\n21 and above) or android.os.Build.CPU_ABI/CPU_ABI2.\nThe most preferred ABI is the first element in the list.\n\nElements are optionally prefixed by \"version_id:\" (where version_id is\nthe id of an AndroidVersion), denoting an ABI that is supported only on\na particular version.\n@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + }, + "name": { + "description": "The human-readable marketing name for this device model.\nExamples: \"Nexus 5\", \"Galaxy S5\"\n@OutputOnly", + "type": "string" + } + }, + "id": "AndroidModel" + }, + "TestSetup": { + "description": "A description of how to set up the device prior to running the test", + "type": "object", + "properties": { + "directoriesToPull": { + "description": "The directories on the device to upload to GCS at the end of the test;\nthey must be absolute, whitelisted paths.\nRefer to RegularFile for whitelisted paths.\nOptional", + "items": { + "type": "string" + }, + "type": "array" + }, + "filesToPush": { + "description": "Optional", + "items": { + "$ref": "DeviceFile" + }, + "type": "array" + }, + "networkProfile": { + "description": "The network traffic profile used for running the test.\nOptional", + "type": "string" + }, + "environmentVariables": { + "description": "Environment variables to set for the test (only applicable for\ninstrumentation tests).", + "items": { + "$ref": "EnvironmentVariable" + }, + "type": "array" + }, + "account": { + "description": "The device will be logged in on this account for the duration of the test.\nOptional", + "$ref": "Account" + } + }, + "id": "TestSetup" + }, + "TestSpecification": { + "id": "TestSpecification", + "description": "A description of how to run the test.", + "type": "object", + "properties": { + "testTimeout": { + "format": "google-duration", + "description": "Max time a test execution is allowed to run before it is\nautomatically cancelled.\nOptional, default is 5 min.", + "type": "string" + }, + "autoGoogleLogin": { + "type": "boolean", + "description": "Enables automatic Google account login.\nIf set, the service will automatically generate a Google test account and\nadd it to the device, before executing the test. Note that test accounts\nmight be reused.\nMany applications show their full set of functionalities when an account is\npresent on the device. Logging into the device with these generated\naccounts allows testing more functionalities.\nDefault is false.\nOptional" + }, + "androidTestLoop": { + "description": "An Android Application with a Test Loop", + "$ref": "AndroidTestLoop" + }, + "testSetup": { + "$ref": "TestSetup", + "description": "Test setup requirements e.g. files to install, bootstrap scripts\nOptional" + }, + "androidRoboTest": { + "$ref": "AndroidRoboTest", + "description": "An Android robo test." + }, + "androidInstrumentationTest": { + "description": "An Android instrumentation test.", + "$ref": "AndroidInstrumentationTest" + }, + "disablePerformanceMetrics": { + "description": "Disables performance metrics recording; may reduce test latency.", + "type": "boolean" + }, + "disableVideoRecording": { + "description": "Disables video recording; may reduce test latency.", + "type": "boolean" + } + } + }, + "TestMatrix": { + "description": "A group of one or more TestExecutions, built by taking a\nproduct of values over a pre-defined set of axes.", + "type": "object", + "properties": { + "resultStorage": { + "$ref": "ResultStorage", + "description": "Where the results for the matrix are written.\nRequired" + }, + "testMatrixId": { + "description": "Unique id set by the service.\n@OutputOnly", + "type": "string" + }, + "invalidMatrixDetails": { + "type": "string", + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "The matrix is INVALID, but there are no further details available.", + "The input app APK could not be parsed.", + "The input test APK could not be parsed.", + "The AndroidManifest.xml could not be found.", + "The APK manifest does not declare a package name.", + "The test package and app package are the same.", + "The test apk does not declare an instrumentation.", + "The input app apk does not have a signature.", + "The test runner class specified by user or in the test APK's manifest file\nis not compatible with Android Test Orchestrator.\nOrchestrator is only compatible with AndroidJUnitRunner version 1.0 or\nhigher.\nOrchestrator can be disabled by using DO_NOT_USE_ORCHESTRATOR\nOrchestratorOption.", + "The test APK does not contain the test runner class specified by user or in\nthe manifest file.\nThis can be caused by either of the following reasons:\n- the user provided a runner class name that's incorrect, or\n- the test runner isn't built into the test APK (might be in the app APK\ninstead).", + "A main launcher activity could not be found.", + "The app declares one or more permissions that are not allowed.", + "There is a conflict in the provided robo_directives.", + "There there is no test loop intent filter, or the one that is given is\nnot formatted correctly.", + "The request contains a scenario label that was not declared in the\nmanifest.", + "There was an error when parsing a label's value.", + "The request contains a scenario number that was not declared in the\nmanifest.", + "Device administrator applications are not allowed.", + "The APK is marked as \"testOnly\"." + ], + "enum": [ + "INVALID_MATRIX_DETAILS_UNSPECIFIED", + "DETAILS_UNAVAILABLE", + "MALFORMED_APK", + "MALFORMED_TEST_APK", + "NO_MANIFEST", + "NO_PACKAGE_NAME", + "TEST_SAME_AS_APP", + "NO_INSTRUMENTATION", + "NO_SIGNATURE", + "INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE", + "NO_TEST_RUNNER_CLASS", + "NO_LAUNCHER_ACTIVITY", + "FORBIDDEN_PERMISSIONS", + "INVALID_ROBO_DIRECTIVES", + "TEST_LOOP_INTENT_FILTER_NOT_FOUND", + "SCENARIO_LABEL_NOT_DECLARED", + "SCENARIO_LABEL_MALFORMED", + "SCENARIO_NOT_DECLARED", + "DEVICE_ADMIN_RECEIVER", + "TEST_ONLY_APK" + ], + "description": "Describes why the matrix is considered invalid.\nOnly useful for matrices in the INVALID state.\n@OutputOnly" + }, + "state": { + "description": "Indicates the current progress of the test matrix (e.g., FINISHED)\n@OutputOnly", + "type": "string", + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "The execution or matrix is being validated.", + "The execution or matrix is waiting for resources to become available.", + "The execution is currently being processed.\n\nCan only be set on an execution.", + "The execution or matrix has terminated normally.\n\nOn a matrix this means that the matrix level processing completed normally,\nbut individual executions may be in an ERROR state.", + "The execution or matrix has stopped because it encountered an\ninfrastructure failure.", + "The execution was not run because it corresponds to a unsupported\nenvironment.\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested environment.\n\nExample: requested AndroidVersion is lower than APK's minSdkVersion\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested architecture.\n\nExample: requested device does not support running the native code in\nthe supplied APK\n\nCan only be set on an execution.", + "The user cancelled the execution.\n\nCan only be set on an execution.", + "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" + ], + "enum": [ + "TEST_STATE_UNSPECIFIED", + "VALIDATING", + "PENDING", + "RUNNING", + "FINISHED", + "ERROR", + "UNSUPPORTED_ENVIRONMENT", + "INCOMPATIBLE_ENVIRONMENT", + "INCOMPATIBLE_ARCHITECTURE", + "CANCELLED", + "INVALID" + ] + }, + "testSpecification": { + "$ref": "TestSpecification", + "description": "How to run the test.\nRequired" + }, + "projectId": { + "description": "The cloud project that owns the test matrix.\n@OutputOnly", + "type": "string" + }, + "clientInfo": { + "$ref": "ClientInfo", + "description": "Information about the client which invoked the test.\nOptional" + }, + "testExecutions": { + "description": "The list of test executions that the service creates for this matrix.\n@OutputOnly", + "items": { + "$ref": "TestExecution" + }, + "type": "array" + }, + "timestamp": { + "format": "google-datetime", + "description": "The time this test matrix was initially created.\n@OutputOnly", + "type": "string" + }, + "environmentMatrix": { + "description": "How the host machine(s) are configured.\nRequired", + "$ref": "EnvironmentMatrix" + } + }, + "id": "TestMatrix" + }, + "ResultStorage": { + "description": "Locations where the results of running the test are stored.", + "type": "object", + "properties": { + "toolResultsExecution": { + "$ref": "ToolResultsExecution", + "description": "The tool results execution that results are written to.\n@OutputOnly" + }, + "toolResultsHistory": { + "description": "The tool results history that contains the tool results execution that\nresults are written to.\n\nOptional, if not provided the service will choose an appropriate value.", + "$ref": "ToolResultsHistory" + }, + "googleCloudStorage": { + "$ref": "GoogleCloudStorage", + "description": "Required." + } + }, + "id": "ResultStorage" + }, + "FileReference": { + "type": "object", + "properties": { + "gcsPath": { + "description": "A path to a file in Google Cloud Storage.\nExample: gs://build-app-1414623860166/app-debug-unaligned.apk", + "type": "string" + } + }, + "id": "FileReference", + "description": "A reference to a file, used for user inputs." + }, + "AndroidVersion": { + "description": "A version of the Android OS", + "type": "object", + "properties": { + "apiLevel": { + "format": "int32", + "description": "The API level for this Android version.\nExamples: 18, 19\n@OutputOnly", + "type": "integer" + }, + "distribution": { + "$ref": "Distribution", + "description": "Market share for this version.\n@OutputOnly" + }, + "releaseDate": { + "$ref": "Date", + "description": "The date this Android version became available in the market.\n@OutputOnly" + }, + "id": { + "description": "An opaque id for this Android version.\nUse this id to invoke the TestExecutionService.\n@OutputOnly", + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array", + "description": "Tags for this dimension.\nExamples: \"default\", \"preview\", \"deprecated\"" + }, + "versionString": { + "description": "A string representing this version of the Android OS.\nExamples: \"4.3\", \"4.4\"\n@OutputOnly", + "type": "string" + }, + "codeName": { + "description": "The code name for this Android version.\nExamples: \"JellyBean\", \"KitKat\"\n@OutputOnly", + "type": "string" + } + }, + "id": "AndroidVersion" + }, + "TestDetails": { + "type": "object", + "properties": { + "errorMessage": { + "description": "If the TestState is ERROR, then this string will contain human-readable\ndetails about the error.\n@OutputOnly", + "type": "string" + }, + "progressMessages": { + "description": "Human-readable, detailed descriptions of the test's progress.\nFor example: \"Provisioning a device\", \"Starting Test\".\n\nDuring the course of execution new data may be appended\nto the end of progress_messages.\n@OutputOnly", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "id": "TestDetails", + "description": "Additional details about the progress of the running test." + }, + "ToolResultsExecution": { + "description": "Represents a tool results execution resource.\n\nThis has the results of a TestMatrix.", + "type": "object", + "properties": { + "historyId": { + "description": "A tool results history ID.\n@OutputOnly", + "type": "string" + }, + "projectId": { + "description": "The cloud project that owns the tool results execution.\n@OutputOnly", + "type": "string" + }, + "executionId": { + "description": "A tool results execution ID.\n@OutputOnly", + "type": "string" + } + }, + "id": "ToolResultsExecution" + }, + "ToolResultsHistory": { + "description": "Represents a tool results history resource.", + "type": "object", + "properties": { + "historyId": { + "description": "A tool results history ID.\nRequired", + "type": "string" + }, + "projectId": { + "description": "The cloud project that owns the tool results history.\nRequired", + "type": "string" + } + }, + "id": "ToolResultsHistory" + }, + "AndroidRoboTest": { + "description": "A test of an android application that explores the application on a virtual\nor physical Android Device, finding culprits and crashes as it goes.", + "type": "object", + "properties": { + "roboDirectives": { + "description": "A set of directives Robo should apply during the crawl.\nThis allows users to customize the crawl. For example, the username and\npassword for a test account can be provided.\nOptional", + "items": { + "$ref": "RoboDirective" + }, + "type": "array" + }, + "maxDepth": { + "format": "int32", + "description": "The max depth of the traversal stack Robo can explore. Needs to be at least\n2 to make Robo explore the app beyond the first activity.\nDefault is 50.\nOptional", + "type": "integer" + }, + "appApk": { + "$ref": "FileReference", + "description": "The APK for the application under test.\nRequired" + }, + "appPackageId": { + "description": "The java package for the application under test.\nOptional, default is determined by examining the application's manifest.", + "type": "string" + }, + "appInitialActivity": { + "type": "string", + "description": "The initial activity that should be used to start the app.\nOptional" + }, + "maxSteps": { + "format": "int32", + "description": "The max number of steps Robo can execute.\nDefault is no limit.\nOptional", + "type": "integer" + } + }, + "id": "AndroidRoboTest" + }, + "Distribution": { + "description": "Data about the relative number of devices running a\ngiven configuration of the Android platform.", + "type": "object", + "properties": { + "marketShare": { + "format": "double", + "description": "The estimated fraction (0-1) of the total market with this configuration.\n@OutputOnly", + "type": "number" + }, + "measurementTime": { + "format": "google-datetime", + "description": "The time this distribution was measured.\n@OutputOnly", + "type": "string" + } + }, + "id": "Distribution" + }, + "Orientation": { + "description": "Screen orientation of the device.", + "type": "object", + "properties": { + "tags": { + "description": "Tags for this dimension.\nExamples: \"default\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The id for this orientation.\nExample: \"portrait\"\n@OutputOnly", + "type": "string" + }, + "name": { + "description": "A human-friendly name for this orientation.\nExample: \"portrait\"\n@OutputOnly", + "type": "string" + } + }, + "id": "Orientation" + }, + "NetworkConfigurationCatalog": { + "type": "object", + "properties": { + "configurations": { + "items": { + "$ref": "NetworkConfiguration" + }, + "type": "array" + } + }, + "id": "NetworkConfigurationCatalog" + }, + "AndroidTestLoop": { + "description": "A test of an Android Application with a Test Loop.\nThe intent \u003cintent-name\u003e will be implicitly added, since Games is the only\nuser of this api, for the time being.", + "type": "object", + "properties": { + "scenarioLabels": { + "description": "The list of scenario labels that should be run during the test.\nThe scenario labels should map to labels defined in the application's\nmanifest. For example, player_experience and\ncom.google.test.loops.player_experience add all of the loops labeled in the\nmanifest with the com.google.test.loops.player_experience name to the\nexecution.\nOptional. Scenarios can also be specified in the scenarios field.", + "items": { + "type": "string" + }, + "type": "array" + }, + "scenarios": { + "description": "The list of scenarios that should be run during the test.\nOptional, default is all test loops, derived from the application's\nmanifest.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "appPackageId": { + "description": "The java package for the application under test.\nOptional, default is determined by examining the application's manifest.", + "type": "string" + }, + "appApk": { + "description": "The APK for the application under test.\nRequired", + "$ref": "FileReference" + } + }, + "id": "AndroidTestLoop" + }, + "GoogleAuto": { + "description": "Enables automatic Google account login.\nIf set, the service will automatically generate a Google test account and add\nit to the device, before executing the test. Note that test accounts might be\nreused.\nMany applications show their full set of functionalities when an account is\npresent on the device. Logging into the device with these generated accounts\nallows testing more functionalities.", + "type": "object", + "properties": {}, + "id": "GoogleAuto" + }, + "AndroidDeviceCatalog": { + "description": "The currently supported Android devices.", + "type": "object", + "properties": { + "runtimeConfiguration": { + "$ref": "AndroidRuntimeConfiguration", + "description": "The set of supported runtime configurations.\n@OutputOnly" + }, + "versions": { + "description": "The set of supported Android OS versions.\n@OutputOnly", + "items": { + "$ref": "AndroidVersion" + }, + "type": "array" + }, + "models": { + "description": "The set of supported Android device models.\n@OutputOnly", + "items": { + "$ref": "AndroidModel" + }, + "type": "array" + } + }, + "id": "AndroidDeviceCatalog" + }, + "AndroidDeviceList": { + "id": "AndroidDeviceList", + "description": "A list of Android device configurations in which the test is to be executed.", + "type": "object", + "properties": { + "androidDevices": { + "description": "A list of Android devices\nRequired", + "items": { + "$ref": "AndroidDevice" + }, + "type": "array" + } + } + }, + "ClientInfo": { + "id": "ClientInfo", + "description": "Information about the client which invoked the test.", + "type": "object", + "properties": { + "clientInfoDetails": { + "description": "The list of detailed information about client.", + "items": { + "$ref": "ClientInfoDetail" + }, + "type": "array" + }, + "name": { + "description": "Client name, such as gcloud.\nRequired", + "type": "string" + } + } + }, + "EnvironmentMatrix": { + "properties": { + "androidMatrix": { + "$ref": "AndroidMatrix", + "description": "A matrix of Android devices." + }, + "androidDeviceList": { + "$ref": "AndroidDeviceList", + "description": "A list of Android devices; the test will be run only on the specified\ndevices." + } + }, + "id": "EnvironmentMatrix", + "description": "The matrix of environments in which the test is to be executed.", + "type": "object" + }, + "CancelTestMatrixResponse": { + "description": "Response containing the current state of the specified test matrix.", + "type": "object", + "properties": { + "testState": { + "description": "The current rolled-up state of the test matrix.\nIf this state is already final, then the cancelation request will\nhave no effect.", + "type": "string", + "enumDescriptions": [ + "Do not use. For proto versioning only.", + "The execution or matrix is being validated.", + "The execution or matrix is waiting for resources to become available.", + "The execution is currently being processed.\n\nCan only be set on an execution.", + "The execution or matrix has terminated normally.\n\nOn a matrix this means that the matrix level processing completed normally,\nbut individual executions may be in an ERROR state.", + "The execution or matrix has stopped because it encountered an\ninfrastructure failure.", + "The execution was not run because it corresponds to a unsupported\nenvironment.\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested environment.\n\nExample: requested AndroidVersion is lower than APK's minSdkVersion\n\nCan only be set on an execution.", + "The execution was not run because the provided inputs are incompatible with\nthe requested architecture.\n\nExample: requested device does not support running the native code in\nthe supplied APK\n\nCan only be set on an execution.", + "The user cancelled the execution.\n\nCan only be set on an execution.", + "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" + ], + "enum": [ + "TEST_STATE_UNSPECIFIED", + "VALIDATING", + "PENDING", + "RUNNING", + "FINISHED", + "ERROR", + "UNSUPPORTED_ENVIRONMENT", + "INCOMPATIBLE_ENVIRONMENT", + "INCOMPATIBLE_ARCHITECTURE", + "CANCELLED", + "INVALID" + ] + } + }, + "id": "CancelTestMatrixResponse" + }, + "Date": { + "type": "object", + "properties": { + "month": { + "format": "int32", + "description": "Month of year. Must be from 1 to 12.", + "type": "integer" + }, + "day": { + "format": "int32", + "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", + "type": "integer" + }, + "year": { + "format": "int32", + "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", + "type": "integer" + } + }, + "id": "Date", + "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`." + }, + "Account": { + "description": "Identifies an account and how to log into it", + "type": "object", + "properties": { + "googleAuto": { + "description": "An automatic google login account", + "$ref": "GoogleAuto" + } + }, + "id": "Account" + }, + "TestEnvironmentCatalog": { + "properties": { + "androidDeviceCatalog": { + "$ref": "AndroidDeviceCatalog", + "description": "Android devices suitable for running Android Instrumentation Tests." + }, + "networkConfigurationCatalog": { + "$ref": "NetworkConfigurationCatalog", + "description": "Supported network configurations" + } + }, + "id": "TestEnvironmentCatalog", + "description": "A description of a test environment.", + "type": "object" + }, + "Locale": { + "description": "A location/region designation for language.", + "type": "object", + "properties": { + "tags": { + "description": "Tags for this dimension.\nExamples: \"default\"", + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "description": "The id for this locale.\nExample: \"en_US\"\n@OutputOnly", + "type": "string" + }, + "region": { + "description": "A human-friendy string representing the region for this locale.\nExample: \"United States\"\nNot present for every locale.\n@OutputOnly", + "type": "string" + }, + "name": { + "description": "A human-friendly name for this language/locale.\nExample: \"English\"\n@OutputOnly", + "type": "string" + } + }, + "id": "Locale" + }, + "ObbFile": { + "description": "An opaque binary blob file to install on the device before the test starts", + "type": "object", + "properties": { + "obb": { + "$ref": "FileReference", + "description": "Opaque Binary Blob (OBB) file(s) to install on the device\nRequired" + }, + "obbFileName": { + "description": "OBB file name which must conform to the format as specified by\nAndroid\ne.g. [main|patch].0300110.com.example.android.obb\nwhich will be installed into\n \u003cshared-storage\u003e/Android/obb/\u003cpackage-name\u003e/\non the device\nRequired", + "type": "string" + } + }, + "id": "ObbFile" + }, + "AndroidRuntimeConfiguration": { + "description": "Configuration that can be selected at the time a test is run.", + "type": "object", + "properties": { + "orientations": { + "description": "The set of available orientations.\n@OutputOnly", + "items": { + "$ref": "Orientation" + }, + "type": "array" + }, + "locales": { + "description": "The set of available locales.\n@OutputOnly", + "items": { + "$ref": "Locale" + }, + "type": "array" + } + }, + "id": "AndroidRuntimeConfiguration" + }, + "AndroidDevice": { + "id": "AndroidDevice", + "description": "A single Android device.", + "type": "object", + "properties": { + "locale": { + "description": "The locale the test device used for testing.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "type": "string" + }, + "androidVersionId": { + "type": "string", + "description": "The id of the Android OS version to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired" + }, + "androidModelId": { + "description": "The id of the Android device to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "type": "string" + }, + "orientation": { + "description": "How the device is oriented during the test.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", + "type": "string" + } + } + }, "NetworkConfiguration": { "type": "object", "properties": { @@ -243,8 +1009,8 @@ "type": "string" }, "upRule": { - "$ref": "TrafficRule", - "description": "The emulation rule applying to the upload traffic" + "description": "The emulation rule applying to the upload traffic", + "$ref": "TrafficRule" }, "downRule": { "$ref": "TrafficRule", @@ -270,8 +1036,8 @@ "type": "string" }, "projectId": { - "type": "string", - "description": "The cloud project that owns the tool results step.\n@OutputOnly" + "description": "The cloud project that owns the tool results step.\n@OutputOnly", + "type": "string" } }, "id": "ToolResultsStep" @@ -281,9 +1047,9 @@ "type": "object", "properties": { "bandwidth": { - "type": "number", "format": "float", - "description": "Bandwidth in kbits/second" + "description": "Bandwidth in kbits/second", + "type": "number" }, "packetDuplicationRatio": { "format": "float", @@ -333,6 +1099,7 @@ "description": "The APK for the application under test.\nRequired" }, "orchestratorOption": { + "description": "The option of whether running each test within its own invocation of\ninstrumentation with Android Test Orchestrator or not.\n** Orchestrator is only compatible with AndroidJUnitRunner version 1.0 or\nhigher! **\nOrchestrator offers the following benefits:\n - No shared state\n - Crashes are isolated\n - Logs are scoped per test\n\nSee\n\u003chttps://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator\u003e\nfor more information about Android Test Orchestrator.\n\nOptional, if empty, test will be run without orchestrator.", "type": "string", "enumDescriptions": [ "This means that the server should choose the mode. And test will be run\nwithout orchestrator.\nUsing orchestrator is highly encouraged because of all the benefits it\noffers. And in the future, all instrumentation tests will be run with\norchestrator by default if preference unspecified.", @@ -343,20 +1110,20 @@ "ORCHESTRATOR_OPTION_UNSPECIFIED", "USE_ORCHESTRATOR", "DO_NOT_USE_ORCHESTRATOR" - ], - "description": "The option of whether running each test within its own invocation of\ninstrumentation with Android Test Orchestrator or not.\n** Orchestrator is only compatible with AndroidJUnitRunner version 1.0 or\nhigher! **\nOrchestrator offers the following benefits:\n - No shared state\n - Crashes are isolated\n - Logs are scoped per test\n\nSee\n\u003chttps://developer.android.com/training/testing/junit-runner.html#using-android-test-orchestrator\u003e\nfor more information about Android Test Orchestrator.\n\nOptional, if empty, test will be run without orchestrator." + ] }, "testTargets": { + "description": "Each target must be fully qualified with the package name or class name,\nin one of these formats:\n - \"package package_name\"\n - \"class package_name.class_name\"\n - \"class package_name.class_name#method_name\"\n\nOptional, if empty, all targets in the module will be run.", "items": { "type": "string" }, - "type": "array", - "description": "Each target must be fully qualified with the package name or class name,\nin one of these formats:\n - \"package package_name\"\n - \"class package_name.class_name\"\n - \"class package_name.class_name#method_name\"\n\nOptional, if empty, all targets in the module will be run." + "type": "array" } }, "id": "AndroidInstrumentationTest" }, "DeviceFile": { + "id": "DeviceFile", "description": "A single device file description.", "type": "object", "properties": { @@ -364,94 +1131,56 @@ "description": "A reference to an opaque binary blob file", "$ref": "ObbFile" } - }, - "id": "DeviceFile" + } }, "ClientInfoDetail": { - "id": "ClientInfoDetail", - "description": "Key-value pair of detailed information about the client which invoked the\ntest. For example {'Version', '1.0'}, {'Release Track', 'BETA'}", - "type": "object", "properties": { - "key": { - "description": "The key of detailed client information.\nRequired", - "type": "string" - }, "value": { "description": "The value of detailed client information.\nRequired", "type": "string" + }, + "key": { + "description": "The key of detailed client information.\nRequired", + "type": "string" } - } + }, + "id": "ClientInfoDetail", + "description": "Key-value pair of detailed information about the client which invoked the\ntest. For example {'Version', '1.0'}, {'Release Track', 'BETA'}", + "type": "object" }, "EnvironmentVariable": { "description": "A key-value pair passed as an environment variable to the test", "type": "object", "properties": { + "key": { + "type": "string", + "description": "Key for the environment variable" + }, "value": { "description": "Value for the environment variable", "type": "string" - }, - "key": { - "description": "Key for the environment variable", - "type": "string" } }, "id": "EnvironmentVariable" }, "Environment": { - "description": "The environment in which the test is run.", - "type": "object", "properties": { "androidDevice": { "description": "An Android device which must be used with an Android test.", "$ref": "AndroidDevice" } }, - "id": "Environment" - }, - "GoogleCloudStorage": { - "description": "A storage location within Google cloud storage (GCS).", - "type": "object", - "properties": { - "gcsPath": { - "description": "The path to a directory in GCS that will\neventually contain the results for this test.\nThe requesting user must have write access on the bucket in the supplied\npath.\nRequired", - "type": "string" - } - }, - "id": "GoogleCloudStorage" + "id": "Environment", + "description": "The environment in which the test is run.", + "type": "object" }, "TestExecution": { "properties": { - "timestamp": { - "format": "google-datetime", - "description": "The time this test execution was initially created.\n@OutputOnly", - "type": "string" - }, - "testDetails": { - "description": "Additional details about the running test.\n@OutputOnly", - "$ref": "TestDetails" - }, - "matrixId": { - "description": "Id of the containing TestMatrix.\n@OutputOnly", - "type": "string" - }, "environment": { "description": "How the host machine(s) are configured.\n@OutputOnly", "$ref": "Environment" }, "state": { - "enumDescriptions": [ - "Do not use. For proto versioning only.", - "The execution or matrix is being validated.", - "The execution or matrix is waiting for resources to become available.", - "The execution is currently being processed.\n\nCan only be set on an execution.", - "The execution or matrix has terminated normally.\n\nOn a matrix this means that the matrix level processing completed normally,\nbut individual executions may be in an ERROR state.", - "The execution or matrix has stopped because it encountered an\ninfrastructure failure.", - "The execution was not run because it corresponds to a unsupported\nenvironment.\n\nCan only be set on an execution.", - "The execution was not run because the provided inputs are incompatible with\nthe requested environment.\n\nExample: requested AndroidVersion is lower than APK's minSdkVersion\n\nCan only be set on an execution.", - "The execution was not run because the provided inputs are incompatible with\nthe requested architecture.\n\nExample: requested device does not support running the native code in\nthe supplied APK\n\nCan only be set on an execution.", - "The user cancelled the execution.\n\nCan only be set on an execution.", - "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" - ], "enum": [ "TEST_STATE_UNSPECIFIED", "VALIDATING", @@ -466,702 +1195,6 @@ "INVALID" ], "description": "Indicates the current progress of the test execution (e.g., FINISHED).\n@OutputOnly", - "type": "string" - }, - "toolResultsStep": { - "description": "Where the results for this execution are written.\n@OutputOnly", - "$ref": "ToolResultsStep" - }, - "projectId": { - "description": "The cloud project that owns the test execution.\n@OutputOnly", - "type": "string" - }, - "testSpecification": { - "$ref": "TestSpecification", - "description": "How to run the test.\n@OutputOnly" - }, - "id": { - "description": "Unique id set by the backend.\n@OutputOnly", - "type": "string" - } - }, - "id": "TestExecution", - "description": "Specifies a single test to be executed in a single environment.", - "type": "object" - }, - "RoboDirective": { - "description": "Directs Robo to interact with a specific UI element if it is encountered\nduring the crawl. Currently, Robo can perform text entry or element click.", - "type": "object", - "properties": { - "inputText": { - "description": "The text that Robo is directed to set. If left empty, the directive will be\ntreated as a CLICK on the element matching the resource_name.\nOptional", - "type": "string" - }, - "resourceName": { - "description": "The android resource name of the target UI element\nFor example,\n in Java: R.string.foo\n in xml: @string/foo\nOnly the “foo” part is needed.\nReference doc:\nhttps://developer.android.com/guide/topics/resources/accessing-resources.html\nRequired", - "type": "string" - }, - "actionType": { - "type": "string", - "enumDescriptions": [ - "DO NOT USE. For proto versioning only.", - "Direct Robo to click on the specified element. No-op if specified element\nis not clickable.", - "Direct Robo to enter text on the specified element. No-op if specified\nelement is not enabled or does not allow text entry." - ], - "enum": [ - "ACTION_TYPE_UNSPECIFIED", - "SINGLE_CLICK", - "ENTER_TEXT" - ], - "description": "The type of action that Robo should perform on the specified element.\nRequired." - } - }, - "id": "RoboDirective" - }, - "AndroidMatrix": { - "description": "A set of Android device configuration permutations is defined by the\nthe cross-product of the given axes. Internally, the given AndroidMatrix\nwill be expanded into a set of AndroidDevices.\n\nOnly supported permutations will be instantiated. Invalid permutations\n(e.g., incompatible models/versions) are ignored.", - "type": "object", - "properties": { - "androidModelIds": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The ids of the set of Android device to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired" - }, - "orientations": { - "description": "The set of orientations to test with.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", - "items": { - "type": "string" - }, - "type": "array" - }, - "locales": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The set of locales the test device will enable for testing.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired" - }, - "androidVersionIds": { - "description": "The ids of the set of Android OS version to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "AndroidMatrix" - }, - "AndroidModel": { - "properties": { - "screenDensity": { - "format": "int32", - "description": "Screen density in DPI.\nThis corresponds to ro.sf.lcd_density\n@OutputOnly", - "type": "integer" - }, - "supportedVersionIds": { - "description": "The set of Android versions this device supports.\n@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "supportedAbis": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The list of supported ABIs for this device.\nThis corresponds to either android.os.Build.SUPPORTED_ABIS (for API level\n21 and above) or android.os.Build.CPU_ABI/CPU_ABI2.\nThe most preferred ABI is the first element in the list.\n\nElements are optionally prefixed by \"version_id:\" (where version_id is\nthe id of an AndroidVersion), denoting an ABI that is supported only on\na particular version.\n@OutputOnly" - }, - "name": { - "description": "The human-readable marketing name for this device model.\nExamples: \"Nexus 5\", \"Galaxy S5\"\n@OutputOnly", - "type": "string" - }, - "tags": { - "description": "Tags for this dimension.\nExamples: \"default\", \"preview\", \"deprecated\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "The unique opaque id for this model.\nUse this for invoking the TestExecutionService.\n@OutputOnly", - "type": "string" - }, - "manufacturer": { - "description": "The manufacturer of this device.\n@OutputOnly", - "type": "string" - }, - "brand": { - "description": "The company that this device is branded with.\nExample: \"Google\", \"Samsung\"\n@OutputOnly", - "type": "string" - }, - "screenX": { - "format": "int32", - "description": "Screen size in the horizontal (X) dimension measured in pixels.\n@OutputOnly", - "type": "integer" - }, - "codename": { - "description": "The name of the industrial design.\nThis corresponds to android.os.Build.DEVICE\n@OutputOnly", - "type": "string" - }, - "screenY": { - "format": "int32", - "description": "Screen size in the vertical (Y) dimension measured in pixels.\n@OutputOnly", - "type": "integer" - }, - "form": { - "type": "string", - "enumDescriptions": [ - "Do not use. For proto versioning only.", - "A software stack that simulates the device", - "Actual hardware" - ], - "enum": [ - "DEVICE_FORM_UNSPECIFIED", - "VIRTUAL", - "PHYSICAL" - ], - "description": "Whether this device is virtual or physical.\n@OutputOnly" - } - }, - "id": "AndroidModel", - "description": "A description of an Android device tests may be run on.", - "type": "object" - }, - "TestSetup": { - "type": "object", - "properties": { - "filesToPush": { - "description": "Optional", - "items": { - "$ref": "DeviceFile" - }, - "type": "array" - }, - "networkProfile": { - "description": "The network traffic profile used for running the test.\nOptional", - "type": "string" - }, - "environmentVariables": { - "description": "Environment variables to set for the test (only applicable for\ninstrumentation tests).", - "items": { - "$ref": "EnvironmentVariable" - }, - "type": "array" - }, - "account": { - "$ref": "Account", - "description": "The device will be logged in on this account for the duration of the test.\nOptional" - }, - "directoriesToPull": { - "description": "The directories on the device to upload to GCS at the end of the test;\nthey must be absolute, whitelisted paths.\nRefer to RegularFile for whitelisted paths.\nOptional", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "id": "TestSetup", - "description": "A description of how to set up the device prior to running the test" - }, - "TestSpecification": { - "description": "A description of how to run the test.", - "type": "object", - "properties": { - "disableVideoRecording": { - "type": "boolean", - "description": "Disables video recording; may reduce test latency." - }, - "testTimeout": { - "format": "google-duration", - "description": "Max time a test execution is allowed to run before it is\nautomatically cancelled.\nOptional, default is 5 min.", - "type": "string" - }, - "autoGoogleLogin": { - "description": "Enables automatic Google account login.\nIf set, the service will automatically generate a Google test account and\nadd it to the device, before executing the test. Note that test accounts\nmight be reused.\nMany applications show their full set of functionalities when an account is\npresent on the device. Logging into the device with these generated\naccounts allows testing more functionalities.\nDefault is false.\nOptional", - "type": "boolean" - }, - "androidTestLoop": { - "$ref": "AndroidTestLoop", - "description": "An Android Application with a Test Loop" - }, - "androidRoboTest": { - "description": "An Android robo test.", - "$ref": "AndroidRoboTest" - }, - "testSetup": { - "$ref": "TestSetup", - "description": "Test setup requirements e.g. files to install, bootstrap scripts\nOptional" - }, - "androidInstrumentationTest": { - "$ref": "AndroidInstrumentationTest", - "description": "An Android instrumentation test." - }, - "disablePerformanceMetrics": { - "description": "Disables performance metrics recording; may reduce test latency.", - "type": "boolean" - } - }, - "id": "TestSpecification" - }, - "ResultStorage": { - "type": "object", - "properties": { - "toolResultsExecution": { - "$ref": "ToolResultsExecution", - "description": "The tool results execution that results are written to.\n@OutputOnly" - }, - "toolResultsHistory": { - "$ref": "ToolResultsHistory", - "description": "The tool results history that contains the tool results execution that\nresults are written to.\n\nOptional, if not provided the service will choose an appropriate value." - }, - "googleCloudStorage": { - "description": "Required.", - "$ref": "GoogleCloudStorage" - } - }, - "id": "ResultStorage", - "description": "Locations where the results of running the test are stored." - }, - "TestMatrix": { - "description": "A group of one or more TestExecutions, built by taking a\nproduct of values over a pre-defined set of axes.", - "type": "object", - "properties": { - "state": { - "enumDescriptions": [ - "Do not use. For proto versioning only.", - "The execution or matrix is being validated.", - "The execution or matrix is waiting for resources to become available.", - "The execution is currently being processed.\n\nCan only be set on an execution.", - "The execution or matrix has terminated normally.\n\nOn a matrix this means that the matrix level processing completed normally,\nbut individual executions may be in an ERROR state.", - "The execution or matrix has stopped because it encountered an\ninfrastructure failure.", - "The execution was not run because it corresponds to a unsupported\nenvironment.\n\nCan only be set on an execution.", - "The execution was not run because the provided inputs are incompatible with\nthe requested environment.\n\nExample: requested AndroidVersion is lower than APK's minSdkVersion\n\nCan only be set on an execution.", - "The execution was not run because the provided inputs are incompatible with\nthe requested architecture.\n\nExample: requested device does not support running the native code in\nthe supplied APK\n\nCan only be set on an execution.", - "The user cancelled the execution.\n\nCan only be set on an execution.", - "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" - ], - "enum": [ - "TEST_STATE_UNSPECIFIED", - "VALIDATING", - "PENDING", - "RUNNING", - "FINISHED", - "ERROR", - "UNSUPPORTED_ENVIRONMENT", - "INCOMPATIBLE_ENVIRONMENT", - "INCOMPATIBLE_ARCHITECTURE", - "CANCELLED", - "INVALID" - ], - "description": "Indicates the current progress of the test matrix (e.g., FINISHED)\n@OutputOnly", - "type": "string" - }, - "projectId": { - "type": "string", - "description": "The cloud project that owns the test matrix.\n@OutputOnly" - }, - "testSpecification": { - "$ref": "TestSpecification", - "description": "How to run the test.\nRequired" - }, - "clientInfo": { - "description": "Information about the client which invoked the test.\nOptional", - "$ref": "ClientInfo" - }, - "testExecutions": { - "items": { - "$ref": "TestExecution" - }, - "type": "array", - "description": "The list of test executions that the service creates for this matrix.\n@OutputOnly" - }, - "timestamp": { - "format": "google-datetime", - "description": "The time this test matrix was initially created.\n@OutputOnly", - "type": "string" - }, - "environmentMatrix": { - "description": "How the host machine(s) are configured.\nRequired", - "$ref": "EnvironmentMatrix" - }, - "resultStorage": { - "$ref": "ResultStorage", - "description": "Where the results for the matrix are written.\nRequired" - }, - "testMatrixId": { - "description": "Unique id set by the service.\n@OutputOnly", - "type": "string" - }, - "invalidMatrixDetails": { - "enumDescriptions": [ - "Do not use. For proto versioning only.", - "The matrix is INVALID, but there are no further details available.", - "The input app APK could not be parsed.", - "The input test APK could not be parsed.", - "The AndroidManifest.xml could not be found.", - "The APK manifest does not declare a package name.", - "The test package and app package are the same.", - "The test apk does not declare an instrumentation.", - "The input app apk does not have a signature.", - "The test runner class specified by user or in the test APK's manifest file\nis not compatible with Android Test Orchestrator.\nOrchestrator is only compatible with AndroidJUnitRunner version 1.0 or\nhigher.\nOrchestrator can be disabled by using DO_NOT_USE_ORCHESTRATOR\nOrchestratorOption.", - "The test APK does not contain the test runner class specified by user or in\nthe manifest file.\nThis can be caused by either of the following reasons:\n- the user provided a runner class name that's incorrect, or\n- the test runner isn't built into the test APK (might be in the app APK\ninstead).", - "A main launcher activity could not be found.", - "The app declares one or more permissions that are not allowed.", - "There is a conflict in the provided robo_directives.", - "There there is no test loop intent filter, or the one that is given is\nnot formatted correctly.", - "The request contains a scenario label that was not declared in the\nmanifest.", - "There was an error when parsing a label's value.", - "The request contains a scenario number that was not declared in the\nmanifest.", - "Device administrator applications are not allowed.", - "The APK is marked as \"testOnly\"." - ], - "enum": [ - "INVALID_MATRIX_DETAILS_UNSPECIFIED", - "DETAILS_UNAVAILABLE", - "MALFORMED_APK", - "MALFORMED_TEST_APK", - "NO_MANIFEST", - "NO_PACKAGE_NAME", - "TEST_SAME_AS_APP", - "NO_INSTRUMENTATION", - "NO_SIGNATURE", - "INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE", - "NO_TEST_RUNNER_CLASS", - "NO_LAUNCHER_ACTIVITY", - "FORBIDDEN_PERMISSIONS", - "INVALID_ROBO_DIRECTIVES", - "TEST_LOOP_INTENT_FILTER_NOT_FOUND", - "SCENARIO_LABEL_NOT_DECLARED", - "SCENARIO_LABEL_MALFORMED", - "SCENARIO_NOT_DECLARED", - "DEVICE_ADMIN_RECEIVER", - "TEST_ONLY_APK" - ], - "description": "Describes why the matrix is considered invalid.\nOnly useful for matrices in the INVALID state.\n@OutputOnly", - "type": "string" - } - }, - "id": "TestMatrix" - }, - "AndroidVersion": { - "description": "A version of the Android OS", - "type": "object", - "properties": { - "codeName": { - "description": "The code name for this Android version.\nExamples: \"JellyBean\", \"KitKat\"\n@OutputOnly", - "type": "string" - }, - "apiLevel": { - "format": "int32", - "description": "The API level for this Android version.\nExamples: 18, 19\n@OutputOnly", - "type": "integer" - }, - "distribution": { - "$ref": "Distribution", - "description": "Market share for this version.\n@OutputOnly" - }, - "tags": { - "description": "Tags for this dimension.\nExamples: \"default\", \"preview\", \"deprecated\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "An opaque id for this Android version.\nUse this id to invoke the TestExecutionService.\n@OutputOnly", - "type": "string" - }, - "releaseDate": { - "description": "The date this Android version became available in the market.\n@OutputOnly", - "$ref": "Date" - }, - "versionString": { - "description": "A string representing this version of the Android OS.\nExamples: \"4.3\", \"4.4\"\n@OutputOnly", - "type": "string" - } - }, - "id": "AndroidVersion" - }, - "FileReference": { - "description": "A reference to a file, used for user inputs.", - "type": "object", - "properties": { - "gcsPath": { - "description": "A path to a file in Google Cloud Storage.\nExample: gs://build-app-1414623860166/app-debug-unaligned.apk", - "type": "string" - } - }, - "id": "FileReference" - }, - "TestDetails": { - "description": "Additional details about the progress of the running test.", - "type": "object", - "properties": { - "progressMessages": { - "description": "Human-readable, detailed descriptions of the test's progress.\nFor example: \"Provisioning a device\", \"Starting Test\".\n\nDuring the course of execution new data may be appended\nto the end of progress_messages.\n@OutputOnly", - "items": { - "type": "string" - }, - "type": "array" - }, - "errorMessage": { - "description": "If the TestState is ERROR, then this string will contain human-readable\ndetails about the error.\n@OutputOnly", - "type": "string" - } - }, - "id": "TestDetails" - }, - "ToolResultsExecution": { - "description": "Represents a tool results execution resource.\n\nThis has the results of a TestMatrix.", - "type": "object", - "properties": { - "historyId": { - "description": "A tool results history ID.\n@OutputOnly", - "type": "string" - }, - "projectId": { - "description": "The cloud project that owns the tool results execution.\n@OutputOnly", - "type": "string" - }, - "executionId": { - "description": "A tool results execution ID.\n@OutputOnly", - "type": "string" - } - }, - "id": "ToolResultsExecution" - }, - "Distribution": { - "description": "Data about the relative number of devices running a\ngiven configuration of the Android platform.", - "type": "object", - "properties": { - "marketShare": { - "type": "number", - "format": "double", - "description": "The estimated fraction (0-1) of the total market with this configuration.\n@OutputOnly" - }, - "measurementTime": { - "format": "google-datetime", - "description": "The time this distribution was measured.\n@OutputOnly", - "type": "string" - } - }, - "id": "Distribution" - }, - "AndroidRoboTest": { - "description": "A test of an android application that explores the application on a virtual\nor physical Android Device, finding culprits and crashes as it goes.", - "type": "object", - "properties": { - "appInitialActivity": { - "type": "string", - "description": "The initial activity that should be used to start the app.\nOptional" - }, - "maxSteps": { - "format": "int32", - "description": "The max number of steps Robo can execute.\nDefault is no limit.\nOptional", - "type": "integer" - }, - "roboDirectives": { - "description": "A set of directives Robo should apply during the crawl.\nThis allows users to customize the crawl. For example, the username and\npassword for a test account can be provided.\nOptional", - "items": { - "$ref": "RoboDirective" - }, - "type": "array" - }, - "maxDepth": { - "format": "int32", - "description": "The max depth of the traversal stack Robo can explore. Needs to be at least\n2 to make Robo explore the app beyond the first activity.\nDefault is 50.\nOptional", - "type": "integer" - }, - "appApk": { - "$ref": "FileReference", - "description": "The APK for the application under test.\nRequired" - }, - "appPackageId": { - "description": "The java package for the application under test.\nOptional, default is determined by examining the application's manifest.", - "type": "string" - } - }, - "id": "AndroidRoboTest" - }, - "ToolResultsHistory": { - "type": "object", - "properties": { - "historyId": { - "description": "A tool results history ID.\nRequired", - "type": "string" - }, - "projectId": { - "description": "The cloud project that owns the tool results history.\nRequired", - "type": "string" - } - }, - "id": "ToolResultsHistory", - "description": "Represents a tool results history resource." - }, - "Orientation": { - "properties": { - "name": { - "description": "A human-friendly name for this orientation.\nExample: \"portrait\"\n@OutputOnly", - "type": "string" - }, - "tags": { - "description": "Tags for this dimension.\nExamples: \"default\"", - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "description": "The id for this orientation.\nExample: \"portrait\"\n@OutputOnly", - "type": "string" - } - }, - "id": "Orientation", - "description": "Screen orientation of the device.", - "type": "object" - }, - "NetworkConfigurationCatalog": { - "type": "object", - "properties": { - "configurations": { - "items": { - "$ref": "NetworkConfiguration" - }, - "type": "array" - } - }, - "id": "NetworkConfigurationCatalog" - }, - "AndroidTestLoop": { - "id": "AndroidTestLoop", - "description": "A test of an Android Application with a Test Loop.\nThe intent \u003cintent-name\u003e will be implicitly added, since Games is the only\nuser of this api, for the time being.", - "type": "object", - "properties": { - "scenarioLabels": { - "items": { - "type": "string" - }, - "type": "array", - "description": "The list of scenario labels that should be run during the test.\nThe scenario labels should map to labels defined in the application's\nmanifest. For example, player_experience and\ncom.google.test.loops.player_experience add all of the loops labeled in the\nmanifest with the com.google.test.loops.player_experience name to the\nexecution.\nOptional. Scenarios can also be specified in the scenarios field." - }, - "scenarios": { - "description": "The list of scenarios that should be run during the test.\nOptional, default is all test loops, derived from the application's\nmanifest.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "appPackageId": { - "description": "The java package for the application under test.\nOptional, default is determined by examining the application's manifest.", - "type": "string" - }, - "appApk": { - "description": "The APK for the application under test.\nRequired", - "$ref": "FileReference" - } - } - }, - "AndroidDeviceCatalog": { - "properties": { - "models": { - "description": "The set of supported Android device models.\n@OutputOnly", - "items": { - "$ref": "AndroidModel" - }, - "type": "array" - }, - "runtimeConfiguration": { - "$ref": "AndroidRuntimeConfiguration", - "description": "The set of supported runtime configurations.\n@OutputOnly" - }, - "versions": { - "description": "The set of supported Android OS versions.\n@OutputOnly", - "items": { - "$ref": "AndroidVersion" - }, - "type": "array" - } - }, - "id": "AndroidDeviceCatalog", - "description": "The currently supported Android devices.", - "type": "object" - }, - "GoogleAuto": { - "type": "object", - "properties": {}, - "id": "GoogleAuto", - "description": "Enables automatic Google account login.\nIf set, the service will automatically generate a Google test account and add\nit to the device, before executing the test. Note that test accounts might be\nreused.\nMany applications show their full set of functionalities when an account is\npresent on the device. Logging into the device with these generated accounts\nallows testing more functionalities." - }, - "AndroidDeviceList": { - "description": "A list of Android device configurations in which the test is to be executed.", - "type": "object", - "properties": { - "androidDevices": { - "description": "A list of Android devices\nRequired", - "items": { - "$ref": "AndroidDevice" - }, - "type": "array" - } - }, - "id": "AndroidDeviceList" - }, - "ClientInfo": { - "description": "Information about the client which invoked the test.", - "type": "object", - "properties": { - "name": { - "description": "Client name, such as gcloud.\nRequired", - "type": "string" - }, - "clientInfoDetails": { - "description": "The list of detailed information about client.", - "items": { - "$ref": "ClientInfoDetail" - }, - "type": "array" - } - }, - "id": "ClientInfo" - }, - "EnvironmentMatrix": { - "properties": { - "androidDeviceList": { - "description": "A list of Android devices; the test will be run only on the specified\ndevices.", - "$ref": "AndroidDeviceList" - }, - "androidMatrix": { - "$ref": "AndroidMatrix", - "description": "A matrix of Android devices." - } - }, - "id": "EnvironmentMatrix", - "description": "The matrix of environments in which the test is to be executed.", - "type": "object" - }, - "CancelTestMatrixResponse": { - "description": "Response containing the current state of the specified test matrix.", - "type": "object", - "properties": { - "testState": { - "enum": [ - "TEST_STATE_UNSPECIFIED", - "VALIDATING", - "PENDING", - "RUNNING", - "FINISHED", - "ERROR", - "UNSUPPORTED_ENVIRONMENT", - "INCOMPATIBLE_ENVIRONMENT", - "INCOMPATIBLE_ARCHITECTURE", - "CANCELLED", - "INVALID" - ], - "description": "The current rolled-up state of the test matrix.\nIf this state is already final, then the cancelation request will\nhave no effect.", "type": "string", "enumDescriptions": [ "Do not use. For proto versioning only.", @@ -1176,142 +1209,115 @@ "The user cancelled the execution.\n\nCan only be set on an execution.", "The execution or matrix was not run because the provided inputs are not\nvalid.\n\nExamples: input file is not of the expected type, is malformed/corrupt, or\nwas flagged as malware" ] - } - }, - "id": "CancelTestMatrixResponse" - }, - "Date": { - "id": "Date", - "description": "Represents a whole calendar date, e.g. date of birth. The time of day and\ntime zone are either specified elsewhere or are not significant. The date\nis relative to the Proleptic Gregorian Calendar. The day may be 0 to\nrepresent a year and month where the day is not significant, e.g. credit card\nexpiration date. The year may be 0 to represent a month and day independent\nof year, e.g. anniversary date. Related types are google.type.TimeOfDay\nand `google.protobuf.Timestamp`.", - "type": "object", - "properties": { - "day": { - "format": "int32", - "description": "Day of month. Must be from 1 to 31 and valid for the year and month, or 0\nif specifying a year/month where the day is not significant.", - "type": "integer" }, - "year": { - "format": "int32", - "description": "Year of date. Must be from 1 to 9999, or 0 if specifying a date without\na year.", - "type": "integer" + "toolResultsStep": { + "$ref": "ToolResultsStep", + "description": "Where the results for this execution are written.\n@OutputOnly" }, - "month": { - "format": "int32", - "description": "Month of year. Must be from 1 to 12.", - "type": "integer" - } - } - }, - "Locale": { - "description": "A location/region designation for language.", - "type": "object", - "properties": { - "name": { - "description": "A human-friendly name for this language/locale.\nExample: \"English\"\n@OutputOnly", + "projectId": { + "description": "The cloud project that owns the test execution.\n@OutputOnly", "type": "string" }, - "tags": { - "description": "Tags for this dimension.\nExamples: \"default\"", + "testSpecification": { + "$ref": "TestSpecification", + "description": "How to run the test.\n@OutputOnly" + }, + "id": { + "description": "Unique id set by the backend.\n@OutputOnly", + "type": "string" + }, + "timestamp": { + "format": "google-datetime", + "description": "The time this test execution was initially created.\n@OutputOnly", + "type": "string" + }, + "testDetails": { + "description": "Additional details about the running test.\n@OutputOnly", + "$ref": "TestDetails" + }, + "matrixId": { + "description": "Id of the containing TestMatrix.\n@OutputOnly", + "type": "string" + } + }, + "id": "TestExecution", + "description": "Specifies a single test to be executed in a single environment.", + "type": "object" + }, + "GoogleCloudStorage": { + "description": "A storage location within Google cloud storage (GCS).", + "type": "object", + "properties": { + "gcsPath": { + "description": "The path to a directory in GCS that will\neventually contain the results for this test.\nThe requesting user must have write access on the bucket in the supplied\npath.\nRequired", + "type": "string" + } + }, + "id": "GoogleCloudStorage" + }, + "RoboDirective": { + "properties": { + "inputText": { + "description": "The text that Robo is directed to set. If left empty, the directive will be\ntreated as a CLICK on the element matching the resource_name.\nOptional", + "type": "string" + }, + "resourceName": { + "description": "The android resource name of the target UI element\nFor example,\n in Java: R.string.foo\n in xml: @string/foo\nOnly the “foo” part is needed.\nReference doc:\nhttps://developer.android.com/guide/topics/resources/accessing-resources.html\nRequired", + "type": "string" + }, + "actionType": { + "description": "The type of action that Robo should perform on the specified element.\nRequired.", + "type": "string", + "enumDescriptions": [ + "DO NOT USE. For proto versioning only.", + "Direct Robo to click on the specified element. No-op if specified element\nis not clickable.", + "Direct Robo to enter text on the specified element. No-op if specified\nelement is not enabled or does not allow text entry." + ], + "enum": [ + "ACTION_TYPE_UNSPECIFIED", + "SINGLE_CLICK", + "ENTER_TEXT" + ] + } + }, + "id": "RoboDirective", + "description": "Directs Robo to interact with a specific UI element if it is encountered\nduring the crawl. Currently, Robo can perform text entry or element click.", + "type": "object" + }, + "AndroidMatrix": { + "description": "A set of Android device configuration permutations is defined by the\nthe cross-product of the given axes. Internally, the given AndroidMatrix\nwill be expanded into a set of AndroidDevices.\n\nOnly supported permutations will be instantiated. Invalid permutations\n(e.g., incompatible models/versions) are ignored.", + "type": "object", + "properties": { + "orientations": { + "items": { + "type": "string" + }, + "type": "array", + "description": "The set of orientations to test with.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired" + }, + "locales": { + "description": "The set of locales the test device will enable for testing.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", "items": { "type": "string" }, "type": "array" }, - "id": { - "type": "string", - "description": "The id for this locale.\nExample: \"en_US\"\n@OutputOnly" - }, - "region": { - "description": "A human-friendy string representing the region for this locale.\nExample: \"United States\"\nNot present for every locale.\n@OutputOnly", - "type": "string" - } - }, - "id": "Locale" - }, - "TestEnvironmentCatalog": { - "properties": { - "androidDeviceCatalog": { - "$ref": "AndroidDeviceCatalog", - "description": "Android devices suitable for running Android Instrumentation Tests." - }, - "networkConfigurationCatalog": { - "$ref": "NetworkConfigurationCatalog", - "description": "Supported network configurations" - } - }, - "id": "TestEnvironmentCatalog", - "description": "A description of a test environment.", - "type": "object" - }, - "Account": { - "description": "Identifies an account and how to log into it", - "type": "object", - "properties": { - "googleAuto": { - "$ref": "GoogleAuto", - "description": "An automatic google login account" - } - }, - "id": "Account" - }, - "ObbFile": { - "description": "An opaque binary blob file to install on the device before the test starts", - "type": "object", - "properties": { - "obb": { - "$ref": "FileReference", - "description": "Opaque Binary Blob (OBB) file(s) to install on the device\nRequired" - }, - "obbFileName": { - "description": "OBB file name which must conform to the format as specified by\nAndroid\ne.g. [main|patch].0300110.com.example.android.obb\nwhich will be installed into\n \u003cshared-storage\u003e/Android/obb/\u003cpackage-name\u003e/\non the device\nRequired", - "type": "string" - } - }, - "id": "ObbFile" - }, - "AndroidRuntimeConfiguration": { - "description": "Configuration that can be selected at the time a test is run.", - "type": "object", - "properties": { - "orientations": { - "description": "The set of available orientations.\n@OutputOnly", + "androidVersionIds": { + "description": "The ids of the set of Android OS version to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", "items": { - "$ref": "Orientation" + "type": "string" }, "type": "array" }, - "locales": { - "description": "The set of available locales.\n@OutputOnly", + "androidModelIds": { + "description": "The ids of the set of Android device to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", "items": { - "$ref": "Locale" + "type": "string" }, "type": "array" } }, - "id": "AndroidRuntimeConfiguration" - }, - "AndroidDevice": { - "description": "A single Android device.", - "type": "object", - "properties": { - "locale": { - "description": "The locale the test device used for testing.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", - "type": "string" - }, - "androidVersionId": { - "description": "The id of the Android OS version to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", - "type": "string" - }, - "androidModelId": { - "description": "The id of the Android device to be used.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", - "type": "string" - }, - "orientation": { - "description": "How the device is oriented during the test.\nUse the EnvironmentDiscoveryService to get supported options.\nRequired", - "type": "string" - } - }, - "id": "AndroidDevice" + "id": "AndroidMatrix" } }, "protocol": "rest", @@ -1333,15 +1339,9 @@ } } }, - "servicePath": "", - "description": "Allows developers to run automated tests for their mobile applications on Google infrastructure.", "kind": "discovery#restDescription", + "description": "Allows developers to run automated tests for their mobile applications on Google infrastructure.", + "servicePath": "", "rootUrl": "https://testing.googleapis.com/", - "basePath": "", - "ownerDomain": "google.com", - "name": "testing", - "batchPath": "batch", - "id": "testing:v1", - "documentationLink": "https://developers.google.com/cloud-test-lab/", - "revision": "20170918" + "basePath": "" } diff --git a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json index 0fd487977..3a08a9e99 100644 --- a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json +++ b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/aWMF4XLXFbkXgV-B1IIbWLjqgmo\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/UYGCzApTAApQ5LVMe3mi28BTsws\"", "discoveryVersion": "v1", "id": "toolresults:v1beta3", "name": "toolresults", "canonicalName": "Tool Results", "version": "v1beta3", - "revision": "20170914", + "revision": "20170925", "title": "Cloud Tool Results API", "description": "Reads and publishes results from Firebase Test Lab.", "ownerDomain": "google.com", @@ -400,7 +400,7 @@ "properties": { "crashed": { "type": "boolean", - "description": "If the failure was severe because the system under test crashed." + "description": "If the failure was severe because the system (app) under test crashed." }, "notInstalled": { "type": "boolean", @@ -408,7 +408,7 @@ }, "otherNativeCrash": { "type": "boolean", - "description": "If a native process other than the app crashed." + "description": "If a native process (including any other than the app) crashed." }, "timedOut": { "type": "boolean", diff --git a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go index d7b4ac50d..aa4275c5c 100644 --- a/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go +++ b/vendor/google.golang.org/api/toolresults/v1beta3/toolresults-gen.go @@ -858,8 +858,8 @@ func (s *Execution) MarshalJSON() ([]byte, error) { } type FailureDetail struct { - // Crashed: If the failure was severe because the system under test - // crashed. + // Crashed: If the failure was severe because the system (app) under + // test crashed. Crashed bool `json:"crashed,omitempty"` // NotInstalled: If an app is not installed and thus no test can be run @@ -867,7 +867,8 @@ type FailureDetail struct { // unsupported platform. NotInstalled bool `json:"notInstalled,omitempty"` - // OtherNativeCrash: If a native process other than the app crashed. + // OtherNativeCrash: If a native process (including any other than the + // app) crashed. OtherNativeCrash bool `json:"otherNativeCrash,omitempty"` // TimedOut: If the test overran some time limit, and that is why it diff --git a/vendor/google.golang.org/api/translate/v2/translate-api.json b/vendor/google.golang.org/api/translate/v2/translate-api.json index d76595657..5ea4c63fd 100644 --- a/vendor/google.golang.org/api/translate/v2/translate-api.json +++ b/vendor/google.golang.org/api/translate/v2/translate-api.json @@ -1,327 +1,10 @@ { - "rootUrl": "https://translation.googleapis.com/", - "ownerDomain": "google.com", - "name": "translate", - "batchPath": "batch/translate", - "features": [ - "dataWrapper" - ], - "title": "Google Cloud Translation API", - "ownerName": "Google", - "resources": { - "translations": { - "methods": { - "translate": { - "httpMethod": "POST", - "parameterOrder": [], - "response": { - "$ref": "TranslationsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "path": "v2", - "id": "language.translations.translate", - "description": "Translates input text, returning translated text.", - "request": { - "$ref": "TranslateTextRequest" - } - }, - "list": { - "path": "v2", - "id": "language.translations.list", - "description": "Translates input text, returning translated text.", - "httpMethod": "GET", - "response": { - "$ref": "TranslationsListResponse" - }, - "parameterOrder": [ - "q", - "target" - ], - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "q": { - "required": true, - "type": "string", - "repeated": true, - "location": "query", - "description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs." - }, - "source": { - "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", - "type": "string", - "location": "query" - }, - "cid": { - "location": "query", - "description": "The customization id for translate", - "type": "string", - "repeated": true - }, - "target": { - "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.", - "required": true, - "type": "string", - "location": "query" - }, - "format": { - "type": "string", - "enumDescriptions": [ - "Specifies the input is in HTML", - "Specifies the input is in plain textual format" - ], - "location": "query", - "enum": [ - "html", - "text" - ], - "description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text." - }, - "model": { - "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", - "type": "string", - "location": "query" - } - } - } - } - }, - "detections": { - "methods": { - "detect": { - "description": "Detects the language of text within a request.", - "request": { - "$ref": "DetectLanguageRequest" - }, - "response": { - "$ref": "DetectionsListResponse" - }, - "parameterOrder": [], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": {}, - "id": "language.detections.detect", - "path": "v2/detect" - }, - "list": { - "response": { - "$ref": "DetectionsListResponse" - }, - "parameterOrder": [ - "q" - ], - "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "parameters": { - "q": { - "required": true, - "type": "string", - "repeated": true, - "location": "query", - "description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs." - } - }, - "id": "language.detections.list", - "path": "v2/detect", - "description": "Detects the language of text within a request." - } - } - }, - "languages": { - "methods": { - "list": { - "response": { - "$ref": "LanguagesListResponse" - }, - "httpMethod": "GET", - "parameters": { - "target": { - "location": "query", - "description": "The language to use to return localized, human readable names of supported\nlanguages.", - "type": "string" - }, - "model": { - "description": "The model type for which supported languages should be returned.", - "type": "string", - "location": "query" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-translation", - "https://www.googleapis.com/auth/cloud-platform" - ], - "id": "language.languages.list", - "path": "v2/languages", - "description": "Returns a list of supported languages for translation." - } - } - } - }, - "parameters": { - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "$.xgafv": { - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json", - "enum": [ - "json", - "media", - "proto" - ], - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" - }, - "quotaUser": { - "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.", - "type": "string", - "location": "query" - }, - "pp": { - "description": "Pretty-print response.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", - "location": "query" - } - }, - "version": "v2", - "baseUrl": "https://translation.googleapis.com/language/translate/", - "servicePath": "language/translate/", - "description": "The Google Cloud Translation API lets websites and programs integrate with\n Google Translate programmatically.", - "kind": "discovery#restDescription", "basePath": "/language/translate/", - "revision": "20170525", "documentationLink": "https://code.google.com/apis/language/translate/v2/getting_started.html", + "revision": "20170525", "id": "translate:v2", "discoveryVersion": "v1", "schemas": { - "LanguagesListResponse": { - "type": "object", - "properties": { - "languages": { - "description": "List of source/target languages supported by the translation API. If target parameter is unspecified, the list is sorted by the ASCII code point order of the language code. If target parameter is specified, the list is sorted by the collation order of the language name in the target language.", - "items": { - "$ref": "LanguagesResource" - }, - "type": "array" - } - }, - "id": "LanguagesListResponse" - }, - "DetectionsResource": { - "description": "An array of languages which we detect for the given text The most likely language list first.", - "items": { - "type": "object", - "properties": { - "confidence": { - "type": "number", - "format": "float", - "description": "The confidence of the detection result of this language." - }, - "language": { - "description": "The language we detected.", - "type": "string" - }, - "isReliable": { - "description": "A boolean to indicate is the language detection result reliable.", - "type": "boolean" - } - } - }, - "type": "array", - "id": "DetectionsResource" - }, - "TranslationsResource": { - "id": "TranslationsResource", - "type": "object", - "properties": { - "detectedSourceLanguage": { - "description": "The source language of the initial request, detected automatically, if\nno source language was passed within the initial request. If the\nsource language was passed, auto-detection of the language will not\noccur and this field will be empty.", - "type": "string" - }, - "model": { - "description": "The `model` type used for this translation. Valid values are\nlisted in public documentation. Can be different from requested `model`.\nPresent only if specific model type was explicitly requested.", - "type": "string" - }, - "translatedText": { - "description": "Text translated into the target language.", - "type": "string" - } - } - }, "TranslationsListResponse": { "description": "The main language translation response message.", "type": "object", @@ -337,20 +20,13 @@ "id": "TranslationsListResponse" }, "TranslateTextRequest": { + "id": "TranslateTextRequest", "description": "The main translation request message for the Cloud Translation API.", "type": "object", "properties": { - "source": { - "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", - "type": "string" - }, - "model": { - "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", - "type": "string" - }, "target": { - "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.", - "type": "string" + "type": "string", + "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support." }, "format": { "description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.", @@ -362,26 +38,32 @@ "type": "string" }, "type": "array" + }, + "source": { + "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", + "type": "string" + }, + "model": { + "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", + "type": "string" } - }, - "id": "TranslateTextRequest" + } }, "DetectLanguageRequest": { - "type": "object", "properties": { "q": { - "description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs.", "items": { "type": "string" }, - "type": "array" + "type": "array", + "description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs." } }, "id": "DetectLanguageRequest", - "description": "The request message for language detection." + "description": "The request message for language detection.", + "type": "object" }, "LanguagesResource": { - "id": "LanguagesResource", "type": "object", "properties": { "name": { @@ -392,23 +74,23 @@ "description": "Supported language code, generally consisting of its ISO 639-1\nidentifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including\nlanguage + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH')", "type": "string" } - } + }, + "id": "LanguagesResource" }, "DetectionsListResponse": { "type": "object", "properties": { "detections": { + "description": "A detections contains detection results of several text", "items": { "$ref": "DetectionsResource" }, - "type": "array", - "description": "A detections contains detection results of several text" + "type": "array" } }, "id": "DetectionsListResponse" }, "GetSupportedLanguagesRequest": { - "description": "The request message for discovering supported languages.", "type": "object", "properties": { "target": { @@ -416,14 +98,69 @@ "type": "string" } }, - "id": "GetSupportedLanguagesRequest" + "id": "GetSupportedLanguagesRequest", + "description": "The request message for discovering supported languages." + }, + "LanguagesListResponse": { + "properties": { + "languages": { + "items": { + "$ref": "LanguagesResource" + }, + "type": "array", + "description": "List of source/target languages supported by the translation API. If target parameter is unspecified, the list is sorted by the ASCII code point order of the language code. If target parameter is specified, the list is sorted by the collation order of the language name in the target language." + } + }, + "id": "LanguagesListResponse", + "type": "object" + }, + "DetectionsResource": { + "description": "An array of languages which we detect for the given text The most likely language list first.", + "items": { + "type": "object", + "properties": { + "confidence": { + "format": "float", + "description": "The confidence of the detection result of this language.", + "type": "number" + }, + "language": { + "description": "The language we detected.", + "type": "string" + }, + "isReliable": { + "description": "A boolean to indicate is the language detection result reliable.", + "type": "boolean" + } + } + }, + "type": "array", + "id": "DetectionsResource" + }, + "TranslationsResource": { + "type": "object", + "properties": { + "detectedSourceLanguage": { + "type": "string", + "description": "The source language of the initial request, detected automatically, if\nno source language was passed within the initial request. If the\nsource language was passed, auto-detection of the language will not\noccur and this field will be empty." + }, + "model": { + "description": "The `model` type used for this translation. Valid values are\nlisted in public documentation. Can be different from requested `model`.\nPresent only if specific model type was explicitly requested.", + "type": "string" + }, + "translatedText": { + "description": "Text translated into the target language.", + "type": "string" + } + }, + "id": "TranslationsResource" } }, - "protocol": "rest", "icons": { - "x32": "https://www.google.com/images/icons/product/translate-32.png", - "x16": "https://www.google.com/images/icons/product/translate-16.png" + "x16": "https://www.google.com/images/icons/product/translate-16.png", + "x32": "https://www.google.com/images/icons/product/translate-32.png" }, + "protocol": "rest", "canonicalName": "Translate", "auth": { "oauth2": { @@ -436,5 +173,268 @@ } } } - } + }, + "rootUrl": "https://translation.googleapis.com/", + "ownerDomain": "google.com", + "name": "translate", + "batchPath": "batch/translate", + "features": [ + "dataWrapper" + ], + "title": "Google Cloud Translation API", + "ownerName": "Google", + "resources": { + "detections": { + "methods": { + "detect": { + "response": { + "$ref": "DetectionsListResponse" + }, + "parameterOrder": [], + "httpMethod": "POST", + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], + "id": "language.detections.detect", + "path": "v2/detect", + "request": { + "$ref": "DetectLanguageRequest" + }, + "description": "Detects the language of text within a request." + }, + "list": { + "path": "v2/detect", + "id": "language.detections.list", + "description": "Detects the language of text within a request.", + "httpMethod": "GET", + "response": { + "$ref": "DetectionsListResponse" + }, + "parameterOrder": [ + "q" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "q": { + "description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs.", + "required": true, + "type": "string", + "repeated": true, + "location": "query" + } + } + } + } + }, + "languages": { + "methods": { + "list": { + "description": "Returns a list of supported languages for translation.", + "response": { + "$ref": "LanguagesListResponse" + }, + "httpMethod": "GET", + "parameters": { + "target": { + "location": "query", + "description": "The language to use to return localized, human readable names of supported\nlanguages.", + "type": "string" + }, + "model": { + "location": "query", + "description": "The model type for which supported languages should be returned.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], + "id": "language.languages.list", + "path": "v2/languages" + } + } + }, + "translations": { + "methods": { + "list": { + "description": "Translates input text, returning translated text.", + "parameterOrder": [ + "q", + "target" + ], + "response": { + "$ref": "TranslationsListResponse" + }, + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": { + "target": { + "location": "query", + "description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.", + "required": true, + "type": "string" + }, + "format": { + "enumDescriptions": [ + "Specifies the input is in HTML", + "Specifies the input is in plain textual format" + ], + "location": "query", + "enum": [ + "html", + "text" + ], + "description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.", + "type": "string" + }, + "model": { + "description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", + "type": "string", + "location": "query" + }, + "q": { + "required": true, + "type": "string", + "repeated": true, + "location": "query", + "description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs." + }, + "source": { + "description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", + "type": "string", + "location": "query" + }, + "cid": { + "description": "The customization id for translate", + "type": "string", + "repeated": true, + "location": "query" + } + }, + "id": "language.translations.list", + "path": "v2" + }, + "translate": { + "path": "v2", + "id": "language.translations.translate", + "description": "Translates input text, returning translated text.", + "request": { + "$ref": "TranslateTextRequest" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "TranslationsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-translation", + "https://www.googleapis.com/auth/cloud-platform" + ], + "parameters": {} + } + } + } + }, + "parameters": { + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string", + "location": "query" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", + "type": "string", + "location": "query" + }, + "pp": { + "default": "true", + "type": "boolean", + "location": "query", + "description": "Pretty-print response." + }, + "bearer_token": { + "type": "string", + "location": "query", + "description": "OAuth bearer token." + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + } + }, + "version": "v2", + "baseUrl": "https://translation.googleapis.com/language/translate/", + "kind": "discovery#restDescription", + "description": "The Google Cloud Translation API lets websites and programs integrate with\n Google Translate programmatically.", + "servicePath": "language/translate/" } diff --git a/vendor/google.golang.org/api/vault/v1/vault-api.json b/vendor/google.golang.org/api/vault/v1/vault-api.json index 0855df794..2166c59a4 100644 --- a/vendor/google.golang.org/api/vault/v1/vault-api.json +++ b/vendor/google.golang.org/api/vault/v1/vault-api.json @@ -1,4 +1,674 @@ { + "rootUrl": "https://vault.googleapis.com/", + "ownerDomain": "google.com", + "name": "vault", + "batchPath": "batch", + "fullyEncodeReservedExpansion": true, + "title": "Google Vault API", + "ownerName": "Google", + "resources": { + "matters": { + "methods": { + "delete": { + "httpMethod": "DELETE", + "response": { + "$ref": "Matter" + }, + "parameterOrder": [ + "matterId" + ], + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "flatPath": "v1/matters/{matterId}", + "path": "v1/matters/{matterId}", + "id": "vault.matters.delete", + "description": "Deletes the specified matter. Returns matter with updated state." + }, + "addPermissions": { + "response": { + "$ref": "MatterPermission" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}:addPermissions", + "id": "vault.matters.addPermissions", + "path": "v1/matters/{matterId}:addPermissions", + "request": { + "$ref": "AddMatterPermissionsRequest" + }, + "description": "Adds an account as a matter collaborator." + }, + "list": { + "flatPath": "v1/matters", + "path": "v1/matters", + "id": "vault.matters.list", + "description": "Lists matters the user has access to.", + "httpMethod": "GET", + "parameterOrder": [], + "response": { + "$ref": "ListMattersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery", + "https://www.googleapis.com/auth/ediscovery.readonly" + ], + "parameters": { + "pageSize": { + "location": "query", + "format": "int32", + "description": "The number of matters to return in the response.\nDefault and maximum are 100.", + "type": "integer" + }, + "view": { + "description": "Specifies which parts of the matter to return in response.", + "type": "string", + "location": "query", + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ] + }, + "state": { + "location": "query", + "enum": [ + "STATE_UNSPECIFIED", + "OPEN", + "CLOSED", + "DELETED" + ], + "description": "If set, list only matters with that specific state. The default is listing\nmatters of all states.", + "type": "string" + }, + "pageToken": { + "description": "The pagination token as returned in the response.", + "type": "string", + "location": "query" + } + } + }, + "create": { + "description": "Creates a new matter with the given name and description. The initial state\nis open, and the owner is the method caller. Returns the created matter\nwith default view.", + "request": { + "$ref": "Matter" + }, + "httpMethod": "POST", + "parameterOrder": [], + "response": { + "$ref": "Matter" + }, + "parameters": {}, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "flatPath": "v1/matters", + "path": "v1/matters", + "id": "vault.matters.create" + }, + "reopen": { + "request": { + "$ref": "ReopenMatterRequest" + }, + "description": "Reopens the specified matter. Returns matter with updated state.", + "response": { + "$ref": "ReopenMatterResponse" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}:reopen", + "id": "vault.matters.reopen", + "path": "v1/matters/{matterId}:reopen" + }, + "removePermissions": { + "description": "Removes an account as a matter collaborator.", + "request": { + "$ref": "RemoveMatterPermissionsRequest" + }, + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "POST", + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "flatPath": "v1/matters/{matterId}:removePermissions", + "id": "vault.matters.removePermissions", + "path": "v1/matters/{matterId}:removePermissions" + }, + "get": { + "flatPath": "v1/matters/{matterId}", + "id": "vault.matters.get", + "path": "v1/matters/{matterId}", + "description": "Gets the specified matter.", + "response": { + "$ref": "Matter" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/ediscovery", + "https://www.googleapis.com/auth/ediscovery.readonly" + ], + "parameters": { + "view": { + "location": "query", + "enum": [ + "VIEW_UNSPECIFIED", + "BASIC", + "FULL" + ], + "description": "Specifies which parts of the Matter to return in the response.", + "type": "string" + }, + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + } + }, + "undelete": { + "request": { + "$ref": "UndeleteMatterRequest" + }, + "description": "Undeletes the specified matter. Returns matter with updated state.", + "response": { + "$ref": "Matter" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "POST", + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}:undelete", + "id": "vault.matters.undelete", + "path": "v1/matters/{matterId}:undelete" + }, + "close": { + "flatPath": "v1/matters/{matterId}:close", + "path": "v1/matters/{matterId}:close", + "id": "vault.matters.close", + "request": { + "$ref": "CloseMatterRequest" + }, + "description": "Closes the specified matter. Returns matter with updated state.", + "httpMethod": "POST", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "CloseMatterResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + } + }, + "update": { + "description": "Updates the specified matter.\nThis updates only the name and description of the matter, identified by\nmatter id. Changes to any other fields are ignored.\nReturns the default view of the matter.", + "request": { + "$ref": "Matter" + }, + "httpMethod": "PUT", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "Matter" + }, + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "flatPath": "v1/matters/{matterId}", + "path": "v1/matters/{matterId}", + "id": "vault.matters.update" + } + }, + "resources": { + "holds": { + "methods": { + "list": { + "flatPath": "v1/matters/{matterId}/holds", + "id": "vault.matters.holds.list", + "path": "v1/matters/{matterId}/holds", + "description": "Lists holds within a matter. An empty page token in ListHoldsResponse\ndenotes no more holds to list.", + "response": { + "$ref": "ListHoldsResponse" + }, + "parameterOrder": [ + "matterId" + ], + "httpMethod": "GET", + "parameters": { + "pageSize": { + "format": "int32", + "description": "The number of holds to return in the response, between 0 and 100 inclusive.\nLeaving this empty, or as 0, is the same as page_size = 100.", + "type": "integer", + "location": "query" + }, + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + }, + "pageToken": { + "location": "query", + "description": "The pagination token as returned in the response.\nAn empty token means start from the beginning.", + "type": "string" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery", + "https://www.googleapis.com/auth/ediscovery.readonly" + ] + }, + "get": { + "description": "Gets a hold by ID.", + "httpMethod": "GET", + "parameterOrder": [ + "matterId", + "holdId" + ], + "response": { + "$ref": "Hold" + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery", + "https://www.googleapis.com/auth/ediscovery.readonly" + ], + "parameters": { + "holdId": { + "description": "The hold ID.", + "type": "string", + "required": true, + "location": "path" + }, + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}", + "path": "v1/matters/{matterId}/holds/{holdId}", + "id": "vault.matters.holds.get" + }, + "update": { + "response": { + "$ref": "Hold" + }, + "parameterOrder": [ + "matterId", + "holdId" + ], + "httpMethod": "PUT", + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "holdId": { + "description": "The ID of the hold.", + "type": "string", + "required": true, + "location": "path" + }, + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}", + "id": "vault.matters.holds.update", + "path": "v1/matters/{matterId}/holds/{holdId}", + "request": { + "$ref": "Hold" + }, + "description": "Updates the OU and/or query parameters of a hold. You cannot add accounts\nto a hold that covers an OU, nor can you add OUs to a hold that covers\nindividual accounts. Accounts listed in the hold will be ignored." + }, + "create": { + "httpMethod": "POST", + "parameterOrder": [ + "matterId" + ], + "response": { + "$ref": "Hold" + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + } + }, + "flatPath": "v1/matters/{matterId}/holds", + "path": "v1/matters/{matterId}/holds", + "id": "vault.matters.holds.create", + "request": { + "$ref": "Hold" + }, + "description": "Creates a hold in the given matter." + }, + "delete": { + "description": "Removes a hold by ID. This will release any HeldAccounts on this Hold.", + "parameterOrder": [ + "matterId", + "holdId" + ], + "response": { + "$ref": "Empty" + }, + "httpMethod": "DELETE", + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "holdId": { + "description": "The hold ID.", + "type": "string", + "required": true, + "location": "path" + }, + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}", + "id": "vault.matters.holds.delete", + "path": "v1/matters/{matterId}/holds/{holdId}" + } + }, + "resources": { + "accounts": { + "methods": { + "list": { + "description": "Lists HeldAccounts for a hold. This will only list individually specified\nheld accounts. If the hold is on an OU, then use\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e\nto enumerate its members.", + "response": { + "$ref": "ListHeldAccountsResponse" + }, + "parameterOrder": [ + "matterId", + "holdId" + ], + "httpMethod": "GET", + "parameters": { + "matterId": { + "location": "path", + "description": "The matter ID.", + "type": "string", + "required": true + }, + "holdId": { + "description": "The hold ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery", + "https://www.googleapis.com/auth/ediscovery.readonly" + ], + "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", + "id": "vault.matters.holds.accounts.list", + "path": "v1/matters/{matterId}/holds/{holdId}/accounts" + }, + "create": { + "request": { + "$ref": "HeldAccount" + }, + "description": "Adds a HeldAccount to a hold. Accounts can only be added to a hold that\nhas no held_org_unit set. Attempting to add an account to an OU-based\nhold will result in an error.", + "httpMethod": "POST", + "parameterOrder": [ + "matterId", + "holdId" + ], + "response": { + "$ref": "HeldAccount" + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "parameters": { + "holdId": { + "location": "path", + "description": "The hold ID.", + "type": "string", + "required": true + }, + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", + "path": "v1/matters/{matterId}/holds/{holdId}/accounts", + "id": "vault.matters.holds.accounts.create" + }, + "delete": { + "description": "Removes a HeldAccount from a hold. If this request leaves the hold with\nno held accounts, the hold will not apply to any accounts.", + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "matterId", + "holdId", + "accountId" + ], + "httpMethod": "DELETE", + "parameters": { + "holdId": { + "description": "The hold ID.", + "type": "string", + "required": true, + "location": "path" + }, + "accountId": { + "location": "path", + "description": "The ID of the account to remove from the hold.", + "type": "string", + "required": true + }, + "matterId": { + "description": "The matter ID.", + "type": "string", + "required": true, + "location": "path" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/ediscovery" + ], + "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", + "id": "vault.matters.holds.accounts.delete", + "path": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}" + } + } + } + } + } + } + } + }, + "parameters": { + "key": { + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string" + }, + "access_token": { + "location": "query", + "description": "OAuth access token.", + "type": "string" + }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, + "pp": { + "description": "Pretty-print response.", + "default": "true", + "type": "boolean", + "location": "query" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" + }, + "oauth_token": { + "location": "query", + "description": "OAuth 2.0 token for the current user.", + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "$.xgafv": { + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "enum": [ + "1", + "2" + ], + "description": "V1 error format.", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "description": "Data format for response.", + "default": "json", + "enum": [ + "json", + "media", + "proto" + ] + } + }, + "version": "v1", + "baseUrl": "https://vault.googleapis.com/", + "servicePath": "", + "description": "Archiving and eDiscovery for G Suite.", + "kind": "discovery#restDescription", "basePath": "", "revision": "20170812", "documentationLink": "https://developers.google.com/vault", @@ -6,6 +676,220 @@ "discoveryVersion": "v1", "version_module": true, "schemas": { + "AddMatterPermissionsRequest": { + "description": "Add an account with the permission specified. The role cannot be owner.\nIf an account already has a role in the matter, it will be\noverwritten.", + "type": "object", + "properties": { + "sendEmails": { + "description": "True to send notification email to the added account.\nFalse to not send notification email.", + "type": "boolean" + }, + "matterPermission": { + "$ref": "MatterPermission", + "description": "The MatterPermission to add." + }, + "ccMe": { + "description": "Only relevant if send_emails is true.\nTrue to CC requestor in the email message.\nFalse to not CC requestor.", + "type": "boolean" + } + }, + "id": "AddMatterPermissionsRequest" + }, + "Matter": { + "description": "Represents a matter.", + "type": "object", + "properties": { + "description": { + "description": "The description of the matter.", + "type": "string" + }, + "matterId": { + "description": "The matter ID which is generated by the server.\nShould be blank when creating a new matter.", + "type": "string" + }, + "state": { + "description": "The state of the matter.", + "type": "string", + "enumDescriptions": [ + "The matter has no specified state.", + "This matter is open.", + "This matter is closed.", + "This matter is deleted." + ], + "enum": [ + "STATE_UNSPECIFIED", + "OPEN", + "CLOSED", + "DELETED" + ] + }, + "matterPermissions": { + "description": "List of users and access to the matter. Currently there is no programmer\ndefined limit on the number of permissions a matter can have.", + "items": { + "$ref": "MatterPermission" + }, + "type": "array" + }, + "name": { + "description": "The name of the matter.", + "type": "string" + } + }, + "id": "Matter" + }, + "HeldAccount": { + "description": "An account being held in a particular hold. This structure is immutable.\nThis can be either a single user or a google group, depending on the corpus.", + "type": "object", + "properties": { + "accountId": { + "description": "The account's ID as provided by the\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", + "type": "string" + }, + "holdTime": { + "format": "google-datetime", + "description": "When the account was put on hold.", + "type": "string" + } + }, + "id": "HeldAccount" + }, + "ReopenMatterResponse": { + "description": "Response to a ReopenMatterRequest.", + "type": "object", + "properties": { + "matter": { + "description": "The updated matter, with state OPEN.", + "$ref": "Matter" + } + }, + "id": "ReopenMatterResponse" + }, + "CorpusQuery": { + "description": "Corpus specific queries.", + "type": "object", + "properties": { + "groupsQuery": { + "description": "Details pertaining to Groups holds. If set, corpus must be Groups.", + "$ref": "HeldGroupsQuery" + }, + "mailQuery": { + "description": "Details pertaining to mail holds. If set, corpus must be mail.", + "$ref": "HeldMailQuery" + }, + "driveQuery": { + "description": "Details pertaining to Drive holds. If set, corpus must be Drive.", + "$ref": "HeldDriveQuery" + } + }, + "id": "CorpusQuery" + }, + "Hold": { + "description": "Represents a hold within Vault. A hold restricts purging of\nartifacts based on the combination of the query and accounts restrictions.\nA hold can be configured to either apply to an explicitly configured set\nof accounts, or can be applied to all members of an organizational unit.", + "type": "object", + "properties": { + "orgUnit": { + "$ref": "HeldOrgUnit", + "description": "If set, the hold applies to all members of the organizational unit and\naccounts must be empty. This property is mutable. For groups holds,\nset the accounts field." + }, + "query": { + "description": "The corpus-specific query. If set, the corpusQuery must match corpus\ntype.", + "$ref": "CorpusQuery" + }, + "corpus": { + "description": "The corpus to be searched.", + "type": "string", + "enumDescriptions": [ + "No corpus specified.", + "Drive.", + "Mail.", + "Groups." + ], + "enum": [ + "CORPUS_TYPE_UNSPECIFIED", + "DRIVE", + "MAIL", + "GROUPS" + ] + }, + "updateTime": { + "format": "google-datetime", + "description": "The last time this hold was modified.", + "type": "string" + }, + "name": { + "description": "The name of the hold.", + "type": "string" + }, + "holdId": { + "description": "The unique immutable ID of the hold. Assigned during creation.", + "type": "string" + }, + "accounts": { + "description": "If set, the hold applies to the enumerated accounts and org_unit must be\nempty.", + "items": { + "$ref": "HeldAccount" + }, + "type": "array" + } + }, + "id": "Hold" + }, + "ListHoldsResponse": { + "description": "The holds for a matter.", + "type": "object", + "properties": { + "nextPageToken": { + "description": "Page token to retrieve the next page of results in the list.\nIf this is empty, then there are no more holds to list.", + "type": "string" + }, + "holds": { + "description": "The list of holds.", + "items": { + "$ref": "Hold" + }, + "type": "array" + } + }, + "id": "ListHoldsResponse" + }, + "ListHeldAccountsResponse": { + "description": "Returns a list of held accounts for a hold.", + "type": "object", + "properties": { + "accounts": { + "description": "The held accounts on a hold.", + "items": { + "$ref": "HeldAccount" + }, + "type": "array" + } + }, + "id": "ListHeldAccountsResponse" + }, + "UndeleteMatterRequest": { + "description": "Undelete a matter by ID.", + "type": "object", + "properties": {}, + "id": "UndeleteMatterRequest" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "CloseMatterRequest": { + "description": "Close a matter by ID.", + "type": "object", + "properties": {}, + "id": "CloseMatterRequest" + }, + "ReopenMatterRequest": { + "description": "Reopen a matter by ID.", + "type": "object", + "properties": {}, + "id": "ReopenMatterRequest" + }, "RemoveMatterPermissionsRequest": { "description": "Remove an account as a matter collaborator.", "type": "object", @@ -21,22 +905,22 @@ "description": "Currently each matter only has one owner, and all others are collaborators.\nWhen an account is purged, its corresponding MatterPermission resources\ncease to exist.", "type": "object", "properties": { + "accountId": { + "description": "The account id, as provided by \u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", + "type": "string" + }, "role": { + "enumDescriptions": [ + "No role assigned.", + "A collaborator to the matter.", + "The owner of the matter." + ], "enum": [ "ROLE_UNSPECIFIED", "COLLABORATOR", "OWNER" ], "description": "The user's role in this matter.", - "type": "string", - "enumDescriptions": [ - "No role assigned.", - "A collaborator to the matter.", - "The owner of the matter." - ] - }, - "accountId": { - "description": "The account id, as provided by \u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", "type": "string" } }, @@ -46,16 +930,16 @@ "description": "Provides the list of matters.", "type": "object", "properties": { - "nextPageToken": { - "description": "Page token to retrieve the next page of results in the list.", - "type": "string" - }, "matters": { "description": "List of matters.", "items": { "$ref": "Matter" }, "type": "array" + }, + "nextPageToken": { + "description": "Page token to retrieve the next page of results in the list.", + "type": "string" } }, "id": "ListMattersResponse" @@ -64,19 +948,19 @@ "description": "Query options for mail holds.", "type": "object", "properties": { - "endTime": { - "type": "string", - "format": "google-datetime", - "description": "The end date range for the search query. These timestamps are in GMT and\nrounded down to the start of the given date." - }, - "startTime": { - "type": "string", - "format": "google-datetime", - "description": "The start date range for the search query. These timestamps are in GMT and\nrounded down to the start of the given date." - }, "terms": { "description": "The search terms for the hold.", "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "The end date range for the search query. These timestamps are in GMT and\nrounded down to the start of the given date.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "The start date range for the search query. These timestamps are in GMT and\nrounded down to the start of the given date.", + "type": "string" } }, "id": "HeldMailQuery" @@ -86,8 +970,8 @@ "type": "object", "properties": { "matter": { - "$ref": "Matter", - "description": "The updated matter, with state CLOSED." + "description": "The updated matter, with state CLOSED.", + "$ref": "Matter" } }, "id": "CloseMatterResponse" @@ -139,908 +1023,24 @@ } }, "id": "HeldOrgUnit" - }, - "AddMatterPermissionsRequest": { - "description": "Add an account with the permission specified. The role cannot be owner.\nIf an account already has a role in the matter, it will be\noverwritten.", - "type": "object", - "properties": { - "sendEmails": { - "description": "True to send notification email to the added account.\nFalse to not send notification email.", - "type": "boolean" - }, - "matterPermission": { - "$ref": "MatterPermission", - "description": "The MatterPermission to add." - }, - "ccMe": { - "type": "boolean", - "description": "Only relevant if send_emails is true.\nTrue to CC requestor in the email message.\nFalse to not CC requestor." - } - }, - "id": "AddMatterPermissionsRequest" - }, - "Matter": { - "id": "Matter", - "description": "Represents a matter.", - "type": "object", - "properties": { - "matterPermissions": { - "description": "List of users and access to the matter. Currently there is no programmer\ndefined limit on the number of permissions a matter can have.", - "items": { - "$ref": "MatterPermission" - }, - "type": "array" - }, - "name": { - "description": "The name of the matter.", - "type": "string" - }, - "description": { - "description": "The description of the matter.", - "type": "string" - }, - "matterId": { - "description": "The matter ID which is generated by the server.\nShould be blank when creating a new matter.", - "type": "string" - }, - "state": { - "enumDescriptions": [ - "The matter has no specified state.", - "This matter is open.", - "This matter is closed.", - "This matter is deleted." - ], - "enum": [ - "STATE_UNSPECIFIED", - "OPEN", - "CLOSED", - "DELETED" - ], - "description": "The state of the matter.", - "type": "string" - } - } - }, - "HeldAccount": { - "properties": { - "accountId": { - "description": "The account's ID as provided by the\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e.", - "type": "string" - }, - "holdTime": { - "format": "google-datetime", - "description": "When the account was put on hold.", - "type": "string" - } - }, - "id": "HeldAccount", - "description": "An account being held in a particular hold. This structure is immutable.\nThis can be either a single user or a google group, depending on the corpus.", - "type": "object" - }, - "ReopenMatterResponse": { - "description": "Response to a ReopenMatterRequest.", - "type": "object", - "properties": { - "matter": { - "description": "The updated matter, with state OPEN.", - "$ref": "Matter" - } - }, - "id": "ReopenMatterResponse" - }, - "CorpusQuery": { - "description": "Corpus specific queries.", - "type": "object", - "properties": { - "groupsQuery": { - "$ref": "HeldGroupsQuery", - "description": "Details pertaining to Groups holds. If set, corpus must be Groups." - }, - "mailQuery": { - "$ref": "HeldMailQuery", - "description": "Details pertaining to mail holds. If set, corpus must be mail." - }, - "driveQuery": { - "$ref": "HeldDriveQuery", - "description": "Details pertaining to Drive holds. If set, corpus must be Drive." - } - }, - "id": "CorpusQuery" - }, - "Hold": { - "description": "Represents a hold within Vault. A hold restricts purging of\nartifacts based on the combination of the query and accounts restrictions.\nA hold can be configured to either apply to an explicitly configured set\nof accounts, or can be applied to all members of an organizational unit.", - "type": "object", - "properties": { - "corpus": { - "description": "The corpus to be searched.", - "type": "string", - "enumDescriptions": [ - "No corpus specified.", - "Drive.", - "Mail.", - "Groups." - ], - "enum": [ - "CORPUS_TYPE_UNSPECIFIED", - "DRIVE", - "MAIL", - "GROUPS" - ] - }, - "updateTime": { - "format": "google-datetime", - "description": "The last time this hold was modified.", - "type": "string" - }, - "holdId": { - "description": "The unique immutable ID of the hold. Assigned during creation.", - "type": "string" - }, - "name": { - "description": "The name of the hold.", - "type": "string" - }, - "accounts": { - "description": "If set, the hold applies to the enumerated accounts and org_unit must be\nempty.", - "items": { - "$ref": "HeldAccount" - }, - "type": "array" - }, - "query": { - "$ref": "CorpusQuery", - "description": "The corpus-specific query. If set, the corpusQuery must match corpus\ntype." - }, - "orgUnit": { - "$ref": "HeldOrgUnit", - "description": "If set, the hold applies to all members of the organizational unit and\naccounts must be empty. This property is mutable. For groups holds,\nset the accounts field." - } - }, - "id": "Hold" - }, - "ListHoldsResponse": { - "description": "The holds for a matter.", - "type": "object", - "properties": { - "nextPageToken": { - "description": "Page token to retrieve the next page of results in the list.\nIf this is empty, then there are no more holds to list.", - "type": "string" - }, - "holds": { - "items": { - "$ref": "Hold" - }, - "type": "array", - "description": "The list of holds." - } - }, - "id": "ListHoldsResponse" - }, - "ListHeldAccountsResponse": { - "type": "object", - "properties": { - "accounts": { - "description": "The held accounts on a hold.", - "items": { - "$ref": "HeldAccount" - }, - "type": "array" - } - }, - "id": "ListHeldAccountsResponse", - "description": "Returns a list of held accounts for a hold." - }, - "UndeleteMatterRequest": { - "description": "Undelete a matter by ID.", - "type": "object", - "properties": {}, - "id": "UndeleteMatterRequest" - }, - "Empty": { - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", - "type": "object" - }, - "CloseMatterRequest": { - "description": "Close a matter by ID.", - "type": "object", - "properties": {}, - "id": "CloseMatterRequest" - }, - "ReopenMatterRequest": { - "description": "Reopen a matter by ID.", - "type": "object", - "properties": {}, - "id": "ReopenMatterRequest" } }, "protocol": "rest", "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" + "x32": "http://www.google.com/images/icons/product/search-32.gif", + "x16": "http://www.google.com/images/icons/product/search-16.gif" }, "canonicalName": "Vault", "auth": { "oauth2": { "scopes": { - "https://www.googleapis.com/auth/ediscovery": { - "description": "Manage your eDiscovery data" - }, "https://www.googleapis.com/auth/ediscovery.readonly": { "description": "View your eDiscovery data" + }, + "https://www.googleapis.com/auth/ediscovery": { + "description": "Manage your eDiscovery data" } } } - }, - "rootUrl": "https://vault.googleapis.com/", - "ownerDomain": "google.com", - "name": "vault", - "batchPath": "batch", - "fullyEncodeReservedExpansion": true, - "title": "Google Vault API", - "ownerName": "Google", - "resources": { - "matters": { - "methods": { - "delete": { - "description": "Deletes the specified matter. Returns matter with updated state.", - "httpMethod": "DELETE", - "response": { - "$ref": "Matter" - }, - "parameterOrder": [ - "matterId" - ], - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "flatPath": "v1/matters/{matterId}", - "path": "v1/matters/{matterId}", - "id": "vault.matters.delete" - }, - "addPermissions": { - "httpMethod": "POST", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "MatterPermission" - }, - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "flatPath": "v1/matters/{matterId}:addPermissions", - "path": "v1/matters/{matterId}:addPermissions", - "id": "vault.matters.addPermissions", - "description": "Adds an account as a matter collaborator.", - "request": { - "$ref": "AddMatterPermissionsRequest" - } - }, - "list": { - "flatPath": "v1/matters", - "path": "v1/matters", - "id": "vault.matters.list", - "description": "Lists matters the user has access to.", - "httpMethod": "GET", - "parameterOrder": [], - "response": { - "$ref": "ListMattersResponse" - }, - "parameters": { - "pageToken": { - "location": "query", - "description": "The pagination token as returned in the response.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The number of matters to return in the response.\nDefault and maximum are 100.", - "type": "integer" - }, - "view": { - "description": "Specifies which parts of the matter to return in response.", - "type": "string", - "location": "query", - "enum": [ - "VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ] - }, - "state": { - "location": "query", - "enum": [ - "STATE_UNSPECIFIED", - "OPEN", - "CLOSED", - "DELETED" - ], - "description": "If set, list only matters with that specific state. The default is listing\nmatters of all states.", - "type": "string" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery", - "https://www.googleapis.com/auth/ediscovery.readonly" - ] - }, - "create": { - "description": "Creates a new matter with the given name and description. The initial state\nis open, and the owner is the method caller. Returns the created matter\nwith default view.", - "request": { - "$ref": "Matter" - }, - "response": { - "$ref": "Matter" - }, - "parameterOrder": [], - "httpMethod": "POST", - "parameters": {}, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "flatPath": "v1/matters", - "id": "vault.matters.create", - "path": "v1/matters" - }, - "reopen": { - "httpMethod": "POST", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "ReopenMatterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - }, - "flatPath": "v1/matters/{matterId}:reopen", - "path": "v1/matters/{matterId}:reopen", - "id": "vault.matters.reopen", - "request": { - "$ref": "ReopenMatterRequest" - }, - "description": "Reopens the specified matter. Returns matter with updated state." - }, - "removePermissions": { - "flatPath": "v1/matters/{matterId}:removePermissions", - "id": "vault.matters.removePermissions", - "path": "v1/matters/{matterId}:removePermissions", - "description": "Removes an account as a matter collaborator.", - "request": { - "$ref": "RemoveMatterPermissionsRequest" - }, - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "POST", - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ] - }, - "get": { - "description": "Gets the specified matter.", - "httpMethod": "GET", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "Matter" - }, - "parameters": { - "view": { - "location": "query", - "enum": [ - "VIEW_UNSPECIFIED", - "BASIC", - "FULL" - ], - "description": "Specifies which parts of the Matter to return in the response.", - "type": "string" - }, - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery", - "https://www.googleapis.com/auth/ediscovery.readonly" - ], - "flatPath": "v1/matters/{matterId}", - "path": "v1/matters/{matterId}", - "id": "vault.matters.get" - }, - "undelete": { - "description": "Undeletes the specified matter. Returns matter with updated state.", - "request": { - "$ref": "UndeleteMatterRequest" - }, - "response": { - "$ref": "Matter" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "POST", - "parameters": { - "matterId": { - "type": "string", - "required": true, - "location": "path", - "description": "The matter ID." - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "flatPath": "v1/matters/{matterId}:undelete", - "id": "vault.matters.undelete", - "path": "v1/matters/{matterId}:undelete" - }, - "close": { - "request": { - "$ref": "CloseMatterRequest" - }, - "description": "Closes the specified matter. Returns matter with updated state.", - "httpMethod": "POST", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "CloseMatterResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "parameters": { - "matterId": { - "type": "string", - "required": true, - "location": "path", - "description": "The matter ID." - } - }, - "flatPath": "v1/matters/{matterId}:close", - "path": "v1/matters/{matterId}:close", - "id": "vault.matters.close" - }, - "update": { - "response": { - "$ref": "Matter" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "PUT", - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "flatPath": "v1/matters/{matterId}", - "id": "vault.matters.update", - "path": "v1/matters/{matterId}", - "description": "Updates the specified matter.\nThis updates only the name and description of the matter, identified by\nmatter id. Changes to any other fields are ignored.\nReturns the default view of the matter.", - "request": { - "$ref": "Matter" - } - } - }, - "resources": { - "holds": { - "methods": { - "list": { - "parameters": { - "pageToken": { - "location": "query", - "description": "The pagination token as returned in the response.\nAn empty token means start from the beginning.", - "type": "string" - }, - "pageSize": { - "location": "query", - "format": "int32", - "description": "The number of holds to return in the response, between 0 and 100 inclusive.\nLeaving this empty, or as 0, is the same as page_size = 100.", - "type": "integer" - }, - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery", - "https://www.googleapis.com/auth/ediscovery.readonly" - ], - "flatPath": "v1/matters/{matterId}/holds", - "id": "vault.matters.holds.list", - "path": "v1/matters/{matterId}/holds", - "description": "Lists holds within a matter. An empty page token in ListHoldsResponse\ndenotes no more holds to list.", - "response": { - "$ref": "ListHoldsResponse" - }, - "parameterOrder": [ - "matterId" - ], - "httpMethod": "GET" - }, - "get": { - "flatPath": "v1/matters/{matterId}/holds/{holdId}", - "path": "v1/matters/{matterId}/holds/{holdId}", - "id": "vault.matters.holds.get", - "description": "Gets a hold by ID.", - "httpMethod": "GET", - "parameterOrder": [ - "matterId", - "holdId" - ], - "response": { - "$ref": "Hold" - }, - "parameters": { - "matterId": { - "location": "path", - "description": "The matter ID.", - "type": "string", - "required": true - }, - "holdId": { - "location": "path", - "description": "The hold ID.", - "type": "string", - "required": true - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery", - "https://www.googleapis.com/auth/ediscovery.readonly" - ] - }, - "update": { - "id": "vault.matters.holds.update", - "path": "v1/matters/{matterId}/holds/{holdId}", - "description": "Updates the OU and/or query parameters of a hold. You cannot add accounts\nto a hold that covers an OU, nor can you add OUs to a hold that covers\nindividual accounts. Accounts listed in the hold will be ignored.", - "request": { - "$ref": "Hold" - }, - "response": { - "$ref": "Hold" - }, - "parameterOrder": [ - "matterId", - "holdId" - ], - "httpMethod": "PUT", - "parameters": { - "holdId": { - "description": "The ID of the hold.", - "type": "string", - "required": true, - "location": "path" - }, - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "flatPath": "v1/matters/{matterId}/holds/{holdId}" - }, - "create": { - "flatPath": "v1/matters/{matterId}/holds", - "path": "v1/matters/{matterId}/holds", - "id": "vault.matters.holds.create", - "request": { - "$ref": "Hold" - }, - "description": "Creates a hold in the given matter.", - "httpMethod": "POST", - "parameterOrder": [ - "matterId" - ], - "response": { - "$ref": "Hold" - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - } - }, - "delete": { - "description": "Removes a hold by ID. This will release any HeldAccounts on this Hold.", - "httpMethod": "DELETE", - "response": { - "$ref": "Empty" - }, - "parameterOrder": [ - "matterId", - "holdId" - ], - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "parameters": { - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - }, - "holdId": { - "type": "string", - "required": true, - "location": "path", - "description": "The hold ID." - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}", - "path": "v1/matters/{matterId}/holds/{holdId}", - "id": "vault.matters.holds.delete" - } - }, - "resources": { - "accounts": { - "methods": { - "delete": { - "path": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", - "id": "vault.matters.holds.accounts.delete", - "description": "Removes a HeldAccount from a hold. If this request leaves the hold with\nno held accounts, the hold will not apply to any accounts.", - "httpMethod": "DELETE", - "parameterOrder": [ - "matterId", - "holdId", - "accountId" - ], - "response": { - "$ref": "Empty" - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "parameters": { - "holdId": { - "location": "path", - "description": "The hold ID.", - "type": "string", - "required": true - }, - "accountId": { - "location": "path", - "description": "The ID of the account to remove from the hold.", - "type": "string", - "required": true - }, - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}" - }, - "list": { - "path": "v1/matters/{matterId}/holds/{holdId}/accounts", - "id": "vault.matters.holds.accounts.list", - "description": "Lists HeldAccounts for a hold. This will only list individually specified\nheld accounts. If the hold is on an OU, then use\n\u003ca href=\"https://developers.google.com/admin-sdk/\"\u003eAdmin SDK\u003c/a\u003e\nto enumerate its members.", - "httpMethod": "GET", - "response": { - "$ref": "ListHeldAccountsResponse" - }, - "parameterOrder": [ - "matterId", - "holdId" - ], - "parameters": { - "holdId": { - "location": "path", - "description": "The hold ID.", - "type": "string", - "required": true - }, - "matterId": { - "description": "The matter ID.", - "type": "string", - "required": true, - "location": "path" - } - }, - "scopes": [ - "https://www.googleapis.com/auth/ediscovery", - "https://www.googleapis.com/auth/ediscovery.readonly" - ], - "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts" - }, - "create": { - "id": "vault.matters.holds.accounts.create", - "path": "v1/matters/{matterId}/holds/{holdId}/accounts", - "request": { - "$ref": "HeldAccount" - }, - "description": "Adds a HeldAccount to a hold. Accounts can only be added to a hold that\nhas no held_org_unit set. Attempting to add an account to an OU-based\nhold will result in an error.", - "response": { - "$ref": "HeldAccount" - }, - "parameterOrder": [ - "matterId", - "holdId" - ], - "httpMethod": "POST", - "scopes": [ - "https://www.googleapis.com/auth/ediscovery" - ], - "parameters": { - "holdId": { - "description": "The hold ID.", - "type": "string", - "required": true, - "location": "path" - }, - "matterId": { - "type": "string", - "required": true, - "location": "path", - "description": "The matter ID." - } - }, - "flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts" - } - } - } - } - } - } - } - }, - "parameters": { - "quotaUser": { - "location": "query", - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" - }, - "pp": { - "location": "query", - "description": "Pretty-print response.", - "default": "true", - "type": "boolean" - }, - "bearer_token": { - "location": "query", - "description": "OAuth bearer token.", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "type": "string", - "location": "query" - }, - "upload_protocol": { - "location": "query", - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "type": "string" - }, - "prettyPrint": { - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean", - "location": "query" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "location": "query", - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string" - }, - "$.xgafv": { - "location": "query", - "enum": [ - "1", - "2" - ], - "description": "V1 error format.", - "type": "string", - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ] - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, - "alt": { - "enum": [ - "json", - "media", - "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" - }, - "key": { - "location": "query", - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string" - } - }, - "version": "v1", - "baseUrl": "https://vault.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Archiving and eDiscovery for G Suite.", - "servicePath": "" + } } diff --git a/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json b/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json index e11843871..8d0c425fd 100644 --- a/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json +++ b/vendor/google.golang.org/api/videointelligence/v1beta1/videointelligence-api.json @@ -2,472 +2,6 @@ "discoveryVersion": "v1", "version_module": true, "schemas": { - "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { - "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "type": "object", - "properties": { - "annotationProgress": { - "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress" - }, - "GoogleLongrunning_Operation": { - "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", - "type": "object", - "properties": { - "error": { - "description": "The error result of the operation in case of failure or cancellation.", - "$ref": "GoogleRpc_Status" - }, - "metadata": { - "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", - "type": "object", - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - } - }, - "done": { - "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", - "type": "boolean" - }, - "response": { - "additionalProperties": { - "description": "Properties of the object. Contains field @type with type URL.", - "type": "any" - }, - "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", - "type": "object" - }, - "name": { - "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", - "type": "string" - } - }, - "id": "GoogleLongrunning_Operation" - }, - "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { - "description": "Annotation progress for a single video.", - "type": "object", - "properties": { - "inputUri": { - "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - }, - "progressPercent": { - "format": "int32", - "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", - "type": "integer" - }, - "updateTime": { - "format": "google-datetime", - "description": "Time of the most recent update.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Time when the request was received.", - "type": "string" - } - }, - "id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" - }, - "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults": { - "description": "Annotation results for a single video.", - "type": "object", - "properties": { - "labelAnnotations": { - "description": "Label annotations. There is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation" - }, - "type": "array" - }, - "error": { - "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail.", - "$ref": "GoogleRpc_Status" - }, - "shotAnnotations": { - "description": "Shot annotations. Each shot is represented as a video segment.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" - }, - "type": "array" - }, - "safeSearchAnnotations": { - "description": "Safe search annotations.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" - }, - "type": "array" - }, - "inputUri": { - "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" - }, - "GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { - "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "type": "object", - "properties": { - "annotationResults": { - "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse" - }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse": { - "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "type": "object", - "properties": { - "annotationResults": { - "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse" - }, - "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress": { - "description": "Annotation progress for a single video.", - "type": "object", - "properties": { - "progressPercent": { - "format": "int32", - "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", - "type": "integer" - }, - "updateTime": { - "format": "google-datetime", - "description": "Time of the most recent update.", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "Time when the request was received.", - "type": "string" - }, - "inputUri": { - "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", - "type": "string" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" - }, - "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { - "description": "Video frame level annotation results for explicit content.", - "type": "object", - "properties": { - "pornographyLikelihood": { - "enumDescriptions": [ - "Unspecified likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "LIKELIHOOD_UNSPECIFIED", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood of the pornography content..", - "type": "string" - }, - "timeOffset": { - "format": "google-duration", - "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", - "type": "string" - } - }, - "id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" - }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest": { - "description": "Video annotation request.", - "type": "object", - "properties": { - "locationId": { - "description": "Optional cloud region where annotation should take place. Supported cloud\nregions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region\nis specified, a region will be determined based on video file location.", - "type": "string" - }, - "inputUri": { - "description": "Input video location. Currently, only\n[Google Cloud Storage](https://cloud.google.com/storage/) URIs are\nsupported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).\nA video URI may include wildcards in `object-id`, and thus identify\nmultiple videos. Supported wildcards: '*' to match 0 or more characters;\n'?' to match 1 character. If unset, the input video should be embedded\nin the request as `input_content`. If set, `input_content` should be unset.", - "type": "string" - }, - "inputContent": { - "description": "The video data bytes. Encoding: base64. If unset, the input video(s)\nshould be specified via `input_uri`. If set, `input_uri` should be unset.", - "type": "string" - }, - "features": { - "description": "Requested video annotation features.", - "items": { - "enum": [ - "FEATURE_UNSPECIFIED", - "LABEL_DETECTION", - "SHOT_CHANGE_DETECTION", - "SAFE_SEARCH_DETECTION" - ], - "type": "string" - }, - "type": "array", - "enumDescriptions": [ - "Unspecified.", - "Label detection. Detect objects, such as dog or flower.", - "Shot change detection.", - "Safe search detection." - ] - }, - "outputUri": { - "description": "Optional location where the output (in JSON format) should be stored.\nCurrently, only [Google Cloud Storage](https://cloud.google.com/storage/)\nURIs are supported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).", - "type": "string" - }, - "videoContext": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoContext", - "description": "Additional video context and/or feature-specific parameters." - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" - }, - "GoogleCloudVideointelligenceV1beta1_VideoSegment": { - "description": "Video segment.", - "type": "object", - "properties": { - "endTimeOffset": { - "format": "int64", - "description": "End offset in microseconds (inclusive). Unset means 0.", - "type": "string" - }, - "startTimeOffset": { - "format": "int64", - "description": "Start offset in microseconds (inclusive). Unset means 0.", - "type": "string" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_VideoSegment" - }, - "GoogleCloudVideointelligenceV1beta2_LabelSegment": { - "description": "Video segment level annotation results for label detection.", - "type": "object", - "properties": { - "confidence": { - "format": "float", - "description": "Confidence that the label is accurate. Range: [0, 1].", - "type": "number" - }, - "segment": { - "description": "Video segment where a label was detected.", - "$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" - } - }, - "id": "GoogleCloudVideointelligenceV1beta2_LabelSegment" - }, - "GoogleCloudVideointelligenceV1_SafeSearchAnnotation": { - "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame.", - "type": "object", - "properties": { - "time": { - "format": "google-duration", - "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the video frame for this annotation.", - "type": "string" - }, - "adult": { - "description": "Likelihood of adult content.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - } - }, - "id": "GoogleCloudVideointelligenceV1_SafeSearchAnnotation" - }, - "GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { - "description": "Label annotation.", - "type": "object", - "properties": { - "entity": { - "$ref": "GoogleCloudVideointelligenceV1beta2_Entity", - "description": "Detected entity." - }, - "frames": { - "description": "All video frames where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" - }, - "type": "array" - }, - "segments": { - "description": "All video segments where a label was detected.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" - }, - "type": "array" - }, - "categoryEntities": { - "description": "Common categories for the detected entity.\nE.g. when the label is `Terrier` the category is likely `dog`. And in some\ncases there might be more than one categories e.g. `Terrier` could also be\na `pet`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_Entity" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" - }, - "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation": { - "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame. If only some types of unsafe content\nhave been detected in a frame, the likelihood is set to `UNKNOWN`\nfor all other types of unsafe content.", - "type": "object", - "properties": { - "medical": { - "description": "Likelihood of medical content.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - }, - "adult": { - "description": "Likelihood of adult content.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - }, - "racy": { - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood of racy content.", - "type": "string" - }, - "timeOffset": { - "format": "int64", - "description": "Video time offset in microseconds.", - "type": "string" - }, - "violent": { - "description": "Likelihood of violent content.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - }, - "spoof": { - "description": "Likelihood that an obvious modification was made to the original\nversion to make it appear funny or offensive.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "Very unlikely.", - "Unlikely.", - "Possible.", - "Likely.", - "Very likely." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ] - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" - }, - "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress": { - "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", - "type": "object", - "properties": { - "annotationProgress": { - "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" - }, - "type": "array" - } - }, - "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress" - }, "GoogleCloudVideointelligenceV1beta2_Entity": { "description": "Detected entity from video analysis.", "type": "object", @@ -504,6 +38,40 @@ }, "id": "GoogleCloudVideointelligenceV1beta2_VideoSegment" }, + "GoogleCloudVideointelligenceV1_LabelLocation": { + "description": "Label location.", + "type": "object", + "properties": { + "level": { + "enumDescriptions": [ + "Unspecified.", + "Video-level. Corresponds to the whole video.", + "Segment-level. Corresponds to one of `AnnotateSpec.segments`.", + "Shot-level. Corresponds to a single shot (i.e. a series of frames\nwithout a major camera position or background change).", + "Frame-level. Corresponds to a single video frame." + ], + "enum": [ + "LABEL_LEVEL_UNSPECIFIED", + "VIDEO_LEVEL", + "SEGMENT_LEVEL", + "SHOT_LEVEL", + "FRAME_LEVEL" + ], + "description": "Label level.", + "type": "string" + }, + "confidence": { + "format": "float", + "description": "Confidence that the label is accurate. Range: [0, 1].", + "type": "number" + }, + "segment": { + "$ref": "GoogleCloudVideointelligenceV1_VideoSegment", + "description": "Video segment. Unset for video-level labels.\nSet to a frame timestamp for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested)." + } + }, + "id": "GoogleCloudVideointelligenceV1_LabelLocation" + }, "GoogleCloudVideointelligenceV1_VideoAnnotationResults": { "description": "Annotation results for a single video.", "type": "object", @@ -540,40 +108,6 @@ }, "id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" }, - "GoogleCloudVideointelligenceV1_LabelLocation": { - "description": "Label location.", - "type": "object", - "properties": { - "level": { - "enumDescriptions": [ - "Unspecified.", - "Video-level. Corresponds to the whole video.", - "Segment-level. Corresponds to one of `AnnotateSpec.segments`.", - "Shot-level. Corresponds to a single shot (i.e. a series of frames\nwithout a major camera position or background change).", - "Frame-level. Corresponds to a single video frame." - ], - "enum": [ - "LABEL_LEVEL_UNSPECIFIED", - "VIDEO_LEVEL", - "SEGMENT_LEVEL", - "SHOT_LEVEL", - "FRAME_LEVEL" - ], - "description": "Label level.", - "type": "string" - }, - "confidence": { - "format": "float", - "description": "Confidence that the label is accurate. Range: [0, 1].", - "type": "number" - }, - "segment": { - "description": "Video segment. Unset for video-level labels.\nSet to a frame timestamp for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested).", - "$ref": "GoogleCloudVideointelligenceV1_VideoSegment" - } - }, - "id": "GoogleCloudVideointelligenceV1_LabelLocation" - }, "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", "type": "object", @@ -640,10 +174,6 @@ "description": "Model to use for shot change detection.\nSupported values: \"latest\" and \"stable\" (the default).", "type": "string" }, - "stationaryCamera": { - "description": "Whether the video has been shot from a stationary (i.e. non-moving) camera.\nWhen set to true, might improve detection accuracy for moving objects.", - "type": "boolean" - }, "labelDetectionMode": { "description": "If label detection has been requested, what labels should be detected\nin addition to video-level labels or segment-level labels. If unspecified,\ndefaults to `SHOT_MODE`.", "type": "string", @@ -660,6 +190,10 @@ "SHOT_AND_FRAME_MODE" ] }, + "stationaryCamera": { + "description": "Whether the video has been shot from a stationary (i.e. non-moving) camera.\nWhen set to true, might improve detection accuracy for moving objects.", + "type": "boolean" + }, "safeSearchDetectionModel": { "description": "Model to use for safe search detection.\nSupported values: \"latest\" and \"stable\" (the default).", "type": "string" @@ -685,11 +219,11 @@ "details": { "description": "A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.", "items": { + "type": "object", "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL.", "type": "any" - }, - "type": "object" + } }, "type": "array" }, @@ -726,9 +260,16 @@ "description": "Annotation results for a single video.", "type": "object", "properties": { + "shotLabelAnnotations": { + "description": "Label annotations on shot level.\nThere is exactly one element for each unique label.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" + }, + "type": "array" + }, "error": { - "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail.", - "$ref": "GoogleRpc_Status" + "$ref": "GoogleRpc_Status", + "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail." }, "frameLabelAnnotations": { "description": "Label annotations on frame level.\nThere is exactly one element for each unique label.", @@ -741,6 +282,10 @@ "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", "type": "string" }, + "explicitAnnotation": { + "description": "Explicit content annotation.", + "$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation" + }, "segmentLabelAnnotations": { "description": "Label annotations on video level or user specified segment level.\nThere is exactly one element for each unique label.", "items": { @@ -748,23 +293,12 @@ }, "type": "array" }, - "explicitAnnotation": { - "description": "Explicit content annotation.", - "$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation" - }, "shotAnnotations": { "description": "Shot annotations. Each shot is represented as a video segment.", "items": { "$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" }, "type": "array" - }, - "shotLabelAnnotations": { - "description": "Label annotations on shot level.\nThere is exactly one element for each unique label.", - "items": { - "$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" - }, - "type": "array" } }, "id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" @@ -787,10 +321,6 @@ "description": "Label location.", "type": "object", "properties": { - "segment": { - "description": "Video segment. Set to [-1, -1] for video-level labels.\nSet to [timestamp, timestamp] for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested).", - "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" - }, "level": { "enumDescriptions": [ "Unspecified.", @@ -813,6 +343,10 @@ "format": "float", "description": "Confidence that the label is accurate. Range: [0, 1].", "type": "number" + }, + "segment": { + "description": "Video segment. Set to [-1, -1] for video-level labels.\nSet to [timestamp, timestamp] for frame-level labels.\nOtherwise, corresponds to one of `AnnotateSpec.segments`\n(if specified) or to shot boundaries (if requested).", + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" } }, "id": "GoogleCloudVideointelligenceV1beta1_LabelLocation" @@ -873,6 +407,472 @@ } }, "id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" + }, + "GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { + "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", + "type": "object", + "properties": { + "annotationProgress": { + "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress" + }, + "GoogleLongrunning_Operation": { + "description": "This resource represents a long-running operation that is the result of a\nnetwork API call.", + "type": "object", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress.\nIf `true`, the operation is completed, and either `error` or `response` is\navailable.", + "type": "boolean" + }, + "response": { + "description": "The normal response of the operation in case of success. If the original\nmethod returns no data on success, such as `Delete`, the response is\n`google.protobuf.Empty`. If the original method is standard\n`Get`/`Create`/`Update`, the response should be the resource. For other\nmethods, the response should have the type `XxxResponse`, where `Xxx`\nis the original method name. For example, if the original method name\nis `TakeSnapshot()`, the inferred response type is\n`TakeSnapshotResponse`.", + "type": "object", + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + } + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that\noriginally returns it. If you use the default HTTP mapping, the\n`name` should have the format of `operations/some/unique/name`.", + "type": "string" + }, + "error": { + "description": "The error result of the operation in case of failure or cancellation.", + "$ref": "GoogleRpc_Status" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically\ncontains progress information and common metadata such as create time.\nSome services might not provide such metadata. Any method that returns a\nlong-running operation should document the metadata type, if any.", + "type": "object" + } + }, + "id": "GoogleLongrunning_Operation" + }, + "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults": { + "description": "Annotation results for a single video.", + "type": "object", + "properties": { + "error": { + "description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest`\nsome videos may succeed and some may fail.", + "$ref": "GoogleRpc_Status" + }, + "shotAnnotations": { + "description": "Shot annotations. Each shot is represented as a video segment.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoSegment" + }, + "type": "array" + }, + "safeSearchAnnotations": { + "description": "Safe search annotations.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" + }, + "type": "array" + }, + "inputUri": { + "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", + "type": "string" + }, + "labelAnnotations": { + "description": "Label annotations. There is exactly one element for each unique label.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_LabelAnnotation" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" + }, + "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { + "description": "Annotation progress for a single video.", + "type": "object", + "properties": { + "progressPercent": { + "format": "int32", + "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", + "type": "integer" + }, + "updateTime": { + "format": "google-datetime", + "description": "Time of the most recent update.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Time when the request was received.", + "type": "string" + }, + "inputUri": { + "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" + }, + "GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { + "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", + "type": "object", + "properties": { + "annotationResults": { + "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse" + }, + "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse": { + "description": "Video annotation response. Included in the `response`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", + "type": "object", + "properties": { + "annotationResults": { + "description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationResults" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoResponse" + }, + "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress": { + "description": "Annotation progress for a single video.", + "type": "object", + "properties": { + "inputUri": { + "description": "Video file location in\n[Google Cloud Storage](https://cloud.google.com/storage/).", + "type": "string" + }, + "progressPercent": { + "format": "int32", + "description": "Approximate percentage processed thus far.\nGuaranteed to be 100 when fully processed.", + "type": "integer" + }, + "updateTime": { + "format": "google-datetime", + "description": "Time of the most recent update.", + "type": "string" + }, + "startTime": { + "format": "google-datetime", + "description": "Time when the request was received.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" + }, + "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { + "description": "Video frame level annotation results for explicit content.", + "type": "object", + "properties": { + "pornographyLikelihood": { + "enumDescriptions": [ + "Unspecified likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "LIKELIHOOD_UNSPECIFIED", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of the pornography content..", + "type": "string" + }, + "timeOffset": { + "format": "google-duration", + "description": "Time-offset, relative to the beginning of the video, corresponding to the\nvideo frame for this location.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" + }, + "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest": { + "description": "Video annotation request.", + "type": "object", + "properties": { + "features": { + "enumDescriptions": [ + "Unspecified.", + "Label detection. Detect objects, such as dog or flower.", + "Shot change detection.", + "Safe search detection." + ], + "description": "Requested video annotation features.", + "items": { + "type": "string", + "enum": [ + "FEATURE_UNSPECIFIED", + "LABEL_DETECTION", + "SHOT_CHANGE_DETECTION", + "SAFE_SEARCH_DETECTION" + ] + }, + "type": "array" + }, + "outputUri": { + "description": "Optional location where the output (in JSON format) should be stored.\nCurrently, only [Google Cloud Storage](https://cloud.google.com/storage/)\nURIs are supported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).", + "type": "string" + }, + "videoContext": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoContext", + "description": "Additional video context and/or feature-specific parameters." + }, + "locationId": { + "description": "Optional cloud region where annotation should take place. Supported cloud\nregions: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region\nis specified, a region will be determined based on video file location.", + "type": "string" + }, + "inputUri": { + "description": "Input video location. Currently, only\n[Google Cloud Storage](https://cloud.google.com/storage/) URIs are\nsupported, which must be specified in the following format:\n`gs://bucket-id/object-id` (other URI formats return\ngoogle.rpc.Code.INVALID_ARGUMENT). For more information, see\n[Request URIs](/storage/docs/reference-uris).\nA video URI may include wildcards in `object-id`, and thus identify\nmultiple videos. Supported wildcards: '*' to match 0 or more characters;\n'?' to match 1 character. If unset, the input video should be embedded\nin the request as `input_content`. If set, `input_content` should be unset.", + "type": "string" + }, + "inputContent": { + "description": "The video data bytes. Encoding: base64. If unset, the input video(s)\nshould be specified via `input_uri`. If set, `input_uri` should be unset.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" + }, + "GoogleCloudVideointelligenceV1beta1_VideoSegment": { + "description": "Video segment.", + "type": "object", + "properties": { + "endTimeOffset": { + "format": "int64", + "description": "End offset in microseconds (inclusive). Unset means 0.", + "type": "string" + }, + "startTimeOffset": { + "format": "int64", + "description": "Start offset in microseconds (inclusive). Unset means 0.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_VideoSegment" + }, + "GoogleCloudVideointelligenceV1beta2_LabelSegment": { + "description": "Video segment level annotation results for label detection.", + "type": "object", + "properties": { + "confidence": { + "format": "float", + "description": "Confidence that the label is accurate. Range: [0, 1].", + "type": "number" + }, + "segment": { + "description": "Video segment where a label was detected.", + "$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_LabelSegment" + }, + "GoogleCloudVideointelligenceV1_SafeSearchAnnotation": { + "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame.", + "type": "object", + "properties": { + "time": { + "format": "google-duration", + "description": "Time-offset, relative to the beginning of the video,\ncorresponding to the video frame for this annotation.", + "type": "string" + }, + "adult": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of adult content.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1_SafeSearchAnnotation" + }, + "GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { + "description": "Label annotation.", + "type": "object", + "properties": { + "entity": { + "description": "Detected entity.", + "$ref": "GoogleCloudVideointelligenceV1beta2_Entity" + }, + "frames": { + "description": "All video frames where a label was detected.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" + }, + "type": "array" + }, + "segments": { + "description": "All video segments where a label was detected.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" + }, + "type": "array" + }, + "categoryEntities": { + "description": "Common categories for the detected entity.\nE.g. when the label is `Terrier` the category is likely `dog`. And in some\ncases there might be more than one categories e.g. `Terrier` could also be\na `pet`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta2_Entity" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" + }, + "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation": { + "description": "Safe search annotation (based on per-frame visual signals only).\nIf no unsafe content has been detected in a frame, no annotations\nare present for that frame. If only some types of unsafe content\nhave been detected in a frame, the likelihood is set to `UNKNOWN`\nfor all other types of unsafe content.", + "type": "object", + "properties": { + "adult": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of adult content.", + "type": "string" + }, + "racy": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of racy content.", + "type": "string" + }, + "timeOffset": { + "format": "int64", + "description": "Video time offset in microseconds.", + "type": "string" + }, + "spoof": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood that an obvious modification was made to the original\nversion to make it appear funny or offensive.", + "type": "string" + }, + "violent": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of violent content.", + "type": "string" + }, + "medical": { + "enumDescriptions": [ + "Unknown likelihood.", + "Very unlikely.", + "Unlikely.", + "Possible.", + "Likely.", + "Very likely." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood of medical content.", + "type": "string" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_SafeSearchAnnotation" + }, + "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress": { + "description": "Video annotation progress. Included in the `metadata`\nfield of the `Operation` returned by the `GetOperation`\ncall of the `google::longrunning::Operations` service.", + "type": "object", + "properties": { + "annotationProgress": { + "description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", + "items": { + "$ref": "GoogleCloudVideointelligenceV1beta1_VideoAnnotationProgress" + }, + "type": "array" + } + }, + "id": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoProgress" } }, "icons": { @@ -900,22 +900,22 @@ "videos": { "methods": { "annotate": { - "request": { - "$ref": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" - }, - "description": "Performs asynchronous video annotation. Progress and results can be\nretrieved through the `google.longrunning.Operations` interface.\n`Operation.metadata` contains `AnnotateVideoProgress` (progress).\n`Operation.response` contains `AnnotateVideoResponse` (results).", + "httpMethod": "POST", + "parameterOrder": [], "response": { "$ref": "GoogleLongrunning_Operation" }, - "parameterOrder": [], - "httpMethod": "POST", "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ], "parameters": {}, "flatPath": "v1beta1/videos:annotate", + "path": "v1beta1/videos:annotate", "id": "videointelligence.videos.annotate", - "path": "v1beta1/videos:annotate" + "request": { + "$ref": "GoogleCloudVideointelligenceV1beta1_AnnotateVideoRequest" + }, + "description": "Performs asynchronous video annotation. Progress and results can be\nretrieved through the `google.longrunning.Operations` interface.\n`Operation.metadata` contains `AnnotateVideoProgress` (progress).\n`Operation.response` contains `AnnotateVideoResponse` (results)." } } } @@ -932,19 +932,22 @@ "default": "true", "type": "boolean" }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "type": "string", - "location": "query" - }, "uploadType": { "location": "query", "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", "type": "string" }, - "$.xgafv": { - "description": "V1 error format.", + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "callback": { + "description": "JSONP", "type": "string", + "location": "query" + }, + "$.xgafv": { "enumDescriptions": [ "v1 error format", "v2 error format" @@ -953,38 +956,35 @@ "enum": [ "1", "2" - ] - }, - "callback": { - "location": "query", - "description": "JSONP", + ], + "description": "V1 error format.", "type": "string" }, "alt": { - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", "description": "Data format for response.", "default": "json", "enum": [ "json", "media", "proto" - ] + ], + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query" }, "key": { + "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "type": "string", - "location": "query" + "type": "string" }, "access_token": { + "location": "query", "description": "OAuth access token.", - "type": "string", - "location": "query" + "type": "string" }, "quotaUser": { "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", @@ -992,29 +992,29 @@ "location": "query" }, "pp": { - "location": "query", "description": "Pretty-print response.", "default": "true", - "type": "boolean" - }, - "bearer_token": { - "description": "OAuth bearer token.", - "type": "string", + "type": "boolean", "location": "query" }, "oauth_token": { "location": "query", "description": "OAuth 2.0 token for the current user.", "type": "string" + }, + "bearer_token": { + "description": "OAuth bearer token.", + "type": "string", + "location": "query" } }, "version": "v1beta1", "baseUrl": "https://videointelligence.googleapis.com/", - "description": "Cloud Video Intelligence API.", "kind": "discovery#restDescription", + "description": "Cloud Video Intelligence API.", "servicePath": "", "basePath": "", - "id": "videointelligence:v1beta1", + "revision": "20170925", "documentationLink": "https://cloud.google.com/video-intelligence/docs/", - "revision": "20170919" + "id": "videointelligence:v1beta1" } diff --git a/vendor/google.golang.org/api/vision/v1/vision-api.json b/vendor/google.golang.org/api/vision/v1/vision-api.json index b1bbdb4fd..91f6e1a47 100644 --- a/vendor/google.golang.org/api/vision/v1/vision-api.json +++ b/vendor/google.golang.org/api/vision/v1/vision-api.json @@ -1,18 +1,4 @@ { - "canonicalName": "Vision", - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-vision": { - "description": "Apply machine learning models to understand and label images" - }, - "https://www.googleapis.com/auth/cloud-platform": { - "description": "View and manage your data across Google Cloud Platform services" - } - } - } - }, - "rootUrl": "https://vision.googleapis.com/", "ownerDomain": "google.com", "name": "vision", "batchPath": "batch", @@ -22,20 +8,20 @@ "images": { "methods": { "annotate": { + "description": "Run image detection and annotation for a batch of images.", "request": { "$ref": "BatchAnnotateImagesRequest" }, - "description": "Run image detection and annotation for a batch of images.", "response": { "$ref": "BatchAnnotateImagesResponse" }, "parameterOrder": [], "httpMethod": "POST", + "parameters": {}, "scopes": [ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/cloud-vision" ], - "parameters": {}, "flatPath": "v1/images:annotate", "id": "vision.images.annotate", "path": "v1/images:annotate" @@ -55,17 +41,24 @@ "default": "true", "type": "boolean" }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" - }, "fields": { "location": "query", "description": "Selector specifying which fields to include in a partial response.", "type": "string" }, + "uploadType": { + "type": "string", + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")." + }, + "callback": { + "location": "query", + "description": "JSONP", + "type": "string" + }, "$.xgafv": { + "description": "V1 error format.", + "type": "string", "enumDescriptions": [ "v1 error format", "v2 error format" @@ -74,16 +67,10 @@ "enum": [ "1", "2" - ], - "description": "V1 error format.", - "type": "string" - }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" + ] }, "alt": { + "default": "json", "enum": [ "json", "media", @@ -96,543 +83,52 @@ "Responses with Content-Type of application/x-protobuf" ], "location": "query", - "description": "Data format for response.", - "default": "json" - }, - "access_token": { - "description": "OAuth access token.", - "type": "string", - "location": "query" + "description": "Data format for response." }, "key": { "location": "query", "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", "type": "string" }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" }, + "quotaUser": { + "location": "query", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "type": "string" + }, "pp": { "location": "query", "description": "Pretty-print response.", "default": "true", "type": "boolean" }, - "bearer_token": { + "oauth_token": { "location": "query", - "description": "OAuth bearer token.", + "description": "OAuth 2.0 token for the current user.", "type": "string" }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", + "bearer_token": { + "description": "OAuth bearer token.", "type": "string", "location": "query" } }, "version": "v1", "baseUrl": "https://vision.googleapis.com/", - "kind": "discovery#restDescription", - "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", "servicePath": "", + "description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", + "kind": "discovery#restDescription", "basePath": "", - "revision": "20170918", - "documentationLink": "https://cloud.google.com/vision/", "id": "vision:v1", + "revision": "20170922", + "documentationLink": "https://cloud.google.com/vision/", "discoveryVersion": "v1", "version_module": true, "schemas": { - "CropHint": { - "description": "Single crop hint that is used to generate a new crop when serving an image.", - "type": "object", - "properties": { - "importanceFraction": { - "format": "float", - "description": "Fraction of importance of this salient region with respect to the original\nimage.", - "type": "number" - }, - "confidence": { - "format": "float", - "description": "Confidence of this being a salient region. Range [0, 1].", - "type": "number" - }, - "boundingPoly": { - "$ref": "BoundingPoly", - "description": "The bounding polygon for the crop region. The coordinates of the bounding\nbox are in the original image's scale, as returned in `ImageParams`." - } - }, - "id": "CropHint" - }, - "Landmark": { - "properties": { - "type": { - "enumDescriptions": [ - "Unknown face landmark detected. Should not be filled.", - "Left eye.", - "Right eye.", - "Left of left eyebrow.", - "Right of left eyebrow.", - "Left of right eyebrow.", - "Right of right eyebrow.", - "Midpoint between eyes.", - "Nose tip.", - "Upper lip.", - "Lower lip.", - "Mouth left.", - "Mouth right.", - "Mouth center.", - "Nose, bottom right.", - "Nose, bottom left.", - "Nose, bottom center.", - "Left eye, top boundary.", - "Left eye, right corner.", - "Left eye, bottom boundary.", - "Left eye, left corner.", - "Right eye, top boundary.", - "Right eye, right corner.", - "Right eye, bottom boundary.", - "Right eye, left corner.", - "Left eyebrow, upper midpoint.", - "Right eyebrow, upper midpoint.", - "Left ear tragion.", - "Right ear tragion.", - "Left eye pupil.", - "Right eye pupil.", - "Forehead glabella.", - "Chin gnathion.", - "Chin left gonion.", - "Chin right gonion." - ], - "enum": [ - "UNKNOWN_LANDMARK", - "LEFT_EYE", - "RIGHT_EYE", - "LEFT_OF_LEFT_EYEBROW", - "RIGHT_OF_LEFT_EYEBROW", - "LEFT_OF_RIGHT_EYEBROW", - "RIGHT_OF_RIGHT_EYEBROW", - "MIDPOINT_BETWEEN_EYES", - "NOSE_TIP", - "UPPER_LIP", - "LOWER_LIP", - "MOUTH_LEFT", - "MOUTH_RIGHT", - "MOUTH_CENTER", - "NOSE_BOTTOM_RIGHT", - "NOSE_BOTTOM_LEFT", - "NOSE_BOTTOM_CENTER", - "LEFT_EYE_TOP_BOUNDARY", - "LEFT_EYE_RIGHT_CORNER", - "LEFT_EYE_BOTTOM_BOUNDARY", - "LEFT_EYE_LEFT_CORNER", - "RIGHT_EYE_TOP_BOUNDARY", - "RIGHT_EYE_RIGHT_CORNER", - "RIGHT_EYE_BOTTOM_BOUNDARY", - "RIGHT_EYE_LEFT_CORNER", - "LEFT_EYEBROW_UPPER_MIDPOINT", - "RIGHT_EYEBROW_UPPER_MIDPOINT", - "LEFT_EAR_TRAGION", - "RIGHT_EAR_TRAGION", - "LEFT_EYE_PUPIL", - "RIGHT_EYE_PUPIL", - "FOREHEAD_GLABELLA", - "CHIN_GNATHION", - "CHIN_LEFT_GONION", - "CHIN_RIGHT_GONION" - ], - "description": "Face landmark type.", - "type": "string" - }, - "position": { - "$ref": "Position", - "description": "Face landmark position." - } - }, - "id": "Landmark", - "description": "A face-specific landmark (for example, a face feature).\nLandmark positions may fall outside the bounds of the image\nif the face is near one or more edges of the image.\nTherefore it is NOT guaranteed that `0 \u003c= x \u003c width` or\n`0 \u003c= y \u003c height`.", - "type": "object" - }, - "WebImage": { - "properties": { - "url": { - "description": "The result image URL.", - "type": "string" - }, - "score": { - "format": "float", - "description": "(Deprecated) Overall relevancy score for the image.", - "type": "number" - } - }, - "id": "WebImage", - "description": "Metadata for online images.", - "type": "object" - }, - "Word": { - "properties": { - "boundingBox": { - "description": "The bounding box for the word.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", - "$ref": "BoundingPoly" - }, - "symbols": { - "description": "List of symbols in the word.\nThe order of the symbols follows the natural reading order.", - "items": { - "$ref": "Symbol" - }, - "type": "array" - }, - "property": { - "$ref": "TextProperty", - "description": "Additional information detected for the word." - } - }, - "id": "Word", - "description": "A word representation.", - "type": "object" - }, - "Paragraph": { - "properties": { - "boundingBox": { - "$ref": "BoundingPoly", - "description": "The bounding box for the paragraph.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." - }, - "words": { - "description": "List of words in this paragraph.", - "items": { - "$ref": "Word" - }, - "type": "array" - }, - "property": { - "$ref": "TextProperty", - "description": "Additional information detected for the paragraph." - } - }, - "id": "Paragraph", - "description": "Structural unit of text representing a number of words in certain order.", - "type": "object" - }, - "Image": { - "description": "Client image to perform Google Cloud Vision API tasks over.", - "type": "object", - "properties": { - "source": { - "description": "Google Cloud Storage image location. If both `content` and `source`\nare provided for an image, `content` takes precedence and is\nused to perform the image annotation request.", - "$ref": "ImageSource" - }, - "content": { - "format": "byte", - "description": "Image content, represented as a stream of bytes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresentation, whereas JSON representations use base64.", - "type": "string" - } - }, - "id": "Image" - }, - "FaceAnnotation": { - "properties": { - "fdBoundingPoly": { - "$ref": "BoundingPoly", - "description": "The `fd_bounding_poly` bounding polygon is tighter than the\n`boundingPoly`, and encloses only the skin part of the face. Typically, it\nis used to eliminate the face from any image analysis that detects the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker results, only on the initial face detection, hence\nthe \u003ccode\u003efd\u003c/code\u003e (face detection) prefix." - }, - "surpriseLikelihood": { - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Surprise likelihood.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ] - }, - "landmarks": { - "description": "Detected face landmarks.", - "items": { - "$ref": "Landmark" - }, - "type": "array" - }, - "angerLikelihood": { - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Anger likelihood.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ] - }, - "joyLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Joy likelihood.", - "type": "string" - }, - "landmarkingConfidence": { - "format": "float", - "description": "Face landmarking confidence. Range [0, 1].", - "type": "number" - }, - "underExposedLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Under-exposed likelihood.", - "type": "string" - }, - "panAngle": { - "format": "float", - "description": "Yaw angle, which indicates the leftward/rightward angle that the face is\npointing relative to the vertical plane perpendicular to the image. Range\n[-180,180].", - "type": "number" - }, - "detectionConfidence": { - "format": "float", - "description": "Detection confidence. Range [0, 1].", - "type": "number" - }, - "blurredLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Blurred likelihood.", - "type": "string" - }, - "headwearLikelihood": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Headwear likelihood.", - "type": "string" - }, - "boundingPoly": { - "description": "The bounding polygon around the face. The coordinates of the bounding box\nare in the original image's scale, as returned in `ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordance with human\nexpectations. It is based on the landmarker results.\nNote that one or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (the polygon will be unbounded) if only a partial face\nappears in the image to be annotated.", - "$ref": "BoundingPoly" - }, - "rollAngle": { - "format": "float", - "description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation\nof the face relative to the image vertical about the axis perpendicular to\nthe face. Range [-180,180].", - "type": "number" - }, - "sorrowLikelihood": { - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Sorrow likelihood.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ] - }, - "tiltAngle": { - "format": "float", - "description": "Pitch angle, which indicates the upwards/downwards angle that the face is\npointing relative to the image's horizontal plane. Range [-180,180].", - "type": "number" - } - }, - "id": "FaceAnnotation", - "description": "A face annotation object contains the results of face detection.", - "type": "object" - }, - "BatchAnnotateImagesRequest": { - "description": "Multiple image annotation requests are batched into a single service call.", - "type": "object", - "properties": { - "requests": { - "description": "Individual image annotation requests for this batch.", - "items": { - "$ref": "AnnotateImageRequest" - }, - "type": "array" - } - }, - "id": "BatchAnnotateImagesRequest" - }, - "DetectedBreak": { - "description": "Detected start or end of a structural component.", - "type": "object", - "properties": { - "type": { - "enumDescriptions": [ - "Unknown break label type.", - "Regular space.", - "Sure space (very wide).", - "Line-wrapping break.", - "End-line hyphen that is not present in text; does not co-occur with\n`SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", - "Line break that ends a paragraph." - ], - "enum": [ - "UNKNOWN", - "SPACE", - "SURE_SPACE", - "EOL_SURE_SPACE", - "HYPHEN", - "LINE_BREAK" - ], - "description": "Detected break type.", - "type": "string" - }, - "isPrefix": { - "description": "True if break prepends the element.", - "type": "boolean" - } - }, - "id": "DetectedBreak" - }, - "ImageContext": { - "properties": { - "languageHints": { - "description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value\nyields the best results since it enables automatic language detection. For\nlanguages based on the Latin alphabet, setting `language_hints` is not\nneeded. In rare cases, when the language of the text in the image is known,\nsetting a hint will help get better results (although it will be a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerror if one or more of the specified languages is not one of the\n[supported languages](/vision/docs/languages).", - "items": { - "type": "string" - }, - "type": "array" - }, - "latLongRect": { - "description": "lat/long rectangle that specifies the location of the image.", - "$ref": "LatLongRect" - }, - "cropHintsParams": { - "$ref": "CropHintsParams", - "description": "Parameters for crop hints annotation request." - } - }, - "id": "ImageContext", - "description": "Image context and/or feature-specific parameters.", - "type": "object" - }, - "Page": { - "description": "Detected page from OCR.", - "type": "object", - "properties": { - "width": { - "format": "int32", - "description": "Page width in pixels.", - "type": "integer" - }, - "blocks": { - "description": "List of blocks of text, images etc on this page.", - "items": { - "$ref": "Block" - }, - "type": "array" - }, - "property": { - "$ref": "TextProperty", - "description": "Additional information detected on the page." - }, - "height": { - "format": "int32", - "description": "Page height in pixels.", - "type": "integer" - } - }, - "id": "Page" - }, - "AnnotateImageRequest": { - "properties": { - "imageContext": { - "description": "Additional context that may accompany the image.", - "$ref": "ImageContext" - }, - "features": { - "description": "Requested features.", - "items": { - "$ref": "Feature" - }, - "type": "array" - }, - "image": { - "description": "The image to be processed.", - "$ref": "Image" - } - }, - "id": "AnnotateImageRequest", - "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.", - "type": "object" - }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.", "type": "object", @@ -654,8 +150,8 @@ "type": "integer" }, "message": { - "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.", - "type": "string" + "type": "string", + "description": "A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client." } }, "id": "Status" @@ -664,13 +160,13 @@ "description": "Rectangle determined by min and max `LatLng` pairs.", "type": "object", "properties": { - "maxLatLng": { - "description": "Max lat/long pair.", - "$ref": "LatLng" - }, "minLatLng": { "$ref": "LatLng", "description": "Min lat/long pair." + }, + "maxLatLng": { + "$ref": "LatLng", + "description": "Max lat/long pair." } }, "id": "LatLongRect" @@ -678,16 +174,16 @@ "Symbol": { "properties": { "boundingBox": { - "$ref": "BoundingPoly", - "description": "The bounding box for the symbol.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + "description": "The bounding box for the symbol.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", + "$ref": "BoundingPoly" }, "text": { "description": "The actual UTF-8 representation of the symbol.", "type": "string" }, "property": { - "description": "Additional information detected for the symbol.", - "$ref": "TextProperty" + "$ref": "TextProperty", + "description": "Additional information detected for the symbol." } }, "id": "Symbol", @@ -729,30 +225,43 @@ "description": "Represents a color in the RGBA color space. This representation is designed\nfor simplicity of conversion to/from color representations in various\nlanguages over compactness; for example, the fields of this representation\ncan be trivially provided to the constructor of \"java.awt.Color\" in Java; it\ncan also be trivially provided to UIColor's \"+colorWithRed:green:blue:alpha\"\nmethod in iOS; and, with just a little work, it can be easily formatted into\na CSS \"rgba()\" string in JavaScript, as well. Here are some examples:\n\nExample (Java):\n\n import com.google.type.Color;\n\n // ...\n public static java.awt.Color fromProto(Color protocolor) {\n float alpha = protocolor.hasAlpha()\n ? protocolor.getAlpha().getValue()\n : 1.0;\n\n return new java.awt.Color(\n protocolor.getRed(),\n protocolor.getGreen(),\n protocolor.getBlue(),\n alpha);\n }\n\n public static Color toProto(java.awt.Color color) {\n float red = (float) color.getRed();\n float green = (float) color.getGreen();\n float blue = (float) color.getBlue();\n float denominator = 255.0;\n Color.Builder resultBuilder =\n Color\n .newBuilder()\n .setRed(red / denominator)\n .setGreen(green / denominator)\n .setBlue(blue / denominator);\n int alpha = color.getAlpha();\n if (alpha != 255) {\n result.setAlpha(\n FloatValue\n .newBuilder()\n .setValue(((float) alpha) / denominator)\n .build());\n }\n return resultBuilder.build();\n }\n // ...\n\nExample (iOS / Obj-C):\n\n // ...\n static UIColor* fromProto(Color* protocolor) {\n float red = [protocolor red];\n float green = [protocolor green];\n float blue = [protocolor blue];\n FloatValue* alpha_wrapper = [protocolor alpha];\n float alpha = 1.0;\n if (alpha_wrapper != nil) {\n alpha = [alpha_wrapper value];\n }\n return [UIColor colorWithRed:red green:green blue:blue alpha:alpha];\n }\n\n static Color* toProto(UIColor* color) {\n CGFloat red, green, blue, alpha;\n if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) {\n return nil;\n }\n Color* result = [Color alloc] init];\n [result setRed:red];\n [result setGreen:green];\n [result setBlue:blue];\n if (alpha \u003c= 0.9999) {\n [result setAlpha:floatWrapperWithValue(alpha)];\n }\n [result autorelease];\n return result;\n }\n // ...\n\n Example (JavaScript):\n\n // ...\n\n var protoToCssColor = function(rgb_color) {\n var redFrac = rgb_color.red || 0.0;\n var greenFrac = rgb_color.green || 0.0;\n var blueFrac = rgb_color.blue || 0.0;\n var red = Math.floor(redFrac * 255);\n var green = Math.floor(greenFrac * 255);\n var blue = Math.floor(blueFrac * 255);\n\n if (!('alpha' in rgb_color)) {\n return rgbToCssColor_(red, green, blue);\n }\n\n var alphaFrac = rgb_color.alpha.value || 0.0;\n var rgbParams = [red, green, blue].join(',');\n return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');\n };\n\n var rgbToCssColor_ = function(red, green, blue) {\n var rgbNumber = new Number((red \u003c\u003c 16) | (green \u003c\u003c 8) | blue);\n var hexString = rgbNumber.toString(16);\n var missingZeros = 6 - hexString.length;\n var resultBuilder = ['#'];\n for (var i = 0; i \u003c missingZeros; i++) {\n resultBuilder.push('0');\n }\n resultBuilder.push(hexString);\n return resultBuilder.join('');\n };\n\n // ...", "type": "object", "properties": { - "red": { - "format": "float", - "description": "The amount of red in the color as a value in the interval [0, 1].", - "type": "number" - }, "alpha": { "format": "float", "description": "The fraction of this color that should be applied to the pixel. That is,\nthe final pixel color is defined by the equation:\n\n pixel color = alpha * (this color) + (1.0 - alpha) * (background color)\n\nThis means that a value of 1.0 corresponds to a solid color, whereas\na value of 0.0 corresponds to a completely transparent color. This\nuses a wrapper message rather than a simple float scalar so that it is\npossible to distinguish between a default value and the value being unset.\nIf omitted, this color object is to be rendered as a solid color\n(as if the alpha value had been explicitly given with a value of 1.0).", "type": "number" }, "blue": { + "type": "number", "format": "float", - "description": "The amount of blue in the color as a value in the interval [0, 1].", - "type": "number" + "description": "The amount of blue in the color as a value in the interval [0, 1]." }, "green": { "format": "float", "description": "The amount of green in the color as a value in the interval [0, 1].", "type": "number" + }, + "red": { + "type": "number", + "format": "float", + "description": "The amount of red in the color as a value in the interval [0, 1]." } }, "id": "Color" }, + "ImageProperties": { + "id": "ImageProperties", + "description": "Stores image properties, such as dominant colors.", + "type": "object", + "properties": { + "dominantColors": { + "description": "If present, dominant colors completed successfully.", + "$ref": "DominantColorsAnnotation" + } + } + }, "Feature": { + "description": "Users describe the type of Google Cloud Vision API tasks to perform over\nimages by using *Feature*s. Each Feature indicates a type of image\ndetection task to perform. Features encode the Cloud Vision API\nvertical to operate on and the number of top-scoring results to return.", + "type": "object", "properties": { "maxResults": { "format": "int32", @@ -760,20 +269,6 @@ "type": "integer" }, "type": { - "enum": [ - "TYPE_UNSPECIFIED", - "FACE_DETECTION", - "LANDMARK_DETECTION", - "LOGO_DETECTION", - "LABEL_DETECTION", - "TEXT_DETECTION", - "DOCUMENT_TEXT_DETECTION", - "SAFE_SEARCH_DETECTION", - "IMAGE_PROPERTIES", - "CROP_HINTS", - "WEB_DETECTION" - ], - "description": "The feature type.", "type": "string", "enumDescriptions": [ "Unspecified feature type.", @@ -787,29 +282,57 @@ "Compute a set of image properties, such as the image's dominant colors.", "Run crop hints.", "Run web detection." - ] + ], + "enum": [ + "TYPE_UNSPECIFIED", + "FACE_DETECTION", + "LANDMARK_DETECTION", + "LOGO_DETECTION", + "LABEL_DETECTION", + "TEXT_DETECTION", + "DOCUMENT_TEXT_DETECTION", + "SAFE_SEARCH_DETECTION", + "IMAGE_PROPERTIES", + "CROP_HINTS", + "WEB_DETECTION" + ], + "description": "The feature type." } }, - "id": "Feature", - "description": "Users describe the type of Google Cloud Vision API tasks to perform over\nimages by using *Feature*s. Each Feature indicates a type of image\ndetection task to perform. Features encode the Cloud Vision API\nvertical to operate on and the number of top-scoring results to return.", - "type": "object" - }, - "ImageProperties": { - "properties": { - "dominantColors": { - "$ref": "DominantColorsAnnotation", - "description": "If present, dominant colors completed successfully." - } - }, - "id": "ImageProperties", - "description": "Stores image properties, such as dominant colors.", - "type": "object" + "id": "Feature" }, "SafeSearchAnnotation": { - "description": "Set of features pertaining to the image, computed by computer vision\nmethods over safe-search verticals (for example, adult, spoof, medical,\nviolence).", "type": "object", "properties": { + "adult": { + "description": "Represents the adult content likelihood for the image.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, "spoof": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], "enum": [ "UNKNOWN", "VERY_UNLIKELY", @@ -819,46 +342,9 @@ "VERY_LIKELY" ], "description": "Spoof likelihood. The likelihood that an modification\nwas made to the image's canonical version to make it appear\nfunny or offensive.", - "type": "string", - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ] + "type": "string" }, "medical": { - "enumDescriptions": [ - "Unknown likelihood.", - "It is very unlikely that the image belongs to the specified vertical.", - "It is unlikely that the image belongs to the specified vertical.", - "It is possible that the image belongs to the specified vertical.", - "It is likely that the image belongs to the specified vertical.", - "It is very likely that the image belongs to the specified vertical." - ], - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Likelihood that this is a medical image.", - "type": "string" - }, - "violence": { - "enum": [ - "UNKNOWN", - "VERY_UNLIKELY", - "UNLIKELY", - "POSSIBLE", - "LIKELY", - "VERY_LIKELY" - ], - "description": "Violence likelihood.", "type": "string", "enumDescriptions": [ "Unknown likelihood.", @@ -867,9 +353,19 @@ "It is possible that the image belongs to the specified vertical.", "It is likely that the image belongs to the specified vertical.", "It is very likely that the image belongs to the specified vertical." - ] + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Likelihood that this is a medical image." }, - "adult": { + "violence": { + "type": "string", "enumDescriptions": [ "Unknown likelihood.", "It is very unlikely that the image belongs to the specified vertical.", @@ -886,13 +382,15 @@ "LIKELY", "VERY_LIKELY" ], - "description": "Represents the adult content likelihood for the image.", - "type": "string" + "description": "Violence likelihood." } }, - "id": "SafeSearchAnnotation" + "id": "SafeSearchAnnotation", + "description": "Set of features pertaining to the image, computed by computer vision\nmethods over safe-search verticals (for example, adult, spoof, medical,\nviolence)." }, "DominantColorsAnnotation": { + "description": "Set of dominant colors and their corresponding scores.", + "type": "object", "properties": { "colors": { "description": "RGB color values with their score and pixel fraction.", @@ -902,11 +400,11 @@ "type": "array" } }, - "id": "DominantColorsAnnotation", - "description": "Set of dominant colors and their corresponding scores.", - "type": "object" + "id": "DominantColorsAnnotation" }, "TextAnnotation": { + "description": "TextAnnotation contains a structured representation of OCR extracted text.\nThe hierarchy of an OCR extracted text structure is like this:\n TextAnnotation -\u003e Page -\u003e Block -\u003e Paragraph -\u003e Word -\u003e Symbol\nEach structural component, starting from Page, may further have their own\nproperties. Properties describe detected languages, breaks etc.. Please\nrefer to the google.cloud.vision.v1.TextAnnotation.TextProperty message\ndefinition below for more detail.", + "type": "object", "properties": { "pages": { "description": "List of pages detected by OCR.", @@ -920,25 +418,7 @@ "type": "string" } }, - "id": "TextAnnotation", - "description": "TextAnnotation contains a structured representation of OCR extracted text.\nThe hierarchy of an OCR extracted text structure is like this:\n TextAnnotation -\u003e Page -\u003e Block -\u003e Paragraph -\u003e Word -\u003e Symbol\nEach structural component, starting from Page, may further have their own\nproperties. Properties describe detected languages, breaks etc.. Please\nrefer to the google.cloud.vision.v1.TextAnnotation.TextProperty message\ndefinition below for more detail.", - "type": "object" - }, - "DetectedLanguage": { - "description": "Detected language for a structural component.", - "type": "object", - "properties": { - "languageCode": { - "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more\ninformation, see\nhttp://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", - "type": "string" - }, - "confidence": { - "format": "float", - "description": "Confidence of detected language. Range [0, 1].", - "type": "number" - } - }, - "id": "DetectedLanguage" + "id": "TextAnnotation" }, "Vertex": { "description": "A vertex represents a 2D point in the image.\nNOTE: the vertex coordinates are in the same scale as the original image.", @@ -957,15 +437,33 @@ }, "id": "Vertex" }, + "DetectedLanguage": { + "description": "Detected language for a structural component.", + "type": "object", + "properties": { + "languageCode": { + "description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more\ninformation, see\nhttp://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "type": "string" + }, + "confidence": { + "type": "number", + "format": "float", + "description": "Confidence of detected language. Range [0, 1]." + } + }, + "id": "DetectedLanguage" + }, "WebEntity": { + "description": "Entity deduced from similar images on the Internet.", + "type": "object", "properties": { "entityId": { "description": "Opaque entity ID.", "type": "string" }, "description": { - "description": "Canonical description of the entity, in English.", - "type": "string" + "type": "string", + "description": "Canonical description of the entity, in English." }, "score": { "format": "float", @@ -973,13 +471,9 @@ "type": "number" } }, - "id": "WebEntity", - "description": "Entity deduced from similar images on the Internet.", - "type": "object" + "id": "WebEntity" }, "BoundingPoly": { - "description": "A bounding polygon for the detected image annotation.", - "type": "object", "properties": { "vertices": { "description": "The bounding polygon vertices.", @@ -989,33 +483,39 @@ "type": "array" } }, - "id": "BoundingPoly" + "id": "BoundingPoly", + "description": "A bounding polygon for the detected image annotation.", + "type": "object" }, "TextProperty": { + "description": "Additional information detected on the structural component.", + "type": "object", "properties": { - "detectedBreak": { - "description": "Detected start or end of a text segment.", - "$ref": "DetectedBreak" - }, "detectedLanguages": { "description": "A list of detected languages together with confidence.", "items": { "$ref": "DetectedLanguage" }, "type": "array" + }, + "detectedBreak": { + "description": "Detected start or end of a text segment.", + "$ref": "DetectedBreak" } }, - "id": "TextProperty", - "description": "Additional information detected on the structural component.", - "type": "object" + "id": "TextProperty" }, "AnnotateImageResponse": { "description": "Response to an image annotation request.", "type": "object", "properties": { + "error": { + "$ref": "Status", + "description": "If set, represents the error message for the operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect, even when `error` is set." + }, "fullTextAnnotation": { - "description": "If present, text (OCR) detection or document (OCR) text detection has\ncompleted successfully.\nThis annotation provides the structural hierarchy for the OCR detected\ntext.", - "$ref": "TextAnnotation" + "$ref": "TextAnnotation", + "description": "If present, text (OCR) detection or document (OCR) text detection has\ncompleted successfully.\nThis annotation provides the structural hierarchy for the OCR detected\ntext." }, "landmarkAnnotations": { "description": "If present, landmark detection has completed successfully.", @@ -1031,10 +531,6 @@ }, "type": "array" }, - "imagePropertiesAnnotation": { - "$ref": "ImageProperties", - "description": "If present, image properties were extracted successfully." - }, "faceAnnotations": { "description": "If present, face detection has completed successfully.", "items": { @@ -1042,12 +538,16 @@ }, "type": "array" }, + "imagePropertiesAnnotation": { + "$ref": "ImageProperties", + "description": "If present, image properties were extracted successfully." + }, "logoAnnotations": { - "description": "If present, logo detection has completed successfully.", "items": { "$ref": "EntityAnnotation" }, - "type": "array" + "type": "array", + "description": "If present, logo detection has completed successfully." }, "webDetection": { "$ref": "WebDetection", @@ -1058,8 +558,8 @@ "$ref": "CropHintsAnnotation" }, "safeSearchAnnotation": { - "description": "If present, safe-search annotation has completed successfully.", - "$ref": "SafeSearchAnnotation" + "$ref": "SafeSearchAnnotation", + "description": "If present, safe-search annotation has completed successfully." }, "labelAnnotations": { "description": "If present, label detection has completed successfully.", @@ -1067,15 +567,13 @@ "$ref": "EntityAnnotation" }, "type": "array" - }, - "error": { - "$ref": "Status", - "description": "If set, represents the error message for the operation.\nNote that filled-in image annotations are guaranteed to be\ncorrect, even when `error` is set." } }, "id": "AnnotateImageResponse" }, "CropHintsParams": { + "description": "Parameters for crop hints annotation request.", + "type": "object", "properties": { "aspectRatios": { "description": "Aspect ratios in floats, representing the ratio of the width to the height\nof the image. For example, if the desired aspect ratio is 4/3, the\ncorresponding float value should be 1.33333. If not specified, the\nbest possible crop is returned. The number of provided aspect ratios is\nlimited to a maximum of 16; any aspect ratios provided after the 16th are\nignored.", @@ -1086,28 +584,20 @@ "type": "array" } }, - "id": "CropHintsParams", - "description": "Parameters for crop hints annotation request.", - "type": "object" + "id": "CropHintsParams" }, "Block": { + "id": "Block", + "description": "Logical element on the page.", + "type": "object", "properties": { - "boundingBox": { - "description": "The bounding box for the block.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", - "$ref": "BoundingPoly" - }, - "paragraphs": { - "description": "List of paragraphs in this block (if this blocks is of type text).", - "items": { - "$ref": "Paragraph" - }, - "type": "array" - }, "property": { "$ref": "TextProperty", "description": "Additional information detected for the block." }, "blockType": { + "description": "Detected block type (text, image etc) for this block.", + "type": "string", "enumDescriptions": [ "Unknown block type.", "Regular text block.", @@ -1123,17 +613,29 @@ "PICTURE", "RULER", "BARCODE" - ], - "description": "Detected block type (text, image etc) for this block.", - "type": "string" + ] + }, + "boundingBox": { + "description": "The bounding box for the block.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3).", + "$ref": "BoundingPoly" + }, + "paragraphs": { + "description": "List of paragraphs in this block (if this blocks is of type text).", + "items": { + "$ref": "Paragraph" + }, + "type": "array" } - }, - "id": "Block", - "description": "Logical element on the page.", - "type": "object" + } }, "Property": { + "description": "A `Property` consists of a user-supplied name/value pair.", + "type": "object", "properties": { + "value": { + "description": "Value of the property.", + "type": "string" + }, "uint64Value": { "format": "uint64", "description": "Value of numeric properties.", @@ -1142,17 +644,12 @@ "name": { "description": "Name of the property.", "type": "string" - }, - "value": { - "description": "Value of the property.", - "type": "string" } }, - "id": "Property", - "description": "A `Property` consists of a user-supplied name/value pair.", - "type": "object" + "id": "Property" }, "LocationInfo": { + "id": "LocationInfo", "description": "Detected entity location information.", "type": "object", "properties": { @@ -1160,8 +657,7 @@ "description": "lat/long location coordinates.", "$ref": "LatLng" } - }, - "id": "LocationInfo" + } }, "ImageSource": { "description": "External image source (Google Cloud Storage image location).", @@ -1235,6 +731,7 @@ "id": "WebDetection" }, "Position": { + "id": "Position", "description": "A 3D position in the image, used primarily for Face detection landmarks.\nA valid Position must have both x and y coordinates.\nThe position coordinates are in the same scale as the original image.", "type": "object", "properties": { @@ -1253,10 +750,11 @@ "description": "X coordinate.", "type": "number" } - }, - "id": "Position" + } }, "ColorInfo": { + "description": "Color information consists of RGB channels, score, and the fraction of\nthe image that the color occupies in the image.", + "type": "object", "properties": { "pixelFraction": { "format": "float", @@ -1273,32 +771,32 @@ "type": "number" } }, - "id": "ColorInfo", - "description": "Color information consists of RGB channels, score, and the fraction of\nthe image that the color occupies in the image.", - "type": "object" + "id": "ColorInfo" }, "WebPage": { + "description": "Metadata for web pages.", + "type": "object", "properties": { + "score": { + "type": "number", + "format": "float", + "description": "(Deprecated) Overall relevancy score for the web page." + }, "url": { "description": "The result web page URL.", "type": "string" - }, - "score": { - "format": "float", - "description": "(Deprecated) Overall relevancy score for the web page.", - "type": "number" } }, - "id": "WebPage", - "description": "Metadata for web pages.", - "type": "object" + "id": "WebPage" }, "EntityAnnotation": { + "description": "Set of detected entity features.", + "type": "object", "properties": { "score": { + "type": "number", "format": "float", - "description": "Overall score of the result. Range [0, 1].", - "type": "number" + "description": "Overall score of the result. Range [0, 1]." }, "locations": { "description": "The location information for the detected entity. Multiple\n`LocationInfo` elements can be present because one location may\nindicate the location of the scene in the image, and another location\nmay indicate the location of the place where the image was taken.\nLocation information is usually present for landmarks.", @@ -1325,13 +823,13 @@ "type": "string" }, "topicality": { + "type": "number", "format": "float", - "description": "The relevancy of the ICA (Image Content Annotation) label to the\nimage. For example, the relevancy of \"tower\" is likely higher to an image\ncontaining the detected \"Eiffel Tower\" than to an image containing a\ndetected distant towering building, even though the confidence that\nthere is a tower in each image may be the same. Range [0, 1].", - "type": "number" + "description": "The relevancy of the ICA (Image Content Annotation) label to the\nimage. For example, the relevancy of \"tower\" is likely higher to an image\ncontaining the detected \"Eiffel Tower\" than to an image containing a\ndetected distant towering building, even though the confidence that\nthere is a tower in each image may be the same. Range [0, 1]." }, "description": { - "description": "Entity textual description, expressed in its `locale` language.", - "type": "string" + "type": "string", + "description": "Entity textual description, expressed in its `locale` language." }, "properties": { "description": "Some entities may have optional user-supplied `Property` (name/value)\nfields, such a score or string that qualifies the entity.", @@ -1341,14 +839,516 @@ "type": "array" } }, - "id": "EntityAnnotation", - "description": "Set of detected entity features.", + "id": "EntityAnnotation" + }, + "CropHint": { + "id": "CropHint", + "description": "Single crop hint that is used to generate a new crop when serving an image.", + "type": "object", + "properties": { + "importanceFraction": { + "type": "number", + "format": "float", + "description": "Fraction of importance of this salient region with respect to the original\nimage." + }, + "confidence": { + "format": "float", + "description": "Confidence of this being a salient region. Range [0, 1].", + "type": "number" + }, + "boundingPoly": { + "description": "The bounding polygon for the crop region. The coordinates of the bounding\nbox are in the original image's scale, as returned in `ImageParams`.", + "$ref": "BoundingPoly" + } + } + }, + "Landmark": { + "description": "A face-specific landmark (for example, a face feature).\nLandmark positions may fall outside the bounds of the image\nif the face is near one or more edges of the image.\nTherefore it is NOT guaranteed that `0 \u003c= x \u003c width` or\n`0 \u003c= y \u003c height`.", + "type": "object", + "properties": { + "position": { + "$ref": "Position", + "description": "Face landmark position." + }, + "type": { + "description": "Face landmark type.", + "type": "string", + "enumDescriptions": [ + "Unknown face landmark detected. Should not be filled.", + "Left eye.", + "Right eye.", + "Left of left eyebrow.", + "Right of left eyebrow.", + "Left of right eyebrow.", + "Right of right eyebrow.", + "Midpoint between eyes.", + "Nose tip.", + "Upper lip.", + "Lower lip.", + "Mouth left.", + "Mouth right.", + "Mouth center.", + "Nose, bottom right.", + "Nose, bottom left.", + "Nose, bottom center.", + "Left eye, top boundary.", + "Left eye, right corner.", + "Left eye, bottom boundary.", + "Left eye, left corner.", + "Right eye, top boundary.", + "Right eye, right corner.", + "Right eye, bottom boundary.", + "Right eye, left corner.", + "Left eyebrow, upper midpoint.", + "Right eyebrow, upper midpoint.", + "Left ear tragion.", + "Right ear tragion.", + "Left eye pupil.", + "Right eye pupil.", + "Forehead glabella.", + "Chin gnathion.", + "Chin left gonion.", + "Chin right gonion." + ], + "enum": [ + "UNKNOWN_LANDMARK", + "LEFT_EYE", + "RIGHT_EYE", + "LEFT_OF_LEFT_EYEBROW", + "RIGHT_OF_LEFT_EYEBROW", + "LEFT_OF_RIGHT_EYEBROW", + "RIGHT_OF_RIGHT_EYEBROW", + "MIDPOINT_BETWEEN_EYES", + "NOSE_TIP", + "UPPER_LIP", + "LOWER_LIP", + "MOUTH_LEFT", + "MOUTH_RIGHT", + "MOUTH_CENTER", + "NOSE_BOTTOM_RIGHT", + "NOSE_BOTTOM_LEFT", + "NOSE_BOTTOM_CENTER", + "LEFT_EYE_TOP_BOUNDARY", + "LEFT_EYE_RIGHT_CORNER", + "LEFT_EYE_BOTTOM_BOUNDARY", + "LEFT_EYE_LEFT_CORNER", + "RIGHT_EYE_TOP_BOUNDARY", + "RIGHT_EYE_RIGHT_CORNER", + "RIGHT_EYE_BOTTOM_BOUNDARY", + "RIGHT_EYE_LEFT_CORNER", + "LEFT_EYEBROW_UPPER_MIDPOINT", + "RIGHT_EYEBROW_UPPER_MIDPOINT", + "LEFT_EAR_TRAGION", + "RIGHT_EAR_TRAGION", + "LEFT_EYE_PUPIL", + "RIGHT_EYE_PUPIL", + "FOREHEAD_GLABELLA", + "CHIN_GNATHION", + "CHIN_LEFT_GONION", + "CHIN_RIGHT_GONION" + ] + } + }, + "id": "Landmark" + }, + "WebImage": { + "id": "WebImage", + "description": "Metadata for online images.", + "type": "object", + "properties": { + "score": { + "type": "number", + "format": "float", + "description": "(Deprecated) Overall relevancy score for the image." + }, + "url": { + "description": "The result image URL.", + "type": "string" + } + } + }, + "Word": { + "description": "A word representation.", + "type": "object", + "properties": { + "boundingBox": { + "$ref": "BoundingPoly", + "description": "The bounding box for the word.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + }, + "symbols": { + "description": "List of symbols in the word.\nThe order of the symbols follows the natural reading order.", + "items": { + "$ref": "Symbol" + }, + "type": "array" + }, + "property": { + "$ref": "TextProperty", + "description": "Additional information detected for the word." + } + }, + "id": "Word" + }, + "Image": { + "description": "Client image to perform Google Cloud Vision API tasks over.", + "type": "object", + "properties": { + "source": { + "$ref": "ImageSource", + "description": "Google Cloud Storage image location. If both `content` and `source`\nare provided for an image, `content` takes precedence and is\nused to perform the image annotation request." + }, + "content": { + "format": "byte", + "description": "Image content, represented as a stream of bytes.\nNote: as with all `bytes` fields, protobuffers use a pure binary\nrepresentation, whereas JSON representations use base64.", + "type": "string" + } + }, + "id": "Image" + }, + "Paragraph": { + "properties": { + "boundingBox": { + "$ref": "BoundingPoly", + "description": "The bounding box for the paragraph.\nThe vertices are in the order of top-left, top-right, bottom-right,\nbottom-left. When a rotation of the bounding box is detected the rotation\nis represented as around the top-left corner as defined when the text is\nread in the 'natural' orientation.\nFor example:\n * when the text is horizontal it might look like:\n 0----1\n | |\n 3----2\n * when it's rotated 180 degrees around the top-left corner it becomes:\n 2----3\n | |\n 1----0\n and the vertice order will still be (0, 1, 2, 3)." + }, + "words": { + "description": "List of words in this paragraph.", + "items": { + "$ref": "Word" + }, + "type": "array" + }, + "property": { + "description": "Additional information detected for the paragraph.", + "$ref": "TextProperty" + } + }, + "id": "Paragraph", + "description": "Structural unit of text representing a number of words in certain order.", + "type": "object" + }, + "FaceAnnotation": { + "description": "A face annotation object contains the results of face detection.", + "type": "object", + "properties": { + "fdBoundingPoly": { + "$ref": "BoundingPoly", + "description": "The `fd_bounding_poly` bounding polygon is tighter than the\n`boundingPoly`, and encloses only the skin part of the face. Typically, it\nis used to eliminate the face from any image analysis that detects the\n\"amount of skin\" visible in an image. It is not based on the\nlandmarker results, only on the initial face detection, hence\nthe \u003ccode\u003efd\u003c/code\u003e (face detection) prefix." + }, + "surpriseLikelihood": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Surprise likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "landmarks": { + "description": "Detected face landmarks.", + "items": { + "$ref": "Landmark" + }, + "type": "array" + }, + "angerLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Anger likelihood.", + "type": "string" + }, + "landmarkingConfidence": { + "format": "float", + "description": "Face landmarking confidence. Range [0, 1].", + "type": "number" + }, + "joyLikelihood": { + "description": "Joy likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ] + }, + "underExposedLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Under-exposed likelihood.", + "type": "string" + }, + "panAngle": { + "type": "number", + "format": "float", + "description": "Yaw angle, which indicates the leftward/rightward angle that the face is\npointing relative to the vertical plane perpendicular to the image. Range\n[-180,180]." + }, + "detectionConfidence": { + "format": "float", + "description": "Detection confidence. Range [0, 1].", + "type": "number" + }, + "blurredLikelihood": { + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Blurred likelihood.", + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ] + }, + "headwearLikelihood": { + "type": "string", + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Headwear likelihood." + }, + "boundingPoly": { + "description": "The bounding polygon around the face. The coordinates of the bounding box\nare in the original image's scale, as returned in `ImageParams`.\nThe bounding box is computed to \"frame\" the face in accordance with human\nexpectations. It is based on the landmarker results.\nNote that one or more x and/or y coordinates may not be generated in the\n`BoundingPoly` (the polygon will be unbounded) if only a partial face\nappears in the image to be annotated.", + "$ref": "BoundingPoly" + }, + "rollAngle": { + "format": "float", + "description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation\nof the face relative to the image vertical about the axis perpendicular to\nthe face. Range [-180,180].", + "type": "number" + }, + "sorrowLikelihood": { + "enumDescriptions": [ + "Unknown likelihood.", + "It is very unlikely that the image belongs to the specified vertical.", + "It is unlikely that the image belongs to the specified vertical.", + "It is possible that the image belongs to the specified vertical.", + "It is likely that the image belongs to the specified vertical.", + "It is very likely that the image belongs to the specified vertical." + ], + "enum": [ + "UNKNOWN", + "VERY_UNLIKELY", + "UNLIKELY", + "POSSIBLE", + "LIKELY", + "VERY_LIKELY" + ], + "description": "Sorrow likelihood.", + "type": "string" + }, + "tiltAngle": { + "format": "float", + "description": "Pitch angle, which indicates the upwards/downwards angle that the face is\npointing relative to the image's horizontal plane. Range [-180,180].", + "type": "number" + } + }, + "id": "FaceAnnotation" + }, + "BatchAnnotateImagesRequest": { + "description": "Multiple image annotation requests are batched into a single service call.", + "type": "object", + "properties": { + "requests": { + "description": "Individual image annotation requests for this batch.", + "items": { + "$ref": "AnnotateImageRequest" + }, + "type": "array" + } + }, + "id": "BatchAnnotateImagesRequest" + }, + "DetectedBreak": { + "description": "Detected start or end of a structural component.", + "type": "object", + "properties": { + "type": { + "enumDescriptions": [ + "Unknown break label type.", + "Regular space.", + "Sure space (very wide).", + "Line-wrapping break.", + "End-line hyphen that is not present in text; does not co-occur with\n`SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", + "Line break that ends a paragraph." + ], + "enum": [ + "UNKNOWN", + "SPACE", + "SURE_SPACE", + "EOL_SURE_SPACE", + "HYPHEN", + "LINE_BREAK" + ], + "description": "Detected break type.", + "type": "string" + }, + "isPrefix": { + "description": "True if break prepends the element.", + "type": "boolean" + } + }, + "id": "DetectedBreak" + }, + "ImageContext": { + "description": "Image context and/or feature-specific parameters.", + "type": "object", + "properties": { + "cropHintsParams": { + "$ref": "CropHintsParams", + "description": "Parameters for crop hints annotation request." + }, + "languageHints": { + "description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value\nyields the best results since it enables automatic language detection. For\nlanguages based on the Latin alphabet, setting `language_hints` is not\nneeded. In rare cases, when the language of the text in the image is known,\nsetting a hint will help get better results (although it will be a\nsignificant hindrance if the hint is wrong). Text detection returns an\nerror if one or more of the specified languages is not one of the\n[supported languages](/vision/docs/languages).", + "items": { + "type": "string" + }, + "type": "array" + }, + "latLongRect": { + "description": "lat/long rectangle that specifies the location of the image.", + "$ref": "LatLongRect" + } + }, + "id": "ImageContext" + }, + "Page": { + "description": "Detected page from OCR.", + "type": "object", + "properties": { + "height": { + "format": "int32", + "description": "Page height in pixels.", + "type": "integer" + }, + "width": { + "format": "int32", + "description": "Page width in pixels.", + "type": "integer" + }, + "blocks": { + "description": "List of blocks of text, images etc on this page.", + "items": { + "$ref": "Block" + }, + "type": "array" + }, + "property": { + "$ref": "TextProperty", + "description": "Additional information detected on the page." + } + }, + "id": "Page" + }, + "AnnotateImageRequest": { + "properties": { + "features": { + "items": { + "$ref": "Feature" + }, + "type": "array", + "description": "Requested features." + }, + "image": { + "$ref": "Image", + "description": "The image to be processed." + }, + "imageContext": { + "description": "Additional context that may accompany the image.", + "$ref": "ImageContext" + } + }, + "id": "AnnotateImageRequest", + "description": "Request for performing Google Cloud Vision API tasks over a user-provided\nimage, with user-requested features.", "type": "object" } }, "icons": { - "x32": "http://www.google.com/images/icons/product/search-32.gif", - "x16": "http://www.google.com/images/icons/product/search-16.gif" + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" }, - "protocol": "rest" + "protocol": "rest", + "canonicalName": "Vision", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-vision": { + "description": "Apply machine learning models to understand and label images" + }, + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "rootUrl": "https://vision.googleapis.com/" } diff --git a/vendor/google.golang.org/api/youtube/v3/youtube-api.json b/vendor/google.golang.org/api/youtube/v3/youtube-api.json index d8bbfa934..65146c6c3 100644 --- a/vendor/google.golang.org/api/youtube/v3/youtube-api.json +++ b/vendor/google.golang.org/api/youtube/v3/youtube-api.json @@ -1,12 +1,12 @@ { "kind": "discovery#restDescription", - "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/BU-bM3BCaK0APJI5VR6Pk7xHsLc\"", + "etag": "\"YWOzh2SDasdU84ArJnpYek-OMdg/AIWw-yWxHTNchYNbx8LfngbqcZ8\"", "discoveryVersion": "v1", "id": "youtube:v3", "name": "youtube", "canonicalName": "YouTube", "version": "v3", - "revision": "20170903", + "revision": "20170918", "title": "YouTube Data API", "description": "Supports core YouTube features, such as uploading videos, creating and managing playlists, searching for content, and much more.", "ownerDomain": "google.com", @@ -3974,6 +3974,20 @@ "type": "boolean", "description": "Indicates whether this broadcast has low latency enabled." }, + "latencyPreference": { + "type": "string", + "description": "If both this and enable_low_latency are set, they must match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW should have enable_low_latency omitted.", + "enum": [ + "low", + "normal", + "ultraLow" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, "mesh": { "type": "string", "format": "byte" diff --git a/vendor/google.golang.org/api/youtube/v3/youtube-gen.go b/vendor/google.golang.org/api/youtube/v3/youtube-gen.go index dff8446db..5f4a6bb89 100644 --- a/vendor/google.golang.org/api/youtube/v3/youtube-gen.go +++ b/vendor/google.golang.org/api/youtube/v3/youtube-gen.go @@ -4757,6 +4757,17 @@ type LiveBroadcastContentDetails struct { // enabled. EnableLowLatency bool `json:"enableLowLatency,omitempty"` + // LatencyPreference: If both this and enable_low_latency are set, they + // must match. LATENCY_NORMAL should match enable_low_latency=false + // LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW + // should have enable_low_latency omitted. + // + // Possible values: + // "low" + // "normal" + // "ultraLow" + LatencyPreference string `json:"latencyPreference,omitempty"` + Mesh string `json:"mesh,omitempty"` // MonitorStream: The monitorStream object contains information about diff --git a/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json b/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json index a3f61688e..fa2576b28 100644 --- a/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json +++ b/vendor/google.golang.org/api/youtubereporting/v1/youtubereporting-api.json @@ -1,11 +1,10 @@ { - "ownerName": "Google", "discoveryVersion": "v1", + "ownerName": "Google", "resources": { "media": { "methods": { "download": { - "description": "Method for media download. Download is supported\non the URI `/v1/media/{+name}?alt=media`.", "supportsMediaDownload": true, "response": { "$ref": "Media" @@ -14,46 +13,12 @@ "resourceName" ], "httpMethod": "GET", - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ], "parameters": { "resourceName": { + "pattern": "^.+$", "location": "path", "description": "Name of the media that is being downloaded. See\nReadRequest.resource_name.", "type": "string", - "required": true, - "pattern": "^.+$" - } - }, - "flatPath": "v1/media/{mediaId}", - "id": "youtubereporting.media.download", - "path": "v1/media/{+resourceName}" - } - } - }, - "jobs": { - "methods": { - "delete": { - "description": "Deletes a job.", - "httpMethod": "DELETE", - "parameterOrder": [ - "jobId" - ], - "response": { - "$ref": "Empty" - }, - "parameters": { - "onBehalfOfContentOwner": { - "location": "query", - "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string" - }, - "jobId": { - "location": "path", - "description": "The ID of the job to delete.", - "type": "string", "required": true } }, @@ -61,11 +26,53 @@ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" ], + "flatPath": "v1/media/{mediaId}", + "id": "youtubereporting.media.download", + "path": "v1/media/{+resourceName}", + "description": "Method for media download. Download is supported\non the URI `/v1/media/{+name}?alt=media`." + } + } + }, + "jobs": { + "methods": { + "delete": { + "response": { + "$ref": "Empty" + }, + "parameterOrder": [ + "jobId" + ], + "httpMethod": "DELETE", + "parameters": { + "jobId": { + "description": "The ID of the job to delete.", + "type": "string", + "required": true, + "location": "path" + }, + "onBehalfOfContentOwner": { + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], "flatPath": "v1/jobs/{jobId}", + "id": "youtubereporting.jobs.delete", "path": "v1/jobs/{jobId}", - "id": "youtubereporting.jobs.delete" + "description": "Deletes a job." }, "get": { + "response": { + "$ref": "Job" + }, + "parameterOrder": [ + "jobId" + ], + "httpMethod": "GET", "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" @@ -78,66 +85,55 @@ "required": true }, "onBehalfOfContentOwner": { - "type": "string", "location": "query", - "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel)." + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string" } }, "flatPath": "v1/jobs/{jobId}", "id": "youtubereporting.jobs.get", "path": "v1/jobs/{jobId}", - "description": "Gets a job.", - "parameterOrder": [ - "jobId" - ], - "response": { - "$ref": "Job" - }, - "httpMethod": "GET" + "description": "Gets a job." }, "list": { - "path": "v1/jobs", + "flatPath": "v1/jobs", "id": "youtubereporting.jobs.list", + "path": "v1/jobs", "description": "Lists jobs.", - "httpMethod": "GET", - "parameterOrder": [], "response": { "$ref": "ListJobsResponse" }, + "httpMethod": "GET", + "parameterOrder": [], + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], "parameters": { - "onBehalfOfContentOwner": { - "location": "query", - "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string" - }, "includeSystemManaged": { "location": "query", "description": "If set to true, also system-managed jobs will be returned; otherwise only\nuser-created jobs will be returned. System-managed jobs can neither be\nmodified nor deleted.", "type": "boolean" }, "pageToken": { - "location": "query", "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListJobs` method.", - "type": "string" + "type": "string", + "location": "query" }, "pageSize": { - "type": "integer", - "location": "query", "format": "int32", - "description": "Requested page size. Server may return fewer jobs than requested.\nIf unspecified, server will pick an appropriate default." + "description": "Requested page size. Server may return fewer jobs than requested.\nIf unspecified, server will pick an appropriate default.", + "type": "integer", + "location": "query" + }, + "onBehalfOfContentOwner": { + "location": "query", + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string" } - }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ], - "flatPath": "v1/jobs" + } }, "create": { - "description": "Creates a job and returns it.", - "request": { - "$ref": "Job" - }, "response": { "$ref": "Job" }, @@ -145,9 +141,9 @@ "httpMethod": "POST", "parameters": { "onBehalfOfContentOwner": { - "location": "query", "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string" + "type": "string", + "location": "query" } }, "scopes": [ @@ -156,16 +152,17 @@ ], "flatPath": "v1/jobs", "id": "youtubereporting.jobs.create", - "path": "v1/jobs" + "path": "v1/jobs", + "description": "Creates a job and returns it.", + "request": { + "$ref": "Job" + } } }, "resources": { "reports": { "methods": { "get": { - "flatPath": "v1/jobs/{jobId}/reports/{reportId}", - "path": "v1/jobs/{jobId}/reports/{reportId}", - "id": "youtubereporting.jobs.reports.get", "description": "Gets the metadata of a specific report.", "httpMethod": "GET", "parameterOrder": [ @@ -175,76 +172,78 @@ "response": { "$ref": "Report" }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ], "parameters": { + "jobId": { + "type": "string", + "required": true, + "location": "path", + "description": "The ID of the job." + }, "onBehalfOfContentOwner": { - "location": "query", "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string" + "type": "string", + "location": "query" }, "reportId": { "location": "path", "description": "The ID of the report to retrieve.", "type": "string", "required": true - }, - "jobId": { - "description": "The ID of the job.", - "type": "string", - "required": true, - "location": "path" } - } + }, + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], + "flatPath": "v1/jobs/{jobId}/reports/{reportId}", + "path": "v1/jobs/{jobId}/reports/{reportId}", + "id": "youtubereporting.jobs.reports.get" }, "list": { - "flatPath": "v1/jobs/{jobId}/reports", - "id": "youtubereporting.jobs.reports.list", "path": "v1/jobs/{jobId}/reports", + "id": "youtubereporting.jobs.reports.list", "description": "Lists reports created by a specific job.\nReturns NOT_FOUND if the job does not exist.", - "response": { - "$ref": "ListReportsResponse" - }, + "httpMethod": "GET", "parameterOrder": [ "jobId" ], - "httpMethod": "GET", + "response": { + "$ref": "ListReportsResponse" + }, "parameters": { "jobId": { + "location": "path", "description": "The ID of the job.", "type": "string", - "required": true, - "location": "path" + "required": true }, "createdAfter": { - "location": "query", "format": "google-datetime", "description": "If set, only reports created after the specified date/time are returned.", - "type": "string" - }, - "pageToken": { "type": "string", - "location": "query", - "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportsResponse.next_page_token\nreturned in response to the previous call to the `ListReports` method." + "location": "query" }, "startTimeAtOrAfter": { - "location": "query", "format": "google-datetime", "description": "If set, only reports whose start time is greater than or equal the\nspecified date/time are returned.", + "type": "string", + "location": "query" + }, + "pageToken": { + "location": "query", + "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportsResponse.next_page_token\nreturned in response to the previous call to the `ListReports` method.", "type": "string" }, "pageSize": { + "location": "query", "format": "int32", "description": "Requested page size. Server may return fewer report types than requested.\nIf unspecified, server will pick an appropriate default.", - "type": "integer", - "location": "query" + "type": "integer" }, "onBehalfOfContentOwner": { - "location": "query", "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string" + "type": "string", + "location": "query" }, "startTimeBefore": { "type": "string", @@ -256,7 +255,8 @@ "scopes": [ "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", "https://www.googleapis.com/auth/yt-analytics.readonly" - ] + ], + "flatPath": "v1/jobs/{jobId}/reports" } } } @@ -265,47 +265,68 @@ "reportTypes": { "methods": { "list": { + "id": "youtubereporting.reportTypes.list", + "path": "v1/reportTypes", "description": "Lists report types.", "response": { "$ref": "ListReportTypesResponse" }, "parameterOrder": [], "httpMethod": "GET", + "scopes": [ + "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", + "https://www.googleapis.com/auth/yt-analytics.readonly" + ], "parameters": { - "onBehalfOfContentOwner": { - "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", - "type": "string", - "location": "query" - }, "includeSystemManaged": { "location": "query", "description": "If set to true, also system-managed report types will be returned;\notherwise only the report types that can be used to create new reporting\njobs will be returned.", "type": "boolean" }, "pageToken": { + "location": "query", "description": "A token identifying a page of results the server should return. Typically,\nthis is the value of\nListReportTypesResponse.next_page_token\nreturned in response to the previous call to the `ListReportTypes` method.", - "type": "string", - "location": "query" + "type": "string" }, "pageSize": { "type": "integer", "location": "query", "format": "int32", "description": "Requested page size. Server may return fewer report types than requested.\nIf unspecified, server will pick an appropriate default." + }, + "onBehalfOfContentOwner": { + "description": "The content owner's external ID on which behalf the user is acting on. If\nnot set, the user is acting for himself (his own channel).", + "type": "string", + "location": "query" } }, - "scopes": [ - "https://www.googleapis.com/auth/yt-analytics-monetary.readonly", - "https://www.googleapis.com/auth/yt-analytics.readonly" - ], - "flatPath": "v1/reportTypes", - "id": "youtubereporting.reportTypes.list", - "path": "v1/reportTypes" + "flatPath": "v1/reportTypes" } } } }, "parameters": { + "prettyPrint": { + "location": "query", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "type": "boolean" + }, + "fields": { + "location": "query", + "description": "Selector specifying which fields to include in a partial response.", + "type": "string" + }, + "uploadType": { + "location": "query", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "type": "string" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, "$.xgafv": { "description": "V1 error format.", "type": "string", @@ -319,12 +340,13 @@ "2" ] }, - "callback": { - "description": "JSONP", - "type": "string", - "location": "query" - }, "alt": { + "type": "string", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], "location": "query", "description": "Data format for response.", "default": "json", @@ -332,28 +354,22 @@ "json", "media", "proto" - ], - "type": "string", - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" ] }, "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "type": "string", + "location": "query", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token." + }, + "access_token": { + "description": "OAuth access token.", "type": "string", "location": "query" }, - "access_token": { - "location": "query", - "description": "OAuth access token.", - "type": "string" - }, "quotaUser": { - "location": "query", "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "type": "string" + "type": "string", + "location": "query" }, "pp": { "location": "query", @@ -362,62 +378,153 @@ "type": "boolean" }, "oauth_token": { - "location": "query", "description": "OAuth 2.0 token for the current user.", - "type": "string" + "type": "string", + "location": "query" }, "bearer_token": { + "type": "string", "location": "query", - "description": "OAuth bearer token.", - "type": "string" + "description": "OAuth bearer token." }, "upload_protocol": { "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", "type": "string", "location": "query" - }, - "prettyPrint": { - "location": "query", - "description": "Returns response with indentations and line breaks.", - "default": "true", - "type": "boolean" - }, - "fields": { - "location": "query", - "description": "Selector specifying which fields to include in a partial response.", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "type": "string", - "location": "query" } }, "schemas": { - "ListJobsResponse": { - "description": "Response message for ReportingService.ListJobs.", + "Media": { + "description": "Media resource.", "type": "object", "properties": { + "resourceName": { + "description": "Name of the media resource.", + "type": "string" + } + }, + "id": "Media" + }, + "ReportType": { + "description": "A report type.", + "type": "object", + "properties": { + "systemManaged": { + "description": "True if this a system-managed report type; otherwise false. Reporting jobs\nfor system-managed report types are created automatically and can thus not\nbe used in the `CreateJob` method.", + "type": "boolean" + }, + "id": { + "description": "The ID of the report type (max. 100 characters).", + "type": "string" + }, + "deprecateTime": { + "format": "google-datetime", + "description": "The date/time when this report type was/will be deprecated.", + "type": "string" + }, + "name": { + "description": "The name of the report type (max. 100 characters).", + "type": "string" + } + }, + "id": "ReportType" + }, + "ListReportTypesResponse": { + "description": "Response message for ReportingService.ListReportTypes.", + "type": "object", + "properties": { + "reportTypes": { + "description": "The list of report types.", + "items": { + "$ref": "ReportType" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the\nListReportTypesRequest.page_token\nfield in the subsequent call to `ListReportTypes` method to retrieve the next\npage of results.", + "type": "string" + } + }, + "id": "ListReportTypesResponse" + }, + "Report": { + "description": "A report's metadata including the URL from which the report itself can be\ndownloaded.", + "type": "object", + "properties": { + "createTime": { + "format": "google-datetime", + "description": "The date/time when this report was created.", + "type": "string" + }, + "jobId": { + "description": "The ID of the job that created this report.", + "type": "string" + }, + "id": { + "description": "The server-generated ID of the report.", + "type": "string" + }, + "jobExpireTime": { + "format": "google-datetime", + "description": "The date/time when the job this report belongs to will expire/expired.", + "type": "string" + }, + "endTime": { + "format": "google-datetime", + "description": "The end of the time period that the report instance covers. The value is\nexclusive.", + "type": "string" + }, + "downloadUrl": { + "type": "string", + "description": "The URL from which the report can be downloaded (max. 1000 characters)." + }, + "startTime": { + "format": "google-datetime", + "description": "The start of the time period that the report instance covers. The value is\ninclusive.", + "type": "string" + } + }, + "id": "Report" + }, + "Empty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`.", + "type": "object", + "properties": {}, + "id": "Empty" + }, + "ListJobsResponse": { + "properties": { + "nextPageToken": { + "description": "A token to retrieve next page of results.\nPass this value in the\nListJobsRequest.page_token\nfield in the subsequent call to `ListJobs` method to retrieve the next\npage of results.", + "type": "string" + }, "jobs": { "description": "The list of jobs.", "items": { "$ref": "Job" }, "type": "array" - }, - "nextPageToken": { - "type": "string", - "description": "A token to retrieve next page of results.\nPass this value in the\nListJobsRequest.page_token\nfield in the subsequent call to `ListJobs` method to retrieve the next\npage of results." } }, - "id": "ListJobsResponse" + "id": "ListJobsResponse", + "description": "Response message for ReportingService.ListJobs.", + "type": "object" }, "Job": { "description": "A job creating reports of a specific type.", "type": "object", "properties": { - "reportTypeId": { - "description": "The type of reports this job creates. Corresponds to the ID of a\nReportType.", + "id": { + "description": "The server-generated ID of the job (max. 40 characters).", + "type": "string" + }, + "systemManaged": { + "description": "True if this a system-managed job that cannot be modified by the user;\notherwise false.", + "type": "boolean" + }, + "createTime": { + "format": "google-datetime", + "description": "The creation date/time of the job.", "type": "string" }, "expireTime": { @@ -425,22 +532,13 @@ "description": "The date/time when this job will expire/expired. After a job expired, no\nnew reports are generated.", "type": "string" }, + "reportTypeId": { + "description": "The type of reports this job creates. Corresponds to the ID of a\nReportType.", + "type": "string" + }, "name": { "description": "The name of the job (max. 100 characters).", "type": "string" - }, - "systemManaged": { - "description": "True if this a system-managed job that cannot be modified by the user;\notherwise false.", - "type": "boolean" - }, - "id": { - "description": "The server-generated ID of the job (max. 40 characters).", - "type": "string" - }, - "createTime": { - "format": "google-datetime", - "description": "The creation date/time of the job.", - "type": "string" } }, "id": "Job" @@ -462,104 +560,6 @@ } }, "id": "ListReportsResponse" - }, - "Media": { - "type": "object", - "properties": { - "resourceName": { - "description": "Name of the media resource.", - "type": "string" - } - }, - "id": "Media", - "description": "Media resource." - }, - "ReportType": { - "description": "A report type.", - "type": "object", - "properties": { - "name": { - "description": "The name of the report type (max. 100 characters).", - "type": "string" - }, - "systemManaged": { - "type": "boolean", - "description": "True if this a system-managed report type; otherwise false. Reporting jobs\nfor system-managed report types are created automatically and can thus not\nbe used in the `CreateJob` method." - }, - "id": { - "description": "The ID of the report type (max. 100 characters).", - "type": "string" - }, - "deprecateTime": { - "type": "string", - "format": "google-datetime", - "description": "The date/time when this report type was/will be deprecated." - } - }, - "id": "ReportType" - }, - "ListReportTypesResponse": { - "id": "ListReportTypesResponse", - "description": "Response message for ReportingService.ListReportTypes.", - "type": "object", - "properties": { - "reportTypes": { - "description": "The list of report types.", - "items": { - "$ref": "ReportType" - }, - "type": "array" - }, - "nextPageToken": { - "description": "A token to retrieve next page of results.\nPass this value in the\nListReportTypesRequest.page_token\nfield in the subsequent call to `ListReportTypes` method to retrieve the next\npage of results.", - "type": "string" - } - } - }, - "Empty": { - "type": "object", - "properties": {}, - "id": "Empty", - "description": "A generic empty message that you can re-use to avoid defining duplicated\nempty messages in your APIs. A typical example is to use it as the request\nor the response type of an API method. For instance:\n\n service Foo {\n rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);\n }\n\nThe JSON representation for `Empty` is empty JSON object `{}`." - }, - "Report": { - "type": "object", - "properties": { - "downloadUrl": { - "description": "The URL from which the report can be downloaded (max. 1000 characters).", - "type": "string" - }, - "startTime": { - "format": "google-datetime", - "description": "The start of the time period that the report instance covers. The value is\ninclusive.", - "type": "string" - }, - "createTime": { - "type": "string", - "format": "google-datetime", - "description": "The date/time when this report was created." - }, - "jobId": { - "type": "string", - "description": "The ID of the job that created this report." - }, - "id": { - "description": "The server-generated ID of the report.", - "type": "string" - }, - "jobExpireTime": { - "format": "google-datetime", - "description": "The date/time when the job this report belongs to will expire/expired.", - "type": "string" - }, - "endTime": { - "type": "string", - "format": "google-datetime", - "description": "The end of the time period that the report instance covers. The value is\nexclusive." - } - }, - "id": "Report", - "description": "A report's metadata including the URL from which the report itself can be\ndownloaded." } }, "icons": { @@ -582,9 +582,9 @@ } } }, - "kind": "discovery#restDescription", - "description": "Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.", "servicePath": "", + "description": "Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.", + "kind": "discovery#restDescription", "rootUrl": "https://youtubereporting.googleapis.com/", "basePath": "", "ownerDomain": "google.com", @@ -592,6 +592,6 @@ "batchPath": "batch", "id": "youtubereporting:v1", "documentationLink": "https://developers.google.com/youtube/reporting/v1/reports/", - "revision": "20170918", + "revision": "20170926", "title": "YouTube Reporting API" }